diff --git a/CHANGELOG.md b/CHANGELOG.md index 47e4c72dba..b2068a9ca0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,19 @@ # Changelog +## Release v1.6.0 + +Bug Fix: + +- Fixed share link encoding +- Fixed Edit Lifecycle Storage Class +- Added Tiers Improvements for Bucket Lifecycle management + +Additional Changes: + +- Vulnerability updates +- Update Logo logic + ## Release v1.5.0 Features: diff --git a/web-app/build/asset-manifest.json b/web-app/build/asset-manifest.json index 7c00a6f56e..4ecc3383fe 100644 --- a/web-app/build/asset-manifest.json +++ b/web-app/build/asset-manifest.json @@ -1,9 +1,9 @@ { "files": { "main.css": "./static/css/main.e60e4760.css", - "main.js": "./static/js/main.dd292f6d.js", + "main.js": "./static/js/main.3bcbce18.js", "static/js/5301.2c626a41.chunk.js": "./static/js/5301.2c626a41.chunk.js", - "static/js/9361.3fc638a6.chunk.js": "./static/js/9361.3fc638a6.chunk.js", + "static/js/9361.ce3b326c.chunk.js": "./static/js/9361.ce3b326c.chunk.js", "static/js/843.454ac75f.chunk.js": "./static/js/843.454ac75f.chunk.js", "static/js/3035.d50f543e.chunk.js": "./static/js/3035.d50f543e.chunk.js", "static/js/9537.69d1689c.chunk.js": "./static/js/9537.69d1689c.chunk.js", @@ -33,14 +33,14 @@ "static/js/7041.219c4d11.chunk.js": "./static/js/7041.219c4d11.chunk.js", "static/js/2138.7da0f275.chunk.js": "./static/js/2138.7da0f275.chunk.js", "static/js/5699.016e97fa.chunk.js": "./static/js/5699.016e97fa.chunk.js", - "static/js/7381.0caa382c.chunk.js": "./static/js/7381.0caa382c.chunk.js", + "static/js/7381.7557c5b4.chunk.js": "./static/js/7381.7557c5b4.chunk.js", "static/js/7052.1e7e2b40.chunk.js": "./static/js/7052.1e7e2b40.chunk.js", "static/js/144.c7530a4b.chunk.js": "./static/js/144.c7530a4b.chunk.js", "static/js/5978.7fb91072.chunk.js": "./static/js/5978.7fb91072.chunk.js", "static/js/4103.926c44ef.chunk.js": "./static/js/4103.926c44ef.chunk.js", "static/js/1702.851e407f.chunk.js": "./static/js/1702.851e407f.chunk.js", "static/js/7601.4e033e78.chunk.js": "./static/js/7601.4e033e78.chunk.js", - "static/js/2959.f25a9ef1.chunk.js": "./static/js/2959.f25a9ef1.chunk.js", + "static/js/7945.24a46b62.chunk.js": "./static/js/7945.24a46b62.chunk.js", "static/js/9619.a756233f.chunk.js": "./static/js/9619.a756233f.chunk.js", "static/js/8017.d5b163f3.chunk.js": "./static/js/8017.d5b163f3.chunk.js", "static/js/3323.f86a698b.chunk.js": "./static/js/3323.f86a698b.chunk.js", @@ -50,7 +50,7 @@ "static/js/2166.a0f01e1a.chunk.js": "./static/js/2166.a0f01e1a.chunk.js", "static/js/7063.d62078ab.chunk.js": "./static/js/7063.d62078ab.chunk.js", "static/js/3061.2419f208.chunk.js": "./static/js/3061.2419f208.chunk.js", - "static/js/5064.ccf271db.chunk.js": "./static/js/5064.ccf271db.chunk.js", + "static/js/5064.637811d4.chunk.js": "./static/js/5064.637811d4.chunk.js", "static/js/7643.41c0709d.chunk.js": "./static/js/7643.41c0709d.chunk.js", "static/js/985.c802474d.chunk.js": "./static/js/985.c802474d.chunk.js", "static/js/1370.a3d466ac.chunk.js": "./static/js/1370.a3d466ac.chunk.js", @@ -72,7 +72,7 @@ "static/js/12.ab9b7ed0.chunk.js": "./static/js/12.ab9b7ed0.chunk.js", "static/js/8010.8ce54818.chunk.js": "./static/js/8010.8ce54818.chunk.js", "static/js/2689.5e76c1cd.chunk.js": "./static/js/2689.5e76c1cd.chunk.js", - "static/js/872.6f58df17.chunk.js": "./static/js/872.6f58df17.chunk.js", + "static/js/872.46d59171.chunk.js": "./static/js/872.46d59171.chunk.js", "static/js/4676.8d6be1dd.chunk.js": "./static/js/4676.8d6be1dd.chunk.js", "static/js/8825.e5adf924.chunk.js": "./static/js/8825.e5adf924.chunk.js", "static/js/614.f6cdf349.chunk.js": "./static/js/614.f6cdf349.chunk.js", @@ -93,7 +93,7 @@ "static/js/5079.a0847792.chunk.js": "./static/js/5079.a0847792.chunk.js", "static/js/4581.41480fcf.chunk.js": "./static/js/4581.41480fcf.chunk.js", "static/js/6016.2a05d7e1.chunk.js": "./static/js/6016.2a05d7e1.chunk.js", - "static/js/9652.3c40b533.chunk.js": "./static/js/9652.3c40b533.chunk.js", + "static/js/2346.02be873a.chunk.js": "./static/js/2346.02be873a.chunk.js", "static/js/1195.955963a0.chunk.js": "./static/js/1195.955963a0.chunk.js", "static/js/1011.59fa8004.chunk.js": "./static/js/1011.59fa8004.chunk.js", "static/media/videoBG.mp4": "./static/media/videoBG.17363418b3c2246a0e27.mp4", @@ -119,9 +119,9 @@ "static/media/placeholderimage.png": "./static/media/placeholderimage.077ea48bd1ef1f4a883f.png", "index.html": "./index.html", "main.e60e4760.css.map": "./static/css/main.e60e4760.css.map", - "main.dd292f6d.js.map": "./static/js/main.dd292f6d.js.map", + "main.3bcbce18.js.map": "./static/js/main.3bcbce18.js.map", "5301.2c626a41.chunk.js.map": "./static/js/5301.2c626a41.chunk.js.map", - "9361.3fc638a6.chunk.js.map": "./static/js/9361.3fc638a6.chunk.js.map", + "9361.ce3b326c.chunk.js.map": "./static/js/9361.ce3b326c.chunk.js.map", "843.454ac75f.chunk.js.map": "./static/js/843.454ac75f.chunk.js.map", "3035.d50f543e.chunk.js.map": "./static/js/3035.d50f543e.chunk.js.map", "9537.69d1689c.chunk.js.map": "./static/js/9537.69d1689c.chunk.js.map", @@ -151,14 +151,14 @@ "7041.219c4d11.chunk.js.map": "./static/js/7041.219c4d11.chunk.js.map", "2138.7da0f275.chunk.js.map": "./static/js/2138.7da0f275.chunk.js.map", "5699.016e97fa.chunk.js.map": "./static/js/5699.016e97fa.chunk.js.map", - "7381.0caa382c.chunk.js.map": "./static/js/7381.0caa382c.chunk.js.map", + "7381.7557c5b4.chunk.js.map": "./static/js/7381.7557c5b4.chunk.js.map", "7052.1e7e2b40.chunk.js.map": "./static/js/7052.1e7e2b40.chunk.js.map", "144.c7530a4b.chunk.js.map": "./static/js/144.c7530a4b.chunk.js.map", "5978.7fb91072.chunk.js.map": "./static/js/5978.7fb91072.chunk.js.map", "4103.926c44ef.chunk.js.map": "./static/js/4103.926c44ef.chunk.js.map", "1702.851e407f.chunk.js.map": "./static/js/1702.851e407f.chunk.js.map", "7601.4e033e78.chunk.js.map": "./static/js/7601.4e033e78.chunk.js.map", - "2959.f25a9ef1.chunk.js.map": "./static/js/2959.f25a9ef1.chunk.js.map", + "7945.24a46b62.chunk.js.map": "./static/js/7945.24a46b62.chunk.js.map", "9619.a756233f.chunk.js.map": "./static/js/9619.a756233f.chunk.js.map", "8017.d5b163f3.chunk.js.map": "./static/js/8017.d5b163f3.chunk.js.map", "3323.f86a698b.chunk.js.map": "./static/js/3323.f86a698b.chunk.js.map", @@ -168,7 +168,7 @@ "2166.a0f01e1a.chunk.js.map": "./static/js/2166.a0f01e1a.chunk.js.map", "7063.d62078ab.chunk.js.map": "./static/js/7063.d62078ab.chunk.js.map", "3061.2419f208.chunk.js.map": "./static/js/3061.2419f208.chunk.js.map", - "5064.ccf271db.chunk.js.map": "./static/js/5064.ccf271db.chunk.js.map", + "5064.637811d4.chunk.js.map": "./static/js/5064.637811d4.chunk.js.map", "7643.41c0709d.chunk.js.map": "./static/js/7643.41c0709d.chunk.js.map", "985.c802474d.chunk.js.map": "./static/js/985.c802474d.chunk.js.map", "1370.a3d466ac.chunk.js.map": "./static/js/1370.a3d466ac.chunk.js.map", @@ -190,7 +190,7 @@ "12.ab9b7ed0.chunk.js.map": "./static/js/12.ab9b7ed0.chunk.js.map", "8010.8ce54818.chunk.js.map": "./static/js/8010.8ce54818.chunk.js.map", "2689.5e76c1cd.chunk.js.map": "./static/js/2689.5e76c1cd.chunk.js.map", - "872.6f58df17.chunk.js.map": "./static/js/872.6f58df17.chunk.js.map", + "872.46d59171.chunk.js.map": "./static/js/872.46d59171.chunk.js.map", "4676.8d6be1dd.chunk.js.map": "./static/js/4676.8d6be1dd.chunk.js.map", "8825.e5adf924.chunk.js.map": "./static/js/8825.e5adf924.chunk.js.map", "614.f6cdf349.chunk.js.map": "./static/js/614.f6cdf349.chunk.js.map", @@ -211,12 +211,12 @@ "5079.a0847792.chunk.js.map": "./static/js/5079.a0847792.chunk.js.map", "4581.41480fcf.chunk.js.map": "./static/js/4581.41480fcf.chunk.js.map", "6016.2a05d7e1.chunk.js.map": "./static/js/6016.2a05d7e1.chunk.js.map", - "9652.3c40b533.chunk.js.map": "./static/js/9652.3c40b533.chunk.js.map", + "2346.02be873a.chunk.js.map": "./static/js/2346.02be873a.chunk.js.map", "1195.955963a0.chunk.js.map": "./static/js/1195.955963a0.chunk.js.map", "1011.59fa8004.chunk.js.map": "./static/js/1011.59fa8004.chunk.js.map" }, "entrypoints": [ "static/css/main.e60e4760.css", - "static/js/main.dd292f6d.js" + "static/js/main.3bcbce18.js" ] } \ No newline at end of file diff --git a/web-app/build/index.html b/web-app/build/index.html index e0de9863c3..90ac2cacec 100644 --- a/web-app/build/index.html +++ b/web-app/build/index.html @@ -1 +1 @@ -MinIO Console
\ No newline at end of file +MinIO Console
\ No newline at end of file diff --git a/web-app/build/scripts/pdf.worker.min.js b/web-app/build/scripts/pdf.worker.min.js deleted file mode 100644 index 4d021adc2c..0000000000 --- a/web-app/build/scripts/pdf.worker.min.js +++ /dev/null @@ -1,61724 +0,0 @@ -/** - * @licstart The following is the entire license notice for the - * JavaScript code in this page - * - * Copyright 2023 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @licend The above is the entire license notice for the - * JavaScript code in this page - */ -!(function webpackUniversalModuleDefinition(e, t) { - "object" == typeof exports && "object" == typeof module - ? (module.exports = e.pdfjsWorker = t()) - : "function" == typeof define && define.amd - ? define("pdfjs-dist/build/pdf.worker", [], () => (e.pdfjsWorker = t())) - : "object" == typeof exports - ? (exports["pdfjs-dist/build/pdf.worker"] = e.pdfjsWorker = t()) - : (e["pdfjs-dist/build/pdf.worker"] = e.pdfjsWorker = t()); -})(globalThis, () => - (() => { - "use strict"; - var e = [ - , - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.WorkerTask = t.WorkerMessageHandler = void 0; - var r = a(2), - n = a(3), - i = a(4), - s = a(6), - o = a(10), - c = a(68), - l = a(73), - h = a(104), - u = a(105), - d = a(72); - class WorkerTask { - constructor(e) { - this.name = e; - this.terminated = !1; - this._capability = new r.PromiseCapability(); - } - get finished() { - return this._capability.promise; - } - finish() { - this._capability.resolve(); - } - terminate() { - this.terminated = !0; - } - ensureNotTerminated() { - if (this.terminated) - throw new Error("Worker task was terminated"); - } - } - t.WorkerTask = WorkerTask; - class WorkerMessageHandler { - static setup(e, t) { - let a = !1; - e.on("test", function (t) { - if (!a) { - a = !0; - e.send("test", t instanceof Uint8Array); - } - }); - e.on("configure", function (e) { - (0, r.setVerbosityLevel)(e.verbosity); - }); - e.on("GetDocRequest", function (e) { - return WorkerMessageHandler.createDocumentHandler(e, t); - }); - } - static createDocumentHandler(e, t) { - let a, - f = !1, - g = null; - const p = new Set(), - m = (0, r.getVerbosityLevel)(), - { docId: b, apiVersion: y } = e, - w = "3.11.174"; - if (y !== w) - throw new Error( - `The API version "${y}" does not match the Worker version "${w}".`, - ); - const S = []; - for (const e in []) S.push(e); - if (S.length) - throw new Error( - "The `Array.prototype` contains unexpected enumerable properties: " + - S.join(", ") + - "; thus breaking e.g. `for...in` iteration of `Array`s.", - ); - const x = b + "_worker"; - let C = new h.MessageHandler(x, b, t); - function ensureNotTerminated() { - if (f) throw new Error("Worker was terminated"); - } - function startWorkerTask(e) { - p.add(e); - } - function finishWorkerTask(e) { - e.finish(); - p.delete(e); - } - async function loadDocument(e) { - await a.ensureDoc("checkHeader"); - await a.ensureDoc("parseStartXRef"); - await a.ensureDoc("parse", [e]); - await a.ensureDoc("checkFirstPage", [e]); - await a.ensureDoc("checkLastPage", [e]); - const t = await a.ensureDoc("isPureXfa"); - if (t) { - const e = new WorkerTask("loadXfaFonts"); - startWorkerTask(e); - await Promise.all([ - a - .loadXfaFonts(C, e) - .catch((e) => {}) - .then(() => finishWorkerTask(e)), - a.loadXfaImages(), - ]); - } - const [r, n] = await Promise.all([ - a.ensureDoc("numPages"), - a.ensureDoc("fingerprints"), - ]); - return { - numPages: r, - fingerprints: n, - htmlForXfa: t ? await a.ensureDoc("htmlForXfa") : null, - }; - } - function getPdfManager({ - data: e, - password: t, - disableAutoFetch: a, - rangeChunkSize: i, - length: o, - docBaseUrl: c, - enableXfa: l, - evaluatorOptions: h, - }) { - const d = { - source: null, - disableAutoFetch: a, - docBaseUrl: c, - docId: b, - enableXfa: l, - evaluatorOptions: h, - handler: C, - length: o, - password: t, - rangeChunkSize: i, - }, - f = new r.PromiseCapability(); - let p; - if (e) { - try { - d.source = e; - p = new s.LocalPdfManager(d); - f.resolve(p); - } catch (e) { - f.reject(e); - } - return f.promise; - } - let m, - y = []; - try { - m = new u.PDFWorkerStream(C); - } catch (e) { - f.reject(e); - return f.promise; - } - const w = m.getFullReader(); - w.headersReady - .then(function () { - if (w.isRangeSupported) { - d.source = m; - d.length = w.contentLength; - d.disableAutoFetch ||= w.isStreamingSupported; - p = new s.NetworkPdfManager(d); - for (const e of y) p.sendProgressiveData(e); - y = []; - f.resolve(p); - g = null; - } - }) - .catch(function (e) { - f.reject(e); - g = null; - }); - let S = 0; - new Promise(function (e, t) { - const readChunk = function ({ value: e, done: a }) { - try { - ensureNotTerminated(); - if (a) { - p || - (function () { - const e = (0, n.arrayBuffersToBytes)(y); - o && - e.length !== o && - (0, r.warn)( - "reported HTTP length is different from actual", - ); - try { - d.source = e; - p = new s.LocalPdfManager(d); - f.resolve(p); - } catch (e) { - f.reject(e); - } - y = []; - })(); - g = null; - return; - } - S += e.byteLength; - w.isStreamingSupported || - C.send("DocProgress", { - loaded: S, - total: Math.max(S, w.contentLength || 0), - }); - p ? p.sendProgressiveData(e) : y.push(e); - w.read().then(readChunk, t); - } catch (e) { - t(e); - } - }; - w.read().then(readChunk, t); - }).catch(function (e) { - f.reject(e); - g = null; - }); - g = function (e) { - m.cancelAllRequests(e); - }; - return f.promise; - } - C.on("GetPage", function (e) { - return a.getPage(e.pageIndex).then(function (e) { - return Promise.all([ - a.ensure(e, "rotate"), - a.ensure(e, "ref"), - a.ensure(e, "userUnit"), - a.ensure(e, "view"), - ]).then(function ([e, t, a, r]) { - return { rotate: e, ref: t, userUnit: a, view: r }; - }); - }); - }); - C.on("GetPageIndex", function (e) { - const t = i.Ref.get(e.num, e.gen); - return a.ensureCatalog("getPageIndex", [t]); - }); - C.on("GetDestinations", function (e) { - return a.ensureCatalog("destinations"); - }); - C.on("GetDestination", function (e) { - return a.ensureCatalog("getDestination", [e.id]); - }); - C.on("GetPageLabels", function (e) { - return a.ensureCatalog("pageLabels"); - }); - C.on("GetPageLayout", function (e) { - return a.ensureCatalog("pageLayout"); - }); - C.on("GetPageMode", function (e) { - return a.ensureCatalog("pageMode"); - }); - C.on("GetViewerPreferences", function (e) { - return a.ensureCatalog("viewerPreferences"); - }); - C.on("GetOpenAction", function (e) { - return a.ensureCatalog("openAction"); - }); - C.on("GetAttachments", function (e) { - return a.ensureCatalog("attachments"); - }); - C.on("GetDocJSActions", function (e) { - return a.ensureCatalog("jsActions"); - }); - C.on("GetPageJSActions", function ({ pageIndex: e }) { - return a.getPage(e).then(function (e) { - return a.ensure(e, "jsActions"); - }); - }); - C.on("GetOutline", function (e) { - return a.ensureCatalog("documentOutline"); - }); - C.on("GetOptionalContentConfig", function (e) { - return a.ensureCatalog("optionalContentConfig"); - }); - C.on("GetPermissions", function (e) { - return a.ensureCatalog("permissions"); - }); - C.on("GetMetadata", function (e) { - return Promise.all([ - a.ensureDoc("documentInfo"), - a.ensureCatalog("metadata"), - ]); - }); - C.on("GetMarkInfo", function (e) { - return a.ensureCatalog("markInfo"); - }); - C.on("GetData", function (e) { - return a.requestLoadedStream().then(function (e) { - return e.bytes; - }); - }); - C.on("GetAnnotations", function ({ pageIndex: e, intent: t }) { - return a.getPage(e).then(function (a) { - const r = new WorkerTask(`GetAnnotations: page ${e}`); - startWorkerTask(r); - return a.getAnnotationsData(C, r, t).then( - (e) => { - finishWorkerTask(r); - return e; - }, - (e) => { - finishWorkerTask(r); - throw e; - }, - ); - }); - }); - C.on("GetFieldObjects", function (e) { - return a.ensureDoc("fieldObjects"); - }); - C.on("HasJSActions", function (e) { - return a.ensureDoc("hasJSActions"); - }); - C.on("GetCalculationOrderIds", function (e) { - return a.ensureDoc("calculationOrderIds"); - }); - C.on( - "SaveDocument", - async function ({ - isPureXfa: e, - numPages: t, - annotationStorage: s, - filename: c, - }) { - const h = [ - a.requestLoadedStream(), - a.ensureCatalog("acroForm"), - a.ensureCatalog("acroFormRef"), - a.ensureDoc("startXRef"), - a.ensureDoc("xref"), - a.ensureDoc("linearization"), - a.ensureCatalog("structTreeRoot"), - ], - u = [], - f = e ? null : (0, n.getNewAnnotationsMap)(s), - [g, p, m, b, y, w, S] = await Promise.all(h), - x = y.trailer.getRaw("Root") || null; - let k; - if (f) { - S - ? (await S.canUpdateStructTree({ - pdfManager: a, - newAnnotationsByPage: f, - })) && (k = S) - : (await d.StructTreeRoot.canCreateStructureTree({ - catalogRef: x, - pdfManager: a, - newAnnotationsByPage: f, - })) && (k = null); - const e = o.AnnotationFactory.generateImages( - s.values(), - y, - a.evaluatorOptions.isOffscreenCanvasSupported, - ), - t = void 0 === k ? u : []; - for (const [r, n] of f) - t.push( - a.getPage(r).then((t) => { - const a = new WorkerTask(`Save (editor): page ${r}`); - return t - .saveNewAnnotations(C, a, n, e) - .finally(function () { - finishWorkerTask(a); - }); - }), - ); - null === k - ? u.push( - Promise.all(t).then(async (e) => { - await d.StructTreeRoot.createStructureTree({ - newAnnotationsByPage: f, - xref: y, - catalogRef: x, - pdfManager: a, - newRefs: e, - }); - return e; - }), - ) - : k && - u.push( - Promise.all(t).then(async (e) => { - await k.updateStructureTree({ - newAnnotationsByPage: f, - pdfManager: a, - newRefs: e, - }); - return e; - }), - ); - } - if (e) u.push(a.serializeXfaData(s)); - else - for (let e = 0; e < t; e++) - u.push( - a.getPage(e).then(function (t) { - const a = new WorkerTask(`Save: page ${e}`); - return t.save(C, a, s).finally(function () { - finishWorkerTask(a); - }); - }), - ); - const v = await Promise.all(u); - let F = [], - O = null; - if (e) { - O = v[0]; - if (!O) return g.bytes; - } else { - F = v.flat(2); - if (0 === F.length) return g.bytes; - } - const T = - m && - p instanceof i.Dict && - F.some((e) => e.needAppearances), - M = (p instanceof i.Dict && p.get("XFA")) || null; - let D = null, - E = !1; - if (Array.isArray(M)) { - for (let e = 0, t = M.length; e < t; e += 2) - if ("datasets" === M[e]) { - D = M[e + 1]; - E = !0; - } - null === D && (D = y.getNewTemporaryRef()); - } else M && (0, r.warn)("Unsupported XFA type."); - let N = Object.create(null); - if (y.trailer) { - const e = Object.create(null), - t = y.trailer.get("Info") || null; - t instanceof i.Dict && - t.forEach((t, a) => { - "string" == typeof a && - (e[t] = (0, r.stringToPDFString)(a)); - }); - N = { - rootRef: x, - encryptRef: y.trailer.getRaw("Encrypt") || null, - newRef: y.getNewTemporaryRef(), - infoRef: y.trailer.getRaw("Info") || null, - info: e, - fileIds: y.trailer.get("ID") || null, - startXRef: w ? b : y.lastXRefStreamPos ?? b, - filename: c, - }; - } - return (0, l.incrementalUpdate)({ - originalData: g.bytes, - xrefInfo: N, - newRefs: F, - xref: y, - hasXfa: !!M, - xfaDatasetsRef: D, - hasXfaDatasetsEntry: E, - needAppearances: T, - acroFormRef: m, - acroForm: p, - xfaData: O, - }).finally(() => { - y.resetNewTemporaryRef(); - }); - }, - ); - C.on("GetOperatorList", function (e, t) { - const n = e.pageIndex; - a.getPage(n).then(function (a) { - const i = new WorkerTask(`GetOperatorList: page ${n}`); - startWorkerTask(i); - const s = m >= r.VerbosityLevel.INFOS ? Date.now() : 0; - a.getOperatorList({ - handler: C, - sink: t, - task: i, - intent: e.intent, - cacheKey: e.cacheKey, - annotationStorage: e.annotationStorage, - }).then( - function (e) { - finishWorkerTask(i); - s && - (0, r.info)( - `page=${n + 1} - getOperatorList: time=${Date.now() - s}ms, len=${e.length}`, - ); - t.close(); - }, - function (e) { - finishWorkerTask(i); - i.terminated || t.error(e); - }, - ); - }); - }); - C.on("GetTextContent", function (e, t) { - const { - pageIndex: n, - includeMarkedContent: i, - disableNormalization: s, - } = e; - a.getPage(n).then(function (e) { - const a = new WorkerTask("GetTextContent: page " + n); - startWorkerTask(a); - const o = m >= r.VerbosityLevel.INFOS ? Date.now() : 0; - e.extractTextContent({ - handler: C, - task: a, - sink: t, - includeMarkedContent: i, - disableNormalization: s, - }).then( - function () { - finishWorkerTask(a); - o && - (0, r.info)( - `page=${n + 1} - getTextContent: time=` + - (Date.now() - o) + - "ms", - ); - t.close(); - }, - function (e) { - finishWorkerTask(a); - a.terminated || t.error(e); - }, - ); - }); - }); - C.on("GetStructTree", function (e) { - return a.getPage(e.pageIndex).then(function (e) { - return a.ensure(e, "getStructTree"); - }); - }); - C.on("FontFallback", function (e) { - return a.fontFallback(e.id, C); - }); - C.on("Cleanup", function (e) { - return a.cleanup(!0); - }); - C.on("Terminate", function (e) { - f = !0; - const t = []; - if (a) { - a.terminate(new r.AbortException("Worker was terminated.")); - const e = a.cleanup(); - t.push(e); - a = null; - } else (0, c.clearGlobalCaches)(); - g && g(new r.AbortException("Worker was terminated.")); - for (const e of p) { - t.push(e.finished); - e.terminate(); - } - return Promise.all(t).then(function () { - C.destroy(); - C = null; - }); - }); - C.on("Ready", function (t) { - !(function setupDoc(e) { - function onSuccess(e) { - ensureNotTerminated(); - C.send("GetDoc", { pdfInfo: e }); - } - function onFailure(e) { - ensureNotTerminated(); - if (e instanceof r.PasswordException) { - const t = new WorkerTask( - `PasswordException: response ${e.code}`, - ); - startWorkerTask(t); - C.sendWithPromise("PasswordRequest", e) - .then(function ({ password: e }) { - finishWorkerTask(t); - a.updatePassword(e); - pdfManagerReady(); - }) - .catch(function () { - finishWorkerTask(t); - C.send("DocException", e); - }); - } else - e instanceof r.InvalidPDFException || - e instanceof r.MissingPDFException || - e instanceof r.UnexpectedResponseException || - e instanceof r.UnknownErrorException - ? C.send("DocException", e) - : C.send( - "DocException", - new r.UnknownErrorException( - e.message, - e.toString(), - ), - ); - } - function pdfManagerReady() { - ensureNotTerminated(); - loadDocument(!1).then(onSuccess, function (e) { - ensureNotTerminated(); - e instanceof n.XRefParseException - ? a.requestLoadedStream().then(function () { - ensureNotTerminated(); - loadDocument(!0).then(onSuccess, onFailure); - }) - : onFailure(e); - }); - } - ensureNotTerminated(); - getPdfManager(e) - .then(function (e) { - if (f) { - e.terminate( - new r.AbortException("Worker was terminated."), - ); - throw new Error("Worker was terminated"); - } - a = e; - a.requestLoadedStream(!0).then((e) => { - C.send("DataLoaded", { length: e.bytes.byteLength }); - }); - }) - .then(pdfManagerReady, onFailure); - })(e); - e = null; - }); - return x; - } - static initializeFromPort(e) { - const t = new h.MessageHandler("worker", "main", e); - WorkerMessageHandler.setup(t, e); - t.send("ready", null); - } - } - t.WorkerMessageHandler = WorkerMessageHandler; - "undefined" == typeof window && - !r.isNodeJS && - "undefined" != typeof self && - (function isMessagePort(e) { - return "function" == typeof e.postMessage && "onmessage" in e; - })(self) && - WorkerMessageHandler.initializeFromPort(self); - }, - (e, t) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.VerbosityLevel = - t.Util = - t.UnknownErrorException = - t.UnexpectedResponseException = - t.TextRenderingMode = - t.RenderingIntentFlag = - t.PromiseCapability = - t.PermissionFlag = - t.PasswordResponses = - t.PasswordException = - t.PageActionEventType = - t.OPS = - t.MissingPDFException = - t.MAX_IMAGE_SIZE_TO_CACHE = - t.LINE_FACTOR = - t.LINE_DESCENT_FACTOR = - t.InvalidPDFException = - t.ImageKind = - t.IDENTITY_MATRIX = - t.FormatError = - t.FeatureTest = - t.FONT_IDENTITY_MATRIX = - t.DocumentActionEventType = - t.CMapCompressionType = - t.BaseException = - t.BASELINE_FACTOR = - t.AnnotationType = - t.AnnotationReplyType = - t.AnnotationPrefix = - t.AnnotationMode = - t.AnnotationFlag = - t.AnnotationFieldFlag = - t.AnnotationEditorType = - t.AnnotationEditorPrefix = - t.AnnotationEditorParamsType = - t.AnnotationBorderStyleType = - t.AnnotationActionEventType = - t.AbortException = - void 0; - t.assert = function assert(e, t) { - e || unreachable(t); - }; - t.bytesToString = bytesToString; - t.createValidAbsoluteUrl = function createValidAbsoluteUrl( - e, - t = null, - a = null, - ) { - if (!e) return null; - try { - if (a && "string" == typeof e) { - if (a.addDefaultProtocol && e.startsWith("www.")) { - const t = e.match(/\./g); - t?.length >= 2 && (e = `http://${e}`); - } - if (a.tryConvertEncoding) - try { - e = stringToUTF8String(e); - } catch {} - } - const r = t ? new URL(e, t) : new URL(e); - if ( - (function _isValidProtocol(e) { - switch (e?.protocol) { - case "http:": - case "https:": - case "ftp:": - case "mailto:": - case "tel:": - return !0; - default: - return !1; - } - })(r) - ) - return r; - } catch {} - return null; - }; - t.getModificationDate = function getModificationDate(e = new Date()) { - return [ - e.getUTCFullYear().toString(), - (e.getUTCMonth() + 1).toString().padStart(2, "0"), - e.getUTCDate().toString().padStart(2, "0"), - e.getUTCHours().toString().padStart(2, "0"), - e.getUTCMinutes().toString().padStart(2, "0"), - e.getUTCSeconds().toString().padStart(2, "0"), - ].join(""); - }; - t.getUuid = function getUuid() { - if ( - "undefined" != typeof crypto && - "function" == typeof crypto?.randomUUID - ) - return crypto.randomUUID(); - const e = new Uint8Array(32); - if ( - "undefined" != typeof crypto && - "function" == typeof crypto?.getRandomValues - ) - crypto.getRandomValues(e); - else - for (let t = 0; t < 32; t++) - e[t] = Math.floor(255 * Math.random()); - return bytesToString(e); - }; - t.getVerbosityLevel = function getVerbosityLevel() { - return n; - }; - t.info = function info(e) { - n >= r.INFOS && console.log(`Info: ${e}`); - }; - t.isArrayBuffer = function isArrayBuffer(e) { - return "object" == typeof e && void 0 !== e?.byteLength; - }; - t.isArrayEqual = function isArrayEqual(e, t) { - if (e.length !== t.length) return !1; - for (let a = 0, r = e.length; a < r; a++) - if (e[a] !== t[a]) return !1; - return !0; - }; - t.isNodeJS = void 0; - t.normalizeUnicode = function normalizeUnicode(e) { - if (!c) { - c = - /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu; - l = new Map([["ſt", "ſt"]]); - } - return e.replaceAll(c, (e, t, a) => - t ? t.normalize("NFKC") : l.get(a), - ); - }; - t.objectFromMap = function objectFromMap(e) { - const t = Object.create(null); - for (const [a, r] of e) t[a] = r; - return t; - }; - t.objectSize = function objectSize(e) { - return Object.keys(e).length; - }; - t.setVerbosityLevel = function setVerbosityLevel(e) { - Number.isInteger(e) && (n = e); - }; - t.shadow = shadow; - t.string32 = function string32(e) { - return String.fromCharCode( - (e >> 24) & 255, - (e >> 16) & 255, - (e >> 8) & 255, - 255 & e, - ); - }; - t.stringToBytes = stringToBytes; - t.stringToPDFString = function stringToPDFString(e) { - if (e[0] >= "ï") { - let t; - "þ" === e[0] && "ÿ" === e[1] - ? (t = "utf-16be") - : "ÿ" === e[0] && "þ" === e[1] - ? (t = "utf-16le") - : "ï" === e[0] && - "»" === e[1] && - "¿" === e[2] && - (t = "utf-8"); - if (t) - try { - const a = new TextDecoder(t, { fatal: !0 }), - r = stringToBytes(e); - return a.decode(r); - } catch (e) { - warn(`stringToPDFString: "${e}".`); - } - } - const t = []; - for (let a = 0, r = e.length; a < r; a++) { - const r = o[e.charCodeAt(a)]; - t.push(r ? String.fromCharCode(r) : e.charAt(a)); - } - return t.join(""); - }; - t.stringToUTF8String = stringToUTF8String; - t.unreachable = unreachable; - t.utf8StringToString = function utf8StringToString(e) { - return unescape(encodeURIComponent(e)); - }; - t.warn = warn; - const a = !( - "object" != typeof process || - process + "" != "[object process]" || - process.versions.nw || - (process.versions.electron && - process.type && - "browser" !== process.type) - ); - t.isNodeJS = a; - t.IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0]; - t.FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0]; - t.MAX_IMAGE_SIZE_TO_CACHE = 1e7; - t.LINE_FACTOR = 1.35; - t.LINE_DESCENT_FACTOR = 0.35; - t.BASELINE_FACTOR = 0.25925925925925924; - t.RenderingIntentFlag = { - ANY: 1, - DISPLAY: 2, - PRINT: 4, - SAVE: 8, - ANNOTATIONS_FORMS: 16, - ANNOTATIONS_STORAGE: 32, - ANNOTATIONS_DISABLE: 64, - OPLIST: 256, - }; - t.AnnotationMode = { - DISABLE: 0, - ENABLE: 1, - ENABLE_FORMS: 2, - ENABLE_STORAGE: 3, - }; - t.AnnotationEditorPrefix = "pdfjs_internal_editor_"; - t.AnnotationEditorType = { - DISABLE: -1, - NONE: 0, - FREETEXT: 3, - STAMP: 13, - INK: 15, - }; - t.AnnotationEditorParamsType = { - RESIZE: 1, - CREATE: 2, - FREETEXT_SIZE: 11, - FREETEXT_COLOR: 12, - FREETEXT_OPACITY: 13, - INK_COLOR: 21, - INK_THICKNESS: 22, - INK_OPACITY: 23, - }; - t.PermissionFlag = { - PRINT: 4, - MODIFY_CONTENTS: 8, - COPY: 16, - MODIFY_ANNOTATIONS: 32, - FILL_INTERACTIVE_FORMS: 256, - COPY_FOR_ACCESSIBILITY: 512, - ASSEMBLE: 1024, - PRINT_HIGH_QUALITY: 2048, - }; - t.TextRenderingMode = { - FILL: 0, - STROKE: 1, - FILL_STROKE: 2, - INVISIBLE: 3, - FILL_ADD_TO_PATH: 4, - STROKE_ADD_TO_PATH: 5, - FILL_STROKE_ADD_TO_PATH: 6, - ADD_TO_PATH: 7, - FILL_STROKE_MASK: 3, - ADD_TO_PATH_FLAG: 4, - }; - t.ImageKind = { GRAYSCALE_1BPP: 1, RGB_24BPP: 2, RGBA_32BPP: 3 }; - t.AnnotationType = { - TEXT: 1, - LINK: 2, - FREETEXT: 3, - LINE: 4, - SQUARE: 5, - CIRCLE: 6, - POLYGON: 7, - POLYLINE: 8, - HIGHLIGHT: 9, - UNDERLINE: 10, - SQUIGGLY: 11, - STRIKEOUT: 12, - STAMP: 13, - CARET: 14, - INK: 15, - POPUP: 16, - FILEATTACHMENT: 17, - SOUND: 18, - MOVIE: 19, - WIDGET: 20, - SCREEN: 21, - PRINTERMARK: 22, - TRAPNET: 23, - WATERMARK: 24, - THREED: 25, - REDACT: 26, - }; - t.AnnotationReplyType = { GROUP: "Group", REPLY: "R" }; - t.AnnotationFlag = { - INVISIBLE: 1, - HIDDEN: 2, - PRINT: 4, - NOZOOM: 8, - NOROTATE: 16, - NOVIEW: 32, - READONLY: 64, - LOCKED: 128, - TOGGLENOVIEW: 256, - LOCKEDCONTENTS: 512, - }; - t.AnnotationFieldFlag = { - READONLY: 1, - REQUIRED: 2, - NOEXPORT: 4, - MULTILINE: 4096, - PASSWORD: 8192, - NOTOGGLETOOFF: 16384, - RADIO: 32768, - PUSHBUTTON: 65536, - COMBO: 131072, - EDIT: 262144, - SORT: 524288, - FILESELECT: 1048576, - MULTISELECT: 2097152, - DONOTSPELLCHECK: 4194304, - DONOTSCROLL: 8388608, - COMB: 16777216, - RICHTEXT: 33554432, - RADIOSINUNISON: 33554432, - COMMITONSELCHANGE: 67108864, - }; - t.AnnotationBorderStyleType = { - SOLID: 1, - DASHED: 2, - BEVELED: 3, - INSET: 4, - UNDERLINE: 5, - }; - t.AnnotationActionEventType = { - E: "Mouse Enter", - X: "Mouse Exit", - D: "Mouse Down", - U: "Mouse Up", - Fo: "Focus", - Bl: "Blur", - PO: "PageOpen", - PC: "PageClose", - PV: "PageVisible", - PI: "PageInvisible", - K: "Keystroke", - F: "Format", - V: "Validate", - C: "Calculate", - }; - t.DocumentActionEventType = { - WC: "WillClose", - WS: "WillSave", - DS: "DidSave", - WP: "WillPrint", - DP: "DidPrint", - }; - t.PageActionEventType = { O: "PageOpen", C: "PageClose" }; - const r = { ERRORS: 0, WARNINGS: 1, INFOS: 5 }; - t.VerbosityLevel = r; - t.CMapCompressionType = { NONE: 0, BINARY: 1 }; - t.OPS = { - dependency: 1, - setLineWidth: 2, - setLineCap: 3, - setLineJoin: 4, - setMiterLimit: 5, - setDash: 6, - setRenderingIntent: 7, - setFlatness: 8, - setGState: 9, - save: 10, - restore: 11, - transform: 12, - moveTo: 13, - lineTo: 14, - curveTo: 15, - curveTo2: 16, - curveTo3: 17, - closePath: 18, - rectangle: 19, - stroke: 20, - closeStroke: 21, - fill: 22, - eoFill: 23, - fillStroke: 24, - eoFillStroke: 25, - closeFillStroke: 26, - closeEOFillStroke: 27, - endPath: 28, - clip: 29, - eoClip: 30, - beginText: 31, - endText: 32, - setCharSpacing: 33, - setWordSpacing: 34, - setHScale: 35, - setLeading: 36, - setFont: 37, - setTextRenderingMode: 38, - setTextRise: 39, - moveText: 40, - setLeadingMoveText: 41, - setTextMatrix: 42, - nextLine: 43, - showText: 44, - showSpacedText: 45, - nextLineShowText: 46, - nextLineSetSpacingShowText: 47, - setCharWidth: 48, - setCharWidthAndBounds: 49, - setStrokeColorSpace: 50, - setFillColorSpace: 51, - setStrokeColor: 52, - setStrokeColorN: 53, - setFillColor: 54, - setFillColorN: 55, - setStrokeGray: 56, - setFillGray: 57, - setStrokeRGBColor: 58, - setFillRGBColor: 59, - setStrokeCMYKColor: 60, - setFillCMYKColor: 61, - shadingFill: 62, - beginInlineImage: 63, - beginImageData: 64, - endInlineImage: 65, - paintXObject: 66, - markPoint: 67, - markPointProps: 68, - beginMarkedContent: 69, - beginMarkedContentProps: 70, - endMarkedContent: 71, - beginCompat: 72, - endCompat: 73, - paintFormXObjectBegin: 74, - paintFormXObjectEnd: 75, - beginGroup: 76, - endGroup: 77, - beginAnnotation: 80, - endAnnotation: 81, - paintImageMaskXObject: 83, - paintImageMaskXObjectGroup: 84, - paintImageXObject: 85, - paintInlineImageXObject: 86, - paintInlineImageXObjectGroup: 87, - paintImageXObjectRepeat: 88, - paintImageMaskXObjectRepeat: 89, - paintSolidColorImageMask: 90, - constructPath: 91, - }; - t.PasswordResponses = { NEED_PASSWORD: 1, INCORRECT_PASSWORD: 2 }; - let n = r.WARNINGS; - function warn(e) { - n >= r.WARNINGS && console.log(`Warning: ${e}`); - } - function unreachable(e) { - throw new Error(e); - } - function shadow(e, t, a, r = !1) { - Object.defineProperty(e, t, { - value: a, - enumerable: !r, - configurable: !0, - writable: !1, - }); - return a; - } - const i = (function BaseExceptionClosure() { - function BaseException(e, t) { - this.constructor === BaseException && - unreachable("Cannot initialize BaseException."); - this.message = e; - this.name = t; - } - BaseException.prototype = new Error(); - BaseException.constructor = BaseException; - return BaseException; - })(); - t.BaseException = i; - t.PasswordException = class PasswordException extends i { - constructor(e, t) { - super(e, "PasswordException"); - this.code = t; - } - }; - t.UnknownErrorException = class UnknownErrorException extends i { - constructor(e, t) { - super(e, "UnknownErrorException"); - this.details = t; - } - }; - t.InvalidPDFException = class InvalidPDFException extends i { - constructor(e) { - super(e, "InvalidPDFException"); - } - }; - t.MissingPDFException = class MissingPDFException extends i { - constructor(e) { - super(e, "MissingPDFException"); - } - }; - t.UnexpectedResponseException = class UnexpectedResponseException extends ( - i - ) { - constructor(e, t) { - super(e, "UnexpectedResponseException"); - this.status = t; - } - }; - t.FormatError = class FormatError extends i { - constructor(e) { - super(e, "FormatError"); - } - }; - t.AbortException = class AbortException extends i { - constructor(e) { - super(e, "AbortException"); - } - }; - function bytesToString(e) { - ("object" == typeof e && void 0 !== e?.length) || - unreachable("Invalid argument for bytesToString"); - const t = e.length, - a = 8192; - if (t < a) return String.fromCharCode.apply(null, e); - const r = []; - for (let n = 0; n < t; n += a) { - const i = Math.min(n + a, t), - s = e.subarray(n, i); - r.push(String.fromCharCode.apply(null, s)); - } - return r.join(""); - } - function stringToBytes(e) { - "string" != typeof e && - unreachable("Invalid argument for stringToBytes"); - const t = e.length, - a = new Uint8Array(t); - for (let r = 0; r < t; ++r) a[r] = 255 & e.charCodeAt(r); - return a; - } - t.FeatureTest = class FeatureTest { - static get isLittleEndian() { - return shadow( - this, - "isLittleEndian", - (function isLittleEndian() { - const e = new Uint8Array(4); - e[0] = 1; - return 1 === new Uint32Array(e.buffer, 0, 1)[0]; - })(), - ); - } - static get isEvalSupported() { - return shadow( - this, - "isEvalSupported", - (function isEvalSupported() { - try { - new Function(""); - return !0; - } catch { - return !1; - } - })(), - ); - } - static get isOffscreenCanvasSupported() { - return shadow( - this, - "isOffscreenCanvasSupported", - "undefined" != typeof OffscreenCanvas, - ); - } - static get platform() { - return "undefined" == typeof navigator - ? shadow(this, "platform", { isWin: !1, isMac: !1 }) - : shadow(this, "platform", { - isWin: navigator.platform.includes("Win"), - isMac: navigator.platform.includes("Mac"), - }); - } - static get isCSSRoundSupported() { - return shadow( - this, - "isCSSRoundSupported", - globalThis.CSS?.supports?.("width: round(1.5px, 1px)"), - ); - } - }; - const s = [...Array(256).keys()].map((e) => - e.toString(16).padStart(2, "0"), - ); - t.Util = class Util { - static makeHexColor(e, t, a) { - return `#${s[e]}${s[t]}${s[a]}`; - } - static scaleMinMax(e, t) { - let a; - if (e[0]) { - if (e[0] < 0) { - a = t[0]; - t[0] = t[1]; - t[1] = a; - } - t[0] *= e[0]; - t[1] *= e[0]; - if (e[3] < 0) { - a = t[2]; - t[2] = t[3]; - t[3] = a; - } - t[2] *= e[3]; - t[3] *= e[3]; - } else { - a = t[0]; - t[0] = t[2]; - t[2] = a; - a = t[1]; - t[1] = t[3]; - t[3] = a; - if (e[1] < 0) { - a = t[2]; - t[2] = t[3]; - t[3] = a; - } - t[2] *= e[1]; - t[3] *= e[1]; - if (e[2] < 0) { - a = t[0]; - t[0] = t[1]; - t[1] = a; - } - t[0] *= e[2]; - t[1] *= e[2]; - } - t[0] += e[4]; - t[1] += e[4]; - t[2] += e[5]; - t[3] += e[5]; - } - static transform(e, t) { - return [ - e[0] * t[0] + e[2] * t[1], - e[1] * t[0] + e[3] * t[1], - e[0] * t[2] + e[2] * t[3], - e[1] * t[2] + e[3] * t[3], - e[0] * t[4] + e[2] * t[5] + e[4], - e[1] * t[4] + e[3] * t[5] + e[5], - ]; - } - static applyTransform(e, t) { - return [ - e[0] * t[0] + e[1] * t[2] + t[4], - e[0] * t[1] + e[1] * t[3] + t[5], - ]; - } - static applyInverseTransform(e, t) { - const a = t[0] * t[3] - t[1] * t[2]; - return [ - (e[0] * t[3] - e[1] * t[2] + t[2] * t[5] - t[4] * t[3]) / a, - (-e[0] * t[1] + e[1] * t[0] + t[4] * t[1] - t[5] * t[0]) / a, - ]; - } - static getAxialAlignedBoundingBox(e, t) { - const a = this.applyTransform(e, t), - r = this.applyTransform(e.slice(2, 4), t), - n = this.applyTransform([e[0], e[3]], t), - i = this.applyTransform([e[2], e[1]], t); - return [ - Math.min(a[0], r[0], n[0], i[0]), - Math.min(a[1], r[1], n[1], i[1]), - Math.max(a[0], r[0], n[0], i[0]), - Math.max(a[1], r[1], n[1], i[1]), - ]; - } - static inverseTransform(e) { - const t = e[0] * e[3] - e[1] * e[2]; - return [ - e[3] / t, - -e[1] / t, - -e[2] / t, - e[0] / t, - (e[2] * e[5] - e[4] * e[3]) / t, - (e[4] * e[1] - e[5] * e[0]) / t, - ]; - } - static singularValueDecompose2dScale(e) { - const t = [e[0], e[2], e[1], e[3]], - a = e[0] * t[0] + e[1] * t[2], - r = e[0] * t[1] + e[1] * t[3], - n = e[2] * t[0] + e[3] * t[2], - i = e[2] * t[1] + e[3] * t[3], - s = (a + i) / 2, - o = Math.sqrt((a + i) ** 2 - 4 * (a * i - n * r)) / 2, - c = s + o || 1, - l = s - o || 1; - return [Math.sqrt(c), Math.sqrt(l)]; - } - static normalizeRect(e) { - const t = e.slice(0); - if (e[0] > e[2]) { - t[0] = e[2]; - t[2] = e[0]; - } - if (e[1] > e[3]) { - t[1] = e[3]; - t[3] = e[1]; - } - return t; - } - static intersect(e, t) { - const a = Math.max(Math.min(e[0], e[2]), Math.min(t[0], t[2])), - r = Math.min(Math.max(e[0], e[2]), Math.max(t[0], t[2])); - if (a > r) return null; - const n = Math.max(Math.min(e[1], e[3]), Math.min(t[1], t[3])), - i = Math.min(Math.max(e[1], e[3]), Math.max(t[1], t[3])); - return n > i ? null : [a, n, r, i]; - } - static bezierBoundingBox(e, t, a, r, n, i, s, o) { - const c = [], - l = [[], []]; - let h, u, d, f, g, p, m, b; - for (let l = 0; l < 2; ++l) { - if (0 === l) { - u = 6 * e - 12 * a + 6 * n; - h = -3 * e + 9 * a - 9 * n + 3 * s; - d = 3 * a - 3 * e; - } else { - u = 6 * t - 12 * r + 6 * i; - h = -3 * t + 9 * r - 9 * i + 3 * o; - d = 3 * r - 3 * t; - } - if (Math.abs(h) < 1e-12) { - if (Math.abs(u) < 1e-12) continue; - f = -d / u; - 0 < f && f < 1 && c.push(f); - } else { - m = u * u - 4 * d * h; - b = Math.sqrt(m); - if (!(m < 0)) { - g = (-u + b) / (2 * h); - 0 < g && g < 1 && c.push(g); - p = (-u - b) / (2 * h); - 0 < p && p < 1 && c.push(p); - } - } - } - let y, - w = c.length; - const S = w; - for (; w--; ) { - f = c[w]; - y = 1 - f; - l[0][w] = - y * y * y * e + - 3 * y * y * f * a + - 3 * y * f * f * n + - f * f * f * s; - l[1][w] = - y * y * y * t + - 3 * y * y * f * r + - 3 * y * f * f * i + - f * f * f * o; - } - l[0][S] = e; - l[1][S] = t; - l[0][S + 1] = s; - l[1][S + 1] = o; - l[0].length = l[1].length = S + 2; - return [ - Math.min(...l[0]), - Math.min(...l[1]), - Math.max(...l[0]), - Math.max(...l[1]), - ]; - } - }; - const o = [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 728, 711, 710, 729, 733, 731, 730, 732, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8226, 8224, - 8225, 8230, 8212, 8211, 402, 8260, 8249, 8250, 8722, 8240, 8222, - 8220, 8221, 8216, 8217, 8218, 8482, 64257, 64258, 321, 338, 352, - 376, 381, 305, 322, 339, 353, 382, 0, 8364, - ]; - function stringToUTF8String(e) { - return decodeURIComponent(escape(e)); - } - t.PromiseCapability = class PromiseCapability { - #e = !1; - constructor() { - this.promise = new Promise((e, t) => { - this.resolve = (t) => { - this.#e = !0; - e(t); - }; - this.reject = (e) => { - this.#e = !0; - t(e); - }; - }); - } - get settled() { - return this.#e; - } - }; - let c = null, - l = null; - t.AnnotationPrefix = "pdfjs_internal_id_"; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.XRefParseException = - t.XRefEntryException = - t.ParserEOFException = - t.PDF_VERSION_REGEXP = - t.MissingDataException = - void 0; - t.arrayBuffersToBytes = function arrayBuffersToBytes(e) { - const t = e.length; - if (0 === t) return new Uint8Array(0); - if (1 === t) return new Uint8Array(e[0]); - let a = 0; - for (let r = 0; r < t; r++) a += e[r].byteLength; - const r = new Uint8Array(a); - let n = 0; - for (let a = 0; a < t; a++) { - const t = new Uint8Array(e[a]); - r.set(t, n); - n += t.byteLength; - } - return r; - }; - t.collectActions = function collectActions(e, t, a) { - const i = Object.create(null), - s = getInheritableProperty({ - dict: t, - key: "AA", - stopWhenFound: !1, - }); - if (s) - for (let t = s.length - 1; t >= 0; t--) { - const r = s[t]; - if (r instanceof n.Dict) - for (const t of r.getKeys()) { - const s = a[t]; - if (!s) continue; - const o = []; - _collectJS(r.getRaw(t), e, o, new n.RefSet()); - o.length > 0 && (i[s] = o); - } - } - if (t.has("A")) { - const a = []; - _collectJS(t.get("A"), e, a, new n.RefSet()); - a.length > 0 && (i.Action = a); - } - return (0, r.objectSize)(i) > 0 ? i : null; - }; - t.encodeToXmlString = function encodeToXmlString(e) { - const t = []; - let a = 0; - for (let r = 0, n = e.length; r < n; r++) { - const n = e.codePointAt(r); - if (32 <= n && n <= 126) { - const i = o[n]; - if (i) { - a < r && t.push(e.substring(a, r)); - t.push(i); - a = r + 1; - } - } else { - a < r && t.push(e.substring(a, r)); - t.push(`&#x${n.toString(16).toUpperCase()};`); - n > 55295 && (n < 57344 || n > 65533) && r++; - a = r + 1; - } - } - if (0 === t.length) return e; - a < e.length && t.push(e.substring(a, e.length)); - return t.join(""); - }; - t.escapePDFName = function escapePDFName(e) { - const t = []; - let a = 0; - for (let r = 0, n = e.length; r < n; r++) { - const n = e.charCodeAt(r); - if ( - n < 33 || - n > 126 || - 35 === n || - 40 === n || - 41 === n || - 60 === n || - 62 === n || - 91 === n || - 93 === n || - 123 === n || - 125 === n || - 47 === n || - 37 === n - ) { - a < r && t.push(e.substring(a, r)); - t.push(`#${n.toString(16)}`); - a = r + 1; - } - } - if (0 === t.length) return e; - a < e.length && t.push(e.substring(a, e.length)); - return t.join(""); - }; - t.escapeString = function escapeString(e) { - return e.replaceAll(/([()\\\n\r])/g, (e) => - "\n" === e ? "\\n" : "\r" === e ? "\\r" : `\\${e}`, - ); - }; - t.getInheritableProperty = getInheritableProperty; - t.getLookupTableFactory = function getLookupTableFactory(e) { - let t; - return function () { - if (e) { - t = Object.create(null); - e(t); - e = null; - } - return t; - }; - }; - t.getNewAnnotationsMap = function getNewAnnotationsMap(e) { - if (!e) return null; - const t = new Map(); - for (const [a, n] of e) { - if (!a.startsWith(r.AnnotationEditorPrefix)) continue; - let e = t.get(n.pageIndex); - if (!e) { - e = []; - t.set(n.pageIndex, e); - } - e.push(n); - } - return t.size > 0 ? t : null; - }; - t.getRotationMatrix = function getRotationMatrix(e, t, a) { - switch (e) { - case 90: - return [0, 1, -1, 0, t, 0]; - case 180: - return [-1, 0, 0, -1, t, a]; - case 270: - return [0, -1, 1, 0, 0, a]; - default: - throw new Error("Invalid rotation"); - } - }; - t.isAscii = function isAscii(e) { - return /^[\x00-\x7F]*$/.test(e); - }; - t.isWhiteSpace = function isWhiteSpace(e) { - return 32 === e || 9 === e || 13 === e || 10 === e; - }; - t.log2 = function log2(e) { - if (e <= 0) return 0; - return Math.ceil(Math.log2(e)); - }; - t.numberToString = function numberToString(e) { - if (Number.isInteger(e)) return e.toString(); - const t = Math.round(100 * e); - if (t % 100 == 0) return (t / 100).toString(); - if (t % 10 == 0) return e.toFixed(1); - return e.toFixed(2); - }; - t.parseXFAPath = function parseXFAPath(e) { - const t = /(.+)\[(\d+)\]$/; - return e.split(".").map((e) => { - const a = e.match(t); - return a - ? { name: a[1], pos: parseInt(a[2], 10) } - : { name: e, pos: 0 }; - }); - }; - t.readInt8 = function readInt8(e, t) { - return (e[t] << 24) >> 24; - }; - t.readUint16 = function readUint16(e, t) { - return (e[t] << 8) | e[t + 1]; - }; - t.readUint32 = function readUint32(e, t) { - return ( - ((e[t] << 24) | (e[t + 1] << 16) | (e[t + 2] << 8) | e[t + 3]) >>> - 0 - ); - }; - t.recoverJsURL = function recoverJsURL(e) { - const t = new RegExp( - "^\\s*(" + - ["app.launchURL", "window.open", "xfa.host.gotoURL"] - .join("|") - .replaceAll(".", "\\.") + - ")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))", - "i", - ).exec(e); - if (t?.[2]) { - const e = t[2]; - let a = !1; - "true" === t[3] && "app.launchURL" === t[1] && (a = !0); - return { url: e, newWindow: a }; - } - return null; - }; - t.stringToUTF16HexString = function stringToUTF16HexString(e) { - const t = []; - for (let a = 0, r = e.length; a < r; a++) { - const r = e.charCodeAt(a); - t.push( - ((r >> 8) & 255).toString(16).padStart(2, "0"), - (255 & r).toString(16).padStart(2, "0"), - ); - } - return t.join(""); - }; - t.stringToUTF16String = function stringToUTF16String(e, t = !1) { - const a = []; - t && a.push("þÿ"); - for (let t = 0, r = e.length; t < r; t++) { - const r = e.charCodeAt(t); - a.push( - String.fromCharCode((r >> 8) & 255), - String.fromCharCode(255 & r), - ); - } - return a.join(""); - }; - t.toRomanNumerals = function toRomanNumerals(e, t = !1) { - (0, r.assert)( - Number.isInteger(e) && e > 0, - "The number should be a positive integer.", - ); - const a = []; - let n; - for (; e >= 1e3; ) { - e -= 1e3; - a.push("M"); - } - n = (e / 100) | 0; - e %= 100; - a.push(s[n]); - n = (e / 10) | 0; - e %= 10; - a.push(s[10 + n]); - a.push(s[20 + e]); - const i = a.join(""); - return t ? i.toLowerCase() : i; - }; - t.validateCSSFont = function validateCSSFont(e) { - const t = new Set([ - "100", - "200", - "300", - "400", - "500", - "600", - "700", - "800", - "900", - "1000", - "normal", - "bold", - "bolder", - "lighter", - ]), - { fontFamily: a, fontWeight: r, italicAngle: n } = e; - if (!validateFontName(a, !0)) return !1; - const i = r ? r.toString() : ""; - e.fontWeight = t.has(i) ? i : "400"; - const s = parseFloat(n); - e.italicAngle = isNaN(s) || s < -90 || s > 90 ? "14" : n.toString(); - return !0; - }; - t.validateFontName = validateFontName; - var r = a(2), - n = a(4), - i = a(5); - t.PDF_VERSION_REGEXP = /^[1-9]\.\d$/; - class MissingDataException extends r.BaseException { - constructor(e, t) { - super(`Missing data [${e}, ${t})`, "MissingDataException"); - this.begin = e; - this.end = t; - } - } - t.MissingDataException = MissingDataException; - class ParserEOFException extends r.BaseException { - constructor(e) { - super(e, "ParserEOFException"); - } - } - t.ParserEOFException = ParserEOFException; - class XRefEntryException extends r.BaseException { - constructor(e) { - super(e, "XRefEntryException"); - } - } - t.XRefEntryException = XRefEntryException; - class XRefParseException extends r.BaseException { - constructor(e) { - super(e, "XRefParseException"); - } - } - t.XRefParseException = XRefParseException; - function getInheritableProperty({ - dict: e, - key: t, - getArray: a = !1, - stopWhenFound: r = !0, - }) { - let i; - const s = new n.RefSet(); - for (; e instanceof n.Dict && (!e.objId || !s.has(e.objId)); ) { - e.objId && s.put(e.objId); - const n = a ? e.getArray(t) : e.get(t); - if (void 0 !== n) { - if (r) return n; - (i ||= []).push(n); - } - e = e.get("Parent"); - } - return i; - } - const s = [ - "", - "C", - "CC", - "CCC", - "CD", - "D", - "DC", - "DCC", - "DCCC", - "CM", - "", - "X", - "XX", - "XXX", - "XL", - "L", - "LX", - "LXX", - "LXXX", - "XC", - "", - "I", - "II", - "III", - "IV", - "V", - "VI", - "VII", - "VIII", - "IX", - ]; - function _collectJS(e, t, a, s) { - if (!e) return; - let o = null; - if (e instanceof n.Ref) { - if (s.has(e)) return; - o = e; - s.put(o); - e = t.fetch(e); - } - if (Array.isArray(e)) for (const r of e) _collectJS(r, t, a, s); - else if (e instanceof n.Dict) { - if ((0, n.isName)(e.get("S"), "JavaScript")) { - const t = e.get("JS"); - let n; - t instanceof i.BaseStream - ? (n = t.getString()) - : "string" == typeof t && (n = t); - n &&= (0, r.stringToPDFString)(n).replaceAll("\0", ""); - n && a.push(n); - } - _collectJS(e.getRaw("Next"), t, a, s); - } - o && s.remove(o); - } - const o = { - 60: "<", - 62: ">", - 38: "&", - 34: """, - 39: "'", - }; - function validateFontName(e, t = !1) { - const a = /^("|').*("|')$/.exec(e); - if (a && a[1] === a[2]) { - if (new RegExp(`[^\\\\]${a[1]}`).test(e.slice(1, -1))) { - t && - (0, r.warn)(`FontFamily contains unescaped ${a[1]}: ${e}.`); - return !1; - } - } else - for (const a of e.split(/[ \t]+/)) - if (/^(\d|(-(\d|-)))/.test(a) || !/^[\w-\\]+$/.test(a)) { - t && - (0, r.warn)( - `FontFamily contains invalid : ${e}.`, - ); - return !1; - } - return !0; - } - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.RefSetCache = - t.RefSet = - t.Ref = - t.Name = - t.EOF = - t.Dict = - t.Cmd = - t.CIRCULAR_REF = - void 0; - t.clearPrimitiveCaches = function clearPrimitiveCaches() { - s = Object.create(null); - o = Object.create(null); - c = Object.create(null); - }; - t.isCmd = function isCmd(e, t) { - return e instanceof Cmd && (void 0 === t || e.cmd === t); - }; - t.isDict = function isDict(e, t) { - return ( - e instanceof Dict && (void 0 === t || isName(e.get("Type"), t)) - ); - }; - t.isName = isName; - t.isRefsEqual = function isRefsEqual(e, t) { - return e.num === t.num && e.gen === t.gen; - }; - var r = a(2); - const n = Symbol("CIRCULAR_REF"); - t.CIRCULAR_REF = n; - const i = Symbol("EOF"); - t.EOF = i; - let s = Object.create(null), - o = Object.create(null), - c = Object.create(null); - class Name { - constructor(e) { - this.name = e; - } - static get(e) { - return (o[e] ||= new Name(e)); - } - } - t.Name = Name; - class Cmd { - constructor(e) { - this.cmd = e; - } - static get(e) { - return (s[e] ||= new Cmd(e)); - } - } - t.Cmd = Cmd; - const l = function nonSerializableClosure() { - return l; - }; - class Dict { - constructor(e = null) { - this._map = Object.create(null); - this.xref = e; - this.objId = null; - this.suppressEncryption = !1; - this.__nonSerializable__ = l; - } - assignXref(e) { - this.xref = e; - } - get size() { - return Object.keys(this._map).length; - } - get(e, t, a) { - let r = this._map[e]; - if (void 0 === r && void 0 !== t) { - r = this._map[t]; - void 0 === r && void 0 !== a && (r = this._map[a]); - } - return r instanceof Ref && this.xref - ? this.xref.fetch(r, this.suppressEncryption) - : r; - } - async getAsync(e, t, a) { - let r = this._map[e]; - if (void 0 === r && void 0 !== t) { - r = this._map[t]; - void 0 === r && void 0 !== a && (r = this._map[a]); - } - return r instanceof Ref && this.xref - ? this.xref.fetchAsync(r, this.suppressEncryption) - : r; - } - getArray(e, t, a) { - let r = this._map[e]; - if (void 0 === r && void 0 !== t) { - r = this._map[t]; - void 0 === r && void 0 !== a && (r = this._map[a]); - } - r instanceof Ref && - this.xref && - (r = this.xref.fetch(r, this.suppressEncryption)); - if (Array.isArray(r)) { - r = r.slice(); - for (let e = 0, t = r.length; e < t; e++) - r[e] instanceof Ref && - this.xref && - (r[e] = this.xref.fetch(r[e], this.suppressEncryption)); - } - return r; - } - getRaw(e) { - return this._map[e]; - } - getKeys() { - return Object.keys(this._map); - } - getRawValues() { - return Object.values(this._map); - } - set(e, t) { - this._map[e] = t; - } - has(e) { - return void 0 !== this._map[e]; - } - forEach(e) { - for (const t in this._map) e(t, this.get(t)); - } - static get empty() { - const e = new Dict(null); - e.set = (e, t) => { - (0, r.unreachable)( - "Should not call `set` on the empty dictionary.", - ); - }; - return (0, r.shadow)(this, "empty", e); - } - static merge({ xref: e, dictArray: t, mergeSubDicts: a = !1 }) { - const r = new Dict(e), - n = new Map(); - for (const e of t) - if (e instanceof Dict) - for (const [t, r] of Object.entries(e._map)) { - let e = n.get(t); - if (void 0 === e) { - e = []; - n.set(t, e); - } else if (!(a && r instanceof Dict)) continue; - e.push(r); - } - for (const [t, a] of n) { - if (1 === a.length || !(a[0] instanceof Dict)) { - r._map[t] = a[0]; - continue; - } - const n = new Dict(e); - for (const e of a) - for (const [t, a] of Object.entries(e._map)) - void 0 === n._map[t] && (n._map[t] = a); - n.size > 0 && (r._map[t] = n); - } - n.clear(); - return r.size > 0 ? r : Dict.empty; - } - clone() { - const e = new Dict(this.xref); - for (const t of this.getKeys()) e.set(t, this.getRaw(t)); - return e; - } - } - t.Dict = Dict; - class Ref { - constructor(e, t) { - this.num = e; - this.gen = t; - } - toString() { - return 0 === this.gen - ? `${this.num}R` - : `${this.num}R${this.gen}`; - } - static fromString(e) { - const t = c[e]; - if (t) return t; - const a = /^(\d+)R(\d*)$/.exec(e); - return a && "0" !== a[1] - ? (c[e] = new Ref(parseInt(a[1]), a[2] ? parseInt(a[2]) : 0)) - : null; - } - static get(e, t) { - const a = 0 === t ? `${e}R` : `${e}R${t}`; - return (c[a] ||= new Ref(e, t)); - } - } - t.Ref = Ref; - class RefSet { - constructor(e = null) { - this._set = new Set(e?._set); - } - has(e) { - return this._set.has(e.toString()); - } - put(e) { - this._set.add(e.toString()); - } - remove(e) { - this._set.delete(e.toString()); - } - [Symbol.iterator]() { - return this._set.values(); - } - clear() { - this._set.clear(); - } - } - t.RefSet = RefSet; - class RefSetCache { - constructor() { - this._map = new Map(); - } - get size() { - return this._map.size; - } - get(e) { - return this._map.get(e.toString()); - } - has(e) { - return this._map.has(e.toString()); - } - put(e, t) { - this._map.set(e.toString(), t); - } - putAlias(e, t) { - this._map.set(e.toString(), this.get(t)); - } - [Symbol.iterator]() { - return this._map.values(); - } - clear() { - this._map.clear(); - } - } - t.RefSetCache = RefSetCache; - function isName(e, t) { - return e instanceof Name && (void 0 === t || e.name === t); - } - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.BaseStream = void 0; - var r = a(2); - class BaseStream { - constructor() { - this.constructor === BaseStream && - (0, r.unreachable)("Cannot initialize BaseStream."); - } - get length() { - (0, r.unreachable)("Abstract getter `length` accessed"); - } - get isEmpty() { - (0, r.unreachable)("Abstract getter `isEmpty` accessed"); - } - get isDataLoaded() { - return (0, r.shadow)(this, "isDataLoaded", !0); - } - getByte() { - (0, r.unreachable)("Abstract method `getByte` called"); - } - getBytes(e) { - (0, r.unreachable)("Abstract method `getBytes` called"); - } - peekByte() { - const e = this.getByte(); - -1 !== e && this.pos--; - return e; - } - peekBytes(e) { - const t = this.getBytes(e); - this.pos -= t.length; - return t; - } - getUint16() { - const e = this.getByte(), - t = this.getByte(); - return -1 === e || -1 === t ? -1 : (e << 8) + t; - } - getInt32() { - return ( - (this.getByte() << 24) + - (this.getByte() << 16) + - (this.getByte() << 8) + - this.getByte() - ); - } - getByteRange(e, t) { - (0, r.unreachable)("Abstract method `getByteRange` called"); - } - getString(e) { - return (0, r.bytesToString)(this.getBytes(e)); - } - skip(e) { - this.pos += e || 1; - } - reset() { - (0, r.unreachable)("Abstract method `reset` called"); - } - moveStart() { - (0, r.unreachable)("Abstract method `moveStart` called"); - } - makeSubStream(e, t, a = null) { - (0, r.unreachable)("Abstract method `makeSubStream` called"); - } - getBaseStreams() { - return null; - } - } - t.BaseStream = BaseStream; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.NetworkPdfManager = t.LocalPdfManager = void 0; - var r = a(2), - n = a(7), - i = a(3), - s = a(9), - o = a(8); - class BasePdfManager { - constructor(e) { - this.constructor === BasePdfManager && - (0, r.unreachable)("Cannot initialize BasePdfManager."); - this._docBaseUrl = (function parseDocBaseUrl(e) { - if (e) { - const t = (0, r.createValidAbsoluteUrl)(e); - if (t) return t.href; - (0, r.warn)(`Invalid absolute docBaseUrl: "${e}".`); - } - return null; - })(e.docBaseUrl); - this._docId = e.docId; - this._password = e.password; - this.enableXfa = e.enableXfa; - e.evaluatorOptions.isOffscreenCanvasSupported &&= - r.FeatureTest.isOffscreenCanvasSupported; - this.evaluatorOptions = e.evaluatorOptions; - } - get docId() { - return this._docId; - } - get password() { - return this._password; - } - get docBaseUrl() { - return this._docBaseUrl; - } - get catalog() { - return this.pdfDocument.catalog; - } - ensureDoc(e, t) { - return this.ensure(this.pdfDocument, e, t); - } - ensureXRef(e, t) { - return this.ensure(this.pdfDocument.xref, e, t); - } - ensureCatalog(e, t) { - return this.ensure(this.pdfDocument.catalog, e, t); - } - getPage(e) { - return this.pdfDocument.getPage(e); - } - fontFallback(e, t) { - return this.pdfDocument.fontFallback(e, t); - } - loadXfaFonts(e, t) { - return this.pdfDocument.loadXfaFonts(e, t); - } - loadXfaImages() { - return this.pdfDocument.loadXfaImages(); - } - serializeXfaData(e) { - return this.pdfDocument.serializeXfaData(e); - } - cleanup(e = !1) { - return this.pdfDocument.cleanup(e); - } - async ensure(e, t, a) { - (0, r.unreachable)("Abstract method `ensure` called"); - } - requestRange(e, t) { - (0, r.unreachable)("Abstract method `requestRange` called"); - } - requestLoadedStream(e = !1) { - (0, r.unreachable)( - "Abstract method `requestLoadedStream` called", - ); - } - sendProgressiveData(e) { - (0, r.unreachable)( - "Abstract method `sendProgressiveData` called", - ); - } - updatePassword(e) { - this._password = e; - } - terminate(e) { - (0, r.unreachable)("Abstract method `terminate` called"); - } - } - t.LocalPdfManager = class LocalPdfManager extends BasePdfManager { - constructor(e) { - super(e); - const t = new o.Stream(e.source); - this.pdfDocument = new s.PDFDocument(this, t); - this._loadedStreamPromise = Promise.resolve(t); - } - async ensure(e, t, a) { - const r = e[t]; - return "function" == typeof r ? r.apply(e, a) : r; - } - requestRange(e, t) { - return Promise.resolve(); - } - requestLoadedStream(e = !1) { - return this._loadedStreamPromise; - } - terminate(e) {} - }; - t.NetworkPdfManager = class NetworkPdfManager extends BasePdfManager { - constructor(e) { - super(e); - this.streamManager = new n.ChunkedStreamManager(e.source, { - msgHandler: e.handler, - length: e.length, - disableAutoFetch: e.disableAutoFetch, - rangeChunkSize: e.rangeChunkSize, - }); - this.pdfDocument = new s.PDFDocument( - this, - this.streamManager.getStream(), - ); - } - async ensure(e, t, a) { - try { - const r = e[t]; - return "function" == typeof r ? r.apply(e, a) : r; - } catch (r) { - if (!(r instanceof i.MissingDataException)) throw r; - await this.requestRange(r.begin, r.end); - return this.ensure(e, t, a); - } - } - requestRange(e, t) { - return this.streamManager.requestRange(e, t); - } - requestLoadedStream(e = !1) { - return this.streamManager.requestAllChunks(e); - } - sendProgressiveData(e) { - this.streamManager.onReceiveData({ chunk: e }); - } - terminate(e) { - this.streamManager.abort(e); - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.ChunkedStreamManager = t.ChunkedStream = void 0; - var r = a(3), - n = a(2), - i = a(8); - class ChunkedStream extends i.Stream { - constructor(e, t, a) { - super(new Uint8Array(e), 0, e, null); - this.chunkSize = t; - this._loadedChunks = new Set(); - this.numChunks = Math.ceil(e / t); - this.manager = a; - this.progressiveDataLength = 0; - this.lastSuccessfulEnsureByteChunk = -1; - } - getMissingChunks() { - const e = []; - for (let t = 0, a = this.numChunks; t < a; ++t) - this._loadedChunks.has(t) || e.push(t); - return e; - } - get numChunksLoaded() { - return this._loadedChunks.size; - } - get isDataLoaded() { - return this.numChunksLoaded === this.numChunks; - } - onReceiveData(e, t) { - const a = this.chunkSize; - if (e % a != 0) throw new Error(`Bad begin offset: ${e}`); - const r = e + t.byteLength; - if (r % a != 0 && r !== this.bytes.length) - throw new Error(`Bad end offset: ${r}`); - this.bytes.set(new Uint8Array(t), e); - const n = Math.floor(e / a), - i = Math.floor((r - 1) / a) + 1; - for (let e = n; e < i; ++e) this._loadedChunks.add(e); - } - onReceiveProgressiveData(e) { - let t = this.progressiveDataLength; - const a = Math.floor(t / this.chunkSize); - this.bytes.set(new Uint8Array(e), t); - t += e.byteLength; - this.progressiveDataLength = t; - const r = - t >= this.end ? this.numChunks : Math.floor(t / this.chunkSize); - for (let e = a; e < r; ++e) this._loadedChunks.add(e); - } - ensureByte(e) { - if (e < this.progressiveDataLength) return; - const t = Math.floor(e / this.chunkSize); - if ( - !(t > this.numChunks) && - t !== this.lastSuccessfulEnsureByteChunk - ) { - if (!this._loadedChunks.has(t)) - throw new r.MissingDataException(e, e + 1); - this.lastSuccessfulEnsureByteChunk = t; - } - } - ensureRange(e, t) { - if (e >= t) return; - if (t <= this.progressiveDataLength) return; - const a = Math.floor(e / this.chunkSize); - if (a > this.numChunks) return; - const n = Math.min( - Math.floor((t - 1) / this.chunkSize) + 1, - this.numChunks, - ); - for (let i = a; i < n; ++i) - if (!this._loadedChunks.has(i)) - throw new r.MissingDataException(e, t); - } - nextEmptyChunk(e) { - const t = this.numChunks; - for (let a = 0; a < t; ++a) { - const r = (e + a) % t; - if (!this._loadedChunks.has(r)) return r; - } - return null; - } - hasChunk(e) { - return this._loadedChunks.has(e); - } - getByte() { - const e = this.pos; - if (e >= this.end) return -1; - e >= this.progressiveDataLength && this.ensureByte(e); - return this.bytes[this.pos++]; - } - getBytes(e) { - const t = this.bytes, - a = this.pos, - r = this.end; - if (!e) { - r > this.progressiveDataLength && this.ensureRange(a, r); - return t.subarray(a, r); - } - let n = a + e; - n > r && (n = r); - n > this.progressiveDataLength && this.ensureRange(a, n); - this.pos = n; - return t.subarray(a, n); - } - getByteRange(e, t) { - e < 0 && (e = 0); - t > this.end && (t = this.end); - t > this.progressiveDataLength && this.ensureRange(e, t); - return this.bytes.subarray(e, t); - } - makeSubStream(e, t, a = null) { - t - ? e + t > this.progressiveDataLength && - this.ensureRange(e, e + t) - : e >= this.progressiveDataLength && this.ensureByte(e); - function ChunkedStreamSubstream() {} - ChunkedStreamSubstream.prototype = Object.create(this); - ChunkedStreamSubstream.prototype.getMissingChunks = function () { - const e = this.chunkSize, - t = Math.floor(this.start / e), - a = Math.floor((this.end - 1) / e) + 1, - r = []; - for (let e = t; e < a; ++e) - this._loadedChunks.has(e) || r.push(e); - return r; - }; - Object.defineProperty( - ChunkedStreamSubstream.prototype, - "isDataLoaded", - { - get() { - return ( - this.numChunksLoaded === this.numChunks || - 0 === this.getMissingChunks().length - ); - }, - configurable: !0, - }, - ); - const r = new ChunkedStreamSubstream(); - r.pos = r.start = e; - r.end = e + t || this.end; - r.dict = a; - return r; - } - getBaseStreams() { - return [this]; - } - } - t.ChunkedStream = ChunkedStream; - t.ChunkedStreamManager = class ChunkedStreamManager { - constructor(e, t) { - this.length = t.length; - this.chunkSize = t.rangeChunkSize; - this.stream = new ChunkedStream( - this.length, - this.chunkSize, - this, - ); - this.pdfNetworkStream = e; - this.disableAutoFetch = t.disableAutoFetch; - this.msgHandler = t.msgHandler; - this.currRequestId = 0; - this._chunksNeededByRequest = new Map(); - this._requestsByChunk = new Map(); - this._promisesByRequest = new Map(); - this.progressiveDataLength = 0; - this.aborted = !1; - this._loadedStreamCapability = new n.PromiseCapability(); - } - sendRequest(e, t) { - const a = this.pdfNetworkStream.getRangeReader(e, t); - a.isStreamingSupported || - (a.onProgress = this.onProgress.bind(this)); - let n = [], - i = 0; - return new Promise((e, t) => { - const readChunk = ({ value: s, done: o }) => { - try { - if (o) { - const t = (0, r.arrayBuffersToBytes)(n); - n = null; - e(t); - return; - } - i += s.byteLength; - a.isStreamingSupported && this.onProgress({ loaded: i }); - n.push(s); - a.read().then(readChunk, t); - } catch (e) { - t(e); - } - }; - a.read().then(readChunk, t); - }).then((t) => { - this.aborted || this.onReceiveData({ chunk: t, begin: e }); - }); - } - requestAllChunks(e = !1) { - if (!e) { - const e = this.stream.getMissingChunks(); - this._requestChunks(e); - } - return this._loadedStreamCapability.promise; - } - _requestChunks(e) { - const t = this.currRequestId++, - a = new Set(); - this._chunksNeededByRequest.set(t, a); - for (const t of e) this.stream.hasChunk(t) || a.add(t); - if (0 === a.size) return Promise.resolve(); - const r = new n.PromiseCapability(); - this._promisesByRequest.set(t, r); - const i = []; - for (const e of a) { - let a = this._requestsByChunk.get(e); - if (!a) { - a = []; - this._requestsByChunk.set(e, a); - i.push(e); - } - a.push(t); - } - if (i.length > 0) { - const e = this.groupChunks(i); - for (const t of e) { - const e = t.beginChunk * this.chunkSize, - a = Math.min(t.endChunk * this.chunkSize, this.length); - this.sendRequest(e, a).catch(r.reject); - } - } - return r.promise.catch((e) => { - if (!this.aborted) throw e; - }); - } - getStream() { - return this.stream; - } - requestRange(e, t) { - t = Math.min(t, this.length); - const a = this.getBeginChunk(e), - r = this.getEndChunk(t), - n = []; - for (let e = a; e < r; ++e) n.push(e); - return this._requestChunks(n); - } - requestRanges(e = []) { - const t = []; - for (const a of e) { - const e = this.getBeginChunk(a.begin), - r = this.getEndChunk(a.end); - for (let a = e; a < r; ++a) t.includes(a) || t.push(a); - } - t.sort(function (e, t) { - return e - t; - }); - return this._requestChunks(t); - } - groupChunks(e) { - const t = []; - let a = -1, - r = -1; - for (let n = 0, i = e.length; n < i; ++n) { - const i = e[n]; - a < 0 && (a = i); - if (r >= 0 && r + 1 !== i) { - t.push({ beginChunk: a, endChunk: r + 1 }); - a = i; - } - n + 1 === e.length && - t.push({ beginChunk: a, endChunk: i + 1 }); - r = i; - } - return t; - } - onProgress(e) { - this.msgHandler.send("DocProgress", { - loaded: this.stream.numChunksLoaded * this.chunkSize + e.loaded, - total: this.length, - }); - } - onReceiveData(e) { - const t = e.chunk, - a = void 0 === e.begin, - r = a ? this.progressiveDataLength : e.begin, - n = r + t.byteLength, - i = Math.floor(r / this.chunkSize), - s = - n < this.length - ? Math.floor(n / this.chunkSize) - : Math.ceil(n / this.chunkSize); - if (a) { - this.stream.onReceiveProgressiveData(t); - this.progressiveDataLength = n; - } else this.stream.onReceiveData(r, t); - this.stream.isDataLoaded && - this._loadedStreamCapability.resolve(this.stream); - const o = []; - for (let e = i; e < s; ++e) { - const t = this._requestsByChunk.get(e); - if (t) { - this._requestsByChunk.delete(e); - for (const a of t) { - const t = this._chunksNeededByRequest.get(a); - t.has(e) && t.delete(e); - t.size > 0 || o.push(a); - } - } - } - if (!this.disableAutoFetch && 0 === this._requestsByChunk.size) { - let e; - if (1 === this.stream.numChunksLoaded) { - const t = this.stream.numChunks - 1; - this.stream.hasChunk(t) || (e = t); - } else e = this.stream.nextEmptyChunk(s); - Number.isInteger(e) && this._requestChunks([e]); - } - for (const e of o) { - const t = this._promisesByRequest.get(e); - this._promisesByRequest.delete(e); - t.resolve(); - } - this.msgHandler.send("DocProgress", { - loaded: this.stream.numChunksLoaded * this.chunkSize, - total: this.length, - }); - } - onError(e) { - this._loadedStreamCapability.reject(e); - } - getBeginChunk(e) { - return Math.floor(e / this.chunkSize); - } - getEndChunk(e) { - return Math.floor((e - 1) / this.chunkSize) + 1; - } - abort(e) { - this.aborted = !0; - this.pdfNetworkStream?.cancelAllRequests(e); - for (const t of this._promisesByRequest.values()) t.reject(e); - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.StringStream = t.Stream = t.NullStream = void 0; - var r = a(5), - n = a(2); - class Stream extends r.BaseStream { - constructor(e, t, a, r) { - super(); - this.bytes = e instanceof Uint8Array ? e : new Uint8Array(e); - this.start = t || 0; - this.pos = this.start; - this.end = t + a || this.bytes.length; - this.dict = r; - } - get length() { - return this.end - this.start; - } - get isEmpty() { - return 0 === this.length; - } - getByte() { - return this.pos >= this.end ? -1 : this.bytes[this.pos++]; - } - getBytes(e) { - const t = this.bytes, - a = this.pos, - r = this.end; - if (!e) return t.subarray(a, r); - let n = a + e; - n > r && (n = r); - this.pos = n; - return t.subarray(a, n); - } - getByteRange(e, t) { - e < 0 && (e = 0); - t > this.end && (t = this.end); - return this.bytes.subarray(e, t); - } - reset() { - this.pos = this.start; - } - moveStart() { - this.start = this.pos; - } - makeSubStream(e, t, a = null) { - return new Stream(this.bytes.buffer, e, t, a); - } - } - t.Stream = Stream; - t.StringStream = class StringStream extends Stream { - constructor(e) { - super((0, n.stringToBytes)(e)); - } - }; - t.NullStream = class NullStream extends Stream { - constructor() { - super(new Uint8Array(0)); - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.Page = t.PDFDocument = void 0; - var r = a(2), - n = a(10), - i = a(3), - s = a(4), - o = a(51), - c = a(5), - l = a(74), - h = a(66), - u = a(68), - d = a(102), - f = a(16), - g = a(8), - p = a(76), - m = a(64), - b = a(13), - y = a(18), - w = a(72), - S = a(73), - x = a(77), - C = a(103); - const k = [0, 0, 612, 792]; - class Page { - constructor({ - pdfManager: e, - xref: t, - pageIndex: a, - pageDict: r, - ref: n, - globalIdFactory: i, - fontCache: s, - builtInCMapCache: o, - standardFontDataCache: c, - globalImageCache: l, - systemFontCache: h, - nonBlendModesSet: u, - xfaFactory: d, - }) { - this.pdfManager = e; - this.pageIndex = a; - this.pageDict = r; - this.xref = t; - this.ref = n; - this.fontCache = s; - this.builtInCMapCache = o; - this.standardFontDataCache = c; - this.globalImageCache = l; - this.systemFontCache = h; - this.nonBlendModesSet = u; - this.evaluatorOptions = e.evaluatorOptions; - this.resourcesPromise = null; - this.xfaFactory = d; - const f = { obj: 0 }; - this._localIdFactory = class extends i { - static createObjId() { - return `p${a}_${++f.obj}`; - } - static getPageObjId() { - return `p${n.toString()}`; - } - }; - } - _getInheritableProperty(e, t = !1) { - const a = (0, i.getInheritableProperty)({ - dict: this.pageDict, - key: e, - getArray: t, - stopWhenFound: !1, - }); - return Array.isArray(a) - ? 1 !== a.length && a[0] instanceof s.Dict - ? s.Dict.merge({ xref: this.xref, dictArray: a }) - : a[0] - : a; - } - get content() { - return this.pageDict.getArray("Contents"); - } - get resources() { - const e = this._getInheritableProperty("Resources"); - return (0, r.shadow)( - this, - "resources", - e instanceof s.Dict ? e : s.Dict.empty, - ); - } - _getBoundingBox(e) { - if (this.xfaData) return this.xfaData.bbox; - let t = this._getInheritableProperty(e, !0); - if (Array.isArray(t) && 4 === t.length) { - t = r.Util.normalizeRect(t); - if (t[2] - t[0] > 0 && t[3] - t[1] > 0) return t; - (0, r.warn)(`Empty, or invalid, /${e} entry.`); - } - return null; - } - get mediaBox() { - return (0, r.shadow)( - this, - "mediaBox", - this._getBoundingBox("MediaBox") || k, - ); - } - get cropBox() { - return (0, r.shadow)( - this, - "cropBox", - this._getBoundingBox("CropBox") || this.mediaBox, - ); - } - get userUnit() { - let e = this.pageDict.get("UserUnit"); - ("number" != typeof e || e <= 0) && (e = 1); - return (0, r.shadow)(this, "userUnit", e); - } - get view() { - const { cropBox: e, mediaBox: t } = this; - if (e !== t && !(0, r.isArrayEqual)(e, t)) { - const a = r.Util.intersect(e, t); - if (a && a[2] - a[0] > 0 && a[3] - a[1] > 0) - return (0, r.shadow)(this, "view", a); - (0, r.warn)("Empty /CropBox and /MediaBox intersection."); - } - return (0, r.shadow)(this, "view", t); - } - get rotate() { - let e = this._getInheritableProperty("Rotate") || 0; - e % 90 != 0 - ? (e = 0) - : e >= 360 - ? (e %= 360) - : e < 0 && (e = ((e % 360) + 360) % 360); - return (0, r.shadow)(this, "rotate", e); - } - _onSubStreamError(e, t) { - if (!this.evaluatorOptions.ignoreErrors) throw e; - (0, r.warn)( - `getContentStream - ignoring sub-stream (${t}): "${e}".`, - ); - } - getContentStream() { - return this.pdfManager - .ensure(this, "content") - .then((e) => - e instanceof c.BaseStream - ? e - : Array.isArray(e) - ? new y.StreamsSequenceStream( - e, - this._onSubStreamError.bind(this), - ) - : new g.NullStream(), - ); - } - get xfaData() { - return (0, r.shadow)( - this, - "xfaData", - this.xfaFactory - ? { bbox: this.xfaFactory.getBoundingBox(this.pageIndex) } - : null, - ); - } - #t(e, t, a) { - for (const n of e) - if (n.id) { - const e = s.Ref.fromString(n.id); - if (!e) { - (0, r.warn)( - `A non-linked annotation cannot be modified: ${n.id}`, - ); - continue; - } - if (n.deleted) { - t.put(e); - continue; - } - a?.put(e); - n.ref = e; - delete n.id; - } - } - async saveNewAnnotations(e, t, a, r) { - if (this.xfaFactory) - throw new Error("XFA: Cannot save new annotations."); - const i = new b.PartialEvaluator({ - xref: this.xref, - handler: e, - pageIndex: this.pageIndex, - idFactory: this._localIdFactory, - fontCache: this.fontCache, - builtInCMapCache: this.builtInCMapCache, - standardFontDataCache: this.standardFontDataCache, - globalImageCache: this.globalImageCache, - systemFontCache: this.systemFontCache, - options: this.evaluatorOptions, - }), - o = new s.RefSet(), - c = new s.RefSet(); - this.#t(a, o, c); - const l = this.pageDict, - h = this.annotations.filter( - (e) => !(e instanceof s.Ref && o.has(e)), - ), - u = await n.AnnotationFactory.saveNewAnnotations(i, t, a, r); - for (const { ref: e } of u.annotations) - e instanceof s.Ref && !c.has(e) && h.push(e); - const d = l.get("Annots"); - l.set("Annots", h); - const f = []; - await (0, S.writeObject)(this.ref, l, f, this.xref); - d && l.set("Annots", d); - const g = u.dependencies; - g.push({ ref: this.ref, data: f.join("") }, ...u.annotations); - return g; - } - save(e, t, a) { - const n = new b.PartialEvaluator({ - xref: this.xref, - handler: e, - pageIndex: this.pageIndex, - idFactory: this._localIdFactory, - fontCache: this.fontCache, - builtInCMapCache: this.builtInCMapCache, - standardFontDataCache: this.standardFontDataCache, - globalImageCache: this.globalImageCache, - systemFontCache: this.systemFontCache, - options: this.evaluatorOptions, - }); - return this._parsedAnnotations.then(function (e) { - const i = []; - for (const s of e) - s.mustBePrinted(a) && - i.push( - s.save(n, t, a).catch(function (e) { - (0, r.warn)( - `save - ignoring annotation data during "${t.name}" task: "${e}".`, - ); - return null; - }), - ); - return Promise.all(i).then(function (e) { - return e.filter((e) => !!e); - }); - }); - } - loadResources(e) { - this.resourcesPromise || - (this.resourcesPromise = this.pdfManager.ensure( - this, - "resources", - )); - return this.resourcesPromise.then(() => - new p.ObjectLoader(this.resources, e, this.xref).load(), - ); - } - getOperatorList({ - handler: e, - sink: t, - task: a, - intent: o, - cacheKey: c, - annotationStorage: l = null, - }) { - const h = this.getContentStream(), - u = this.loadResources([ - "ColorSpace", - "ExtGState", - "Font", - "Pattern", - "Properties", - "Shading", - "XObject", - ]), - d = new b.PartialEvaluator({ - xref: this.xref, - handler: e, - pageIndex: this.pageIndex, - idFactory: this._localIdFactory, - fontCache: this.fontCache, - builtInCMapCache: this.builtInCMapCache, - standardFontDataCache: this.standardFontDataCache, - globalImageCache: this.globalImageCache, - systemFontCache: this.systemFontCache, - options: this.evaluatorOptions, - }), - f = this.xfaFactory ? null : (0, i.getNewAnnotationsMap)(l); - let g = null, - p = Promise.resolve(null); - if (f) { - const e = f.get(this.pageIndex); - if (e) { - const t = this.pdfManager.ensureDoc("annotationGlobals"); - let i; - const o = new Set(); - for (const { bitmapId: t, bitmap: a } of e) - !t || a || o.has(t) || o.add(t); - const { isOffscreenCanvasSupported: c } = - this.evaluatorOptions; - if (o.size > 0) { - const t = e.slice(); - for (const [e, a] of l) - e.startsWith(r.AnnotationEditorPrefix) && - a.bitmap && - o.has(a.bitmapId) && - t.push(a); - i = n.AnnotationFactory.generateImages(t, this.xref, c); - } else - i = n.AnnotationFactory.generateImages(e, this.xref, c); - g = new s.RefSet(); - this.#t(e, g, null); - p = t.then((t) => - t - ? n.AnnotationFactory.printNewAnnotations(t, d, a, e, i) - : null, - ); - } - } - const y = Promise.all([h, u]).then(([r]) => { - const n = new m.OperatorList(o, t); - e.send("StartRenderPage", { - transparency: d.hasBlendModes( - this.resources, - this.nonBlendModesSet, - ), - pageIndex: this.pageIndex, - cacheKey: c, - }); - return d - .getOperatorList({ - stream: r, - task: a, - resources: this.resources, - operatorList: n, - }) - .then(function () { - return n; - }); - }); - return Promise.all([y, this._parsedAnnotations, p]).then( - function ([e, t, n]) { - if (n) { - t = t.filter((e) => !(e.ref && g.has(e.ref))); - for (let e = 0, a = n.length; e < a; e++) { - const r = n[e]; - if (r.refToReplace) { - const i = t.findIndex( - (e) => - e.ref && (0, s.isRefsEqual)(e.ref, r.refToReplace), - ); - if (i >= 0) { - t.splice(i, 1, r); - n.splice(e--, 1); - a--; - } - } - } - t = t.concat(n); - } - if ( - 0 === t.length || - o & r.RenderingIntentFlag.ANNOTATIONS_DISABLE - ) { - e.flush(!0); - return { length: e.totalLength }; - } - const i = !!(o & r.RenderingIntentFlag.ANNOTATIONS_FORMS), - c = !!(o & r.RenderingIntentFlag.ANY), - h = !!(o & r.RenderingIntentFlag.DISPLAY), - u = !!(o & r.RenderingIntentFlag.PRINT), - f = []; - for (const e of t) - (c || - (h && e.mustBeViewed(l, i)) || - (u && e.mustBePrinted(l))) && - f.push( - e.getOperatorList(d, a, o, i, l).catch(function (e) { - (0, r.warn)( - `getOperatorList - ignoring annotation data during "${a.name}" task: "${e}".`, - ); - return { - opList: null, - separateForm: !1, - separateCanvas: !1, - }; - }), - ); - return Promise.all(f).then(function (t) { - let a = !1, - r = !1; - for (const { - opList: n, - separateForm: i, - separateCanvas: s, - } of t) { - e.addOpList(n); - a ||= i; - r ||= s; - } - e.flush(!0, { form: a, canvas: r }); - return { length: e.totalLength }; - }); - }, - ); - } - extractTextContent({ - handler: e, - task: t, - includeMarkedContent: a, - disableNormalization: r, - sink: n, - }) { - const i = this.getContentStream(), - s = this.loadResources([ - "ExtGState", - "Font", - "Properties", - "XObject", - ]); - return Promise.all([i, s]).then(([i]) => - new b.PartialEvaluator({ - xref: this.xref, - handler: e, - pageIndex: this.pageIndex, - idFactory: this._localIdFactory, - fontCache: this.fontCache, - builtInCMapCache: this.builtInCMapCache, - standardFontDataCache: this.standardFontDataCache, - globalImageCache: this.globalImageCache, - systemFontCache: this.systemFontCache, - options: this.evaluatorOptions, - }).getTextContent({ - stream: i, - task: t, - resources: this.resources, - includeMarkedContent: a, - disableNormalization: r, - sink: n, - viewBox: this.view, - }), - ); - } - async getStructTree() { - const e = await this.pdfManager.ensureCatalog("structTreeRoot"); - if (!e) return null; - await this._parsedAnnotations; - return ( - await this.pdfManager.ensure(this, "_parseStructTree", [e]) - ).serializable; - } - _parseStructTree(e) { - const t = new w.StructTreePage(e, this.pageDict); - t.parse(this.ref); - return t; - } - async getAnnotationsData(e, t, a) { - const n = await this._parsedAnnotations; - if (0 === n.length) return n; - const i = [], - s = []; - let o; - const c = !!(a & r.RenderingIntentFlag.ANY), - l = !!(a & r.RenderingIntentFlag.DISPLAY), - h = !!(a & r.RenderingIntentFlag.PRINT); - for (const a of n) { - const n = c || (l && a.viewable); - (n || (h && a.printable)) && i.push(a.data); - if (a.hasTextContent && n) { - o ||= new b.PartialEvaluator({ - xref: this.xref, - handler: e, - pageIndex: this.pageIndex, - idFactory: this._localIdFactory, - fontCache: this.fontCache, - builtInCMapCache: this.builtInCMapCache, - standardFontDataCache: this.standardFontDataCache, - globalImageCache: this.globalImageCache, - systemFontCache: this.systemFontCache, - options: this.evaluatorOptions, - }); - s.push( - a - .extractTextContent(o, t, [-1 / 0, -1 / 0, 1 / 0, 1 / 0]) - .catch(function (e) { - (0, r.warn)( - `getAnnotationsData - ignoring textContent during "${t.name}" task: "${e}".`, - ); - }), - ); - } - } - await Promise.all(s); - return i; - } - get annotations() { - const e = this._getInheritableProperty("Annots"); - return (0, r.shadow)( - this, - "annotations", - Array.isArray(e) ? e : [], - ); - } - get _parsedAnnotations() { - const e = this.pdfManager - .ensure(this, "annotations") - .then(async (e) => { - if (0 === e.length) return e; - const t = - await this.pdfManager.ensureDoc("annotationGlobals"); - if (!t) return []; - const a = []; - for (const i of e) - a.push( - n.AnnotationFactory.create( - this.xref, - i, - t, - this._localIdFactory, - !1, - this.ref, - ).catch(function (e) { - (0, r.warn)(`_parsedAnnotations: "${e}".`); - return null; - }), - ); - const i = []; - let s; - for (const e of await Promise.all(a)) - e && - (e instanceof n.PopupAnnotation - ? (s ||= []).push(e) - : i.push(e)); - s && i.push(...s); - return i; - }); - return (0, r.shadow)(this, "_parsedAnnotations", e); - } - get jsActions() { - const e = (0, i.collectActions)( - this.xref, - this.pageDict, - r.PageActionEventType, - ); - return (0, r.shadow)(this, "jsActions", e); - } - } - t.Page = Page; - const v = new Uint8Array([37, 80, 68, 70, 45]), - F = new Uint8Array([115, 116, 97, 114, 116, 120, 114, 101, 102]), - O = new Uint8Array([101, 110, 100, 111, 98, 106]); - function find(e, t, a = 1024, r = !1) { - const n = t.length, - i = e.peekBytes(a), - s = i.length - n; - if (s <= 0) return !1; - if (r) { - const a = n - 1; - let r = i.length - 1; - for (; r >= a; ) { - let s = 0; - for (; s < n && i[r - s] === t[a - s]; ) s++; - if (s >= n) { - e.pos += r - a; - return !0; - } - r--; - } - } else { - let a = 0; - for (; a <= s; ) { - let r = 0; - for (; r < n && i[a + r] === t[r]; ) r++; - if (r >= n) { - e.pos += a; - return !0; - } - a++; - } - } - return !1; - } - t.PDFDocument = class PDFDocument { - constructor(e, t) { - if (t.length <= 0) - throw new r.InvalidPDFException( - "The PDF file is empty, i.e. its size is zero bytes.", - ); - this.pdfManager = e; - this.stream = t; - this.xref = new C.XRef(t, e); - this._pagePromises = new Map(); - this._version = null; - const a = { font: 0 }; - this._globalIdFactory = class { - static getDocId() { - return `g_${e.docId}`; - } - static createFontId() { - return "f" + ++a.font; - } - static createObjId() { - (0, r.unreachable)("Abstract method `createObjId` called."); - } - static getPageObjId() { - (0, r.unreachable)("Abstract method `getPageObjId` called."); - } - }; - } - parse(e) { - this.xref.parse(e); - this.catalog = new h.Catalog(this.pdfManager, this.xref); - } - get linearization() { - let e = null; - try { - e = f.Linearization.create(this.stream); - } catch (e) { - if (e instanceof i.MissingDataException) throw e; - (0, r.info)(e); - } - return (0, r.shadow)(this, "linearization", e); - } - get startXRef() { - const e = this.stream; - let t = 0; - if (this.linearization) { - e.reset(); - find(e, O) && (t = e.pos + 6 - e.start); - } else { - const a = 1024, - r = F.length; - let n = !1, - s = e.end; - for (; !n && s > 0; ) { - s -= a - r; - s < 0 && (s = 0); - e.pos = s; - n = find(e, F, a, !0); - } - if (n) { - e.skip(9); - let a; - do { - a = e.getByte(); - } while ((0, i.isWhiteSpace)(a)); - let r = ""; - for (; a >= 32 && a <= 57; ) { - r += String.fromCharCode(a); - a = e.getByte(); - } - t = parseInt(r, 10); - isNaN(t) && (t = 0); - } - } - return (0, r.shadow)(this, "startXRef", t); - } - checkHeader() { - const e = this.stream; - e.reset(); - if (!find(e, v)) return; - e.moveStart(); - e.skip(v.length); - let t, - a = ""; - for (; (t = e.getByte()) > 32 && a.length < 7; ) - a += String.fromCharCode(t); - i.PDF_VERSION_REGEXP.test(a) - ? (this._version = a) - : (0, r.warn)(`Invalid PDF header version: ${a}`); - } - parseStartXRef() { - this.xref.setStartXRef(this.startXRef); - } - get numPages() { - let e = 0; - e = this.catalog.hasActualNumPages - ? this.catalog.numPages - : this.xfaFactory - ? this.xfaFactory.getNumPages() - : this.linearization - ? this.linearization.numPages - : this.catalog.numPages; - return (0, r.shadow)(this, "numPages", e); - } - _hasOnlyDocumentSignatures(e, t = 0) { - return ( - !!Array.isArray(e) && - e.every((e) => { - if (!((e = this.xref.fetchIfRef(e)) instanceof s.Dict)) - return !1; - if (e.has("Kids")) { - if (++t > 10) { - (0, r.warn)( - "_hasOnlyDocumentSignatures: maximum recursion depth reached", - ); - return !1; - } - return this._hasOnlyDocumentSignatures(e.get("Kids"), t); - } - const a = (0, s.isName)(e.get("FT"), "Sig"), - n = e.get("Rect"), - i = Array.isArray(n) && n.every((e) => 0 === e); - return a && i; - }) - ); - } - get _xfaStreams() { - const e = this.catalog.acroForm; - if (!e) return null; - const t = e.get("XFA"), - a = { - "xdp:xdp": "", - template: "", - datasets: "", - config: "", - connectionSet: "", - localeSet: "", - stylesheet: "", - "/xdp:xdp": "", - }; - if (t instanceof c.BaseStream && !t.isEmpty) { - a["xdp:xdp"] = t; - return a; - } - if (!Array.isArray(t) || 0 === t.length) return null; - for (let e = 0, r = t.length; e < r; e += 2) { - let n; - n = 0 === e ? "xdp:xdp" : e === r - 2 ? "/xdp:xdp" : t[e]; - if (!a.hasOwnProperty(n)) continue; - const i = this.xref.fetchIfRef(t[e + 1]); - i instanceof c.BaseStream && !i.isEmpty && (a[n] = i); - } - return a; - } - get xfaDatasets() { - const e = this._xfaStreams; - if (!e) return (0, r.shadow)(this, "xfaDatasets", null); - for (const t of ["datasets", "xdp:xdp"]) { - const a = e[t]; - if (a) - try { - const e = { [t]: (0, r.stringToUTF8String)(a.getString()) }; - return (0, r.shadow)( - this, - "xfaDatasets", - new d.DatasetReader(e), - ); - } catch { - (0, r.warn)("XFA - Invalid utf-8 string."); - break; - } - } - return (0, r.shadow)(this, "xfaDatasets", null); - } - get xfaData() { - const e = this._xfaStreams; - if (!e) return null; - const t = Object.create(null); - for (const [a, n] of Object.entries(e)) - if (n) - try { - t[a] = (0, r.stringToUTF8String)(n.getString()); - } catch { - (0, r.warn)("XFA - Invalid utf-8 string."); - return null; - } - return t; - } - get xfaFactory() { - let e; - this.pdfManager.enableXfa && - this.catalog.needsRendering && - this.formInfo.hasXfa && - !this.formInfo.hasAcroForm && - (e = this.xfaData); - return (0, r.shadow)( - this, - "xfaFactory", - e ? new x.XFAFactory(e) : null, - ); - } - get isPureXfa() { - return !!this.xfaFactory && this.xfaFactory.isValid(); - } - get htmlForXfa() { - return this.xfaFactory ? this.xfaFactory.getPages() : null; - } - async loadXfaImages() { - const e = await this.pdfManager.ensureCatalog("xfaImages"); - if (!e) return; - const t = e.getKeys(), - a = new p.ObjectLoader(e, t, this.xref); - await a.load(); - const r = new Map(); - for (const a of t) { - const t = e.get(a); - t instanceof c.BaseStream && r.set(a, t.getBytes()); - } - this.xfaFactory.setImages(r); - } - async loadXfaFonts(e, t) { - const a = await this.pdfManager.ensureCatalog("acroForm"); - if (!a) return; - const n = await a.getAsync("DR"); - if (!(n instanceof s.Dict)) return; - const c = new p.ObjectLoader(n, ["Font"], this.xref); - await c.load(); - const l = n.get("Font"); - if (!(l instanceof s.Dict)) return; - const h = Object.assign( - Object.create(null), - this.pdfManager.evaluatorOptions, - ); - h.useSystemFonts = !1; - const u = new b.PartialEvaluator({ - xref: this.xref, - handler: e, - pageIndex: -1, - idFactory: this._globalIdFactory, - fontCache: this.catalog.fontCache, - builtInCMapCache: this.catalog.builtInCMapCache, - standardFontDataCache: this.catalog.standardFontDataCache, - options: h, - }), - d = new m.OperatorList(), - f = [], - g = { - get font() { - return f.at(-1); - }, - set font(e) { - f.push(e); - }, - clone() { - return this; - }, - }, - y = new Map(); - l.forEach((e, t) => { - y.set(e, t); - }); - const w = []; - for (const [e, a] of y) { - const o = a.get("FontDescriptor"); - if (!(o instanceof s.Dict)) continue; - let c = o.get("FontFamily"); - c = c.replaceAll(/[ ]+(\d)/g, "$1"); - const l = { - fontFamily: c, - fontWeight: o.get("FontWeight"), - italicAngle: -o.get("ItalicAngle"), - }; - (0, i.validateCSSFont)(l) && - w.push( - u - .handleSetFont( - n, - [s.Name.get(e), 1], - null, - d, - t, - g, - null, - l, - ) - .catch(function (e) { - (0, r.warn)(`loadXfaFonts: "${e}".`); - return null; - }), - ); - } - await Promise.all(w); - const S = this.xfaFactory.setFonts(f); - if (!S) return; - h.ignoreErrors = !0; - w.length = 0; - f.length = 0; - const x = new Set(); - for (const e of S) - (0, o.getXfaFontName)(`${e}-Regular`) || x.add(e); - x.size && S.push("PdfJS-Fallback"); - for (const e of S) - if (!x.has(e)) - for (const a of [ - { name: "Regular", fontWeight: 400, italicAngle: 0 }, - { name: "Bold", fontWeight: 700, italicAngle: 0 }, - { name: "Italic", fontWeight: 400, italicAngle: 12 }, - { name: "BoldItalic", fontWeight: 700, italicAngle: 12 }, - ]) { - const i = `${e}-${a.name}`, - c = (0, o.getXfaFontDict)(i); - w.push( - u - .handleSetFont( - n, - [s.Name.get(i), 1], - null, - d, - t, - g, - c, - { - fontFamily: e, - fontWeight: a.fontWeight, - italicAngle: a.italicAngle, - }, - ) - .catch(function (e) { - (0, r.warn)(`loadXfaFonts: "${e}".`); - return null; - }), - ); - } - await Promise.all(w); - this.xfaFactory.appendFonts(f, x); - } - async serializeXfaData(e) { - return this.xfaFactory ? this.xfaFactory.serializeData(e) : null; - } - get version() { - return this.catalog.version || this._version; - } - get formInfo() { - const e = { - hasFields: !1, - hasAcroForm: !1, - hasXfa: !1, - hasSignatures: !1, - }, - t = this.catalog.acroForm; - if (!t) return (0, r.shadow)(this, "formInfo", e); - try { - const a = t.get("Fields"), - r = Array.isArray(a) && a.length > 0; - e.hasFields = r; - const n = t.get("XFA"); - e.hasXfa = - (Array.isArray(n) && n.length > 0) || - (n instanceof c.BaseStream && !n.isEmpty); - const i = !!(1 & t.get("SigFlags")), - s = i && this._hasOnlyDocumentSignatures(a); - e.hasAcroForm = r && !s; - e.hasSignatures = i; - } catch (e) { - if (e instanceof i.MissingDataException) throw e; - (0, r.warn)(`Cannot fetch form information: "${e}".`); - } - return (0, r.shadow)(this, "formInfo", e); - } - get documentInfo() { - const e = { - PDFFormatVersion: this.version, - Language: this.catalog.lang, - EncryptFilterName: this.xref.encrypt - ? this.xref.encrypt.filterName - : null, - IsLinearized: !!this.linearization, - IsAcroFormPresent: this.formInfo.hasAcroForm, - IsXFAPresent: this.formInfo.hasXfa, - IsCollectionPresent: !!this.catalog.collection, - IsSignaturesPresent: this.formInfo.hasSignatures, - }; - let t; - try { - t = this.xref.trailer.get("Info"); - } catch (e) { - if (e instanceof i.MissingDataException) throw e; - (0, r.info)("The document information dictionary is invalid."); - } - if (!(t instanceof s.Dict)) - return (0, r.shadow)(this, "documentInfo", e); - for (const a of t.getKeys()) { - const n = t.get(a); - switch (a) { - case "Title": - case "Author": - case "Subject": - case "Keywords": - case "Creator": - case "Producer": - case "CreationDate": - case "ModDate": - if ("string" == typeof n) { - e[a] = (0, r.stringToPDFString)(n); - continue; - } - break; - case "Trapped": - if (n instanceof s.Name) { - e[a] = n; - continue; - } - break; - default: - let t; - switch (typeof n) { - case "string": - t = (0, r.stringToPDFString)(n); - break; - case "number": - case "boolean": - t = n; - break; - default: - n instanceof s.Name && (t = n); - } - if (void 0 === t) { - (0, r.warn)( - `Bad value, for custom key "${a}", in Info: ${n}.`, - ); - continue; - } - e.Custom || (e.Custom = Object.create(null)); - e.Custom[a] = t; - continue; - } - (0, r.warn)(`Bad value, for key "${a}", in Info: ${n}.`); - } - return (0, r.shadow)(this, "documentInfo", e); - } - get fingerprints() { - function validate(e) { - return ( - "string" == typeof e && - e.length > 0 && - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" !== e - ); - } - function hexString(e) { - const t = []; - for (const a of e) { - const e = a.toString(16); - t.push(e.padStart(2, "0")); - } - return t.join(""); - } - const e = this.xref.trailer.get("ID"); - let t, a; - if (Array.isArray(e) && validate(e[0])) { - t = (0, r.stringToBytes)(e[0]); - e[1] !== e[0] && - validate(e[1]) && - (a = (0, r.stringToBytes)(e[1])); - } else - t = (0, l.calculateMD5)( - this.stream.getByteRange(0, 1024), - 0, - 1024, - ); - return (0, r.shadow)(this, "fingerprints", [ - hexString(t), - a ? hexString(a) : null, - ]); - } - async _getLinearizationPage(e) { - const { catalog: t, linearization: a, xref: n } = this, - i = s.Ref.get(a.objectNumberFirst, 0); - try { - const e = await n.fetchAsync(i); - if (e instanceof s.Dict) { - let a = e.getRaw("Type"); - a instanceof s.Ref && (a = await n.fetchAsync(a)); - if ( - (0, s.isName)(a, "Page") || - (!e.has("Type") && !e.has("Kids")) - ) { - t.pageKidsCountCache.has(i) || - t.pageKidsCountCache.put(i, 1); - t.pageIndexCache.has(i) || t.pageIndexCache.put(i, 0); - return [e, i]; - } - } - throw new r.FormatError( - "The Linearization dictionary doesn't point to a valid Page dictionary.", - ); - } catch (a) { - (0, r.warn)(`_getLinearizationPage: "${a.message}".`); - return t.getPageDict(e); - } - } - getPage(e) { - const t = this._pagePromises.get(e); - if (t) return t; - const { catalog: a, linearization: r, xfaFactory: n } = this; - let i; - i = n - ? Promise.resolve([s.Dict.empty, null]) - : r?.pageFirst === e - ? this._getLinearizationPage(e) - : a.getPageDict(e); - i = i.then( - ([t, r]) => - new Page({ - pdfManager: this.pdfManager, - xref: this.xref, - pageIndex: e, - pageDict: t, - ref: r, - globalIdFactory: this._globalIdFactory, - fontCache: a.fontCache, - builtInCMapCache: a.builtInCMapCache, - standardFontDataCache: a.standardFontDataCache, - globalImageCache: a.globalImageCache, - systemFontCache: a.systemFontCache, - nonBlendModesSet: a.nonBlendModesSet, - xfaFactory: n, - }), - ); - this._pagePromises.set(e, i); - return i; - } - async checkFirstPage(e = !1) { - if (!e) - try { - await this.getPage(0); - } catch (e) { - if (e instanceof i.XRefEntryException) { - this._pagePromises.delete(0); - await this.cleanup(); - throw new i.XRefParseException(); - } - } - } - async checkLastPage(e = !1) { - const { catalog: t, pdfManager: a } = this; - t.setActualNumPages(); - let n; - try { - await Promise.all([ - a.ensureDoc("xfaFactory"), - a.ensureDoc("linearization"), - a.ensureCatalog("numPages"), - ]); - if (this.xfaFactory) return; - n = this.linearization - ? this.linearization.numPages - : t.numPages; - if (!Number.isInteger(n)) - throw new r.FormatError("Page count is not an integer."); - if (n <= 1) return; - await this.getPage(n - 1); - } catch (s) { - this._pagePromises.delete(n - 1); - await this.cleanup(); - if (s instanceof i.XRefEntryException && !e) - throw new i.XRefParseException(); - (0, r.warn)( - `checkLastPage - invalid /Pages tree /Count: ${n}.`, - ); - let o; - try { - o = await t.getAllPageDicts(e); - } catch (a) { - if (a instanceof i.XRefEntryException && !e) - throw new i.XRefParseException(); - t.setActualNumPages(1); - return; - } - for (const [e, [r, n]] of o) { - let i; - if (r instanceof Error) { - i = Promise.reject(r); - i.catch(() => {}); - } else - i = Promise.resolve( - new Page({ - pdfManager: a, - xref: this.xref, - pageIndex: e, - pageDict: r, - ref: n, - globalIdFactory: this._globalIdFactory, - fontCache: t.fontCache, - builtInCMapCache: t.builtInCMapCache, - standardFontDataCache: t.standardFontDataCache, - globalImageCache: t.globalImageCache, - systemFontCache: t.systemFontCache, - nonBlendModesSet: t.nonBlendModesSet, - xfaFactory: null, - }), - ); - this._pagePromises.set(e, i); - } - t.setActualNumPages(o.size); - } - } - fontFallback(e, t) { - return this.catalog.fontFallback(e, t); - } - async cleanup(e = !1) { - return this.catalog - ? this.catalog.cleanup(e) - : (0, u.clearGlobalCaches)(); - } - #a(e, t, a, i) { - const s = this.xref.fetchIfRef(t); - if (s.has("T")) { - const t = (0, r.stringToPDFString)(s.get("T")); - e = "" === e ? t : `${e}.${t}`; - } - a.has(e) || a.set(e, []); - a.get(e).push( - n.AnnotationFactory.create( - this.xref, - t, - i, - this._localIdFactory, - !0, - null, - ) - .then((e) => e?.getFieldObject()) - .catch(function (e) { - (0, r.warn)(`#collectFieldObjects: "${e}".`); - return null; - }), - ); - if (s.has("Kids")) - for (const t of s.get("Kids")) this.#a(e, t, a, i); - } - get fieldObjects() { - if (!this.formInfo.hasFields) - return (0, r.shadow)( - this, - "fieldObjects", - Promise.resolve(null), - ); - const e = this.pdfManager - .ensureDoc("annotationGlobals") - .then(async (e) => { - if (!e) return null; - const t = Object.create(null), - a = new Map(); - for (const t of this.catalog.acroForm.get("Fields")) - this.#a("", t, a, e); - const r = []; - for (const [e, n] of a) - r.push( - Promise.all(n).then((a) => { - (a = a.filter((e) => !!e)).length > 0 && (t[e] = a); - }), - ); - await Promise.all(r); - return t; - }); - return (0, r.shadow)(this, "fieldObjects", e); - } - get hasJSActions() { - const e = this.pdfManager.ensureDoc("_parseHasJSActions"); - return (0, r.shadow)(this, "hasJSActions", e); - } - async _parseHasJSActions() { - const [e, t] = await Promise.all([ - this.pdfManager.ensureCatalog("jsActions"), - this.pdfManager.ensureDoc("fieldObjects"), - ]); - return ( - !!e || - (!!t && - Object.values(t).some((e) => - e.some((e) => null !== e.actions), - )) - ); - } - get calculationOrderIds() { - const e = this.catalog.acroForm; - if (!e?.has("CO")) - return (0, r.shadow)(this, "calculationOrderIds", null); - const t = e.get("CO"); - if (!Array.isArray(t) || 0 === t.length) - return (0, r.shadow)(this, "calculationOrderIds", null); - const a = []; - for (const e of t) e instanceof s.Ref && a.push(e.toString()); - return 0 === a.length - ? (0, r.shadow)(this, "calculationOrderIds", null) - : (0, r.shadow)(this, "calculationOrderIds", a); - } - get annotationGlobals() { - return (0, r.shadow)( - this, - "annotationGlobals", - n.AnnotationFactory.createGlobals(this.pdfManager), - ); - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.PopupAnnotation = - t.MarkupAnnotation = - t.AnnotationFactory = - t.AnnotationBorderStyle = - t.Annotation = - void 0; - t.getQuadPoints = getQuadPoints; - var r = a(2), - n = a(3), - i = a(11), - s = a(4), - o = a(8), - c = a(5), - l = a(60), - h = a(66), - u = a(12), - d = a(69), - f = a(26), - g = a(76), - p = a(64), - m = a(73), - b = a(77); - t.AnnotationFactory = class AnnotationFactory { - static createGlobals(e) { - return Promise.all([ - e.ensureCatalog("acroForm"), - e.ensureDoc("xfaDatasets"), - e.ensureCatalog("structTreeRoot"), - e.ensureCatalog("baseUrl"), - e.ensureCatalog("attachments"), - ]).then( - ([t, a, r, n, i]) => ({ - pdfManager: e, - acroForm: t instanceof s.Dict ? t : s.Dict.empty, - xfaDatasets: a, - structTreeRoot: r, - baseUrl: n, - attachments: i, - }), - (e) => { - (0, r.warn)(`createGlobals: "${e}".`); - return null; - }, - ); - } - static async create(e, t, a, r, n, i) { - const s = n ? await this._getPageIndex(e, t, a.pdfManager) : null; - return a.pdfManager.ensure(this, "_create", [ - e, - t, - a, - r, - n, - s, - i, - ]); - } - static _create(e, t, a, i, o = !1, c = null, l = null) { - const h = e.fetchIfRef(t); - if (!(h instanceof s.Dict)) return; - const { acroForm: u, pdfManager: d } = a, - f = - t instanceof s.Ref - ? t.toString() - : `annot_${i.createObjId()}`; - let g = h.get("Subtype"); - g = g instanceof s.Name ? g.name : null; - const p = { - xref: e, - ref: t, - dict: h, - subtype: g, - id: f, - annotationGlobals: a, - collectFields: o, - needAppearances: !o && !0 === u.get("NeedAppearances"), - pageIndex: c, - evaluatorOptions: d.evaluatorOptions, - pageRef: l, - }; - switch (g) { - case "Link": - return new LinkAnnotation(p); - case "Text": - return new TextAnnotation(p); - case "Widget": - let e = (0, n.getInheritableProperty)({ dict: h, key: "FT" }); - e = e instanceof s.Name ? e.name : null; - switch (e) { - case "Tx": - return new TextWidgetAnnotation(p); - case "Btn": - return new ButtonWidgetAnnotation(p); - case "Ch": - return new ChoiceWidgetAnnotation(p); - case "Sig": - return new SignatureWidgetAnnotation(p); - } - (0, r.warn)( - `Unimplemented widget field type "${e}", falling back to base field type.`, - ); - return new WidgetAnnotation(p); - case "Popup": - return new PopupAnnotation(p); - case "FreeText": - return new FreeTextAnnotation(p); - case "Line": - return new LineAnnotation(p); - case "Square": - return new SquareAnnotation(p); - case "Circle": - return new CircleAnnotation(p); - case "PolyLine": - return new PolylineAnnotation(p); - case "Polygon": - return new PolygonAnnotation(p); - case "Caret": - return new CaretAnnotation(p); - case "Ink": - return new InkAnnotation(p); - case "Highlight": - return new HighlightAnnotation(p); - case "Underline": - return new UnderlineAnnotation(p); - case "Squiggly": - return new SquigglyAnnotation(p); - case "StrikeOut": - return new StrikeOutAnnotation(p); - case "Stamp": - return new StampAnnotation(p); - case "FileAttachment": - return new FileAttachmentAnnotation(p); - default: - o || - (g - ? (0, r.warn)( - `Unimplemented annotation type "${g}", falling back to base annotation.`, - ) - : (0, r.warn)( - "Annotation is missing the required /Subtype.", - )); - return new Annotation(p); - } - } - static async _getPageIndex(e, t, a) { - try { - const n = await e.fetchIfRefAsync(t); - if (!(n instanceof s.Dict)) return -1; - const i = n.getRaw("P"); - if (i instanceof s.Ref) - try { - return await a.ensureCatalog("getPageIndex", [i]); - } catch (e) { - (0, r.info)( - `_getPageIndex -- not a valid page reference: "${e}".`, - ); - } - if (n.has("Kids")) return -1; - const o = await a.ensureDoc("numPages"); - for (let e = 0; e < o; e++) { - const r = await a.getPage(e), - n = await a.ensure(r, "annotations"); - for (const a of n) - if (a instanceof s.Ref && (0, s.isRefsEqual)(a, t)) - return e; - } - } catch (e) { - (0, r.warn)(`_getPageIndex: "${e}".`); - } - return -1; - } - static generateImages(e, t, a) { - if (!a) { - (0, r.warn)( - "generateImages: OffscreenCanvas is not supported, cannot save or print some annotations with images.", - ); - return null; - } - let n; - for (const { bitmapId: a, bitmap: r } of e) - if (r) { - n ||= new Map(); - n.set(a, StampAnnotation.createImage(r, t)); - } - return n; - } - static async saveNewAnnotations(e, t, a, n) { - const i = e.xref; - let o; - const c = [], - l = [], - { isOffscreenCanvasSupported: h } = e.options; - for (const u of a) - if (!u.deleted) - switch (u.annotationType) { - case r.AnnotationEditorType.FREETEXT: - if (!o) { - const e = new s.Dict(i); - e.set("BaseFont", s.Name.get("Helvetica")); - e.set("Type", s.Name.get("Font")); - e.set("Subtype", s.Name.get("Type1")); - e.set("Encoding", s.Name.get("WinAnsiEncoding")); - const t = []; - o = i.getNewTemporaryRef(); - await (0, m.writeObject)(o, e, t, i); - c.push({ ref: o, data: t.join("") }); - } - l.push( - FreeTextAnnotation.createNewAnnotation(i, u, c, { - evaluator: e, - task: t, - baseFontRef: o, - }), - ); - break; - case r.AnnotationEditorType.INK: - l.push(InkAnnotation.createNewAnnotation(i, u, c)); - break; - case r.AnnotationEditorType.STAMP: - if (!h) break; - const a = await n.get(u.bitmapId); - if (a.imageStream) { - const { imageStream: e, smaskStream: t } = a, - r = []; - if (t) { - const a = i.getNewTemporaryRef(); - await (0, m.writeObject)(a, t, r, i); - c.push({ ref: a, data: r.join("") }); - e.dict.set("SMask", a); - r.length = 0; - } - const n = (a.imageRef = i.getNewTemporaryRef()); - await (0, m.writeObject)(n, e, r, i); - c.push({ ref: n, data: r.join("") }); - a.imageStream = a.smaskStream = null; - } - l.push( - StampAnnotation.createNewAnnotation(i, u, c, { - image: a, - }), - ); - } - return { annotations: await Promise.all(l), dependencies: c }; - } - static async printNewAnnotations(e, t, a, n, i) { - if (!n) return null; - const { options: s, xref: o } = t, - c = []; - for (const l of n) - if (!l.deleted) - switch (l.annotationType) { - case r.AnnotationEditorType.FREETEXT: - c.push( - FreeTextAnnotation.createNewPrintAnnotation(e, o, l, { - evaluator: t, - task: a, - evaluatorOptions: s, - }), - ); - break; - case r.AnnotationEditorType.INK: - c.push( - InkAnnotation.createNewPrintAnnotation(e, o, l, { - evaluatorOptions: s, - }), - ); - break; - case r.AnnotationEditorType.STAMP: - if (!s.isOffscreenCanvasSupported) break; - const n = await i.get(l.bitmapId); - if (n.imageStream) { - const { imageStream: e, smaskStream: t } = n; - t && e.dict.set("SMask", t); - n.imageRef = new f.JpegStream(e, e.length); - n.imageStream = n.smaskStream = null; - } - c.push( - StampAnnotation.createNewPrintAnnotation(e, o, l, { - image: n, - evaluatorOptions: s, - }), - ); - } - return Promise.all(c); - } - }; - function getRgbColor(e, t = new Uint8ClampedArray(3)) { - if (!Array.isArray(e)) return t; - const a = t || new Uint8ClampedArray(3); - switch (e.length) { - case 0: - return null; - case 1: - u.ColorSpace.singletons.gray.getRgbItem(e, 0, a, 0); - return a; - case 3: - u.ColorSpace.singletons.rgb.getRgbItem(e, 0, a, 0); - return a; - case 4: - u.ColorSpace.singletons.cmyk.getRgbItem(e, 0, a, 0); - return a; - default: - return t; - } - } - function getPdfColorArray(e) { - return Array.from(e, (e) => e / 255); - } - function getQuadPoints(e, t) { - const a = e.getArray("QuadPoints"); - if (!Array.isArray(a) || 0 === a.length || a.length % 8 > 0) - return null; - const r = []; - for (let e = 0, n = a.length / 8; e < n; e++) { - let n = 1 / 0, - i = -1 / 0, - s = 1 / 0, - o = -1 / 0; - for (let t = 8 * e, r = 8 * e + 8; t < r; t += 2) { - const e = a[t], - r = a[t + 1]; - n = Math.min(e, n); - i = Math.max(e, i); - s = Math.min(r, s); - o = Math.max(r, o); - } - if (null !== t && (n < t[0] || i > t[2] || s < t[1] || o > t[3])) - return null; - r.push([ - { x: n, y: o }, - { x: i, y: o }, - { x: n, y: s }, - { x: i, y: s }, - ]); - } - return r; - } - function getTransformMatrix(e, t, a) { - const [n, i, s, o] = r.Util.getAxialAlignedBoundingBox(t, a); - if (n === s || i === o) return [1, 0, 0, 1, e[0], e[1]]; - const c = (e[2] - e[0]) / (s - n), - l = (e[3] - e[1]) / (o - i); - return [c, 0, 0, l, e[0] - n * c, e[1] - i * l]; - } - class Annotation { - constructor(e) { - const { dict: t, xref: a, annotationGlobals: i } = e; - this.setTitle(t.get("T")); - this.setContents(t.get("Contents")); - this.setModificationDate(t.get("M")); - this.setFlags(t.get("F")); - this.setRectangle(t.getArray("Rect")); - this.setColor(t.getArray("C")); - this.setBorderStyle(t); - this.setAppearance(t); - this.setOptionalContent(t); - const o = t.get("MK"); - this.setBorderAndBackgroundColors(o); - this.setRotation(o, t); - this.ref = e.ref instanceof s.Ref ? e.ref : null; - this._streams = []; - this.appearance && this._streams.push(this.appearance); - const c = !!(this.flags & r.AnnotationFlag.LOCKED), - l = !!(this.flags & r.AnnotationFlag.LOCKEDCONTENTS); - if (i.structTreeRoot) { - let a = t.get("StructParent"); - a = Number.isInteger(a) && a >= 0 ? a : -1; - i.structTreeRoot.addAnnotationIdToPage(e.pageRef, a); - } - this.data = { - annotationFlags: this.flags, - borderStyle: this.borderStyle, - color: this.color, - backgroundColor: this.backgroundColor, - borderColor: this.borderColor, - rotation: this.rotation, - contentsObj: this._contents, - hasAppearance: !!this.appearance, - id: e.id, - modificationDate: this.modificationDate, - rect: this.rectangle, - subtype: e.subtype, - hasOwnCanvas: !1, - noRotate: !!(this.flags & r.AnnotationFlag.NOROTATE), - noHTML: c && l, - }; - if (e.collectFields) { - const i = t.get("Kids"); - if (Array.isArray(i)) { - const e = []; - for (const t of i) t instanceof s.Ref && e.push(t.toString()); - 0 !== e.length && (this.data.kidIds = e); - } - this.data.actions = (0, n.collectActions)( - a, - t, - r.AnnotationActionEventType, - ); - this.data.fieldName = this._constructFieldName(t); - this.data.pageIndex = e.pageIndex; - } - this._isOffscreenCanvasSupported = - e.evaluatorOptions.isOffscreenCanvasSupported; - this._fallbackFontDict = null; - this._needAppearances = !1; - } - _hasFlag(e, t) { - return !!(e & t); - } - _isViewable(e) { - return ( - !this._hasFlag(e, r.AnnotationFlag.INVISIBLE) && - !this._hasFlag(e, r.AnnotationFlag.NOVIEW) - ); - } - _isPrintable(e) { - return ( - this._hasFlag(e, r.AnnotationFlag.PRINT) && - !this._hasFlag(e, r.AnnotationFlag.HIDDEN) && - !this._hasFlag(e, r.AnnotationFlag.INVISIBLE) - ); - } - mustBeViewed(e, t) { - const a = e?.get(this.data.id)?.noView; - return void 0 !== a - ? !a - : this.viewable && - !this._hasFlag(this.flags, r.AnnotationFlag.HIDDEN); - } - mustBePrinted(e) { - const t = e?.get(this.data.id)?.noPrint; - return void 0 !== t ? !t : this.printable; - } - get viewable() { - return ( - null !== this.data.quadPoints && - (0 === this.flags || this._isViewable(this.flags)) - ); - } - get printable() { - return ( - null !== this.data.quadPoints && - 0 !== this.flags && - this._isPrintable(this.flags) - ); - } - _parseStringHelper(e) { - const t = "string" == typeof e ? (0, r.stringToPDFString)(e) : ""; - return { - str: t, - dir: t && "rtl" === (0, l.bidi)(t).dir ? "rtl" : "ltr", - }; - } - setDefaultAppearance(e) { - const { dict: t, annotationGlobals: a } = e, - r = - (0, n.getInheritableProperty)({ dict: t, key: "DA" }) || - a.acroForm.get("DA"); - this._defaultAppearance = "string" == typeof r ? r : ""; - this.data.defaultAppearanceData = (0, i.parseDefaultAppearance)( - this._defaultAppearance, - ); - } - setTitle(e) { - this._title = this._parseStringHelper(e); - } - setContents(e) { - this._contents = this._parseStringHelper(e); - } - setModificationDate(e) { - this.modificationDate = "string" == typeof e ? e : null; - } - setFlags(e) { - this.flags = Number.isInteger(e) && e > 0 ? e : 0; - } - hasFlag(e) { - return this._hasFlag(this.flags, e); - } - setRectangle(e) { - this.rectangle = - Array.isArray(e) && 4 === e.length - ? r.Util.normalizeRect(e) - : [0, 0, 0, 0]; - } - setColor(e) { - this.color = getRgbColor(e); - } - setLineEndings(e) { - this.lineEndings = ["None", "None"]; - if (Array.isArray(e) && 2 === e.length) - for (let t = 0; t < 2; t++) { - const a = e[t]; - if (a instanceof s.Name) - switch (a.name) { - case "None": - continue; - case "Square": - case "Circle": - case "Diamond": - case "OpenArrow": - case "ClosedArrow": - case "Butt": - case "ROpenArrow": - case "RClosedArrow": - case "Slash": - this.lineEndings[t] = a.name; - continue; - } - (0, r.warn)(`Ignoring invalid lineEnding: ${a}`); - } - } - setRotation(e, t) { - this.rotation = 0; - let a = - e instanceof s.Dict ? e.get("R") || 0 : t.get("Rotate") || 0; - if (Number.isInteger(a) && 0 !== a) { - a %= 360; - a < 0 && (a += 360); - a % 90 == 0 && (this.rotation = a); - } - } - setBorderAndBackgroundColors(e) { - if (e instanceof s.Dict) { - this.borderColor = getRgbColor(e.getArray("BC"), null); - this.backgroundColor = getRgbColor(e.getArray("BG"), null); - } else this.borderColor = this.backgroundColor = null; - } - setBorderStyle(e) { - this.borderStyle = new AnnotationBorderStyle(); - if (e instanceof s.Dict) - if (e.has("BS")) { - const t = e.get("BS"), - a = t.get("Type"); - if (!a || (0, s.isName)(a, "Border")) { - this.borderStyle.setWidth(t.get("W"), this.rectangle); - this.borderStyle.setStyle(t.get("S")); - this.borderStyle.setDashArray(t.getArray("D")); - } - } else if (e.has("Border")) { - const t = e.getArray("Border"); - if (Array.isArray(t) && t.length >= 3) { - this.borderStyle.setHorizontalCornerRadius(t[0]); - this.borderStyle.setVerticalCornerRadius(t[1]); - this.borderStyle.setWidth(t[2], this.rectangle); - 4 === t.length && this.borderStyle.setDashArray(t[3], !0); - } - } else this.borderStyle.setWidth(0); - } - setAppearance(e) { - this.appearance = null; - const t = e.get("AP"); - if (!(t instanceof s.Dict)) return; - const a = t.get("N"); - if (a instanceof c.BaseStream) { - this.appearance = a; - return; - } - if (!(a instanceof s.Dict)) return; - const r = e.get("AS"); - if (!(r instanceof s.Name && a.has(r.name))) return; - const n = a.get(r.name); - n instanceof c.BaseStream && (this.appearance = n); - } - setOptionalContent(e) { - this.oc = null; - const t = e.get("OC"); - t instanceof s.Name - ? (0, r.warn)( - "setOptionalContent: Support for /Name-entry is not implemented.", - ) - : t instanceof s.Dict && (this.oc = t); - } - loadResources(e, t) { - return t.dict.getAsync("Resources").then((t) => { - if (!t) return; - return new g.ObjectLoader(t, e, t.xref) - .load() - .then(function () { - return t; - }); - }); - } - async getOperatorList(e, t, a, n, i) { - const c = this.data; - let l = this.appearance; - const h = !!( - this.data.hasOwnCanvas && a & r.RenderingIntentFlag.DISPLAY - ); - if (!l) { - if (!h) - return { - opList: new p.OperatorList(), - separateForm: !1, - separateCanvas: !1, - }; - l = new o.StringStream(""); - l.dict = new s.Dict(); - } - const u = l.dict, - d = await this.loadResources( - [ - "ExtGState", - "ColorSpace", - "Pattern", - "Shading", - "XObject", - "Font", - ], - l, - ), - f = u.getArray("BBox") || [0, 0, 1, 1], - g = u.getArray("Matrix") || [1, 0, 0, 1, 0, 0], - m = getTransformMatrix(c.rect, f, g), - b = new p.OperatorList(); - let y; - this.oc && (y = await e.parseMarkedContentProps(this.oc, null)); - void 0 !== y && b.addOp(r.OPS.beginMarkedContentProps, ["OC", y]); - b.addOp(r.OPS.beginAnnotation, [c.id, c.rect, m, g, h]); - await e.getOperatorList({ - stream: l, - task: t, - resources: d, - operatorList: b, - fallbackFontDict: this._fallbackFontDict, - }); - b.addOp(r.OPS.endAnnotation, []); - void 0 !== y && b.addOp(r.OPS.endMarkedContent, []); - this.reset(); - return { opList: b, separateForm: !1, separateCanvas: h }; - } - async save(e, t, a) { - return null; - } - get hasTextContent() { - return !1; - } - async extractTextContent(e, t, a) { - if (!this.appearance) return; - const n = await this.loadResources( - ["ExtGState", "Font", "Properties", "XObject"], - this.appearance, - ), - i = [], - s = []; - let o = null; - const c = { - desiredSize: Math.Infinity, - ready: !0, - enqueue(e, t) { - for (const t of e.items) - if (void 0 !== t.str) { - o ||= t.transform.slice(-2); - s.push(t.str); - if (t.hasEOL) { - i.push(s.join("")); - s.length = 0; - } - } - }, - }; - await e.getTextContent({ - stream: this.appearance, - task: t, - resources: n, - includeMarkedContent: !0, - sink: c, - viewBox: a, - }); - this.reset(); - s.length && i.push(s.join("")); - if (i.length > 1 || i[0]) { - const e = this.appearance.dict, - t = e.getArray("BBox") || [0, 0, 1, 1], - a = e.getArray("Matrix") || [1, 0, 0, 1, 0, 0], - n = this.data.rect, - s = getTransformMatrix(n, t, a); - s[4] -= n[0]; - s[5] -= n[1]; - o = r.Util.applyTransform(o, s); - o = r.Util.applyTransform(o, a); - this.data.textPosition = o; - this.data.textContent = i; - } - } - getFieldObject() { - return this.data.kidIds - ? { - id: this.data.id, - actions: this.data.actions, - name: this.data.fieldName, - strokeColor: this.data.borderColor, - fillColor: this.data.backgroundColor, - type: "", - kidIds: this.data.kidIds, - page: this.data.pageIndex, - rotation: this.rotation, - } - : null; - } - reset() { - for (const e of this._streams) e.reset(); - } - _constructFieldName(e) { - if (!e.has("T") && !e.has("Parent")) { - (0, r.warn)( - "Unknown field name, falling back to empty field name.", - ); - return ""; - } - if (!e.has("Parent")) return (0, r.stringToPDFString)(e.get("T")); - const t = []; - e.has("T") && t.unshift((0, r.stringToPDFString)(e.get("T"))); - let a = e; - const n = new s.RefSet(); - e.objId && n.put(e.objId); - for (; a.has("Parent"); ) { - a = a.get("Parent"); - if (!(a instanceof s.Dict) || (a.objId && n.has(a.objId))) - break; - a.objId && n.put(a.objId); - a.has("T") && t.unshift((0, r.stringToPDFString)(a.get("T"))); - } - return t.join("."); - } - } - t.Annotation = Annotation; - class AnnotationBorderStyle { - constructor() { - this.width = 1; - this.style = r.AnnotationBorderStyleType.SOLID; - this.dashArray = [3]; - this.horizontalCornerRadius = 0; - this.verticalCornerRadius = 0; - } - setWidth(e, t = [0, 0, 0, 0]) { - if (e instanceof s.Name) this.width = 0; - else if ("number" == typeof e) { - if (e > 0) { - const a = (t[2] - t[0]) / 2, - n = (t[3] - t[1]) / 2; - if (a > 0 && n > 0 && (e > a || e > n)) { - (0, r.warn)( - `AnnotationBorderStyle.setWidth - ignoring width: ${e}`, - ); - e = 1; - } - } - this.width = e; - } - } - setStyle(e) { - if (e instanceof s.Name) - switch (e.name) { - case "S": - this.style = r.AnnotationBorderStyleType.SOLID; - break; - case "D": - this.style = r.AnnotationBorderStyleType.DASHED; - break; - case "B": - this.style = r.AnnotationBorderStyleType.BEVELED; - break; - case "I": - this.style = r.AnnotationBorderStyleType.INSET; - break; - case "U": - this.style = r.AnnotationBorderStyleType.UNDERLINE; - } - } - setDashArray(e, t = !1) { - if (Array.isArray(e) && e.length > 0) { - let a = !0, - r = !0; - for (const t of e) { - if (!(+t >= 0)) { - a = !1; - break; - } - t > 0 && (r = !1); - } - if (a && !r) { - this.dashArray = e; - t && this.setStyle(s.Name.get("D")); - } else this.width = 0; - } else e && (this.width = 0); - } - setHorizontalCornerRadius(e) { - Number.isInteger(e) && (this.horizontalCornerRadius = e); - } - setVerticalCornerRadius(e) { - Number.isInteger(e) && (this.verticalCornerRadius = e); - } - } - t.AnnotationBorderStyle = AnnotationBorderStyle; - class MarkupAnnotation extends Annotation { - constructor(e) { - super(e); - const { dict: t } = e; - if (t.has("IRT")) { - const e = t.getRaw("IRT"); - this.data.inReplyTo = e instanceof s.Ref ? e.toString() : null; - const a = t.get("RT"); - this.data.replyType = - a instanceof s.Name ? a.name : r.AnnotationReplyType.REPLY; - } - let a = null; - if (this.data.replyType === r.AnnotationReplyType.GROUP) { - const e = t.get("IRT"); - this.setTitle(e.get("T")); - this.data.titleObj = this._title; - this.setContents(e.get("Contents")); - this.data.contentsObj = this._contents; - if (e.has("CreationDate")) { - this.setCreationDate(e.get("CreationDate")); - this.data.creationDate = this.creationDate; - } else this.data.creationDate = null; - if (e.has("M")) { - this.setModificationDate(e.get("M")); - this.data.modificationDate = this.modificationDate; - } else this.data.modificationDate = null; - a = e.getRaw("Popup"); - if (e.has("C")) { - this.setColor(e.getArray("C")); - this.data.color = this.color; - } else this.data.color = null; - } else { - this.data.titleObj = this._title; - this.setCreationDate(t.get("CreationDate")); - this.data.creationDate = this.creationDate; - a = t.getRaw("Popup"); - t.has("C") || (this.data.color = null); - } - this.data.popupRef = a instanceof s.Ref ? a.toString() : null; - t.has("RC") && - (this.data.richText = b.XFAFactory.getRichTextAsHtml( - t.get("RC"), - )); - } - setCreationDate(e) { - this.creationDate = "string" == typeof e ? e : null; - } - _setDefaultAppearance({ - xref: e, - extra: t, - strokeColor: a, - fillColor: r, - blendMode: n, - strokeAlpha: i, - fillAlpha: c, - pointsCallback: l, - }) { - let h = Number.MAX_VALUE, - u = Number.MAX_VALUE, - d = Number.MIN_VALUE, - f = Number.MIN_VALUE; - const g = ["q"]; - t && g.push(t); - a && g.push(`${a[0]} ${a[1]} ${a[2]} RG`); - r && g.push(`${r[0]} ${r[1]} ${r[2]} rg`); - let p = this.data.quadPoints; - p || - (p = [ - [ - { x: this.rectangle[0], y: this.rectangle[3] }, - { x: this.rectangle[2], y: this.rectangle[3] }, - { x: this.rectangle[0], y: this.rectangle[1] }, - { x: this.rectangle[2], y: this.rectangle[1] }, - ], - ]); - for (const e of p) { - const [t, a, r, n] = l(g, e); - h = Math.min(h, t); - d = Math.max(d, a); - u = Math.min(u, r); - f = Math.max(f, n); - } - g.push("Q"); - const m = new s.Dict(e), - b = new s.Dict(e); - b.set("Subtype", s.Name.get("Form")); - const y = new o.StringStream(g.join(" ")); - y.dict = b; - m.set("Fm0", y); - const w = new s.Dict(e); - n && w.set("BM", s.Name.get(n)); - "number" == typeof i && w.set("CA", i); - "number" == typeof c && w.set("ca", c); - const S = new s.Dict(e); - S.set("GS0", w); - const x = new s.Dict(e); - x.set("ExtGState", S); - x.set("XObject", m); - const C = new s.Dict(e); - C.set("Resources", x); - const k = (this.data.rect = [h, u, d, f]); - C.set("BBox", k); - this.appearance = new o.StringStream("/GS0 gs /Fm0 Do"); - this.appearance.dict = C; - this._streams.push(this.appearance, y); - } - static async createNewAnnotation(e, t, a, r) { - const n = (t.ref ||= e.getNewTemporaryRef()), - i = await this.createNewAppearanceStream(t, e, r), - s = []; - let o; - if (i) { - const r = e.getNewTemporaryRef(); - o = this.createNewDict(t, e, { apRef: r }); - await (0, m.writeObject)(r, i, s, e); - a.push({ ref: r, data: s.join("") }); - } else o = this.createNewDict(t, e, {}); - Number.isInteger(t.parentTreeId) && - o.set("StructParent", t.parentTreeId); - s.length = 0; - await (0, m.writeObject)(n, o, s, e); - return { ref: n, data: s.join("") }; - } - static async createNewPrintAnnotation(e, t, a, r) { - const n = await this.createNewAppearanceStream(a, t, r), - i = this.createNewDict(a, t, { ap: n }), - s = new this.prototype.constructor({ - dict: i, - xref: t, - annotationGlobals: e, - evaluatorOptions: r.evaluatorOptions, - }); - a.ref && (s.ref = s.refToReplace = a.ref); - return s; - } - } - t.MarkupAnnotation = MarkupAnnotation; - class WidgetAnnotation extends Annotation { - constructor(e) { - super(e); - const { dict: t, xref: a, annotationGlobals: i } = e, - o = this.data; - this._needAppearances = e.needAppearances; - o.annotationType = r.AnnotationType.WIDGET; - void 0 === o.fieldName && - (o.fieldName = this._constructFieldName(t)); - void 0 === o.actions && - (o.actions = (0, n.collectActions)( - a, - t, - r.AnnotationActionEventType, - )); - let c = (0, n.getInheritableProperty)({ - dict: t, - key: "V", - getArray: !0, - }); - o.fieldValue = this._decodeFormValue(c); - const l = (0, n.getInheritableProperty)({ - dict: t, - key: "DV", - getArray: !0, - }); - o.defaultFieldValue = this._decodeFormValue(l); - if (void 0 === c && i.xfaDatasets) { - const e = this._title.str; - if (e) { - this._hasValueFromXFA = !0; - o.fieldValue = c = i.xfaDatasets.getValue(e); - } - } - void 0 === c && - null !== o.defaultFieldValue && - (o.fieldValue = o.defaultFieldValue); - o.alternativeText = (0, r.stringToPDFString)(t.get("TU") || ""); - this.setDefaultAppearance(e); - o.hasAppearance ||= - this._needAppearances && - void 0 !== o.fieldValue && - null !== o.fieldValue; - const h = (0, n.getInheritableProperty)({ dict: t, key: "FT" }); - o.fieldType = h instanceof s.Name ? h.name : null; - const u = (0, n.getInheritableProperty)({ dict: t, key: "DR" }), - d = i.acroForm.get("DR"), - f = this.appearance?.dict.get("Resources"); - this._fieldResources = { - localResources: u, - acroFormResources: d, - appearanceResources: f, - mergedResources: s.Dict.merge({ - xref: a, - dictArray: [u, f, d], - mergeSubDicts: !0, - }), - }; - o.fieldFlags = (0, n.getInheritableProperty)({ - dict: t, - key: "Ff", - }); - (!Number.isInteger(o.fieldFlags) || o.fieldFlags < 0) && - (o.fieldFlags = 0); - o.readOnly = this.hasFieldFlag(r.AnnotationFieldFlag.READONLY); - o.required = this.hasFieldFlag(r.AnnotationFieldFlag.REQUIRED); - o.hidden = - this._hasFlag(o.annotationFlags, r.AnnotationFlag.HIDDEN) || - this._hasFlag(o.annotationFlags, r.AnnotationFlag.NOVIEW); - } - _decodeFormValue(e) { - return Array.isArray(e) - ? e - .filter((e) => "string" == typeof e) - .map((e) => (0, r.stringToPDFString)(e)) - : e instanceof s.Name - ? (0, r.stringToPDFString)(e.name) - : "string" == typeof e - ? (0, r.stringToPDFString)(e) - : null; - } - hasFieldFlag(e) { - return !!(this.data.fieldFlags & e); - } - _isViewable(e) { - return !this._hasFlag(e, r.AnnotationFlag.INVISIBLE); - } - mustBeViewed(e, t) { - return t - ? this.viewable - : super.mustBeViewed(e, t) && - !this._hasFlag(this.flags, r.AnnotationFlag.NOVIEW); - } - getRotationMatrix(e) { - let t = e?.get(this.data.id)?.rotation; - void 0 === t && (t = this.rotation); - if (0 === t) return r.IDENTITY_MATRIX; - const a = this.data.rect[2] - this.data.rect[0], - i = this.data.rect[3] - this.data.rect[1]; - return (0, n.getRotationMatrix)(t, a, i); - } - getBorderAndBackgroundAppearances(e) { - let t = e?.get(this.data.id)?.rotation; - void 0 === t && (t = this.rotation); - if (!this.backgroundColor && !this.borderColor) return ""; - const a = this.data.rect[2] - this.data.rect[0], - r = this.data.rect[3] - this.data.rect[1], - n = - 0 === t || 180 === t - ? `0 0 ${a} ${r} re` - : `0 0 ${r} ${a} re`; - let s = ""; - this.backgroundColor && - (s = `${(0, i.getPdfColor)(this.backgroundColor, !0)} ${n} f `); - if (this.borderColor) { - s += `${this.borderStyle.width || 1} w ${(0, i.getPdfColor)(this.borderColor, !1)} ${n} S `; - } - return s; - } - async getOperatorList(e, t, a, n, i) { - if ( - n && - !(this instanceof SignatureWidgetAnnotation) && - !this.data.noHTML && - !this.data.hasOwnCanvas - ) - return { - opList: new p.OperatorList(), - separateForm: !0, - separateCanvas: !1, - }; - if (!this._hasText) return super.getOperatorList(e, t, a, n, i); - const s = await this._getAppearance(e, t, a, i); - if (this.appearance && null === s) - return super.getOperatorList(e, t, a, n, i); - const c = new p.OperatorList(); - if (!this._defaultAppearance || null === s) - return { opList: c, separateForm: !1, separateCanvas: !1 }; - const l = !!( - this.data.hasOwnCanvas && a & r.RenderingIntentFlag.DISPLAY - ), - h = [ - 0, - 0, - this.data.rect[2] - this.data.rect[0], - this.data.rect[3] - this.data.rect[1], - ], - u = getTransformMatrix(this.data.rect, h, [1, 0, 0, 1, 0, 0]); - let d; - this.oc && (d = await e.parseMarkedContentProps(this.oc, null)); - void 0 !== d && c.addOp(r.OPS.beginMarkedContentProps, ["OC", d]); - c.addOp(r.OPS.beginAnnotation, [ - this.data.id, - this.data.rect, - u, - this.getRotationMatrix(i), - l, - ]); - const f = new o.StringStream(s); - await e.getOperatorList({ - stream: f, - task: t, - resources: this._fieldResources.mergedResources, - operatorList: c, - }); - c.addOp(r.OPS.endAnnotation, []); - void 0 !== d && c.addOp(r.OPS.endMarkedContent, []); - return { opList: c, separateForm: !1, separateCanvas: l }; - } - _getMKDict(e) { - const t = new s.Dict(null); - e && t.set("R", e); - this.borderColor && - t.set("BC", getPdfColorArray(this.borderColor)); - this.backgroundColor && - t.set("BG", getPdfColorArray(this.backgroundColor)); - return t.size > 0 ? t : null; - } - amendSavedDict(e, t) {} - async save(e, t, a) { - const i = a?.get(this.data.id); - let c = i?.value, - l = i?.rotation; - if (c === this.data.fieldValue || void 0 === c) { - if (!this._hasValueFromXFA && void 0 === l) return null; - c ||= this.data.fieldValue; - } - if ( - void 0 === l && - !this._hasValueFromXFA && - Array.isArray(c) && - Array.isArray(this.data.fieldValue) && - c.length === this.data.fieldValue.length && - c.every((e, t) => e === this.data.fieldValue[t]) - ) - return null; - void 0 === l && (l = this.rotation); - let h = null; - if (!this._needAppearances) { - h = await this._getAppearance( - e, - t, - r.RenderingIntentFlag.SAVE, - a, - ); - if (null === h) return null; - } - let u = !1; - if (h?.needAppearances) { - u = !0; - h = null; - } - const { xref: d } = e, - f = d.fetchIfRef(this.ref); - if (!(f instanceof s.Dict)) return null; - const g = new s.Dict(d); - for (const e of f.getKeys()) "AP" !== e && g.set(e, f.getRaw(e)); - const p = { path: this.data.fieldName, value: c }, - encoder = (e) => - (0, n.isAscii)(e) ? e : (0, n.stringToUTF16String)(e, !0); - g.set("V", Array.isArray(c) ? c.map(encoder) : encoder(c)); - this.amendSavedDict(a, g); - const b = this._getMKDict(l); - b && g.set("MK", b); - const y = [], - w = [{ ref: this.ref, data: "", xfa: p, needAppearances: u }]; - if (null !== h) { - const e = d.getNewTemporaryRef(), - t = new s.Dict(d); - g.set("AP", t); - t.set("N", e); - const n = this._getSaveFieldResources(d), - i = new o.StringStream(h), - c = (i.dict = new s.Dict(d)); - c.set("Subtype", s.Name.get("Form")); - c.set("Resources", n); - c.set("BBox", [ - 0, - 0, - this.data.rect[2] - this.data.rect[0], - this.data.rect[3] - this.data.rect[1], - ]); - const l = this.getRotationMatrix(a); - l !== r.IDENTITY_MATRIX && c.set("Matrix", l); - await (0, m.writeObject)(e, i, y, d); - w.push({ - ref: e, - data: y.join(""), - xfa: null, - needAppearances: !1, - }); - y.length = 0; - } - g.set("M", `D:${(0, r.getModificationDate)()}`); - await (0, m.writeObject)(this.ref, g, y, d); - w[0].data = y.join(""); - return w; - } - async _getAppearance(e, t, a, s) { - if (this.hasFieldFlag(r.AnnotationFieldFlag.PASSWORD)) - return null; - const o = s?.get(this.data.id); - let c, l; - if (o) { - c = o.formattedValue || o.value; - l = o.rotation; - } - if ( - void 0 === l && - void 0 === c && - !this._needAppearances && - (!this._hasValueFromXFA || this.appearance) - ) - return null; - const h = this.getBorderAndBackgroundAppearances(s); - if (void 0 === c) { - c = this.data.fieldValue; - if (!c) return `/Tx BMC q ${h}Q EMC`; - } - Array.isArray(c) && 1 === c.length && (c = c[0]); - (0, r.assert)( - "string" == typeof c, - "Expected `value` to be a string.", - ); - c = c.trim(); - if (this.data.combo) { - const e = this.data.options.find( - ({ exportValue: e }) => c === e, - ); - c = e?.displayValue || c; - } - if ("" === c) return `/Tx BMC q ${h}Q EMC`; - void 0 === l && (l = this.rotation); - let u, - d = -1; - if (this.data.multiLine) { - u = c.split(/\r\n?|\n/).map((e) => e.normalize("NFC")); - d = u.length; - } else u = [c.replace(/\r\n?|\n/, "").normalize("NFC")]; - let f = this.data.rect[3] - this.data.rect[1], - g = this.data.rect[2] - this.data.rect[0]; - (90 !== l && 270 !== l) || ([g, f] = [f, g]); - this._defaultAppearance || - (this.data.defaultAppearanceData = (0, - i.parseDefaultAppearance)( - (this._defaultAppearance = "/Helvetica 0 Tf 0 g"), - )); - let p, - m, - b, - y = await WidgetAnnotation._getFontData( - e, - t, - this.data.defaultAppearanceData, - this._fieldResources.mergedResources, - ); - const w = []; - let S = !1; - for (const e of u) { - const t = y.encodeString(e); - t.length > 1 && (S = !0); - w.push(t.join("")); - } - if (S && a & r.RenderingIntentFlag.SAVE) - return { needAppearances: !0 }; - if (S && this._isOffscreenCanvasSupported) { - const a = this.data.comb ? "monospace" : "sans-serif", - r = new i.FakeUnicodeFont(e.xref, a), - s = r.createFontResources(u.join("")), - o = s.getRaw("Font"); - if (this._fieldResources.mergedResources.has("Font")) { - const e = this._fieldResources.mergedResources.get("Font"); - for (const t of o.getKeys()) e.set(t, o.getRaw(t)); - } else this._fieldResources.mergedResources.set("Font", o); - const l = r.fontName.name; - y = await WidgetAnnotation._getFontData( - e, - t, - { fontName: l, fontSize: 0 }, - s, - ); - for (let e = 0, t = w.length; e < t; e++) - w[e] = (0, n.stringToUTF16String)(u[e]); - const h = Object.assign( - Object.create(null), - this.data.defaultAppearanceData, - ); - this.data.defaultAppearanceData.fontSize = 0; - this.data.defaultAppearanceData.fontName = l; - [p, m, b] = this._computeFontSize(f - 2, g - 4, c, y, d); - this.data.defaultAppearanceData = h; - } else { - this._isOffscreenCanvasSupported || - (0, r.warn)( - "_getAppearance: OffscreenCanvas is not supported, annotation may not render correctly.", - ); - [p, m, b] = this._computeFontSize(f - 2, g - 4, c, y, d); - } - let x = y.descent; - x = isNaN(x) - ? r.BASELINE_FACTOR * b - : Math.max(r.BASELINE_FACTOR * b, Math.abs(x) * m); - const C = Math.min(Math.floor((f - m) / 2), 1), - k = this.data.textAlignment; - if (this.data.multiLine) - return this._getMultilineAppearance( - p, - w, - y, - m, - g, - f, - k, - 2, - C, - x, - b, - s, - ); - if (this.data.comb) - return this._getCombAppearance( - p, - y, - w[0], - m, - g, - f, - 2, - C, - x, - b, - s, - ); - const v = C + x; - if (0 === k || k > 2) - return ( - `/Tx BMC q ${h}BT ` + - p + - ` 1 0 0 1 ${(0, n.numberToString)(2)} ${(0, n.numberToString)(v)} Tm (${(0, n.escapeString)(w[0])}) Tj ET Q EMC` - ); - return ( - `/Tx BMC q ${h}BT ` + - p + - ` 1 0 0 1 0 0 Tm ${this._renderText(w[0], y, m, g, k, { shift: 0 }, 2, v)} ET Q EMC` - ); - } - static async _getFontData(e, t, a, r) { - const n = new p.OperatorList(), - i = { - font: null, - clone() { - return this; - }, - }, - { fontName: o, fontSize: c } = a; - await e.handleSetFont( - r, - [o && s.Name.get(o), c], - null, - n, - t, - i, - null, - ); - return i.font; - } - _getTextWidth(e, t) { - return t.charsToGlyphs(e).reduce((e, t) => e + t.width, 0) / 1e3; - } - _computeFontSize(e, t, a, n, s) { - let { fontSize: o } = this.data.defaultAppearanceData, - c = (o || 12) * r.LINE_FACTOR, - l = Math.round(e / c); - if (!o) { - const roundWithTwoDigits = (e) => Math.floor(100 * e) / 100; - if (-1 === s) { - const i = this._getTextWidth(a, n); - o = roundWithTwoDigits( - Math.min(e / r.LINE_FACTOR, i > t ? t / i : 1 / 0), - ); - l = 1; - } else { - const i = a.split(/\r\n?|\n/), - h = []; - for (const e of i) { - const t = n.encodeString(e).join(""), - a = n.charsToGlyphs(t), - r = n.getCharPositions(t); - h.push({ line: t, glyphs: a, positions: r }); - } - const isTooBig = (a) => { - let r = 0; - for (const i of h) { - r += this._splitLine(null, n, a, t, i).length * a; - if (r > e) return !0; - } - return !1; - }; - l = Math.max(l, s); - for (;;) { - c = e / l; - o = roundWithTwoDigits(c / r.LINE_FACTOR); - if (!isTooBig(o)) break; - l++; - } - } - const { fontName: h, fontColor: u } = - this.data.defaultAppearanceData; - this._defaultAppearance = (0, i.createDefaultAppearance)({ - fontSize: o, - fontName: h, - fontColor: u, - }); - } - return [this._defaultAppearance, o, e / l]; - } - _renderText(e, t, a, r, i, s, o, c) { - let l; - if (1 === i) { - l = (r - this._getTextWidth(e, t) * a) / 2; - } else if (2 === i) { - l = r - this._getTextWidth(e, t) * a - o; - } else l = o; - const h = (0, n.numberToString)(l - s.shift); - s.shift = l; - return `${h} ${(c = (0, n.numberToString)(c))} Td (${(0, n.escapeString)(e)}) Tj`; - } - _getSaveFieldResources(e) { - const { - localResources: t, - appearanceResources: a, - acroFormResources: r, - } = this._fieldResources, - n = this.data.defaultAppearanceData?.fontName; - if (!n) return t || s.Dict.empty; - for (const e of [t, a]) - if (e instanceof s.Dict) { - const t = e.get("Font"); - if (t instanceof s.Dict && t.has(n)) return e; - } - if (r instanceof s.Dict) { - const a = r.get("Font"); - if (a instanceof s.Dict && a.has(n)) { - const r = new s.Dict(e); - r.set(n, a.getRaw(n)); - const i = new s.Dict(e); - i.set("Font", r); - return s.Dict.merge({ - xref: e, - dictArray: [i, t], - mergeSubDicts: !0, - }); - } - } - return t || s.Dict.empty; - } - getFieldObject() { - return null; - } - } - class TextWidgetAnnotation extends WidgetAnnotation { - constructor(e) { - super(e); - this.data.hasOwnCanvas = this.data.readOnly && !this.data.noHTML; - this._hasText = !0; - const t = e.dict; - "string" != typeof this.data.fieldValue && - (this.data.fieldValue = ""); - let a = (0, n.getInheritableProperty)({ dict: t, key: "Q" }); - (!Number.isInteger(a) || a < 0 || a > 2) && (a = null); - this.data.textAlignment = a; - let i = (0, n.getInheritableProperty)({ dict: t, key: "MaxLen" }); - (!Number.isInteger(i) || i < 0) && (i = 0); - this.data.maxLen = i; - this.data.multiLine = this.hasFieldFlag( - r.AnnotationFieldFlag.MULTILINE, - ); - this.data.comb = - this.hasFieldFlag(r.AnnotationFieldFlag.COMB) && - !this.hasFieldFlag(r.AnnotationFieldFlag.MULTILINE) && - !this.hasFieldFlag(r.AnnotationFieldFlag.PASSWORD) && - !this.hasFieldFlag(r.AnnotationFieldFlag.FILESELECT) && - 0 !== this.data.maxLen; - this.data.doNotScroll = this.hasFieldFlag( - r.AnnotationFieldFlag.DONOTSCROLL, - ); - } - get hasTextContent() { - return !!this.appearance && !this._needAppearances; - } - _getCombAppearance(e, t, a, r, i, s, o, c, l, h, u) { - const d = i / this.data.maxLen, - f = this.getBorderAndBackgroundAppearances(u), - g = [], - p = t.getCharPositions(a); - for (const [e, t] of p) - g.push(`(${(0, n.escapeString)(a.substring(e, t))}) Tj`); - const m = g.join(` ${(0, n.numberToString)(d)} 0 Td `); - return ( - `/Tx BMC q ${f}BT ` + - e + - ` 1 0 0 1 ${(0, n.numberToString)(o)} ${(0, n.numberToString)(c + l)} Tm ${m} ET Q EMC` - ); - } - _getMultilineAppearance(e, t, a, r, i, s, o, c, l, h, u, d) { - const f = [], - g = i - 2 * c, - p = { shift: 0 }; - for (let e = 0, n = t.length; e < n; e++) { - const n = t[e], - s = this._splitLine(n, a, r, g); - for (let t = 0, n = s.length; t < n; t++) { - const n = s[t], - d = 0 === e && 0 === t ? -l - (u - h) : -u; - f.push(this._renderText(n, a, r, i, o, p, c, d)); - } - } - const m = this.getBorderAndBackgroundAppearances(d), - b = f.join("\n"); - return ( - `/Tx BMC q ${m}BT ` + - e + - ` 1 0 0 1 0 ${(0, n.numberToString)(s)} Tm ${b} ET Q EMC` - ); - } - _splitLine(e, t, a, r, n = {}) { - e = n.line || e; - const i = n.glyphs || t.charsToGlyphs(e); - if (i.length <= 1) return [e]; - const s = n.positions || t.getCharPositions(e), - o = a / 1e3, - c = []; - let l = -1, - h = -1, - u = -1, - d = 0, - f = 0; - for (let t = 0, a = i.length; t < a; t++) { - const [a, n] = s[t], - g = i[t], - p = g.width * o; - if (" " === g.unicode) - if (f + p > r) { - c.push(e.substring(d, a)); - d = a; - f = p; - l = -1; - u = -1; - } else { - f += p; - l = a; - h = n; - u = t; - } - else if (f + p > r) - if (-1 !== l) { - c.push(e.substring(d, h)); - d = h; - t = u + 1; - l = -1; - f = 0; - } else { - c.push(e.substring(d, a)); - d = a; - f = p; - } - else f += p; - } - d < e.length && c.push(e.substring(d, e.length)); - return c; - } - getFieldObject() { - return { - id: this.data.id, - value: this.data.fieldValue, - defaultValue: this.data.defaultFieldValue || "", - multiline: this.data.multiLine, - password: this.hasFieldFlag(r.AnnotationFieldFlag.PASSWORD), - charLimit: this.data.maxLen, - comb: this.data.comb, - editable: !this.data.readOnly, - hidden: this.data.hidden, - name: this.data.fieldName, - rect: this.data.rect, - actions: this.data.actions, - page: this.data.pageIndex, - strokeColor: this.data.borderColor, - fillColor: this.data.backgroundColor, - rotation: this.rotation, - type: "text", - }; - } - } - class ButtonWidgetAnnotation extends WidgetAnnotation { - constructor(e) { - super(e); - this.checkedAppearance = null; - this.uncheckedAppearance = null; - this.data.checkBox = - !this.hasFieldFlag(r.AnnotationFieldFlag.RADIO) && - !this.hasFieldFlag(r.AnnotationFieldFlag.PUSHBUTTON); - this.data.radioButton = - this.hasFieldFlag(r.AnnotationFieldFlag.RADIO) && - !this.hasFieldFlag(r.AnnotationFieldFlag.PUSHBUTTON); - this.data.pushButton = this.hasFieldFlag( - r.AnnotationFieldFlag.PUSHBUTTON, - ); - this.data.isTooltipOnly = !1; - if (this.data.checkBox) this._processCheckBox(e); - else if (this.data.radioButton) this._processRadioButton(e); - else if (this.data.pushButton) { - this.data.hasOwnCanvas = !0; - this._processPushButton(e); - } else - (0, r.warn)("Invalid field flags for button widget annotation"); - } - async getOperatorList(e, t, a, n, i) { - if (this.data.pushButton) - return super.getOperatorList(e, t, a, !1, i); - let s = null, - o = null; - if (i) { - const e = i.get(this.data.id); - s = e ? e.value : null; - o = e ? e.rotation : null; - } - if (null === s && this.appearance) - return super.getOperatorList(e, t, a, n, i); - null == s && - (s = this.data.checkBox - ? this.data.fieldValue === this.data.exportValue - : this.data.fieldValue === this.data.buttonValue); - const c = s ? this.checkedAppearance : this.uncheckedAppearance; - if (c) { - const s = this.appearance, - l = c.dict.getArray("Matrix") || r.IDENTITY_MATRIX; - o && c.dict.set("Matrix", this.getRotationMatrix(i)); - this.appearance = c; - const h = super.getOperatorList(e, t, a, n, i); - this.appearance = s; - c.dict.set("Matrix", l); - return h; - } - return { - opList: new p.OperatorList(), - separateForm: !1, - separateCanvas: !1, - }; - } - async save(e, t, a) { - return this.data.checkBox - ? this._saveCheckbox(e, t, a) - : this.data.radioButton - ? this._saveRadioButton(e, t, a) - : null; - } - async _saveCheckbox(e, t, a) { - if (!a) return null; - const n = a.get(this.data.id); - let i = n?.rotation, - o = n?.value; - if (void 0 === i) { - if (void 0 === o) return null; - if ((this.data.fieldValue === this.data.exportValue) === o) - return null; - } - const c = e.xref.fetchIfRef(this.ref); - if (!(c instanceof s.Dict)) return null; - void 0 === i && (i = this.rotation); - void 0 === o && - (o = this.data.fieldValue === this.data.exportValue); - const l = { - path: this.data.fieldName, - value: o ? this.data.exportValue : "", - }, - h = s.Name.get(o ? this.data.exportValue : "Off"); - c.set("V", h); - c.set("AS", h); - c.set("M", `D:${(0, r.getModificationDate)()}`); - const u = this._getMKDict(i); - u && c.set("MK", u); - const d = []; - await (0, m.writeObject)(this.ref, c, d, e.xref); - return [{ ref: this.ref, data: d.join(""), xfa: l }]; - } - async _saveRadioButton(e, t, a) { - if (!a) return null; - const n = a.get(this.data.id); - let i = n?.rotation, - o = n?.value; - if (void 0 === i) { - if (void 0 === o) return null; - if ((this.data.fieldValue === this.data.buttonValue) === o) - return null; - } - const c = e.xref.fetchIfRef(this.ref); - if (!(c instanceof s.Dict)) return null; - void 0 === o && - (o = this.data.fieldValue === this.data.buttonValue); - void 0 === i && (i = this.rotation); - const l = { - path: this.data.fieldName, - value: o ? this.data.buttonValue : "", - }, - h = s.Name.get(o ? this.data.buttonValue : "Off"), - u = []; - let d = null; - if (o) - if (this.parent instanceof s.Ref) { - const t = e.xref.fetch(this.parent); - t.set("V", h); - await (0, m.writeObject)(this.parent, t, u, e.xref); - d = u.join(""); - u.length = 0; - } else this.parent instanceof s.Dict && this.parent.set("V", h); - c.set("AS", h); - c.set("M", `D:${(0, r.getModificationDate)()}`); - const f = this._getMKDict(i); - f && c.set("MK", f); - await (0, m.writeObject)(this.ref, c, u, e.xref); - const g = [{ ref: this.ref, data: u.join(""), xfa: l }]; - d && g.push({ ref: this.parent, data: d, xfa: null }); - return g; - } - _getDefaultCheckedAppearance(e, t) { - const a = this.data.rect[2] - this.data.rect[0], - i = this.data.rect[3] - this.data.rect[1], - c = [0, 0, a, i], - l = 0.8 * Math.min(a, i); - let h, u; - if ("check" === t) { - h = { width: 0.755 * l, height: 0.705 * l }; - u = "3"; - } else if ("disc" === t) { - h = { width: 0.791 * l, height: 0.705 * l }; - u = "l"; - } else - (0, r.unreachable)( - `_getDefaultCheckedAppearance - unsupported type: ${t}`, - ); - const d = `q BT /PdfJsZaDb ${l} Tf 0 g ${(0, n.numberToString)((a - h.width) / 2)} ${(0, n.numberToString)((i - h.height) / 2)} Td (${u}) Tj ET Q`, - f = new s.Dict(e.xref); - f.set("FormType", 1); - f.set("Subtype", s.Name.get("Form")); - f.set("Type", s.Name.get("XObject")); - f.set("BBox", c); - f.set("Matrix", [1, 0, 0, 1, 0, 0]); - f.set("Length", d.length); - const g = new s.Dict(e.xref), - p = new s.Dict(e.xref); - p.set("PdfJsZaDb", this.fallbackFontDict); - g.set("Font", p); - f.set("Resources", g); - this.checkedAppearance = new o.StringStream(d); - this.checkedAppearance.dict = f; - this._streams.push(this.checkedAppearance); - } - _processCheckBox(e) { - const t = e.dict.get("AP"); - if (!(t instanceof s.Dict)) return; - const a = t.get("N"); - if (!(a instanceof s.Dict)) return; - const r = this._decodeFormValue(e.dict.get("AS")); - "string" == typeof r && (this.data.fieldValue = r); - const n = - null !== this.data.fieldValue && - "Off" !== this.data.fieldValue - ? this.data.fieldValue - : "Yes", - i = a.getKeys(); - if (0 === i.length) i.push("Off", n); - else if (1 === i.length) - "Off" === i[0] ? i.push(n) : i.unshift("Off"); - else if (i.includes(n)) { - i.length = 0; - i.push("Off", n); - } else { - const e = i.find((e) => "Off" !== e); - i.length = 0; - i.push("Off", e); - } - i.includes(this.data.fieldValue) || - (this.data.fieldValue = "Off"); - this.data.exportValue = i[1]; - const o = a.get(this.data.exportValue); - this.checkedAppearance = o instanceof c.BaseStream ? o : null; - const l = a.get("Off"); - this.uncheckedAppearance = l instanceof c.BaseStream ? l : null; - this.checkedAppearance - ? this._streams.push(this.checkedAppearance) - : this._getDefaultCheckedAppearance(e, "check"); - this.uncheckedAppearance && - this._streams.push(this.uncheckedAppearance); - this._fallbackFontDict = this.fallbackFontDict; - null === this.data.defaultFieldValue && - (this.data.defaultFieldValue = "Off"); - } - _processRadioButton(e) { - this.data.fieldValue = this.data.buttonValue = null; - const t = e.dict.get("Parent"); - if (t instanceof s.Dict) { - this.parent = e.dict.getRaw("Parent"); - const a = t.get("V"); - a instanceof s.Name && - (this.data.fieldValue = this._decodeFormValue(a)); - } - const a = e.dict.get("AP"); - if (!(a instanceof s.Dict)) return; - const r = a.get("N"); - if (!(r instanceof s.Dict)) return; - for (const e of r.getKeys()) - if ("Off" !== e) { - this.data.buttonValue = this._decodeFormValue(e); - break; - } - const n = r.get(this.data.buttonValue); - this.checkedAppearance = n instanceof c.BaseStream ? n : null; - const i = r.get("Off"); - this.uncheckedAppearance = i instanceof c.BaseStream ? i : null; - this.checkedAppearance - ? this._streams.push(this.checkedAppearance) - : this._getDefaultCheckedAppearance(e, "disc"); - this.uncheckedAppearance && - this._streams.push(this.uncheckedAppearance); - this._fallbackFontDict = this.fallbackFontDict; - null === this.data.defaultFieldValue && - (this.data.defaultFieldValue = "Off"); - } - _processPushButton(e) { - const { dict: t, annotationGlobals: a } = e; - if (t.has("A") || t.has("AA") || this.data.alternativeText) { - this.data.isTooltipOnly = !t.has("A") && !t.has("AA"); - h.Catalog.parseDestDictionary({ - destDict: t, - resultObj: this.data, - docBaseUrl: a.baseUrl, - docAttachments: a.attachments, - }); - } else - (0, r.warn)( - "Push buttons without action dictionaries are not supported", - ); - } - getFieldObject() { - let e, - t = "button"; - if (this.data.checkBox) { - t = "checkbox"; - e = this.data.exportValue; - } else if (this.data.radioButton) { - t = "radiobutton"; - e = this.data.buttonValue; - } - return { - id: this.data.id, - value: this.data.fieldValue || "Off", - defaultValue: this.data.defaultFieldValue, - exportValues: e, - editable: !this.data.readOnly, - name: this.data.fieldName, - rect: this.data.rect, - hidden: this.data.hidden, - actions: this.data.actions, - page: this.data.pageIndex, - strokeColor: this.data.borderColor, - fillColor: this.data.backgroundColor, - rotation: this.rotation, - type: t, - }; - } - get fallbackFontDict() { - const e = new s.Dict(); - e.set("BaseFont", s.Name.get("ZapfDingbats")); - e.set("Type", s.Name.get("FallbackType")); - e.set("Subtype", s.Name.get("FallbackType")); - e.set("Encoding", s.Name.get("ZapfDingbatsEncoding")); - return (0, r.shadow)(this, "fallbackFontDict", e); - } - } - class ChoiceWidgetAnnotation extends WidgetAnnotation { - constructor(e) { - super(e); - const { dict: t, xref: a } = e; - this.indices = t.getArray("I"); - this.hasIndices = - Array.isArray(this.indices) && this.indices.length > 0; - this.data.options = []; - const i = (0, n.getInheritableProperty)({ dict: t, key: "Opt" }); - if (Array.isArray(i)) - for (let e = 0, t = i.length; e < t; e++) { - const t = a.fetchIfRef(i[e]), - r = Array.isArray(t); - this.data.options[e] = { - exportValue: this._decodeFormValue( - r ? a.fetchIfRef(t[0]) : t, - ), - displayValue: this._decodeFormValue( - r ? a.fetchIfRef(t[1]) : t, - ), - }; - } - if (this.hasIndices) { - this.data.fieldValue = []; - const e = this.data.options.length; - for (const t of this.indices) - Number.isInteger(t) && - t >= 0 && - t < e && - this.data.fieldValue.push(this.data.options[t].exportValue); - } else - "string" == typeof this.data.fieldValue - ? (this.data.fieldValue = [this.data.fieldValue]) - : this.data.fieldValue || (this.data.fieldValue = []); - this.data.combo = this.hasFieldFlag(r.AnnotationFieldFlag.COMBO); - this.data.multiSelect = this.hasFieldFlag( - r.AnnotationFieldFlag.MULTISELECT, - ); - this._hasText = !0; - } - getFieldObject() { - const e = this.data.combo ? "combobox" : "listbox", - t = - this.data.fieldValue.length > 0 - ? this.data.fieldValue[0] - : null; - return { - id: this.data.id, - value: t, - defaultValue: this.data.defaultFieldValue, - editable: !this.data.readOnly, - name: this.data.fieldName, - rect: this.data.rect, - numItems: this.data.fieldValue.length, - multipleSelection: this.data.multiSelect, - hidden: this.data.hidden, - actions: this.data.actions, - items: this.data.options, - page: this.data.pageIndex, - strokeColor: this.data.borderColor, - fillColor: this.data.backgroundColor, - rotation: this.rotation, - type: e, - }; - } - amendSavedDict(e, t) { - if (!this.hasIndices) return; - let a = e?.get(this.data.id)?.value; - Array.isArray(a) || (a = [a]); - const r = [], - { options: n } = this.data; - for (let e = 0, t = 0, i = n.length; e < i; e++) - if (n[e].exportValue === a[t]) { - r.push(e); - t += 1; - } - t.set("I", r); - } - async _getAppearance(e, t, a, n) { - if (this.data.combo) return super._getAppearance(e, t, a, n); - let s, o; - const c = n?.get(this.data.id); - if (c) { - o = c.rotation; - s = c.value; - } - if (void 0 === o && void 0 === s && !this._needAppearances) - return null; - void 0 === s - ? (s = this.data.fieldValue) - : Array.isArray(s) || (s = [s]); - let l = this.data.rect[3] - this.data.rect[1], - h = this.data.rect[2] - this.data.rect[0]; - (90 !== o && 270 !== o) || ([h, l] = [l, h]); - const u = this.data.options.length, - d = []; - for (let e = 0; e < u; e++) { - const { exportValue: t } = this.data.options[e]; - s.includes(t) && d.push(e); - } - this._defaultAppearance || - (this.data.defaultAppearanceData = (0, - i.parseDefaultAppearance)( - (this._defaultAppearance = "/Helvetica 0 Tf 0 g"), - )); - const f = await WidgetAnnotation._getFontData( - e, - t, - this.data.defaultAppearanceData, - this._fieldResources.mergedResources, - ); - let g, - { fontSize: p } = this.data.defaultAppearanceData; - if (p) g = this._defaultAppearance; - else { - const e = (l - 1) / u; - let t, - a = -1; - for (const { displayValue: e } of this.data.options) { - const r = this._getTextWidth(e, f); - if (r > a) { - a = r; - t = e; - } - } - [g, p] = this._computeFontSize(e, h - 4, t, f, -1); - } - const m = p * r.LINE_FACTOR, - b = (m - p) / 2, - y = Math.floor(l / m); - let w = 0; - if (d.length > 0) { - const e = Math.min(...d), - t = Math.max(...d); - w = Math.max(0, t - y + 1); - w > e && (w = e); - } - const S = Math.min(w + y + 1, u), - x = ["/Tx BMC q", `1 1 ${h} ${l} re W n`]; - if (d.length) { - x.push("0.600006 0.756866 0.854904 rg"); - for (const e of d) - w <= e && - e < S && - x.push(`1 ${l - (e - w + 1) * m} ${h} ${m} re f`); - } - x.push("BT", g, `1 0 0 1 0 ${l} Tm`); - const C = { shift: 0 }; - for (let e = w; e < S; e++) { - const { displayValue: t } = this.data.options[e], - a = e === w ? b : 0; - x.push(this._renderText(t, f, p, h, 0, C, 2, -m + a)); - } - x.push("ET Q EMC"); - return x.join("\n"); - } - } - class SignatureWidgetAnnotation extends WidgetAnnotation { - constructor(e) { - super(e); - this.data.fieldValue = null; - this.data.hasOwnCanvas = this.data.noRotate; - } - getFieldObject() { - return { - id: this.data.id, - value: null, - page: this.data.pageIndex, - type: "signature", - }; - } - } - class TextAnnotation extends MarkupAnnotation { - constructor(e) { - super(e); - this.data.noRotate = !0; - this.data.hasOwnCanvas = this.data.noRotate; - const { dict: t } = e; - this.data.annotationType = r.AnnotationType.TEXT; - if (this.data.hasAppearance) this.data.name = "NoIcon"; - else { - this.data.rect[1] = this.data.rect[3] - 22; - this.data.rect[2] = this.data.rect[0] + 22; - this.data.name = t.has("Name") ? t.get("Name").name : "Note"; - } - if (t.has("State")) { - this.data.state = t.get("State") || null; - this.data.stateModel = t.get("StateModel") || null; - } else { - this.data.state = null; - this.data.stateModel = null; - } - } - } - class LinkAnnotation extends Annotation { - constructor(e) { - super(e); - const { dict: t, annotationGlobals: a } = e; - this.data.annotationType = r.AnnotationType.LINK; - const n = getQuadPoints(t, this.rectangle); - n && (this.data.quadPoints = n); - this.data.borderColor ||= this.data.color; - h.Catalog.parseDestDictionary({ - destDict: t, - resultObj: this.data, - docBaseUrl: a.baseUrl, - docAttachments: a.attachments, - }); - } - } - class PopupAnnotation extends Annotation { - constructor(e) { - super(e); - const { dict: t } = e; - this.data.annotationType = r.AnnotationType.POPUP; - (this.data.rect[0] !== this.data.rect[2] && - this.data.rect[1] !== this.data.rect[3]) || - (this.data.rect = null); - let a = t.get("Parent"); - if (!a) { - (0, r.warn)( - "Popup annotation has a missing or invalid parent annotation.", - ); - return; - } - const n = a.getArray("Rect"); - this.data.parentRect = - Array.isArray(n) && 4 === n.length - ? r.Util.normalizeRect(n) - : null; - const i = a.get("RT"); - (0, s.isName)(i, r.AnnotationReplyType.GROUP) && - (a = a.get("IRT")); - if (a.has("M")) { - this.setModificationDate(a.get("M")); - this.data.modificationDate = this.modificationDate; - } else this.data.modificationDate = null; - if (a.has("C")) { - this.setColor(a.getArray("C")); - this.data.color = this.color; - } else this.data.color = null; - if (!this.viewable) { - const e = a.get("F"); - this._isViewable(e) && this.setFlags(e); - } - this.setTitle(a.get("T")); - this.data.titleObj = this._title; - this.setContents(a.get("Contents")); - this.data.contentsObj = this._contents; - a.has("RC") && - (this.data.richText = b.XFAFactory.getRichTextAsHtml( - a.get("RC"), - )); - this.data.open = !!t.get("Open"); - } - } - t.PopupAnnotation = PopupAnnotation; - class FreeTextAnnotation extends MarkupAnnotation { - constructor(e) { - super(e); - this.data.hasOwnCanvas = !0; - const { evaluatorOptions: t, xref: a } = e; - this.data.annotationType = r.AnnotationType.FREETEXT; - this.setDefaultAppearance(e); - if (this.appearance) { - const { fontColor: e, fontSize: r } = (0, - i.parseAppearanceStream)(this.appearance, t, a); - this.data.defaultAppearanceData.fontColor = e; - this.data.defaultAppearanceData.fontSize = r || 10; - } else if (this._isOffscreenCanvasSupported) { - const t = e.dict.get("CA"), - r = new i.FakeUnicodeFont(a, "sans-serif"); - this.data.defaultAppearanceData.fontSize ||= 10; - const { fontColor: n, fontSize: s } = - this.data.defaultAppearanceData; - this.appearance = r.createAppearance( - this._contents.str, - this.rectangle, - this.rotation, - s, - n, - t, - ); - this._streams.push( - this.appearance, - i.FakeUnicodeFont.toUnicodeStream, - ); - } else - (0, r.warn)( - "FreeTextAnnotation: OffscreenCanvas is not supported, annotation may not render correctly.", - ); - } - get hasTextContent() { - return !!this.appearance; - } - static createNewDict(e, t, { apRef: a, ap: o }) { - const { - color: c, - fontSize: l, - rect: h, - rotation: u, - user: d, - value: f, - } = e, - g = new s.Dict(t); - g.set("Type", s.Name.get("Annot")); - g.set("Subtype", s.Name.get("FreeText")); - g.set("CreationDate", `D:${(0, r.getModificationDate)()}`); - g.set("Rect", h); - const p = `/Helv ${l} Tf ${(0, i.getPdfColor)(c, !0)}`; - g.set("DA", p); - g.set( - "Contents", - (0, n.isAscii)(f) ? f : (0, n.stringToUTF16String)(f, !0), - ); - g.set("F", 4); - g.set("Border", [0, 0, 0]); - g.set("Rotate", u); - d && - g.set( - "T", - (0, n.isAscii)(d) ? d : (0, n.stringToUTF16String)(d, !0), - ); - if (a || o) { - const e = new s.Dict(t); - g.set("AP", e); - a ? e.set("N", a) : e.set("N", o); - } - return g; - } - static async createNewAppearanceStream(e, t, a) { - const { baseFontRef: c, evaluator: l, task: h } = a, - { color: u, fontSize: d, rect: f, rotation: g, value: p } = e, - m = new s.Dict(t), - b = new s.Dict(t); - if (c) b.set("Helv", c); - else { - const e = new s.Dict(t); - e.set("BaseFont", s.Name.get("Helvetica")); - e.set("Type", s.Name.get("Font")); - e.set("Subtype", s.Name.get("Type1")); - e.set("Encoding", s.Name.get("WinAnsiEncoding")); - b.set("Helv", e); - } - m.set("Font", b); - const y = await WidgetAnnotation._getFontData( - l, - h, - { fontName: "Helv", fontSize: d }, - m, - ), - [w, S, x, C] = f; - let k = x - w, - v = C - S; - g % 180 != 0 && ([k, v] = [v, k]); - const F = p.split("\n"), - O = d / 1e3; - let T = -1 / 0; - const M = []; - for (let e of F) { - const t = y.encodeString(e); - if (t.length > 1) return null; - e = t.join(""); - M.push(e); - let a = 0; - const r = y.charsToGlyphs(e); - for (const e of r) a += e.width * O; - T = Math.max(T, a); - } - let D = 1; - T > k && (D = k / T); - let E = 1; - const N = r.LINE_FACTOR * d, - R = (r.LINE_FACTOR - r.LINE_DESCENT_FACTOR) * d, - L = N * F.length; - L > v && (E = v / L); - const $ = d * Math.min(D, E); - let _, j, U; - switch (g) { - case 0: - U = [1, 0, 0, 1]; - j = [f[0], f[1], k, v]; - _ = [f[0], f[3] - R]; - break; - case 90: - U = [0, 1, -1, 0]; - j = [f[1], -f[2], k, v]; - _ = [f[1], -f[0] - R]; - break; - case 180: - U = [-1, 0, 0, -1]; - j = [-f[2], -f[3], k, v]; - _ = [-f[2], -f[1] - R]; - break; - case 270: - U = [0, -1, 1, 0]; - j = [-f[3], f[0], k, v]; - _ = [-f[3], f[2] - R]; - } - const X = [ - "q", - `${U.join(" ")} 0 0 cm`, - `${j.join(" ")} re W n`, - "BT", - `${(0, i.getPdfColor)(u, !0)}`, - `0 Tc /Helv ${(0, n.numberToString)($)} Tf`, - ]; - X.push(`${_.join(" ")} Td (${(0, n.escapeString)(M[0])}) Tj`); - const H = (0, n.numberToString)(N); - for (let e = 1, t = M.length; e < t; e++) { - const t = M[e]; - X.push(`0 -${H} Td (${(0, n.escapeString)(t)}) Tj`); - } - X.push("ET", "Q"); - const q = X.join("\n"), - z = new s.Dict(t); - z.set("FormType", 1); - z.set("Subtype", s.Name.get("Form")); - z.set("Type", s.Name.get("XObject")); - z.set("BBox", f); - z.set("Resources", m); - z.set("Matrix", [1, 0, 0, 1, -f[0], -f[1]]); - const W = new o.StringStream(q); - W.dict = z; - return W; - } - } - class LineAnnotation extends MarkupAnnotation { - constructor(e) { - super(e); - const { dict: t, xref: a } = e; - this.data.annotationType = r.AnnotationType.LINE; - this.data.hasOwnCanvas = this.data.noRotate; - const n = t.getArray("L"); - this.data.lineCoordinates = r.Util.normalizeRect(n); - this.setLineEndings(t.getArray("LE")); - this.data.lineEndings = this.lineEndings; - if (!this.appearance) { - const e = this.color ? getPdfColorArray(this.color) : [0, 0, 0], - i = t.get("CA"), - s = getRgbColor(t.getArray("IC"), null), - o = s ? getPdfColorArray(s) : null, - c = o ? i : null, - l = this.borderStyle.width || 1, - h = 2 * l, - u = [ - this.data.lineCoordinates[0] - h, - this.data.lineCoordinates[1] - h, - this.data.lineCoordinates[2] + h, - this.data.lineCoordinates[3] + h, - ]; - r.Util.intersect(this.rectangle, u) || (this.rectangle = u); - this._setDefaultAppearance({ - xref: a, - extra: `${l} w`, - strokeColor: e, - fillColor: o, - strokeAlpha: i, - fillAlpha: c, - pointsCallback: (e, t) => { - e.push(`${n[0]} ${n[1]} m`, `${n[2]} ${n[3]} l`, "S"); - return [t[0].x - l, t[1].x + l, t[3].y - l, t[1].y + l]; - }, - }); - } - } - } - class SquareAnnotation extends MarkupAnnotation { - constructor(e) { - super(e); - const { dict: t, xref: a } = e; - this.data.annotationType = r.AnnotationType.SQUARE; - this.data.hasOwnCanvas = this.data.noRotate; - if (!this.appearance) { - const e = this.color ? getPdfColorArray(this.color) : [0, 0, 0], - r = t.get("CA"), - n = getRgbColor(t.getArray("IC"), null), - i = n ? getPdfColorArray(n) : null, - s = i ? r : null; - if (0 === this.borderStyle.width && !i) return; - this._setDefaultAppearance({ - xref: a, - extra: `${this.borderStyle.width} w`, - strokeColor: e, - fillColor: i, - strokeAlpha: r, - fillAlpha: s, - pointsCallback: (e, t) => { - const a = t[2].x + this.borderStyle.width / 2, - r = t[2].y + this.borderStyle.width / 2, - n = t[3].x - t[2].x - this.borderStyle.width, - s = t[1].y - t[3].y - this.borderStyle.width; - e.push(`${a} ${r} ${n} ${s} re`); - i ? e.push("B") : e.push("S"); - return [t[0].x, t[1].x, t[3].y, t[1].y]; - }, - }); - } - } - } - class CircleAnnotation extends MarkupAnnotation { - constructor(e) { - super(e); - const { dict: t, xref: a } = e; - this.data.annotationType = r.AnnotationType.CIRCLE; - if (!this.appearance) { - const e = this.color ? getPdfColorArray(this.color) : [0, 0, 0], - r = t.get("CA"), - n = getRgbColor(t.getArray("IC"), null), - i = n ? getPdfColorArray(n) : null, - s = i ? r : null; - if (0 === this.borderStyle.width && !i) return; - const o = (4 / 3) * Math.tan(Math.PI / 8); - this._setDefaultAppearance({ - xref: a, - extra: `${this.borderStyle.width} w`, - strokeColor: e, - fillColor: i, - strokeAlpha: r, - fillAlpha: s, - pointsCallback: (e, t) => { - const a = t[0].x + this.borderStyle.width / 2, - r = t[0].y - this.borderStyle.width / 2, - n = t[3].x - this.borderStyle.width / 2, - s = t[3].y + this.borderStyle.width / 2, - c = a + (n - a) / 2, - l = r + (s - r) / 2, - h = ((n - a) / 2) * o, - u = ((s - r) / 2) * o; - e.push( - `${c} ${s} m`, - `${c + h} ${s} ${n} ${l + u} ${n} ${l} c`, - `${n} ${l - u} ${c + h} ${r} ${c} ${r} c`, - `${c - h} ${r} ${a} ${l - u} ${a} ${l} c`, - `${a} ${l + u} ${c - h} ${s} ${c} ${s} c`, - "h", - ); - i ? e.push("B") : e.push("S"); - return [t[0].x, t[1].x, t[3].y, t[1].y]; - }, - }); - } - } - } - class PolylineAnnotation extends MarkupAnnotation { - constructor(e) { - super(e); - const { dict: t, xref: a } = e; - this.data.annotationType = r.AnnotationType.POLYLINE; - this.data.hasOwnCanvas = this.data.noRotate; - this.data.vertices = []; - if (!(this instanceof PolygonAnnotation)) { - this.setLineEndings(t.getArray("LE")); - this.data.lineEndings = this.lineEndings; - } - const n = t.getArray("Vertices"); - if (Array.isArray(n)) { - for (let e = 0, t = n.length; e < t; e += 2) - this.data.vertices.push({ x: n[e], y: n[e + 1] }); - if (!this.appearance) { - const e = this.color - ? getPdfColorArray(this.color) - : [0, 0, 0], - n = t.get("CA"), - i = this.borderStyle.width || 1, - s = 2 * i, - o = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; - for (const e of this.data.vertices) { - o[0] = Math.min(o[0], e.x - s); - o[1] = Math.min(o[1], e.y - s); - o[2] = Math.max(o[2], e.x + s); - o[3] = Math.max(o[3], e.y + s); - } - r.Util.intersect(this.rectangle, o) || (this.rectangle = o); - this._setDefaultAppearance({ - xref: a, - extra: `${i} w`, - strokeColor: e, - strokeAlpha: n, - pointsCallback: (e, t) => { - const a = this.data.vertices; - for (let t = 0, r = a.length; t < r; t++) - e.push(`${a[t].x} ${a[t].y} ${0 === t ? "m" : "l"}`); - e.push("S"); - return [t[0].x, t[1].x, t[3].y, t[1].y]; - }, - }); - } - } - } - } - class PolygonAnnotation extends PolylineAnnotation { - constructor(e) { - super(e); - this.data.annotationType = r.AnnotationType.POLYGON; - } - } - class CaretAnnotation extends MarkupAnnotation { - constructor(e) { - super(e); - this.data.annotationType = r.AnnotationType.CARET; - } - } - class InkAnnotation extends MarkupAnnotation { - constructor(e) { - super(e); - this.data.hasOwnCanvas = this.data.noRotate; - const { dict: t, xref: a } = e; - this.data.annotationType = r.AnnotationType.INK; - this.data.inkLists = []; - const n = t.getArray("InkList"); - if (Array.isArray(n)) { - for (let e = 0, t = n.length; e < t; ++e) { - this.data.inkLists.push([]); - for (let t = 0, r = n[e].length; t < r; t += 2) - this.data.inkLists[e].push({ - x: a.fetchIfRef(n[e][t]), - y: a.fetchIfRef(n[e][t + 1]), - }); - } - if (!this.appearance) { - const e = this.color - ? getPdfColorArray(this.color) - : [0, 0, 0], - n = t.get("CA"), - i = this.borderStyle.width || 1, - s = 2 * i, - o = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; - for (const e of this.data.inkLists) - for (const t of e) { - o[0] = Math.min(o[0], t.x - s); - o[1] = Math.min(o[1], t.y - s); - o[2] = Math.max(o[2], t.x + s); - o[3] = Math.max(o[3], t.y + s); - } - r.Util.intersect(this.rectangle, o) || (this.rectangle = o); - this._setDefaultAppearance({ - xref: a, - extra: `${i} w`, - strokeColor: e, - strokeAlpha: n, - pointsCallback: (e, t) => { - for (const t of this.data.inkLists) { - for (let a = 0, r = t.length; a < r; a++) - e.push(`${t[a].x} ${t[a].y} ${0 === a ? "m" : "l"}`); - e.push("S"); - } - return [t[0].x, t[1].x, t[3].y, t[1].y]; - }, - }); - } - } - } - static createNewDict(e, t, { apRef: a, ap: n }) { - const { - color: i, - opacity: o, - paths: c, - rect: l, - rotation: h, - thickness: u, - } = e, - d = new s.Dict(t); - d.set("Type", s.Name.get("Annot")); - d.set("Subtype", s.Name.get("Ink")); - d.set("CreationDate", `D:${(0, r.getModificationDate)()}`); - d.set("Rect", l); - d.set( - "InkList", - c.map((e) => e.points), - ); - d.set("F", 4); - d.set("Rotate", h); - const f = new s.Dict(t); - d.set("BS", f); - f.set("W", u); - d.set( - "C", - Array.from(i, (e) => e / 255), - ); - d.set("CA", o); - const g = new s.Dict(t); - d.set("AP", g); - a ? g.set("N", a) : g.set("N", n); - return d; - } - static async createNewAppearanceStream(e, t, a) { - const { - color: r, - rect: c, - paths: l, - thickness: h, - opacity: u, - } = e, - d = [`${h} w 1 J 1 j`, `${(0, i.getPdfColor)(r, !1)}`]; - 1 !== u && d.push("/R0 gs"); - const f = []; - for (const { bezier: e } of l) { - f.length = 0; - f.push( - `${(0, n.numberToString)(e[0])} ${(0, n.numberToString)(e[1])} m`, - ); - for (let t = 2, a = e.length; t < a; t += 6) { - const a = e - .slice(t, t + 6) - .map(n.numberToString) - .join(" "); - f.push(`${a} c`); - } - f.push("S"); - d.push(f.join("\n")); - } - const g = d.join("\n"), - p = new s.Dict(t); - p.set("FormType", 1); - p.set("Subtype", s.Name.get("Form")); - p.set("Type", s.Name.get("XObject")); - p.set("BBox", c); - p.set("Length", g.length); - if (1 !== u) { - const e = new s.Dict(t), - a = new s.Dict(t), - r = new s.Dict(t); - r.set("CA", u); - r.set("Type", s.Name.get("ExtGState")); - a.set("R0", r); - e.set("ExtGState", a); - p.set("Resources", e); - } - const m = new o.StringStream(g); - m.dict = p; - return m; - } - } - class HighlightAnnotation extends MarkupAnnotation { - constructor(e) { - super(e); - const { dict: t, xref: a } = e; - this.data.annotationType = r.AnnotationType.HIGHLIGHT; - if ((this.data.quadPoints = getQuadPoints(t, null))) { - const e = this.appearance?.dict.get("Resources"); - if (!this.appearance || !e?.has("ExtGState")) { - this.appearance && - (0, r.warn)( - "HighlightAnnotation - ignoring built-in appearance stream.", - ); - const e = this.color - ? getPdfColorArray(this.color) - : [1, 1, 0], - n = t.get("CA"); - this._setDefaultAppearance({ - xref: a, - fillColor: e, - blendMode: "Multiply", - fillAlpha: n, - pointsCallback: (e, t) => { - e.push( - `${t[0].x} ${t[0].y} m`, - `${t[1].x} ${t[1].y} l`, - `${t[3].x} ${t[3].y} l`, - `${t[2].x} ${t[2].y} l`, - "f", - ); - return [t[0].x, t[1].x, t[3].y, t[1].y]; - }, - }); - } - } else this.data.popupRef = null; - } - } - class UnderlineAnnotation extends MarkupAnnotation { - constructor(e) { - super(e); - const { dict: t, xref: a } = e; - this.data.annotationType = r.AnnotationType.UNDERLINE; - if ((this.data.quadPoints = getQuadPoints(t, null))) { - if (!this.appearance) { - const e = this.color - ? getPdfColorArray(this.color) - : [0, 0, 0], - r = t.get("CA"); - this._setDefaultAppearance({ - xref: a, - extra: "[] 0 d 0.571 w", - strokeColor: e, - strokeAlpha: r, - pointsCallback: (e, t) => { - e.push( - `${t[2].x} ${t[2].y + 1.3} m`, - `${t[3].x} ${t[3].y + 1.3} l`, - "S", - ); - return [t[0].x, t[1].x, t[3].y, t[1].y]; - }, - }); - } - } else this.data.popupRef = null; - } - } - class SquigglyAnnotation extends MarkupAnnotation { - constructor(e) { - super(e); - const { dict: t, xref: a } = e; - this.data.annotationType = r.AnnotationType.SQUIGGLY; - if ((this.data.quadPoints = getQuadPoints(t, null))) { - if (!this.appearance) { - const e = this.color - ? getPdfColorArray(this.color) - : [0, 0, 0], - r = t.get("CA"); - this._setDefaultAppearance({ - xref: a, - extra: "[] 0 d 1 w", - strokeColor: e, - strokeAlpha: r, - pointsCallback: (e, t) => { - const a = (t[0].y - t[2].y) / 6; - let r = a, - n = t[2].x; - const i = t[2].y, - s = t[3].x; - e.push(`${n} ${i + r} m`); - do { - n += 2; - r = 0 === r ? a : 0; - e.push(`${n} ${i + r} l`); - } while (n < s); - e.push("S"); - return [t[2].x, s, i - 2 * a, i + 2 * a]; - }, - }); - } - } else this.data.popupRef = null; - } - } - class StrikeOutAnnotation extends MarkupAnnotation { - constructor(e) { - super(e); - const { dict: t, xref: a } = e; - this.data.annotationType = r.AnnotationType.STRIKEOUT; - if ((this.data.quadPoints = getQuadPoints(t, null))) { - if (!this.appearance) { - const e = this.color - ? getPdfColorArray(this.color) - : [0, 0, 0], - r = t.get("CA"); - this._setDefaultAppearance({ - xref: a, - extra: "[] 0 d 1 w", - strokeColor: e, - strokeAlpha: r, - pointsCallback: (e, t) => { - e.push( - (t[0].x + t[2].x) / 2 + - " " + - (t[0].y + t[2].y) / 2 + - " m", - (t[1].x + t[3].x) / 2 + - " " + - (t[1].y + t[3].y) / 2 + - " l", - "S", - ); - return [t[0].x, t[1].x, t[3].y, t[1].y]; - }, - }); - } - } else this.data.popupRef = null; - } - } - class StampAnnotation extends MarkupAnnotation { - constructor(e) { - super(e); - this.data.annotationType = r.AnnotationType.STAMP; - this.data.hasOwnCanvas = this.data.noRotate; - } - static async createImage(e, t) { - const { width: a, height: n } = e, - i = new OffscreenCanvas(a, n), - c = i.getContext("2d", { alpha: !0 }); - c.drawImage(e, 0, 0); - const l = c.getImageData(0, 0, a, n).data, - h = new Uint32Array(l.buffer), - u = h.some( - r.FeatureTest.isLittleEndian - ? (e) => e >>> 24 != 255 - : (e) => 255 != (255 & e), - ); - if (u) { - c.fillStyle = "white"; - c.fillRect(0, 0, a, n); - c.drawImage(e, 0, 0); - } - const d = i - .convertToBlob({ type: "image/jpeg", quality: 1 }) - .then((e) => e.arrayBuffer()), - f = s.Name.get("XObject"), - g = s.Name.get("Image"), - p = new s.Dict(t); - p.set("Type", f); - p.set("Subtype", g); - p.set("BitsPerComponent", 8); - p.set("ColorSpace", s.Name.get("DeviceRGB")); - p.set("Filter", s.Name.get("DCTDecode")); - p.set("BBox", [0, 0, a, n]); - p.set("Width", a); - p.set("Height", n); - let m = null; - if (u) { - const e = new Uint8Array(h.length); - if (r.FeatureTest.isLittleEndian) - for (let t = 0, a = h.length; t < a; t++) e[t] = h[t] >>> 24; - else - for (let t = 0, a = h.length; t < a; t++) e[t] = 255 & h[t]; - const i = new s.Dict(t); - i.set("Type", f); - i.set("Subtype", g); - i.set("BitsPerComponent", 8); - i.set("ColorSpace", s.Name.get("DeviceGray")); - i.set("Width", a); - i.set("Height", n); - m = new o.Stream(e, 0, 0, i); - } - return { - imageStream: new o.Stream(await d, 0, 0, p), - smaskStream: m, - width: a, - height: n, - }; - } - static createNewDict(e, t, { apRef: a, ap: i }) { - const { rect: o, rotation: c, user: l } = e, - h = new s.Dict(t); - h.set("Type", s.Name.get("Annot")); - h.set("Subtype", s.Name.get("Stamp")); - h.set("CreationDate", `D:${(0, r.getModificationDate)()}`); - h.set("Rect", o); - h.set("F", 4); - h.set("Border", [0, 0, 0]); - h.set("Rotate", c); - l && - h.set( - "T", - (0, n.isAscii)(l) ? l : (0, n.stringToUTF16String)(l, !0), - ); - if (a || i) { - const e = new s.Dict(t); - h.set("AP", e); - a ? e.set("N", a) : e.set("N", i); - } - return h; - } - static async createNewAppearanceStream(e, t, a) { - const { rotation: r } = e, - { imageRef: i, width: c, height: l } = a.image, - h = new s.Dict(t), - u = new s.Dict(t); - h.set("XObject", u); - u.set("Im0", i); - const d = `q ${c} 0 0 ${l} 0 0 cm /Im0 Do Q`, - f = new s.Dict(t); - f.set("FormType", 1); - f.set("Subtype", s.Name.get("Form")); - f.set("Type", s.Name.get("XObject")); - f.set("BBox", [0, 0, c, l]); - f.set("Resources", h); - if (r) { - const e = (0, n.getRotationMatrix)(r, c, l); - f.set("Matrix", e); - } - const g = new o.StringStream(d); - g.dict = f; - return g; - } - } - class FileAttachmentAnnotation extends MarkupAnnotation { - constructor(e) { - super(e); - const { dict: t, xref: a } = e, - n = new d.FileSpec(t.get("FS"), a); - this.data.annotationType = r.AnnotationType.FILEATTACHMENT; - this.data.hasOwnCanvas = this.data.noRotate; - this.data.file = n.serializable; - const i = t.get("Name"); - this.data.name = - i instanceof s.Name - ? (0, r.stringToPDFString)(i.name) - : "PushPin"; - const o = t.get("ca"); - this.data.fillAlpha = - "number" == typeof o && o >= 0 && o <= 1 ? o : null; - } - } - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.FakeUnicodeFont = void 0; - t.createDefaultAppearance = function createDefaultAppearance({ - fontSize: e, - fontName: t, - fontColor: a, - }) { - return `/${(0, n.escapePDFName)(t)} ${e} Tf ${getPdfColor(a, !0)}`; - }; - t.getPdfColor = getPdfColor; - t.parseAppearanceStream = function parseAppearanceStream(e, t, a) { - return new AppearanceStreamEvaluator(e, t, a).parse(); - }; - t.parseDefaultAppearance = function parseDefaultAppearance(e) { - return new DefaultAppearanceEvaluator(e).parse(); - }; - var r = a(4), - n = a(3), - i = a(2), - s = a(12), - o = a(13), - c = a(59), - l = a(57), - h = a(8); - class DefaultAppearanceEvaluator extends o.EvaluatorPreprocessor { - constructor(e) { - super(new h.StringStream(e)); - } - parse() { - const e = { fn: 0, args: [] }, - t = { - fontSize: 0, - fontName: "", - fontColor: new Uint8ClampedArray(3), - }; - try { - for (;;) { - e.args.length = 0; - if (!this.read(e)) break; - if (0 !== this.savedStatesDepth) continue; - const { fn: a, args: n } = e; - switch (0 | a) { - case i.OPS.setFont: - const [e, a] = n; - e instanceof r.Name && (t.fontName = e.name); - "number" == typeof a && a > 0 && (t.fontSize = a); - break; - case i.OPS.setFillRGBColor: - s.ColorSpace.singletons.rgb.getRgbItem( - n, - 0, - t.fontColor, - 0, - ); - break; - case i.OPS.setFillGray: - s.ColorSpace.singletons.gray.getRgbItem( - n, - 0, - t.fontColor, - 0, - ); - break; - case i.OPS.setFillCMYKColor: - s.ColorSpace.singletons.cmyk.getRgbItem( - n, - 0, - t.fontColor, - 0, - ); - } - } - } catch (e) { - (0, i.warn)( - `parseDefaultAppearance - ignoring errors: "${e}".`, - ); - } - return t; - } - } - class AppearanceStreamEvaluator extends o.EvaluatorPreprocessor { - constructor(e, t, a) { - super(e); - this.stream = e; - this.evaluatorOptions = t; - this.xref = a; - this.resources = e.dict?.get("Resources"); - } - parse() { - const e = { fn: 0, args: [] }; - let t = { - scaleFactor: 1, - fontSize: 0, - fontName: "", - fontColor: new Uint8ClampedArray(3), - fillColorSpace: s.ColorSpace.singletons.gray, - }, - a = !1; - const n = []; - try { - for (;;) { - e.args.length = 0; - if (a || !this.read(e)) break; - const { fn: o, args: c } = e; - switch (0 | o) { - case i.OPS.save: - n.push({ - scaleFactor: t.scaleFactor, - fontSize: t.fontSize, - fontName: t.fontName, - fontColor: t.fontColor.slice(), - fillColorSpace: t.fillColorSpace, - }); - break; - case i.OPS.restore: - t = n.pop() || t; - break; - case i.OPS.setTextMatrix: - t.scaleFactor *= Math.hypot(c[0], c[1]); - break; - case i.OPS.setFont: - const [e, o] = c; - e instanceof r.Name && (t.fontName = e.name); - "number" == typeof o && - o > 0 && - (t.fontSize = o * t.scaleFactor); - break; - case i.OPS.setFillColorSpace: - t.fillColorSpace = s.ColorSpace.parse({ - cs: c[0], - xref: this.xref, - resources: this.resources, - pdfFunctionFactory: this._pdfFunctionFactory, - localColorSpaceCache: this._localColorSpaceCache, - }); - break; - case i.OPS.setFillColor: - t.fillColorSpace.getRgbItem(c, 0, t.fontColor, 0); - break; - case i.OPS.setFillRGBColor: - s.ColorSpace.singletons.rgb.getRgbItem( - c, - 0, - t.fontColor, - 0, - ); - break; - case i.OPS.setFillGray: - s.ColorSpace.singletons.gray.getRgbItem( - c, - 0, - t.fontColor, - 0, - ); - break; - case i.OPS.setFillCMYKColor: - s.ColorSpace.singletons.cmyk.getRgbItem( - c, - 0, - t.fontColor, - 0, - ); - break; - case i.OPS.showText: - case i.OPS.showSpacedText: - case i.OPS.nextLineShowText: - case i.OPS.nextLineSetSpacingShowText: - a = !0; - } - } - } catch (e) { - (0, i.warn)(`parseAppearanceStream - ignoring errors: "${e}".`); - } - this.stream.reset(); - delete t.scaleFactor; - delete t.fillColorSpace; - return t; - } - get _localColorSpaceCache() { - return (0, i.shadow)( - this, - "_localColorSpaceCache", - new c.LocalColorSpaceCache(), - ); - } - get _pdfFunctionFactory() { - const e = new l.PDFFunctionFactory({ - xref: this.xref, - isEvalSupported: this.evaluatorOptions.isEvalSupported, - }); - return (0, i.shadow)(this, "_pdfFunctionFactory", e); - } - } - function getPdfColor(e, t) { - if (e[0] === e[1] && e[1] === e[2]) { - const a = e[0] / 255; - return `${(0, n.numberToString)(a)} ${t ? "g" : "G"}`; - } - return ( - Array.from(e, (e) => (0, n.numberToString)(e / 255)).join(" ") + - " " + - (t ? "rg" : "RG") - ); - } - class FakeUnicodeFont { - constructor(e, t) { - this.xref = e; - this.widths = null; - this.firstChar = 1 / 0; - this.lastChar = -1 / 0; - this.fontFamily = t; - const a = new OffscreenCanvas(1, 1); - this.ctxMeasure = a.getContext("2d"); - FakeUnicodeFont._fontNameId || (FakeUnicodeFont._fontNameId = 1); - this.fontName = r.Name.get( - `InvalidPDFjsFont_${t}_${FakeUnicodeFont._fontNameId++}`, - ); - } - get toUnicodeRef() { - if (!FakeUnicodeFont._toUnicodeRef) { - const e = - "/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo\n<< /Registry (Adobe)\n/Ordering (UCS) /Supplement 0 >> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000> \nendcodespacerange\n1 beginbfrange\n<0000> <0000>\nendbfrange\nendcmap CMapName currentdict /CMap defineresource pop end end", - t = (FakeUnicodeFont.toUnicodeStream = new h.StringStream(e)), - a = new r.Dict(this.xref); - t.dict = a; - a.set("Length", e.length); - FakeUnicodeFont._toUnicodeRef = - this.xref.getNewPersistentRef(t); - } - return FakeUnicodeFont._toUnicodeRef; - } - get fontDescriptorRef() { - if (!FakeUnicodeFont._fontDescriptorRef) { - const e = new r.Dict(this.xref); - e.set("Type", r.Name.get("FontDescriptor")); - e.set("FontName", this.fontName); - e.set("FontFamily", "MyriadPro Regular"); - e.set("FontBBox", [0, 0, 0, 0]); - e.set("FontStretch", r.Name.get("Normal")); - e.set("FontWeight", 400); - e.set("ItalicAngle", 0); - FakeUnicodeFont._fontDescriptorRef = - this.xref.getNewPersistentRef(e); - } - return FakeUnicodeFont._fontDescriptorRef; - } - get descendantFontRef() { - const e = new r.Dict(this.xref); - e.set("BaseFont", this.fontName); - e.set("Type", r.Name.get("Font")); - e.set("Subtype", r.Name.get("CIDFontType0")); - e.set("CIDToGIDMap", r.Name.get("Identity")); - e.set("FirstChar", this.firstChar); - e.set("LastChar", this.lastChar); - e.set("FontDescriptor", this.fontDescriptorRef); - e.set("DW", 1e3); - const t = [], - a = [...this.widths.entries()].sort(); - let n = null, - i = null; - for (const [e, r] of a) - if (n) - if (e === n + i.length) i.push(r); - else { - t.push(n, i); - n = e; - i = [r]; - } - else { - n = e; - i = [r]; - } - n && t.push(n, i); - e.set("W", t); - const s = new r.Dict(this.xref); - s.set("Ordering", "Identity"); - s.set("Registry", "Adobe"); - s.set("Supplement", 0); - e.set("CIDSystemInfo", s); - return this.xref.getNewPersistentRef(e); - } - get baseFontRef() { - const e = new r.Dict(this.xref); - e.set("BaseFont", this.fontName); - e.set("Type", r.Name.get("Font")); - e.set("Subtype", r.Name.get("Type0")); - e.set("Encoding", r.Name.get("Identity-H")); - e.set("DescendantFonts", [this.descendantFontRef]); - e.set("ToUnicode", this.toUnicodeRef); - return this.xref.getNewPersistentRef(e); - } - get resources() { - const e = new r.Dict(this.xref), - t = new r.Dict(this.xref); - t.set(this.fontName.name, this.baseFontRef); - e.set("Font", t); - return e; - } - _createContext() { - this.widths = new Map(); - this.ctxMeasure.font = `1000px ${this.fontFamily}`; - return this.ctxMeasure; - } - createFontResources(e) { - const t = this._createContext(); - for (const a of e.split(/\r\n?|\n/)) - for (const e of a.split("")) { - const a = e.charCodeAt(0); - if (this.widths.has(a)) continue; - const r = t.measureText(e), - n = Math.ceil(r.width); - this.widths.set(a, n); - this.firstChar = Math.min(a, this.firstChar); - this.lastChar = Math.max(a, this.lastChar); - } - return this.resources; - } - createAppearance(e, t, a, s, o, c) { - const l = this._createContext(), - u = []; - let d = -1 / 0; - for (const t of e.split(/\r\n?|\n/)) { - u.push(t); - const e = l.measureText(t).width; - d = Math.max(d, e); - for (const e of t.split("")) { - const t = e.charCodeAt(0); - let a = this.widths.get(t); - if (void 0 === a) { - const r = l.measureText(e); - a = Math.ceil(r.width); - this.widths.set(t, a); - this.firstChar = Math.min(t, this.firstChar); - this.lastChar = Math.max(t, this.lastChar); - } - } - } - d *= s / 1e3; - const [f, g, p, m] = t; - let b = p - f, - y = m - g; - a % 180 != 0 && ([b, y] = [y, b]); - let w = 1; - d > b && (w = b / d); - let S = 1; - const x = i.LINE_FACTOR * s, - C = i.LINE_DESCENT_FACTOR * s, - k = x * u.length; - k > y && (S = y / k); - const v = s * Math.min(w, S), - F = [ - "q", - `0 0 ${(0, n.numberToString)(b)} ${(0, n.numberToString)(y)} re W n`, - "BT", - `1 0 0 1 0 ${(0, n.numberToString)(y + C)} Tm 0 Tc ${getPdfColor(o, !0)}`, - `/${this.fontName.name} ${(0, n.numberToString)(v)} Tf`, - ], - { resources: O } = this; - if ( - 1 !== (c = "number" == typeof c && c >= 0 && c <= 1 ? c : 1) - ) { - F.push("/R0 gs"); - const e = new r.Dict(this.xref), - t = new r.Dict(this.xref); - t.set("ca", c); - t.set("CA", c); - t.set("Type", r.Name.get("ExtGState")); - e.set("R0", t); - O.set("ExtGState", e); - } - const T = (0, n.numberToString)(x); - for (const e of u) - F.push(`0 -${T} Td <${(0, n.stringToUTF16HexString)(e)}> Tj`); - F.push("ET", "Q"); - const M = F.join("\n"), - D = new r.Dict(this.xref); - D.set("Subtype", r.Name.get("Form")); - D.set("Type", r.Name.get("XObject")); - D.set("BBox", [0, 0, b, y]); - D.set("Length", M.length); - D.set("Resources", O); - if (a) { - const e = (0, n.getRotationMatrix)(a, b, y); - D.set("Matrix", e); - } - const E = new h.StringStream(M); - E.dict = D; - return E; - } - } - t.FakeUnicodeFont = FakeUnicodeFont; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.ColorSpace = void 0; - var r = a(2), - n = a(4), - i = a(5), - s = a(3); - class ColorSpace { - constructor(e, t) { - this.constructor === ColorSpace && - (0, r.unreachable)("Cannot initialize ColorSpace."); - this.name = e; - this.numComps = t; - } - getRgb(e, t) { - const a = new Uint8ClampedArray(3); - this.getRgbItem(e, t, a, 0); - return a; - } - getRgbItem(e, t, a, n) { - (0, r.unreachable)("Should not call ColorSpace.getRgbItem"); - } - getRgbBuffer(e, t, a, n, i, s, o) { - (0, r.unreachable)("Should not call ColorSpace.getRgbBuffer"); - } - getOutputLength(e, t) { - (0, r.unreachable)("Should not call ColorSpace.getOutputLength"); - } - isPassthrough(e) { - return !1; - } - isDefaultDecode(e, t) { - return ColorSpace.isDefaultDecode(e, this.numComps); - } - fillRgb(e, t, a, r, n, i, s, o, c) { - const l = t * a; - let h = null; - const u = 1 << s, - d = a !== n || t !== r; - if (this.isPassthrough(s)) h = o; - else if ( - 1 === this.numComps && - l > u && - "DeviceGray" !== this.name && - "DeviceRGB" !== this.name - ) { - const t = s <= 8 ? new Uint8Array(u) : new Uint16Array(u); - for (let e = 0; e < u; e++) t[e] = e; - const a = new Uint8ClampedArray(3 * u); - this.getRgbBuffer(t, 0, u, a, 0, s, 0); - if (d) { - h = new Uint8Array(3 * l); - let e = 0; - for (let t = 0; t < l; ++t) { - const r = 3 * o[t]; - h[e++] = a[r]; - h[e++] = a[r + 1]; - h[e++] = a[r + 2]; - } - } else { - let t = 0; - for (let r = 0; r < l; ++r) { - const n = 3 * o[r]; - e[t++] = a[n]; - e[t++] = a[n + 1]; - e[t++] = a[n + 2]; - t += c; - } - } - } else if (d) { - h = new Uint8ClampedArray(3 * l); - this.getRgbBuffer(o, 0, l, h, 0, s, 0); - } else this.getRgbBuffer(o, 0, r * i, e, 0, s, c); - if (h) - if (d) - !(function resizeRgbImage(e, t, a, r, n, i, s) { - s = 1 !== s ? 0 : s; - const o = a / n, - c = r / i; - let l, - h = 0; - const u = new Uint16Array(n), - d = 3 * a; - for (let e = 0; e < n; e++) u[e] = 3 * Math.floor(e * o); - for (let a = 0; a < i; a++) { - const r = Math.floor(a * c) * d; - for (let a = 0; a < n; a++) { - l = r + u[a]; - t[h++] = e[l++]; - t[h++] = e[l++]; - t[h++] = e[l++]; - h += s; - } - } - })(h, e, t, a, r, n, c); - else { - let t = 0, - a = 0; - for (let n = 0, s = r * i; n < s; n++) { - e[t++] = h[a++]; - e[t++] = h[a++]; - e[t++] = h[a++]; - t += c; - } - } - } - get usesZeroToOneRange() { - return (0, r.shadow)(this, "usesZeroToOneRange", !0); - } - static _cache(e, t, a, r) { - if (!a) - throw new Error( - 'ColorSpace._cache - expected "localColorSpaceCache" argument.', - ); - if (!r) - throw new Error( - 'ColorSpace._cache - expected "parsedColorSpace" argument.', - ); - let i, s; - if (e instanceof n.Ref) { - s = e; - e = t.fetch(e); - } - e instanceof n.Name && (i = e.name); - (i || s) && a.set(i, s, r); - } - static getCached(e, t, a) { - if (!a) - throw new Error( - 'ColorSpace.getCached - expected "localColorSpaceCache" argument.', - ); - if (e instanceof n.Ref) { - const r = a.getByRef(e); - if (r) return r; - try { - e = t.fetch(e); - } catch (e) { - if (e instanceof s.MissingDataException) throw e; - } - } - if (e instanceof n.Name) { - const t = a.getByName(e.name); - if (t) return t; - } - return null; - } - static async parseAsync({ - cs: e, - xref: t, - resources: a = null, - pdfFunctionFactory: r, - localColorSpaceCache: n, - }) { - const i = this._parse(e, t, a, r); - this._cache(e, t, n, i); - return i; - } - static parse({ - cs: e, - xref: t, - resources: a = null, - pdfFunctionFactory: r, - localColorSpaceCache: n, - }) { - const i = this.getCached(e, t, n); - if (i) return i; - const s = this._parse(e, t, a, r); - this._cache(e, t, n, s); - return s; - } - static _parse(e, t, a = null, i) { - if ((e = t.fetchIfRef(e)) instanceof n.Name) - switch (e.name) { - case "G": - case "DeviceGray": - return this.singletons.gray; - case "RGB": - case "DeviceRGB": - return this.singletons.rgb; - case "CMYK": - case "DeviceCMYK": - return this.singletons.cmyk; - case "Pattern": - return new PatternCS(null); - default: - if (a instanceof n.Dict) { - const r = a.get("ColorSpace"); - if (r instanceof n.Dict) { - const s = r.get(e.name); - if (s) { - if (s instanceof n.Name) - return this._parse(s, t, a, i); - e = s; - break; - } - } - } - throw new r.FormatError( - `Unrecognized ColorSpace: ${e.name}`, - ); - } - if (Array.isArray(e)) { - const n = t.fetchIfRef(e[0]).name; - let s, o, c, l, h, u; - switch (n) { - case "G": - case "DeviceGray": - return this.singletons.gray; - case "RGB": - case "DeviceRGB": - return this.singletons.rgb; - case "CMYK": - case "DeviceCMYK": - return this.singletons.cmyk; - case "CalGray": - s = t.fetchIfRef(e[1]); - l = s.getArray("WhitePoint"); - h = s.getArray("BlackPoint"); - u = s.get("Gamma"); - return new CalGrayCS(l, h, u); - case "CalRGB": - s = t.fetchIfRef(e[1]); - l = s.getArray("WhitePoint"); - h = s.getArray("BlackPoint"); - u = s.getArray("Gamma"); - const d = s.getArray("Matrix"); - return new CalRGBCS(l, h, u, d); - case "ICCBased": - const f = t.fetchIfRef(e[1]).dict; - o = f.get("N"); - const g = f.get("Alternate"); - if (g) { - const e = this._parse(g, t, a, i); - if (e.numComps === o) return e; - (0, r.warn)( - "ICCBased color space: Ignoring incorrect /Alternate entry.", - ); - } - if (1 === o) return this.singletons.gray; - if (3 === o) return this.singletons.rgb; - if (4 === o) return this.singletons.cmyk; - break; - case "Pattern": - c = e[1] || null; - c && (c = this._parse(c, t, a, i)); - return new PatternCS(c); - case "I": - case "Indexed": - c = this._parse(e[1], t, a, i); - const p = t.fetchIfRef(e[2]) + 1, - m = t.fetchIfRef(e[3]); - return new IndexedCS(c, p, m); - case "Separation": - case "DeviceN": - const b = t.fetchIfRef(e[1]); - o = Array.isArray(b) ? b.length : 1; - c = this._parse(e[2], t, a, i); - const y = i.create(e[3]); - return new AlternateCS(o, c, y); - case "Lab": - s = t.fetchIfRef(e[1]); - l = s.getArray("WhitePoint"); - h = s.getArray("BlackPoint"); - const w = s.getArray("Range"); - return new LabCS(l, h, w); - default: - throw new r.FormatError( - `Unimplemented ColorSpace object: ${n}`, - ); - } - } - throw new r.FormatError(`Unrecognized ColorSpace object: ${e}`); - } - static isDefaultDecode(e, t) { - if (!Array.isArray(e)) return !0; - if (2 * t !== e.length) { - (0, r.warn)("The decode map is not the correct length"); - return !0; - } - for (let t = 0, a = e.length; t < a; t += 2) - if (0 !== e[t] || 1 !== e[t + 1]) return !1; - return !0; - } - static get singletons() { - return (0, r.shadow)(this, "singletons", { - get gray() { - return (0, r.shadow)(this, "gray", new DeviceGrayCS()); - }, - get rgb() { - return (0, r.shadow)(this, "rgb", new DeviceRgbCS()); - }, - get cmyk() { - return (0, r.shadow)(this, "cmyk", new DeviceCmykCS()); - }, - }); - } - } - t.ColorSpace = ColorSpace; - class AlternateCS extends ColorSpace { - constructor(e, t, a) { - super("Alternate", e); - this.base = t; - this.tintFn = a; - this.tmpBuf = new Float32Array(t.numComps); - } - getRgbItem(e, t, a, r) { - const n = this.tmpBuf; - this.tintFn(e, t, n, 0); - this.base.getRgbItem(n, 0, a, r); - } - getRgbBuffer(e, t, a, r, n, i, s) { - const o = this.tintFn, - c = this.base, - l = 1 / ((1 << i) - 1), - h = c.numComps, - u = c.usesZeroToOneRange, - d = (c.isPassthrough(8) || !u) && 0 === s; - let f = d ? n : 0; - const g = d ? r : new Uint8ClampedArray(h * a), - p = this.numComps, - m = new Float32Array(p), - b = new Float32Array(h); - let y, w; - for (y = 0; y < a; y++) { - for (w = 0; w < p; w++) m[w] = e[t++] * l; - o(m, 0, b, 0); - if (u) for (w = 0; w < h; w++) g[f++] = 255 * b[w]; - else { - c.getRgbItem(b, 0, g, f); - f += h; - } - } - d || c.getRgbBuffer(g, 0, a, r, n, 8, s); - } - getOutputLength(e, t) { - return this.base.getOutputLength( - (e * this.base.numComps) / this.numComps, - t, - ); - } - } - class PatternCS extends ColorSpace { - constructor(e) { - super("Pattern", null); - this.base = e; - } - isDefaultDecode(e, t) { - (0, r.unreachable)("Should not call PatternCS.isDefaultDecode"); - } - } - class IndexedCS extends ColorSpace { - constructor(e, t, a) { - super("Indexed", 1); - this.base = e; - this.highVal = t; - const n = e.numComps * t; - this.lookup = new Uint8Array(n); - if (a instanceof i.BaseStream) { - const e = a.getBytes(n); - this.lookup.set(e); - } else { - if ("string" != typeof a) - throw new r.FormatError( - `IndexedCS - unrecognized lookup table: ${a}`, - ); - for (let e = 0; e < n; ++e) - this.lookup[e] = 255 & a.charCodeAt(e); - } - } - getRgbItem(e, t, a, r) { - const n = this.base.numComps, - i = e[t] * n; - this.base.getRgbBuffer(this.lookup, i, 1, a, r, 8, 0); - } - getRgbBuffer(e, t, a, r, n, i, s) { - const o = this.base, - c = o.numComps, - l = o.getOutputLength(c, s), - h = this.lookup; - for (let i = 0; i < a; ++i) { - const a = e[t++] * c; - o.getRgbBuffer(h, a, 1, r, n, 8, s); - n += l; - } - } - getOutputLength(e, t) { - return this.base.getOutputLength(e * this.base.numComps, t); - } - isDefaultDecode(e, t) { - if (!Array.isArray(e)) return !0; - if (2 !== e.length) { - (0, r.warn)("Decode map length is not correct"); - return !0; - } - if (!Number.isInteger(t) || t < 1) { - (0, r.warn)("Bits per component is not correct"); - return !0; - } - return 0 === e[0] && e[1] === (1 << t) - 1; - } - } - class DeviceGrayCS extends ColorSpace { - constructor() { - super("DeviceGray", 1); - } - getRgbItem(e, t, a, r) { - const n = 255 * e[t]; - a[r] = a[r + 1] = a[r + 2] = n; - } - getRgbBuffer(e, t, a, r, n, i, s) { - const o = 255 / ((1 << i) - 1); - let c = t, - l = n; - for (let t = 0; t < a; ++t) { - const t = o * e[c++]; - r[l++] = t; - r[l++] = t; - r[l++] = t; - l += s; - } - } - getOutputLength(e, t) { - return e * (3 + t); - } - } - class DeviceRgbCS extends ColorSpace { - constructor() { - super("DeviceRGB", 3); - } - getRgbItem(e, t, a, r) { - a[r] = 255 * e[t]; - a[r + 1] = 255 * e[t + 1]; - a[r + 2] = 255 * e[t + 2]; - } - getRgbBuffer(e, t, a, r, n, i, s) { - if (8 === i && 0 === s) { - r.set(e.subarray(t, t + 3 * a), n); - return; - } - const o = 255 / ((1 << i) - 1); - let c = t, - l = n; - for (let t = 0; t < a; ++t) { - r[l++] = o * e[c++]; - r[l++] = o * e[c++]; - r[l++] = o * e[c++]; - l += s; - } - } - getOutputLength(e, t) { - return ((e * (3 + t)) / 3) | 0; - } - isPassthrough(e) { - return 8 === e; - } - } - class DeviceCmykCS extends ColorSpace { - constructor() { - super("DeviceCMYK", 4); - } - #r(e, t, a, r, n) { - const i = e[t] * a, - s = e[t + 1] * a, - o = e[t + 2] * a, - c = e[t + 3] * a; - r[n] = - 255 + - i * - (-4.387332384609988 * i + - 54.48615194189176 * s + - 18.82290502165302 * o + - 212.25662451639585 * c - - 285.2331026137004) + - s * - (1.7149763477362134 * s - - 5.6096736904047315 * o + - -17.873870861415444 * c - - 5.497006427196366) + - o * - (-2.5217340131683033 * o - - 21.248923337353073 * c + - 17.5119270841813) + - c * (-21.86122147463605 * c - 189.48180835922747); - r[n + 1] = - 255 + - i * - (8.841041422036149 * i + - 60.118027045597366 * s + - 6.871425592049007 * o + - 31.159100130055922 * c - - 79.2970844816548) + - s * - (-15.310361306967817 * s + - 17.575251261109482 * o + - 131.35250912493976 * c - - 190.9453302588951) + - o * - (4.444339102852739 * o + - 9.8632861493405 * c - - 24.86741582555878) + - c * (-20.737325471181034 * c - 187.80453709719578); - r[n + 2] = - 255 + - i * - (0.8842522430003296 * i + - 8.078677503112928 * s + - 30.89978309703729 * o - - 0.23883238689178934 * c - - 14.183576799673286) + - s * - (10.49593273432072 * s + - 63.02378494754052 * o + - 50.606957656360734 * c - - 112.23884253719248) + - o * - (0.03296041114873217 * o + - 115.60384449646641 * c - - 193.58209356861505) + - c * (-22.33816807309886 * c - 180.12613974708367); - } - getRgbItem(e, t, a, r) { - this.#r(e, t, 1, a, r); - } - getRgbBuffer(e, t, a, r, n, i, s) { - const o = 1 / ((1 << i) - 1); - for (let i = 0; i < a; i++) { - this.#r(e, t, o, r, n); - t += 4; - n += 3 + s; - } - } - getOutputLength(e, t) { - return ((e / 4) * (3 + t)) | 0; - } - } - class CalGrayCS extends ColorSpace { - constructor(e, t, a) { - super("CalGray", 1); - if (!e) - throw new r.FormatError( - "WhitePoint missing - required for color space CalGray", - ); - [this.XW, this.YW, this.ZW] = e; - [this.XB, this.YB, this.ZB] = t || [0, 0, 0]; - this.G = a || 1; - if (this.XW < 0 || this.ZW < 0 || 1 !== this.YW) - throw new r.FormatError( - `Invalid WhitePoint components for ${this.name}, no fallback available`, - ); - if (this.XB < 0 || this.YB < 0 || this.ZB < 0) { - (0, r.info)( - `Invalid BlackPoint for ${this.name}, falling back to default.`, - ); - this.XB = this.YB = this.ZB = 0; - } - (0 === this.XB && 0 === this.YB && 0 === this.ZB) || - (0, r.warn)( - `${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ZB: ${this.ZB}, only default values are supported.`, - ); - if (this.G < 1) { - (0, r.info)( - `Invalid Gamma: ${this.G} for ${this.name}, falling back to default.`, - ); - this.G = 1; - } - } - #r(e, t, a, r, n) { - const i = (e[t] * n) ** this.G, - s = this.YW * i, - o = Math.max(295.8 * s ** 0.3333333333333333 - 40.8, 0); - a[r] = o; - a[r + 1] = o; - a[r + 2] = o; - } - getRgbItem(e, t, a, r) { - this.#r(e, t, a, r, 1); - } - getRgbBuffer(e, t, a, r, n, i, s) { - const o = 1 / ((1 << i) - 1); - for (let i = 0; i < a; ++i) { - this.#r(e, t, r, n, o); - t += 1; - n += 3 + s; - } - } - getOutputLength(e, t) { - return e * (3 + t); - } - } - class CalRGBCS extends ColorSpace { - static #n = new Float32Array([ - 0.8951, 0.2664, -0.1614, -0.7502, 1.7135, 0.0367, 0.0389, -0.0685, - 1.0296, - ]); - static #i = new Float32Array([ - 0.9869929, -0.1470543, 0.1599627, 0.4323053, 0.5183603, 0.0492912, - -0.0085287, 0.0400428, 0.9684867, - ]); - static #s = new Float32Array([ - 3.2404542, -1.5371385, -0.4985314, -0.969266, 1.8760108, 0.041556, - 0.0556434, -0.2040259, 1.0572252, - ]); - static #o = new Float32Array([1, 1, 1]); - static #c = new Float32Array(3); - static #l = new Float32Array(3); - static #h = new Float32Array(3); - static #u = (24 / 116) ** 3 / 8; - constructor(e, t, a, n) { - super("CalRGB", 3); - if (!e) - throw new r.FormatError( - "WhitePoint missing - required for color space CalRGB", - ); - const [i, s, o] = (this.whitePoint = e), - [c, l, h] = (this.blackPoint = t || new Float32Array(3)); - [this.GR, this.GG, this.GB] = a || new Float32Array([1, 1, 1]); - [ - this.MXA, - this.MYA, - this.MZA, - this.MXB, - this.MYB, - this.MZB, - this.MXC, - this.MYC, - this.MZC, - ] = n || new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]); - if (i < 0 || o < 0 || 1 !== s) - throw new r.FormatError( - `Invalid WhitePoint components for ${this.name}, no fallback available`, - ); - if (c < 0 || l < 0 || h < 0) { - (0, r.info)( - `Invalid BlackPoint for ${this.name} [${c}, ${l}, ${h}], falling back to default.`, - ); - this.blackPoint = new Float32Array(3); - } - if (this.GR < 0 || this.GG < 0 || this.GB < 0) { - (0, r.info)( - `Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ${this.name}, falling back to default.`, - ); - this.GR = this.GG = this.GB = 1; - } - } - #d(e, t, a) { - a[0] = e[0] * t[0] + e[1] * t[1] + e[2] * t[2]; - a[1] = e[3] * t[0] + e[4] * t[1] + e[5] * t[2]; - a[2] = e[6] * t[0] + e[7] * t[1] + e[8] * t[2]; - } - #f(e, t, a) { - a[0] = (1 * t[0]) / e[0]; - a[1] = (1 * t[1]) / e[1]; - a[2] = (1 * t[2]) / e[2]; - } - #g(e, t, a) { - a[0] = (0.95047 * t[0]) / e[0]; - a[1] = (1 * t[1]) / e[1]; - a[2] = (1.08883 * t[2]) / e[2]; - } - #p(e) { - return e <= 0.0031308 - ? this.#m(0, 1, 12.92 * e) - : e >= 0.99554525 - ? 1 - : this.#m(0, 1, 1.055 * e ** (1 / 2.4) - 0.055); - } - #m(e, t, a) { - return Math.max(e, Math.min(t, a)); - } - #b(e) { - return e < 0 - ? -this.#b(-e) - : e > 8 - ? ((e + 16) / 116) ** 3 - : e * CalRGBCS.#u; - } - #y(e, t, a) { - if (0 === e[0] && 0 === e[1] && 0 === e[2]) { - a[0] = t[0]; - a[1] = t[1]; - a[2] = t[2]; - return; - } - const r = this.#b(0), - n = (1 - r) / (1 - this.#b(e[0])), - i = 1 - n, - s = (1 - r) / (1 - this.#b(e[1])), - o = 1 - s, - c = (1 - r) / (1 - this.#b(e[2])), - l = 1 - c; - a[0] = t[0] * n + i; - a[1] = t[1] * s + o; - a[2] = t[2] * c + l; - } - #w(e, t, a) { - if (1 === e[0] && 1 === e[2]) { - a[0] = t[0]; - a[1] = t[1]; - a[2] = t[2]; - return; - } - const r = a; - this.#d(CalRGBCS.#n, t, r); - const n = CalRGBCS.#c; - this.#f(e, r, n); - this.#d(CalRGBCS.#i, n, a); - } - #S(e, t, a) { - const r = a; - this.#d(CalRGBCS.#n, t, r); - const n = CalRGBCS.#c; - this.#g(e, r, n); - this.#d(CalRGBCS.#i, n, a); - } - #r(e, t, a, r, n) { - const i = this.#m(0, 1, e[t] * n), - s = this.#m(0, 1, e[t + 1] * n), - o = this.#m(0, 1, e[t + 2] * n), - c = 1 === i ? 1 : i ** this.GR, - l = 1 === s ? 1 : s ** this.GG, - h = 1 === o ? 1 : o ** this.GB, - u = this.MXA * c + this.MXB * l + this.MXC * h, - d = this.MYA * c + this.MYB * l + this.MYC * h, - f = this.MZA * c + this.MZB * l + this.MZC * h, - g = CalRGBCS.#l; - g[0] = u; - g[1] = d; - g[2] = f; - const p = CalRGBCS.#h; - this.#w(this.whitePoint, g, p); - const m = CalRGBCS.#l; - this.#y(this.blackPoint, p, m); - const b = CalRGBCS.#h; - this.#S(CalRGBCS.#o, m, b); - const y = CalRGBCS.#l; - this.#d(CalRGBCS.#s, b, y); - a[r] = 255 * this.#p(y[0]); - a[r + 1] = 255 * this.#p(y[1]); - a[r + 2] = 255 * this.#p(y[2]); - } - getRgbItem(e, t, a, r) { - this.#r(e, t, a, r, 1); - } - getRgbBuffer(e, t, a, r, n, i, s) { - const o = 1 / ((1 << i) - 1); - for (let i = 0; i < a; ++i) { - this.#r(e, t, r, n, o); - t += 3; - n += 3 + s; - } - } - getOutputLength(e, t) { - return ((e * (3 + t)) / 3) | 0; - } - } - class LabCS extends ColorSpace { - constructor(e, t, a) { - super("Lab", 3); - if (!e) - throw new r.FormatError( - "WhitePoint missing - required for color space Lab", - ); - [this.XW, this.YW, this.ZW] = e; - [this.amin, this.amax, this.bmin, this.bmax] = a || [ - -100, 100, -100, 100, - ]; - [this.XB, this.YB, this.ZB] = t || [0, 0, 0]; - if (this.XW < 0 || this.ZW < 0 || 1 !== this.YW) - throw new r.FormatError( - "Invalid WhitePoint components, no fallback available", - ); - if (this.XB < 0 || this.YB < 0 || this.ZB < 0) { - (0, r.info)("Invalid BlackPoint, falling back to default"); - this.XB = this.YB = this.ZB = 0; - } - if (this.amin > this.amax || this.bmin > this.bmax) { - (0, r.info)("Invalid Range, falling back to defaults"); - this.amin = -100; - this.amax = 100; - this.bmin = -100; - this.bmax = 100; - } - } - #x(e) { - return e >= 6 / 29 ? e ** 3 : (108 / 841) * (e - 4 / 29); - } - #A(e, t, a, r) { - return a + (e * (r - a)) / t; - } - #r(e, t, a, r, n) { - let i = e[t], - s = e[t + 1], - o = e[t + 2]; - if (!1 !== a) { - i = this.#A(i, a, 0, 100); - s = this.#A(s, a, this.amin, this.amax); - o = this.#A(o, a, this.bmin, this.bmax); - } - s > this.amax - ? (s = this.amax) - : s < this.amin && (s = this.amin); - o > this.bmax - ? (o = this.bmax) - : o < this.bmin && (o = this.bmin); - const c = (i + 16) / 116, - l = c + s / 500, - h = c - o / 200, - u = this.XW * this.#x(l), - d = this.YW * this.#x(c), - f = this.ZW * this.#x(h); - let g, p, m; - if (this.ZW < 1) { - g = 3.1339 * u + -1.617 * d + -0.4906 * f; - p = -0.9785 * u + 1.916 * d + 0.0333 * f; - m = 0.072 * u + -0.229 * d + 1.4057 * f; - } else { - g = 3.2406 * u + -1.5372 * d + -0.4986 * f; - p = -0.9689 * u + 1.8758 * d + 0.0415 * f; - m = 0.0557 * u + -0.204 * d + 1.057 * f; - } - r[n] = 255 * Math.sqrt(g); - r[n + 1] = 255 * Math.sqrt(p); - r[n + 2] = 255 * Math.sqrt(m); - } - getRgbItem(e, t, a, r) { - this.#r(e, t, !1, a, r); - } - getRgbBuffer(e, t, a, r, n, i, s) { - const o = (1 << i) - 1; - for (let i = 0; i < a; i++) { - this.#r(e, t, o, r, n); - t += 3; - n += 3 + s; - } - } - getOutputLength(e, t) { - return ((e * (3 + t)) / 3) | 0; - } - isDefaultDecode(e, t) { - return !0; - } - get usesZeroToOneRange() { - return (0, r.shadow)(this, "usesZeroToOneRange", !1); - } - } - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.PartialEvaluator = t.EvaluatorPreprocessor = void 0; - var r = a(2), - n = a(14), - i = a(4), - s = a(34), - o = a(37), - c = a(41), - l = a(50), - h = a(51), - u = a(42), - d = a(57), - f = a(16), - g = a(59), - p = a(8), - m = a(5), - b = a(60), - y = a(12), - w = a(18), - S = a(38), - x = a(61), - C = a(39), - k = a(45), - v = a(40), - F = a(62), - O = a(63), - T = a(64), - M = a(65); - const D = Object.freeze({ - maxImageSize: -1, - disableFontFace: !1, - ignoreErrors: !1, - isEvalSupported: !0, - isOffscreenCanvasSupported: !1, - canvasMaxAreaInBytes: -1, - fontExtraProperties: !1, - useSystemFonts: !0, - cMapUrl: null, - standardFontDataUrl: null, - }), - E = 1, - N = 2, - R = Promise.resolve(); - function normalizeBlendMode(e, t = !1) { - if (Array.isArray(e)) { - for (const t of e) { - const e = normalizeBlendMode(t, !0); - if (e) return e; - } - (0, r.warn)(`Unsupported blend mode Array: ${e}`); - return "source-over"; - } - if (!(e instanceof i.Name)) return t ? null : "source-over"; - switch (e.name) { - case "Normal": - case "Compatible": - return "source-over"; - case "Multiply": - return "multiply"; - case "Screen": - return "screen"; - case "Overlay": - return "overlay"; - case "Darken": - return "darken"; - case "Lighten": - return "lighten"; - case "ColorDodge": - return "color-dodge"; - case "ColorBurn": - return "color-burn"; - case "HardLight": - return "hard-light"; - case "SoftLight": - return "soft-light"; - case "Difference": - return "difference"; - case "Exclusion": - return "exclusion"; - case "Hue": - return "hue"; - case "Saturation": - return "saturation"; - case "Color": - return "color"; - case "Luminosity": - return "luminosity"; - } - if (t) return null; - (0, r.warn)(`Unsupported blend mode: ${e.name}`); - return "source-over"; - } - function incrementCachedImageMaskCount(e) { - e.fn === r.OPS.paintImageMaskXObject && - e.args[0]?.count > 0 && - e.args[0].count++; - } - class TimeSlotManager { - static TIME_SLOT_DURATION_MS = 20; - static CHECK_TIME_EVERY = 100; - constructor() { - this.reset(); - } - check() { - if (++this.checked < TimeSlotManager.CHECK_TIME_EVERY) return !1; - this.checked = 0; - return this.endTime <= Date.now(); - } - reset() { - this.endTime = Date.now() + TimeSlotManager.TIME_SLOT_DURATION_MS; - this.checked = 0; - } - } - class PartialEvaluator { - constructor({ - xref: e, - handler: t, - pageIndex: a, - idFactory: r, - fontCache: n, - builtInCMapCache: i, - standardFontDataCache: s, - globalImageCache: o, - systemFontCache: c, - options: l = null, - }) { - this.xref = e; - this.handler = t; - this.pageIndex = a; - this.idFactory = r; - this.fontCache = n; - this.builtInCMapCache = i; - this.standardFontDataCache = s; - this.globalImageCache = o; - this.systemFontCache = c; - this.options = l || D; - this.parsingType3Font = !1; - this._regionalImageCache = new g.RegionalImageCache(); - this._fetchBuiltInCMapBound = this.fetchBuiltInCMap.bind(this); - F.ImageResizer.setMaxArea(this.options.canvasMaxAreaInBytes); - } - get _pdfFunctionFactory() { - const e = new d.PDFFunctionFactory({ - xref: this.xref, - isEvalSupported: this.options.isEvalSupported, - }); - return (0, r.shadow)(this, "_pdfFunctionFactory", e); - } - clone(e = null) { - const t = Object.create(this); - t.options = Object.assign(Object.create(null), this.options, e); - return t; - } - hasBlendModes(e, t) { - if (!(e instanceof i.Dict)) return !1; - if (e.objId && t.has(e.objId)) return !1; - const a = new i.RefSet(t); - e.objId && a.put(e.objId); - const n = [e], - s = this.xref; - for (; n.length; ) { - const e = n.shift(), - t = e.get("ExtGState"); - if (t instanceof i.Dict) - for (let e of t.getRawValues()) { - if (e instanceof i.Ref) { - if (a.has(e)) continue; - try { - e = s.fetch(e); - } catch (t) { - a.put(e); - (0, r.info)( - `hasBlendModes - ignoring ExtGState: "${t}".`, - ); - continue; - } - } - if (!(e instanceof i.Dict)) continue; - e.objId && a.put(e.objId); - const t = e.get("BM"); - if (t instanceof i.Name) { - if ("Normal" !== t.name) return !0; - } else if (void 0 !== t && Array.isArray(t)) - for (const e of t) - if (e instanceof i.Name && "Normal" !== e.name) - return !0; - } - const o = e.get("XObject"); - if (o instanceof i.Dict) - for (let e of o.getRawValues()) { - if (e instanceof i.Ref) { - if (a.has(e)) continue; - try { - e = s.fetch(e); - } catch (t) { - a.put(e); - (0, r.info)( - `hasBlendModes - ignoring XObject: "${t}".`, - ); - continue; - } - } - if (!(e instanceof m.BaseStream)) continue; - e.dict.objId && a.put(e.dict.objId); - const t = e.dict.get("Resources"); - if (t instanceof i.Dict && (!t.objId || !a.has(t.objId))) { - n.push(t); - t.objId && a.put(t.objId); - } - } - } - for (const e of a) t.put(e); - return !1; - } - async fetchBuiltInCMap(e) { - const t = this.builtInCMapCache.get(e); - if (t) return t; - let a; - if (null !== this.options.cMapUrl) { - const t = `${this.options.cMapUrl}${e}.bcmap`, - n = await fetch(t); - if (!n.ok) - throw new Error( - `fetchBuiltInCMap: failed to fetch file "${t}" with "${n.statusText}".`, - ); - a = { - cMapData: new Uint8Array(await n.arrayBuffer()), - compressionType: r.CMapCompressionType.BINARY, - }; - } else - a = await this.handler.sendWithPromise("FetchBuiltInCMap", { - name: e, - }); - a.compressionType !== r.CMapCompressionType.NONE && - this.builtInCMapCache.set(e, a); - return a; - } - async fetchStandardFontData(e) { - const t = this.standardFontDataCache.get(e); - if (t) return new p.Stream(t); - if ( - this.options.useSystemFonts && - "Symbol" !== e && - "ZapfDingbats" !== e - ) - return null; - const a = (0, c.getFontNameToFileMap)()[e]; - let n; - if (null !== this.options.standardFontDataUrl) { - const e = `${this.options.standardFontDataUrl}${a}`, - t = await fetch(e); - t.ok - ? (n = await t.arrayBuffer()) - : (0, r.warn)( - `fetchStandardFontData: failed to fetch file "${e}" with "${t.statusText}".`, - ); - } else - try { - n = await this.handler.sendWithPromise( - "FetchStandardFontData", - { filename: a }, - ); - } catch (e) { - (0, r.warn)( - `fetchStandardFontData: failed to fetch file "${a}" with "${e}".`, - ); - } - if (!n) return null; - this.standardFontDataCache.set(e, n); - return new p.Stream(n); - } - async buildFormXObject(e, t, a, n, s, o, c) { - const l = t.dict, - h = l.getArray("Matrix"); - let u, - d, - f = l.getArray("BBox"); - f = - Array.isArray(f) && 4 === f.length - ? r.Util.normalizeRect(f) - : null; - l.has("OC") && - (u = await this.parseMarkedContentProps(l.get("OC"), e)); - void 0 !== u && n.addOp(r.OPS.beginMarkedContentProps, ["OC", u]); - const g = l.get("Group"); - if (g) { - d = { - matrix: h, - bbox: f, - smask: a, - isolated: !1, - knockout: !1, - }; - const t = g.get("S"); - let s = null; - if ((0, i.isName)(t, "Transparency")) { - d.isolated = g.get("I") || !1; - d.knockout = g.get("K") || !1; - if (g.has("CS")) { - const t = g.getRaw("CS"), - a = y.ColorSpace.getCached(t, this.xref, c); - s = - a || - (await this.parseColorSpace({ - cs: t, - resources: e, - localColorSpaceCache: c, - })); - } - } - if (a?.backdrop) { - s ||= y.ColorSpace.singletons.rgb; - a.backdrop = s.getRgb(a.backdrop, 0); - } - n.addOp(r.OPS.beginGroup, [d]); - } - const p = g ? [h, null] : [h, f]; - n.addOp(r.OPS.paintFormXObjectBegin, p); - return this.getOperatorList({ - stream: t, - task: s, - resources: l.get("Resources") || e, - operatorList: n, - initialState: o, - }).then(function () { - n.addOp(r.OPS.paintFormXObjectEnd, []); - g && n.addOp(r.OPS.endGroup, [d]); - void 0 !== u && n.addOp(r.OPS.endMarkedContent, []); - }); - } - _sendImgData(e, t, a = !1) { - const r = t ? [t.bitmap || t.data.buffer] : null; - return this.parsingType3Font || a - ? this.handler.send("commonobj", [e, "Image", t], r) - : this.handler.send("obj", [e, this.pageIndex, "Image", t], r); - } - async buildPaintImageXObject({ - resources: e, - image: t, - isInline: a = !1, - operatorList: n, - cacheKey: i, - localImageCache: s, - localColorSpaceCache: o, - }) { - const c = t.dict, - l = c.objId, - h = c.get("W", "Width"), - u = c.get("H", "Height"); - if (!h || "number" != typeof h || !u || "number" != typeof u) { - (0, r.warn)("Image dimensions are missing, or not numbers."); - return; - } - const d = this.options.maxImageSize; - if (-1 !== d && h * u > d) { - const e = - "Image exceeded maximum allowed size and was removed."; - if (this.options.ignoreErrors) { - (0, r.warn)(e); - return; - } - throw new Error(e); - } - let f; - c.has("OC") && - (f = await this.parseMarkedContentProps(c.get("OC"), e)); - let g, p; - if (c.get("IM", "ImageMask") || !1) { - const e = c.get("I", "Interpolate"), - a = (h + 7) >> 3, - o = t.getBytes(a * u), - d = c.getArray("D", "Decode"); - if (this.parsingType3Font) { - g = M.PDFImage.createRawMask({ - imgArray: o, - width: h, - height: u, - imageIsFromDecodeStream: t instanceof w.DecodeStream, - inverseDecode: d?.[0] > 0, - interpolate: e, - }); - g.cached = !!i; - p = [g]; - n.addImageOps(r.OPS.paintImageMaskXObject, p, f); - if (i) { - const e = { - fn: r.OPS.paintImageMaskXObject, - args: p, - optionalContent: f, - }; - s.set(i, l, e); - l && this._regionalImageCache.set(null, l, e); - } - return; - } - g = await M.PDFImage.createMask({ - imgArray: o, - width: h, - height: u, - imageIsFromDecodeStream: t instanceof w.DecodeStream, - inverseDecode: d?.[0] > 0, - interpolate: e, - isOffscreenCanvasSupported: - this.options.isOffscreenCanvasSupported, - }); - if (g.isSingleOpaquePixel) { - n.addImageOps(r.OPS.paintSolidColorImageMask, [], f); - if (i) { - const e = { - fn: r.OPS.paintSolidColorImageMask, - args: [], - optionalContent: f, - }; - s.set(i, l, e); - l && this._regionalImageCache.set(null, l, e); - } - return; - } - const m = `mask_${this.idFactory.createObjId()}`; - n.addDependency(m); - this._sendImgData(m, g); - p = [ - { - data: m, - width: g.width, - height: g.height, - interpolate: g.interpolate, - count: 1, - }, - ]; - n.addImageOps(r.OPS.paintImageMaskXObject, p, f); - if (i) { - const e = { - fn: r.OPS.paintImageMaskXObject, - args: p, - optionalContent: f, - }; - s.set(i, l, e); - l && this._regionalImageCache.set(null, l, e); - } - return; - } - if (a && !c.has("SMask") && !c.has("Mask") && h + u < 200) { - const i = new M.PDFImage({ - xref: this.xref, - res: e, - image: t, - isInline: a, - pdfFunctionFactory: this._pdfFunctionFactory, - localColorSpaceCache: o, - }); - g = await i.createImageData(!0, !1); - n.isOffscreenCanvasSupported = - this.options.isOffscreenCanvasSupported; - n.addImageOps(r.OPS.paintInlineImageXObject, [g], f); - return; - } - let m = `img_${this.idFactory.createObjId()}`, - b = !1; - if (this.parsingType3Font) - m = `${this.idFactory.getDocId()}_type3_${m}`; - else if (l) { - b = this.globalImageCache.shouldCache(l, this.pageIndex); - b && (m = `${this.idFactory.getDocId()}_${m}`); - } - n.addDependency(m); - p = [m, h, u]; - M.PDFImage.buildImage({ - xref: this.xref, - res: e, - image: t, - isInline: a, - pdfFunctionFactory: this._pdfFunctionFactory, - localColorSpaceCache: o, - }) - .then(async (e) => { - g = await e.createImageData( - !1, - this.options.isOffscreenCanvasSupported, - ); - if (i && l && b) { - const e = g.bitmap ? g.width * g.height * 4 : g.data.length; - this.globalImageCache.addByteSize(l, e); - } - return this._sendImgData(m, g, b); - }) - .catch((e) => { - (0, r.warn)(`Unable to decode image "${m}": "${e}".`); - return this._sendImgData(m, null, b); - }); - n.addImageOps(r.OPS.paintImageXObject, p, f); - if (i) { - const e = { - fn: r.OPS.paintImageXObject, - args: p, - optionalContent: f, - }; - s.set(i, l, e); - if (l) { - this._regionalImageCache.set(null, l, e); - if (b) { - (0, r.assert)(!a, "Cannot cache an inline image globally."); - this.globalImageCache.setData(l, { - objId: m, - fn: r.OPS.paintImageXObject, - args: p, - optionalContent: f, - byteSize: 0, - }); - } - } - } - } - handleSMask(e, t, a, r, n, i) { - const s = e.get("G"), - o = { subtype: e.get("S").name, backdrop: e.get("BC") }, - c = e.get("TR"); - if ((0, d.isPDFFunction)(c)) { - const e = this._pdfFunctionFactory.create(c), - t = new Uint8Array(256), - a = new Float32Array(1); - for (let r = 0; r < 256; r++) { - a[0] = r / 255; - e(a, 0, a, 0); - t[r] = (255 * a[0]) | 0; - } - o.transferMap = t; - } - return this.buildFormXObject(t, s, o, a, r, n.state.clone(), i); - } - handleTransferFunction(e) { - let t; - if (Array.isArray(e)) t = e; - else { - if (!(0, d.isPDFFunction)(e)) return null; - t = [e]; - } - const a = []; - let r = 0, - n = 0; - for (const e of t) { - const t = this.xref.fetchIfRef(e); - r++; - if ((0, i.isName)(t, "Identity")) { - a.push(null); - continue; - } - if (!(0, d.isPDFFunction)(t)) return null; - const s = this._pdfFunctionFactory.create(t), - o = new Uint8Array(256), - c = new Float32Array(1); - for (let e = 0; e < 256; e++) { - c[0] = e / 255; - s(c, 0, c, 0); - o[e] = (255 * c[0]) | 0; - } - a.push(o); - n++; - } - return (1 !== r && 4 !== r) || 0 === n ? null : a; - } - handleTilingType(e, t, a, n, s, o, c, h) { - const u = new T.OperatorList(), - d = i.Dict.merge({ - xref: this.xref, - dictArray: [s.get("Resources"), a], - }); - return this.getOperatorList({ - stream: n, - task: c, - resources: d, - operatorList: u, - }) - .then(function () { - const a = u.getIR(), - r = (0, l.getTilingPatternIR)(a, s, t); - o.addDependencies(u.dependencies); - o.addOp(e, r); - s.objId && - h.set(null, s.objId, { operatorListIR: a, dict: s }); - }) - .catch((e) => { - if (!(e instanceof r.AbortException)) { - if (!this.options.ignoreErrors) throw e; - (0, r.warn)(`handleTilingType - ignoring pattern: "${e}".`); - } - }); - } - handleSetFont(e, t, a, r, n, o, c = null, l = null) { - const h = t?.[0] instanceof i.Name ? t[0].name : null; - return this.loadFont(h, a, e, c, l) - .then((t) => - t.font.isType3Font - ? t - .loadType3Data(this, e, n) - .then(function () { - r.addDependencies(t.type3Dependencies); - return t; - }) - .catch( - (e) => - new TranslatedFont({ - loadedName: "g_font_error", - font: new s.ErrorFont( - `Type3 font load error: ${e}`, - ), - dict: t.font, - evaluatorOptions: this.options, - }), - ) - : t, - ) - .then((e) => { - o.font = e.font; - e.send(this.handler); - return e.loadedName; - }); - } - handleText(e, t) { - const a = t.font, - n = a.charsToGlyphs(e); - if (a.data) { - (!!( - t.textRenderingMode & r.TextRenderingMode.ADD_TO_PATH_FLAG - ) || - "Pattern" === t.fillColorSpace.name || - a.disableFontFace || - this.options.disableFontFace) && - PartialEvaluator.buildFontPaths( - a, - n, - this.handler, - this.options, - ); - } - return n; - } - ensureStateFont(e) { - if (e.font) return; - const t = new r.FormatError( - "Missing setFont (Tf) operator before text rendering operator.", - ); - if (!this.options.ignoreErrors) throw t; - (0, r.warn)(`ensureStateFont: "${t}".`); - } - async setGState({ - resources: e, - gState: t, - operatorList: a, - cacheKey: n, - task: s, - stateManager: o, - localGStateCache: c, - localColorSpaceCache: l, - }) { - const h = t.objId; - let u = !0; - const d = []; - let f = Promise.resolve(); - for (const n of t.getKeys()) { - const c = t.get(n); - switch (n) { - case "Type": - break; - case "LW": - case "LC": - case "LJ": - case "ML": - case "D": - case "RI": - case "FL": - case "CA": - case "ca": - d.push([n, c]); - break; - case "Font": - u = !1; - f = f.then(() => - this.handleSetFont(e, null, c[0], a, s, o.state).then( - function (e) { - a.addDependency(e); - d.push([n, [e, c[1]]]); - }, - ), - ); - break; - case "BM": - d.push([n, normalizeBlendMode(c)]); - break; - case "SMask": - if ((0, i.isName)(c, "None")) { - d.push([n, !1]); - break; - } - if (c instanceof i.Dict) { - u = !1; - f = f.then(() => this.handleSMask(c, e, a, s, o, l)); - d.push([n, !0]); - } else (0, r.warn)("Unsupported SMask type"); - break; - case "TR": - const t = this.handleTransferFunction(c); - d.push([n, t]); - break; - case "OP": - case "op": - case "OPM": - case "BG": - case "BG2": - case "UCR": - case "UCR2": - case "TR2": - case "HT": - case "SM": - case "SA": - case "AIS": - case "TK": - (0, r.info)("graphic state operator " + n); - break; - default: - (0, r.info)("Unknown graphic state operator " + n); - } - } - return f.then(function () { - d.length > 0 && a.addOp(r.OPS.setGState, [d]); - u && c.set(n, h, d); - }); - } - loadFont(e, t, a, n = null, o = null) { - const errorFont = async () => - new TranslatedFont({ - loadedName: "g_font_error", - font: new s.ErrorFont(`Font "${e}" is not available.`), - dict: t, - evaluatorOptions: this.options, - }); - let c; - if (t) t instanceof i.Ref && (c = t); - else { - const t = a.get("Font"); - t && (c = t.getRaw(e)); - } - if (c) { - if (this.parsingType3Font && this.type3FontRefs.has(c)) - return errorFont(); - if (this.fontCache.has(c)) return this.fontCache.get(c); - t = this.xref.fetchIfRef(c); - } - if (!(t instanceof i.Dict)) { - if (!this.options.ignoreErrors && !this.parsingType3Font) { - (0, r.warn)(`Font "${e}" is not available.`); - return errorFont(); - } - (0, r.warn)( - `Font "${e}" is not available -- attempting to fallback to a default font.`, - ); - t = n || PartialEvaluator.fallbackFontDict; - } - if (t.cacheKey && this.fontCache.has(t.cacheKey)) - return this.fontCache.get(t.cacheKey); - const l = new r.PromiseCapability(); - let h; - try { - h = this.preEvaluateFont(t); - h.cssFontInfo = o; - } catch (e) { - (0, r.warn)(`loadFont - preEvaluateFont failed: "${e}".`); - return errorFont(); - } - const { descriptor: u, hash: d } = h, - f = c instanceof i.Ref; - let g; - if (d && u instanceof i.Dict) { - const e = (u.fontAliases ||= Object.create(null)); - if (e[d]) { - const t = e[d].aliasRef; - if (f && t && this.fontCache.has(t)) { - this.fontCache.putAlias(c, t); - return this.fontCache.get(c); - } - } else e[d] = { fontID: this.idFactory.createFontId() }; - f && (e[d].aliasRef = c); - g = e[d].fontID; - } else g = this.idFactory.createFontId(); - (0, r.assert)( - g?.startsWith("f"), - 'The "fontID" must be (correctly) defined.', - ); - if (f) this.fontCache.put(c, l.promise); - else { - t.cacheKey = `cacheKey_${g}`; - this.fontCache.put(t.cacheKey, l.promise); - } - t.loadedName = `${this.idFactory.getDocId()}_${g}`; - this.translateFont(h) - .then((e) => { - l.resolve( - new TranslatedFont({ - loadedName: t.loadedName, - font: e, - dict: t, - evaluatorOptions: this.options, - }), - ); - }) - .catch((e) => { - (0, r.warn)(`loadFont - translateFont failed: "${e}".`); - l.resolve( - new TranslatedFont({ - loadedName: t.loadedName, - font: new s.ErrorFont(e instanceof Error ? e.message : e), - dict: t, - evaluatorOptions: this.options, - }), - ); - }); - return l.promise; - } - buildPath(e, t, a, n = !1) { - const i = e.length - 1; - a || (a = []); - if (i < 0 || e.fnArray[i] !== r.OPS.constructPath) { - if (n) { - (0, r.warn)( - `Encountered path operator "${t}" inside of a text object.`, - ); - e.addOp(r.OPS.save, null); - } - let i; - switch (t) { - case r.OPS.rectangle: - const e = a[0] + a[2], - t = a[1] + a[3]; - i = [ - Math.min(a[0], e), - Math.max(a[0], e), - Math.min(a[1], t), - Math.max(a[1], t), - ]; - break; - case r.OPS.moveTo: - case r.OPS.lineTo: - i = [a[0], a[0], a[1], a[1]]; - break; - default: - i = [1 / 0, -1 / 0, 1 / 0, -1 / 0]; - } - e.addOp(r.OPS.constructPath, [[t], a, i]); - n && e.addOp(r.OPS.restore, null); - } else { - const n = e.argsArray[i]; - n[0].push(t); - n[1].push(...a); - const s = n[2]; - switch (t) { - case r.OPS.rectangle: - const e = a[0] + a[2], - t = a[1] + a[3]; - s[0] = Math.min(s[0], a[0], e); - s[1] = Math.max(s[1], a[0], e); - s[2] = Math.min(s[2], a[1], t); - s[3] = Math.max(s[3], a[1], t); - break; - case r.OPS.moveTo: - case r.OPS.lineTo: - s[0] = Math.min(s[0], a[0]); - s[1] = Math.max(s[1], a[0]); - s[2] = Math.min(s[2], a[1]); - s[3] = Math.max(s[3], a[1]); - } - } - } - parseColorSpace({ cs: e, resources: t, localColorSpaceCache: a }) { - return y.ColorSpace.parseAsync({ - cs: e, - xref: this.xref, - resources: t, - pdfFunctionFactory: this._pdfFunctionFactory, - localColorSpaceCache: a, - }).catch((e) => { - if (e instanceof r.AbortException) return null; - if (this.options.ignoreErrors) { - (0, r.warn)(`parseColorSpace - ignoring ColorSpace: "${e}".`); - return null; - } - throw e; - }); - } - parseShading({ - shading: e, - resources: t, - localColorSpaceCache: a, - localShadingPatternCache: r, - }) { - let n = r.get(e); - if (!n) { - const i = l.Pattern.parseShading( - e, - this.xref, - t, - this._pdfFunctionFactory, - a, - ).getIR(); - n = `pattern_${this.idFactory.createObjId()}`; - this.parsingType3Font && - (n = `${this.idFactory.getDocId()}_type3_${n}`); - r.set(e, n); - this.parsingType3Font - ? this.handler.send("commonobj", [n, "Pattern", i]) - : this.handler.send("obj", [n, this.pageIndex, "Pattern", i]); - } - return n; - } - handleColorN(e, t, a, n, s, o, c, h, u, d) { - const f = a.pop(); - if (f instanceof i.Name) { - const g = s.getRaw(f.name), - p = g instanceof i.Ref && u.getByRef(g); - if (p) - try { - const r = n.base ? n.base.getRgb(a, 0) : null, - i = (0, l.getTilingPatternIR)( - p.operatorListIR, - p.dict, - r, - ); - e.addOp(t, i); - return; - } catch {} - const b = this.xref.fetchIfRef(g); - if (b) { - const i = b instanceof m.BaseStream ? b.dict : b, - s = i.get("PatternType"); - if (s === E) { - const r = n.base ? n.base.getRgb(a, 0) : null; - return this.handleTilingType(t, r, o, b, i, e, c, u); - } - if (s === N) { - const a = i.get("Shading"), - r = i.getArray("Matrix"), - n = this.parseShading({ - shading: a, - resources: o, - localColorSpaceCache: h, - localShadingPatternCache: d, - }); - e.addOp(t, ["Shading", n, r]); - return; - } - throw new r.FormatError(`Unknown PatternType: ${s}`); - } - } - throw new r.FormatError(`Unknown PatternName: ${f}`); - } - _parseVisibilityExpression(e, t, a) { - if (++t > 10) { - (0, r.warn)("Visibility expression is too deeply nested"); - return; - } - const n = e.length, - s = this.xref.fetchIfRef(e[0]); - if (!(n < 2) && s instanceof i.Name) { - switch (s.name) { - case "And": - case "Or": - case "Not": - a.push(s.name); - break; - default: - (0, r.warn)( - `Invalid operator ${s.name} in visibility expression`, - ); - return; - } - for (let r = 1; r < n; r++) { - const n = e[r], - s = this.xref.fetchIfRef(n); - if (Array.isArray(s)) { - const e = []; - a.push(e); - this._parseVisibilityExpression(s, t, e); - } else n instanceof i.Ref && a.push(n.toString()); - } - } else (0, r.warn)("Invalid visibility expression"); - } - async parseMarkedContentProps(e, t) { - let a; - if (e instanceof i.Name) { - a = t.get("Properties").get(e.name); - } else { - if (!(e instanceof i.Dict)) - throw new r.FormatError( - "Optional content properties malformed.", - ); - a = e; - } - const n = a.get("Type")?.name; - if ("OCG" === n) return { type: n, id: a.objId }; - if ("OCMD" === n) { - const e = a.get("VE"); - if (Array.isArray(e)) { - const t = []; - this._parseVisibilityExpression(e, 0, t); - if (t.length > 0) return { type: "OCMD", expression: t }; - } - const t = a.get("OCGs"); - if (Array.isArray(t) || t instanceof i.Dict) { - const e = []; - if (Array.isArray(t)) for (const a of t) e.push(a.toString()); - else e.push(t.objId); - return { - type: n, - ids: e, - policy: - a.get("P") instanceof i.Name ? a.get("P").name : null, - expression: null, - }; - } - if (t instanceof i.Ref) return { type: n, id: t.toString() }; - } - return null; - } - getOperatorList({ - stream: e, - task: t, - resources: a, - operatorList: n, - initialState: s = null, - fallbackFontDict: o = null, - }) { - a ||= i.Dict.empty; - s ||= new EvalState(); - if (!n) - throw new Error( - 'getOperatorList: missing "operatorList" parameter', - ); - const c = this, - l = this.xref; - let h = !1; - const u = new g.LocalImageCache(), - d = new g.LocalColorSpaceCache(), - f = new g.LocalGStateCache(), - p = new g.LocalTilingPatternCache(), - b = new Map(), - w = a.get("XObject") || i.Dict.empty, - S = a.get("Pattern") || i.Dict.empty, - x = new StateManager(s), - C = new EvaluatorPreprocessor(e, l, x), - k = new TimeSlotManager(); - function closePendingRestoreOPS(e) { - for (let e = 0, t = C.savedStatesDepth; e < t; e++) - n.addOp(r.OPS.restore, []); - } - return new Promise(function promiseBody(e, s) { - const next = function (t) { - Promise.all([t, n.ready]).then(function () { - try { - promiseBody(e, s); - } catch (e) { - s(e); - } - }, s); - }; - t.ensureNotTerminated(); - k.reset(); - const g = {}; - let v, F, O, T, M, D; - for (; !(v = k.check()); ) { - g.args = null; - if (!C.read(g)) break; - let e = g.args, - s = g.fn; - switch (0 | s) { - case r.OPS.paintXObject: - D = e[0] instanceof i.Name; - M = e[0].name; - if (D) { - const t = u.getByName(M); - if (t) { - n.addImageOps(t.fn, t.args, t.optionalContent); - incrementCachedImageMaskCount(t); - e = null; - continue; - } - } - next( - new Promise(function (e, s) { - if (!D) - throw new r.FormatError( - "XObject must be referred to by name.", - ); - let o = w.getRaw(M); - if (o instanceof i.Ref) { - const t = - u.getByRef(o) || - c._regionalImageCache.getByRef(o); - if (t) { - n.addImageOps(t.fn, t.args, t.optionalContent); - incrementCachedImageMaskCount(t); - e(); - return; - } - const a = c.globalImageCache.getData( - o, - c.pageIndex, - ); - if (a) { - n.addDependency(a.objId); - n.addImageOps(a.fn, a.args, a.optionalContent); - e(); - return; - } - o = l.fetch(o); - } - if (!(o instanceof m.BaseStream)) - throw new r.FormatError( - "XObject should be a stream", - ); - const h = o.dict.get("Subtype"); - if (!(h instanceof i.Name)) - throw new r.FormatError( - "XObject should have a Name subtype", - ); - if ("Form" !== h.name) - if ("Image" !== h.name) { - if ("PS" !== h.name) - throw new r.FormatError( - `Unhandled XObject subtype ${h.name}`, - ); - (0, r.info)("Ignored XObject subtype PS"); - e(); - } else - c.buildPaintImageXObject({ - resources: a, - image: o, - operatorList: n, - cacheKey: M, - localImageCache: u, - localColorSpaceCache: d, - }).then(e, s); - else { - x.save(); - c.buildFormXObject( - a, - o, - null, - n, - t, - x.state.clone(), - d, - ).then(function () { - x.restore(); - e(); - }, s); - } - }).catch(function (e) { - if (!(e instanceof r.AbortException)) { - if (!c.options.ignoreErrors) throw e; - (0, r.warn)( - `getOperatorList - ignoring XObject: "${e}".`, - ); - } - }), - ); - return; - case r.OPS.setFont: - var E = e[1]; - next( - c - .handleSetFont(a, e, null, n, t, x.state, o) - .then(function (e) { - n.addDependency(e); - n.addOp(r.OPS.setFont, [e, E]); - }), - ); - return; - case r.OPS.beginText: - h = !0; - break; - case r.OPS.endText: - h = !1; - break; - case r.OPS.endInlineImage: - var N = e[0].cacheKey; - if (N) { - const t = u.getByName(N); - if (t) { - n.addImageOps(t.fn, t.args, t.optionalContent); - incrementCachedImageMaskCount(t); - e = null; - continue; - } - } - next( - c.buildPaintImageXObject({ - resources: a, - image: e[0], - isInline: !0, - operatorList: n, - cacheKey: N, - localImageCache: u, - localColorSpaceCache: d, - }), - ); - return; - case r.OPS.showText: - if (!x.state.font) { - c.ensureStateFont(x.state); - continue; - } - e[0] = c.handleText(e[0], x.state); - break; - case r.OPS.showSpacedText: - if (!x.state.font) { - c.ensureStateFont(x.state); - continue; - } - var L = [], - $ = x.state; - for (const t of e[0]) - "string" == typeof t - ? L.push(...c.handleText(t, $)) - : "number" == typeof t && L.push(t); - e[0] = L; - s = r.OPS.showText; - break; - case r.OPS.nextLineShowText: - if (!x.state.font) { - c.ensureStateFont(x.state); - continue; - } - n.addOp(r.OPS.nextLine); - e[0] = c.handleText(e[0], x.state); - s = r.OPS.showText; - break; - case r.OPS.nextLineSetSpacingShowText: - if (!x.state.font) { - c.ensureStateFont(x.state); - continue; - } - n.addOp(r.OPS.nextLine); - n.addOp(r.OPS.setWordSpacing, [e.shift()]); - n.addOp(r.OPS.setCharSpacing, [e.shift()]); - e[0] = c.handleText(e[0], x.state); - s = r.OPS.showText; - break; - case r.OPS.setTextRenderingMode: - x.state.textRenderingMode = e[0]; - break; - case r.OPS.setFillColorSpace: { - const t = y.ColorSpace.getCached(e[0], l, d); - if (t) { - x.state.fillColorSpace = t; - continue; - } - next( - c - .parseColorSpace({ - cs: e[0], - resources: a, - localColorSpaceCache: d, - }) - .then(function (e) { - e && (x.state.fillColorSpace = e); - }), - ); - return; - } - case r.OPS.setStrokeColorSpace: { - const t = y.ColorSpace.getCached(e[0], l, d); - if (t) { - x.state.strokeColorSpace = t; - continue; - } - next( - c - .parseColorSpace({ - cs: e[0], - resources: a, - localColorSpaceCache: d, - }) - .then(function (e) { - e && (x.state.strokeColorSpace = e); - }), - ); - return; - } - case r.OPS.setFillColor: - T = x.state.fillColorSpace; - e = T.getRgb(e, 0); - s = r.OPS.setFillRGBColor; - break; - case r.OPS.setStrokeColor: - T = x.state.strokeColorSpace; - e = T.getRgb(e, 0); - s = r.OPS.setStrokeRGBColor; - break; - case r.OPS.setFillGray: - x.state.fillColorSpace = y.ColorSpace.singletons.gray; - e = y.ColorSpace.singletons.gray.getRgb(e, 0); - s = r.OPS.setFillRGBColor; - break; - case r.OPS.setStrokeGray: - x.state.strokeColorSpace = y.ColorSpace.singletons.gray; - e = y.ColorSpace.singletons.gray.getRgb(e, 0); - s = r.OPS.setStrokeRGBColor; - break; - case r.OPS.setFillCMYKColor: - x.state.fillColorSpace = y.ColorSpace.singletons.cmyk; - e = y.ColorSpace.singletons.cmyk.getRgb(e, 0); - s = r.OPS.setFillRGBColor; - break; - case r.OPS.setStrokeCMYKColor: - x.state.strokeColorSpace = y.ColorSpace.singletons.cmyk; - e = y.ColorSpace.singletons.cmyk.getRgb(e, 0); - s = r.OPS.setStrokeRGBColor; - break; - case r.OPS.setFillRGBColor: - x.state.fillColorSpace = y.ColorSpace.singletons.rgb; - e = y.ColorSpace.singletons.rgb.getRgb(e, 0); - break; - case r.OPS.setStrokeRGBColor: - x.state.strokeColorSpace = y.ColorSpace.singletons.rgb; - e = y.ColorSpace.singletons.rgb.getRgb(e, 0); - break; - case r.OPS.setFillColorN: - T = x.state.fillColorSpace; - if ("Pattern" === T.name) { - next( - c.handleColorN( - n, - r.OPS.setFillColorN, - e, - T, - S, - a, - t, - d, - p, - b, - ), - ); - return; - } - e = T.getRgb(e, 0); - s = r.OPS.setFillRGBColor; - break; - case r.OPS.setStrokeColorN: - T = x.state.strokeColorSpace; - if ("Pattern" === T.name) { - next( - c.handleColorN( - n, - r.OPS.setStrokeColorN, - e, - T, - S, - a, - t, - d, - p, - b, - ), - ); - return; - } - e = T.getRgb(e, 0); - s = r.OPS.setStrokeRGBColor; - break; - case r.OPS.shadingFill: - var _ = a.get("Shading"); - if (!_) - throw new r.FormatError("No shading resource found"); - var j = _.get(e[0].name); - if (!j) - throw new r.FormatError("No shading object found"); - e = [ - c.parseShading({ - shading: j, - resources: a, - localColorSpaceCache: d, - localShadingPatternCache: b, - }), - ]; - s = r.OPS.shadingFill; - break; - case r.OPS.setGState: - D = e[0] instanceof i.Name; - M = e[0].name; - if (D) { - const t = f.getByName(M); - if (t) { - t.length > 0 && n.addOp(r.OPS.setGState, [t]); - e = null; - continue; - } - } - next( - new Promise(function (e, s) { - if (!D) - throw new r.FormatError( - "GState must be referred to by name.", - ); - const o = a.get("ExtGState"); - if (!(o instanceof i.Dict)) - throw new r.FormatError( - "ExtGState should be a dictionary.", - ); - const l = o.get(M); - if (!(l instanceof i.Dict)) - throw new r.FormatError( - "GState should be a dictionary.", - ); - c.setGState({ - resources: a, - gState: l, - operatorList: n, - cacheKey: M, - task: t, - stateManager: x, - localGStateCache: f, - localColorSpaceCache: d, - }).then(e, s); - }).catch(function (e) { - if (!(e instanceof r.AbortException)) { - if (!c.options.ignoreErrors) throw e; - (0, r.warn)( - `getOperatorList - ignoring ExtGState: "${e}".`, - ); - } - }), - ); - return; - case r.OPS.moveTo: - case r.OPS.lineTo: - case r.OPS.curveTo: - case r.OPS.curveTo2: - case r.OPS.curveTo3: - case r.OPS.closePath: - case r.OPS.rectangle: - c.buildPath(n, s, e, h); - continue; - case r.OPS.markPoint: - case r.OPS.markPointProps: - case r.OPS.beginCompat: - case r.OPS.endCompat: - continue; - case r.OPS.beginMarkedContentProps: - if (!(e[0] instanceof i.Name)) { - (0, r.warn)( - `Expected name for beginMarkedContentProps arg0=${e[0]}`, - ); - continue; - } - if ("OC" === e[0].name) { - next( - c - .parseMarkedContentProps(e[1], a) - .then((e) => { - n.addOp(r.OPS.beginMarkedContentProps, ["OC", e]); - }) - .catch((e) => { - if (!(e instanceof r.AbortException)) { - if (!c.options.ignoreErrors) throw e; - (0, r.warn)( - `getOperatorList - ignoring beginMarkedContentProps: "${e}".`, - ); - } - }), - ); - return; - } - e = [ - e[0].name, - e[1] instanceof i.Dict ? e[1].get("MCID") : null, - ]; - break; - case r.OPS.beginMarkedContent: - case r.OPS.endMarkedContent: - default: - if (null !== e) { - for ( - F = 0, O = e.length; - F < O && !(e[F] instanceof i.Dict); - F++ - ); - if (F < O) { - (0, r.warn)( - "getOperatorList - ignoring operator: " + s, - ); - continue; - } - } - } - n.addOp(s, e); - } - if (v) next(R); - else { - closePendingRestoreOPS(); - e(); - } - }).catch((e) => { - if (!(e instanceof r.AbortException)) { - if (!this.options.ignoreErrors) throw e; - (0, r.warn)( - `getOperatorList - ignoring errors during "${t.name}" task: "${e}".`, - ); - closePendingRestoreOPS(); - } - }); - } - getTextContent({ - stream: e, - task: t, - resources: a, - stateManager: n = null, - includeMarkedContent: s = !1, - sink: o, - seenStyles: c = new Set(), - viewBox: l, - markedContentData: h = null, - disableNormalization: u = !1, - }) { - a ||= i.Dict.empty; - n ||= new StateManager(new TextState()); - s && (h ||= { level: 0 }); - const d = { items: [], styles: Object.create(null) }, - f = { - initialized: !1, - str: [], - totalWidth: 0, - totalHeight: 0, - width: 0, - height: 0, - vertical: !1, - prevTransform: null, - textAdvanceScale: 0, - spaceInFlowMin: 0, - spaceInFlowMax: 0, - trackingSpaceMin: 1 / 0, - negativeSpaceMax: -1 / 0, - notASpace: -1 / 0, - transform: null, - fontName: null, - hasEOL: !1, - }, - p = [" ", " "]; - let y = 0; - function saveLastChar(e) { - const t = (y + 1) % 2, - a = " " !== p[y] && " " === p[t]; - p[y] = e; - y = t; - return a; - } - function shouldAddWhitepsace() { - return " " !== p[y] && " " === p[(y + 1) % 2]; - } - function resetLastChars() { - p[0] = p[1] = " "; - y = 0; - } - const w = this, - S = this.xref, - x = []; - let C = null; - const k = new g.LocalImageCache(), - v = new g.LocalGStateCache(), - F = new EvaluatorPreprocessor(e, S, n); - let O; - function pushWhitespace({ - width: e = 0, - height: t = 0, - transform: a = f.prevTransform, - fontName: r = f.fontName, - }) { - d.items.push({ - str: " ", - dir: "ltr", - width: e, - height: t, - transform: a, - fontName: r, - hasEOL: !1, - }); - } - function getCurrentTextTransform() { - const e = O.font, - t = [ - O.fontSize * O.textHScale, - 0, - 0, - O.fontSize, - 0, - O.textRise, - ]; - if ( - e.isType3Font && - (O.fontSize <= 1 || e.isCharBBox) && - !(0, r.isArrayEqual)(O.fontMatrix, r.FONT_IDENTITY_MATRIX) - ) { - const a = e.bbox[3] - e.bbox[1]; - a > 0 && (t[3] *= a * O.fontMatrix[3]); - } - return r.Util.transform( - O.ctm, - r.Util.transform(O.textMatrix, t), - ); - } - function ensureTextContentItem() { - if (f.initialized) return f; - const { font: e, loadedName: t } = O; - if (!c.has(t)) { - c.add(t); - d.styles[t] = { - fontFamily: e.fallbackName, - ascent: e.ascent, - descent: e.descent, - vertical: e.vertical, - }; - } - f.fontName = t; - const a = (f.transform = getCurrentTextTransform()); - if (e.vertical) { - f.width = f.totalWidth = Math.hypot(a[0], a[1]); - f.height = f.totalHeight = 0; - f.vertical = !0; - } else { - f.width = f.totalWidth = 0; - f.height = f.totalHeight = Math.hypot(a[2], a[3]); - f.vertical = !1; - } - const r = Math.hypot(O.textLineMatrix[0], O.textLineMatrix[1]), - n = Math.hypot(O.ctm[0], O.ctm[1]); - f.textAdvanceScale = n * r; - const { fontSize: i } = O; - f.trackingSpaceMin = 0.102 * i; - f.notASpace = 0.03 * i; - f.negativeSpaceMax = -0.2 * i; - f.spaceInFlowMin = 0.102 * i; - f.spaceInFlowMax = 0.6 * i; - f.hasEOL = !1; - f.initialized = !0; - return f; - } - function updateAdvanceScale() { - if (!f.initialized) return; - const e = Math.hypot(O.textLineMatrix[0], O.textLineMatrix[1]), - t = Math.hypot(O.ctm[0], O.ctm[1]) * e; - if (t !== f.textAdvanceScale) { - if (f.vertical) { - f.totalHeight += f.height * f.textAdvanceScale; - f.height = 0; - } else { - f.totalWidth += f.width * f.textAdvanceScale; - f.width = 0; - } - f.textAdvanceScale = t; - } - } - function handleSetFont(e, n) { - return w - .loadFont(e, n, a) - .then(function (e) { - return e.font.isType3Font - ? e - .loadType3Data(w, a, t) - .catch(function () {}) - .then(function () { - return e; - }) - : e; - }) - .then(function (e) { - O.loadedName = e.loadedName; - O.font = e.font; - O.fontMatrix = e.font.fontMatrix || r.FONT_IDENTITY_MATRIX; - }); - } - function applyInverseRotation(e, t, a) { - const r = Math.hypot(a[0], a[1]); - return [(a[0] * e + a[1] * t) / r, (a[2] * e + a[3] * t) / r]; - } - function compareWithLastPosition(e) { - const t = getCurrentTextTransform(); - let a = t[4], - r = t[5]; - if (O.font?.vertical) { - if (a < l[0] || a > l[2] || r + e < l[1] || r > l[3]) - return !1; - } else if (a + e < l[0] || a > l[2] || r < l[1] || r > l[3]) - return !1; - if (!O.font || !f.prevTransform) return !0; - let n = f.prevTransform[4], - i = f.prevTransform[5]; - if (n === a && i === r) return !0; - let s = -1; - t[0] && 0 === t[1] && 0 === t[2] - ? (s = t[0] > 0 ? 0 : 180) - : t[1] && - 0 === t[0] && - 0 === t[3] && - (s = t[1] > 0 ? 90 : 270); - switch (s) { - case 0: - break; - case 90: - [a, r] = [r, a]; - [n, i] = [i, n]; - break; - case 180: - [a, r, n, i] = [-a, -r, -n, -i]; - break; - case 270: - [a, r] = [-r, -a]; - [n, i] = [-i, -n]; - break; - default: - [a, r] = applyInverseRotation(a, r, t); - [n, i] = applyInverseRotation(n, i, f.prevTransform); - } - if (O.font.vertical) { - const e = (i - r) / f.textAdvanceScale, - t = a - n, - s = Math.sign(f.height); - if (e < s * f.negativeSpaceMax) { - if (Math.abs(t) > 0.5 * f.width) { - appendEOL(); - return !0; - } - resetLastChars(); - flushTextContentItem(); - return !0; - } - if (Math.abs(t) > f.width) { - appendEOL(); - return !0; - } - e <= s * f.notASpace && resetLastChars(); - if (e <= s * f.trackingSpaceMin) - if (shouldAddWhitepsace()) { - resetLastChars(); - flushTextContentItem(); - pushWhitespace({ height: Math.abs(e) }); - } else f.height += e; - else if (!addFakeSpaces(e, f.prevTransform, s)) - if (0 === f.str.length) { - resetLastChars(); - pushWhitespace({ height: Math.abs(e) }); - } else f.height += e; - Math.abs(t) > 0.25 * f.width && flushTextContentItem(); - return !0; - } - const o = (a - n) / f.textAdvanceScale, - c = r - i, - h = Math.sign(f.width); - if (o < h * f.negativeSpaceMax) { - if (Math.abs(c) > 0.5 * f.height) { - appendEOL(); - return !0; - } - resetLastChars(); - flushTextContentItem(); - return !0; - } - if (Math.abs(c) > f.height) { - appendEOL(); - return !0; - } - o <= h * f.notASpace && resetLastChars(); - if (o <= h * f.trackingSpaceMin) - if (shouldAddWhitepsace()) { - resetLastChars(); - flushTextContentItem(); - pushWhitespace({ width: Math.abs(o) }); - } else f.width += o; - else if (!addFakeSpaces(o, f.prevTransform, h)) - if (0 === f.str.length) { - resetLastChars(); - pushWhitespace({ width: Math.abs(o) }); - } else f.width += o; - Math.abs(c) > 0.25 * f.height && flushTextContentItem(); - return !0; - } - function buildTextContentItem({ chars: e, extraSpacing: t }) { - const a = O.font; - if (!e) { - const e = O.charSpacing + t; - e && - (a.vertical - ? O.translateTextMatrix(0, -e) - : O.translateTextMatrix(e * O.textHScale, 0)); - return; - } - const r = a.charsToGlyphs(e), - n = O.fontMatrix[0] * O.fontSize; - for (let e = 0, i = r.length; e < i; e++) { - const s = r[e], - { category: o } = s; - if (o.isInvisibleFormatMark) continue; - let c = O.charSpacing + (e + 1 === i ? t : 0), - l = s.width; - a.vertical && (l = s.vmetric ? s.vmetric[0] : -l); - let h = l * n; - if (o.isWhitespace) { - if (a.vertical) { - c += -h + O.wordSpacing; - O.translateTextMatrix(0, -c); - } else { - c += h + O.wordSpacing; - O.translateTextMatrix(c * O.textHScale, 0); - } - saveLastChar(" "); - continue; - } - if (!o.isZeroWidthDiacritic && !compareWithLastPosition(h)) { - a.vertical - ? O.translateTextMatrix(0, h) - : O.translateTextMatrix(h * O.textHScale, 0); - continue; - } - const u = ensureTextContentItem(); - o.isZeroWidthDiacritic && (h = 0); - if (a.vertical) { - O.translateTextMatrix(0, h); - h = Math.abs(h); - u.height += h; - } else { - h *= O.textHScale; - O.translateTextMatrix(h, 0); - u.width += h; - } - h && (u.prevTransform = getCurrentTextTransform()); - const d = s.unicode; - saveLastChar(d) && u.str.push(" "); - u.str.push(d); - c && - (a.vertical - ? O.translateTextMatrix(0, -c) - : O.translateTextMatrix(c * O.textHScale, 0)); - } - } - function appendEOL() { - resetLastChars(); - if (f.initialized) { - f.hasEOL = !0; - flushTextContentItem(); - } else - d.items.push({ - str: "", - dir: "ltr", - width: 0, - height: 0, - transform: getCurrentTextTransform(), - fontName: O.loadedName, - hasEOL: !0, - }); - } - function addFakeSpaces(e, t, a) { - if (a * f.spaceInFlowMin <= e && e <= a * f.spaceInFlowMax) { - if (f.initialized) { - resetLastChars(); - f.str.push(" "); - } - return !1; - } - const r = f.fontName; - let n = 0; - if (f.vertical) { - n = e; - e = 0; - } - flushTextContentItem(); - resetLastChars(); - pushWhitespace({ - width: Math.abs(e), - height: Math.abs(n), - transform: t || getCurrentTextTransform(), - fontName: r, - }); - return !0; - } - function flushTextContentItem() { - if (f.initialized && f.str) { - f.vertical - ? (f.totalHeight += f.height * f.textAdvanceScale) - : (f.totalWidth += f.width * f.textAdvanceScale); - d.items.push( - (function runBidiTransform(e) { - let t = e.str.join(""); - u || (t = (0, r.normalizeUnicode)(t)); - const a = (0, b.bidi)(t, -1, e.vertical); - return { - str: a.str, - dir: a.dir, - width: Math.abs(e.totalWidth), - height: Math.abs(e.totalHeight), - transform: e.transform, - fontName: e.fontName, - hasEOL: e.hasEOL, - }; - })(f), - ); - f.initialized = !1; - f.str.length = 0; - } - } - function enqueueChunk(e = !1) { - const t = d.items.length; - if (0 !== t && !(e && t < 10)) { - o.enqueue(d, t); - d.items = []; - d.styles = Object.create(null); - } - } - const T = new TimeSlotManager(); - return new Promise(function promiseBody(e, f) { - const next = function (t) { - enqueueChunk(!0); - Promise.all([t, o.ready]).then(function () { - try { - promiseBody(e, f); - } catch (e) { - f(e); - } - }, f); - }; - t.ensureNotTerminated(); - T.reset(); - const g = {}; - let p, - b = []; - for (; !(p = T.check()); ) { - b.length = 0; - g.args = b; - if (!F.read(g)) break; - const e = O; - O = n.state; - const f = g.fn; - b = g.args; - switch (0 | f) { - case r.OPS.setFont: - var y = b[0].name, - M = b[1]; - if (O.font && y === O.fontName && M === O.fontSize) break; - flushTextContentItem(); - O.fontName = y; - O.fontSize = M; - next(handleSetFont(y, null)); - return; - case r.OPS.setTextRise: - O.textRise = b[0]; - break; - case r.OPS.setHScale: - O.textHScale = b[0] / 100; - break; - case r.OPS.setLeading: - O.leading = b[0]; - break; - case r.OPS.moveText: - O.translateTextLineMatrix(b[0], b[1]); - O.textMatrix = O.textLineMatrix.slice(); - break; - case r.OPS.setLeadingMoveText: - O.leading = -b[1]; - O.translateTextLineMatrix(b[0], b[1]); - O.textMatrix = O.textLineMatrix.slice(); - break; - case r.OPS.nextLine: - O.carriageReturn(); - break; - case r.OPS.setTextMatrix: - O.setTextMatrix(b[0], b[1], b[2], b[3], b[4], b[5]); - O.setTextLineMatrix(b[0], b[1], b[2], b[3], b[4], b[5]); - updateAdvanceScale(); - break; - case r.OPS.setCharSpacing: - O.charSpacing = b[0]; - break; - case r.OPS.setWordSpacing: - O.wordSpacing = b[0]; - break; - case r.OPS.beginText: - O.textMatrix = r.IDENTITY_MATRIX.slice(); - O.textLineMatrix = r.IDENTITY_MATRIX.slice(); - break; - case r.OPS.showSpacedText: - if (!n.state.font) { - w.ensureStateFont(n.state); - continue; - } - const f = ((O.font.vertical ? 1 : -1) * O.fontSize) / 1e3, - g = b[0]; - for (let e = 0, t = g.length; e < t; e++) { - const t = g[e]; - if ("string" == typeof t) x.push(t); - else if ("number" == typeof t && 0 !== t) { - const e = x.join(""); - x.length = 0; - buildTextContentItem({ - chars: e, - extraSpacing: t * f, - }); - } - } - if (x.length > 0) { - const e = x.join(""); - x.length = 0; - buildTextContentItem({ chars: e, extraSpacing: 0 }); - } - break; - case r.OPS.showText: - if (!n.state.font) { - w.ensureStateFont(n.state); - continue; - } - buildTextContentItem({ chars: b[0], extraSpacing: 0 }); - break; - case r.OPS.nextLineShowText: - if (!n.state.font) { - w.ensureStateFont(n.state); - continue; - } - O.carriageReturn(); - buildTextContentItem({ chars: b[0], extraSpacing: 0 }); - break; - case r.OPS.nextLineSetSpacingShowText: - if (!n.state.font) { - w.ensureStateFont(n.state); - continue; - } - O.wordSpacing = b[0]; - O.charSpacing = b[1]; - O.carriageReturn(); - buildTextContentItem({ chars: b[2], extraSpacing: 0 }); - break; - case r.OPS.paintXObject: - flushTextContentItem(); - C || (C = a.get("XObject") || i.Dict.empty); - var D = b[0] instanceof i.Name, - E = b[0].name; - if (D && k.getByName(E)) break; - next( - new Promise(function (e, d) { - if (!D) - throw new r.FormatError( - "XObject must be referred to by name.", - ); - let f = C.getRaw(E); - if (f instanceof i.Ref) { - if (k.getByRef(f)) { - e(); - return; - } - if (w.globalImageCache.getData(f, w.pageIndex)) { - e(); - return; - } - f = S.fetch(f); - } - if (!(f instanceof m.BaseStream)) - throw new r.FormatError( - "XObject should be a stream", - ); - const g = f.dict.get("Subtype"); - if (!(g instanceof i.Name)) - throw new r.FormatError( - "XObject should have a Name subtype", - ); - if ("Form" !== g.name) { - k.set(E, f.dict.objId, !0); - e(); - return; - } - const p = n.state.clone(), - b = new StateManager(p), - y = f.dict.getArray("Matrix"); - Array.isArray(y) && 6 === y.length && b.transform(y); - enqueueChunk(); - const x = { - enqueueInvoked: !1, - enqueue(e, t) { - this.enqueueInvoked = !0; - o.enqueue(e, t); - }, - get desiredSize() { - return o.desiredSize; - }, - get ready() { - return o.ready; - }, - }; - w.getTextContent({ - stream: f, - task: t, - resources: f.dict.get("Resources") || a, - stateManager: b, - includeMarkedContent: s, - sink: x, - seenStyles: c, - viewBox: l, - markedContentData: h, - disableNormalization: u, - }).then(function () { - x.enqueueInvoked || k.set(E, f.dict.objId, !0); - e(); - }, d); - }).catch(function (e) { - if (!(e instanceof r.AbortException)) { - if (!w.options.ignoreErrors) throw e; - (0, r.warn)( - `getTextContent - ignoring XObject: "${e}".`, - ); - } - }), - ); - return; - case r.OPS.setGState: - D = b[0] instanceof i.Name; - E = b[0].name; - if (D && v.getByName(E)) break; - next( - new Promise(function (e, t) { - if (!D) - throw new r.FormatError( - "GState must be referred to by name.", - ); - const n = a.get("ExtGState"); - if (!(n instanceof i.Dict)) - throw new r.FormatError( - "ExtGState should be a dictionary.", - ); - const s = n.get(E); - if (!(s instanceof i.Dict)) - throw new r.FormatError( - "GState should be a dictionary.", - ); - const o = s.get("Font"); - if (o) { - flushTextContentItem(); - O.fontName = null; - O.fontSize = o[1]; - handleSetFont(null, o[0]).then(e, t); - } else { - v.set(E, s.objId, !0); - e(); - } - }).catch(function (e) { - if (!(e instanceof r.AbortException)) { - if (!w.options.ignoreErrors) throw e; - (0, r.warn)( - `getTextContent - ignoring ExtGState: "${e}".`, - ); - } - }), - ); - return; - case r.OPS.beginMarkedContent: - flushTextContentItem(); - if (s) { - h.level++; - d.items.push({ - type: "beginMarkedContent", - tag: b[0] instanceof i.Name ? b[0].name : null, - }); - } - break; - case r.OPS.beginMarkedContentProps: - flushTextContentItem(); - if (s) { - h.level++; - let e = null; - b[1] instanceof i.Dict && (e = b[1].get("MCID")); - d.items.push({ - type: "beginMarkedContentProps", - id: Number.isInteger(e) - ? `${w.idFactory.getPageObjId()}_mc${e}` - : null, - tag: b[0] instanceof i.Name ? b[0].name : null, - }); - } - break; - case r.OPS.endMarkedContent: - flushTextContentItem(); - if (s) { - if (0 === h.level) break; - h.level--; - d.items.push({ type: "endMarkedContent" }); - } - break; - case r.OPS.restore: - !e || - (e.font === O.font && - e.fontSize === O.fontSize && - e.fontName === O.fontName) || - flushTextContentItem(); - } - if (d.items.length >= o.desiredSize) { - p = !0; - break; - } - } - if (p) next(R); - else { - flushTextContentItem(); - enqueueChunk(); - e(); - } - }).catch((e) => { - if (!(e instanceof r.AbortException)) { - if (!this.options.ignoreErrors) throw e; - (0, r.warn)( - `getTextContent - ignoring errors during "${t.name}" task: "${e}".`, - ); - flushTextContentItem(); - enqueueChunk(); - } - }); - } - extractDataStructures(e, t, a) { - const n = this.xref; - let s; - const l = this.readToUnicode( - a.toUnicode || e.get("ToUnicode") || t.get("ToUnicode"), - ); - if (a.composite) { - const t = e.get("CIDSystemInfo"); - t instanceof i.Dict && - (a.cidSystemInfo = { - registry: (0, r.stringToPDFString)(t.get("Registry")), - ordering: (0, r.stringToPDFString)(t.get("Ordering")), - supplement: t.get("Supplement"), - }); - try { - const t = e.get("CIDToGIDMap"); - t instanceof m.BaseStream && (s = t.getBytes()); - } catch (e) { - if (!this.options.ignoreErrors) throw e; - (0, r.warn)( - `extractDataStructures - ignoring CIDToGIDMap data: "${e}".`, - ); - } - } - const h = []; - let u, - d = null; - if (e.has("Encoding")) { - u = e.get("Encoding"); - if (u instanceof i.Dict) { - d = u.get("BaseEncoding"); - d = d instanceof i.Name ? d.name : null; - if (u.has("Differences")) { - const e = u.get("Differences"); - let t = 0; - for (const a of e) { - const e = n.fetchIfRef(a); - if ("number" == typeof e) t = e; - else { - if (!(e instanceof i.Name)) - throw new r.FormatError( - `Invalid entry in 'Differences' array: ${e}`, - ); - h[t++] = e.name; - } - } - } - } else if (u instanceof i.Name) d = u.name; - else { - const e = "Encoding is not a Name nor a Dict"; - if (!this.options.ignoreErrors) throw new r.FormatError(e); - (0, r.warn)(e); - } - "MacRomanEncoding" !== d && - "MacExpertEncoding" !== d && - "WinAnsiEncoding" !== d && - (d = null); - } - const f = !a.file || a.isInternalFont, - g = (0, c.getSymbolsFonts)()[a.name]; - d && f && g && (d = null); - if (d) a.defaultEncoding = (0, o.getEncoding)(d); - else { - const e = !!(a.flags & S.FontFlags.Symbolic), - t = !!(a.flags & S.FontFlags.Nonsymbolic); - u = o.StandardEncoding; - "TrueType" !== a.type || t || (u = o.WinAnsiEncoding); - if (e || g) { - u = o.MacRomanEncoding; - f && - (/Symbol/i.test(a.name) - ? (u = o.SymbolSetEncoding) - : /Dingbats/i.test(a.name) - ? (u = o.ZapfDingbatsEncoding) - : /Wingdings/i.test(a.name) && (u = o.WinAnsiEncoding)); - } - a.defaultEncoding = u; - } - a.differences = h; - a.baseEncodingName = d; - a.hasEncoding = !!d || h.length > 0; - a.dict = e; - return l - .then((e) => { - a.toUnicode = e; - return this.buildToUnicode(a); - }) - .then((e) => { - a.toUnicode = e; - s && (a.cidToGidMap = this.readCidToGidMap(s, e)); - return a; - }); - } - _simpleFontToUnicode(e, t = !1) { - (0, r.assert)(!e.composite, "Must be a simple font."); - const a = [], - n = e.defaultEncoding.slice(), - i = e.baseEncodingName, - s = e.differences; - for (const e in s) { - const t = s[e]; - ".notdef" !== t && (n[e] = t); - } - const c = (0, C.getGlyphsUnicode)(); - for (const r in n) { - let s = n[r]; - if ("" === s) continue; - let l = c[s]; - if (void 0 !== l) { - a[r] = String.fromCharCode(l); - continue; - } - let h = 0; - switch (s[0]) { - case "G": - 3 === s.length && (h = parseInt(s.substring(1), 16)); - break; - case "g": - 5 === s.length && (h = parseInt(s.substring(1), 16)); - break; - case "C": - case "c": - if (s.length >= 3 && s.length <= 4) { - const a = s.substring(1); - if (t) { - h = parseInt(a, 16); - break; - } - h = +a; - if (Number.isNaN(h) && Number.isInteger(parseInt(a, 16))) - return this._simpleFontToUnicode(e, !0); - } - break; - case "u": - l = (0, v.getUnicodeForGlyph)(s, c); - -1 !== l && (h = l); - break; - default: - switch (s) { - case "f_h": - case "f_t": - case "T_h": - a[r] = s.replaceAll("_", ""); - continue; - } - } - if (h > 0 && h <= 1114111 && Number.isInteger(h)) { - if (i && h === +r) { - const e = (0, o.getEncoding)(i); - if (e && (s = e[r])) { - a[r] = String.fromCharCode(c[s]); - continue; - } - } - a[r] = String.fromCodePoint(h); - } - } - return a; - } - async buildToUnicode(e) { - e.hasIncludedToUnicodeMap = e.toUnicode?.length > 0; - if (e.hasIncludedToUnicodeMap) { - !e.composite && - e.hasEncoding && - (e.fallbackToUnicode = this._simpleFontToUnicode(e)); - return e.toUnicode; - } - if (!e.composite) - return new u.ToUnicodeMap(this._simpleFontToUnicode(e)); - if ( - e.composite && - ((e.cMap.builtInCMap && !(e.cMap instanceof n.IdentityCMap)) || - ("Adobe" === e.cidSystemInfo.registry && - ("GB1" === e.cidSystemInfo.ordering || - "CNS1" === e.cidSystemInfo.ordering || - "Japan1" === e.cidSystemInfo.ordering || - "Korea1" === e.cidSystemInfo.ordering))) - ) { - const { registry: t, ordering: a } = e.cidSystemInfo, - s = i.Name.get(`${t}-${a}-UCS2`), - o = await n.CMapFactory.create({ - encoding: s, - fetchBuiltInCMap: this._fetchBuiltInCMapBound, - useCMap: null, - }), - c = [], - l = []; - e.cMap.forEach(function (e, t) { - if (t > 65535) - throw new r.FormatError("Max size of CID is 65,535"); - const a = o.lookup(t); - if (a) { - l.length = 0; - for (let e = 0, t = a.length; e < t; e += 2) - l.push((a.charCodeAt(e) << 8) + a.charCodeAt(e + 1)); - c[e] = String.fromCharCode(...l); - } - }); - return new u.ToUnicodeMap(c); - } - return new u.IdentityToUnicodeMap(e.firstChar, e.lastChar); - } - readToUnicode(e) { - return e - ? e instanceof i.Name - ? n.CMapFactory.create({ - encoding: e, - fetchBuiltInCMap: this._fetchBuiltInCMapBound, - useCMap: null, - }).then(function (e) { - return e instanceof n.IdentityCMap - ? new u.IdentityToUnicodeMap(0, 65535) - : new u.ToUnicodeMap(e.getMap()); - }) - : e instanceof m.BaseStream - ? n.CMapFactory.create({ - encoding: e, - fetchBuiltInCMap: this._fetchBuiltInCMapBound, - useCMap: null, - }).then( - function (e) { - if (e instanceof n.IdentityCMap) - return new u.IdentityToUnicodeMap(0, 65535); - const t = new Array(e.length); - e.forEach(function (e, a) { - if ("number" == typeof a) { - t[e] = String.fromCodePoint(a); - return; - } - const r = []; - for (let e = 0; e < a.length; e += 2) { - const t = - (a.charCodeAt(e) << 8) | a.charCodeAt(e + 1); - if (55296 != (63488 & t)) { - r.push(t); - continue; - } - e += 2; - const n = - (a.charCodeAt(e) << 8) | a.charCodeAt(e + 1); - r.push(((1023 & t) << 10) + (1023 & n) + 65536); - } - t[e] = String.fromCodePoint(...r); - }); - return new u.ToUnicodeMap(t); - }, - (e) => { - if (e instanceof r.AbortException) return null; - if (this.options.ignoreErrors) { - (0, r.warn)( - `readToUnicode - ignoring ToUnicode data: "${e}".`, - ); - return null; - } - throw e; - }, - ) - : Promise.resolve(null) - : Promise.resolve(null); - } - readCidToGidMap(e, t) { - const a = []; - for (let r = 0, n = e.length; r < n; r++) { - const n = (e[r++] << 8) | e[r], - i = r >> 1; - (0 !== n || t.has(i)) && (a[i] = n); - } - return a; - } - extractWidths(e, t, a) { - const r = this.xref; - let n = [], - s = 0; - const o = []; - let c, l, h, u, d, f, g, p; - if (a.composite) { - s = e.has("DW") ? e.get("DW") : 1e3; - p = e.get("W"); - if (p) - for (l = 0, h = p.length; l < h; l++) { - f = r.fetchIfRef(p[l++]); - g = r.fetchIfRef(p[l]); - if (Array.isArray(g)) - for (u = 0, d = g.length; u < d; u++) - n[f++] = r.fetchIfRef(g[u]); - else { - const e = r.fetchIfRef(p[++l]); - for (u = f; u <= g; u++) n[u] = e; - } - } - if (a.vertical) { - let t = e.getArray("DW2") || [880, -1e3]; - c = [t[1], 0.5 * s, t[0]]; - t = e.get("W2"); - if (t) - for (l = 0, h = t.length; l < h; l++) { - f = r.fetchIfRef(t[l++]); - g = r.fetchIfRef(t[l]); - if (Array.isArray(g)) - for (u = 0, d = g.length; u < d; u++) - o[f++] = [ - r.fetchIfRef(g[u++]), - r.fetchIfRef(g[u++]), - r.fetchIfRef(g[u]), - ]; - else { - const e = [ - r.fetchIfRef(t[++l]), - r.fetchIfRef(t[++l]), - r.fetchIfRef(t[++l]), - ]; - for (u = f; u <= g; u++) o[u] = e; - } - } - } - } else { - const o = a.firstChar; - p = e.get("Widths"); - if (p) { - u = o; - for (l = 0, h = p.length; l < h; l++) - n[u++] = r.fetchIfRef(p[l]); - s = parseFloat(t.get("MissingWidth")) || 0; - } else { - const t = e.get("BaseFont"); - if (t instanceof i.Name) { - const e = this.getBaseFontMetrics(t.name); - n = this.buildCharCodeToWidth(e.widths, a); - s = e.defaultWidth; - } - } - } - let m = !0, - b = s; - for (const e in n) { - const t = n[e]; - if (t) - if (b) { - if (b !== t) { - m = !1; - break; - } - } else b = t; - } - m - ? (a.flags |= S.FontFlags.FixedPitch) - : (a.flags &= ~S.FontFlags.FixedPitch); - a.defaultWidth = s; - a.widths = n; - a.defaultVMetrics = c; - a.vmetrics = o; - } - isSerifFont(e) { - const t = e.split("-")[0]; - return t in (0, c.getSerifFonts)() || /serif/gi.test(t); - } - getBaseFontMetrics(e) { - let t = 0, - a = Object.create(null), - r = !1; - let n = (0, c.getStdFontMap)()[e] || e; - const i = (0, k.getMetrics)(); - n in i || (n = this.isSerifFont(e) ? "Times-Roman" : "Helvetica"); - const s = i[n]; - if ("number" == typeof s) { - t = s; - r = !0; - } else a = s(); - return { defaultWidth: t, monospace: r, widths: a }; - } - buildCharCodeToWidth(e, t) { - const a = Object.create(null), - r = t.differences, - n = t.defaultEncoding; - for (let t = 0; t < 256; t++) - t in r && e[r[t]] - ? (a[t] = e[r[t]]) - : t in n && e[n[t]] && (a[t] = e[n[t]]); - return a; - } - preEvaluateFont(e) { - const t = e; - let a = e.get("Subtype"); - if (!(a instanceof i.Name)) - throw new r.FormatError("invalid font Subtype"); - let n, - s, - o = !1; - if ("Type0" === a.name) { - const t = e.get("DescendantFonts"); - if (!t) - throw new r.FormatError("Descendant fonts are not specified"); - if ( - !( - (e = Array.isArray(t) - ? this.xref.fetchIfRef(t[0]) - : t) instanceof i.Dict - ) - ) - throw new r.FormatError( - "Descendant font is not a dictionary.", - ); - a = e.get("Subtype"); - if (!(a instanceof i.Name)) - throw new r.FormatError("invalid font Subtype"); - o = !0; - } - const c = e.get("FirstChar") || 0, - l = e.get("LastChar") || (o ? 65535 : 255), - h = e.get("FontDescriptor"); - if (h) { - n = new O.MurmurHash3_64(); - const a = t.getRaw("Encoding"); - if (a instanceof i.Name) n.update(a.name); - else if (a instanceof i.Ref) n.update(a.toString()); - else if (a instanceof i.Dict) - for (const e of a.getRawValues()) - if (e instanceof i.Name) n.update(e.name); - else if (e instanceof i.Ref) n.update(e.toString()); - else if (Array.isArray(e)) { - const t = e.length, - a = new Array(t); - for (let r = 0; r < t; r++) { - const t = e[r]; - t instanceof i.Name - ? (a[r] = t.name) - : ("number" == typeof t || t instanceof i.Ref) && - (a[r] = t.toString()); - } - n.update(a.join()); - } - n.update(`${c}-${l}`); - s = e.get("ToUnicode") || t.get("ToUnicode"); - if (s instanceof m.BaseStream) { - const e = s.str || s, - t = e.buffer - ? new Uint8Array(e.buffer.buffer, 0, e.bufferLength) - : new Uint8Array( - e.bytes.buffer, - e.start, - e.end - e.start, - ); - n.update(t); - } else s instanceof i.Name && n.update(s.name); - const r = e.get("Widths") || t.get("Widths"); - if (Array.isArray(r)) { - const e = []; - for (const t of r) - ("number" == typeof t || t instanceof i.Ref) && - e.push(t.toString()); - n.update(e.join()); - } - if (o) { - n.update("compositeFont"); - const a = e.get("W") || t.get("W"); - if (Array.isArray(a)) { - const e = []; - for (const t of a) - if ("number" == typeof t || t instanceof i.Ref) - e.push(t.toString()); - else if (Array.isArray(t)) { - const a = []; - for (const e of t) - ("number" == typeof e || e instanceof i.Ref) && - a.push(e.toString()); - e.push(`[${a.join()}]`); - } - n.update(e.join()); - } - const r = e.getRaw("CIDToGIDMap") || t.getRaw("CIDToGIDMap"); - r instanceof i.Name - ? n.update(r.name) - : r instanceof i.Ref - ? n.update(r.toString()) - : r instanceof m.BaseStream && n.update(r.peekBytes()); - } - } - return { - descriptor: h, - dict: e, - baseDict: t, - composite: o, - type: a.name, - firstChar: c, - lastChar: l, - toUnicode: s, - hash: n ? n.hexdigest() : "", - }; - } - async translateFont({ - descriptor: e, - dict: t, - baseDict: a, - composite: o, - type: l, - firstChar: u, - lastChar: d, - toUnicode: f, - cssFontInfo: g, - }) { - const m = "Type3" === l; - let b; - if (!e) { - if (!m) { - let e = t.get("BaseFont"); - if (!(e instanceof i.Name)) - throw new r.FormatError("Base font is not specified"); - e = e.name.replaceAll(/[,_]/g, "-"); - const n = this.getBaseFontMetrics(e), - o = e.split("-")[0], - h = - (this.isSerifFont(o) ? S.FontFlags.Serif : 0) | - (n.monospace ? S.FontFlags.FixedPitch : 0) | - ((0, c.getSymbolsFonts)()[o] - ? S.FontFlags.Symbolic - : S.FontFlags.Nonsymbolic); - b = { - type: l, - name: e, - loadedName: a.loadedName, - systemFontInfo: null, - widths: n.widths, - defaultWidth: n.defaultWidth, - isSimulatedFlags: !0, - flags: h, - firstChar: u, - lastChar: d, - toUnicode: f, - xHeight: 0, - capHeight: 0, - italicAngle: 0, - isType3Font: m, - }; - const g = t.get("Widths"), - p = (0, c.getStandardFontName)(e); - let y = null; - if (p) { - y = await this.fetchStandardFontData(p); - b.isInternalFont = !!y; - } - !b.isInternalFont && - this.options.useSystemFonts && - (b.systemFontInfo = (0, x.getFontSubstitution)( - this.systemFontCache, - this.idFactory, - this.options.standardFontDataUrl, - e, - p, - )); - return this.extractDataStructures(t, t, b).then((t) => { - if (g) { - const e = []; - let a = u; - for (const t of g) e[a++] = this.xref.fetchIfRef(t); - t.widths = e; - } else t.widths = this.buildCharCodeToWidth(n.widths, t); - return new s.Font(e, y, t); - }); - } - (e = new i.Dict(null)).set("FontName", i.Name.get(l)); - e.set("FontBBox", t.getArray("FontBBox") || [0, 0, 0, 0]); - } - let y = e.get("FontName"), - w = t.get("BaseFont"); - "string" == typeof y && (y = i.Name.get(y)); - "string" == typeof w && (w = i.Name.get(w)); - const C = y?.name, - k = w?.name; - if (!m && C !== k) { - (0, r.info)( - `The FontDescriptor's FontName is "${C}" but should be the same as the Font's BaseFont "${k}".`, - ); - C && - k && - (k.startsWith(C) || - (!(0, c.isKnownFontName)(C) && - (0, c.isKnownFontName)(k))) && - (y = null); - } - y ||= w; - if (!(y instanceof i.Name)) - throw new r.FormatError("invalid font name"); - let v, F, O, T, M; - try { - v = e.get("FontFile", "FontFile2", "FontFile3"); - } catch (e) { - if (!this.options.ignoreErrors) throw e; - (0, r.warn)( - `translateFont - fetching "${y.name}" font file: "${e}".`, - ); - v = new p.NullStream(); - } - let D = !1, - E = null, - N = null; - if (v) { - if (v.dict) { - const e = v.dict.get("Subtype"); - e instanceof i.Name && (F = e.name); - O = v.dict.get("Length1"); - T = v.dict.get("Length2"); - M = v.dict.get("Length3"); - } - } else if (g) { - const e = (0, h.getXfaFontName)(y.name); - if (e) { - g.fontFamily = `${g.fontFamily}-PdfJS-XFA`; - g.metrics = e.metrics || null; - E = e.factors || null; - v = await this.fetchStandardFontData(e.name); - D = !!v; - a = t = (0, h.getXfaFontDict)(y.name); - o = !0; - } - } else if (!m) { - const e = (0, c.getStandardFontName)(y.name); - if (e) { - v = await this.fetchStandardFontData(e); - D = !!v; - } - !D && - this.options.useSystemFonts && - (N = (0, x.getFontSubstitution)( - this.systemFontCache, - this.idFactory, - this.options.standardFontDataUrl, - y.name, - e, - )); - } - b = { - type: l, - name: y.name, - subtype: F, - file: v, - length1: O, - length2: T, - length3: M, - isInternalFont: D, - loadedName: a.loadedName, - composite: o, - fixedPitch: !1, - fontMatrix: t.getArray("FontMatrix") || r.FONT_IDENTITY_MATRIX, - firstChar: u, - lastChar: d, - toUnicode: f, - bbox: e.getArray("FontBBox") || t.getArray("FontBBox"), - ascent: e.get("Ascent"), - descent: e.get("Descent"), - xHeight: e.get("XHeight") || 0, - capHeight: e.get("CapHeight") || 0, - flags: e.get("Flags"), - italicAngle: e.get("ItalicAngle") || 0, - isType3Font: m, - cssFontInfo: g, - scaleFactors: E, - systemFontInfo: N, - }; - if (o) { - const e = a.get("Encoding"); - e instanceof i.Name && (b.cidEncoding = e.name); - const t = await n.CMapFactory.create({ - encoding: e, - fetchBuiltInCMap: this._fetchBuiltInCMapBound, - useCMap: null, - }); - b.cMap = t; - b.vertical = b.cMap.vertical; - } - return this.extractDataStructures(t, a, b).then((a) => { - this.extractWidths(t, e, a); - return new s.Font(y.name, v, a); - }); - } - static buildFontPaths(e, t, a, n) { - function buildPath(t) { - const i = `${e.loadedName}_path_${t}`; - try { - if (e.renderer.hasBuiltPath(t)) return; - a.send("commonobj", [i, "FontPath", e.renderer.getPathJs(t)]); - } catch (e) { - if (n.ignoreErrors) { - (0, r.warn)( - `buildFontPaths - ignoring ${i} glyph: "${e}".`, - ); - return; - } - throw e; - } - } - for (const e of t) { - buildPath(e.fontChar); - const t = e.accent; - t?.fontChar && buildPath(t.fontChar); - } - } - static get fallbackFontDict() { - const e = new i.Dict(); - e.set("BaseFont", i.Name.get("Helvetica")); - e.set("Type", i.Name.get("FallbackType")); - e.set("Subtype", i.Name.get("FallbackType")); - e.set("Encoding", i.Name.get("WinAnsiEncoding")); - return (0, r.shadow)(this, "fallbackFontDict", e); - } - } - t.PartialEvaluator = PartialEvaluator; - class TranslatedFont { - constructor({ - loadedName: e, - font: t, - dict: a, - evaluatorOptions: r, - }) { - this.loadedName = e; - this.font = t; - this.dict = a; - this._evaluatorOptions = r || D; - this.type3Loaded = null; - this.type3Dependencies = t.isType3Font ? new Set() : null; - this.sent = !1; - } - send(e) { - if (!this.sent) { - this.sent = !0; - e.send("commonobj", [ - this.loadedName, - "Font", - this.font.exportData( - this._evaluatorOptions.fontExtraProperties, - ), - ]); - } - } - fallback(e) { - if (this.font.data) { - this.font.disableFontFace = !0; - PartialEvaluator.buildFontPaths( - this.font, - this.font.glyphCacheValues, - e, - this._evaluatorOptions, - ); - } - } - loadType3Data(e, t, a) { - if (this.type3Loaded) return this.type3Loaded; - if (!this.font.isType3Font) - throw new Error("Must be a Type3 font."); - const n = e.clone({ ignoreErrors: !1 }); - n.parsingType3Font = !0; - const s = new i.RefSet(e.type3FontRefs); - this.dict.objId && - !s.has(this.dict.objId) && - s.put(this.dict.objId); - n.type3FontRefs = s; - const o = this.font, - c = this.type3Dependencies; - let l = Promise.resolve(); - const h = this.dict.get("CharProcs"), - u = this.dict.get("Resources") || t, - d = Object.create(null), - f = r.Util.normalizeRect(o.bbox || [0, 0, 0, 0]), - g = f[2] - f[0], - p = f[3] - f[1], - m = Math.hypot(g, p); - for (const e of h.getKeys()) - l = l.then(() => { - const t = h.get(e), - i = new T.OperatorList(); - return n - .getOperatorList({ - stream: t, - task: a, - resources: u, - operatorList: i, - }) - .then(() => { - i.fnArray[0] === r.OPS.setCharWidthAndBounds && - this._removeType3ColorOperators(i, m); - d[e] = i.getIR(); - for (const e of i.dependencies) c.add(e); - }) - .catch(function (t) { - (0, r.warn)( - `Type3 font resource "${e}" is not available.`, - ); - const a = new T.OperatorList(); - d[e] = a.getIR(); - }); - }); - this.type3Loaded = l.then(() => { - o.charProcOperatorList = d; - if (this._bbox) { - o.isCharBBox = !0; - o.bbox = this._bbox; - } - }); - return this.type3Loaded; - } - _removeType3ColorOperators(e, t = NaN) { - const a = r.Util.normalizeRect(e.argsArray[0].slice(2)), - n = a[2] - a[0], - i = a[3] - a[1], - s = Math.hypot(n, i); - if (0 === n || 0 === i) { - e.fnArray.splice(0, 1); - e.argsArray.splice(0, 1); - } else if (0 === t || Math.round(s / t) >= 10) { - this._bbox || (this._bbox = [1 / 0, 1 / 0, -1 / 0, -1 / 0]); - this._bbox[0] = Math.min(this._bbox[0], a[0]); - this._bbox[1] = Math.min(this._bbox[1], a[1]); - this._bbox[2] = Math.max(this._bbox[2], a[2]); - this._bbox[3] = Math.max(this._bbox[3], a[3]); - } - let o = 0, - c = e.length; - for (; o < c; ) { - switch (e.fnArray[o]) { - case r.OPS.setCharWidthAndBounds: - break; - case r.OPS.setStrokeColorSpace: - case r.OPS.setFillColorSpace: - case r.OPS.setStrokeColor: - case r.OPS.setStrokeColorN: - case r.OPS.setFillColor: - case r.OPS.setFillColorN: - case r.OPS.setStrokeGray: - case r.OPS.setFillGray: - case r.OPS.setStrokeRGBColor: - case r.OPS.setFillRGBColor: - case r.OPS.setStrokeCMYKColor: - case r.OPS.setFillCMYKColor: - case r.OPS.shadingFill: - case r.OPS.setRenderingIntent: - e.fnArray.splice(o, 1); - e.argsArray.splice(o, 1); - c--; - continue; - case r.OPS.setGState: - const [t] = e.argsArray[o]; - let a = 0, - n = t.length; - for (; a < n; ) { - const [e] = t[a]; - switch (e) { - case "TR": - case "TR2": - case "HT": - case "BG": - case "BG2": - case "UCR": - case "UCR2": - t.splice(a, 1); - n--; - continue; - } - a++; - } - } - o++; - } - } - } - class StateManager { - constructor(e = new EvalState()) { - this.state = e; - this.stateStack = []; - } - save() { - const e = this.state; - this.stateStack.push(this.state); - this.state = e.clone(); - } - restore() { - const e = this.stateStack.pop(); - e && (this.state = e); - } - transform(e) { - this.state.ctm = r.Util.transform(this.state.ctm, e); - } - } - class TextState { - constructor() { - this.ctm = new Float32Array(r.IDENTITY_MATRIX); - this.fontName = null; - this.fontSize = 0; - this.loadedName = null; - this.font = null; - this.fontMatrix = r.FONT_IDENTITY_MATRIX; - this.textMatrix = r.IDENTITY_MATRIX.slice(); - this.textLineMatrix = r.IDENTITY_MATRIX.slice(); - this.charSpacing = 0; - this.wordSpacing = 0; - this.leading = 0; - this.textHScale = 1; - this.textRise = 0; - } - setTextMatrix(e, t, a, r, n, i) { - const s = this.textMatrix; - s[0] = e; - s[1] = t; - s[2] = a; - s[3] = r; - s[4] = n; - s[5] = i; - } - setTextLineMatrix(e, t, a, r, n, i) { - const s = this.textLineMatrix; - s[0] = e; - s[1] = t; - s[2] = a; - s[3] = r; - s[4] = n; - s[5] = i; - } - translateTextMatrix(e, t) { - const a = this.textMatrix; - a[4] = a[0] * e + a[2] * t + a[4]; - a[5] = a[1] * e + a[3] * t + a[5]; - } - translateTextLineMatrix(e, t) { - const a = this.textLineMatrix; - a[4] = a[0] * e + a[2] * t + a[4]; - a[5] = a[1] * e + a[3] * t + a[5]; - } - carriageReturn() { - this.translateTextLineMatrix(0, -this.leading); - this.textMatrix = this.textLineMatrix.slice(); - } - clone() { - const e = Object.create(this); - e.textMatrix = this.textMatrix.slice(); - e.textLineMatrix = this.textLineMatrix.slice(); - e.fontMatrix = this.fontMatrix.slice(); - return e; - } - } - class EvalState { - constructor() { - this.ctm = new Float32Array(r.IDENTITY_MATRIX); - this.font = null; - this.textRenderingMode = r.TextRenderingMode.FILL; - this.fillColorSpace = y.ColorSpace.singletons.gray; - this.strokeColorSpace = y.ColorSpace.singletons.gray; - } - clone() { - return Object.create(this); - } - } - class EvaluatorPreprocessor { - static get opMap() { - return (0, r.shadow)(this, "opMap", { - w: { id: r.OPS.setLineWidth, numArgs: 1, variableArgs: !1 }, - J: { id: r.OPS.setLineCap, numArgs: 1, variableArgs: !1 }, - j: { id: r.OPS.setLineJoin, numArgs: 1, variableArgs: !1 }, - M: { id: r.OPS.setMiterLimit, numArgs: 1, variableArgs: !1 }, - d: { id: r.OPS.setDash, numArgs: 2, variableArgs: !1 }, - ri: { - id: r.OPS.setRenderingIntent, - numArgs: 1, - variableArgs: !1, - }, - i: { id: r.OPS.setFlatness, numArgs: 1, variableArgs: !1 }, - gs: { id: r.OPS.setGState, numArgs: 1, variableArgs: !1 }, - q: { id: r.OPS.save, numArgs: 0, variableArgs: !1 }, - Q: { id: r.OPS.restore, numArgs: 0, variableArgs: !1 }, - cm: { id: r.OPS.transform, numArgs: 6, variableArgs: !1 }, - m: { id: r.OPS.moveTo, numArgs: 2, variableArgs: !1 }, - l: { id: r.OPS.lineTo, numArgs: 2, variableArgs: !1 }, - c: { id: r.OPS.curveTo, numArgs: 6, variableArgs: !1 }, - v: { id: r.OPS.curveTo2, numArgs: 4, variableArgs: !1 }, - y: { id: r.OPS.curveTo3, numArgs: 4, variableArgs: !1 }, - h: { id: r.OPS.closePath, numArgs: 0, variableArgs: !1 }, - re: { id: r.OPS.rectangle, numArgs: 4, variableArgs: !1 }, - S: { id: r.OPS.stroke, numArgs: 0, variableArgs: !1 }, - s: { id: r.OPS.closeStroke, numArgs: 0, variableArgs: !1 }, - f: { id: r.OPS.fill, numArgs: 0, variableArgs: !1 }, - F: { id: r.OPS.fill, numArgs: 0, variableArgs: !1 }, - "f*": { id: r.OPS.eoFill, numArgs: 0, variableArgs: !1 }, - B: { id: r.OPS.fillStroke, numArgs: 0, variableArgs: !1 }, - "B*": { id: r.OPS.eoFillStroke, numArgs: 0, variableArgs: !1 }, - b: { id: r.OPS.closeFillStroke, numArgs: 0, variableArgs: !1 }, - "b*": { - id: r.OPS.closeEOFillStroke, - numArgs: 0, - variableArgs: !1, - }, - n: { id: r.OPS.endPath, numArgs: 0, variableArgs: !1 }, - W: { id: r.OPS.clip, numArgs: 0, variableArgs: !1 }, - "W*": { id: r.OPS.eoClip, numArgs: 0, variableArgs: !1 }, - BT: { id: r.OPS.beginText, numArgs: 0, variableArgs: !1 }, - ET: { id: r.OPS.endText, numArgs: 0, variableArgs: !1 }, - Tc: { id: r.OPS.setCharSpacing, numArgs: 1, variableArgs: !1 }, - Tw: { id: r.OPS.setWordSpacing, numArgs: 1, variableArgs: !1 }, - Tz: { id: r.OPS.setHScale, numArgs: 1, variableArgs: !1 }, - TL: { id: r.OPS.setLeading, numArgs: 1, variableArgs: !1 }, - Tf: { id: r.OPS.setFont, numArgs: 2, variableArgs: !1 }, - Tr: { - id: r.OPS.setTextRenderingMode, - numArgs: 1, - variableArgs: !1, - }, - Ts: { id: r.OPS.setTextRise, numArgs: 1, variableArgs: !1 }, - Td: { id: r.OPS.moveText, numArgs: 2, variableArgs: !1 }, - TD: { - id: r.OPS.setLeadingMoveText, - numArgs: 2, - variableArgs: !1, - }, - Tm: { id: r.OPS.setTextMatrix, numArgs: 6, variableArgs: !1 }, - "T*": { id: r.OPS.nextLine, numArgs: 0, variableArgs: !1 }, - Tj: { id: r.OPS.showText, numArgs: 1, variableArgs: !1 }, - TJ: { id: r.OPS.showSpacedText, numArgs: 1, variableArgs: !1 }, - "'": { - id: r.OPS.nextLineShowText, - numArgs: 1, - variableArgs: !1, - }, - '"': { - id: r.OPS.nextLineSetSpacingShowText, - numArgs: 3, - variableArgs: !1, - }, - d0: { id: r.OPS.setCharWidth, numArgs: 2, variableArgs: !1 }, - d1: { - id: r.OPS.setCharWidthAndBounds, - numArgs: 6, - variableArgs: !1, - }, - CS: { - id: r.OPS.setStrokeColorSpace, - numArgs: 1, - variableArgs: !1, - }, - cs: { - id: r.OPS.setFillColorSpace, - numArgs: 1, - variableArgs: !1, - }, - SC: { id: r.OPS.setStrokeColor, numArgs: 4, variableArgs: !0 }, - SCN: { - id: r.OPS.setStrokeColorN, - numArgs: 33, - variableArgs: !0, - }, - sc: { id: r.OPS.setFillColor, numArgs: 4, variableArgs: !0 }, - scn: { id: r.OPS.setFillColorN, numArgs: 33, variableArgs: !0 }, - G: { id: r.OPS.setStrokeGray, numArgs: 1, variableArgs: !1 }, - g: { id: r.OPS.setFillGray, numArgs: 1, variableArgs: !1 }, - RG: { - id: r.OPS.setStrokeRGBColor, - numArgs: 3, - variableArgs: !1, - }, - rg: { id: r.OPS.setFillRGBColor, numArgs: 3, variableArgs: !1 }, - K: { - id: r.OPS.setStrokeCMYKColor, - numArgs: 4, - variableArgs: !1, - }, - k: { id: r.OPS.setFillCMYKColor, numArgs: 4, variableArgs: !1 }, - sh: { id: r.OPS.shadingFill, numArgs: 1, variableArgs: !1 }, - BI: { - id: r.OPS.beginInlineImage, - numArgs: 0, - variableArgs: !1, - }, - ID: { id: r.OPS.beginImageData, numArgs: 0, variableArgs: !1 }, - EI: { id: r.OPS.endInlineImage, numArgs: 1, variableArgs: !1 }, - Do: { id: r.OPS.paintXObject, numArgs: 1, variableArgs: !1 }, - MP: { id: r.OPS.markPoint, numArgs: 1, variableArgs: !1 }, - DP: { id: r.OPS.markPointProps, numArgs: 2, variableArgs: !1 }, - BMC: { - id: r.OPS.beginMarkedContent, - numArgs: 1, - variableArgs: !1, - }, - BDC: { - id: r.OPS.beginMarkedContentProps, - numArgs: 2, - variableArgs: !1, - }, - EMC: { - id: r.OPS.endMarkedContent, - numArgs: 0, - variableArgs: !1, - }, - BX: { id: r.OPS.beginCompat, numArgs: 0, variableArgs: !1 }, - EX: { id: r.OPS.endCompat, numArgs: 0, variableArgs: !1 }, - BM: null, - BD: null, - true: null, - fa: null, - fal: null, - fals: null, - false: null, - nu: null, - nul: null, - null: null, - }); - } - static MAX_INVALID_PATH_OPS = 10; - constructor(e, t, a = new StateManager()) { - this.parser = new f.Parser({ - lexer: new f.Lexer(e, EvaluatorPreprocessor.opMap), - xref: t, - }); - this.stateManager = a; - this.nonProcessedArgs = []; - this._isPathOp = !1; - this._numInvalidPathOPS = 0; - } - get savedStatesDepth() { - return this.stateManager.stateStack.length; - } - read(e) { - let t = e.args; - for (;;) { - const a = this.parser.getObj(); - if (a instanceof i.Cmd) { - const n = a.cmd, - i = EvaluatorPreprocessor.opMap[n]; - if (!i) { - (0, r.warn)(`Unknown command "${n}".`); - continue; - } - const s = i.id, - o = i.numArgs; - let c = null !== t ? t.length : 0; - this._isPathOp || (this._numInvalidPathOPS = 0); - this._isPathOp = s >= r.OPS.moveTo && s <= r.OPS.endPath; - if (i.variableArgs) - c > o && - (0, r.info)( - `Command ${n}: expected [0, ${o}] args, but received ${c} args.`, - ); - else { - if (c !== o) { - const e = this.nonProcessedArgs; - for (; c > o; ) { - e.push(t.shift()); - c--; - } - for (; c < o && 0 !== e.length; ) { - null === t && (t = []); - t.unshift(e.pop()); - c++; - } - } - if (c < o) { - const e = `command ${n}: expected ${o} args, but received ${c} args.`; - if ( - this._isPathOp && - ++this._numInvalidPathOPS > - EvaluatorPreprocessor.MAX_INVALID_PATH_OPS - ) - throw new r.FormatError(`Invalid ${e}`); - (0, r.warn)(`Skipping ${e}`); - null !== t && (t.length = 0); - continue; - } - } - this.preprocessCommand(s, t); - e.fn = s; - e.args = t; - return !0; - } - if (a === i.EOF) return !1; - if (null !== a) { - null === t && (t = []); - t.push(a); - if (t.length > 33) - throw new r.FormatError("Too many arguments"); - } - } - } - preprocessCommand(e, t) { - switch (0 | e) { - case r.OPS.save: - this.stateManager.save(); - break; - case r.OPS.restore: - this.stateManager.restore(); - break; - case r.OPS.transform: - this.stateManager.transform(t); - } - } - } - t.EvaluatorPreprocessor = EvaluatorPreprocessor; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.IdentityCMap = t.CMapFactory = t.CMap = void 0; - var r = a(2), - n = a(4), - i = a(5), - s = a(15), - o = a(16), - c = a(3), - l = a(8); - const h = [ - "Adobe-GB1-UCS2", - "Adobe-CNS1-UCS2", - "Adobe-Japan1-UCS2", - "Adobe-Korea1-UCS2", - "78-EUC-H", - "78-EUC-V", - "78-H", - "78-RKSJ-H", - "78-RKSJ-V", - "78-V", - "78ms-RKSJ-H", - "78ms-RKSJ-V", - "83pv-RKSJ-H", - "90ms-RKSJ-H", - "90ms-RKSJ-V", - "90msp-RKSJ-H", - "90msp-RKSJ-V", - "90pv-RKSJ-H", - "90pv-RKSJ-V", - "Add-H", - "Add-RKSJ-H", - "Add-RKSJ-V", - "Add-V", - "Adobe-CNS1-0", - "Adobe-CNS1-1", - "Adobe-CNS1-2", - "Adobe-CNS1-3", - "Adobe-CNS1-4", - "Adobe-CNS1-5", - "Adobe-CNS1-6", - "Adobe-GB1-0", - "Adobe-GB1-1", - "Adobe-GB1-2", - "Adobe-GB1-3", - "Adobe-GB1-4", - "Adobe-GB1-5", - "Adobe-Japan1-0", - "Adobe-Japan1-1", - "Adobe-Japan1-2", - "Adobe-Japan1-3", - "Adobe-Japan1-4", - "Adobe-Japan1-5", - "Adobe-Japan1-6", - "Adobe-Korea1-0", - "Adobe-Korea1-1", - "Adobe-Korea1-2", - "B5-H", - "B5-V", - "B5pc-H", - "B5pc-V", - "CNS-EUC-H", - "CNS-EUC-V", - "CNS1-H", - "CNS1-V", - "CNS2-H", - "CNS2-V", - "ETHK-B5-H", - "ETHK-B5-V", - "ETen-B5-H", - "ETen-B5-V", - "ETenms-B5-H", - "ETenms-B5-V", - "EUC-H", - "EUC-V", - "Ext-H", - "Ext-RKSJ-H", - "Ext-RKSJ-V", - "Ext-V", - "GB-EUC-H", - "GB-EUC-V", - "GB-H", - "GB-V", - "GBK-EUC-H", - "GBK-EUC-V", - "GBK2K-H", - "GBK2K-V", - "GBKp-EUC-H", - "GBKp-EUC-V", - "GBT-EUC-H", - "GBT-EUC-V", - "GBT-H", - "GBT-V", - "GBTpc-EUC-H", - "GBTpc-EUC-V", - "GBpc-EUC-H", - "GBpc-EUC-V", - "H", - "HKdla-B5-H", - "HKdla-B5-V", - "HKdlb-B5-H", - "HKdlb-B5-V", - "HKgccs-B5-H", - "HKgccs-B5-V", - "HKm314-B5-H", - "HKm314-B5-V", - "HKm471-B5-H", - "HKm471-B5-V", - "HKscs-B5-H", - "HKscs-B5-V", - "Hankaku", - "Hiragana", - "KSC-EUC-H", - "KSC-EUC-V", - "KSC-H", - "KSC-Johab-H", - "KSC-Johab-V", - "KSC-V", - "KSCms-UHC-H", - "KSCms-UHC-HW-H", - "KSCms-UHC-HW-V", - "KSCms-UHC-V", - "KSCpc-EUC-H", - "KSCpc-EUC-V", - "Katakana", - "NWP-H", - "NWP-V", - "RKSJ-H", - "RKSJ-V", - "Roman", - "UniCNS-UCS2-H", - "UniCNS-UCS2-V", - "UniCNS-UTF16-H", - "UniCNS-UTF16-V", - "UniCNS-UTF32-H", - "UniCNS-UTF32-V", - "UniCNS-UTF8-H", - "UniCNS-UTF8-V", - "UniGB-UCS2-H", - "UniGB-UCS2-V", - "UniGB-UTF16-H", - "UniGB-UTF16-V", - "UniGB-UTF32-H", - "UniGB-UTF32-V", - "UniGB-UTF8-H", - "UniGB-UTF8-V", - "UniJIS-UCS2-H", - "UniJIS-UCS2-HW-H", - "UniJIS-UCS2-HW-V", - "UniJIS-UCS2-V", - "UniJIS-UTF16-H", - "UniJIS-UTF16-V", - "UniJIS-UTF32-H", - "UniJIS-UTF32-V", - "UniJIS-UTF8-H", - "UniJIS-UTF8-V", - "UniJIS2004-UTF16-H", - "UniJIS2004-UTF16-V", - "UniJIS2004-UTF32-H", - "UniJIS2004-UTF32-V", - "UniJIS2004-UTF8-H", - "UniJIS2004-UTF8-V", - "UniJISPro-UCS2-HW-V", - "UniJISPro-UCS2-V", - "UniJISPro-UTF8-V", - "UniJISX0213-UTF32-H", - "UniJISX0213-UTF32-V", - "UniJISX02132004-UTF32-H", - "UniJISX02132004-UTF32-V", - "UniKS-UCS2-H", - "UniKS-UCS2-V", - "UniKS-UTF16-H", - "UniKS-UTF16-V", - "UniKS-UTF32-H", - "UniKS-UTF32-V", - "UniKS-UTF8-H", - "UniKS-UTF8-V", - "V", - "WP-Symbol", - ], - u = 2 ** 24 - 1; - class CMap { - constructor(e = !1) { - this.codespaceRanges = [[], [], [], []]; - this.numCodespaceRanges = 0; - this._map = []; - this.name = ""; - this.vertical = !1; - this.useCMap = null; - this.builtInCMap = e; - } - addCodespaceRange(e, t, a) { - this.codespaceRanges[e - 1].push(t, a); - this.numCodespaceRanges++; - } - mapCidRange(e, t, a) { - if (t - e > u) - throw new Error( - "mapCidRange - ignoring data above MAX_MAP_RANGE.", - ); - for (; e <= t; ) this._map[e++] = a++; - } - mapBfRange(e, t, a) { - if (t - e > u) - throw new Error( - "mapBfRange - ignoring data above MAX_MAP_RANGE.", - ); - const r = a.length - 1; - for (; e <= t; ) { - this._map[e++] = a; - const t = a.charCodeAt(r) + 1; - t > 255 - ? (a = - a.substring(0, r - 1) + - String.fromCharCode(a.charCodeAt(r - 1) + 1) + - "\0") - : (a = a.substring(0, r) + String.fromCharCode(t)); - } - } - mapBfRangeToArray(e, t, a) { - if (t - e > u) - throw new Error( - "mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.", - ); - const r = a.length; - let n = 0; - for (; e <= t && n < r; ) { - this._map[e] = a[n++]; - ++e; - } - } - mapOne(e, t) { - this._map[e] = t; - } - lookup(e) { - return this._map[e]; - } - contains(e) { - return void 0 !== this._map[e]; - } - forEach(e) { - const t = this._map, - a = t.length; - if (a <= 65536) - for (let r = 0; r < a; r++) void 0 !== t[r] && e(r, t[r]); - else for (const a in t) e(a, t[a]); - } - charCodeOf(e) { - const t = this._map; - if (t.length <= 65536) return t.indexOf(e); - for (const a in t) if (t[a] === e) return 0 | a; - return -1; - } - getMap() { - return this._map; - } - readCharCode(e, t, a) { - let r = 0; - const n = this.codespaceRanges; - for (let i = 0, s = n.length; i < s; i++) { - r = ((r << 8) | e.charCodeAt(t + i)) >>> 0; - const s = n[i]; - for (let e = 0, t = s.length; e < t; ) { - const t = s[e++], - n = s[e++]; - if (r >= t && r <= n) { - a.charcode = r; - a.length = i + 1; - return; - } - } - } - a.charcode = 0; - a.length = 1; - } - getCharCodeLength(e) { - const t = this.codespaceRanges; - for (let a = 0, r = t.length; a < r; a++) { - const r = t[a]; - for (let t = 0, n = r.length; t < n; ) { - const n = r[t++], - i = r[t++]; - if (e >= n && e <= i) return a + 1; - } - } - return 1; - } - get length() { - return this._map.length; - } - get isIdentityCMap() { - if ("Identity-H" !== this.name && "Identity-V" !== this.name) - return !1; - if (65536 !== this._map.length) return !1; - for (let e = 0; e < 65536; e++) if (this._map[e] !== e) return !1; - return !0; - } - } - t.CMap = CMap; - class IdentityCMap extends CMap { - constructor(e, t) { - super(); - this.vertical = e; - this.addCodespaceRange(t, 0, 65535); - } - mapCidRange(e, t, a) { - (0, r.unreachable)("should not call mapCidRange"); - } - mapBfRange(e, t, a) { - (0, r.unreachable)("should not call mapBfRange"); - } - mapBfRangeToArray(e, t, a) { - (0, r.unreachable)("should not call mapBfRangeToArray"); - } - mapOne(e, t) { - (0, r.unreachable)("should not call mapCidOne"); - } - lookup(e) { - return Number.isInteger(e) && e <= 65535 ? e : void 0; - } - contains(e) { - return Number.isInteger(e) && e <= 65535; - } - forEach(e) { - for (let t = 0; t <= 65535; t++) e(t, t); - } - charCodeOf(e) { - return Number.isInteger(e) && e <= 65535 ? e : -1; - } - getMap() { - const e = new Array(65536); - for (let t = 0; t <= 65535; t++) e[t] = t; - return e; - } - get length() { - return 65536; - } - get isIdentityCMap() { - (0, r.unreachable)("should not access .isIdentityCMap"); - } - } - t.IdentityCMap = IdentityCMap; - function strToInt(e) { - let t = 0; - for (let a = 0; a < e.length; a++) t = (t << 8) | e.charCodeAt(a); - return t >>> 0; - } - function expectString(e) { - if ("string" != typeof e) - throw new r.FormatError("Malformed CMap: expected string."); - } - function expectInt(e) { - if (!Number.isInteger(e)) - throw new r.FormatError("Malformed CMap: expected int."); - } - function parseBfChar(e, t) { - for (;;) { - let a = t.getObj(); - if (a === n.EOF) break; - if ((0, n.isCmd)(a, "endbfchar")) return; - expectString(a); - const r = strToInt(a); - a = t.getObj(); - expectString(a); - const i = a; - e.mapOne(r, i); - } - } - function parseBfRange(e, t) { - for (;;) { - let a = t.getObj(); - if (a === n.EOF) break; - if ((0, n.isCmd)(a, "endbfrange")) return; - expectString(a); - const r = strToInt(a); - a = t.getObj(); - expectString(a); - const i = strToInt(a); - a = t.getObj(); - if (Number.isInteger(a) || "string" == typeof a) { - const t = Number.isInteger(a) ? String.fromCharCode(a) : a; - e.mapBfRange(r, i, t); - } else { - if (!(0, n.isCmd)(a, "[")) break; - { - a = t.getObj(); - const s = []; - for (; !(0, n.isCmd)(a, "]") && a !== n.EOF; ) { - s.push(a); - a = t.getObj(); - } - e.mapBfRangeToArray(r, i, s); - } - } - } - throw new r.FormatError("Invalid bf range."); - } - function parseCidChar(e, t) { - for (;;) { - let a = t.getObj(); - if (a === n.EOF) break; - if ((0, n.isCmd)(a, "endcidchar")) return; - expectString(a); - const r = strToInt(a); - a = t.getObj(); - expectInt(a); - const i = a; - e.mapOne(r, i); - } - } - function parseCidRange(e, t) { - for (;;) { - let a = t.getObj(); - if (a === n.EOF) break; - if ((0, n.isCmd)(a, "endcidrange")) return; - expectString(a); - const r = strToInt(a); - a = t.getObj(); - expectString(a); - const i = strToInt(a); - a = t.getObj(); - expectInt(a); - const s = a; - e.mapCidRange(r, i, s); - } - } - function parseCodespaceRange(e, t) { - for (;;) { - let a = t.getObj(); - if (a === n.EOF) break; - if ((0, n.isCmd)(a, "endcodespacerange")) return; - if ("string" != typeof a) break; - const r = strToInt(a); - a = t.getObj(); - if ("string" != typeof a) break; - const i = strToInt(a); - e.addCodespaceRange(a.length, r, i); - } - throw new r.FormatError("Invalid codespace range."); - } - function parseWMode(e, t) { - const a = t.getObj(); - Number.isInteger(a) && (e.vertical = !!a); - } - function parseCMapName(e, t) { - const a = t.getObj(); - a instanceof n.Name && (e.name = a.name); - } - async function parseCMap(e, t, a, i) { - let s, o; - e: for (;;) - try { - const a = t.getObj(); - if (a === n.EOF) break; - if (a instanceof n.Name) { - "WMode" === a.name - ? parseWMode(e, t) - : "CMapName" === a.name && parseCMapName(e, t); - s = a; - } else if (a instanceof n.Cmd) - switch (a.cmd) { - case "endcmap": - break e; - case "usecmap": - s instanceof n.Name && (o = s.name); - break; - case "begincodespacerange": - parseCodespaceRange(e, t); - break; - case "beginbfchar": - parseBfChar(e, t); - break; - case "begincidchar": - parseCidChar(e, t); - break; - case "beginbfrange": - parseBfRange(e, t); - break; - case "begincidrange": - parseCidRange(e, t); - } - } catch (e) { - if (e instanceof c.MissingDataException) throw e; - (0, r.warn)("Invalid cMap data: " + e); - continue; - } - !i && o && (i = o); - return i ? extendCMap(e, a, i) : e; - } - async function extendCMap(e, t, a) { - e.useCMap = await createBuiltInCMap(a, t); - if (0 === e.numCodespaceRanges) { - const t = e.useCMap.codespaceRanges; - for (let a = 0; a < t.length; a++) - e.codespaceRanges[a] = t[a].slice(); - e.numCodespaceRanges = e.useCMap.numCodespaceRanges; - } - e.useCMap.forEach(function (t, a) { - e.contains(t) || e.mapOne(t, e.useCMap.lookup(t)); - }); - return e; - } - async function createBuiltInCMap(e, t) { - if ("Identity-H" === e) return new IdentityCMap(!1, 2); - if ("Identity-V" === e) return new IdentityCMap(!0, 2); - if (!h.includes(e)) throw new Error("Unknown CMap name: " + e); - if (!t) - throw new Error("Built-in CMap parameters are not provided."); - const { cMapData: a, compressionType: n } = await t(e), - i = new CMap(!0); - if (n === r.CMapCompressionType.BINARY) - return new s.BinaryCMapReader().process(a, i, (e) => - extendCMap(i, t, e), - ); - if (n === r.CMapCompressionType.NONE) { - const e = new o.Lexer(new l.Stream(a)); - return parseCMap(i, e, t, null); - } - throw new Error(`Invalid CMap "compressionType" value: ${n}`); - } - t.CMapFactory = class CMapFactory { - static async create({ - encoding: e, - fetchBuiltInCMap: t, - useCMap: a, - }) { - if (e instanceof n.Name) return createBuiltInCMap(e.name, t); - if (e instanceof i.BaseStream) { - const r = await parseCMap(new CMap(), new o.Lexer(e), t, a); - return r.isIdentityCMap ? createBuiltInCMap(r.name, t) : r; - } - throw new Error("Encoding required."); - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.BinaryCMapReader = void 0; - var r = a(2); - function hexToInt(e, t) { - let a = 0; - for (let r = 0; r <= t; r++) a = (a << 8) | e[r]; - return a >>> 0; - } - function hexToStr(e, t) { - return 1 === t - ? String.fromCharCode(e[0], e[1]) - : 3 === t - ? String.fromCharCode(e[0], e[1], e[2], e[3]) - : String.fromCharCode(...e.subarray(0, t + 1)); - } - function addHex(e, t, a) { - let r = 0; - for (let n = a; n >= 0; n--) { - r += e[n] + t[n]; - e[n] = 255 & r; - r >>= 8; - } - } - function incHex(e, t) { - let a = 1; - for (let r = t; r >= 0 && a > 0; r--) { - a += e[r]; - e[r] = 255 & a; - a >>= 8; - } - } - const n = 16; - class BinaryCMapStream { - constructor(e) { - this.buffer = e; - this.pos = 0; - this.end = e.length; - this.tmpBuf = new Uint8Array(19); - } - readByte() { - return this.pos >= this.end ? -1 : this.buffer[this.pos++]; - } - readNumber() { - let e, - t = 0; - do { - const a = this.readByte(); - if (a < 0) throw new r.FormatError("unexpected EOF in bcmap"); - e = !(128 & a); - t = (t << 7) | (127 & a); - } while (!e); - return t; - } - readSigned() { - const e = this.readNumber(); - return 1 & e ? ~(e >>> 1) : e >>> 1; - } - readHex(e, t) { - e.set(this.buffer.subarray(this.pos, this.pos + t + 1)); - this.pos += t + 1; - } - readHexNumber(e, t) { - let a; - const n = this.tmpBuf; - let i = 0; - do { - const e = this.readByte(); - if (e < 0) throw new r.FormatError("unexpected EOF in bcmap"); - a = !(128 & e); - n[i++] = 127 & e; - } while (!a); - let s = t, - o = 0, - c = 0; - for (; s >= 0; ) { - for (; c < 8 && n.length > 0; ) { - o |= n[--i] << c; - c += 7; - } - e[s] = 255 & o; - s--; - o >>= 8; - c -= 8; - } - } - readHexSigned(e, t) { - this.readHexNumber(e, t); - const a = 1 & e[t] ? 255 : 0; - let r = 0; - for (let n = 0; n <= t; n++) { - r = ((1 & r) << 8) | e[n]; - e[n] = (r >> 1) ^ a; - } - } - readString() { - const e = this.readNumber(), - t = new Array(e); - for (let a = 0; a < e; a++) t[a] = this.readNumber(); - return String.fromCharCode(...t); - } - } - t.BinaryCMapReader = class BinaryCMapReader { - async process(e, t, a) { - const r = new BinaryCMapStream(e), - i = r.readByte(); - t.vertical = !!(1 & i); - let s = null; - const o = new Uint8Array(n), - c = new Uint8Array(n), - l = new Uint8Array(n), - h = new Uint8Array(n), - u = new Uint8Array(n); - let d, f; - for (; (f = r.readByte()) >= 0; ) { - const e = f >> 5; - if (7 === e) { - switch (31 & f) { - case 0: - r.readString(); - break; - case 1: - s = r.readString(); - } - continue; - } - const a = !!(16 & f), - i = 15 & f; - if (i + 1 > n) - throw new Error( - "BinaryCMapReader.process: Invalid dataSize.", - ); - const g = 1, - p = r.readNumber(); - switch (e) { - case 0: - r.readHex(o, i); - r.readHexNumber(c, i); - addHex(c, o, i); - t.addCodespaceRange(i + 1, hexToInt(o, i), hexToInt(c, i)); - for (let e = 1; e < p; e++) { - incHex(c, i); - r.readHexNumber(o, i); - addHex(o, c, i); - r.readHexNumber(c, i); - addHex(c, o, i); - t.addCodespaceRange( - i + 1, - hexToInt(o, i), - hexToInt(c, i), - ); - } - break; - case 1: - r.readHex(o, i); - r.readHexNumber(c, i); - addHex(c, o, i); - r.readNumber(); - for (let e = 1; e < p; e++) { - incHex(c, i); - r.readHexNumber(o, i); - addHex(o, c, i); - r.readHexNumber(c, i); - addHex(c, o, i); - r.readNumber(); - } - break; - case 2: - r.readHex(l, i); - d = r.readNumber(); - t.mapOne(hexToInt(l, i), d); - for (let e = 1; e < p; e++) { - incHex(l, i); - if (!a) { - r.readHexNumber(u, i); - addHex(l, u, i); - } - d = r.readSigned() + (d + 1); - t.mapOne(hexToInt(l, i), d); - } - break; - case 3: - r.readHex(o, i); - r.readHexNumber(c, i); - addHex(c, o, i); - d = r.readNumber(); - t.mapCidRange(hexToInt(o, i), hexToInt(c, i), d); - for (let e = 1; e < p; e++) { - incHex(c, i); - if (a) o.set(c); - else { - r.readHexNumber(o, i); - addHex(o, c, i); - } - r.readHexNumber(c, i); - addHex(c, o, i); - d = r.readNumber(); - t.mapCidRange(hexToInt(o, i), hexToInt(c, i), d); - } - break; - case 4: - r.readHex(l, g); - r.readHex(h, i); - t.mapOne(hexToInt(l, g), hexToStr(h, i)); - for (let e = 1; e < p; e++) { - incHex(l, g); - if (!a) { - r.readHexNumber(u, g); - addHex(l, u, g); - } - incHex(h, i); - r.readHexSigned(u, i); - addHex(h, u, i); - t.mapOne(hexToInt(l, g), hexToStr(h, i)); - } - break; - case 5: - r.readHex(o, g); - r.readHexNumber(c, g); - addHex(c, o, g); - r.readHex(h, i); - t.mapBfRange( - hexToInt(o, g), - hexToInt(c, g), - hexToStr(h, i), - ); - for (let e = 1; e < p; e++) { - incHex(c, g); - if (a) o.set(c); - else { - r.readHexNumber(o, g); - addHex(o, c, g); - } - r.readHexNumber(c, g); - addHex(c, o, g); - r.readHex(h, i); - t.mapBfRange( - hexToInt(o, g), - hexToInt(c, g), - hexToStr(h, i), - ); - } - break; - default: - throw new Error( - `BinaryCMapReader.process - unknown type: ${e}`, - ); - } - } - return s ? a(s) : t; - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.Parser = t.Linearization = t.Lexer = void 0; - var r = a(2), - n = a(4), - i = a(3), - s = a(8), - o = a(17), - c = a(19), - l = a(20), - h = a(22), - u = a(23), - d = a(26), - f = a(29), - g = a(31), - p = a(32), - m = a(33); - class Parser { - constructor({ - lexer: e, - xref: t, - allowStreams: a = !1, - recoveryMode: r = !1, - }) { - this.lexer = e; - this.xref = t; - this.allowStreams = a; - this.recoveryMode = r; - this.imageCache = Object.create(null); - this._imageId = 0; - this.refill(); - } - refill() { - this.buf1 = this.lexer.getObj(); - this.buf2 = this.lexer.getObj(); - } - shift() { - if (this.buf2 instanceof n.Cmd && "ID" === this.buf2.cmd) { - this.buf1 = this.buf2; - this.buf2 = null; - } else { - this.buf1 = this.buf2; - this.buf2 = this.lexer.getObj(); - } - } - tryShift() { - try { - this.shift(); - return !0; - } catch (e) { - if (e instanceof i.MissingDataException) throw e; - return !1; - } - } - getObj(e = null) { - const t = this.buf1; - this.shift(); - if (t instanceof n.Cmd) - switch (t.cmd) { - case "BI": - return this.makeInlineImage(e); - case "[": - const a = []; - for ( - ; - !(0, n.isCmd)(this.buf1, "]") && this.buf1 !== n.EOF; - - ) - a.push(this.getObj(e)); - if (this.buf1 === n.EOF) { - if (this.recoveryMode) return a; - throw new i.ParserEOFException( - "End of file inside array.", - ); - } - this.shift(); - return a; - case "<<": - const s = new n.Dict(this.xref); - for ( - ; - !(0, n.isCmd)(this.buf1, ">>") && this.buf1 !== n.EOF; - - ) { - if (!(this.buf1 instanceof n.Name)) { - (0, r.info)( - "Malformed dictionary: key must be a name object", - ); - this.shift(); - continue; - } - const t = this.buf1.name; - this.shift(); - if (this.buf1 === n.EOF) break; - s.set(t, this.getObj(e)); - } - if (this.buf1 === n.EOF) { - if (this.recoveryMode) return s; - throw new i.ParserEOFException( - "End of file inside dictionary.", - ); - } - if ((0, n.isCmd)(this.buf2, "stream")) - return this.allowStreams ? this.makeStream(s, e) : s; - this.shift(); - return s; - default: - return t; - } - if (Number.isInteger(t)) { - if ( - Number.isInteger(this.buf1) && - (0, n.isCmd)(this.buf2, "R") - ) { - const e = n.Ref.get(t, this.buf1); - this.shift(); - this.shift(); - return e; - } - return t; - } - return "string" == typeof t && e ? e.decryptString(t) : t; - } - findDefaultInlineStreamEnd(e) { - const { knownCommands: t } = this.lexer, - a = e.pos; - let o, - c, - l = 0; - for (; -1 !== (o = e.getByte()); ) - if (0 === l) l = 69 === o ? 1 : 0; - else if (1 === l) l = 73 === o ? 2 : 0; - else if (32 === o || 10 === o || 13 === o) { - c = e.pos; - const a = e.peekBytes(15), - i = a.length; - if (0 === i) break; - for (let e = 0; e < i; e++) { - o = a[e]; - if ( - (0 !== o || 0 === a[e + 1]) && - 10 !== o && - 13 !== o && - (o < 32 || o > 127) - ) { - l = 0; - break; - } - } - if (2 !== l) continue; - if (!t) { - (0, r.warn)( - "findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.", - ); - continue; - } - const h = new Lexer(new s.Stream(a.slice()), t); - h._hexStringWarn = () => {}; - let u = 0; - for (;;) { - const e = h.getObj(); - if (e === n.EOF) { - l = 0; - break; - } - if (e instanceof n.Cmd) { - const a = t[e.cmd]; - if (!a) { - l = 0; - break; - } - if (a.variableArgs ? u <= a.numArgs : u === a.numArgs) - break; - u = 0; - } else u++; - } - if (2 === l) break; - } else l = 0; - if (-1 === o) { - (0, r.warn)( - "findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker", - ); - if (c) { - (0, r.warn)( - '... trying to recover by using the last "EI" occurrence.', - ); - e.skip(-(e.pos - c)); - } - } - let h = 4; - e.skip(-h); - o = e.peekByte(); - e.skip(h); - (0, i.isWhiteSpace)(o) || h--; - return e.pos - h - a; - } - findDCTDecodeInlineStreamEnd(e) { - const t = e.pos; - let a, - n, - i = !1; - for (; -1 !== (a = e.getByte()); ) - if (255 === a) { - switch (e.getByte()) { - case 0: - break; - case 255: - e.skip(-1); - break; - case 217: - i = !0; - break; - case 192: - case 193: - case 194: - case 195: - case 197: - case 198: - case 199: - case 201: - case 202: - case 203: - case 205: - case 206: - case 207: - case 196: - case 204: - case 218: - case 219: - case 220: - case 221: - case 222: - case 223: - case 224: - case 225: - case 226: - case 227: - case 228: - case 229: - case 230: - case 231: - case 232: - case 233: - case 234: - case 235: - case 236: - case 237: - case 238: - case 239: - case 254: - n = e.getUint16(); - n > 2 ? e.skip(n - 2) : e.skip(-2); - } - if (i) break; - } - const s = e.pos - t; - if (-1 === a) { - (0, r.warn)( - "Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead.", - ); - e.skip(-s); - return this.findDefaultInlineStreamEnd(e); - } - this.inlineStreamSkipEI(e); - return s; - } - findASCII85DecodeInlineStreamEnd(e) { - const t = e.pos; - let a; - for (; -1 !== (a = e.getByte()); ) - if (126 === a) { - const t = e.pos; - a = e.peekByte(); - for (; (0, i.isWhiteSpace)(a); ) { - e.skip(); - a = e.peekByte(); - } - if (62 === a) { - e.skip(); - break; - } - if (e.pos > t) { - const t = e.peekBytes(2); - if (69 === t[0] && 73 === t[1]) break; - } - } - const n = e.pos - t; - if (-1 === a) { - (0, r.warn)( - "Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead.", - ); - e.skip(-n); - return this.findDefaultInlineStreamEnd(e); - } - this.inlineStreamSkipEI(e); - return n; - } - findASCIIHexDecodeInlineStreamEnd(e) { - const t = e.pos; - let a; - for (; -1 !== (a = e.getByte()) && 62 !== a; ); - const n = e.pos - t; - if (-1 === a) { - (0, r.warn)( - "Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead.", - ); - e.skip(-n); - return this.findDefaultInlineStreamEnd(e); - } - this.inlineStreamSkipEI(e); - return n; - } - inlineStreamSkipEI(e) { - let t, - a = 0; - for (; -1 !== (t = e.getByte()); ) - if (0 === a) a = 69 === t ? 1 : 0; - else if (1 === a) a = 73 === t ? 2 : 0; - else if (2 === a) break; - } - makeInlineImage(e) { - const t = this.lexer, - a = t.stream, - i = Object.create(null); - let s; - for (; !(0, n.isCmd)(this.buf1, "ID") && this.buf1 !== n.EOF; ) { - if (!(this.buf1 instanceof n.Name)) - throw new r.FormatError( - "Dictionary key must be a name object", - ); - const t = this.buf1.name; - this.shift(); - if (this.buf1 === n.EOF) break; - i[t] = this.getObj(e); - } - -1 !== t.beginInlineImagePos && - (s = a.pos - t.beginInlineImagePos); - const o = this.xref.fetchIfRef(i.F || i.Filter); - let c; - if (o instanceof n.Name) c = o.name; - else if (Array.isArray(o)) { - const e = this.xref.fetchIfRef(o[0]); - e instanceof n.Name && (c = e.name); - } - const l = a.pos; - let h, u; - switch (c) { - case "DCT": - case "DCTDecode": - h = this.findDCTDecodeInlineStreamEnd(a); - break; - case "A85": - case "ASCII85Decode": - h = this.findASCII85DecodeInlineStreamEnd(a); - break; - case "AHx": - case "ASCIIHexDecode": - h = this.findASCIIHexDecodeInlineStreamEnd(a); - break; - default: - h = this.findDefaultInlineStreamEnd(a); - } - if (h < 1e3 && s > 0) { - const e = a.pos; - a.pos = t.beginInlineImagePos; - u = (function getInlineImageCacheKey(e) { - const t = [], - a = e.length; - let r = 0; - for (; r < a - 1; ) t.push((e[r++] << 8) | e[r++]); - r < a && t.push(e[r]); - return a + "_" + String.fromCharCode.apply(null, t); - })(a.getBytes(s + h)); - a.pos = e; - const r = this.imageCache[u]; - if (void 0 !== r) { - this.buf2 = n.Cmd.get("EI"); - this.shift(); - r.reset(); - return r; - } - } - const d = new n.Dict(this.xref); - for (const e in i) d.set(e, i[e]); - let f = a.makeSubStream(l, h, d); - e && (f = e.createStream(f, h)); - f = this.filter(f, d, h); - f.dict = d; - if (void 0 !== u) { - f.cacheKey = "inline_img_" + ++this._imageId; - this.imageCache[u] = f; - } - this.buf2 = n.Cmd.get("EI"); - this.shift(); - return f; - } - _findStreamLength(e, t) { - const { stream: a } = this.lexer; - a.pos = e; - const r = t.length; - for (; a.pos < a.end; ) { - const n = a.peekBytes(2048), - i = n.length - r; - if (i <= 0) break; - let s = 0; - for (; s < i; ) { - let i = 0; - for (; i < r && n[s + i] === t[i]; ) i++; - if (i >= r) { - a.pos += s; - return a.pos - e; - } - s++; - } - a.pos += i; - } - return -1; - } - makeStream(e, t) { - const a = this.lexer; - let s = a.stream; - a.skipToNextLine(); - const o = s.pos - 1; - let c = e.get("Length"); - if (!Number.isInteger(c)) { - (0, r.info)(`Bad length "${c && c.toString()}" in stream.`); - c = 0; - } - s.pos = o + c; - a.nextChar(); - if (this.tryShift() && (0, n.isCmd)(this.buf2, "endstream")) - this.shift(); - else { - const e = new Uint8Array([ - 101, 110, 100, 115, 116, 114, 101, 97, 109, - ]); - let t = this._findStreamLength(o, e); - if (t < 0) { - const a = 1; - for (let n = 1; n <= a; n++) { - const a = e.length - n, - c = e.slice(0, a), - l = this._findStreamLength(o, c); - if (l >= 0) { - const e = s.peekBytes(a + 1)[a]; - if (!(0, i.isWhiteSpace)(e)) break; - (0, r.info)( - `Found "${(0, r.bytesToString)(c)}" when searching for endstream command.`, - ); - t = l; - break; - } - } - if (t < 0) - throw new r.FormatError("Missing endstream command."); - } - c = t; - a.nextChar(); - this.shift(); - this.shift(); - } - this.shift(); - s = s.makeSubStream(o, c, e); - t && (s = t.createStream(s, c)); - s = this.filter(s, e, c); - s.dict = e; - return s; - } - filter(e, t, a) { - let i = t.get("F", "Filter"), - s = t.get("DP", "DecodeParms"); - if (i instanceof n.Name) { - Array.isArray(s) && - (0, r.warn)( - "/DecodeParms should not be an Array, when /Filter is a Name.", - ); - return this.makeFilter(e, i.name, a, s); - } - let o = a; - if (Array.isArray(i)) { - const t = i, - a = s; - for (let c = 0, l = t.length; c < l; ++c) { - i = this.xref.fetchIfRef(t[c]); - if (!(i instanceof n.Name)) - throw new r.FormatError(`Bad filter name "${i}"`); - s = null; - Array.isArray(a) && - c in a && - (s = this.xref.fetchIfRef(a[c])); - e = this.makeFilter(e, i.name, o, s); - o = null; - } - } - return e; - } - makeFilter(e, t, a, n) { - if (0 === a) { - (0, r.warn)(`Empty "${t}" stream.`); - return new s.NullStream(); - } - try { - switch (t) { - case "Fl": - case "FlateDecode": - return n - ? new p.PredictorStream(new h.FlateStream(e, a), a, n) - : new h.FlateStream(e, a); - case "LZW": - case "LZWDecode": - let t = 1; - if (n) { - n.has("EarlyChange") && (t = n.get("EarlyChange")); - return new p.PredictorStream( - new g.LZWStream(e, a, t), - a, - n, - ); - } - return new g.LZWStream(e, a, t); - case "DCT": - case "DCTDecode": - return new d.JpegStream(e, a, n); - case "JPX": - case "JPXDecode": - return new f.JpxStream(e, a, n); - case "A85": - case "ASCII85Decode": - return new o.Ascii85Stream(e, a); - case "AHx": - case "ASCIIHexDecode": - return new c.AsciiHexStream(e, a); - case "CCF": - case "CCITTFaxDecode": - return new l.CCITTFaxStream(e, a, n); - case "RL": - case "RunLengthDecode": - return new m.RunLengthStream(e, a); - case "JBIG2Decode": - return new u.Jbig2Stream(e, a, n); - } - (0, r.warn)(`Filter "${t}" is not supported.`); - return e; - } catch (e) { - if (e instanceof i.MissingDataException) throw e; - (0, r.warn)(`Invalid stream: "${e}"`); - return new s.NullStream(); - } - } - } - t.Parser = Parser; - const b = [ - 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, - 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, - ]; - function toHexDigit(e) { - return e >= 48 && e <= 57 - ? 15 & e - : (e >= 65 && e <= 70) || (e >= 97 && e <= 102) - ? 9 + (15 & e) - : -1; - } - class Lexer { - constructor(e, t = null) { - this.stream = e; - this.nextChar(); - this.strBuf = []; - this.knownCommands = t; - this._hexStringNumWarn = 0; - this.beginInlineImagePos = -1; - } - nextChar() { - return (this.currentChar = this.stream.getByte()); - } - peekChar() { - return this.stream.peekByte(); - } - getNumber() { - let e = this.currentChar, - t = !1, - a = 0, - n = 1; - if (45 === e) { - n = -1; - e = this.nextChar(); - 45 === e && (e = this.nextChar()); - } else 43 === e && (e = this.nextChar()); - if (10 === e || 13 === e) - do { - e = this.nextChar(); - } while (10 === e || 13 === e); - if (46 === e) { - a = 10; - e = this.nextChar(); - } - if (e < 48 || e > 57) { - const t = `Invalid number: ${String.fromCharCode(e)} (charCode ${e})`; - if ((0, i.isWhiteSpace)(e) || -1 === e) { - (0, r.info)(`Lexer.getNumber - "${t}".`); - return 0; - } - throw new r.FormatError(t); - } - let s = e - 48, - o = 0, - c = 1; - for (; (e = this.nextChar()) >= 0; ) - if (e >= 48 && e <= 57) { - const r = e - 48; - if (t) o = 10 * o + r; - else { - 0 !== a && (a *= 10); - s = 10 * s + r; - } - } else if (46 === e) { - if (0 !== a) break; - a = 1; - } else if (45 === e) - (0, r.warn)( - "Badly formatted number: minus sign in the middle", - ); - else { - if (69 !== e && 101 !== e) break; - e = this.peekChar(); - if (43 === e || 45 === e) { - c = 45 === e ? -1 : 1; - this.nextChar(); - } else if (e < 48 || e > 57) break; - t = !0; - } - 0 !== a && (s /= a); - t && (s *= 10 ** (c * o)); - return n * s; - } - getString() { - let e = 1, - t = !1; - const a = this.strBuf; - a.length = 0; - let n = this.nextChar(); - for (;;) { - let i = !1; - switch (0 | n) { - case -1: - (0, r.warn)("Unterminated string"); - t = !0; - break; - case 40: - ++e; - a.push("("); - break; - case 41: - if (0 == --e) { - this.nextChar(); - t = !0; - } else a.push(")"); - break; - case 92: - n = this.nextChar(); - switch (n) { - case -1: - (0, r.warn)("Unterminated string"); - t = !0; - break; - case 110: - a.push("\n"); - break; - case 114: - a.push("\r"); - break; - case 116: - a.push("\t"); - break; - case 98: - a.push("\b"); - break; - case 102: - a.push("\f"); - break; - case 92: - case 40: - case 41: - a.push(String.fromCharCode(n)); - break; - case 48: - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - let e = 15 & n; - n = this.nextChar(); - i = !0; - if (n >= 48 && n <= 55) { - e = (e << 3) + (15 & n); - n = this.nextChar(); - if (n >= 48 && n <= 55) { - i = !1; - e = (e << 3) + (15 & n); - } - } - a.push(String.fromCharCode(e)); - break; - case 13: - 10 === this.peekChar() && this.nextChar(); - break; - case 10: - break; - default: - a.push(String.fromCharCode(n)); - } - break; - default: - a.push(String.fromCharCode(n)); - } - if (t) break; - i || (n = this.nextChar()); - } - return a.join(""); - } - getName() { - let e, t; - const a = this.strBuf; - a.length = 0; - for (; (e = this.nextChar()) >= 0 && !b[e]; ) - if (35 === e) { - e = this.nextChar(); - if (b[e]) { - (0, r.warn)( - "Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number.", - ); - a.push("#"); - break; - } - const n = toHexDigit(e); - if (-1 !== n) { - t = e; - e = this.nextChar(); - const i = toHexDigit(e); - if (-1 === i) { - (0, r.warn)( - `Lexer_getName: Illegal digit (${String.fromCharCode(e)}) in hexadecimal number.`, - ); - a.push("#", String.fromCharCode(t)); - if (b[e]) break; - a.push(String.fromCharCode(e)); - continue; - } - a.push(String.fromCharCode((n << 4) | i)); - } else a.push("#", String.fromCharCode(e)); - } else a.push(String.fromCharCode(e)); - a.length > 127 && - (0, r.warn)( - `Name token is longer than allowed by the spec: ${a.length}`, - ); - return n.Name.get(a.join("")); - } - _hexStringWarn(e) { - 5 != this._hexStringNumWarn++ - ? this._hexStringNumWarn > 5 || - (0, r.warn)(`getHexString - ignoring invalid character: ${e}`) - : (0, r.warn)( - "getHexString - ignoring additional invalid characters.", - ); - } - getHexString() { - const e = this.strBuf; - e.length = 0; - let t, - a, - n = this.currentChar, - i = !0; - this._hexStringNumWarn = 0; - for (;;) { - if (n < 0) { - (0, r.warn)("Unterminated hex string"); - break; - } - if (62 === n) { - this.nextChar(); - break; - } - if (1 !== b[n]) { - if (i) { - t = toHexDigit(n); - if (-1 === t) { - this._hexStringWarn(n); - n = this.nextChar(); - continue; - } - } else { - a = toHexDigit(n); - if (-1 === a) { - this._hexStringWarn(n); - n = this.nextChar(); - continue; - } - e.push(String.fromCharCode((t << 4) | a)); - } - i = !i; - n = this.nextChar(); - } else n = this.nextChar(); - } - return e.join(""); - } - getObj() { - let e = !1, - t = this.currentChar; - for (;;) { - if (t < 0) return n.EOF; - if (e) (10 !== t && 13 !== t) || (e = !1); - else if (37 === t) e = !0; - else if (1 !== b[t]) break; - t = this.nextChar(); - } - switch (0 | t) { - case 48: - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: - case 43: - case 45: - case 46: - return this.getNumber(); - case 40: - return this.getString(); - case 47: - return this.getName(); - case 91: - this.nextChar(); - return n.Cmd.get("["); - case 93: - this.nextChar(); - return n.Cmd.get("]"); - case 60: - t = this.nextChar(); - if (60 === t) { - this.nextChar(); - return n.Cmd.get("<<"); - } - return this.getHexString(); - case 62: - t = this.nextChar(); - if (62 === t) { - this.nextChar(); - return n.Cmd.get(">>"); - } - return n.Cmd.get(">"); - case 123: - this.nextChar(); - return n.Cmd.get("{"); - case 125: - this.nextChar(); - return n.Cmd.get("}"); - case 41: - this.nextChar(); - throw new r.FormatError(`Illegal character: ${t}`); - } - let a = String.fromCharCode(t); - if (t < 32 || t > 127) { - const e = this.peekChar(); - if (e >= 32 && e <= 127) { - this.nextChar(); - return n.Cmd.get(a); - } - } - const i = this.knownCommands; - let s = void 0 !== i?.[a]; - for (; (t = this.nextChar()) >= 0 && !b[t]; ) { - const e = a + String.fromCharCode(t); - if (s && void 0 === i[e]) break; - if (128 === a.length) - throw new r.FormatError( - `Command token too long: ${a.length}`, - ); - a = e; - s = void 0 !== i?.[a]; - } - if ("true" === a) return !0; - if ("false" === a) return !1; - if ("null" === a) return null; - "BI" === a && (this.beginInlineImagePos = this.stream.pos); - return n.Cmd.get(a); - } - skipToNextLine() { - let e = this.currentChar; - for (; e >= 0; ) { - if (13 === e) { - e = this.nextChar(); - 10 === e && this.nextChar(); - break; - } - if (10 === e) { - this.nextChar(); - break; - } - e = this.nextChar(); - } - } - } - t.Lexer = Lexer; - t.Linearization = class Linearization { - static create(e) { - function getInt(e, t, a = !1) { - const r = e.get(t); - if (Number.isInteger(r) && (a ? r >= 0 : r > 0)) return r; - throw new Error( - `The "${t}" parameter in the linearization dictionary is invalid.`, - ); - } - const t = new Parser({ lexer: new Lexer(e), xref: null }), - a = t.getObj(), - r = t.getObj(), - i = t.getObj(), - s = t.getObj(); - let o, c; - if ( - !( - Number.isInteger(a) && - Number.isInteger(r) && - (0, n.isCmd)(i, "obj") && - s instanceof n.Dict && - "number" == typeof (o = s.get("Linearized")) && - o > 0 - ) - ) - return null; - if ((c = getInt(s, "L")) !== e.length) - throw new Error( - 'The "L" parameter in the linearization dictionary does not equal the stream length.', - ); - return { - length: c, - hints: (function getHints(e) { - const t = e.get("H"); - let a; - if (Array.isArray(t) && (2 === (a = t.length) || 4 === a)) { - for (let e = 0; e < a; e++) { - const a = t[e]; - if (!(Number.isInteger(a) && a > 0)) - throw new Error( - `Hint (${e}) in the linearization dictionary is invalid.`, - ); - } - return t; - } - throw new Error( - "Hint array in the linearization dictionary is invalid.", - ); - })(s), - objectNumberFirst: getInt(s, "O"), - endFirst: getInt(s, "E"), - numPages: getInt(s, "N"), - mainXRefEntriesOffset: getInt(s, "T"), - pageFirst: s.has("P") ? getInt(s, "P", !0) : 0, - }; - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.Ascii85Stream = void 0; - var r = a(18), - n = a(3); - class Ascii85Stream extends r.DecodeStream { - constructor(e, t) { - t && (t *= 0.8); - super(t); - this.str = e; - this.dict = e.dict; - this.input = new Uint8Array(5); - } - readBlock() { - const e = this.str; - let t = e.getByte(); - for (; (0, n.isWhiteSpace)(t); ) t = e.getByte(); - if (-1 === t || 126 === t) { - this.eof = !0; - return; - } - const a = this.bufferLength; - let r, i; - if (122 === t) { - r = this.ensureBuffer(a + 4); - for (i = 0; i < 4; ++i) r[a + i] = 0; - this.bufferLength += 4; - } else { - const s = this.input; - s[0] = t; - for (i = 1; i < 5; ++i) { - t = e.getByte(); - for (; (0, n.isWhiteSpace)(t); ) t = e.getByte(); - s[i] = t; - if (-1 === t || 126 === t) break; - } - r = this.ensureBuffer(a + i - 1); - this.bufferLength += i - 1; - if (i < 5) { - for (; i < 5; ++i) s[i] = 117; - this.eof = !0; - } - let o = 0; - for (i = 0; i < 5; ++i) o = 85 * o + (s[i] - 33); - for (i = 3; i >= 0; --i) { - r[a + i] = 255 & o; - o >>= 8; - } - } - } - } - t.Ascii85Stream = Ascii85Stream; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.StreamsSequenceStream = t.DecodeStream = void 0; - var r = a(5), - n = a(8); - const i = new Uint8Array(0); - class DecodeStream extends r.BaseStream { - constructor(e) { - super(); - this._rawMinBufferLength = e || 0; - this.pos = 0; - this.bufferLength = 0; - this.eof = !1; - this.buffer = i; - this.minBufferLength = 512; - if (e) - for (; this.minBufferLength < e; ) this.minBufferLength *= 2; - } - get isEmpty() { - for (; !this.eof && 0 === this.bufferLength; ) this.readBlock(); - return 0 === this.bufferLength; - } - ensureBuffer(e) { - const t = this.buffer; - if (e <= t.byteLength) return t; - let a = this.minBufferLength; - for (; a < e; ) a *= 2; - const r = new Uint8Array(a); - r.set(t); - return (this.buffer = r); - } - getByte() { - const e = this.pos; - for (; this.bufferLength <= e; ) { - if (this.eof) return -1; - this.readBlock(); - } - return this.buffer[this.pos++]; - } - getBytes(e) { - const t = this.pos; - let a; - if (e) { - this.ensureBuffer(t + e); - a = t + e; - for (; !this.eof && this.bufferLength < a; ) this.readBlock(); - const r = this.bufferLength; - a > r && (a = r); - } else { - for (; !this.eof; ) this.readBlock(); - a = this.bufferLength; - } - this.pos = a; - return this.buffer.subarray(t, a); - } - reset() { - this.pos = 0; - } - makeSubStream(e, t, a = null) { - if (void 0 === t) for (; !this.eof; ) this.readBlock(); - else { - const a = e + t; - for (; this.bufferLength <= a && !this.eof; ) this.readBlock(); - } - return new n.Stream(this.buffer, e, t, a); - } - getBaseStreams() { - return this.str ? this.str.getBaseStreams() : null; - } - } - t.DecodeStream = DecodeStream; - t.StreamsSequenceStream = class StreamsSequenceStream extends ( - DecodeStream - ) { - constructor(e, t = null) { - let a = 0; - for (const t of e) - a += - t instanceof DecodeStream ? t._rawMinBufferLength : t.length; - super(a); - this.streams = e; - this._onError = t; - } - readBlock() { - const e = this.streams; - if (0 === e.length) { - this.eof = !0; - return; - } - const t = e.shift(); - let a; - try { - a = t.getBytes(); - } catch (e) { - if (this._onError) { - this._onError(e, t.dict?.objId); - return; - } - throw e; - } - const r = this.bufferLength, - n = r + a.length; - this.ensureBuffer(n).set(a, r); - this.bufferLength = n; - } - getBaseStreams() { - const e = []; - for (const t of this.streams) { - const a = t.getBaseStreams(); - a && e.push(...a); - } - return e.length > 0 ? e : null; - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.AsciiHexStream = void 0; - var r = a(18); - class AsciiHexStream extends r.DecodeStream { - constructor(e, t) { - t && (t *= 0.5); - super(t); - this.str = e; - this.dict = e.dict; - this.firstDigit = -1; - } - readBlock() { - const e = this.str.getBytes(8e3); - if (!e.length) { - this.eof = !0; - return; - } - const t = (e.length + 1) >> 1, - a = this.ensureBuffer(this.bufferLength + t); - let r = this.bufferLength, - n = this.firstDigit; - for (const t of e) { - let e; - if (t >= 48 && t <= 57) e = 15 & t; - else { - if (!((t >= 65 && t <= 70) || (t >= 97 && t <= 102))) { - if (62 === t) { - this.eof = !0; - break; - } - continue; - } - e = 9 + (15 & t); - } - if (n < 0) n = e; - else { - a[r++] = (n << 4) | e; - n = -1; - } - } - if (n >= 0 && this.eof) { - a[r++] = n << 4; - n = -1; - } - this.firstDigit = n; - this.bufferLength = r; - } - } - t.AsciiHexStream = AsciiHexStream; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.CCITTFaxStream = void 0; - var r = a(21), - n = a(18), - i = a(4); - class CCITTFaxStream extends n.DecodeStream { - constructor(e, t, a) { - super(t); - this.str = e; - this.dict = e.dict; - a instanceof i.Dict || (a = i.Dict.empty); - const n = { next: () => e.getByte() }; - this.ccittFaxDecoder = new r.CCITTFaxDecoder(n, { - K: a.get("K"), - EndOfLine: a.get("EndOfLine"), - EncodedByteAlign: a.get("EncodedByteAlign"), - Columns: a.get("Columns"), - Rows: a.get("Rows"), - EndOfBlock: a.get("EndOfBlock"), - BlackIs1: a.get("BlackIs1"), - }); - } - readBlock() { - for (; !this.eof; ) { - const e = this.ccittFaxDecoder.readNextChar(); - if (-1 === e) { - this.eof = !0; - return; - } - this.ensureBuffer(this.bufferLength + 1); - this.buffer[this.bufferLength++] = e; - } - } - } - t.CCITTFaxStream = CCITTFaxStream; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.CCITTFaxDecoder = void 0; - var r = a(2); - const n = -1, - i = [ - [-1, -1], - [-1, -1], - [7, 8], - [7, 7], - [6, 6], - [6, 6], - [6, 5], - [6, 5], - [4, 0], - [4, 0], - [4, 0], - [4, 0], - [4, 0], - [4, 0], - [4, 0], - [4, 0], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [3, 3], - [3, 3], - [3, 3], - [3, 3], - [3, 3], - [3, 3], - [3, 3], - [3, 3], - [3, 3], - [3, 3], - [3, 3], - [3, 3], - [3, 3], - [3, 3], - [3, 3], - [3, 3], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - [1, 2], - ], - s = [ - [-1, -1], - [12, -2], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [11, 1792], - [11, 1792], - [12, 1984], - [12, 2048], - [12, 2112], - [12, 2176], - [12, 2240], - [12, 2304], - [11, 1856], - [11, 1856], - [11, 1920], - [11, 1920], - [12, 2368], - [12, 2432], - [12, 2496], - [12, 2560], - ], - o = [ - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [8, 29], - [8, 29], - [8, 30], - [8, 30], - [8, 45], - [8, 45], - [8, 46], - [8, 46], - [7, 22], - [7, 22], - [7, 22], - [7, 22], - [7, 23], - [7, 23], - [7, 23], - [7, 23], - [8, 47], - [8, 47], - [8, 48], - [8, 48], - [6, 13], - [6, 13], - [6, 13], - [6, 13], - [6, 13], - [6, 13], - [6, 13], - [6, 13], - [7, 20], - [7, 20], - [7, 20], - [7, 20], - [8, 33], - [8, 33], - [8, 34], - [8, 34], - [8, 35], - [8, 35], - [8, 36], - [8, 36], - [8, 37], - [8, 37], - [8, 38], - [8, 38], - [7, 19], - [7, 19], - [7, 19], - [7, 19], - [8, 31], - [8, 31], - [8, 32], - [8, 32], - [6, 1], - [6, 1], - [6, 1], - [6, 1], - [6, 1], - [6, 1], - [6, 1], - [6, 1], - [6, 12], - [6, 12], - [6, 12], - [6, 12], - [6, 12], - [6, 12], - [6, 12], - [6, 12], - [8, 53], - [8, 53], - [8, 54], - [8, 54], - [7, 26], - [7, 26], - [7, 26], - [7, 26], - [8, 39], - [8, 39], - [8, 40], - [8, 40], - [8, 41], - [8, 41], - [8, 42], - [8, 42], - [8, 43], - [8, 43], - [8, 44], - [8, 44], - [7, 21], - [7, 21], - [7, 21], - [7, 21], - [7, 28], - [7, 28], - [7, 28], - [7, 28], - [8, 61], - [8, 61], - [8, 62], - [8, 62], - [8, 63], - [8, 63], - [8, 0], - [8, 0], - [8, 320], - [8, 320], - [8, 384], - [8, 384], - [5, 10], - [5, 10], - [5, 10], - [5, 10], - [5, 10], - [5, 10], - [5, 10], - [5, 10], - [5, 10], - [5, 10], - [5, 10], - [5, 10], - [5, 10], - [5, 10], - [5, 10], - [5, 10], - [5, 11], - [5, 11], - [5, 11], - [5, 11], - [5, 11], - [5, 11], - [5, 11], - [5, 11], - [5, 11], - [5, 11], - [5, 11], - [5, 11], - [5, 11], - [5, 11], - [5, 11], - [5, 11], - [7, 27], - [7, 27], - [7, 27], - [7, 27], - [8, 59], - [8, 59], - [8, 60], - [8, 60], - [9, 1472], - [9, 1536], - [9, 1600], - [9, 1728], - [7, 18], - [7, 18], - [7, 18], - [7, 18], - [7, 24], - [7, 24], - [7, 24], - [7, 24], - [8, 49], - [8, 49], - [8, 50], - [8, 50], - [8, 51], - [8, 51], - [8, 52], - [8, 52], - [7, 25], - [7, 25], - [7, 25], - [7, 25], - [8, 55], - [8, 55], - [8, 56], - [8, 56], - [8, 57], - [8, 57], - [8, 58], - [8, 58], - [6, 192], - [6, 192], - [6, 192], - [6, 192], - [6, 192], - [6, 192], - [6, 192], - [6, 192], - [6, 1664], - [6, 1664], - [6, 1664], - [6, 1664], - [6, 1664], - [6, 1664], - [6, 1664], - [6, 1664], - [8, 448], - [8, 448], - [8, 512], - [8, 512], - [9, 704], - [9, 768], - [8, 640], - [8, 640], - [8, 576], - [8, 576], - [9, 832], - [9, 896], - [9, 960], - [9, 1024], - [9, 1088], - [9, 1152], - [9, 1216], - [9, 1280], - [9, 1344], - [9, 1408], - [7, 256], - [7, 256], - [7, 256], - [7, 256], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 2], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [4, 3], - [5, 128], - [5, 128], - [5, 128], - [5, 128], - [5, 128], - [5, 128], - [5, 128], - [5, 128], - [5, 128], - [5, 128], - [5, 128], - [5, 128], - [5, 128], - [5, 128], - [5, 128], - [5, 128], - [5, 8], - [5, 8], - [5, 8], - [5, 8], - [5, 8], - [5, 8], - [5, 8], - [5, 8], - [5, 8], - [5, 8], - [5, 8], - [5, 8], - [5, 8], - [5, 8], - [5, 8], - [5, 8], - [5, 9], - [5, 9], - [5, 9], - [5, 9], - [5, 9], - [5, 9], - [5, 9], - [5, 9], - [5, 9], - [5, 9], - [5, 9], - [5, 9], - [5, 9], - [5, 9], - [5, 9], - [5, 9], - [6, 16], - [6, 16], - [6, 16], - [6, 16], - [6, 16], - [6, 16], - [6, 16], - [6, 16], - [6, 17], - [6, 17], - [6, 17], - [6, 17], - [6, 17], - [6, 17], - [6, 17], - [6, 17], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 4], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [6, 14], - [6, 14], - [6, 14], - [6, 14], - [6, 14], - [6, 14], - [6, 14], - [6, 14], - [6, 15], - [6, 15], - [6, 15], - [6, 15], - [6, 15], - [6, 15], - [6, 15], - [6, 15], - [5, 64], - [5, 64], - [5, 64], - [5, 64], - [5, 64], - [5, 64], - [5, 64], - [5, 64], - [5, 64], - [5, 64], - [5, 64], - [5, 64], - [5, 64], - [5, 64], - [5, 64], - [5, 64], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - [4, 7], - ], - c = [ - [-1, -1], - [-1, -1], - [12, -2], - [12, -2], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [11, 1792], - [11, 1792], - [11, 1792], - [11, 1792], - [12, 1984], - [12, 1984], - [12, 2048], - [12, 2048], - [12, 2112], - [12, 2112], - [12, 2176], - [12, 2176], - [12, 2240], - [12, 2240], - [12, 2304], - [12, 2304], - [11, 1856], - [11, 1856], - [11, 1856], - [11, 1856], - [11, 1920], - [11, 1920], - [11, 1920], - [11, 1920], - [12, 2368], - [12, 2368], - [12, 2432], - [12, 2432], - [12, 2496], - [12, 2496], - [12, 2560], - [12, 2560], - [10, 18], - [10, 18], - [10, 18], - [10, 18], - [10, 18], - [10, 18], - [10, 18], - [10, 18], - [12, 52], - [12, 52], - [13, 640], - [13, 704], - [13, 768], - [13, 832], - [12, 55], - [12, 55], - [12, 56], - [12, 56], - [13, 1280], - [13, 1344], - [13, 1408], - [13, 1472], - [12, 59], - [12, 59], - [12, 60], - [12, 60], - [13, 1536], - [13, 1600], - [11, 24], - [11, 24], - [11, 24], - [11, 24], - [11, 25], - [11, 25], - [11, 25], - [11, 25], - [13, 1664], - [13, 1728], - [12, 320], - [12, 320], - [12, 384], - [12, 384], - [12, 448], - [12, 448], - [13, 512], - [13, 576], - [12, 53], - [12, 53], - [12, 54], - [12, 54], - [13, 896], - [13, 960], - [13, 1024], - [13, 1088], - [13, 1152], - [13, 1216], - [10, 64], - [10, 64], - [10, 64], - [10, 64], - [10, 64], - [10, 64], - [10, 64], - [10, 64], - ], - l = [ - [8, 13], - [8, 13], - [8, 13], - [8, 13], - [8, 13], - [8, 13], - [8, 13], - [8, 13], - [8, 13], - [8, 13], - [8, 13], - [8, 13], - [8, 13], - [8, 13], - [8, 13], - [8, 13], - [11, 23], - [11, 23], - [12, 50], - [12, 51], - [12, 44], - [12, 45], - [12, 46], - [12, 47], - [12, 57], - [12, 58], - [12, 61], - [12, 256], - [10, 16], - [10, 16], - [10, 16], - [10, 16], - [10, 17], - [10, 17], - [10, 17], - [10, 17], - [12, 48], - [12, 49], - [12, 62], - [12, 63], - [12, 30], - [12, 31], - [12, 32], - [12, 33], - [12, 40], - [12, 41], - [11, 22], - [11, 22], - [8, 14], - [8, 14], - [8, 14], - [8, 14], - [8, 14], - [8, 14], - [8, 14], - [8, 14], - [8, 14], - [8, 14], - [8, 14], - [8, 14], - [8, 14], - [8, 14], - [8, 14], - [8, 14], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 10], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [7, 11], - [9, 15], - [9, 15], - [9, 15], - [9, 15], - [9, 15], - [9, 15], - [9, 15], - [9, 15], - [12, 128], - [12, 192], - [12, 26], - [12, 27], - [12, 28], - [12, 29], - [11, 19], - [11, 19], - [11, 20], - [11, 20], - [12, 34], - [12, 35], - [12, 36], - [12, 37], - [12, 38], - [12, 39], - [11, 21], - [11, 21], - [12, 42], - [12, 43], - [10, 0], - [10, 0], - [10, 0], - [10, 0], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - [7, 12], - ], - h = [ - [-1, -1], - [-1, -1], - [-1, -1], - [-1, -1], - [6, 9], - [6, 8], - [5, 7], - [5, 7], - [4, 6], - [4, 6], - [4, 6], - [4, 6], - [4, 5], - [4, 5], - [4, 5], - [4, 5], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 1], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [3, 4], - [2, 3], - [2, 3], - [2, 3], - [2, 3], - [2, 3], - [2, 3], - [2, 3], - [2, 3], - [2, 3], - [2, 3], - [2, 3], - [2, 3], - [2, 3], - [2, 3], - [2, 3], - [2, 3], - [2, 2], - [2, 2], - [2, 2], - [2, 2], - [2, 2], - [2, 2], - [2, 2], - [2, 2], - [2, 2], - [2, 2], - [2, 2], - [2, 2], - [2, 2], - [2, 2], - [2, 2], - [2, 2], - ]; - t.CCITTFaxDecoder = class CCITTFaxDecoder { - constructor(e, t = {}) { - if (!e || "function" != typeof e.next) - throw new Error( - 'CCITTFaxDecoder - invalid "source" parameter.', - ); - this.source = e; - this.eof = !1; - this.encoding = t.K || 0; - this.eoline = t.EndOfLine || !1; - this.byteAlign = t.EncodedByteAlign || !1; - this.columns = t.Columns || 1728; - this.rows = t.Rows || 0; - this.eoblock = t.EndOfBlock ?? !0; - this.black = t.BlackIs1 || !1; - this.codingLine = new Uint32Array(this.columns + 1); - this.refLine = new Uint32Array(this.columns + 2); - this.codingLine[0] = this.columns; - this.codingPos = 0; - this.row = 0; - this.nextLine2D = this.encoding < 0; - this.inputBits = 0; - this.inputBuf = 0; - this.outputBits = 0; - this.rowsDone = !1; - let a; - for (; 0 === (a = this._lookBits(12)); ) this._eatBits(1); - 1 === a && this._eatBits(12); - if (this.encoding > 0) { - this.nextLine2D = !this._lookBits(1); - this._eatBits(1); - } - } - readNextChar() { - if (this.eof) return -1; - const e = this.refLine, - t = this.codingLine, - a = this.columns; - let i, s, o, c, l; - if (0 === this.outputBits) { - this.rowsDone && (this.eof = !0); - if (this.eof) return -1; - this.err = !1; - let o, l, h; - if (this.nextLine2D) { - for (c = 0; t[c] < a; ++c) e[c] = t[c]; - e[c++] = a; - e[c] = a; - t[0] = 0; - this.codingPos = 0; - i = 0; - s = 0; - for (; t[this.codingPos] < a; ) { - o = this._getTwoDimCode(); - switch (o) { - case 0: - this._addPixels(e[i + 1], s); - e[i + 1] < a && (i += 2); - break; - case 1: - o = l = 0; - if (s) { - do { - o += h = this._getBlackCode(); - } while (h >= 64); - do { - l += h = this._getWhiteCode(); - } while (h >= 64); - } else { - do { - o += h = this._getWhiteCode(); - } while (h >= 64); - do { - l += h = this._getBlackCode(); - } while (h >= 64); - } - this._addPixels(t[this.codingPos] + o, s); - t[this.codingPos] < a && - this._addPixels(t[this.codingPos] + l, 1 ^ s); - for (; e[i] <= t[this.codingPos] && e[i] < a; ) i += 2; - break; - case 7: - this._addPixels(e[i] + 3, s); - s ^= 1; - if (t[this.codingPos] < a) { - ++i; - for (; e[i] <= t[this.codingPos] && e[i] < a; ) - i += 2; - } - break; - case 5: - this._addPixels(e[i] + 2, s); - s ^= 1; - if (t[this.codingPos] < a) { - ++i; - for (; e[i] <= t[this.codingPos] && e[i] < a; ) - i += 2; - } - break; - case 3: - this._addPixels(e[i] + 1, s); - s ^= 1; - if (t[this.codingPos] < a) { - ++i; - for (; e[i] <= t[this.codingPos] && e[i] < a; ) - i += 2; - } - break; - case 2: - this._addPixels(e[i], s); - s ^= 1; - if (t[this.codingPos] < a) { - ++i; - for (; e[i] <= t[this.codingPos] && e[i] < a; ) - i += 2; - } - break; - case 8: - this._addPixelsNeg(e[i] - 3, s); - s ^= 1; - if (t[this.codingPos] < a) { - i > 0 ? --i : ++i; - for (; e[i] <= t[this.codingPos] && e[i] < a; ) - i += 2; - } - break; - case 6: - this._addPixelsNeg(e[i] - 2, s); - s ^= 1; - if (t[this.codingPos] < a) { - i > 0 ? --i : ++i; - for (; e[i] <= t[this.codingPos] && e[i] < a; ) - i += 2; - } - break; - case 4: - this._addPixelsNeg(e[i] - 1, s); - s ^= 1; - if (t[this.codingPos] < a) { - i > 0 ? --i : ++i; - for (; e[i] <= t[this.codingPos] && e[i] < a; ) - i += 2; - } - break; - case n: - this._addPixels(a, 0); - this.eof = !0; - break; - default: - (0, r.info)("bad 2d code"); - this._addPixels(a, 0); - this.err = !0; - } - } - } else { - t[0] = 0; - this.codingPos = 0; - s = 0; - for (; t[this.codingPos] < a; ) { - o = 0; - if (s) - do { - o += h = this._getBlackCode(); - } while (h >= 64); - else - do { - o += h = this._getWhiteCode(); - } while (h >= 64); - this._addPixels(t[this.codingPos] + o, s); - s ^= 1; - } - } - let u = !1; - this.byteAlign && (this.inputBits &= -8); - if (this.eoblock || this.row !== this.rows - 1) { - o = this._lookBits(12); - if (this.eoline) - for (; o !== n && 1 !== o; ) { - this._eatBits(1); - o = this._lookBits(12); - } - else - for (; 0 === o; ) { - this._eatBits(1); - o = this._lookBits(12); - } - if (1 === o) { - this._eatBits(12); - u = !0; - } else o === n && (this.eof = !0); - } else this.rowsDone = !0; - if (!this.eof && this.encoding > 0 && !this.rowsDone) { - this.nextLine2D = !this._lookBits(1); - this._eatBits(1); - } - if (this.eoblock && u && this.byteAlign) { - o = this._lookBits(12); - if (1 === o) { - this._eatBits(12); - if (this.encoding > 0) { - this._lookBits(1); - this._eatBits(1); - } - if (this.encoding >= 0) - for (c = 0; c < 4; ++c) { - o = this._lookBits(12); - 1 !== o && (0, r.info)("bad rtc code: " + o); - this._eatBits(12); - if (this.encoding > 0) { - this._lookBits(1); - this._eatBits(1); - } - } - this.eof = !0; - } - } else if (this.err && this.eoline) { - for (;;) { - o = this._lookBits(13); - if (o === n) { - this.eof = !0; - return -1; - } - if (o >> 1 == 1) break; - this._eatBits(1); - } - this._eatBits(12); - if (this.encoding > 0) { - this._eatBits(1); - this.nextLine2D = !(1 & o); - } - } - this.outputBits = - t[0] > 0 ? t[(this.codingPos = 0)] : t[(this.codingPos = 1)]; - this.row++; - } - if (this.outputBits >= 8) { - l = 1 & this.codingPos ? 0 : 255; - this.outputBits -= 8; - if (0 === this.outputBits && t[this.codingPos] < a) { - this.codingPos++; - this.outputBits = t[this.codingPos] - t[this.codingPos - 1]; - } - } else { - o = 8; - l = 0; - do { - if ("number" != typeof this.outputBits) - throw new r.FormatError( - 'Invalid /CCITTFaxDecode data, "outputBits" must be a number.', - ); - if (this.outputBits > o) { - l <<= o; - 1 & this.codingPos || (l |= 255 >> (8 - o)); - this.outputBits -= o; - o = 0; - } else { - l <<= this.outputBits; - 1 & this.codingPos || (l |= 255 >> (8 - this.outputBits)); - o -= this.outputBits; - this.outputBits = 0; - if (t[this.codingPos] < a) { - this.codingPos++; - this.outputBits = - t[this.codingPos] - t[this.codingPos - 1]; - } else if (o > 0) { - l <<= o; - o = 0; - } - } - } while (o); - } - this.black && (l ^= 255); - return l; - } - _addPixels(e, t) { - const a = this.codingLine; - let n = this.codingPos; - if (e > a[n]) { - if (e > this.columns) { - (0, r.info)("row is wrong length"); - this.err = !0; - e = this.columns; - } - (1 & n) ^ t && ++n; - a[n] = e; - } - this.codingPos = n; - } - _addPixelsNeg(e, t) { - const a = this.codingLine; - let n = this.codingPos; - if (e > a[n]) { - if (e > this.columns) { - (0, r.info)("row is wrong length"); - this.err = !0; - e = this.columns; - } - (1 & n) ^ t && ++n; - a[n] = e; - } else if (e < a[n]) { - if (e < 0) { - (0, r.info)("invalid code"); - this.err = !0; - e = 0; - } - for (; n > 0 && e < a[n - 1]; ) --n; - a[n] = e; - } - this.codingPos = n; - } - _findTableCode(e, t, a, r) { - const i = r || 0; - for (let r = e; r <= t; ++r) { - let e = this._lookBits(r); - if (e === n) return [!0, 1, !1]; - r < t && (e <<= t - r); - if (!i || e >= i) { - const t = a[e - i]; - if (t[0] === r) { - this._eatBits(r); - return [!0, t[1], !0]; - } - } - } - return [!1, 0, !1]; - } - _getTwoDimCode() { - let e, - t = 0; - if (this.eoblock) { - t = this._lookBits(7); - e = i[t]; - if (e?.[0] > 0) { - this._eatBits(e[0]); - return e[1]; - } - } else { - const e = this._findTableCode(1, 7, i); - if (e[0] && e[2]) return e[1]; - } - (0, r.info)("Bad two dim code"); - return n; - } - _getWhiteCode() { - let e, - t = 0; - if (this.eoblock) { - t = this._lookBits(12); - if (t === n) return 1; - e = t >> 5 == 0 ? s[t] : o[t >> 3]; - if (e[0] > 0) { - this._eatBits(e[0]); - return e[1]; - } - } else { - let e = this._findTableCode(1, 9, o); - if (e[0]) return e[1]; - e = this._findTableCode(11, 12, s); - if (e[0]) return e[1]; - } - (0, r.info)("bad white code"); - this._eatBits(1); - return 1; - } - _getBlackCode() { - let e, t; - if (this.eoblock) { - e = this._lookBits(13); - if (e === n) return 1; - t = - e >> 7 == 0 - ? c[e] - : e >> 9 == 0 && e >> 7 != 0 - ? l[(e >> 1) - 64] - : h[e >> 7]; - if (t[0] > 0) { - this._eatBits(t[0]); - return t[1]; - } - } else { - let e = this._findTableCode(2, 6, h); - if (e[0]) return e[1]; - e = this._findTableCode(7, 12, l, 64); - if (e[0]) return e[1]; - e = this._findTableCode(10, 13, c); - if (e[0]) return e[1]; - } - (0, r.info)("bad black code"); - this._eatBits(1); - return 1; - } - _lookBits(e) { - let t; - for (; this.inputBits < e; ) { - if (-1 === (t = this.source.next())) - return 0 === this.inputBits - ? n - : (this.inputBuf << (e - this.inputBits)) & - (65535 >> (16 - e)); - this.inputBuf = (this.inputBuf << 8) | t; - this.inputBits += 8; - } - return ( - (this.inputBuf >> (this.inputBits - e)) & (65535 >> (16 - e)) - ); - } - _eatBits(e) { - (this.inputBits -= e) < 0 && (this.inputBits = 0); - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.FlateStream = void 0; - var r = a(18), - n = a(2); - const i = new Int32Array([ - 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15, - ]), - s = new Int32Array([ - 3, 4, 5, 6, 7, 8, 9, 10, 65547, 65549, 65551, 65553, 131091, - 131095, 131099, 131103, 196643, 196651, 196659, 196667, 262211, - 262227, 262243, 262259, 327811, 327843, 327875, 327907, 258, 258, - 258, - ]), - o = new Int32Array([ - 1, 2, 3, 4, 65541, 65543, 131081, 131085, 196625, 196633, 262177, - 262193, 327745, 327777, 393345, 393409, 459009, 459137, 524801, - 525057, 590849, 591361, 657409, 658433, 724993, 727041, 794625, - 798721, 868353, 876545, - ]), - c = [ - new Int32Array([ - 459008, 524368, 524304, 524568, 459024, 524400, 524336, 590016, - 459016, 524384, 524320, 589984, 524288, 524416, 524352, 590048, - 459012, 524376, 524312, 589968, 459028, 524408, 524344, 590032, - 459020, 524392, 524328, 59e4, 524296, 524424, 524360, 590064, - 459010, 524372, 524308, 524572, 459026, 524404, 524340, 590024, - 459018, 524388, 524324, 589992, 524292, 524420, 524356, 590056, - 459014, 524380, 524316, 589976, 459030, 524412, 524348, 590040, - 459022, 524396, 524332, 590008, 524300, 524428, 524364, 590072, - 459009, 524370, 524306, 524570, 459025, 524402, 524338, 590020, - 459017, 524386, 524322, 589988, 524290, 524418, 524354, 590052, - 459013, 524378, 524314, 589972, 459029, 524410, 524346, 590036, - 459021, 524394, 524330, 590004, 524298, 524426, 524362, 590068, - 459011, 524374, 524310, 524574, 459027, 524406, 524342, 590028, - 459019, 524390, 524326, 589996, 524294, 524422, 524358, 590060, - 459015, 524382, 524318, 589980, 459031, 524414, 524350, 590044, - 459023, 524398, 524334, 590012, 524302, 524430, 524366, 590076, - 459008, 524369, 524305, 524569, 459024, 524401, 524337, 590018, - 459016, 524385, 524321, 589986, 524289, 524417, 524353, 590050, - 459012, 524377, 524313, 589970, 459028, 524409, 524345, 590034, - 459020, 524393, 524329, 590002, 524297, 524425, 524361, 590066, - 459010, 524373, 524309, 524573, 459026, 524405, 524341, 590026, - 459018, 524389, 524325, 589994, 524293, 524421, 524357, 590058, - 459014, 524381, 524317, 589978, 459030, 524413, 524349, 590042, - 459022, 524397, 524333, 590010, 524301, 524429, 524365, 590074, - 459009, 524371, 524307, 524571, 459025, 524403, 524339, 590022, - 459017, 524387, 524323, 589990, 524291, 524419, 524355, 590054, - 459013, 524379, 524315, 589974, 459029, 524411, 524347, 590038, - 459021, 524395, 524331, 590006, 524299, 524427, 524363, 590070, - 459011, 524375, 524311, 524575, 459027, 524407, 524343, 590030, - 459019, 524391, 524327, 589998, 524295, 524423, 524359, 590062, - 459015, 524383, 524319, 589982, 459031, 524415, 524351, 590046, - 459023, 524399, 524335, 590014, 524303, 524431, 524367, 590078, - 459008, 524368, 524304, 524568, 459024, 524400, 524336, 590017, - 459016, 524384, 524320, 589985, 524288, 524416, 524352, 590049, - 459012, 524376, 524312, 589969, 459028, 524408, 524344, 590033, - 459020, 524392, 524328, 590001, 524296, 524424, 524360, 590065, - 459010, 524372, 524308, 524572, 459026, 524404, 524340, 590025, - 459018, 524388, 524324, 589993, 524292, 524420, 524356, 590057, - 459014, 524380, 524316, 589977, 459030, 524412, 524348, 590041, - 459022, 524396, 524332, 590009, 524300, 524428, 524364, 590073, - 459009, 524370, 524306, 524570, 459025, 524402, 524338, 590021, - 459017, 524386, 524322, 589989, 524290, 524418, 524354, 590053, - 459013, 524378, 524314, 589973, 459029, 524410, 524346, 590037, - 459021, 524394, 524330, 590005, 524298, 524426, 524362, 590069, - 459011, 524374, 524310, 524574, 459027, 524406, 524342, 590029, - 459019, 524390, 524326, 589997, 524294, 524422, 524358, 590061, - 459015, 524382, 524318, 589981, 459031, 524414, 524350, 590045, - 459023, 524398, 524334, 590013, 524302, 524430, 524366, 590077, - 459008, 524369, 524305, 524569, 459024, 524401, 524337, 590019, - 459016, 524385, 524321, 589987, 524289, 524417, 524353, 590051, - 459012, 524377, 524313, 589971, 459028, 524409, 524345, 590035, - 459020, 524393, 524329, 590003, 524297, 524425, 524361, 590067, - 459010, 524373, 524309, 524573, 459026, 524405, 524341, 590027, - 459018, 524389, 524325, 589995, 524293, 524421, 524357, 590059, - 459014, 524381, 524317, 589979, 459030, 524413, 524349, 590043, - 459022, 524397, 524333, 590011, 524301, 524429, 524365, 590075, - 459009, 524371, 524307, 524571, 459025, 524403, 524339, 590023, - 459017, 524387, 524323, 589991, 524291, 524419, 524355, 590055, - 459013, 524379, 524315, 589975, 459029, 524411, 524347, 590039, - 459021, 524395, 524331, 590007, 524299, 524427, 524363, 590071, - 459011, 524375, 524311, 524575, 459027, 524407, 524343, 590031, - 459019, 524391, 524327, 589999, 524295, 524423, 524359, 590063, - 459015, 524383, 524319, 589983, 459031, 524415, 524351, 590047, - 459023, 524399, 524335, 590015, 524303, 524431, 524367, 590079, - ]), - 9, - ], - l = [ - new Int32Array([ - 327680, 327696, 327688, 327704, 327684, 327700, 327692, 327708, - 327682, 327698, 327690, 327706, 327686, 327702, 327694, 0, - 327681, 327697, 327689, 327705, 327685, 327701, 327693, 327709, - 327683, 327699, 327691, 327707, 327687, 327703, 327695, 0, - ]), - 5, - ]; - class FlateStream extends r.DecodeStream { - constructor(e, t) { - super(t); - this.str = e; - this.dict = e.dict; - const a = e.getByte(), - r = e.getByte(); - if (-1 === a || -1 === r) - throw new n.FormatError( - `Invalid header in flate stream: ${a}, ${r}`, - ); - if (8 != (15 & a)) - throw new n.FormatError( - `Unknown compression method in flate stream: ${a}, ${r}`, - ); - if (((a << 8) + r) % 31 != 0) - throw new n.FormatError( - `Bad FCHECK in flate stream: ${a}, ${r}`, - ); - if (32 & r) - throw new n.FormatError( - `FDICT bit set in flate stream: ${a}, ${r}`, - ); - this.codeSize = 0; - this.codeBuf = 0; - } - getBits(e) { - const t = this.str; - let a, - r = this.codeSize, - i = this.codeBuf; - for (; r < e; ) { - if (-1 === (a = t.getByte())) - throw new n.FormatError("Bad encoding in flate stream"); - i |= a << r; - r += 8; - } - a = i & ((1 << e) - 1); - this.codeBuf = i >> e; - this.codeSize = r -= e; - return a; - } - getCode(e) { - const t = this.str, - a = e[0], - r = e[1]; - let i, - s = this.codeSize, - o = this.codeBuf; - for (; s < r && -1 !== (i = t.getByte()); ) { - o |= i << s; - s += 8; - } - const c = a[o & ((1 << r) - 1)], - l = c >> 16, - h = 65535 & c; - if (l < 1 || s < l) - throw new n.FormatError("Bad encoding in flate stream"); - this.codeBuf = o >> l; - this.codeSize = s - l; - return h; - } - generateHuffmanTable(e) { - const t = e.length; - let a, - r = 0; - for (a = 0; a < t; ++a) e[a] > r && (r = e[a]); - const n = 1 << r, - i = new Int32Array(n); - for (let s = 1, o = 0, c = 2; s <= r; ++s, o <<= 1, c <<= 1) - for (let r = 0; r < t; ++r) - if (e[r] === s) { - let e = 0, - t = o; - for (a = 0; a < s; ++a) { - e = (e << 1) | (1 & t); - t >>= 1; - } - for (a = e; a < n; a += c) i[a] = (s << 16) | r; - ++o; - } - return [i, r]; - } - readBlock() { - let e, t; - const a = this.str; - let r, - h, - u = this.getBits(3); - 1 & u && (this.eof = !0); - u >>= 1; - if (0 === u) { - let t; - if (-1 === (t = a.getByte())) - throw new n.FormatError("Bad block header in flate stream"); - let r = t; - if (-1 === (t = a.getByte())) - throw new n.FormatError("Bad block header in flate stream"); - r |= t << 8; - if (-1 === (t = a.getByte())) - throw new n.FormatError("Bad block header in flate stream"); - let i = t; - if (-1 === (t = a.getByte())) - throw new n.FormatError("Bad block header in flate stream"); - i |= t << 8; - if (i !== (65535 & ~r) && (0 !== r || 0 !== i)) - throw new n.FormatError( - "Bad uncompressed block length in flate stream", - ); - this.codeBuf = 0; - this.codeSize = 0; - const s = this.bufferLength, - o = s + r; - e = this.ensureBuffer(o); - this.bufferLength = o; - if (0 === r) -1 === a.peekByte() && (this.eof = !0); - else { - const t = a.getBytes(r); - e.set(t, s); - t.length < r && (this.eof = !0); - } - return; - } - if (1 === u) { - r = c; - h = l; - } else { - if (2 !== u) - throw new n.FormatError("Unknown block type in flate stream"); - { - const e = this.getBits(5) + 257, - a = this.getBits(5) + 1, - n = this.getBits(4) + 4, - s = new Uint8Array(i.length); - let o; - for (o = 0; o < n; ++o) s[i[o]] = this.getBits(3); - const c = this.generateHuffmanTable(s); - t = 0; - o = 0; - const l = e + a, - u = new Uint8Array(l); - let d, f, g; - for (; o < l; ) { - const e = this.getCode(c); - if (16 === e) { - d = 2; - f = 3; - g = t; - } else if (17 === e) { - d = 3; - f = 3; - g = t = 0; - } else { - if (18 !== e) { - u[o++] = t = e; - continue; - } - d = 7; - f = 11; - g = t = 0; - } - let a = this.getBits(d) + f; - for (; a-- > 0; ) u[o++] = g; - } - r = this.generateHuffmanTable(u.subarray(0, e)); - h = this.generateHuffmanTable(u.subarray(e, l)); - } - } - e = this.buffer; - let d = e ? e.length : 0, - f = this.bufferLength; - for (;;) { - let a = this.getCode(r); - if (a < 256) { - if (f + 1 >= d) { - e = this.ensureBuffer(f + 1); - d = e.length; - } - e[f++] = a; - continue; - } - if (256 === a) { - this.bufferLength = f; - return; - } - a -= 257; - a = s[a]; - let n = a >> 16; - n > 0 && (n = this.getBits(n)); - t = (65535 & a) + n; - a = this.getCode(h); - a = o[a]; - n = a >> 16; - n > 0 && (n = this.getBits(n)); - const i = (65535 & a) + n; - if (f + t >= d) { - e = this.ensureBuffer(f + t); - d = e.length; - } - for (let a = 0; a < t; ++a, ++f) e[f] = e[f - i]; - } - } - } - t.FlateStream = FlateStream; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.Jbig2Stream = void 0; - var r = a(5), - n = a(18), - i = a(4), - s = a(24), - o = a(2); - class Jbig2Stream extends n.DecodeStream { - constructor(e, t, a) { - super(t); - this.stream = e; - this.dict = e.dict; - this.maybeLength = t; - this.params = a; - } - get bytes() { - return (0, o.shadow)( - this, - "bytes", - this.stream.getBytes(this.maybeLength), - ); - } - ensureBuffer(e) {} - readBlock() { - if (this.eof) return; - const e = new s.Jbig2Image(), - t = []; - if (this.params instanceof i.Dict) { - const e = this.params.get("JBIG2Globals"); - if (e instanceof r.BaseStream) { - const a = e.getBytes(); - t.push({ data: a, start: 0, end: a.length }); - } - } - t.push({ data: this.bytes, start: 0, end: this.bytes.length }); - const a = e.parseChunks(t), - n = a.length; - for (let e = 0; e < n; e++) a[e] ^= 255; - this.buffer = a; - this.bufferLength = n; - this.eof = !0; - } - } - t.Jbig2Stream = Jbig2Stream; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.Jbig2Image = void 0; - var r = a(2), - n = a(3), - i = a(25), - s = a(21); - class Jbig2Error extends r.BaseException { - constructor(e) { - super(`JBIG2 error: ${e}`, "Jbig2Error"); - } - } - class ContextCache { - getContexts(e) { - return e in this ? this[e] : (this[e] = new Int8Array(65536)); - } - } - class DecodingContext { - constructor(e, t, a) { - this.data = e; - this.start = t; - this.end = a; - } - get decoder() { - const e = new i.ArithmeticDecoder( - this.data, - this.start, - this.end, - ); - return (0, r.shadow)(this, "decoder", e); - } - get contextCache() { - const e = new ContextCache(); - return (0, r.shadow)(this, "contextCache", e); - } - } - const o = 2 ** 31 - 1, - c = -(2 ** 31); - function decodeInteger(e, t, a) { - const r = e.getContexts(t); - let n = 1; - function readBits(e) { - let t = 0; - for (let i = 0; i < e; i++) { - const e = a.readBit(r, n); - n = n < 256 ? (n << 1) | e : (511 & ((n << 1) | e)) | 256; - t = (t << 1) | e; - } - return t >>> 0; - } - const i = readBits(1), - s = readBits(1) - ? readBits(1) - ? readBits(1) - ? readBits(1) - ? readBits(1) - ? readBits(32) + 4436 - : readBits(12) + 340 - : readBits(8) + 84 - : readBits(6) + 20 - : readBits(4) + 4 - : readBits(2); - let l; - 0 === i ? (l = s) : s > 0 && (l = -s); - return l >= c && l <= o ? l : null; - } - function decodeIAID(e, t, a) { - const r = e.getContexts("IAID"); - let n = 1; - for (let e = 0; e < a; e++) { - n = (n << 1) | t.readBit(r, n); - } - return a < 31 ? n & ((1 << a) - 1) : 2147483647 & n; - } - const l = [ - "SymbolDictionary", - null, - null, - null, - "IntermediateTextRegion", - null, - "ImmediateTextRegion", - "ImmediateLosslessTextRegion", - null, - null, - null, - null, - null, - null, - null, - null, - "PatternDictionary", - null, - null, - null, - "IntermediateHalftoneRegion", - null, - "ImmediateHalftoneRegion", - "ImmediateLosslessHalftoneRegion", - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - "IntermediateGenericRegion", - null, - "ImmediateGenericRegion", - "ImmediateLosslessGenericRegion", - "IntermediateGenericRefinementRegion", - null, - "ImmediateGenericRefinementRegion", - "ImmediateLosslessGenericRefinementRegion", - null, - null, - null, - null, - "PageInformation", - "EndOfPage", - "EndOfStripe", - "EndOfFile", - "Profiles", - "Tables", - null, - null, - null, - null, - null, - null, - null, - null, - "Extension", - ], - h = [ - [ - { x: -1, y: -2 }, - { x: 0, y: -2 }, - { x: 1, y: -2 }, - { x: -2, y: -1 }, - { x: -1, y: -1 }, - { x: 0, y: -1 }, - { x: 1, y: -1 }, - { x: 2, y: -1 }, - { x: -4, y: 0 }, - { x: -3, y: 0 }, - { x: -2, y: 0 }, - { x: -1, y: 0 }, - ], - [ - { x: -1, y: -2 }, - { x: 0, y: -2 }, - { x: 1, y: -2 }, - { x: 2, y: -2 }, - { x: -2, y: -1 }, - { x: -1, y: -1 }, - { x: 0, y: -1 }, - { x: 1, y: -1 }, - { x: 2, y: -1 }, - { x: -3, y: 0 }, - { x: -2, y: 0 }, - { x: -1, y: 0 }, - ], - [ - { x: -1, y: -2 }, - { x: 0, y: -2 }, - { x: 1, y: -2 }, - { x: -2, y: -1 }, - { x: -1, y: -1 }, - { x: 0, y: -1 }, - { x: 1, y: -1 }, - { x: -2, y: 0 }, - { x: -1, y: 0 }, - ], - [ - { x: -3, y: -1 }, - { x: -2, y: -1 }, - { x: -1, y: -1 }, - { x: 0, y: -1 }, - { x: 1, y: -1 }, - { x: -4, y: 0 }, - { x: -3, y: 0 }, - { x: -2, y: 0 }, - { x: -1, y: 0 }, - ], - ], - u = [ - { - coding: [ - { x: 0, y: -1 }, - { x: 1, y: -1 }, - { x: -1, y: 0 }, - ], - reference: [ - { x: 0, y: -1 }, - { x: 1, y: -1 }, - { x: -1, y: 0 }, - { x: 0, y: 0 }, - { x: 1, y: 0 }, - { x: -1, y: 1 }, - { x: 0, y: 1 }, - { x: 1, y: 1 }, - ], - }, - { - coding: [ - { x: -1, y: -1 }, - { x: 0, y: -1 }, - { x: 1, y: -1 }, - { x: -1, y: 0 }, - ], - reference: [ - { x: 0, y: -1 }, - { x: -1, y: 0 }, - { x: 0, y: 0 }, - { x: 1, y: 0 }, - { x: 0, y: 1 }, - { x: 1, y: 1 }, - ], - }, - ], - d = [39717, 1941, 229, 405], - f = [32, 8]; - function decodeBitmap(e, t, a, r, n, i, s, o) { - if (e) { - return decodeMMRBitmap( - new Reader(o.data, o.start, o.end), - t, - a, - !1, - ); - } - if ( - 0 === r && - !i && - !n && - 4 === s.length && - 3 === s[0].x && - -1 === s[0].y && - -3 === s[1].x && - -1 === s[1].y && - 2 === s[2].x && - -2 === s[2].y && - -2 === s[3].x && - -2 === s[3].y - ) - return (function decodeBitmapTemplate0(e, t, a) { - const r = a.decoder, - n = a.contextCache.getContexts("GB"), - i = []; - let s, o, c, l, h, u, d; - for (o = 0; o < t; o++) { - h = i[o] = new Uint8Array(e); - u = o < 1 ? h : i[o - 1]; - d = o < 2 ? h : i[o - 2]; - s = - (d[0] << 13) | - (d[1] << 12) | - (d[2] << 11) | - (u[0] << 7) | - (u[1] << 6) | - (u[2] << 5) | - (u[3] << 4); - for (c = 0; c < e; c++) { - h[c] = l = r.readBit(n, s); - s = - ((31735 & s) << 1) | - (c + 3 < e ? d[c + 3] << 11 : 0) | - (c + 4 < e ? u[c + 4] << 4 : 0) | - l; - } - } - return i; - })(t, a, o); - const c = !!i, - l = h[r].concat(s); - l.sort(function (e, t) { - return e.y - t.y || e.x - t.x; - }); - const u = l.length, - f = new Int8Array(u), - g = new Int8Array(u), - p = []; - let m, - b, - y = 0, - w = 0, - S = 0, - x = 0; - for (b = 0; b < u; b++) { - f[b] = l[b].x; - g[b] = l[b].y; - w = Math.min(w, l[b].x); - S = Math.max(S, l[b].x); - x = Math.min(x, l[b].y); - b < u - 1 && l[b].y === l[b + 1].y && l[b].x === l[b + 1].x - 1 - ? (y |= 1 << (u - 1 - b)) - : p.push(b); - } - const C = p.length, - k = new Int8Array(C), - v = new Int8Array(C), - F = new Uint16Array(C); - for (m = 0; m < C; m++) { - b = p[m]; - k[m] = l[b].x; - v[m] = l[b].y; - F[m] = 1 << (u - 1 - b); - } - const O = -w, - T = -x, - M = t - S, - D = d[r]; - let E = new Uint8Array(t); - const N = [], - R = o.decoder, - L = o.contextCache.getContexts("GB"); - let $, - _, - j, - U, - X, - H = 0, - q = 0; - for (let e = 0; e < a; e++) { - if (n) { - H ^= R.readBit(L, D); - if (H) { - N.push(E); - continue; - } - } - E = new Uint8Array(E); - N.push(E); - for ($ = 0; $ < t; $++) { - if (c && i[e][$]) { - E[$] = 0; - continue; - } - if ($ >= O && $ < M && e >= T) { - q = (q << 1) & y; - for (b = 0; b < C; b++) { - _ = e + v[b]; - j = $ + k[b]; - U = N[_][j]; - if (U) { - U = F[b]; - q |= U; - } - } - } else { - q = 0; - X = u - 1; - for (b = 0; b < u; b++, X--) { - j = $ + f[b]; - if (j >= 0 && j < t) { - _ = e + g[b]; - if (_ >= 0) { - U = N[_][j]; - U && (q |= U << X); - } - } - } - } - const a = R.readBit(L, q); - E[$] = a; - } - } - return N; - } - function decodeRefinement(e, t, a, r, n, i, s, o, c) { - let l = u[a].coding; - 0 === a && (l = l.concat([o[0]])); - const h = l.length, - d = new Int32Array(h), - g = new Int32Array(h); - let p; - for (p = 0; p < h; p++) { - d[p] = l[p].x; - g[p] = l[p].y; - } - let m = u[a].reference; - 0 === a && (m = m.concat([o[1]])); - const b = m.length, - y = new Int32Array(b), - w = new Int32Array(b); - for (p = 0; p < b; p++) { - y[p] = m[p].x; - w[p] = m[p].y; - } - const S = r[0].length, - x = r.length, - C = f[a], - k = [], - v = c.decoder, - F = c.contextCache.getContexts("GR"); - let O = 0; - for (let a = 0; a < t; a++) { - if (s) { - O ^= v.readBit(F, C); - if (O) throw new Jbig2Error("prediction is not supported"); - } - const t = new Uint8Array(e); - k.push(t); - for (let s = 0; s < e; s++) { - let o, - c, - l = 0; - for (p = 0; p < h; p++) { - o = a + g[p]; - c = s + d[p]; - o < 0 || c < 0 || c >= e - ? (l <<= 1) - : (l = (l << 1) | k[o][c]); - } - for (p = 0; p < b; p++) { - o = a + w[p] - i; - c = s + y[p] - n; - o < 0 || o >= x || c < 0 || c >= S - ? (l <<= 1) - : (l = (l << 1) | r[o][c]); - } - const u = v.readBit(F, l); - t[s] = u; - } - } - return k; - } - function decodeTextRegion( - e, - t, - a, - r, - n, - i, - s, - o, - c, - l, - h, - u, - d, - f, - g, - p, - m, - b, - y, - ) { - if (e && t) - throw new Jbig2Error("refinement with Huffman is not supported"); - const w = []; - let S, x; - for (S = 0; S < r; S++) { - x = new Uint8Array(a); - if (n) for (let e = 0; e < a; e++) x[e] = n; - w.push(x); - } - const C = m.decoder, - k = m.contextCache; - let v = e ? -f.tableDeltaT.decode(y) : -decodeInteger(k, "IADT", C), - F = 0; - S = 0; - for (; S < i; ) { - v += e ? f.tableDeltaT.decode(y) : decodeInteger(k, "IADT", C); - F += e ? f.tableFirstS.decode(y) : decodeInteger(k, "IAFS", C); - let r = F; - for (;;) { - let n = 0; - s > 1 && (n = e ? y.readBits(b) : decodeInteger(k, "IAIT", C)); - const i = s * v + n, - F = e ? f.symbolIDTable.decode(y) : decodeIAID(k, C, c), - O = t && (e ? y.readBit() : decodeInteger(k, "IARI", C)); - let T = o[F], - M = T[0].length, - D = T.length; - if (O) { - const e = decodeInteger(k, "IARDW", C), - t = decodeInteger(k, "IARDH", C); - M += e; - D += t; - T = decodeRefinement( - M, - D, - g, - T, - (e >> 1) + decodeInteger(k, "IARDX", C), - (t >> 1) + decodeInteger(k, "IARDY", C), - !1, - p, - m, - ); - } - const E = i - (1 & u ? 0 : D - 1), - N = r - (2 & u ? M - 1 : 0); - let R, L, $; - if (l) { - for (R = 0; R < D; R++) { - x = w[N + R]; - if (!x) continue; - $ = T[R]; - const e = Math.min(a - E, M); - switch (d) { - case 0: - for (L = 0; L < e; L++) x[E + L] |= $[L]; - break; - case 2: - for (L = 0; L < e; L++) x[E + L] ^= $[L]; - break; - default: - throw new Jbig2Error(`operator ${d} is not supported`); - } - } - r += D - 1; - } else { - for (L = 0; L < D; L++) { - x = w[E + L]; - if (x) { - $ = T[L]; - switch (d) { - case 0: - for (R = 0; R < M; R++) x[N + R] |= $[R]; - break; - case 2: - for (R = 0; R < M; R++) x[N + R] ^= $[R]; - break; - default: - throw new Jbig2Error( - `operator ${d} is not supported`, - ); - } - } - } - r += M - 1; - } - S++; - const _ = e - ? f.tableDeltaS.decode(y) - : decodeInteger(k, "IADS", C); - if (null === _) break; - r += _ + h; - } - } - return w; - } - function readSegmentHeader(e, t) { - const a = {}; - a.number = (0, n.readUint32)(e, t); - const r = e[t + 4], - i = 63 & r; - if (!l[i]) throw new Jbig2Error("invalid segment type: " + i); - a.type = i; - a.typeName = l[i]; - a.deferredNonRetain = !!(128 & r); - const s = !!(64 & r), - o = e[t + 5]; - let c = (o >> 5) & 7; - const h = [31 & o]; - let u = t + 6; - if (7 === o) { - c = 536870911 & (0, n.readUint32)(e, u - 1); - u += 3; - let t = (c + 7) >> 3; - h[0] = e[u++]; - for (; --t > 0; ) h.push(e[u++]); - } else if (5 === o || 6 === o) - throw new Jbig2Error("invalid referred-to flags"); - a.retainBits = h; - let d = 4; - a.number <= 256 ? (d = 1) : a.number <= 65536 && (d = 2); - const f = []; - let p, m; - for (p = 0; p < c; p++) { - let t; - t = - 1 === d - ? e[u] - : 2 === d - ? (0, n.readUint16)(e, u) - : (0, n.readUint32)(e, u); - f.push(t); - u += d; - } - a.referredTo = f; - if (s) { - a.pageAssociation = (0, n.readUint32)(e, u); - u += 4; - } else a.pageAssociation = e[u++]; - a.length = (0, n.readUint32)(e, u); - u += 4; - if (4294967295 === a.length) { - if (38 !== i) - throw new Jbig2Error("invalid unknown segment length"); - { - const t = readRegionSegmentInformation(e, u), - r = !!(1 & e[u + g]), - n = 6, - i = new Uint8Array(n); - if (!r) { - i[0] = 255; - i[1] = 172; - } - i[2] = (t.height >>> 24) & 255; - i[3] = (t.height >> 16) & 255; - i[4] = (t.height >> 8) & 255; - i[5] = 255 & t.height; - for (p = u, m = e.length; p < m; p++) { - let t = 0; - for (; t < n && i[t] === e[p + t]; ) t++; - if (t === n) { - a.length = p + n; - break; - } - } - if (4294967295 === a.length) - throw new Jbig2Error("segment end was not found"); - } - } - a.headerEnd = u; - return a; - } - function readSegments(e, t, a, r) { - const n = []; - let i = a; - for (; i < r; ) { - const a = readSegmentHeader(t, i); - i = a.headerEnd; - const r = { header: a, data: t }; - if (!e.randomAccess) { - r.start = i; - i += a.length; - r.end = i; - } - n.push(r); - if (51 === a.type) break; - } - if (e.randomAccess) - for (let e = 0, t = n.length; e < t; e++) { - n[e].start = i; - i += n[e].header.length; - n[e].end = i; - } - return n; - } - function readRegionSegmentInformation(e, t) { - return { - width: (0, n.readUint32)(e, t), - height: (0, n.readUint32)(e, t + 4), - x: (0, n.readUint32)(e, t + 8), - y: (0, n.readUint32)(e, t + 12), - combinationOperator: 7 & e[t + 16], - }; - } - const g = 17; - function processSegment(e, t) { - const a = e.header, - r = e.data, - i = e.end; - let s, - o, - c, - l, - h = e.start; - switch (a.type) { - case 0: - const e = {}, - t = (0, n.readUint16)(r, h); - e.huffman = !!(1 & t); - e.refinement = !!(2 & t); - e.huffmanDHSelector = (t >> 2) & 3; - e.huffmanDWSelector = (t >> 4) & 3; - e.bitmapSizeSelector = (t >> 6) & 1; - e.aggregationInstancesSelector = (t >> 7) & 1; - e.bitmapCodingContextUsed = !!(256 & t); - e.bitmapCodingContextRetained = !!(512 & t); - e.template = (t >> 10) & 3; - e.refinementTemplate = (t >> 12) & 1; - h += 2; - if (!e.huffman) { - l = 0 === e.template ? 4 : 1; - o = []; - for (c = 0; c < l; c++) { - o.push({ - x: (0, n.readInt8)(r, h), - y: (0, n.readInt8)(r, h + 1), - }); - h += 2; - } - e.at = o; - } - if (e.refinement && !e.refinementTemplate) { - o = []; - for (c = 0; c < 2; c++) { - o.push({ - x: (0, n.readInt8)(r, h), - y: (0, n.readInt8)(r, h + 1), - }); - h += 2; - } - e.refinementAt = o; - } - e.numberOfExportedSymbols = (0, n.readUint32)(r, h); - h += 4; - e.numberOfNewSymbols = (0, n.readUint32)(r, h); - h += 4; - s = [e, a.number, a.referredTo, r, h, i]; - break; - case 6: - case 7: - const u = {}; - u.info = readRegionSegmentInformation(r, h); - h += g; - const d = (0, n.readUint16)(r, h); - h += 2; - u.huffman = !!(1 & d); - u.refinement = !!(2 & d); - u.logStripSize = (d >> 2) & 3; - u.stripSize = 1 << u.logStripSize; - u.referenceCorner = (d >> 4) & 3; - u.transposed = !!(64 & d); - u.combinationOperator = (d >> 7) & 3; - u.defaultPixelValue = (d >> 9) & 1; - u.dsOffset = (d << 17) >> 27; - u.refinementTemplate = (d >> 15) & 1; - if (u.huffman) { - const e = (0, n.readUint16)(r, h); - h += 2; - u.huffmanFS = 3 & e; - u.huffmanDS = (e >> 2) & 3; - u.huffmanDT = (e >> 4) & 3; - u.huffmanRefinementDW = (e >> 6) & 3; - u.huffmanRefinementDH = (e >> 8) & 3; - u.huffmanRefinementDX = (e >> 10) & 3; - u.huffmanRefinementDY = (e >> 12) & 3; - u.huffmanRefinementSizeSelector = !!(16384 & e); - } - if (u.refinement && !u.refinementTemplate) { - o = []; - for (c = 0; c < 2; c++) { - o.push({ - x: (0, n.readInt8)(r, h), - y: (0, n.readInt8)(r, h + 1), - }); - h += 2; - } - u.refinementAt = o; - } - u.numberOfSymbolInstances = (0, n.readUint32)(r, h); - h += 4; - s = [u, a.referredTo, r, h, i]; - break; - case 16: - const f = {}, - p = r[h++]; - f.mmr = !!(1 & p); - f.template = (p >> 1) & 3; - f.patternWidth = r[h++]; - f.patternHeight = r[h++]; - f.maxPatternIndex = (0, n.readUint32)(r, h); - h += 4; - s = [f, a.number, r, h, i]; - break; - case 22: - case 23: - const m = {}; - m.info = readRegionSegmentInformation(r, h); - h += g; - const b = r[h++]; - m.mmr = !!(1 & b); - m.template = (b >> 1) & 3; - m.enableSkip = !!(8 & b); - m.combinationOperator = (b >> 4) & 7; - m.defaultPixelValue = (b >> 7) & 1; - m.gridWidth = (0, n.readUint32)(r, h); - h += 4; - m.gridHeight = (0, n.readUint32)(r, h); - h += 4; - m.gridOffsetX = 4294967295 & (0, n.readUint32)(r, h); - h += 4; - m.gridOffsetY = 4294967295 & (0, n.readUint32)(r, h); - h += 4; - m.gridVectorX = (0, n.readUint16)(r, h); - h += 2; - m.gridVectorY = (0, n.readUint16)(r, h); - h += 2; - s = [m, a.referredTo, r, h, i]; - break; - case 38: - case 39: - const y = {}; - y.info = readRegionSegmentInformation(r, h); - h += g; - const w = r[h++]; - y.mmr = !!(1 & w); - y.template = (w >> 1) & 3; - y.prediction = !!(8 & w); - if (!y.mmr) { - l = 0 === y.template ? 4 : 1; - o = []; - for (c = 0; c < l; c++) { - o.push({ - x: (0, n.readInt8)(r, h), - y: (0, n.readInt8)(r, h + 1), - }); - h += 2; - } - y.at = o; - } - s = [y, r, h, i]; - break; - case 48: - const S = { - width: (0, n.readUint32)(r, h), - height: (0, n.readUint32)(r, h + 4), - resolutionX: (0, n.readUint32)(r, h + 8), - resolutionY: (0, n.readUint32)(r, h + 12), - }; - 4294967295 === S.height && delete S.height; - const x = r[h + 16]; - (0, n.readUint16)(r, h + 17); - S.lossless = !!(1 & x); - S.refinement = !!(2 & x); - S.defaultPixelValue = (x >> 2) & 1; - S.combinationOperator = (x >> 3) & 3; - S.requiresBuffer = !!(32 & x); - S.combinationOperatorOverride = !!(64 & x); - s = [S]; - break; - case 49: - case 50: - case 51: - case 62: - break; - case 53: - s = [a.number, r, h, i]; - break; - default: - throw new Jbig2Error( - `segment type ${a.typeName}(${a.type}) is not implemented`, - ); - } - const u = "on" + a.typeName; - u in t && t[u].apply(t, s); - } - function processSegments(e, t) { - for (let a = 0, r = e.length; a < r; a++) processSegment(e[a], t); - } - class SimpleSegmentVisitor { - onPageInformation(e) { - this.currentPageInfo = e; - const t = (e.width + 7) >> 3, - a = new Uint8ClampedArray(t * e.height); - e.defaultPixelValue && a.fill(255); - this.buffer = a; - } - drawBitmap(e, t) { - const a = this.currentPageInfo, - r = e.width, - n = e.height, - i = (a.width + 7) >> 3, - s = a.combinationOperatorOverride - ? e.combinationOperator - : a.combinationOperator, - o = this.buffer, - c = 128 >> (7 & e.x); - let l, - h, - u, - d, - f = e.y * i + (e.x >> 3); - switch (s) { - case 0: - for (l = 0; l < n; l++) { - u = c; - d = f; - for (h = 0; h < r; h++) { - t[l][h] && (o[d] |= u); - u >>= 1; - if (!u) { - u = 128; - d++; - } - } - f += i; - } - break; - case 2: - for (l = 0; l < n; l++) { - u = c; - d = f; - for (h = 0; h < r; h++) { - t[l][h] && (o[d] ^= u); - u >>= 1; - if (!u) { - u = 128; - d++; - } - } - f += i; - } - break; - default: - throw new Jbig2Error(`operator ${s} is not supported`); - } - } - onImmediateGenericRegion(e, t, a, r) { - const n = e.info, - i = new DecodingContext(t, a, r), - s = decodeBitmap( - e.mmr, - n.width, - n.height, - e.template, - e.prediction, - null, - e.at, - i, - ); - this.drawBitmap(n, s); - } - onImmediateLosslessGenericRegion() { - this.onImmediateGenericRegion(...arguments); - } - onSymbolDictionary(e, t, a, r, i, s) { - let o, c; - if (e.huffman) { - o = (function getSymbolDictionaryHuffmanTables(e, t, a) { - let r, - n, - i, - s, - o = 0; - switch (e.huffmanDHSelector) { - case 0: - case 1: - r = getStandardTable(e.huffmanDHSelector + 4); - break; - case 3: - r = getCustomHuffmanTable(o, t, a); - o++; - break; - default: - throw new Jbig2Error("invalid Huffman DH selector"); - } - switch (e.huffmanDWSelector) { - case 0: - case 1: - n = getStandardTable(e.huffmanDWSelector + 2); - break; - case 3: - n = getCustomHuffmanTable(o, t, a); - o++; - break; - default: - throw new Jbig2Error("invalid Huffman DW selector"); - } - if (e.bitmapSizeSelector) { - i = getCustomHuffmanTable(o, t, a); - o++; - } else i = getStandardTable(1); - s = e.aggregationInstancesSelector - ? getCustomHuffmanTable(o, t, a) - : getStandardTable(1); - return { - tableDeltaHeight: r, - tableDeltaWidth: n, - tableBitmapSize: i, - tableAggregateInstances: s, - }; - })(e, a, this.customTables); - c = new Reader(r, i, s); - } - let l = this.symbols; - l || (this.symbols = l = {}); - const h = []; - for (const e of a) { - const t = l[e]; - t && h.push(...t); - } - const u = new DecodingContext(r, i, s); - l[t] = (function decodeSymbolDictionary( - e, - t, - a, - r, - i, - s, - o, - c, - l, - h, - u, - d, - ) { - if (e && t) - throw new Jbig2Error( - "symbol refinement with Huffman is not supported", - ); - const f = []; - let g = 0, - p = (0, n.log2)(a.length + r); - const m = u.decoder, - b = u.contextCache; - let y, w; - if (e) { - y = getStandardTable(1); - w = []; - p = Math.max(p, 1); - } - for (; f.length < r; ) { - g += e - ? s.tableDeltaHeight.decode(d) - : decodeInteger(b, "IADH", m); - let r = 0, - n = 0; - const i = e ? w.length : 0; - for (;;) { - const i = e - ? s.tableDeltaWidth.decode(d) - : decodeInteger(b, "IADW", m); - if (null === i) break; - r += i; - n += r; - let y; - if (t) { - const n = decodeInteger(b, "IAAI", m); - if (n > 1) - y = decodeTextRegion( - e, - t, - r, - g, - 0, - n, - 1, - a.concat(f), - p, - 0, - 0, - 1, - 0, - s, - l, - h, - u, - 0, - d, - ); - else { - const e = decodeIAID(b, m, p), - t = decodeInteger(b, "IARDX", m), - n = decodeInteger(b, "IARDY", m); - y = decodeRefinement( - r, - g, - l, - e < a.length ? a[e] : f[e - a.length], - t, - n, - !1, - h, - u, - ); - } - f.push(y); - } else if (e) w.push(r); - else { - y = decodeBitmap(!1, r, g, o, !1, null, c, u); - f.push(y); - } - } - if (e && !t) { - const e = s.tableBitmapSize.decode(d); - d.byteAlign(); - let t; - if (0 === e) t = readUncompressedBitmap(d, n, g); - else { - const a = d.end, - r = d.position + e; - d.end = r; - t = decodeMMRBitmap(d, n, g, !1); - d.end = a; - d.position = r; - } - const a = w.length; - if (i === a - 1) f.push(t); - else { - let e, - r, - n, - s, - o, - c = 0; - for (e = i; e < a; e++) { - s = w[e]; - n = c + s; - o = []; - for (r = 0; r < g; r++) o.push(t[r].subarray(c, n)); - f.push(o); - c = n; - } - } - } - } - const S = [], - x = []; - let C, - k, - v = !1; - const F = a.length + r; - for (; x.length < F; ) { - let t = e ? y.decode(d) : decodeInteger(b, "IAEX", m); - for (; t--; ) x.push(v); - v = !v; - } - for (C = 0, k = a.length; C < k; C++) x[C] && S.push(a[C]); - for (let e = 0; e < r; C++, e++) x[C] && S.push(f[e]); - return S; - })( - e.huffman, - e.refinement, - h, - e.numberOfNewSymbols, - e.numberOfExportedSymbols, - o, - e.template, - e.at, - e.refinementTemplate, - e.refinementAt, - u, - c, - ); - } - onImmediateTextRegion(e, t, a, r, i) { - const s = e.info; - let o, c; - const l = this.symbols, - h = []; - for (const e of t) { - const t = l[e]; - t && h.push(...t); - } - const u = (0, n.log2)(h.length); - if (e.huffman) { - c = new Reader(a, r, i); - o = (function getTextRegionHuffmanTables(e, t, a, r, n) { - const i = []; - for (let e = 0; e <= 34; e++) { - const t = n.readBits(4); - i.push(new HuffmanLine([e, t, 0, 0])); - } - const s = new HuffmanTable(i, !1); - i.length = 0; - for (let e = 0; e < r; ) { - const t = s.decode(n); - if (t >= 32) { - let a, r, s; - switch (t) { - case 32: - if (0 === e) - throw new Jbig2Error( - "no previous value in symbol ID table", - ); - r = n.readBits(2) + 3; - a = i[e - 1].prefixLength; - break; - case 33: - r = n.readBits(3) + 3; - a = 0; - break; - case 34: - r = n.readBits(7) + 11; - a = 0; - break; - default: - throw new Jbig2Error( - "invalid code length in symbol ID table", - ); - } - for (s = 0; s < r; s++) { - i.push(new HuffmanLine([e, a, 0, 0])); - e++; - } - } else { - i.push(new HuffmanLine([e, t, 0, 0])); - e++; - } - } - n.byteAlign(); - const o = new HuffmanTable(i, !1); - let c, - l, - h, - u = 0; - switch (e.huffmanFS) { - case 0: - case 1: - c = getStandardTable(e.huffmanFS + 6); - break; - case 3: - c = getCustomHuffmanTable(u, t, a); - u++; - break; - default: - throw new Jbig2Error("invalid Huffman FS selector"); - } - switch (e.huffmanDS) { - case 0: - case 1: - case 2: - l = getStandardTable(e.huffmanDS + 8); - break; - case 3: - l = getCustomHuffmanTable(u, t, a); - u++; - break; - default: - throw new Jbig2Error("invalid Huffman DS selector"); - } - switch (e.huffmanDT) { - case 0: - case 1: - case 2: - h = getStandardTable(e.huffmanDT + 11); - break; - case 3: - h = getCustomHuffmanTable(u, t, a); - u++; - break; - default: - throw new Jbig2Error("invalid Huffman DT selector"); - } - if (e.refinement) - throw new Jbig2Error( - "refinement with Huffman is not supported", - ); - return { - symbolIDTable: o, - tableFirstS: c, - tableDeltaS: l, - tableDeltaT: h, - }; - })(e, t, this.customTables, h.length, c); - } - const d = new DecodingContext(a, r, i), - f = decodeTextRegion( - e.huffman, - e.refinement, - s.width, - s.height, - e.defaultPixelValue, - e.numberOfSymbolInstances, - e.stripSize, - h, - u, - e.transposed, - e.dsOffset, - e.referenceCorner, - e.combinationOperator, - o, - e.refinementTemplate, - e.refinementAt, - d, - e.logStripSize, - c, - ); - this.drawBitmap(s, f); - } - onImmediateLosslessTextRegion() { - this.onImmediateTextRegion(...arguments); - } - onPatternDictionary(e, t, a, r, n) { - let i = this.patterns; - i || (this.patterns = i = {}); - const s = new DecodingContext(a, r, n); - i[t] = (function decodePatternDictionary(e, t, a, r, n, i) { - const s = []; - if (!e) { - s.push({ x: -t, y: 0 }); - 0 === n && - s.push({ x: -3, y: -1 }, { x: 2, y: -2 }, { x: -2, y: -2 }); - } - const o = decodeBitmap(e, (r + 1) * t, a, n, !1, null, s, i), - c = []; - for (let e = 0; e <= r; e++) { - const r = [], - n = t * e, - i = n + t; - for (let e = 0; e < a; e++) r.push(o[e].subarray(n, i)); - c.push(r); - } - return c; - })( - e.mmr, - e.patternWidth, - e.patternHeight, - e.maxPatternIndex, - e.template, - s, - ); - } - onImmediateHalftoneRegion(e, t, a, r, i) { - const s = this.patterns[t[0]], - o = e.info, - c = new DecodingContext(a, r, i), - l = (function decodeHalftoneRegion( - e, - t, - a, - r, - i, - s, - o, - c, - l, - h, - u, - d, - f, - g, - p, - ) { - if (o) throw new Jbig2Error("skip is not supported"); - if (0 !== c) - throw new Jbig2Error( - `operator "${c}" is not supported in halftone region`, - ); - const m = []; - let b, y, w; - for (b = 0; b < i; b++) { - w = new Uint8Array(r); - if (s) for (y = 0; y < r; y++) w[y] = s; - m.push(w); - } - const S = t.length, - x = t[0], - C = x[0].length, - k = x.length, - v = (0, n.log2)(S), - F = []; - if (!e) { - F.push({ x: a <= 1 ? 3 : 2, y: -1 }); - 0 === a && - F.push( - { x: -3, y: -1 }, - { x: 2, y: -2 }, - { x: -2, y: -2 }, - ); - } - const O = []; - let T, M, D, E, N, R, L, $, _, j, U; - e && (T = new Reader(p.data, p.start, p.end)); - for (b = v - 1; b >= 0; b--) { - M = e - ? decodeMMRBitmap(T, l, h, !0) - : decodeBitmap(!1, l, h, a, !1, null, F, p); - O[b] = M; - } - for (D = 0; D < h; D++) - for (E = 0; E < l; E++) { - N = 0; - R = 0; - for (y = v - 1; y >= 0; y--) { - N ^= O[y][D][E]; - R |= N << y; - } - L = t[R]; - $ = (u + D * g + E * f) >> 8; - _ = (d + D * f - E * g) >> 8; - if ($ >= 0 && $ + C <= r && _ >= 0 && _ + k <= i) - for (b = 0; b < k; b++) { - U = m[_ + b]; - j = L[b]; - for (y = 0; y < C; y++) U[$ + y] |= j[y]; - } - else { - let e, t; - for (b = 0; b < k; b++) { - t = _ + b; - if (!(t < 0 || t >= i)) { - U = m[t]; - j = L[b]; - for (y = 0; y < C; y++) { - e = $ + y; - e >= 0 && e < r && (U[e] |= j[y]); - } - } - } - } - } - return m; - })( - e.mmr, - s, - e.template, - o.width, - o.height, - e.defaultPixelValue, - e.enableSkip, - e.combinationOperator, - e.gridWidth, - e.gridHeight, - e.gridOffsetX, - e.gridOffsetY, - e.gridVectorX, - e.gridVectorY, - c, - ); - this.drawBitmap(o, l); - } - onImmediateLosslessHalftoneRegion() { - this.onImmediateHalftoneRegion(...arguments); - } - onTables(e, t, a, r) { - let i = this.customTables; - i || (this.customTables = i = {}); - i[e] = (function decodeTablesSegment(e, t, a) { - const r = e[t], - i = 4294967295 & (0, n.readUint32)(e, t + 1), - s = 4294967295 & (0, n.readUint32)(e, t + 5), - o = new Reader(e, t + 9, a), - c = 1 + ((r >> 1) & 7), - l = 1 + ((r >> 4) & 7), - h = []; - let u, - d, - f = i; - do { - u = o.readBits(c); - d = o.readBits(l); - h.push(new HuffmanLine([f, u, d, 0])); - f += 1 << d; - } while (f < s); - u = o.readBits(c); - h.push(new HuffmanLine([i - 1, u, 32, 0, "lower"])); - u = o.readBits(c); - h.push(new HuffmanLine([s, u, 32, 0])); - if (1 & r) { - u = o.readBits(c); - h.push(new HuffmanLine([u, 0])); - } - return new HuffmanTable(h, !1); - })(t, a, r); - } - } - class HuffmanLine { - constructor(e) { - if (2 === e.length) { - this.isOOB = !0; - this.rangeLow = 0; - this.prefixLength = e[0]; - this.rangeLength = 0; - this.prefixCode = e[1]; - this.isLowerRange = !1; - } else { - this.isOOB = !1; - this.rangeLow = e[0]; - this.prefixLength = e[1]; - this.rangeLength = e[2]; - this.prefixCode = e[3]; - this.isLowerRange = "lower" === e[4]; - } - } - } - class HuffmanTreeNode { - constructor(e) { - this.children = []; - if (e) { - this.isLeaf = !0; - this.rangeLength = e.rangeLength; - this.rangeLow = e.rangeLow; - this.isLowerRange = e.isLowerRange; - this.isOOB = e.isOOB; - } else this.isLeaf = !1; - } - buildTree(e, t) { - const a = (e.prefixCode >> t) & 1; - if (t <= 0) this.children[a] = new HuffmanTreeNode(e); - else { - let r = this.children[a]; - r || (this.children[a] = r = new HuffmanTreeNode(null)); - r.buildTree(e, t - 1); - } - } - decodeNode(e) { - if (this.isLeaf) { - if (this.isOOB) return null; - const t = e.readBits(this.rangeLength); - return this.rangeLow + (this.isLowerRange ? -t : t); - } - const t = this.children[e.readBit()]; - if (!t) throw new Jbig2Error("invalid Huffman data"); - return t.decodeNode(e); - } - } - class HuffmanTable { - constructor(e, t) { - t || this.assignPrefixCodes(e); - this.rootNode = new HuffmanTreeNode(null); - for (let t = 0, a = e.length; t < a; t++) { - const a = e[t]; - a.prefixLength > 0 && - this.rootNode.buildTree(a, a.prefixLength - 1); - } - } - decode(e) { - return this.rootNode.decodeNode(e); - } - assignPrefixCodes(e) { - const t = e.length; - let a = 0; - for (let r = 0; r < t; r++) a = Math.max(a, e[r].prefixLength); - const r = new Uint32Array(a + 1); - for (let a = 0; a < t; a++) r[e[a].prefixLength]++; - let n, - i, - s, - o = 1, - c = 0; - r[0] = 0; - for (; o <= a; ) { - c = (c + r[o - 1]) << 1; - n = c; - i = 0; - for (; i < t; ) { - s = e[i]; - if (s.prefixLength === o) { - s.prefixCode = n; - n++; - } - i++; - } - o++; - } - } - } - const p = {}; - function getStandardTable(e) { - let t, - a = p[e]; - if (a) return a; - switch (e) { - case 1: - t = [ - [0, 1, 4, 0], - [16, 2, 8, 2], - [272, 3, 16, 6], - [65808, 3, 32, 7], - ]; - break; - case 2: - t = [ - [0, 1, 0, 0], - [1, 2, 0, 2], - [2, 3, 0, 6], - [3, 4, 3, 14], - [11, 5, 6, 30], - [75, 6, 32, 62], - [6, 63], - ]; - break; - case 3: - t = [ - [-256, 8, 8, 254], - [0, 1, 0, 0], - [1, 2, 0, 2], - [2, 3, 0, 6], - [3, 4, 3, 14], - [11, 5, 6, 30], - [-257, 8, 32, 255, "lower"], - [75, 7, 32, 126], - [6, 62], - ]; - break; - case 4: - t = [ - [1, 1, 0, 0], - [2, 2, 0, 2], - [3, 3, 0, 6], - [4, 4, 3, 14], - [12, 5, 6, 30], - [76, 5, 32, 31], - ]; - break; - case 5: - t = [ - [-255, 7, 8, 126], - [1, 1, 0, 0], - [2, 2, 0, 2], - [3, 3, 0, 6], - [4, 4, 3, 14], - [12, 5, 6, 30], - [-256, 7, 32, 127, "lower"], - [76, 6, 32, 62], - ]; - break; - case 6: - t = [ - [-2048, 5, 10, 28], - [-1024, 4, 9, 8], - [-512, 4, 8, 9], - [-256, 4, 7, 10], - [-128, 5, 6, 29], - [-64, 5, 5, 30], - [-32, 4, 5, 11], - [0, 2, 7, 0], - [128, 3, 7, 2], - [256, 3, 8, 3], - [512, 4, 9, 12], - [1024, 4, 10, 13], - [-2049, 6, 32, 62, "lower"], - [2048, 6, 32, 63], - ]; - break; - case 7: - t = [ - [-1024, 4, 9, 8], - [-512, 3, 8, 0], - [-256, 4, 7, 9], - [-128, 5, 6, 26], - [-64, 5, 5, 27], - [-32, 4, 5, 10], - [0, 4, 5, 11], - [32, 5, 5, 28], - [64, 5, 6, 29], - [128, 4, 7, 12], - [256, 3, 8, 1], - [512, 3, 9, 2], - [1024, 3, 10, 3], - [-1025, 5, 32, 30, "lower"], - [2048, 5, 32, 31], - ]; - break; - case 8: - t = [ - [-15, 8, 3, 252], - [-7, 9, 1, 508], - [-5, 8, 1, 253], - [-3, 9, 0, 509], - [-2, 7, 0, 124], - [-1, 4, 0, 10], - [0, 2, 1, 0], - [2, 5, 0, 26], - [3, 6, 0, 58], - [4, 3, 4, 4], - [20, 6, 1, 59], - [22, 4, 4, 11], - [38, 4, 5, 12], - [70, 5, 6, 27], - [134, 5, 7, 28], - [262, 6, 7, 60], - [390, 7, 8, 125], - [646, 6, 10, 61], - [-16, 9, 32, 510, "lower"], - [1670, 9, 32, 511], - [2, 1], - ]; - break; - case 9: - t = [ - [-31, 8, 4, 252], - [-15, 9, 2, 508], - [-11, 8, 2, 253], - [-7, 9, 1, 509], - [-5, 7, 1, 124], - [-3, 4, 1, 10], - [-1, 3, 1, 2], - [1, 3, 1, 3], - [3, 5, 1, 26], - [5, 6, 1, 58], - [7, 3, 5, 4], - [39, 6, 2, 59], - [43, 4, 5, 11], - [75, 4, 6, 12], - [139, 5, 7, 27], - [267, 5, 8, 28], - [523, 6, 8, 60], - [779, 7, 9, 125], - [1291, 6, 11, 61], - [-32, 9, 32, 510, "lower"], - [3339, 9, 32, 511], - [2, 0], - ]; - break; - case 10: - t = [ - [-21, 7, 4, 122], - [-5, 8, 0, 252], - [-4, 7, 0, 123], - [-3, 5, 0, 24], - [-2, 2, 2, 0], - [2, 5, 0, 25], - [3, 6, 0, 54], - [4, 7, 0, 124], - [5, 8, 0, 253], - [6, 2, 6, 1], - [70, 5, 5, 26], - [102, 6, 5, 55], - [134, 6, 6, 56], - [198, 6, 7, 57], - [326, 6, 8, 58], - [582, 6, 9, 59], - [1094, 6, 10, 60], - [2118, 7, 11, 125], - [-22, 8, 32, 254, "lower"], - [4166, 8, 32, 255], - [2, 2], - ]; - break; - case 11: - t = [ - [1, 1, 0, 0], - [2, 2, 1, 2], - [4, 4, 0, 12], - [5, 4, 1, 13], - [7, 5, 1, 28], - [9, 5, 2, 29], - [13, 6, 2, 60], - [17, 7, 2, 122], - [21, 7, 3, 123], - [29, 7, 4, 124], - [45, 7, 5, 125], - [77, 7, 6, 126], - [141, 7, 32, 127], - ]; - break; - case 12: - t = [ - [1, 1, 0, 0], - [2, 2, 0, 2], - [3, 3, 1, 6], - [5, 5, 0, 28], - [6, 5, 1, 29], - [8, 6, 1, 60], - [10, 7, 0, 122], - [11, 7, 1, 123], - [13, 7, 2, 124], - [17, 7, 3, 125], - [25, 7, 4, 126], - [41, 8, 5, 254], - [73, 8, 32, 255], - ]; - break; - case 13: - t = [ - [1, 1, 0, 0], - [2, 3, 0, 4], - [3, 4, 0, 12], - [4, 5, 0, 28], - [5, 4, 1, 13], - [7, 3, 3, 5], - [15, 6, 1, 58], - [17, 6, 2, 59], - [21, 6, 3, 60], - [29, 6, 4, 61], - [45, 6, 5, 62], - [77, 7, 6, 126], - [141, 7, 32, 127], - ]; - break; - case 14: - t = [ - [-2, 3, 0, 4], - [-1, 3, 0, 5], - [0, 1, 0, 0], - [1, 3, 0, 6], - [2, 3, 0, 7], - ]; - break; - case 15: - t = [ - [-24, 7, 4, 124], - [-8, 6, 2, 60], - [-4, 5, 1, 28], - [-2, 4, 0, 12], - [-1, 3, 0, 4], - [0, 1, 0, 0], - [1, 3, 0, 5], - [2, 4, 0, 13], - [3, 5, 1, 29], - [5, 6, 2, 61], - [9, 7, 4, 125], - [-25, 7, 32, 126, "lower"], - [25, 7, 32, 127], - ]; - break; - default: - throw new Jbig2Error(`standard table B.${e} does not exist`); - } - for (let e = 0, a = t.length; e < a; e++) - t[e] = new HuffmanLine(t[e]); - a = new HuffmanTable(t, !0); - p[e] = a; - return a; - } - class Reader { - constructor(e, t, a) { - this.data = e; - this.start = t; - this.end = a; - this.position = t; - this.shift = -1; - this.currentByte = 0; - } - readBit() { - if (this.shift < 0) { - if (this.position >= this.end) - throw new Jbig2Error("end of data while reading bit"); - this.currentByte = this.data[this.position++]; - this.shift = 7; - } - const e = (this.currentByte >> this.shift) & 1; - this.shift--; - return e; - } - readBits(e) { - let t, - a = 0; - for (t = e - 1; t >= 0; t--) a |= this.readBit() << t; - return a; - } - byteAlign() { - this.shift = -1; - } - next() { - return this.position >= this.end - ? -1 - : this.data[this.position++]; - } - } - function getCustomHuffmanTable(e, t, a) { - let r = 0; - for (let n = 0, i = t.length; n < i; n++) { - const i = a[t[n]]; - if (i) { - if (e === r) return i; - r++; - } - } - throw new Jbig2Error("can't find custom Huffman table"); - } - function readUncompressedBitmap(e, t, a) { - const r = []; - for (let n = 0; n < a; n++) { - const a = new Uint8Array(t); - r.push(a); - for (let r = 0; r < t; r++) a[r] = e.readBit(); - e.byteAlign(); - } - return r; - } - function decodeMMRBitmap(e, t, a, r) { - const n = { - K: -1, - Columns: t, - Rows: a, - BlackIs1: !0, - EndOfBlock: r, - }, - i = new s.CCITTFaxDecoder(e, n), - o = []; - let c, - l = !1; - for (let e = 0; e < a; e++) { - const e = new Uint8Array(t); - o.push(e); - let a = -1; - for (let r = 0; r < t; r++) { - if (a < 0) { - c = i.readNextChar(); - if (-1 === c) { - c = 0; - l = !0; - } - a = 7; - } - e[r] = (c >> a) & 1; - a--; - } - } - if (r && !l) { - const e = 5; - for (let t = 0; t < e && -1 !== i.readNextChar(); t++); - } - return o; - } - t.Jbig2Image = class Jbig2Image { - parseChunks(e) { - return (function parseJbig2Chunks(e) { - const t = new SimpleSegmentVisitor(); - for (let a = 0, r = e.length; a < r; a++) { - const r = e[a]; - processSegments(readSegments({}, r.data, r.start, r.end), t); - } - return t.buffer; - })(e); - } - parse(e) { - throw new Error("Not implemented: Jbig2Image.parse"); - } - }; - }, - (e, t) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.ArithmeticDecoder = void 0; - const a = [ - { qe: 22017, nmps: 1, nlps: 1, switchFlag: 1 }, - { qe: 13313, nmps: 2, nlps: 6, switchFlag: 0 }, - { qe: 6145, nmps: 3, nlps: 9, switchFlag: 0 }, - { qe: 2753, nmps: 4, nlps: 12, switchFlag: 0 }, - { qe: 1313, nmps: 5, nlps: 29, switchFlag: 0 }, - { qe: 545, nmps: 38, nlps: 33, switchFlag: 0 }, - { qe: 22017, nmps: 7, nlps: 6, switchFlag: 1 }, - { qe: 21505, nmps: 8, nlps: 14, switchFlag: 0 }, - { qe: 18433, nmps: 9, nlps: 14, switchFlag: 0 }, - { qe: 14337, nmps: 10, nlps: 14, switchFlag: 0 }, - { qe: 12289, nmps: 11, nlps: 17, switchFlag: 0 }, - { qe: 9217, nmps: 12, nlps: 18, switchFlag: 0 }, - { qe: 7169, nmps: 13, nlps: 20, switchFlag: 0 }, - { qe: 5633, nmps: 29, nlps: 21, switchFlag: 0 }, - { qe: 22017, nmps: 15, nlps: 14, switchFlag: 1 }, - { qe: 21505, nmps: 16, nlps: 14, switchFlag: 0 }, - { qe: 20737, nmps: 17, nlps: 15, switchFlag: 0 }, - { qe: 18433, nmps: 18, nlps: 16, switchFlag: 0 }, - { qe: 14337, nmps: 19, nlps: 17, switchFlag: 0 }, - { qe: 13313, nmps: 20, nlps: 18, switchFlag: 0 }, - { qe: 12289, nmps: 21, nlps: 19, switchFlag: 0 }, - { qe: 10241, nmps: 22, nlps: 19, switchFlag: 0 }, - { qe: 9217, nmps: 23, nlps: 20, switchFlag: 0 }, - { qe: 8705, nmps: 24, nlps: 21, switchFlag: 0 }, - { qe: 7169, nmps: 25, nlps: 22, switchFlag: 0 }, - { qe: 6145, nmps: 26, nlps: 23, switchFlag: 0 }, - { qe: 5633, nmps: 27, nlps: 24, switchFlag: 0 }, - { qe: 5121, nmps: 28, nlps: 25, switchFlag: 0 }, - { qe: 4609, nmps: 29, nlps: 26, switchFlag: 0 }, - { qe: 4353, nmps: 30, nlps: 27, switchFlag: 0 }, - { qe: 2753, nmps: 31, nlps: 28, switchFlag: 0 }, - { qe: 2497, nmps: 32, nlps: 29, switchFlag: 0 }, - { qe: 2209, nmps: 33, nlps: 30, switchFlag: 0 }, - { qe: 1313, nmps: 34, nlps: 31, switchFlag: 0 }, - { qe: 1089, nmps: 35, nlps: 32, switchFlag: 0 }, - { qe: 673, nmps: 36, nlps: 33, switchFlag: 0 }, - { qe: 545, nmps: 37, nlps: 34, switchFlag: 0 }, - { qe: 321, nmps: 38, nlps: 35, switchFlag: 0 }, - { qe: 273, nmps: 39, nlps: 36, switchFlag: 0 }, - { qe: 133, nmps: 40, nlps: 37, switchFlag: 0 }, - { qe: 73, nmps: 41, nlps: 38, switchFlag: 0 }, - { qe: 37, nmps: 42, nlps: 39, switchFlag: 0 }, - { qe: 21, nmps: 43, nlps: 40, switchFlag: 0 }, - { qe: 9, nmps: 44, nlps: 41, switchFlag: 0 }, - { qe: 5, nmps: 45, nlps: 42, switchFlag: 0 }, - { qe: 1, nmps: 45, nlps: 43, switchFlag: 0 }, - { qe: 22017, nmps: 46, nlps: 46, switchFlag: 0 }, - ]; - t.ArithmeticDecoder = class ArithmeticDecoder { - constructor(e, t, a) { - this.data = e; - this.bp = t; - this.dataEnd = a; - this.chigh = e[t]; - this.clow = 0; - this.byteIn(); - this.chigh = - ((this.chigh << 7) & 65535) | ((this.clow >> 9) & 127); - this.clow = (this.clow << 7) & 65535; - this.ct -= 7; - this.a = 32768; - } - byteIn() { - const e = this.data; - let t = this.bp; - if (255 === e[t]) - if (e[t + 1] > 143) { - this.clow += 65280; - this.ct = 8; - } else { - t++; - this.clow += e[t] << 9; - this.ct = 7; - this.bp = t; - } - else { - t++; - this.clow += t < this.dataEnd ? e[t] << 8 : 65280; - this.ct = 8; - this.bp = t; - } - if (this.clow > 65535) { - this.chigh += this.clow >> 16; - this.clow &= 65535; - } - } - readBit(e, t) { - let r = e[t] >> 1, - n = 1 & e[t]; - const i = a[r], - s = i.qe; - let o, - c = this.a - s; - if (this.chigh < s) - if (c < s) { - c = s; - o = n; - r = i.nmps; - } else { - c = s; - o = 1 ^ n; - 1 === i.switchFlag && (n = o); - r = i.nlps; - } - else { - this.chigh -= s; - if (0 != (32768 & c)) { - this.a = c; - return n; - } - if (c < s) { - o = 1 ^ n; - 1 === i.switchFlag && (n = o); - r = i.nlps; - } else { - o = n; - r = i.nmps; - } - } - do { - 0 === this.ct && this.byteIn(); - c <<= 1; - this.chigh = - ((this.chigh << 1) & 65535) | ((this.clow >> 15) & 1); - this.clow = (this.clow << 1) & 65535; - this.ct--; - } while (0 == (32768 & c)); - this.a = c; - e[t] = (r << 1) | n; - return o; - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.JpegStream = void 0; - var r = a(18), - n = a(4), - i = a(27), - s = a(2); - class JpegStream extends r.DecodeStream { - constructor(e, t, a) { - let r; - for (; -1 !== (r = e.getByte()); ) - if (255 === r) { - e.skip(-1); - break; - } - super(t); - this.stream = e; - this.dict = e.dict; - this.maybeLength = t; - this.params = a; - } - get bytes() { - return (0, s.shadow)( - this, - "bytes", - this.stream.getBytes(this.maybeLength), - ); - } - ensureBuffer(e) {} - readBlock() { - if (this.eof) return; - const e = { decodeTransform: void 0, colorTransform: void 0 }, - t = this.dict.getArray("D", "Decode"); - if ((this.forceRGBA || this.forceRGB) && Array.isArray(t)) { - const a = this.dict.get("BPC", "BitsPerComponent") || 8, - r = t.length, - n = new Int32Array(r); - let i = !1; - const s = (1 << a) - 1; - for (let e = 0; e < r; e += 2) { - n[e] = (256 * (t[e + 1] - t[e])) | 0; - n[e + 1] = (t[e] * s) | 0; - (256 === n[e] && 0 === n[e + 1]) || (i = !0); - } - i && (e.decodeTransform = n); - } - if (this.params instanceof n.Dict) { - const t = this.params.get("ColorTransform"); - Number.isInteger(t) && (e.colorTransform = t); - } - const a = new i.JpegImage(e); - a.parse(this.bytes); - const r = a.getData({ - width: this.drawWidth, - height: this.drawHeight, - forceRGBA: this.forceRGBA, - forceRGB: this.forceRGB, - isSourcePDF: !0, - }); - this.buffer = r; - this.bufferLength = r.length; - this.eof = !0; - } - } - t.JpegStream = JpegStream; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.JpegImage = void 0; - var r = a(2), - n = a(28), - i = a(3); - class JpegError extends r.BaseException { - constructor(e) { - super(`JPEG error: ${e}`, "JpegError"); - } - } - class DNLMarkerError extends r.BaseException { - constructor(e, t) { - super(e, "DNLMarkerError"); - this.scanLines = t; - } - } - class EOIMarkerError extends r.BaseException { - constructor(e) { - super(e, "EOIMarkerError"); - } - } - const s = new Uint8Array([ - 0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, - 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49, - 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52, - 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63, - ]), - o = 4017, - c = 799, - l = 3406, - h = 2276, - u = 1567, - d = 3784, - f = 5793, - g = 2896; - function buildHuffmanTable(e, t) { - let a, - r, - n = 0, - i = 16; - for (; i > 0 && !e[i - 1]; ) i--; - const s = [{ children: [], index: 0 }]; - let o, - c = s[0]; - for (a = 0; a < i; a++) { - for (r = 0; r < e[a]; r++) { - c = s.pop(); - c.children[c.index] = t[n]; - for (; c.index > 0; ) c = s.pop(); - c.index++; - s.push(c); - for (; s.length <= a; ) { - s.push((o = { children: [], index: 0 })); - c.children[c.index] = o.children; - c = o; - } - n++; - } - if (a + 1 < i) { - s.push((o = { children: [], index: 0 })); - c.children[c.index] = o.children; - c = o; - } - } - return s[0].children; - } - function getBlockBufferOffset(e, t, a) { - return 64 * ((e.blocksPerLine + 1) * t + a); - } - function decodeScan(e, t, a, n, o, c, l, h, u, d = !1) { - const f = a.mcusPerLine, - g = a.progressive, - p = t; - let m = 0, - b = 0; - function readBit() { - if (b > 0) { - b--; - return (m >> b) & 1; - } - m = e[t++]; - if (255 === m) { - const r = e[t++]; - if (r) { - if (220 === r && d) { - t += 2; - const r = (0, i.readUint16)(e, t); - t += 2; - if (r > 0 && r !== a.scanLines) - throw new DNLMarkerError( - "Found DNL marker (0xFFDC) while parsing scan data", - r, - ); - } else if (217 === r) { - if (d) { - const e = x * (8 === a.precision ? 8 : 0); - if (e > 0 && Math.round(a.scanLines / e) >= 5) - throw new DNLMarkerError( - "Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter", - e, - ); - } - throw new EOIMarkerError( - "Found EOI marker (0xFFD9) while parsing scan data", - ); - } - throw new JpegError( - `unexpected marker ${((m << 8) | r).toString(16)}`, - ); - } - } - b = 7; - return m >>> 7; - } - function decodeHuffman(e) { - let t = e; - for (;;) { - t = t[readBit()]; - switch (typeof t) { - case "number": - return t; - case "object": - continue; - } - throw new JpegError("invalid huffman sequence"); - } - } - function receive(e) { - let t = 0; - for (; e > 0; ) { - t = (t << 1) | readBit(); - e--; - } - return t; - } - function receiveAndExtend(e) { - if (1 === e) return 1 === readBit() ? 1 : -1; - const t = receive(e); - return t >= 1 << (e - 1) ? t : t + (-1 << e) + 1; - } - let y = 0; - let w, - S = 0; - let x = 0; - function decodeMcu(e, t, a, r, n) { - const i = a % f; - x = ((a / f) | 0) * e.v + r; - const s = i * e.h + n; - t(e, getBlockBufferOffset(e, x, s)); - } - function decodeBlock(e, t, a) { - x = (a / e.blocksPerLine) | 0; - const r = a % e.blocksPerLine; - t(e, getBlockBufferOffset(e, x, r)); - } - const C = n.length; - let k, v, F, O, T, M; - M = g - ? 0 === c - ? 0 === h - ? function decodeDCFirst(e, t) { - const a = decodeHuffman(e.huffmanTableDC), - r = 0 === a ? 0 : receiveAndExtend(a) << u; - e.blockData[t] = e.pred += r; - } - : function decodeDCSuccessive(e, t) { - e.blockData[t] |= readBit() << u; - } - : 0 === h - ? function decodeACFirst(e, t) { - if (y > 0) { - y--; - return; - } - let a = c; - const r = l; - for (; a <= r; ) { - const r = decodeHuffman(e.huffmanTableAC), - n = 15 & r, - i = r >> 4; - if (0 === n) { - if (i < 15) { - y = receive(i) + (1 << i) - 1; - break; - } - a += 16; - continue; - } - a += i; - const o = s[a]; - e.blockData[t + o] = receiveAndExtend(n) * (1 << u); - a++; - } - } - : function decodeACSuccessive(e, t) { - let a = c; - const r = l; - let n, - i, - o = 0; - for (; a <= r; ) { - const r = t + s[a], - c = e.blockData[r] < 0 ? -1 : 1; - switch (S) { - case 0: - i = decodeHuffman(e.huffmanTableAC); - n = 15 & i; - o = i >> 4; - if (0 === n) - if (o < 15) { - y = receive(o) + (1 << o); - S = 4; - } else { - o = 16; - S = 1; - } - else { - if (1 !== n) - throw new JpegError("invalid ACn encoding"); - w = receiveAndExtend(n); - S = o ? 2 : 3; - } - continue; - case 1: - case 2: - if (e.blockData[r]) - e.blockData[r] += c * (readBit() << u); - else { - o--; - 0 === o && (S = 2 === S ? 3 : 0); - } - break; - case 3: - if (e.blockData[r]) - e.blockData[r] += c * (readBit() << u); - else { - e.blockData[r] = w << u; - S = 0; - } - break; - case 4: - e.blockData[r] && - (e.blockData[r] += c * (readBit() << u)); - } - a++; - } - if (4 === S) { - y--; - 0 === y && (S = 0); - } - } - : function decodeBaseline(e, t) { - const a = decodeHuffman(e.huffmanTableDC), - r = 0 === a ? 0 : receiveAndExtend(a); - e.blockData[t] = e.pred += r; - let n = 1; - for (; n < 64; ) { - const a = decodeHuffman(e.huffmanTableAC), - r = 15 & a, - i = a >> 4; - if (0 === r) { - if (i < 15) break; - n += 16; - continue; - } - n += i; - const o = s[n]; - e.blockData[t + o] = receiveAndExtend(r); - n++; - } - }; - let D, - E = 0; - const N = - 1 === C - ? n[0].blocksPerLine * n[0].blocksPerColumn - : f * a.mcusPerColumn; - let R, L; - for (; E <= N; ) { - const a = o ? Math.min(N - E, o) : N; - if (a > 0) { - for (v = 0; v < C; v++) n[v].pred = 0; - y = 0; - if (1 === C) { - k = n[0]; - for (T = 0; T < a; T++) { - decodeBlock(k, M, E); - E++; - } - } else - for (T = 0; T < a; T++) { - for (v = 0; v < C; v++) { - k = n[v]; - R = k.h; - L = k.v; - for (F = 0; F < L; F++) - for (O = 0; O < R; O++) decodeMcu(k, M, E, F, O); - } - E++; - } - } - b = 0; - D = findNextFileMarker(e, t); - if (!D) break; - if (D.invalid) { - const e = a > 0 ? "unexpected" : "excessive"; - (0, r.warn)( - `decodeScan - ${e} MCU data, current marker is: ${D.invalid}`, - ); - t = D.offset; - } - if (!(D.marker >= 65488 && D.marker <= 65495)) break; - t += 2; - } - return t - p; - } - function quantizeAndInverse(e, t, a) { - const r = e.quantizationTable, - n = e.blockData; - let i, s, p, m, b, y, w, S, x, C, k, v, F, O, T, M, D; - if (!r) throw new JpegError("missing required Quantization Table."); - for (let e = 0; e < 64; e += 8) { - x = n[t + e]; - C = n[t + e + 1]; - k = n[t + e + 2]; - v = n[t + e + 3]; - F = n[t + e + 4]; - O = n[t + e + 5]; - T = n[t + e + 6]; - M = n[t + e + 7]; - x *= r[e]; - if (0 != (C | k | v | F | O | T | M)) { - C *= r[e + 1]; - k *= r[e + 2]; - v *= r[e + 3]; - F *= r[e + 4]; - O *= r[e + 5]; - T *= r[e + 6]; - M *= r[e + 7]; - i = (f * x + 128) >> 8; - s = (f * F + 128) >> 8; - p = k; - m = T; - b = (g * (C - M) + 128) >> 8; - S = (g * (C + M) + 128) >> 8; - y = v << 4; - w = O << 4; - i = (i + s + 1) >> 1; - s = i - s; - D = (p * d + m * u + 128) >> 8; - p = (p * u - m * d + 128) >> 8; - m = D; - b = (b + w + 1) >> 1; - w = b - w; - S = (S + y + 1) >> 1; - y = S - y; - i = (i + m + 1) >> 1; - m = i - m; - s = (s + p + 1) >> 1; - p = s - p; - D = (b * h + S * l + 2048) >> 12; - b = (b * l - S * h + 2048) >> 12; - S = D; - D = (y * c + w * o + 2048) >> 12; - y = (y * o - w * c + 2048) >> 12; - w = D; - a[e] = i + S; - a[e + 7] = i - S; - a[e + 1] = s + w; - a[e + 6] = s - w; - a[e + 2] = p + y; - a[e + 5] = p - y; - a[e + 3] = m + b; - a[e + 4] = m - b; - } else { - D = (f * x + 512) >> 10; - a[e] = D; - a[e + 1] = D; - a[e + 2] = D; - a[e + 3] = D; - a[e + 4] = D; - a[e + 5] = D; - a[e + 6] = D; - a[e + 7] = D; - } - } - for (let e = 0; e < 8; ++e) { - x = a[e]; - C = a[e + 8]; - k = a[e + 16]; - v = a[e + 24]; - F = a[e + 32]; - O = a[e + 40]; - T = a[e + 48]; - M = a[e + 56]; - if (0 != (C | k | v | F | O | T | M)) { - i = (f * x + 2048) >> 12; - s = (f * F + 2048) >> 12; - p = k; - m = T; - b = (g * (C - M) + 2048) >> 12; - S = (g * (C + M) + 2048) >> 12; - y = v; - w = O; - i = 4112 + ((i + s + 1) >> 1); - s = i - s; - D = (p * d + m * u + 2048) >> 12; - p = (p * u - m * d + 2048) >> 12; - m = D; - b = (b + w + 1) >> 1; - w = b - w; - S = (S + y + 1) >> 1; - y = S - y; - i = (i + m + 1) >> 1; - m = i - m; - s = (s + p + 1) >> 1; - p = s - p; - D = (b * h + S * l + 2048) >> 12; - b = (b * l - S * h + 2048) >> 12; - S = D; - D = (y * c + w * o + 2048) >> 12; - y = (y * o - w * c + 2048) >> 12; - w = D; - x = i + S; - M = i - S; - C = s + w; - T = s - w; - k = p + y; - O = p - y; - v = m + b; - F = m - b; - x < 16 ? (x = 0) : x >= 4080 ? (x = 255) : (x >>= 4); - C < 16 ? (C = 0) : C >= 4080 ? (C = 255) : (C >>= 4); - k < 16 ? (k = 0) : k >= 4080 ? (k = 255) : (k >>= 4); - v < 16 ? (v = 0) : v >= 4080 ? (v = 255) : (v >>= 4); - F < 16 ? (F = 0) : F >= 4080 ? (F = 255) : (F >>= 4); - O < 16 ? (O = 0) : O >= 4080 ? (O = 255) : (O >>= 4); - T < 16 ? (T = 0) : T >= 4080 ? (T = 255) : (T >>= 4); - M < 16 ? (M = 0) : M >= 4080 ? (M = 255) : (M >>= 4); - n[t + e] = x; - n[t + e + 8] = C; - n[t + e + 16] = k; - n[t + e + 24] = v; - n[t + e + 32] = F; - n[t + e + 40] = O; - n[t + e + 48] = T; - n[t + e + 56] = M; - } else { - D = (f * x + 8192) >> 14; - D = D < -2040 ? 0 : D >= 2024 ? 255 : (D + 2056) >> 4; - n[t + e] = D; - n[t + e + 8] = D; - n[t + e + 16] = D; - n[t + e + 24] = D; - n[t + e + 32] = D; - n[t + e + 40] = D; - n[t + e + 48] = D; - n[t + e + 56] = D; - } - } - } - function buildComponentData(e, t) { - const a = t.blocksPerLine, - r = t.blocksPerColumn, - n = new Int16Array(64); - for (let e = 0; e < r; e++) - for (let r = 0; r < a; r++) { - quantizeAndInverse(t, getBlockBufferOffset(t, e, r), n); - } - return t.blockData; - } - function findNextFileMarker(e, t, a = t) { - const r = e.length - 1; - let n = a < t ? a : t; - if (t >= r) return null; - const s = (0, i.readUint16)(e, t); - if (s >= 65472 && s <= 65534) - return { invalid: null, marker: s, offset: t }; - let o = (0, i.readUint16)(e, n); - for (; !(o >= 65472 && o <= 65534); ) { - if (++n >= r) return null; - o = (0, i.readUint16)(e, n); - } - return { invalid: s.toString(16), marker: o, offset: n }; - } - t.JpegImage = class JpegImage { - constructor({ - decodeTransform: e = null, - colorTransform: t = -1, - } = {}) { - this._decodeTransform = e; - this._colorTransform = t; - } - parse(e, { dnlScanLines: t = null } = {}) { - function readDataBlock() { - const t = (0, i.readUint16)(e, o); - o += 2; - let a = o + t - 2; - const n = findNextFileMarker(e, a, o); - if (n?.invalid) { - (0, r.warn)( - "readDataBlock - incorrect length, current marker is: " + - n.invalid, - ); - a = n.offset; - } - const s = e.subarray(o, a); - o += s.length; - return s; - } - function prepareComponents(e) { - const t = Math.ceil(e.samplesPerLine / 8 / e.maxH), - a = Math.ceil(e.scanLines / 8 / e.maxV); - for (const r of e.components) { - const n = Math.ceil( - (Math.ceil(e.samplesPerLine / 8) * r.h) / e.maxH, - ), - i = Math.ceil((Math.ceil(e.scanLines / 8) * r.v) / e.maxV), - s = t * r.h, - o = 64 * (a * r.v) * (s + 1); - r.blockData = new Int16Array(o); - r.blocksPerLine = n; - r.blocksPerColumn = i; - } - e.mcusPerLine = t; - e.mcusPerColumn = a; - } - let a, - n, - o = 0, - c = null, - l = null, - h = 0; - const u = [], - d = [], - f = []; - let g = (0, i.readUint16)(e, o); - o += 2; - if (65496 !== g) throw new JpegError("SOI not found"); - g = (0, i.readUint16)(e, o); - o += 2; - e: for (; 65497 !== g; ) { - let p, m, b; - switch (g) { - case 65504: - case 65505: - case 65506: - case 65507: - case 65508: - case 65509: - case 65510: - case 65511: - case 65512: - case 65513: - case 65514: - case 65515: - case 65516: - case 65517: - case 65518: - case 65519: - case 65534: - const y = readDataBlock(); - 65504 === g && - 74 === y[0] && - 70 === y[1] && - 73 === y[2] && - 70 === y[3] && - 0 === y[4] && - (c = { - version: { major: y[5], minor: y[6] }, - densityUnits: y[7], - xDensity: (y[8] << 8) | y[9], - yDensity: (y[10] << 8) | y[11], - thumbWidth: y[12], - thumbHeight: y[13], - thumbData: y.subarray(14, 14 + 3 * y[12] * y[13]), - }); - 65518 === g && - 65 === y[0] && - 100 === y[1] && - 111 === y[2] && - 98 === y[3] && - 101 === y[4] && - (l = { - version: (y[5] << 8) | y[6], - flags0: (y[7] << 8) | y[8], - flags1: (y[9] << 8) | y[10], - transformCode: y[11], - }); - break; - case 65499: - const w = (0, i.readUint16)(e, o); - o += 2; - const S = w + o - 2; - let x; - for (; o < S; ) { - const t = e[o++], - a = new Uint16Array(64); - if (t >> 4 == 0) - for (m = 0; m < 64; m++) { - x = s[m]; - a[x] = e[o++]; - } - else { - if (t >> 4 != 1) - throw new JpegError("DQT - invalid table spec"); - for (m = 0; m < 64; m++) { - x = s[m]; - a[x] = (0, i.readUint16)(e, o); - o += 2; - } - } - u[15 & t] = a; - } - break; - case 65472: - case 65473: - case 65474: - if (a) - throw new JpegError("Only single frame JPEGs supported"); - o += 2; - a = {}; - a.extended = 65473 === g; - a.progressive = 65474 === g; - a.precision = e[o++]; - const C = (0, i.readUint16)(e, o); - o += 2; - a.scanLines = t || C; - a.samplesPerLine = (0, i.readUint16)(e, o); - o += 2; - a.components = []; - a.componentIds = {}; - const k = e[o++]; - let v = 0, - F = 0; - for (p = 0; p < k; p++) { - const t = e[o], - r = e[o + 1] >> 4, - n = 15 & e[o + 1]; - v < r && (v = r); - F < n && (F = n); - const i = e[o + 2]; - b = a.components.push({ - h: r, - v: n, - quantizationId: i, - quantizationTable: null, - }); - a.componentIds[t] = b - 1; - o += 3; - } - a.maxH = v; - a.maxV = F; - prepareComponents(a); - break; - case 65476: - const O = (0, i.readUint16)(e, o); - o += 2; - for (p = 2; p < O; ) { - const t = e[o++], - a = new Uint8Array(16); - let r = 0; - for (m = 0; m < 16; m++, o++) r += a[m] = e[o]; - const n = new Uint8Array(r); - for (m = 0; m < r; m++, o++) n[m] = e[o]; - p += 17 + r; - (t >> 4 == 0 ? f : d)[15 & t] = buildHuffmanTable(a, n); - } - break; - case 65501: - o += 2; - n = (0, i.readUint16)(e, o); - o += 2; - break; - case 65498: - const T = 1 == ++h && !t; - o += 2; - const M = e[o++], - D = []; - for (p = 0; p < M; p++) { - const t = e[o++], - r = a.componentIds[t], - n = a.components[r]; - n.index = t; - const i = e[o++]; - n.huffmanTableDC = f[i >> 4]; - n.huffmanTableAC = d[15 & i]; - D.push(n); - } - const E = e[o++], - N = e[o++], - R = e[o++]; - try { - const t = decodeScan( - e, - o, - a, - D, - n, - E, - N, - R >> 4, - 15 & R, - T, - ); - o += t; - } catch (t) { - if (t instanceof DNLMarkerError) { - (0, r.warn)( - `${t.message} -- attempting to re-parse the JPEG image.`, - ); - return this.parse(e, { dnlScanLines: t.scanLines }); - } - if (t instanceof EOIMarkerError) { - (0, r.warn)( - `${t.message} -- ignoring the rest of the image data.`, - ); - break e; - } - throw t; - } - break; - case 65500: - o += 4; - break; - case 65535: - 255 !== e[o] && o--; - break; - default: - const L = findNextFileMarker(e, o - 2, o - 3); - if (L?.invalid) { - (0, r.warn)( - "JpegImage.parse - unexpected data, current marker is: " + - L.invalid, - ); - o = L.offset; - break; - } - if (!L || o >= e.length - 1) { - (0, r.warn)( - "JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).", - ); - break e; - } - throw new JpegError( - "JpegImage.parse - unknown marker: " + g.toString(16), - ); - } - g = (0, i.readUint16)(e, o); - o += 2; - } - this.width = a.samplesPerLine; - this.height = a.scanLines; - this.jfif = c; - this.adobe = l; - this.components = []; - for (const e of a.components) { - const t = u[e.quantizationId]; - t && (e.quantizationTable = t); - this.components.push({ - index: e.index, - output: buildComponentData(0, e), - scaleX: e.h / a.maxH, - scaleY: e.v / a.maxV, - blocksPerLine: e.blocksPerLine, - blocksPerColumn: e.blocksPerColumn, - }); - } - this.numComponents = this.components.length; - } - _getLinearizedBlockData(e, t, a = !1) { - const r = this.width / e, - n = this.height / t; - let i, - s, - o, - c, - l, - h, - u, - d, - f, - g, - p, - m = 0; - const b = this.components.length, - y = e * t * b, - w = new Uint8ClampedArray(y), - S = new Uint32Array(e), - x = 4294967288; - let C; - for (u = 0; u < b; u++) { - i = this.components[u]; - s = i.scaleX * r; - o = i.scaleY * n; - m = u; - p = i.output; - c = (i.blocksPerLine + 1) << 3; - if (s !== C) { - for (l = 0; l < e; l++) { - d = 0 | (l * s); - S[l] = ((d & x) << 3) | (7 & d); - } - C = s; - } - for (h = 0; h < t; h++) { - d = 0 | (h * o); - g = (c * (d & x)) | ((7 & d) << 3); - for (l = 0; l < e; l++) { - w[m] = p[g + S[l]]; - m += b; - } - } - } - let k = this._decodeTransform; - a || - 4 !== b || - k || - (k = new Int32Array([ - -256, 255, -256, 255, -256, 255, -256, 255, - ])); - if (k) - for (u = 0; u < y; ) - for (d = 0, f = 0; d < b; d++, u++, f += 2) - w[u] = ((w[u] * k[f]) >> 8) + k[f + 1]; - return w; - } - get _isColorConversionNeeded() { - return this.adobe - ? !!this.adobe.transformCode - : 3 === this.numComponents - ? 0 !== this._colorTransform && - (82 !== this.components[0].index || - 71 !== this.components[1].index || - 66 !== this.components[2].index) - : 1 === this._colorTransform; - } - _convertYccToRgb(e) { - let t, a, r; - for (let n = 0, i = e.length; n < i; n += 3) { - t = e[n]; - a = e[n + 1]; - r = e[n + 2]; - e[n] = t - 179.456 + 1.402 * r; - e[n + 1] = t + 135.459 - 0.344 * a - 0.714 * r; - e[n + 2] = t - 226.816 + 1.772 * a; - } - return e; - } - _convertYccToRgba(e, t) { - for (let a = 0, r = 0, n = e.length; a < n; a += 3, r += 4) { - const n = e[a], - i = e[a + 1], - s = e[a + 2]; - t[r] = n - 179.456 + 1.402 * s; - t[r + 1] = n + 135.459 - 0.344 * i - 0.714 * s; - t[r + 2] = n - 226.816 + 1.772 * i; - t[r + 3] = 255; - } - return t; - } - _convertYcckToRgb(e) { - let t, - a, - r, - n, - i = 0; - for (let s = 0, o = e.length; s < o; s += 4) { - t = e[s]; - a = e[s + 1]; - r = e[s + 2]; - n = e[s + 3]; - e[i++] = - a * - (-660635669420364e-19 * a + - 0.000437130475926232 * r - - 54080610064599e-18 * t + - 0.00048449797120281 * n - - 0.154362151871126) - - 122.67195406894 + - r * - (-0.000957964378445773 * r + - 0.000817076911346625 * t - - 0.00477271405408747 * n + - 1.53380253221734) + - t * - (0.000961250184130688 * t - - 0.00266257332283933 * n + - 0.48357088451265) + - n * (-0.000336197177618394 * n + 0.484791561490776); - e[i++] = - 107.268039397724 + - a * - (219927104525741e-19 * a - - 0.000640992018297945 * r + - 0.000659397001245577 * t + - 0.000426105652938837 * n - - 0.176491792462875) + - r * - (-0.000778269941513683 * r + - 0.00130872261408275 * t + - 0.000770482631801132 * n - - 0.151051492775562) + - t * - (0.00126935368114843 * t - - 0.00265090189010898 * n + - 0.25802910206845) + - n * (-0.000318913117588328 * n - 0.213742400323665); - e[i++] = - a * - (-0.000570115196973677 * a - - 263409051004589e-19 * r + - 0.0020741088115012 * t - - 0.00288260236853442 * n + - 0.814272968359295) - - 20.810012546947 + - r * - (-153496057440975e-19 * r - - 0.000132689043961446 * t + - 0.000560833691242812 * n - - 0.195152027534049) + - t * - (0.00174418132927582 * t - - 0.00255243321439347 * n + - 0.116935020465145) + - n * (-0.000343531996510555 * n + 0.24165260232407); - } - return e.subarray(0, i); - } - _convertYcckToRgba(e) { - for (let t = 0, a = e.length; t < a; t += 4) { - const a = e[t], - r = e[t + 1], - n = e[t + 2], - i = e[t + 3]; - e[t] = - r * - (-660635669420364e-19 * r + - 0.000437130475926232 * n - - 54080610064599e-18 * a + - 0.00048449797120281 * i - - 0.154362151871126) - - 122.67195406894 + - n * - (-0.000957964378445773 * n + - 0.000817076911346625 * a - - 0.00477271405408747 * i + - 1.53380253221734) + - a * - (0.000961250184130688 * a - - 0.00266257332283933 * i + - 0.48357088451265) + - i * (-0.000336197177618394 * i + 0.484791561490776); - e[t + 1] = - 107.268039397724 + - r * - (219927104525741e-19 * r - - 0.000640992018297945 * n + - 0.000659397001245577 * a + - 0.000426105652938837 * i - - 0.176491792462875) + - n * - (-0.000778269941513683 * n + - 0.00130872261408275 * a + - 0.000770482631801132 * i - - 0.151051492775562) + - a * - (0.00126935368114843 * a - - 0.00265090189010898 * i + - 0.25802910206845) + - i * (-0.000318913117588328 * i - 0.213742400323665); - e[t + 2] = - r * - (-0.000570115196973677 * r - - 263409051004589e-19 * n + - 0.0020741088115012 * a - - 0.00288260236853442 * i + - 0.814272968359295) - - 20.810012546947 + - n * - (-153496057440975e-19 * n - - 0.000132689043961446 * a + - 0.000560833691242812 * i - - 0.195152027534049) + - a * - (0.00174418132927582 * a - - 0.00255243321439347 * i + - 0.116935020465145) + - i * (-0.000343531996510555 * i + 0.24165260232407); - e[t + 3] = 255; - } - return e; - } - _convertYcckToCmyk(e) { - let t, a, r; - for (let n = 0, i = e.length; n < i; n += 4) { - t = e[n]; - a = e[n + 1]; - r = e[n + 2]; - e[n] = 434.456 - t - 1.402 * r; - e[n + 1] = 119.541 - t + 0.344 * a + 0.714 * r; - e[n + 2] = 481.816 - t - 1.772 * a; - } - return e; - } - _convertCmykToRgb(e) { - let t, - a, - r, - n, - i = 0; - for (let s = 0, o = e.length; s < o; s += 4) { - t = e[s]; - a = e[s + 1]; - r = e[s + 2]; - n = e[s + 3]; - e[i++] = - 255 + - t * - (-6747147073602441e-20 * t + - 0.0008379262121013727 * a + - 0.0002894718188643294 * r + - 0.003264231057537806 * n - - 1.1185611867203937) + - a * - (26374107616089405e-21 * a - - 8626949158638572e-20 * r - - 0.0002748769067499491 * n - - 0.02155688794978967) + - r * - (-3878099212869363e-20 * r - - 0.0003267808279485286 * n + - 0.0686742238595345) - - n * (0.0003361971776183937 * n + 0.7430659151342254); - e[i++] = - 255 + - t * - (0.00013596372813588848 * t + - 0.000924537132573585 * a + - 0.00010567359618683593 * r + - 0.0004791864687436512 * n - - 0.3109689587515875) + - a * - (-0.00023545346108370344 * a + - 0.0002702845253534714 * r + - 0.0020200308977307156 * n - - 0.7488052167015494) + - r * - (6834815998235662e-20 * r + - 0.00015168452363460973 * n - - 0.09751927774728933) - - n * (0.0003189131175883281 * n + 0.7364883807733168); - e[i++] = - 255 + - t * - (13598650411385307e-21 * t + - 0.00012423956175490851 * a + - 0.0004751985097583589 * r - - 36729317476630422e-22 * n - - 0.05562186980264034) + - a * - (0.00016141380598724676 * a + - 0.0009692239130725186 * r + - 0.0007782692450036253 * n - - 0.44015232367526463) + - r * - (5.068882914068769e-7 * r + - 0.0017778369011375071 * n - - 0.7591454649749609) - - n * (0.0003435319965105553 * n + 0.7063770186160144); - } - return e.subarray(0, i); - } - _convertCmykToRgba(e) { - for (let t = 0, a = e.length; t < a; t += 4) { - const a = e[t], - r = e[t + 1], - n = e[t + 2], - i = e[t + 3]; - e[t] = - 255 + - a * - (-6747147073602441e-20 * a + - 0.0008379262121013727 * r + - 0.0002894718188643294 * n + - 0.003264231057537806 * i - - 1.1185611867203937) + - r * - (26374107616089405e-21 * r - - 8626949158638572e-20 * n - - 0.0002748769067499491 * i - - 0.02155688794978967) + - n * - (-3878099212869363e-20 * n - - 0.0003267808279485286 * i + - 0.0686742238595345) - - i * (0.0003361971776183937 * i + 0.7430659151342254); - e[t + 1] = - 255 + - a * - (0.00013596372813588848 * a + - 0.000924537132573585 * r + - 0.00010567359618683593 * n + - 0.0004791864687436512 * i - - 0.3109689587515875) + - r * - (-0.00023545346108370344 * r + - 0.0002702845253534714 * n + - 0.0020200308977307156 * i - - 0.7488052167015494) + - n * - (6834815998235662e-20 * n + - 0.00015168452363460973 * i - - 0.09751927774728933) - - i * (0.0003189131175883281 * i + 0.7364883807733168); - e[t + 2] = - 255 + - a * - (13598650411385307e-21 * a + - 0.00012423956175490851 * r + - 0.0004751985097583589 * n - - 36729317476630422e-22 * i - - 0.05562186980264034) + - r * - (0.00016141380598724676 * r + - 0.0009692239130725186 * n + - 0.0007782692450036253 * i - - 0.44015232367526463) + - n * - (5.068882914068769e-7 * n + - 0.0017778369011375071 * i - - 0.7591454649749609) - - i * (0.0003435319965105553 * i + 0.7063770186160144); - e[t + 3] = 255; - } - return e; - } - getData({ - width: e, - height: t, - forceRGBA: a = !1, - forceRGB: r = !1, - isSourcePDF: i = !1, - }) { - if (this.numComponents > 4) - throw new JpegError("Unsupported color mode"); - const s = this._getLinearizedBlockData(e, t, i); - if (1 === this.numComponents && (a || r)) { - const e = s.length * (a ? 4 : 3), - t = new Uint8ClampedArray(e); - let r = 0; - if (a) (0, n.grayToRGBA)(s, new Uint32Array(t.buffer)); - else - for (const e of s) { - t[r++] = e; - t[r++] = e; - t[r++] = e; - } - return t; - } - if (3 === this.numComponents && this._isColorConversionNeeded) { - if (a) { - const e = new Uint8ClampedArray((s.length / 3) * 4); - return this._convertYccToRgba(s, e); - } - return this._convertYccToRgb(s); - } - if (4 === this.numComponents) { - if (this._isColorConversionNeeded) - return a - ? this._convertYcckToRgba(s) - : r - ? this._convertYcckToRgb(s) - : this._convertYcckToCmyk(s); - if (a) return this._convertCmykToRgba(s); - if (r) return this._convertCmykToRgb(s); - } - return s; - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.convertBlackAndWhiteToRGBA = convertBlackAndWhiteToRGBA; - t.convertToRGBA = function convertToRGBA(e) { - switch (e.kind) { - case r.ImageKind.GRAYSCALE_1BPP: - return convertBlackAndWhiteToRGBA(e); - case r.ImageKind.RGB_24BPP: - return (function convertRGBToRGBA({ - src: e, - srcPos: t = 0, - dest: a, - destPos: n = 0, - width: i, - height: s, - }) { - let o = 0; - const c = e.length >> 2, - l = new Uint32Array(e.buffer, t, c); - if (r.FeatureTest.isLittleEndian) { - for (; o < c - 2; o += 3, n += 4) { - const e = l[o], - t = l[o + 1], - r = l[o + 2]; - a[n] = 4278190080 | e; - a[n + 1] = (e >>> 24) | (t << 8) | 4278190080; - a[n + 2] = (t >>> 16) | (r << 16) | 4278190080; - a[n + 3] = (r >>> 8) | 4278190080; - } - for (let t = 4 * o, r = e.length; t < r; t += 3) - a[n++] = - e[t] | (e[t + 1] << 8) | (e[t + 2] << 16) | 4278190080; - } else { - for (; o < c - 2; o += 3, n += 4) { - const e = l[o], - t = l[o + 1], - r = l[o + 2]; - a[n] = 255 | e; - a[n + 1] = (e << 24) | (t >>> 8) | 255; - a[n + 2] = (t << 16) | (r >>> 16) | 255; - a[n + 3] = (r << 8) | 255; - } - for (let t = 4 * o, r = e.length; t < r; t += 3) - a[n++] = - (e[t] << 24) | (e[t + 1] << 16) | (e[t + 2] << 8) | 255; - } - return { srcPos: t, destPos: n }; - })(e); - } - return null; - }; - t.grayToRGBA = function grayToRGBA(e, t) { - if (r.FeatureTest.isLittleEndian) - for (let a = 0, r = e.length; a < r; a++) - t[a] = (65793 * e[a]) | 4278190080; - else - for (let a = 0, r = e.length; a < r; a++) - t[a] = (16843008 * e[a]) | 255; - }; - var r = a(2); - function convertBlackAndWhiteToRGBA({ - src: e, - srcPos: t = 0, - dest: a, - width: n, - height: i, - nonBlackColor: s = 4294967295, - inverseDecode: o = !1, - }) { - const c = r.FeatureTest.isLittleEndian ? 4278190080 : 255, - [l, h] = o ? [s, c] : [c, s], - u = n >> 3, - d = 7 & n, - f = e.length; - a = new Uint32Array(a.buffer); - let g = 0; - for (let r = 0; r < i; r++) { - for (const r = t + u; t < r; t++) { - const r = t < f ? e[t] : 255; - a[g++] = 128 & r ? h : l; - a[g++] = 64 & r ? h : l; - a[g++] = 32 & r ? h : l; - a[g++] = 16 & r ? h : l; - a[g++] = 8 & r ? h : l; - a[g++] = 4 & r ? h : l; - a[g++] = 2 & r ? h : l; - a[g++] = 1 & r ? h : l; - } - if (0 === d) continue; - const r = t < f ? e[t++] : 255; - for (let e = 0; e < d; e++) a[g++] = r & (1 << (7 - e)) ? h : l; - } - return { srcPos: t, destPos: g }; - } - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.JpxStream = void 0; - var r = a(18), - n = a(30), - i = a(2); - class JpxStream extends r.DecodeStream { - constructor(e, t, a) { - super(t); - this.stream = e; - this.dict = e.dict; - this.maybeLength = t; - this.params = a; - } - get bytes() { - return (0, i.shadow)( - this, - "bytes", - this.stream.getBytes(this.maybeLength), - ); - } - ensureBuffer(e) {} - readBlock() { - if (this.eof) return; - const e = new n.JpxImage(); - e.parse(this.bytes); - const t = e.width, - a = e.height, - r = e.componentsCount, - i = e.tiles.length; - if (1 === i) this.buffer = e.tiles[0].items; - else { - const n = new Uint8ClampedArray(t * a * r); - for (let a = 0; a < i; a++) { - const i = e.tiles[a], - s = i.width, - o = i.height, - c = i.left, - l = i.top, - h = i.items; - let u = 0, - d = (t * l + c) * r; - const f = t * r, - g = s * r; - for (let e = 0; e < o; e++) { - const e = h.subarray(u, u + g); - n.set(e, d); - u += g; - d += f; - } - } - this.buffer = n; - } - this.bufferLength = this.buffer.length; - this.eof = !0; - } - } - t.JpxStream = JpxStream; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.JpxImage = void 0; - var r = a(2), - n = a(3), - i = a(25); - class JpxError extends r.BaseException { - constructor(e) { - super(`JPX error: ${e}`, "JpxError"); - } - } - const s = { LL: 0, LH: 1, HL: 1, HH: 2 }; - t.JpxImage = class JpxImage { - constructor() { - this.failOnCorruptedImage = !1; - } - parse(e) { - if (65359 === (0, n.readUint16)(e, 0)) { - this.parseCodestream(e, 0, e.length); - return; - } - const t = e.length; - let a = 0; - for (; a < t; ) { - let i = 8, - s = (0, n.readUint32)(e, a); - const o = (0, n.readUint32)(e, a + 4); - a += i; - if (1 === s) { - s = - 4294967296 * (0, n.readUint32)(e, a) + - (0, n.readUint32)(e, a + 4); - a += 8; - i += 8; - } - 0 === s && (s = t - a + i); - if (s < i) throw new JpxError("Invalid box field size"); - const c = s - i; - let l = !0; - switch (o) { - case 1785737832: - l = !1; - break; - case 1668246642: - const t = e[a]; - if (1 === t) { - const t = (0, n.readUint32)(e, a + 3); - switch (t) { - case 16: - case 17: - case 18: - break; - default: - (0, r.warn)("Unknown colorspace " + t); - } - } else 2 === t && (0, r.info)("ICC profile not supported"); - break; - case 1785737827: - this.parseCodestream(e, a, a + c); - break; - case 1783636e3: - 218793738 !== (0, n.readUint32)(e, a) && - (0, r.warn)("Invalid JP2 signature"); - break; - case 1783634458: - case 1718909296: - case 1920099697: - case 1919251232: - case 1768449138: - break; - default: - const i = String.fromCharCode( - (o >> 24) & 255, - (o >> 16) & 255, - (o >> 8) & 255, - 255 & o, - ); - (0, r.warn)(`Unsupported header type ${o} (${i}).`); - } - l && (a += c); - } - } - parseImageProperties(e) { - let t = e.getByte(); - for (; t >= 0; ) { - const a = t; - t = e.getByte(); - if (65361 === ((a << 8) | t)) { - e.skip(4); - const t = e.getInt32() >>> 0, - a = e.getInt32() >>> 0, - r = e.getInt32() >>> 0, - n = e.getInt32() >>> 0; - e.skip(16); - const i = e.getUint16(); - this.width = t - r; - this.height = a - n; - this.componentsCount = i; - this.bitsPerComponent = 8; - return; - } - } - throw new JpxError("No size marker found in JPX stream"); - } - parseCodestream(e, t, a) { - const i = {}; - let s = !1; - try { - let o = t; - for (; o + 1 < a; ) { - const t = (0, n.readUint16)(e, o); - o += 2; - let a, - c, - l, - h, - u, - d, - f = 0; - switch (t) { - case 65359: - i.mainHeader = !0; - break; - case 65497: - break; - case 65361: - f = (0, n.readUint16)(e, o); - const g = {}; - g.Xsiz = (0, n.readUint32)(e, o + 4); - g.Ysiz = (0, n.readUint32)(e, o + 8); - g.XOsiz = (0, n.readUint32)(e, o + 12); - g.YOsiz = (0, n.readUint32)(e, o + 16); - g.XTsiz = (0, n.readUint32)(e, o + 20); - g.YTsiz = (0, n.readUint32)(e, o + 24); - g.XTOsiz = (0, n.readUint32)(e, o + 28); - g.YTOsiz = (0, n.readUint32)(e, o + 32); - const p = (0, n.readUint16)(e, o + 36); - g.Csiz = p; - const m = []; - a = o + 38; - for (let t = 0; t < p; t++) { - const t = { - precision: 1 + (127 & e[a]), - isSigned: !!(128 & e[a]), - XRsiz: e[a + 1], - YRsiz: e[a + 2], - }; - a += 3; - calculateComponentDimensions(t, g); - m.push(t); - } - i.SIZ = g; - i.components = m; - calculateTileGrids(i, m); - i.QCC = []; - i.COC = []; - break; - case 65372: - f = (0, n.readUint16)(e, o); - const b = {}; - a = o + 2; - c = e[a++]; - switch (31 & c) { - case 0: - h = 8; - u = !0; - break; - case 1: - h = 16; - u = !1; - break; - case 2: - h = 16; - u = !0; - break; - default: - throw new Error("Invalid SQcd value " + c); - } - b.noQuantization = 8 === h; - b.scalarExpounded = u; - b.guardBits = c >> 5; - l = []; - for (; a < f + o; ) { - const t = {}; - if (8 === h) { - t.epsilon = e[a++] >> 3; - t.mu = 0; - } else { - t.epsilon = e[a] >> 3; - t.mu = ((7 & e[a]) << 8) | e[a + 1]; - a += 2; - } - l.push(t); - } - b.SPqcds = l; - if (i.mainHeader) i.QCD = b; - else { - i.currentTile.QCD = b; - i.currentTile.QCC = []; - } - break; - case 65373: - f = (0, n.readUint16)(e, o); - const y = {}; - a = o + 2; - let w; - if (i.SIZ.Csiz < 257) w = e[a++]; - else { - w = (0, n.readUint16)(e, a); - a += 2; - } - c = e[a++]; - switch (31 & c) { - case 0: - h = 8; - u = !0; - break; - case 1: - h = 16; - u = !1; - break; - case 2: - h = 16; - u = !0; - break; - default: - throw new Error("Invalid SQcd value " + c); - } - y.noQuantization = 8 === h; - y.scalarExpounded = u; - y.guardBits = c >> 5; - l = []; - for (; a < f + o; ) { - const t = {}; - if (8 === h) { - t.epsilon = e[a++] >> 3; - t.mu = 0; - } else { - t.epsilon = e[a] >> 3; - t.mu = ((7 & e[a]) << 8) | e[a + 1]; - a += 2; - } - l.push(t); - } - y.SPqcds = l; - i.mainHeader - ? (i.QCC[w] = y) - : (i.currentTile.QCC[w] = y); - break; - case 65362: - f = (0, n.readUint16)(e, o); - const S = {}; - a = o + 2; - const x = e[a++]; - S.entropyCoderWithCustomPrecincts = !!(1 & x); - S.sopMarkerUsed = !!(2 & x); - S.ephMarkerUsed = !!(4 & x); - S.progressionOrder = e[a++]; - S.layersCount = (0, n.readUint16)(e, a); - a += 2; - S.multipleComponentTransform = e[a++]; - S.decompositionLevelsCount = e[a++]; - S.xcb = 2 + (15 & e[a++]); - S.ycb = 2 + (15 & e[a++]); - const C = e[a++]; - S.selectiveArithmeticCodingBypass = !!(1 & C); - S.resetContextProbabilities = !!(2 & C); - S.terminationOnEachCodingPass = !!(4 & C); - S.verticallyStripe = !!(8 & C); - S.predictableTermination = !!(16 & C); - S.segmentationSymbolUsed = !!(32 & C); - S.reversibleTransformation = e[a++]; - if (S.entropyCoderWithCustomPrecincts) { - const t = []; - for (; a < f + o; ) { - const r = e[a++]; - t.push({ PPx: 15 & r, PPy: r >> 4 }); - } - S.precinctsSizes = t; - } - const k = []; - S.selectiveArithmeticCodingBypass && - k.push("selectiveArithmeticCodingBypass"); - S.terminationOnEachCodingPass && - k.push("terminationOnEachCodingPass"); - S.verticallyStripe && k.push("verticallyStripe"); - S.predictableTermination && - k.push("predictableTermination"); - if (k.length > 0) { - s = !0; - (0, r.warn)( - `JPX: Unsupported COD options (${k.join(", ")}).`, - ); - } - if (i.mainHeader) i.COD = S; - else { - i.currentTile.COD = S; - i.currentTile.COC = []; - } - break; - case 65424: - f = (0, n.readUint16)(e, o); - d = {}; - d.index = (0, n.readUint16)(e, o + 2); - d.length = (0, n.readUint32)(e, o + 4); - d.dataEnd = d.length + o - 2; - d.partIndex = e[o + 8]; - d.partsCount = e[o + 9]; - i.mainHeader = !1; - if (0 === d.partIndex) { - d.COD = i.COD; - d.COC = i.COC.slice(0); - d.QCD = i.QCD; - d.QCC = i.QCC.slice(0); - } - i.currentTile = d; - break; - case 65427: - d = i.currentTile; - if (0 === d.partIndex) { - initializeTile(i, d.index); - buildPackets(i); - } - f = d.dataEnd - o; - parseTilePackets(i, e, o, f); - break; - case 65363: - (0, r.warn)( - "JPX: Codestream code 0xFF53 (COC) is not implemented.", - ); - case 65365: - case 65367: - case 65368: - case 65380: - f = (0, n.readUint16)(e, o); - break; - default: - throw new Error( - "Unknown codestream code: " + t.toString(16), - ); - } - o += f; - } - } catch (e) { - if (s || this.failOnCorruptedImage) - throw new JpxError(e.message); - (0, r.warn)(`JPX: Trying to recover from: "${e.message}".`); - } - this.tiles = (function transformComponents(e) { - const t = e.SIZ, - a = e.components, - r = t.Csiz, - n = []; - for (let t = 0, i = e.tiles.length; t < i; t++) { - const i = e.tiles[t], - s = []; - for (let t = 0; t < r; t++) s[t] = transformTile(e, i, t); - const o = s[0], - c = new Uint8ClampedArray(o.items.length * r), - l = { - left: o.left, - top: o.top, - width: o.width, - height: o.height, - items: c, - }; - let h, - u, - d, - f, - g, - p, - m, - b = 0; - if ( - i.codingStyleDefaultParameters.multipleComponentTransform - ) { - const e = 4 === r, - t = s[0].items, - n = s[1].items, - o = s[2].items, - l = e ? s[3].items : null; - h = a[0].precision - 8; - u = 0.5 + (128 << h); - const y = i.components[0], - w = r - 3; - f = t.length; - if (y.codingStyleParameters.reversibleTransformation) - for (d = 0; d < f; d++, b += w) { - g = t[d] + u; - p = n[d]; - m = o[d]; - const e = g - ((m + p) >> 2); - c[b++] = (e + m) >> h; - c[b++] = e >> h; - c[b++] = (e + p) >> h; - } - else - for (d = 0; d < f; d++, b += w) { - g = t[d] + u; - p = n[d]; - m = o[d]; - c[b++] = (g + 1.402 * m) >> h; - c[b++] = (g - 0.34413 * p - 0.71414 * m) >> h; - c[b++] = (g + 1.772 * p) >> h; - } - if (e) - for (d = 0, b = 3; d < f; d++, b += 4) - c[b] = (l[d] + u) >> h; - } else - for (let e = 0; e < r; e++) { - const t = s[e].items; - h = a[e].precision - 8; - u = 0.5 + (128 << h); - for (b = e, d = 0, f = t.length; d < f; d++) { - c[b] = (t[d] + u) >> h; - b += r; - } - } - n.push(l); - } - return n; - })(i); - this.width = i.SIZ.Xsiz - i.SIZ.XOsiz; - this.height = i.SIZ.Ysiz - i.SIZ.YOsiz; - this.componentsCount = i.SIZ.Csiz; - } - }; - function calculateComponentDimensions(e, t) { - e.x0 = Math.ceil(t.XOsiz / e.XRsiz); - e.x1 = Math.ceil(t.Xsiz / e.XRsiz); - e.y0 = Math.ceil(t.YOsiz / e.YRsiz); - e.y1 = Math.ceil(t.Ysiz / e.YRsiz); - e.width = e.x1 - e.x0; - e.height = e.y1 - e.y0; - } - function calculateTileGrids(e, t) { - const a = e.SIZ, - r = []; - let n; - const i = Math.ceil((a.Xsiz - a.XTOsiz) / a.XTsiz), - s = Math.ceil((a.Ysiz - a.YTOsiz) / a.YTsiz); - for (let e = 0; e < s; e++) - for (let t = 0; t < i; t++) { - n = {}; - n.tx0 = Math.max(a.XTOsiz + t * a.XTsiz, a.XOsiz); - n.ty0 = Math.max(a.YTOsiz + e * a.YTsiz, a.YOsiz); - n.tx1 = Math.min(a.XTOsiz + (t + 1) * a.XTsiz, a.Xsiz); - n.ty1 = Math.min(a.YTOsiz + (e + 1) * a.YTsiz, a.Ysiz); - n.width = n.tx1 - n.tx0; - n.height = n.ty1 - n.ty0; - n.components = []; - r.push(n); - } - e.tiles = r; - for (let e = 0, i = a.Csiz; e < i; e++) { - const a = t[e]; - for (let t = 0, i = r.length; t < i; t++) { - const i = {}; - n = r[t]; - i.tcx0 = Math.ceil(n.tx0 / a.XRsiz); - i.tcy0 = Math.ceil(n.ty0 / a.YRsiz); - i.tcx1 = Math.ceil(n.tx1 / a.XRsiz); - i.tcy1 = Math.ceil(n.ty1 / a.YRsiz); - i.width = i.tcx1 - i.tcx0; - i.height = i.tcy1 - i.tcy0; - n.components[e] = i; - } - } - } - function getBlocksDimensions(e, t, a) { - const r = t.codingStyleParameters, - n = {}; - if (r.entropyCoderWithCustomPrecincts) { - n.PPx = r.precinctsSizes[a].PPx; - n.PPy = r.precinctsSizes[a].PPy; - } else { - n.PPx = 15; - n.PPy = 15; - } - n.xcb_ = - a > 0 ? Math.min(r.xcb, n.PPx - 1) : Math.min(r.xcb, n.PPx); - n.ycb_ = - a > 0 ? Math.min(r.ycb, n.PPy - 1) : Math.min(r.ycb, n.PPy); - return n; - } - function buildPrecincts(e, t, a) { - const r = 1 << a.PPx, - n = 1 << a.PPy, - i = 0 === t.resLevel, - s = 1 << (a.PPx + (i ? 0 : -1)), - o = 1 << (a.PPy + (i ? 0 : -1)), - c = - t.trx1 > t.trx0 - ? Math.ceil(t.trx1 / r) - Math.floor(t.trx0 / r) - : 0, - l = - t.try1 > t.try0 - ? Math.ceil(t.try1 / n) - Math.floor(t.try0 / n) - : 0, - h = c * l; - t.precinctParameters = { - precinctWidth: r, - precinctHeight: n, - numprecinctswide: c, - numprecinctshigh: l, - numprecincts: h, - precinctWidthInSubband: s, - precinctHeightInSubband: o, - }; - } - function buildCodeblocks(e, t, a) { - const r = a.xcb_, - n = a.ycb_, - i = 1 << r, - s = 1 << n, - o = t.tbx0 >> r, - c = t.tby0 >> n, - l = (t.tbx1 + i - 1) >> r, - h = (t.tby1 + s - 1) >> n, - u = t.resolution.precinctParameters, - d = [], - f = []; - let g, p, m, b; - for (p = c; p < h; p++) - for (g = o; g < l; g++) { - m = { - cbx: g, - cby: p, - tbx0: i * g, - tby0: s * p, - tbx1: i * (g + 1), - tby1: s * (p + 1), - }; - m.tbx0_ = Math.max(t.tbx0, m.tbx0); - m.tby0_ = Math.max(t.tby0, m.tby0); - m.tbx1_ = Math.min(t.tbx1, m.tbx1); - m.tby1_ = Math.min(t.tby1, m.tby1); - b = - Math.floor((m.tbx0_ - t.tbx0) / u.precinctWidthInSubband) + - Math.floor((m.tby0_ - t.tby0) / u.precinctHeightInSubband) * - u.numprecinctswide; - m.precinctNumber = b; - m.subbandType = t.type; - m.Lblock = 3; - if (m.tbx1_ <= m.tbx0_ || m.tby1_ <= m.tby0_) continue; - d.push(m); - let e = f[b]; - if (void 0 !== e) { - g < e.cbxMin - ? (e.cbxMin = g) - : g > e.cbxMax && (e.cbxMax = g); - p < e.cbyMin - ? (e.cbxMin = p) - : p > e.cbyMax && (e.cbyMax = p); - } else - f[b] = e = { cbxMin: g, cbyMin: p, cbxMax: g, cbyMax: p }; - m.precinct = e; - } - t.codeblockParameters = { - codeblockWidth: r, - codeblockHeight: n, - numcodeblockwide: l - o + 1, - numcodeblockhigh: h - c + 1, - }; - t.codeblocks = d; - t.precincts = f; - } - function createPacket(e, t, a) { - const r = [], - n = e.subbands; - for (let e = 0, a = n.length; e < a; e++) { - const a = n[e].codeblocks; - for (let e = 0, n = a.length; e < n; e++) { - const n = a[e]; - n.precinctNumber === t && r.push(n); - } - } - return { layerNumber: a, codeblocks: r }; - } - function LayerResolutionComponentPositionIterator(e) { - const t = e.SIZ, - a = e.currentTile.index, - r = e.tiles[a], - n = r.codingStyleDefaultParameters.layersCount, - i = t.Csiz; - let s = 0; - for (let e = 0; e < i; e++) - s = Math.max( - s, - r.components[e].codingStyleParameters.decompositionLevelsCount, - ); - let o = 0, - c = 0, - l = 0, - h = 0; - this.nextPacket = function JpxImage_nextPacket() { - for (; o < n; o++) { - for (; c <= s; c++) { - for (; l < i; l++) { - const e = r.components[l]; - if (c > e.codingStyleParameters.decompositionLevelsCount) - continue; - const t = e.resolutions[c], - a = t.precinctParameters.numprecincts; - for (; h < a; ) { - const e = createPacket(t, h, o); - h++; - return e; - } - h = 0; - } - l = 0; - } - c = 0; - } - throw new JpxError("Out of packets"); - }; - } - function ResolutionLayerComponentPositionIterator(e) { - const t = e.SIZ, - a = e.currentTile.index, - r = e.tiles[a], - n = r.codingStyleDefaultParameters.layersCount, - i = t.Csiz; - let s = 0; - for (let e = 0; e < i; e++) - s = Math.max( - s, - r.components[e].codingStyleParameters.decompositionLevelsCount, - ); - let o = 0, - c = 0, - l = 0, - h = 0; - this.nextPacket = function JpxImage_nextPacket() { - for (; o <= s; o++) { - for (; c < n; c++) { - for (; l < i; l++) { - const e = r.components[l]; - if (o > e.codingStyleParameters.decompositionLevelsCount) - continue; - const t = e.resolutions[o], - a = t.precinctParameters.numprecincts; - for (; h < a; ) { - const e = createPacket(t, h, c); - h++; - return e; - } - h = 0; - } - l = 0; - } - c = 0; - } - throw new JpxError("Out of packets"); - }; - } - function ResolutionPositionComponentLayerIterator(e) { - const t = e.SIZ, - a = e.currentTile.index, - r = e.tiles[a], - n = r.codingStyleDefaultParameters.layersCount, - i = t.Csiz; - let s, - o, - c, - l, - h = 0; - for (c = 0; c < i; c++) { - const e = r.components[c]; - h = Math.max(h, e.codingStyleParameters.decompositionLevelsCount); - } - const u = new Int32Array(h + 1); - for (o = 0; o <= h; ++o) { - let e = 0; - for (c = 0; c < i; ++c) { - const t = r.components[c].resolutions; - o < t.length && - (e = Math.max(e, t[o].precinctParameters.numprecincts)); - } - u[o] = e; - } - s = 0; - o = 0; - c = 0; - l = 0; - this.nextPacket = function JpxImage_nextPacket() { - for (; o <= h; o++) { - for (; l < u[o]; l++) { - for (; c < i; c++) { - const e = r.components[c]; - if (o > e.codingStyleParameters.decompositionLevelsCount) - continue; - const t = e.resolutions[o], - a = t.precinctParameters.numprecincts; - if (!(l >= a)) { - for (; s < n; ) { - const e = createPacket(t, l, s); - s++; - return e; - } - s = 0; - } - } - c = 0; - } - l = 0; - } - throw new JpxError("Out of packets"); - }; - } - function PositionComponentResolutionLayerIterator(e) { - const t = e.SIZ, - a = e.currentTile.index, - r = e.tiles[a], - n = r.codingStyleDefaultParameters.layersCount, - i = t.Csiz, - s = getPrecinctSizesInImageScale(r), - o = s; - let c = 0, - l = 0, - h = 0, - u = 0, - d = 0; - this.nextPacket = function JpxImage_nextPacket() { - for (; d < o.maxNumHigh; d++) { - for (; u < o.maxNumWide; u++) { - for (; h < i; h++) { - const e = r.components[h], - t = e.codingStyleParameters.decompositionLevelsCount; - for (; l <= t; l++) { - const t = e.resolutions[l], - a = s.components[h].resolutions[l], - r = getPrecinctIndexIfExist(u, d, a, o, t); - if (null !== r) { - for (; c < n; ) { - const e = createPacket(t, r, c); - c++; - return e; - } - c = 0; - } - } - l = 0; - } - h = 0; - } - u = 0; - } - throw new JpxError("Out of packets"); - }; - } - function ComponentPositionResolutionLayerIterator(e) { - const t = e.SIZ, - a = e.currentTile.index, - r = e.tiles[a], - n = r.codingStyleDefaultParameters.layersCount, - i = t.Csiz, - s = getPrecinctSizesInImageScale(r); - let o = 0, - c = 0, - l = 0, - h = 0, - u = 0; - this.nextPacket = function JpxImage_nextPacket() { - for (; l < i; ++l) { - const e = r.components[l], - t = s.components[l], - a = e.codingStyleParameters.decompositionLevelsCount; - for (; u < t.maxNumHigh; u++) { - for (; h < t.maxNumWide; h++) { - for (; c <= a; c++) { - const a = e.resolutions[c], - r = t.resolutions[c], - i = getPrecinctIndexIfExist(h, u, r, t, a); - if (null !== i) { - for (; o < n; ) { - const e = createPacket(a, i, o); - o++; - return e; - } - o = 0; - } - } - c = 0; - } - h = 0; - } - u = 0; - } - throw new JpxError("Out of packets"); - }; - } - function getPrecinctIndexIfExist(e, t, a, r, n) { - const i = e * r.minWidth, - s = t * r.minHeight; - if (i % a.width != 0 || s % a.height != 0) return null; - const o = (s / a.width) * n.precinctParameters.numprecinctswide; - return i / a.height + o; - } - function getPrecinctSizesInImageScale(e) { - const t = e.components.length; - let a = Number.MAX_VALUE, - r = Number.MAX_VALUE, - n = 0, - i = 0; - const s = new Array(t); - for (let o = 0; o < t; o++) { - const t = e.components[o], - c = t.codingStyleParameters.decompositionLevelsCount, - l = new Array(c + 1); - let h = Number.MAX_VALUE, - u = Number.MAX_VALUE, - d = 0, - f = 0, - g = 1; - for (let e = c; e >= 0; --e) { - const a = t.resolutions[e], - r = g * a.precinctParameters.precinctWidth, - n = g * a.precinctParameters.precinctHeight; - h = Math.min(h, r); - u = Math.min(u, n); - d = Math.max(d, a.precinctParameters.numprecinctswide); - f = Math.max(f, a.precinctParameters.numprecinctshigh); - l[e] = { width: r, height: n }; - g <<= 1; - } - a = Math.min(a, h); - r = Math.min(r, u); - n = Math.max(n, d); - i = Math.max(i, f); - s[o] = { - resolutions: l, - minWidth: h, - minHeight: u, - maxNumWide: d, - maxNumHigh: f, - }; - } - return { - components: s, - minWidth: a, - minHeight: r, - maxNumWide: n, - maxNumHigh: i, - }; - } - function buildPackets(e) { - const t = e.SIZ, - a = e.currentTile.index, - r = e.tiles[a], - n = t.Csiz; - for (let e = 0; e < n; e++) { - const t = r.components[e], - a = t.codingStyleParameters.decompositionLevelsCount, - n = [], - i = []; - for (let e = 0; e <= a; e++) { - const r = getBlocksDimensions(0, t, e), - s = {}, - o = 1 << (a - e); - s.trx0 = Math.ceil(t.tcx0 / o); - s.try0 = Math.ceil(t.tcy0 / o); - s.trx1 = Math.ceil(t.tcx1 / o); - s.try1 = Math.ceil(t.tcy1 / o); - s.resLevel = e; - buildPrecincts(0, s, r); - n.push(s); - let c; - if (0 === e) { - c = {}; - c.type = "LL"; - c.tbx0 = Math.ceil(t.tcx0 / o); - c.tby0 = Math.ceil(t.tcy0 / o); - c.tbx1 = Math.ceil(t.tcx1 / o); - c.tby1 = Math.ceil(t.tcy1 / o); - c.resolution = s; - buildCodeblocks(0, c, r); - i.push(c); - s.subbands = [c]; - } else { - const n = 1 << (a - e + 1), - o = []; - c = {}; - c.type = "HL"; - c.tbx0 = Math.ceil(t.tcx0 / n - 0.5); - c.tby0 = Math.ceil(t.tcy0 / n); - c.tbx1 = Math.ceil(t.tcx1 / n - 0.5); - c.tby1 = Math.ceil(t.tcy1 / n); - c.resolution = s; - buildCodeblocks(0, c, r); - i.push(c); - o.push(c); - c = {}; - c.type = "LH"; - c.tbx0 = Math.ceil(t.tcx0 / n); - c.tby0 = Math.ceil(t.tcy0 / n - 0.5); - c.tbx1 = Math.ceil(t.tcx1 / n); - c.tby1 = Math.ceil(t.tcy1 / n - 0.5); - c.resolution = s; - buildCodeblocks(0, c, r); - i.push(c); - o.push(c); - c = {}; - c.type = "HH"; - c.tbx0 = Math.ceil(t.tcx0 / n - 0.5); - c.tby0 = Math.ceil(t.tcy0 / n - 0.5); - c.tbx1 = Math.ceil(t.tcx1 / n - 0.5); - c.tby1 = Math.ceil(t.tcy1 / n - 0.5); - c.resolution = s; - buildCodeblocks(0, c, r); - i.push(c); - o.push(c); - s.subbands = o; - } - } - t.resolutions = n; - t.subbands = i; - } - const i = r.codingStyleDefaultParameters.progressionOrder; - switch (i) { - case 0: - r.packetsIterator = - new LayerResolutionComponentPositionIterator(e); - break; - case 1: - r.packetsIterator = - new ResolutionLayerComponentPositionIterator(e); - break; - case 2: - r.packetsIterator = - new ResolutionPositionComponentLayerIterator(e); - break; - case 3: - r.packetsIterator = - new PositionComponentResolutionLayerIterator(e); - break; - case 4: - r.packetsIterator = - new ComponentPositionResolutionLayerIterator(e); - break; - default: - throw new JpxError(`Unsupported progression order ${i}`); - } - } - function parseTilePackets(e, t, a, r) { - let i, - s = 0, - o = 0, - c = !1; - function readBits(e) { - for (; o < e; ) { - const e = t[a + s]; - s++; - if (c) { - i = (i << 7) | e; - o += 7; - c = !1; - } else { - i = (i << 8) | e; - o += 8; - } - 255 === e && (c = !0); - } - o -= e; - return (i >>> o) & ((1 << e) - 1); - } - function skipMarkerIfEqual(e) { - if (255 === t[a + s - 1] && t[a + s] === e) { - skipBytes(1); - return !0; - } - if (255 === t[a + s] && t[a + s + 1] === e) { - skipBytes(2); - return !0; - } - return !1; - } - function skipBytes(e) { - s += e; - } - function alignToByte() { - o = 0; - if (c) { - s++; - c = !1; - } - } - function readCodingpasses() { - if (0 === readBits(1)) return 1; - if (0 === readBits(1)) return 2; - let e = readBits(2); - if (e < 3) return e + 3; - e = readBits(5); - if (e < 31) return e + 6; - e = readBits(7); - return e + 37; - } - const l = e.currentTile.index, - h = e.tiles[l], - u = e.COD.sopMarkerUsed, - d = e.COD.ephMarkerUsed, - f = h.packetsIterator; - for (; s < r; ) { - alignToByte(); - u && skipMarkerIfEqual(145) && skipBytes(4); - const e = f.nextPacket(); - if (!readBits(1)) continue; - const r = e.layerNumber, - i = []; - let o; - for (let t = 0, a = e.codeblocks.length; t < a; t++) { - o = e.codeblocks[t]; - let a = o.precinct; - const s = o.cbx - a.cbxMin, - c = o.cby - a.cbyMin; - let l, - h, - u = !1, - d = !1; - if (void 0 !== o.included) u = !!readBits(1); - else { - a = o.precinct; - let e; - if (void 0 !== a.inclusionTree) e = a.inclusionTree; - else { - const t = a.cbxMax - a.cbxMin + 1, - n = a.cbyMax - a.cbyMin + 1; - e = new InclusionTree(t, n, r); - h = new TagTree(t, n); - a.inclusionTree = e; - a.zeroBitPlanesTree = h; - for (let e = 0; e < r; e++) - if (0 !== readBits(1)) - throw new JpxError("Invalid tag tree"); - } - if (e.reset(s, c, r)) - for (;;) { - if (!readBits(1)) { - e.incrementValue(r); - break; - } - l = !e.nextLevel(); - if (l) { - o.included = !0; - u = d = !0; - break; - } - } - } - if (!u) continue; - if (d) { - h = a.zeroBitPlanesTree; - h.reset(s, c); - for (;;) - if (readBits(1)) { - l = !h.nextLevel(); - if (l) break; - } else h.incrementValue(); - o.zeroBitPlanes = h.value; - } - const f = readCodingpasses(); - for (; readBits(1); ) o.Lblock++; - const g = (0, n.log2)(f), - p = readBits((f < 1 << g ? g - 1 : g) + o.Lblock); - i.push({ codeblock: o, codingpasses: f, dataLength: p }); - } - alignToByte(); - d && skipMarkerIfEqual(146); - for (; i.length > 0; ) { - const e = i.shift(); - o = e.codeblock; - void 0 === o.data && (o.data = []); - o.data.push({ - data: t, - start: a + s, - end: a + s + e.dataLength, - codingpasses: e.codingpasses, - }); - s += e.dataLength; - } - } - return s; - } - function copyCoefficients(e, t, a, r, n, s, o, c, l) { - const h = r.tbx0, - u = r.tby0, - d = r.tbx1 - r.tbx0, - f = r.codeblocks, - g = "H" === r.type.charAt(0) ? 1 : 0, - p = "H" === r.type.charAt(1) ? t : 0; - for (let a = 0, m = f.length; a < m; ++a) { - const m = f[a], - b = m.tbx1_ - m.tbx0_, - y = m.tby1_ - m.tby0_; - if (0 === b || 0 === y) continue; - if (void 0 === m.data) continue; - const w = new BitModel(b, y, m.subbandType, m.zeroBitPlanes, s); - let S = 2; - const x = m.data; - let C, - k, - v, - F = 0, - O = 0; - for (C = 0, k = x.length; C < k; C++) { - v = x[C]; - F += v.end - v.start; - O += v.codingpasses; - } - const T = new Uint8Array(F); - let M = 0; - for (C = 0, k = x.length; C < k; C++) { - v = x[C]; - const e = v.data.subarray(v.start, v.end); - T.set(e, M); - M += e.length; - } - const D = new i.ArithmeticDecoder(T, 0, F); - w.setDecoder(D); - for (C = 0; C < O; C++) { - switch (S) { - case 0: - w.runSignificancePropagationPass(); - break; - case 1: - w.runMagnitudeRefinementPass(); - break; - case 2: - w.runCleanupPass(); - c && w.checkSegmentationSymbol(); - } - l && w.reset(); - S = (S + 1) % 3; - } - let E = m.tbx0_ - h + (m.tby0_ - u) * d; - const N = w.coefficentsSign, - R = w.coefficentsMagnitude, - L = w.bitsDecoded, - $ = o ? 0 : 0.5; - let _, j, U; - M = 0; - const X = "LL" !== r.type; - for (C = 0; C < y; C++) { - const a = 2 * ((E / d) | 0) * (t - d) + g + p; - for (_ = 0; _ < b; _++) { - j = R[M]; - if (0 !== j) { - j = (j + $) * n; - 0 !== N[M] && (j = -j); - U = L[M]; - e[X ? a + (E << 1) : E] = - o && U >= s ? j : j * (1 << (s - U)); - } - E++; - M++; - } - E += d - b; - } - } - } - function transformTile(e, t, a) { - const r = t.components[a], - n = r.codingStyleParameters, - i = r.quantizationParameters, - o = n.decompositionLevelsCount, - c = i.SPqcds, - l = i.scalarExpounded, - h = i.guardBits, - u = n.segmentationSymbolUsed, - d = n.resetContextProbabilities, - f = e.components[a].precision, - g = n.reversibleTransformation, - p = g ? new ReversibleTransform() : new IrreversibleTransform(), - m = []; - let b = 0; - for (let e = 0; e <= o; e++) { - const t = r.resolutions[e], - a = t.trx1 - t.trx0, - n = t.try1 - t.try0, - i = new Float32Array(a * n); - for (let r = 0, n = t.subbands.length; r < n; r++) { - let n, o; - if (l) { - n = c[b].mu; - o = c[b].epsilon; - b++; - } else { - n = c[0].mu; - o = c[0].epsilon + (e > 0 ? 1 - e : 0); - } - const p = t.subbands[r], - m = s[p.type]; - copyCoefficients( - i, - a, - 0, - p, - g ? 1 : 2 ** (f + m - o) * (1 + n / 2048), - h + o - 1, - g, - u, - d, - ); - } - m.push({ width: a, height: n, items: i }); - } - const y = p.calculate(m, r.tcx0, r.tcy0); - return { - left: r.tcx0, - top: r.tcy0, - width: y.width, - height: y.height, - items: y.items, - }; - } - function initializeTile(e, t) { - const a = e.SIZ.Csiz, - r = e.tiles[t]; - for (let t = 0; t < a; t++) { - const a = r.components[t], - n = - void 0 !== e.currentTile.QCC[t] - ? e.currentTile.QCC[t] - : e.currentTile.QCD; - a.quantizationParameters = n; - const i = - void 0 !== e.currentTile.COC[t] - ? e.currentTile.COC[t] - : e.currentTile.COD; - a.codingStyleParameters = i; - } - r.codingStyleDefaultParameters = e.currentTile.COD; - } - class TagTree { - constructor(e, t) { - const a = (0, n.log2)(Math.max(e, t)) + 1; - this.levels = []; - for (let r = 0; r < a; r++) { - const a = { width: e, height: t, items: [] }; - this.levels.push(a); - e = Math.ceil(e / 2); - t = Math.ceil(t / 2); - } - } - reset(e, t) { - let a, - r = 0, - n = 0; - for (; r < this.levels.length; ) { - a = this.levels[r]; - const i = e + t * a.width; - if (void 0 !== a.items[i]) { - n = a.items[i]; - break; - } - a.index = i; - e >>= 1; - t >>= 1; - r++; - } - r--; - a = this.levels[r]; - a.items[a.index] = n; - this.currentLevel = r; - delete this.value; - } - incrementValue() { - const e = this.levels[this.currentLevel]; - e.items[e.index]++; - } - nextLevel() { - let e = this.currentLevel, - t = this.levels[e]; - const a = t.items[t.index]; - e--; - if (e < 0) { - this.value = a; - return !1; - } - this.currentLevel = e; - t = this.levels[e]; - t.items[t.index] = a; - return !0; - } - } - class InclusionTree { - constructor(e, t, a) { - const r = (0, n.log2)(Math.max(e, t)) + 1; - this.levels = []; - for (let n = 0; n < r; n++) { - const r = new Uint8Array(e * t); - for (let e = 0, t = r.length; e < t; e++) r[e] = a; - const n = { width: e, height: t, items: r }; - this.levels.push(n); - e = Math.ceil(e / 2); - t = Math.ceil(t / 2); - } - } - reset(e, t, a) { - let r = 0; - for (; r < this.levels.length; ) { - const n = this.levels[r], - i = e + t * n.width; - n.index = i; - const s = n.items[i]; - if (255 === s) break; - if (s > a) { - this.currentLevel = r; - this.propagateValues(); - return !1; - } - e >>= 1; - t >>= 1; - r++; - } - this.currentLevel = r - 1; - return !0; - } - incrementValue(e) { - const t = this.levels[this.currentLevel]; - t.items[t.index] = e + 1; - this.propagateValues(); - } - propagateValues() { - let e = this.currentLevel, - t = this.levels[e]; - const a = t.items[t.index]; - for (; --e >= 0; ) { - t = this.levels[e]; - t.items[t.index] = a; - } - } - nextLevel() { - let e = this.currentLevel, - t = this.levels[e]; - const a = t.items[t.index]; - t.items[t.index] = 255; - e--; - if (e < 0) return !1; - this.currentLevel = e; - t = this.levels[e]; - t.items[t.index] = a; - return !0; - } - } - class BitModel { - static UNIFORM_CONTEXT = 17; - static RUNLENGTH_CONTEXT = 18; - static LLAndLHContextsLabel = new Uint8Array([ - 0, 5, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 1, 6, 8, 0, 3, 7, - 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, - 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6, - 8, 0, 3, 7, 8, 0, 4, 7, 8, - ]); - static HLContextLabel = new Uint8Array([ - 0, 3, 4, 0, 5, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 1, 3, 4, 0, 6, 7, - 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8, 0, - 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3, - 4, 0, 6, 7, 7, 0, 8, 8, 8, - ]); - static HHContextLabel = new Uint8Array([ - 0, 1, 2, 0, 1, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 3, 4, 5, 0, 4, 5, - 5, 0, 5, 5, 5, 0, 0, 0, 0, 0, 6, 7, 7, 0, 7, 7, 7, 0, 7, 7, 7, 0, - 0, 0, 0, 0, 8, 8, 8, 0, 8, 8, 8, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 8, - 8, 0, 8, 8, 8, 0, 8, 8, 8, - ]); - constructor(e, t, a, r, n) { - this.width = e; - this.height = t; - let i; - i = - "HH" === a - ? BitModel.HHContextLabel - : "HL" === a - ? BitModel.HLContextLabel - : BitModel.LLAndLHContextsLabel; - this.contextLabelTable = i; - const s = e * t; - this.neighborsSignificance = new Uint8Array(s); - this.coefficentsSign = new Uint8Array(s); - let o; - o = - n > 14 - ? new Uint32Array(s) - : n > 6 - ? new Uint16Array(s) - : new Uint8Array(s); - this.coefficentsMagnitude = o; - this.processingFlags = new Uint8Array(s); - const c = new Uint8Array(s); - if (0 !== r) for (let e = 0; e < s; e++) c[e] = r; - this.bitsDecoded = c; - this.reset(); - } - setDecoder(e) { - this.decoder = e; - } - reset() { - this.contexts = new Int8Array(19); - this.contexts[0] = 8; - this.contexts[BitModel.UNIFORM_CONTEXT] = 92; - this.contexts[BitModel.RUNLENGTH_CONTEXT] = 6; - } - setNeighborsSignificance(e, t, a) { - const r = this.neighborsSignificance, - n = this.width, - i = this.height, - s = t > 0, - o = t + 1 < n; - let c; - if (e > 0) { - c = a - n; - s && (r[c - 1] += 16); - o && (r[c + 1] += 16); - r[c] += 4; - } - if (e + 1 < i) { - c = a + n; - s && (r[c - 1] += 16); - o && (r[c + 1] += 16); - r[c] += 4; - } - s && (r[a - 1] += 1); - o && (r[a + 1] += 1); - r[a] |= 128; - } - runSignificancePropagationPass() { - const e = this.decoder, - t = this.width, - a = this.height, - r = this.coefficentsMagnitude, - n = this.coefficentsSign, - i = this.neighborsSignificance, - s = this.processingFlags, - o = this.contexts, - c = this.contextLabelTable, - l = this.bitsDecoded; - for (let h = 0; h < a; h += 4) - for (let u = 0; u < t; u++) { - let d = h * t + u; - for (let f = 0; f < 4; f++, d += t) { - const t = h + f; - if (t >= a) break; - s[d] &= -2; - if (r[d] || !i[d]) continue; - const g = c[i[d]]; - if (e.readBit(o, g)) { - const e = this.decodeSignBit(t, u, d); - n[d] = e; - r[d] = 1; - this.setNeighborsSignificance(t, u, d); - s[d] |= 2; - } - l[d]++; - s[d] |= 1; - } - } - } - decodeSignBit(e, t, a) { - const r = this.width, - n = this.height, - i = this.coefficentsMagnitude, - s = this.coefficentsSign; - let o, c, l, h, u, d; - h = t > 0 && 0 !== i[a - 1]; - if (t + 1 < r && 0 !== i[a + 1]) { - l = s[a + 1]; - if (h) { - c = s[a - 1]; - o = 1 - l - c; - } else o = 1 - l - l; - } else if (h) { - c = s[a - 1]; - o = 1 - c - c; - } else o = 0; - const f = 3 * o; - h = e > 0 && 0 !== i[a - r]; - if (e + 1 < n && 0 !== i[a + r]) { - l = s[a + r]; - if (h) { - c = s[a - r]; - o = 1 - l - c + f; - } else o = 1 - l - l + f; - } else if (h) { - c = s[a - r]; - o = 1 - c - c + f; - } else o = f; - if (o >= 0) { - u = 9 + o; - d = this.decoder.readBit(this.contexts, u); - } else { - u = 9 - o; - d = 1 ^ this.decoder.readBit(this.contexts, u); - } - return d; - } - runMagnitudeRefinementPass() { - const e = this.decoder, - t = this.width, - a = this.height, - r = this.coefficentsMagnitude, - n = this.neighborsSignificance, - i = this.contexts, - s = this.bitsDecoded, - o = this.processingFlags, - c = t * a, - l = 4 * t; - for (let a, h = 0; h < c; h = a) { - a = Math.min(c, h + l); - for (let c = 0; c < t; c++) - for (let l = h + c; l < a; l += t) { - if (!r[l] || 0 != (1 & o[l])) continue; - let t = 16; - if (0 != (2 & o[l])) { - o[l] ^= 2; - t = 0 === (127 & n[l]) ? 15 : 14; - } - const a = e.readBit(i, t); - r[l] = (r[l] << 1) | a; - s[l]++; - o[l] |= 1; - } - } - } - runCleanupPass() { - const e = this.decoder, - t = this.width, - a = this.height, - r = this.neighborsSignificance, - n = this.coefficentsMagnitude, - i = this.coefficentsSign, - s = this.contexts, - o = this.contextLabelTable, - c = this.bitsDecoded, - l = this.processingFlags, - h = t, - u = 2 * t, - d = 3 * t; - let f; - for (let g = 0; g < a; g = f) { - f = Math.min(g + 4, a); - const p = g * t, - m = g + 3 < a; - for (let a = 0; a < t; a++) { - const b = p + a; - let y, - w = 0, - S = b, - x = g; - if ( - m && - 0 === l[b] && - 0 === l[b + h] && - 0 === l[b + u] && - 0 === l[b + d] && - 0 === r[b] && - 0 === r[b + h] && - 0 === r[b + u] && - 0 === r[b + d] - ) { - if (!e.readBit(s, BitModel.RUNLENGTH_CONTEXT)) { - c[b]++; - c[b + h]++; - c[b + u]++; - c[b + d]++; - continue; - } - w = - (e.readBit(s, BitModel.UNIFORM_CONTEXT) << 1) | - e.readBit(s, BitModel.UNIFORM_CONTEXT); - if (0 !== w) { - x = g + w; - S += w * t; - } - y = this.decodeSignBit(x, a, S); - i[S] = y; - n[S] = 1; - this.setNeighborsSignificance(x, a, S); - l[S] |= 2; - S = b; - for (let e = g; e <= x; e++, S += t) c[S]++; - w++; - } - for (x = g + w; x < f; x++, S += t) { - if (n[S] || 0 != (1 & l[S])) continue; - const t = o[r[S]]; - if (1 === e.readBit(s, t)) { - y = this.decodeSignBit(x, a, S); - i[S] = y; - n[S] = 1; - this.setNeighborsSignificance(x, a, S); - l[S] |= 2; - } - c[S]++; - } - } - } - } - checkSegmentationSymbol() { - const e = this.decoder, - t = this.contexts; - if ( - 10 !== - ((e.readBit(t, BitModel.UNIFORM_CONTEXT) << 3) | - (e.readBit(t, BitModel.UNIFORM_CONTEXT) << 2) | - (e.readBit(t, BitModel.UNIFORM_CONTEXT) << 1) | - e.readBit(t, BitModel.UNIFORM_CONTEXT)) - ) - throw new JpxError("Invalid segmentation symbol"); - } - } - class Transform { - constructor() { - this.constructor === Transform && - (0, r.unreachable)("Cannot initialize Transform."); - } - calculate(e, t, a) { - let r = e[0]; - for (let n = 1, i = e.length; n < i; n++) - r = this.iterate(r, e[n], t, a); - return r; - } - extend(e, t, a) { - let r = t - 1, - n = t + 1, - i = t + a - 2, - s = t + a; - e[r--] = e[n++]; - e[s++] = e[i--]; - e[r--] = e[n++]; - e[s++] = e[i--]; - e[r--] = e[n++]; - e[s++] = e[i--]; - e[r] = e[n]; - e[s] = e[i]; - } - filter(e, t, a) { - (0, r.unreachable)("Abstract method `filter` called"); - } - iterate(e, t, a, r) { - const n = e.width, - i = e.height; - let s = e.items; - const o = t.width, - c = t.height, - l = t.items; - let h, u, d, f, g, p; - for (d = 0, h = 0; h < i; h++) { - f = 2 * h * o; - for (u = 0; u < n; u++, d++, f += 2) l[f] = s[d]; - } - s = e.items = null; - const m = new Float32Array(o + 8); - if (1 === o) { - if (0 != (1 & a)) - for (p = 0, d = 0; p < c; p++, d += o) l[d] *= 0.5; - } else - for (p = 0, d = 0; p < c; p++, d += o) { - m.set(l.subarray(d, d + o), 4); - this.extend(m, 4, o); - this.filter(m, 4, o); - l.set(m.subarray(4, 4 + o), d); - } - let b = 16; - const y = []; - for (h = 0; h < b; h++) y.push(new Float32Array(c + 8)); - let w, - S = 0; - e = 4 + c; - if (1 === c) { - if (0 != (1 & r)) for (g = 0; g < o; g++) l[g] *= 0.5; - } else - for (g = 0; g < o; g++) { - if (0 === S) { - b = Math.min(o - g, b); - for (d = g, f = 4; f < e; d += o, f++) - for (w = 0; w < b; w++) y[w][f] = l[d + w]; - S = b; - } - S--; - const t = y[S]; - this.extend(t, 4, c); - this.filter(t, 4, c); - if (0 === S) { - d = g - b + 1; - for (f = 4; f < e; d += o, f++) - for (w = 0; w < b; w++) l[d + w] = y[w][f]; - } - } - return { width: o, height: c, items: l }; - } - } - class IrreversibleTransform extends Transform { - filter(e, t, a) { - const r = a >> 1; - let n, i, s, o; - const c = -1.586134342059924, - l = -0.052980118572961, - h = 0.882911075530934, - u = 0.443506852043971, - d = 1.230174104914001; - n = (t |= 0) - 3; - for (i = r + 4; i--; n += 2) e[n] *= 0.8128930661159609; - n = t - 2; - s = u * e[n - 1]; - for (i = r + 3; i--; n += 2) { - o = u * e[n + 1]; - e[n] = d * e[n] - s - o; - if (!i--) break; - n += 2; - s = u * e[n + 1]; - e[n] = d * e[n] - s - o; - } - n = t - 1; - s = h * e[n - 1]; - for (i = r + 2; i--; n += 2) { - o = h * e[n + 1]; - e[n] -= s + o; - if (!i--) break; - n += 2; - s = h * e[n + 1]; - e[n] -= s + o; - } - n = t; - s = l * e[n - 1]; - for (i = r + 1; i--; n += 2) { - o = l * e[n + 1]; - e[n] -= s + o; - if (!i--) break; - n += 2; - s = l * e[n + 1]; - e[n] -= s + o; - } - if (0 !== r) { - n = t + 1; - s = c * e[n - 1]; - for (i = r; i--; n += 2) { - o = c * e[n + 1]; - e[n] -= s + o; - if (!i--) break; - n += 2; - s = c * e[n + 1]; - e[n] -= s + o; - } - } - } - } - class ReversibleTransform extends Transform { - filter(e, t, a) { - const r = a >> 1; - let n, i; - for (n = t |= 0, i = r + 1; i--; n += 2) - e[n] -= (e[n - 1] + e[n + 1] + 2) >> 2; - for (n = t + 1, i = r; i--; n += 2) - e[n] += (e[n - 1] + e[n + 1]) >> 1; - } - } - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.LZWStream = void 0; - var r = a(18); - class LZWStream extends r.DecodeStream { - constructor(e, t, a) { - super(t); - this.str = e; - this.dict = e.dict; - this.cachedData = 0; - this.bitsCached = 0; - const r = 4096, - n = { - earlyChange: a, - codeLength: 9, - nextCode: 258, - dictionaryValues: new Uint8Array(r), - dictionaryLengths: new Uint16Array(r), - dictionaryPrevCodes: new Uint16Array(r), - currentSequence: new Uint8Array(r), - currentSequenceLength: 0, - }; - for (let e = 0; e < 256; ++e) { - n.dictionaryValues[e] = e; - n.dictionaryLengths[e] = 1; - } - this.lzwState = n; - } - readBits(e) { - let t = this.bitsCached, - a = this.cachedData; - for (; t < e; ) { - const e = this.str.getByte(); - if (-1 === e) { - this.eof = !0; - return null; - } - a = (a << 8) | e; - t += 8; - } - this.bitsCached = t -= e; - this.cachedData = a; - this.lastCode = null; - return (a >>> t) & ((1 << e) - 1); - } - readBlock() { - let e, - t, - a, - r = 1024; - const n = this.lzwState; - if (!n) return; - const i = n.earlyChange; - let s = n.nextCode; - const o = n.dictionaryValues, - c = n.dictionaryLengths, - l = n.dictionaryPrevCodes; - let h = n.codeLength, - u = n.prevCode; - const d = n.currentSequence; - let f = n.currentSequenceLength, - g = 0, - p = this.bufferLength, - m = this.ensureBuffer(this.bufferLength + r); - for (e = 0; e < 512; e++) { - const e = this.readBits(h), - n = f > 0; - if (e < 256) { - d[0] = e; - f = 1; - } else { - if (!(e >= 258)) { - if (256 === e) { - h = 9; - s = 258; - f = 0; - continue; - } - this.eof = !0; - delete this.lzwState; - break; - } - if (e < s) { - f = c[e]; - for (t = f - 1, a = e; t >= 0; t--) { - d[t] = o[a]; - a = l[a]; - } - } else d[f++] = d[0]; - } - if (n) { - l[s] = u; - c[s] = c[u] + 1; - o[s] = d[0]; - s++; - h = - (s + i) & (s + i - 1) - ? h - : 0 | - Math.min(Math.log(s + i) / 0.6931471805599453 + 1, 12); - } - u = e; - g += f; - if (r < g) { - do { - r += 512; - } while (r < g); - m = this.ensureBuffer(this.bufferLength + r); - } - for (t = 0; t < f; t++) m[p++] = d[t]; - } - n.nextCode = s; - n.codeLength = h; - n.prevCode = u; - n.currentSequenceLength = f; - this.bufferLength = p; - } - } - t.LZWStream = LZWStream; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.PredictorStream = void 0; - var r = a(18), - n = a(4), - i = a(2); - class PredictorStream extends r.DecodeStream { - constructor(e, t, a) { - super(t); - if (!(a instanceof n.Dict)) return e; - const r = (this.predictor = a.get("Predictor") || 1); - if (r <= 1) return e; - if (2 !== r && (r < 10 || r > 15)) - throw new i.FormatError(`Unsupported predictor: ${r}`); - this.readBlock = 2 === r ? this.readBlockTiff : this.readBlockPng; - this.str = e; - this.dict = e.dict; - const s = (this.colors = a.get("Colors") || 1), - o = (this.bits = a.get("BPC", "BitsPerComponent") || 8), - c = (this.columns = a.get("Columns") || 1); - this.pixBytes = (s * o + 7) >> 3; - this.rowBytes = (c * s * o + 7) >> 3; - return this; - } - readBlockTiff() { - const e = this.rowBytes, - t = this.bufferLength, - a = this.ensureBuffer(t + e), - r = this.bits, - n = this.colors, - i = this.str.getBytes(e); - this.eof = !i.length; - if (this.eof) return; - let s, - o = 0, - c = 0, - l = 0, - h = 0, - u = t; - if (1 === r && 1 === n) - for (s = 0; s < e; ++s) { - let e = i[s] ^ o; - e ^= e >> 1; - e ^= e >> 2; - e ^= e >> 4; - o = (1 & e) << 7; - a[u++] = e; - } - else if (8 === r) { - for (s = 0; s < n; ++s) a[u++] = i[s]; - for (; s < e; ++s) { - a[u] = a[u - n] + i[s]; - u++; - } - } else if (16 === r) { - const t = 2 * n; - for (s = 0; s < t; ++s) a[u++] = i[s]; - for (; s < e; s += 2) { - const e = - ((255 & i[s]) << 8) + - (255 & i[s + 1]) + - ((255 & a[u - t]) << 8) + - (255 & a[u - t + 1]); - a[u++] = (e >> 8) & 255; - a[u++] = 255 & e; - } - } else { - const e = new Uint8Array(n + 1), - u = (1 << r) - 1; - let d = 0, - f = t; - const g = this.columns; - for (s = 0; s < g; ++s) - for (let t = 0; t < n; ++t) { - if (l < r) { - o = (o << 8) | (255 & i[d++]); - l += 8; - } - e[t] = (e[t] + (o >> (l - r))) & u; - l -= r; - c = (c << r) | e[t]; - h += r; - if (h >= 8) { - a[f++] = (c >> (h - 8)) & 255; - h -= 8; - } - } - h > 0 && (a[f++] = (c << (8 - h)) + (o & ((1 << (8 - h)) - 1))); - } - this.bufferLength += e; - } - readBlockPng() { - const e = this.rowBytes, - t = this.pixBytes, - a = this.str.getByte(), - r = this.str.getBytes(e); - this.eof = !r.length; - if (this.eof) return; - const n = this.bufferLength, - s = this.ensureBuffer(n + e); - let o = s.subarray(n - e, n); - 0 === o.length && (o = new Uint8Array(e)); - let c, - l, - h, - u = n; - switch (a) { - case 0: - for (c = 0; c < e; ++c) s[u++] = r[c]; - break; - case 1: - for (c = 0; c < t; ++c) s[u++] = r[c]; - for (; c < e; ++c) { - s[u] = (s[u - t] + r[c]) & 255; - u++; - } - break; - case 2: - for (c = 0; c < e; ++c) s[u++] = (o[c] + r[c]) & 255; - break; - case 3: - for (c = 0; c < t; ++c) s[u++] = (o[c] >> 1) + r[c]; - for (; c < e; ++c) { - s[u] = (((o[c] + s[u - t]) >> 1) + r[c]) & 255; - u++; - } - break; - case 4: - for (c = 0; c < t; ++c) { - l = o[c]; - h = r[c]; - s[u++] = l + h; - } - for (; c < e; ++c) { - l = o[c]; - const e = o[c - t], - a = s[u - t], - n = a + l - e; - let i = n - a; - i < 0 && (i = -i); - let d = n - l; - d < 0 && (d = -d); - let f = n - e; - f < 0 && (f = -f); - h = r[c]; - s[u++] = i <= d && i <= f ? a + h : d <= f ? l + h : e + h; - } - break; - default: - throw new i.FormatError(`Unsupported predictor: ${a}`); - } - this.bufferLength += e; - } - } - t.PredictorStream = PredictorStream; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.RunLengthStream = void 0; - var r = a(18); - class RunLengthStream extends r.DecodeStream { - constructor(e, t) { - super(t); - this.str = e; - this.dict = e.dict; - } - readBlock() { - const e = this.str.getBytes(2); - if (!e || e.length < 2 || 128 === e[0]) { - this.eof = !0; - return; - } - let t, - a = this.bufferLength, - r = e[0]; - if (r < 128) { - t = this.ensureBuffer(a + r + 1); - t[a++] = e[1]; - if (r > 0) { - const e = this.str.getBytes(r); - t.set(e, a); - a += r; - } - } else { - r = 257 - r; - const n = e[1]; - t = this.ensureBuffer(a + r + 1); - for (let e = 0; e < r; e++) t[a++] = n; - } - this.bufferLength = a; - } - } - t.RunLengthStream = RunLengthStream; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.Font = t.ErrorFont = void 0; - var r = a(2), - n = a(35), - i = a(38), - s = a(40), - o = a(39), - c = a(37), - l = a(41), - h = a(42), - u = a(43), - d = a(44), - f = a(45), - g = a(46), - p = a(14), - m = a(47), - b = a(3), - y = a(8), - w = a(48); - const S = [ - [57344, 63743], - [1048576, 1114109], - ], - x = 1e3, - C = [ - "ascent", - "bbox", - "black", - "bold", - "charProcOperatorList", - "composite", - "cssFontInfo", - "data", - "defaultVMetrics", - "defaultWidth", - "descent", - "fallbackName", - "fontMatrix", - "isInvalidPDFjsFont", - "isType3Font", - "italic", - "loadedName", - "mimetype", - "missingFile", - "name", - "remeasure", - "subtype", - "systemFontInfo", - "type", - "vertical", - ], - k = [ - "cMap", - "defaultEncoding", - "differences", - "isMonospace", - "isSerifFont", - "isSymbolicFont", - "seacMap", - "toFontChar", - "toUnicode", - "vmetrics", - "widths", - ]; - function adjustWidths(e) { - if (!e.fontMatrix) return; - if (e.fontMatrix[0] === r.FONT_IDENTITY_MATRIX[0]) return; - const t = 0.001 / e.fontMatrix[0], - a = e.widths; - for (const e in a) a[e] *= t; - e.defaultWidth *= t; - } - function amendFallbackToUnicode(e) { - if (!e.fallbackToUnicode) return; - if (e.toUnicode instanceof h.IdentityToUnicodeMap) return; - const t = []; - for (const a in e.fallbackToUnicode) - e.toUnicode.has(a) || (t[a] = e.fallbackToUnicode[a]); - t.length > 0 && e.toUnicode.amend(t); - } - class Glyph { - constructor(e, t, a, r, n, i, s, o, c) { - this.originalCharCode = e; - this.fontChar = t; - this.unicode = a; - this.accent = r; - this.width = n; - this.vmetric = i; - this.operatorListId = s; - this.isSpace = o; - this.isInFont = c; - } - get category() { - return (0, r.shadow)( - this, - "category", - (0, s.getCharUnicodeCategory)(this.unicode), - !0, - ); - } - } - function int16(e, t) { - return (e << 8) + t; - } - function writeSignedInt16(e, t, a) { - e[t + 1] = a; - e[t] = a >>> 8; - } - function signedInt16(e, t) { - const a = (e << 8) + t; - return 32768 & a ? a - 65536 : a; - } - function string16(e) { - return String.fromCharCode((e >> 8) & 255, 255 & e); - } - function safeString16(e) { - e > 32767 ? (e = 32767) : e < -32768 && (e = -32768); - return String.fromCharCode((e >> 8) & 255, 255 & e); - } - function isTrueTypeCollectionFile(e) { - const t = e.peekBytes(4); - return "ttcf" === (0, r.bytesToString)(t); - } - function getFontFileType(e, { type: t, subtype: a, composite: n }) { - let i, s; - if ( - (function isTrueTypeFile(e) { - const t = e.peekBytes(4); - return ( - 65536 === (0, b.readUint32)(t, 0) || - "true" === (0, r.bytesToString)(t) - ); - })(e) || - isTrueTypeCollectionFile(e) - ) - i = n ? "CIDFontType2" : "TrueType"; - else if ( - (function isOpenTypeFile(e) { - const t = e.peekBytes(4); - return "OTTO" === (0, r.bytesToString)(t); - })(e) - ) - i = n ? "CIDFontType2" : "OpenType"; - else if ( - (function isType1File(e) { - const t = e.peekBytes(2); - return ( - (37 === t[0] && 33 === t[1]) || (128 === t[0] && 1 === t[1]) - ); - })(e) - ) - i = n ? "CIDFontType0" : "MMType1" === t ? "MMType1" : "Type1"; - else if ( - (function isCFFFile(e) { - const t = e.peekBytes(4); - return t[0] >= 1 && t[3] >= 1 && t[3] <= 4; - })(e) - ) - if (n) { - i = "CIDFontType0"; - s = "CIDFontType0C"; - } else { - i = "MMType1" === t ? "MMType1" : "Type1"; - s = "Type1C"; - } - else { - (0, r.warn)( - "getFontFileType: Unable to detect correct font file Type/Subtype.", - ); - i = t; - s = a; - } - return [i, s]; - } - function applyStandardFontGlyphMap(e, t) { - for (const a in t) e[+a] = t[a]; - } - function buildToFontChar(e, t, a) { - const r = []; - let n; - for (let a = 0, i = e.length; a < i; a++) { - n = (0, s.getUnicodeForGlyph)(e[a], t); - -1 !== n && (r[a] = n); - } - for (const e in a) { - n = (0, s.getUnicodeForGlyph)(a[e], t); - -1 !== n && (r[+e] = n); - } - return r; - } - function isMacNameRecord(e) { - return 1 === e.platform && 0 === e.encoding && 0 === e.language; - } - function isWinNameRecord(e) { - return 3 === e.platform && 1 === e.encoding && 1033 === e.language; - } - function convertCidString(e, t, a = !1) { - switch (t.length) { - case 1: - return t.charCodeAt(0); - case 2: - return (t.charCodeAt(0) << 8) | t.charCodeAt(1); - } - const n = `Unsupported CID string (charCode ${e}): "${t}".`; - if (a) throw new r.FormatError(n); - (0, r.warn)(n); - return t; - } - function adjustMapping(e, t, a, n) { - const i = Object.create(null), - s = new Map(), - o = [], - c = new Set(); - let l = 0; - let h = S[l][0], - u = S[l][1]; - for (let f in e) { - f |= 0; - let g = e[f]; - if (!t(g)) continue; - if (h > u) { - l++; - if (l >= S.length) { - (0, r.warn)("Ran out of space in font private use area."); - break; - } - h = S[l][0]; - u = S[l][1]; - } - const p = h++; - 0 === g && (g = a); - let m = n.get(f); - "string" == typeof m && (m = m.codePointAt(0)); - if ( - m && - !((d = m), - (S[0][0] <= d && d <= S[0][1]) || - (S[1][0] <= d && d <= S[1][1])) && - !c.has(g) - ) { - s.set(m, g); - c.add(g); - } - i[p] = g; - o[f] = p; - } - var d; - return { - toFontChar: o, - charCodeToGlyphId: i, - toUnicodeExtraMap: s, - nextAvailableFontCharCode: h, - }; - } - function createCmapTable(e, t, a) { - const n = (function getRanges(e, t, a) { - const r = []; - for (const t in e) - e[t] >= a || r.push({ fontCharCode: 0 | t, glyphId: e[t] }); - if (t) - for (const [e, n] of t) - n >= a || r.push({ fontCharCode: e, glyphId: n }); - 0 === r.length && r.push({ fontCharCode: 0, glyphId: 0 }); - r.sort(function fontGetRangesSort(e, t) { - return e.fontCharCode - t.fontCharCode; - }); - const n = [], - i = r.length; - for (let e = 0; e < i; ) { - const t = r[e].fontCharCode, - a = [r[e].glyphId]; - ++e; - let s = t; - for (; e < i && s + 1 === r[e].fontCharCode; ) { - a.push(r[e].glyphId); - ++s; - ++e; - if (65535 === s) break; - } - n.push([t, s, a]); - } - return n; - })(e, t, a), - i = n.at(-1)[1] > 65535 ? 2 : 1; - let s, - o, - c, - l, - h = "\0\0" + string16(i) + "\0\0" + (0, r.string32)(4 + 8 * i); - for (s = n.length - 1; s >= 0 && !(n[s][0] <= 65535); --s); - const u = s + 1; - n[s][0] < 65535 && 65535 === n[s][1] && (n[s][1] = 65534); - const d = n[s][1] < 65535 ? 1 : 0, - f = u + d, - g = m.OpenTypeFileBuilder.getSearchParams(f, 2); - let p, - b, - y, - w, - S = "", - x = "", - C = "", - k = "", - v = "", - F = 0; - for (s = 0, o = u; s < o; s++) { - p = n[s]; - b = p[0]; - y = p[1]; - S += string16(b); - x += string16(y); - w = p[2]; - let e = !0; - for (c = 1, l = w.length; c < l; ++c) - if (w[c] !== w[c - 1] + 1) { - e = !1; - break; - } - if (e) { - C += string16((w[0] - b) & 65535); - k += string16(0); - } else { - const e = 2 * (f - s) + 2 * F; - F += y - b + 1; - C += string16(0); - k += string16(e); - for (c = 0, l = w.length; c < l; ++c) v += string16(w[c]); - } - } - if (d > 0) { - x += "ÿÿ"; - S += "ÿÿ"; - C += "\0"; - k += "\0\0"; - } - const O = - "\0\0" + - string16(2 * f) + - string16(g.range) + - string16(g.entry) + - string16(g.rangeShift) + - x + - "\0\0" + - S + - C + - k + - v; - let T = "", - M = ""; - if (i > 1) { - h += "\0\0\n" + (0, r.string32)(4 + 8 * i + 4 + O.length); - T = ""; - for (s = 0, o = n.length; s < o; s++) { - p = n[s]; - b = p[0]; - w = p[2]; - let e = w[0]; - for (c = 1, l = w.length; c < l; ++c) - if (w[c] !== w[c - 1] + 1) { - y = p[0] + c - 1; - T += - (0, r.string32)(b) + - (0, r.string32)(y) + - (0, r.string32)(e); - b = y + 1; - e = w[c]; - } - T += - (0, r.string32)(b) + - (0, r.string32)(p[1]) + - (0, r.string32)(e); - } - M = - "\0\f\0\0" + - (0, r.string32)(T.length + 16) + - "\0\0\0\0" + - (0, r.string32)(T.length / 12); - } - return h + "\0" + string16(O.length + 4) + O + M + T; - } - function createOS2Table(e, t, a) { - a ||= { unitsPerEm: 0, yMax: 0, yMin: 0, ascent: 0, descent: 0 }; - let n = 0, - i = 0, - o = 0, - c = 0, - l = null, - h = 0, - u = -1; - if (t) { - for (let e in t) { - e |= 0; - (l > e || !l) && (l = e); - h < e && (h = e); - u = (0, s.getUnicodeRangeFor)(e, u); - if (u < 32) n |= 1 << u; - else if (u < 64) i |= 1 << (u - 32); - else if (u < 96) o |= 1 << (u - 64); - else { - if (!(u < 123)) - throw new r.FormatError( - "Unicode ranges Bits > 123 are reserved for internal usage", - ); - c |= 1 << (u - 96); - } - } - h > 65535 && (h = 65535); - } else { - l = 0; - h = 255; - } - const d = e.bbox || [0, 0, 0, 0], - f = - a.unitsPerEm || 1 / (e.fontMatrix || r.FONT_IDENTITY_MATRIX)[0], - g = e.ascentScaled ? 1 : f / x, - p = a.ascent || Math.round(g * (e.ascent || d[3])); - let m = a.descent || Math.round(g * (e.descent || d[1])); - m > 0 && e.descent > 0 && d[1] < 0 && (m = -m); - const b = a.yMax || p, - y = -a.yMin || -m; - return ( - "\0$ô\0\0\0Š»\0\0\0ŒŠ»\0\0ß\x001\0\0\0\0" + - String.fromCharCode(e.fixedPitch ? 9 : 0) + - "\0\0\0\0\0\0" + - (0, r.string32)(n) + - (0, r.string32)(i) + - (0, r.string32)(o) + - (0, r.string32)(c) + - "*21*" + - string16(e.italicAngle ? 1 : 0) + - string16(l || e.firstChar) + - string16(h || e.lastChar) + - string16(p) + - string16(m) + - "\0d" + - string16(b) + - string16(y) + - "\0\0\0\0\0\0\0\0" + - string16(e.xHeight) + - string16(e.capHeight) + - string16(0) + - string16(l || e.firstChar) + - "\0" - ); - } - function createPostTable(e) { - const t = Math.floor(65536 * e.italicAngle); - return ( - "\0\0\0" + - (0, r.string32)(t) + - "\0\0\0\0" + - (0, r.string32)(e.fixedPitch ? 1 : 0) + - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - ); - } - function createPostscriptName(e) { - return e.replaceAll(/[^\x21-\x7E]|[[\](){}<>/%]/g, "").slice(0, 63); - } - function createNameTable(e, t) { - t || (t = [[], []]); - const a = [ - t[0][0] || "Original licence", - t[0][1] || e, - t[0][2] || "Unknown", - t[0][3] || "uniqueID", - t[0][4] || e, - t[0][5] || "Version 0.11", - t[0][6] || createPostscriptName(e), - t[0][7] || "Unknown", - t[0][8] || "Unknown", - t[0][9] || "Unknown", - ], - r = []; - let n, i, s, o, c; - for (n = 0, i = a.length; n < i; n++) { - c = t[1][n] || a[n]; - const e = []; - for (s = 0, o = c.length; s < o; s++) - e.push(string16(c.charCodeAt(s))); - r.push(e.join("")); - } - const l = [a, r], - h = ["\0", "\0"], - u = ["\0\0", "\0"], - d = ["\0\0", "\t"], - f = a.length * h.length; - let g = "\0\0" + string16(f) + string16(12 * f + 6), - p = 0; - for (n = 0, i = h.length; n < i; n++) { - const e = l[n]; - for (s = 0, o = e.length; s < o; s++) { - c = e[s]; - g += - h[n] + - u[n] + - d[n] + - string16(s) + - string16(c.length) + - string16(p); - p += c.length; - } - } - g += a.join("") + r.join(""); - return g; - } - t.Font = class Font { - constructor(e, t, a) { - this.name = e; - this.psName = null; - this.mimetype = null; - this.disableFontFace = !1; - this.loadedName = a.loadedName; - this.isType3Font = a.isType3Font; - this.missingFile = !1; - this.cssFontInfo = a.cssFontInfo; - this._charsCache = Object.create(null); - this._glyphCache = Object.create(null); - let n = !!(a.flags & i.FontFlags.Serif); - if (!n && !a.isSimulatedFlags) { - const t = e.replaceAll(/[,_]/g, "-").split("-")[0], - a = (0, l.getSerifFonts)(); - for (const e of t.split("+")) - if (a[e]) { - n = !0; - break; - } - } - this.isSerifFont = n; - this.isSymbolicFont = !!(a.flags & i.FontFlags.Symbolic); - this.isMonospace = !!(a.flags & i.FontFlags.FixedPitch); - let { type: s, subtype: o } = a; - this.type = s; - this.subtype = o; - this.systemFontInfo = a.systemFontInfo; - const c = e.match(/^InvalidPDFjsFont_(.*)_\d+$/); - this.isInvalidPDFjsFont = !!c; - this.isInvalidPDFjsFont - ? (this.fallbackName = c[1]) - : this.isMonospace - ? (this.fallbackName = "monospace") - : this.isSerifFont - ? (this.fallbackName = "serif") - : (this.fallbackName = "sans-serif"); - if (this.systemFontInfo?.guessFallback) { - this.systemFontInfo.guessFallback = !1; - this.systemFontInfo.css += `,${this.fallbackName}`; - } - this.differences = a.differences; - this.widths = a.widths; - this.defaultWidth = a.defaultWidth; - this.composite = a.composite; - this.cMap = a.cMap; - this.capHeight = a.capHeight / x; - this.ascent = a.ascent / x; - this.descent = a.descent / x; - this.lineHeight = this.ascent - this.descent; - this.fontMatrix = a.fontMatrix; - this.bbox = a.bbox; - this.defaultEncoding = a.defaultEncoding; - this.toUnicode = a.toUnicode; - this.toFontChar = []; - if ("Type3" === a.type) { - for (let e = 0; e < 256; e++) - this.toFontChar[e] = - this.differences[e] || a.defaultEncoding[e]; - return; - } - this.cidEncoding = a.cidEncoding || ""; - this.vertical = !!a.vertical; - if (this.vertical) { - this.vmetrics = a.vmetrics; - this.defaultVMetrics = a.defaultVMetrics; - } - if (!t || t.isEmpty) { - t && - (0, r.warn)( - 'Font file is empty in "' + - e + - '" (' + - this.loadedName + - ")", - ); - this.fallbackToSystemFont(a); - return; - } - [s, o] = getFontFileType(t, a); - (s === this.type && o === this.subtype) || - (0, r.info)( - `Inconsistent font file Type/SubType, expected: ${this.type}/${this.subtype} but found: ${s}/${o}.`, - ); - let h; - try { - switch (s) { - case "MMType1": - (0, r.info)( - "MMType1 font (" + e + "), falling back to Type1.", - ); - case "Type1": - case "CIDFontType0": - this.mimetype = "font/opentype"; - const n = - "Type1C" === o || "CIDFontType0C" === o - ? new u.CFFFont(t, a) - : new w.Type1Font(e, t, a); - adjustWidths(a); - h = this.convert(e, n, a); - break; - case "OpenType": - case "TrueType": - case "CIDFontType2": - this.mimetype = "font/opentype"; - h = this.checkAndRepair(e, t, a); - if (this.isOpenType) { - adjustWidths(a); - s = "OpenType"; - } - break; - default: - throw new r.FormatError(`Font ${s} is not supported`); - } - } catch (e) { - (0, r.warn)(e); - this.fallbackToSystemFont(a); - return; - } - amendFallbackToUnicode(a); - this.data = h; - this.type = s; - this.subtype = o; - this.fontMatrix = a.fontMatrix; - this.widths = a.widths; - this.defaultWidth = a.defaultWidth; - this.toUnicode = a.toUnicode; - this.seacMap = a.seacMap; - } - get renderer() { - const e = d.FontRendererFactory.create( - this, - i.SEAC_ANALYSIS_ENABLED, - ); - return (0, r.shadow)(this, "renderer", e); - } - exportData(e = !1) { - const t = e ? [...C, ...k] : C, - a = Object.create(null); - let r, n; - for (r of t) { - n = this[r]; - void 0 !== n && (a[r] = n); - } - return a; - } - fallbackToSystemFont(e) { - this.missingFile = !0; - const { name: t, type: a } = this; - let r = (0, i.normalizeFontName)(t); - const n = (0, l.getStdFontMap)(), - u = (0, l.getNonStdFontMap)(), - d = !!n[r], - g = !(!u[r] || !n[u[r]]); - r = n[r] || u[r] || r; - const p = (0, f.getFontBasicMetrics)()[r]; - if (p) { - isNaN(this.ascent) && (this.ascent = p.ascent / x); - isNaN(this.descent) && (this.descent = p.descent / x); - isNaN(this.capHeight) && (this.capHeight = p.capHeight / x); - } - this.bold = /bold/gi.test(r); - this.italic = /oblique|italic/gi.test(r); - this.black = /Black/g.test(t); - const m = /Narrow/g.test(t); - this.remeasure = (!d || m) && Object.keys(this.widths).length > 0; - if ( - (d || g) && - "CIDFontType2" === a && - this.cidEncoding.startsWith("Identity-") - ) { - const a = e.cidToGidMap, - r = []; - applyStandardFontGlyphMap( - r, - (0, l.getGlyphMapForStandardFonts)(), - ); - /Arial-?Black/i.test(t) - ? applyStandardFontGlyphMap( - r, - (0, l.getSupplementalGlyphMapForArialBlack)(), - ) - : /Calibri/i.test(t) && - applyStandardFontGlyphMap( - r, - (0, l.getSupplementalGlyphMapForCalibri)(), - ); - if (a) { - for (const e in r) { - const t = r[e]; - void 0 !== a[t] && (r[+e] = a[t]); - } - a.length !== this.toUnicode.length && - e.hasIncludedToUnicodeMap && - this.toUnicode instanceof h.IdentityToUnicodeMap && - this.toUnicode.forEach(function (e, t) { - const n = r[e]; - void 0 === a[n] && (r[+e] = t); - }); - } - this.toUnicode instanceof h.IdentityToUnicodeMap || - this.toUnicode.forEach(function (e, t) { - r[+e] = t; - }); - this.toFontChar = r; - this.toUnicode = new h.ToUnicodeMap(r); - } else if (/Symbol/i.test(r)) - this.toFontChar = buildToFontChar( - c.SymbolSetEncoding, - (0, o.getGlyphsUnicode)(), - this.differences, - ); - else if (/Dingbats/i.test(r)) - this.toFontChar = buildToFontChar( - c.ZapfDingbatsEncoding, - (0, o.getDingbatsGlyphsUnicode)(), - this.differences, - ); - else if (d) { - const e = buildToFontChar( - this.defaultEncoding, - (0, o.getGlyphsUnicode)(), - this.differences, - ); - "CIDFontType2" !== a || - this.cidEncoding.startsWith("Identity-") || - this.toUnicode instanceof h.IdentityToUnicodeMap || - this.toUnicode.forEach(function (t, a) { - e[+t] = a; - }); - this.toFontChar = e; - } else { - const e = (0, o.getGlyphsUnicode)(), - a = []; - this.toUnicode.forEach((t, r) => { - if (!this.composite) { - const a = this.differences[t] || this.defaultEncoding[t], - n = (0, s.getUnicodeForGlyph)(a, e); - -1 !== n && (r = n); - } - a[+t] = r; - }); - this.composite && - this.toUnicode instanceof h.IdentityToUnicodeMap && - /Tahoma|Verdana/i.test(t) && - applyStandardFontGlyphMap( - a, - (0, l.getGlyphMapForStandardFonts)(), - ); - this.toFontChar = a; - } - amendFallbackToUnicode(e); - this.loadedName = r.split("-")[0]; - } - checkAndRepair(e, t, a) { - const s = [ - "OS/2", - "cmap", - "head", - "hhea", - "hmtx", - "maxp", - "name", - "post", - "loca", - "glyf", - "fpgm", - "prep", - "cvt ", - "CFF ", - ]; - function readTables(e, t) { - const a = Object.create(null); - a["OS/2"] = null; - a.cmap = null; - a.head = null; - a.hhea = null; - a.hmtx = null; - a.maxp = null; - a.name = null; - a.post = null; - for (let r = 0; r < t; r++) { - const t = readTableEntry(e); - s.includes(t.tag) && 0 !== t.length && (a[t.tag] = t); - } - return a; - } - function readTableEntry(e) { - const t = e.getString(4), - a = e.getInt32() >>> 0, - r = e.getInt32() >>> 0, - n = e.getInt32() >>> 0, - i = e.pos; - e.pos = e.start || 0; - e.skip(r); - const s = e.getBytes(n); - e.pos = i; - if ("head" === t) { - s[8] = s[9] = s[10] = s[11] = 0; - s[17] |= 32; - } - return { tag: t, checksum: a, length: n, offset: r, data: s }; - } - function readOpenTypeHeader(e) { - return { - version: e.getString(4), - numTables: e.getUint16(), - searchRange: e.getUint16(), - entrySelector: e.getUint16(), - rangeShift: e.getUint16(), - }; - } - function sanitizeGlyph(e, t, a, r, n, i) { - const s = { length: 0, sizeOfInstructions: 0 }; - if (t < 0 || t >= e.length || a > e.length || a - t <= 12) - return s; - const o = e.subarray(t, a), - c = signedInt16(o[2], o[3]), - l = signedInt16(o[4], o[5]), - h = signedInt16(o[6], o[7]), - u = signedInt16(o[8], o[9]); - if (c > h) { - writeSignedInt16(o, 2, h); - writeSignedInt16(o, 6, c); - } - if (l > u) { - writeSignedInt16(o, 4, u); - writeSignedInt16(o, 8, l); - } - const d = signedInt16(o[0], o[1]); - if (d < 0) { - if (d < -1) return s; - r.set(o, n); - s.length = o.length; - return s; - } - let f, - g = 10, - p = 0; - for (f = 0; f < d; f++) { - p = ((o[g] << 8) | o[g + 1]) + 1; - g += 2; - } - const m = g, - b = (o[g] << 8) | o[g + 1]; - s.sizeOfInstructions = b; - g += 2 + b; - const y = g; - let w = 0; - for (f = 0; f < p; f++) { - const e = o[g++]; - 192 & e && (o[g - 1] = 63 & e); - let t = 2; - 2 & e ? (t = 1) : 16 & e && (t = 0); - let a = 2; - 4 & e ? (a = 1) : 32 & e && (a = 0); - const r = t + a; - w += r; - if (8 & e) { - const e = o[g++]; - 0 === e && (o[g - 1] ^= 8); - f += e; - w += e * r; - } - } - if (0 === w) return s; - let S = g + w; - if (S > o.length) return s; - if (!i && b > 0) { - r.set(o.subarray(0, m), n); - r.set([0, 0], n + m); - r.set(o.subarray(y, S), n + m + 2); - S -= b; - o.length - S > 3 && (S = (S + 3) & -4); - s.length = S; - return s; - } - if (o.length - S > 3) { - S = (S + 3) & -4; - r.set(o.subarray(0, S), n); - s.length = S; - return s; - } - r.set(o, n); - s.length = o.length; - return s; - } - function readNameTable(e) { - const a = (t.start || 0) + e.offset; - t.pos = a; - const r = [[], []], - n = [], - i = e.length, - s = a + i; - if (0 !== t.getUint16() || i < 6) return [r, n]; - const o = t.getUint16(), - c = t.getUint16(); - let l, h; - for (l = 0; l < o && t.pos + 12 <= s; l++) { - const e = { - platform: t.getUint16(), - encoding: t.getUint16(), - language: t.getUint16(), - name: t.getUint16(), - length: t.getUint16(), - offset: t.getUint16(), - }; - (isMacNameRecord(e) || isWinNameRecord(e)) && n.push(e); - } - for (l = 0, h = n.length; l < h; l++) { - const e = n[l]; - if (e.length <= 0) continue; - const i = a + c + e.offset; - if (i + e.length > s) continue; - t.pos = i; - const o = e.name; - if (e.encoding) { - let a = ""; - for (let r = 0, n = e.length; r < n; r += 2) - a += String.fromCharCode(t.getUint16()); - r[1][o] = a; - } else r[0][o] = t.getString(e.length); - } - return [r, n]; - } - const l = [ - 0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -2, -2, 0, 0, -2, -5, -1, -1, - -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, -1, -1, 1, -1, - -999, 0, 1, 0, -1, -2, 0, -1, -2, -1, -1, 0, -1, -1, 0, 0, -999, - -999, -1, -1, -1, -1, -2, -999, -2, -2, -999, 0, -2, -2, 0, 0, - -2, 0, -2, 0, 0, 0, -2, -1, -1, 1, 1, 0, 0, -1, -1, -1, -1, -1, - -1, -1, 0, 0, -1, 0, -1, -1, 0, -999, -1, -1, -1, -1, -1, -1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -999, -999, -999, -999, - -999, -1, -1, -2, -2, 0, 0, 0, 0, -1, -1, -999, -2, -2, 0, 0, - -1, -2, -2, 0, 0, 0, -1, -1, -1, -2, - ]; - function sanitizeTTProgram(e, t) { - let a, - n, - i, - s, - o, - c = e.data, - h = 0, - u = 0, - d = 0; - const f = [], - g = [], - p = []; - let m = t.tooComplexToFollowFunctions, - b = !1, - y = 0, - w = 0; - for (let e = c.length; h < e; ) { - const e = c[h++]; - if (64 === e) { - n = c[h++]; - if (b || w) h += n; - else for (a = 0; a < n; a++) f.push(c[h++]); - } else if (65 === e) { - n = c[h++]; - if (b || w) h += 2 * n; - else - for (a = 0; a < n; a++) { - i = c[h++]; - f.push((i << 8) | c[h++]); - } - } else if (176 == (248 & e)) { - n = e - 176 + 1; - if (b || w) h += n; - else for (a = 0; a < n; a++) f.push(c[h++]); - } else if (184 == (248 & e)) { - n = e - 184 + 1; - if (b || w) h += 2 * n; - else - for (a = 0; a < n; a++) { - i = c[h++]; - f.push((i << 8) | c[h++]); - } - } else if (43 !== e || m) - if (44 !== e || m) { - if (45 === e) - if (b) { - b = !1; - u = h; - } else { - o = g.pop(); - if (!o) { - (0, r.warn)("TT: ENDF bad stack"); - t.hintsValid = !1; - return; - } - s = p.pop(); - c = o.data; - h = o.i; - t.functionsStackDeltas[s] = f.length - o.stackTop; - } - else if (137 === e) { - if (b || w) { - (0, r.warn)("TT: nested IDEFs not allowed"); - m = !0; - } - b = !0; - d = h; - } else if (88 === e) ++y; - else if (27 === e) w = y; - else if (89 === e) { - w === y && (w = 0); - --y; - } else if (28 === e && !b && !w) { - const e = f.at(-1); - e > 0 && (h += e - 1); - } - } else { - if (b || w) { - (0, r.warn)("TT: nested FDEFs not allowed"); - m = !0; - } - b = !0; - d = h; - s = f.pop(); - t.functionsDefined[s] = { data: c, i: h }; - } - else if (!b && !w) { - s = f.at(-1); - if (isNaN(s)) - (0, r.info)("TT: CALL empty stack (or invalid entry)."); - else { - t.functionsUsed[s] = !0; - if (s in t.functionsStackDeltas) { - const e = f.length + t.functionsStackDeltas[s]; - if (e < 0) { - (0, r.warn)( - "TT: CALL invalid functions stack delta.", - ); - t.hintsValid = !1; - return; - } - f.length = e; - } else if (s in t.functionsDefined && !p.includes(s)) { - g.push({ data: c, i: h, stackTop: f.length - 1 }); - p.push(s); - o = t.functionsDefined[s]; - if (!o) { - (0, r.warn)("TT: CALL non-existent function"); - t.hintsValid = !1; - return; - } - c = o.data; - h = o.i; - } - } - } - if (!b && !w) { - let t = 0; - e <= 142 - ? (t = l[e]) - : e >= 192 && e <= 223 - ? (t = -1) - : e >= 224 && (t = -2); - if (e >= 113 && e <= 117) { - n = f.pop(); - isNaN(n) || (t = 2 * -n); - } - for (; t < 0 && f.length > 0; ) { - f.pop(); - t++; - } - for (; t > 0; ) { - f.push(NaN); - t--; - } - } - } - t.tooComplexToFollowFunctions = m; - const S = [c]; - h > c.length && S.push(new Uint8Array(h - c.length)); - if (d > u) { - (0, r.warn)("TT: complementing a missing function tail"); - S.push(new Uint8Array([34, 45])); - } - !(function foldTTTable(e, t) { - if (t.length > 1) { - let a, - r, - n = 0; - for (a = 0, r = t.length; a < r; a++) n += t[a].length; - n = (n + 3) & -4; - const i = new Uint8Array(n); - let s = 0; - for (a = 0, r = t.length; a < r; a++) { - i.set(t[a], s); - s += t[a].length; - } - e.data = i; - e.length = n; - } - })(e, S); - } - let d, f, b, w; - if ( - isTrueTypeCollectionFile( - (t = new y.Stream(new Uint8Array(t.getBytes()))), - ) - ) { - const e = (function readTrueTypeCollectionData(e, t) { - const { numFonts: a, offsetTable: n } = - (function readTrueTypeCollectionHeader(e) { - const t = e.getString(4); - (0, r.assert)( - "ttcf" === t, - "Must be a TrueType Collection font.", - ); - const a = e.getUint16(), - n = e.getUint16(), - i = e.getInt32() >>> 0, - s = []; - for (let t = 0; t < i; t++) s.push(e.getInt32() >>> 0); - const o = { - ttcTag: t, - majorVersion: a, - minorVersion: n, - numFonts: i, - offsetTable: s, - }; - switch (a) { - case 1: - return o; - case 2: - o.dsigTag = e.getInt32() >>> 0; - o.dsigLength = e.getInt32() >>> 0; - o.dsigOffset = e.getInt32() >>> 0; - return o; - } - throw new r.FormatError( - `Invalid TrueType Collection majorVersion: ${a}.`, - ); - })(e), - i = t.split("+"); - let s; - for (let o = 0; o < a; o++) { - e.pos = (e.start || 0) + n[o]; - const a = readOpenTypeHeader(e), - c = readTables(e, a.numTables); - if (!c.name) - throw new r.FormatError( - 'TrueType Collection font must contain a "name" table.', - ); - const [l] = readNameTable(c.name); - for (let e = 0, r = l.length; e < r; e++) - for (let r = 0, n = l[e].length; r < n; r++) { - const n = l[e][r]?.replaceAll(/\s/g, ""); - if (n) { - if (n === t) return { header: a, tables: c }; - if (!(i.length < 2)) - for (const e of i) - n === e && - (s = { name: e, header: a, tables: c }); - } - } - } - if (s) { - (0, r.warn)( - `TrueType Collection does not contain "${t}" font, falling back to "${s.name}" font instead.`, - ); - return { header: s.header, tables: s.tables }; - } - throw new r.FormatError( - `TrueType Collection does not contain "${t}" font.`, - ); - })(t, this.name); - d = e.header; - f = e.tables; - } else { - d = readOpenTypeHeader(t); - f = readTables(t, d.numTables); - } - const S = !f["CFF "]; - if (S) { - if (!f.loca) - throw new r.FormatError('Required "loca" table is not found'); - if (!f.glyf) { - (0, r.warn)( - 'Required "glyf" table is not found -- trying to recover.', - ); - f.glyf = { tag: "glyf", data: new Uint8Array(0) }; - } - this.isOpenType = !1; - } else { - const t = - a.composite && - (a.cidToGidMap?.length > 0 || - !(a.cMap instanceof p.IdentityCMap)); - if ( - ("OTTO" === d.version && !t) || - !f.head || - !f.hhea || - !f.maxp || - !f.post - ) { - w = new y.Stream(f["CFF "].data); - b = new u.CFFFont(w, a); - adjustWidths(a); - return this.convert(e, b, a); - } - delete f.glyf; - delete f.loca; - delete f.fpgm; - delete f.prep; - delete f["cvt "]; - this.isOpenType = !0; - } - if (!f.maxp) - throw new r.FormatError('Required "maxp" table is not found'); - t.pos = (t.start || 0) + f.maxp.offset; - const x = t.getInt32(), - C = t.getUint16(); - if (a.scaleFactors?.length === C && S) { - const { scaleFactors: e } = a, - t = int16(f.head.data[50], f.head.data[51]), - r = new g.GlyfTable({ - glyfTable: f.glyf.data, - isGlyphLocationsLong: t, - locaTable: f.loca.data, - numGlyphs: C, - }); - r.scale(e); - const { glyf: n, loca: i, isLocationLong: s } = r.write(); - f.glyf.data = n; - f.loca.data = i; - if (s !== !!t) { - f.head.data[50] = 0; - f.head.data[51] = s ? 1 : 0; - } - const o = f.hmtx.data; - for (let t = 0; t < C; t++) { - const a = 4 * t, - r = Math.round(e[t] * int16(o[a], o[a + 1])); - o[a] = (r >> 8) & 255; - o[a + 1] = 255 & r; - writeSignedInt16( - o, - a + 2, - Math.round(e[t] * signedInt16(o[a + 2], o[a + 3])), - ); - } - } - let k = C + 1, - v = !0; - if (k > 65535) { - v = !1; - k = C; - (0, r.warn)( - "Not enough space in glyfs to duplicate first glyph.", - ); - } - let F = 0, - O = 0; - if (x >= 65536 && f.maxp.length >= 22) { - t.pos += 8; - if (t.getUint16() > 2) { - f.maxp.data[14] = 0; - f.maxp.data[15] = 2; - } - t.pos += 4; - F = t.getUint16(); - t.pos += 4; - O = t.getUint16(); - } - f.maxp.data[4] = k >> 8; - f.maxp.data[5] = 255 & k; - const T = (function sanitizeTTPrograms(e, t, a, n) { - const i = { - functionsDefined: [], - functionsUsed: [], - functionsStackDeltas: [], - tooComplexToFollowFunctions: !1, - hintsValid: !0, - }; - e && sanitizeTTProgram(e, i); - t && sanitizeTTProgram(t, i); - e && - (function checkInvalidFunctions(e, t) { - if (!e.tooComplexToFollowFunctions) - if (e.functionsDefined.length > t) { - (0, r.warn)("TT: more functions defined than expected"); - e.hintsValid = !1; - } else - for ( - let a = 0, n = e.functionsUsed.length; - a < n; - a++ - ) { - if (a > t) { - (0, r.warn)("TT: invalid function id: " + a); - e.hintsValid = !1; - return; - } - if (e.functionsUsed[a] && !e.functionsDefined[a]) { - (0, r.warn)("TT: undefined function: " + a); - e.hintsValid = !1; - return; - } - } - })(i, n); - if (a && 1 & a.length) { - const e = new Uint8Array(a.length + 1); - e.set(a.data); - a.data = e; - } - return i.hintsValid; - })(f.fpgm, f.prep, f["cvt "], F); - if (!T) { - delete f.fpgm; - delete f.prep; - delete f["cvt "]; - } - !(function sanitizeMetrics(e, t, a, n, i, s) { - if (!t) { - a && (a.data = null); - return; - } - e.pos = (e.start || 0) + t.offset; - e.pos += 4; - e.pos += 2; - e.pos += 2; - e.pos += 2; - e.pos += 2; - e.pos += 2; - e.pos += 2; - e.pos += 2; - e.pos += 2; - e.pos += 2; - const o = e.getUint16(); - e.pos += 8; - e.pos += 2; - let c = e.getUint16(); - if (0 !== o) { - if (!(2 & int16(n.data[44], n.data[45]))) { - t.data[22] = 0; - t.data[23] = 0; - } - } - if (c > i) { - (0, r.info)( - `The numOfMetrics (${c}) should not be greater than the numGlyphs (${i}).`, - ); - c = i; - t.data[34] = (65280 & c) >> 8; - t.data[35] = 255 & c; - } - const l = i - c - ((a.length - 4 * c) >> 1); - if (l > 0) { - const e = new Uint8Array(a.length + 2 * l); - e.set(a.data); - if (s) { - e[a.length] = a.data[2]; - e[a.length + 1] = a.data[3]; - } - a.data = e; - } - })(t, f.hhea, f.hmtx, f.head, k, v); - if (!f.head) - throw new r.FormatError('Required "head" table is not found'); - !(function sanitizeHead(e, t, a) { - const n = e.data, - i = (function int32(e, t, a, r) { - return (e << 24) + (t << 16) + (a << 8) + r; - })(n[0], n[1], n[2], n[3]); - if (i >> 16 != 1) { - (0, r.info)( - "Attempting to fix invalid version in head table: " + i, - ); - n[0] = 0; - n[1] = 1; - n[2] = 0; - n[3] = 0; - } - const s = int16(n[50], n[51]); - if (s < 0 || s > 1) { - (0, r.info)( - "Attempting to fix invalid indexToLocFormat in head table: " + - s, - ); - const e = t + 1; - if (a === e << 1) { - n[50] = 0; - n[51] = 0; - } else { - if (a !== e << 2) - throw new r.FormatError( - "Could not fix indexToLocFormat: " + s, - ); - n[50] = 0; - n[51] = 1; - } - } - })(f.head, C, S ? f.loca.length : 0); - let M = Object.create(null); - if (S) { - const e = int16(f.head.data[50], f.head.data[51]), - t = (function sanitizeGlyphLocations(e, t, a, r, n, i, s) { - let o, c, l; - if (r) { - o = 4; - c = function fontItemDecodeLong(e, t) { - return ( - (e[t] << 24) | - (e[t + 1] << 16) | - (e[t + 2] << 8) | - e[t + 3] - ); - }; - l = function fontItemEncodeLong(e, t, a) { - e[t] = (a >>> 24) & 255; - e[t + 1] = (a >> 16) & 255; - e[t + 2] = (a >> 8) & 255; - e[t + 3] = 255 & a; - }; - } else { - o = 2; - c = function fontItemDecode(e, t) { - return (e[t] << 9) | (e[t + 1] << 1); - }; - l = function fontItemEncode(e, t, a) { - e[t] = (a >> 9) & 255; - e[t + 1] = (a >> 1) & 255; - }; - } - const h = i ? a + 1 : a, - u = o * (1 + h), - d = new Uint8Array(u); - d.set(e.data.subarray(0, u)); - e.data = d; - const f = t.data, - g = f.length, - p = new Uint8Array(g); - let m, b; - const y = []; - for (m = 0, b = 0; m < a + 1; m++, b += o) { - let e = c(d, b); - e > g && (e = g); - y.push({ index: m, offset: e, endOffset: 0 }); - } - y.sort((e, t) => e.offset - t.offset); - for (m = 0; m < a; m++) y[m].endOffset = y[m + 1].offset; - y.sort((e, t) => e.index - t.index); - for (m = 0; m < a; m++) { - const { offset: e, endOffset: t } = y[m]; - if (0 !== e || 0 !== t) break; - const a = y[m + 1].offset; - if (0 !== a) { - y[m].endOffset = a; - break; - } - } - const w = Object.create(null); - let S = 0; - l(d, 0, S); - for (m = 0, b = o; m < a; m++, b += o) { - const e = sanitizeGlyph( - f, - y[m].offset, - y[m].endOffset, - p, - S, - n, - ), - t = e.length; - 0 === t && (w[m] = !0); - e.sizeOfInstructions > s && (s = e.sizeOfInstructions); - S += t; - l(d, b, S); - } - if (0 === S) { - const e = new Uint8Array([ - 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, - ]); - for (m = 0, b = o; m < h; m++, b += o) l(d, b, e.length); - t.data = e; - } else if (i) { - const a = c(d, o); - if (p.length > a + S) t.data = p.subarray(0, a + S); - else { - t.data = new Uint8Array(a + S); - t.data.set(p.subarray(0, S)); - } - t.data.set(p.subarray(0, a), S); - l(e.data, d.length - o, S + a); - } else t.data = p.subarray(0, S); - return { missingGlyphs: w, maxSizeOfInstructions: s }; - })(f.loca, f.glyf, C, e, T, v, O); - M = t.missingGlyphs; - if (x >= 65536 && f.maxp.length >= 22) { - f.maxp.data[26] = t.maxSizeOfInstructions >> 8; - f.maxp.data[27] = 255 & t.maxSizeOfInstructions; - } - } - if (!f.hhea) - throw new r.FormatError('Required "hhea" table is not found'); - if (0 === f.hhea.data[10] && 0 === f.hhea.data[11]) { - f.hhea.data[10] = 255; - f.hhea.data[11] = 255; - } - const D = { - unitsPerEm: int16(f.head.data[18], f.head.data[19]), - yMax: signedInt16(f.head.data[42], f.head.data[43]), - yMin: signedInt16(f.head.data[38], f.head.data[39]), - ascent: signedInt16(f.hhea.data[4], f.hhea.data[5]), - descent: signedInt16(f.hhea.data[6], f.hhea.data[7]), - lineGap: signedInt16(f.hhea.data[8], f.hhea.data[9]), - }; - this.ascent = D.ascent / D.unitsPerEm; - this.descent = D.descent / D.unitsPerEm; - this.lineGap = D.lineGap / D.unitsPerEm; - if (this.cssFontInfo?.lineHeight) { - this.lineHeight = this.cssFontInfo.metrics.lineHeight; - this.lineGap = this.cssFontInfo.metrics.lineGap; - } else - this.lineHeight = this.ascent - this.descent + this.lineGap; - f.post && - (function readPostScriptTable(e, a, n) { - const s = (t.start || 0) + e.offset; - t.pos = s; - const o = s + e.length, - c = t.getInt32(); - t.skip(28); - let l, - h, - u = !0; - switch (c) { - case 65536: - l = i.MacStandardGlyphOrdering; - break; - case 131072: - const e = t.getUint16(); - if (e !== n) { - u = !1; - break; - } - const s = []; - for (h = 0; h < e; ++h) { - const e = t.getUint16(); - if (e >= 32768) { - u = !1; - break; - } - s.push(e); - } - if (!u) break; - const d = [], - f = []; - for (; t.pos < o; ) { - const e = t.getByte(); - f.length = e; - for (h = 0; h < e; ++h) - f[h] = String.fromCharCode(t.getByte()); - d.push(f.join("")); - } - l = []; - for (h = 0; h < e; ++h) { - const e = s[h]; - e < 258 - ? l.push(i.MacStandardGlyphOrdering[e]) - : l.push(d[e - 258]); - } - break; - case 196608: - break; - default: - (0, r.warn)( - "Unknown/unsupported post table version " + c, - ); - u = !1; - a.defaultEncoding && (l = a.defaultEncoding); - } - a.glyphNames = l; - return u; - })(f.post, a, C); - f.post = { tag: "post", data: createPostTable(a) }; - const E = []; - function hasGlyph(e) { - return !M[e]; - } - if (a.composite) { - const e = a.cidToGidMap || [], - t = 0 === e.length; - a.cMap.forEach(function (a, n) { - "string" == typeof n && (n = convertCidString(a, n, !0)); - if (n > 65535) - throw new r.FormatError("Max size of CID is 65,535"); - let i = -1; - t ? (i = n) : void 0 !== e[n] && (i = e[n]); - i >= 0 && i < C && hasGlyph(i) && (E[a] = i); - }); - } else { - const e = (function readCmapTable(e, t, a, n) { - if (!e) { - (0, r.warn)("No cmap table available."); - return { - platformId: -1, - encodingId: -1, - mappings: [], - hasShortCmap: !1, - }; - } - let i, - s = (t.start || 0) + e.offset; - t.pos = s; - t.skip(2); - const o = t.getUint16(); - let c, - l = !1; - for (let e = 0; e < o; e++) { - const r = t.getUint16(), - i = t.getUint16(), - s = t.getInt32() >>> 0; - let h = !1; - if (c?.platformId !== r || c?.encodingId !== i) { - if (0 !== r || (0 !== i && 1 !== i && 3 !== i)) - if (1 === r && 0 === i) h = !0; - else if (3 !== r || 1 !== i || (!n && c)) { - if (a && 3 === r && 0 === i) { - h = !0; - let a = !0; - if (e < o - 1) { - const e = t.peekBytes(2); - int16(e[0], e[1]) < r && (a = !1); - } - a && (l = !0); - } - } else { - h = !0; - a || (l = !0); - } - else h = !0; - h && (c = { platformId: r, encodingId: i, offset: s }); - if (l) break; - } - } - c && (t.pos = s + c.offset); - if (!c || -1 === t.peekByte()) { - (0, r.warn)("Could not find a preferred cmap table."); - return { - platformId: -1, - encodingId: -1, - mappings: [], - hasShortCmap: !1, - }; - } - const h = t.getUint16(); - let u = !1; - const d = []; - let f, g; - if (0 === h) { - t.skip(4); - for (f = 0; f < 256; f++) { - const e = t.getByte(); - e && d.push({ charCode: f, glyphId: e }); - } - u = !0; - } else if (2 === h) { - t.skip(4); - const e = []; - let a = 0; - for (let r = 0; r < 256; r++) { - const r = t.getUint16() >> 3; - e.push(r); - a = Math.max(r, a); - } - const r = []; - for (let e = 0; e <= a; e++) - r.push({ - firstCode: t.getUint16(), - entryCount: t.getUint16(), - idDelta: signedInt16(t.getByte(), t.getByte()), - idRangePos: t.pos + t.getUint16(), - }); - for (let a = 0; a < 256; a++) - if (0 === e[a]) { - t.pos = r[0].idRangePos + 2 * a; - g = t.getUint16(); - d.push({ charCode: a, glyphId: g }); - } else { - const n = r[e[a]]; - for (f = 0; f < n.entryCount; f++) { - const e = (a << 8) + f + n.firstCode; - t.pos = n.idRangePos + 2 * f; - g = t.getUint16(); - 0 !== g && (g = (g + n.idDelta) % 65536); - d.push({ charCode: e, glyphId: g }); - } - } - } else if (4 === h) { - t.skip(4); - const e = t.getUint16() >> 1; - t.skip(6); - const a = []; - let r; - for (r = 0; r < e; r++) a.push({ end: t.getUint16() }); - t.skip(2); - for (r = 0; r < e; r++) a[r].start = t.getUint16(); - for (r = 0; r < e; r++) a[r].delta = t.getUint16(); - let n, - o = 0; - for (r = 0; r < e; r++) { - i = a[r]; - const s = t.getUint16(); - if (s) { - n = (s >> 1) - (e - r); - i.offsetIndex = n; - o = Math.max(o, n + i.end - i.start + 1); - } else i.offsetIndex = -1; - } - const c = []; - for (f = 0; f < o; f++) c.push(t.getUint16()); - for (r = 0; r < e; r++) { - i = a[r]; - s = i.start; - const e = i.end, - t = i.delta; - n = i.offsetIndex; - for (f = s; f <= e; f++) - if (65535 !== f) { - g = n < 0 ? f : c[n + f - s]; - g = (g + t) & 65535; - d.push({ charCode: f, glyphId: g }); - } - } - } else if (6 === h) { - t.skip(4); - const e = t.getUint16(), - a = t.getUint16(); - for (f = 0; f < a; f++) { - g = t.getUint16(); - const a = e + f; - d.push({ charCode: a, glyphId: g }); - } - } else { - if (12 !== h) { - (0, r.warn)("cmap table has unsupported format: " + h); - return { - platformId: -1, - encodingId: -1, - mappings: [], - hasShortCmap: !1, - }; - } - { - t.skip(10); - const e = t.getInt32() >>> 0; - for (f = 0; f < e; f++) { - const e = t.getInt32() >>> 0, - a = t.getInt32() >>> 0; - let r = t.getInt32() >>> 0; - for (let t = e; t <= a; t++) - d.push({ charCode: t, glyphId: r++ }); - } - } - } - d.sort(function (e, t) { - return e.charCode - t.charCode; - }); - for (let e = 1; e < d.length; e++) - if (d[e - 1].charCode === d[e].charCode) { - d.splice(e, 1); - e--; - } - return { - platformId: c.platformId, - encodingId: c.encodingId, - mappings: d, - hasShortCmap: u, - }; - })(f.cmap, t, this.isSymbolicFont, a.hasEncoding), - n = e.platformId, - s = e.encodingId, - l = e.mappings; - let u = [], - d = !1; - !a.hasEncoding || - ("MacRomanEncoding" !== a.baseEncodingName && - "WinAnsiEncoding" !== a.baseEncodingName) || - (u = (0, c.getEncoding)(a.baseEncodingName)); - if ( - a.hasEncoding && - !this.isSymbolicFont && - ((3 === n && 1 === s) || (1 === n && 0 === s)) - ) { - const e = (0, o.getGlyphsUnicode)(); - for (let t = 0; t < 256; t++) { - let r; - r = - void 0 !== this.differences[t] - ? this.differences[t] - : u.length && "" !== u[t] - ? u[t] - : c.StandardEncoding[t]; - if (!r) continue; - const o = (0, i.recoverGlyphName)(r, e); - let d; - 3 === n && 1 === s - ? (d = e[o]) - : 1 === n && - 0 === s && - (d = c.MacRomanEncoding.indexOf(o)); - if (void 0 === d) { - if ( - !a.glyphNames && - a.hasIncludedToUnicodeMap && - !(this.toUnicode instanceof h.IdentityToUnicodeMap) - ) { - const e = this.toUnicode.get(t); - e && (d = e.codePointAt(0)); - } - if (void 0 === d) continue; - } - for (const e of l) - if (e.charCode === d) { - E[t] = e.glyphId; - break; - } - } - } else if (0 === n) { - for (const e of l) E[e.charCode] = e.glyphId; - d = !0; - } else - for (const e of l) { - let t = e.charCode; - 3 === n && t >= 61440 && t <= 61695 && (t &= 255); - E[t] = e.glyphId; - } - if (a.glyphNames && (u.length || this.differences.length)) - for (let e = 0; e < 256; ++e) { - if (!d && void 0 !== E[e]) continue; - const t = this.differences[e] || u[e]; - if (!t) continue; - const r = a.glyphNames.indexOf(t); - r > 0 && hasGlyph(r) && (E[e] = r); - } - } - 0 === E.length && (E[0] = 0); - let N = k - 1; - v || (N = 0); - if (!a.cssFontInfo) { - const e = adjustMapping(E, hasGlyph, N, this.toUnicode); - this.toFontChar = e.toFontChar; - f.cmap = { - tag: "cmap", - data: createCmapTable( - e.charCodeToGlyphId, - e.toUnicodeExtraMap, - k, - ), - }; - (f["OS/2"] && - (function validateOS2Table(e, t) { - t.pos = (t.start || 0) + e.offset; - const a = t.getUint16(); - t.skip(60); - const r = t.getUint16(); - if (a < 4 && 768 & r) return !1; - if (t.getUint16() > t.getUint16()) return !1; - t.skip(6); - if (0 === t.getUint16()) return !1; - e.data[8] = e.data[9] = 0; - return !0; - })(f["OS/2"], t)) || - (f["OS/2"] = { - tag: "OS/2", - data: createOS2Table(a, e.charCodeToGlyphId, D), - }); - } - if (!S) - try { - w = new y.Stream(f["CFF "].data); - b = new n.CFFParser(w, a, i.SEAC_ANALYSIS_ENABLED).parse(); - b.duplicateFirstGlyph(); - const e = new n.CFFCompiler(b); - f["CFF "].data = e.compile(); - } catch { - (0, r.warn)("Failed to compile font " + a.loadedName); - } - if (f.name) { - const [t, r] = readNameTable(f.name); - f.name.data = createNameTable(e, t); - this.psName = t[0][6] || null; - a.composite || - (function adjustTrueTypeToUnicode(e, t, a) { - if (e.isInternalFont) return; - if (e.hasIncludedToUnicodeMap) return; - if (e.hasEncoding) return; - if (e.toUnicode instanceof h.IdentityToUnicodeMap) return; - if (!t) return; - if (0 === a.length) return; - if (e.defaultEncoding === c.WinAnsiEncoding) return; - for (const e of a) if (!isWinNameRecord(e)) return; - const r = c.WinAnsiEncoding, - n = [], - i = (0, o.getGlyphsUnicode)(); - for (const e in r) { - const t = r[e]; - if ("" === t) continue; - const a = i[t]; - void 0 !== a && (n[e] = String.fromCharCode(a)); - } - n.length > 0 && e.toUnicode.amend(n); - })(a, this.isSymbolicFont, r); - } else f.name = { tag: "name", data: createNameTable(this.name) }; - const R = new m.OpenTypeFileBuilder(d.version); - for (const e in f) R.addTable(e, f[e].data); - return R.toArray(); - } - convert(e, t, a) { - a.fixedPitch = !1; - a.builtInEncoding && - (function adjustType1ToUnicode(e, t) { - if (e.isInternalFont) return; - if (e.hasIncludedToUnicodeMap) return; - if (t === e.defaultEncoding) return; - if (e.toUnicode instanceof h.IdentityToUnicodeMap) return; - const a = [], - r = (0, o.getGlyphsUnicode)(); - for (const n in t) { - if ( - e.hasEncoding && - (e.baseEncodingName || void 0 !== e.differences[n]) - ) - continue; - const i = t[n], - o = (0, s.getUnicodeForGlyph)(i, r); - -1 !== o && (a[n] = String.fromCharCode(o)); - } - a.length > 0 && e.toUnicode.amend(a); - })(a, a.builtInEncoding); - let n = 1; - t instanceof u.CFFFont && (n = t.numGlyphs - 1); - const l = t.getGlyphMapping(a); - let d = null, - f = l, - g = null; - if (!a.cssFontInfo) { - d = adjustMapping(l, t.hasGlyphId.bind(t), n, this.toUnicode); - this.toFontChar = d.toFontChar; - f = d.charCodeToGlyphId; - g = d.toUnicodeExtraMap; - } - const p = t.numGlyphs; - function getCharCodes(e, t) { - let a = null; - for (const r in e) t === e[r] && (a ||= []).push(0 | r); - return a; - } - function createCharCode(e, t) { - for (const a in e) if (t === e[a]) return 0 | a; - d.charCodeToGlyphId[d.nextAvailableFontCharCode] = t; - return d.nextAvailableFontCharCode++; - } - const b = t.seacs; - if (d && i.SEAC_ANALYSIS_ENABLED && b?.length) { - const e = a.fontMatrix || r.FONT_IDENTITY_MATRIX, - n = t.getCharset(), - i = Object.create(null); - for (let t in b) { - t |= 0; - const a = b[t], - r = c.StandardEncoding[a[2]], - s = c.StandardEncoding[a[3]], - o = n.indexOf(r), - h = n.indexOf(s); - if (o < 0 || h < 0) continue; - const u = { - x: a[0] * e[0] + a[1] * e[2] + e[4], - y: a[0] * e[1] + a[1] * e[3] + e[5], - }, - f = getCharCodes(l, t); - if (f) - for (const e of f) { - const t = d.charCodeToGlyphId, - a = createCharCode(t, o), - r = createCharCode(t, h); - i[e] = { - baseFontCharCode: a, - accentFontCharCode: r, - accentOffset: u, - }; - } - } - a.seacMap = i; - } - const y = 1 / (a.fontMatrix || r.FONT_IDENTITY_MATRIX)[0], - w = new m.OpenTypeFileBuilder("OTTO"); - w.addTable("CFF ", t.data); - w.addTable("OS/2", createOS2Table(a, f)); - w.addTable("cmap", createCmapTable(f, g, p)); - w.addTable( - "head", - "\0\0\0\0\0\0\0\0\0\0_<õ\0\0" + - safeString16(y) + - "\0\0\0\0ž\v~'\0\0\0\0ž\v~'\0\0" + - safeString16(a.descent) + - "ÿ" + - safeString16(a.ascent) + - string16(a.italicAngle ? 2 : 0) + - "\0\0\0\0\0\0\0", - ); - w.addTable( - "hhea", - "\0\0\0" + - safeString16(a.ascent) + - safeString16(a.descent) + - "\0\0ÿÿ\0\0\0\0\0\0" + - safeString16(a.capHeight) + - safeString16(Math.tan(a.italicAngle) * a.xHeight) + - "\0\0\0\0\0\0\0\0\0\0\0\0" + - string16(p), - ); - w.addTable( - "hmtx", - (function fontFieldsHmtx() { - const e = t.charstrings, - a = t.cff ? t.cff.widths : null; - let r = "\0\0\0\0"; - for (let t = 1, n = p; t < n; t++) { - let n = 0; - if (e) { - const a = e[t - 1]; - n = "width" in a ? a.width : 0; - } else a && (n = Math.ceil(a[t] || 0)); - r += string16(n) + string16(0); - } - return r; - })(), - ); - w.addTable("maxp", "\0\0P\0" + string16(p)); - w.addTable("name", createNameTable(e)); - w.addTable("post", createPostTable(a)); - return w.toArray(); - } - get spaceWidth() { - const e = ["space", "minus", "one", "i", "I"]; - let t; - for (const a of e) { - if (a in this.widths) { - t = this.widths[a]; - break; - } - const e = (0, o.getGlyphsUnicode)()[a]; - let r = 0; - if (this.composite && this.cMap.contains(e)) { - r = this.cMap.lookup(e); - "string" == typeof r && (r = convertCidString(e, r)); - } - !r && this.toUnicode && (r = this.toUnicode.charCodeOf(e)); - r <= 0 && (r = e); - t = this.widths[r]; - if (t) break; - } - return (0, r.shadow)(this, "spaceWidth", t || this.defaultWidth); - } - _charToGlyph(e, t = !1) { - let a, - n, - i, - o = this._glyphCache[e]; - if (o?.isSpace === t) return o; - let c = e; - if (this.cMap?.contains(e)) { - c = this.cMap.lookup(e); - "string" == typeof c && (c = convertCidString(e, c)); - } - n = this.widths[c]; - "number" != typeof n && (n = this.defaultWidth); - const l = this.vmetrics?.[c]; - let h = this.toUnicode.get(e) || e; - "number" == typeof h && (h = String.fromCharCode(h)); - let u = void 0 !== this.toFontChar[e]; - a = this.toFontChar[e] || e; - if (this.missingFile) { - const t = this.differences[e] || this.defaultEncoding[e]; - (".notdef" !== t && "" !== t) || - "Type1" !== this.type || - (a = 32); - a = (0, s.mapSpecialUnicodeValues)(a); - } - this.isType3Font && (i = a); - let d = null; - if (this.seacMap?.[e]) { - u = !0; - const t = this.seacMap[e]; - a = t.baseFontCharCode; - d = { - fontChar: String.fromCodePoint(t.accentFontCharCode), - offset: t.accentOffset, - }; - } - let f = ""; - "number" == typeof a && - (a <= 1114111 - ? (f = String.fromCodePoint(a)) - : (0, r.warn)(`charToGlyph - invalid fontCharCode: ${a}`)); - o = new Glyph(e, f, h, d, n, l, i, t, u); - return (this._glyphCache[e] = o); - } - charsToGlyphs(e) { - let t = this._charsCache[e]; - if (t) return t; - t = []; - if (this.cMap) { - const a = Object.create(null), - r = e.length; - let n = 0; - for (; n < r; ) { - this.cMap.readCharCode(e, n, a); - const { charcode: r, length: i } = a; - n += i; - const s = this._charToGlyph( - r, - 1 === i && 32 === e.charCodeAt(n - 1), - ); - t.push(s); - } - } else - for (let a = 0, r = e.length; a < r; ++a) { - const r = e.charCodeAt(a), - n = this._charToGlyph(r, 32 === r); - t.push(n); - } - return (this._charsCache[e] = t); - } - getCharPositions(e) { - const t = []; - if (this.cMap) { - const a = Object.create(null); - let r = 0; - for (; r < e.length; ) { - this.cMap.readCharCode(e, r, a); - const n = a.length; - t.push([r, r + n]); - r += n; - } - } else - for (let a = 0, r = e.length; a < r; ++a) t.push([a, a + 1]); - return t; - } - get glyphCacheValues() { - return Object.values(this._glyphCache); - } - encodeString(e) { - const t = [], - a = [], - hasCurrentBufErrors = () => t.length % 2 == 1, - r = - this.toUnicode instanceof h.IdentityToUnicodeMap - ? (e) => this.toUnicode.charCodeOf(e) - : (e) => this.toUnicode.charCodeOf(String.fromCodePoint(e)); - for (let n = 0, i = e.length; n < i; n++) { - const i = e.codePointAt(n); - i > 55295 && (i < 57344 || i > 65533) && n++; - if (this.toUnicode) { - const e = r(i); - if (-1 !== e) { - if (hasCurrentBufErrors()) { - t.push(a.join("")); - a.length = 0; - } - for ( - let t = - (this.cMap ? this.cMap.getCharCodeLength(e) : 1) - 1; - t >= 0; - t-- - ) - a.push(String.fromCharCode((e >> (8 * t)) & 255)); - continue; - } - } - if (!hasCurrentBufErrors()) { - t.push(a.join("")); - a.length = 0; - } - a.push(String.fromCodePoint(i)); - } - t.push(a.join("")); - return t; - } - }; - t.ErrorFont = class ErrorFont { - constructor(e) { - this.error = e; - this.loadedName = "g_font_error"; - this.missingFile = !0; - } - charsToGlyphs() { - return []; - } - encodeString(e) { - return [e]; - } - exportData(e = !1) { - return { error: this.error }; - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.CFFTopDict = - t.CFFStrings = - t.CFFStandardStrings = - t.CFFPrivateDict = - t.CFFParser = - t.CFFIndex = - t.CFFHeader = - t.CFFFDSelect = - t.CFFCompiler = - t.CFFCharset = - t.CFF = - void 0; - var r = a(2), - n = a(36), - i = a(37); - const s = [ - ".notdef", - "space", - "exclam", - "quotedbl", - "numbersign", - "dollar", - "percent", - "ampersand", - "quoteright", - "parenleft", - "parenright", - "asterisk", - "plus", - "comma", - "hyphen", - "period", - "slash", - "zero", - "one", - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "colon", - "semicolon", - "less", - "equal", - "greater", - "question", - "at", - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J", - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T", - "U", - "V", - "W", - "X", - "Y", - "Z", - "bracketleft", - "backslash", - "bracketright", - "asciicircum", - "underscore", - "quoteleft", - "a", - "b", - "c", - "d", - "e", - "f", - "g", - "h", - "i", - "j", - "k", - "l", - "m", - "n", - "o", - "p", - "q", - "r", - "s", - "t", - "u", - "v", - "w", - "x", - "y", - "z", - "braceleft", - "bar", - "braceright", - "asciitilde", - "exclamdown", - "cent", - "sterling", - "fraction", - "yen", - "florin", - "section", - "currency", - "quotesingle", - "quotedblleft", - "guillemotleft", - "guilsinglleft", - "guilsinglright", - "fi", - "fl", - "endash", - "dagger", - "daggerdbl", - "periodcentered", - "paragraph", - "bullet", - "quotesinglbase", - "quotedblbase", - "quotedblright", - "guillemotright", - "ellipsis", - "perthousand", - "questiondown", - "grave", - "acute", - "circumflex", - "tilde", - "macron", - "breve", - "dotaccent", - "dieresis", - "ring", - "cedilla", - "hungarumlaut", - "ogonek", - "caron", - "emdash", - "AE", - "ordfeminine", - "Lslash", - "Oslash", - "OE", - "ordmasculine", - "ae", - "dotlessi", - "lslash", - "oslash", - "oe", - "germandbls", - "onesuperior", - "logicalnot", - "mu", - "trademark", - "Eth", - "onehalf", - "plusminus", - "Thorn", - "onequarter", - "divide", - "brokenbar", - "degree", - "thorn", - "threequarters", - "twosuperior", - "registered", - "minus", - "eth", - "multiply", - "threesuperior", - "copyright", - "Aacute", - "Acircumflex", - "Adieresis", - "Agrave", - "Aring", - "Atilde", - "Ccedilla", - "Eacute", - "Ecircumflex", - "Edieresis", - "Egrave", - "Iacute", - "Icircumflex", - "Idieresis", - "Igrave", - "Ntilde", - "Oacute", - "Ocircumflex", - "Odieresis", - "Ograve", - "Otilde", - "Scaron", - "Uacute", - "Ucircumflex", - "Udieresis", - "Ugrave", - "Yacute", - "Ydieresis", - "Zcaron", - "aacute", - "acircumflex", - "adieresis", - "agrave", - "aring", - "atilde", - "ccedilla", - "eacute", - "ecircumflex", - "edieresis", - "egrave", - "iacute", - "icircumflex", - "idieresis", - "igrave", - "ntilde", - "oacute", - "ocircumflex", - "odieresis", - "ograve", - "otilde", - "scaron", - "uacute", - "ucircumflex", - "udieresis", - "ugrave", - "yacute", - "ydieresis", - "zcaron", - "exclamsmall", - "Hungarumlautsmall", - "dollaroldstyle", - "dollarsuperior", - "ampersandsmall", - "Acutesmall", - "parenleftsuperior", - "parenrightsuperior", - "twodotenleader", - "onedotenleader", - "zerooldstyle", - "oneoldstyle", - "twooldstyle", - "threeoldstyle", - "fouroldstyle", - "fiveoldstyle", - "sixoldstyle", - "sevenoldstyle", - "eightoldstyle", - "nineoldstyle", - "commasuperior", - "threequartersemdash", - "periodsuperior", - "questionsmall", - "asuperior", - "bsuperior", - "centsuperior", - "dsuperior", - "esuperior", - "isuperior", - "lsuperior", - "msuperior", - "nsuperior", - "osuperior", - "rsuperior", - "ssuperior", - "tsuperior", - "ff", - "ffi", - "ffl", - "parenleftinferior", - "parenrightinferior", - "Circumflexsmall", - "hyphensuperior", - "Gravesmall", - "Asmall", - "Bsmall", - "Csmall", - "Dsmall", - "Esmall", - "Fsmall", - "Gsmall", - "Hsmall", - "Ismall", - "Jsmall", - "Ksmall", - "Lsmall", - "Msmall", - "Nsmall", - "Osmall", - "Psmall", - "Qsmall", - "Rsmall", - "Ssmall", - "Tsmall", - "Usmall", - "Vsmall", - "Wsmall", - "Xsmall", - "Ysmall", - "Zsmall", - "colonmonetary", - "onefitted", - "rupiah", - "Tildesmall", - "exclamdownsmall", - "centoldstyle", - "Lslashsmall", - "Scaronsmall", - "Zcaronsmall", - "Dieresissmall", - "Brevesmall", - "Caronsmall", - "Dotaccentsmall", - "Macronsmall", - "figuredash", - "hypheninferior", - "Ogoneksmall", - "Ringsmall", - "Cedillasmall", - "questiondownsmall", - "oneeighth", - "threeeighths", - "fiveeighths", - "seveneighths", - "onethird", - "twothirds", - "zerosuperior", - "foursuperior", - "fivesuperior", - "sixsuperior", - "sevensuperior", - "eightsuperior", - "ninesuperior", - "zeroinferior", - "oneinferior", - "twoinferior", - "threeinferior", - "fourinferior", - "fiveinferior", - "sixinferior", - "seveninferior", - "eightinferior", - "nineinferior", - "centinferior", - "dollarinferior", - "periodinferior", - "commainferior", - "Agravesmall", - "Aacutesmall", - "Acircumflexsmall", - "Atildesmall", - "Adieresissmall", - "Aringsmall", - "AEsmall", - "Ccedillasmall", - "Egravesmall", - "Eacutesmall", - "Ecircumflexsmall", - "Edieresissmall", - "Igravesmall", - "Iacutesmall", - "Icircumflexsmall", - "Idieresissmall", - "Ethsmall", - "Ntildesmall", - "Ogravesmall", - "Oacutesmall", - "Ocircumflexsmall", - "Otildesmall", - "Odieresissmall", - "OEsmall", - "Oslashsmall", - "Ugravesmall", - "Uacutesmall", - "Ucircumflexsmall", - "Udieresissmall", - "Yacutesmall", - "Thornsmall", - "Ydieresissmall", - "001.000", - "001.001", - "001.002", - "001.003", - "Black", - "Bold", - "Book", - "Light", - "Medium", - "Regular", - "Roman", - "Semibold", - ]; - t.CFFStandardStrings = s; - const o = 391, - c = [ - null, - { id: "hstem", min: 2, stackClearing: !0, stem: !0 }, - null, - { id: "vstem", min: 2, stackClearing: !0, stem: !0 }, - { id: "vmoveto", min: 1, stackClearing: !0 }, - { id: "rlineto", min: 2, resetStack: !0 }, - { id: "hlineto", min: 1, resetStack: !0 }, - { id: "vlineto", min: 1, resetStack: !0 }, - { id: "rrcurveto", min: 6, resetStack: !0 }, - null, - { id: "callsubr", min: 1, undefStack: !0 }, - { id: "return", min: 0, undefStack: !0 }, - null, - null, - { id: "endchar", min: 0, stackClearing: !0 }, - null, - null, - null, - { id: "hstemhm", min: 2, stackClearing: !0, stem: !0 }, - { id: "hintmask", min: 0, stackClearing: !0 }, - { id: "cntrmask", min: 0, stackClearing: !0 }, - { id: "rmoveto", min: 2, stackClearing: !0 }, - { id: "hmoveto", min: 1, stackClearing: !0 }, - { id: "vstemhm", min: 2, stackClearing: !0, stem: !0 }, - { id: "rcurveline", min: 8, resetStack: !0 }, - { id: "rlinecurve", min: 8, resetStack: !0 }, - { id: "vvcurveto", min: 4, resetStack: !0 }, - { id: "hhcurveto", min: 4, resetStack: !0 }, - null, - { id: "callgsubr", min: 1, undefStack: !0 }, - { id: "vhcurveto", min: 4, resetStack: !0 }, - { id: "hvcurveto", min: 4, resetStack: !0 }, - ], - l = [ - null, - null, - null, - { id: "and", min: 2, stackDelta: -1 }, - { id: "or", min: 2, stackDelta: -1 }, - { id: "not", min: 1, stackDelta: 0 }, - null, - null, - null, - { id: "abs", min: 1, stackDelta: 0 }, - { - id: "add", - min: 2, - stackDelta: -1, - stackFn(e, t) { - e[t - 2] = e[t - 2] + e[t - 1]; - }, - }, - { - id: "sub", - min: 2, - stackDelta: -1, - stackFn(e, t) { - e[t - 2] = e[t - 2] - e[t - 1]; - }, - }, - { - id: "div", - min: 2, - stackDelta: -1, - stackFn(e, t) { - e[t - 2] = e[t - 2] / e[t - 1]; - }, - }, - null, - { - id: "neg", - min: 1, - stackDelta: 0, - stackFn(e, t) { - e[t - 1] = -e[t - 1]; - }, - }, - { id: "eq", min: 2, stackDelta: -1 }, - null, - null, - { id: "drop", min: 1, stackDelta: -1 }, - null, - { id: "put", min: 2, stackDelta: -2 }, - { id: "get", min: 1, stackDelta: 0 }, - { id: "ifelse", min: 4, stackDelta: -3 }, - { id: "random", min: 0, stackDelta: 1 }, - { - id: "mul", - min: 2, - stackDelta: -1, - stackFn(e, t) { - e[t - 2] = e[t - 2] * e[t - 1]; - }, - }, - null, - { id: "sqrt", min: 1, stackDelta: 0 }, - { id: "dup", min: 1, stackDelta: 1 }, - { id: "exch", min: 2, stackDelta: 0 }, - { id: "index", min: 2, stackDelta: 0 }, - { id: "roll", min: 3, stackDelta: -2 }, - null, - null, - null, - { id: "hflex", min: 7, resetStack: !0 }, - { id: "flex", min: 13, resetStack: !0 }, - { id: "hflex1", min: 9, resetStack: !0 }, - { id: "flex1", min: 11, resetStack: !0 }, - ]; - t.CFFParser = class CFFParser { - constructor(e, t, a) { - this.bytes = e.getBytes(); - this.properties = t; - this.seacAnalysisEnabled = !!a; - } - parse() { - const e = this.properties, - t = new CFF(); - this.cff = t; - const a = this.parseHeader(), - r = this.parseIndex(a.endPos), - n = this.parseIndex(r.endPos), - i = this.parseIndex(n.endPos), - s = this.parseIndex(i.endPos), - o = this.parseDict(n.obj.get(0)), - c = this.createDict(CFFTopDict, o, t.strings); - t.header = a.obj; - t.names = this.parseNameIndex(r.obj); - t.strings = this.parseStringIndex(i.obj); - t.topDict = c; - t.globalSubrIndex = s.obj; - this.parsePrivateDict(t.topDict); - t.isCIDFont = c.hasName("ROS"); - const l = c.getByName("CharStrings"), - h = this.parseIndex(l).obj, - u = c.getByName("FontMatrix"); - u && (e.fontMatrix = u); - const d = c.getByName("FontBBox"); - if (d) { - e.ascent = Math.max(d[3], d[1]); - e.descent = Math.min(d[1], d[3]); - e.ascentScaled = !0; - } - let f, g; - if (t.isCIDFont) { - const e = this.parseIndex(c.getByName("FDArray")).obj; - for (let a = 0, r = e.count; a < r; ++a) { - const r = e.get(a), - n = this.createDict( - CFFTopDict, - this.parseDict(r), - t.strings, - ); - this.parsePrivateDict(n); - t.fdArray.push(n); - } - g = null; - f = this.parseCharsets( - c.getByName("charset"), - h.count, - t.strings, - !0, - ); - t.fdSelect = this.parseFDSelect( - c.getByName("FDSelect"), - h.count, - ); - } else { - f = this.parseCharsets( - c.getByName("charset"), - h.count, - t.strings, - !1, - ); - g = this.parseEncoding( - c.getByName("Encoding"), - e, - t.strings, - f.charset, - ); - } - t.charset = f; - t.encoding = g; - const p = this.parseCharStrings({ - charStrings: h, - localSubrIndex: c.privateDict.subrsIndex, - globalSubrIndex: s.obj, - fdSelect: t.fdSelect, - fdArray: t.fdArray, - privateDict: c.privateDict, - }); - t.charStrings = p.charStrings; - t.seacs = p.seacs; - t.widths = p.widths; - return t; - } - parseHeader() { - let e = this.bytes; - const t = e.length; - let a = 0; - for (; a < t && 1 !== e[a]; ) ++a; - if (a >= t) throw new r.FormatError("Invalid CFF header"); - if (0 !== a) { - (0, r.info)("cff data is shifted"); - e = e.subarray(a); - this.bytes = e; - } - const n = e[0], - i = e[1], - s = e[2], - o = e[3]; - return { obj: new CFFHeader(n, i, s, o), endPos: s }; - } - parseDict(e) { - let t = 0; - function parseOperand() { - let a = e[t++]; - if (30 === a) - return (function parseFloatOperand() { - let a = ""; - const r = 15, - n = [ - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - ".", - "E", - "E-", - null, - "-", - ], - i = e.length; - for (; t < i; ) { - const i = e[t++], - s = i >> 4, - o = 15 & i; - if (s === r) break; - a += n[s]; - if (o === r) break; - a += n[o]; - } - return parseFloat(a); - })(); - if (28 === a) { - a = e[t++]; - a = ((a << 24) | (e[t++] << 16)) >> 16; - return a; - } - if (29 === a) { - a = e[t++]; - a = (a << 8) | e[t++]; - a = (a << 8) | e[t++]; - a = (a << 8) | e[t++]; - return a; - } - if (a >= 32 && a <= 246) return a - 139; - if (a >= 247 && a <= 250) return 256 * (a - 247) + e[t++] + 108; - if (a >= 251 && a <= 254) - return -256 * (a - 251) - e[t++] - 108; - (0, r.warn)( - 'CFFParser_parseDict: "' + a + '" is a reserved command.', - ); - return NaN; - } - let a = []; - const n = []; - t = 0; - const i = e.length; - for (; t < i; ) { - let r = e[t]; - if (r <= 21) { - 12 === r && (r = (r << 8) | e[++t]); - n.push([r, a]); - a = []; - ++t; - } else a.push(parseOperand()); - } - return n; - } - parseIndex(e) { - const t = new CFFIndex(), - a = this.bytes, - r = (a[e++] << 8) | a[e++], - n = []; - let i, - s, - o = e; - if (0 !== r) { - const t = a[e++], - c = e + (r + 1) * t - 1; - for (i = 0, s = r + 1; i < s; ++i) { - let r = 0; - for (let n = 0; n < t; ++n) { - r <<= 8; - r += a[e++]; - } - n.push(c + r); - } - o = n[r]; - } - for (i = 0, s = n.length - 1; i < s; ++i) { - const e = n[i], - r = n[i + 1]; - t.add(a.subarray(e, r)); - } - return { obj: t, endPos: o }; - } - parseNameIndex(e) { - const t = []; - for (let a = 0, n = e.count; a < n; ++a) { - const n = e.get(a); - t.push((0, r.bytesToString)(n)); - } - return t; - } - parseStringIndex(e) { - const t = new CFFStrings(); - for (let a = 0, n = e.count; a < n; ++a) { - const n = e.get(a); - t.add((0, r.bytesToString)(n)); - } - return t; - } - createDict(e, t, a) { - const r = new e(a); - for (const [e, a] of t) r.setByKey(e, a); - return r; - } - parseCharString(e, t, a, n) { - if (!t || e.callDepth > 10) return !1; - let i = e.stackSize; - const s = e.stack; - let o = t.length; - for (let h = 0; h < o; ) { - const u = t[h++]; - let d = null; - if (12 === u) { - const e = t[h++]; - if (0 === e) { - t[h - 2] = 139; - t[h - 1] = 22; - i = 0; - } else d = l[e]; - } else if (28 === u) { - s[i] = ((t[h] << 24) | (t[h + 1] << 16)) >> 16; - h += 2; - i++; - } else if (14 === u) { - if (i >= 4) { - i -= 4; - if (this.seacAnalysisEnabled) { - e.seac = s.slice(i, i + 4); - return !1; - } - } - d = c[u]; - } else if (u >= 32 && u <= 246) { - s[i] = u - 139; - i++; - } else if (u >= 247 && u <= 254) { - s[i] = - u < 251 - ? ((u - 247) << 8) + t[h] + 108 - : -((u - 251) << 8) - t[h] - 108; - h++; - i++; - } else if (255 === u) { - s[i] = - ((t[h] << 24) | - (t[h + 1] << 16) | - (t[h + 2] << 8) | - t[h + 3]) / - 65536; - h += 4; - i++; - } else if (19 === u || 20 === u) { - e.hints += i >> 1; - if (0 === e.hints) { - t.copyWithin(h - 1, h, -1); - h -= 1; - o -= 1; - continue; - } - h += (e.hints + 7) >> 3; - i %= 2; - d = c[u]; - } else { - if (10 === u || 29 === u) { - const t = 10 === u ? a : n; - if (!t) { - d = c[u]; - (0, r.warn)("Missing subrsIndex for " + d.id); - return !1; - } - let o = 32768; - t.count < 1240 ? (o = 107) : t.count < 33900 && (o = 1131); - const l = s[--i] + o; - if (l < 0 || l >= t.count || isNaN(l)) { - d = c[u]; - (0, r.warn)("Out of bounds subrIndex for " + d.id); - return !1; - } - e.stackSize = i; - e.callDepth++; - if (!this.parseCharString(e, t.get(l), a, n)) return !1; - e.callDepth--; - i = e.stackSize; - continue; - } - if (11 === u) { - e.stackSize = i; - return !0; - } - if (0 === u && h === t.length) { - t[h - 1] = 14; - d = c[14]; - } else { - if (9 === u) { - t.copyWithin(h - 1, h, -1); - h -= 1; - o -= 1; - continue; - } - d = c[u]; - } - } - if (d) { - if (d.stem) { - e.hints += i >> 1; - if (3 === u || 23 === u) e.hasVStems = !0; - else if (e.hasVStems && (1 === u || 18 === u)) { - (0, r.warn)("CFF stem hints are in wrong order"); - t[h - 1] = 1 === u ? 3 : 23; - } - } - if ("min" in d && !e.undefStack && i < d.min) { - (0, r.warn)( - "Not enough parameters for " + - d.id + - "; actual: " + - i + - ", expected: " + - d.min, - ); - if (0 === i) { - t[h - 1] = 14; - return !0; - } - return !1; - } - if (e.firstStackClearing && d.stackClearing) { - e.firstStackClearing = !1; - i -= d.min; - i >= 2 && d.stem - ? (i %= 2) - : i > 1 && - (0, r.warn)( - "Found too many parameters for stack-clearing command", - ); - i > 0 && (e.width = s[i - 1]); - } - if ("stackDelta" in d) { - "stackFn" in d && d.stackFn(s, i); - i += d.stackDelta; - } else if (d.stackClearing) i = 0; - else if (d.resetStack) { - i = 0; - e.undefStack = !1; - } else if (d.undefStack) { - i = 0; - e.undefStack = !0; - e.firstStackClearing = !1; - } - } - } - o < t.length && t.fill(14, o); - e.stackSize = i; - return !0; - } - parseCharStrings({ - charStrings: e, - localSubrIndex: t, - globalSubrIndex: a, - fdSelect: n, - fdArray: i, - privateDict: s, - }) { - const o = [], - c = [], - l = e.count; - for (let h = 0; h < l; h++) { - const l = e.get(h), - u = { - callDepth: 0, - stackSize: 0, - stack: [], - undefStack: !0, - hints: 0, - firstStackClearing: !0, - seac: null, - width: null, - hasVStems: !1, - }; - let d = !0, - f = null, - g = s; - if (n && i.length) { - const e = n.getFDIndex(h); - if (-1 === e) { - (0, r.warn)("Glyph index is not in fd select."); - d = !1; - } - if (e >= i.length) { - (0, r.warn)("Invalid fd index for glyph index."); - d = !1; - } - if (d) { - g = i[e].privateDict; - f = g.subrsIndex; - } - } else t && (f = t); - d && (d = this.parseCharString(u, l, f, a)); - if (null !== u.width) { - const e = g.getByName("nominalWidthX"); - c[h] = e + u.width; - } else { - const e = g.getByName("defaultWidthX"); - c[h] = e; - } - null !== u.seac && (o[h] = u.seac); - d || e.set(h, new Uint8Array([14])); - } - return { charStrings: e, seacs: o, widths: c }; - } - emptyPrivateDictionary(e) { - const t = this.createDict(CFFPrivateDict, [], e.strings); - e.setByKey(18, [0, 0]); - e.privateDict = t; - } - parsePrivateDict(e) { - if (!e.hasName("Private")) { - this.emptyPrivateDictionary(e); - return; - } - const t = e.getByName("Private"); - if (!Array.isArray(t) || 2 !== t.length) { - e.removeByName("Private"); - return; - } - const a = t[0], - r = t[1]; - if (0 === a || r >= this.bytes.length) { - this.emptyPrivateDictionary(e); - return; - } - const n = r + a, - i = this.bytes.subarray(r, n), - s = this.parseDict(i), - o = this.createDict(CFFPrivateDict, s, e.strings); - e.privateDict = o; - 0 === o.getByName("ExpansionFactor") && - o.setByName("ExpansionFactor", 0.06); - if (!o.getByName("Subrs")) return; - const c = o.getByName("Subrs"), - l = r + c; - if (0 === c || l >= this.bytes.length) { - this.emptyPrivateDictionary(e); - return; - } - const h = this.parseIndex(l); - o.subrsIndex = h.obj; - } - parseCharsets(e, t, a, i) { - if (0 === e) - return new CFFCharset(!0, d.ISO_ADOBE, n.ISOAdobeCharset); - if (1 === e) return new CFFCharset(!0, d.EXPERT, n.ExpertCharset); - if (2 === e) - return new CFFCharset( - !0, - d.EXPERT_SUBSET, - n.ExpertSubsetCharset, - ); - const s = this.bytes, - o = e, - c = s[e++], - l = [i ? 0 : ".notdef"]; - let h, u, f; - t -= 1; - switch (c) { - case 0: - for (f = 0; f < t; f++) { - h = (s[e++] << 8) | s[e++]; - l.push(i ? h : a.get(h)); - } - break; - case 1: - for (; l.length <= t; ) { - h = (s[e++] << 8) | s[e++]; - u = s[e++]; - for (f = 0; f <= u; f++) l.push(i ? h++ : a.get(h++)); - } - break; - case 2: - for (; l.length <= t; ) { - h = (s[e++] << 8) | s[e++]; - u = (s[e++] << 8) | s[e++]; - for (f = 0; f <= u; f++) l.push(i ? h++ : a.get(h++)); - } - break; - default: - throw new r.FormatError("Unknown charset format"); - } - const g = e, - p = s.subarray(o, g); - return new CFFCharset(!1, c, l, p); - } - parseEncoding(e, t, a, n) { - const s = Object.create(null), - o = this.bytes; - let c, - l, - h, - u = !1, - d = null; - if (0 === e || 1 === e) { - u = !0; - c = e; - const t = e ? i.ExpertEncoding : i.StandardEncoding; - for (l = 0, h = n.length; l < h; l++) { - const e = t.indexOf(n[l]); - -1 !== e && (s[e] = l); - } - } else { - const t = e; - c = o[e++]; - switch (127 & c) { - case 0: - const t = o[e++]; - for (l = 1; l <= t; l++) s[o[e++]] = l; - break; - case 1: - const a = o[e++]; - let n = 1; - for (l = 0; l < a; l++) { - const t = o[e++], - a = o[e++]; - for (let e = t; e <= t + a; e++) s[e] = n++; - } - break; - default: - throw new r.FormatError( - `Unknown encoding format: ${c} in CFF`, - ); - } - const i = e; - if (128 & c) { - o[t] &= 127; - !(function readSupplement() { - const t = o[e++]; - for (l = 0; l < t; l++) { - const t = o[e++], - r = (o[e++] << 8) + (255 & o[e++]); - s[t] = n.indexOf(a.get(r)); - } - })(); - } - d = o.subarray(t, i); - } - c &= 127; - return new CFFEncoding(u, c, s, d); - } - parseFDSelect(e, t) { - const a = this.bytes, - n = a[e++], - i = []; - let s; - switch (n) { - case 0: - for (s = 0; s < t; ++s) { - const t = a[e++]; - i.push(t); - } - break; - case 3: - const o = (a[e++] << 8) | a[e++]; - for (s = 0; s < o; ++s) { - let t = (a[e++] << 8) | a[e++]; - if (0 === s && 0 !== t) { - (0, r.warn)( - "parseFDSelect: The first range must have a first GID of 0 -- trying to recover.", - ); - t = 0; - } - const n = a[e++], - o = (a[e] << 8) | a[e + 1]; - for (let e = t; e < o; ++e) i.push(n); - } - e += 2; - break; - default: - throw new r.FormatError( - `parseFDSelect: Unknown format "${n}".`, - ); - } - if (i.length !== t) - throw new r.FormatError("parseFDSelect: Invalid font data."); - return new CFFFDSelect(n, i); - } - }; - class CFF { - constructor() { - this.header = null; - this.names = []; - this.topDict = null; - this.strings = new CFFStrings(); - this.globalSubrIndex = null; - this.encoding = null; - this.charset = null; - this.charStrings = null; - this.fdArray = []; - this.fdSelect = null; - this.isCIDFont = !1; - } - duplicateFirstGlyph() { - if (this.charStrings.count >= 65535) { - (0, r.warn)( - "Not enough space in charstrings to duplicate first glyph.", - ); - return; - } - const e = this.charStrings.get(0); - this.charStrings.add(e); - this.isCIDFont && - this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0]); - } - hasGlyphId(e) { - if (e < 0 || e >= this.charStrings.count) return !1; - return this.charStrings.get(e).length > 0; - } - } - t.CFF = CFF; - class CFFHeader { - constructor(e, t, a, r) { - this.major = e; - this.minor = t; - this.hdrSize = a; - this.offSize = r; - } - } - t.CFFHeader = CFFHeader; - class CFFStrings { - constructor() { - this.strings = []; - } - get(e) { - return e >= 0 && e <= 390 - ? s[e] - : e - o <= this.strings.length - ? this.strings[e - o] - : s[0]; - } - getSID(e) { - let t = s.indexOf(e); - if (-1 !== t) return t; - t = this.strings.indexOf(e); - return -1 !== t ? t + o : -1; - } - add(e) { - this.strings.push(e); - } - get count() { - return this.strings.length; - } - } - t.CFFStrings = CFFStrings; - class CFFIndex { - constructor() { - this.objects = []; - this.length = 0; - } - add(e) { - this.length += e.length; - this.objects.push(e); - } - set(e, t) { - this.length += t.length - this.objects[e].length; - this.objects[e] = t; - } - get(e) { - return this.objects[e]; - } - get count() { - return this.objects.length; - } - } - t.CFFIndex = CFFIndex; - class CFFDict { - constructor(e, t) { - this.keyToNameMap = e.keyToNameMap; - this.nameToKeyMap = e.nameToKeyMap; - this.defaults = e.defaults; - this.types = e.types; - this.opcodes = e.opcodes; - this.order = e.order; - this.strings = t; - this.values = Object.create(null); - } - setByKey(e, t) { - if (!(e in this.keyToNameMap)) return !1; - if (0 === t.length) return !0; - for (const a of t) - if (isNaN(a)) { - (0, r.warn)(`Invalid CFFDict value: "${t}" for key "${e}".`); - return !0; - } - const a = this.types[e]; - ("num" !== a && "sid" !== a && "offset" !== a) || (t = t[0]); - this.values[e] = t; - return !0; - } - setByName(e, t) { - if (!(e in this.nameToKeyMap)) - throw new r.FormatError(`Invalid dictionary name "${e}"`); - this.values[this.nameToKeyMap[e]] = t; - } - hasName(e) { - return this.nameToKeyMap[e] in this.values; - } - getByName(e) { - if (!(e in this.nameToKeyMap)) - throw new r.FormatError(`Invalid dictionary name ${e}"`); - const t = this.nameToKeyMap[e]; - return t in this.values ? this.values[t] : this.defaults[t]; - } - removeByName(e) { - delete this.values[this.nameToKeyMap[e]]; - } - static createTables(e) { - const t = { - keyToNameMap: {}, - nameToKeyMap: {}, - defaults: {}, - types: {}, - opcodes: {}, - order: [], - }; - for (const a of e) { - const e = Array.isArray(a[0]) ? (a[0][0] << 8) + a[0][1] : a[0]; - t.keyToNameMap[e] = a[1]; - t.nameToKeyMap[a[1]] = e; - t.types[e] = a[2]; - t.defaults[e] = a[3]; - t.opcodes[e] = Array.isArray(a[0]) ? a[0] : [a[0]]; - t.order.push(e); - } - return t; - } - } - const h = [ - [[12, 30], "ROS", ["sid", "sid", "num"], null], - [[12, 20], "SyntheticBase", "num", null], - [0, "version", "sid", null], - [1, "Notice", "sid", null], - [[12, 0], "Copyright", "sid", null], - [2, "FullName", "sid", null], - [3, "FamilyName", "sid", null], - [4, "Weight", "sid", null], - [[12, 1], "isFixedPitch", "num", 0], - [[12, 2], "ItalicAngle", "num", 0], - [[12, 3], "UnderlinePosition", "num", -100], - [[12, 4], "UnderlineThickness", "num", 50], - [[12, 5], "PaintType", "num", 0], - [[12, 6], "CharstringType", "num", 2], - [ - [12, 7], - "FontMatrix", - ["num", "num", "num", "num", "num", "num"], - [0.001, 0, 0, 0.001, 0, 0], - ], - [13, "UniqueID", "num", null], - [5, "FontBBox", ["num", "num", "num", "num"], [0, 0, 0, 0]], - [[12, 8], "StrokeWidth", "num", 0], - [14, "XUID", "array", null], - [15, "charset", "offset", 0], - [16, "Encoding", "offset", 0], - [17, "CharStrings", "offset", 0], - [18, "Private", ["offset", "offset"], null], - [[12, 21], "PostScript", "sid", null], - [[12, 22], "BaseFontName", "sid", null], - [[12, 23], "BaseFontBlend", "delta", null], - [[12, 31], "CIDFontVersion", "num", 0], - [[12, 32], "CIDFontRevision", "num", 0], - [[12, 33], "CIDFontType", "num", 0], - [[12, 34], "CIDCount", "num", 8720], - [[12, 35], "UIDBase", "num", null], - [[12, 37], "FDSelect", "offset", null], - [[12, 36], "FDArray", "offset", null], - [[12, 38], "FontName", "sid", null], - ]; - class CFFTopDict extends CFFDict { - static get tables() { - return (0, r.shadow)(this, "tables", this.createTables(h)); - } - constructor(e) { - super(CFFTopDict.tables, e); - this.privateDict = null; - } - } - t.CFFTopDict = CFFTopDict; - const u = [ - [6, "BlueValues", "delta", null], - [7, "OtherBlues", "delta", null], - [8, "FamilyBlues", "delta", null], - [9, "FamilyOtherBlues", "delta", null], - [[12, 9], "BlueScale", "num", 0.039625], - [[12, 10], "BlueShift", "num", 7], - [[12, 11], "BlueFuzz", "num", 1], - [10, "StdHW", "num", null], - [11, "StdVW", "num", null], - [[12, 12], "StemSnapH", "delta", null], - [[12, 13], "StemSnapV", "delta", null], - [[12, 14], "ForceBold", "num", 0], - [[12, 17], "LanguageGroup", "num", 0], - [[12, 18], "ExpansionFactor", "num", 0.06], - [[12, 19], "initialRandomSeed", "num", 0], - [20, "defaultWidthX", "num", 0], - [21, "nominalWidthX", "num", 0], - [19, "Subrs", "offset", null], - ]; - class CFFPrivateDict extends CFFDict { - static get tables() { - return (0, r.shadow)(this, "tables", this.createTables(u)); - } - constructor(e) { - super(CFFPrivateDict.tables, e); - this.subrsIndex = null; - } - } - t.CFFPrivateDict = CFFPrivateDict; - const d = { ISO_ADOBE: 0, EXPERT: 1, EXPERT_SUBSET: 2 }; - class CFFCharset { - constructor(e, t, a, r) { - this.predefined = e; - this.format = t; - this.charset = a; - this.raw = r; - } - } - t.CFFCharset = CFFCharset; - class CFFEncoding { - constructor(e, t, a, r) { - this.predefined = e; - this.format = t; - this.encoding = a; - this.raw = r; - } - } - class CFFFDSelect { - constructor(e, t) { - this.format = e; - this.fdSelect = t; - } - getFDIndex(e) { - return e < 0 || e >= this.fdSelect.length ? -1 : this.fdSelect[e]; - } - } - t.CFFFDSelect = CFFFDSelect; - class CFFOffsetTracker { - constructor() { - this.offsets = Object.create(null); - } - isTracking(e) { - return e in this.offsets; - } - track(e, t) { - if (e in this.offsets) - throw new r.FormatError(`Already tracking location of ${e}`); - this.offsets[e] = t; - } - offset(e) { - for (const t in this.offsets) this.offsets[t] += e; - } - setEntryLocation(e, t, a) { - if (!(e in this.offsets)) - throw new r.FormatError(`Not tracking location of ${e}`); - const n = a.data, - i = this.offsets[e]; - for (let e = 0, a = t.length; e < a; ++e) { - const a = 5 * e + i, - s = a + 1, - o = a + 2, - c = a + 3, - l = a + 4; - if ( - 29 !== n[a] || - 0 !== n[s] || - 0 !== n[o] || - 0 !== n[c] || - 0 !== n[l] - ) - throw new r.FormatError( - "writing to an offset that is not empty", - ); - const h = t[e]; - n[a] = 29; - n[s] = (h >> 24) & 255; - n[o] = (h >> 16) & 255; - n[c] = (h >> 8) & 255; - n[l] = 255 & h; - } - } - } - class CFFCompiler { - constructor(e) { - this.cff = e; - } - compile() { - const e = this.cff, - t = { - data: [], - length: 0, - add(e) { - try { - this.data.push(...e); - } catch { - this.data = this.data.concat(e); - } - this.length = this.data.length; - }, - }, - a = this.compileHeader(e.header); - t.add(a); - const n = this.compileNameIndex(e.names); - t.add(n); - if (e.isCIDFont && e.topDict.hasName("FontMatrix")) { - const t = e.topDict.getByName("FontMatrix"); - e.topDict.removeByName("FontMatrix"); - for (const a of e.fdArray) { - let e = t.slice(0); - a.hasName("FontMatrix") && - (e = r.Util.transform(e, a.getByName("FontMatrix"))); - a.setByName("FontMatrix", e); - } - } - const i = e.topDict.getByName("XUID"); - i?.length > 16 && e.topDict.removeByName("XUID"); - e.topDict.setByName("charset", 0); - let s = this.compileTopDicts([e.topDict], t.length, e.isCIDFont); - t.add(s.output); - const o = s.trackers[0], - c = this.compileStringIndex(e.strings.strings); - t.add(c); - const l = this.compileIndex(e.globalSubrIndex); - t.add(l); - if (e.encoding && e.topDict.hasName("Encoding")) - if (e.encoding.predefined) - o.setEntryLocation("Encoding", [e.encoding.format], t); - else { - const a = this.compileEncoding(e.encoding); - o.setEntryLocation("Encoding", [t.length], t); - t.add(a); - } - const h = this.compileCharset( - e.charset, - e.charStrings.count, - e.strings, - e.isCIDFont, - ); - o.setEntryLocation("charset", [t.length], t); - t.add(h); - const u = this.compileCharStrings(e.charStrings); - o.setEntryLocation("CharStrings", [t.length], t); - t.add(u); - if (e.isCIDFont) { - o.setEntryLocation("FDSelect", [t.length], t); - const a = this.compileFDSelect(e.fdSelect); - t.add(a); - s = this.compileTopDicts(e.fdArray, t.length, !0); - o.setEntryLocation("FDArray", [t.length], t); - t.add(s.output); - const r = s.trackers; - this.compilePrivateDicts(e.fdArray, r, t); - } - this.compilePrivateDicts([e.topDict], [o], t); - t.add([0]); - return t.data; - } - encodeNumber(e) { - return Number.isInteger(e) - ? this.encodeInteger(e) - : this.encodeFloat(e); - } - static get EncodeFloatRegExp() { - return (0, r.shadow)( - this, - "EncodeFloatRegExp", - /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/, - ); - } - encodeFloat(e) { - let t = e.toString(); - const a = CFFCompiler.EncodeFloatRegExp.exec(t); - if (a) { - const r = parseFloat("1e" + ((a[2] ? +a[2] : 0) + a[1].length)); - t = (Math.round(e * r) / r).toString(); - } - let r, - n, - i = ""; - for (r = 0, n = t.length; r < n; ++r) { - const e = t[r]; - i += - "e" === e - ? "-" === t[++r] - ? "c" - : "b" - : "." === e - ? "a" - : "-" === e - ? "e" - : e; - } - i += 1 & i.length ? "f" : "ff"; - const s = [30]; - for (r = 0, n = i.length; r < n; r += 2) - s.push(parseInt(i.substring(r, r + 2), 16)); - return s; - } - encodeInteger(e) { - let t; - t = - e >= -107 && e <= 107 - ? [e + 139] - : e >= 108 && e <= 1131 - ? [247 + ((e -= 108) >> 8), 255 & e] - : e >= -1131 && e <= -108 - ? [251 + ((e = -e - 108) >> 8), 255 & e] - : e >= -32768 && e <= 32767 - ? [28, (e >> 8) & 255, 255 & e] - : [ - 29, - (e >> 24) & 255, - (e >> 16) & 255, - (e >> 8) & 255, - 255 & e, - ]; - return t; - } - compileHeader(e) { - return [e.major, e.minor, 4, e.offSize]; - } - compileNameIndex(e) { - const t = new CFFIndex(); - for (const a of e) { - const e = Math.min(a.length, 127); - let n = new Array(e); - for (let t = 0; t < e; t++) { - let e = a[t]; - (e < "!" || - e > "~" || - "[" === e || - "]" === e || - "(" === e || - ")" === e || - "{" === e || - "}" === e || - "<" === e || - ">" === e || - "/" === e || - "%" === e) && - (e = "_"); - n[t] = e; - } - n = n.join(""); - "" === n && (n = "Bad_Font_Name"); - t.add((0, r.stringToBytes)(n)); - } - return this.compileIndex(t); - } - compileTopDicts(e, t, a) { - const r = []; - let n = new CFFIndex(); - for (const i of e) { - if (a) { - i.removeByName("CIDFontVersion"); - i.removeByName("CIDFontRevision"); - i.removeByName("CIDFontType"); - i.removeByName("CIDCount"); - i.removeByName("UIDBase"); - } - const e = new CFFOffsetTracker(), - s = this.compileDict(i, e); - r.push(e); - n.add(s); - e.offset(t); - } - n = this.compileIndex(n, r); - return { trackers: r, output: n }; - } - compilePrivateDicts(e, t, a) { - for (let n = 0, i = e.length; n < i; ++n) { - const i = e[n], - s = i.privateDict; - if (!s || !i.hasName("Private")) - throw new r.FormatError( - "There must be a private dictionary.", - ); - const o = new CFFOffsetTracker(), - c = this.compileDict(s, o); - let l = a.length; - o.offset(l); - c.length || (l = 0); - t[n].setEntryLocation("Private", [c.length, l], a); - a.add(c); - if (s.subrsIndex && s.hasName("Subrs")) { - const e = this.compileIndex(s.subrsIndex); - o.setEntryLocation("Subrs", [c.length], a); - a.add(e); - } - } - } - compileDict(e, t) { - const a = []; - for (const n of e.order) { - if (!(n in e.values)) continue; - let i = e.values[n], - s = e.types[n]; - Array.isArray(s) || (s = [s]); - Array.isArray(i) || (i = [i]); - if (0 !== i.length) { - for (let o = 0, c = s.length; o < c; ++o) { - const c = s[o], - l = i[o]; - switch (c) { - case "num": - case "sid": - a.push(...this.encodeNumber(l)); - break; - case "offset": - const s = e.keyToNameMap[n]; - t.isTracking(s) || t.track(s, a.length); - a.push(29, 0, 0, 0, 0); - break; - case "array": - case "delta": - a.push(...this.encodeNumber(l)); - for (let e = 1, t = i.length; e < t; ++e) - a.push(...this.encodeNumber(i[e])); - break; - default: - throw new r.FormatError(`Unknown data type of ${c}`); - } - } - a.push(...e.opcodes[n]); - } - } - return a; - } - compileStringIndex(e) { - const t = new CFFIndex(); - for (const a of e) t.add((0, r.stringToBytes)(a)); - return this.compileIndex(t); - } - compileCharStrings(e) { - const t = new CFFIndex(); - for (let a = 0; a < e.count; a++) { - const r = e.get(a); - 0 !== r.length ? t.add(r) : t.add(new Uint8Array([139, 14])); - } - return this.compileIndex(t); - } - compileCharset(e, t, a, n) { - let i; - const s = t - 1; - if (n) i = new Uint8Array([2, 0, 0, (s >> 8) & 255, 255 & s]); - else { - i = new Uint8Array(1 + 2 * s); - i[0] = 0; - let t = 0; - const n = e.charset.length; - let o = !1; - for (let s = 1; s < i.length; s += 2) { - let c = 0; - if (t < n) { - const n = e.charset[t++]; - c = a.getSID(n); - if (-1 === c) { - c = 0; - if (!o) { - o = !0; - (0, r.warn)(`Couldn't find ${n} in CFF strings`); - } - } - } - i[s] = (c >> 8) & 255; - i[s + 1] = 255 & c; - } - } - return this.compileTypedArray(i); - } - compileEncoding(e) { - return this.compileTypedArray(e.raw); - } - compileFDSelect(e) { - const t = e.format; - let a, r; - switch (t) { - case 0: - a = new Uint8Array(1 + e.fdSelect.length); - a[0] = t; - for (r = 0; r < e.fdSelect.length; r++) - a[r + 1] = e.fdSelect[r]; - break; - case 3: - const n = 0; - let i = e.fdSelect[0]; - const s = [t, 0, 0, (n >> 8) & 255, 255 & n, i]; - for (r = 1; r < e.fdSelect.length; r++) { - const t = e.fdSelect[r]; - if (t !== i) { - s.push((r >> 8) & 255, 255 & r, t); - i = t; - } - } - const o = (s.length - 3) / 3; - s[1] = (o >> 8) & 255; - s[2] = 255 & o; - s.push((r >> 8) & 255, 255 & r); - a = new Uint8Array(s); - } - return this.compileTypedArray(a); - } - compileTypedArray(e) { - return Array.from(e); - } - compileIndex(e, t = []) { - const a = e.objects, - r = a.length; - if (0 === r) return [0, 0]; - const n = [(r >> 8) & 255, 255 & r]; - let i, - s, - o = 1; - for (i = 0; i < r; ++i) o += a[i].length; - s = o < 256 ? 1 : o < 65536 ? 2 : o < 16777216 ? 3 : 4; - n.push(s); - let c = 1; - for (i = 0; i < r + 1; i++) { - 1 === s - ? n.push(255 & c) - : 2 === s - ? n.push((c >> 8) & 255, 255 & c) - : 3 === s - ? n.push((c >> 16) & 255, (c >> 8) & 255, 255 & c) - : n.push( - (c >>> 24) & 255, - (c >> 16) & 255, - (c >> 8) & 255, - 255 & c, - ); - a[i] && (c += a[i].length); - } - for (i = 0; i < r; i++) { - t[i] && t[i].offset(n.length); - n.push(...a[i]); - } - return n; - } - } - t.CFFCompiler = CFFCompiler; - }, - (e, t) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.ISOAdobeCharset = t.ExpertSubsetCharset = t.ExpertCharset = void 0; - t.ISOAdobeCharset = [ - ".notdef", - "space", - "exclam", - "quotedbl", - "numbersign", - "dollar", - "percent", - "ampersand", - "quoteright", - "parenleft", - "parenright", - "asterisk", - "plus", - "comma", - "hyphen", - "period", - "slash", - "zero", - "one", - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "colon", - "semicolon", - "less", - "equal", - "greater", - "question", - "at", - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J", - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T", - "U", - "V", - "W", - "X", - "Y", - "Z", - "bracketleft", - "backslash", - "bracketright", - "asciicircum", - "underscore", - "quoteleft", - "a", - "b", - "c", - "d", - "e", - "f", - "g", - "h", - "i", - "j", - "k", - "l", - "m", - "n", - "o", - "p", - "q", - "r", - "s", - "t", - "u", - "v", - "w", - "x", - "y", - "z", - "braceleft", - "bar", - "braceright", - "asciitilde", - "exclamdown", - "cent", - "sterling", - "fraction", - "yen", - "florin", - "section", - "currency", - "quotesingle", - "quotedblleft", - "guillemotleft", - "guilsinglleft", - "guilsinglright", - "fi", - "fl", - "endash", - "dagger", - "daggerdbl", - "periodcentered", - "paragraph", - "bullet", - "quotesinglbase", - "quotedblbase", - "quotedblright", - "guillemotright", - "ellipsis", - "perthousand", - "questiondown", - "grave", - "acute", - "circumflex", - "tilde", - "macron", - "breve", - "dotaccent", - "dieresis", - "ring", - "cedilla", - "hungarumlaut", - "ogonek", - "caron", - "emdash", - "AE", - "ordfeminine", - "Lslash", - "Oslash", - "OE", - "ordmasculine", - "ae", - "dotlessi", - "lslash", - "oslash", - "oe", - "germandbls", - "onesuperior", - "logicalnot", - "mu", - "trademark", - "Eth", - "onehalf", - "plusminus", - "Thorn", - "onequarter", - "divide", - "brokenbar", - "degree", - "thorn", - "threequarters", - "twosuperior", - "registered", - "minus", - "eth", - "multiply", - "threesuperior", - "copyright", - "Aacute", - "Acircumflex", - "Adieresis", - "Agrave", - "Aring", - "Atilde", - "Ccedilla", - "Eacute", - "Ecircumflex", - "Edieresis", - "Egrave", - "Iacute", - "Icircumflex", - "Idieresis", - "Igrave", - "Ntilde", - "Oacute", - "Ocircumflex", - "Odieresis", - "Ograve", - "Otilde", - "Scaron", - "Uacute", - "Ucircumflex", - "Udieresis", - "Ugrave", - "Yacute", - "Ydieresis", - "Zcaron", - "aacute", - "acircumflex", - "adieresis", - "agrave", - "aring", - "atilde", - "ccedilla", - "eacute", - "ecircumflex", - "edieresis", - "egrave", - "iacute", - "icircumflex", - "idieresis", - "igrave", - "ntilde", - "oacute", - "ocircumflex", - "odieresis", - "ograve", - "otilde", - "scaron", - "uacute", - "ucircumflex", - "udieresis", - "ugrave", - "yacute", - "ydieresis", - "zcaron", - ]; - t.ExpertCharset = [ - ".notdef", - "space", - "exclamsmall", - "Hungarumlautsmall", - "dollaroldstyle", - "dollarsuperior", - "ampersandsmall", - "Acutesmall", - "parenleftsuperior", - "parenrightsuperior", - "twodotenleader", - "onedotenleader", - "comma", - "hyphen", - "period", - "fraction", - "zerooldstyle", - "oneoldstyle", - "twooldstyle", - "threeoldstyle", - "fouroldstyle", - "fiveoldstyle", - "sixoldstyle", - "sevenoldstyle", - "eightoldstyle", - "nineoldstyle", - "colon", - "semicolon", - "commasuperior", - "threequartersemdash", - "periodsuperior", - "questionsmall", - "asuperior", - "bsuperior", - "centsuperior", - "dsuperior", - "esuperior", - "isuperior", - "lsuperior", - "msuperior", - "nsuperior", - "osuperior", - "rsuperior", - "ssuperior", - "tsuperior", - "ff", - "fi", - "fl", - "ffi", - "ffl", - "parenleftinferior", - "parenrightinferior", - "Circumflexsmall", - "hyphensuperior", - "Gravesmall", - "Asmall", - "Bsmall", - "Csmall", - "Dsmall", - "Esmall", - "Fsmall", - "Gsmall", - "Hsmall", - "Ismall", - "Jsmall", - "Ksmall", - "Lsmall", - "Msmall", - "Nsmall", - "Osmall", - "Psmall", - "Qsmall", - "Rsmall", - "Ssmall", - "Tsmall", - "Usmall", - "Vsmall", - "Wsmall", - "Xsmall", - "Ysmall", - "Zsmall", - "colonmonetary", - "onefitted", - "rupiah", - "Tildesmall", - "exclamdownsmall", - "centoldstyle", - "Lslashsmall", - "Scaronsmall", - "Zcaronsmall", - "Dieresissmall", - "Brevesmall", - "Caronsmall", - "Dotaccentsmall", - "Macronsmall", - "figuredash", - "hypheninferior", - "Ogoneksmall", - "Ringsmall", - "Cedillasmall", - "onequarter", - "onehalf", - "threequarters", - "questiondownsmall", - "oneeighth", - "threeeighths", - "fiveeighths", - "seveneighths", - "onethird", - "twothirds", - "zerosuperior", - "onesuperior", - "twosuperior", - "threesuperior", - "foursuperior", - "fivesuperior", - "sixsuperior", - "sevensuperior", - "eightsuperior", - "ninesuperior", - "zeroinferior", - "oneinferior", - "twoinferior", - "threeinferior", - "fourinferior", - "fiveinferior", - "sixinferior", - "seveninferior", - "eightinferior", - "nineinferior", - "centinferior", - "dollarinferior", - "periodinferior", - "commainferior", - "Agravesmall", - "Aacutesmall", - "Acircumflexsmall", - "Atildesmall", - "Adieresissmall", - "Aringsmall", - "AEsmall", - "Ccedillasmall", - "Egravesmall", - "Eacutesmall", - "Ecircumflexsmall", - "Edieresissmall", - "Igravesmall", - "Iacutesmall", - "Icircumflexsmall", - "Idieresissmall", - "Ethsmall", - "Ntildesmall", - "Ogravesmall", - "Oacutesmall", - "Ocircumflexsmall", - "Otildesmall", - "Odieresissmall", - "OEsmall", - "Oslashsmall", - "Ugravesmall", - "Uacutesmall", - "Ucircumflexsmall", - "Udieresissmall", - "Yacutesmall", - "Thornsmall", - "Ydieresissmall", - ]; - t.ExpertSubsetCharset = [ - ".notdef", - "space", - "dollaroldstyle", - "dollarsuperior", - "parenleftsuperior", - "parenrightsuperior", - "twodotenleader", - "onedotenleader", - "comma", - "hyphen", - "period", - "fraction", - "zerooldstyle", - "oneoldstyle", - "twooldstyle", - "threeoldstyle", - "fouroldstyle", - "fiveoldstyle", - "sixoldstyle", - "sevenoldstyle", - "eightoldstyle", - "nineoldstyle", - "colon", - "semicolon", - "commasuperior", - "threequartersemdash", - "periodsuperior", - "asuperior", - "bsuperior", - "centsuperior", - "dsuperior", - "esuperior", - "isuperior", - "lsuperior", - "msuperior", - "nsuperior", - "osuperior", - "rsuperior", - "ssuperior", - "tsuperior", - "ff", - "fi", - "fl", - "ffi", - "ffl", - "parenleftinferior", - "parenrightinferior", - "hyphensuperior", - "colonmonetary", - "onefitted", - "rupiah", - "centoldstyle", - "figuredash", - "hypheninferior", - "onequarter", - "onehalf", - "threequarters", - "oneeighth", - "threeeighths", - "fiveeighths", - "seveneighths", - "onethird", - "twothirds", - "zerosuperior", - "onesuperior", - "twosuperior", - "threesuperior", - "foursuperior", - "fivesuperior", - "sixsuperior", - "sevensuperior", - "eightsuperior", - "ninesuperior", - "zeroinferior", - "oneinferior", - "twoinferior", - "threeinferior", - "fourinferior", - "fiveinferior", - "sixinferior", - "seveninferior", - "eightinferior", - "nineinferior", - "centinferior", - "dollarinferior", - "periodinferior", - "commainferior", - ]; - }, - (e, t) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.ZapfDingbatsEncoding = - t.WinAnsiEncoding = - t.SymbolSetEncoding = - t.StandardEncoding = - t.MacRomanEncoding = - t.ExpertEncoding = - void 0; - t.getEncoding = function getEncoding(e) { - switch (e) { - case "WinAnsiEncoding": - return s; - case "StandardEncoding": - return i; - case "MacRomanEncoding": - return n; - case "SymbolSetEncoding": - return o; - case "ZapfDingbatsEncoding": - return c; - case "ExpertEncoding": - return a; - case "MacExpertEncoding": - return r; - default: - return null; - } - }; - const a = [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "space", - "exclamsmall", - "Hungarumlautsmall", - "", - "dollaroldstyle", - "dollarsuperior", - "ampersandsmall", - "Acutesmall", - "parenleftsuperior", - "parenrightsuperior", - "twodotenleader", - "onedotenleader", - "comma", - "hyphen", - "period", - "fraction", - "zerooldstyle", - "oneoldstyle", - "twooldstyle", - "threeoldstyle", - "fouroldstyle", - "fiveoldstyle", - "sixoldstyle", - "sevenoldstyle", - "eightoldstyle", - "nineoldstyle", - "colon", - "semicolon", - "commasuperior", - "threequartersemdash", - "periodsuperior", - "questionsmall", - "", - "asuperior", - "bsuperior", - "centsuperior", - "dsuperior", - "esuperior", - "", - "", - "", - "isuperior", - "", - "", - "lsuperior", - "msuperior", - "nsuperior", - "osuperior", - "", - "", - "rsuperior", - "ssuperior", - "tsuperior", - "", - "ff", - "fi", - "fl", - "ffi", - "ffl", - "parenleftinferior", - "", - "parenrightinferior", - "Circumflexsmall", - "hyphensuperior", - "Gravesmall", - "Asmall", - "Bsmall", - "Csmall", - "Dsmall", - "Esmall", - "Fsmall", - "Gsmall", - "Hsmall", - "Ismall", - "Jsmall", - "Ksmall", - "Lsmall", - "Msmall", - "Nsmall", - "Osmall", - "Psmall", - "Qsmall", - "Rsmall", - "Ssmall", - "Tsmall", - "Usmall", - "Vsmall", - "Wsmall", - "Xsmall", - "Ysmall", - "Zsmall", - "colonmonetary", - "onefitted", - "rupiah", - "Tildesmall", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "exclamdownsmall", - "centoldstyle", - "Lslashsmall", - "", - "", - "Scaronsmall", - "Zcaronsmall", - "Dieresissmall", - "Brevesmall", - "Caronsmall", - "", - "Dotaccentsmall", - "", - "", - "Macronsmall", - "", - "", - "figuredash", - "hypheninferior", - "", - "", - "Ogoneksmall", - "Ringsmall", - "Cedillasmall", - "", - "", - "", - "onequarter", - "onehalf", - "threequarters", - "questiondownsmall", - "oneeighth", - "threeeighths", - "fiveeighths", - "seveneighths", - "onethird", - "twothirds", - "", - "", - "zerosuperior", - "onesuperior", - "twosuperior", - "threesuperior", - "foursuperior", - "fivesuperior", - "sixsuperior", - "sevensuperior", - "eightsuperior", - "ninesuperior", - "zeroinferior", - "oneinferior", - "twoinferior", - "threeinferior", - "fourinferior", - "fiveinferior", - "sixinferior", - "seveninferior", - "eightinferior", - "nineinferior", - "centinferior", - "dollarinferior", - "periodinferior", - "commainferior", - "Agravesmall", - "Aacutesmall", - "Acircumflexsmall", - "Atildesmall", - "Adieresissmall", - "Aringsmall", - "AEsmall", - "Ccedillasmall", - "Egravesmall", - "Eacutesmall", - "Ecircumflexsmall", - "Edieresissmall", - "Igravesmall", - "Iacutesmall", - "Icircumflexsmall", - "Idieresissmall", - "Ethsmall", - "Ntildesmall", - "Ogravesmall", - "Oacutesmall", - "Ocircumflexsmall", - "Otildesmall", - "Odieresissmall", - "OEsmall", - "Oslashsmall", - "Ugravesmall", - "Uacutesmall", - "Ucircumflexsmall", - "Udieresissmall", - "Yacutesmall", - "Thornsmall", - "Ydieresissmall", - ]; - t.ExpertEncoding = a; - const r = [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "space", - "exclamsmall", - "Hungarumlautsmall", - "centoldstyle", - "dollaroldstyle", - "dollarsuperior", - "ampersandsmall", - "Acutesmall", - "parenleftsuperior", - "parenrightsuperior", - "twodotenleader", - "onedotenleader", - "comma", - "hyphen", - "period", - "fraction", - "zerooldstyle", - "oneoldstyle", - "twooldstyle", - "threeoldstyle", - "fouroldstyle", - "fiveoldstyle", - "sixoldstyle", - "sevenoldstyle", - "eightoldstyle", - "nineoldstyle", - "colon", - "semicolon", - "", - "threequartersemdash", - "", - "questionsmall", - "", - "", - "", - "", - "Ethsmall", - "", - "", - "onequarter", - "onehalf", - "threequarters", - "oneeighth", - "threeeighths", - "fiveeighths", - "seveneighths", - "onethird", - "twothirds", - "", - "", - "", - "", - "", - "", - "ff", - "fi", - "fl", - "ffi", - "ffl", - "parenleftinferior", - "", - "parenrightinferior", - "Circumflexsmall", - "hypheninferior", - "Gravesmall", - "Asmall", - "Bsmall", - "Csmall", - "Dsmall", - "Esmall", - "Fsmall", - "Gsmall", - "Hsmall", - "Ismall", - "Jsmall", - "Ksmall", - "Lsmall", - "Msmall", - "Nsmall", - "Osmall", - "Psmall", - "Qsmall", - "Rsmall", - "Ssmall", - "Tsmall", - "Usmall", - "Vsmall", - "Wsmall", - "Xsmall", - "Ysmall", - "Zsmall", - "colonmonetary", - "onefitted", - "rupiah", - "Tildesmall", - "", - "", - "asuperior", - "centsuperior", - "", - "", - "", - "", - "Aacutesmall", - "Agravesmall", - "Acircumflexsmall", - "Adieresissmall", - "Atildesmall", - "Aringsmall", - "Ccedillasmall", - "Eacutesmall", - "Egravesmall", - "Ecircumflexsmall", - "Edieresissmall", - "Iacutesmall", - "Igravesmall", - "Icircumflexsmall", - "Idieresissmall", - "Ntildesmall", - "Oacutesmall", - "Ogravesmall", - "Ocircumflexsmall", - "Odieresissmall", - "Otildesmall", - "Uacutesmall", - "Ugravesmall", - "Ucircumflexsmall", - "Udieresissmall", - "", - "eightsuperior", - "fourinferior", - "threeinferior", - "sixinferior", - "eightinferior", - "seveninferior", - "Scaronsmall", - "", - "centinferior", - "twoinferior", - "", - "Dieresissmall", - "", - "Caronsmall", - "osuperior", - "fiveinferior", - "", - "commainferior", - "periodinferior", - "Yacutesmall", - "", - "dollarinferior", - "", - "", - "Thornsmall", - "", - "nineinferior", - "zeroinferior", - "Zcaronsmall", - "AEsmall", - "Oslashsmall", - "questiondownsmall", - "oneinferior", - "Lslashsmall", - "", - "", - "", - "", - "", - "", - "Cedillasmall", - "", - "", - "", - "", - "", - "OEsmall", - "figuredash", - "hyphensuperior", - "", - "", - "", - "", - "exclamdownsmall", - "", - "Ydieresissmall", - "", - "onesuperior", - "twosuperior", - "threesuperior", - "foursuperior", - "fivesuperior", - "sixsuperior", - "sevensuperior", - "ninesuperior", - "zerosuperior", - "", - "esuperior", - "rsuperior", - "tsuperior", - "", - "", - "isuperior", - "ssuperior", - "dsuperior", - "", - "", - "", - "", - "", - "lsuperior", - "Ogoneksmall", - "Brevesmall", - "Macronsmall", - "bsuperior", - "nsuperior", - "msuperior", - "commasuperior", - "periodsuperior", - "Dotaccentsmall", - "Ringsmall", - "", - "", - "", - "", - ], - n = [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "space", - "exclam", - "quotedbl", - "numbersign", - "dollar", - "percent", - "ampersand", - "quotesingle", - "parenleft", - "parenright", - "asterisk", - "plus", - "comma", - "hyphen", - "period", - "slash", - "zero", - "one", - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "colon", - "semicolon", - "less", - "equal", - "greater", - "question", - "at", - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J", - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T", - "U", - "V", - "W", - "X", - "Y", - "Z", - "bracketleft", - "backslash", - "bracketright", - "asciicircum", - "underscore", - "grave", - "a", - "b", - "c", - "d", - "e", - "f", - "g", - "h", - "i", - "j", - "k", - "l", - "m", - "n", - "o", - "p", - "q", - "r", - "s", - "t", - "u", - "v", - "w", - "x", - "y", - "z", - "braceleft", - "bar", - "braceright", - "asciitilde", - "", - "Adieresis", - "Aring", - "Ccedilla", - "Eacute", - "Ntilde", - "Odieresis", - "Udieresis", - "aacute", - "agrave", - "acircumflex", - "adieresis", - "atilde", - "aring", - "ccedilla", - "eacute", - "egrave", - "ecircumflex", - "edieresis", - "iacute", - "igrave", - "icircumflex", - "idieresis", - "ntilde", - "oacute", - "ograve", - "ocircumflex", - "odieresis", - "otilde", - "uacute", - "ugrave", - "ucircumflex", - "udieresis", - "dagger", - "degree", - "cent", - "sterling", - "section", - "bullet", - "paragraph", - "germandbls", - "registered", - "copyright", - "trademark", - "acute", - "dieresis", - "notequal", - "AE", - "Oslash", - "infinity", - "plusminus", - "lessequal", - "greaterequal", - "yen", - "mu", - "partialdiff", - "summation", - "product", - "pi", - "integral", - "ordfeminine", - "ordmasculine", - "Omega", - "ae", - "oslash", - "questiondown", - "exclamdown", - "logicalnot", - "radical", - "florin", - "approxequal", - "Delta", - "guillemotleft", - "guillemotright", - "ellipsis", - "space", - "Agrave", - "Atilde", - "Otilde", - "OE", - "oe", - "endash", - "emdash", - "quotedblleft", - "quotedblright", - "quoteleft", - "quoteright", - "divide", - "lozenge", - "ydieresis", - "Ydieresis", - "fraction", - "currency", - "guilsinglleft", - "guilsinglright", - "fi", - "fl", - "daggerdbl", - "periodcentered", - "quotesinglbase", - "quotedblbase", - "perthousand", - "Acircumflex", - "Ecircumflex", - "Aacute", - "Edieresis", - "Egrave", - "Iacute", - "Icircumflex", - "Idieresis", - "Igrave", - "Oacute", - "Ocircumflex", - "apple", - "Ograve", - "Uacute", - "Ucircumflex", - "Ugrave", - "dotlessi", - "circumflex", - "tilde", - "macron", - "breve", - "dotaccent", - "ring", - "cedilla", - "hungarumlaut", - "ogonek", - "caron", - ]; - t.MacRomanEncoding = n; - const i = [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "space", - "exclam", - "quotedbl", - "numbersign", - "dollar", - "percent", - "ampersand", - "quoteright", - "parenleft", - "parenright", - "asterisk", - "plus", - "comma", - "hyphen", - "period", - "slash", - "zero", - "one", - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "colon", - "semicolon", - "less", - "equal", - "greater", - "question", - "at", - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J", - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T", - "U", - "V", - "W", - "X", - "Y", - "Z", - "bracketleft", - "backslash", - "bracketright", - "asciicircum", - "underscore", - "quoteleft", - "a", - "b", - "c", - "d", - "e", - "f", - "g", - "h", - "i", - "j", - "k", - "l", - "m", - "n", - "o", - "p", - "q", - "r", - "s", - "t", - "u", - "v", - "w", - "x", - "y", - "z", - "braceleft", - "bar", - "braceright", - "asciitilde", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "exclamdown", - "cent", - "sterling", - "fraction", - "yen", - "florin", - "section", - "currency", - "quotesingle", - "quotedblleft", - "guillemotleft", - "guilsinglleft", - "guilsinglright", - "fi", - "fl", - "", - "endash", - "dagger", - "daggerdbl", - "periodcentered", - "", - "paragraph", - "bullet", - "quotesinglbase", - "quotedblbase", - "quotedblright", - "guillemotright", - "ellipsis", - "perthousand", - "", - "questiondown", - "", - "grave", - "acute", - "circumflex", - "tilde", - "macron", - "breve", - "dotaccent", - "dieresis", - "", - "ring", - "cedilla", - "", - "hungarumlaut", - "ogonek", - "caron", - "emdash", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "AE", - "", - "ordfeminine", - "", - "", - "", - "", - "Lslash", - "Oslash", - "OE", - "ordmasculine", - "", - "", - "", - "", - "", - "ae", - "", - "", - "", - "dotlessi", - "", - "", - "lslash", - "oslash", - "oe", - "germandbls", - "", - "", - "", - "", - ]; - t.StandardEncoding = i; - const s = [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "space", - "exclam", - "quotedbl", - "numbersign", - "dollar", - "percent", - "ampersand", - "quotesingle", - "parenleft", - "parenright", - "asterisk", - "plus", - "comma", - "hyphen", - "period", - "slash", - "zero", - "one", - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "colon", - "semicolon", - "less", - "equal", - "greater", - "question", - "at", - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J", - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T", - "U", - "V", - "W", - "X", - "Y", - "Z", - "bracketleft", - "backslash", - "bracketright", - "asciicircum", - "underscore", - "grave", - "a", - "b", - "c", - "d", - "e", - "f", - "g", - "h", - "i", - "j", - "k", - "l", - "m", - "n", - "o", - "p", - "q", - "r", - "s", - "t", - "u", - "v", - "w", - "x", - "y", - "z", - "braceleft", - "bar", - "braceright", - "asciitilde", - "bullet", - "Euro", - "bullet", - "quotesinglbase", - "florin", - "quotedblbase", - "ellipsis", - "dagger", - "daggerdbl", - "circumflex", - "perthousand", - "Scaron", - "guilsinglleft", - "OE", - "bullet", - "Zcaron", - "bullet", - "bullet", - "quoteleft", - "quoteright", - "quotedblleft", - "quotedblright", - "bullet", - "endash", - "emdash", - "tilde", - "trademark", - "scaron", - "guilsinglright", - "oe", - "bullet", - "zcaron", - "Ydieresis", - "space", - "exclamdown", - "cent", - "sterling", - "currency", - "yen", - "brokenbar", - "section", - "dieresis", - "copyright", - "ordfeminine", - "guillemotleft", - "logicalnot", - "hyphen", - "registered", - "macron", - "degree", - "plusminus", - "twosuperior", - "threesuperior", - "acute", - "mu", - "paragraph", - "periodcentered", - "cedilla", - "onesuperior", - "ordmasculine", - "guillemotright", - "onequarter", - "onehalf", - "threequarters", - "questiondown", - "Agrave", - "Aacute", - "Acircumflex", - "Atilde", - "Adieresis", - "Aring", - "AE", - "Ccedilla", - "Egrave", - "Eacute", - "Ecircumflex", - "Edieresis", - "Igrave", - "Iacute", - "Icircumflex", - "Idieresis", - "Eth", - "Ntilde", - "Ograve", - "Oacute", - "Ocircumflex", - "Otilde", - "Odieresis", - "multiply", - "Oslash", - "Ugrave", - "Uacute", - "Ucircumflex", - "Udieresis", - "Yacute", - "Thorn", - "germandbls", - "agrave", - "aacute", - "acircumflex", - "atilde", - "adieresis", - "aring", - "ae", - "ccedilla", - "egrave", - "eacute", - "ecircumflex", - "edieresis", - "igrave", - "iacute", - "icircumflex", - "idieresis", - "eth", - "ntilde", - "ograve", - "oacute", - "ocircumflex", - "otilde", - "odieresis", - "divide", - "oslash", - "ugrave", - "uacute", - "ucircumflex", - "udieresis", - "yacute", - "thorn", - "ydieresis", - ]; - t.WinAnsiEncoding = s; - const o = [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "space", - "exclam", - "universal", - "numbersign", - "existential", - "percent", - "ampersand", - "suchthat", - "parenleft", - "parenright", - "asteriskmath", - "plus", - "comma", - "minus", - "period", - "slash", - "zero", - "one", - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "colon", - "semicolon", - "less", - "equal", - "greater", - "question", - "congruent", - "Alpha", - "Beta", - "Chi", - "Delta", - "Epsilon", - "Phi", - "Gamma", - "Eta", - "Iota", - "theta1", - "Kappa", - "Lambda", - "Mu", - "Nu", - "Omicron", - "Pi", - "Theta", - "Rho", - "Sigma", - "Tau", - "Upsilon", - "sigma1", - "Omega", - "Xi", - "Psi", - "Zeta", - "bracketleft", - "therefore", - "bracketright", - "perpendicular", - "underscore", - "radicalex", - "alpha", - "beta", - "chi", - "delta", - "epsilon", - "phi", - "gamma", - "eta", - "iota", - "phi1", - "kappa", - "lambda", - "mu", - "nu", - "omicron", - "pi", - "theta", - "rho", - "sigma", - "tau", - "upsilon", - "omega1", - "omega", - "xi", - "psi", - "zeta", - "braceleft", - "bar", - "braceright", - "similar", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "Euro", - "Upsilon1", - "minute", - "lessequal", - "fraction", - "infinity", - "florin", - "club", - "diamond", - "heart", - "spade", - "arrowboth", - "arrowleft", - "arrowup", - "arrowright", - "arrowdown", - "degree", - "plusminus", - "second", - "greaterequal", - "multiply", - "proportional", - "partialdiff", - "bullet", - "divide", - "notequal", - "equivalence", - "approxequal", - "ellipsis", - "arrowvertex", - "arrowhorizex", - "carriagereturn", - "aleph", - "Ifraktur", - "Rfraktur", - "weierstrass", - "circlemultiply", - "circleplus", - "emptyset", - "intersection", - "union", - "propersuperset", - "reflexsuperset", - "notsubset", - "propersubset", - "reflexsubset", - "element", - "notelement", - "angle", - "gradient", - "registerserif", - "copyrightserif", - "trademarkserif", - "product", - "radical", - "dotmath", - "logicalnot", - "logicaland", - "logicalor", - "arrowdblboth", - "arrowdblleft", - "arrowdblup", - "arrowdblright", - "arrowdbldown", - "lozenge", - "angleleft", - "registersans", - "copyrightsans", - "trademarksans", - "summation", - "parenlefttp", - "parenleftex", - "parenleftbt", - "bracketlefttp", - "bracketleftex", - "bracketleftbt", - "bracelefttp", - "braceleftmid", - "braceleftbt", - "braceex", - "", - "angleright", - "integral", - "integraltp", - "integralex", - "integralbt", - "parenrighttp", - "parenrightex", - "parenrightbt", - "bracketrighttp", - "bracketrightex", - "bracketrightbt", - "bracerighttp", - "bracerightmid", - "bracerightbt", - "", - ]; - t.SymbolSetEncoding = o; - const c = [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "space", - "a1", - "a2", - "a202", - "a3", - "a4", - "a5", - "a119", - "a118", - "a117", - "a11", - "a12", - "a13", - "a14", - "a15", - "a16", - "a105", - "a17", - "a18", - "a19", - "a20", - "a21", - "a22", - "a23", - "a24", - "a25", - "a26", - "a27", - "a28", - "a6", - "a7", - "a8", - "a9", - "a10", - "a29", - "a30", - "a31", - "a32", - "a33", - "a34", - "a35", - "a36", - "a37", - "a38", - "a39", - "a40", - "a41", - "a42", - "a43", - "a44", - "a45", - "a46", - "a47", - "a48", - "a49", - "a50", - "a51", - "a52", - "a53", - "a54", - "a55", - "a56", - "a57", - "a58", - "a59", - "a60", - "a61", - "a62", - "a63", - "a64", - "a65", - "a66", - "a67", - "a68", - "a69", - "a70", - "a71", - "a72", - "a73", - "a74", - "a203", - "a75", - "a204", - "a76", - "a77", - "a78", - "a79", - "a81", - "a82", - "a83", - "a84", - "a97", - "a98", - "a99", - "a100", - "", - "a89", - "a90", - "a93", - "a94", - "a91", - "a92", - "a205", - "a85", - "a206", - "a86", - "a87", - "a88", - "a95", - "a96", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "a101", - "a102", - "a103", - "a104", - "a106", - "a107", - "a108", - "a112", - "a111", - "a110", - "a109", - "a120", - "a121", - "a122", - "a123", - "a124", - "a125", - "a126", - "a127", - "a128", - "a129", - "a130", - "a131", - "a132", - "a133", - "a134", - "a135", - "a136", - "a137", - "a138", - "a139", - "a140", - "a141", - "a142", - "a143", - "a144", - "a145", - "a146", - "a147", - "a148", - "a149", - "a150", - "a151", - "a152", - "a153", - "a154", - "a155", - "a156", - "a157", - "a158", - "a159", - "a160", - "a161", - "a163", - "a164", - "a196", - "a165", - "a192", - "a166", - "a167", - "a168", - "a169", - "a170", - "a171", - "a172", - "a173", - "a162", - "a174", - "a175", - "a176", - "a177", - "a178", - "a179", - "a193", - "a180", - "a199", - "a181", - "a200", - "a182", - "", - "a201", - "a183", - "a184", - "a197", - "a185", - "a194", - "a198", - "a186", - "a195", - "a187", - "a188", - "a189", - "a190", - "a191", - "", - ]; - t.ZapfDingbatsEncoding = c; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.SEAC_ANALYSIS_ENABLED = - t.MacStandardGlyphOrdering = - t.FontFlags = - void 0; - t.normalizeFontName = function normalizeFontName(e) { - return e.replaceAll(/[,_]/g, "-").replaceAll(/\s/g, ""); - }; - t.recoverGlyphName = recoverGlyphName; - t.type1FontGlyphMapping = function type1FontGlyphMapping(e, t, a) { - const i = Object.create(null); - let s, c, l; - const h = !!(e.flags & o.Symbolic); - if (e.isInternalFont) { - l = t; - for (c = 0; c < l.length; c++) { - s = a.indexOf(l[c]); - i[c] = s >= 0 ? s : 0; - } - } else if (e.baseEncodingName) { - l = (0, r.getEncoding)(e.baseEncodingName); - for (c = 0; c < l.length; c++) { - s = a.indexOf(l[c]); - i[c] = s >= 0 ? s : 0; - } - } else if (h) for (c in t) i[c] = t[c]; - else { - l = r.StandardEncoding; - for (c = 0; c < l.length; c++) { - s = a.indexOf(l[c]); - i[c] = s >= 0 ? s : 0; - } - } - const u = e.differences; - let d; - if (u) - for (c in u) { - const e = u[c]; - s = a.indexOf(e); - if (-1 === s) { - d || (d = (0, n.getGlyphsUnicode)()); - const t = recoverGlyphName(e, d); - t !== e && (s = a.indexOf(t)); - } - i[c] = s >= 0 ? s : 0; - } - return i; - }; - var r = a(37), - n = a(39), - i = a(40), - s = a(2); - t.SEAC_ANALYSIS_ENABLED = !0; - const o = { - FixedPitch: 1, - Serif: 2, - Symbolic: 4, - Script: 8, - Nonsymbolic: 32, - Italic: 64, - AllCap: 65536, - SmallCap: 131072, - ForceBold: 262144, - }; - t.FontFlags = o; - t.MacStandardGlyphOrdering = [ - ".notdef", - ".null", - "nonmarkingreturn", - "space", - "exclam", - "quotedbl", - "numbersign", - "dollar", - "percent", - "ampersand", - "quotesingle", - "parenleft", - "parenright", - "asterisk", - "plus", - "comma", - "hyphen", - "period", - "slash", - "zero", - "one", - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "colon", - "semicolon", - "less", - "equal", - "greater", - "question", - "at", - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H", - "I", - "J", - "K", - "L", - "M", - "N", - "O", - "P", - "Q", - "R", - "S", - "T", - "U", - "V", - "W", - "X", - "Y", - "Z", - "bracketleft", - "backslash", - "bracketright", - "asciicircum", - "underscore", - "grave", - "a", - "b", - "c", - "d", - "e", - "f", - "g", - "h", - "i", - "j", - "k", - "l", - "m", - "n", - "o", - "p", - "q", - "r", - "s", - "t", - "u", - "v", - "w", - "x", - "y", - "z", - "braceleft", - "bar", - "braceright", - "asciitilde", - "Adieresis", - "Aring", - "Ccedilla", - "Eacute", - "Ntilde", - "Odieresis", - "Udieresis", - "aacute", - "agrave", - "acircumflex", - "adieresis", - "atilde", - "aring", - "ccedilla", - "eacute", - "egrave", - "ecircumflex", - "edieresis", - "iacute", - "igrave", - "icircumflex", - "idieresis", - "ntilde", - "oacute", - "ograve", - "ocircumflex", - "odieresis", - "otilde", - "uacute", - "ugrave", - "ucircumflex", - "udieresis", - "dagger", - "degree", - "cent", - "sterling", - "section", - "bullet", - "paragraph", - "germandbls", - "registered", - "copyright", - "trademark", - "acute", - "dieresis", - "notequal", - "AE", - "Oslash", - "infinity", - "plusminus", - "lessequal", - "greaterequal", - "yen", - "mu", - "partialdiff", - "summation", - "product", - "pi", - "integral", - "ordfeminine", - "ordmasculine", - "Omega", - "ae", - "oslash", - "questiondown", - "exclamdown", - "logicalnot", - "radical", - "florin", - "approxequal", - "Delta", - "guillemotleft", - "guillemotright", - "ellipsis", - "nonbreakingspace", - "Agrave", - "Atilde", - "Otilde", - "OE", - "oe", - "endash", - "emdash", - "quotedblleft", - "quotedblright", - "quoteleft", - "quoteright", - "divide", - "lozenge", - "ydieresis", - "Ydieresis", - "fraction", - "currency", - "guilsinglleft", - "guilsinglright", - "fi", - "fl", - "daggerdbl", - "periodcentered", - "quotesinglbase", - "quotedblbase", - "perthousand", - "Acircumflex", - "Ecircumflex", - "Aacute", - "Edieresis", - "Egrave", - "Iacute", - "Icircumflex", - "Idieresis", - "Igrave", - "Oacute", - "Ocircumflex", - "apple", - "Ograve", - "Uacute", - "Ucircumflex", - "Ugrave", - "dotlessi", - "circumflex", - "tilde", - "macron", - "breve", - "dotaccent", - "ring", - "cedilla", - "hungarumlaut", - "ogonek", - "caron", - "Lslash", - "lslash", - "Scaron", - "scaron", - "Zcaron", - "zcaron", - "brokenbar", - "Eth", - "eth", - "Yacute", - "yacute", - "Thorn", - "thorn", - "minus", - "multiply", - "onesuperior", - "twosuperior", - "threesuperior", - "onehalf", - "onequarter", - "threequarters", - "franc", - "Gbreve", - "gbreve", - "Idotaccent", - "Scedilla", - "scedilla", - "Cacute", - "cacute", - "Ccaron", - "ccaron", - "dcroat", - ]; - function recoverGlyphName(e, t) { - if (void 0 !== t[e]) return e; - const a = (0, i.getUnicodeForGlyph)(e, t); - if (-1 !== a) for (const e in t) if (t[e] === a) return e; - (0, s.info)("Unable to recover a standard glyph name for: " + e); - return e; - } - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.getGlyphsUnicode = t.getDingbatsGlyphsUnicode = void 0; - var r = a(3); - const n = (0, r.getLookupTableFactory)(function (e) { - e.A = 65; - e.AE = 198; - e.AEacute = 508; - e.AEmacron = 482; - e.AEsmall = 63462; - e.Aacute = 193; - e.Aacutesmall = 63457; - e.Abreve = 258; - e.Abreveacute = 7854; - e.Abrevecyrillic = 1232; - e.Abrevedotbelow = 7862; - e.Abrevegrave = 7856; - e.Abrevehookabove = 7858; - e.Abrevetilde = 7860; - e.Acaron = 461; - e.Acircle = 9398; - e.Acircumflex = 194; - e.Acircumflexacute = 7844; - e.Acircumflexdotbelow = 7852; - e.Acircumflexgrave = 7846; - e.Acircumflexhookabove = 7848; - e.Acircumflexsmall = 63458; - e.Acircumflextilde = 7850; - e.Acute = 63177; - e.Acutesmall = 63412; - e.Acyrillic = 1040; - e.Adblgrave = 512; - e.Adieresis = 196; - e.Adieresiscyrillic = 1234; - e.Adieresismacron = 478; - e.Adieresissmall = 63460; - e.Adotbelow = 7840; - e.Adotmacron = 480; - e.Agrave = 192; - e.Agravesmall = 63456; - e.Ahookabove = 7842; - e.Aiecyrillic = 1236; - e.Ainvertedbreve = 514; - e.Alpha = 913; - e.Alphatonos = 902; - e.Amacron = 256; - e.Amonospace = 65313; - e.Aogonek = 260; - e.Aring = 197; - e.Aringacute = 506; - e.Aringbelow = 7680; - e.Aringsmall = 63461; - e.Asmall = 63329; - e.Atilde = 195; - e.Atildesmall = 63459; - e.Aybarmenian = 1329; - e.B = 66; - e.Bcircle = 9399; - e.Bdotaccent = 7682; - e.Bdotbelow = 7684; - e.Becyrillic = 1041; - e.Benarmenian = 1330; - e.Beta = 914; - e.Bhook = 385; - e.Blinebelow = 7686; - e.Bmonospace = 65314; - e.Brevesmall = 63220; - e.Bsmall = 63330; - e.Btopbar = 386; - e.C = 67; - e.Caarmenian = 1342; - e.Cacute = 262; - e.Caron = 63178; - e.Caronsmall = 63221; - e.Ccaron = 268; - e.Ccedilla = 199; - e.Ccedillaacute = 7688; - e.Ccedillasmall = 63463; - e.Ccircle = 9400; - e.Ccircumflex = 264; - e.Cdot = 266; - e.Cdotaccent = 266; - e.Cedillasmall = 63416; - e.Chaarmenian = 1353; - e.Cheabkhasiancyrillic = 1212; - e.Checyrillic = 1063; - e.Chedescenderabkhasiancyrillic = 1214; - e.Chedescendercyrillic = 1206; - e.Chedieresiscyrillic = 1268; - e.Cheharmenian = 1347; - e.Chekhakassiancyrillic = 1227; - e.Cheverticalstrokecyrillic = 1208; - e.Chi = 935; - e.Chook = 391; - e.Circumflexsmall = 63222; - e.Cmonospace = 65315; - e.Coarmenian = 1361; - e.Csmall = 63331; - e.D = 68; - e.DZ = 497; - e.DZcaron = 452; - e.Daarmenian = 1332; - e.Dafrican = 393; - e.Dcaron = 270; - e.Dcedilla = 7696; - e.Dcircle = 9401; - e.Dcircumflexbelow = 7698; - e.Dcroat = 272; - e.Ddotaccent = 7690; - e.Ddotbelow = 7692; - e.Decyrillic = 1044; - e.Deicoptic = 1006; - e.Delta = 8710; - e.Deltagreek = 916; - e.Dhook = 394; - e.Dieresis = 63179; - e.DieresisAcute = 63180; - e.DieresisGrave = 63181; - e.Dieresissmall = 63400; - e.Digammagreek = 988; - e.Djecyrillic = 1026; - e.Dlinebelow = 7694; - e.Dmonospace = 65316; - e.Dotaccentsmall = 63223; - e.Dslash = 272; - e.Dsmall = 63332; - e.Dtopbar = 395; - e.Dz = 498; - e.Dzcaron = 453; - e.Dzeabkhasiancyrillic = 1248; - e.Dzecyrillic = 1029; - e.Dzhecyrillic = 1039; - e.E = 69; - e.Eacute = 201; - e.Eacutesmall = 63465; - e.Ebreve = 276; - e.Ecaron = 282; - e.Ecedillabreve = 7708; - e.Echarmenian = 1333; - e.Ecircle = 9402; - e.Ecircumflex = 202; - e.Ecircumflexacute = 7870; - e.Ecircumflexbelow = 7704; - e.Ecircumflexdotbelow = 7878; - e.Ecircumflexgrave = 7872; - e.Ecircumflexhookabove = 7874; - e.Ecircumflexsmall = 63466; - e.Ecircumflextilde = 7876; - e.Ecyrillic = 1028; - e.Edblgrave = 516; - e.Edieresis = 203; - e.Edieresissmall = 63467; - e.Edot = 278; - e.Edotaccent = 278; - e.Edotbelow = 7864; - e.Efcyrillic = 1060; - e.Egrave = 200; - e.Egravesmall = 63464; - e.Eharmenian = 1335; - e.Ehookabove = 7866; - e.Eightroman = 8551; - e.Einvertedbreve = 518; - e.Eiotifiedcyrillic = 1124; - e.Elcyrillic = 1051; - e.Elevenroman = 8554; - e.Emacron = 274; - e.Emacronacute = 7702; - e.Emacrongrave = 7700; - e.Emcyrillic = 1052; - e.Emonospace = 65317; - e.Encyrillic = 1053; - e.Endescendercyrillic = 1186; - e.Eng = 330; - e.Enghecyrillic = 1188; - e.Enhookcyrillic = 1223; - e.Eogonek = 280; - e.Eopen = 400; - e.Epsilon = 917; - e.Epsilontonos = 904; - e.Ercyrillic = 1056; - e.Ereversed = 398; - e.Ereversedcyrillic = 1069; - e.Escyrillic = 1057; - e.Esdescendercyrillic = 1194; - e.Esh = 425; - e.Esmall = 63333; - e.Eta = 919; - e.Etarmenian = 1336; - e.Etatonos = 905; - e.Eth = 208; - e.Ethsmall = 63472; - e.Etilde = 7868; - e.Etildebelow = 7706; - e.Euro = 8364; - e.Ezh = 439; - e.Ezhcaron = 494; - e.Ezhreversed = 440; - e.F = 70; - e.Fcircle = 9403; - e.Fdotaccent = 7710; - e.Feharmenian = 1366; - e.Feicoptic = 996; - e.Fhook = 401; - e.Fitacyrillic = 1138; - e.Fiveroman = 8548; - e.Fmonospace = 65318; - e.Fourroman = 8547; - e.Fsmall = 63334; - e.G = 71; - e.GBsquare = 13191; - e.Gacute = 500; - e.Gamma = 915; - e.Gammaafrican = 404; - e.Gangiacoptic = 1002; - e.Gbreve = 286; - e.Gcaron = 486; - e.Gcedilla = 290; - e.Gcircle = 9404; - e.Gcircumflex = 284; - e.Gcommaaccent = 290; - e.Gdot = 288; - e.Gdotaccent = 288; - e.Gecyrillic = 1043; - e.Ghadarmenian = 1346; - e.Ghemiddlehookcyrillic = 1172; - e.Ghestrokecyrillic = 1170; - e.Gheupturncyrillic = 1168; - e.Ghook = 403; - e.Gimarmenian = 1331; - e.Gjecyrillic = 1027; - e.Gmacron = 7712; - e.Gmonospace = 65319; - e.Grave = 63182; - e.Gravesmall = 63328; - e.Gsmall = 63335; - e.Gsmallhook = 667; - e.Gstroke = 484; - e.H = 72; - e.H18533 = 9679; - e.H18543 = 9642; - e.H18551 = 9643; - e.H22073 = 9633; - e.HPsquare = 13259; - e.Haabkhasiancyrillic = 1192; - e.Hadescendercyrillic = 1202; - e.Hardsigncyrillic = 1066; - e.Hbar = 294; - e.Hbrevebelow = 7722; - e.Hcedilla = 7720; - e.Hcircle = 9405; - e.Hcircumflex = 292; - e.Hdieresis = 7718; - e.Hdotaccent = 7714; - e.Hdotbelow = 7716; - e.Hmonospace = 65320; - e.Hoarmenian = 1344; - e.Horicoptic = 1e3; - e.Hsmall = 63336; - e.Hungarumlaut = 63183; - e.Hungarumlautsmall = 63224; - e.Hzsquare = 13200; - e.I = 73; - e.IAcyrillic = 1071; - e.IJ = 306; - e.IUcyrillic = 1070; - e.Iacute = 205; - e.Iacutesmall = 63469; - e.Ibreve = 300; - e.Icaron = 463; - e.Icircle = 9406; - e.Icircumflex = 206; - e.Icircumflexsmall = 63470; - e.Icyrillic = 1030; - e.Idblgrave = 520; - e.Idieresis = 207; - e.Idieresisacute = 7726; - e.Idieresiscyrillic = 1252; - e.Idieresissmall = 63471; - e.Idot = 304; - e.Idotaccent = 304; - e.Idotbelow = 7882; - e.Iebrevecyrillic = 1238; - e.Iecyrillic = 1045; - e.Ifraktur = 8465; - e.Igrave = 204; - e.Igravesmall = 63468; - e.Ihookabove = 7880; - e.Iicyrillic = 1048; - e.Iinvertedbreve = 522; - e.Iishortcyrillic = 1049; - e.Imacron = 298; - e.Imacroncyrillic = 1250; - e.Imonospace = 65321; - e.Iniarmenian = 1339; - e.Iocyrillic = 1025; - e.Iogonek = 302; - e.Iota = 921; - e.Iotaafrican = 406; - e.Iotadieresis = 938; - e.Iotatonos = 906; - e.Ismall = 63337; - e.Istroke = 407; - e.Itilde = 296; - e.Itildebelow = 7724; - e.Izhitsacyrillic = 1140; - e.Izhitsadblgravecyrillic = 1142; - e.J = 74; - e.Jaarmenian = 1345; - e.Jcircle = 9407; - e.Jcircumflex = 308; - e.Jecyrillic = 1032; - e.Jheharmenian = 1355; - e.Jmonospace = 65322; - e.Jsmall = 63338; - e.K = 75; - e.KBsquare = 13189; - e.KKsquare = 13261; - e.Kabashkircyrillic = 1184; - e.Kacute = 7728; - e.Kacyrillic = 1050; - e.Kadescendercyrillic = 1178; - e.Kahookcyrillic = 1219; - e.Kappa = 922; - e.Kastrokecyrillic = 1182; - e.Kaverticalstrokecyrillic = 1180; - e.Kcaron = 488; - e.Kcedilla = 310; - e.Kcircle = 9408; - e.Kcommaaccent = 310; - e.Kdotbelow = 7730; - e.Keharmenian = 1364; - e.Kenarmenian = 1343; - e.Khacyrillic = 1061; - e.Kheicoptic = 998; - e.Khook = 408; - e.Kjecyrillic = 1036; - e.Klinebelow = 7732; - e.Kmonospace = 65323; - e.Koppacyrillic = 1152; - e.Koppagreek = 990; - e.Ksicyrillic = 1134; - e.Ksmall = 63339; - e.L = 76; - e.LJ = 455; - e.LL = 63167; - e.Lacute = 313; - e.Lambda = 923; - e.Lcaron = 317; - e.Lcedilla = 315; - e.Lcircle = 9409; - e.Lcircumflexbelow = 7740; - e.Lcommaaccent = 315; - e.Ldot = 319; - e.Ldotaccent = 319; - e.Ldotbelow = 7734; - e.Ldotbelowmacron = 7736; - e.Liwnarmenian = 1340; - e.Lj = 456; - e.Ljecyrillic = 1033; - e.Llinebelow = 7738; - e.Lmonospace = 65324; - e.Lslash = 321; - e.Lslashsmall = 63225; - e.Lsmall = 63340; - e.M = 77; - e.MBsquare = 13190; - e.Macron = 63184; - e.Macronsmall = 63407; - e.Macute = 7742; - e.Mcircle = 9410; - e.Mdotaccent = 7744; - e.Mdotbelow = 7746; - e.Menarmenian = 1348; - e.Mmonospace = 65325; - e.Msmall = 63341; - e.Mturned = 412; - e.Mu = 924; - e.N = 78; - e.NJ = 458; - e.Nacute = 323; - e.Ncaron = 327; - e.Ncedilla = 325; - e.Ncircle = 9411; - e.Ncircumflexbelow = 7754; - e.Ncommaaccent = 325; - e.Ndotaccent = 7748; - e.Ndotbelow = 7750; - e.Nhookleft = 413; - e.Nineroman = 8552; - e.Nj = 459; - e.Njecyrillic = 1034; - e.Nlinebelow = 7752; - e.Nmonospace = 65326; - e.Nowarmenian = 1350; - e.Nsmall = 63342; - e.Ntilde = 209; - e.Ntildesmall = 63473; - e.Nu = 925; - e.O = 79; - e.OE = 338; - e.OEsmall = 63226; - e.Oacute = 211; - e.Oacutesmall = 63475; - e.Obarredcyrillic = 1256; - e.Obarreddieresiscyrillic = 1258; - e.Obreve = 334; - e.Ocaron = 465; - e.Ocenteredtilde = 415; - e.Ocircle = 9412; - e.Ocircumflex = 212; - e.Ocircumflexacute = 7888; - e.Ocircumflexdotbelow = 7896; - e.Ocircumflexgrave = 7890; - e.Ocircumflexhookabove = 7892; - e.Ocircumflexsmall = 63476; - e.Ocircumflextilde = 7894; - e.Ocyrillic = 1054; - e.Odblacute = 336; - e.Odblgrave = 524; - e.Odieresis = 214; - e.Odieresiscyrillic = 1254; - e.Odieresissmall = 63478; - e.Odotbelow = 7884; - e.Ogoneksmall = 63227; - e.Ograve = 210; - e.Ogravesmall = 63474; - e.Oharmenian = 1365; - e.Ohm = 8486; - e.Ohookabove = 7886; - e.Ohorn = 416; - e.Ohornacute = 7898; - e.Ohorndotbelow = 7906; - e.Ohorngrave = 7900; - e.Ohornhookabove = 7902; - e.Ohorntilde = 7904; - e.Ohungarumlaut = 336; - e.Oi = 418; - e.Oinvertedbreve = 526; - e.Omacron = 332; - e.Omacronacute = 7762; - e.Omacrongrave = 7760; - e.Omega = 8486; - e.Omegacyrillic = 1120; - e.Omegagreek = 937; - e.Omegaroundcyrillic = 1146; - e.Omegatitlocyrillic = 1148; - e.Omegatonos = 911; - e.Omicron = 927; - e.Omicrontonos = 908; - e.Omonospace = 65327; - e.Oneroman = 8544; - e.Oogonek = 490; - e.Oogonekmacron = 492; - e.Oopen = 390; - e.Oslash = 216; - e.Oslashacute = 510; - e.Oslashsmall = 63480; - e.Osmall = 63343; - e.Ostrokeacute = 510; - e.Otcyrillic = 1150; - e.Otilde = 213; - e.Otildeacute = 7756; - e.Otildedieresis = 7758; - e.Otildesmall = 63477; - e.P = 80; - e.Pacute = 7764; - e.Pcircle = 9413; - e.Pdotaccent = 7766; - e.Pecyrillic = 1055; - e.Peharmenian = 1354; - e.Pemiddlehookcyrillic = 1190; - e.Phi = 934; - e.Phook = 420; - e.Pi = 928; - e.Piwrarmenian = 1363; - e.Pmonospace = 65328; - e.Psi = 936; - e.Psicyrillic = 1136; - e.Psmall = 63344; - e.Q = 81; - e.Qcircle = 9414; - e.Qmonospace = 65329; - e.Qsmall = 63345; - e.R = 82; - e.Raarmenian = 1356; - e.Racute = 340; - e.Rcaron = 344; - e.Rcedilla = 342; - e.Rcircle = 9415; - e.Rcommaaccent = 342; - e.Rdblgrave = 528; - e.Rdotaccent = 7768; - e.Rdotbelow = 7770; - e.Rdotbelowmacron = 7772; - e.Reharmenian = 1360; - e.Rfraktur = 8476; - e.Rho = 929; - e.Ringsmall = 63228; - e.Rinvertedbreve = 530; - e.Rlinebelow = 7774; - e.Rmonospace = 65330; - e.Rsmall = 63346; - e.Rsmallinverted = 641; - e.Rsmallinvertedsuperior = 694; - e.S = 83; - e.SF010000 = 9484; - e.SF020000 = 9492; - e.SF030000 = 9488; - e.SF040000 = 9496; - e.SF050000 = 9532; - e.SF060000 = 9516; - e.SF070000 = 9524; - e.SF080000 = 9500; - e.SF090000 = 9508; - e.SF100000 = 9472; - e.SF110000 = 9474; - e.SF190000 = 9569; - e.SF200000 = 9570; - e.SF210000 = 9558; - e.SF220000 = 9557; - e.SF230000 = 9571; - e.SF240000 = 9553; - e.SF250000 = 9559; - e.SF260000 = 9565; - e.SF270000 = 9564; - e.SF280000 = 9563; - e.SF360000 = 9566; - e.SF370000 = 9567; - e.SF380000 = 9562; - e.SF390000 = 9556; - e.SF400000 = 9577; - e.SF410000 = 9574; - e.SF420000 = 9568; - e.SF430000 = 9552; - e.SF440000 = 9580; - e.SF450000 = 9575; - e.SF460000 = 9576; - e.SF470000 = 9572; - e.SF480000 = 9573; - e.SF490000 = 9561; - e.SF500000 = 9560; - e.SF510000 = 9554; - e.SF520000 = 9555; - e.SF530000 = 9579; - e.SF540000 = 9578; - e.Sacute = 346; - e.Sacutedotaccent = 7780; - e.Sampigreek = 992; - e.Scaron = 352; - e.Scarondotaccent = 7782; - e.Scaronsmall = 63229; - e.Scedilla = 350; - e.Schwa = 399; - e.Schwacyrillic = 1240; - e.Schwadieresiscyrillic = 1242; - e.Scircle = 9416; - e.Scircumflex = 348; - e.Scommaaccent = 536; - e.Sdotaccent = 7776; - e.Sdotbelow = 7778; - e.Sdotbelowdotaccent = 7784; - e.Seharmenian = 1357; - e.Sevenroman = 8550; - e.Shaarmenian = 1351; - e.Shacyrillic = 1064; - e.Shchacyrillic = 1065; - e.Sheicoptic = 994; - e.Shhacyrillic = 1210; - e.Shimacoptic = 1004; - e.Sigma = 931; - e.Sixroman = 8549; - e.Smonospace = 65331; - e.Softsigncyrillic = 1068; - e.Ssmall = 63347; - e.Stigmagreek = 986; - e.T = 84; - e.Tau = 932; - e.Tbar = 358; - e.Tcaron = 356; - e.Tcedilla = 354; - e.Tcircle = 9417; - e.Tcircumflexbelow = 7792; - e.Tcommaaccent = 354; - e.Tdotaccent = 7786; - e.Tdotbelow = 7788; - e.Tecyrillic = 1058; - e.Tedescendercyrillic = 1196; - e.Tenroman = 8553; - e.Tetsecyrillic = 1204; - e.Theta = 920; - e.Thook = 428; - e.Thorn = 222; - e.Thornsmall = 63486; - e.Threeroman = 8546; - e.Tildesmall = 63230; - e.Tiwnarmenian = 1359; - e.Tlinebelow = 7790; - e.Tmonospace = 65332; - e.Toarmenian = 1337; - e.Tonefive = 444; - e.Tonesix = 388; - e.Tonetwo = 423; - e.Tretroflexhook = 430; - e.Tsecyrillic = 1062; - e.Tshecyrillic = 1035; - e.Tsmall = 63348; - e.Twelveroman = 8555; - e.Tworoman = 8545; - e.U = 85; - e.Uacute = 218; - e.Uacutesmall = 63482; - e.Ubreve = 364; - e.Ucaron = 467; - e.Ucircle = 9418; - e.Ucircumflex = 219; - e.Ucircumflexbelow = 7798; - e.Ucircumflexsmall = 63483; - e.Ucyrillic = 1059; - e.Udblacute = 368; - e.Udblgrave = 532; - e.Udieresis = 220; - e.Udieresisacute = 471; - e.Udieresisbelow = 7794; - e.Udieresiscaron = 473; - e.Udieresiscyrillic = 1264; - e.Udieresisgrave = 475; - e.Udieresismacron = 469; - e.Udieresissmall = 63484; - e.Udotbelow = 7908; - e.Ugrave = 217; - e.Ugravesmall = 63481; - e.Uhookabove = 7910; - e.Uhorn = 431; - e.Uhornacute = 7912; - e.Uhorndotbelow = 7920; - e.Uhorngrave = 7914; - e.Uhornhookabove = 7916; - e.Uhorntilde = 7918; - e.Uhungarumlaut = 368; - e.Uhungarumlautcyrillic = 1266; - e.Uinvertedbreve = 534; - e.Ukcyrillic = 1144; - e.Umacron = 362; - e.Umacroncyrillic = 1262; - e.Umacrondieresis = 7802; - e.Umonospace = 65333; - e.Uogonek = 370; - e.Upsilon = 933; - e.Upsilon1 = 978; - e.Upsilonacutehooksymbolgreek = 979; - e.Upsilonafrican = 433; - e.Upsilondieresis = 939; - e.Upsilondieresishooksymbolgreek = 980; - e.Upsilonhooksymbol = 978; - e.Upsilontonos = 910; - e.Uring = 366; - e.Ushortcyrillic = 1038; - e.Usmall = 63349; - e.Ustraightcyrillic = 1198; - e.Ustraightstrokecyrillic = 1200; - e.Utilde = 360; - e.Utildeacute = 7800; - e.Utildebelow = 7796; - e.V = 86; - e.Vcircle = 9419; - e.Vdotbelow = 7806; - e.Vecyrillic = 1042; - e.Vewarmenian = 1358; - e.Vhook = 434; - e.Vmonospace = 65334; - e.Voarmenian = 1352; - e.Vsmall = 63350; - e.Vtilde = 7804; - e.W = 87; - e.Wacute = 7810; - e.Wcircle = 9420; - e.Wcircumflex = 372; - e.Wdieresis = 7812; - e.Wdotaccent = 7814; - e.Wdotbelow = 7816; - e.Wgrave = 7808; - e.Wmonospace = 65335; - e.Wsmall = 63351; - e.X = 88; - e.Xcircle = 9421; - e.Xdieresis = 7820; - e.Xdotaccent = 7818; - e.Xeharmenian = 1341; - e.Xi = 926; - e.Xmonospace = 65336; - e.Xsmall = 63352; - e.Y = 89; - e.Yacute = 221; - e.Yacutesmall = 63485; - e.Yatcyrillic = 1122; - e.Ycircle = 9422; - e.Ycircumflex = 374; - e.Ydieresis = 376; - e.Ydieresissmall = 63487; - e.Ydotaccent = 7822; - e.Ydotbelow = 7924; - e.Yericyrillic = 1067; - e.Yerudieresiscyrillic = 1272; - e.Ygrave = 7922; - e.Yhook = 435; - e.Yhookabove = 7926; - e.Yiarmenian = 1349; - e.Yicyrillic = 1031; - e.Yiwnarmenian = 1362; - e.Ymonospace = 65337; - e.Ysmall = 63353; - e.Ytilde = 7928; - e.Yusbigcyrillic = 1130; - e.Yusbigiotifiedcyrillic = 1132; - e.Yuslittlecyrillic = 1126; - e.Yuslittleiotifiedcyrillic = 1128; - e.Z = 90; - e.Zaarmenian = 1334; - e.Zacute = 377; - e.Zcaron = 381; - e.Zcaronsmall = 63231; - e.Zcircle = 9423; - e.Zcircumflex = 7824; - e.Zdot = 379; - e.Zdotaccent = 379; - e.Zdotbelow = 7826; - e.Zecyrillic = 1047; - e.Zedescendercyrillic = 1176; - e.Zedieresiscyrillic = 1246; - e.Zeta = 918; - e.Zhearmenian = 1338; - e.Zhebrevecyrillic = 1217; - e.Zhecyrillic = 1046; - e.Zhedescendercyrillic = 1174; - e.Zhedieresiscyrillic = 1244; - e.Zlinebelow = 7828; - e.Zmonospace = 65338; - e.Zsmall = 63354; - e.Zstroke = 437; - e.a = 97; - e.aabengali = 2438; - e.aacute = 225; - e.aadeva = 2310; - e.aagujarati = 2694; - e.aagurmukhi = 2566; - e.aamatragurmukhi = 2622; - e.aarusquare = 13059; - e.aavowelsignbengali = 2494; - e.aavowelsigndeva = 2366; - e.aavowelsigngujarati = 2750; - e.abbreviationmarkarmenian = 1375; - e.abbreviationsigndeva = 2416; - e.abengali = 2437; - e.abopomofo = 12570; - e.abreve = 259; - e.abreveacute = 7855; - e.abrevecyrillic = 1233; - e.abrevedotbelow = 7863; - e.abrevegrave = 7857; - e.abrevehookabove = 7859; - e.abrevetilde = 7861; - e.acaron = 462; - e.acircle = 9424; - e.acircumflex = 226; - e.acircumflexacute = 7845; - e.acircumflexdotbelow = 7853; - e.acircumflexgrave = 7847; - e.acircumflexhookabove = 7849; - e.acircumflextilde = 7851; - e.acute = 180; - e.acutebelowcmb = 791; - e.acutecmb = 769; - e.acutecomb = 769; - e.acutedeva = 2388; - e.acutelowmod = 719; - e.acutetonecmb = 833; - e.acyrillic = 1072; - e.adblgrave = 513; - e.addakgurmukhi = 2673; - e.adeva = 2309; - e.adieresis = 228; - e.adieresiscyrillic = 1235; - e.adieresismacron = 479; - e.adotbelow = 7841; - e.adotmacron = 481; - e.ae = 230; - e.aeacute = 509; - e.aekorean = 12624; - e.aemacron = 483; - e.afii00208 = 8213; - e.afii08941 = 8356; - e.afii10017 = 1040; - e.afii10018 = 1041; - e.afii10019 = 1042; - e.afii10020 = 1043; - e.afii10021 = 1044; - e.afii10022 = 1045; - e.afii10023 = 1025; - e.afii10024 = 1046; - e.afii10025 = 1047; - e.afii10026 = 1048; - e.afii10027 = 1049; - e.afii10028 = 1050; - e.afii10029 = 1051; - e.afii10030 = 1052; - e.afii10031 = 1053; - e.afii10032 = 1054; - e.afii10033 = 1055; - e.afii10034 = 1056; - e.afii10035 = 1057; - e.afii10036 = 1058; - e.afii10037 = 1059; - e.afii10038 = 1060; - e.afii10039 = 1061; - e.afii10040 = 1062; - e.afii10041 = 1063; - e.afii10042 = 1064; - e.afii10043 = 1065; - e.afii10044 = 1066; - e.afii10045 = 1067; - e.afii10046 = 1068; - e.afii10047 = 1069; - e.afii10048 = 1070; - e.afii10049 = 1071; - e.afii10050 = 1168; - e.afii10051 = 1026; - e.afii10052 = 1027; - e.afii10053 = 1028; - e.afii10054 = 1029; - e.afii10055 = 1030; - e.afii10056 = 1031; - e.afii10057 = 1032; - e.afii10058 = 1033; - e.afii10059 = 1034; - e.afii10060 = 1035; - e.afii10061 = 1036; - e.afii10062 = 1038; - e.afii10063 = 63172; - e.afii10064 = 63173; - e.afii10065 = 1072; - e.afii10066 = 1073; - e.afii10067 = 1074; - e.afii10068 = 1075; - e.afii10069 = 1076; - e.afii10070 = 1077; - e.afii10071 = 1105; - e.afii10072 = 1078; - e.afii10073 = 1079; - e.afii10074 = 1080; - e.afii10075 = 1081; - e.afii10076 = 1082; - e.afii10077 = 1083; - e.afii10078 = 1084; - e.afii10079 = 1085; - e.afii10080 = 1086; - e.afii10081 = 1087; - e.afii10082 = 1088; - e.afii10083 = 1089; - e.afii10084 = 1090; - e.afii10085 = 1091; - e.afii10086 = 1092; - e.afii10087 = 1093; - e.afii10088 = 1094; - e.afii10089 = 1095; - e.afii10090 = 1096; - e.afii10091 = 1097; - e.afii10092 = 1098; - e.afii10093 = 1099; - e.afii10094 = 1100; - e.afii10095 = 1101; - e.afii10096 = 1102; - e.afii10097 = 1103; - e.afii10098 = 1169; - e.afii10099 = 1106; - e.afii10100 = 1107; - e.afii10101 = 1108; - e.afii10102 = 1109; - e.afii10103 = 1110; - e.afii10104 = 1111; - e.afii10105 = 1112; - e.afii10106 = 1113; - e.afii10107 = 1114; - e.afii10108 = 1115; - e.afii10109 = 1116; - e.afii10110 = 1118; - e.afii10145 = 1039; - e.afii10146 = 1122; - e.afii10147 = 1138; - e.afii10148 = 1140; - e.afii10192 = 63174; - e.afii10193 = 1119; - e.afii10194 = 1123; - e.afii10195 = 1139; - e.afii10196 = 1141; - e.afii10831 = 63175; - e.afii10832 = 63176; - e.afii10846 = 1241; - e.afii299 = 8206; - e.afii300 = 8207; - e.afii301 = 8205; - e.afii57381 = 1642; - e.afii57388 = 1548; - e.afii57392 = 1632; - e.afii57393 = 1633; - e.afii57394 = 1634; - e.afii57395 = 1635; - e.afii57396 = 1636; - e.afii57397 = 1637; - e.afii57398 = 1638; - e.afii57399 = 1639; - e.afii57400 = 1640; - e.afii57401 = 1641; - e.afii57403 = 1563; - e.afii57407 = 1567; - e.afii57409 = 1569; - e.afii57410 = 1570; - e.afii57411 = 1571; - e.afii57412 = 1572; - e.afii57413 = 1573; - e.afii57414 = 1574; - e.afii57415 = 1575; - e.afii57416 = 1576; - e.afii57417 = 1577; - e.afii57418 = 1578; - e.afii57419 = 1579; - e.afii57420 = 1580; - e.afii57421 = 1581; - e.afii57422 = 1582; - e.afii57423 = 1583; - e.afii57424 = 1584; - e.afii57425 = 1585; - e.afii57426 = 1586; - e.afii57427 = 1587; - e.afii57428 = 1588; - e.afii57429 = 1589; - e.afii57430 = 1590; - e.afii57431 = 1591; - e.afii57432 = 1592; - e.afii57433 = 1593; - e.afii57434 = 1594; - e.afii57440 = 1600; - e.afii57441 = 1601; - e.afii57442 = 1602; - e.afii57443 = 1603; - e.afii57444 = 1604; - e.afii57445 = 1605; - e.afii57446 = 1606; - e.afii57448 = 1608; - e.afii57449 = 1609; - e.afii57450 = 1610; - e.afii57451 = 1611; - e.afii57452 = 1612; - e.afii57453 = 1613; - e.afii57454 = 1614; - e.afii57455 = 1615; - e.afii57456 = 1616; - e.afii57457 = 1617; - e.afii57458 = 1618; - e.afii57470 = 1607; - e.afii57505 = 1700; - e.afii57506 = 1662; - e.afii57507 = 1670; - e.afii57508 = 1688; - e.afii57509 = 1711; - e.afii57511 = 1657; - e.afii57512 = 1672; - e.afii57513 = 1681; - e.afii57514 = 1722; - e.afii57519 = 1746; - e.afii57534 = 1749; - e.afii57636 = 8362; - e.afii57645 = 1470; - e.afii57658 = 1475; - e.afii57664 = 1488; - e.afii57665 = 1489; - e.afii57666 = 1490; - e.afii57667 = 1491; - e.afii57668 = 1492; - e.afii57669 = 1493; - e.afii57670 = 1494; - e.afii57671 = 1495; - e.afii57672 = 1496; - e.afii57673 = 1497; - e.afii57674 = 1498; - e.afii57675 = 1499; - e.afii57676 = 1500; - e.afii57677 = 1501; - e.afii57678 = 1502; - e.afii57679 = 1503; - e.afii57680 = 1504; - e.afii57681 = 1505; - e.afii57682 = 1506; - e.afii57683 = 1507; - e.afii57684 = 1508; - e.afii57685 = 1509; - e.afii57686 = 1510; - e.afii57687 = 1511; - e.afii57688 = 1512; - e.afii57689 = 1513; - e.afii57690 = 1514; - e.afii57694 = 64298; - e.afii57695 = 64299; - e.afii57700 = 64331; - e.afii57705 = 64287; - e.afii57716 = 1520; - e.afii57717 = 1521; - e.afii57718 = 1522; - e.afii57723 = 64309; - e.afii57793 = 1460; - e.afii57794 = 1461; - e.afii57795 = 1462; - e.afii57796 = 1467; - e.afii57797 = 1464; - e.afii57798 = 1463; - e.afii57799 = 1456; - e.afii57800 = 1458; - e.afii57801 = 1457; - e.afii57802 = 1459; - e.afii57803 = 1474; - e.afii57804 = 1473; - e.afii57806 = 1465; - e.afii57807 = 1468; - e.afii57839 = 1469; - e.afii57841 = 1471; - e.afii57842 = 1472; - e.afii57929 = 700; - e.afii61248 = 8453; - e.afii61289 = 8467; - e.afii61352 = 8470; - e.afii61573 = 8236; - e.afii61574 = 8237; - e.afii61575 = 8238; - e.afii61664 = 8204; - e.afii63167 = 1645; - e.afii64937 = 701; - e.agrave = 224; - e.agujarati = 2693; - e.agurmukhi = 2565; - e.ahiragana = 12354; - e.ahookabove = 7843; - e.aibengali = 2448; - e.aibopomofo = 12574; - e.aideva = 2320; - e.aiecyrillic = 1237; - e.aigujarati = 2704; - e.aigurmukhi = 2576; - e.aimatragurmukhi = 2632; - e.ainarabic = 1593; - e.ainfinalarabic = 65226; - e.aininitialarabic = 65227; - e.ainmedialarabic = 65228; - e.ainvertedbreve = 515; - e.aivowelsignbengali = 2504; - e.aivowelsigndeva = 2376; - e.aivowelsigngujarati = 2760; - e.akatakana = 12450; - e.akatakanahalfwidth = 65393; - e.akorean = 12623; - e.alef = 1488; - e.alefarabic = 1575; - e.alefdageshhebrew = 64304; - e.aleffinalarabic = 65166; - e.alefhamzaabovearabic = 1571; - e.alefhamzaabovefinalarabic = 65156; - e.alefhamzabelowarabic = 1573; - e.alefhamzabelowfinalarabic = 65160; - e.alefhebrew = 1488; - e.aleflamedhebrew = 64335; - e.alefmaddaabovearabic = 1570; - e.alefmaddaabovefinalarabic = 65154; - e.alefmaksuraarabic = 1609; - e.alefmaksurafinalarabic = 65264; - e.alefmaksurainitialarabic = 65267; - e.alefmaksuramedialarabic = 65268; - e.alefpatahhebrew = 64302; - e.alefqamatshebrew = 64303; - e.aleph = 8501; - e.allequal = 8780; - e.alpha = 945; - e.alphatonos = 940; - e.amacron = 257; - e.amonospace = 65345; - e.ampersand = 38; - e.ampersandmonospace = 65286; - e.ampersandsmall = 63270; - e.amsquare = 13250; - e.anbopomofo = 12578; - e.angbopomofo = 12580; - e.angbracketleft = 12296; - e.angbracketright = 12297; - e.angkhankhuthai = 3674; - e.angle = 8736; - e.anglebracketleft = 12296; - e.anglebracketleftvertical = 65087; - e.anglebracketright = 12297; - e.anglebracketrightvertical = 65088; - e.angleleft = 9001; - e.angleright = 9002; - e.angstrom = 8491; - e.anoteleia = 903; - e.anudattadeva = 2386; - e.anusvarabengali = 2434; - e.anusvaradeva = 2306; - e.anusvaragujarati = 2690; - e.aogonek = 261; - e.apaatosquare = 13056; - e.aparen = 9372; - e.apostrophearmenian = 1370; - e.apostrophemod = 700; - e.apple = 63743; - e.approaches = 8784; - e.approxequal = 8776; - e.approxequalorimage = 8786; - e.approximatelyequal = 8773; - e.araeaekorean = 12686; - e.araeakorean = 12685; - e.arc = 8978; - e.arighthalfring = 7834; - e.aring = 229; - e.aringacute = 507; - e.aringbelow = 7681; - e.arrowboth = 8596; - e.arrowdashdown = 8675; - e.arrowdashleft = 8672; - e.arrowdashright = 8674; - e.arrowdashup = 8673; - e.arrowdblboth = 8660; - e.arrowdbldown = 8659; - e.arrowdblleft = 8656; - e.arrowdblright = 8658; - e.arrowdblup = 8657; - e.arrowdown = 8595; - e.arrowdownleft = 8601; - e.arrowdownright = 8600; - e.arrowdownwhite = 8681; - e.arrowheaddownmod = 709; - e.arrowheadleftmod = 706; - e.arrowheadrightmod = 707; - e.arrowheadupmod = 708; - e.arrowhorizex = 63719; - e.arrowleft = 8592; - e.arrowleftdbl = 8656; - e.arrowleftdblstroke = 8653; - e.arrowleftoverright = 8646; - e.arrowleftwhite = 8678; - e.arrowright = 8594; - e.arrowrightdblstroke = 8655; - e.arrowrightheavy = 10142; - e.arrowrightoverleft = 8644; - e.arrowrightwhite = 8680; - e.arrowtableft = 8676; - e.arrowtabright = 8677; - e.arrowup = 8593; - e.arrowupdn = 8597; - e.arrowupdnbse = 8616; - e.arrowupdownbase = 8616; - e.arrowupleft = 8598; - e.arrowupleftofdown = 8645; - e.arrowupright = 8599; - e.arrowupwhite = 8679; - e.arrowvertex = 63718; - e.asciicircum = 94; - e.asciicircummonospace = 65342; - e.asciitilde = 126; - e.asciitildemonospace = 65374; - e.ascript = 593; - e.ascriptturned = 594; - e.asmallhiragana = 12353; - e.asmallkatakana = 12449; - e.asmallkatakanahalfwidth = 65383; - e.asterisk = 42; - e.asteriskaltonearabic = 1645; - e.asteriskarabic = 1645; - e.asteriskmath = 8727; - e.asteriskmonospace = 65290; - e.asterisksmall = 65121; - e.asterism = 8258; - e.asuperior = 63209; - e.asymptoticallyequal = 8771; - e.at = 64; - e.atilde = 227; - e.atmonospace = 65312; - e.atsmall = 65131; - e.aturned = 592; - e.aubengali = 2452; - e.aubopomofo = 12576; - e.audeva = 2324; - e.augujarati = 2708; - e.augurmukhi = 2580; - e.aulengthmarkbengali = 2519; - e.aumatragurmukhi = 2636; - e.auvowelsignbengali = 2508; - e.auvowelsigndeva = 2380; - e.auvowelsigngujarati = 2764; - e.avagrahadeva = 2365; - e.aybarmenian = 1377; - e.ayin = 1506; - e.ayinaltonehebrew = 64288; - e.ayinhebrew = 1506; - e.b = 98; - e.babengali = 2476; - e.backslash = 92; - e.backslashmonospace = 65340; - e.badeva = 2348; - e.bagujarati = 2732; - e.bagurmukhi = 2604; - e.bahiragana = 12400; - e.bahtthai = 3647; - e.bakatakana = 12496; - e.bar = 124; - e.barmonospace = 65372; - e.bbopomofo = 12549; - e.bcircle = 9425; - e.bdotaccent = 7683; - e.bdotbelow = 7685; - e.beamedsixteenthnotes = 9836; - e.because = 8757; - e.becyrillic = 1073; - e.beharabic = 1576; - e.behfinalarabic = 65168; - e.behinitialarabic = 65169; - e.behiragana = 12409; - e.behmedialarabic = 65170; - e.behmeeminitialarabic = 64671; - e.behmeemisolatedarabic = 64520; - e.behnoonfinalarabic = 64621; - e.bekatakana = 12505; - e.benarmenian = 1378; - e.bet = 1489; - e.beta = 946; - e.betasymbolgreek = 976; - e.betdagesh = 64305; - e.betdageshhebrew = 64305; - e.bethebrew = 1489; - e.betrafehebrew = 64332; - e.bhabengali = 2477; - e.bhadeva = 2349; - e.bhagujarati = 2733; - e.bhagurmukhi = 2605; - e.bhook = 595; - e.bihiragana = 12403; - e.bikatakana = 12499; - e.bilabialclick = 664; - e.bindigurmukhi = 2562; - e.birusquare = 13105; - e.blackcircle = 9679; - e.blackdiamond = 9670; - e.blackdownpointingtriangle = 9660; - e.blackleftpointingpointer = 9668; - e.blackleftpointingtriangle = 9664; - e.blacklenticularbracketleft = 12304; - e.blacklenticularbracketleftvertical = 65083; - e.blacklenticularbracketright = 12305; - e.blacklenticularbracketrightvertical = 65084; - e.blacklowerlefttriangle = 9699; - e.blacklowerrighttriangle = 9698; - e.blackrectangle = 9644; - e.blackrightpointingpointer = 9658; - e.blackrightpointingtriangle = 9654; - e.blacksmallsquare = 9642; - e.blacksmilingface = 9787; - e.blacksquare = 9632; - e.blackstar = 9733; - e.blackupperlefttriangle = 9700; - e.blackupperrighttriangle = 9701; - e.blackuppointingsmalltriangle = 9652; - e.blackuppointingtriangle = 9650; - e.blank = 9251; - e.blinebelow = 7687; - e.block = 9608; - e.bmonospace = 65346; - e.bobaimaithai = 3610; - e.bohiragana = 12412; - e.bokatakana = 12508; - e.bparen = 9373; - e.bqsquare = 13251; - e.braceex = 63732; - e.braceleft = 123; - e.braceleftbt = 63731; - e.braceleftmid = 63730; - e.braceleftmonospace = 65371; - e.braceleftsmall = 65115; - e.bracelefttp = 63729; - e.braceleftvertical = 65079; - e.braceright = 125; - e.bracerightbt = 63742; - e.bracerightmid = 63741; - e.bracerightmonospace = 65373; - e.bracerightsmall = 65116; - e.bracerighttp = 63740; - e.bracerightvertical = 65080; - e.bracketleft = 91; - e.bracketleftbt = 63728; - e.bracketleftex = 63727; - e.bracketleftmonospace = 65339; - e.bracketlefttp = 63726; - e.bracketright = 93; - e.bracketrightbt = 63739; - e.bracketrightex = 63738; - e.bracketrightmonospace = 65341; - e.bracketrighttp = 63737; - e.breve = 728; - e.brevebelowcmb = 814; - e.brevecmb = 774; - e.breveinvertedbelowcmb = 815; - e.breveinvertedcmb = 785; - e.breveinverteddoublecmb = 865; - e.bridgebelowcmb = 810; - e.bridgeinvertedbelowcmb = 826; - e.brokenbar = 166; - e.bstroke = 384; - e.bsuperior = 63210; - e.btopbar = 387; - e.buhiragana = 12406; - e.bukatakana = 12502; - e.bullet = 8226; - e.bulletinverse = 9688; - e.bulletoperator = 8729; - e.bullseye = 9678; - e.c = 99; - e.caarmenian = 1390; - e.cabengali = 2458; - e.cacute = 263; - e.cadeva = 2330; - e.cagujarati = 2714; - e.cagurmukhi = 2586; - e.calsquare = 13192; - e.candrabindubengali = 2433; - e.candrabinducmb = 784; - e.candrabindudeva = 2305; - e.candrabindugujarati = 2689; - e.capslock = 8682; - e.careof = 8453; - e.caron = 711; - e.caronbelowcmb = 812; - e.caroncmb = 780; - e.carriagereturn = 8629; - e.cbopomofo = 12568; - e.ccaron = 269; - e.ccedilla = 231; - e.ccedillaacute = 7689; - e.ccircle = 9426; - e.ccircumflex = 265; - e.ccurl = 597; - e.cdot = 267; - e.cdotaccent = 267; - e.cdsquare = 13253; - e.cedilla = 184; - e.cedillacmb = 807; - e.cent = 162; - e.centigrade = 8451; - e.centinferior = 63199; - e.centmonospace = 65504; - e.centoldstyle = 63394; - e.centsuperior = 63200; - e.chaarmenian = 1401; - e.chabengali = 2459; - e.chadeva = 2331; - e.chagujarati = 2715; - e.chagurmukhi = 2587; - e.chbopomofo = 12564; - e.cheabkhasiancyrillic = 1213; - e.checkmark = 10003; - e.checyrillic = 1095; - e.chedescenderabkhasiancyrillic = 1215; - e.chedescendercyrillic = 1207; - e.chedieresiscyrillic = 1269; - e.cheharmenian = 1395; - e.chekhakassiancyrillic = 1228; - e.cheverticalstrokecyrillic = 1209; - e.chi = 967; - e.chieuchacirclekorean = 12919; - e.chieuchaparenkorean = 12823; - e.chieuchcirclekorean = 12905; - e.chieuchkorean = 12618; - e.chieuchparenkorean = 12809; - e.chochangthai = 3594; - e.chochanthai = 3592; - e.chochingthai = 3593; - e.chochoethai = 3596; - e.chook = 392; - e.cieucacirclekorean = 12918; - e.cieucaparenkorean = 12822; - e.cieuccirclekorean = 12904; - e.cieuckorean = 12616; - e.cieucparenkorean = 12808; - e.cieucuparenkorean = 12828; - e.circle = 9675; - e.circlecopyrt = 169; - e.circlemultiply = 8855; - e.circleot = 8857; - e.circleplus = 8853; - e.circlepostalmark = 12342; - e.circlewithlefthalfblack = 9680; - e.circlewithrighthalfblack = 9681; - e.circumflex = 710; - e.circumflexbelowcmb = 813; - e.circumflexcmb = 770; - e.clear = 8999; - e.clickalveolar = 450; - e.clickdental = 448; - e.clicklateral = 449; - e.clickretroflex = 451; - e.club = 9827; - e.clubsuitblack = 9827; - e.clubsuitwhite = 9831; - e.cmcubedsquare = 13220; - e.cmonospace = 65347; - e.cmsquaredsquare = 13216; - e.coarmenian = 1409; - e.colon = 58; - e.colonmonetary = 8353; - e.colonmonospace = 65306; - e.colonsign = 8353; - e.colonsmall = 65109; - e.colontriangularhalfmod = 721; - e.colontriangularmod = 720; - e.comma = 44; - e.commaabovecmb = 787; - e.commaaboverightcmb = 789; - e.commaaccent = 63171; - e.commaarabic = 1548; - e.commaarmenian = 1373; - e.commainferior = 63201; - e.commamonospace = 65292; - e.commareversedabovecmb = 788; - e.commareversedmod = 701; - e.commasmall = 65104; - e.commasuperior = 63202; - e.commaturnedabovecmb = 786; - e.commaturnedmod = 699; - e.compass = 9788; - e.congruent = 8773; - e.contourintegral = 8750; - e.control = 8963; - e.controlACK = 6; - e.controlBEL = 7; - e.controlBS = 8; - e.controlCAN = 24; - e.controlCR = 13; - e.controlDC1 = 17; - e.controlDC2 = 18; - e.controlDC3 = 19; - e.controlDC4 = 20; - e.controlDEL = 127; - e.controlDLE = 16; - e.controlEM = 25; - e.controlENQ = 5; - e.controlEOT = 4; - e.controlESC = 27; - e.controlETB = 23; - e.controlETX = 3; - e.controlFF = 12; - e.controlFS = 28; - e.controlGS = 29; - e.controlHT = 9; - e.controlLF = 10; - e.controlNAK = 21; - e.controlNULL = 0; - e.controlRS = 30; - e.controlSI = 15; - e.controlSO = 14; - e.controlSOT = 2; - e.controlSTX = 1; - e.controlSUB = 26; - e.controlSYN = 22; - e.controlUS = 31; - e.controlVT = 11; - e.copyright = 169; - e.copyrightsans = 63721; - e.copyrightserif = 63193; - e.cornerbracketleft = 12300; - e.cornerbracketlefthalfwidth = 65378; - e.cornerbracketleftvertical = 65089; - e.cornerbracketright = 12301; - e.cornerbracketrighthalfwidth = 65379; - e.cornerbracketrightvertical = 65090; - e.corporationsquare = 13183; - e.cosquare = 13255; - e.coverkgsquare = 13254; - e.cparen = 9374; - e.cruzeiro = 8354; - e.cstretched = 663; - e.curlyand = 8911; - e.curlyor = 8910; - e.currency = 164; - e.cyrBreve = 63185; - e.cyrFlex = 63186; - e.cyrbreve = 63188; - e.cyrflex = 63189; - e.d = 100; - e.daarmenian = 1380; - e.dabengali = 2470; - e.dadarabic = 1590; - e.dadeva = 2342; - e.dadfinalarabic = 65214; - e.dadinitialarabic = 65215; - e.dadmedialarabic = 65216; - e.dagesh = 1468; - e.dageshhebrew = 1468; - e.dagger = 8224; - e.daggerdbl = 8225; - e.dagujarati = 2726; - e.dagurmukhi = 2598; - e.dahiragana = 12384; - e.dakatakana = 12480; - e.dalarabic = 1583; - e.dalet = 1491; - e.daletdagesh = 64307; - e.daletdageshhebrew = 64307; - e.dalethebrew = 1491; - e.dalfinalarabic = 65194; - e.dammaarabic = 1615; - e.dammalowarabic = 1615; - e.dammatanaltonearabic = 1612; - e.dammatanarabic = 1612; - e.danda = 2404; - e.dargahebrew = 1447; - e.dargalefthebrew = 1447; - e.dasiapneumatacyrilliccmb = 1157; - e.dblGrave = 63187; - e.dblanglebracketleft = 12298; - e.dblanglebracketleftvertical = 65085; - e.dblanglebracketright = 12299; - e.dblanglebracketrightvertical = 65086; - e.dblarchinvertedbelowcmb = 811; - e.dblarrowleft = 8660; - e.dblarrowright = 8658; - e.dbldanda = 2405; - e.dblgrave = 63190; - e.dblgravecmb = 783; - e.dblintegral = 8748; - e.dbllowline = 8215; - e.dbllowlinecmb = 819; - e.dbloverlinecmb = 831; - e.dblprimemod = 698; - e.dblverticalbar = 8214; - e.dblverticallineabovecmb = 782; - e.dbopomofo = 12553; - e.dbsquare = 13256; - e.dcaron = 271; - e.dcedilla = 7697; - e.dcircle = 9427; - e.dcircumflexbelow = 7699; - e.dcroat = 273; - e.ddabengali = 2465; - e.ddadeva = 2337; - e.ddagujarati = 2721; - e.ddagurmukhi = 2593; - e.ddalarabic = 1672; - e.ddalfinalarabic = 64393; - e.dddhadeva = 2396; - e.ddhabengali = 2466; - e.ddhadeva = 2338; - e.ddhagujarati = 2722; - e.ddhagurmukhi = 2594; - e.ddotaccent = 7691; - e.ddotbelow = 7693; - e.decimalseparatorarabic = 1643; - e.decimalseparatorpersian = 1643; - e.decyrillic = 1076; - e.degree = 176; - e.dehihebrew = 1453; - e.dehiragana = 12391; - e.deicoptic = 1007; - e.dekatakana = 12487; - e.deleteleft = 9003; - e.deleteright = 8998; - e.delta = 948; - e.deltaturned = 397; - e.denominatorminusonenumeratorbengali = 2552; - e.dezh = 676; - e.dhabengali = 2471; - e.dhadeva = 2343; - e.dhagujarati = 2727; - e.dhagurmukhi = 2599; - e.dhook = 599; - e.dialytikatonos = 901; - e.dialytikatonoscmb = 836; - e.diamond = 9830; - e.diamondsuitwhite = 9826; - e.dieresis = 168; - e.dieresisacute = 63191; - e.dieresisbelowcmb = 804; - e.dieresiscmb = 776; - e.dieresisgrave = 63192; - e.dieresistonos = 901; - e.dihiragana = 12386; - e.dikatakana = 12482; - e.dittomark = 12291; - e.divide = 247; - e.divides = 8739; - e.divisionslash = 8725; - e.djecyrillic = 1106; - e.dkshade = 9619; - e.dlinebelow = 7695; - e.dlsquare = 13207; - e.dmacron = 273; - e.dmonospace = 65348; - e.dnblock = 9604; - e.dochadathai = 3598; - e.dodekthai = 3604; - e.dohiragana = 12393; - e.dokatakana = 12489; - e.dollar = 36; - e.dollarinferior = 63203; - e.dollarmonospace = 65284; - e.dollaroldstyle = 63268; - e.dollarsmall = 65129; - e.dollarsuperior = 63204; - e.dong = 8363; - e.dorusquare = 13094; - e.dotaccent = 729; - e.dotaccentcmb = 775; - e.dotbelowcmb = 803; - e.dotbelowcomb = 803; - e.dotkatakana = 12539; - e.dotlessi = 305; - e.dotlessj = 63166; - e.dotlessjstrokehook = 644; - e.dotmath = 8901; - e.dottedcircle = 9676; - e.doubleyodpatah = 64287; - e.doubleyodpatahhebrew = 64287; - e.downtackbelowcmb = 798; - e.downtackmod = 725; - e.dparen = 9375; - e.dsuperior = 63211; - e.dtail = 598; - e.dtopbar = 396; - e.duhiragana = 12389; - e.dukatakana = 12485; - e.dz = 499; - e.dzaltone = 675; - e.dzcaron = 454; - e.dzcurl = 677; - e.dzeabkhasiancyrillic = 1249; - e.dzecyrillic = 1109; - e.dzhecyrillic = 1119; - e.e = 101; - e.eacute = 233; - e.earth = 9793; - e.ebengali = 2447; - e.ebopomofo = 12572; - e.ebreve = 277; - e.ecandradeva = 2317; - e.ecandragujarati = 2701; - e.ecandravowelsigndeva = 2373; - e.ecandravowelsigngujarati = 2757; - e.ecaron = 283; - e.ecedillabreve = 7709; - e.echarmenian = 1381; - e.echyiwnarmenian = 1415; - e.ecircle = 9428; - e.ecircumflex = 234; - e.ecircumflexacute = 7871; - e.ecircumflexbelow = 7705; - e.ecircumflexdotbelow = 7879; - e.ecircumflexgrave = 7873; - e.ecircumflexhookabove = 7875; - e.ecircumflextilde = 7877; - e.ecyrillic = 1108; - e.edblgrave = 517; - e.edeva = 2319; - e.edieresis = 235; - e.edot = 279; - e.edotaccent = 279; - e.edotbelow = 7865; - e.eegurmukhi = 2575; - e.eematragurmukhi = 2631; - e.efcyrillic = 1092; - e.egrave = 232; - e.egujarati = 2703; - e.eharmenian = 1383; - e.ehbopomofo = 12573; - e.ehiragana = 12360; - e.ehookabove = 7867; - e.eibopomofo = 12575; - e.eight = 56; - e.eightarabic = 1640; - e.eightbengali = 2542; - e.eightcircle = 9319; - e.eightcircleinversesansserif = 10129; - e.eightdeva = 2414; - e.eighteencircle = 9329; - e.eighteenparen = 9349; - e.eighteenperiod = 9369; - e.eightgujarati = 2798; - e.eightgurmukhi = 2670; - e.eighthackarabic = 1640; - e.eighthangzhou = 12328; - e.eighthnotebeamed = 9835; - e.eightideographicparen = 12839; - e.eightinferior = 8328; - e.eightmonospace = 65304; - e.eightoldstyle = 63288; - e.eightparen = 9339; - e.eightperiod = 9359; - e.eightpersian = 1784; - e.eightroman = 8567; - e.eightsuperior = 8312; - e.eightthai = 3672; - e.einvertedbreve = 519; - e.eiotifiedcyrillic = 1125; - e.ekatakana = 12456; - e.ekatakanahalfwidth = 65396; - e.ekonkargurmukhi = 2676; - e.ekorean = 12628; - e.elcyrillic = 1083; - e.element = 8712; - e.elevencircle = 9322; - e.elevenparen = 9342; - e.elevenperiod = 9362; - e.elevenroman = 8570; - e.ellipsis = 8230; - e.ellipsisvertical = 8942; - e.emacron = 275; - e.emacronacute = 7703; - e.emacrongrave = 7701; - e.emcyrillic = 1084; - e.emdash = 8212; - e.emdashvertical = 65073; - e.emonospace = 65349; - e.emphasismarkarmenian = 1371; - e.emptyset = 8709; - e.enbopomofo = 12579; - e.encyrillic = 1085; - e.endash = 8211; - e.endashvertical = 65074; - e.endescendercyrillic = 1187; - e.eng = 331; - e.engbopomofo = 12581; - e.enghecyrillic = 1189; - e.enhookcyrillic = 1224; - e.enspace = 8194; - e.eogonek = 281; - e.eokorean = 12627; - e.eopen = 603; - e.eopenclosed = 666; - e.eopenreversed = 604; - e.eopenreversedclosed = 606; - e.eopenreversedhook = 605; - e.eparen = 9376; - e.epsilon = 949; - e.epsilontonos = 941; - e.equal = 61; - e.equalmonospace = 65309; - e.equalsmall = 65126; - e.equalsuperior = 8316; - e.equivalence = 8801; - e.erbopomofo = 12582; - e.ercyrillic = 1088; - e.ereversed = 600; - e.ereversedcyrillic = 1101; - e.escyrillic = 1089; - e.esdescendercyrillic = 1195; - e.esh = 643; - e.eshcurl = 646; - e.eshortdeva = 2318; - e.eshortvowelsigndeva = 2374; - e.eshreversedloop = 426; - e.eshsquatreversed = 645; - e.esmallhiragana = 12359; - e.esmallkatakana = 12455; - e.esmallkatakanahalfwidth = 65386; - e.estimated = 8494; - e.esuperior = 63212; - e.eta = 951; - e.etarmenian = 1384; - e.etatonos = 942; - e.eth = 240; - e.etilde = 7869; - e.etildebelow = 7707; - e.etnahtafoukhhebrew = 1425; - e.etnahtafoukhlefthebrew = 1425; - e.etnahtahebrew = 1425; - e.etnahtalefthebrew = 1425; - e.eturned = 477; - e.eukorean = 12641; - e.euro = 8364; - e.evowelsignbengali = 2503; - e.evowelsigndeva = 2375; - e.evowelsigngujarati = 2759; - e.exclam = 33; - e.exclamarmenian = 1372; - e.exclamdbl = 8252; - e.exclamdown = 161; - e.exclamdownsmall = 63393; - e.exclammonospace = 65281; - e.exclamsmall = 63265; - e.existential = 8707; - e.ezh = 658; - e.ezhcaron = 495; - e.ezhcurl = 659; - e.ezhreversed = 441; - e.ezhtail = 442; - e.f = 102; - e.fadeva = 2398; - e.fagurmukhi = 2654; - e.fahrenheit = 8457; - e.fathaarabic = 1614; - e.fathalowarabic = 1614; - e.fathatanarabic = 1611; - e.fbopomofo = 12552; - e.fcircle = 9429; - e.fdotaccent = 7711; - e.feharabic = 1601; - e.feharmenian = 1414; - e.fehfinalarabic = 65234; - e.fehinitialarabic = 65235; - e.fehmedialarabic = 65236; - e.feicoptic = 997; - e.female = 9792; - e.ff = 64256; - e.f_f = 64256; - e.ffi = 64259; - e.f_f_i = 64259; - e.ffl = 64260; - e.f_f_l = 64260; - e.fi = 64257; - e.f_i = 64257; - e.fifteencircle = 9326; - e.fifteenparen = 9346; - e.fifteenperiod = 9366; - e.figuredash = 8210; - e.filledbox = 9632; - e.filledrect = 9644; - e.finalkaf = 1498; - e.finalkafdagesh = 64314; - e.finalkafdageshhebrew = 64314; - e.finalkafhebrew = 1498; - e.finalmem = 1501; - e.finalmemhebrew = 1501; - e.finalnun = 1503; - e.finalnunhebrew = 1503; - e.finalpe = 1507; - e.finalpehebrew = 1507; - e.finaltsadi = 1509; - e.finaltsadihebrew = 1509; - e.firsttonechinese = 713; - e.fisheye = 9673; - e.fitacyrillic = 1139; - e.five = 53; - e.fivearabic = 1637; - e.fivebengali = 2539; - e.fivecircle = 9316; - e.fivecircleinversesansserif = 10126; - e.fivedeva = 2411; - e.fiveeighths = 8541; - e.fivegujarati = 2795; - e.fivegurmukhi = 2667; - e.fivehackarabic = 1637; - e.fivehangzhou = 12325; - e.fiveideographicparen = 12836; - e.fiveinferior = 8325; - e.fivemonospace = 65301; - e.fiveoldstyle = 63285; - e.fiveparen = 9336; - e.fiveperiod = 9356; - e.fivepersian = 1781; - e.fiveroman = 8564; - e.fivesuperior = 8309; - e.fivethai = 3669; - e.fl = 64258; - e.f_l = 64258; - e.florin = 402; - e.fmonospace = 65350; - e.fmsquare = 13209; - e.fofanthai = 3615; - e.fofathai = 3613; - e.fongmanthai = 3663; - e.forall = 8704; - e.four = 52; - e.fourarabic = 1636; - e.fourbengali = 2538; - e.fourcircle = 9315; - e.fourcircleinversesansserif = 10125; - e.fourdeva = 2410; - e.fourgujarati = 2794; - e.fourgurmukhi = 2666; - e.fourhackarabic = 1636; - e.fourhangzhou = 12324; - e.fourideographicparen = 12835; - e.fourinferior = 8324; - e.fourmonospace = 65300; - e.fournumeratorbengali = 2551; - e.fouroldstyle = 63284; - e.fourparen = 9335; - e.fourperiod = 9355; - e.fourpersian = 1780; - e.fourroman = 8563; - e.foursuperior = 8308; - e.fourteencircle = 9325; - e.fourteenparen = 9345; - e.fourteenperiod = 9365; - e.fourthai = 3668; - e.fourthtonechinese = 715; - e.fparen = 9377; - e.fraction = 8260; - e.franc = 8355; - e.g = 103; - e.gabengali = 2455; - e.gacute = 501; - e.gadeva = 2327; - e.gafarabic = 1711; - e.gaffinalarabic = 64403; - e.gafinitialarabic = 64404; - e.gafmedialarabic = 64405; - e.gagujarati = 2711; - e.gagurmukhi = 2583; - e.gahiragana = 12364; - e.gakatakana = 12460; - e.gamma = 947; - e.gammalatinsmall = 611; - e.gammasuperior = 736; - e.gangiacoptic = 1003; - e.gbopomofo = 12557; - e.gbreve = 287; - e.gcaron = 487; - e.gcedilla = 291; - e.gcircle = 9430; - e.gcircumflex = 285; - e.gcommaaccent = 291; - e.gdot = 289; - e.gdotaccent = 289; - e.gecyrillic = 1075; - e.gehiragana = 12370; - e.gekatakana = 12466; - e.geometricallyequal = 8785; - e.gereshaccenthebrew = 1436; - e.gereshhebrew = 1523; - e.gereshmuqdamhebrew = 1437; - e.germandbls = 223; - e.gershayimaccenthebrew = 1438; - e.gershayimhebrew = 1524; - e.getamark = 12307; - e.ghabengali = 2456; - e.ghadarmenian = 1394; - e.ghadeva = 2328; - e.ghagujarati = 2712; - e.ghagurmukhi = 2584; - e.ghainarabic = 1594; - e.ghainfinalarabic = 65230; - e.ghaininitialarabic = 65231; - e.ghainmedialarabic = 65232; - e.ghemiddlehookcyrillic = 1173; - e.ghestrokecyrillic = 1171; - e.gheupturncyrillic = 1169; - e.ghhadeva = 2394; - e.ghhagurmukhi = 2650; - e.ghook = 608; - e.ghzsquare = 13203; - e.gihiragana = 12366; - e.gikatakana = 12462; - e.gimarmenian = 1379; - e.gimel = 1490; - e.gimeldagesh = 64306; - e.gimeldageshhebrew = 64306; - e.gimelhebrew = 1490; - e.gjecyrillic = 1107; - e.glottalinvertedstroke = 446; - e.glottalstop = 660; - e.glottalstopinverted = 662; - e.glottalstopmod = 704; - e.glottalstopreversed = 661; - e.glottalstopreversedmod = 705; - e.glottalstopreversedsuperior = 740; - e.glottalstopstroke = 673; - e.glottalstopstrokereversed = 674; - e.gmacron = 7713; - e.gmonospace = 65351; - e.gohiragana = 12372; - e.gokatakana = 12468; - e.gparen = 9378; - e.gpasquare = 13228; - e.gradient = 8711; - e.grave = 96; - e.gravebelowcmb = 790; - e.gravecmb = 768; - e.gravecomb = 768; - e.gravedeva = 2387; - e.gravelowmod = 718; - e.gravemonospace = 65344; - e.gravetonecmb = 832; - e.greater = 62; - e.greaterequal = 8805; - e.greaterequalorless = 8923; - e.greatermonospace = 65310; - e.greaterorequivalent = 8819; - e.greaterorless = 8823; - e.greateroverequal = 8807; - e.greatersmall = 65125; - e.gscript = 609; - e.gstroke = 485; - e.guhiragana = 12368; - e.guillemotleft = 171; - e.guillemotright = 187; - e.guilsinglleft = 8249; - e.guilsinglright = 8250; - e.gukatakana = 12464; - e.guramusquare = 13080; - e.gysquare = 13257; - e.h = 104; - e.haabkhasiancyrillic = 1193; - e.haaltonearabic = 1729; - e.habengali = 2489; - e.hadescendercyrillic = 1203; - e.hadeva = 2361; - e.hagujarati = 2745; - e.hagurmukhi = 2617; - e.haharabic = 1581; - e.hahfinalarabic = 65186; - e.hahinitialarabic = 65187; - e.hahiragana = 12399; - e.hahmedialarabic = 65188; - e.haitusquare = 13098; - e.hakatakana = 12495; - e.hakatakanahalfwidth = 65418; - e.halantgurmukhi = 2637; - e.hamzaarabic = 1569; - e.hamzalowarabic = 1569; - e.hangulfiller = 12644; - e.hardsigncyrillic = 1098; - e.harpoonleftbarbup = 8636; - e.harpoonrightbarbup = 8640; - e.hasquare = 13258; - e.hatafpatah = 1458; - e.hatafpatah16 = 1458; - e.hatafpatah23 = 1458; - e.hatafpatah2f = 1458; - e.hatafpatahhebrew = 1458; - e.hatafpatahnarrowhebrew = 1458; - e.hatafpatahquarterhebrew = 1458; - e.hatafpatahwidehebrew = 1458; - e.hatafqamats = 1459; - e.hatafqamats1b = 1459; - e.hatafqamats28 = 1459; - e.hatafqamats34 = 1459; - e.hatafqamatshebrew = 1459; - e.hatafqamatsnarrowhebrew = 1459; - e.hatafqamatsquarterhebrew = 1459; - e.hatafqamatswidehebrew = 1459; - e.hatafsegol = 1457; - e.hatafsegol17 = 1457; - e.hatafsegol24 = 1457; - e.hatafsegol30 = 1457; - e.hatafsegolhebrew = 1457; - e.hatafsegolnarrowhebrew = 1457; - e.hatafsegolquarterhebrew = 1457; - e.hatafsegolwidehebrew = 1457; - e.hbar = 295; - e.hbopomofo = 12559; - e.hbrevebelow = 7723; - e.hcedilla = 7721; - e.hcircle = 9431; - e.hcircumflex = 293; - e.hdieresis = 7719; - e.hdotaccent = 7715; - e.hdotbelow = 7717; - e.he = 1492; - e.heart = 9829; - e.heartsuitblack = 9829; - e.heartsuitwhite = 9825; - e.hedagesh = 64308; - e.hedageshhebrew = 64308; - e.hehaltonearabic = 1729; - e.heharabic = 1607; - e.hehebrew = 1492; - e.hehfinalaltonearabic = 64423; - e.hehfinalalttwoarabic = 65258; - e.hehfinalarabic = 65258; - e.hehhamzaabovefinalarabic = 64421; - e.hehhamzaaboveisolatedarabic = 64420; - e.hehinitialaltonearabic = 64424; - e.hehinitialarabic = 65259; - e.hehiragana = 12408; - e.hehmedialaltonearabic = 64425; - e.hehmedialarabic = 65260; - e.heiseierasquare = 13179; - e.hekatakana = 12504; - e.hekatakanahalfwidth = 65421; - e.hekutaarusquare = 13110; - e.henghook = 615; - e.herutusquare = 13113; - e.het = 1495; - e.hethebrew = 1495; - e.hhook = 614; - e.hhooksuperior = 689; - e.hieuhacirclekorean = 12923; - e.hieuhaparenkorean = 12827; - e.hieuhcirclekorean = 12909; - e.hieuhkorean = 12622; - e.hieuhparenkorean = 12813; - e.hihiragana = 12402; - e.hikatakana = 12498; - e.hikatakanahalfwidth = 65419; - e.hiriq = 1460; - e.hiriq14 = 1460; - e.hiriq21 = 1460; - e.hiriq2d = 1460; - e.hiriqhebrew = 1460; - e.hiriqnarrowhebrew = 1460; - e.hiriqquarterhebrew = 1460; - e.hiriqwidehebrew = 1460; - e.hlinebelow = 7830; - e.hmonospace = 65352; - e.hoarmenian = 1392; - e.hohipthai = 3627; - e.hohiragana = 12411; - e.hokatakana = 12507; - e.hokatakanahalfwidth = 65422; - e.holam = 1465; - e.holam19 = 1465; - e.holam26 = 1465; - e.holam32 = 1465; - e.holamhebrew = 1465; - e.holamnarrowhebrew = 1465; - e.holamquarterhebrew = 1465; - e.holamwidehebrew = 1465; - e.honokhukthai = 3630; - e.hookabovecomb = 777; - e.hookcmb = 777; - e.hookpalatalizedbelowcmb = 801; - e.hookretroflexbelowcmb = 802; - e.hoonsquare = 13122; - e.horicoptic = 1001; - e.horizontalbar = 8213; - e.horncmb = 795; - e.hotsprings = 9832; - e.house = 8962; - e.hparen = 9379; - e.hsuperior = 688; - e.hturned = 613; - e.huhiragana = 12405; - e.huiitosquare = 13107; - e.hukatakana = 12501; - e.hukatakanahalfwidth = 65420; - e.hungarumlaut = 733; - e.hungarumlautcmb = 779; - e.hv = 405; - e.hyphen = 45; - e.hypheninferior = 63205; - e.hyphenmonospace = 65293; - e.hyphensmall = 65123; - e.hyphensuperior = 63206; - e.hyphentwo = 8208; - e.i = 105; - e.iacute = 237; - e.iacyrillic = 1103; - e.ibengali = 2439; - e.ibopomofo = 12583; - e.ibreve = 301; - e.icaron = 464; - e.icircle = 9432; - e.icircumflex = 238; - e.icyrillic = 1110; - e.idblgrave = 521; - e.ideographearthcircle = 12943; - e.ideographfirecircle = 12939; - e.ideographicallianceparen = 12863; - e.ideographiccallparen = 12858; - e.ideographiccentrecircle = 12965; - e.ideographicclose = 12294; - e.ideographiccomma = 12289; - e.ideographiccommaleft = 65380; - e.ideographiccongratulationparen = 12855; - e.ideographiccorrectcircle = 12963; - e.ideographicearthparen = 12847; - e.ideographicenterpriseparen = 12861; - e.ideographicexcellentcircle = 12957; - e.ideographicfestivalparen = 12864; - e.ideographicfinancialcircle = 12950; - e.ideographicfinancialparen = 12854; - e.ideographicfireparen = 12843; - e.ideographichaveparen = 12850; - e.ideographichighcircle = 12964; - e.ideographiciterationmark = 12293; - e.ideographiclaborcircle = 12952; - e.ideographiclaborparen = 12856; - e.ideographicleftcircle = 12967; - e.ideographiclowcircle = 12966; - e.ideographicmedicinecircle = 12969; - e.ideographicmetalparen = 12846; - e.ideographicmoonparen = 12842; - e.ideographicnameparen = 12852; - e.ideographicperiod = 12290; - e.ideographicprintcircle = 12958; - e.ideographicreachparen = 12867; - e.ideographicrepresentparen = 12857; - e.ideographicresourceparen = 12862; - e.ideographicrightcircle = 12968; - e.ideographicsecretcircle = 12953; - e.ideographicselfparen = 12866; - e.ideographicsocietyparen = 12851; - e.ideographicspace = 12288; - e.ideographicspecialparen = 12853; - e.ideographicstockparen = 12849; - e.ideographicstudyparen = 12859; - e.ideographicsunparen = 12848; - e.ideographicsuperviseparen = 12860; - e.ideographicwaterparen = 12844; - e.ideographicwoodparen = 12845; - e.ideographiczero = 12295; - e.ideographmetalcircle = 12942; - e.ideographmooncircle = 12938; - e.ideographnamecircle = 12948; - e.ideographsuncircle = 12944; - e.ideographwatercircle = 12940; - e.ideographwoodcircle = 12941; - e.ideva = 2311; - e.idieresis = 239; - e.idieresisacute = 7727; - e.idieresiscyrillic = 1253; - e.idotbelow = 7883; - e.iebrevecyrillic = 1239; - e.iecyrillic = 1077; - e.ieungacirclekorean = 12917; - e.ieungaparenkorean = 12821; - e.ieungcirclekorean = 12903; - e.ieungkorean = 12615; - e.ieungparenkorean = 12807; - e.igrave = 236; - e.igujarati = 2695; - e.igurmukhi = 2567; - e.ihiragana = 12356; - e.ihookabove = 7881; - e.iibengali = 2440; - e.iicyrillic = 1080; - e.iideva = 2312; - e.iigujarati = 2696; - e.iigurmukhi = 2568; - e.iimatragurmukhi = 2624; - e.iinvertedbreve = 523; - e.iishortcyrillic = 1081; - e.iivowelsignbengali = 2496; - e.iivowelsigndeva = 2368; - e.iivowelsigngujarati = 2752; - e.ij = 307; - e.ikatakana = 12452; - e.ikatakanahalfwidth = 65394; - e.ikorean = 12643; - e.ilde = 732; - e.iluyhebrew = 1452; - e.imacron = 299; - e.imacroncyrillic = 1251; - e.imageorapproximatelyequal = 8787; - e.imatragurmukhi = 2623; - e.imonospace = 65353; - e.increment = 8710; - e.infinity = 8734; - e.iniarmenian = 1387; - e.integral = 8747; - e.integralbottom = 8993; - e.integralbt = 8993; - e.integralex = 63733; - e.integraltop = 8992; - e.integraltp = 8992; - e.intersection = 8745; - e.intisquare = 13061; - e.invbullet = 9688; - e.invcircle = 9689; - e.invsmileface = 9787; - e.iocyrillic = 1105; - e.iogonek = 303; - e.iota = 953; - e.iotadieresis = 970; - e.iotadieresistonos = 912; - e.iotalatin = 617; - e.iotatonos = 943; - e.iparen = 9380; - e.irigurmukhi = 2674; - e.ismallhiragana = 12355; - e.ismallkatakana = 12451; - e.ismallkatakanahalfwidth = 65384; - e.issharbengali = 2554; - e.istroke = 616; - e.isuperior = 63213; - e.iterationhiragana = 12445; - e.iterationkatakana = 12541; - e.itilde = 297; - e.itildebelow = 7725; - e.iubopomofo = 12585; - e.iucyrillic = 1102; - e.ivowelsignbengali = 2495; - e.ivowelsigndeva = 2367; - e.ivowelsigngujarati = 2751; - e.izhitsacyrillic = 1141; - e.izhitsadblgravecyrillic = 1143; - e.j = 106; - e.jaarmenian = 1393; - e.jabengali = 2460; - e.jadeva = 2332; - e.jagujarati = 2716; - e.jagurmukhi = 2588; - e.jbopomofo = 12560; - e.jcaron = 496; - e.jcircle = 9433; - e.jcircumflex = 309; - e.jcrossedtail = 669; - e.jdotlessstroke = 607; - e.jecyrillic = 1112; - e.jeemarabic = 1580; - e.jeemfinalarabic = 65182; - e.jeeminitialarabic = 65183; - e.jeemmedialarabic = 65184; - e.jeharabic = 1688; - e.jehfinalarabic = 64395; - e.jhabengali = 2461; - e.jhadeva = 2333; - e.jhagujarati = 2717; - e.jhagurmukhi = 2589; - e.jheharmenian = 1403; - e.jis = 12292; - e.jmonospace = 65354; - e.jparen = 9381; - e.jsuperior = 690; - e.k = 107; - e.kabashkircyrillic = 1185; - e.kabengali = 2453; - e.kacute = 7729; - e.kacyrillic = 1082; - e.kadescendercyrillic = 1179; - e.kadeva = 2325; - e.kaf = 1499; - e.kafarabic = 1603; - e.kafdagesh = 64315; - e.kafdageshhebrew = 64315; - e.kaffinalarabic = 65242; - e.kafhebrew = 1499; - e.kafinitialarabic = 65243; - e.kafmedialarabic = 65244; - e.kafrafehebrew = 64333; - e.kagujarati = 2709; - e.kagurmukhi = 2581; - e.kahiragana = 12363; - e.kahookcyrillic = 1220; - e.kakatakana = 12459; - e.kakatakanahalfwidth = 65398; - e.kappa = 954; - e.kappasymbolgreek = 1008; - e.kapyeounmieumkorean = 12657; - e.kapyeounphieuphkorean = 12676; - e.kapyeounpieupkorean = 12664; - e.kapyeounssangpieupkorean = 12665; - e.karoriisquare = 13069; - e.kashidaautoarabic = 1600; - e.kashidaautonosidebearingarabic = 1600; - e.kasmallkatakana = 12533; - e.kasquare = 13188; - e.kasraarabic = 1616; - e.kasratanarabic = 1613; - e.kastrokecyrillic = 1183; - e.katahiraprolongmarkhalfwidth = 65392; - e.kaverticalstrokecyrillic = 1181; - e.kbopomofo = 12558; - e.kcalsquare = 13193; - e.kcaron = 489; - e.kcedilla = 311; - e.kcircle = 9434; - e.kcommaaccent = 311; - e.kdotbelow = 7731; - e.keharmenian = 1412; - e.kehiragana = 12369; - e.kekatakana = 12465; - e.kekatakanahalfwidth = 65401; - e.kenarmenian = 1391; - e.kesmallkatakana = 12534; - e.kgreenlandic = 312; - e.khabengali = 2454; - e.khacyrillic = 1093; - e.khadeva = 2326; - e.khagujarati = 2710; - e.khagurmukhi = 2582; - e.khaharabic = 1582; - e.khahfinalarabic = 65190; - e.khahinitialarabic = 65191; - e.khahmedialarabic = 65192; - e.kheicoptic = 999; - e.khhadeva = 2393; - e.khhagurmukhi = 2649; - e.khieukhacirclekorean = 12920; - e.khieukhaparenkorean = 12824; - e.khieukhcirclekorean = 12906; - e.khieukhkorean = 12619; - e.khieukhparenkorean = 12810; - e.khokhaithai = 3586; - e.khokhonthai = 3589; - e.khokhuatthai = 3587; - e.khokhwaithai = 3588; - e.khomutthai = 3675; - e.khook = 409; - e.khorakhangthai = 3590; - e.khzsquare = 13201; - e.kihiragana = 12365; - e.kikatakana = 12461; - e.kikatakanahalfwidth = 65399; - e.kiroguramusquare = 13077; - e.kiromeetorusquare = 13078; - e.kirosquare = 13076; - e.kiyeokacirclekorean = 12910; - e.kiyeokaparenkorean = 12814; - e.kiyeokcirclekorean = 12896; - e.kiyeokkorean = 12593; - e.kiyeokparenkorean = 12800; - e.kiyeoksioskorean = 12595; - e.kjecyrillic = 1116; - e.klinebelow = 7733; - e.klsquare = 13208; - e.kmcubedsquare = 13222; - e.kmonospace = 65355; - e.kmsquaredsquare = 13218; - e.kohiragana = 12371; - e.kohmsquare = 13248; - e.kokaithai = 3585; - e.kokatakana = 12467; - e.kokatakanahalfwidth = 65402; - e.kooposquare = 13086; - e.koppacyrillic = 1153; - e.koreanstandardsymbol = 12927; - e.koroniscmb = 835; - e.kparen = 9382; - e.kpasquare = 13226; - e.ksicyrillic = 1135; - e.ktsquare = 13263; - e.kturned = 670; - e.kuhiragana = 12367; - e.kukatakana = 12463; - e.kukatakanahalfwidth = 65400; - e.kvsquare = 13240; - e.kwsquare = 13246; - e.l = 108; - e.labengali = 2482; - e.lacute = 314; - e.ladeva = 2354; - e.lagujarati = 2738; - e.lagurmukhi = 2610; - e.lakkhangyaothai = 3653; - e.lamaleffinalarabic = 65276; - e.lamalefhamzaabovefinalarabic = 65272; - e.lamalefhamzaaboveisolatedarabic = 65271; - e.lamalefhamzabelowfinalarabic = 65274; - e.lamalefhamzabelowisolatedarabic = 65273; - e.lamalefisolatedarabic = 65275; - e.lamalefmaddaabovefinalarabic = 65270; - e.lamalefmaddaaboveisolatedarabic = 65269; - e.lamarabic = 1604; - e.lambda = 955; - e.lambdastroke = 411; - e.lamed = 1500; - e.lameddagesh = 64316; - e.lameddageshhebrew = 64316; - e.lamedhebrew = 1500; - e.lamfinalarabic = 65246; - e.lamhahinitialarabic = 64714; - e.laminitialarabic = 65247; - e.lamjeeminitialarabic = 64713; - e.lamkhahinitialarabic = 64715; - e.lamlamhehisolatedarabic = 65010; - e.lammedialarabic = 65248; - e.lammeemhahinitialarabic = 64904; - e.lammeeminitialarabic = 64716; - e.largecircle = 9711; - e.lbar = 410; - e.lbelt = 620; - e.lbopomofo = 12556; - e.lcaron = 318; - e.lcedilla = 316; - e.lcircle = 9435; - e.lcircumflexbelow = 7741; - e.lcommaaccent = 316; - e.ldot = 320; - e.ldotaccent = 320; - e.ldotbelow = 7735; - e.ldotbelowmacron = 7737; - e.leftangleabovecmb = 794; - e.lefttackbelowcmb = 792; - e.less = 60; - e.lessequal = 8804; - e.lessequalorgreater = 8922; - e.lessmonospace = 65308; - e.lessorequivalent = 8818; - e.lessorgreater = 8822; - e.lessoverequal = 8806; - e.lesssmall = 65124; - e.lezh = 622; - e.lfblock = 9612; - e.lhookretroflex = 621; - e.lira = 8356; - e.liwnarmenian = 1388; - e.lj = 457; - e.ljecyrillic = 1113; - e.ll = 63168; - e.lladeva = 2355; - e.llagujarati = 2739; - e.llinebelow = 7739; - e.llladeva = 2356; - e.llvocalicbengali = 2529; - e.llvocalicdeva = 2401; - e.llvocalicvowelsignbengali = 2531; - e.llvocalicvowelsigndeva = 2403; - e.lmiddletilde = 619; - e.lmonospace = 65356; - e.lmsquare = 13264; - e.lochulathai = 3628; - e.logicaland = 8743; - e.logicalnot = 172; - e.logicalnotreversed = 8976; - e.logicalor = 8744; - e.lolingthai = 3621; - e.longs = 383; - e.lowlinecenterline = 65102; - e.lowlinecmb = 818; - e.lowlinedashed = 65101; - e.lozenge = 9674; - e.lparen = 9383; - e.lslash = 322; - e.lsquare = 8467; - e.lsuperior = 63214; - e.ltshade = 9617; - e.luthai = 3622; - e.lvocalicbengali = 2444; - e.lvocalicdeva = 2316; - e.lvocalicvowelsignbengali = 2530; - e.lvocalicvowelsigndeva = 2402; - e.lxsquare = 13267; - e.m = 109; - e.mabengali = 2478; - e.macron = 175; - e.macronbelowcmb = 817; - e.macroncmb = 772; - e.macronlowmod = 717; - e.macronmonospace = 65507; - e.macute = 7743; - e.madeva = 2350; - e.magujarati = 2734; - e.magurmukhi = 2606; - e.mahapakhhebrew = 1444; - e.mahapakhlefthebrew = 1444; - e.mahiragana = 12414; - e.maichattawalowleftthai = 63637; - e.maichattawalowrightthai = 63636; - e.maichattawathai = 3659; - e.maichattawaupperleftthai = 63635; - e.maieklowleftthai = 63628; - e.maieklowrightthai = 63627; - e.maiekthai = 3656; - e.maiekupperleftthai = 63626; - e.maihanakatleftthai = 63620; - e.maihanakatthai = 3633; - e.maitaikhuleftthai = 63625; - e.maitaikhuthai = 3655; - e.maitholowleftthai = 63631; - e.maitholowrightthai = 63630; - e.maithothai = 3657; - e.maithoupperleftthai = 63629; - e.maitrilowleftthai = 63634; - e.maitrilowrightthai = 63633; - e.maitrithai = 3658; - e.maitriupperleftthai = 63632; - e.maiyamokthai = 3654; - e.makatakana = 12510; - e.makatakanahalfwidth = 65423; - e.male = 9794; - e.mansyonsquare = 13127; - e.maqafhebrew = 1470; - e.mars = 9794; - e.masoracirclehebrew = 1455; - e.masquare = 13187; - e.mbopomofo = 12551; - e.mbsquare = 13268; - e.mcircle = 9436; - e.mcubedsquare = 13221; - e.mdotaccent = 7745; - e.mdotbelow = 7747; - e.meemarabic = 1605; - e.meemfinalarabic = 65250; - e.meeminitialarabic = 65251; - e.meemmedialarabic = 65252; - e.meemmeeminitialarabic = 64721; - e.meemmeemisolatedarabic = 64584; - e.meetorusquare = 13133; - e.mehiragana = 12417; - e.meizierasquare = 13182; - e.mekatakana = 12513; - e.mekatakanahalfwidth = 65426; - e.mem = 1502; - e.memdagesh = 64318; - e.memdageshhebrew = 64318; - e.memhebrew = 1502; - e.menarmenian = 1396; - e.merkhahebrew = 1445; - e.merkhakefulahebrew = 1446; - e.merkhakefulalefthebrew = 1446; - e.merkhalefthebrew = 1445; - e.mhook = 625; - e.mhzsquare = 13202; - e.middledotkatakanahalfwidth = 65381; - e.middot = 183; - e.mieumacirclekorean = 12914; - e.mieumaparenkorean = 12818; - e.mieumcirclekorean = 12900; - e.mieumkorean = 12609; - e.mieumpansioskorean = 12656; - e.mieumparenkorean = 12804; - e.mieumpieupkorean = 12654; - e.mieumsioskorean = 12655; - e.mihiragana = 12415; - e.mikatakana = 12511; - e.mikatakanahalfwidth = 65424; - e.minus = 8722; - e.minusbelowcmb = 800; - e.minuscircle = 8854; - e.minusmod = 727; - e.minusplus = 8723; - e.minute = 8242; - e.miribaarusquare = 13130; - e.mirisquare = 13129; - e.mlonglegturned = 624; - e.mlsquare = 13206; - e.mmcubedsquare = 13219; - e.mmonospace = 65357; - e.mmsquaredsquare = 13215; - e.mohiragana = 12418; - e.mohmsquare = 13249; - e.mokatakana = 12514; - e.mokatakanahalfwidth = 65427; - e.molsquare = 13270; - e.momathai = 3617; - e.moverssquare = 13223; - e.moverssquaredsquare = 13224; - e.mparen = 9384; - e.mpasquare = 13227; - e.mssquare = 13235; - e.msuperior = 63215; - e.mturned = 623; - e.mu = 181; - e.mu1 = 181; - e.muasquare = 13186; - e.muchgreater = 8811; - e.muchless = 8810; - e.mufsquare = 13196; - e.mugreek = 956; - e.mugsquare = 13197; - e.muhiragana = 12416; - e.mukatakana = 12512; - e.mukatakanahalfwidth = 65425; - e.mulsquare = 13205; - e.multiply = 215; - e.mumsquare = 13211; - e.munahhebrew = 1443; - e.munahlefthebrew = 1443; - e.musicalnote = 9834; - e.musicalnotedbl = 9835; - e.musicflatsign = 9837; - e.musicsharpsign = 9839; - e.mussquare = 13234; - e.muvsquare = 13238; - e.muwsquare = 13244; - e.mvmegasquare = 13241; - e.mvsquare = 13239; - e.mwmegasquare = 13247; - e.mwsquare = 13245; - e.n = 110; - e.nabengali = 2472; - e.nabla = 8711; - e.nacute = 324; - e.nadeva = 2344; - e.nagujarati = 2728; - e.nagurmukhi = 2600; - e.nahiragana = 12394; - e.nakatakana = 12490; - e.nakatakanahalfwidth = 65413; - e.napostrophe = 329; - e.nasquare = 13185; - e.nbopomofo = 12555; - e.nbspace = 160; - e.ncaron = 328; - e.ncedilla = 326; - e.ncircle = 9437; - e.ncircumflexbelow = 7755; - e.ncommaaccent = 326; - e.ndotaccent = 7749; - e.ndotbelow = 7751; - e.nehiragana = 12397; - e.nekatakana = 12493; - e.nekatakanahalfwidth = 65416; - e.newsheqelsign = 8362; - e.nfsquare = 13195; - e.ngabengali = 2457; - e.ngadeva = 2329; - e.ngagujarati = 2713; - e.ngagurmukhi = 2585; - e.ngonguthai = 3591; - e.nhiragana = 12435; - e.nhookleft = 626; - e.nhookretroflex = 627; - e.nieunacirclekorean = 12911; - e.nieunaparenkorean = 12815; - e.nieuncieuckorean = 12597; - e.nieuncirclekorean = 12897; - e.nieunhieuhkorean = 12598; - e.nieunkorean = 12596; - e.nieunpansioskorean = 12648; - e.nieunparenkorean = 12801; - e.nieunsioskorean = 12647; - e.nieuntikeutkorean = 12646; - e.nihiragana = 12395; - e.nikatakana = 12491; - e.nikatakanahalfwidth = 65414; - e.nikhahitleftthai = 63641; - e.nikhahitthai = 3661; - e.nine = 57; - e.ninearabic = 1641; - e.ninebengali = 2543; - e.ninecircle = 9320; - e.ninecircleinversesansserif = 10130; - e.ninedeva = 2415; - e.ninegujarati = 2799; - e.ninegurmukhi = 2671; - e.ninehackarabic = 1641; - e.ninehangzhou = 12329; - e.nineideographicparen = 12840; - e.nineinferior = 8329; - e.ninemonospace = 65305; - e.nineoldstyle = 63289; - e.nineparen = 9340; - e.nineperiod = 9360; - e.ninepersian = 1785; - e.nineroman = 8568; - e.ninesuperior = 8313; - e.nineteencircle = 9330; - e.nineteenparen = 9350; - e.nineteenperiod = 9370; - e.ninethai = 3673; - e.nj = 460; - e.njecyrillic = 1114; - e.nkatakana = 12531; - e.nkatakanahalfwidth = 65437; - e.nlegrightlong = 414; - e.nlinebelow = 7753; - e.nmonospace = 65358; - e.nmsquare = 13210; - e.nnabengali = 2467; - e.nnadeva = 2339; - e.nnagujarati = 2723; - e.nnagurmukhi = 2595; - e.nnnadeva = 2345; - e.nohiragana = 12398; - e.nokatakana = 12494; - e.nokatakanahalfwidth = 65417; - e.nonbreakingspace = 160; - e.nonenthai = 3603; - e.nonuthai = 3609; - e.noonarabic = 1606; - e.noonfinalarabic = 65254; - e.noonghunnaarabic = 1722; - e.noonghunnafinalarabic = 64415; - e.nooninitialarabic = 65255; - e.noonjeeminitialarabic = 64722; - e.noonjeemisolatedarabic = 64587; - e.noonmedialarabic = 65256; - e.noonmeeminitialarabic = 64725; - e.noonmeemisolatedarabic = 64590; - e.noonnoonfinalarabic = 64653; - e.notcontains = 8716; - e.notelement = 8713; - e.notelementof = 8713; - e.notequal = 8800; - e.notgreater = 8815; - e.notgreaternorequal = 8817; - e.notgreaternorless = 8825; - e.notidentical = 8802; - e.notless = 8814; - e.notlessnorequal = 8816; - e.notparallel = 8742; - e.notprecedes = 8832; - e.notsubset = 8836; - e.notsucceeds = 8833; - e.notsuperset = 8837; - e.nowarmenian = 1398; - e.nparen = 9385; - e.nssquare = 13233; - e.nsuperior = 8319; - e.ntilde = 241; - e.nu = 957; - e.nuhiragana = 12396; - e.nukatakana = 12492; - e.nukatakanahalfwidth = 65415; - e.nuktabengali = 2492; - e.nuktadeva = 2364; - e.nuktagujarati = 2748; - e.nuktagurmukhi = 2620; - e.numbersign = 35; - e.numbersignmonospace = 65283; - e.numbersignsmall = 65119; - e.numeralsigngreek = 884; - e.numeralsignlowergreek = 885; - e.numero = 8470; - e.nun = 1504; - e.nundagesh = 64320; - e.nundageshhebrew = 64320; - e.nunhebrew = 1504; - e.nvsquare = 13237; - e.nwsquare = 13243; - e.nyabengali = 2462; - e.nyadeva = 2334; - e.nyagujarati = 2718; - e.nyagurmukhi = 2590; - e.o = 111; - e.oacute = 243; - e.oangthai = 3629; - e.obarred = 629; - e.obarredcyrillic = 1257; - e.obarreddieresiscyrillic = 1259; - e.obengali = 2451; - e.obopomofo = 12571; - e.obreve = 335; - e.ocandradeva = 2321; - e.ocandragujarati = 2705; - e.ocandravowelsigndeva = 2377; - e.ocandravowelsigngujarati = 2761; - e.ocaron = 466; - e.ocircle = 9438; - e.ocircumflex = 244; - e.ocircumflexacute = 7889; - e.ocircumflexdotbelow = 7897; - e.ocircumflexgrave = 7891; - e.ocircumflexhookabove = 7893; - e.ocircumflextilde = 7895; - e.ocyrillic = 1086; - e.odblacute = 337; - e.odblgrave = 525; - e.odeva = 2323; - e.odieresis = 246; - e.odieresiscyrillic = 1255; - e.odotbelow = 7885; - e.oe = 339; - e.oekorean = 12634; - e.ogonek = 731; - e.ogonekcmb = 808; - e.ograve = 242; - e.ogujarati = 2707; - e.oharmenian = 1413; - e.ohiragana = 12362; - e.ohookabove = 7887; - e.ohorn = 417; - e.ohornacute = 7899; - e.ohorndotbelow = 7907; - e.ohorngrave = 7901; - e.ohornhookabove = 7903; - e.ohorntilde = 7905; - e.ohungarumlaut = 337; - e.oi = 419; - e.oinvertedbreve = 527; - e.okatakana = 12458; - e.okatakanahalfwidth = 65397; - e.okorean = 12631; - e.olehebrew = 1451; - e.omacron = 333; - e.omacronacute = 7763; - e.omacrongrave = 7761; - e.omdeva = 2384; - e.omega = 969; - e.omega1 = 982; - e.omegacyrillic = 1121; - e.omegalatinclosed = 631; - e.omegaroundcyrillic = 1147; - e.omegatitlocyrillic = 1149; - e.omegatonos = 974; - e.omgujarati = 2768; - e.omicron = 959; - e.omicrontonos = 972; - e.omonospace = 65359; - e.one = 49; - e.onearabic = 1633; - e.onebengali = 2535; - e.onecircle = 9312; - e.onecircleinversesansserif = 10122; - e.onedeva = 2407; - e.onedotenleader = 8228; - e.oneeighth = 8539; - e.onefitted = 63196; - e.onegujarati = 2791; - e.onegurmukhi = 2663; - e.onehackarabic = 1633; - e.onehalf = 189; - e.onehangzhou = 12321; - e.oneideographicparen = 12832; - e.oneinferior = 8321; - e.onemonospace = 65297; - e.onenumeratorbengali = 2548; - e.oneoldstyle = 63281; - e.oneparen = 9332; - e.oneperiod = 9352; - e.onepersian = 1777; - e.onequarter = 188; - e.oneroman = 8560; - e.onesuperior = 185; - e.onethai = 3665; - e.onethird = 8531; - e.oogonek = 491; - e.oogonekmacron = 493; - e.oogurmukhi = 2579; - e.oomatragurmukhi = 2635; - e.oopen = 596; - e.oparen = 9386; - e.openbullet = 9702; - e.option = 8997; - e.ordfeminine = 170; - e.ordmasculine = 186; - e.orthogonal = 8735; - e.oshortdeva = 2322; - e.oshortvowelsigndeva = 2378; - e.oslash = 248; - e.oslashacute = 511; - e.osmallhiragana = 12361; - e.osmallkatakana = 12457; - e.osmallkatakanahalfwidth = 65387; - e.ostrokeacute = 511; - e.osuperior = 63216; - e.otcyrillic = 1151; - e.otilde = 245; - e.otildeacute = 7757; - e.otildedieresis = 7759; - e.oubopomofo = 12577; - e.overline = 8254; - e.overlinecenterline = 65098; - e.overlinecmb = 773; - e.overlinedashed = 65097; - e.overlinedblwavy = 65100; - e.overlinewavy = 65099; - e.overscore = 175; - e.ovowelsignbengali = 2507; - e.ovowelsigndeva = 2379; - e.ovowelsigngujarati = 2763; - e.p = 112; - e.paampssquare = 13184; - e.paasentosquare = 13099; - e.pabengali = 2474; - e.pacute = 7765; - e.padeva = 2346; - e.pagedown = 8671; - e.pageup = 8670; - e.pagujarati = 2730; - e.pagurmukhi = 2602; - e.pahiragana = 12401; - e.paiyannoithai = 3631; - e.pakatakana = 12497; - e.palatalizationcyrilliccmb = 1156; - e.palochkacyrillic = 1216; - e.pansioskorean = 12671; - e.paragraph = 182; - e.parallel = 8741; - e.parenleft = 40; - e.parenleftaltonearabic = 64830; - e.parenleftbt = 63725; - e.parenleftex = 63724; - e.parenleftinferior = 8333; - e.parenleftmonospace = 65288; - e.parenleftsmall = 65113; - e.parenleftsuperior = 8317; - e.parenlefttp = 63723; - e.parenleftvertical = 65077; - e.parenright = 41; - e.parenrightaltonearabic = 64831; - e.parenrightbt = 63736; - e.parenrightex = 63735; - e.parenrightinferior = 8334; - e.parenrightmonospace = 65289; - e.parenrightsmall = 65114; - e.parenrightsuperior = 8318; - e.parenrighttp = 63734; - e.parenrightvertical = 65078; - e.partialdiff = 8706; - e.paseqhebrew = 1472; - e.pashtahebrew = 1433; - e.pasquare = 13225; - e.patah = 1463; - e.patah11 = 1463; - e.patah1d = 1463; - e.patah2a = 1463; - e.patahhebrew = 1463; - e.patahnarrowhebrew = 1463; - e.patahquarterhebrew = 1463; - e.patahwidehebrew = 1463; - e.pazerhebrew = 1441; - e.pbopomofo = 12550; - e.pcircle = 9439; - e.pdotaccent = 7767; - e.pe = 1508; - e.pecyrillic = 1087; - e.pedagesh = 64324; - e.pedageshhebrew = 64324; - e.peezisquare = 13115; - e.pefinaldageshhebrew = 64323; - e.peharabic = 1662; - e.peharmenian = 1402; - e.pehebrew = 1508; - e.pehfinalarabic = 64343; - e.pehinitialarabic = 64344; - e.pehiragana = 12410; - e.pehmedialarabic = 64345; - e.pekatakana = 12506; - e.pemiddlehookcyrillic = 1191; - e.perafehebrew = 64334; - e.percent = 37; - e.percentarabic = 1642; - e.percentmonospace = 65285; - e.percentsmall = 65130; - e.period = 46; - e.periodarmenian = 1417; - e.periodcentered = 183; - e.periodhalfwidth = 65377; - e.periodinferior = 63207; - e.periodmonospace = 65294; - e.periodsmall = 65106; - e.periodsuperior = 63208; - e.perispomenigreekcmb = 834; - e.perpendicular = 8869; - e.perthousand = 8240; - e.peseta = 8359; - e.pfsquare = 13194; - e.phabengali = 2475; - e.phadeva = 2347; - e.phagujarati = 2731; - e.phagurmukhi = 2603; - e.phi = 966; - e.phi1 = 981; - e.phieuphacirclekorean = 12922; - e.phieuphaparenkorean = 12826; - e.phieuphcirclekorean = 12908; - e.phieuphkorean = 12621; - e.phieuphparenkorean = 12812; - e.philatin = 632; - e.phinthuthai = 3642; - e.phisymbolgreek = 981; - e.phook = 421; - e.phophanthai = 3614; - e.phophungthai = 3612; - e.phosamphaothai = 3616; - e.pi = 960; - e.pieupacirclekorean = 12915; - e.pieupaparenkorean = 12819; - e.pieupcieuckorean = 12662; - e.pieupcirclekorean = 12901; - e.pieupkiyeokkorean = 12658; - e.pieupkorean = 12610; - e.pieupparenkorean = 12805; - e.pieupsioskiyeokkorean = 12660; - e.pieupsioskorean = 12612; - e.pieupsiostikeutkorean = 12661; - e.pieupthieuthkorean = 12663; - e.pieuptikeutkorean = 12659; - e.pihiragana = 12404; - e.pikatakana = 12500; - e.pisymbolgreek = 982; - e.piwrarmenian = 1411; - e.planckover2pi = 8463; - e.planckover2pi1 = 8463; - e.plus = 43; - e.plusbelowcmb = 799; - e.pluscircle = 8853; - e.plusminus = 177; - e.plusmod = 726; - e.plusmonospace = 65291; - e.plussmall = 65122; - e.plussuperior = 8314; - e.pmonospace = 65360; - e.pmsquare = 13272; - e.pohiragana = 12413; - e.pointingindexdownwhite = 9759; - e.pointingindexleftwhite = 9756; - e.pointingindexrightwhite = 9758; - e.pointingindexupwhite = 9757; - e.pokatakana = 12509; - e.poplathai = 3611; - e.postalmark = 12306; - e.postalmarkface = 12320; - e.pparen = 9387; - e.precedes = 8826; - e.prescription = 8478; - e.primemod = 697; - e.primereversed = 8245; - e.product = 8719; - e.projective = 8965; - e.prolongedkana = 12540; - e.propellor = 8984; - e.propersubset = 8834; - e.propersuperset = 8835; - e.proportion = 8759; - e.proportional = 8733; - e.psi = 968; - e.psicyrillic = 1137; - e.psilipneumatacyrilliccmb = 1158; - e.pssquare = 13232; - e.puhiragana = 12407; - e.pukatakana = 12503; - e.pvsquare = 13236; - e.pwsquare = 13242; - e.q = 113; - e.qadeva = 2392; - e.qadmahebrew = 1448; - e.qafarabic = 1602; - e.qaffinalarabic = 65238; - e.qafinitialarabic = 65239; - e.qafmedialarabic = 65240; - e.qamats = 1464; - e.qamats10 = 1464; - e.qamats1a = 1464; - e.qamats1c = 1464; - e.qamats27 = 1464; - e.qamats29 = 1464; - e.qamats33 = 1464; - e.qamatsde = 1464; - e.qamatshebrew = 1464; - e.qamatsnarrowhebrew = 1464; - e.qamatsqatanhebrew = 1464; - e.qamatsqatannarrowhebrew = 1464; - e.qamatsqatanquarterhebrew = 1464; - e.qamatsqatanwidehebrew = 1464; - e.qamatsquarterhebrew = 1464; - e.qamatswidehebrew = 1464; - e.qarneyparahebrew = 1439; - e.qbopomofo = 12561; - e.qcircle = 9440; - e.qhook = 672; - e.qmonospace = 65361; - e.qof = 1511; - e.qofdagesh = 64327; - e.qofdageshhebrew = 64327; - e.qofhebrew = 1511; - e.qparen = 9388; - e.quarternote = 9833; - e.qubuts = 1467; - e.qubuts18 = 1467; - e.qubuts25 = 1467; - e.qubuts31 = 1467; - e.qubutshebrew = 1467; - e.qubutsnarrowhebrew = 1467; - e.qubutsquarterhebrew = 1467; - e.qubutswidehebrew = 1467; - e.question = 63; - e.questionarabic = 1567; - e.questionarmenian = 1374; - e.questiondown = 191; - e.questiondownsmall = 63423; - e.questiongreek = 894; - e.questionmonospace = 65311; - e.questionsmall = 63295; - e.quotedbl = 34; - e.quotedblbase = 8222; - e.quotedblleft = 8220; - e.quotedblmonospace = 65282; - e.quotedblprime = 12318; - e.quotedblprimereversed = 12317; - e.quotedblright = 8221; - e.quoteleft = 8216; - e.quoteleftreversed = 8219; - e.quotereversed = 8219; - e.quoteright = 8217; - e.quoterightn = 329; - e.quotesinglbase = 8218; - e.quotesingle = 39; - e.quotesinglemonospace = 65287; - e.r = 114; - e.raarmenian = 1404; - e.rabengali = 2480; - e.racute = 341; - e.radeva = 2352; - e.radical = 8730; - e.radicalex = 63717; - e.radoverssquare = 13230; - e.radoverssquaredsquare = 13231; - e.radsquare = 13229; - e.rafe = 1471; - e.rafehebrew = 1471; - e.ragujarati = 2736; - e.ragurmukhi = 2608; - e.rahiragana = 12425; - e.rakatakana = 12521; - e.rakatakanahalfwidth = 65431; - e.ralowerdiagonalbengali = 2545; - e.ramiddlediagonalbengali = 2544; - e.ramshorn = 612; - e.ratio = 8758; - e.rbopomofo = 12566; - e.rcaron = 345; - e.rcedilla = 343; - e.rcircle = 9441; - e.rcommaaccent = 343; - e.rdblgrave = 529; - e.rdotaccent = 7769; - e.rdotbelow = 7771; - e.rdotbelowmacron = 7773; - e.referencemark = 8251; - e.reflexsubset = 8838; - e.reflexsuperset = 8839; - e.registered = 174; - e.registersans = 63720; - e.registerserif = 63194; - e.reharabic = 1585; - e.reharmenian = 1408; - e.rehfinalarabic = 65198; - e.rehiragana = 12428; - e.rekatakana = 12524; - e.rekatakanahalfwidth = 65434; - e.resh = 1512; - e.reshdageshhebrew = 64328; - e.reshhebrew = 1512; - e.reversedtilde = 8765; - e.reviahebrew = 1431; - e.reviamugrashhebrew = 1431; - e.revlogicalnot = 8976; - e.rfishhook = 638; - e.rfishhookreversed = 639; - e.rhabengali = 2525; - e.rhadeva = 2397; - e.rho = 961; - e.rhook = 637; - e.rhookturned = 635; - e.rhookturnedsuperior = 693; - e.rhosymbolgreek = 1009; - e.rhotichookmod = 734; - e.rieulacirclekorean = 12913; - e.rieulaparenkorean = 12817; - e.rieulcirclekorean = 12899; - e.rieulhieuhkorean = 12608; - e.rieulkiyeokkorean = 12602; - e.rieulkiyeoksioskorean = 12649; - e.rieulkorean = 12601; - e.rieulmieumkorean = 12603; - e.rieulpansioskorean = 12652; - e.rieulparenkorean = 12803; - e.rieulphieuphkorean = 12607; - e.rieulpieupkorean = 12604; - e.rieulpieupsioskorean = 12651; - e.rieulsioskorean = 12605; - e.rieulthieuthkorean = 12606; - e.rieultikeutkorean = 12650; - e.rieulyeorinhieuhkorean = 12653; - e.rightangle = 8735; - e.righttackbelowcmb = 793; - e.righttriangle = 8895; - e.rihiragana = 12426; - e.rikatakana = 12522; - e.rikatakanahalfwidth = 65432; - e.ring = 730; - e.ringbelowcmb = 805; - e.ringcmb = 778; - e.ringhalfleft = 703; - e.ringhalfleftarmenian = 1369; - e.ringhalfleftbelowcmb = 796; - e.ringhalfleftcentered = 723; - e.ringhalfright = 702; - e.ringhalfrightbelowcmb = 825; - e.ringhalfrightcentered = 722; - e.rinvertedbreve = 531; - e.rittorusquare = 13137; - e.rlinebelow = 7775; - e.rlongleg = 636; - e.rlonglegturned = 634; - e.rmonospace = 65362; - e.rohiragana = 12429; - e.rokatakana = 12525; - e.rokatakanahalfwidth = 65435; - e.roruathai = 3619; - e.rparen = 9389; - e.rrabengali = 2524; - e.rradeva = 2353; - e.rragurmukhi = 2652; - e.rreharabic = 1681; - e.rrehfinalarabic = 64397; - e.rrvocalicbengali = 2528; - e.rrvocalicdeva = 2400; - e.rrvocalicgujarati = 2784; - e.rrvocalicvowelsignbengali = 2500; - e.rrvocalicvowelsigndeva = 2372; - e.rrvocalicvowelsigngujarati = 2756; - e.rsuperior = 63217; - e.rtblock = 9616; - e.rturned = 633; - e.rturnedsuperior = 692; - e.ruhiragana = 12427; - e.rukatakana = 12523; - e.rukatakanahalfwidth = 65433; - e.rupeemarkbengali = 2546; - e.rupeesignbengali = 2547; - e.rupiah = 63197; - e.ruthai = 3620; - e.rvocalicbengali = 2443; - e.rvocalicdeva = 2315; - e.rvocalicgujarati = 2699; - e.rvocalicvowelsignbengali = 2499; - e.rvocalicvowelsigndeva = 2371; - e.rvocalicvowelsigngujarati = 2755; - e.s = 115; - e.sabengali = 2488; - e.sacute = 347; - e.sacutedotaccent = 7781; - e.sadarabic = 1589; - e.sadeva = 2360; - e.sadfinalarabic = 65210; - e.sadinitialarabic = 65211; - e.sadmedialarabic = 65212; - e.sagujarati = 2744; - e.sagurmukhi = 2616; - e.sahiragana = 12373; - e.sakatakana = 12469; - e.sakatakanahalfwidth = 65403; - e.sallallahoualayhewasallamarabic = 65018; - e.samekh = 1505; - e.samekhdagesh = 64321; - e.samekhdageshhebrew = 64321; - e.samekhhebrew = 1505; - e.saraaathai = 3634; - e.saraaethai = 3649; - e.saraaimaimalaithai = 3652; - e.saraaimaimuanthai = 3651; - e.saraamthai = 3635; - e.saraathai = 3632; - e.saraethai = 3648; - e.saraiileftthai = 63622; - e.saraiithai = 3637; - e.saraileftthai = 63621; - e.saraithai = 3636; - e.saraothai = 3650; - e.saraueeleftthai = 63624; - e.saraueethai = 3639; - e.saraueleftthai = 63623; - e.sarauethai = 3638; - e.sarauthai = 3640; - e.sarauuthai = 3641; - e.sbopomofo = 12569; - e.scaron = 353; - e.scarondotaccent = 7783; - e.scedilla = 351; - e.schwa = 601; - e.schwacyrillic = 1241; - e.schwadieresiscyrillic = 1243; - e.schwahook = 602; - e.scircle = 9442; - e.scircumflex = 349; - e.scommaaccent = 537; - e.sdotaccent = 7777; - e.sdotbelow = 7779; - e.sdotbelowdotaccent = 7785; - e.seagullbelowcmb = 828; - e.second = 8243; - e.secondtonechinese = 714; - e.section = 167; - e.seenarabic = 1587; - e.seenfinalarabic = 65202; - e.seeninitialarabic = 65203; - e.seenmedialarabic = 65204; - e.segol = 1462; - e.segol13 = 1462; - e.segol1f = 1462; - e.segol2c = 1462; - e.segolhebrew = 1462; - e.segolnarrowhebrew = 1462; - e.segolquarterhebrew = 1462; - e.segoltahebrew = 1426; - e.segolwidehebrew = 1462; - e.seharmenian = 1405; - e.sehiragana = 12379; - e.sekatakana = 12475; - e.sekatakanahalfwidth = 65406; - e.semicolon = 59; - e.semicolonarabic = 1563; - e.semicolonmonospace = 65307; - e.semicolonsmall = 65108; - e.semivoicedmarkkana = 12444; - e.semivoicedmarkkanahalfwidth = 65439; - e.sentisquare = 13090; - e.sentosquare = 13091; - e.seven = 55; - e.sevenarabic = 1639; - e.sevenbengali = 2541; - e.sevencircle = 9318; - e.sevencircleinversesansserif = 10128; - e.sevendeva = 2413; - e.seveneighths = 8542; - e.sevengujarati = 2797; - e.sevengurmukhi = 2669; - e.sevenhackarabic = 1639; - e.sevenhangzhou = 12327; - e.sevenideographicparen = 12838; - e.seveninferior = 8327; - e.sevenmonospace = 65303; - e.sevenoldstyle = 63287; - e.sevenparen = 9338; - e.sevenperiod = 9358; - e.sevenpersian = 1783; - e.sevenroman = 8566; - e.sevensuperior = 8311; - e.seventeencircle = 9328; - e.seventeenparen = 9348; - e.seventeenperiod = 9368; - e.seventhai = 3671; - e.sfthyphen = 173; - e.shaarmenian = 1399; - e.shabengali = 2486; - e.shacyrillic = 1096; - e.shaddaarabic = 1617; - e.shaddadammaarabic = 64609; - e.shaddadammatanarabic = 64606; - e.shaddafathaarabic = 64608; - e.shaddakasraarabic = 64610; - e.shaddakasratanarabic = 64607; - e.shade = 9618; - e.shadedark = 9619; - e.shadelight = 9617; - e.shademedium = 9618; - e.shadeva = 2358; - e.shagujarati = 2742; - e.shagurmukhi = 2614; - e.shalshelethebrew = 1427; - e.shbopomofo = 12565; - e.shchacyrillic = 1097; - e.sheenarabic = 1588; - e.sheenfinalarabic = 65206; - e.sheeninitialarabic = 65207; - e.sheenmedialarabic = 65208; - e.sheicoptic = 995; - e.sheqel = 8362; - e.sheqelhebrew = 8362; - e.sheva = 1456; - e.sheva115 = 1456; - e.sheva15 = 1456; - e.sheva22 = 1456; - e.sheva2e = 1456; - e.shevahebrew = 1456; - e.shevanarrowhebrew = 1456; - e.shevaquarterhebrew = 1456; - e.shevawidehebrew = 1456; - e.shhacyrillic = 1211; - e.shimacoptic = 1005; - e.shin = 1513; - e.shindagesh = 64329; - e.shindageshhebrew = 64329; - e.shindageshshindot = 64300; - e.shindageshshindothebrew = 64300; - e.shindageshsindot = 64301; - e.shindageshsindothebrew = 64301; - e.shindothebrew = 1473; - e.shinhebrew = 1513; - e.shinshindot = 64298; - e.shinshindothebrew = 64298; - e.shinsindot = 64299; - e.shinsindothebrew = 64299; - e.shook = 642; - e.sigma = 963; - e.sigma1 = 962; - e.sigmafinal = 962; - e.sigmalunatesymbolgreek = 1010; - e.sihiragana = 12375; - e.sikatakana = 12471; - e.sikatakanahalfwidth = 65404; - e.siluqhebrew = 1469; - e.siluqlefthebrew = 1469; - e.similar = 8764; - e.sindothebrew = 1474; - e.siosacirclekorean = 12916; - e.siosaparenkorean = 12820; - e.sioscieuckorean = 12670; - e.sioscirclekorean = 12902; - e.sioskiyeokkorean = 12666; - e.sioskorean = 12613; - e.siosnieunkorean = 12667; - e.siosparenkorean = 12806; - e.siospieupkorean = 12669; - e.siostikeutkorean = 12668; - e.six = 54; - e.sixarabic = 1638; - e.sixbengali = 2540; - e.sixcircle = 9317; - e.sixcircleinversesansserif = 10127; - e.sixdeva = 2412; - e.sixgujarati = 2796; - e.sixgurmukhi = 2668; - e.sixhackarabic = 1638; - e.sixhangzhou = 12326; - e.sixideographicparen = 12837; - e.sixinferior = 8326; - e.sixmonospace = 65302; - e.sixoldstyle = 63286; - e.sixparen = 9337; - e.sixperiod = 9357; - e.sixpersian = 1782; - e.sixroman = 8565; - e.sixsuperior = 8310; - e.sixteencircle = 9327; - e.sixteencurrencydenominatorbengali = 2553; - e.sixteenparen = 9347; - e.sixteenperiod = 9367; - e.sixthai = 3670; - e.slash = 47; - e.slashmonospace = 65295; - e.slong = 383; - e.slongdotaccent = 7835; - e.smileface = 9786; - e.smonospace = 65363; - e.sofpasuqhebrew = 1475; - e.softhyphen = 173; - e.softsigncyrillic = 1100; - e.sohiragana = 12381; - e.sokatakana = 12477; - e.sokatakanahalfwidth = 65407; - e.soliduslongoverlaycmb = 824; - e.solidusshortoverlaycmb = 823; - e.sorusithai = 3625; - e.sosalathai = 3624; - e.sosothai = 3595; - e.sosuathai = 3626; - e.space = 32; - e.spacehackarabic = 32; - e.spade = 9824; - e.spadesuitblack = 9824; - e.spadesuitwhite = 9828; - e.sparen = 9390; - e.squarebelowcmb = 827; - e.squarecc = 13252; - e.squarecm = 13213; - e.squarediagonalcrosshatchfill = 9641; - e.squarehorizontalfill = 9636; - e.squarekg = 13199; - e.squarekm = 13214; - e.squarekmcapital = 13262; - e.squareln = 13265; - e.squarelog = 13266; - e.squaremg = 13198; - e.squaremil = 13269; - e.squaremm = 13212; - e.squaremsquared = 13217; - e.squareorthogonalcrosshatchfill = 9638; - e.squareupperlefttolowerrightfill = 9639; - e.squareupperrighttolowerleftfill = 9640; - e.squareverticalfill = 9637; - e.squarewhitewithsmallblack = 9635; - e.srsquare = 13275; - e.ssabengali = 2487; - e.ssadeva = 2359; - e.ssagujarati = 2743; - e.ssangcieuckorean = 12617; - e.ssanghieuhkorean = 12677; - e.ssangieungkorean = 12672; - e.ssangkiyeokkorean = 12594; - e.ssangnieunkorean = 12645; - e.ssangpieupkorean = 12611; - e.ssangsioskorean = 12614; - e.ssangtikeutkorean = 12600; - e.ssuperior = 63218; - e.sterling = 163; - e.sterlingmonospace = 65505; - e.strokelongoverlaycmb = 822; - e.strokeshortoverlaycmb = 821; - e.subset = 8834; - e.subsetnotequal = 8842; - e.subsetorequal = 8838; - e.succeeds = 8827; - e.suchthat = 8715; - e.suhiragana = 12377; - e.sukatakana = 12473; - e.sukatakanahalfwidth = 65405; - e.sukunarabic = 1618; - e.summation = 8721; - e.sun = 9788; - e.superset = 8835; - e.supersetnotequal = 8843; - e.supersetorequal = 8839; - e.svsquare = 13276; - e.syouwaerasquare = 13180; - e.t = 116; - e.tabengali = 2468; - e.tackdown = 8868; - e.tackleft = 8867; - e.tadeva = 2340; - e.tagujarati = 2724; - e.tagurmukhi = 2596; - e.taharabic = 1591; - e.tahfinalarabic = 65218; - e.tahinitialarabic = 65219; - e.tahiragana = 12383; - e.tahmedialarabic = 65220; - e.taisyouerasquare = 13181; - e.takatakana = 12479; - e.takatakanahalfwidth = 65408; - e.tatweelarabic = 1600; - e.tau = 964; - e.tav = 1514; - e.tavdages = 64330; - e.tavdagesh = 64330; - e.tavdageshhebrew = 64330; - e.tavhebrew = 1514; - e.tbar = 359; - e.tbopomofo = 12554; - e.tcaron = 357; - e.tccurl = 680; - e.tcedilla = 355; - e.tcheharabic = 1670; - e.tchehfinalarabic = 64379; - e.tchehinitialarabic = 64380; - e.tchehmedialarabic = 64381; - e.tcircle = 9443; - e.tcircumflexbelow = 7793; - e.tcommaaccent = 355; - e.tdieresis = 7831; - e.tdotaccent = 7787; - e.tdotbelow = 7789; - e.tecyrillic = 1090; - e.tedescendercyrillic = 1197; - e.teharabic = 1578; - e.tehfinalarabic = 65174; - e.tehhahinitialarabic = 64674; - e.tehhahisolatedarabic = 64524; - e.tehinitialarabic = 65175; - e.tehiragana = 12390; - e.tehjeeminitialarabic = 64673; - e.tehjeemisolatedarabic = 64523; - e.tehmarbutaarabic = 1577; - e.tehmarbutafinalarabic = 65172; - e.tehmedialarabic = 65176; - e.tehmeeminitialarabic = 64676; - e.tehmeemisolatedarabic = 64526; - e.tehnoonfinalarabic = 64627; - e.tekatakana = 12486; - e.tekatakanahalfwidth = 65411; - e.telephone = 8481; - e.telephoneblack = 9742; - e.telishagedolahebrew = 1440; - e.telishaqetanahebrew = 1449; - e.tencircle = 9321; - e.tenideographicparen = 12841; - e.tenparen = 9341; - e.tenperiod = 9361; - e.tenroman = 8569; - e.tesh = 679; - e.tet = 1496; - e.tetdagesh = 64312; - e.tetdageshhebrew = 64312; - e.tethebrew = 1496; - e.tetsecyrillic = 1205; - e.tevirhebrew = 1435; - e.tevirlefthebrew = 1435; - e.thabengali = 2469; - e.thadeva = 2341; - e.thagujarati = 2725; - e.thagurmukhi = 2597; - e.thalarabic = 1584; - e.thalfinalarabic = 65196; - e.thanthakhatlowleftthai = 63640; - e.thanthakhatlowrightthai = 63639; - e.thanthakhatthai = 3660; - e.thanthakhatupperleftthai = 63638; - e.theharabic = 1579; - e.thehfinalarabic = 65178; - e.thehinitialarabic = 65179; - e.thehmedialarabic = 65180; - e.thereexists = 8707; - e.therefore = 8756; - e.theta = 952; - e.theta1 = 977; - e.thetasymbolgreek = 977; - e.thieuthacirclekorean = 12921; - e.thieuthaparenkorean = 12825; - e.thieuthcirclekorean = 12907; - e.thieuthkorean = 12620; - e.thieuthparenkorean = 12811; - e.thirteencircle = 9324; - e.thirteenparen = 9344; - e.thirteenperiod = 9364; - e.thonangmonthothai = 3601; - e.thook = 429; - e.thophuthaothai = 3602; - e.thorn = 254; - e.thothahanthai = 3607; - e.thothanthai = 3600; - e.thothongthai = 3608; - e.thothungthai = 3606; - e.thousandcyrillic = 1154; - e.thousandsseparatorarabic = 1644; - e.thousandsseparatorpersian = 1644; - e.three = 51; - e.threearabic = 1635; - e.threebengali = 2537; - e.threecircle = 9314; - e.threecircleinversesansserif = 10124; - e.threedeva = 2409; - e.threeeighths = 8540; - e.threegujarati = 2793; - e.threegurmukhi = 2665; - e.threehackarabic = 1635; - e.threehangzhou = 12323; - e.threeideographicparen = 12834; - e.threeinferior = 8323; - e.threemonospace = 65299; - e.threenumeratorbengali = 2550; - e.threeoldstyle = 63283; - e.threeparen = 9334; - e.threeperiod = 9354; - e.threepersian = 1779; - e.threequarters = 190; - e.threequartersemdash = 63198; - e.threeroman = 8562; - e.threesuperior = 179; - e.threethai = 3667; - e.thzsquare = 13204; - e.tihiragana = 12385; - e.tikatakana = 12481; - e.tikatakanahalfwidth = 65409; - e.tikeutacirclekorean = 12912; - e.tikeutaparenkorean = 12816; - e.tikeutcirclekorean = 12898; - e.tikeutkorean = 12599; - e.tikeutparenkorean = 12802; - e.tilde = 732; - e.tildebelowcmb = 816; - e.tildecmb = 771; - e.tildecomb = 771; - e.tildedoublecmb = 864; - e.tildeoperator = 8764; - e.tildeoverlaycmb = 820; - e.tildeverticalcmb = 830; - e.timescircle = 8855; - e.tipehahebrew = 1430; - e.tipehalefthebrew = 1430; - e.tippigurmukhi = 2672; - e.titlocyrilliccmb = 1155; - e.tiwnarmenian = 1407; - e.tlinebelow = 7791; - e.tmonospace = 65364; - e.toarmenian = 1385; - e.tohiragana = 12392; - e.tokatakana = 12488; - e.tokatakanahalfwidth = 65412; - e.tonebarextrahighmod = 741; - e.tonebarextralowmod = 745; - e.tonebarhighmod = 742; - e.tonebarlowmod = 744; - e.tonebarmidmod = 743; - e.tonefive = 445; - e.tonesix = 389; - e.tonetwo = 424; - e.tonos = 900; - e.tonsquare = 13095; - e.topatakthai = 3599; - e.tortoiseshellbracketleft = 12308; - e.tortoiseshellbracketleftsmall = 65117; - e.tortoiseshellbracketleftvertical = 65081; - e.tortoiseshellbracketright = 12309; - e.tortoiseshellbracketrightsmall = 65118; - e.tortoiseshellbracketrightvertical = 65082; - e.totaothai = 3605; - e.tpalatalhook = 427; - e.tparen = 9391; - e.trademark = 8482; - e.trademarksans = 63722; - e.trademarkserif = 63195; - e.tretroflexhook = 648; - e.triagdn = 9660; - e.triaglf = 9668; - e.triagrt = 9658; - e.triagup = 9650; - e.ts = 678; - e.tsadi = 1510; - e.tsadidagesh = 64326; - e.tsadidageshhebrew = 64326; - e.tsadihebrew = 1510; - e.tsecyrillic = 1094; - e.tsere = 1461; - e.tsere12 = 1461; - e.tsere1e = 1461; - e.tsere2b = 1461; - e.tserehebrew = 1461; - e.tserenarrowhebrew = 1461; - e.tserequarterhebrew = 1461; - e.tserewidehebrew = 1461; - e.tshecyrillic = 1115; - e.tsuperior = 63219; - e.ttabengali = 2463; - e.ttadeva = 2335; - e.ttagujarati = 2719; - e.ttagurmukhi = 2591; - e.tteharabic = 1657; - e.ttehfinalarabic = 64359; - e.ttehinitialarabic = 64360; - e.ttehmedialarabic = 64361; - e.tthabengali = 2464; - e.tthadeva = 2336; - e.tthagujarati = 2720; - e.tthagurmukhi = 2592; - e.tturned = 647; - e.tuhiragana = 12388; - e.tukatakana = 12484; - e.tukatakanahalfwidth = 65410; - e.tusmallhiragana = 12387; - e.tusmallkatakana = 12483; - e.tusmallkatakanahalfwidth = 65391; - e.twelvecircle = 9323; - e.twelveparen = 9343; - e.twelveperiod = 9363; - e.twelveroman = 8571; - e.twentycircle = 9331; - e.twentyhangzhou = 21316; - e.twentyparen = 9351; - e.twentyperiod = 9371; - e.two = 50; - e.twoarabic = 1634; - e.twobengali = 2536; - e.twocircle = 9313; - e.twocircleinversesansserif = 10123; - e.twodeva = 2408; - e.twodotenleader = 8229; - e.twodotleader = 8229; - e.twodotleadervertical = 65072; - e.twogujarati = 2792; - e.twogurmukhi = 2664; - e.twohackarabic = 1634; - e.twohangzhou = 12322; - e.twoideographicparen = 12833; - e.twoinferior = 8322; - e.twomonospace = 65298; - e.twonumeratorbengali = 2549; - e.twooldstyle = 63282; - e.twoparen = 9333; - e.twoperiod = 9353; - e.twopersian = 1778; - e.tworoman = 8561; - e.twostroke = 443; - e.twosuperior = 178; - e.twothai = 3666; - e.twothirds = 8532; - e.u = 117; - e.uacute = 250; - e.ubar = 649; - e.ubengali = 2441; - e.ubopomofo = 12584; - e.ubreve = 365; - e.ucaron = 468; - e.ucircle = 9444; - e.ucircumflex = 251; - e.ucircumflexbelow = 7799; - e.ucyrillic = 1091; - e.udattadeva = 2385; - e.udblacute = 369; - e.udblgrave = 533; - e.udeva = 2313; - e.udieresis = 252; - e.udieresisacute = 472; - e.udieresisbelow = 7795; - e.udieresiscaron = 474; - e.udieresiscyrillic = 1265; - e.udieresisgrave = 476; - e.udieresismacron = 470; - e.udotbelow = 7909; - e.ugrave = 249; - e.ugujarati = 2697; - e.ugurmukhi = 2569; - e.uhiragana = 12358; - e.uhookabove = 7911; - e.uhorn = 432; - e.uhornacute = 7913; - e.uhorndotbelow = 7921; - e.uhorngrave = 7915; - e.uhornhookabove = 7917; - e.uhorntilde = 7919; - e.uhungarumlaut = 369; - e.uhungarumlautcyrillic = 1267; - e.uinvertedbreve = 535; - e.ukatakana = 12454; - e.ukatakanahalfwidth = 65395; - e.ukcyrillic = 1145; - e.ukorean = 12636; - e.umacron = 363; - e.umacroncyrillic = 1263; - e.umacrondieresis = 7803; - e.umatragurmukhi = 2625; - e.umonospace = 65365; - e.underscore = 95; - e.underscoredbl = 8215; - e.underscoremonospace = 65343; - e.underscorevertical = 65075; - e.underscorewavy = 65103; - e.union = 8746; - e.universal = 8704; - e.uogonek = 371; - e.uparen = 9392; - e.upblock = 9600; - e.upperdothebrew = 1476; - e.upsilon = 965; - e.upsilondieresis = 971; - e.upsilondieresistonos = 944; - e.upsilonlatin = 650; - e.upsilontonos = 973; - e.uptackbelowcmb = 797; - e.uptackmod = 724; - e.uragurmukhi = 2675; - e.uring = 367; - e.ushortcyrillic = 1118; - e.usmallhiragana = 12357; - e.usmallkatakana = 12453; - e.usmallkatakanahalfwidth = 65385; - e.ustraightcyrillic = 1199; - e.ustraightstrokecyrillic = 1201; - e.utilde = 361; - e.utildeacute = 7801; - e.utildebelow = 7797; - e.uubengali = 2442; - e.uudeva = 2314; - e.uugujarati = 2698; - e.uugurmukhi = 2570; - e.uumatragurmukhi = 2626; - e.uuvowelsignbengali = 2498; - e.uuvowelsigndeva = 2370; - e.uuvowelsigngujarati = 2754; - e.uvowelsignbengali = 2497; - e.uvowelsigndeva = 2369; - e.uvowelsigngujarati = 2753; - e.v = 118; - e.vadeva = 2357; - e.vagujarati = 2741; - e.vagurmukhi = 2613; - e.vakatakana = 12535; - e.vav = 1493; - e.vavdagesh = 64309; - e.vavdagesh65 = 64309; - e.vavdageshhebrew = 64309; - e.vavhebrew = 1493; - e.vavholam = 64331; - e.vavholamhebrew = 64331; - e.vavvavhebrew = 1520; - e.vavyodhebrew = 1521; - e.vcircle = 9445; - e.vdotbelow = 7807; - e.vecyrillic = 1074; - e.veharabic = 1700; - e.vehfinalarabic = 64363; - e.vehinitialarabic = 64364; - e.vehmedialarabic = 64365; - e.vekatakana = 12537; - e.venus = 9792; - e.verticalbar = 124; - e.verticallineabovecmb = 781; - e.verticallinebelowcmb = 809; - e.verticallinelowmod = 716; - e.verticallinemod = 712; - e.vewarmenian = 1406; - e.vhook = 651; - e.vikatakana = 12536; - e.viramabengali = 2509; - e.viramadeva = 2381; - e.viramagujarati = 2765; - e.visargabengali = 2435; - e.visargadeva = 2307; - e.visargagujarati = 2691; - e.vmonospace = 65366; - e.voarmenian = 1400; - e.voicediterationhiragana = 12446; - e.voicediterationkatakana = 12542; - e.voicedmarkkana = 12443; - e.voicedmarkkanahalfwidth = 65438; - e.vokatakana = 12538; - e.vparen = 9393; - e.vtilde = 7805; - e.vturned = 652; - e.vuhiragana = 12436; - e.vukatakana = 12532; - e.w = 119; - e.wacute = 7811; - e.waekorean = 12633; - e.wahiragana = 12431; - e.wakatakana = 12527; - e.wakatakanahalfwidth = 65436; - e.wakorean = 12632; - e.wasmallhiragana = 12430; - e.wasmallkatakana = 12526; - e.wattosquare = 13143; - e.wavedash = 12316; - e.wavyunderscorevertical = 65076; - e.wawarabic = 1608; - e.wawfinalarabic = 65262; - e.wawhamzaabovearabic = 1572; - e.wawhamzaabovefinalarabic = 65158; - e.wbsquare = 13277; - e.wcircle = 9446; - e.wcircumflex = 373; - e.wdieresis = 7813; - e.wdotaccent = 7815; - e.wdotbelow = 7817; - e.wehiragana = 12433; - e.weierstrass = 8472; - e.wekatakana = 12529; - e.wekorean = 12638; - e.weokorean = 12637; - e.wgrave = 7809; - e.whitebullet = 9702; - e.whitecircle = 9675; - e.whitecircleinverse = 9689; - e.whitecornerbracketleft = 12302; - e.whitecornerbracketleftvertical = 65091; - e.whitecornerbracketright = 12303; - e.whitecornerbracketrightvertical = 65092; - e.whitediamond = 9671; - e.whitediamondcontainingblacksmalldiamond = 9672; - e.whitedownpointingsmalltriangle = 9663; - e.whitedownpointingtriangle = 9661; - e.whiteleftpointingsmalltriangle = 9667; - e.whiteleftpointingtriangle = 9665; - e.whitelenticularbracketleft = 12310; - e.whitelenticularbracketright = 12311; - e.whiterightpointingsmalltriangle = 9657; - e.whiterightpointingtriangle = 9655; - e.whitesmallsquare = 9643; - e.whitesmilingface = 9786; - e.whitesquare = 9633; - e.whitestar = 9734; - e.whitetelephone = 9743; - e.whitetortoiseshellbracketleft = 12312; - e.whitetortoiseshellbracketright = 12313; - e.whiteuppointingsmalltriangle = 9653; - e.whiteuppointingtriangle = 9651; - e.wihiragana = 12432; - e.wikatakana = 12528; - e.wikorean = 12639; - e.wmonospace = 65367; - e.wohiragana = 12434; - e.wokatakana = 12530; - e.wokatakanahalfwidth = 65382; - e.won = 8361; - e.wonmonospace = 65510; - e.wowaenthai = 3623; - e.wparen = 9394; - e.wring = 7832; - e.wsuperior = 695; - e.wturned = 653; - e.wynn = 447; - e.x = 120; - e.xabovecmb = 829; - e.xbopomofo = 12562; - e.xcircle = 9447; - e.xdieresis = 7821; - e.xdotaccent = 7819; - e.xeharmenian = 1389; - e.xi = 958; - e.xmonospace = 65368; - e.xparen = 9395; - e.xsuperior = 739; - e.y = 121; - e.yaadosquare = 13134; - e.yabengali = 2479; - e.yacute = 253; - e.yadeva = 2351; - e.yaekorean = 12626; - e.yagujarati = 2735; - e.yagurmukhi = 2607; - e.yahiragana = 12420; - e.yakatakana = 12516; - e.yakatakanahalfwidth = 65428; - e.yakorean = 12625; - e.yamakkanthai = 3662; - e.yasmallhiragana = 12419; - e.yasmallkatakana = 12515; - e.yasmallkatakanahalfwidth = 65388; - e.yatcyrillic = 1123; - e.ycircle = 9448; - e.ycircumflex = 375; - e.ydieresis = 255; - e.ydotaccent = 7823; - e.ydotbelow = 7925; - e.yeharabic = 1610; - e.yehbarreearabic = 1746; - e.yehbarreefinalarabic = 64431; - e.yehfinalarabic = 65266; - e.yehhamzaabovearabic = 1574; - e.yehhamzaabovefinalarabic = 65162; - e.yehhamzaaboveinitialarabic = 65163; - e.yehhamzaabovemedialarabic = 65164; - e.yehinitialarabic = 65267; - e.yehmedialarabic = 65268; - e.yehmeeminitialarabic = 64733; - e.yehmeemisolatedarabic = 64600; - e.yehnoonfinalarabic = 64660; - e.yehthreedotsbelowarabic = 1745; - e.yekorean = 12630; - e.yen = 165; - e.yenmonospace = 65509; - e.yeokorean = 12629; - e.yeorinhieuhkorean = 12678; - e.yerahbenyomohebrew = 1450; - e.yerahbenyomolefthebrew = 1450; - e.yericyrillic = 1099; - e.yerudieresiscyrillic = 1273; - e.yesieungkorean = 12673; - e.yesieungpansioskorean = 12675; - e.yesieungsioskorean = 12674; - e.yetivhebrew = 1434; - e.ygrave = 7923; - e.yhook = 436; - e.yhookabove = 7927; - e.yiarmenian = 1397; - e.yicyrillic = 1111; - e.yikorean = 12642; - e.yinyang = 9775; - e.yiwnarmenian = 1410; - e.ymonospace = 65369; - e.yod = 1497; - e.yoddagesh = 64313; - e.yoddageshhebrew = 64313; - e.yodhebrew = 1497; - e.yodyodhebrew = 1522; - e.yodyodpatahhebrew = 64287; - e.yohiragana = 12424; - e.yoikorean = 12681; - e.yokatakana = 12520; - e.yokatakanahalfwidth = 65430; - e.yokorean = 12635; - e.yosmallhiragana = 12423; - e.yosmallkatakana = 12519; - e.yosmallkatakanahalfwidth = 65390; - e.yotgreek = 1011; - e.yoyaekorean = 12680; - e.yoyakorean = 12679; - e.yoyakthai = 3618; - e.yoyingthai = 3597; - e.yparen = 9396; - e.ypogegrammeni = 890; - e.ypogegrammenigreekcmb = 837; - e.yr = 422; - e.yring = 7833; - e.ysuperior = 696; - e.ytilde = 7929; - e.yturned = 654; - e.yuhiragana = 12422; - e.yuikorean = 12684; - e.yukatakana = 12518; - e.yukatakanahalfwidth = 65429; - e.yukorean = 12640; - e.yusbigcyrillic = 1131; - e.yusbigiotifiedcyrillic = 1133; - e.yuslittlecyrillic = 1127; - e.yuslittleiotifiedcyrillic = 1129; - e.yusmallhiragana = 12421; - e.yusmallkatakana = 12517; - e.yusmallkatakanahalfwidth = 65389; - e.yuyekorean = 12683; - e.yuyeokorean = 12682; - e.yyabengali = 2527; - e.yyadeva = 2399; - e.z = 122; - e.zaarmenian = 1382; - e.zacute = 378; - e.zadeva = 2395; - e.zagurmukhi = 2651; - e.zaharabic = 1592; - e.zahfinalarabic = 65222; - e.zahinitialarabic = 65223; - e.zahiragana = 12374; - e.zahmedialarabic = 65224; - e.zainarabic = 1586; - e.zainfinalarabic = 65200; - e.zakatakana = 12470; - e.zaqefgadolhebrew = 1429; - e.zaqefqatanhebrew = 1428; - e.zarqahebrew = 1432; - e.zayin = 1494; - e.zayindagesh = 64310; - e.zayindageshhebrew = 64310; - e.zayinhebrew = 1494; - e.zbopomofo = 12567; - e.zcaron = 382; - e.zcircle = 9449; - e.zcircumflex = 7825; - e.zcurl = 657; - e.zdot = 380; - e.zdotaccent = 380; - e.zdotbelow = 7827; - e.zecyrillic = 1079; - e.zedescendercyrillic = 1177; - e.zedieresiscyrillic = 1247; - e.zehiragana = 12380; - e.zekatakana = 12476; - e.zero = 48; - e.zeroarabic = 1632; - e.zerobengali = 2534; - e.zerodeva = 2406; - e.zerogujarati = 2790; - e.zerogurmukhi = 2662; - e.zerohackarabic = 1632; - e.zeroinferior = 8320; - e.zeromonospace = 65296; - e.zerooldstyle = 63280; - e.zeropersian = 1776; - e.zerosuperior = 8304; - e.zerothai = 3664; - e.zerowidthjoiner = 65279; - e.zerowidthnonjoiner = 8204; - e.zerowidthspace = 8203; - e.zeta = 950; - e.zhbopomofo = 12563; - e.zhearmenian = 1386; - e.zhebrevecyrillic = 1218; - e.zhecyrillic = 1078; - e.zhedescendercyrillic = 1175; - e.zhedieresiscyrillic = 1245; - e.zihiragana = 12376; - e.zikatakana = 12472; - e.zinorhebrew = 1454; - e.zlinebelow = 7829; - e.zmonospace = 65370; - e.zohiragana = 12382; - e.zokatakana = 12478; - e.zparen = 9397; - e.zretroflexhook = 656; - e.zstroke = 438; - e.zuhiragana = 12378; - e.zukatakana = 12474; - e[".notdef"] = 0; - e.angbracketleftbig = 9001; - e.angbracketleftBig = 9001; - e.angbracketleftbigg = 9001; - e.angbracketleftBigg = 9001; - e.angbracketrightBig = 9002; - e.angbracketrightbig = 9002; - e.angbracketrightBigg = 9002; - e.angbracketrightbigg = 9002; - e.arrowhookleft = 8618; - e.arrowhookright = 8617; - e.arrowlefttophalf = 8636; - e.arrowleftbothalf = 8637; - e.arrownortheast = 8599; - e.arrownorthwest = 8598; - e.arrowrighttophalf = 8640; - e.arrowrightbothalf = 8641; - e.arrowsoutheast = 8600; - e.arrowsouthwest = 8601; - e.backslashbig = 8726; - e.backslashBig = 8726; - e.backslashBigg = 8726; - e.backslashbigg = 8726; - e.bardbl = 8214; - e.bracehtipdownleft = 65079; - e.bracehtipdownright = 65079; - e.bracehtipupleft = 65080; - e.bracehtipupright = 65080; - e.braceleftBig = 123; - e.braceleftbig = 123; - e.braceleftbigg = 123; - e.braceleftBigg = 123; - e.bracerightBig = 125; - e.bracerightbig = 125; - e.bracerightbigg = 125; - e.bracerightBigg = 125; - e.bracketleftbig = 91; - e.bracketleftBig = 91; - e.bracketleftbigg = 91; - e.bracketleftBigg = 91; - e.bracketrightBig = 93; - e.bracketrightbig = 93; - e.bracketrightbigg = 93; - e.bracketrightBigg = 93; - e.ceilingleftbig = 8968; - e.ceilingleftBig = 8968; - e.ceilingleftBigg = 8968; - e.ceilingleftbigg = 8968; - e.ceilingrightbig = 8969; - e.ceilingrightBig = 8969; - e.ceilingrightbigg = 8969; - e.ceilingrightBigg = 8969; - e.circledotdisplay = 8857; - e.circledottext = 8857; - e.circlemultiplydisplay = 8855; - e.circlemultiplytext = 8855; - e.circleplusdisplay = 8853; - e.circleplustext = 8853; - e.contintegraldisplay = 8750; - e.contintegraltext = 8750; - e.coproductdisplay = 8720; - e.coproducttext = 8720; - e.floorleftBig = 8970; - e.floorleftbig = 8970; - e.floorleftbigg = 8970; - e.floorleftBigg = 8970; - e.floorrightbig = 8971; - e.floorrightBig = 8971; - e.floorrightBigg = 8971; - e.floorrightbigg = 8971; - e.hatwide = 770; - e.hatwider = 770; - e.hatwidest = 770; - e.intercal = 7488; - e.integraldisplay = 8747; - e.integraltext = 8747; - e.intersectiondisplay = 8898; - e.intersectiontext = 8898; - e.logicalanddisplay = 8743; - e.logicalandtext = 8743; - e.logicalordisplay = 8744; - e.logicalortext = 8744; - e.parenleftBig = 40; - e.parenleftbig = 40; - e.parenleftBigg = 40; - e.parenleftbigg = 40; - e.parenrightBig = 41; - e.parenrightbig = 41; - e.parenrightBigg = 41; - e.parenrightbigg = 41; - e.prime = 8242; - e.productdisplay = 8719; - e.producttext = 8719; - e.radicalbig = 8730; - e.radicalBig = 8730; - e.radicalBigg = 8730; - e.radicalbigg = 8730; - e.radicalbt = 8730; - e.radicaltp = 8730; - e.radicalvertex = 8730; - e.slashbig = 47; - e.slashBig = 47; - e.slashBigg = 47; - e.slashbigg = 47; - e.summationdisplay = 8721; - e.summationtext = 8721; - e.tildewide = 732; - e.tildewider = 732; - e.tildewidest = 732; - e.uniondisplay = 8899; - e.unionmultidisplay = 8846; - e.unionmultitext = 8846; - e.unionsqdisplay = 8852; - e.unionsqtext = 8852; - e.uniontext = 8899; - e.vextenddouble = 8741; - e.vextendsingle = 8739; - }); - t.getGlyphsUnicode = n; - const i = (0, r.getLookupTableFactory)(function (e) { - e.space = 32; - e.a1 = 9985; - e.a2 = 9986; - e.a202 = 9987; - e.a3 = 9988; - e.a4 = 9742; - e.a5 = 9990; - e.a119 = 9991; - e.a118 = 9992; - e.a117 = 9993; - e.a11 = 9755; - e.a12 = 9758; - e.a13 = 9996; - e.a14 = 9997; - e.a15 = 9998; - e.a16 = 9999; - e.a105 = 1e4; - e.a17 = 10001; - e.a18 = 10002; - e.a19 = 10003; - e.a20 = 10004; - e.a21 = 10005; - e.a22 = 10006; - e.a23 = 10007; - e.a24 = 10008; - e.a25 = 10009; - e.a26 = 10010; - e.a27 = 10011; - e.a28 = 10012; - e.a6 = 10013; - e.a7 = 10014; - e.a8 = 10015; - e.a9 = 10016; - e.a10 = 10017; - e.a29 = 10018; - e.a30 = 10019; - e.a31 = 10020; - e.a32 = 10021; - e.a33 = 10022; - e.a34 = 10023; - e.a35 = 9733; - e.a36 = 10025; - e.a37 = 10026; - e.a38 = 10027; - e.a39 = 10028; - e.a40 = 10029; - e.a41 = 10030; - e.a42 = 10031; - e.a43 = 10032; - e.a44 = 10033; - e.a45 = 10034; - e.a46 = 10035; - e.a47 = 10036; - e.a48 = 10037; - e.a49 = 10038; - e.a50 = 10039; - e.a51 = 10040; - e.a52 = 10041; - e.a53 = 10042; - e.a54 = 10043; - e.a55 = 10044; - e.a56 = 10045; - e.a57 = 10046; - e.a58 = 10047; - e.a59 = 10048; - e.a60 = 10049; - e.a61 = 10050; - e.a62 = 10051; - e.a63 = 10052; - e.a64 = 10053; - e.a65 = 10054; - e.a66 = 10055; - e.a67 = 10056; - e.a68 = 10057; - e.a69 = 10058; - e.a70 = 10059; - e.a71 = 9679; - e.a72 = 10061; - e.a73 = 9632; - e.a74 = 10063; - e.a203 = 10064; - e.a75 = 10065; - e.a204 = 10066; - e.a76 = 9650; - e.a77 = 9660; - e.a78 = 9670; - e.a79 = 10070; - e.a81 = 9687; - e.a82 = 10072; - e.a83 = 10073; - e.a84 = 10074; - e.a97 = 10075; - e.a98 = 10076; - e.a99 = 10077; - e.a100 = 10078; - e.a101 = 10081; - e.a102 = 10082; - e.a103 = 10083; - e.a104 = 10084; - e.a106 = 10085; - e.a107 = 10086; - e.a108 = 10087; - e.a112 = 9827; - e.a111 = 9830; - e.a110 = 9829; - e.a109 = 9824; - e.a120 = 9312; - e.a121 = 9313; - e.a122 = 9314; - e.a123 = 9315; - e.a124 = 9316; - e.a125 = 9317; - e.a126 = 9318; - e.a127 = 9319; - e.a128 = 9320; - e.a129 = 9321; - e.a130 = 10102; - e.a131 = 10103; - e.a132 = 10104; - e.a133 = 10105; - e.a134 = 10106; - e.a135 = 10107; - e.a136 = 10108; - e.a137 = 10109; - e.a138 = 10110; - e.a139 = 10111; - e.a140 = 10112; - e.a141 = 10113; - e.a142 = 10114; - e.a143 = 10115; - e.a144 = 10116; - e.a145 = 10117; - e.a146 = 10118; - e.a147 = 10119; - e.a148 = 10120; - e.a149 = 10121; - e.a150 = 10122; - e.a151 = 10123; - e.a152 = 10124; - e.a153 = 10125; - e.a154 = 10126; - e.a155 = 10127; - e.a156 = 10128; - e.a157 = 10129; - e.a158 = 10130; - e.a159 = 10131; - e.a160 = 10132; - e.a161 = 8594; - e.a163 = 8596; - e.a164 = 8597; - e.a196 = 10136; - e.a165 = 10137; - e.a192 = 10138; - e.a166 = 10139; - e.a167 = 10140; - e.a168 = 10141; - e.a169 = 10142; - e.a170 = 10143; - e.a171 = 10144; - e.a172 = 10145; - e.a173 = 10146; - e.a162 = 10147; - e.a174 = 10148; - e.a175 = 10149; - e.a176 = 10150; - e.a177 = 10151; - e.a178 = 10152; - e.a179 = 10153; - e.a193 = 10154; - e.a180 = 10155; - e.a199 = 10156; - e.a181 = 10157; - e.a200 = 10158; - e.a182 = 10159; - e.a201 = 10161; - e.a183 = 10162; - e.a184 = 10163; - e.a197 = 10164; - e.a185 = 10165; - e.a194 = 10166; - e.a198 = 10167; - e.a186 = 10168; - e.a195 = 10169; - e.a187 = 10170; - e.a188 = 10171; - e.a189 = 10172; - e.a190 = 10173; - e.a191 = 10174; - e.a89 = 10088; - e.a90 = 10089; - e.a93 = 10090; - e.a94 = 10091; - e.a91 = 10092; - e.a92 = 10093; - e.a205 = 10094; - e.a85 = 10095; - e.a206 = 10096; - e.a86 = 10097; - e.a87 = 10098; - e.a88 = 10099; - e.a95 = 10100; - e.a96 = 10101; - e[".notdef"] = 0; - }); - t.getDingbatsGlyphsUnicode = i; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.clearUnicodeCaches = function clearUnicodeCaches() { - s.clear(); - }; - t.getCharUnicodeCategory = function getCharUnicodeCategory(e) { - const t = s.get(e); - if (t) return t; - const a = e.match(i), - r = { - isWhitespace: !!a?.[1], - isZeroWidthDiacritic: !!a?.[2], - isInvisibleFormatMark: !!a?.[3], - }; - s.set(e, r); - return r; - }; - t.getUnicodeForGlyph = function getUnicodeForGlyph(e, t) { - let a = t[e]; - if (void 0 !== a) return a; - if (!e) return -1; - if ("u" === e[0]) { - const t = e.length; - let r; - if (7 === t && "n" === e[1] && "i" === e[2]) r = e.substring(3); - else { - if (!(t >= 5 && t <= 7)) return -1; - r = e.substring(1); - } - if (r === r.toUpperCase()) { - a = parseInt(r, 16); - if (a >= 0) return a; - } - } - return -1; - }; - t.getUnicodeRangeFor = function getUnicodeRangeFor(e, t = -1) { - if (-1 !== t) { - const a = n[t]; - for (let r = 0, n = a.length; r < n; r += 2) - if (e >= a[r] && e <= a[r + 1]) return t; - } - for (let t = 0, a = n.length; t < a; t++) { - const a = n[t]; - for (let r = 0, n = a.length; r < n; r += 2) - if (e >= a[r] && e <= a[r + 1]) return t; - } - return -1; - }; - t.mapSpecialUnicodeValues = function mapSpecialUnicodeValues(e) { - if (e >= 65520 && e <= 65535) return 0; - if (e >= 62976 && e <= 63743) return r()[e] || e; - if (173 === e) return 45; - return e; - }; - const r = (0, a(3).getLookupTableFactory)(function (e) { - e[63721] = 169; - e[63193] = 169; - e[63720] = 174; - e[63194] = 174; - e[63722] = 8482; - e[63195] = 8482; - e[63729] = 9127; - e[63730] = 9128; - e[63731] = 9129; - e[63740] = 9131; - e[63741] = 9132; - e[63742] = 9133; - e[63726] = 9121; - e[63727] = 9122; - e[63728] = 9123; - e[63737] = 9124; - e[63738] = 9125; - e[63739] = 9126; - e[63723] = 9115; - e[63724] = 9116; - e[63725] = 9117; - e[63734] = 9118; - e[63735] = 9119; - e[63736] = 9120; - }); - const n = [ - [0, 127], - [128, 255], - [256, 383], - [384, 591], - [592, 687, 7424, 7551, 7552, 7615], - [688, 767, 42752, 42783], - [768, 879, 7616, 7679], - [880, 1023], - [11392, 11519], - [1024, 1279, 1280, 1327, 11744, 11775, 42560, 42655], - [1328, 1423], - [1424, 1535], - [42240, 42559], - [1536, 1791, 1872, 1919], - [1984, 2047], - [2304, 2431], - [2432, 2559], - [2560, 2687], - [2688, 2815], - [2816, 2943], - [2944, 3071], - [3072, 3199], - [3200, 3327], - [3328, 3455], - [3584, 3711], - [3712, 3839], - [4256, 4351, 11520, 11567], - [6912, 7039], - [4352, 4607], - [7680, 7935, 11360, 11391, 42784, 43007], - [7936, 8191], - [8192, 8303, 11776, 11903], - [8304, 8351], - [8352, 8399], - [8400, 8447], - [8448, 8527], - [8528, 8591], - [8592, 8703, 10224, 10239, 10496, 10623, 11008, 11263], - [8704, 8959, 10752, 11007, 10176, 10223, 10624, 10751], - [8960, 9215], - [9216, 9279], - [9280, 9311], - [9312, 9471], - [9472, 9599], - [9600, 9631], - [9632, 9727], - [9728, 9983], - [9984, 10175], - [12288, 12351], - [12352, 12447], - [12448, 12543, 12784, 12799], - [12544, 12591, 12704, 12735], - [12592, 12687], - [43072, 43135], - [12800, 13055], - [13056, 13311], - [44032, 55215], - [55296, 57343], - [67840, 67871], - [ - 19968, 40959, 11904, 12031, 12032, 12255, 12272, 12287, 13312, - 19903, 131072, 173791, 12688, 12703, - ], - [57344, 63743], - [12736, 12783, 63744, 64255, 194560, 195103], - [64256, 64335], - [64336, 65023], - [65056, 65071], - [65040, 65055], - [65104, 65135], - [65136, 65279], - [65280, 65519], - [65520, 65535], - [3840, 4095], - [1792, 1871], - [1920, 1983], - [3456, 3583], - [4096, 4255], - [4608, 4991, 4992, 5023, 11648, 11743], - [5024, 5119], - [5120, 5759], - [5760, 5791], - [5792, 5887], - [6016, 6143], - [6144, 6319], - [10240, 10495], - [40960, 42127], - [5888, 5919, 5920, 5951, 5952, 5983, 5984, 6015], - [66304, 66351], - [66352, 66383], - [66560, 66639], - [118784, 119039, 119040, 119295, 119296, 119375], - [119808, 120831], - [1044480, 1048573], - [65024, 65039, 917760, 917999], - [917504, 917631], - [6400, 6479], - [6480, 6527], - [6528, 6623], - [6656, 6687], - [11264, 11359], - [11568, 11647], - [19904, 19967], - [43008, 43055], - [65536, 65663, 65664, 65791, 65792, 65855], - [65856, 65935], - [66432, 66463], - [66464, 66527], - [66640, 66687], - [66688, 66735], - [67584, 67647], - [68096, 68191], - [119552, 119647], - [73728, 74751, 74752, 74879], - [119648, 119679], - [7040, 7103], - [7168, 7247], - [7248, 7295], - [43136, 43231], - [43264, 43311], - [43312, 43359], - [43520, 43615], - [65936, 65999], - [66e3, 66047], - [66208, 66271, 66176, 66207, 67872, 67903], - [127024, 127135, 126976, 127023], - ]; - const i = new RegExp("^(\\s)|(\\p{Mn})|(\\p{Cf})$", "u"), - s = new Map(); - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.getSerifFonts = - t.getNonStdFontMap = - t.getGlyphMapForStandardFonts = - t.getFontNameToFileMap = - void 0; - t.getStandardFontName = function getStandardFontName(e) { - const t = (0, n.normalizeFontName)(e); - return i()[t]; - }; - t.getSymbolsFonts = - t.getSupplementalGlyphMapForCalibri = - t.getSupplementalGlyphMapForArialBlack = - t.getStdFontMap = - void 0; - t.isKnownFontName = function isKnownFontName(e) { - const t = (0, n.normalizeFontName)(e); - return !!(i()[t] || o()[t] || c()[t] || l()[t]); - }; - var r = a(3), - n = a(38); - const i = (0, r.getLookupTableFactory)(function (e) { - e["Times-Roman"] = "Times-Roman"; - e.Helvetica = "Helvetica"; - e.Courier = "Courier"; - e.Symbol = "Symbol"; - e["Times-Bold"] = "Times-Bold"; - e["Helvetica-Bold"] = "Helvetica-Bold"; - e["Courier-Bold"] = "Courier-Bold"; - e.ZapfDingbats = "ZapfDingbats"; - e["Times-Italic"] = "Times-Italic"; - e["Helvetica-Oblique"] = "Helvetica-Oblique"; - e["Courier-Oblique"] = "Courier-Oblique"; - e["Times-BoldItalic"] = "Times-BoldItalic"; - e["Helvetica-BoldOblique"] = "Helvetica-BoldOblique"; - e["Courier-BoldOblique"] = "Courier-BoldOblique"; - e.ArialNarrow = "Helvetica"; - e["ArialNarrow-Bold"] = "Helvetica-Bold"; - e["ArialNarrow-BoldItalic"] = "Helvetica-BoldOblique"; - e["ArialNarrow-Italic"] = "Helvetica-Oblique"; - e.ArialBlack = "Helvetica"; - e["ArialBlack-Bold"] = "Helvetica-Bold"; - e["ArialBlack-BoldItalic"] = "Helvetica-BoldOblique"; - e["ArialBlack-Italic"] = "Helvetica-Oblique"; - e["Arial-Black"] = "Helvetica"; - e["Arial-Black-Bold"] = "Helvetica-Bold"; - e["Arial-Black-BoldItalic"] = "Helvetica-BoldOblique"; - e["Arial-Black-Italic"] = "Helvetica-Oblique"; - e.Arial = "Helvetica"; - e["Arial-Bold"] = "Helvetica-Bold"; - e["Arial-BoldItalic"] = "Helvetica-BoldOblique"; - e["Arial-Italic"] = "Helvetica-Oblique"; - e.ArialMT = "Helvetica"; - e["Arial-BoldItalicMT"] = "Helvetica-BoldOblique"; - e["Arial-BoldMT"] = "Helvetica-Bold"; - e["Arial-ItalicMT"] = "Helvetica-Oblique"; - e["Arial-BoldItalicMT-BoldItalic"] = "Helvetica-BoldOblique"; - e["Arial-BoldMT-Bold"] = "Helvetica-Bold"; - e["Arial-ItalicMT-Italic"] = "Helvetica-Oblique"; - e.ArialUnicodeMS = "Helvetica"; - e["ArialUnicodeMS-Bold"] = "Helvetica-Bold"; - e["ArialUnicodeMS-BoldItalic"] = "Helvetica-BoldOblique"; - e["ArialUnicodeMS-Italic"] = "Helvetica-Oblique"; - e["Courier-BoldItalic"] = "Courier-BoldOblique"; - e["Courier-Italic"] = "Courier-Oblique"; - e.CourierNew = "Courier"; - e["CourierNew-Bold"] = "Courier-Bold"; - e["CourierNew-BoldItalic"] = "Courier-BoldOblique"; - e["CourierNew-Italic"] = "Courier-Oblique"; - e["CourierNewPS-BoldItalicMT"] = "Courier-BoldOblique"; - e["CourierNewPS-BoldMT"] = "Courier-Bold"; - e["CourierNewPS-ItalicMT"] = "Courier-Oblique"; - e.CourierNewPSMT = "Courier"; - e["Helvetica-BoldItalic"] = "Helvetica-BoldOblique"; - e["Helvetica-Italic"] = "Helvetica-Oblique"; - e["Symbol-Bold"] = "Symbol"; - e["Symbol-BoldItalic"] = "Symbol"; - e["Symbol-Italic"] = "Symbol"; - e.TimesNewRoman = "Times-Roman"; - e["TimesNewRoman-Bold"] = "Times-Bold"; - e["TimesNewRoman-BoldItalic"] = "Times-BoldItalic"; - e["TimesNewRoman-Italic"] = "Times-Italic"; - e.TimesNewRomanPS = "Times-Roman"; - e["TimesNewRomanPS-Bold"] = "Times-Bold"; - e["TimesNewRomanPS-BoldItalic"] = "Times-BoldItalic"; - e["TimesNewRomanPS-BoldItalicMT"] = "Times-BoldItalic"; - e["TimesNewRomanPS-BoldMT"] = "Times-Bold"; - e["TimesNewRomanPS-Italic"] = "Times-Italic"; - e["TimesNewRomanPS-ItalicMT"] = "Times-Italic"; - e.TimesNewRomanPSMT = "Times-Roman"; - e["TimesNewRomanPSMT-Bold"] = "Times-Bold"; - e["TimesNewRomanPSMT-BoldItalic"] = "Times-BoldItalic"; - e["TimesNewRomanPSMT-Italic"] = "Times-Italic"; - }); - t.getStdFontMap = i; - const s = (0, r.getLookupTableFactory)(function (e) { - e.Courier = "FoxitFixed.pfb"; - e["Courier-Bold"] = "FoxitFixedBold.pfb"; - e["Courier-BoldOblique"] = "FoxitFixedBoldItalic.pfb"; - e["Courier-Oblique"] = "FoxitFixedItalic.pfb"; - e.Helvetica = "LiberationSans-Regular.ttf"; - e["Helvetica-Bold"] = "LiberationSans-Bold.ttf"; - e["Helvetica-BoldOblique"] = "LiberationSans-BoldItalic.ttf"; - e["Helvetica-Oblique"] = "LiberationSans-Italic.ttf"; - e["Times-Roman"] = "FoxitSerif.pfb"; - e["Times-Bold"] = "FoxitSerifBold.pfb"; - e["Times-BoldItalic"] = "FoxitSerifBoldItalic.pfb"; - e["Times-Italic"] = "FoxitSerifItalic.pfb"; - e.Symbol = "FoxitSymbol.pfb"; - e.ZapfDingbats = "FoxitDingbats.pfb"; - e["LiberationSans-Regular"] = "LiberationSans-Regular.ttf"; - e["LiberationSans-Bold"] = "LiberationSans-Bold.ttf"; - e["LiberationSans-Italic"] = "LiberationSans-Italic.ttf"; - e["LiberationSans-BoldItalic"] = "LiberationSans-BoldItalic.ttf"; - }); - t.getFontNameToFileMap = s; - const o = (0, r.getLookupTableFactory)(function (e) { - e.Calibri = "Helvetica"; - e["Calibri-Bold"] = "Helvetica-Bold"; - e["Calibri-BoldItalic"] = "Helvetica-BoldOblique"; - e["Calibri-Italic"] = "Helvetica-Oblique"; - e.CenturyGothic = "Helvetica"; - e["CenturyGothic-Bold"] = "Helvetica-Bold"; - e["CenturyGothic-BoldItalic"] = "Helvetica-BoldOblique"; - e["CenturyGothic-Italic"] = "Helvetica-Oblique"; - e.ComicSansMS = "Comic Sans MS"; - e["ComicSansMS-Bold"] = "Comic Sans MS-Bold"; - e["ComicSansMS-BoldItalic"] = "Comic Sans MS-BoldItalic"; - e["ComicSansMS-Italic"] = "Comic Sans MS-Italic"; - e.Impact = "Helvetica"; - e["ItcSymbol-Bold"] = "Helvetica-Bold"; - e["ItcSymbol-BoldItalic"] = "Helvetica-BoldOblique"; - e["ItcSymbol-Book"] = "Helvetica"; - e["ItcSymbol-BookItalic"] = "Helvetica-Oblique"; - e["ItcSymbol-Medium"] = "Helvetica"; - e["ItcSymbol-MediumItalic"] = "Helvetica-Oblique"; - e.LucidaConsole = "Courier"; - e["LucidaConsole-Bold"] = "Courier-Bold"; - e["LucidaConsole-BoldItalic"] = "Courier-BoldOblique"; - e["LucidaConsole-Italic"] = "Courier-Oblique"; - e["LucidaSans-Demi"] = "Helvetica-Bold"; - e["MS-Gothic"] = "MS Gothic"; - e["MS-Gothic-Bold"] = "MS Gothic-Bold"; - e["MS-Gothic-BoldItalic"] = "MS Gothic-BoldItalic"; - e["MS-Gothic-Italic"] = "MS Gothic-Italic"; - e["MS-Mincho"] = "MS Mincho"; - e["MS-Mincho-Bold"] = "MS Mincho-Bold"; - e["MS-Mincho-BoldItalic"] = "MS Mincho-BoldItalic"; - e["MS-Mincho-Italic"] = "MS Mincho-Italic"; - e["MS-PGothic"] = "MS PGothic"; - e["MS-PGothic-Bold"] = "MS PGothic-Bold"; - e["MS-PGothic-BoldItalic"] = "MS PGothic-BoldItalic"; - e["MS-PGothic-Italic"] = "MS PGothic-Italic"; - e["MS-PMincho"] = "MS PMincho"; - e["MS-PMincho-Bold"] = "MS PMincho-Bold"; - e["MS-PMincho-BoldItalic"] = "MS PMincho-BoldItalic"; - e["MS-PMincho-Italic"] = "MS PMincho-Italic"; - e.NuptialScript = "Times-Italic"; - e.SegoeUISymbol = "Helvetica"; - }); - t.getNonStdFontMap = o; - const c = (0, r.getLookupTableFactory)(function (e) { - e["Adobe Jenson"] = !0; - e["Adobe Text"] = !0; - e.Albertus = !0; - e.Aldus = !0; - e.Alexandria = !0; - e.Algerian = !0; - e["American Typewriter"] = !0; - e.Antiqua = !0; - e.Apex = !0; - e.Arno = !0; - e.Aster = !0; - e.Aurora = !0; - e.Baskerville = !0; - e.Bell = !0; - e.Bembo = !0; - e["Bembo Schoolbook"] = !0; - e.Benguiat = !0; - e["Berkeley Old Style"] = !0; - e["Bernhard Modern"] = !0; - e["Berthold City"] = !0; - e.Bodoni = !0; - e["Bauer Bodoni"] = !0; - e["Book Antiqua"] = !0; - e.Bookman = !0; - e["Bordeaux Roman"] = !0; - e["Californian FB"] = !0; - e.Calisto = !0; - e.Calvert = !0; - e.Capitals = !0; - e.Cambria = !0; - e.Cartier = !0; - e.Caslon = !0; - e.Catull = !0; - e.Centaur = !0; - e["Century Old Style"] = !0; - e["Century Schoolbook"] = !0; - e.Chaparral = !0; - e["Charis SIL"] = !0; - e.Cheltenham = !0; - e["Cholla Slab"] = !0; - e.Clarendon = !0; - e.Clearface = !0; - e.Cochin = !0; - e.Colonna = !0; - e["Computer Modern"] = !0; - e["Concrete Roman"] = !0; - e.Constantia = !0; - e["Cooper Black"] = !0; - e.Corona = !0; - e.Ecotype = !0; - e.Egyptienne = !0; - e.Elephant = !0; - e.Excelsior = !0; - e.Fairfield = !0; - e["FF Scala"] = !0; - e.Folkard = !0; - e.Footlight = !0; - e.FreeSerif = !0; - e["Friz Quadrata"] = !0; - e.Garamond = !0; - e.Gentium = !0; - e.Georgia = !0; - e.Gloucester = !0; - e["Goudy Old Style"] = !0; - e["Goudy Schoolbook"] = !0; - e["Goudy Pro Font"] = !0; - e.Granjon = !0; - e["Guardian Egyptian"] = !0; - e.Heather = !0; - e.Hercules = !0; - e["High Tower Text"] = !0; - e.Hiroshige = !0; - e["Hoefler Text"] = !0; - e["Humana Serif"] = !0; - e.Imprint = !0; - e["Ionic No. 5"] = !0; - e.Janson = !0; - e.Joanna = !0; - e.Korinna = !0; - e.Lexicon = !0; - e.LiberationSerif = !0; - e["Liberation Serif"] = !0; - e["Linux Libertine"] = !0; - e.Literaturnaya = !0; - e.Lucida = !0; - e["Lucida Bright"] = !0; - e.Melior = !0; - e.Memphis = !0; - e.Miller = !0; - e.Minion = !0; - e.Modern = !0; - e["Mona Lisa"] = !0; - e["Mrs Eaves"] = !0; - e["MS Serif"] = !0; - e["Museo Slab"] = !0; - e["New York"] = !0; - e["Nimbus Roman"] = !0; - e["NPS Rawlinson Roadway"] = !0; - e.NuptialScript = !0; - e.Palatino = !0; - e.Perpetua = !0; - e.Plantin = !0; - e["Plantin Schoolbook"] = !0; - e.Playbill = !0; - e["Poor Richard"] = !0; - e["Rawlinson Roadway"] = !0; - e.Renault = !0; - e.Requiem = !0; - e.Rockwell = !0; - e.Roman = !0; - e["Rotis Serif"] = !0; - e.Sabon = !0; - e.Scala = !0; - e.Seagull = !0; - e.Sistina = !0; - e.Souvenir = !0; - e.STIX = !0; - e["Stone Informal"] = !0; - e["Stone Serif"] = !0; - e.Sylfaen = !0; - e.Times = !0; - e.Trajan = !0; - e["Trinité"] = !0; - e["Trump Mediaeval"] = !0; - e.Utopia = !0; - e["Vale Type"] = !0; - e["Bitstream Vera"] = !0; - e["Vera Serif"] = !0; - e.Versailles = !0; - e.Wanted = !0; - e.Weiss = !0; - e["Wide Latin"] = !0; - e.Windsor = !0; - e.XITS = !0; - }); - t.getSerifFonts = c; - const l = (0, r.getLookupTableFactory)(function (e) { - e.Dingbats = !0; - e.Symbol = !0; - e.ZapfDingbats = !0; - e.Wingdings = !0; - e["Wingdings-Bold"] = !0; - e["Wingdings-Regular"] = !0; - }); - t.getSymbolsFonts = l; - const h = (0, r.getLookupTableFactory)(function (e) { - e[2] = 10; - e[3] = 32; - e[4] = 33; - e[5] = 34; - e[6] = 35; - e[7] = 36; - e[8] = 37; - e[9] = 38; - e[10] = 39; - e[11] = 40; - e[12] = 41; - e[13] = 42; - e[14] = 43; - e[15] = 44; - e[16] = 45; - e[17] = 46; - e[18] = 47; - e[19] = 48; - e[20] = 49; - e[21] = 50; - e[22] = 51; - e[23] = 52; - e[24] = 53; - e[25] = 54; - e[26] = 55; - e[27] = 56; - e[28] = 57; - e[29] = 58; - e[30] = 894; - e[31] = 60; - e[32] = 61; - e[33] = 62; - e[34] = 63; - e[35] = 64; - e[36] = 65; - e[37] = 66; - e[38] = 67; - e[39] = 68; - e[40] = 69; - e[41] = 70; - e[42] = 71; - e[43] = 72; - e[44] = 73; - e[45] = 74; - e[46] = 75; - e[47] = 76; - e[48] = 77; - e[49] = 78; - e[50] = 79; - e[51] = 80; - e[52] = 81; - e[53] = 82; - e[54] = 83; - e[55] = 84; - e[56] = 85; - e[57] = 86; - e[58] = 87; - e[59] = 88; - e[60] = 89; - e[61] = 90; - e[62] = 91; - e[63] = 92; - e[64] = 93; - e[65] = 94; - e[66] = 95; - e[67] = 96; - e[68] = 97; - e[69] = 98; - e[70] = 99; - e[71] = 100; - e[72] = 101; - e[73] = 102; - e[74] = 103; - e[75] = 104; - e[76] = 105; - e[77] = 106; - e[78] = 107; - e[79] = 108; - e[80] = 109; - e[81] = 110; - e[82] = 111; - e[83] = 112; - e[84] = 113; - e[85] = 114; - e[86] = 115; - e[87] = 116; - e[88] = 117; - e[89] = 118; - e[90] = 119; - e[91] = 120; - e[92] = 121; - e[93] = 122; - e[94] = 123; - e[95] = 124; - e[96] = 125; - e[97] = 126; - e[98] = 196; - e[99] = 197; - e[100] = 199; - e[101] = 201; - e[102] = 209; - e[103] = 214; - e[104] = 220; - e[105] = 225; - e[106] = 224; - e[107] = 226; - e[108] = 228; - e[109] = 227; - e[110] = 229; - e[111] = 231; - e[112] = 233; - e[113] = 232; - e[114] = 234; - e[115] = 235; - e[116] = 237; - e[117] = 236; - e[118] = 238; - e[119] = 239; - e[120] = 241; - e[121] = 243; - e[122] = 242; - e[123] = 244; - e[124] = 246; - e[125] = 245; - e[126] = 250; - e[127] = 249; - e[128] = 251; - e[129] = 252; - e[130] = 8224; - e[131] = 176; - e[132] = 162; - e[133] = 163; - e[134] = 167; - e[135] = 8226; - e[136] = 182; - e[137] = 223; - e[138] = 174; - e[139] = 169; - e[140] = 8482; - e[141] = 180; - e[142] = 168; - e[143] = 8800; - e[144] = 198; - e[145] = 216; - e[146] = 8734; - e[147] = 177; - e[148] = 8804; - e[149] = 8805; - e[150] = 165; - e[151] = 181; - e[152] = 8706; - e[153] = 8721; - e[154] = 8719; - e[156] = 8747; - e[157] = 170; - e[158] = 186; - e[159] = 8486; - e[160] = 230; - e[161] = 248; - e[162] = 191; - e[163] = 161; - e[164] = 172; - e[165] = 8730; - e[166] = 402; - e[167] = 8776; - e[168] = 8710; - e[169] = 171; - e[170] = 187; - e[171] = 8230; - e[179] = 8220; - e[180] = 8221; - e[181] = 8216; - e[182] = 8217; - e[200] = 193; - e[203] = 205; - e[207] = 211; - e[210] = 218; - e[223] = 711; - e[224] = 321; - e[225] = 322; - e[226] = 352; - e[227] = 353; - e[228] = 381; - e[229] = 382; - e[233] = 221; - e[234] = 253; - e[252] = 263; - e[253] = 268; - e[254] = 269; - e[258] = 258; - e[260] = 260; - e[261] = 261; - e[265] = 280; - e[266] = 281; - e[267] = 282; - e[268] = 283; - e[269] = 313; - e[275] = 323; - e[276] = 324; - e[278] = 328; - e[283] = 344; - e[284] = 345; - e[285] = 346; - e[286] = 347; - e[292] = 367; - e[295] = 377; - e[296] = 378; - e[298] = 380; - e[305] = 963; - e[306] = 964; - e[307] = 966; - e[308] = 8215; - e[309] = 8252; - e[310] = 8319; - e[311] = 8359; - e[312] = 8592; - e[313] = 8593; - e[337] = 9552; - e[493] = 1039; - e[494] = 1040; - e[672] = 1488; - e[673] = 1489; - e[674] = 1490; - e[675] = 1491; - e[676] = 1492; - e[677] = 1493; - e[678] = 1494; - e[679] = 1495; - e[680] = 1496; - e[681] = 1497; - e[682] = 1498; - e[683] = 1499; - e[684] = 1500; - e[685] = 1501; - e[686] = 1502; - e[687] = 1503; - e[688] = 1504; - e[689] = 1505; - e[690] = 1506; - e[691] = 1507; - e[692] = 1508; - e[693] = 1509; - e[694] = 1510; - e[695] = 1511; - e[696] = 1512; - e[697] = 1513; - e[698] = 1514; - e[705] = 1524; - e[706] = 8362; - e[710] = 64288; - e[711] = 64298; - e[759] = 1617; - e[761] = 1776; - e[763] = 1778; - e[775] = 1652; - e[777] = 1764; - e[778] = 1780; - e[779] = 1781; - e[780] = 1782; - e[782] = 771; - e[783] = 64726; - e[786] = 8363; - e[788] = 8532; - e[790] = 768; - e[791] = 769; - e[792] = 768; - e[795] = 803; - e[797] = 64336; - e[798] = 64337; - e[799] = 64342; - e[800] = 64343; - e[801] = 64344; - e[802] = 64345; - e[803] = 64362; - e[804] = 64363; - e[805] = 64364; - e[2424] = 7821; - e[2425] = 7822; - e[2426] = 7823; - e[2427] = 7824; - e[2428] = 7825; - e[2429] = 7826; - e[2430] = 7827; - e[2433] = 7682; - e[2678] = 8045; - e[2679] = 8046; - e[2830] = 1552; - e[2838] = 686; - e[2840] = 751; - e[2842] = 753; - e[2843] = 754; - e[2844] = 755; - e[2846] = 757; - e[2856] = 767; - e[2857] = 848; - e[2858] = 849; - e[2862] = 853; - e[2863] = 854; - e[2864] = 855; - e[2865] = 861; - e[2866] = 862; - e[2906] = 7460; - e[2908] = 7462; - e[2909] = 7463; - e[2910] = 7464; - e[2912] = 7466; - e[2913] = 7467; - e[2914] = 7468; - e[2916] = 7470; - e[2917] = 7471; - e[2918] = 7472; - e[2920] = 7474; - e[2921] = 7475; - e[2922] = 7476; - e[2924] = 7478; - e[2925] = 7479; - e[2926] = 7480; - e[2928] = 7482; - e[2929] = 7483; - e[2930] = 7484; - e[2932] = 7486; - e[2933] = 7487; - e[2934] = 7488; - e[2936] = 7490; - e[2937] = 7491; - e[2938] = 7492; - e[2940] = 7494; - e[2941] = 7495; - e[2942] = 7496; - e[2944] = 7498; - e[2946] = 7500; - e[2948] = 7502; - e[2950] = 7504; - e[2951] = 7505; - e[2952] = 7506; - e[2954] = 7508; - e[2955] = 7509; - e[2956] = 7510; - e[2958] = 7512; - e[2959] = 7513; - e[2960] = 7514; - e[2962] = 7516; - e[2963] = 7517; - e[2964] = 7518; - e[2966] = 7520; - e[2967] = 7521; - e[2968] = 7522; - e[2970] = 7524; - e[2971] = 7525; - e[2972] = 7526; - e[2974] = 7528; - e[2975] = 7529; - e[2976] = 7530; - e[2978] = 1537; - e[2979] = 1538; - e[2980] = 1539; - e[2982] = 1549; - e[2983] = 1551; - e[2984] = 1552; - e[2986] = 1554; - e[2987] = 1555; - e[2988] = 1556; - e[2990] = 1623; - e[2991] = 1624; - e[2995] = 1775; - e[2999] = 1791; - e[3002] = 64290; - e[3003] = 64291; - e[3004] = 64292; - e[3006] = 64294; - e[3007] = 64295; - e[3008] = 64296; - e[3011] = 1900; - e[3014] = 8223; - e[3015] = 8244; - e[3017] = 7532; - e[3018] = 7533; - e[3019] = 7534; - e[3075] = 7590; - e[3076] = 7591; - e[3079] = 7594; - e[3080] = 7595; - e[3083] = 7598; - e[3084] = 7599; - e[3087] = 7602; - e[3088] = 7603; - e[3091] = 7606; - e[3092] = 7607; - e[3095] = 7610; - e[3096] = 7611; - e[3099] = 7614; - e[3100] = 7615; - e[3103] = 7618; - e[3104] = 7619; - e[3107] = 8337; - e[3108] = 8338; - e[3116] = 1884; - e[3119] = 1885; - e[3120] = 1885; - e[3123] = 1886; - e[3124] = 1886; - e[3127] = 1887; - e[3128] = 1887; - e[3131] = 1888; - e[3132] = 1888; - e[3135] = 1889; - e[3136] = 1889; - e[3139] = 1890; - e[3140] = 1890; - e[3143] = 1891; - e[3144] = 1891; - e[3147] = 1892; - e[3148] = 1892; - e[3153] = 580; - e[3154] = 581; - e[3157] = 584; - e[3158] = 585; - e[3161] = 588; - e[3162] = 589; - e[3165] = 891; - e[3166] = 892; - e[3169] = 1274; - e[3170] = 1275; - e[3173] = 1278; - e[3174] = 1279; - e[3181] = 7622; - e[3182] = 7623; - e[3282] = 11799; - e[3316] = 578; - e[3379] = 42785; - e[3393] = 1159; - e[3416] = 8377; - }); - t.getGlyphMapForStandardFonts = h; - const u = (0, r.getLookupTableFactory)(function (e) { - e[227] = 322; - e[264] = 261; - e[291] = 346; - }); - t.getSupplementalGlyphMapForArialBlack = u; - const d = (0, r.getLookupTableFactory)(function (e) { - e[1] = 32; - e[4] = 65; - e[5] = 192; - e[6] = 193; - e[9] = 196; - e[17] = 66; - e[18] = 67; - e[21] = 268; - e[24] = 68; - e[28] = 69; - e[29] = 200; - e[30] = 201; - e[32] = 282; - e[38] = 70; - e[39] = 71; - e[44] = 72; - e[47] = 73; - e[48] = 204; - e[49] = 205; - e[58] = 74; - e[60] = 75; - e[62] = 76; - e[68] = 77; - e[69] = 78; - e[75] = 79; - e[76] = 210; - e[80] = 214; - e[87] = 80; - e[89] = 81; - e[90] = 82; - e[92] = 344; - e[94] = 83; - e[97] = 352; - e[100] = 84; - e[104] = 85; - e[109] = 220; - e[115] = 86; - e[116] = 87; - e[121] = 88; - e[122] = 89; - e[124] = 221; - e[127] = 90; - e[129] = 381; - e[258] = 97; - e[259] = 224; - e[260] = 225; - e[263] = 228; - e[268] = 261; - e[271] = 98; - e[272] = 99; - e[273] = 263; - e[275] = 269; - e[282] = 100; - e[286] = 101; - e[287] = 232; - e[288] = 233; - e[290] = 283; - e[295] = 281; - e[296] = 102; - e[336] = 103; - e[346] = 104; - e[349] = 105; - e[350] = 236; - e[351] = 237; - e[361] = 106; - e[364] = 107; - e[367] = 108; - e[371] = 322; - e[373] = 109; - e[374] = 110; - e[381] = 111; - e[382] = 242; - e[383] = 243; - e[386] = 246; - e[393] = 112; - e[395] = 113; - e[396] = 114; - e[398] = 345; - e[400] = 115; - e[401] = 347; - e[403] = 353; - e[410] = 116; - e[437] = 117; - e[442] = 252; - e[448] = 118; - e[449] = 119; - e[454] = 120; - e[455] = 121; - e[457] = 253; - e[460] = 122; - e[462] = 382; - e[463] = 380; - e[853] = 44; - e[855] = 58; - e[856] = 46; - e[876] = 47; - e[878] = 45; - e[882] = 45; - e[894] = 40; - e[895] = 41; - e[896] = 91; - e[897] = 93; - e[923] = 64; - e[1004] = 48; - e[1005] = 49; - e[1006] = 50; - e[1007] = 51; - e[1008] = 52; - e[1009] = 53; - e[1010] = 54; - e[1011] = 55; - e[1012] = 56; - e[1013] = 57; - e[1081] = 37; - e[1085] = 43; - e[1086] = 45; - }); - t.getSupplementalGlyphMapForCalibri = d; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.ToUnicodeMap = t.IdentityToUnicodeMap = void 0; - var r = a(2); - t.ToUnicodeMap = class ToUnicodeMap { - constructor(e = []) { - this._map = e; - } - get length() { - return this._map.length; - } - forEach(e) { - for (const t in this._map) e(t, this._map[t].charCodeAt(0)); - } - has(e) { - return void 0 !== this._map[e]; - } - get(e) { - return this._map[e]; - } - charCodeOf(e) { - const t = this._map; - if (t.length <= 65536) return t.indexOf(e); - for (const a in t) if (t[a] === e) return 0 | a; - return -1; - } - amend(e) { - for (const t in e) this._map[t] = e[t]; - } - }; - t.IdentityToUnicodeMap = class IdentityToUnicodeMap { - constructor(e, t) { - this.firstChar = e; - this.lastChar = t; - } - get length() { - return this.lastChar + 1 - this.firstChar; - } - forEach(e) { - for (let t = this.firstChar, a = this.lastChar; t <= a; t++) - e(t, t); - } - has(e) { - return this.firstChar <= e && e <= this.lastChar; - } - get(e) { - if (this.firstChar <= e && e <= this.lastChar) - return String.fromCharCode(e); - } - charCodeOf(e) { - return Number.isInteger(e) && - e >= this.firstChar && - e <= this.lastChar - ? e - : -1; - } - amend(e) { - (0, r.unreachable)("Should not call amend()"); - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.CFFFont = void 0; - var r = a(35), - n = a(38), - i = a(2); - t.CFFFont = class CFFFont { - constructor(e, t) { - this.properties = t; - const a = new r.CFFParser(e, t, n.SEAC_ANALYSIS_ENABLED); - this.cff = a.parse(); - this.cff.duplicateFirstGlyph(); - const s = new r.CFFCompiler(this.cff); - this.seacs = this.cff.seacs; - try { - this.data = s.compile(); - } catch { - (0, i.warn)("Failed to compile font " + t.loadedName); - this.data = e; - } - this._createBuiltInEncoding(); - } - get numGlyphs() { - return this.cff.charStrings.count; - } - getCharset() { - return this.cff.charset.charset; - } - getGlyphMapping() { - const e = this.cff, - t = this.properties, - { cidToGidMap: a, cMap: r } = t, - i = e.charset.charset; - let s, o; - if (t.composite) { - let t, n; - if (a?.length > 0) { - t = Object.create(null); - for (let e = 0, r = a.length; e < r; e++) { - const r = a[e]; - void 0 !== r && (t[r] = e); - } - } - s = Object.create(null); - if (e.isCIDFont) - for (o = 0; o < i.length; o++) { - const e = i[o]; - n = r.charCodeOf(e); - void 0 !== t?.[n] && (n = t[n]); - s[n] = o; - } - else - for (o = 0; o < e.charStrings.count; o++) { - n = r.charCodeOf(o); - s[n] = o; - } - return s; - } - let c = e.encoding ? e.encoding.encoding : null; - t.isInternalFont && (c = t.defaultEncoding); - s = (0, n.type1FontGlyphMapping)(t, c, i); - return s; - } - hasGlyphId(e) { - return this.cff.hasGlyphId(e); - } - _createBuiltInEncoding() { - const { charset: e, encoding: t } = this.cff; - if (!e || !t) return; - const a = e.charset, - r = t.encoding, - n = []; - for (const e in r) { - const t = r[e]; - if (t >= 0) { - const r = a[t]; - r && (n[e] = r); - } - } - n.length > 0 && (this.properties.builtInEncoding = n); - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.FontRendererFactory = void 0; - var r = a(2), - n = a(35), - i = a(39), - s = a(37), - o = a(8); - function getUint32(e, t) { - return ( - ((e[t] << 24) | (e[t + 1] << 16) | (e[t + 2] << 8) | e[t + 3]) >>> - 0 - ); - } - function getUint16(e, t) { - return (e[t] << 8) | e[t + 1]; - } - function getInt16(e, t) { - return ((e[t] << 24) | (e[t + 1] << 16)) >> 16; - } - function getInt8(e, t) { - return (e[t] << 24) >> 24; - } - function getFloat214(e, t) { - return getInt16(e, t) / 16384; - } - function getSubroutineBias(e) { - const t = e.length; - let a = 32768; - t < 1240 ? (a = 107) : t < 33900 && (a = 1131); - return a; - } - function parseCmap(e, t, a) { - const n = - 1 === getUint16(e, t + 2) - ? getUint32(e, t + 8) - : getUint32(e, t + 16), - i = getUint16(e, t + n); - let s, o, c; - if (4 === i) { - getUint16(e, t + n + 2); - const a = getUint16(e, t + n + 6) >> 1; - o = t + n + 14; - s = []; - for (c = 0; c < a; c++, o += 2) s[c] = { end: getUint16(e, o) }; - o += 2; - for (c = 0; c < a; c++, o += 2) s[c].start = getUint16(e, o); - for (c = 0; c < a; c++, o += 2) s[c].idDelta = getUint16(e, o); - for (c = 0; c < a; c++, o += 2) { - let t = getUint16(e, o); - if (0 !== t) { - s[c].ids = []; - for (let a = 0, r = s[c].end - s[c].start + 1; a < r; a++) { - s[c].ids[a] = getUint16(e, o + t); - t += 2; - } - } - } - return s; - } - if (12 === i) { - const a = getUint32(e, t + n + 12); - o = t + n + 16; - s = []; - for (c = 0; c < a; c++) { - t = getUint32(e, o); - s.push({ - start: t, - end: getUint32(e, o + 4), - idDelta: getUint32(e, o + 8) - t, - }); - o += 12; - } - return s; - } - throw new r.FormatError(`unsupported cmap: ${i}`); - } - function parseCff(e, t, a, r) { - const i = new n.CFFParser(new o.Stream(e, t, a - t), {}, r).parse(); - return { - glyphs: i.charStrings.objects, - subrs: i.topDict.privateDict?.subrsIndex?.objects, - gsubrs: i.globalSubrIndex?.objects, - isCFFCIDFont: i.isCIDFont, - fdSelect: i.fdSelect, - fdArray: i.fdArray, - }; - } - function lookupCmap(e, t) { - const a = t.codePointAt(0); - let r = 0, - n = 0, - i = e.length - 1; - for (; n < i; ) { - const t = (n + i + 1) >> 1; - a < e[t].start ? (i = t - 1) : (n = t); - } - e[n].start <= a && - a <= e[n].end && - (r = - (e[n].idDelta + (e[n].ids ? e[n].ids[a - e[n].start] : a)) & - 65535); - return { charCode: a, glyphId: r }; - } - function compileGlyf(e, t, a) { - function moveTo(e, a) { - t.push({ cmd: "moveTo", args: [e, a] }); - } - function lineTo(e, a) { - t.push({ cmd: "lineTo", args: [e, a] }); - } - function quadraticCurveTo(e, a, r, n) { - t.push({ cmd: "quadraticCurveTo", args: [e, a, r, n] }); - } - let r = 0; - const n = getInt16(e, r); - let i, - s = 0, - o = 0; - r += 10; - if (n < 0) - do { - i = getUint16(e, r); - const n = getUint16(e, r + 2); - r += 4; - let c, l; - if (1 & i) { - if (2 & i) { - c = getInt16(e, r); - l = getInt16(e, r + 2); - } else { - c = getUint16(e, r); - l = getUint16(e, r + 2); - } - r += 4; - } else if (2 & i) { - c = getInt8(e, r++); - l = getInt8(e, r++); - } else { - c = e[r++]; - l = e[r++]; - } - if (2 & i) { - s = c; - o = l; - } else { - s = 0; - o = 0; - } - let h = 1, - u = 1, - d = 0, - f = 0; - if (8 & i) { - h = u = getFloat214(e, r); - r += 2; - } else if (64 & i) { - h = getFloat214(e, r); - u = getFloat214(e, r + 2); - r += 4; - } else if (128 & i) { - h = getFloat214(e, r); - d = getFloat214(e, r + 2); - f = getFloat214(e, r + 4); - u = getFloat214(e, r + 6); - r += 8; - } - const g = a.glyphs[n]; - if (g) { - t.push( - { cmd: "save" }, - { cmd: "transform", args: [h, d, f, u, s, o] }, - ); - compileGlyf(g, t, a); - t.push({ cmd: "restore" }); - } - } while (32 & i); - else { - const t = []; - let a, c; - for (a = 0; a < n; a++) { - t.push(getUint16(e, r)); - r += 2; - } - r += 2 + getUint16(e, r); - const l = t.at(-1) + 1, - h = []; - for (; h.length < l; ) { - i = e[r++]; - let t = 1; - 8 & i && (t += e[r++]); - for (; t-- > 0; ) h.push({ flags: i }); - } - for (a = 0; a < l; a++) { - switch (18 & h[a].flags) { - case 0: - s += getInt16(e, r); - r += 2; - break; - case 2: - s -= e[r++]; - break; - case 18: - s += e[r++]; - } - h[a].x = s; - } - for (a = 0; a < l; a++) { - switch (36 & h[a].flags) { - case 0: - o += getInt16(e, r); - r += 2; - break; - case 4: - o -= e[r++]; - break; - case 36: - o += e[r++]; - } - h[a].y = o; - } - let u = 0; - for (r = 0; r < n; r++) { - const e = t[r], - n = h.slice(u, e + 1); - if (1 & n[0].flags) n.push(n[0]); - else if (1 & n.at(-1).flags) n.unshift(n.at(-1)); - else { - const e = { - flags: 1, - x: (n[0].x + n.at(-1).x) / 2, - y: (n[0].y + n.at(-1).y) / 2, - }; - n.unshift(e); - n.push(e); - } - moveTo(n[0].x, n[0].y); - for (a = 1, c = n.length; a < c; a++) - if (1 & n[a].flags) lineTo(n[a].x, n[a].y); - else if (1 & n[a + 1].flags) { - quadraticCurveTo(n[a].x, n[a].y, n[a + 1].x, n[a + 1].y); - a++; - } else - quadraticCurveTo( - n[a].x, - n[a].y, - (n[a].x + n[a + 1].x) / 2, - (n[a].y + n[a + 1].y) / 2, - ); - u = e + 1; - } - } - } - function compileCharString(e, t, a, n) { - function moveTo(e, a) { - t.push({ cmd: "moveTo", args: [e, a] }); - } - function lineTo(e, a) { - t.push({ cmd: "lineTo", args: [e, a] }); - } - function bezierCurveTo(e, a, r, n, i, s) { - t.push({ cmd: "bezierCurveTo", args: [e, a, r, n, i, s] }); - } - const i = []; - let o = 0, - c = 0, - l = 0; - !(function parse(e) { - let h = 0; - for (; h < e.length; ) { - let u, - d, - f, - g, - p, - m, - b, - y, - w, - S = !1, - x = e[h++]; - switch (x) { - case 1: - case 3: - case 18: - case 23: - l += i.length >> 1; - S = !0; - break; - case 4: - c += i.pop(); - moveTo(o, c); - S = !0; - break; - case 5: - for (; i.length > 0; ) { - o += i.shift(); - c += i.shift(); - lineTo(o, c); - } - break; - case 6: - for (; i.length > 0; ) { - o += i.shift(); - lineTo(o, c); - if (0 === i.length) break; - c += i.shift(); - lineTo(o, c); - } - break; - case 7: - for (; i.length > 0; ) { - c += i.shift(); - lineTo(o, c); - if (0 === i.length) break; - o += i.shift(); - lineTo(o, c); - } - break; - case 8: - for (; i.length > 0; ) { - u = o + i.shift(); - f = c + i.shift(); - d = u + i.shift(); - g = f + i.shift(); - o = d + i.shift(); - c = g + i.shift(); - bezierCurveTo(u, f, d, g, o, c); - } - break; - case 10: - y = i.pop(); - w = null; - if (a.isCFFCIDFont) { - const e = a.fdSelect.getFDIndex(n); - if (e >= 0 && e < a.fdArray.length) { - const t = a.fdArray[e]; - let r; - t.privateDict?.subrsIndex && - (r = t.privateDict.subrsIndex.objects); - if (r) { - y += getSubroutineBias(r); - w = r[y]; - } - } else (0, r.warn)("Invalid fd index for glyph index."); - } else w = a.subrs[y + a.subrsBias]; - w && parse(w); - break; - case 11: - return; - case 12: - x = e[h++]; - switch (x) { - case 34: - u = o + i.shift(); - d = u + i.shift(); - p = c + i.shift(); - o = d + i.shift(); - bezierCurveTo(u, c, d, p, o, p); - u = o + i.shift(); - d = u + i.shift(); - o = d + i.shift(); - bezierCurveTo(u, p, d, c, o, c); - break; - case 35: - u = o + i.shift(); - f = c + i.shift(); - d = u + i.shift(); - g = f + i.shift(); - o = d + i.shift(); - c = g + i.shift(); - bezierCurveTo(u, f, d, g, o, c); - u = o + i.shift(); - f = c + i.shift(); - d = u + i.shift(); - g = f + i.shift(); - o = d + i.shift(); - c = g + i.shift(); - bezierCurveTo(u, f, d, g, o, c); - i.pop(); - break; - case 36: - u = o + i.shift(); - p = c + i.shift(); - d = u + i.shift(); - m = p + i.shift(); - o = d + i.shift(); - bezierCurveTo(u, p, d, m, o, m); - u = o + i.shift(); - d = u + i.shift(); - b = m + i.shift(); - o = d + i.shift(); - bezierCurveTo(u, m, d, b, o, c); - break; - case 37: - const e = o, - t = c; - u = o + i.shift(); - f = c + i.shift(); - d = u + i.shift(); - g = f + i.shift(); - o = d + i.shift(); - c = g + i.shift(); - bezierCurveTo(u, f, d, g, o, c); - u = o + i.shift(); - f = c + i.shift(); - d = u + i.shift(); - g = f + i.shift(); - o = d; - c = g; - Math.abs(o - e) > Math.abs(c - t) - ? (o += i.shift()) - : (c += i.shift()); - bezierCurveTo(u, f, d, g, o, c); - break; - default: - throw new r.FormatError(`unknown operator: 12 ${x}`); - } - break; - case 14: - if (i.length >= 4) { - const e = i.pop(), - r = i.pop(); - c = i.pop(); - o = i.pop(); - t.push( - { cmd: "save" }, - { cmd: "translate", args: [o, c] }, - ); - let n = lookupCmap( - a.cmap, - String.fromCharCode( - a.glyphNameMap[s.StandardEncoding[e]], - ), - ); - compileCharString(a.glyphs[n.glyphId], t, a, n.glyphId); - t.push({ cmd: "restore" }); - n = lookupCmap( - a.cmap, - String.fromCharCode( - a.glyphNameMap[s.StandardEncoding[r]], - ), - ); - compileCharString(a.glyphs[n.glyphId], t, a, n.glyphId); - } - return; - case 19: - case 20: - l += i.length >> 1; - h += (l + 7) >> 3; - S = !0; - break; - case 21: - c += i.pop(); - o += i.pop(); - moveTo(o, c); - S = !0; - break; - case 22: - o += i.pop(); - moveTo(o, c); - S = !0; - break; - case 24: - for (; i.length > 2; ) { - u = o + i.shift(); - f = c + i.shift(); - d = u + i.shift(); - g = f + i.shift(); - o = d + i.shift(); - c = g + i.shift(); - bezierCurveTo(u, f, d, g, o, c); - } - o += i.shift(); - c += i.shift(); - lineTo(o, c); - break; - case 25: - for (; i.length > 6; ) { - o += i.shift(); - c += i.shift(); - lineTo(o, c); - } - u = o + i.shift(); - f = c + i.shift(); - d = u + i.shift(); - g = f + i.shift(); - o = d + i.shift(); - c = g + i.shift(); - bezierCurveTo(u, f, d, g, o, c); - break; - case 26: - i.length % 2 && (o += i.shift()); - for (; i.length > 0; ) { - u = o; - f = c + i.shift(); - d = u + i.shift(); - g = f + i.shift(); - o = d; - c = g + i.shift(); - bezierCurveTo(u, f, d, g, o, c); - } - break; - case 27: - i.length % 2 && (c += i.shift()); - for (; i.length > 0; ) { - u = o + i.shift(); - f = c; - d = u + i.shift(); - g = f + i.shift(); - o = d + i.shift(); - c = g; - bezierCurveTo(u, f, d, g, o, c); - } - break; - case 28: - i.push(((e[h] << 24) | (e[h + 1] << 16)) >> 16); - h += 2; - break; - case 29: - y = i.pop() + a.gsubrsBias; - w = a.gsubrs[y]; - w && parse(w); - break; - case 30: - for (; i.length > 0; ) { - u = o; - f = c + i.shift(); - d = u + i.shift(); - g = f + i.shift(); - o = d + i.shift(); - c = g + (1 === i.length ? i.shift() : 0); - bezierCurveTo(u, f, d, g, o, c); - if (0 === i.length) break; - u = o + i.shift(); - f = c; - d = u + i.shift(); - g = f + i.shift(); - c = g + i.shift(); - o = d + (1 === i.length ? i.shift() : 0); - bezierCurveTo(u, f, d, g, o, c); - } - break; - case 31: - for (; i.length > 0; ) { - u = o + i.shift(); - f = c; - d = u + i.shift(); - g = f + i.shift(); - c = g + i.shift(); - o = d + (1 === i.length ? i.shift() : 0); - bezierCurveTo(u, f, d, g, o, c); - if (0 === i.length) break; - u = o; - f = c + i.shift(); - d = u + i.shift(); - g = f + i.shift(); - o = d + i.shift(); - c = g + (1 === i.length ? i.shift() : 0); - bezierCurveTo(u, f, d, g, o, c); - } - break; - default: - if (x < 32) - throw new r.FormatError(`unknown operator: ${x}`); - if (x < 247) i.push(x - 139); - else if (x < 251) i.push(256 * (x - 247) + e[h++] + 108); - else if (x < 255) i.push(256 * -(x - 251) - e[h++] - 108); - else { - i.push( - ((e[h] << 24) | - (e[h + 1] << 16) | - (e[h + 2] << 8) | - e[h + 3]) / - 65536, - ); - h += 4; - } - } - S && (i.length = 0); - } - })(e); - } - const c = []; - class CompiledFont { - constructor(e) { - this.constructor === CompiledFont && - (0, r.unreachable)("Cannot initialize CompiledFont."); - this.fontMatrix = e; - this.compiledGlyphs = Object.create(null); - this.compiledCharCodeToGlyphId = Object.create(null); - } - getPathJs(e) { - const { charCode: t, glyphId: a } = lookupCmap(this.cmap, e); - let r = this.compiledGlyphs[a]; - if (!r) - try { - r = this.compileGlyph(this.glyphs[a], a); - this.compiledGlyphs[a] = r; - } catch (e) { - this.compiledGlyphs[a] = c; - void 0 === this.compiledCharCodeToGlyphId[t] && - (this.compiledCharCodeToGlyphId[t] = a); - throw e; - } - void 0 === this.compiledCharCodeToGlyphId[t] && - (this.compiledCharCodeToGlyphId[t] = a); - return r; - } - compileGlyph(e, t) { - if (!e || 0 === e.length || 14 === e[0]) return c; - let a = this.fontMatrix; - if (this.isCFFCIDFont) { - const e = this.fdSelect.getFDIndex(t); - if (e >= 0 && e < this.fdArray.length) { - a = - this.fdArray[e].getByName("FontMatrix") || - r.FONT_IDENTITY_MATRIX; - } else (0, r.warn)("Invalid fd index for glyph index."); - } - const n = [ - { cmd: "save" }, - { cmd: "transform", args: a.slice() }, - { cmd: "scale", args: ["size", "-size"] }, - ]; - this.compileGlyphImpl(e, n, t); - n.push({ cmd: "restore" }); - return n; - } - compileGlyphImpl() { - (0, r.unreachable)("Children classes should implement this."); - } - hasBuiltPath(e) { - const { charCode: t, glyphId: a } = lookupCmap(this.cmap, e); - return ( - void 0 !== this.compiledGlyphs[a] && - void 0 !== this.compiledCharCodeToGlyphId[t] - ); - } - } - class TrueTypeCompiled extends CompiledFont { - constructor(e, t, a) { - super(a || [488e-6, 0, 0, 488e-6, 0, 0]); - this.glyphs = e; - this.cmap = t; - } - compileGlyphImpl(e, t) { - compileGlyf(e, t, this); - } - } - class Type2Compiled extends CompiledFont { - constructor(e, t, a, r) { - super(a || [0.001, 0, 0, 0.001, 0, 0]); - this.glyphs = e.glyphs; - this.gsubrs = e.gsubrs || []; - this.subrs = e.subrs || []; - this.cmap = t; - this.glyphNameMap = r || (0, i.getGlyphsUnicode)(); - this.gsubrsBias = getSubroutineBias(this.gsubrs); - this.subrsBias = getSubroutineBias(this.subrs); - this.isCFFCIDFont = e.isCFFCIDFont; - this.fdSelect = e.fdSelect; - this.fdArray = e.fdArray; - } - compileGlyphImpl(e, t, a) { - compileCharString(e, t, this, a); - } - } - t.FontRendererFactory = class FontRendererFactory { - static create(e, t) { - const a = new Uint8Array(e.data); - let n, i, s, o, c, l; - const h = getUint16(a, 4); - for (let e = 0, u = 12; e < h; e++, u += 16) { - const e = (0, r.bytesToString)(a.subarray(u, u + 4)), - h = getUint32(a, u + 8), - d = getUint32(a, u + 12); - switch (e) { - case "cmap": - n = parseCmap(a, h); - break; - case "glyf": - i = a.subarray(h, h + d); - break; - case "loca": - s = a.subarray(h, h + d); - break; - case "head": - l = getUint16(a, h + 18); - c = getUint16(a, h + 50); - break; - case "CFF ": - o = parseCff(a, h, h + d, t); - } - } - if (i) { - const t = l ? [1 / l, 0, 0, 1 / l, 0, 0] : e.fontMatrix; - return new TrueTypeCompiled( - (function parseGlyfTable(e, t, a) { - let r, n; - if (a) { - r = 4; - n = getUint32; - } else { - r = 2; - n = (e, t) => 2 * getUint16(e, t); - } - const i = []; - let s = n(t, 0); - for (let a = r; a < t.length; a += r) { - const r = n(t, a); - i.push(e.subarray(s, r)); - s = r; - } - return i; - })(i, s, c), - n, - t, - ); - } - return new Type2Compiled(o, n, e.fontMatrix, e.glyphNameMap); - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.getMetrics = t.getFontBasicMetrics = void 0; - var r = a(3); - const n = (0, r.getLookupTableFactory)(function (e) { - e.Courier = 600; - e["Courier-Bold"] = 600; - e["Courier-BoldOblique"] = 600; - e["Courier-Oblique"] = 600; - e.Helvetica = (0, r.getLookupTableFactory)(function (e) { - e.space = 278; - e.exclam = 278; - e.quotedbl = 355; - e.numbersign = 556; - e.dollar = 556; - e.percent = 889; - e.ampersand = 667; - e.quoteright = 222; - e.parenleft = 333; - e.parenright = 333; - e.asterisk = 389; - e.plus = 584; - e.comma = 278; - e.hyphen = 333; - e.period = 278; - e.slash = 278; - e.zero = 556; - e.one = 556; - e.two = 556; - e.three = 556; - e.four = 556; - e.five = 556; - e.six = 556; - e.seven = 556; - e.eight = 556; - e.nine = 556; - e.colon = 278; - e.semicolon = 278; - e.less = 584; - e.equal = 584; - e.greater = 584; - e.question = 556; - e.at = 1015; - e.A = 667; - e.B = 667; - e.C = 722; - e.D = 722; - e.E = 667; - e.F = 611; - e.G = 778; - e.H = 722; - e.I = 278; - e.J = 500; - e.K = 667; - e.L = 556; - e.M = 833; - e.N = 722; - e.O = 778; - e.P = 667; - e.Q = 778; - e.R = 722; - e.S = 667; - e.T = 611; - e.U = 722; - e.V = 667; - e.W = 944; - e.X = 667; - e.Y = 667; - e.Z = 611; - e.bracketleft = 278; - e.backslash = 278; - e.bracketright = 278; - e.asciicircum = 469; - e.underscore = 556; - e.quoteleft = 222; - e.a = 556; - e.b = 556; - e.c = 500; - e.d = 556; - e.e = 556; - e.f = 278; - e.g = 556; - e.h = 556; - e.i = 222; - e.j = 222; - e.k = 500; - e.l = 222; - e.m = 833; - e.n = 556; - e.o = 556; - e.p = 556; - e.q = 556; - e.r = 333; - e.s = 500; - e.t = 278; - e.u = 556; - e.v = 500; - e.w = 722; - e.x = 500; - e.y = 500; - e.z = 500; - e.braceleft = 334; - e.bar = 260; - e.braceright = 334; - e.asciitilde = 584; - e.exclamdown = 333; - e.cent = 556; - e.sterling = 556; - e.fraction = 167; - e.yen = 556; - e.florin = 556; - e.section = 556; - e.currency = 556; - e.quotesingle = 191; - e.quotedblleft = 333; - e.guillemotleft = 556; - e.guilsinglleft = 333; - e.guilsinglright = 333; - e.fi = 500; - e.fl = 500; - e.endash = 556; - e.dagger = 556; - e.daggerdbl = 556; - e.periodcentered = 278; - e.paragraph = 537; - e.bullet = 350; - e.quotesinglbase = 222; - e.quotedblbase = 333; - e.quotedblright = 333; - e.guillemotright = 556; - e.ellipsis = 1e3; - e.perthousand = 1e3; - e.questiondown = 611; - e.grave = 333; - e.acute = 333; - e.circumflex = 333; - e.tilde = 333; - e.macron = 333; - e.breve = 333; - e.dotaccent = 333; - e.dieresis = 333; - e.ring = 333; - e.cedilla = 333; - e.hungarumlaut = 333; - e.ogonek = 333; - e.caron = 333; - e.emdash = 1e3; - e.AE = 1e3; - e.ordfeminine = 370; - e.Lslash = 556; - e.Oslash = 778; - e.OE = 1e3; - e.ordmasculine = 365; - e.ae = 889; - e.dotlessi = 278; - e.lslash = 222; - e.oslash = 611; - e.oe = 944; - e.germandbls = 611; - e.Idieresis = 278; - e.eacute = 556; - e.abreve = 556; - e.uhungarumlaut = 556; - e.ecaron = 556; - e.Ydieresis = 667; - e.divide = 584; - e.Yacute = 667; - e.Acircumflex = 667; - e.aacute = 556; - e.Ucircumflex = 722; - e.yacute = 500; - e.scommaaccent = 500; - e.ecircumflex = 556; - e.Uring = 722; - e.Udieresis = 722; - e.aogonek = 556; - e.Uacute = 722; - e.uogonek = 556; - e.Edieresis = 667; - e.Dcroat = 722; - e.commaaccent = 250; - e.copyright = 737; - e.Emacron = 667; - e.ccaron = 500; - e.aring = 556; - e.Ncommaaccent = 722; - e.lacute = 222; - e.agrave = 556; - e.Tcommaaccent = 611; - e.Cacute = 722; - e.atilde = 556; - e.Edotaccent = 667; - e.scaron = 500; - e.scedilla = 500; - e.iacute = 278; - e.lozenge = 471; - e.Rcaron = 722; - e.Gcommaaccent = 778; - e.ucircumflex = 556; - e.acircumflex = 556; - e.Amacron = 667; - e.rcaron = 333; - e.ccedilla = 500; - e.Zdotaccent = 611; - e.Thorn = 667; - e.Omacron = 778; - e.Racute = 722; - e.Sacute = 667; - e.dcaron = 643; - e.Umacron = 722; - e.uring = 556; - e.threesuperior = 333; - e.Ograve = 778; - e.Agrave = 667; - e.Abreve = 667; - e.multiply = 584; - e.uacute = 556; - e.Tcaron = 611; - e.partialdiff = 476; - e.ydieresis = 500; - e.Nacute = 722; - e.icircumflex = 278; - e.Ecircumflex = 667; - e.adieresis = 556; - e.edieresis = 556; - e.cacute = 500; - e.nacute = 556; - e.umacron = 556; - e.Ncaron = 722; - e.Iacute = 278; - e.plusminus = 584; - e.brokenbar = 260; - e.registered = 737; - e.Gbreve = 778; - e.Idotaccent = 278; - e.summation = 600; - e.Egrave = 667; - e.racute = 333; - e.omacron = 556; - e.Zacute = 611; - e.Zcaron = 611; - e.greaterequal = 549; - e.Eth = 722; - e.Ccedilla = 722; - e.lcommaaccent = 222; - e.tcaron = 317; - e.eogonek = 556; - e.Uogonek = 722; - e.Aacute = 667; - e.Adieresis = 667; - e.egrave = 556; - e.zacute = 500; - e.iogonek = 222; - e.Oacute = 778; - e.oacute = 556; - e.amacron = 556; - e.sacute = 500; - e.idieresis = 278; - e.Ocircumflex = 778; - e.Ugrave = 722; - e.Delta = 612; - e.thorn = 556; - e.twosuperior = 333; - e.Odieresis = 778; - e.mu = 556; - e.igrave = 278; - e.ohungarumlaut = 556; - e.Eogonek = 667; - e.dcroat = 556; - e.threequarters = 834; - e.Scedilla = 667; - e.lcaron = 299; - e.Kcommaaccent = 667; - e.Lacute = 556; - e.trademark = 1e3; - e.edotaccent = 556; - e.Igrave = 278; - e.Imacron = 278; - e.Lcaron = 556; - e.onehalf = 834; - e.lessequal = 549; - e.ocircumflex = 556; - e.ntilde = 556; - e.Uhungarumlaut = 722; - e.Eacute = 667; - e.emacron = 556; - e.gbreve = 556; - e.onequarter = 834; - e.Scaron = 667; - e.Scommaaccent = 667; - e.Ohungarumlaut = 778; - e.degree = 400; - e.ograve = 556; - e.Ccaron = 722; - e.ugrave = 556; - e.radical = 453; - e.Dcaron = 722; - e.rcommaaccent = 333; - e.Ntilde = 722; - e.otilde = 556; - e.Rcommaaccent = 722; - e.Lcommaaccent = 556; - e.Atilde = 667; - e.Aogonek = 667; - e.Aring = 667; - e.Otilde = 778; - e.zdotaccent = 500; - e.Ecaron = 667; - e.Iogonek = 278; - e.kcommaaccent = 500; - e.minus = 584; - e.Icircumflex = 278; - e.ncaron = 556; - e.tcommaaccent = 278; - e.logicalnot = 584; - e.odieresis = 556; - e.udieresis = 556; - e.notequal = 549; - e.gcommaaccent = 556; - e.eth = 556; - e.zcaron = 500; - e.ncommaaccent = 556; - e.onesuperior = 333; - e.imacron = 278; - e.Euro = 556; - }); - e["Helvetica-Bold"] = (0, r.getLookupTableFactory)(function (e) { - e.space = 278; - e.exclam = 333; - e.quotedbl = 474; - e.numbersign = 556; - e.dollar = 556; - e.percent = 889; - e.ampersand = 722; - e.quoteright = 278; - e.parenleft = 333; - e.parenright = 333; - e.asterisk = 389; - e.plus = 584; - e.comma = 278; - e.hyphen = 333; - e.period = 278; - e.slash = 278; - e.zero = 556; - e.one = 556; - e.two = 556; - e.three = 556; - e.four = 556; - e.five = 556; - e.six = 556; - e.seven = 556; - e.eight = 556; - e.nine = 556; - e.colon = 333; - e.semicolon = 333; - e.less = 584; - e.equal = 584; - e.greater = 584; - e.question = 611; - e.at = 975; - e.A = 722; - e.B = 722; - e.C = 722; - e.D = 722; - e.E = 667; - e.F = 611; - e.G = 778; - e.H = 722; - e.I = 278; - e.J = 556; - e.K = 722; - e.L = 611; - e.M = 833; - e.N = 722; - e.O = 778; - e.P = 667; - e.Q = 778; - e.R = 722; - e.S = 667; - e.T = 611; - e.U = 722; - e.V = 667; - e.W = 944; - e.X = 667; - e.Y = 667; - e.Z = 611; - e.bracketleft = 333; - e.backslash = 278; - e.bracketright = 333; - e.asciicircum = 584; - e.underscore = 556; - e.quoteleft = 278; - e.a = 556; - e.b = 611; - e.c = 556; - e.d = 611; - e.e = 556; - e.f = 333; - e.g = 611; - e.h = 611; - e.i = 278; - e.j = 278; - e.k = 556; - e.l = 278; - e.m = 889; - e.n = 611; - e.o = 611; - e.p = 611; - e.q = 611; - e.r = 389; - e.s = 556; - e.t = 333; - e.u = 611; - e.v = 556; - e.w = 778; - e.x = 556; - e.y = 556; - e.z = 500; - e.braceleft = 389; - e.bar = 280; - e.braceright = 389; - e.asciitilde = 584; - e.exclamdown = 333; - e.cent = 556; - e.sterling = 556; - e.fraction = 167; - e.yen = 556; - e.florin = 556; - e.section = 556; - e.currency = 556; - e.quotesingle = 238; - e.quotedblleft = 500; - e.guillemotleft = 556; - e.guilsinglleft = 333; - e.guilsinglright = 333; - e.fi = 611; - e.fl = 611; - e.endash = 556; - e.dagger = 556; - e.daggerdbl = 556; - e.periodcentered = 278; - e.paragraph = 556; - e.bullet = 350; - e.quotesinglbase = 278; - e.quotedblbase = 500; - e.quotedblright = 500; - e.guillemotright = 556; - e.ellipsis = 1e3; - e.perthousand = 1e3; - e.questiondown = 611; - e.grave = 333; - e.acute = 333; - e.circumflex = 333; - e.tilde = 333; - e.macron = 333; - e.breve = 333; - e.dotaccent = 333; - e.dieresis = 333; - e.ring = 333; - e.cedilla = 333; - e.hungarumlaut = 333; - e.ogonek = 333; - e.caron = 333; - e.emdash = 1e3; - e.AE = 1e3; - e.ordfeminine = 370; - e.Lslash = 611; - e.Oslash = 778; - e.OE = 1e3; - e.ordmasculine = 365; - e.ae = 889; - e.dotlessi = 278; - e.lslash = 278; - e.oslash = 611; - e.oe = 944; - e.germandbls = 611; - e.Idieresis = 278; - e.eacute = 556; - e.abreve = 556; - e.uhungarumlaut = 611; - e.ecaron = 556; - e.Ydieresis = 667; - e.divide = 584; - e.Yacute = 667; - e.Acircumflex = 722; - e.aacute = 556; - e.Ucircumflex = 722; - e.yacute = 556; - e.scommaaccent = 556; - e.ecircumflex = 556; - e.Uring = 722; - e.Udieresis = 722; - e.aogonek = 556; - e.Uacute = 722; - e.uogonek = 611; - e.Edieresis = 667; - e.Dcroat = 722; - e.commaaccent = 250; - e.copyright = 737; - e.Emacron = 667; - e.ccaron = 556; - e.aring = 556; - e.Ncommaaccent = 722; - e.lacute = 278; - e.agrave = 556; - e.Tcommaaccent = 611; - e.Cacute = 722; - e.atilde = 556; - e.Edotaccent = 667; - e.scaron = 556; - e.scedilla = 556; - e.iacute = 278; - e.lozenge = 494; - e.Rcaron = 722; - e.Gcommaaccent = 778; - e.ucircumflex = 611; - e.acircumflex = 556; - e.Amacron = 722; - e.rcaron = 389; - e.ccedilla = 556; - e.Zdotaccent = 611; - e.Thorn = 667; - e.Omacron = 778; - e.Racute = 722; - e.Sacute = 667; - e.dcaron = 743; - e.Umacron = 722; - e.uring = 611; - e.threesuperior = 333; - e.Ograve = 778; - e.Agrave = 722; - e.Abreve = 722; - e.multiply = 584; - e.uacute = 611; - e.Tcaron = 611; - e.partialdiff = 494; - e.ydieresis = 556; - e.Nacute = 722; - e.icircumflex = 278; - e.Ecircumflex = 667; - e.adieresis = 556; - e.edieresis = 556; - e.cacute = 556; - e.nacute = 611; - e.umacron = 611; - e.Ncaron = 722; - e.Iacute = 278; - e.plusminus = 584; - e.brokenbar = 280; - e.registered = 737; - e.Gbreve = 778; - e.Idotaccent = 278; - e.summation = 600; - e.Egrave = 667; - e.racute = 389; - e.omacron = 611; - e.Zacute = 611; - e.Zcaron = 611; - e.greaterequal = 549; - e.Eth = 722; - e.Ccedilla = 722; - e.lcommaaccent = 278; - e.tcaron = 389; - e.eogonek = 556; - e.Uogonek = 722; - e.Aacute = 722; - e.Adieresis = 722; - e.egrave = 556; - e.zacute = 500; - e.iogonek = 278; - e.Oacute = 778; - e.oacute = 611; - e.amacron = 556; - e.sacute = 556; - e.idieresis = 278; - e.Ocircumflex = 778; - e.Ugrave = 722; - e.Delta = 612; - e.thorn = 611; - e.twosuperior = 333; - e.Odieresis = 778; - e.mu = 611; - e.igrave = 278; - e.ohungarumlaut = 611; - e.Eogonek = 667; - e.dcroat = 611; - e.threequarters = 834; - e.Scedilla = 667; - e.lcaron = 400; - e.Kcommaaccent = 722; - e.Lacute = 611; - e.trademark = 1e3; - e.edotaccent = 556; - e.Igrave = 278; - e.Imacron = 278; - e.Lcaron = 611; - e.onehalf = 834; - e.lessequal = 549; - e.ocircumflex = 611; - e.ntilde = 611; - e.Uhungarumlaut = 722; - e.Eacute = 667; - e.emacron = 556; - e.gbreve = 611; - e.onequarter = 834; - e.Scaron = 667; - e.Scommaaccent = 667; - e.Ohungarumlaut = 778; - e.degree = 400; - e.ograve = 611; - e.Ccaron = 722; - e.ugrave = 611; - e.radical = 549; - e.Dcaron = 722; - e.rcommaaccent = 389; - e.Ntilde = 722; - e.otilde = 611; - e.Rcommaaccent = 722; - e.Lcommaaccent = 611; - e.Atilde = 722; - e.Aogonek = 722; - e.Aring = 722; - e.Otilde = 778; - e.zdotaccent = 500; - e.Ecaron = 667; - e.Iogonek = 278; - e.kcommaaccent = 556; - e.minus = 584; - e.Icircumflex = 278; - e.ncaron = 611; - e.tcommaaccent = 333; - e.logicalnot = 584; - e.odieresis = 611; - e.udieresis = 611; - e.notequal = 549; - e.gcommaaccent = 611; - e.eth = 611; - e.zcaron = 500; - e.ncommaaccent = 611; - e.onesuperior = 333; - e.imacron = 278; - e.Euro = 556; - }); - e["Helvetica-BoldOblique"] = (0, r.getLookupTableFactory)( - function (e) { - e.space = 278; - e.exclam = 333; - e.quotedbl = 474; - e.numbersign = 556; - e.dollar = 556; - e.percent = 889; - e.ampersand = 722; - e.quoteright = 278; - e.parenleft = 333; - e.parenright = 333; - e.asterisk = 389; - e.plus = 584; - e.comma = 278; - e.hyphen = 333; - e.period = 278; - e.slash = 278; - e.zero = 556; - e.one = 556; - e.two = 556; - e.three = 556; - e.four = 556; - e.five = 556; - e.six = 556; - e.seven = 556; - e.eight = 556; - e.nine = 556; - e.colon = 333; - e.semicolon = 333; - e.less = 584; - e.equal = 584; - e.greater = 584; - e.question = 611; - e.at = 975; - e.A = 722; - e.B = 722; - e.C = 722; - e.D = 722; - e.E = 667; - e.F = 611; - e.G = 778; - e.H = 722; - e.I = 278; - e.J = 556; - e.K = 722; - e.L = 611; - e.M = 833; - e.N = 722; - e.O = 778; - e.P = 667; - e.Q = 778; - e.R = 722; - e.S = 667; - e.T = 611; - e.U = 722; - e.V = 667; - e.W = 944; - e.X = 667; - e.Y = 667; - e.Z = 611; - e.bracketleft = 333; - e.backslash = 278; - e.bracketright = 333; - e.asciicircum = 584; - e.underscore = 556; - e.quoteleft = 278; - e.a = 556; - e.b = 611; - e.c = 556; - e.d = 611; - e.e = 556; - e.f = 333; - e.g = 611; - e.h = 611; - e.i = 278; - e.j = 278; - e.k = 556; - e.l = 278; - e.m = 889; - e.n = 611; - e.o = 611; - e.p = 611; - e.q = 611; - e.r = 389; - e.s = 556; - e.t = 333; - e.u = 611; - e.v = 556; - e.w = 778; - e.x = 556; - e.y = 556; - e.z = 500; - e.braceleft = 389; - e.bar = 280; - e.braceright = 389; - e.asciitilde = 584; - e.exclamdown = 333; - e.cent = 556; - e.sterling = 556; - e.fraction = 167; - e.yen = 556; - e.florin = 556; - e.section = 556; - e.currency = 556; - e.quotesingle = 238; - e.quotedblleft = 500; - e.guillemotleft = 556; - e.guilsinglleft = 333; - e.guilsinglright = 333; - e.fi = 611; - e.fl = 611; - e.endash = 556; - e.dagger = 556; - e.daggerdbl = 556; - e.periodcentered = 278; - e.paragraph = 556; - e.bullet = 350; - e.quotesinglbase = 278; - e.quotedblbase = 500; - e.quotedblright = 500; - e.guillemotright = 556; - e.ellipsis = 1e3; - e.perthousand = 1e3; - e.questiondown = 611; - e.grave = 333; - e.acute = 333; - e.circumflex = 333; - e.tilde = 333; - e.macron = 333; - e.breve = 333; - e.dotaccent = 333; - e.dieresis = 333; - e.ring = 333; - e.cedilla = 333; - e.hungarumlaut = 333; - e.ogonek = 333; - e.caron = 333; - e.emdash = 1e3; - e.AE = 1e3; - e.ordfeminine = 370; - e.Lslash = 611; - e.Oslash = 778; - e.OE = 1e3; - e.ordmasculine = 365; - e.ae = 889; - e.dotlessi = 278; - e.lslash = 278; - e.oslash = 611; - e.oe = 944; - e.germandbls = 611; - e.Idieresis = 278; - e.eacute = 556; - e.abreve = 556; - e.uhungarumlaut = 611; - e.ecaron = 556; - e.Ydieresis = 667; - e.divide = 584; - e.Yacute = 667; - e.Acircumflex = 722; - e.aacute = 556; - e.Ucircumflex = 722; - e.yacute = 556; - e.scommaaccent = 556; - e.ecircumflex = 556; - e.Uring = 722; - e.Udieresis = 722; - e.aogonek = 556; - e.Uacute = 722; - e.uogonek = 611; - e.Edieresis = 667; - e.Dcroat = 722; - e.commaaccent = 250; - e.copyright = 737; - e.Emacron = 667; - e.ccaron = 556; - e.aring = 556; - e.Ncommaaccent = 722; - e.lacute = 278; - e.agrave = 556; - e.Tcommaaccent = 611; - e.Cacute = 722; - e.atilde = 556; - e.Edotaccent = 667; - e.scaron = 556; - e.scedilla = 556; - e.iacute = 278; - e.lozenge = 494; - e.Rcaron = 722; - e.Gcommaaccent = 778; - e.ucircumflex = 611; - e.acircumflex = 556; - e.Amacron = 722; - e.rcaron = 389; - e.ccedilla = 556; - e.Zdotaccent = 611; - e.Thorn = 667; - e.Omacron = 778; - e.Racute = 722; - e.Sacute = 667; - e.dcaron = 743; - e.Umacron = 722; - e.uring = 611; - e.threesuperior = 333; - e.Ograve = 778; - e.Agrave = 722; - e.Abreve = 722; - e.multiply = 584; - e.uacute = 611; - e.Tcaron = 611; - e.partialdiff = 494; - e.ydieresis = 556; - e.Nacute = 722; - e.icircumflex = 278; - e.Ecircumflex = 667; - e.adieresis = 556; - e.edieresis = 556; - e.cacute = 556; - e.nacute = 611; - e.umacron = 611; - e.Ncaron = 722; - e.Iacute = 278; - e.plusminus = 584; - e.brokenbar = 280; - e.registered = 737; - e.Gbreve = 778; - e.Idotaccent = 278; - e.summation = 600; - e.Egrave = 667; - e.racute = 389; - e.omacron = 611; - e.Zacute = 611; - e.Zcaron = 611; - e.greaterequal = 549; - e.Eth = 722; - e.Ccedilla = 722; - e.lcommaaccent = 278; - e.tcaron = 389; - e.eogonek = 556; - e.Uogonek = 722; - e.Aacute = 722; - e.Adieresis = 722; - e.egrave = 556; - e.zacute = 500; - e.iogonek = 278; - e.Oacute = 778; - e.oacute = 611; - e.amacron = 556; - e.sacute = 556; - e.idieresis = 278; - e.Ocircumflex = 778; - e.Ugrave = 722; - e.Delta = 612; - e.thorn = 611; - e.twosuperior = 333; - e.Odieresis = 778; - e.mu = 611; - e.igrave = 278; - e.ohungarumlaut = 611; - e.Eogonek = 667; - e.dcroat = 611; - e.threequarters = 834; - e.Scedilla = 667; - e.lcaron = 400; - e.Kcommaaccent = 722; - e.Lacute = 611; - e.trademark = 1e3; - e.edotaccent = 556; - e.Igrave = 278; - e.Imacron = 278; - e.Lcaron = 611; - e.onehalf = 834; - e.lessequal = 549; - e.ocircumflex = 611; - e.ntilde = 611; - e.Uhungarumlaut = 722; - e.Eacute = 667; - e.emacron = 556; - e.gbreve = 611; - e.onequarter = 834; - e.Scaron = 667; - e.Scommaaccent = 667; - e.Ohungarumlaut = 778; - e.degree = 400; - e.ograve = 611; - e.Ccaron = 722; - e.ugrave = 611; - e.radical = 549; - e.Dcaron = 722; - e.rcommaaccent = 389; - e.Ntilde = 722; - e.otilde = 611; - e.Rcommaaccent = 722; - e.Lcommaaccent = 611; - e.Atilde = 722; - e.Aogonek = 722; - e.Aring = 722; - e.Otilde = 778; - e.zdotaccent = 500; - e.Ecaron = 667; - e.Iogonek = 278; - e.kcommaaccent = 556; - e.minus = 584; - e.Icircumflex = 278; - e.ncaron = 611; - e.tcommaaccent = 333; - e.logicalnot = 584; - e.odieresis = 611; - e.udieresis = 611; - e.notequal = 549; - e.gcommaaccent = 611; - e.eth = 611; - e.zcaron = 500; - e.ncommaaccent = 611; - e.onesuperior = 333; - e.imacron = 278; - e.Euro = 556; - }, - ); - e["Helvetica-Oblique"] = (0, r.getLookupTableFactory)(function (e) { - e.space = 278; - e.exclam = 278; - e.quotedbl = 355; - e.numbersign = 556; - e.dollar = 556; - e.percent = 889; - e.ampersand = 667; - e.quoteright = 222; - e.parenleft = 333; - e.parenright = 333; - e.asterisk = 389; - e.plus = 584; - e.comma = 278; - e.hyphen = 333; - e.period = 278; - e.slash = 278; - e.zero = 556; - e.one = 556; - e.two = 556; - e.three = 556; - e.four = 556; - e.five = 556; - e.six = 556; - e.seven = 556; - e.eight = 556; - e.nine = 556; - e.colon = 278; - e.semicolon = 278; - e.less = 584; - e.equal = 584; - e.greater = 584; - e.question = 556; - e.at = 1015; - e.A = 667; - e.B = 667; - e.C = 722; - e.D = 722; - e.E = 667; - e.F = 611; - e.G = 778; - e.H = 722; - e.I = 278; - e.J = 500; - e.K = 667; - e.L = 556; - e.M = 833; - e.N = 722; - e.O = 778; - e.P = 667; - e.Q = 778; - e.R = 722; - e.S = 667; - e.T = 611; - e.U = 722; - e.V = 667; - e.W = 944; - e.X = 667; - e.Y = 667; - e.Z = 611; - e.bracketleft = 278; - e.backslash = 278; - e.bracketright = 278; - e.asciicircum = 469; - e.underscore = 556; - e.quoteleft = 222; - e.a = 556; - e.b = 556; - e.c = 500; - e.d = 556; - e.e = 556; - e.f = 278; - e.g = 556; - e.h = 556; - e.i = 222; - e.j = 222; - e.k = 500; - e.l = 222; - e.m = 833; - e.n = 556; - e.o = 556; - e.p = 556; - e.q = 556; - e.r = 333; - e.s = 500; - e.t = 278; - e.u = 556; - e.v = 500; - e.w = 722; - e.x = 500; - e.y = 500; - e.z = 500; - e.braceleft = 334; - e.bar = 260; - e.braceright = 334; - e.asciitilde = 584; - e.exclamdown = 333; - e.cent = 556; - e.sterling = 556; - e.fraction = 167; - e.yen = 556; - e.florin = 556; - e.section = 556; - e.currency = 556; - e.quotesingle = 191; - e.quotedblleft = 333; - e.guillemotleft = 556; - e.guilsinglleft = 333; - e.guilsinglright = 333; - e.fi = 500; - e.fl = 500; - e.endash = 556; - e.dagger = 556; - e.daggerdbl = 556; - e.periodcentered = 278; - e.paragraph = 537; - e.bullet = 350; - e.quotesinglbase = 222; - e.quotedblbase = 333; - e.quotedblright = 333; - e.guillemotright = 556; - e.ellipsis = 1e3; - e.perthousand = 1e3; - e.questiondown = 611; - e.grave = 333; - e.acute = 333; - e.circumflex = 333; - e.tilde = 333; - e.macron = 333; - e.breve = 333; - e.dotaccent = 333; - e.dieresis = 333; - e.ring = 333; - e.cedilla = 333; - e.hungarumlaut = 333; - e.ogonek = 333; - e.caron = 333; - e.emdash = 1e3; - e.AE = 1e3; - e.ordfeminine = 370; - e.Lslash = 556; - e.Oslash = 778; - e.OE = 1e3; - e.ordmasculine = 365; - e.ae = 889; - e.dotlessi = 278; - e.lslash = 222; - e.oslash = 611; - e.oe = 944; - e.germandbls = 611; - e.Idieresis = 278; - e.eacute = 556; - e.abreve = 556; - e.uhungarumlaut = 556; - e.ecaron = 556; - e.Ydieresis = 667; - e.divide = 584; - e.Yacute = 667; - e.Acircumflex = 667; - e.aacute = 556; - e.Ucircumflex = 722; - e.yacute = 500; - e.scommaaccent = 500; - e.ecircumflex = 556; - e.Uring = 722; - e.Udieresis = 722; - e.aogonek = 556; - e.Uacute = 722; - e.uogonek = 556; - e.Edieresis = 667; - e.Dcroat = 722; - e.commaaccent = 250; - e.copyright = 737; - e.Emacron = 667; - e.ccaron = 500; - e.aring = 556; - e.Ncommaaccent = 722; - e.lacute = 222; - e.agrave = 556; - e.Tcommaaccent = 611; - e.Cacute = 722; - e.atilde = 556; - e.Edotaccent = 667; - e.scaron = 500; - e.scedilla = 500; - e.iacute = 278; - e.lozenge = 471; - e.Rcaron = 722; - e.Gcommaaccent = 778; - e.ucircumflex = 556; - e.acircumflex = 556; - e.Amacron = 667; - e.rcaron = 333; - e.ccedilla = 500; - e.Zdotaccent = 611; - e.Thorn = 667; - e.Omacron = 778; - e.Racute = 722; - e.Sacute = 667; - e.dcaron = 643; - e.Umacron = 722; - e.uring = 556; - e.threesuperior = 333; - e.Ograve = 778; - e.Agrave = 667; - e.Abreve = 667; - e.multiply = 584; - e.uacute = 556; - e.Tcaron = 611; - e.partialdiff = 476; - e.ydieresis = 500; - e.Nacute = 722; - e.icircumflex = 278; - e.Ecircumflex = 667; - e.adieresis = 556; - e.edieresis = 556; - e.cacute = 500; - e.nacute = 556; - e.umacron = 556; - e.Ncaron = 722; - e.Iacute = 278; - e.plusminus = 584; - e.brokenbar = 260; - e.registered = 737; - e.Gbreve = 778; - e.Idotaccent = 278; - e.summation = 600; - e.Egrave = 667; - e.racute = 333; - e.omacron = 556; - e.Zacute = 611; - e.Zcaron = 611; - e.greaterequal = 549; - e.Eth = 722; - e.Ccedilla = 722; - e.lcommaaccent = 222; - e.tcaron = 317; - e.eogonek = 556; - e.Uogonek = 722; - e.Aacute = 667; - e.Adieresis = 667; - e.egrave = 556; - e.zacute = 500; - e.iogonek = 222; - e.Oacute = 778; - e.oacute = 556; - e.amacron = 556; - e.sacute = 500; - e.idieresis = 278; - e.Ocircumflex = 778; - e.Ugrave = 722; - e.Delta = 612; - e.thorn = 556; - e.twosuperior = 333; - e.Odieresis = 778; - e.mu = 556; - e.igrave = 278; - e.ohungarumlaut = 556; - e.Eogonek = 667; - e.dcroat = 556; - e.threequarters = 834; - e.Scedilla = 667; - e.lcaron = 299; - e.Kcommaaccent = 667; - e.Lacute = 556; - e.trademark = 1e3; - e.edotaccent = 556; - e.Igrave = 278; - e.Imacron = 278; - e.Lcaron = 556; - e.onehalf = 834; - e.lessequal = 549; - e.ocircumflex = 556; - e.ntilde = 556; - e.Uhungarumlaut = 722; - e.Eacute = 667; - e.emacron = 556; - e.gbreve = 556; - e.onequarter = 834; - e.Scaron = 667; - e.Scommaaccent = 667; - e.Ohungarumlaut = 778; - e.degree = 400; - e.ograve = 556; - e.Ccaron = 722; - e.ugrave = 556; - e.radical = 453; - e.Dcaron = 722; - e.rcommaaccent = 333; - e.Ntilde = 722; - e.otilde = 556; - e.Rcommaaccent = 722; - e.Lcommaaccent = 556; - e.Atilde = 667; - e.Aogonek = 667; - e.Aring = 667; - e.Otilde = 778; - e.zdotaccent = 500; - e.Ecaron = 667; - e.Iogonek = 278; - e.kcommaaccent = 500; - e.minus = 584; - e.Icircumflex = 278; - e.ncaron = 556; - e.tcommaaccent = 278; - e.logicalnot = 584; - e.odieresis = 556; - e.udieresis = 556; - e.notequal = 549; - e.gcommaaccent = 556; - e.eth = 556; - e.zcaron = 500; - e.ncommaaccent = 556; - e.onesuperior = 333; - e.imacron = 278; - e.Euro = 556; - }); - e.Symbol = (0, r.getLookupTableFactory)(function (e) { - e.space = 250; - e.exclam = 333; - e.universal = 713; - e.numbersign = 500; - e.existential = 549; - e.percent = 833; - e.ampersand = 778; - e.suchthat = 439; - e.parenleft = 333; - e.parenright = 333; - e.asteriskmath = 500; - e.plus = 549; - e.comma = 250; - e.minus = 549; - e.period = 250; - e.slash = 278; - e.zero = 500; - e.one = 500; - e.two = 500; - e.three = 500; - e.four = 500; - e.five = 500; - e.six = 500; - e.seven = 500; - e.eight = 500; - e.nine = 500; - e.colon = 278; - e.semicolon = 278; - e.less = 549; - e.equal = 549; - e.greater = 549; - e.question = 444; - e.congruent = 549; - e.Alpha = 722; - e.Beta = 667; - e.Chi = 722; - e.Delta = 612; - e.Epsilon = 611; - e.Phi = 763; - e.Gamma = 603; - e.Eta = 722; - e.Iota = 333; - e.theta1 = 631; - e.Kappa = 722; - e.Lambda = 686; - e.Mu = 889; - e.Nu = 722; - e.Omicron = 722; - e.Pi = 768; - e.Theta = 741; - e.Rho = 556; - e.Sigma = 592; - e.Tau = 611; - e.Upsilon = 690; - e.sigma1 = 439; - e.Omega = 768; - e.Xi = 645; - e.Psi = 795; - e.Zeta = 611; - e.bracketleft = 333; - e.therefore = 863; - e.bracketright = 333; - e.perpendicular = 658; - e.underscore = 500; - e.radicalex = 500; - e.alpha = 631; - e.beta = 549; - e.chi = 549; - e.delta = 494; - e.epsilon = 439; - e.phi = 521; - e.gamma = 411; - e.eta = 603; - e.iota = 329; - e.phi1 = 603; - e.kappa = 549; - e.lambda = 549; - e.mu = 576; - e.nu = 521; - e.omicron = 549; - e.pi = 549; - e.theta = 521; - e.rho = 549; - e.sigma = 603; - e.tau = 439; - e.upsilon = 576; - e.omega1 = 713; - e.omega = 686; - e.xi = 493; - e.psi = 686; - e.zeta = 494; - e.braceleft = 480; - e.bar = 200; - e.braceright = 480; - e.similar = 549; - e.Euro = 750; - e.Upsilon1 = 620; - e.minute = 247; - e.lessequal = 549; - e.fraction = 167; - e.infinity = 713; - e.florin = 500; - e.club = 753; - e.diamond = 753; - e.heart = 753; - e.spade = 753; - e.arrowboth = 1042; - e.arrowleft = 987; - e.arrowup = 603; - e.arrowright = 987; - e.arrowdown = 603; - e.degree = 400; - e.plusminus = 549; - e.second = 411; - e.greaterequal = 549; - e.multiply = 549; - e.proportional = 713; - e.partialdiff = 494; - e.bullet = 460; - e.divide = 549; - e.notequal = 549; - e.equivalence = 549; - e.approxequal = 549; - e.ellipsis = 1e3; - e.arrowvertex = 603; - e.arrowhorizex = 1e3; - e.carriagereturn = 658; - e.aleph = 823; - e.Ifraktur = 686; - e.Rfraktur = 795; - e.weierstrass = 987; - e.circlemultiply = 768; - e.circleplus = 768; - e.emptyset = 823; - e.intersection = 768; - e.union = 768; - e.propersuperset = 713; - e.reflexsuperset = 713; - e.notsubset = 713; - e.propersubset = 713; - e.reflexsubset = 713; - e.element = 713; - e.notelement = 713; - e.angle = 768; - e.gradient = 713; - e.registerserif = 790; - e.copyrightserif = 790; - e.trademarkserif = 890; - e.product = 823; - e.radical = 549; - e.dotmath = 250; - e.logicalnot = 713; - e.logicaland = 603; - e.logicalor = 603; - e.arrowdblboth = 1042; - e.arrowdblleft = 987; - e.arrowdblup = 603; - e.arrowdblright = 987; - e.arrowdbldown = 603; - e.lozenge = 494; - e.angleleft = 329; - e.registersans = 790; - e.copyrightsans = 790; - e.trademarksans = 786; - e.summation = 713; - e.parenlefttp = 384; - e.parenleftex = 384; - e.parenleftbt = 384; - e.bracketlefttp = 384; - e.bracketleftex = 384; - e.bracketleftbt = 384; - e.bracelefttp = 494; - e.braceleftmid = 494; - e.braceleftbt = 494; - e.braceex = 494; - e.angleright = 329; - e.integral = 274; - e.integraltp = 686; - e.integralex = 686; - e.integralbt = 686; - e.parenrighttp = 384; - e.parenrightex = 384; - e.parenrightbt = 384; - e.bracketrighttp = 384; - e.bracketrightex = 384; - e.bracketrightbt = 384; - e.bracerighttp = 494; - e.bracerightmid = 494; - e.bracerightbt = 494; - e.apple = 790; - }); - e["Times-Roman"] = (0, r.getLookupTableFactory)(function (e) { - e.space = 250; - e.exclam = 333; - e.quotedbl = 408; - e.numbersign = 500; - e.dollar = 500; - e.percent = 833; - e.ampersand = 778; - e.quoteright = 333; - e.parenleft = 333; - e.parenright = 333; - e.asterisk = 500; - e.plus = 564; - e.comma = 250; - e.hyphen = 333; - e.period = 250; - e.slash = 278; - e.zero = 500; - e.one = 500; - e.two = 500; - e.three = 500; - e.four = 500; - e.five = 500; - e.six = 500; - e.seven = 500; - e.eight = 500; - e.nine = 500; - e.colon = 278; - e.semicolon = 278; - e.less = 564; - e.equal = 564; - e.greater = 564; - e.question = 444; - e.at = 921; - e.A = 722; - e.B = 667; - e.C = 667; - e.D = 722; - e.E = 611; - e.F = 556; - e.G = 722; - e.H = 722; - e.I = 333; - e.J = 389; - e.K = 722; - e.L = 611; - e.M = 889; - e.N = 722; - e.O = 722; - e.P = 556; - e.Q = 722; - e.R = 667; - e.S = 556; - e.T = 611; - e.U = 722; - e.V = 722; - e.W = 944; - e.X = 722; - e.Y = 722; - e.Z = 611; - e.bracketleft = 333; - e.backslash = 278; - e.bracketright = 333; - e.asciicircum = 469; - e.underscore = 500; - e.quoteleft = 333; - e.a = 444; - e.b = 500; - e.c = 444; - e.d = 500; - e.e = 444; - e.f = 333; - e.g = 500; - e.h = 500; - e.i = 278; - e.j = 278; - e.k = 500; - e.l = 278; - e.m = 778; - e.n = 500; - e.o = 500; - e.p = 500; - e.q = 500; - e.r = 333; - e.s = 389; - e.t = 278; - e.u = 500; - e.v = 500; - e.w = 722; - e.x = 500; - e.y = 500; - e.z = 444; - e.braceleft = 480; - e.bar = 200; - e.braceright = 480; - e.asciitilde = 541; - e.exclamdown = 333; - e.cent = 500; - e.sterling = 500; - e.fraction = 167; - e.yen = 500; - e.florin = 500; - e.section = 500; - e.currency = 500; - e.quotesingle = 180; - e.quotedblleft = 444; - e.guillemotleft = 500; - e.guilsinglleft = 333; - e.guilsinglright = 333; - e.fi = 556; - e.fl = 556; - e.endash = 500; - e.dagger = 500; - e.daggerdbl = 500; - e.periodcentered = 250; - e.paragraph = 453; - e.bullet = 350; - e.quotesinglbase = 333; - e.quotedblbase = 444; - e.quotedblright = 444; - e.guillemotright = 500; - e.ellipsis = 1e3; - e.perthousand = 1e3; - e.questiondown = 444; - e.grave = 333; - e.acute = 333; - e.circumflex = 333; - e.tilde = 333; - e.macron = 333; - e.breve = 333; - e.dotaccent = 333; - e.dieresis = 333; - e.ring = 333; - e.cedilla = 333; - e.hungarumlaut = 333; - e.ogonek = 333; - e.caron = 333; - e.emdash = 1e3; - e.AE = 889; - e.ordfeminine = 276; - e.Lslash = 611; - e.Oslash = 722; - e.OE = 889; - e.ordmasculine = 310; - e.ae = 667; - e.dotlessi = 278; - e.lslash = 278; - e.oslash = 500; - e.oe = 722; - e.germandbls = 500; - e.Idieresis = 333; - e.eacute = 444; - e.abreve = 444; - e.uhungarumlaut = 500; - e.ecaron = 444; - e.Ydieresis = 722; - e.divide = 564; - e.Yacute = 722; - e.Acircumflex = 722; - e.aacute = 444; - e.Ucircumflex = 722; - e.yacute = 500; - e.scommaaccent = 389; - e.ecircumflex = 444; - e.Uring = 722; - e.Udieresis = 722; - e.aogonek = 444; - e.Uacute = 722; - e.uogonek = 500; - e.Edieresis = 611; - e.Dcroat = 722; - e.commaaccent = 250; - e.copyright = 760; - e.Emacron = 611; - e.ccaron = 444; - e.aring = 444; - e.Ncommaaccent = 722; - e.lacute = 278; - e.agrave = 444; - e.Tcommaaccent = 611; - e.Cacute = 667; - e.atilde = 444; - e.Edotaccent = 611; - e.scaron = 389; - e.scedilla = 389; - e.iacute = 278; - e.lozenge = 471; - e.Rcaron = 667; - e.Gcommaaccent = 722; - e.ucircumflex = 500; - e.acircumflex = 444; - e.Amacron = 722; - e.rcaron = 333; - e.ccedilla = 444; - e.Zdotaccent = 611; - e.Thorn = 556; - e.Omacron = 722; - e.Racute = 667; - e.Sacute = 556; - e.dcaron = 588; - e.Umacron = 722; - e.uring = 500; - e.threesuperior = 300; - e.Ograve = 722; - e.Agrave = 722; - e.Abreve = 722; - e.multiply = 564; - e.uacute = 500; - e.Tcaron = 611; - e.partialdiff = 476; - e.ydieresis = 500; - e.Nacute = 722; - e.icircumflex = 278; - e.Ecircumflex = 611; - e.adieresis = 444; - e.edieresis = 444; - e.cacute = 444; - e.nacute = 500; - e.umacron = 500; - e.Ncaron = 722; - e.Iacute = 333; - e.plusminus = 564; - e.brokenbar = 200; - e.registered = 760; - e.Gbreve = 722; - e.Idotaccent = 333; - e.summation = 600; - e.Egrave = 611; - e.racute = 333; - e.omacron = 500; - e.Zacute = 611; - e.Zcaron = 611; - e.greaterequal = 549; - e.Eth = 722; - e.Ccedilla = 667; - e.lcommaaccent = 278; - e.tcaron = 326; - e.eogonek = 444; - e.Uogonek = 722; - e.Aacute = 722; - e.Adieresis = 722; - e.egrave = 444; - e.zacute = 444; - e.iogonek = 278; - e.Oacute = 722; - e.oacute = 500; - e.amacron = 444; - e.sacute = 389; - e.idieresis = 278; - e.Ocircumflex = 722; - e.Ugrave = 722; - e.Delta = 612; - e.thorn = 500; - e.twosuperior = 300; - e.Odieresis = 722; - e.mu = 500; - e.igrave = 278; - e.ohungarumlaut = 500; - e.Eogonek = 611; - e.dcroat = 500; - e.threequarters = 750; - e.Scedilla = 556; - e.lcaron = 344; - e.Kcommaaccent = 722; - e.Lacute = 611; - e.trademark = 980; - e.edotaccent = 444; - e.Igrave = 333; - e.Imacron = 333; - e.Lcaron = 611; - e.onehalf = 750; - e.lessequal = 549; - e.ocircumflex = 500; - e.ntilde = 500; - e.Uhungarumlaut = 722; - e.Eacute = 611; - e.emacron = 444; - e.gbreve = 500; - e.onequarter = 750; - e.Scaron = 556; - e.Scommaaccent = 556; - e.Ohungarumlaut = 722; - e.degree = 400; - e.ograve = 500; - e.Ccaron = 667; - e.ugrave = 500; - e.radical = 453; - e.Dcaron = 722; - e.rcommaaccent = 333; - e.Ntilde = 722; - e.otilde = 500; - e.Rcommaaccent = 667; - e.Lcommaaccent = 611; - e.Atilde = 722; - e.Aogonek = 722; - e.Aring = 722; - e.Otilde = 722; - e.zdotaccent = 444; - e.Ecaron = 611; - e.Iogonek = 333; - e.kcommaaccent = 500; - e.minus = 564; - e.Icircumflex = 333; - e.ncaron = 500; - e.tcommaaccent = 278; - e.logicalnot = 564; - e.odieresis = 500; - e.udieresis = 500; - e.notequal = 549; - e.gcommaaccent = 500; - e.eth = 500; - e.zcaron = 444; - e.ncommaaccent = 500; - e.onesuperior = 300; - e.imacron = 278; - e.Euro = 500; - }); - e["Times-Bold"] = (0, r.getLookupTableFactory)(function (e) { - e.space = 250; - e.exclam = 333; - e.quotedbl = 555; - e.numbersign = 500; - e.dollar = 500; - e.percent = 1e3; - e.ampersand = 833; - e.quoteright = 333; - e.parenleft = 333; - e.parenright = 333; - e.asterisk = 500; - e.plus = 570; - e.comma = 250; - e.hyphen = 333; - e.period = 250; - e.slash = 278; - e.zero = 500; - e.one = 500; - e.two = 500; - e.three = 500; - e.four = 500; - e.five = 500; - e.six = 500; - e.seven = 500; - e.eight = 500; - e.nine = 500; - e.colon = 333; - e.semicolon = 333; - e.less = 570; - e.equal = 570; - e.greater = 570; - e.question = 500; - e.at = 930; - e.A = 722; - e.B = 667; - e.C = 722; - e.D = 722; - e.E = 667; - e.F = 611; - e.G = 778; - e.H = 778; - e.I = 389; - e.J = 500; - e.K = 778; - e.L = 667; - e.M = 944; - e.N = 722; - e.O = 778; - e.P = 611; - e.Q = 778; - e.R = 722; - e.S = 556; - e.T = 667; - e.U = 722; - e.V = 722; - e.W = 1e3; - e.X = 722; - e.Y = 722; - e.Z = 667; - e.bracketleft = 333; - e.backslash = 278; - e.bracketright = 333; - e.asciicircum = 581; - e.underscore = 500; - e.quoteleft = 333; - e.a = 500; - e.b = 556; - e.c = 444; - e.d = 556; - e.e = 444; - e.f = 333; - e.g = 500; - e.h = 556; - e.i = 278; - e.j = 333; - e.k = 556; - e.l = 278; - e.m = 833; - e.n = 556; - e.o = 500; - e.p = 556; - e.q = 556; - e.r = 444; - e.s = 389; - e.t = 333; - e.u = 556; - e.v = 500; - e.w = 722; - e.x = 500; - e.y = 500; - e.z = 444; - e.braceleft = 394; - e.bar = 220; - e.braceright = 394; - e.asciitilde = 520; - e.exclamdown = 333; - e.cent = 500; - e.sterling = 500; - e.fraction = 167; - e.yen = 500; - e.florin = 500; - e.section = 500; - e.currency = 500; - e.quotesingle = 278; - e.quotedblleft = 500; - e.guillemotleft = 500; - e.guilsinglleft = 333; - e.guilsinglright = 333; - e.fi = 556; - e.fl = 556; - e.endash = 500; - e.dagger = 500; - e.daggerdbl = 500; - e.periodcentered = 250; - e.paragraph = 540; - e.bullet = 350; - e.quotesinglbase = 333; - e.quotedblbase = 500; - e.quotedblright = 500; - e.guillemotright = 500; - e.ellipsis = 1e3; - e.perthousand = 1e3; - e.questiondown = 500; - e.grave = 333; - e.acute = 333; - e.circumflex = 333; - e.tilde = 333; - e.macron = 333; - e.breve = 333; - e.dotaccent = 333; - e.dieresis = 333; - e.ring = 333; - e.cedilla = 333; - e.hungarumlaut = 333; - e.ogonek = 333; - e.caron = 333; - e.emdash = 1e3; - e.AE = 1e3; - e.ordfeminine = 300; - e.Lslash = 667; - e.Oslash = 778; - e.OE = 1e3; - e.ordmasculine = 330; - e.ae = 722; - e.dotlessi = 278; - e.lslash = 278; - e.oslash = 500; - e.oe = 722; - e.germandbls = 556; - e.Idieresis = 389; - e.eacute = 444; - e.abreve = 500; - e.uhungarumlaut = 556; - e.ecaron = 444; - e.Ydieresis = 722; - e.divide = 570; - e.Yacute = 722; - e.Acircumflex = 722; - e.aacute = 500; - e.Ucircumflex = 722; - e.yacute = 500; - e.scommaaccent = 389; - e.ecircumflex = 444; - e.Uring = 722; - e.Udieresis = 722; - e.aogonek = 500; - e.Uacute = 722; - e.uogonek = 556; - e.Edieresis = 667; - e.Dcroat = 722; - e.commaaccent = 250; - e.copyright = 747; - e.Emacron = 667; - e.ccaron = 444; - e.aring = 500; - e.Ncommaaccent = 722; - e.lacute = 278; - e.agrave = 500; - e.Tcommaaccent = 667; - e.Cacute = 722; - e.atilde = 500; - e.Edotaccent = 667; - e.scaron = 389; - e.scedilla = 389; - e.iacute = 278; - e.lozenge = 494; - e.Rcaron = 722; - e.Gcommaaccent = 778; - e.ucircumflex = 556; - e.acircumflex = 500; - e.Amacron = 722; - e.rcaron = 444; - e.ccedilla = 444; - e.Zdotaccent = 667; - e.Thorn = 611; - e.Omacron = 778; - e.Racute = 722; - e.Sacute = 556; - e.dcaron = 672; - e.Umacron = 722; - e.uring = 556; - e.threesuperior = 300; - e.Ograve = 778; - e.Agrave = 722; - e.Abreve = 722; - e.multiply = 570; - e.uacute = 556; - e.Tcaron = 667; - e.partialdiff = 494; - e.ydieresis = 500; - e.Nacute = 722; - e.icircumflex = 278; - e.Ecircumflex = 667; - e.adieresis = 500; - e.edieresis = 444; - e.cacute = 444; - e.nacute = 556; - e.umacron = 556; - e.Ncaron = 722; - e.Iacute = 389; - e.plusminus = 570; - e.brokenbar = 220; - e.registered = 747; - e.Gbreve = 778; - e.Idotaccent = 389; - e.summation = 600; - e.Egrave = 667; - e.racute = 444; - e.omacron = 500; - e.Zacute = 667; - e.Zcaron = 667; - e.greaterequal = 549; - e.Eth = 722; - e.Ccedilla = 722; - e.lcommaaccent = 278; - e.tcaron = 416; - e.eogonek = 444; - e.Uogonek = 722; - e.Aacute = 722; - e.Adieresis = 722; - e.egrave = 444; - e.zacute = 444; - e.iogonek = 278; - e.Oacute = 778; - e.oacute = 500; - e.amacron = 500; - e.sacute = 389; - e.idieresis = 278; - e.Ocircumflex = 778; - e.Ugrave = 722; - e.Delta = 612; - e.thorn = 556; - e.twosuperior = 300; - e.Odieresis = 778; - e.mu = 556; - e.igrave = 278; - e.ohungarumlaut = 500; - e.Eogonek = 667; - e.dcroat = 556; - e.threequarters = 750; - e.Scedilla = 556; - e.lcaron = 394; - e.Kcommaaccent = 778; - e.Lacute = 667; - e.trademark = 1e3; - e.edotaccent = 444; - e.Igrave = 389; - e.Imacron = 389; - e.Lcaron = 667; - e.onehalf = 750; - e.lessequal = 549; - e.ocircumflex = 500; - e.ntilde = 556; - e.Uhungarumlaut = 722; - e.Eacute = 667; - e.emacron = 444; - e.gbreve = 500; - e.onequarter = 750; - e.Scaron = 556; - e.Scommaaccent = 556; - e.Ohungarumlaut = 778; - e.degree = 400; - e.ograve = 500; - e.Ccaron = 722; - e.ugrave = 556; - e.radical = 549; - e.Dcaron = 722; - e.rcommaaccent = 444; - e.Ntilde = 722; - e.otilde = 500; - e.Rcommaaccent = 722; - e.Lcommaaccent = 667; - e.Atilde = 722; - e.Aogonek = 722; - e.Aring = 722; - e.Otilde = 778; - e.zdotaccent = 444; - e.Ecaron = 667; - e.Iogonek = 389; - e.kcommaaccent = 556; - e.minus = 570; - e.Icircumflex = 389; - e.ncaron = 556; - e.tcommaaccent = 333; - e.logicalnot = 570; - e.odieresis = 500; - e.udieresis = 556; - e.notequal = 549; - e.gcommaaccent = 500; - e.eth = 500; - e.zcaron = 444; - e.ncommaaccent = 556; - e.onesuperior = 300; - e.imacron = 278; - e.Euro = 500; - }); - e["Times-BoldItalic"] = (0, r.getLookupTableFactory)(function (e) { - e.space = 250; - e.exclam = 389; - e.quotedbl = 555; - e.numbersign = 500; - e.dollar = 500; - e.percent = 833; - e.ampersand = 778; - e.quoteright = 333; - e.parenleft = 333; - e.parenright = 333; - e.asterisk = 500; - e.plus = 570; - e.comma = 250; - e.hyphen = 333; - e.period = 250; - e.slash = 278; - e.zero = 500; - e.one = 500; - e.two = 500; - e.three = 500; - e.four = 500; - e.five = 500; - e.six = 500; - e.seven = 500; - e.eight = 500; - e.nine = 500; - e.colon = 333; - e.semicolon = 333; - e.less = 570; - e.equal = 570; - e.greater = 570; - e.question = 500; - e.at = 832; - e.A = 667; - e.B = 667; - e.C = 667; - e.D = 722; - e.E = 667; - e.F = 667; - e.G = 722; - e.H = 778; - e.I = 389; - e.J = 500; - e.K = 667; - e.L = 611; - e.M = 889; - e.N = 722; - e.O = 722; - e.P = 611; - e.Q = 722; - e.R = 667; - e.S = 556; - e.T = 611; - e.U = 722; - e.V = 667; - e.W = 889; - e.X = 667; - e.Y = 611; - e.Z = 611; - e.bracketleft = 333; - e.backslash = 278; - e.bracketright = 333; - e.asciicircum = 570; - e.underscore = 500; - e.quoteleft = 333; - e.a = 500; - e.b = 500; - e.c = 444; - e.d = 500; - e.e = 444; - e.f = 333; - e.g = 500; - e.h = 556; - e.i = 278; - e.j = 278; - e.k = 500; - e.l = 278; - e.m = 778; - e.n = 556; - e.o = 500; - e.p = 500; - e.q = 500; - e.r = 389; - e.s = 389; - e.t = 278; - e.u = 556; - e.v = 444; - e.w = 667; - e.x = 500; - e.y = 444; - e.z = 389; - e.braceleft = 348; - e.bar = 220; - e.braceright = 348; - e.asciitilde = 570; - e.exclamdown = 389; - e.cent = 500; - e.sterling = 500; - e.fraction = 167; - e.yen = 500; - e.florin = 500; - e.section = 500; - e.currency = 500; - e.quotesingle = 278; - e.quotedblleft = 500; - e.guillemotleft = 500; - e.guilsinglleft = 333; - e.guilsinglright = 333; - e.fi = 556; - e.fl = 556; - e.endash = 500; - e.dagger = 500; - e.daggerdbl = 500; - e.periodcentered = 250; - e.paragraph = 500; - e.bullet = 350; - e.quotesinglbase = 333; - e.quotedblbase = 500; - e.quotedblright = 500; - e.guillemotright = 500; - e.ellipsis = 1e3; - e.perthousand = 1e3; - e.questiondown = 500; - e.grave = 333; - e.acute = 333; - e.circumflex = 333; - e.tilde = 333; - e.macron = 333; - e.breve = 333; - e.dotaccent = 333; - e.dieresis = 333; - e.ring = 333; - e.cedilla = 333; - e.hungarumlaut = 333; - e.ogonek = 333; - e.caron = 333; - e.emdash = 1e3; - e.AE = 944; - e.ordfeminine = 266; - e.Lslash = 611; - e.Oslash = 722; - e.OE = 944; - e.ordmasculine = 300; - e.ae = 722; - e.dotlessi = 278; - e.lslash = 278; - e.oslash = 500; - e.oe = 722; - e.germandbls = 500; - e.Idieresis = 389; - e.eacute = 444; - e.abreve = 500; - e.uhungarumlaut = 556; - e.ecaron = 444; - e.Ydieresis = 611; - e.divide = 570; - e.Yacute = 611; - e.Acircumflex = 667; - e.aacute = 500; - e.Ucircumflex = 722; - e.yacute = 444; - e.scommaaccent = 389; - e.ecircumflex = 444; - e.Uring = 722; - e.Udieresis = 722; - e.aogonek = 500; - e.Uacute = 722; - e.uogonek = 556; - e.Edieresis = 667; - e.Dcroat = 722; - e.commaaccent = 250; - e.copyright = 747; - e.Emacron = 667; - e.ccaron = 444; - e.aring = 500; - e.Ncommaaccent = 722; - e.lacute = 278; - e.agrave = 500; - e.Tcommaaccent = 611; - e.Cacute = 667; - e.atilde = 500; - e.Edotaccent = 667; - e.scaron = 389; - e.scedilla = 389; - e.iacute = 278; - e.lozenge = 494; - e.Rcaron = 667; - e.Gcommaaccent = 722; - e.ucircumflex = 556; - e.acircumflex = 500; - e.Amacron = 667; - e.rcaron = 389; - e.ccedilla = 444; - e.Zdotaccent = 611; - e.Thorn = 611; - e.Omacron = 722; - e.Racute = 667; - e.Sacute = 556; - e.dcaron = 608; - e.Umacron = 722; - e.uring = 556; - e.threesuperior = 300; - e.Ograve = 722; - e.Agrave = 667; - e.Abreve = 667; - e.multiply = 570; - e.uacute = 556; - e.Tcaron = 611; - e.partialdiff = 494; - e.ydieresis = 444; - e.Nacute = 722; - e.icircumflex = 278; - e.Ecircumflex = 667; - e.adieresis = 500; - e.edieresis = 444; - e.cacute = 444; - e.nacute = 556; - e.umacron = 556; - e.Ncaron = 722; - e.Iacute = 389; - e.plusminus = 570; - e.brokenbar = 220; - e.registered = 747; - e.Gbreve = 722; - e.Idotaccent = 389; - e.summation = 600; - e.Egrave = 667; - e.racute = 389; - e.omacron = 500; - e.Zacute = 611; - e.Zcaron = 611; - e.greaterequal = 549; - e.Eth = 722; - e.Ccedilla = 667; - e.lcommaaccent = 278; - e.tcaron = 366; - e.eogonek = 444; - e.Uogonek = 722; - e.Aacute = 667; - e.Adieresis = 667; - e.egrave = 444; - e.zacute = 389; - e.iogonek = 278; - e.Oacute = 722; - e.oacute = 500; - e.amacron = 500; - e.sacute = 389; - e.idieresis = 278; - e.Ocircumflex = 722; - e.Ugrave = 722; - e.Delta = 612; - e.thorn = 500; - e.twosuperior = 300; - e.Odieresis = 722; - e.mu = 576; - e.igrave = 278; - e.ohungarumlaut = 500; - e.Eogonek = 667; - e.dcroat = 500; - e.threequarters = 750; - e.Scedilla = 556; - e.lcaron = 382; - e.Kcommaaccent = 667; - e.Lacute = 611; - e.trademark = 1e3; - e.edotaccent = 444; - e.Igrave = 389; - e.Imacron = 389; - e.Lcaron = 611; - e.onehalf = 750; - e.lessequal = 549; - e.ocircumflex = 500; - e.ntilde = 556; - e.Uhungarumlaut = 722; - e.Eacute = 667; - e.emacron = 444; - e.gbreve = 500; - e.onequarter = 750; - e.Scaron = 556; - e.Scommaaccent = 556; - e.Ohungarumlaut = 722; - e.degree = 400; - e.ograve = 500; - e.Ccaron = 667; - e.ugrave = 556; - e.radical = 549; - e.Dcaron = 722; - e.rcommaaccent = 389; - e.Ntilde = 722; - e.otilde = 500; - e.Rcommaaccent = 667; - e.Lcommaaccent = 611; - e.Atilde = 667; - e.Aogonek = 667; - e.Aring = 667; - e.Otilde = 722; - e.zdotaccent = 389; - e.Ecaron = 667; - e.Iogonek = 389; - e.kcommaaccent = 500; - e.minus = 606; - e.Icircumflex = 389; - e.ncaron = 556; - e.tcommaaccent = 278; - e.logicalnot = 606; - e.odieresis = 500; - e.udieresis = 556; - e.notequal = 549; - e.gcommaaccent = 500; - e.eth = 500; - e.zcaron = 389; - e.ncommaaccent = 556; - e.onesuperior = 300; - e.imacron = 278; - e.Euro = 500; - }); - e["Times-Italic"] = (0, r.getLookupTableFactory)(function (e) { - e.space = 250; - e.exclam = 333; - e.quotedbl = 420; - e.numbersign = 500; - e.dollar = 500; - e.percent = 833; - e.ampersand = 778; - e.quoteright = 333; - e.parenleft = 333; - e.parenright = 333; - e.asterisk = 500; - e.plus = 675; - e.comma = 250; - e.hyphen = 333; - e.period = 250; - e.slash = 278; - e.zero = 500; - e.one = 500; - e.two = 500; - e.three = 500; - e.four = 500; - e.five = 500; - e.six = 500; - e.seven = 500; - e.eight = 500; - e.nine = 500; - e.colon = 333; - e.semicolon = 333; - e.less = 675; - e.equal = 675; - e.greater = 675; - e.question = 500; - e.at = 920; - e.A = 611; - e.B = 611; - e.C = 667; - e.D = 722; - e.E = 611; - e.F = 611; - e.G = 722; - e.H = 722; - e.I = 333; - e.J = 444; - e.K = 667; - e.L = 556; - e.M = 833; - e.N = 667; - e.O = 722; - e.P = 611; - e.Q = 722; - e.R = 611; - e.S = 500; - e.T = 556; - e.U = 722; - e.V = 611; - e.W = 833; - e.X = 611; - e.Y = 556; - e.Z = 556; - e.bracketleft = 389; - e.backslash = 278; - e.bracketright = 389; - e.asciicircum = 422; - e.underscore = 500; - e.quoteleft = 333; - e.a = 500; - e.b = 500; - e.c = 444; - e.d = 500; - e.e = 444; - e.f = 278; - e.g = 500; - e.h = 500; - e.i = 278; - e.j = 278; - e.k = 444; - e.l = 278; - e.m = 722; - e.n = 500; - e.o = 500; - e.p = 500; - e.q = 500; - e.r = 389; - e.s = 389; - e.t = 278; - e.u = 500; - e.v = 444; - e.w = 667; - e.x = 444; - e.y = 444; - e.z = 389; - e.braceleft = 400; - e.bar = 275; - e.braceright = 400; - e.asciitilde = 541; - e.exclamdown = 389; - e.cent = 500; - e.sterling = 500; - e.fraction = 167; - e.yen = 500; - e.florin = 500; - e.section = 500; - e.currency = 500; - e.quotesingle = 214; - e.quotedblleft = 556; - e.guillemotleft = 500; - e.guilsinglleft = 333; - e.guilsinglright = 333; - e.fi = 500; - e.fl = 500; - e.endash = 500; - e.dagger = 500; - e.daggerdbl = 500; - e.periodcentered = 250; - e.paragraph = 523; - e.bullet = 350; - e.quotesinglbase = 333; - e.quotedblbase = 556; - e.quotedblright = 556; - e.guillemotright = 500; - e.ellipsis = 889; - e.perthousand = 1e3; - e.questiondown = 500; - e.grave = 333; - e.acute = 333; - e.circumflex = 333; - e.tilde = 333; - e.macron = 333; - e.breve = 333; - e.dotaccent = 333; - e.dieresis = 333; - e.ring = 333; - e.cedilla = 333; - e.hungarumlaut = 333; - e.ogonek = 333; - e.caron = 333; - e.emdash = 889; - e.AE = 889; - e.ordfeminine = 276; - e.Lslash = 556; - e.Oslash = 722; - e.OE = 944; - e.ordmasculine = 310; - e.ae = 667; - e.dotlessi = 278; - e.lslash = 278; - e.oslash = 500; - e.oe = 667; - e.germandbls = 500; - e.Idieresis = 333; - e.eacute = 444; - e.abreve = 500; - e.uhungarumlaut = 500; - e.ecaron = 444; - e.Ydieresis = 556; - e.divide = 675; - e.Yacute = 556; - e.Acircumflex = 611; - e.aacute = 500; - e.Ucircumflex = 722; - e.yacute = 444; - e.scommaaccent = 389; - e.ecircumflex = 444; - e.Uring = 722; - e.Udieresis = 722; - e.aogonek = 500; - e.Uacute = 722; - e.uogonek = 500; - e.Edieresis = 611; - e.Dcroat = 722; - e.commaaccent = 250; - e.copyright = 760; - e.Emacron = 611; - e.ccaron = 444; - e.aring = 500; - e.Ncommaaccent = 667; - e.lacute = 278; - e.agrave = 500; - e.Tcommaaccent = 556; - e.Cacute = 667; - e.atilde = 500; - e.Edotaccent = 611; - e.scaron = 389; - e.scedilla = 389; - e.iacute = 278; - e.lozenge = 471; - e.Rcaron = 611; - e.Gcommaaccent = 722; - e.ucircumflex = 500; - e.acircumflex = 500; - e.Amacron = 611; - e.rcaron = 389; - e.ccedilla = 444; - e.Zdotaccent = 556; - e.Thorn = 611; - e.Omacron = 722; - e.Racute = 611; - e.Sacute = 500; - e.dcaron = 544; - e.Umacron = 722; - e.uring = 500; - e.threesuperior = 300; - e.Ograve = 722; - e.Agrave = 611; - e.Abreve = 611; - e.multiply = 675; - e.uacute = 500; - e.Tcaron = 556; - e.partialdiff = 476; - e.ydieresis = 444; - e.Nacute = 667; - e.icircumflex = 278; - e.Ecircumflex = 611; - e.adieresis = 500; - e.edieresis = 444; - e.cacute = 444; - e.nacute = 500; - e.umacron = 500; - e.Ncaron = 667; - e.Iacute = 333; - e.plusminus = 675; - e.brokenbar = 275; - e.registered = 760; - e.Gbreve = 722; - e.Idotaccent = 333; - e.summation = 600; - e.Egrave = 611; - e.racute = 389; - e.omacron = 500; - e.Zacute = 556; - e.Zcaron = 556; - e.greaterequal = 549; - e.Eth = 722; - e.Ccedilla = 667; - e.lcommaaccent = 278; - e.tcaron = 300; - e.eogonek = 444; - e.Uogonek = 722; - e.Aacute = 611; - e.Adieresis = 611; - e.egrave = 444; - e.zacute = 389; - e.iogonek = 278; - e.Oacute = 722; - e.oacute = 500; - e.amacron = 500; - e.sacute = 389; - e.idieresis = 278; - e.Ocircumflex = 722; - e.Ugrave = 722; - e.Delta = 612; - e.thorn = 500; - e.twosuperior = 300; - e.Odieresis = 722; - e.mu = 500; - e.igrave = 278; - e.ohungarumlaut = 500; - e.Eogonek = 611; - e.dcroat = 500; - e.threequarters = 750; - e.Scedilla = 500; - e.lcaron = 300; - e.Kcommaaccent = 667; - e.Lacute = 556; - e.trademark = 980; - e.edotaccent = 444; - e.Igrave = 333; - e.Imacron = 333; - e.Lcaron = 611; - e.onehalf = 750; - e.lessequal = 549; - e.ocircumflex = 500; - e.ntilde = 500; - e.Uhungarumlaut = 722; - e.Eacute = 611; - e.emacron = 444; - e.gbreve = 500; - e.onequarter = 750; - e.Scaron = 500; - e.Scommaaccent = 500; - e.Ohungarumlaut = 722; - e.degree = 400; - e.ograve = 500; - e.Ccaron = 667; - e.ugrave = 500; - e.radical = 453; - e.Dcaron = 722; - e.rcommaaccent = 389; - e.Ntilde = 667; - e.otilde = 500; - e.Rcommaaccent = 611; - e.Lcommaaccent = 556; - e.Atilde = 611; - e.Aogonek = 611; - e.Aring = 611; - e.Otilde = 722; - e.zdotaccent = 389; - e.Ecaron = 611; - e.Iogonek = 333; - e.kcommaaccent = 444; - e.minus = 675; - e.Icircumflex = 333; - e.ncaron = 500; - e.tcommaaccent = 278; - e.logicalnot = 675; - e.odieresis = 500; - e.udieresis = 500; - e.notequal = 549; - e.gcommaaccent = 500; - e.eth = 500; - e.zcaron = 389; - e.ncommaaccent = 500; - e.onesuperior = 300; - e.imacron = 278; - e.Euro = 500; - }); - e.ZapfDingbats = (0, r.getLookupTableFactory)(function (e) { - e.space = 278; - e.a1 = 974; - e.a2 = 961; - e.a202 = 974; - e.a3 = 980; - e.a4 = 719; - e.a5 = 789; - e.a119 = 790; - e.a118 = 791; - e.a117 = 690; - e.a11 = 960; - e.a12 = 939; - e.a13 = 549; - e.a14 = 855; - e.a15 = 911; - e.a16 = 933; - e.a105 = 911; - e.a17 = 945; - e.a18 = 974; - e.a19 = 755; - e.a20 = 846; - e.a21 = 762; - e.a22 = 761; - e.a23 = 571; - e.a24 = 677; - e.a25 = 763; - e.a26 = 760; - e.a27 = 759; - e.a28 = 754; - e.a6 = 494; - e.a7 = 552; - e.a8 = 537; - e.a9 = 577; - e.a10 = 692; - e.a29 = 786; - e.a30 = 788; - e.a31 = 788; - e.a32 = 790; - e.a33 = 793; - e.a34 = 794; - e.a35 = 816; - e.a36 = 823; - e.a37 = 789; - e.a38 = 841; - e.a39 = 823; - e.a40 = 833; - e.a41 = 816; - e.a42 = 831; - e.a43 = 923; - e.a44 = 744; - e.a45 = 723; - e.a46 = 749; - e.a47 = 790; - e.a48 = 792; - e.a49 = 695; - e.a50 = 776; - e.a51 = 768; - e.a52 = 792; - e.a53 = 759; - e.a54 = 707; - e.a55 = 708; - e.a56 = 682; - e.a57 = 701; - e.a58 = 826; - e.a59 = 815; - e.a60 = 789; - e.a61 = 789; - e.a62 = 707; - e.a63 = 687; - e.a64 = 696; - e.a65 = 689; - e.a66 = 786; - e.a67 = 787; - e.a68 = 713; - e.a69 = 791; - e.a70 = 785; - e.a71 = 791; - e.a72 = 873; - e.a73 = 761; - e.a74 = 762; - e.a203 = 762; - e.a75 = 759; - e.a204 = 759; - e.a76 = 892; - e.a77 = 892; - e.a78 = 788; - e.a79 = 784; - e.a81 = 438; - e.a82 = 138; - e.a83 = 277; - e.a84 = 415; - e.a97 = 392; - e.a98 = 392; - e.a99 = 668; - e.a100 = 668; - e.a89 = 390; - e.a90 = 390; - e.a93 = 317; - e.a94 = 317; - e.a91 = 276; - e.a92 = 276; - e.a205 = 509; - e.a85 = 509; - e.a206 = 410; - e.a86 = 410; - e.a87 = 234; - e.a88 = 234; - e.a95 = 334; - e.a96 = 334; - e.a101 = 732; - e.a102 = 544; - e.a103 = 544; - e.a104 = 910; - e.a106 = 667; - e.a107 = 760; - e.a108 = 760; - e.a112 = 776; - e.a111 = 595; - e.a110 = 694; - e.a109 = 626; - e.a120 = 788; - e.a121 = 788; - e.a122 = 788; - e.a123 = 788; - e.a124 = 788; - e.a125 = 788; - e.a126 = 788; - e.a127 = 788; - e.a128 = 788; - e.a129 = 788; - e.a130 = 788; - e.a131 = 788; - e.a132 = 788; - e.a133 = 788; - e.a134 = 788; - e.a135 = 788; - e.a136 = 788; - e.a137 = 788; - e.a138 = 788; - e.a139 = 788; - e.a140 = 788; - e.a141 = 788; - e.a142 = 788; - e.a143 = 788; - e.a144 = 788; - e.a145 = 788; - e.a146 = 788; - e.a147 = 788; - e.a148 = 788; - e.a149 = 788; - e.a150 = 788; - e.a151 = 788; - e.a152 = 788; - e.a153 = 788; - e.a154 = 788; - e.a155 = 788; - e.a156 = 788; - e.a157 = 788; - e.a158 = 788; - e.a159 = 788; - e.a160 = 894; - e.a161 = 838; - e.a163 = 1016; - e.a164 = 458; - e.a196 = 748; - e.a165 = 924; - e.a192 = 748; - e.a166 = 918; - e.a167 = 927; - e.a168 = 928; - e.a169 = 928; - e.a170 = 834; - e.a171 = 873; - e.a172 = 828; - e.a173 = 924; - e.a162 = 924; - e.a174 = 917; - e.a175 = 930; - e.a176 = 931; - e.a177 = 463; - e.a178 = 883; - e.a179 = 836; - e.a193 = 836; - e.a180 = 867; - e.a199 = 867; - e.a181 = 696; - e.a200 = 696; - e.a182 = 874; - e.a201 = 874; - e.a183 = 760; - e.a184 = 946; - e.a197 = 771; - e.a185 = 865; - e.a194 = 771; - e.a198 = 888; - e.a186 = 967; - e.a195 = 888; - e.a187 = 831; - e.a188 = 873; - e.a189 = 927; - e.a190 = 970; - e.a191 = 918; - }); - }); - t.getMetrics = n; - const i = (0, r.getLookupTableFactory)(function (e) { - e.Courier = { - ascent: 629, - descent: -157, - capHeight: 562, - xHeight: -426, - }; - e["Courier-Bold"] = { - ascent: 629, - descent: -157, - capHeight: 562, - xHeight: 439, - }; - e["Courier-Oblique"] = { - ascent: 629, - descent: -157, - capHeight: 562, - xHeight: 426, - }; - e["Courier-BoldOblique"] = { - ascent: 629, - descent: -157, - capHeight: 562, - xHeight: 426, - }; - e.Helvetica = { - ascent: 718, - descent: -207, - capHeight: 718, - xHeight: 523, - }; - e["Helvetica-Bold"] = { - ascent: 718, - descent: -207, - capHeight: 718, - xHeight: 532, - }; - e["Helvetica-Oblique"] = { - ascent: 718, - descent: -207, - capHeight: 718, - xHeight: 523, - }; - e["Helvetica-BoldOblique"] = { - ascent: 718, - descent: -207, - capHeight: 718, - xHeight: 532, - }; - e["Times-Roman"] = { - ascent: 683, - descent: -217, - capHeight: 662, - xHeight: 450, - }; - e["Times-Bold"] = { - ascent: 683, - descent: -217, - capHeight: 676, - xHeight: 461, - }; - e["Times-Italic"] = { - ascent: 683, - descent: -217, - capHeight: 653, - xHeight: 441, - }; - e["Times-BoldItalic"] = { - ascent: 683, - descent: -217, - capHeight: 669, - xHeight: 462, - }; - e.Symbol = { - ascent: Math.NaN, - descent: Math.NaN, - capHeight: Math.NaN, - xHeight: Math.NaN, - }; - e.ZapfDingbats = { - ascent: Math.NaN, - descent: Math.NaN, - capHeight: Math.NaN, - xHeight: Math.NaN, - }; - }); - t.getFontBasicMetrics = i; - }, - (e, t) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.GlyfTable = void 0; - t.GlyfTable = class GlyfTable { - constructor({ - glyfTable: e, - isGlyphLocationsLong: t, - locaTable: a, - numGlyphs: r, - }) { - this.glyphs = []; - const n = new DataView(a.buffer, a.byteOffset, a.byteLength), - i = new DataView(e.buffer, e.byteOffset, e.byteLength), - s = t ? 4 : 2; - let o = t ? n.getUint32(0) : 2 * n.getUint16(0), - c = 0; - for (let e = 0; e < r; e++) { - c += s; - const e = t ? n.getUint32(c) : 2 * n.getUint16(c); - if (e === o) { - this.glyphs.push(new Glyph({})); - continue; - } - const a = Glyph.parse(o, i); - this.glyphs.push(a); - o = e; - } - } - getSize() { - return this.glyphs.reduce( - (e, t) => e + ((t.getSize() + 3) & -4), - 0, - ); - } - write() { - const e = this.getSize(), - t = new DataView(new ArrayBuffer(e)), - a = e > 131070, - r = a ? 4 : 2, - n = new DataView(new ArrayBuffer((this.glyphs.length + 1) * r)); - a ? n.setUint32(0, 0) : n.setUint16(0, 0); - let i = 0, - s = 0; - for (const e of this.glyphs) { - i += e.write(i, t); - i = (i + 3) & -4; - s += r; - a ? n.setUint32(s, i) : n.setUint16(s, i >> 1); - } - return { - isLocationLong: a, - loca: new Uint8Array(n.buffer), - glyf: new Uint8Array(t.buffer), - }; - } - scale(e) { - for (let t = 0, a = this.glyphs.length; t < a; t++) - this.glyphs[t].scale(e[t]); - } - }; - class Glyph { - constructor({ - header: e = null, - simple: t = null, - composites: a = null, - }) { - this.header = e; - this.simple = t; - this.composites = a; - } - static parse(e, t) { - const [a, r] = GlyphHeader.parse(e, t); - e += a; - if (r.numberOfContours < 0) { - const a = []; - for (;;) { - const [r, n] = CompositeGlyph.parse(e, t); - e += r; - a.push(n); - if (!(32 & n.flags)) break; - } - return new Glyph({ header: r, composites: a }); - } - const n = SimpleGlyph.parse(e, t, r.numberOfContours); - return new Glyph({ header: r, simple: n }); - } - getSize() { - if (!this.header) return 0; - const e = this.simple - ? this.simple.getSize() - : this.composites.reduce((e, t) => e + t.getSize(), 0); - return this.header.getSize() + e; - } - write(e, t) { - if (!this.header) return 0; - const a = e; - e += this.header.write(e, t); - if (this.simple) e += this.simple.write(e, t); - else for (const a of this.composites) e += a.write(e, t); - return e - a; - } - scale(e) { - if (!this.header) return; - const t = (this.header.xMin + this.header.xMax) / 2; - this.header.scale(t, e); - if (this.simple) this.simple.scale(t, e); - else for (const a of this.composites) a.scale(t, e); - } - } - class GlyphHeader { - constructor({ - numberOfContours: e, - xMin: t, - yMin: a, - xMax: r, - yMax: n, - }) { - this.numberOfContours = e; - this.xMin = t; - this.yMin = a; - this.xMax = r; - this.yMax = n; - } - static parse(e, t) { - return [ - 10, - new GlyphHeader({ - numberOfContours: t.getInt16(e), - xMin: t.getInt16(e + 2), - yMin: t.getInt16(e + 4), - xMax: t.getInt16(e + 6), - yMax: t.getInt16(e + 8), - }), - ]; - } - getSize() { - return 10; - } - write(e, t) { - t.setInt16(e, this.numberOfContours); - t.setInt16(e + 2, this.xMin); - t.setInt16(e + 4, this.yMin); - t.setInt16(e + 6, this.xMax); - t.setInt16(e + 8, this.yMax); - return 10; - } - scale(e, t) { - this.xMin = Math.round(e + (this.xMin - e) * t); - this.xMax = Math.round(e + (this.xMax - e) * t); - } - } - class Contour { - constructor({ flags: e, xCoordinates: t, yCoordinates: a }) { - this.xCoordinates = t; - this.yCoordinates = a; - this.flags = e; - } - } - class SimpleGlyph { - constructor({ contours: e, instructions: t }) { - this.contours = e; - this.instructions = t; - } - static parse(e, t, a) { - const r = []; - for (let n = 0; n < a; n++) { - const a = t.getUint16(e); - e += 2; - r.push(a); - } - const n = r[a - 1] + 1, - i = t.getUint16(e); - e += 2; - const s = new Uint8Array(t).slice(e, e + i); - e += i; - const o = []; - for (let a = 0; a < n; e++, a++) { - let r = t.getUint8(e); - o.push(r); - if (8 & r) { - const n = t.getUint8(++e); - r ^= 8; - for (let e = 0; e < n; e++) o.push(r); - a += n; - } - } - const c = []; - let l = [], - h = [], - u = []; - const d = []; - let f = 0, - g = 0; - for (let a = 0; a < n; a++) { - const n = o[a]; - if (2 & n) { - const a = t.getUint8(e++); - g += 16 & n ? a : -a; - l.push(g); - } else if (16 & n) l.push(g); - else { - g += t.getInt16(e); - e += 2; - l.push(g); - } - if (r[f] === a) { - f++; - c.push(l); - l = []; - } - } - g = 0; - f = 0; - for (let a = 0; a < n; a++) { - const n = o[a]; - if (4 & n) { - const a = t.getUint8(e++); - g += 32 & n ? a : -a; - h.push(g); - } else if (32 & n) h.push(g); - else { - g += t.getInt16(e); - e += 2; - h.push(g); - } - u.push((1 & n) | (64 & n)); - if (r[f] === a) { - l = c[f]; - f++; - d.push( - new Contour({ flags: u, xCoordinates: l, yCoordinates: h }), - ); - h = []; - u = []; - } - } - return new SimpleGlyph({ contours: d, instructions: s }); - } - getSize() { - let e = 2 * this.contours.length + 2 + this.instructions.length, - t = 0, - a = 0; - for (const r of this.contours) { - e += r.flags.length; - for (let n = 0, i = r.xCoordinates.length; n < i; n++) { - const i = r.xCoordinates[n], - s = r.yCoordinates[n]; - let o = Math.abs(i - t); - o > 255 ? (e += 2) : o > 0 && (e += 1); - t = i; - o = Math.abs(s - a); - o > 255 ? (e += 2) : o > 0 && (e += 1); - a = s; - } - } - return e; - } - write(e, t) { - const a = e, - r = [], - n = [], - i = []; - let s = 0, - o = 0; - for (const a of this.contours) { - for (let e = 0, t = a.xCoordinates.length; e < t; e++) { - let t = a.flags[e]; - const c = a.xCoordinates[e]; - let l = c - s; - if (0 === l) { - t |= 16; - r.push(0); - } else { - const e = Math.abs(l); - if (e <= 255) { - t |= l >= 0 ? 18 : 2; - r.push(e); - } else r.push(l); - } - s = c; - const h = a.yCoordinates[e]; - l = h - o; - if (0 === l) { - t |= 32; - n.push(0); - } else { - const e = Math.abs(l); - if (e <= 255) { - t |= l >= 0 ? 36 : 4; - n.push(e); - } else n.push(l); - } - o = h; - i.push(t); - } - t.setUint16(e, r.length - 1); - e += 2; - } - t.setUint16(e, this.instructions.length); - e += 2; - if (this.instructions.length) { - new Uint8Array(t.buffer, 0, t.buffer.byteLength).set( - this.instructions, - e, - ); - e += this.instructions.length; - } - for (const a of i) t.setUint8(e++, a); - for (let a = 0, n = r.length; a < n; a++) { - const n = r[a], - s = i[a]; - if (2 & s) t.setUint8(e++, n); - else if (!(16 & s)) { - t.setInt16(e, n); - e += 2; - } - } - for (let a = 0, r = n.length; a < r; a++) { - const r = n[a], - s = i[a]; - if (4 & s) t.setUint8(e++, r); - else if (!(32 & s)) { - t.setInt16(e, r); - e += 2; - } - } - return e - a; - } - scale(e, t) { - for (const a of this.contours) - if (0 !== a.xCoordinates.length) - for (let r = 0, n = a.xCoordinates.length; r < n; r++) - a.xCoordinates[r] = Math.round( - e + (a.xCoordinates[r] - e) * t, - ); - } - } - class CompositeGlyph { - constructor({ - flags: e, - glyphIndex: t, - argument1: a, - argument2: r, - transf: n, - instructions: i, - }) { - this.flags = e; - this.glyphIndex = t; - this.argument1 = a; - this.argument2 = r; - this.transf = n; - this.instructions = i; - } - static parse(e, t) { - const a = e, - r = []; - let n = t.getUint16(e); - const i = t.getUint16(e + 2); - e += 4; - let s, o; - if (1 & n) { - if (2 & n) { - s = t.getInt16(e); - o = t.getInt16(e + 2); - } else { - s = t.getUint16(e); - o = t.getUint16(e + 2); - } - e += 4; - n ^= 1; - } else { - if (2 & n) { - s = t.getInt8(e); - o = t.getInt8(e + 1); - } else { - s = t.getUint8(e); - o = t.getUint8(e + 1); - } - e += 2; - } - if (8 & n) { - r.push(t.getUint16(e)); - e += 2; - } else if (64 & n) { - r.push(t.getUint16(e), t.getUint16(e + 2)); - e += 4; - } else if (128 & n) { - r.push( - t.getUint16(e), - t.getUint16(e + 2), - t.getUint16(e + 4), - t.getUint16(e + 6), - ); - e += 8; - } - let c = null; - if (256 & n) { - const a = t.getUint16(e); - e += 2; - c = new Uint8Array(t).slice(e, e + a); - e += a; - } - return [ - e - a, - new CompositeGlyph({ - flags: n, - glyphIndex: i, - argument1: s, - argument2: o, - transf: r, - instructions: c, - }), - ]; - } - getSize() { - let e = 4 + 2 * this.transf.length; - 256 & this.flags && (e += 2 + this.instructions.length); - e += 2; - 2 & this.flags - ? (this.argument1 >= -128 && - this.argument1 <= 127 && - this.argument2 >= -128 && - this.argument2 <= 127) || - (e += 2) - : (this.argument1 >= 0 && - this.argument1 <= 255 && - this.argument2 >= 0 && - this.argument2 <= 255) || - (e += 2); - return e; - } - write(e, t) { - const a = e; - 2 & this.flags - ? (this.argument1 >= -128 && - this.argument1 <= 127 && - this.argument2 >= -128 && - this.argument2 <= 127) || - (this.flags |= 1) - : (this.argument1 >= 0 && - this.argument1 <= 255 && - this.argument2 >= 0 && - this.argument2 <= 255) || - (this.flags |= 1); - t.setUint16(e, this.flags); - t.setUint16(e + 2, this.glyphIndex); - e += 4; - if (1 & this.flags) { - if (2 & this.flags) { - t.setInt16(e, this.argument1); - t.setInt16(e + 2, this.argument2); - } else { - t.setUint16(e, this.argument1); - t.setUint16(e + 2, this.argument2); - } - e += 4; - } else { - t.setUint8(e, this.argument1); - t.setUint8(e + 1, this.argument2); - e += 2; - } - if (256 & this.flags) { - t.setUint16(e, this.instructions.length); - e += 2; - if (this.instructions.length) { - new Uint8Array(t.buffer, 0, t.buffer.byteLength).set( - this.instructions, - e, - ); - e += this.instructions.length; - } - } - return e - a; - } - scale(e, t) {} - } - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.OpenTypeFileBuilder = void 0; - var r = a(3), - n = a(2); - function writeInt16(e, t, a) { - e[t] = (a >> 8) & 255; - e[t + 1] = 255 & a; - } - function writeInt32(e, t, a) { - e[t] = (a >> 24) & 255; - e[t + 1] = (a >> 16) & 255; - e[t + 2] = (a >> 8) & 255; - e[t + 3] = 255 & a; - } - function writeData(e, t, a) { - if (a instanceof Uint8Array) e.set(a, t); - else if ("string" == typeof a) - for (let r = 0, n = a.length; r < n; r++) - e[t++] = 255 & a.charCodeAt(r); - else for (const r of a) e[t++] = 255 & r; - } - class OpenTypeFileBuilder { - constructor(e) { - this.sfnt = e; - this.tables = Object.create(null); - } - static getSearchParams(e, t) { - let a = 1, - r = 0; - for (; (a ^ e) > a; ) { - a <<= 1; - r++; - } - const n = a * t; - return { range: n, entry: r, rangeShift: t * e - n }; - } - toArray() { - let e = this.sfnt; - const t = this.tables, - a = Object.keys(t); - a.sort(); - const i = a.length; - let s, - o, - c, - l, - h, - u = 12 + 16 * i; - const d = [u]; - for (s = 0; s < i; s++) { - l = t[a[s]]; - u += ((l.length + 3) & -4) >>> 0; - d.push(u); - } - const f = new Uint8Array(u); - for (s = 0; s < i; s++) { - l = t[a[s]]; - writeData(f, d[s], l); - } - "true" === e && (e = (0, n.string32)(65536)); - f[0] = 255 & e.charCodeAt(0); - f[1] = 255 & e.charCodeAt(1); - f[2] = 255 & e.charCodeAt(2); - f[3] = 255 & e.charCodeAt(3); - writeInt16(f, 4, i); - const g = OpenTypeFileBuilder.getSearchParams(i, 16); - writeInt16(f, 6, g.range); - writeInt16(f, 8, g.entry); - writeInt16(f, 10, g.rangeShift); - u = 12; - for (s = 0; s < i; s++) { - h = a[s]; - f[u] = 255 & h.charCodeAt(0); - f[u + 1] = 255 & h.charCodeAt(1); - f[u + 2] = 255 & h.charCodeAt(2); - f[u + 3] = 255 & h.charCodeAt(3); - let e = 0; - for (o = d[s], c = d[s + 1]; o < c; o += 4) { - e = (e + (0, r.readUint32)(f, o)) >>> 0; - } - writeInt32(f, u + 4, e); - writeInt32(f, u + 8, d[s]); - writeInt32(f, u + 12, t[h].length); - u += 16; - } - return f; - } - addTable(e, t) { - if (e in this.tables) - throw new Error("Table " + e + " already exists"); - this.tables[e] = t; - } - } - t.OpenTypeFileBuilder = OpenTypeFileBuilder; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.Type1Font = void 0; - var r = a(35), - n = a(2), - i = a(38), - s = a(3), - o = a(8), - c = a(49); - function findBlock(e, t, a) { - const r = e.length, - n = t.length, - i = r - n; - let o = a, - c = !1; - for (; o < i; ) { - let a = 0; - for (; a < n && e[o + a] === t[a]; ) a++; - if (a >= n) { - o += a; - for (; o < r && (0, s.isWhiteSpace)(e[o]); ) o++; - c = !0; - break; - } - o++; - } - return { found: c, length: o }; - } - t.Type1Font = class Type1Font { - constructor(e, t, a) { - let r = a.length1, - s = a.length2, - l = t.peekBytes(6); - const h = 128 === l[0] && 1 === l[1]; - if (h) { - t.skip(6); - r = (l[5] << 24) | (l[4] << 16) | (l[3] << 8) | l[2]; - } - const u = (function getHeaderBlock(e, t) { - const a = [101, 101, 120, 101, 99], - r = e.pos; - let i, s, c, l; - try { - i = e.getBytes(t); - s = i.length; - } catch {} - if (s === t) { - c = findBlock(i, a, t - 2 * a.length); - if (c.found && c.length === t) - return { stream: new o.Stream(i), length: t }; - } - (0, n.warn)( - 'Invalid "Length1" property in Type1 font -- trying to recover.', - ); - e.pos = r; - for (;;) { - c = findBlock(e.peekBytes(2048), a, 0); - if (0 === c.length) break; - e.pos += c.length; - if (c.found) { - l = e.pos - r; - break; - } - } - e.pos = r; - if (l) - return { stream: new o.Stream(e.getBytes(l)), length: l }; - (0, n.warn)( - 'Unable to recover "Length1" property in Type1 font -- using as is.', - ); - return { stream: new o.Stream(e.getBytes(t)), length: t }; - })(t, r); - new c.Type1Parser( - u.stream, - !1, - i.SEAC_ANALYSIS_ENABLED, - ).extractFontHeader(a); - if (h) { - l = t.getBytes(6); - s = (l[5] << 24) | (l[4] << 16) | (l[3] << 8) | l[2]; - } - const d = (function getEexecBlock(e, t) { - const a = e.getBytes(); - if (0 === a.length) - throw new n.FormatError( - "getEexecBlock - no font program found.", - ); - return { stream: new o.Stream(a), length: a.length }; - })(t), - f = new c.Type1Parser( - d.stream, - !0, - i.SEAC_ANALYSIS_ENABLED, - ).extractFontProgram(a); - for (const e in f.properties) a[e] = f.properties[e]; - const g = f.charstrings, - p = this.getType2Charstrings(g), - m = this.getType2Subrs(f.subrs); - this.charstrings = g; - this.data = this.wrap(e, p, this.charstrings, m, a); - this.seacs = this.getSeacs(f.charstrings); - } - get numGlyphs() { - return this.charstrings.length + 1; - } - getCharset() { - const e = [".notdef"]; - for (const { glyphName: t } of this.charstrings) e.push(t); - return e; - } - getGlyphMapping(e) { - const t = this.charstrings; - if (e.composite) { - const a = Object.create(null); - for (let r = 0, n = t.length; r < n; r++) { - a[e.cMap.charCodeOf(r)] = r + 1; - } - return a; - } - const a = [".notdef"]; - let r, n; - for (n = 0; n < t.length; n++) a.push(t[n].glyphName); - const s = e.builtInEncoding; - if (s) { - r = Object.create(null); - for (const e in s) { - n = a.indexOf(s[e]); - n >= 0 && (r[e] = n); - } - } - return (0, i.type1FontGlyphMapping)(e, r, a); - } - hasGlyphId(e) { - if (e < 0 || e >= this.numGlyphs) return !1; - if (0 === e) return !0; - return this.charstrings[e - 1].charstring.length > 0; - } - getSeacs(e) { - const t = []; - for (let a = 0, r = e.length; a < r; a++) { - const r = e[a]; - r.seac && (t[a + 1] = r.seac); - } - return t; - } - getType2Charstrings(e) { - const t = []; - for (const a of e) t.push(a.charstring); - return t; - } - getType2Subrs(e) { - let t = 0; - const a = e.length; - t = a < 1133 ? 107 : a < 33769 ? 1131 : 32768; - const r = []; - let n; - for (n = 0; n < t; n++) r.push([11]); - for (n = 0; n < a; n++) r.push(e[n]); - return r; - } - wrap(e, t, a, n, i) { - const s = new r.CFF(); - s.header = new r.CFFHeader(1, 0, 4, 4); - s.names = [e]; - const o = new r.CFFTopDict(); - o.setByName("version", 391); - o.setByName("Notice", 392); - o.setByName("FullName", 393); - o.setByName("FamilyName", 394); - o.setByName("Weight", 395); - o.setByName("Encoding", null); - o.setByName("FontMatrix", i.fontMatrix); - o.setByName("FontBBox", i.bbox); - o.setByName("charset", null); - o.setByName("CharStrings", null); - o.setByName("Private", null); - s.topDict = o; - const c = new r.CFFStrings(); - c.add("Version 0.11"); - c.add("See original notice"); - c.add(e); - c.add(e); - c.add("Medium"); - s.strings = c; - s.globalSubrIndex = new r.CFFIndex(); - const l = t.length, - h = [".notdef"]; - let u, d; - for (u = 0; u < l; u++) { - const e = a[u].glyphName; - -1 === r.CFFStandardStrings.indexOf(e) && c.add(e); - h.push(e); - } - s.charset = new r.CFFCharset(!1, 0, h); - const f = new r.CFFIndex(); - f.add([139, 14]); - for (u = 0; u < l; u++) f.add(t[u]); - s.charStrings = f; - const g = new r.CFFPrivateDict(); - g.setByName("Subrs", null); - const p = [ - "BlueValues", - "OtherBlues", - "FamilyBlues", - "FamilyOtherBlues", - "StemSnapH", - "StemSnapV", - "BlueShift", - "BlueFuzz", - "BlueScale", - "LanguageGroup", - "ExpansionFactor", - "ForceBold", - "StdHW", - "StdVW", - ]; - for (u = 0, d = p.length; u < d; u++) { - const e = p[u]; - if (!(e in i.privateData)) continue; - const t = i.privateData[e]; - if (Array.isArray(t)) - for (let e = t.length - 1; e > 0; e--) t[e] -= t[e - 1]; - g.setByName(e, t); - } - s.topDict.privateDict = g; - const m = new r.CFFIndex(); - for (u = 0, d = n.length; u < d; u++) m.add(n[u]); - g.subrsIndex = m; - return new r.CFFCompiler(s).compile(); - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.Type1Parser = void 0; - var r = a(37), - n = a(3), - i = a(8), - s = a(2); - const o = [4], - c = [5], - l = [6], - h = [7], - u = [8], - d = [12, 35], - f = [14], - g = [21], - p = [22], - m = [30], - b = [31]; - class Type1CharString { - constructor() { - this.width = 0; - this.lsb = 0; - this.flexing = !1; - this.output = []; - this.stack = []; - } - convert(e, t, a) { - const r = e.length; - let n, - i, - y, - w = !1; - for (let S = 0; S < r; S++) { - let r = e[S]; - if (r < 32) { - 12 === r && (r = (r << 8) + e[++S]); - switch (r) { - case 1: - case 3: - case 9: - case 3072: - case 3073: - case 3074: - case 3105: - this.stack = []; - break; - case 4: - if (this.flexing) { - if (this.stack.length < 1) { - w = !0; - break; - } - const e = this.stack.pop(); - this.stack.push(0, e); - break; - } - w = this.executeCommand(1, o); - break; - case 5: - w = this.executeCommand(2, c); - break; - case 6: - w = this.executeCommand(1, l); - break; - case 7: - w = this.executeCommand(1, h); - break; - case 8: - w = this.executeCommand(6, u); - break; - case 10: - if (this.stack.length < 1) { - w = !0; - break; - } - y = this.stack.pop(); - if (!t[y]) { - w = !0; - break; - } - w = this.convert(t[y], t, a); - break; - case 11: - return w; - case 13: - if (this.stack.length < 2) { - w = !0; - break; - } - n = this.stack.pop(); - i = this.stack.pop(); - this.lsb = i; - this.width = n; - this.stack.push(n, i); - w = this.executeCommand(2, p); - break; - case 14: - this.output.push(f[0]); - break; - case 21: - if (this.flexing) break; - w = this.executeCommand(2, g); - break; - case 22: - if (this.flexing) { - this.stack.push(0); - break; - } - w = this.executeCommand(1, p); - break; - case 30: - w = this.executeCommand(4, m); - break; - case 31: - w = this.executeCommand(4, b); - break; - case 3078: - if (a) { - const e = this.stack.at(-5); - this.seac = this.stack.splice(-4, 4); - this.seac[0] += this.lsb - e; - w = this.executeCommand(0, f); - } else w = this.executeCommand(4, f); - break; - case 3079: - if (this.stack.length < 4) { - w = !0; - break; - } - this.stack.pop(); - n = this.stack.pop(); - const e = this.stack.pop(); - i = this.stack.pop(); - this.lsb = i; - this.width = n; - this.stack.push(n, i, e); - w = this.executeCommand(3, g); - break; - case 3084: - if (this.stack.length < 2) { - w = !0; - break; - } - const S = this.stack.pop(), - x = this.stack.pop(); - this.stack.push(x / S); - break; - case 3088: - if (this.stack.length < 2) { - w = !0; - break; - } - y = this.stack.pop(); - const C = this.stack.pop(); - if (0 === y && 3 === C) { - const e = this.stack.splice(-17, 17); - this.stack.push( - e[2] + e[0], - e[3] + e[1], - e[4], - e[5], - e[6], - e[7], - e[8], - e[9], - e[10], - e[11], - e[12], - e[13], - e[14], - ); - w = this.executeCommand(13, d, !0); - this.flexing = !1; - this.stack.push(e[15], e[16]); - } else 1 === y && 0 === C && (this.flexing = !0); - break; - case 3089: - break; - default: - (0, s.warn)( - 'Unknown type 1 charstring command of "' + r + '"', - ); - } - if (w) break; - } else { - r <= 246 - ? (r -= 139) - : (r = - r <= 250 - ? 256 * (r - 247) + e[++S] + 108 - : r <= 254 - ? -256 * (r - 251) - e[++S] - 108 - : ((255 & e[++S]) << 24) | - ((255 & e[++S]) << 16) | - ((255 & e[++S]) << 8) | - ((255 & e[++S]) << 0)); - this.stack.push(r); - } - } - return w; - } - executeCommand(e, t, a) { - const r = this.stack.length; - if (e > r) return !0; - const n = r - e; - for (let e = n; e < r; e++) { - let t = this.stack[e]; - if (Number.isInteger(t)) - this.output.push(28, (t >> 8) & 255, 255 & t); - else { - t = (65536 * t) | 0; - this.output.push( - 255, - (t >> 24) & 255, - (t >> 16) & 255, - (t >> 8) & 255, - 255 & t, - ); - } - } - this.output.push(...t); - a ? this.stack.splice(n, e) : (this.stack.length = 0); - return !1; - } - } - function isHexDigit(e) { - return ( - (e >= 48 && e <= 57) || - (e >= 65 && e <= 70) || - (e >= 97 && e <= 102) - ); - } - function decrypt(e, t, a) { - if (a >= e.length) return new Uint8Array(0); - let r, - n, - i = 0 | t; - for (r = 0; r < a; r++) i = (52845 * (e[r] + i) + 22719) & 65535; - const s = e.length - a, - o = new Uint8Array(s); - for (r = a, n = 0; n < s; r++, n++) { - const t = e[r]; - o[n] = t ^ (i >> 8); - i = (52845 * (t + i) + 22719) & 65535; - } - return o; - } - function isSpecial(e) { - return ( - 47 === e || - 91 === e || - 93 === e || - 123 === e || - 125 === e || - 40 === e || - 41 === e - ); - } - t.Type1Parser = class Type1Parser { - constructor(e, t, a) { - if (t) { - const t = e.getBytes(), - a = !( - (isHexDigit(t[0]) || (0, n.isWhiteSpace)(t[0])) && - isHexDigit(t[1]) && - isHexDigit(t[2]) && - isHexDigit(t[3]) && - isHexDigit(t[4]) && - isHexDigit(t[5]) && - isHexDigit(t[6]) && - isHexDigit(t[7]) - ); - e = new i.Stream( - a - ? decrypt(t, 55665, 4) - : (function decryptAscii(e, t, a) { - let r = 0 | t; - const n = e.length, - i = new Uint8Array(n >>> 1); - let s, o; - for (s = 0, o = 0; s < n; s++) { - const t = e[s]; - if (!isHexDigit(t)) continue; - s++; - let a; - for (; s < n && !isHexDigit((a = e[s])); ) s++; - if (s < n) { - const e = parseInt(String.fromCharCode(t, a), 16); - i[o++] = e ^ (r >> 8); - r = (52845 * (e + r) + 22719) & 65535; - } - } - return i.slice(a, o); - })(t, 55665, 4), - ); - } - this.seacAnalysisEnabled = !!a; - this.stream = e; - this.nextChar(); - } - readNumberArray() { - this.getToken(); - const e = []; - for (;;) { - const t = this.getToken(); - if (null === t || "]" === t || "}" === t) break; - e.push(parseFloat(t || 0)); - } - return e; - } - readNumber() { - const e = this.getToken(); - return parseFloat(e || 0); - } - readInt() { - const e = this.getToken(); - return 0 | parseInt(e || 0, 10); - } - readBoolean() { - return "true" === this.getToken() ? 1 : 0; - } - nextChar() { - return (this.currentChar = this.stream.getByte()); - } - prevChar() { - this.stream.skip(-2); - return (this.currentChar = this.stream.getByte()); - } - getToken() { - let e = !1, - t = this.currentChar; - for (;;) { - if (-1 === t) return null; - if (e) (10 !== t && 13 !== t) || (e = !1); - else if (37 === t) e = !0; - else if (!(0, n.isWhiteSpace)(t)) break; - t = this.nextChar(); - } - if (isSpecial(t)) { - this.nextChar(); - return String.fromCharCode(t); - } - let a = ""; - do { - a += String.fromCharCode(t); - t = this.nextChar(); - } while (t >= 0 && !(0, n.isWhiteSpace)(t) && !isSpecial(t)); - return a; - } - readCharStrings(e, t) { - return -1 === t ? e : decrypt(e, 4330, t); - } - extractFontProgram(e) { - const t = this.stream, - a = [], - r = [], - n = Object.create(null); - n.lenIV = 4; - const i = { - subrs: [], - charstrings: [], - properties: { privateData: n }, - }; - let s, o, c, l; - for (; null !== (s = this.getToken()); ) - if ("/" === s) { - s = this.getToken(); - switch (s) { - case "CharStrings": - this.getToken(); - this.getToken(); - this.getToken(); - this.getToken(); - for (;;) { - s = this.getToken(); - if (null === s || "end" === s) break; - if ("/" !== s) continue; - const e = this.getToken(); - o = this.readInt(); - this.getToken(); - c = o > 0 ? t.getBytes(o) : new Uint8Array(0); - l = i.properties.privateData.lenIV; - const a = this.readCharStrings(c, l); - this.nextChar(); - s = this.getToken(); - "noaccess" === s - ? this.getToken() - : "/" === s && this.prevChar(); - r.push({ glyph: e, encoded: a }); - } - break; - case "Subrs": - this.readInt(); - this.getToken(); - for (; "dup" === this.getToken(); ) { - const e = this.readInt(); - o = this.readInt(); - this.getToken(); - c = o > 0 ? t.getBytes(o) : new Uint8Array(0); - l = i.properties.privateData.lenIV; - const r = this.readCharStrings(c, l); - this.nextChar(); - s = this.getToken(); - "noaccess" === s && this.getToken(); - a[e] = r; - } - break; - case "BlueValues": - case "OtherBlues": - case "FamilyBlues": - case "FamilyOtherBlues": - const e = this.readNumberArray(); - e.length > 0 && e.length, 0; - break; - case "StemSnapH": - case "StemSnapV": - i.properties.privateData[s] = this.readNumberArray(); - break; - case "StdHW": - case "StdVW": - i.properties.privateData[s] = this.readNumberArray()[0]; - break; - case "BlueShift": - case "lenIV": - case "BlueFuzz": - case "BlueScale": - case "LanguageGroup": - i.properties.privateData[s] = this.readNumber(); - break; - case "ExpansionFactor": - i.properties.privateData[s] = this.readNumber() || 0.06; - break; - case "ForceBold": - i.properties.privateData[s] = this.readBoolean(); - } - } - for (const { encoded: t, glyph: n } of r) { - const r = new Type1CharString(), - s = r.convert(t, a, this.seacAnalysisEnabled); - let o = r.output; - s && (o = [14]); - const c = { - glyphName: n, - charstring: o, - width: r.width, - lsb: r.lsb, - seac: r.seac, - }; - ".notdef" === n - ? i.charstrings.unshift(c) - : i.charstrings.push(c); - if (e.builtInEncoding) { - const t = e.builtInEncoding.indexOf(n); - t > -1 && - void 0 === e.widths[t] && - t >= e.firstChar && - t <= e.lastChar && - (e.widths[t] = r.width); - } - } - return i; - } - extractFontHeader(e) { - let t; - for (; null !== (t = this.getToken()); ) - if ("/" === t) { - t = this.getToken(); - switch (t) { - case "FontMatrix": - const a = this.readNumberArray(); - e.fontMatrix = a; - break; - case "Encoding": - const n = this.getToken(); - let i; - if (/^\d+$/.test(n)) { - i = []; - const e = 0 | parseInt(n, 10); - this.getToken(); - for (let a = 0; a < e; a++) { - t = this.getToken(); - for (; "dup" !== t && "def" !== t; ) { - t = this.getToken(); - if (null === t) return; - } - if ("def" === t) break; - const e = this.readInt(); - this.getToken(); - const a = this.getToken(); - i[e] = a; - this.getToken(); - } - } else i = (0, r.getEncoding)(n); - e.builtInEncoding = i; - break; - case "FontBBox": - const s = this.readNumberArray(); - e.ascent = Math.max(s[3], s[1]); - e.descent = Math.min(s[1], s[3]); - e.ascentScaled = !0; - } - } - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.Pattern = void 0; - t.clearPatternCaches = function clearPatternCaches() { - f = Object.create(null); - }; - t.getTilingPatternIR = function getTilingPatternIR(e, t, a) { - const n = t.getArray("Matrix"), - i = r.Util.normalizeRect(t.getArray("BBox")), - s = t.get("XStep"), - o = t.get("YStep"), - c = t.get("PaintType"), - l = t.get("TilingType"); - if (i[2] - i[0] == 0 || i[3] - i[1] == 0) - throw new r.FormatError( - `Invalid getTilingPatternIR /BBox array: [${i}].`, - ); - return ["TilingPattern", a, e, n, i, s, o, c, l]; - }; - var r = a(2), - n = a(5), - i = a(12), - s = a(3); - const o = 2, - c = 3, - l = 4, - h = 5, - u = 6, - d = 7; - t.Pattern = class Pattern { - constructor() { - (0, r.unreachable)("Cannot initialize Pattern."); - } - static parseShading(e, t, a, i, f) { - const g = e instanceof n.BaseStream ? e.dict : e, - p = g.get("ShadingType"); - try { - switch (p) { - case o: - case c: - return new RadialAxialShading(g, t, a, i, f); - case l: - case h: - case u: - case d: - return new MeshShading(e, t, a, i, f); - default: - throw new r.FormatError("Unsupported ShadingType: " + p); - } - } catch (e) { - if (e instanceof s.MissingDataException) throw e; - (0, r.warn)(e); - return new DummyShading(); - } - } - }; - class BaseShading { - static SMALL_NUMBER = 1e-6; - constructor() { - this.constructor === BaseShading && - (0, r.unreachable)("Cannot initialize BaseShading."); - } - getIR() { - (0, r.unreachable)("Abstract method `getIR` called."); - } - } - class RadialAxialShading extends BaseShading { - constructor(e, t, a, n, s) { - super(); - this.coordsArr = e.getArray("Coords"); - this.shadingType = e.get("ShadingType"); - const o = i.ColorSpace.parse({ - cs: e.getRaw("CS") || e.getRaw("ColorSpace"), - xref: t, - resources: a, - pdfFunctionFactory: n, - localColorSpaceCache: s, - }), - l = e.getArray("BBox"); - this.bbox = - Array.isArray(l) && 4 === l.length - ? r.Util.normalizeRect(l) - : null; - let h = 0, - u = 1; - if (e.has("Domain")) { - const t = e.getArray("Domain"); - h = t[0]; - u = t[1]; - } - let d = !1, - f = !1; - if (e.has("Extend")) { - const t = e.getArray("Extend"); - d = t[0]; - f = t[1]; - } - if (!(this.shadingType !== c || (d && f))) { - const [e, t, a, n, i, s] = this.coordsArr, - o = Math.hypot(e - n, t - i); - a <= s + o && - s <= a + o && - (0, r.warn)("Unsupported radial gradient."); - } - this.extendStart = d; - this.extendEnd = f; - const g = e.getRaw("Function"), - p = n.createFromArray(g), - m = (u - h) / 840, - b = (this.colorStops = []); - if (h >= u || m <= 0) { - (0, r.info)("Bad shading domain."); - return; - } - const y = new Float32Array(o.numComps), - w = new Float32Array(1); - let S, - x = 0; - w[0] = h; - p(w, 0, y, 0); - let C = o.getRgb(y, 0); - const k = r.Util.makeHexColor(C[0], C[1], C[2]); - b.push([0, k]); - let v = 1; - w[0] = h + m; - p(w, 0, y, 0); - let F = o.getRgb(y, 0), - O = F[0] - C[0] + 1, - T = F[1] - C[1] + 1, - M = F[2] - C[2] + 1, - D = F[0] - C[0] - 1, - E = F[1] - C[1] - 1, - N = F[2] - C[2] - 1; - for (let e = 2; e < 840; e++) { - w[0] = h + e * m; - p(w, 0, y, 0); - S = o.getRgb(y, 0); - const t = e - x; - O = Math.min(O, (S[0] - C[0] + 1) / t); - T = Math.min(T, (S[1] - C[1] + 1) / t); - M = Math.min(M, (S[2] - C[2] + 1) / t); - D = Math.max(D, (S[0] - C[0] - 1) / t); - E = Math.max(E, (S[1] - C[1] - 1) / t); - N = Math.max(N, (S[2] - C[2] - 1) / t); - if (!(D <= O && E <= T && N <= M)) { - const e = r.Util.makeHexColor(F[0], F[1], F[2]); - b.push([v / 840, e]); - O = S[0] - F[0] + 1; - T = S[1] - F[1] + 1; - M = S[2] - F[2] + 1; - D = S[0] - F[0] - 1; - E = S[1] - F[1] - 1; - N = S[2] - F[2] - 1; - x = v; - C = F; - } - v = e; - F = S; - } - const R = r.Util.makeHexColor(F[0], F[1], F[2]); - b.push([1, R]); - let L = "transparent"; - if (e.has("Background")) { - S = o.getRgb(e.get("Background"), 0); - L = r.Util.makeHexColor(S[0], S[1], S[2]); - } - if (!d) { - b.unshift([0, L]); - b[1][0] += BaseShading.SMALL_NUMBER; - } - if (!f) { - b.at(-1)[0] -= BaseShading.SMALL_NUMBER; - b.push([1, L]); - } - this.colorStops = b; - } - getIR() { - const e = this.coordsArr, - t = this.shadingType; - let a, n, i, s, l; - if (t === o) { - n = [e[0], e[1]]; - i = [e[2], e[3]]; - s = null; - l = null; - a = "axial"; - } else if (t === c) { - n = [e[0], e[1]]; - i = [e[3], e[4]]; - s = e[2]; - l = e[5]; - a = "radial"; - } else (0, r.unreachable)(`getPattern type unknown: ${t}`); - return ["RadialAxial", a, this.bbox, this.colorStops, n, i, s, l]; - } - } - class MeshStreamReader { - constructor(e, t) { - this.stream = e; - this.context = t; - this.buffer = 0; - this.bufferLength = 0; - const a = t.numComps; - this.tmpCompsBuf = new Float32Array(a); - const r = t.colorSpace.numComps; - this.tmpCsCompsBuf = t.colorFn - ? new Float32Array(r) - : this.tmpCompsBuf; - } - get hasData() { - if (this.stream.end) return this.stream.pos < this.stream.end; - if (this.bufferLength > 0) return !0; - const e = this.stream.getByte(); - if (e < 0) return !1; - this.buffer = e; - this.bufferLength = 8; - return !0; - } - readBits(e) { - let t = this.buffer, - a = this.bufferLength; - if (32 === e) { - if (0 === a) - return ( - ((this.stream.getByte() << 24) | - (this.stream.getByte() << 16) | - (this.stream.getByte() << 8) | - this.stream.getByte()) >>> - 0 - ); - t = - (t << 24) | - (this.stream.getByte() << 16) | - (this.stream.getByte() << 8) | - this.stream.getByte(); - const e = this.stream.getByte(); - this.buffer = e & ((1 << a) - 1); - return ((t << (8 - a)) | ((255 & e) >> a)) >>> 0; - } - if (8 === e && 0 === a) return this.stream.getByte(); - for (; a < e; ) { - t = (t << 8) | this.stream.getByte(); - a += 8; - } - a -= e; - this.bufferLength = a; - this.buffer = t & ((1 << a) - 1); - return t >> a; - } - align() { - this.buffer = 0; - this.bufferLength = 0; - } - readFlag() { - return this.readBits(this.context.bitsPerFlag); - } - readCoordinate() { - const e = this.context.bitsPerCoordinate, - t = this.readBits(e), - a = this.readBits(e), - r = this.context.decode, - n = e < 32 ? 1 / ((1 << e) - 1) : 2.3283064365386963e-10; - return [ - t * n * (r[1] - r[0]) + r[0], - a * n * (r[3] - r[2]) + r[2], - ]; - } - readComponents() { - const e = this.context.numComps, - t = this.context.bitsPerComponent, - a = t < 32 ? 1 / ((1 << t) - 1) : 2.3283064365386963e-10, - r = this.context.decode, - n = this.tmpCompsBuf; - for (let i = 0, s = 4; i < e; i++, s += 2) { - const e = this.readBits(t); - n[i] = e * a * (r[s + 1] - r[s]) + r[s]; - } - const i = this.tmpCsCompsBuf; - this.context.colorFn && this.context.colorFn(n, 0, i, 0); - return this.context.colorSpace.getRgb(i, 0); - } - } - let f = Object.create(null); - function getB(e) { - return (f[e] ||= (function buildB(e) { - const t = []; - for (let a = 0; a <= e; a++) { - const r = a / e, - n = 1 - r; - t.push( - new Float32Array([ - n ** 3, - 3 * r * n ** 2, - 3 * r ** 2 * n, - r ** 3, - ]), - ); - } - return t; - })(e)); - } - class MeshShading extends BaseShading { - static MIN_SPLIT_PATCH_CHUNKS_AMOUNT = 3; - static MAX_SPLIT_PATCH_CHUNKS_AMOUNT = 20; - static TRIANGLE_DENSITY = 20; - constructor(e, t, a, s, o) { - super(); - if (!(e instanceof n.BaseStream)) - throw new r.FormatError("Mesh data is not a stream"); - const c = e.dict; - this.shadingType = c.get("ShadingType"); - const f = c.getArray("BBox"); - this.bbox = - Array.isArray(f) && 4 === f.length - ? r.Util.normalizeRect(f) - : null; - const g = i.ColorSpace.parse({ - cs: c.getRaw("CS") || c.getRaw("ColorSpace"), - xref: t, - resources: a, - pdfFunctionFactory: s, - localColorSpaceCache: o, - }); - this.background = c.has("Background") - ? g.getRgb(c.get("Background"), 0) - : null; - const p = c.getRaw("Function"), - m = p ? s.createFromArray(p) : null; - this.coords = []; - this.colors = []; - this.figures = []; - const b = { - bitsPerCoordinate: c.get("BitsPerCoordinate"), - bitsPerComponent: c.get("BitsPerComponent"), - bitsPerFlag: c.get("BitsPerFlag"), - decode: c.getArray("Decode"), - colorFn: m, - colorSpace: g, - numComps: m ? 1 : g.numComps, - }, - y = new MeshStreamReader(e, b); - let w = !1; - switch (this.shadingType) { - case l: - this._decodeType4Shading(y); - break; - case h: - const e = 0 | c.get("VerticesPerRow"); - if (e < 2) throw new r.FormatError("Invalid VerticesPerRow"); - this._decodeType5Shading(y, e); - break; - case u: - this._decodeType6Shading(y); - w = !0; - break; - case d: - this._decodeType7Shading(y); - w = !0; - break; - default: - (0, r.unreachable)("Unsupported mesh type."); - } - if (w) { - this._updateBounds(); - for (let e = 0, t = this.figures.length; e < t; e++) - this._buildFigureFromPatch(e); - } - this._updateBounds(); - this._packData(); - } - _decodeType4Shading(e) { - const t = this.coords, - a = this.colors, - n = [], - i = []; - let s = 0; - for (; e.hasData; ) { - const o = e.readFlag(), - c = e.readCoordinate(), - l = e.readComponents(); - if (0 === s) { - if (!(0 <= o && o <= 2)) - throw new r.FormatError("Unknown type4 flag"); - switch (o) { - case 0: - s = 3; - break; - case 1: - i.push(i.at(-2), i.at(-1)); - s = 1; - break; - case 2: - i.push(i.at(-3), i.at(-1)); - s = 1; - } - n.push(o); - } - i.push(t.length); - t.push(c); - a.push(l); - s--; - e.align(); - } - this.figures.push({ - type: "triangles", - coords: new Int32Array(i), - colors: new Int32Array(i), - }); - } - _decodeType5Shading(e, t) { - const a = this.coords, - r = this.colors, - n = []; - for (; e.hasData; ) { - const t = e.readCoordinate(), - i = e.readComponents(); - n.push(a.length); - a.push(t); - r.push(i); - } - this.figures.push({ - type: "lattice", - coords: new Int32Array(n), - colors: new Int32Array(n), - verticesPerRow: t, - }); - } - _decodeType6Shading(e) { - const t = this.coords, - a = this.colors, - n = new Int32Array(16), - i = new Int32Array(4); - for (; e.hasData; ) { - const s = e.readFlag(); - if (!(0 <= s && s <= 3)) - throw new r.FormatError("Unknown type6 flag"); - const o = t.length; - for (let a = 0, r = 0 !== s ? 8 : 12; a < r; a++) - t.push(e.readCoordinate()); - const c = a.length; - for (let t = 0, r = 0 !== s ? 2 : 4; t < r; t++) - a.push(e.readComponents()); - let l, h, u, d; - switch (s) { - case 0: - n[12] = o + 3; - n[13] = o + 4; - n[14] = o + 5; - n[15] = o + 6; - n[8] = o + 2; - n[11] = o + 7; - n[4] = o + 1; - n[7] = o + 8; - n[0] = o; - n[1] = o + 11; - n[2] = o + 10; - n[3] = o + 9; - i[2] = c + 1; - i[3] = c + 2; - i[0] = c; - i[1] = c + 3; - break; - case 1: - l = n[12]; - h = n[13]; - u = n[14]; - d = n[15]; - n[12] = d; - n[13] = o + 0; - n[14] = o + 1; - n[15] = o + 2; - n[8] = u; - n[11] = o + 3; - n[4] = h; - n[7] = o + 4; - n[0] = l; - n[1] = o + 7; - n[2] = o + 6; - n[3] = o + 5; - l = i[2]; - h = i[3]; - i[2] = h; - i[3] = c; - i[0] = l; - i[1] = c + 1; - break; - case 2: - l = n[15]; - h = n[11]; - n[12] = n[3]; - n[13] = o + 0; - n[14] = o + 1; - n[15] = o + 2; - n[8] = n[7]; - n[11] = o + 3; - n[4] = h; - n[7] = o + 4; - n[0] = l; - n[1] = o + 7; - n[2] = o + 6; - n[3] = o + 5; - l = i[3]; - i[2] = i[1]; - i[3] = c; - i[0] = l; - i[1] = c + 1; - break; - case 3: - n[12] = n[0]; - n[13] = o + 0; - n[14] = o + 1; - n[15] = o + 2; - n[8] = n[1]; - n[11] = o + 3; - n[4] = n[2]; - n[7] = o + 4; - n[0] = n[3]; - n[1] = o + 7; - n[2] = o + 6; - n[3] = o + 5; - i[2] = i[0]; - i[3] = c; - i[0] = i[1]; - i[1] = c + 1; - } - n[5] = t.length; - t.push([ - (-4 * t[n[0]][0] - - t[n[15]][0] + - 6 * (t[n[4]][0] + t[n[1]][0]) - - 2 * (t[n[12]][0] + t[n[3]][0]) + - 3 * (t[n[13]][0] + t[n[7]][0])) / - 9, - (-4 * t[n[0]][1] - - t[n[15]][1] + - 6 * (t[n[4]][1] + t[n[1]][1]) - - 2 * (t[n[12]][1] + t[n[3]][1]) + - 3 * (t[n[13]][1] + t[n[7]][1])) / - 9, - ]); - n[6] = t.length; - t.push([ - (-4 * t[n[3]][0] - - t[n[12]][0] + - 6 * (t[n[2]][0] + t[n[7]][0]) - - 2 * (t[n[0]][0] + t[n[15]][0]) + - 3 * (t[n[4]][0] + t[n[14]][0])) / - 9, - (-4 * t[n[3]][1] - - t[n[12]][1] + - 6 * (t[n[2]][1] + t[n[7]][1]) - - 2 * (t[n[0]][1] + t[n[15]][1]) + - 3 * (t[n[4]][1] + t[n[14]][1])) / - 9, - ]); - n[9] = t.length; - t.push([ - (-4 * t[n[12]][0] - - t[n[3]][0] + - 6 * (t[n[8]][0] + t[n[13]][0]) - - 2 * (t[n[0]][0] + t[n[15]][0]) + - 3 * (t[n[11]][0] + t[n[1]][0])) / - 9, - (-4 * t[n[12]][1] - - t[n[3]][1] + - 6 * (t[n[8]][1] + t[n[13]][1]) - - 2 * (t[n[0]][1] + t[n[15]][1]) + - 3 * (t[n[11]][1] + t[n[1]][1])) / - 9, - ]); - n[10] = t.length; - t.push([ - (-4 * t[n[15]][0] - - t[n[0]][0] + - 6 * (t[n[11]][0] + t[n[14]][0]) - - 2 * (t[n[12]][0] + t[n[3]][0]) + - 3 * (t[n[2]][0] + t[n[8]][0])) / - 9, - (-4 * t[n[15]][1] - - t[n[0]][1] + - 6 * (t[n[11]][1] + t[n[14]][1]) - - 2 * (t[n[12]][1] + t[n[3]][1]) + - 3 * (t[n[2]][1] + t[n[8]][1])) / - 9, - ]); - this.figures.push({ - type: "patch", - coords: new Int32Array(n), - colors: new Int32Array(i), - }); - } - } - _decodeType7Shading(e) { - const t = this.coords, - a = this.colors, - n = new Int32Array(16), - i = new Int32Array(4); - for (; e.hasData; ) { - const s = e.readFlag(); - if (!(0 <= s && s <= 3)) - throw new r.FormatError("Unknown type7 flag"); - const o = t.length; - for (let a = 0, r = 0 !== s ? 12 : 16; a < r; a++) - t.push(e.readCoordinate()); - const c = a.length; - for (let t = 0, r = 0 !== s ? 2 : 4; t < r; t++) - a.push(e.readComponents()); - let l, h, u, d; - switch (s) { - case 0: - n[12] = o + 3; - n[13] = o + 4; - n[14] = o + 5; - n[15] = o + 6; - n[8] = o + 2; - n[9] = o + 13; - n[10] = o + 14; - n[11] = o + 7; - n[4] = o + 1; - n[5] = o + 12; - n[6] = o + 15; - n[7] = o + 8; - n[0] = o; - n[1] = o + 11; - n[2] = o + 10; - n[3] = o + 9; - i[2] = c + 1; - i[3] = c + 2; - i[0] = c; - i[1] = c + 3; - break; - case 1: - l = n[12]; - h = n[13]; - u = n[14]; - d = n[15]; - n[12] = d; - n[13] = o + 0; - n[14] = o + 1; - n[15] = o + 2; - n[8] = u; - n[9] = o + 9; - n[10] = o + 10; - n[11] = o + 3; - n[4] = h; - n[5] = o + 8; - n[6] = o + 11; - n[7] = o + 4; - n[0] = l; - n[1] = o + 7; - n[2] = o + 6; - n[3] = o + 5; - l = i[2]; - h = i[3]; - i[2] = h; - i[3] = c; - i[0] = l; - i[1] = c + 1; - break; - case 2: - l = n[15]; - h = n[11]; - n[12] = n[3]; - n[13] = o + 0; - n[14] = o + 1; - n[15] = o + 2; - n[8] = n[7]; - n[9] = o + 9; - n[10] = o + 10; - n[11] = o + 3; - n[4] = h; - n[5] = o + 8; - n[6] = o + 11; - n[7] = o + 4; - n[0] = l; - n[1] = o + 7; - n[2] = o + 6; - n[3] = o + 5; - l = i[3]; - i[2] = i[1]; - i[3] = c; - i[0] = l; - i[1] = c + 1; - break; - case 3: - n[12] = n[0]; - n[13] = o + 0; - n[14] = o + 1; - n[15] = o + 2; - n[8] = n[1]; - n[9] = o + 9; - n[10] = o + 10; - n[11] = o + 3; - n[4] = n[2]; - n[5] = o + 8; - n[6] = o + 11; - n[7] = o + 4; - n[0] = n[3]; - n[1] = o + 7; - n[2] = o + 6; - n[3] = o + 5; - i[2] = i[0]; - i[3] = c; - i[0] = i[1]; - i[1] = c + 1; - } - this.figures.push({ - type: "patch", - coords: new Int32Array(n), - colors: new Int32Array(i), - }); - } - } - _buildFigureFromPatch(e) { - const t = this.figures[e]; - (0, r.assert)("patch" === t.type, "Unexpected patch mesh figure"); - const a = this.coords, - n = this.colors, - i = t.coords, - s = t.colors, - o = Math.min(a[i[0]][0], a[i[3]][0], a[i[12]][0], a[i[15]][0]), - c = Math.min(a[i[0]][1], a[i[3]][1], a[i[12]][1], a[i[15]][1]), - l = Math.max(a[i[0]][0], a[i[3]][0], a[i[12]][0], a[i[15]][0]), - h = Math.max(a[i[0]][1], a[i[3]][1], a[i[12]][1], a[i[15]][1]); - let u = Math.ceil( - ((l - o) * MeshShading.TRIANGLE_DENSITY) / - (this.bounds[2] - this.bounds[0]), - ); - u = Math.max( - MeshShading.MIN_SPLIT_PATCH_CHUNKS_AMOUNT, - Math.min(MeshShading.MAX_SPLIT_PATCH_CHUNKS_AMOUNT, u), - ); - let d = Math.ceil( - ((h - c) * MeshShading.TRIANGLE_DENSITY) / - (this.bounds[3] - this.bounds[1]), - ); - d = Math.max( - MeshShading.MIN_SPLIT_PATCH_CHUNKS_AMOUNT, - Math.min(MeshShading.MAX_SPLIT_PATCH_CHUNKS_AMOUNT, d), - ); - const f = u + 1, - g = new Int32Array((d + 1) * f), - p = new Int32Array((d + 1) * f); - let m = 0; - const b = new Uint8Array(3), - y = new Uint8Array(3), - w = n[s[0]], - S = n[s[1]], - x = n[s[2]], - C = n[s[3]], - k = getB(d), - v = getB(u); - for (let e = 0; e <= d; e++) { - b[0] = ((w[0] * (d - e) + x[0] * e) / d) | 0; - b[1] = ((w[1] * (d - e) + x[1] * e) / d) | 0; - b[2] = ((w[2] * (d - e) + x[2] * e) / d) | 0; - y[0] = ((S[0] * (d - e) + C[0] * e) / d) | 0; - y[1] = ((S[1] * (d - e) + C[1] * e) / d) | 0; - y[2] = ((S[2] * (d - e) + C[2] * e) / d) | 0; - for (let t = 0; t <= u; t++, m++) { - if (!((0 !== e && e !== d) || (0 !== t && t !== u))) continue; - let r = 0, - s = 0, - o = 0; - for (let n = 0; n <= 3; n++) - for (let c = 0; c <= 3; c++, o++) { - const l = k[e][n] * v[t][c]; - r += a[i[o]][0] * l; - s += a[i[o]][1] * l; - } - g[m] = a.length; - a.push([r, s]); - p[m] = n.length; - const c = new Uint8Array(3); - c[0] = ((b[0] * (u - t) + y[0] * t) / u) | 0; - c[1] = ((b[1] * (u - t) + y[1] * t) / u) | 0; - c[2] = ((b[2] * (u - t) + y[2] * t) / u) | 0; - n.push(c); - } - } - g[0] = i[0]; - p[0] = s[0]; - g[u] = i[3]; - p[u] = s[1]; - g[f * d] = i[12]; - p[f * d] = s[2]; - g[f * d + u] = i[15]; - p[f * d + u] = s[3]; - this.figures[e] = { - type: "lattice", - coords: g, - colors: p, - verticesPerRow: f, - }; - } - _updateBounds() { - let e = this.coords[0][0], - t = this.coords[0][1], - a = e, - r = t; - for (let n = 1, i = this.coords.length; n < i; n++) { - const i = this.coords[n][0], - s = this.coords[n][1]; - e = e > i ? i : e; - t = t > s ? s : t; - a = a < i ? i : a; - r = r < s ? s : r; - } - this.bounds = [e, t, a, r]; - } - _packData() { - let e, t, a, r; - const n = this.coords, - i = new Float32Array(2 * n.length); - for (e = 0, a = 0, t = n.length; e < t; e++) { - const t = n[e]; - i[a++] = t[0]; - i[a++] = t[1]; - } - this.coords = i; - const s = this.colors, - o = new Uint8Array(3 * s.length); - for (e = 0, a = 0, t = s.length; e < t; e++) { - const t = s[e]; - o[a++] = t[0]; - o[a++] = t[1]; - o[a++] = t[2]; - } - this.colors = o; - const c = this.figures; - for (e = 0, t = c.length; e < t; e++) { - const t = c[e], - n = t.coords, - i = t.colors; - for (a = 0, r = n.length; a < r; a++) { - n[a] *= 2; - i[a] *= 3; - } - } - } - getIR() { - return [ - "Mesh", - this.shadingType, - this.coords, - this.colors, - this.figures, - this.bounds, - this.bbox, - this.background, - ]; - } - } - class DummyShading extends BaseShading { - getIR() { - return ["Dummy"]; - } - } - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.getXfaFontDict = function getXfaFontDict(e) { - const t = (function getXfaFontWidths(e) { - const t = getXfaFontName(e); - if (!t) return null; - const { baseWidths: a, baseMapping: r, factors: n } = t, - i = n ? a.map((e, t) => e * n[t]) : a; - let s, - o = -2; - const c = []; - for (const [e, t] of r - .map((e, t) => [e, t]) - .sort(([e], [t]) => e - t)) - if (-1 !== e) - if (e === o + 1) { - s.push(i[t]); - o += 1; - } else { - o = e; - s = [i[t]]; - c.push(e, s); - } - return c; - })(e), - a = new n.Dict(null); - a.set("BaseFont", n.Name.get(e)); - a.set("Type", n.Name.get("Font")); - a.set("Subtype", n.Name.get("CIDFontType2")); - a.set("Encoding", n.Name.get("Identity-H")); - a.set("CIDToGIDMap", n.Name.get("Identity")); - a.set("W", t); - a.set("FirstChar", t[0]); - a.set("LastChar", t.at(-2) + t.at(-1).length - 1); - const r = new n.Dict(null); - a.set("FontDescriptor", r); - const i = new n.Dict(null); - i.set("Ordering", "Identity"); - i.set("Registry", "Adobe"); - i.set("Supplement", 0); - a.set("CIDSystemInfo", i); - return a; - }; - t.getXfaFontName = getXfaFontName; - var r = a(52), - n = a(4), - i = a(53), - s = a(54), - o = a(55), - c = a(56), - l = a(3), - h = a(38); - const u = (0, l.getLookupTableFactory)(function (e) { - e["MyriadPro-Regular"] = e["PdfJS-Fallback-Regular"] = { - name: "LiberationSans-Regular", - factors: o.MyriadProRegularFactors, - baseWidths: s.LiberationSansRegularWidths, - baseMapping: s.LiberationSansRegularMapping, - metrics: o.MyriadProRegularMetrics, - }; - e["MyriadPro-Bold"] = e["PdfJS-Fallback-Bold"] = { - name: "LiberationSans-Bold", - factors: o.MyriadProBoldFactors, - baseWidths: s.LiberationSansBoldWidths, - baseMapping: s.LiberationSansBoldMapping, - metrics: o.MyriadProBoldMetrics, - }; - e["MyriadPro-It"] = - e["MyriadPro-Italic"] = - e["PdfJS-Fallback-Italic"] = - { - name: "LiberationSans-Italic", - factors: o.MyriadProItalicFactors, - baseWidths: s.LiberationSansItalicWidths, - baseMapping: s.LiberationSansItalicMapping, - metrics: o.MyriadProItalicMetrics, - }; - e["MyriadPro-BoldIt"] = - e["MyriadPro-BoldItalic"] = - e["PdfJS-Fallback-BoldItalic"] = - { - name: "LiberationSans-BoldItalic", - factors: o.MyriadProBoldItalicFactors, - baseWidths: s.LiberationSansBoldItalicWidths, - baseMapping: s.LiberationSansBoldItalicMapping, - metrics: o.MyriadProBoldItalicMetrics, - }; - e.ArialMT = - e.Arial = - e["Arial-Regular"] = - { - name: "LiberationSans-Regular", - baseWidths: s.LiberationSansRegularWidths, - baseMapping: s.LiberationSansRegularMapping, - }; - e["Arial-BoldMT"] = e["Arial-Bold"] = { - name: "LiberationSans-Bold", - baseWidths: s.LiberationSansBoldWidths, - baseMapping: s.LiberationSansBoldMapping, - }; - e["Arial-ItalicMT"] = e["Arial-Italic"] = { - name: "LiberationSans-Italic", - baseWidths: s.LiberationSansItalicWidths, - baseMapping: s.LiberationSansItalicMapping, - }; - e["Arial-BoldItalicMT"] = e["Arial-BoldItalic"] = { - name: "LiberationSans-BoldItalic", - baseWidths: s.LiberationSansBoldItalicWidths, - baseMapping: s.LiberationSansBoldItalicMapping, - }; - e["Calibri-Regular"] = { - name: "LiberationSans-Regular", - factors: r.CalibriRegularFactors, - baseWidths: s.LiberationSansRegularWidths, - baseMapping: s.LiberationSansRegularMapping, - metrics: r.CalibriRegularMetrics, - }; - e["Calibri-Bold"] = { - name: "LiberationSans-Bold", - factors: r.CalibriBoldFactors, - baseWidths: s.LiberationSansBoldWidths, - baseMapping: s.LiberationSansBoldMapping, - metrics: r.CalibriBoldMetrics, - }; - e["Calibri-Italic"] = { - name: "LiberationSans-Italic", - factors: r.CalibriItalicFactors, - baseWidths: s.LiberationSansItalicWidths, - baseMapping: s.LiberationSansItalicMapping, - metrics: r.CalibriItalicMetrics, - }; - e["Calibri-BoldItalic"] = { - name: "LiberationSans-BoldItalic", - factors: r.CalibriBoldItalicFactors, - baseWidths: s.LiberationSansBoldItalicWidths, - baseMapping: s.LiberationSansBoldItalicMapping, - metrics: r.CalibriBoldItalicMetrics, - }; - e["Segoeui-Regular"] = { - name: "LiberationSans-Regular", - factors: c.SegoeuiRegularFactors, - baseWidths: s.LiberationSansRegularWidths, - baseMapping: s.LiberationSansRegularMapping, - metrics: c.SegoeuiRegularMetrics, - }; - e["Segoeui-Bold"] = { - name: "LiberationSans-Bold", - factors: c.SegoeuiBoldFactors, - baseWidths: s.LiberationSansBoldWidths, - baseMapping: s.LiberationSansBoldMapping, - metrics: c.SegoeuiBoldMetrics, - }; - e["Segoeui-Italic"] = { - name: "LiberationSans-Italic", - factors: c.SegoeuiItalicFactors, - baseWidths: s.LiberationSansItalicWidths, - baseMapping: s.LiberationSansItalicMapping, - metrics: c.SegoeuiItalicMetrics, - }; - e["Segoeui-BoldItalic"] = { - name: "LiberationSans-BoldItalic", - factors: c.SegoeuiBoldItalicFactors, - baseWidths: s.LiberationSansBoldItalicWidths, - baseMapping: s.LiberationSansBoldItalicMapping, - metrics: c.SegoeuiBoldItalicMetrics, - }; - e["Helvetica-Regular"] = e.Helvetica = { - name: "LiberationSans-Regular", - factors: i.HelveticaRegularFactors, - baseWidths: s.LiberationSansRegularWidths, - baseMapping: s.LiberationSansRegularMapping, - metrics: i.HelveticaRegularMetrics, - }; - e["Helvetica-Bold"] = { - name: "LiberationSans-Bold", - factors: i.HelveticaBoldFactors, - baseWidths: s.LiberationSansBoldWidths, - baseMapping: s.LiberationSansBoldMapping, - metrics: i.HelveticaBoldMetrics, - }; - e["Helvetica-Italic"] = { - name: "LiberationSans-Italic", - factors: i.HelveticaItalicFactors, - baseWidths: s.LiberationSansItalicWidths, - baseMapping: s.LiberationSansItalicMapping, - metrics: i.HelveticaItalicMetrics, - }; - e["Helvetica-BoldItalic"] = { - name: "LiberationSans-BoldItalic", - factors: i.HelveticaBoldItalicFactors, - baseWidths: s.LiberationSansBoldItalicWidths, - baseMapping: s.LiberationSansBoldItalicMapping, - metrics: i.HelveticaBoldItalicMetrics, - }; - }); - function getXfaFontName(e) { - const t = (0, h.normalizeFontName)(e); - return u()[t]; - } - }, - (e, t) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.CalibriRegularMetrics = - t.CalibriRegularFactors = - t.CalibriItalicMetrics = - t.CalibriItalicFactors = - t.CalibriBoldMetrics = - t.CalibriBoldItalicMetrics = - t.CalibriBoldItalicFactors = - t.CalibriBoldFactors = - void 0; - t.CalibriBoldFactors = [ - 1.3877, 1, 1, 1, 0.97801, 0.92482, 0.89552, 0.91133, 0.81988, - 0.97566, 0.98152, 0.93548, 0.93548, 1.2798, 0.85284, 0.92794, 1, - 0.96134, 1.54657, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, - 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.82845, 0.82845, - 0.85284, 0.85284, 0.85284, 0.75859, 0.92138, 0.83908, 0.7762, - 0.73293, 0.87289, 0.73133, 0.7514, 0.81921, 0.87356, 0.95958, - 0.59526, 0.75727, 0.69225, 1.04924, 0.9121, 0.86943, 0.79795, - 0.88198, 0.77958, 0.70864, 0.81055, 0.90399, 0.88653, 0.96017, - 0.82577, 0.77892, 0.78257, 0.97507, 1.54657, 0.97507, 0.85284, - 0.89552, 0.90176, 0.88762, 0.8785, 0.75241, 0.8785, 0.90518, - 0.95015, 0.77618, 0.8785, 0.88401, 0.91916, 0.86304, 0.88401, - 0.91488, 0.8785, 0.8801, 0.8785, 0.8785, 0.91343, 0.7173, 1.04106, - 0.8785, 0.85075, 0.95794, 0.82616, 0.85162, 0.79492, 0.88331, - 1.69808, 0.88331, 0.85284, 0.97801, 0.89552, 0.91133, 0.89552, - 0.91133, 1.7801, 0.89552, 1.24487, 1.13254, 1.12401, 0.96839, - 0.85284, 0.68787, 0.70645, 0.85592, 0.90747, 1.01466, 1.0088, - 0.90323, 1, 1.07463, 1, 0.91056, 0.75806, 1.19118, 0.96839, 0.78864, - 0.82845, 0.84133, 0.75859, 0.83908, 0.83908, 0.83908, 0.83908, - 0.83908, 0.83908, 0.77539, 0.73293, 0.73133, 0.73133, 0.73133, - 0.73133, 0.95958, 0.95958, 0.95958, 0.95958, 0.88506, 0.9121, - 0.86943, 0.86943, 0.86943, 0.86943, 0.86943, 0.85284, 0.87508, - 0.90399, 0.90399, 0.90399, 0.90399, 0.77892, 0.79795, 0.90807, - 0.88762, 0.88762, 0.88762, 0.88762, 0.88762, 0.88762, 0.8715, - 0.75241, 0.90518, 0.90518, 0.90518, 0.90518, 0.88401, 0.88401, - 0.88401, 0.88401, 0.8785, 0.8785, 0.8801, 0.8801, 0.8801, 0.8801, - 0.8801, 0.90747, 0.89049, 0.8785, 0.8785, 0.8785, 0.8785, 0.85162, - 0.8785, 0.85162, 0.83908, 0.88762, 0.83908, 0.88762, 0.83908, - 0.88762, 0.73293, 0.75241, 0.73293, 0.75241, 0.73293, 0.75241, - 0.73293, 0.75241, 0.87289, 0.83016, 0.88506, 0.93125, 0.73133, - 0.90518, 0.73133, 0.90518, 0.73133, 0.90518, 0.73133, 0.90518, - 0.73133, 0.90518, 0.81921, 0.77618, 0.81921, 0.77618, 0.81921, - 0.77618, 1, 1, 0.87356, 0.8785, 0.91075, 0.89608, 0.95958, 0.88401, - 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, - 0.88401, 0.76229, 0.90167, 0.59526, 0.91916, 1, 1, 0.86304, 0.69225, - 0.88401, 1, 1, 0.70424, 0.79468, 0.91926, 0.88175, 0.70823, 0.94903, - 0.9121, 0.8785, 1, 1, 0.9121, 0.8785, 0.87802, 0.88656, 0.8785, - 0.86943, 0.8801, 0.86943, 0.8801, 0.86943, 0.8801, 0.87402, 0.89291, - 0.77958, 0.91343, 1, 1, 0.77958, 0.91343, 0.70864, 0.7173, 0.70864, - 0.7173, 0.70864, 0.7173, 0.70864, 0.7173, 1, 1, 0.81055, 0.75841, - 0.81055, 1.06452, 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, - 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, 0.96017, 0.95794, - 0.77892, 0.85162, 0.77892, 0.78257, 0.79492, 0.78257, 0.79492, - 0.78257, 0.79492, 0.9297, 0.56892, 0.83908, 0.88762, 0.77539, - 0.8715, 0.87508, 0.89049, 1, 1, 0.81055, 1.04106, 1.20528, 1.20528, - 1, 1.15543, 0.70674, 0.98387, 0.94721, 1.33431, 1.45894, 0.95161, - 1.06303, 0.83908, 0.80352, 0.57184, 0.6965, 0.56289, 0.82001, - 0.56029, 0.81235, 1.02988, 0.83908, 0.7762, 0.68156, 0.80367, - 0.73133, 0.78257, 0.87356, 0.86943, 0.95958, 0.75727, 0.89019, - 1.04924, 0.9121, 0.7648, 0.86943, 0.87356, 0.79795, 0.78275, - 0.81055, 0.77892, 0.9762, 0.82577, 0.99819, 0.84896, 0.95958, - 0.77892, 0.96108, 1.01407, 0.89049, 1.02988, 0.94211, 0.96108, - 0.8936, 0.84021, 0.87842, 0.96399, 0.79109, 0.89049, 1.00813, - 1.02988, 0.86077, 0.87445, 0.92099, 0.84723, 0.86513, 0.8801, - 0.75638, 0.85714, 0.78216, 0.79586, 0.87965, 0.94211, 0.97747, - 0.78287, 0.97926, 0.84971, 1.02988, 0.94211, 0.8801, 0.94211, - 0.84971, 0.73133, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90264, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90518, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90548, 1, 1, 1, 1, 1, 1, 0.96017, - 0.95794, 0.96017, 0.95794, 0.96017, 0.95794, 0.77892, 0.85162, 1, 1, - 0.89552, 0.90527, 1, 0.90363, 0.92794, 0.92794, 0.92794, 0.92794, - 0.87012, 0.87012, 0.87012, 0.89552, 0.89552, 1.42259, 0.71143, - 1.06152, 1, 1, 1.03372, 1.03372, 0.97171, 1.4956, 2.2807, 0.93835, - 0.83406, 0.91133, 0.84107, 0.91133, 1, 1, 1, 0.72021, 1, 1.23108, - 0.83489, 0.88525, 0.88525, 0.81499, 0.90527, 1.81055, 0.90527, - 1.81055, 1.31006, 1.53711, 0.94434, 1.08696, 1, 0.95018, 0.77192, - 0.85284, 0.90747, 1.17534, 0.69825, 0.9716, 1.37077, 0.90747, - 0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941, - 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862, - 0.99862, 1, 1, 1, 1, 1, 1.08004, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90727, 0.90727, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - ]; - t.CalibriBoldMetrics = { lineHeight: 1.2207, lineGap: 0.2207 }; - t.CalibriBoldItalicFactors = [ - 1.3877, 1, 1, 1, 0.97801, 0.92482, 0.89552, 0.91133, 0.81988, - 0.97566, 0.98152, 0.93548, 0.93548, 1.2798, 0.85284, 0.92794, 1, - 0.96134, 1.56239, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, - 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.82845, 0.82845, - 0.85284, 0.85284, 0.85284, 0.75859, 0.92138, 0.83908, 0.7762, - 0.71805, 0.87289, 0.73133, 0.7514, 0.81921, 0.87356, 0.95958, - 0.59526, 0.75727, 0.69225, 1.04924, 0.90872, 0.85938, 0.79795, - 0.87068, 0.77958, 0.69766, 0.81055, 0.90399, 0.88653, 0.96068, - 0.82577, 0.77892, 0.78257, 0.97507, 1.529, 0.97507, 0.85284, - 0.89552, 0.90176, 0.94908, 0.86411, 0.74012, 0.86411, 0.88323, - 0.95015, 0.86411, 0.86331, 0.88401, 0.91916, 0.86304, 0.88401, - 0.9039, 0.86331, 0.86331, 0.86411, 0.86411, 0.90464, 0.70852, - 1.04106, 0.86331, 0.84372, 0.95794, 0.82616, 0.84548, 0.79492, - 0.88331, 1.69808, 0.88331, 0.85284, 0.97801, 0.89552, 0.91133, - 0.89552, 0.91133, 1.7801, 0.89552, 1.24487, 1.13254, 1.19129, - 0.96839, 0.85284, 0.68787, 0.70645, 0.85592, 0.90747, 1.01466, - 1.0088, 0.90323, 1, 1.07463, 1, 0.91056, 0.75806, 1.19118, 0.96839, - 0.78864, 0.82845, 0.84133, 0.75859, 0.83908, 0.83908, 0.83908, - 0.83908, 0.83908, 0.83908, 0.77539, 0.71805, 0.73133, 0.73133, - 0.73133, 0.73133, 0.95958, 0.95958, 0.95958, 0.95958, 0.88506, - 0.90872, 0.85938, 0.85938, 0.85938, 0.85938, 0.85938, 0.85284, - 0.87068, 0.90399, 0.90399, 0.90399, 0.90399, 0.77892, 0.79795, - 0.90807, 0.94908, 0.94908, 0.94908, 0.94908, 0.94908, 0.94908, - 0.85887, 0.74012, 0.88323, 0.88323, 0.88323, 0.88323, 0.88401, - 0.88401, 0.88401, 0.88401, 0.8785, 0.86331, 0.86331, 0.86331, - 0.86331, 0.86331, 0.86331, 0.90747, 0.89049, 0.86331, 0.86331, - 0.86331, 0.86331, 0.84548, 0.86411, 0.84548, 0.83908, 0.94908, - 0.83908, 0.94908, 0.83908, 0.94908, 0.71805, 0.74012, 0.71805, - 0.74012, 0.71805, 0.74012, 0.71805, 0.74012, 0.87289, 0.79538, - 0.88506, 0.92726, 0.73133, 0.88323, 0.73133, 0.88323, 0.73133, - 0.88323, 0.73133, 0.88323, 0.73133, 0.88323, 0.81921, 0.86411, - 0.81921, 0.86411, 0.81921, 0.86411, 1, 1, 0.87356, 0.86331, 0.91075, - 0.8777, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, - 0.95958, 0.88401, 0.95958, 0.88401, 0.76467, 0.90167, 0.59526, - 0.91916, 1, 1, 0.86304, 0.69225, 0.88401, 1, 1, 0.70424, 0.77312, - 0.91926, 0.88175, 0.70823, 0.94903, 0.90872, 0.86331, 1, 1, 0.90872, - 0.86331, 0.86906, 0.88116, 0.86331, 0.85938, 0.86331, 0.85938, - 0.86331, 0.85938, 0.86331, 0.87402, 0.86549, 0.77958, 0.90464, 1, 1, - 0.77958, 0.90464, 0.69766, 0.70852, 0.69766, 0.70852, 0.69766, - 0.70852, 0.69766, 0.70852, 1, 1, 0.81055, 0.75841, 0.81055, 1.06452, - 0.90399, 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.90399, - 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.96068, 0.95794, - 0.77892, 0.84548, 0.77892, 0.78257, 0.79492, 0.78257, 0.79492, - 0.78257, 0.79492, 0.9297, 0.56892, 0.83908, 0.94908, 0.77539, - 0.85887, 0.87068, 0.89049, 1, 1, 0.81055, 1.04106, 1.20528, 1.20528, - 1, 1.15543, 0.70088, 0.98387, 0.94721, 1.33431, 1.45894, 0.95161, - 1.48387, 0.83908, 0.80352, 0.57118, 0.6965, 0.56347, 0.79179, - 0.55853, 0.80346, 1.02988, 0.83908, 0.7762, 0.67174, 0.86036, - 0.73133, 0.78257, 0.87356, 0.86441, 0.95958, 0.75727, 0.89019, - 1.04924, 0.90872, 0.74889, 0.85938, 0.87891, 0.79795, 0.7957, - 0.81055, 0.77892, 0.97447, 0.82577, 0.97466, 0.87179, 0.95958, - 0.77892, 0.94252, 0.95612, 0.8753, 1.02988, 0.92733, 0.94252, - 0.87411, 0.84021, 0.8728, 0.95612, 0.74081, 0.8753, 1.02189, - 1.02988, 0.84814, 0.87445, 0.91822, 0.84723, 0.85668, 0.86331, - 0.81344, 0.87581, 0.76422, 0.82046, 0.96057, 0.92733, 0.99375, - 0.78022, 0.95452, 0.86015, 1.02988, 0.92733, 0.86331, 0.92733, - 0.86015, 0.73133, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90631, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.88323, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.85174, 1, 1, 1, 1, 1, 1, 0.96068, - 0.95794, 0.96068, 0.95794, 0.96068, 0.95794, 0.77892, 0.84548, 1, 1, - 0.89552, 0.90527, 1, 0.90363, 0.92794, 0.92794, 0.92794, 0.89807, - 0.87012, 0.87012, 0.87012, 0.89552, 0.89552, 1.42259, 0.71094, - 1.06152, 1, 1, 1.03372, 1.03372, 0.97171, 1.4956, 2.2807, 0.92972, - 0.83406, 0.91133, 0.83326, 0.91133, 1, 1, 1, 0.72021, 1, 1.23108, - 0.83489, 0.88525, 0.88525, 0.81499, 0.90616, 1.81055, 0.90527, - 1.81055, 1.3107, 1.53711, 0.94434, 1.08696, 1, 0.95018, 0.77192, - 0.85284, 0.90747, 1.17534, 0.69825, 0.9716, 1.37077, 0.90747, - 0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941, - 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862, - 0.99862, 1, 1, 1, 1, 1, 1.08004, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90727, 0.90727, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - ]; - t.CalibriBoldItalicMetrics = { lineHeight: 1.2207, lineGap: 0.2207 }; - t.CalibriItalicFactors = [ - 1.3877, 1, 1, 1, 1.17223, 1.1293, 0.89552, 0.91133, 0.80395, - 1.02269, 1.15601, 0.91056, 0.91056, 1.2798, 0.85284, 0.89807, 1, - 0.90861, 1.39543, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, - 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.96309, 0.96309, - 0.85284, 0.85284, 0.85284, 0.83319, 0.88071, 0.8675, 0.81552, - 0.72346, 0.85193, 0.73206, 0.7522, 0.81105, 0.86275, 0.90685, - 0.6377, 0.77892, 0.75593, 1.02638, 0.89249, 0.84118, 0.77452, - 0.85374, 0.75186, 0.67789, 0.79776, 0.88844, 0.85066, 0.94309, - 0.77818, 0.7306, 0.76659, 1.10369, 1.38313, 1.10369, 1.06139, - 0.89552, 0.8739, 0.9245, 0.9245, 0.83203, 0.9245, 0.85865, 1.09842, - 0.9245, 0.9245, 1.03297, 1.07692, 0.90918, 1.03297, 0.94959, 0.9245, - 0.92274, 0.9245, 0.9245, 1.02933, 0.77832, 1.20562, 0.9245, 0.8916, - 0.98986, 0.86621, 0.89453, 0.79004, 0.94152, 1.77256, 0.94152, - 0.85284, 0.97801, 0.89552, 0.91133, 0.89552, 0.91133, 1.91729, - 0.89552, 1.17889, 1.13254, 1.16359, 0.92098, 0.85284, 0.68787, - 0.71353, 0.84737, 0.90747, 1.0088, 1.0044, 0.87683, 1, 1.09091, 1, - 0.92229, 0.739, 1.15642, 0.92098, 0.76288, 0.80504, 0.80972, - 0.75859, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.76318, - 0.72346, 0.73206, 0.73206, 0.73206, 0.73206, 0.90685, 0.90685, - 0.90685, 0.90685, 0.86477, 0.89249, 0.84118, 0.84118, 0.84118, - 0.84118, 0.84118, 0.85284, 0.84557, 0.88844, 0.88844, 0.88844, - 0.88844, 0.7306, 0.77452, 0.86331, 0.9245, 0.9245, 0.9245, 0.9245, - 0.9245, 0.9245, 0.84843, 0.83203, 0.85865, 0.85865, 0.85865, - 0.85865, 0.82601, 0.82601, 0.82601, 0.82601, 0.94469, 0.9245, - 0.92274, 0.92274, 0.92274, 0.92274, 0.92274, 0.90747, 0.86651, - 0.9245, 0.9245, 0.9245, 0.9245, 0.89453, 0.9245, 0.89453, 0.8675, - 0.9245, 0.8675, 0.9245, 0.8675, 0.9245, 0.72346, 0.83203, 0.72346, - 0.83203, 0.72346, 0.83203, 0.72346, 0.83203, 0.85193, 0.8875, - 0.86477, 0.99034, 0.73206, 0.85865, 0.73206, 0.85865, 0.73206, - 0.85865, 0.73206, 0.85865, 0.73206, 0.85865, 0.81105, 0.9245, - 0.81105, 0.9245, 0.81105, 0.9245, 1, 1, 0.86275, 0.9245, 0.90872, - 0.93591, 0.90685, 0.82601, 0.90685, 0.82601, 0.90685, 0.82601, - 0.90685, 1.03297, 0.90685, 0.82601, 0.77896, 1.05611, 0.6377, - 1.07692, 1, 1, 0.90918, 0.75593, 1.03297, 1, 1, 0.76032, 0.9375, - 0.98156, 0.93407, 0.77261, 1.11429, 0.89249, 0.9245, 1, 1, 0.89249, - 0.9245, 0.92534, 0.86698, 0.9245, 0.84118, 0.92274, 0.84118, - 0.92274, 0.84118, 0.92274, 0.8667, 0.86291, 0.75186, 1.02933, 1, 1, - 0.75186, 1.02933, 0.67789, 0.77832, 0.67789, 0.77832, 0.67789, - 0.77832, 0.67789, 0.77832, 1, 1, 0.79776, 0.97655, 0.79776, 1.23023, - 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, - 0.88844, 0.9245, 0.88844, 0.9245, 0.94309, 0.98986, 0.7306, 0.89453, - 0.7306, 0.76659, 0.79004, 0.76659, 0.79004, 0.76659, 0.79004, - 1.09231, 0.54873, 0.8675, 0.9245, 0.76318, 0.84843, 0.84557, - 0.86651, 1, 1, 0.79776, 1.20562, 1.18622, 1.18622, 1, 1.1437, - 0.67009, 0.96334, 0.93695, 1.35191, 1.40909, 0.95161, 1.48387, - 0.8675, 0.90861, 0.6192, 0.7363, 0.64824, 0.82411, 0.56321, 0.85696, - 1.23516, 0.8675, 0.81552, 0.7286, 0.84134, 0.73206, 0.76659, - 0.86275, 0.84369, 0.90685, 0.77892, 0.85871, 1.02638, 0.89249, - 0.75828, 0.84118, 0.85984, 0.77452, 0.76466, 0.79776, 0.7306, - 0.90782, 0.77818, 0.903, 0.87291, 0.90685, 0.7306, 0.99058, 1.03667, - 0.94635, 1.23516, 0.9849, 0.99058, 0.92393, 0.8916, 0.942, 1.03667, - 0.75026, 0.94635, 1.0297, 1.23516, 0.90918, 0.94048, 0.98217, - 0.89746, 0.84153, 0.92274, 0.82507, 0.88832, 0.84438, 0.88178, - 1.03525, 0.9849, 1.00225, 0.78086, 0.97248, 0.89404, 1.23516, - 0.9849, 0.92274, 0.9849, 0.89404, 0.73206, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 0.89693, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 0.85865, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90933, 1, - 1, 1, 1, 1, 1, 0.94309, 0.98986, 0.94309, 0.98986, 0.94309, 0.98986, - 0.7306, 0.89453, 1, 1, 0.89552, 0.90527, 1, 0.90186, 1.12308, - 1.12308, 1.12308, 1.12308, 1.2566, 1.2566, 1.2566, 0.89552, 0.89552, - 1.42259, 0.68994, 1.03809, 1, 1, 1.0176, 1.0176, 1.11523, 1.4956, - 2.01462, 0.97858, 0.82616, 0.91133, 0.83437, 0.91133, 1, 1, 1, - 0.70508, 1, 1.23108, 0.79801, 0.84426, 0.84426, 0.774, 0.90572, - 1.81055, 0.90749, 1.81055, 1.28809, 1.55469, 0.94434, 1.07806, 1, - 0.97094, 0.7589, 0.85284, 0.90747, 1.19658, 0.69825, 0.97622, - 1.33512, 0.90747, 0.90747, 0.85284, 0.90747, 0.90747, 1.44947, - 0.85284, 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, - 0.70572, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 0.99862, 0.99862, 1, 1, 1, 1, 1, 1.0336, 0.91027, 1, 1, 1, - 0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05859, 1.05859, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - ]; - t.CalibriItalicMetrics = { lineHeight: 1.2207, lineGap: 0.2207 }; - t.CalibriRegularFactors = [ - 1.3877, 1, 1, 1, 1.17223, 1.1293, 0.89552, 0.91133, 0.80395, - 1.02269, 1.15601, 0.91056, 0.91056, 1.2798, 0.85284, 0.89807, 1, - 0.90861, 1.39016, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, - 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.96309, 0.96309, - 0.85284, 0.85284, 0.85284, 0.83319, 0.88071, 0.8675, 0.81552, - 0.73834, 0.85193, 0.73206, 0.7522, 0.81105, 0.86275, 0.90685, - 0.6377, 0.77892, 0.75593, 1.02638, 0.89385, 0.85122, 0.77452, - 0.86503, 0.75186, 0.68887, 0.79776, 0.88844, 0.85066, 0.94258, - 0.77818, 0.7306, 0.76659, 1.10369, 1.39016, 1.10369, 1.06139, - 0.89552, 0.8739, 0.86128, 0.94469, 0.8457, 0.94469, 0.89464, - 1.09842, 0.84636, 0.94469, 1.03297, 1.07692, 0.90918, 1.03297, - 0.95897, 0.94469, 0.9482, 0.94469, 0.94469, 1.04692, 0.78223, - 1.20562, 0.94469, 0.90332, 0.98986, 0.86621, 0.90527, 0.79004, - 0.94152, 1.77256, 0.94152, 0.85284, 0.97801, 0.89552, 0.91133, - 0.89552, 0.91133, 1.91729, 0.89552, 1.17889, 1.13254, 1.08707, - 0.92098, 0.85284, 0.68787, 0.71353, 0.84737, 0.90747, 1.0088, - 1.0044, 0.87683, 1, 1.09091, 1, 0.92229, 0.739, 1.15642, 0.92098, - 0.76288, 0.80504, 0.80972, 0.75859, 0.8675, 0.8675, 0.8675, 0.8675, - 0.8675, 0.8675, 0.76318, 0.73834, 0.73206, 0.73206, 0.73206, - 0.73206, 0.90685, 0.90685, 0.90685, 0.90685, 0.86477, 0.89385, - 0.85122, 0.85122, 0.85122, 0.85122, 0.85122, 0.85284, 0.85311, - 0.88844, 0.88844, 0.88844, 0.88844, 0.7306, 0.77452, 0.86331, - 0.86128, 0.86128, 0.86128, 0.86128, 0.86128, 0.86128, 0.8693, - 0.8457, 0.89464, 0.89464, 0.89464, 0.89464, 0.82601, 0.82601, - 0.82601, 0.82601, 0.94469, 0.94469, 0.9482, 0.9482, 0.9482, 0.9482, - 0.9482, 0.90747, 0.86651, 0.94469, 0.94469, 0.94469, 0.94469, - 0.90527, 0.94469, 0.90527, 0.8675, 0.86128, 0.8675, 0.86128, 0.8675, - 0.86128, 0.73834, 0.8457, 0.73834, 0.8457, 0.73834, 0.8457, 0.73834, - 0.8457, 0.85193, 0.92454, 0.86477, 0.9921, 0.73206, 0.89464, - 0.73206, 0.89464, 0.73206, 0.89464, 0.73206, 0.89464, 0.73206, - 0.89464, 0.81105, 0.84636, 0.81105, 0.84636, 0.81105, 0.84636, 1, 1, - 0.86275, 0.94469, 0.90872, 0.95786, 0.90685, 0.82601, 0.90685, - 0.82601, 0.90685, 0.82601, 0.90685, 1.03297, 0.90685, 0.82601, - 0.77741, 1.05611, 0.6377, 1.07692, 1, 1, 0.90918, 0.75593, 1.03297, - 1, 1, 0.76032, 0.90452, 0.98156, 1.11842, 0.77261, 1.11429, 0.89385, - 0.94469, 1, 1, 0.89385, 0.94469, 0.95877, 0.86901, 0.94469, 0.85122, - 0.9482, 0.85122, 0.9482, 0.85122, 0.9482, 0.8667, 0.90016, 0.75186, - 1.04692, 1, 1, 0.75186, 1.04692, 0.68887, 0.78223, 0.68887, 0.78223, - 0.68887, 0.78223, 0.68887, 0.78223, 1, 1, 0.79776, 0.92188, 0.79776, - 1.23023, 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, - 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, 0.94258, - 0.98986, 0.7306, 0.90527, 0.7306, 0.76659, 0.79004, 0.76659, - 0.79004, 0.76659, 0.79004, 1.09231, 0.54873, 0.8675, 0.86128, - 0.76318, 0.8693, 0.85311, 0.86651, 1, 1, 0.79776, 1.20562, 1.18622, - 1.18622, 1, 1.1437, 0.67742, 0.96334, 0.93695, 1.35191, 1.40909, - 0.95161, 1.48387, 0.86686, 0.90861, 0.62267, 0.74359, 0.65649, - 0.85498, 0.56963, 0.88254, 1.23516, 0.8675, 0.81552, 0.75443, - 0.84503, 0.73206, 0.76659, 0.86275, 0.85122, 0.90685, 0.77892, - 0.85746, 1.02638, 0.89385, 0.75657, 0.85122, 0.86275, 0.77452, - 0.74171, 0.79776, 0.7306, 0.95165, 0.77818, 0.89772, 0.88831, - 0.90685, 0.7306, 0.98142, 1.02191, 0.96576, 1.23516, 0.99018, - 0.98142, 0.9236, 0.89258, 0.94035, 1.02191, 0.78848, 0.96576, - 0.9561, 1.23516, 0.90918, 0.92578, 0.95424, 0.89746, 0.83969, - 0.9482, 0.80113, 0.89442, 0.85208, 0.86155, 0.98022, 0.99018, - 1.00452, 0.81209, 0.99247, 0.89181, 1.23516, 0.99018, 0.9482, - 0.99018, 0.89181, 0.73206, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0.88844, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0.89464, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.96766, 1, 1, 1, 1, 1, - 1, 0.94258, 0.98986, 0.94258, 0.98986, 0.94258, 0.98986, 0.7306, - 0.90527, 1, 1, 0.89552, 0.90527, 1, 0.90186, 1.12308, 1.12308, - 1.12308, 1.12308, 1.2566, 1.2566, 1.2566, 0.89552, 0.89552, 1.42259, - 0.69043, 1.03809, 1, 1, 1.0176, 1.0176, 1.11523, 1.4956, 2.01462, - 0.99331, 0.82616, 0.91133, 0.84286, 0.91133, 1, 1, 1, 0.70508, 1, - 1.23108, 0.79801, 0.84426, 0.84426, 0.774, 0.90527, 1.81055, - 0.90527, 1.81055, 1.28809, 1.55469, 0.94434, 1.07806, 1, 0.97094, - 0.7589, 0.85284, 0.90747, 1.19658, 0.69825, 0.97622, 1.33512, - 0.90747, 0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, - 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862, - 0.99862, 1, 1, 1, 1, 1, 1.0336, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05859, 1.05859, 1, 1, 1, 1.07185, - 0.99413, 0.96334, 1.08065, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - ]; - t.CalibriRegularMetrics = { lineHeight: 1.2207, lineGap: 0.2207 }; - }, - (e, t) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.HelveticaRegularMetrics = - t.HelveticaRegularFactors = - t.HelveticaItalicMetrics = - t.HelveticaItalicFactors = - t.HelveticaBoldMetrics = - t.HelveticaBoldItalicMetrics = - t.HelveticaBoldItalicFactors = - t.HelveticaBoldFactors = - void 0; - t.HelveticaBoldFactors = [ - 0.76116, 1, 1, 1.0006, 0.99998, 0.99974, 0.99973, 0.99973, 0.99982, - 0.99977, 1.00087, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, - 0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, - 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, - 1.00003, 1.00003, 1.00003, 1.00026, 0.9999, 0.99977, 0.99977, - 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, - 0.99973, 0.99977, 1.00026, 0.99999, 0.99977, 1.00022, 1.00001, - 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, - 1.00001, 1.00001, 1.00026, 0.99998, 1.0006, 0.99998, 1.00003, - 0.99973, 0.99998, 0.99973, 1.00026, 0.99973, 1.00026, 0.99973, - 0.99998, 1.00026, 1.00026, 1.0006, 1.0006, 0.99973, 1.0006, 0.99982, - 1.00026, 1.00026, 1.00026, 1.00026, 0.99959, 0.99973, 0.99998, - 1.00026, 0.99973, 1.00022, 0.99973, 0.99973, 1, 0.99959, 1.00077, - 0.99959, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973, - 1.00077, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003, - 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.99973, - 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002, - 1.00026, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1, - 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006, - 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, - 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, - 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, - 0.99973, 0.99973, 0.99982, 0.99973, 0.99973, 0.99973, 0.99973, - 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.00026, 1.00026, 1.00026, - 1.00026, 1.00026, 1.00026, 1.00026, 1.06409, 1.00026, 1.00026, - 1.00026, 1.00026, 1.00026, 0.99973, 1.00026, 0.99973, 0.99977, - 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, - 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, - 1.03374, 0.99977, 1.00026, 1.00001, 0.99973, 1.00001, 0.99973, - 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022, - 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, - 0.99977, 1.00026, 0.99977, 1.00026, 1.0006, 1.0006, 1.0006, 1.0006, - 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.00042, 0.99973, - 0.99973, 1.0006, 0.99977, 0.99973, 0.99973, 1.00026, 1.0006, - 1.00026, 1.0006, 1.00026, 1.03828, 1.00026, 0.99999, 1.00026, - 1.0006, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, - 0.9993, 0.9998, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, - 1.00022, 1.00026, 1, 1.00016, 0.99977, 0.99959, 0.99977, 0.99959, - 0.99977, 0.99959, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, - 0.99973, 1.00001, 0.99973, 1.00026, 0.99998, 1.00026, 0.8121, - 1.00026, 0.99998, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, - 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, - 1.00016, 1.00022, 1.00001, 0.99973, 1.00001, 1.00026, 1, 1.00026, 1, - 1.00026, 1, 1.0006, 0.99973, 0.99977, 0.99973, 1, 0.99982, 1.00022, - 1.00026, 1.00001, 0.99973, 1.00026, 0.99998, 0.99998, 0.99998, - 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, - 0.99998, 1.00034, 0.99977, 1, 0.99997, 1.00026, 1.00078, 1.00036, - 0.99973, 1.00013, 1.0006, 0.99977, 0.99977, 0.99988, 0.85148, - 1.00001, 1.00026, 0.99977, 1.00022, 1.0006, 0.99977, 1.00001, - 0.99999, 0.99977, 1.00069, 1.00022, 0.99977, 1.00001, 0.99984, - 1.00026, 1.00001, 1.00024, 1.00001, 0.9999, 1, 1.0006, 1.00001, - 1.00041, 0.99962, 1.00026, 1.0006, 0.99995, 1.00041, 0.99942, - 0.99973, 0.99927, 1.00082, 0.99902, 1.00026, 1.00087, 1.0006, - 1.00069, 0.99973, 0.99867, 0.99973, 0.9993, 1.00026, 1.00049, - 1.00056, 1, 0.99988, 0.99935, 0.99995, 0.99954, 1.00055, 0.99945, - 1.00032, 1.0006, 0.99995, 1.00026, 0.99995, 1.00032, 1.00001, - 1.00008, 0.99971, 1.00019, 0.9994, 1.00001, 1.0006, 1.00044, - 0.99973, 1.00023, 1.00047, 1, 0.99942, 0.99561, 0.99989, 1.00035, - 0.99977, 1.00035, 0.99977, 1.00019, 0.99944, 1.00001, 1.00021, - 0.99926, 1.00035, 1.00035, 0.99942, 1.00048, 0.99999, 0.99977, - 1.00022, 1.00035, 1.00001, 0.99977, 1.00026, 0.99989, 1.00057, - 1.00001, 0.99936, 1.00052, 1.00012, 0.99996, 1.00043, 1, 1.00035, - 0.9994, 0.99976, 1.00035, 0.99973, 1.00052, 1.00041, 1.00119, - 1.00037, 0.99973, 1.00002, 0.99986, 1.00041, 1.00041, 0.99902, - 0.9996, 1.00034, 0.99999, 1.00026, 0.99999, 1.00026, 0.99973, - 1.00052, 0.99973, 1, 0.99973, 1.00041, 1.00075, 0.9994, 1.0003, - 0.99999, 1, 1.00041, 0.99955, 1, 0.99915, 0.99973, 0.99973, 1.00026, - 1.00119, 0.99955, 0.99973, 1.0006, 0.99911, 1.0006, 1.00026, - 0.99972, 1.00026, 0.99902, 1.00041, 0.99973, 0.99999, 1, 1, 1.00038, - 1.0005, 1.00016, 1.00022, 1.00016, 1.00022, 1.00016, 1.00022, - 1.00001, 0.99973, 1, 1, 0.99973, 1, 1, 0.99955, 1.0006, 1.0006, - 1.0006, 1.0006, 1, 1, 1, 0.99973, 0.99973, 0.99972, 1, 1, 1.00106, - 0.99999, 0.99998, 0.99998, 0.99999, 0.99998, 1.66475, 1, 0.99973, - 0.99973, 1.00023, 0.99973, 0.99971, 1.00047, 1.00023, 1, 0.99991, - 0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1, 1, 1, 1, 1, 1, 1, - 0.99972, 1, 1.20985, 1.39713, 1.00003, 1.00031, 1.00015, 1, 0.99561, - 1.00027, 1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999, - 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, - 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, - 1.00026, 0.99972, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, - 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, - 1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, - ]; - t.HelveticaBoldMetrics = { lineHeight: 1.2, lineGap: 0.2 }; - t.HelveticaBoldItalicFactors = [ - 0.76116, 1, 1, 1.0006, 0.99998, 0.99974, 0.99973, 0.99973, 0.99982, - 0.99977, 1.00087, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, - 0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, - 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, - 1.00003, 1.00003, 1.00003, 1.00026, 0.9999, 0.99977, 0.99977, - 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, - 0.99973, 0.99977, 1.00026, 0.99999, 0.99977, 1.00022, 1.00001, - 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, - 1.00001, 1.00001, 1.00026, 0.99998, 1.0006, 0.99998, 1.00003, - 0.99973, 0.99998, 0.99973, 1.00026, 0.99973, 1.00026, 0.99973, - 0.99998, 1.00026, 1.00026, 1.0006, 1.0006, 0.99973, 1.0006, 0.99982, - 1.00026, 1.00026, 1.00026, 1.00026, 0.99959, 0.99973, 0.99998, - 1.00026, 0.99973, 1.00022, 0.99973, 0.99973, 1, 0.99959, 1.00077, - 0.99959, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973, - 1.00077, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003, - 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.99973, - 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002, - 1.00026, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1, - 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006, - 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, - 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, - 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, - 0.99973, 0.99973, 0.99982, 0.99973, 0.99973, 0.99973, 0.99973, - 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.00026, 1.00026, 1.00026, - 1.00026, 1.00026, 1.00026, 1.00026, 1.06409, 1.00026, 1.00026, - 1.00026, 1.00026, 1.00026, 0.99973, 1.00026, 0.99973, 0.99977, - 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, - 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, - 1.0044, 0.99977, 1.00026, 1.00001, 0.99973, 1.00001, 0.99973, - 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022, - 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, - 0.99977, 1.00026, 0.99977, 1.00026, 1.0006, 1.0006, 1.0006, 1.0006, - 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99971, 0.99973, - 0.99973, 1.0006, 0.99977, 0.99973, 0.99973, 1.00026, 1.0006, - 1.00026, 1.0006, 1.00026, 1.01011, 1.00026, 0.99999, 1.00026, - 1.0006, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, - 0.9993, 0.9998, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, - 1.00022, 1.00026, 1, 1.00016, 0.99977, 0.99959, 0.99977, 0.99959, - 0.99977, 0.99959, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, - 0.99973, 1.00001, 0.99973, 1.00026, 0.99998, 1.00026, 0.8121, - 1.00026, 0.99998, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, - 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, - 1.00016, 1.00022, 1.00001, 0.99973, 1.00001, 1.00026, 1, 1.00026, 1, - 1.00026, 1, 1.0006, 0.99973, 0.99977, 0.99973, 1, 0.99982, 1.00022, - 1.00026, 1.00001, 0.99973, 1.00026, 0.99998, 0.99998, 0.99998, - 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, - 0.99998, 0.99998, 0.99977, 1, 1, 1.00026, 0.99969, 0.99972, 0.99981, - 0.9998, 1.0006, 0.99977, 0.99977, 1.00022, 0.91155, 1.00001, - 1.00026, 0.99977, 1.00022, 1.0006, 0.99977, 1.00001, 0.99999, - 0.99977, 0.99966, 1.00022, 1.00032, 1.00001, 0.99944, 1.00026, - 1.00001, 0.99968, 1.00001, 1.00047, 1, 1.0006, 1.00001, 0.99981, - 1.00101, 1.00026, 1.0006, 0.99948, 0.99981, 1.00064, 0.99973, - 0.99942, 1.00101, 1.00061, 1.00026, 1.00069, 1.0006, 1.00014, - 0.99973, 1.01322, 0.99973, 1.00065, 1.00026, 1.00012, 0.99923, 1, - 1.00064, 1.00076, 0.99948, 1.00055, 1.00063, 1.00007, 0.99943, - 1.0006, 0.99948, 1.00026, 0.99948, 0.99943, 1.00001, 1.00001, - 1.00029, 1.00038, 1.00035, 1.00001, 1.0006, 1.0006, 0.99973, - 0.99978, 1.00001, 1.00057, 0.99989, 0.99967, 0.99964, 0.99967, - 0.99977, 0.99999, 0.99977, 1.00038, 0.99977, 1.00001, 0.99973, - 1.00066, 0.99967, 0.99967, 1.00041, 0.99998, 0.99999, 0.99977, - 1.00022, 0.99967, 1.00001, 0.99977, 1.00026, 0.99964, 1.00031, - 1.00001, 0.99999, 0.99999, 1, 1.00023, 1, 1, 0.99999, 1.00035, - 1.00001, 0.99999, 0.99973, 0.99977, 0.99999, 1.00058, 0.99973, - 0.99973, 0.99955, 0.9995, 1.00026, 1.00026, 1.00032, 0.99989, - 1.00034, 0.99999, 1.00026, 1.00026, 1.00026, 0.99973, 0.45998, - 0.99973, 1.00026, 0.99973, 1.00001, 0.99999, 0.99982, 0.99994, - 0.99996, 1, 1.00042, 1.00044, 1.00029, 1.00023, 0.99973, 0.99973, - 1.00026, 0.99949, 1.00002, 0.99973, 1.0006, 1.0006, 1.0006, 0.99975, - 1.00026, 1.00026, 1.00032, 0.98685, 0.99973, 1.00026, 1, 1, 0.99966, - 1.00044, 1.00016, 1.00022, 1.00016, 1.00022, 1.00016, 1.00022, - 1.00001, 0.99973, 1, 1, 0.99973, 1, 1, 0.99955, 1.0006, 1.0006, - 1.0006, 1.0006, 1, 1, 1, 0.99973, 0.99973, 0.99972, 1, 1, 1.00106, - 0.99999, 0.99998, 0.99998, 0.99999, 0.99998, 1.66475, 1, 0.99973, - 0.99973, 1, 0.99973, 0.99971, 0.99978, 1, 1, 0.99991, 0.99984, - 1.00002, 1.00002, 1.00002, 1.00002, 1.00098, 1, 1, 1, 1.00049, 1, 1, - 0.99972, 1, 1.20985, 1.39713, 1.00003, 1.00031, 1.00015, 1, 0.99561, - 1.00027, 1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999, - 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, - 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, - 1.00026, 0.99972, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, - 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, - 1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, - ]; - t.HelveticaBoldItalicMetrics = { lineHeight: 1.35, lineGap: 0.2 }; - t.HelveticaItalicFactors = [ - 0.76116, 1, 1, 1.0006, 1.0006, 1.00006, 0.99973, 0.99973, 0.99982, - 1.00001, 1.00043, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, - 0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, - 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1, - 1.00003, 1.00003, 1.00003, 0.99973, 0.99987, 1.00001, 1.00001, - 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 1, - 1.00001, 0.99973, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022, - 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001, - 1.00001, 1.00026, 1.0006, 1.0006, 1.0006, 0.99949, 0.99973, 0.99998, - 0.99973, 0.99973, 1, 0.99973, 0.99973, 1.0006, 0.99973, 0.99973, - 0.99924, 0.99924, 1, 0.99924, 0.99999, 0.99973, 0.99973, 0.99973, - 0.99973, 0.99998, 1, 1.0006, 0.99973, 1, 0.99977, 1, 1, 1, 1.00005, - 1.0009, 1.00005, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, - 0.99973, 1.0009, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, - 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, - 0.9998, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, - 1.00002, 1.00026, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, - 1.00001, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, - 1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, - 1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, - 0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, - 0.99973, 0.99973, 0.99973, 0.99982, 1, 0.99973, 0.99973, 0.99973, - 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, - 0.99973, 0.99973, 0.99973, 0.99973, 1.06409, 1.00026, 0.99973, - 0.99973, 0.99973, 0.99973, 1, 0.99973, 1, 1.00001, 0.99973, 1.00001, - 0.99973, 1.00001, 0.99973, 0.99977, 1, 0.99977, 1, 0.99977, 1, - 0.99977, 1, 0.99977, 1.0288, 0.99977, 0.99973, 1.00001, 0.99973, - 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, - 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, - 1.00022, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.0006, - 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99924, 1.0006, - 1.0006, 0.99946, 1.00034, 1, 0.99924, 1.00001, 1, 1, 0.99973, - 0.99924, 0.99973, 0.99924, 0.99973, 1.06311, 0.99973, 1.00024, - 0.99973, 0.99924, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, - 0.99973, 1.00041, 0.9998, 0.99973, 1.00022, 0.99973, 1.00022, - 0.99973, 1.00022, 0.99973, 1, 1.00016, 0.99977, 0.99998, 0.99977, - 0.99998, 0.99977, 0.99998, 1.00001, 1, 1.00001, 1, 1.00001, 1, - 1.00001, 1, 1.00026, 1.0006, 1.00026, 0.89547, 1.00026, 1.0006, - 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, - 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.00016, 0.99977, - 1.00001, 1, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 0.99924, - 0.99973, 1.00001, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 1, - 1.00026, 1.0006, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, - 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 1.00001, 1, - 1.00054, 0.99977, 1.00084, 1.00007, 0.99973, 1.00013, 0.99924, - 1.00001, 1.00001, 0.99945, 0.91221, 1.00001, 1.00026, 0.99977, - 1.00022, 1.0006, 1.00001, 1.00001, 0.99999, 0.99977, 0.99933, - 1.00022, 1.00054, 1.00001, 1.00065, 1.00026, 1.00001, 1.0001, - 1.00001, 1.00052, 1, 1.0006, 1.00001, 0.99945, 0.99897, 0.99968, - 0.99924, 1.00036, 0.99945, 0.99949, 1, 1.0006, 0.99897, 0.99918, - 0.99968, 0.99911, 0.99924, 1, 0.99962, 1.01487, 1, 1.0005, 0.99973, - 1.00012, 1.00043, 1, 0.99995, 0.99994, 1.00036, 0.99947, 1.00019, - 1.00063, 1.00025, 0.99924, 1.00036, 0.99973, 1.00036, 1.00025, - 1.00001, 1.00001, 1.00027, 1.0001, 1.00068, 1.00001, 1.0006, 1.0006, - 1, 1.00008, 0.99957, 0.99972, 0.9994, 0.99954, 0.99975, 1.00051, - 1.00001, 1.00019, 1.00001, 1.0001, 0.99986, 1.00001, 1.00001, - 1.00038, 0.99954, 0.99954, 0.9994, 1.00066, 0.99999, 0.99977, - 1.00022, 1.00054, 1.00001, 0.99977, 1.00026, 0.99975, 1.0001, - 1.00001, 0.99993, 0.9995, 0.99955, 1.00016, 0.99978, 0.99974, - 1.00019, 1.00022, 0.99955, 1.00053, 0.99973, 1.00089, 1.00005, - 0.99967, 1.00048, 0.99973, 1.00002, 1.00034, 0.99973, 0.99973, - 0.99964, 1.00006, 1.00066, 0.99947, 0.99973, 0.98894, 0.99973, 1, - 0.44898, 1, 0.99946, 1, 1.00039, 1.00082, 0.99991, 0.99991, 0.99985, - 1.00022, 1.00023, 1.00061, 1.00006, 0.99966, 0.99973, 0.99973, - 0.99973, 1.00019, 1.0008, 1, 0.99924, 0.99924, 0.99924, 0.99983, - 1.00044, 0.99973, 0.99964, 0.98332, 1, 0.99973, 1, 1, 0.99962, - 0.99895, 1.00016, 0.99977, 1.00016, 0.99977, 1.00016, 0.99977, - 1.00001, 1, 1, 1, 0.99973, 1, 1, 0.99955, 0.99924, 0.99924, 0.99924, - 0.99924, 0.99998, 0.99998, 0.99998, 0.99973, 0.99973, 0.99972, 1, 1, - 1.00267, 0.99999, 0.99998, 0.99998, 1, 0.99998, 1.66475, 1, 0.99973, - 0.99973, 1.00023, 0.99973, 1.00423, 0.99925, 0.99999, 1, 0.99991, - 0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1.00049, 1, 1.00245, 1, - 1, 1, 1, 0.96329, 1, 1.20985, 1.39713, 1.00003, 0.8254, 1.00015, 1, - 1.00035, 1.00027, 1.00031, 1.00031, 1.00003, 1.00031, 1.00031, - 0.99999, 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, - 1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, - 1.00026, 1.00026, 0.95317, 0.99999, 0.99999, 0.99999, 0.99999, - 1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, - 0.9995, 1, 1, 1, 1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - ]; - t.HelveticaItalicMetrics = { lineHeight: 1.35, lineGap: 0.2 }; - t.HelveticaRegularFactors = [ - 0.76116, 1, 1, 1.0006, 1.0006, 1.00006, 0.99973, 0.99973, 0.99982, - 1.00001, 1.00043, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, - 0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, - 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1, - 1.00003, 1.00003, 1.00003, 0.99973, 0.99987, 1.00001, 1.00001, - 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 1, - 1.00001, 0.99973, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022, - 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001, - 1.00001, 1.00026, 1.0006, 1.0006, 1.0006, 0.99949, 0.99973, 0.99998, - 0.99973, 0.99973, 1, 0.99973, 0.99973, 1.0006, 0.99973, 0.99973, - 0.99924, 0.99924, 1, 0.99924, 0.99999, 0.99973, 0.99973, 0.99973, - 0.99973, 0.99998, 1, 1.0006, 0.99973, 1, 0.99977, 1, 1, 1, 1.00005, - 1.0009, 1.00005, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, - 0.99973, 1.0009, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, - 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, - 0.9998, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, - 1.00002, 1.00026, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, - 1.00001, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, - 1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, - 1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, - 0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, - 0.99973, 0.99973, 0.99973, 0.99982, 1, 0.99973, 0.99973, 0.99973, - 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, - 0.99973, 0.99973, 0.99973, 0.99973, 1.06409, 1.00026, 0.99973, - 0.99973, 0.99973, 0.99973, 1, 0.99973, 1, 1.00001, 0.99973, 1.00001, - 0.99973, 1.00001, 0.99973, 0.99977, 1, 0.99977, 1, 0.99977, 1, - 0.99977, 1, 0.99977, 1.04596, 0.99977, 0.99973, 1.00001, 0.99973, - 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, - 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, - 1.00022, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.0006, - 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99924, 1.0006, - 1.0006, 1.00019, 1.00034, 1, 0.99924, 1.00001, 1, 1, 0.99973, - 0.99924, 0.99973, 0.99924, 0.99973, 1.02572, 0.99973, 1.00005, - 0.99973, 0.99924, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, - 0.99973, 0.99999, 0.9998, 0.99973, 1.00022, 0.99973, 1.00022, - 0.99973, 1.00022, 0.99973, 1, 1.00016, 0.99977, 0.99998, 0.99977, - 0.99998, 0.99977, 0.99998, 1.00001, 1, 1.00001, 1, 1.00001, 1, - 1.00001, 1, 1.00026, 1.0006, 1.00026, 0.84533, 1.00026, 1.0006, - 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, - 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.00016, 0.99977, - 1.00001, 1, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 0.99924, - 0.99973, 1.00001, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 1, - 1.00026, 1.0006, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, - 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99928, 1, - 0.99977, 1.00013, 1.00055, 0.99947, 0.99945, 0.99941, 0.99924, - 1.00001, 1.00001, 1.0004, 0.91621, 1.00001, 1.00026, 0.99977, - 1.00022, 1.0006, 1.00001, 1.00005, 0.99999, 0.99977, 1.00015, - 1.00022, 0.99977, 1.00001, 0.99973, 1.00026, 1.00001, 1.00019, - 1.00001, 0.99946, 1, 1.0006, 1.00001, 0.99978, 1.00045, 0.99973, - 0.99924, 1.00023, 0.99978, 0.99966, 1, 1.00065, 1.00045, 1.00019, - 0.99973, 0.99973, 0.99924, 1, 1, 0.96499, 1, 1.00055, 0.99973, - 1.00008, 1.00027, 1, 0.9997, 0.99995, 1.00023, 0.99933, 1.00019, - 1.00015, 1.00031, 0.99924, 1.00023, 0.99973, 1.00023, 1.00031, - 1.00001, 0.99928, 1.00029, 1.00092, 1.00035, 1.00001, 1.0006, - 1.0006, 1, 0.99988, 0.99975, 1, 1.00082, 0.99561, 0.9996, 1.00035, - 1.00001, 0.99962, 1.00001, 1.00092, 0.99964, 1.00001, 0.99963, - 0.99999, 1.00035, 1.00035, 1.00082, 0.99962, 0.99999, 0.99977, - 1.00022, 1.00035, 1.00001, 0.99977, 1.00026, 0.9996, 0.99967, - 1.00001, 1.00034, 1.00074, 1.00054, 1.00053, 1.00063, 0.99971, - 0.99962, 1.00035, 0.99975, 0.99977, 0.99973, 1.00043, 0.99953, - 1.0007, 0.99915, 0.99973, 1.00008, 0.99892, 1.00073, 1.00073, - 1.00114, 0.99915, 1.00073, 0.99955, 0.99973, 1.00092, 0.99973, 1, - 0.99998, 1, 1.0003, 1, 1.00043, 1.00001, 0.99969, 1.0003, 1, - 1.00035, 1.00001, 0.9995, 1, 1.00092, 0.99973, 0.99973, 0.99973, - 1.0007, 0.9995, 1, 0.99924, 1.0006, 0.99924, 0.99972, 1.00062, - 0.99973, 1.00114, 1.00073, 1, 0.99955, 1, 1, 1.00047, 0.99968, - 1.00016, 0.99977, 1.00016, 0.99977, 1.00016, 0.99977, 1.00001, 1, 1, - 1, 0.99973, 1, 1, 0.99955, 0.99924, 0.99924, 0.99924, 0.99924, - 0.99998, 0.99998, 0.99998, 0.99973, 0.99973, 0.99972, 1, 1, 1.00267, - 0.99999, 0.99998, 0.99998, 1, 0.99998, 1.66475, 1, 0.99973, 0.99973, - 1.00023, 0.99973, 0.99971, 0.99925, 1.00023, 1, 0.99991, 0.99984, - 1.00002, 1.00002, 1.00002, 1.00002, 1, 1, 1, 1, 1, 1, 1, 0.96329, 1, - 1.20985, 1.39713, 1.00003, 0.8254, 1.00015, 1, 1.00035, 1.00027, - 1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999, 1.00003, - 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, - 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, 1.36625, - 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, 1.00026, - 0.95317, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, 0.99977, - 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - ]; - t.HelveticaRegularMetrics = { lineHeight: 1.2, lineGap: 0.2 }; - }, - (e, t) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.LiberationSansRegularWidths = - t.LiberationSansRegularMapping = - t.LiberationSansItalicWidths = - t.LiberationSansItalicMapping = - t.LiberationSansBoldWidths = - t.LiberationSansBoldMapping = - t.LiberationSansBoldItalicWidths = - t.LiberationSansBoldItalicMapping = - void 0; - t.LiberationSansBoldWidths = [ - 365, 0, 333, 278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389, - 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, - 556, 556, 333, 333, 584, 584, 584, 611, 975, 722, 722, 722, 722, - 667, 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, 667, 778, - 722, 667, 611, 722, 667, 944, 667, 667, 611, 333, 278, 333, 584, - 556, 333, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556, - 278, 889, 611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556, - 556, 500, 389, 280, 389, 584, 333, 556, 556, 556, 556, 280, 556, - 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, - 556, 278, 333, 333, 365, 556, 834, 834, 834, 611, 722, 722, 722, - 722, 722, 722, 1e3, 722, 667, 667, 667, 667, 278, 278, 278, 278, - 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, - 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 556, 556, 556, - 556, 556, 278, 278, 278, 278, 611, 611, 611, 611, 611, 611, 611, - 549, 611, 611, 611, 611, 611, 556, 611, 556, 722, 556, 722, 556, - 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 719, 722, - 611, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 611, - 778, 611, 778, 611, 778, 611, 722, 611, 722, 611, 278, 278, 278, - 278, 278, 278, 278, 278, 278, 278, 785, 556, 556, 278, 722, 556, - 556, 611, 278, 611, 278, 611, 385, 611, 479, 611, 278, 722, 611, - 722, 611, 722, 611, 708, 723, 611, 778, 611, 778, 611, 778, 611, - 1e3, 944, 722, 389, 722, 389, 722, 389, 667, 556, 667, 556, 667, - 556, 667, 556, 611, 333, 611, 479, 611, 333, 722, 611, 722, 611, - 722, 611, 722, 611, 722, 611, 722, 611, 944, 778, 667, 556, 667, - 611, 500, 611, 500, 611, 500, 278, 556, 722, 556, 1e3, 889, 778, - 611, 667, 556, 611, 333, 333, 333, 333, 333, 333, 333, 333, 333, - 333, 333, 465, 722, 333, 853, 906, 474, 825, 927, 838, 278, 722, - 722, 601, 719, 667, 611, 722, 778, 278, 722, 667, 833, 722, 644, - 778, 722, 667, 600, 611, 667, 821, 667, 809, 802, 278, 667, 615, - 451, 611, 278, 582, 615, 610, 556, 606, 475, 460, 611, 541, 278, - 558, 556, 612, 556, 445, 611, 766, 619, 520, 684, 446, 582, 715, - 576, 753, 845, 278, 582, 611, 582, 845, 667, 669, 885, 567, 711, - 667, 278, 276, 556, 1094, 1062, 875, 610, 722, 622, 719, 722, 719, - 722, 567, 712, 667, 904, 626, 719, 719, 610, 702, 833, 722, 778, - 719, 667, 722, 611, 622, 854, 667, 730, 703, 1005, 1019, 870, 979, - 719, 711, 1031, 719, 556, 618, 615, 417, 635, 556, 709, 497, 615, - 615, 500, 635, 740, 604, 611, 604, 611, 556, 490, 556, 875, 556, - 615, 581, 833, 844, 729, 854, 615, 552, 854, 583, 556, 556, 611, - 417, 552, 556, 278, 281, 278, 969, 906, 611, 500, 615, 556, 604, - 778, 611, 487, 447, 944, 778, 944, 778, 944, 778, 667, 556, 333, - 333, 556, 1e3, 1e3, 552, 278, 278, 278, 278, 500, 500, 500, 556, - 556, 350, 1e3, 1e3, 240, 479, 333, 333, 604, 333, 167, 396, 556, - 556, 1094, 556, 885, 489, 1115, 1e3, 768, 600, 834, 834, 834, 834, - 1e3, 500, 1e3, 500, 1e3, 500, 500, 494, 612, 823, 713, 584, 549, - 713, 979, 722, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604, - 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, - 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, - 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, - 708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354, - 1e3, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052, - 917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 611, 611, 333, - 333, 333, 333, 333, 333, 333, 333, 222, 222, 333, 333, 333, 333, - 333, 333, 333, 333, - ]; - t.LiberationSansBoldMapping = [ - -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, - 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, - 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, - 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, - 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, - 538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, - 902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, - 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, - 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, - 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, - 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, - 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, - 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, - 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, - 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, - 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, - 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, - 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, - 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, - 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, - 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813, - 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218, - 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243, - 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, - 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, - 8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, - 8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, - 8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, - 9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560, - 9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571, - 9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604, - 9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644, - 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786, - 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836, - 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, - ]; - t.LiberationSansBoldItalicWidths = [ - 365, 0, 333, 278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389, - 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, - 556, 556, 333, 333, 584, 584, 584, 611, 975, 722, 722, 722, 722, - 667, 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, 667, 778, - 722, 667, 611, 722, 667, 944, 667, 667, 611, 333, 278, 333, 584, - 556, 333, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556, - 278, 889, 611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556, - 556, 500, 389, 280, 389, 584, 333, 556, 556, 556, 556, 280, 556, - 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, - 556, 278, 333, 333, 365, 556, 834, 834, 834, 611, 722, 722, 722, - 722, 722, 722, 1e3, 722, 667, 667, 667, 667, 278, 278, 278, 278, - 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, - 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 556, 556, 556, - 556, 556, 278, 278, 278, 278, 611, 611, 611, 611, 611, 611, 611, - 549, 611, 611, 611, 611, 611, 556, 611, 556, 722, 556, 722, 556, - 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 740, 722, - 611, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 611, - 778, 611, 778, 611, 778, 611, 722, 611, 722, 611, 278, 278, 278, - 278, 278, 278, 278, 278, 278, 278, 782, 556, 556, 278, 722, 556, - 556, 611, 278, 611, 278, 611, 396, 611, 479, 611, 278, 722, 611, - 722, 611, 722, 611, 708, 723, 611, 778, 611, 778, 611, 778, 611, - 1e3, 944, 722, 389, 722, 389, 722, 389, 667, 556, 667, 556, 667, - 556, 667, 556, 611, 333, 611, 479, 611, 333, 722, 611, 722, 611, - 722, 611, 722, 611, 722, 611, 722, 611, 944, 778, 667, 556, 667, - 611, 500, 611, 500, 611, 500, 278, 556, 722, 556, 1e3, 889, 778, - 611, 667, 556, 611, 333, 333, 333, 333, 333, 333, 333, 333, 333, - 333, 333, 333, 722, 333, 854, 906, 473, 844, 930, 847, 278, 722, - 722, 610, 671, 667, 611, 722, 778, 278, 722, 667, 833, 722, 657, - 778, 718, 667, 590, 611, 667, 822, 667, 829, 781, 278, 667, 620, - 479, 611, 278, 591, 620, 621, 556, 610, 479, 492, 611, 558, 278, - 566, 556, 603, 556, 450, 611, 712, 605, 532, 664, 409, 591, 704, - 578, 773, 834, 278, 591, 611, 591, 834, 667, 667, 886, 614, 719, - 667, 278, 278, 556, 1094, 1042, 854, 622, 719, 677, 719, 722, 708, - 722, 614, 722, 667, 927, 643, 719, 719, 615, 687, 833, 722, 778, - 719, 667, 722, 611, 677, 781, 667, 729, 708, 979, 989, 854, 1e3, - 708, 719, 1042, 729, 556, 619, 604, 534, 618, 556, 736, 510, 611, - 611, 507, 622, 740, 604, 611, 611, 611, 556, 889, 556, 885, 556, - 646, 583, 889, 935, 707, 854, 594, 552, 865, 589, 556, 556, 611, - 469, 563, 556, 278, 278, 278, 969, 906, 611, 507, 619, 556, 611, - 778, 611, 575, 467, 944, 778, 944, 778, 944, 778, 667, 556, 333, - 333, 556, 1e3, 1e3, 552, 278, 278, 278, 278, 500, 500, 500, 556, - 556, 350, 1e3, 1e3, 240, 479, 333, 333, 604, 333, 167, 396, 556, - 556, 1104, 556, 885, 516, 1146, 1e3, 768, 600, 834, 834, 834, 834, - 999, 500, 1e3, 500, 1e3, 500, 500, 494, 612, 823, 713, 584, 549, - 713, 979, 722, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604, - 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, - 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, - 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, - 708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354, - 1e3, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052, - 917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 611, 611, 333, - 333, 333, 333, 333, 333, 333, 333, 222, 222, 333, 333, 333, 333, - 333, 333, 333, 333, - ]; - t.LiberationSansBoldItalicMapping = [ - -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, - 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, - 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, - 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, - 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, - 538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, - 902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, - 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, - 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, - 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, - 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, - 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, - 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, - 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, - 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, - 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, - 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, - 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, - 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, - 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, - 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813, - 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218, - 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243, - 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, - 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, - 8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, - 8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, - 8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, - 9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560, - 9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571, - 9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604, - 9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644, - 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786, - 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836, - 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, - ]; - t.LiberationSansItalicWidths = [ - 365, 0, 333, 278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389, - 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, - 556, 556, 278, 278, 584, 584, 584, 556, 1015, 667, 667, 722, 722, - 667, 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, 667, 778, - 722, 667, 611, 722, 667, 944, 667, 667, 611, 278, 278, 278, 469, - 556, 333, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500, - 222, 833, 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500, - 500, 500, 334, 260, 334, 584, 333, 556, 556, 556, 556, 260, 556, - 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, - 537, 278, 333, 333, 365, 556, 834, 834, 834, 611, 667, 667, 667, - 667, 667, 667, 1e3, 722, 667, 667, 667, 667, 278, 278, 278, 278, - 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, - 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 500, 556, 556, - 556, 556, 278, 278, 278, 278, 556, 556, 556, 556, 556, 556, 556, - 549, 611, 556, 556, 556, 556, 500, 556, 500, 667, 556, 667, 556, - 667, 556, 722, 500, 722, 500, 722, 500, 722, 500, 722, 625, 722, - 556, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 556, - 778, 556, 778, 556, 778, 556, 722, 556, 722, 556, 278, 278, 278, - 278, 278, 278, 278, 222, 278, 278, 733, 444, 500, 222, 667, 500, - 500, 556, 222, 556, 222, 556, 281, 556, 400, 556, 222, 722, 556, - 722, 556, 722, 556, 615, 723, 556, 778, 556, 778, 556, 778, 556, - 1e3, 944, 722, 333, 722, 333, 722, 333, 667, 500, 667, 500, 667, - 500, 667, 500, 611, 278, 611, 354, 611, 278, 722, 556, 722, 556, - 722, 556, 722, 556, 722, 556, 722, 556, 944, 722, 667, 500, 667, - 611, 500, 611, 500, 611, 500, 222, 556, 667, 556, 1e3, 889, 778, - 611, 667, 500, 611, 278, 333, 333, 333, 333, 333, 333, 333, 333, - 333, 333, 333, 667, 278, 789, 846, 389, 794, 865, 775, 222, 667, - 667, 570, 671, 667, 611, 722, 778, 278, 667, 667, 833, 722, 648, - 778, 725, 667, 600, 611, 667, 837, 667, 831, 761, 278, 667, 570, - 439, 555, 222, 550, 570, 571, 500, 556, 439, 463, 555, 542, 222, - 500, 492, 548, 500, 447, 556, 670, 573, 486, 603, 374, 550, 652, - 546, 728, 779, 222, 550, 556, 550, 779, 667, 667, 843, 544, 708, - 667, 278, 278, 500, 1066, 982, 844, 589, 715, 639, 724, 667, 651, - 667, 544, 704, 667, 917, 614, 715, 715, 589, 686, 833, 722, 778, - 725, 667, 722, 611, 639, 795, 667, 727, 673, 920, 923, 805, 886, - 651, 694, 1022, 682, 556, 562, 522, 493, 553, 556, 688, 465, 556, - 556, 472, 564, 686, 550, 556, 556, 556, 500, 833, 500, 835, 500, - 572, 518, 830, 851, 621, 736, 526, 492, 752, 534, 556, 556, 556, - 378, 496, 500, 222, 222, 222, 910, 828, 556, 472, 565, 500, 556, - 778, 556, 492, 339, 944, 722, 944, 722, 944, 722, 667, 500, 333, - 333, 556, 1e3, 1e3, 552, 222, 222, 222, 222, 333, 333, 333, 556, - 556, 350, 1e3, 1e3, 188, 354, 333, 333, 500, 333, 167, 365, 556, - 556, 1094, 556, 885, 323, 1083, 1e3, 768, 600, 834, 834, 834, 834, - 1e3, 500, 998, 500, 1e3, 500, 500, 494, 612, 823, 713, 584, 549, - 713, 979, 719, 274, 549, 549, 584, 549, 549, 604, 584, 604, 604, - 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, - 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, - 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, - 708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354, - 1e3, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052, - 917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 500, 500, 333, - 333, 333, 333, 333, 333, 333, 333, 222, 222, 294, 294, 324, 324, - 316, 328, 398, 285, - ]; - t.LiberationSansItalicMapping = [ - -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, - 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, - 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, - 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, - 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, - 538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, - 902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, - 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, - 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, - 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, - 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, - 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, - 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, - 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, - 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, - 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, - 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, - 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, - 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, - 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, - 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813, - 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218, - 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243, - 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, - 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, - 8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, - 8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, - 8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, - 9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560, - 9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571, - 9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604, - 9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644, - 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786, - 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836, - 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, - ]; - t.LiberationSansRegularWidths = [ - 365, 0, 333, 278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389, - 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, - 556, 556, 278, 278, 584, 584, 584, 556, 1015, 667, 667, 722, 722, - 667, 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, 667, 778, - 722, 667, 611, 722, 667, 944, 667, 667, 611, 278, 278, 278, 469, - 556, 333, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500, - 222, 833, 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500, - 500, 500, 334, 260, 334, 584, 333, 556, 556, 556, 556, 260, 556, - 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, - 537, 278, 333, 333, 365, 556, 834, 834, 834, 611, 667, 667, 667, - 667, 667, 667, 1e3, 722, 667, 667, 667, 667, 278, 278, 278, 278, - 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, - 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 500, 556, 556, - 556, 556, 278, 278, 278, 278, 556, 556, 556, 556, 556, 556, 556, - 549, 611, 556, 556, 556, 556, 500, 556, 500, 667, 556, 667, 556, - 667, 556, 722, 500, 722, 500, 722, 500, 722, 500, 722, 615, 722, - 556, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 556, - 778, 556, 778, 556, 778, 556, 722, 556, 722, 556, 278, 278, 278, - 278, 278, 278, 278, 222, 278, 278, 735, 444, 500, 222, 667, 500, - 500, 556, 222, 556, 222, 556, 292, 556, 334, 556, 222, 722, 556, - 722, 556, 722, 556, 604, 723, 556, 778, 556, 778, 556, 778, 556, - 1e3, 944, 722, 333, 722, 333, 722, 333, 667, 500, 667, 500, 667, - 500, 667, 500, 611, 278, 611, 375, 611, 278, 722, 556, 722, 556, - 722, 556, 722, 556, 722, 556, 722, 556, 944, 722, 667, 500, 667, - 611, 500, 611, 500, 611, 500, 222, 556, 667, 556, 1e3, 889, 778, - 611, 667, 500, 611, 278, 333, 333, 333, 333, 333, 333, 333, 333, - 333, 333, 333, 667, 278, 784, 838, 384, 774, 855, 752, 222, 667, - 667, 551, 668, 667, 611, 722, 778, 278, 667, 668, 833, 722, 650, - 778, 722, 667, 618, 611, 667, 798, 667, 835, 748, 278, 667, 578, - 446, 556, 222, 547, 578, 575, 500, 557, 446, 441, 556, 556, 222, - 500, 500, 576, 500, 448, 556, 690, 569, 482, 617, 395, 547, 648, - 525, 713, 781, 222, 547, 556, 547, 781, 667, 667, 865, 542, 719, - 667, 278, 278, 500, 1057, 1010, 854, 583, 722, 635, 719, 667, 656, - 667, 542, 677, 667, 923, 604, 719, 719, 583, 656, 833, 722, 778, - 719, 667, 722, 611, 635, 760, 667, 740, 667, 917, 938, 792, 885, - 656, 719, 1010, 722, 556, 573, 531, 365, 583, 556, 669, 458, 559, - 559, 438, 583, 688, 552, 556, 542, 556, 500, 458, 500, 823, 500, - 573, 521, 802, 823, 625, 719, 521, 510, 750, 542, 556, 556, 556, - 365, 510, 500, 222, 278, 222, 906, 812, 556, 438, 559, 500, 552, - 778, 556, 489, 411, 944, 722, 944, 722, 944, 722, 667, 500, 333, - 333, 556, 1e3, 1e3, 552, 222, 222, 222, 222, 333, 333, 333, 556, - 556, 350, 1e3, 1e3, 188, 354, 333, 333, 500, 333, 167, 365, 556, - 556, 1094, 556, 885, 323, 1073, 1e3, 768, 600, 834, 834, 834, 834, - 1e3, 500, 1e3, 500, 1e3, 500, 500, 494, 612, 823, 713, 584, 549, - 713, 979, 719, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604, - 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, - 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, - 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, - 708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354, - 1e3, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052, - 917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 500, 500, 333, - 333, 333, 333, 333, 333, 333, 333, 222, 222, 294, 294, 324, 324, - 316, 328, 398, 285, - ]; - t.LiberationSansRegularMapping = [ - -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, - 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, - 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, - 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, - 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, - 538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, - 902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, - 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, - 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, - 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, - 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, - 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, - 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, - 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, - 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, - 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, - 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, - 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, - 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, - 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, - 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813, - 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218, - 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243, - 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, - 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, - 8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, - 8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, - 8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, - 9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560, - 9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571, - 9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604, - 9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644, - 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786, - 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836, - 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, - ]; - }, - (e, t) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.MyriadProRegularMetrics = - t.MyriadProRegularFactors = - t.MyriadProItalicMetrics = - t.MyriadProItalicFactors = - t.MyriadProBoldMetrics = - t.MyriadProBoldItalicMetrics = - t.MyriadProBoldItalicFactors = - t.MyriadProBoldFactors = - void 0; - t.MyriadProBoldFactors = [ - 1.36898, 1, 1, 0.72706, 0.80479, 0.83734, 0.98894, 0.99793, 0.9897, - 0.93884, 0.86209, 0.94292, 0.94292, 1.16661, 1.02058, 0.93582, - 0.96694, 0.93582, 1.19137, 0.99793, 0.99793, 0.99793, 0.99793, - 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.78076, - 0.78076, 1.02058, 1.02058, 1.02058, 0.72851, 0.78966, 0.90838, - 0.83637, 0.82391, 0.96376, 0.80061, 0.86275, 0.8768, 0.95407, - 1.0258, 0.73901, 0.85022, 0.83655, 1.0156, 0.95546, 0.92179, - 0.87107, 0.92179, 0.82114, 0.8096, 0.89713, 0.94438, 0.95353, - 0.94083, 0.91905, 0.90406, 0.9446, 0.94292, 1.18777, 0.94292, - 1.02058, 0.89903, 0.90088, 0.94938, 0.97898, 0.81093, 0.97571, - 0.94938, 1.024, 0.9577, 0.95933, 0.98621, 1.0474, 0.97455, 0.98981, - 0.9672, 0.95933, 0.9446, 0.97898, 0.97407, 0.97646, 0.78036, - 1.10208, 0.95442, 0.95298, 0.97579, 0.9332, 0.94039, 0.938, 0.80687, - 1.01149, 0.80687, 1.02058, 0.80479, 0.99793, 0.99793, 0.99793, - 0.99793, 1.01149, 1.00872, 0.90088, 0.91882, 1.0213, 0.8361, - 1.02058, 0.62295, 0.54324, 0.89022, 1.08595, 1, 1, 0.90088, 1, - 0.97455, 0.93582, 0.90088, 1, 1.05686, 0.8361, 0.99642, 0.99642, - 0.99642, 0.72851, 0.90838, 0.90838, 0.90838, 0.90838, 0.90838, - 0.90838, 0.868, 0.82391, 0.80061, 0.80061, 0.80061, 0.80061, 1.0258, - 1.0258, 1.0258, 1.0258, 0.97484, 0.95546, 0.92179, 0.92179, 0.92179, - 0.92179, 0.92179, 1.02058, 0.92179, 0.94438, 0.94438, 0.94438, - 0.94438, 0.90406, 0.86958, 0.98225, 0.94938, 0.94938, 0.94938, - 0.94938, 0.94938, 0.94938, 0.9031, 0.81093, 0.94938, 0.94938, - 0.94938, 0.94938, 0.98621, 0.98621, 0.98621, 0.98621, 0.93969, - 0.95933, 0.9446, 0.9446, 0.9446, 0.9446, 0.9446, 1.08595, 0.9446, - 0.95442, 0.95442, 0.95442, 0.95442, 0.94039, 0.97898, 0.94039, - 0.90838, 0.94938, 0.90838, 0.94938, 0.90838, 0.94938, 0.82391, - 0.81093, 0.82391, 0.81093, 0.82391, 0.81093, 0.82391, 0.81093, - 0.96376, 0.84313, 0.97484, 0.97571, 0.80061, 0.94938, 0.80061, - 0.94938, 0.80061, 0.94938, 0.80061, 0.94938, 0.80061, 0.94938, - 0.8768, 0.9577, 0.8768, 0.9577, 0.8768, 0.9577, 1, 1, 0.95407, - 0.95933, 0.97069, 0.95933, 1.0258, 0.98621, 1.0258, 0.98621, 1.0258, - 0.98621, 1.0258, 0.98621, 1.0258, 0.98621, 0.887, 1.01591, 0.73901, - 1.0474, 1, 1, 0.97455, 0.83655, 0.98981, 1, 1, 0.83655, 0.73977, - 0.83655, 0.73903, 0.84638, 1.033, 0.95546, 0.95933, 1, 1, 0.95546, - 0.95933, 0.8271, 0.95417, 0.95933, 0.92179, 0.9446, 0.92179, 0.9446, - 0.92179, 0.9446, 0.936, 0.91964, 0.82114, 0.97646, 1, 1, 0.82114, - 0.97646, 0.8096, 0.78036, 0.8096, 0.78036, 1, 1, 0.8096, 0.78036, 1, - 1, 0.89713, 0.77452, 0.89713, 1.10208, 0.94438, 0.95442, 0.94438, - 0.95442, 0.94438, 0.95442, 0.94438, 0.95442, 0.94438, 0.95442, - 0.94438, 0.95442, 0.94083, 0.97579, 0.90406, 0.94039, 0.90406, - 0.9446, 0.938, 0.9446, 0.938, 0.9446, 0.938, 1, 0.99793, 0.90838, - 0.94938, 0.868, 0.9031, 0.92179, 0.9446, 1, 1, 0.89713, 1.10208, - 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, - 0.90088, 0.90088, 0.90989, 0.9358, 0.91945, 0.83181, 0.75261, - 0.87992, 0.82976, 0.96034, 0.83689, 0.97268, 1.0078, 0.90838, - 0.83637, 0.8019, 0.90157, 0.80061, 0.9446, 0.95407, 0.92436, 1.0258, - 0.85022, 0.97153, 1.0156, 0.95546, 0.89192, 0.92179, 0.92361, - 0.87107, 0.96318, 0.89713, 0.93704, 0.95638, 0.91905, 0.91709, - 0.92796, 1.0258, 0.93704, 0.94836, 1.0373, 0.95933, 1.0078, 0.95871, - 0.94836, 0.96174, 0.92601, 0.9498, 0.98607, 0.95776, 0.95933, - 1.05453, 1.0078, 0.98275, 0.9314, 0.95617, 0.91701, 1.05993, 0.9446, - 0.78367, 0.9553, 1, 0.86832, 1.0128, 0.95871, 0.99394, 0.87548, - 0.96361, 0.86774, 1.0078, 0.95871, 0.9446, 0.95871, 0.86774, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0.94083, 0.97579, 0.94083, 0.97579, 0.94083, - 0.97579, 0.90406, 0.94039, 0.96694, 1, 0.89903, 1, 1, 1, 0.93582, - 0.93582, 0.93582, 1, 0.908, 0.908, 0.918, 0.94219, 0.94219, 0.96544, - 1, 1.285, 1, 1, 0.81079, 0.81079, 1, 1, 0.74854, 1, 1, 1, 1, - 0.99793, 1, 1, 1, 0.65, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1.17173, 1, 0.80535, 0.76169, 1.02058, 1.0732, 1.05486, 1, 1, - 1.30692, 1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1.16161, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, - ]; - t.MyriadProBoldMetrics = { lineHeight: 1.2, lineGap: 0.2 }; - t.MyriadProBoldItalicFactors = [ - 1.36898, 1, 1, 0.66227, 0.80779, 0.81625, 0.97276, 0.97276, 0.97733, - 0.92222, 0.83266, 0.94292, 0.94292, 1.16148, 1.02058, 0.93582, - 0.96694, 0.93582, 1.17337, 0.97276, 0.97276, 0.97276, 0.97276, - 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.78076, - 0.78076, 1.02058, 1.02058, 1.02058, 0.71541, 0.76813, 0.85576, - 0.80591, 0.80729, 0.94299, 0.77512, 0.83655, 0.86523, 0.92222, - 0.98621, 0.71743, 0.81698, 0.79726, 0.98558, 0.92222, 0.90637, - 0.83809, 0.90637, 0.80729, 0.76463, 0.86275, 0.90699, 0.91605, - 0.9154, 0.85308, 0.85458, 0.90531, 0.94292, 1.21296, 0.94292, - 1.02058, 0.89903, 1.18616, 0.99613, 0.91677, 0.78216, 0.91677, - 0.90083, 0.98796, 0.9135, 0.92168, 0.95381, 0.98981, 0.95298, - 0.95381, 0.93459, 0.92168, 0.91513, 0.92004, 0.91677, 0.95077, - 0.748, 1.04502, 0.91677, 0.92061, 0.94236, 0.89544, 0.89364, 0.9, - 0.80687, 0.8578, 0.80687, 1.02058, 0.80779, 0.97276, 0.97276, - 0.97276, 0.97276, 0.8578, 0.99973, 1.18616, 0.91339, 1.08074, - 0.82891, 1.02058, 0.55509, 0.71526, 0.89022, 1.08595, 1, 1, 1.18616, - 1, 0.96736, 0.93582, 1.18616, 1, 1.04864, 0.82711, 0.99043, 0.99043, - 0.99043, 0.71541, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576, - 0.85576, 0.845, 0.80729, 0.77512, 0.77512, 0.77512, 0.77512, - 0.98621, 0.98621, 0.98621, 0.98621, 0.95961, 0.92222, 0.90637, - 0.90637, 0.90637, 0.90637, 0.90637, 1.02058, 0.90251, 0.90699, - 0.90699, 0.90699, 0.90699, 0.85458, 0.83659, 0.94951, 0.99613, - 0.99613, 0.99613, 0.99613, 0.99613, 0.99613, 0.85811, 0.78216, - 0.90083, 0.90083, 0.90083, 0.90083, 0.95381, 0.95381, 0.95381, - 0.95381, 0.9135, 0.92168, 0.91513, 0.91513, 0.91513, 0.91513, - 0.91513, 1.08595, 0.91677, 0.91677, 0.91677, 0.91677, 0.91677, - 0.89364, 0.92332, 0.89364, 0.85576, 0.99613, 0.85576, 0.99613, - 0.85576, 0.99613, 0.80729, 0.78216, 0.80729, 0.78216, 0.80729, - 0.78216, 0.80729, 0.78216, 0.94299, 0.76783, 0.95961, 0.91677, - 0.77512, 0.90083, 0.77512, 0.90083, 0.77512, 0.90083, 0.77512, - 0.90083, 0.77512, 0.90083, 0.86523, 0.9135, 0.86523, 0.9135, - 0.86523, 0.9135, 1, 1, 0.92222, 0.92168, 0.92222, 0.92168, 0.98621, - 0.95381, 0.98621, 0.95381, 0.98621, 0.95381, 0.98621, 0.95381, - 0.98621, 0.95381, 0.86036, 0.97096, 0.71743, 0.98981, 1, 1, 0.95298, - 0.79726, 0.95381, 1, 1, 0.79726, 0.6894, 0.79726, 0.74321, 0.81691, - 1.0006, 0.92222, 0.92168, 1, 1, 0.92222, 0.92168, 0.79464, 0.92098, - 0.92168, 0.90637, 0.91513, 0.90637, 0.91513, 0.90637, 0.91513, - 0.909, 0.87514, 0.80729, 0.95077, 1, 1, 0.80729, 0.95077, 0.76463, - 0.748, 0.76463, 0.748, 1, 1, 0.76463, 0.748, 1, 1, 0.86275, 0.72651, - 0.86275, 1.04502, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, - 0.91677, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, 0.91677, - 0.9154, 0.94236, 0.85458, 0.89364, 0.85458, 0.90531, 0.9, 0.90531, - 0.9, 0.90531, 0.9, 1, 0.97276, 0.85576, 0.99613, 0.845, 0.85811, - 0.90251, 0.91677, 1, 1, 0.86275, 1.04502, 1.18616, 1.18616, 1.18616, - 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.00899, - 1.30628, 0.85576, 0.80178, 0.66862, 0.7927, 0.69323, 0.88127, - 0.72459, 0.89711, 0.95381, 0.85576, 0.80591, 0.7805, 0.94729, - 0.77512, 0.90531, 0.92222, 0.90637, 0.98621, 0.81698, 0.92655, - 0.98558, 0.92222, 0.85359, 0.90637, 0.90976, 0.83809, 0.94523, - 0.86275, 0.83509, 0.93157, 0.85308, 0.83392, 0.92346, 0.98621, - 0.83509, 0.92886, 0.91324, 0.92168, 0.95381, 0.90646, 0.92886, - 0.90557, 0.86847, 0.90276, 0.91324, 0.86842, 0.92168, 0.99531, - 0.95381, 0.9224, 0.85408, 0.92699, 0.86847, 1.0051, 0.91513, - 0.80487, 0.93481, 1, 0.88159, 1.05214, 0.90646, 0.97355, 0.81539, - 0.89398, 0.85923, 0.95381, 0.90646, 0.91513, 0.90646, 0.85923, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0.9154, 0.94236, 0.9154, 0.94236, 0.9154, 0.94236, - 0.85458, 0.89364, 0.96694, 1, 0.89903, 1, 1, 1, 0.91782, 0.91782, - 0.91782, 1, 0.896, 0.896, 0.896, 0.9332, 0.9332, 0.95973, 1, 1.26, - 1, 1, 0.80479, 0.80178, 1, 1, 0.85633, 1, 1, 1, 1, 0.97276, 1, 1, 1, - 0.698, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.14542, 1, - 0.79199, 0.78694, 1.02058, 1.03493, 1.05486, 1, 1, 1.23026, 1.08595, - 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1.20006, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - ]; - t.MyriadProBoldItalicMetrics = { lineHeight: 1.2, lineGap: 0.2 }; - t.MyriadProItalicFactors = [ - 1.36898, 1, 1, 0.65507, 0.84943, 0.85639, 0.88465, 0.88465, 0.86936, - 0.88307, 0.86948, 0.85283, 0.85283, 1.06383, 1.02058, 0.75945, - 0.9219, 0.75945, 1.17337, 0.88465, 0.88465, 0.88465, 0.88465, - 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.75945, - 0.75945, 1.02058, 1.02058, 1.02058, 0.69046, 0.70926, 0.85158, - 0.77812, 0.76852, 0.89591, 0.70466, 0.76125, 0.80094, 0.86822, - 0.83864, 0.728, 0.77212, 0.79475, 0.93637, 0.87514, 0.8588, 0.76013, - 0.8588, 0.72421, 0.69866, 0.77598, 0.85991, 0.80811, 0.87832, - 0.78112, 0.77512, 0.8562, 1.0222, 1.18417, 1.0222, 1.27014, 0.89903, - 1.15012, 0.93859, 0.94399, 0.846, 0.94399, 0.81453, 1.0186, 0.94219, - 0.96017, 1.03075, 1.02175, 0.912, 1.03075, 0.96998, 0.96017, - 0.93859, 0.94399, 0.94399, 0.95493, 0.746, 1.12658, 0.94578, 0.91, - 0.979, 0.882, 0.882, 0.83, 0.85034, 0.83537, 0.85034, 1.02058, - 0.70869, 0.88465, 0.88465, 0.88465, 0.88465, 0.83537, 0.90083, - 1.15012, 0.9161, 0.94565, 0.73541, 1.02058, 0.53609, 0.69353, - 0.79519, 1.08595, 1, 1, 1.15012, 1, 0.91974, 0.75945, 1.15012, 1, - 0.9446, 0.73361, 0.9005, 0.9005, 0.9005, 0.62864, 0.85158, 0.85158, - 0.85158, 0.85158, 0.85158, 0.85158, 0.773, 0.76852, 0.70466, - 0.70466, 0.70466, 0.70466, 0.83864, 0.83864, 0.83864, 0.83864, - 0.90561, 0.87514, 0.8588, 0.8588, 0.8588, 0.8588, 0.8588, 1.02058, - 0.85751, 0.85991, 0.85991, 0.85991, 0.85991, 0.77512, 0.76013, - 0.88075, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859, - 0.8075, 0.846, 0.81453, 0.81453, 0.81453, 0.81453, 0.82424, 0.82424, - 0.82424, 0.82424, 0.9278, 0.96017, 0.93859, 0.93859, 0.93859, - 0.93859, 0.93859, 1.08595, 0.8562, 0.94578, 0.94578, 0.94578, - 0.94578, 0.882, 0.94578, 0.882, 0.85158, 0.93859, 0.85158, 0.93859, - 0.85158, 0.93859, 0.76852, 0.846, 0.76852, 0.846, 0.76852, 0.846, - 0.76852, 0.846, 0.89591, 0.8544, 0.90561, 0.94399, 0.70466, 0.81453, - 0.70466, 0.81453, 0.70466, 0.81453, 0.70466, 0.81453, 0.70466, - 0.81453, 0.80094, 0.94219, 0.80094, 0.94219, 0.80094, 0.94219, 1, 1, - 0.86822, 0.96017, 0.86822, 0.96017, 0.83864, 0.82424, 0.83864, - 0.82424, 0.83864, 0.82424, 0.83864, 1.03075, 0.83864, 0.82424, - 0.81402, 1.02738, 0.728, 1.02175, 1, 1, 0.912, 0.79475, 1.03075, 1, - 1, 0.79475, 0.83911, 0.79475, 0.66266, 0.80553, 1.06676, 0.87514, - 0.96017, 1, 1, 0.87514, 0.96017, 0.86865, 0.87396, 0.96017, 0.8588, - 0.93859, 0.8588, 0.93859, 0.8588, 0.93859, 0.867, 0.84759, 0.72421, - 0.95493, 1, 1, 0.72421, 0.95493, 0.69866, 0.746, 0.69866, 0.746, 1, - 1, 0.69866, 0.746, 1, 1, 0.77598, 0.88417, 0.77598, 1.12658, - 0.85991, 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.85991, - 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.87832, 0.979, - 0.77512, 0.882, 0.77512, 0.8562, 0.83, 0.8562, 0.83, 0.8562, 0.83, - 1, 0.88465, 0.85158, 0.93859, 0.773, 0.8075, 0.85751, 0.8562, 1, 1, - 0.77598, 1.12658, 1.15012, 1.15012, 1.15012, 1.15012, 1.15012, - 1.15313, 1.15012, 1.15012, 1.15012, 1.08106, 1.03901, 0.85158, - 0.77025, 0.62264, 0.7646, 0.65351, 0.86026, 0.69461, 0.89947, - 1.03075, 0.85158, 0.77812, 0.76449, 0.88836, 0.70466, 0.8562, - 0.86822, 0.8588, 0.83864, 0.77212, 0.85308, 0.93637, 0.87514, - 0.82352, 0.8588, 0.85701, 0.76013, 0.89058, 0.77598, 0.8156, - 0.82565, 0.78112, 0.77899, 0.89386, 0.83864, 0.8156, 0.9486, - 0.92388, 0.96186, 1.03075, 0.91123, 0.9486, 0.93298, 0.878, 0.93942, - 0.92388, 0.84596, 0.96186, 0.95119, 1.03075, 0.922, 0.88787, - 0.95829, 0.88, 0.93559, 0.93859, 0.78815, 0.93758, 1, 0.89217, - 1.03737, 0.91123, 0.93969, 0.77487, 0.85769, 0.86799, 1.03075, - 0.91123, 0.93859, 0.91123, 0.86799, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.87832, - 0.979, 0.87832, 0.979, 0.87832, 0.979, 0.77512, 0.882, 0.9219, 1, - 0.89903, 1, 1, 1, 0.87321, 0.87321, 0.87321, 1, 1.027, 1.027, 1.027, - 0.86847, 0.86847, 0.79121, 1, 1.124, 1, 1, 0.73572, 0.73572, 1, 1, - 0.85034, 1, 1, 1, 1, 0.88465, 1, 1, 1, 0.669, 1, 1.36145, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1.04828, 1, 0.74948, 0.75187, 1.02058, - 0.98391, 1.02119, 1, 1, 1.06233, 1.08595, 1.08595, 1, 1.08595, - 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05233, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - ]; - t.MyriadProItalicMetrics = { lineHeight: 1.2, lineGap: 0.2 }; - t.MyriadProRegularFactors = [ - 1.36898, 1, 1, 0.76305, 0.82784, 0.94935, 0.89364, 0.92241, 0.89073, - 0.90706, 0.98472, 0.85283, 0.85283, 1.0664, 1.02058, 0.74505, - 0.9219, 0.74505, 1.23456, 0.92241, 0.92241, 0.92241, 0.92241, - 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.74505, - 0.74505, 1.02058, 1.02058, 1.02058, 0.73002, 0.72601, 0.91755, - 0.8126, 0.80314, 0.92222, 0.73764, 0.79726, 0.83051, 0.90284, - 0.86023, 0.74, 0.8126, 0.84869, 0.96518, 0.91115, 0.8858, 0.79761, - 0.8858, 0.74498, 0.73914, 0.81363, 0.89591, 0.83659, 0.89633, - 0.85608, 0.8111, 0.90531, 1.0222, 1.22736, 1.0222, 1.27014, 0.89903, - 0.90088, 0.86667, 1.0231, 0.896, 1.01411, 0.90083, 1.05099, 1.00512, - 0.99793, 1.05326, 1.09377, 0.938, 1.06226, 1.00119, 0.99793, - 0.98714, 1.0231, 1.01231, 0.98196, 0.792, 1.19137, 0.99074, 0.962, - 1.01915, 0.926, 0.942, 0.856, 0.85034, 0.92006, 0.85034, 1.02058, - 0.69067, 0.92241, 0.92241, 0.92241, 0.92241, 0.92006, 0.9332, - 0.90088, 0.91882, 0.93484, 0.75339, 1.02058, 0.56866, 0.54324, - 0.79519, 1.08595, 1, 1, 0.90088, 1, 0.95325, 0.74505, 0.90088, 1, - 0.97198, 0.75339, 0.91009, 0.91009, 0.91009, 0.66466, 0.91755, - 0.91755, 0.91755, 0.91755, 0.91755, 0.91755, 0.788, 0.80314, - 0.73764, 0.73764, 0.73764, 0.73764, 0.86023, 0.86023, 0.86023, - 0.86023, 0.92915, 0.91115, 0.8858, 0.8858, 0.8858, 0.8858, 0.8858, - 1.02058, 0.8858, 0.89591, 0.89591, 0.89591, 0.89591, 0.8111, - 0.79611, 0.89713, 0.86667, 0.86667, 0.86667, 0.86667, 0.86667, - 0.86667, 0.86936, 0.896, 0.90083, 0.90083, 0.90083, 0.90083, - 0.84224, 0.84224, 0.84224, 0.84224, 0.97276, 0.99793, 0.98714, - 0.98714, 0.98714, 0.98714, 0.98714, 1.08595, 0.89876, 0.99074, - 0.99074, 0.99074, 0.99074, 0.942, 1.0231, 0.942, 0.91755, 0.86667, - 0.91755, 0.86667, 0.91755, 0.86667, 0.80314, 0.896, 0.80314, 0.896, - 0.80314, 0.896, 0.80314, 0.896, 0.92222, 0.93372, 0.92915, 1.01411, - 0.73764, 0.90083, 0.73764, 0.90083, 0.73764, 0.90083, 0.73764, - 0.90083, 0.73764, 0.90083, 0.83051, 1.00512, 0.83051, 1.00512, - 0.83051, 1.00512, 1, 1, 0.90284, 0.99793, 0.90976, 0.99793, 0.86023, - 0.84224, 0.86023, 0.84224, 0.86023, 0.84224, 0.86023, 1.05326, - 0.86023, 0.84224, 0.82873, 1.07469, 0.74, 1.09377, 1, 1, 0.938, - 0.84869, 1.06226, 1, 1, 0.84869, 0.83704, 0.84869, 0.81441, 0.85588, - 1.08927, 0.91115, 0.99793, 1, 1, 0.91115, 0.99793, 0.91887, 0.90991, - 0.99793, 0.8858, 0.98714, 0.8858, 0.98714, 0.8858, 0.98714, 0.894, - 0.91434, 0.74498, 0.98196, 1, 1, 0.74498, 0.98196, 0.73914, 0.792, - 0.73914, 0.792, 1, 1, 0.73914, 0.792, 1, 1, 0.81363, 0.904, 0.81363, - 1.19137, 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, - 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, 0.89633, - 1.01915, 0.8111, 0.942, 0.8111, 0.90531, 0.856, 0.90531, 0.856, - 0.90531, 0.856, 1, 0.92241, 0.91755, 0.86667, 0.788, 0.86936, - 0.8858, 0.89876, 1, 1, 0.81363, 1.19137, 0.90088, 0.90088, 0.90088, - 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90388, - 1.03901, 0.92138, 0.78105, 0.7154, 0.86169, 0.80513, 0.94007, - 0.82528, 0.98612, 1.06226, 0.91755, 0.8126, 0.81884, 0.92819, - 0.73764, 0.90531, 0.90284, 0.8858, 0.86023, 0.8126, 0.91172, - 0.96518, 0.91115, 0.83089, 0.8858, 0.87791, 0.79761, 0.89297, - 0.81363, 0.88157, 0.89992, 0.85608, 0.81992, 0.94307, 0.86023, - 0.88157, 0.95308, 0.98699, 0.99793, 1.06226, 0.95817, 0.95308, - 0.97358, 0.928, 0.98088, 0.98699, 0.92761, 0.99793, 0.96017, - 1.06226, 0.986, 0.944, 0.95978, 0.938, 0.96705, 0.98714, 0.80442, - 0.98972, 1, 0.89762, 1.04552, 0.95817, 0.99007, 0.87064, 0.91879, - 0.88888, 1.06226, 0.95817, 0.98714, 0.95817, 0.88888, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0.89633, 1.01915, 0.89633, 1.01915, 0.89633, 1.01915, - 0.8111, 0.942, 0.9219, 1, 0.89903, 1, 1, 1, 0.93173, 0.93173, - 0.93173, 1, 1.06304, 1.06304, 1.06904, 0.89903, 0.89903, 0.80549, 1, - 1.156, 1, 1, 0.76575, 0.76575, 1, 1, 0.72458, 1, 1, 1, 1, 0.92241, - 1, 1, 1, 0.619, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1.07257, 1, 0.74705, 0.71119, 1.02058, 1.024, 1.02119, 1, 1, 1.1536, - 1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1.05638, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - ]; - t.MyriadProRegularMetrics = { lineHeight: 1.2, lineGap: 0.2 }; - }, - (e, t) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.SegoeuiRegularMetrics = - t.SegoeuiRegularFactors = - t.SegoeuiItalicMetrics = - t.SegoeuiItalicFactors = - t.SegoeuiBoldMetrics = - t.SegoeuiBoldItalicMetrics = - t.SegoeuiBoldItalicFactors = - t.SegoeuiBoldFactors = - void 0; - t.SegoeuiBoldFactors = [ - 1.76738, 1, 1, 0.99297, 0.9824, 1.04016, 1.06497, 1.03424, 0.97529, - 1.17647, 1.23203, 1.1085, 1.1085, 1.16939, 1.2107, 0.9754, 1.21408, - 0.9754, 1.59578, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, - 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 0.81378, 0.81378, - 1.2107, 1.2107, 1.2107, 0.71703, 0.97847, 0.97363, 0.88776, 0.8641, - 1.02096, 0.79795, 0.85132, 0.914, 1.06085, 1.1406, 0.8007, 0.89858, - 0.83693, 1.14889, 1.09398, 0.97489, 0.92094, 0.97489, 0.90399, - 0.84041, 0.95923, 1.00135, 1, 1.06467, 0.98243, 0.90996, 0.99361, - 1.1085, 1.56942, 1.1085, 1.2107, 0.74627, 0.94282, 0.96752, 1.01519, - 0.86304, 1.01359, 0.97278, 1.15103, 1.01359, 0.98561, 1.02285, - 1.02285, 1.00527, 1.02285, 1.0302, 0.99041, 1.0008, 1.01519, - 1.01359, 1.02258, 0.79104, 1.16862, 0.99041, 0.97454, 1.02511, - 0.99298, 0.96752, 0.95801, 0.94856, 1.16579, 0.94856, 1.2107, - 0.9824, 1.03424, 1.03424, 1, 1.03424, 1.16579, 0.8727, 1.3871, - 1.18622, 1.10818, 1.04478, 1.2107, 1.18622, 0.75155, 0.94994, - 1.28826, 1.21408, 1.21408, 0.91056, 1, 0.91572, 0.9754, 0.64663, - 1.18328, 1.24866, 1.04478, 1.14169, 1.15749, 1.17389, 0.71703, - 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.93506, - 0.8641, 0.79795, 0.79795, 0.79795, 0.79795, 1.1406, 1.1406, 1.1406, - 1.1406, 1.02096, 1.09398, 0.97426, 0.97426, 0.97426, 0.97426, - 0.97426, 1.2107, 0.97489, 1.00135, 1.00135, 1.00135, 1.00135, - 0.90996, 0.92094, 1.02798, 0.96752, 0.96752, 0.96752, 0.96752, - 0.96752, 0.96752, 0.93136, 0.86304, 0.97278, 0.97278, 0.97278, - 0.97278, 1.02285, 1.02285, 1.02285, 1.02285, 0.97122, 0.99041, 1, 1, - 1, 1, 1, 1.28826, 1.0008, 0.99041, 0.99041, 0.99041, 0.99041, - 0.96752, 1.01519, 0.96752, 0.97363, 0.96752, 0.97363, 0.96752, - 0.97363, 0.96752, 0.8641, 0.86304, 0.8641, 0.86304, 0.8641, 0.86304, - 0.8641, 0.86304, 1.02096, 1.03057, 1.02096, 1.03517, 0.79795, - 0.97278, 0.79795, 0.97278, 0.79795, 0.97278, 0.79795, 0.97278, - 0.79795, 0.97278, 0.914, 1.01359, 0.914, 1.01359, 0.914, 1.01359, 1, - 1, 1.06085, 0.98561, 1.06085, 1.00879, 1.1406, 1.02285, 1.1406, - 1.02285, 1.1406, 1.02285, 1.1406, 1.02285, 1.1406, 1.02285, 0.97138, - 1.08692, 0.8007, 1.02285, 1, 1, 1.00527, 0.83693, 1.02285, 1, 1, - 0.83693, 0.9455, 0.83693, 0.90418, 0.83693, 1.13005, 1.09398, - 0.99041, 1, 1, 1.09398, 0.99041, 0.96692, 1.09251, 0.99041, 0.97489, - 1.0008, 0.97489, 1.0008, 0.97489, 1.0008, 0.93994, 0.97931, 0.90399, - 1.02258, 1, 1, 0.90399, 1.02258, 0.84041, 0.79104, 0.84041, 0.79104, - 0.84041, 0.79104, 0.84041, 0.79104, 1, 1, 0.95923, 1.07034, 0.95923, - 1.16862, 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, - 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, 1.06467, - 1.02511, 0.90996, 0.96752, 0.90996, 0.99361, 0.95801, 0.99361, - 0.95801, 0.99361, 0.95801, 1.07733, 1.03424, 0.97363, 0.96752, - 0.93506, 0.93136, 0.97489, 1.0008, 1, 1, 0.95923, 1.16862, 1.15103, - 1.15103, 1.01173, 1.03959, 0.75953, 0.81378, 0.79912, 1.15103, - 1.21994, 0.95161, 0.87815, 1.01149, 0.81525, 0.7676, 0.98167, - 1.01134, 1.02546, 0.84097, 1.03089, 1.18102, 0.97363, 0.88776, - 0.85134, 0.97826, 0.79795, 0.99361, 1.06085, 0.97489, 1.1406, - 0.89858, 1.0388, 1.14889, 1.09398, 0.86039, 0.97489, 1.0595, - 0.92094, 0.94793, 0.95923, 0.90996, 0.99346, 0.98243, 1.02112, - 0.95493, 1.1406, 0.90996, 1.03574, 1.02597, 1.0008, 1.18102, - 1.06628, 1.03574, 1.0192, 1.01932, 1.00886, 0.97531, 1.0106, 1.0008, - 1.13189, 1.18102, 1.02277, 0.98683, 1.0016, 0.99561, 1.07237, - 1.0008, 0.90434, 0.99921, 0.93803, 0.8965, 1.23085, 1.06628, - 1.04983, 0.96268, 1.0499, 0.98439, 1.18102, 1.06628, 1.0008, - 1.06628, 0.98439, 0.79795, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1.09466, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0.97278, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.02065, 1, 1, 1, 1, 1, - 1, 1.06467, 1.02511, 1.06467, 1.02511, 1.06467, 1.02511, 0.90996, - 0.96752, 1, 1.21408, 0.89903, 1, 1, 0.75155, 1.04394, 1.04394, - 1.04394, 1.04394, 0.98633, 0.98633, 0.98633, 0.73047, 0.73047, - 1.20642, 0.91211, 1.25635, 1.222, 1.02956, 1.03372, 1.03372, - 0.96039, 1.24633, 1, 1.12454, 0.93503, 1.03424, 1.19687, 1.03424, 1, - 1, 1, 0.771, 1, 1, 1.15749, 1.15749, 1.15749, 1.10948, 0.86279, - 0.94434, 0.86279, 0.94434, 0.86182, 1, 1, 1.16897, 1, 0.96085, - 0.90137, 1.2107, 1.18416, 1.13973, 0.69825, 0.9716, 2.10339, - 1.29004, 1.29004, 1.21172, 1.29004, 1.29004, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025, - 1.18874, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1, - 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.09193, 1.09193, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - ]; - t.SegoeuiBoldMetrics = { lineHeight: 1.33008, lineGap: 0 }; - t.SegoeuiBoldItalicFactors = [ - 1.76738, 1, 1, 0.98946, 1.03959, 1.04016, 1.02809, 1.036, 0.97639, - 1.10953, 1.23203, 1.11144, 1.11144, 1.16939, 1.21237, 0.9754, - 1.21261, 0.9754, 1.59754, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, - 1.036, 1.036, 1.036, 1.036, 0.81378, 0.81378, 1.21237, 1.21237, - 1.21237, 0.73541, 0.97847, 0.97363, 0.89723, 0.87897, 1.0426, - 0.79429, 0.85292, 0.91149, 1.05815, 1.1406, 0.79631, 0.90128, - 0.83853, 1.04396, 1.10615, 0.97552, 0.94436, 0.97552, 0.88641, - 0.80527, 0.96083, 1.00135, 1, 1.06777, 0.9817, 0.91142, 0.99361, - 1.11144, 1.57293, 1.11144, 1.21237, 0.74627, 1.31818, 1.06585, - 0.97042, 0.83055, 0.97042, 0.93503, 1.1261, 0.97042, 0.97922, - 1.14236, 0.94552, 1.01054, 1.14236, 1.02471, 0.97922, 0.94165, - 0.97042, 0.97042, 1.0276, 0.78929, 1.1261, 0.97922, 0.95874, - 1.02197, 0.98507, 0.96752, 0.97168, 0.95107, 1.16579, 0.95107, - 1.21237, 1.03959, 1.036, 1.036, 1, 1.036, 1.16579, 0.87357, 1.31818, - 1.18754, 1.26781, 1.05356, 1.21237, 1.18622, 0.79487, 0.94994, - 1.29004, 1.24047, 1.24047, 1.31818, 1, 0.91484, 0.9754, 1.31818, - 1.1349, 1.24866, 1.05356, 1.13934, 1.15574, 1.17389, 0.73541, - 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.94385, - 0.87897, 0.79429, 0.79429, 0.79429, 0.79429, 1.1406, 1.1406, 1.1406, - 1.1406, 1.0426, 1.10615, 0.97552, 0.97552, 0.97552, 0.97552, - 0.97552, 1.21237, 0.97552, 1.00135, 1.00135, 1.00135, 1.00135, - 0.91142, 0.94436, 0.98721, 1.06585, 1.06585, 1.06585, 1.06585, - 1.06585, 1.06585, 0.96705, 0.83055, 0.93503, 0.93503, 0.93503, - 0.93503, 1.14236, 1.14236, 1.14236, 1.14236, 0.93125, 0.97922, - 0.94165, 0.94165, 0.94165, 0.94165, 0.94165, 1.29004, 0.94165, - 0.97922, 0.97922, 0.97922, 0.97922, 0.96752, 0.97042, 0.96752, - 0.97363, 1.06585, 0.97363, 1.06585, 0.97363, 1.06585, 0.87897, - 0.83055, 0.87897, 0.83055, 0.87897, 0.83055, 0.87897, 0.83055, - 1.0426, 1.0033, 1.0426, 0.97042, 0.79429, 0.93503, 0.79429, 0.93503, - 0.79429, 0.93503, 0.79429, 0.93503, 0.79429, 0.93503, 0.91149, - 0.97042, 0.91149, 0.97042, 0.91149, 0.97042, 1, 1, 1.05815, 0.97922, - 1.05815, 0.97922, 1.1406, 1.14236, 1.1406, 1.14236, 1.1406, 1.14236, - 1.1406, 1.14236, 1.1406, 1.14236, 0.97441, 1.04302, 0.79631, - 1.01582, 1, 1, 1.01054, 0.83853, 1.14236, 1, 1, 0.83853, 1.09125, - 0.83853, 0.90418, 0.83853, 1.19508, 1.10615, 0.97922, 1, 1, 1.10615, - 0.97922, 1.01034, 1.10466, 0.97922, 0.97552, 0.94165, 0.97552, - 0.94165, 0.97552, 0.94165, 0.91602, 0.91981, 0.88641, 1.0276, 1, 1, - 0.88641, 1.0276, 0.80527, 0.78929, 0.80527, 0.78929, 0.80527, - 0.78929, 0.80527, 0.78929, 1, 1, 0.96083, 1.05403, 0.95923, 1.16862, - 1.00135, 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.00135, - 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.06777, 1.02197, - 0.91142, 0.96752, 0.91142, 0.99361, 0.97168, 0.99361, 0.97168, - 0.99361, 0.97168, 1.23199, 1.036, 0.97363, 1.06585, 0.94385, - 0.96705, 0.97552, 0.94165, 1, 1, 0.96083, 1.1261, 1.31818, 1.31818, - 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, - 0.95161, 1.27126, 1.00811, 0.83284, 0.77702, 0.99137, 0.95253, - 1.0347, 0.86142, 1.07205, 1.14236, 0.97363, 0.89723, 0.86869, - 1.09818, 0.79429, 0.99361, 1.05815, 0.97552, 1.1406, 0.90128, - 1.06662, 1.04396, 1.10615, 0.84918, 0.97552, 1.04694, 0.94436, - 0.98015, 0.96083, 0.91142, 1.00356, 0.9817, 1.01945, 0.98999, - 1.1406, 0.91142, 1.04961, 0.9898, 1.00639, 1.14236, 1.07514, - 1.04961, 0.99607, 1.02897, 1.008, 0.9898, 0.95134, 1.00639, 1.11121, - 1.14236, 1.00518, 0.97981, 1.02186, 1, 1.08578, 0.94165, 0.99314, - 0.98387, 0.93028, 0.93377, 1.35125, 1.07514, 1.10687, 0.93491, - 1.04232, 1.00351, 1.14236, 1.07514, 0.94165, 1.07514, 1.00351, - 0.79429, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.09097, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.93503, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 0.96609, 1, 1, 1, 1, 1, 1, 1.06777, 1.02197, - 1.06777, 1.02197, 1.06777, 1.02197, 0.91142, 0.96752, 1, 1.21261, - 0.89903, 1, 1, 0.75155, 1.04745, 1.04745, 1.04745, 1.04394, 0.98633, - 0.98633, 0.98633, 0.72959, 0.72959, 1.20502, 0.91406, 1.26514, - 1.222, 1.02956, 1.03372, 1.03372, 0.96039, 1.24633, 1, 1.09125, - 0.93327, 1.03336, 1.16541, 1.036, 1, 1, 1, 0.771, 1, 1, 1.15574, - 1.15574, 1.15574, 1.15574, 0.86364, 0.94434, 0.86279, 0.94434, - 0.86224, 1, 1, 1.16798, 1, 0.96085, 0.90068, 1.21237, 1.18416, - 1.13904, 0.69825, 0.9716, 2.10339, 1.29004, 1.29004, 1.21339, - 1.29004, 1.29004, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.42603, 1, 0.99862, 0.99862, 1, - 0.87025, 0.87025, 0.87025, 0.87025, 1.18775, 1.42603, 1, 1.42603, - 1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, - 1, 1, 1, 1.13269, 1.13269, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, - ]; - t.SegoeuiBoldItalicMetrics = { lineHeight: 1.33008, lineGap: 0 }; - t.SegoeuiItalicFactors = [ - 1.76738, 1, 1, 0.98946, 1.14763, 1.05365, 1.06234, 0.96927, 0.92586, - 1.15373, 1.18414, 0.91349, 0.91349, 1.07403, 1.17308, 0.78383, - 1.20088, 0.78383, 1.42531, 0.96927, 0.96927, 0.96927, 0.96927, - 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.78383, - 0.78383, 1.17308, 1.17308, 1.17308, 0.77349, 0.94565, 0.94729, - 0.85944, 0.88506, 0.9858, 0.74817, 0.80016, 0.88449, 0.98039, - 0.95782, 0.69238, 0.89898, 0.83231, 0.98183, 1.03989, 0.96924, - 0.86237, 0.96924, 0.80595, 0.74524, 0.86091, 0.95402, 0.94143, - 0.98448, 0.8858, 0.83089, 0.93285, 1.0949, 1.39016, 1.0949, 1.45994, - 0.74627, 1.04839, 0.97454, 0.97454, 0.87207, 0.97454, 0.87533, - 1.06151, 0.97454, 1.00176, 1.16484, 1.08132, 0.98047, 1.16484, - 1.02989, 1.01054, 0.96225, 0.97454, 0.97454, 1.06598, 0.79004, - 1.16344, 1.00351, 0.94629, 0.9973, 0.91016, 0.96777, 0.9043, - 0.91082, 0.92481, 0.91082, 1.17308, 0.95748, 0.96927, 0.96927, 1, - 0.96927, 0.92481, 0.80597, 1.04839, 1.23393, 1.1781, 0.9245, - 1.17308, 1.20808, 0.63218, 0.94261, 1.24822, 1.09971, 1.09971, - 1.04839, 1, 0.85273, 0.78032, 1.04839, 1.09971, 1.22326, 0.9245, - 1.09836, 1.13525, 1.15222, 0.70424, 0.94729, 0.94729, 0.94729, - 0.94729, 0.94729, 0.94729, 0.85498, 0.88506, 0.74817, 0.74817, - 0.74817, 0.74817, 0.95782, 0.95782, 0.95782, 0.95782, 0.9858, - 1.03989, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924, 1.17308, - 0.96924, 0.95402, 0.95402, 0.95402, 0.95402, 0.83089, 0.86237, - 0.88409, 0.97454, 0.97454, 0.97454, 0.97454, 0.97454, 0.97454, - 0.92916, 0.87207, 0.87533, 0.87533, 0.87533, 0.87533, 0.93146, - 0.93146, 0.93146, 0.93146, 0.93854, 1.01054, 0.96225, 0.96225, - 0.96225, 0.96225, 0.96225, 1.24822, 0.8761, 1.00351, 1.00351, - 1.00351, 1.00351, 0.96777, 0.97454, 0.96777, 0.94729, 0.97454, - 0.94729, 0.97454, 0.94729, 0.97454, 0.88506, 0.87207, 0.88506, - 0.87207, 0.88506, 0.87207, 0.88506, 0.87207, 0.9858, 0.95391, - 0.9858, 0.97454, 0.74817, 0.87533, 0.74817, 0.87533, 0.74817, - 0.87533, 0.74817, 0.87533, 0.74817, 0.87533, 0.88449, 0.97454, - 0.88449, 0.97454, 0.88449, 0.97454, 1, 1, 0.98039, 1.00176, 0.98039, - 1.00176, 0.95782, 0.93146, 0.95782, 0.93146, 0.95782, 0.93146, - 0.95782, 1.16484, 0.95782, 0.93146, 0.84421, 1.12761, 0.69238, - 1.08132, 1, 1, 0.98047, 0.83231, 1.16484, 1, 1, 0.84723, 1.04861, - 0.84723, 0.78755, 0.83231, 1.23736, 1.03989, 1.01054, 1, 1, 1.03989, - 1.01054, 0.9857, 1.03849, 1.01054, 0.96924, 0.96225, 0.96924, - 0.96225, 0.96924, 0.96225, 0.92383, 0.90171, 0.80595, 1.06598, 1, 1, - 0.80595, 1.06598, 0.74524, 0.79004, 0.74524, 0.79004, 0.74524, - 0.79004, 0.74524, 0.79004, 1, 1, 0.86091, 1.02759, 0.85771, 1.16344, - 0.95402, 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.95402, - 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.98448, 0.9973, - 0.83089, 0.96777, 0.83089, 0.93285, 0.9043, 0.93285, 0.9043, - 0.93285, 0.9043, 1.31868, 0.96927, 0.94729, 0.97454, 0.85498, - 0.92916, 0.96924, 0.8761, 1, 1, 0.86091, 1.16344, 1.04839, 1.04839, - 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, - 0.81965, 0.81965, 0.94729, 0.78032, 0.71022, 0.90883, 0.84171, - 0.99877, 0.77596, 1.05734, 1.2, 0.94729, 0.85944, 0.82791, 0.9607, - 0.74817, 0.93285, 0.98039, 0.96924, 0.95782, 0.89898, 0.98316, - 0.98183, 1.03989, 0.78614, 0.96924, 0.97642, 0.86237, 0.86075, - 0.86091, 0.83089, 0.90082, 0.8858, 0.97296, 1.01284, 0.95782, - 0.83089, 1.0976, 1.04, 1.03342, 1.2, 1.0675, 1.0976, 0.98205, - 1.03809, 1.05097, 1.04, 0.95364, 1.03342, 1.05401, 1.2, 1.02148, - 1.0119, 1.04724, 1.0127, 1.02732, 0.96225, 0.8965, 0.97783, 0.93574, - 0.94818, 1.30679, 1.0675, 1.11826, 0.99821, 1.0557, 1.0326, 1.2, - 1.0675, 0.96225, 1.0675, 1.0326, 0.74817, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1.03754, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0.87533, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.98705, 1, 1, - 1, 1, 1, 1, 0.98448, 0.9973, 0.98448, 0.9973, 0.98448, 0.9973, - 0.83089, 0.96777, 1, 1.20088, 0.89903, 1, 1, 0.75155, 0.94945, - 0.94945, 0.94945, 0.94945, 1.12317, 1.12317, 1.12317, 0.67603, - 0.67603, 1.15621, 0.73584, 1.21191, 1.22135, 1.06483, 0.94868, - 0.94868, 0.95996, 1.24633, 1, 1.07497, 0.87709, 0.96927, 1.01473, - 0.96927, 1, 1, 1, 0.77295, 1, 1, 1.09836, 1.09836, 1.09836, 1.01522, - 0.86321, 0.94434, 0.8649, 0.94434, 0.86182, 1, 1, 1.083, 1, 0.91578, - 0.86438, 1.17308, 1.18416, 1.14589, 0.69825, 0.97622, 1.96791, - 1.24822, 1.24822, 1.17308, 1.24822, 1.24822, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025, - 1.17984, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1, - 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.10742, 1.10742, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - ]; - t.SegoeuiItalicMetrics = { lineHeight: 1.33008, lineGap: 0 }; - t.SegoeuiRegularFactors = [ - 1.76738, 1, 1, 0.98594, 1.02285, 1.10454, 1.06234, 0.96927, 0.92037, - 1.19985, 1.2046, 0.90616, 0.90616, 1.07152, 1.1714, 0.78032, - 1.20088, 0.78032, 1.40246, 0.96927, 0.96927, 0.96927, 0.96927, - 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.78032, - 0.78032, 1.1714, 1.1714, 1.1714, 0.80597, 0.94084, 0.96706, 0.85944, - 0.85734, 0.97093, 0.75842, 0.79936, 0.88198, 0.9831, 0.95782, - 0.71387, 0.86969, 0.84636, 1.07796, 1.03584, 0.96924, 0.83968, - 0.96924, 0.82826, 0.79649, 0.85771, 0.95132, 0.93119, 0.98965, - 0.88433, 0.8287, 0.93365, 1.08612, 1.3638, 1.08612, 1.45786, - 0.74627, 0.80499, 0.91484, 1.05707, 0.92383, 1.05882, 0.9403, - 1.12654, 1.05882, 1.01756, 1.09011, 1.09011, 0.99414, 1.09011, - 1.034, 1.01756, 1.05356, 1.05707, 1.05882, 1.04399, 0.84863, - 1.21968, 1.01756, 0.95801, 1.00068, 0.91797, 0.96777, 0.9043, - 0.90351, 0.92105, 0.90351, 1.1714, 0.85337, 0.96927, 0.96927, - 0.99912, 0.96927, 0.92105, 0.80597, 1.2434, 1.20808, 1.05937, - 0.90957, 1.1714, 1.20808, 0.75155, 0.94261, 1.24644, 1.09971, - 1.09971, 0.84751, 1, 0.85273, 0.78032, 0.61584, 1.05425, 1.17914, - 0.90957, 1.08665, 1.11593, 1.14169, 0.73381, 0.96706, 0.96706, - 0.96706, 0.96706, 0.96706, 0.96706, 0.86035, 0.85734, 0.75842, - 0.75842, 0.75842, 0.75842, 0.95782, 0.95782, 0.95782, 0.95782, - 0.97093, 1.03584, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924, - 1.1714, 0.96924, 0.95132, 0.95132, 0.95132, 0.95132, 0.8287, - 0.83968, 0.89049, 0.91484, 0.91484, 0.91484, 0.91484, 0.91484, - 0.91484, 0.93575, 0.92383, 0.9403, 0.9403, 0.9403, 0.9403, 0.8717, - 0.8717, 0.8717, 0.8717, 1.00527, 1.01756, 1.05356, 1.05356, 1.05356, - 1.05356, 1.05356, 1.24644, 0.95923, 1.01756, 1.01756, 1.01756, - 1.01756, 0.96777, 1.05707, 0.96777, 0.96706, 0.91484, 0.96706, - 0.91484, 0.96706, 0.91484, 0.85734, 0.92383, 0.85734, 0.92383, - 0.85734, 0.92383, 0.85734, 0.92383, 0.97093, 1.0969, 0.97093, - 1.05882, 0.75842, 0.9403, 0.75842, 0.9403, 0.75842, 0.9403, 0.75842, - 0.9403, 0.75842, 0.9403, 0.88198, 1.05882, 0.88198, 1.05882, - 0.88198, 1.05882, 1, 1, 0.9831, 1.01756, 0.9831, 1.01756, 0.95782, - 0.8717, 0.95782, 0.8717, 0.95782, 0.8717, 0.95782, 1.09011, 0.95782, - 0.8717, 0.84784, 1.11551, 0.71387, 1.09011, 1, 1, 0.99414, 0.84636, - 1.09011, 1, 1, 0.84636, 1.0536, 0.84636, 0.94298, 0.84636, 1.23297, - 1.03584, 1.01756, 1, 1, 1.03584, 1.01756, 1.00323, 1.03444, 1.01756, - 0.96924, 1.05356, 0.96924, 1.05356, 0.96924, 1.05356, 0.93066, - 0.98293, 0.82826, 1.04399, 1, 1, 0.82826, 1.04399, 0.79649, 0.84863, - 0.79649, 0.84863, 0.79649, 0.84863, 0.79649, 0.84863, 1, 1, 0.85771, - 1.17318, 0.85771, 1.21968, 0.95132, 1.01756, 0.95132, 1.01756, - 0.95132, 1.01756, 0.95132, 1.01756, 0.95132, 1.01756, 0.95132, - 1.01756, 0.98965, 1.00068, 0.8287, 0.96777, 0.8287, 0.93365, 0.9043, - 0.93365, 0.9043, 0.93365, 0.9043, 1.08571, 0.96927, 0.96706, - 0.91484, 0.86035, 0.93575, 0.96924, 0.95923, 1, 1, 0.85771, 1.21968, - 1.11437, 1.11437, 0.93109, 0.91202, 0.60411, 0.84164, 0.55572, - 1.01173, 0.97361, 0.81818, 0.81818, 0.96635, 0.78032, 0.72727, - 0.92366, 0.98601, 1.03405, 0.77968, 1.09799, 1.2, 0.96706, 0.85944, - 0.85638, 0.96491, 0.75842, 0.93365, 0.9831, 0.96924, 0.95782, - 0.86969, 0.94152, 1.07796, 1.03584, 0.78437, 0.96924, 0.98715, - 0.83968, 0.83491, 0.85771, 0.8287, 0.94492, 0.88433, 0.9287, 1.0098, - 0.95782, 0.8287, 1.0625, 0.98248, 1.03424, 1.2, 1.01071, 1.0625, - 0.95246, 1.03809, 1.04912, 0.98248, 1.00221, 1.03424, 1.05443, 1.2, - 1.04785, 0.99609, 1.00169, 1.05176, 0.99346, 1.05356, 0.9087, - 1.03004, 0.95542, 0.93117, 1.23362, 1.01071, 1.07831, 1.02512, - 1.05205, 1.03502, 1.2, 1.01071, 1.05356, 1.01071, 1.03502, 0.75842, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.03719, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.9403, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1.04021, 1, 1, 1, 1, 1, 1, 0.98965, 1.00068, 0.98965, - 1.00068, 0.98965, 1.00068, 0.8287, 0.96777, 1, 1.20088, 0.89903, 1, - 1, 0.75155, 1.03077, 1.03077, 1.03077, 1.03077, 1.13196, 1.13196, - 1.13196, 0.67428, 0.67428, 1.16039, 0.73291, 1.20996, 1.22135, - 1.06483, 0.94868, 0.94868, 0.95996, 1.24633, 1, 1.07497, 0.87796, - 0.96927, 1.01518, 0.96927, 1, 1, 1, 0.77295, 1, 1, 1.10539, 1.10539, - 1.11358, 1.06967, 0.86279, 0.94434, 0.86279, 0.94434, 0.86182, 1, 1, - 1.083, 1, 0.91578, 0.86507, 1.1714, 1.18416, 1.14589, 0.69825, - 0.97622, 1.9697, 1.24822, 1.24822, 1.17238, 1.24822, 1.24822, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, - 0.87025, 0.87025, 1.18083, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, - 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.10938, - 1.10938, 1, 1, 1, 1.05425, 1.09971, 1.09971, 1.09971, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, - ]; - t.SegoeuiRegularMetrics = { lineHeight: 1.33008, lineGap: 0 }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.PostScriptEvaluator = - t.PostScriptCompiler = - t.PDFFunctionFactory = - void 0; - t.isPDFFunction = function isPDFFunction(e) { - let t; - if (e instanceof r.Dict) t = e; - else { - if (!(e instanceof s.BaseStream)) return !1; - t = e.dict; - } - return t.has("FunctionType"); - }; - var r = a(4), - n = a(2), - i = a(58), - s = a(5), - o = a(59); - t.PDFFunctionFactory = class PDFFunctionFactory { - constructor({ xref: e, isEvalSupported: t = !0 }) { - this.xref = e; - this.isEvalSupported = !1 !== t; - } - create(e) { - const t = this.getCached(e); - if (t) return t; - const a = PDFFunction.parse({ - xref: this.xref, - isEvalSupported: this.isEvalSupported, - fn: e instanceof r.Ref ? this.xref.fetch(e) : e, - }); - this._cache(e, a); - return a; - } - createFromArray(e) { - const t = this.getCached(e); - if (t) return t; - const a = PDFFunction.parseArray({ - xref: this.xref, - isEvalSupported: this.isEvalSupported, - fnObj: e instanceof r.Ref ? this.xref.fetch(e) : e, - }); - this._cache(e, a); - return a; - } - getCached(e) { - let t; - e instanceof r.Ref - ? (t = e) - : e instanceof r.Dict - ? (t = e.objId) - : e instanceof s.BaseStream && (t = e.dict?.objId); - if (t) { - const e = this._localFunctionCache.getByRef(t); - if (e) return e; - } - return null; - } - _cache(e, t) { - if (!t) - throw new Error( - 'PDFFunctionFactory._cache - expected "parsedFunction" argument.', - ); - let a; - e instanceof r.Ref - ? (a = e) - : e instanceof r.Dict - ? (a = e.objId) - : e instanceof s.BaseStream && (a = e.dict?.objId); - a && this._localFunctionCache.set(null, a, t); - } - get _localFunctionCache() { - return (0, n.shadow)( - this, - "_localFunctionCache", - new o.LocalFunctionCache(), - ); - } - }; - function toNumberArray(e) { - if (!Array.isArray(e)) return null; - const t = e.length; - for (let a = 0; a < t; a++) - if ("number" != typeof e[a]) { - const a = new Array(t); - for (let r = 0; r < t; r++) a[r] = +e[r]; - return a; - } - return e; - } - class PDFFunction { - static getSampleArray(e, t, a, r) { - let n, - i, - s = 1; - for (n = 0, i = e.length; n < i; n++) s *= e[n]; - s *= t; - const o = new Array(s); - let c = 0, - l = 0; - const h = 1 / (2 ** a - 1), - u = r.getBytes((s * a + 7) / 8); - let d = 0; - for (n = 0; n < s; n++) { - for (; c < a; ) { - l <<= 8; - l |= u[d++]; - c += 8; - } - c -= a; - o[n] = (l >> c) * h; - l &= (1 << c) - 1; - } - return o; - } - static parse({ xref: e, isEvalSupported: t, fn: a }) { - const r = a.dict || a; - switch (r.get("FunctionType")) { - case 0: - return this.constructSampled({ - xref: e, - isEvalSupported: t, - fn: a, - dict: r, - }); - case 1: - break; - case 2: - return this.constructInterpolated({ - xref: e, - isEvalSupported: t, - dict: r, - }); - case 3: - return this.constructStiched({ - xref: e, - isEvalSupported: t, - dict: r, - }); - case 4: - return this.constructPostScript({ - xref: e, - isEvalSupported: t, - fn: a, - dict: r, - }); - } - throw new n.FormatError("Unknown type of function"); - } - static parseArray({ xref: e, isEvalSupported: t, fnObj: a }) { - if (!Array.isArray(a)) - return this.parse({ xref: e, isEvalSupported: t, fn: a }); - const r = []; - for (const n of a) - r.push( - this.parse({ - xref: e, - isEvalSupported: t, - fn: e.fetchIfRef(n), - }), - ); - return function (e, t, a, n) { - for (let i = 0, s = r.length; i < s; i++) r[i](e, t, a, n + i); - }; - } - static constructSampled({ - xref: e, - isEvalSupported: t, - fn: a, - dict: r, - }) { - function toMultiArray(e) { - const t = e.length, - a = []; - let r = 0; - for (let n = 0; n < t; n += 2) a[r++] = [e[n], e[n + 1]]; - return a; - } - function interpolate(e, t, a, r, n) { - return r + ((n - r) / (a - t)) * (e - t); - } - let i = toNumberArray(r.getArray("Domain")), - s = toNumberArray(r.getArray("Range")); - if (!i || !s) throw new n.FormatError("No domain or range"); - const o = i.length / 2, - c = s.length / 2; - i = toMultiArray(i); - s = toMultiArray(s); - const l = toNumberArray(r.getArray("Size")), - h = r.get("BitsPerSample"), - u = r.get("Order") || 1; - 1 !== u && - (0, n.info)("No support for cubic spline interpolation: " + u); - let d = toNumberArray(r.getArray("Encode")); - if (d) d = toMultiArray(d); - else { - d = []; - for (let e = 0; e < o; ++e) d.push([0, l[e] - 1]); - } - let f = toNumberArray(r.getArray("Decode")); - f = f ? toMultiArray(f) : s; - const g = this.getSampleArray(l, c, h, a); - return function constructSampledFn(e, t, a, r) { - const n = 1 << o, - h = new Float64Array(n), - u = new Uint32Array(n); - let p, m; - for (m = 0; m < n; m++) h[m] = 1; - let b = c, - y = 1; - for (p = 0; p < o; ++p) { - const a = i[p][0], - r = i[p][1]; - let s = interpolate( - Math.min(Math.max(e[t + p], a), r), - a, - r, - d[p][0], - d[p][1], - ); - const o = l[p]; - s = Math.min(Math.max(s, 0), o - 1); - const c = s < o - 1 ? Math.floor(s) : s - 1, - f = c + 1 - s, - g = s - c, - w = c * b, - S = w + b; - for (m = 0; m < n; m++) - if (m & y) { - h[m] *= g; - u[m] += S; - } else { - h[m] *= f; - u[m] += w; - } - b *= o; - y <<= 1; - } - for (m = 0; m < c; ++m) { - let e = 0; - for (p = 0; p < n; p++) e += g[u[p] + m] * h[p]; - e = interpolate(e, 0, 1, f[m][0], f[m][1]); - a[r + m] = Math.min(Math.max(e, s[m][0]), s[m][1]); - } - }; - } - static constructInterpolated({ - xref: e, - isEvalSupported: t, - dict: a, - }) { - const r = toNumberArray(a.getArray("C0")) || [0], - n = toNumberArray(a.getArray("C1")) || [1], - i = a.get("N"), - s = []; - for (let e = 0, t = r.length; e < t; ++e) s.push(n[e] - r[e]); - const o = s.length; - return function constructInterpolatedFn(e, t, a, n) { - const c = 1 === i ? e[t] : e[t] ** i; - for (let e = 0; e < o; ++e) a[n + e] = r[e] + c * s[e]; - }; - } - static constructStiched({ xref: e, isEvalSupported: t, dict: a }) { - const r = toNumberArray(a.getArray("Domain")); - if (!r) throw new n.FormatError("No domain"); - if (1 !== r.length / 2) - throw new n.FormatError("Bad domain for stiched function"); - const i = []; - for (const r of a.get("Functions")) - i.push( - this.parse({ - xref: e, - isEvalSupported: t, - fn: e.fetchIfRef(r), - }), - ); - const s = toNumberArray(a.getArray("Bounds")), - o = toNumberArray(a.getArray("Encode")), - c = new Float32Array(1); - return function constructStichedFn(e, t, a, n) { - const l = (function constructStichedFromIRClip(e, t, a) { - e > a ? (e = a) : e < t && (e = t); - return e; - })(e[t], r[0], r[1]), - h = s.length; - let u; - for (u = 0; u < h && !(l < s[u]); ++u); - let d = r[0]; - u > 0 && (d = s[u - 1]); - let f = r[1]; - u < s.length && (f = s[u]); - const g = o[2 * u], - p = o[2 * u + 1]; - c[0] = d === f ? g : g + ((l - d) * (p - g)) / (f - d); - i[u](c, 0, a, n); - }; - } - static constructPostScript({ - xref: e, - isEvalSupported: t, - fn: a, - dict: r, - }) { - const s = toNumberArray(r.getArray("Domain")), - o = toNumberArray(r.getArray("Range")); - if (!s) throw new n.FormatError("No domain."); - if (!o) throw new n.FormatError("No range."); - const c = new i.PostScriptLexer(a), - l = new i.PostScriptParser(c).parse(); - if (t && n.FeatureTest.isEvalSupported) { - const e = new PostScriptCompiler().compile(l, s, o); - if (e) - return new Function( - "src", - "srcOffset", - "dest", - "destOffset", - e, - ); - } - (0, n.info)("Unable to compile PS function"); - const h = o.length >> 1, - u = s.length >> 1, - d = new PostScriptEvaluator(l), - f = Object.create(null); - let g = 8192; - const p = new Float32Array(u); - return function constructPostScriptFn(e, t, a, r) { - let n, - i, - s = ""; - const c = p; - for (n = 0; n < u; n++) { - i = e[t + n]; - c[n] = i; - s += i + "_"; - } - const l = f[s]; - if (void 0 !== l) { - a.set(l, r); - return; - } - const m = new Float32Array(h), - b = d.execute(c), - y = b.length - h; - for (n = 0; n < h; n++) { - i = b[y + n]; - let e = o[2 * n]; - if (i < e) i = e; - else { - e = o[2 * n + 1]; - i > e && (i = e); - } - m[n] = i; - } - if (g > 0) { - g--; - f[s] = m; - } - a.set(m, r); - }; - } - } - class PostScriptStack { - static MAX_STACK_SIZE = 100; - constructor(e) { - this.stack = e ? Array.from(e) : []; - } - push(e) { - if (this.stack.length >= PostScriptStack.MAX_STACK_SIZE) - throw new Error("PostScript function stack overflow."); - this.stack.push(e); - } - pop() { - if (this.stack.length <= 0) - throw new Error("PostScript function stack underflow."); - return this.stack.pop(); - } - copy(e) { - if (this.stack.length + e >= PostScriptStack.MAX_STACK_SIZE) - throw new Error("PostScript function stack overflow."); - const t = this.stack; - for (let a = t.length - e, r = e - 1; r >= 0; r--, a++) - t.push(t[a]); - } - index(e) { - this.push(this.stack[this.stack.length - e - 1]); - } - roll(e, t) { - const a = this.stack, - r = a.length - e, - n = a.length - 1, - i = r + (t - Math.floor(t / e) * e); - for (let e = r, t = n; e < t; e++, t--) { - const r = a[e]; - a[e] = a[t]; - a[t] = r; - } - for (let e = r, t = i - 1; e < t; e++, t--) { - const r = a[e]; - a[e] = a[t]; - a[t] = r; - } - for (let e = i, t = n; e < t; e++, t--) { - const r = a[e]; - a[e] = a[t]; - a[t] = r; - } - } - } - class PostScriptEvaluator { - constructor(e) { - this.operators = e; - } - execute(e) { - const t = new PostScriptStack(e); - let a = 0; - const r = this.operators, - i = r.length; - let s, o, c; - for (; a < i; ) { - s = r[a++]; - if ("number" != typeof s) - switch (s) { - case "jz": - c = t.pop(); - o = t.pop(); - o || (a = c); - break; - case "j": - o = t.pop(); - a = o; - break; - case "abs": - o = t.pop(); - t.push(Math.abs(o)); - break; - case "add": - c = t.pop(); - o = t.pop(); - t.push(o + c); - break; - case "and": - c = t.pop(); - o = t.pop(); - "boolean" == typeof o && "boolean" == typeof c - ? t.push(o && c) - : t.push(o & c); - break; - case "atan": - c = t.pop(); - o = t.pop(); - o = (Math.atan2(o, c) / Math.PI) * 180; - o < 0 && (o += 360); - t.push(o); - break; - case "bitshift": - c = t.pop(); - o = t.pop(); - o > 0 ? t.push(o << c) : t.push(o >> c); - break; - case "ceiling": - o = t.pop(); - t.push(Math.ceil(o)); - break; - case "copy": - o = t.pop(); - t.copy(o); - break; - case "cos": - o = t.pop(); - t.push(Math.cos(((o % 360) / 180) * Math.PI)); - break; - case "cvi": - o = 0 | t.pop(); - t.push(o); - break; - case "cvr": - break; - case "div": - c = t.pop(); - o = t.pop(); - t.push(o / c); - break; - case "dup": - t.copy(1); - break; - case "eq": - c = t.pop(); - o = t.pop(); - t.push(o === c); - break; - case "exch": - t.roll(2, 1); - break; - case "exp": - c = t.pop(); - o = t.pop(); - t.push(o ** c); - break; - case "false": - t.push(!1); - break; - case "floor": - o = t.pop(); - t.push(Math.floor(o)); - break; - case "ge": - c = t.pop(); - o = t.pop(); - t.push(o >= c); - break; - case "gt": - c = t.pop(); - o = t.pop(); - t.push(o > c); - break; - case "idiv": - c = t.pop(); - o = t.pop(); - t.push((o / c) | 0); - break; - case "index": - o = t.pop(); - t.index(o); - break; - case "le": - c = t.pop(); - o = t.pop(); - t.push(o <= c); - break; - case "ln": - o = t.pop(); - t.push(Math.log(o)); - break; - case "log": - o = t.pop(); - t.push(Math.log10(o)); - break; - case "lt": - c = t.pop(); - o = t.pop(); - t.push(o < c); - break; - case "mod": - c = t.pop(); - o = t.pop(); - t.push(o % c); - break; - case "mul": - c = t.pop(); - o = t.pop(); - t.push(o * c); - break; - case "ne": - c = t.pop(); - o = t.pop(); - t.push(o !== c); - break; - case "neg": - o = t.pop(); - t.push(-o); - break; - case "not": - o = t.pop(); - "boolean" == typeof o ? t.push(!o) : t.push(~o); - break; - case "or": - c = t.pop(); - o = t.pop(); - "boolean" == typeof o && "boolean" == typeof c - ? t.push(o || c) - : t.push(o | c); - break; - case "pop": - t.pop(); - break; - case "roll": - c = t.pop(); - o = t.pop(); - t.roll(o, c); - break; - case "round": - o = t.pop(); - t.push(Math.round(o)); - break; - case "sin": - o = t.pop(); - t.push(Math.sin(((o % 360) / 180) * Math.PI)); - break; - case "sqrt": - o = t.pop(); - t.push(Math.sqrt(o)); - break; - case "sub": - c = t.pop(); - o = t.pop(); - t.push(o - c); - break; - case "true": - t.push(!0); - break; - case "truncate": - o = t.pop(); - o = o < 0 ? Math.ceil(o) : Math.floor(o); - t.push(o); - break; - case "xor": - c = t.pop(); - o = t.pop(); - "boolean" == typeof o && "boolean" == typeof c - ? t.push(o !== c) - : t.push(o ^ c); - break; - default: - throw new n.FormatError(`Unknown operator ${s}`); - } - else t.push(s); - } - return t.stack; - } - } - t.PostScriptEvaluator = PostScriptEvaluator; - class AstNode { - constructor(e) { - this.type = e; - } - visit(e) { - (0, n.unreachable)("abstract method"); - } - } - class AstArgument extends AstNode { - constructor(e, t, a) { - super("args"); - this.index = e; - this.min = t; - this.max = a; - } - visit(e) { - e.visitArgument(this); - } - } - class AstLiteral extends AstNode { - constructor(e) { - super("literal"); - this.number = e; - this.min = e; - this.max = e; - } - visit(e) { - e.visitLiteral(this); - } - } - class AstBinaryOperation extends AstNode { - constructor(e, t, a, r, n) { - super("binary"); - this.op = e; - this.arg1 = t; - this.arg2 = a; - this.min = r; - this.max = n; - } - visit(e) { - e.visitBinaryOperation(this); - } - } - class AstMin extends AstNode { - constructor(e, t) { - super("max"); - this.arg = e; - this.min = e.min; - this.max = t; - } - visit(e) { - e.visitMin(this); - } - } - class AstVariable extends AstNode { - constructor(e, t, a) { - super("var"); - this.index = e; - this.min = t; - this.max = a; - } - visit(e) { - e.visitVariable(this); - } - } - class AstVariableDefinition extends AstNode { - constructor(e, t) { - super("definition"); - this.variable = e; - this.arg = t; - } - visit(e) { - e.visitVariableDefinition(this); - } - } - class ExpressionBuilderVisitor { - constructor() { - this.parts = []; - } - visitArgument(e) { - this.parts.push( - "Math.max(", - e.min, - ", Math.min(", - e.max, - ", src[srcOffset + ", - e.index, - "]))", - ); - } - visitVariable(e) { - this.parts.push("v", e.index); - } - visitLiteral(e) { - this.parts.push(e.number); - } - visitBinaryOperation(e) { - this.parts.push("("); - e.arg1.visit(this); - this.parts.push(" ", e.op, " "); - e.arg2.visit(this); - this.parts.push(")"); - } - visitVariableDefinition(e) { - this.parts.push("var "); - e.variable.visit(this); - this.parts.push(" = "); - e.arg.visit(this); - this.parts.push(";"); - } - visitMin(e) { - this.parts.push("Math.min("); - e.arg.visit(this); - this.parts.push(", ", e.max, ")"); - } - toString() { - return this.parts.join(""); - } - } - function buildAddOperation(e, t) { - return "literal" === t.type && 0 === t.number - ? e - : "literal" === e.type && 0 === e.number - ? t - : "literal" === t.type && "literal" === e.type - ? new AstLiteral(e.number + t.number) - : new AstBinaryOperation( - "+", - e, - t, - e.min + t.min, - e.max + t.max, - ); - } - function buildMulOperation(e, t) { - if ("literal" === t.type) { - if (0 === t.number) return new AstLiteral(0); - if (1 === t.number) return e; - if ("literal" === e.type) - return new AstLiteral(e.number * t.number); - } - if ("literal" === e.type) { - if (0 === e.number) return new AstLiteral(0); - if (1 === e.number) return t; - } - const a = Math.min( - e.min * t.min, - e.min * t.max, - e.max * t.min, - e.max * t.max, - ), - r = Math.max( - e.min * t.min, - e.min * t.max, - e.max * t.min, - e.max * t.max, - ); - return new AstBinaryOperation("*", e, t, a, r); - } - function buildSubOperation(e, t) { - if ("literal" === t.type) { - if (0 === t.number) return e; - if ("literal" === e.type) - return new AstLiteral(e.number - t.number); - } - return "binary" === t.type && - "-" === t.op && - "literal" === e.type && - 1 === e.number && - "literal" === t.arg1.type && - 1 === t.arg1.number - ? t.arg2 - : new AstBinaryOperation("-", e, t, e.min - t.max, e.max - t.min); - } - function buildMinOperation(e, t) { - return e.min >= t - ? new AstLiteral(t) - : e.max <= t - ? e - : new AstMin(e, t); - } - class PostScriptCompiler { - compile(e, t, a) { - const r = [], - n = [], - i = t.length >> 1, - s = a.length >> 1; - let o, - c, - l, - h, - u, - d, - f, - g, - p = 0; - for (let e = 0; e < i; e++) - r.push(new AstArgument(e, t[2 * e], t[2 * e + 1])); - for (let t = 0, a = e.length; t < a; t++) { - g = e[t]; - if ("number" != typeof g) - switch (g) { - case "add": - if (r.length < 2) return null; - h = r.pop(); - l = r.pop(); - r.push(buildAddOperation(l, h)); - break; - case "cvr": - if (r.length < 1) return null; - break; - case "mul": - if (r.length < 2) return null; - h = r.pop(); - l = r.pop(); - r.push(buildMulOperation(l, h)); - break; - case "sub": - if (r.length < 2) return null; - h = r.pop(); - l = r.pop(); - r.push(buildSubOperation(l, h)); - break; - case "exch": - if (r.length < 2) return null; - u = r.pop(); - d = r.pop(); - r.push(u, d); - break; - case "pop": - if (r.length < 1) return null; - r.pop(); - break; - case "index": - if (r.length < 1) return null; - l = r.pop(); - if ("literal" !== l.type) return null; - o = l.number; - if (o < 0 || !Number.isInteger(o) || r.length < o) - return null; - u = r[r.length - o - 1]; - if ("literal" === u.type || "var" === u.type) { - r.push(u); - break; - } - f = new AstVariable(p++, u.min, u.max); - r[r.length - o - 1] = f; - r.push(f); - n.push(new AstVariableDefinition(f, u)); - break; - case "dup": - if (r.length < 1) return null; - if ( - "number" == typeof e[t + 1] && - "gt" === e[t + 2] && - e[t + 3] === t + 7 && - "jz" === e[t + 4] && - "pop" === e[t + 5] && - e[t + 6] === e[t + 1] - ) { - l = r.pop(); - r.push(buildMinOperation(l, e[t + 1])); - t += 6; - break; - } - u = r.at(-1); - if ("literal" === u.type || "var" === u.type) { - r.push(u); - break; - } - f = new AstVariable(p++, u.min, u.max); - r[r.length - 1] = f; - r.push(f); - n.push(new AstVariableDefinition(f, u)); - break; - case "roll": - if (r.length < 2) return null; - h = r.pop(); - l = r.pop(); - if ("literal" !== h.type || "literal" !== l.type) - return null; - c = h.number; - o = l.number; - if ( - o <= 0 || - !Number.isInteger(o) || - !Number.isInteger(c) || - r.length < o - ) - return null; - c = ((c % o) + o) % o; - if (0 === c) break; - r.push(...r.splice(r.length - o, o - c)); - break; - default: - return null; - } - else r.push(new AstLiteral(g)); - } - if (r.length !== s) return null; - const m = []; - for (const e of n) { - const t = new ExpressionBuilderVisitor(); - e.visit(t); - m.push(t.toString()); - } - for (let e = 0, t = r.length; e < t; e++) { - const t = r[e], - n = new ExpressionBuilderVisitor(); - t.visit(n); - const i = a[2 * e], - s = a[2 * e + 1], - o = [n.toString()]; - if (i > t.min) { - o.unshift("Math.max(", i, ", "); - o.push(")"); - } - if (s < t.max) { - o.unshift("Math.min(", s, ", "); - o.push(")"); - } - o.unshift("dest[destOffset + ", e, "] = "); - o.push(";"); - m.push(o.join("")); - } - return m.join("\n"); - } - } - t.PostScriptCompiler = PostScriptCompiler; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.PostScriptParser = t.PostScriptLexer = void 0; - var r = a(2), - n = a(4), - i = a(3); - t.PostScriptParser = class PostScriptParser { - constructor(e) { - this.lexer = e; - this.operators = []; - this.token = null; - this.prev = null; - } - nextToken() { - this.prev = this.token; - this.token = this.lexer.getToken(); - } - accept(e) { - if (this.token.type === e) { - this.nextToken(); - return !0; - } - return !1; - } - expect(e) { - if (this.accept(e)) return !0; - throw new r.FormatError( - `Unexpected symbol: found ${this.token.type} expected ${e}.`, - ); - } - parse() { - this.nextToken(); - this.expect(s.LBRACE); - this.parseBlock(); - this.expect(s.RBRACE); - return this.operators; - } - parseBlock() { - for (;;) - if (this.accept(s.NUMBER)) this.operators.push(this.prev.value); - else if (this.accept(s.OPERATOR)) - this.operators.push(this.prev.value); - else { - if (!this.accept(s.LBRACE)) return; - this.parseCondition(); - } - } - parseCondition() { - const e = this.operators.length; - this.operators.push(null, null); - this.parseBlock(); - this.expect(s.RBRACE); - if (this.accept(s.IF)) { - this.operators[e] = this.operators.length; - this.operators[e + 1] = "jz"; - } else { - if (!this.accept(s.LBRACE)) - throw new r.FormatError( - "PS Function: error parsing conditional.", - ); - { - const t = this.operators.length; - this.operators.push(null, null); - const a = this.operators.length; - this.parseBlock(); - this.expect(s.RBRACE); - this.expect(s.IFELSE); - this.operators[t] = this.operators.length; - this.operators[t + 1] = "j"; - this.operators[e] = a; - this.operators[e + 1] = "jz"; - } - } - } - }; - const s = { - LBRACE: 0, - RBRACE: 1, - NUMBER: 2, - OPERATOR: 3, - IF: 4, - IFELSE: 5, - }; - class PostScriptToken { - static get opCache() { - return (0, r.shadow)(this, "opCache", Object.create(null)); - } - constructor(e, t) { - this.type = e; - this.value = t; - } - static getOperator(e) { - return (PostScriptToken.opCache[e] ||= new PostScriptToken( - s.OPERATOR, - e, - )); - } - static get LBRACE() { - return (0, r.shadow)( - this, - "LBRACE", - new PostScriptToken(s.LBRACE, "{"), - ); - } - static get RBRACE() { - return (0, r.shadow)( - this, - "RBRACE", - new PostScriptToken(s.RBRACE, "}"), - ); - } - static get IF() { - return (0, r.shadow)(this, "IF", new PostScriptToken(s.IF, "IF")); - } - static get IFELSE() { - return (0, r.shadow)( - this, - "IFELSE", - new PostScriptToken(s.IFELSE, "IFELSE"), - ); - } - } - t.PostScriptLexer = class PostScriptLexer { - constructor(e) { - this.stream = e; - this.nextChar(); - this.strBuf = []; - } - nextChar() { - return (this.currentChar = this.stream.getByte()); - } - getToken() { - let e = !1, - t = this.currentChar; - for (;;) { - if (t < 0) return n.EOF; - if (e) (10 !== t && 13 !== t) || (e = !1); - else if (37 === t) e = !0; - else if (!(0, i.isWhiteSpace)(t)) break; - t = this.nextChar(); - } - switch (0 | t) { - case 48: - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: - case 43: - case 45: - case 46: - return new PostScriptToken(s.NUMBER, this.getNumber()); - case 123: - this.nextChar(); - return PostScriptToken.LBRACE; - case 125: - this.nextChar(); - return PostScriptToken.RBRACE; - } - const a = this.strBuf; - a.length = 0; - a[0] = String.fromCharCode(t); - for ( - ; - (t = this.nextChar()) >= 0 && - ((t >= 65 && t <= 90) || (t >= 97 && t <= 122)); - - ) - a.push(String.fromCharCode(t)); - const r = a.join(""); - switch (r.toLowerCase()) { - case "if": - return PostScriptToken.IF; - case "ifelse": - return PostScriptToken.IFELSE; - default: - return PostScriptToken.getOperator(r); - } - } - getNumber() { - let e = this.currentChar; - const t = this.strBuf; - t.length = 0; - t[0] = String.fromCharCode(e); - for ( - ; - (e = this.nextChar()) >= 0 && - ((e >= 48 && e <= 57) || 45 === e || 46 === e); - - ) - t.push(String.fromCharCode(e)); - const a = parseFloat(t.join("")); - if (isNaN(a)) - throw new r.FormatError(`Invalid floating point number: ${a}`); - return a; - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.RegionalImageCache = - t.LocalTilingPatternCache = - t.LocalImageCache = - t.LocalGStateCache = - t.LocalFunctionCache = - t.LocalColorSpaceCache = - t.GlobalImageCache = - void 0; - var r = a(2), - n = a(4); - class BaseLocalCache { - constructor(e) { - this.constructor === BaseLocalCache && - (0, r.unreachable)("Cannot initialize BaseLocalCache."); - this._onlyRefs = !0 === e?.onlyRefs; - if (!this._onlyRefs) { - this._nameRefMap = new Map(); - this._imageMap = new Map(); - } - this._imageCache = new n.RefSetCache(); - } - getByName(e) { - this._onlyRefs && - (0, r.unreachable)("Should not call `getByName` method."); - const t = this._nameRefMap.get(e); - return t ? this.getByRef(t) : this._imageMap.get(e) || null; - } - getByRef(e) { - return this._imageCache.get(e) || null; - } - set(e, t, a) { - (0, r.unreachable)("Abstract method `set` called."); - } - } - t.LocalImageCache = class LocalImageCache extends BaseLocalCache { - set(e, t = null, a) { - if ("string" != typeof e) - throw new Error( - 'LocalImageCache.set - expected "name" argument.', - ); - if (t) { - if (this._imageCache.has(t)) return; - this._nameRefMap.set(e, t); - this._imageCache.put(t, a); - } else this._imageMap.has(e) || this._imageMap.set(e, a); - } - }; - t.LocalColorSpaceCache = class LocalColorSpaceCache extends ( - BaseLocalCache - ) { - set(e = null, t = null, a) { - if ("string" != typeof e && !t) - throw new Error( - 'LocalColorSpaceCache.set - expected "name" and/or "ref" argument.', - ); - if (t) { - if (this._imageCache.has(t)) return; - null !== e && this._nameRefMap.set(e, t); - this._imageCache.put(t, a); - } else this._imageMap.has(e) || this._imageMap.set(e, a); - } - }; - t.LocalFunctionCache = class LocalFunctionCache extends ( - BaseLocalCache - ) { - constructor(e) { - super({ onlyRefs: !0 }); - } - set(e = null, t, a) { - if (!t) - throw new Error( - 'LocalFunctionCache.set - expected "ref" argument.', - ); - this._imageCache.has(t) || this._imageCache.put(t, a); - } - }; - t.LocalGStateCache = class LocalGStateCache extends BaseLocalCache { - set(e, t = null, a) { - if ("string" != typeof e) - throw new Error( - 'LocalGStateCache.set - expected "name" argument.', - ); - if (t) { - if (this._imageCache.has(t)) return; - this._nameRefMap.set(e, t); - this._imageCache.put(t, a); - } else this._imageMap.has(e) || this._imageMap.set(e, a); - } - }; - t.LocalTilingPatternCache = class LocalTilingPatternCache extends ( - BaseLocalCache - ) { - constructor(e) { - super({ onlyRefs: !0 }); - } - set(e = null, t, a) { - if (!t) - throw new Error( - 'LocalTilingPatternCache.set - expected "ref" argument.', - ); - this._imageCache.has(t) || this._imageCache.put(t, a); - } - }; - t.RegionalImageCache = class RegionalImageCache extends ( - BaseLocalCache - ) { - constructor(e) { - super({ onlyRefs: !0 }); - } - set(e = null, t, a) { - if (!t) - throw new Error( - 'RegionalImageCache.set - expected "ref" argument.', - ); - this._imageCache.has(t) || this._imageCache.put(t, a); - } - }; - class GlobalImageCache { - static NUM_PAGES_THRESHOLD = 2; - static MIN_IMAGES_TO_CACHE = 10; - static MAX_BYTE_SIZE = 5 * r.MAX_IMAGE_SIZE_TO_CACHE; - constructor() { - this._refCache = new n.RefSetCache(); - this._imageCache = new n.RefSetCache(); - } - get _byteSize() { - let e = 0; - for (const t of this._imageCache) e += t.byteSize; - return e; - } - get _cacheLimitReached() { - return ( - !( - this._imageCache.size < GlobalImageCache.MIN_IMAGES_TO_CACHE - ) && !(this._byteSize < GlobalImageCache.MAX_BYTE_SIZE) - ); - } - shouldCache(e, t) { - let a = this._refCache.get(e); - if (!a) { - a = new Set(); - this._refCache.put(e, a); - } - a.add(t); - return ( - !(a.size < GlobalImageCache.NUM_PAGES_THRESHOLD) && - !(!this._imageCache.has(e) && this._cacheLimitReached) - ); - } - addByteSize(e, t) { - const a = this._imageCache.get(e); - a && (a.byteSize || (a.byteSize = t)); - } - getData(e, t) { - const a = this._refCache.get(e); - if (!a) return null; - if (a.size < GlobalImageCache.NUM_PAGES_THRESHOLD) return null; - const r = this._imageCache.get(e); - if (!r) return null; - a.add(t); - return r; - } - setData(e, t) { - if (!this._refCache.has(e)) - throw new Error( - 'GlobalImageCache.setData - expected "shouldCache" to have been called.', - ); - this._imageCache.has(e) || - (this._cacheLimitReached - ? (0, r.warn)( - "GlobalImageCache.setData - cache limit reached.", - ) - : this._imageCache.put(e, t)); - } - clear(e = !1) { - e || this._refCache.clear(); - this._imageCache.clear(); - } - } - t.GlobalImageCache = GlobalImageCache; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.bidi = function bidi(e, t = -1, a = !1) { - let c = !0; - const l = e.length; - if (0 === l || a) return createBidiText(e, c, a); - s.length = l; - o.length = l; - let h, - u, - d = 0; - for (h = 0; h < l; ++h) { - s[h] = e.charAt(h); - const t = e.charCodeAt(h); - let a = "L"; - if (t <= 255) a = n[t]; - else if (1424 <= t && t <= 1524) a = "R"; - else if (1536 <= t && t <= 1791) { - a = i[255 & t]; - a || - (0, r.warn)( - "Bidi: invalid Unicode character " + t.toString(16), - ); - } else - ((1792 <= t && t <= 2220) || - (64336 <= t && t <= 65023) || - (65136 <= t && t <= 65279)) && - (a = "AL"); - ("R" !== a && "AL" !== a && "AN" !== a) || d++; - o[h] = a; - } - if (0 === d) { - c = !0; - return createBidiText(e, c); - } - if (-1 === t) - if (d / l < 0.3 && l > 4) { - c = !0; - t = 0; - } else { - c = !1; - t = 1; - } - const f = []; - for (h = 0; h < l; ++h) f[h] = t; - const g = isOdd(t) ? "R" : "L", - p = g, - m = p; - let b, - y = p; - for (h = 0; h < l; ++h) "NSM" === o[h] ? (o[h] = y) : (y = o[h]); - y = p; - for (h = 0; h < l; ++h) { - b = o[h]; - "EN" === b - ? (o[h] = "AL" === y ? "AN" : "EN") - : ("R" !== b && "L" !== b && "AL" !== b) || (y = b); - } - for (h = 0; h < l; ++h) { - b = o[h]; - "AL" === b && (o[h] = "R"); - } - for (h = 1; h < l - 1; ++h) { - "ES" === o[h] && - "EN" === o[h - 1] && - "EN" === o[h + 1] && - (o[h] = "EN"); - "CS" !== o[h] || - ("EN" !== o[h - 1] && "AN" !== o[h - 1]) || - o[h + 1] !== o[h - 1] || - (o[h] = o[h - 1]); - } - for (h = 0; h < l; ++h) - if ("EN" === o[h]) { - for (let e = h - 1; e >= 0 && "ET" === o[e]; --e) o[e] = "EN"; - for (let e = h + 1; e < l && "ET" === o[e]; ++e) o[e] = "EN"; - } - for (h = 0; h < l; ++h) { - b = o[h]; - ("WS" !== b && "ES" !== b && "ET" !== b && "CS" !== b) || - (o[h] = "ON"); - } - y = p; - for (h = 0; h < l; ++h) { - b = o[h]; - "EN" === b - ? (o[h] = "L" === y ? "L" : "EN") - : ("R" !== b && "L" !== b) || (y = b); - } - for (h = 0; h < l; ++h) - if ("ON" === o[h]) { - const e = findUnequal(o, h + 1, "ON"); - let t = p; - h > 0 && (t = o[h - 1]); - let a = m; - e + 1 < l && (a = o[e + 1]); - "L" !== t && (t = "R"); - "L" !== a && (a = "R"); - t === a && setValues(o, h, e, t); - h = e - 1; - } - for (h = 0; h < l; ++h) "ON" === o[h] && (o[h] = g); - for (h = 0; h < l; ++h) { - b = o[h]; - isEven(f[h]) - ? "R" === b - ? (f[h] += 1) - : ("AN" !== b && "EN" !== b) || (f[h] += 2) - : ("L" !== b && "AN" !== b && "EN" !== b) || (f[h] += 1); - } - let w, - S = -1, - x = 99; - for (h = 0, u = f.length; h < u; ++h) { - w = f[h]; - S < w && (S = w); - x > w && isOdd(w) && (x = w); - } - for (w = S; w >= x; --w) { - let e = -1; - for (h = 0, u = f.length; h < u; ++h) - if (f[h] < w) { - if (e >= 0) { - reverseValues(s, e, h); - e = -1; - } - } else e < 0 && (e = h); - e >= 0 && reverseValues(s, e, f.length); - } - for (h = 0, u = s.length; h < u; ++h) { - const e = s[h]; - ("<" !== e && ">" !== e) || (s[h] = ""); - } - return createBidiText(s.join(""), c); - }; - var r = a(2); - const n = [ - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "S", - "B", - "S", - "WS", - "B", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "B", - "B", - "B", - "S", - "WS", - "ON", - "ON", - "ET", - "ET", - "ET", - "ON", - "ON", - "ON", - "ON", - "ON", - "ES", - "CS", - "ES", - "CS", - "CS", - "EN", - "EN", - "EN", - "EN", - "EN", - "EN", - "EN", - "EN", - "EN", - "EN", - "CS", - "ON", - "ON", - "ON", - "ON", - "ON", - "ON", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "ON", - "ON", - "ON", - "ON", - "ON", - "ON", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "ON", - "ON", - "ON", - "ON", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "B", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "BN", - "CS", - "ON", - "ET", - "ET", - "ET", - "ET", - "ON", - "ON", - "ON", - "ON", - "L", - "ON", - "ON", - "BN", - "ON", - "ON", - "ET", - "ET", - "EN", - "EN", - "ON", - "L", - "ON", - "ON", - "ON", - "EN", - "L", - "ON", - "ON", - "ON", - "ON", - "ON", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "ON", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "ON", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - "L", - ], - i = [ - "AN", - "AN", - "AN", - "AN", - "AN", - "AN", - "ON", - "ON", - "AL", - "ET", - "ET", - "AL", - "CS", - "AL", - "ON", - "ON", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "AL", - "AL", - "", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "AN", - "AN", - "AN", - "AN", - "AN", - "AN", - "AN", - "AN", - "AN", - "AN", - "ET", - "AN", - "AN", - "AL", - "AL", - "AL", - "NSM", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "AN", - "ON", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "NSM", - "AL", - "AL", - "NSM", - "NSM", - "ON", - "NSM", - "NSM", - "NSM", - "NSM", - "AL", - "AL", - "EN", - "EN", - "EN", - "EN", - "EN", - "EN", - "EN", - "EN", - "EN", - "EN", - "AL", - "AL", - "AL", - "AL", - "AL", - "AL", - ]; - function isOdd(e) { - return 0 != (1 & e); - } - function isEven(e) { - return 0 == (1 & e); - } - function findUnequal(e, t, a) { - let r, n; - for (r = t, n = e.length; r < n; ++r) if (e[r] !== a) return r; - return r; - } - function setValues(e, t, a, r) { - for (let n = t; n < a; ++n) e[n] = r; - } - function reverseValues(e, t, a) { - for (let r = t, n = a - 1; r < n; ++r, --n) { - const t = e[r]; - e[r] = e[n]; - e[n] = t; - } - } - function createBidiText(e, t, a = !1) { - let r = "ltr"; - a ? (r = "ttb") : t || (r = "rtl"); - return { str: e, dir: r }; - } - const s = [], - o = []; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.getFontSubstitution = function getFontSubstitution(e, t, a, u, d) { - const f = (u = (0, r.normalizeFontName)(u)); - let g = e.get(f); - if (g) return g; - let p = l.get(u); - if (!p) - for (const [e, t] of h) - if (u.startsWith(e)) { - u = `${t}${u.substring(e.length)}`; - p = l.get(u); - break; - } - let m = !1; - if (!p) { - p = l.get(d); - m = !0; - } - const b = `${t.getDocId()}_s${t.createFontId()}`; - if (!p) { - if (!(0, n.validateFontName)(u)) { - e.set(f, null); - return null; - } - const t = /bold/gi.test(u), - a = /oblique|italic/gi.test(u); - g = { - css: b, - guessFallback: !0, - loadedName: b, - baseFontName: u, - src: `local(${u})`, - style: (t && a && c) || (t && s) || (a && o) || i, - }; - e.set(f, g); - return g; - } - const y = []; - m && (0, n.validateFontName)(u) && y.push(`local(${u})`); - const { style: w, ultimate: S } = generateFont(p, y, a), - x = null === S; - g = { - css: `${b}${x ? "" : `,${S}`}`, - guessFallback: x, - loadedName: b, - baseFontName: u, - src: y.join(","), - style: w, - }; - e.set(f, g); - return g; - }; - var r = a(38), - n = a(3); - const i = { style: "normal", weight: "normal" }, - s = { style: "normal", weight: "bold" }, - o = { style: "italic", weight: "normal" }, - c = { style: "italic", weight: "bold" }, - l = new Map([ - [ - "Times-Roman", - { - local: [ - "Times New Roman", - "Times-Roman", - "Times", - "Liberation Serif", - "Nimbus Roman", - "Nimbus Roman L", - "Tinos", - "Thorndale", - "TeX Gyre Termes", - "FreeSerif", - "DejaVu Serif", - "Bitstream Vera Serif", - "Ubuntu", - ], - style: i, - ultimate: "serif", - }, - ], - [ - "Times-Bold", - { alias: "Times-Roman", style: s, ultimate: "serif" }, - ], - [ - "Times-Italic", - { alias: "Times-Roman", style: o, ultimate: "serif" }, - ], - [ - "Times-BoldItalic", - { alias: "Times-Roman", style: c, ultimate: "serif" }, - ], - [ - "Helvetica", - { - local: [ - "Helvetica", - "Helvetica Neue", - "Arial", - "Arial Nova", - "Liberation Sans", - "Arimo", - "Nimbus Sans", - "Nimbus Sans L", - "A030", - "TeX Gyre Heros", - "FreeSans", - "DejaVu Sans", - "Albany", - "Bitstream Vera Sans", - "Arial Unicode MS", - "Microsoft Sans Serif", - "Apple Symbols", - "Cantarell", - ], - path: "LiberationSans-Regular.ttf", - style: i, - ultimate: "sans-serif", - }, - ], - [ - "Helvetica-Bold", - { - alias: "Helvetica", - path: "LiberationSans-Bold.ttf", - style: s, - ultimate: "sans-serif", - }, - ], - [ - "Helvetica-Oblique", - { - alias: "Helvetica", - path: "LiberationSans-Italic.ttf", - style: o, - ultimate: "sans-serif", - }, - ], - [ - "Helvetica-BoldOblique", - { - alias: "Helvetica", - path: "LiberationSans-BoldItalic.ttf", - style: c, - ultimate: "sans-serif", - }, - ], - [ - "Courier", - { - local: [ - "Courier", - "Courier New", - "Liberation Mono", - "Nimbus Mono", - "Nimbus Mono L", - "Cousine", - "Cumberland", - "TeX Gyre Cursor", - "FreeMono", - ], - style: i, - ultimate: "monospace", - }, - ], - [ - "Courier-Bold", - { alias: "Courier", style: s, ultimate: "monospace" }, - ], - [ - "Courier-Oblique", - { alias: "Courier", style: o, ultimate: "monospace" }, - ], - [ - "Courier-BoldOblique", - { alias: "Courier", style: c, ultimate: "monospace" }, - ], - [ - "ArialBlack", - { - local: ["Arial Black"], - style: { style: "normal", weight: "900" }, - fallback: "Helvetica-Bold", - }, - ], - ["ArialBlack-Bold", { alias: "ArialBlack" }], - [ - "ArialBlack-Italic", - { - alias: "ArialBlack", - style: { style: "italic", weight: "900" }, - fallback: "Helvetica-BoldOblique", - }, - ], - ["ArialBlack-BoldItalic", { alias: "ArialBlack-Italic" }], - [ - "ArialNarrow", - { - local: [ - "Arial Narrow", - "Liberation Sans Narrow", - "Helvetica Condensed", - "Nimbus Sans Narrow", - "TeX Gyre Heros Cn", - ], - style: i, - fallback: "Helvetica", - }, - ], - [ - "ArialNarrow-Bold", - { alias: "ArialNarrow", style: s, fallback: "Helvetica-Bold" }, - ], - [ - "ArialNarrow-Italic", - { - alias: "ArialNarrow", - style: o, - fallback: "Helvetica-Oblique", - }, - ], - [ - "ArialNarrow-BoldItalic", - { - alias: "ArialNarrow", - style: c, - fallback: "Helvetica-BoldOblique", - }, - ], - [ - "Calibri", - { - local: ["Calibri", "Carlito"], - style: i, - fallback: "Helvetica", - }, - ], - [ - "Calibri-Bold", - { alias: "Calibri", style: s, fallback: "Helvetica-Bold" }, - ], - [ - "Calibri-Italic", - { alias: "Calibri", style: o, fallback: "Helvetica-Oblique" }, - ], - [ - "Calibri-BoldItalic", - { - alias: "Calibri", - style: c, - fallback: "Helvetica-BoldOblique", - }, - ], - ["Wingdings", { local: ["Wingdings", "URW Dingbats"], style: i }], - ["Wingdings-Regular", { alias: "Wingdings" }], - ["Wingdings-Bold", { alias: "Wingdings" }], - ]), - h = new Map([["Arial-Black", "ArialBlack"]]); - function generateFont( - { alias: e, local: t, path: a, fallback: r, style: n, ultimate: i }, - h, - u, - d = !0, - f = !0, - g = "", - ) { - const p = { style: null, ultimate: null }; - if (t) { - const e = g ? ` ${g}` : ""; - for (const a of t) h.push(`local(${a}${e})`); - } - if (e) { - const t = l.get(e), - i = - g || - (function getStyleToAppend(e) { - switch (e) { - case s: - return "Bold"; - case o: - return "Italic"; - case c: - return "Bold Italic"; - default: - if ("bold" === e?.weight) return "Bold"; - if ("italic" === e?.style) return "Italic"; - } - return ""; - })(n); - Object.assign(p, generateFont(t, h, u, d && !r, f && !a, i)); - } - n && (p.style = n); - i && (p.ultimate = i); - if (d && r) { - const e = l.get(r), - { ultimate: t } = generateFont(e, h, u, d, f && !a, g); - p.ultimate ||= t; - } - f && a && u && h.push(`url(${u}${a})`); - return p; - } - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.ImageResizer = void 0; - var r = a(2); - class ImageResizer { - constructor(e, t) { - this._imgData = e; - this._isMask = t; - } - static needsToBeResized(e, t) { - if (e <= this._goodSquareLength && t <= this._goodSquareLength) - return !1; - const { MAX_DIM: a } = this; - if (e > a || t > a) return !0; - const r = e * t; - if (this._hasMaxArea) return r > this.MAX_AREA; - if (r < this._goodSquareLength ** 2) return !1; - if (this._areGoodDims(e, t)) { - this._goodSquareLength = Math.max( - this._goodSquareLength, - Math.floor(Math.sqrt(e * t)), - ); - return !1; - } - this._goodSquareLength = this._guessMax( - this._goodSquareLength, - a, - 128, - 0, - ); - return r > (this.MAX_AREA = this._goodSquareLength ** 2); - } - static get MAX_DIM() { - return (0, r.shadow)( - this, - "MAX_DIM", - this._guessMax(2048, 65537, 0, 1), - ); - } - static get MAX_AREA() { - this._hasMaxArea = !0; - return (0, r.shadow)( - this, - "MAX_AREA", - this._guessMax( - ImageResizer._goodSquareLength, - this.MAX_DIM, - 128, - 0, - ) ** 2, - ); - } - static set MAX_AREA(e) { - if (e >= 0) { - this._hasMaxArea = !0; - (0, r.shadow)(this, "MAX_AREA", e); - } - } - static setMaxArea(e) { - this._hasMaxArea || (this.MAX_AREA = e >> 2); - } - static _areGoodDims(e, t) { - try { - const a = new OffscreenCanvas(e, t), - r = a.getContext("2d"); - r.fillRect(0, 0, 1, 1); - const n = r.getImageData(0, 0, 1, 1).data[3]; - a.width = a.height = 1; - return 0 !== n; - } catch { - return !1; - } - } - static _guessMax(e, t, a, r) { - for (; e + a + 1 < t; ) { - const a = Math.floor((e + t) / 2), - n = r || a; - this._areGoodDims(a, n) ? (e = a) : (t = a); - } - return e; - } - static async createImage(e, t = !1) { - return new ImageResizer(e, t)._createImage(); - } - async _createImage() { - const e = this._encodeBMP(), - t = new Blob([e.buffer], { type: "image/bmp" }), - a = createImageBitmap(t), - { MAX_AREA: r, MAX_DIM: n } = ImageResizer, - { _imgData: i } = this, - { width: s, height: o } = i, - c = Math.max(s / n, o / n, Math.sqrt((s * o) / r)), - l = Math.max(c, 2), - h = Math.round(10 * (c + 1.25)) / 10 / l, - u = Math.floor(Math.log2(h)), - d = new Array(u + 2).fill(2); - d[0] = l; - d.splice(-1, 1, h / (1 << u)); - let f = s, - g = o, - p = await a; - for (const e of d) { - const t = f, - a = g; - f = Math.floor(f / e) - 1; - g = Math.floor(g / e) - 1; - const r = new OffscreenCanvas(f, g); - r.getContext("2d").drawImage(p, 0, 0, t, a, 0, 0, f, g); - p = r.transferToImageBitmap(); - } - i.data = null; - i.bitmap = p; - i.width = f; - i.height = g; - return i; - } - _encodeBMP() { - const { width: e, height: t, kind: a } = this._imgData; - let n, - i = this._imgData.data, - s = new Uint8Array(0), - o = s, - c = 0; - switch (a) { - case r.ImageKind.GRAYSCALE_1BPP: { - n = 1; - s = new Uint8Array( - this._isMask - ? [255, 255, 255, 255, 0, 0, 0, 0] - : [0, 0, 0, 0, 255, 255, 255, 255], - ); - const a = (e + 7) >> 3, - r = (a + 3) & -4; - if (a !== r) { - const e = new Uint8Array(r * t); - let n = 0; - for (let s = 0, o = t * a; s < o; s += a, n += r) - e.set(i.subarray(s, s + a), n); - i = e; - } - break; - } - case r.ImageKind.RGB_24BPP: - n = 24; - if (3 & e) { - const a = 3 * e, - r = (a + 3) & -4, - n = r - a, - s = new Uint8Array(r * t); - let o = 0; - for (let e = 0, r = t * a; e < r; e += a) { - const t = i.subarray(e, e + a); - for (let e = 0; e < a; e += 3) { - s[o++] = t[e + 2]; - s[o++] = t[e + 1]; - s[o++] = t[e]; - } - o += n; - } - i = s; - } else - for (let e = 0, t = i.length; e < t; e += 3) { - const t = i[e]; - i[e] = i[e + 2]; - i[e + 2] = t; - } - break; - case r.ImageKind.RGBA_32BPP: - n = 32; - c = 3; - o = new Uint8Array(68); - const a = new DataView(o.buffer); - if (r.FeatureTest.isLittleEndian) { - a.setUint32(0, 255, !0); - a.setUint32(4, 65280, !0); - a.setUint32(8, 16711680, !0); - a.setUint32(12, 4278190080, !0); - } else { - a.setUint32(0, 4278190080, !0); - a.setUint32(4, 16711680, !0); - a.setUint32(8, 65280, !0); - a.setUint32(12, 255, !0); - } - break; - default: - throw new Error("invalid format"); - } - let l = 0; - const h = 40 + o.length, - u = 14 + h + s.length + i.length, - d = new Uint8Array(u), - f = new DataView(d.buffer); - f.setUint16(l, 19778, !0); - l += 2; - f.setUint32(l, u, !0); - l += 4; - f.setUint32(l, 0, !0); - l += 4; - f.setUint32(l, 14 + h + s.length, !0); - l += 4; - f.setUint32(l, h, !0); - l += 4; - f.setInt32(l, e, !0); - l += 4; - f.setInt32(l, -t, !0); - l += 4; - f.setUint16(l, 1, !0); - l += 2; - f.setUint16(l, n, !0); - l += 2; - f.setUint32(l, c, !0); - l += 4; - f.setUint32(l, 0, !0); - l += 4; - f.setInt32(l, 0, !0); - l += 4; - f.setInt32(l, 0, !0); - l += 4; - f.setUint32(l, s.length / 4, !0); - l += 4; - f.setUint32(l, 0, !0); - l += 4; - d.set(o, l); - l += o.length; - d.set(s, l); - l += s.length; - d.set(i, l); - return d; - } - } - t.ImageResizer = ImageResizer; - ImageResizer._goodSquareLength = 2048; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.MurmurHash3_64 = void 0; - var r = a(2); - const n = 3285377520, - i = 4294901760, - s = 65535; - t.MurmurHash3_64 = class MurmurHash3_64 { - constructor(e) { - this.h1 = e ? 4294967295 & e : n; - this.h2 = e ? 4294967295 & e : n; - } - update(e) { - let t, a; - if ("string" == typeof e) { - t = new Uint8Array(2 * e.length); - a = 0; - for (let r = 0, n = e.length; r < n; r++) { - const n = e.charCodeAt(r); - if (n <= 255) t[a++] = n; - else { - t[a++] = n >>> 8; - t[a++] = 255 & n; - } - } - } else { - if (!(0, r.isArrayBuffer)(e)) - throw new Error( - "Wrong data format in MurmurHash3_64_update. Input must be a string or array.", - ); - t = e.slice(); - a = t.byteLength; - } - const n = a >> 2, - o = a - 4 * n, - c = new Uint32Array(t.buffer, 0, n); - let l = 0, - h = 0, - u = this.h1, - d = this.h2; - const f = 3432918353, - g = 461845907, - p = 11601, - m = 13715; - for (let e = 0; e < n; e++) - if (1 & e) { - l = c[e]; - l = ((l * f) & i) | ((l * p) & s); - l = (l << 15) | (l >>> 17); - l = ((l * g) & i) | ((l * m) & s); - u ^= l; - u = (u << 13) | (u >>> 19); - u = 5 * u + 3864292196; - } else { - h = c[e]; - h = ((h * f) & i) | ((h * p) & s); - h = (h << 15) | (h >>> 17); - h = ((h * g) & i) | ((h * m) & s); - d ^= h; - d = (d << 13) | (d >>> 19); - d = 5 * d + 3864292196; - } - l = 0; - switch (o) { - case 3: - l ^= t[4 * n + 2] << 16; - case 2: - l ^= t[4 * n + 1] << 8; - case 1: - l ^= t[4 * n]; - l = ((l * f) & i) | ((l * p) & s); - l = (l << 15) | (l >>> 17); - l = ((l * g) & i) | ((l * m) & s); - 1 & n ? (u ^= l) : (d ^= l); - } - this.h1 = u; - this.h2 = d; - } - hexdigest() { - let e = this.h1, - t = this.h2; - e ^= t >>> 1; - e = ((3981806797 * e) & i) | ((36045 * e) & s); - t = - ((4283543511 * t) & i) | - (((2950163797 * ((t << 16) | (e >>> 16))) & i) >>> 16); - e ^= t >>> 1; - e = ((444984403 * e) & i) | ((60499 * e) & s); - t = - ((3301882366 * t) & i) | - (((3120437893 * ((t << 16) | (e >>> 16))) & i) >>> 16); - e ^= t >>> 1; - return ( - (e >>> 0).toString(16).padStart(8, "0") + - (t >>> 0).toString(16).padStart(8, "0") - ); - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.OperatorList = void 0; - var r = a(2); - function addState(e, t, a, r, n) { - let i = e; - for (let e = 0, a = t.length - 1; e < a; e++) { - const a = t[e]; - i = i[a] ||= []; - } - i[t.at(-1)] = { checkFn: a, iterateFn: r, processFn: n }; - } - const n = []; - addState( - n, - [ - r.OPS.save, - r.OPS.transform, - r.OPS.paintInlineImageXObject, - r.OPS.restore, - ], - null, - function iterateInlineImageGroup(e, t) { - const a = e.fnArray, - n = (t - (e.iCurr - 3)) % 4; - switch (n) { - case 0: - return a[t] === r.OPS.save; - case 1: - return a[t] === r.OPS.transform; - case 2: - return a[t] === r.OPS.paintInlineImageXObject; - case 3: - return a[t] === r.OPS.restore; - } - throw new Error(`iterateInlineImageGroup - invalid pos: ${n}`); - }, - function foundInlineImageGroup(e, t) { - const a = e.fnArray, - n = e.argsArray, - i = e.iCurr, - s = i - 3, - o = i - 2, - c = i - 1, - l = Math.min(Math.floor((t - s) / 4), 200); - if (l < 10) return t - ((t - s) % 4); - let h = 0; - const u = []; - let d = 0, - f = 1, - g = 1; - for (let e = 0; e < l; e++) { - const t = n[o + (e << 2)], - a = n[c + (e << 2)][0]; - if (f + a.width > 1e3) { - h = Math.max(h, f); - g += d + 2; - f = 0; - d = 0; - } - u.push({ transform: t, x: f, y: g, w: a.width, h: a.height }); - f += a.width + 2; - d = Math.max(d, a.height); - } - const p = Math.max(h, f) + 1, - m = g + d + 1, - b = new Uint8Array(p * m * 4), - y = p << 2; - for (let e = 0; e < l; e++) { - const t = n[c + (e << 2)][0].data, - a = u[e].w << 2; - let r = 0, - i = (u[e].x + u[e].y * p) << 2; - b.set(t.subarray(0, a), i - y); - for (let n = 0, s = u[e].h; n < s; n++) { - b.set(t.subarray(r, r + a), i); - r += a; - i += y; - } - b.set(t.subarray(r - a, r), i); - for (; i >= 0; ) { - t[i - 4] = t[i]; - t[i - 3] = t[i + 1]; - t[i - 2] = t[i + 2]; - t[i - 1] = t[i + 3]; - t[i + a] = t[i + a - 4]; - t[i + a + 1] = t[i + a - 3]; - t[i + a + 2] = t[i + a - 2]; - t[i + a + 3] = t[i + a - 1]; - i -= y; - } - } - const w = { width: p, height: m }; - if (e.isOffscreenCanvasSupported) { - const e = new OffscreenCanvas(p, m); - e.getContext("2d").putImageData( - new ImageData(new Uint8ClampedArray(b.buffer), p, m), - 0, - 0, - ); - w.bitmap = e.transferToImageBitmap(); - w.data = null; - } else { - w.kind = r.ImageKind.RGBA_32BPP; - w.data = b; - } - a.splice(s, 4 * l, r.OPS.paintInlineImageXObjectGroup); - n.splice(s, 4 * l, [w, u]); - return s + 1; - }, - ); - addState( - n, - [ - r.OPS.save, - r.OPS.transform, - r.OPS.paintImageMaskXObject, - r.OPS.restore, - ], - null, - function iterateImageMaskGroup(e, t) { - const a = e.fnArray, - n = (t - (e.iCurr - 3)) % 4; - switch (n) { - case 0: - return a[t] === r.OPS.save; - case 1: - return a[t] === r.OPS.transform; - case 2: - return a[t] === r.OPS.paintImageMaskXObject; - case 3: - return a[t] === r.OPS.restore; - } - throw new Error(`iterateImageMaskGroup - invalid pos: ${n}`); - }, - function foundImageMaskGroup(e, t) { - const a = e.fnArray, - n = e.argsArray, - i = e.iCurr, - s = i - 3, - o = i - 2, - c = i - 1; - let l = Math.floor((t - s) / 4); - if (l < 10) return t - ((t - s) % 4); - let h, - u, - d = !1; - const f = n[c][0], - g = n[o][0], - p = n[o][1], - m = n[o][2], - b = n[o][3]; - if (p === m) { - d = !0; - h = o + 4; - let e = c + 4; - for (let t = 1; t < l; t++, h += 4, e += 4) { - u = n[h]; - if ( - n[e][0] !== f || - u[0] !== g || - u[1] !== p || - u[2] !== m || - u[3] !== b - ) { - t < 10 ? (d = !1) : (l = t); - break; - } - } - } - if (d) { - l = Math.min(l, 1e3); - const e = new Float32Array(2 * l); - h = o; - for (let t = 0; t < l; t++, h += 4) { - u = n[h]; - e[t << 1] = u[4]; - e[1 + (t << 1)] = u[5]; - } - a.splice(s, 4 * l, r.OPS.paintImageMaskXObjectRepeat); - n.splice(s, 4 * l, [f, g, p, m, b, e]); - } else { - l = Math.min(l, 100); - const e = []; - for (let t = 0; t < l; t++) { - u = n[o + (t << 2)]; - const a = n[c + (t << 2)][0]; - e.push({ - data: a.data, - width: a.width, - height: a.height, - interpolate: a.interpolate, - count: a.count, - transform: u, - }); - } - a.splice(s, 4 * l, r.OPS.paintImageMaskXObjectGroup); - n.splice(s, 4 * l, [e]); - } - return s + 1; - }, - ); - addState( - n, - [ - r.OPS.save, - r.OPS.transform, - r.OPS.paintImageXObject, - r.OPS.restore, - ], - function (e) { - const t = e.argsArray, - a = e.iCurr - 2; - return 0 === t[a][1] && 0 === t[a][2]; - }, - function iterateImageGroup(e, t) { - const a = e.fnArray, - n = e.argsArray, - i = (t - (e.iCurr - 3)) % 4; - switch (i) { - case 0: - return a[t] === r.OPS.save; - case 1: - if (a[t] !== r.OPS.transform) return !1; - const i = e.iCurr - 2, - s = n[i][0], - o = n[i][3]; - return ( - n[t][0] === s && - 0 === n[t][1] && - 0 === n[t][2] && - n[t][3] === o - ); - case 2: - if (a[t] !== r.OPS.paintImageXObject) return !1; - const c = n[e.iCurr - 1][0]; - return n[t][0] === c; - case 3: - return a[t] === r.OPS.restore; - } - throw new Error(`iterateImageGroup - invalid pos: ${i}`); - }, - function (e, t) { - const a = e.fnArray, - n = e.argsArray, - i = e.iCurr, - s = i - 3, - o = i - 2, - c = n[i - 1][0], - l = n[o][0], - h = n[o][3], - u = Math.min(Math.floor((t - s) / 4), 1e3); - if (u < 3) return t - ((t - s) % 4); - const d = new Float32Array(2 * u); - let f = o; - for (let e = 0; e < u; e++, f += 4) { - const t = n[f]; - d[e << 1] = t[4]; - d[1 + (e << 1)] = t[5]; - } - const g = [c, l, h, d]; - a.splice(s, 4 * u, r.OPS.paintImageXObjectRepeat); - n.splice(s, 4 * u, g); - return s + 1; - }, - ); - addState( - n, - [ - r.OPS.beginText, - r.OPS.setFont, - r.OPS.setTextMatrix, - r.OPS.showText, - r.OPS.endText, - ], - null, - function iterateShowTextGroup(e, t) { - const a = e.fnArray, - n = e.argsArray, - i = (t - (e.iCurr - 4)) % 5; - switch (i) { - case 0: - return a[t] === r.OPS.beginText; - case 1: - return a[t] === r.OPS.setFont; - case 2: - return a[t] === r.OPS.setTextMatrix; - case 3: - if (a[t] !== r.OPS.showText) return !1; - const i = e.iCurr - 3, - s = n[i][0], - o = n[i][1]; - return n[t][0] === s && n[t][1] === o; - case 4: - return a[t] === r.OPS.endText; - } - throw new Error(`iterateShowTextGroup - invalid pos: ${i}`); - }, - function (e, t) { - const a = e.fnArray, - r = e.argsArray, - n = e.iCurr, - i = n - 4, - s = n - 3, - o = n - 2, - c = n - 1, - l = n, - h = r[s][0], - u = r[s][1]; - let d = Math.min(Math.floor((t - i) / 5), 1e3); - if (d < 3) return t - ((t - i) % 5); - let f = i; - if ( - i >= 4 && - a[i - 4] === a[s] && - a[i - 3] === a[o] && - a[i - 2] === a[c] && - a[i - 1] === a[l] && - r[i - 4][0] === h && - r[i - 4][1] === u - ) { - d++; - f -= 5; - } - let g = f + 4; - for (let e = 1; e < d; e++) { - a.splice(g, 3); - r.splice(g, 3); - g += 2; - } - return g + 1; - }, - ); - class NullOptimizer { - constructor(e) { - this.queue = e; - } - _optimize() {} - push(e, t) { - this.queue.fnArray.push(e); - this.queue.argsArray.push(t); - this._optimize(); - } - flush() {} - reset() {} - } - class QueueOptimizer extends NullOptimizer { - constructor(e) { - super(e); - this.state = null; - this.context = { - iCurr: 0, - fnArray: e.fnArray, - argsArray: e.argsArray, - isOffscreenCanvasSupported: !1, - }; - this.match = null; - this.lastProcessed = 0; - } - set isOffscreenCanvasSupported(e) { - this.context.isOffscreenCanvasSupported = e; - } - _optimize() { - const e = this.queue.fnArray; - let t = this.lastProcessed, - a = e.length, - r = this.state, - i = this.match; - if (!r && !i && t + 1 === a && !n[e[t]]) { - this.lastProcessed = a; - return; - } - const s = this.context; - for (; t < a; ) { - if (i) { - if ((0, i.iterateFn)(s, t)) { - t++; - continue; - } - t = (0, i.processFn)(s, t + 1); - a = e.length; - i = null; - r = null; - if (t >= a) break; - } - r = (r || n)[e[t]]; - if (r && !Array.isArray(r)) { - s.iCurr = t; - t++; - if (!r.checkFn || (0, r.checkFn)(s)) { - i = r; - r = null; - } else r = null; - } else t++; - } - this.state = r; - this.match = i; - this.lastProcessed = t; - } - flush() { - for (; this.match; ) { - const e = this.queue.fnArray.length; - this.lastProcessed = (0, this.match.processFn)(this.context, e); - this.match = null; - this.state = null; - this._optimize(); - } - } - reset() { - this.state = null; - this.match = null; - this.lastProcessed = 0; - } - } - class OperatorList { - static CHUNK_SIZE = 1e3; - static CHUNK_SIZE_ABOUT = this.CHUNK_SIZE - 5; - constructor(e = 0, t) { - this._streamSink = t; - this.fnArray = []; - this.argsArray = []; - this.optimizer = - !t || e & r.RenderingIntentFlag.OPLIST - ? new NullOptimizer(this) - : new QueueOptimizer(this); - this.dependencies = new Set(); - this._totalLength = 0; - this.weight = 0; - this._resolved = t ? null : Promise.resolve(); - } - set isOffscreenCanvasSupported(e) { - this.optimizer.isOffscreenCanvasSupported = e; - } - get length() { - return this.argsArray.length; - } - get ready() { - return this._resolved || this._streamSink.ready; - } - get totalLength() { - return this._totalLength + this.length; - } - addOp(e, t) { - this.optimizer.push(e, t); - this.weight++; - this._streamSink && - (this.weight >= OperatorList.CHUNK_SIZE || - (this.weight >= OperatorList.CHUNK_SIZE_ABOUT && - (e === r.OPS.restore || e === r.OPS.endText))) && - this.flush(); - } - addImageOps(e, t, a) { - void 0 !== a && - this.addOp(r.OPS.beginMarkedContentProps, ["OC", a]); - this.addOp(e, t); - void 0 !== a && this.addOp(r.OPS.endMarkedContent, []); - } - addDependency(e) { - if (!this.dependencies.has(e)) { - this.dependencies.add(e); - this.addOp(r.OPS.dependency, [e]); - } - } - addDependencies(e) { - for (const t of e) this.addDependency(t); - } - addOpList(e) { - if (e instanceof OperatorList) { - for (const t of e.dependencies) this.dependencies.add(t); - for (let t = 0, a = e.length; t < a; t++) - this.addOp(e.fnArray[t], e.argsArray[t]); - } else - (0, r.warn)('addOpList - ignoring invalid "opList" parameter.'); - } - getIR() { - return { - fnArray: this.fnArray, - argsArray: this.argsArray, - length: this.length, - }; - } - get _transfers() { - const e = [], - { fnArray: t, argsArray: a, length: n } = this; - for (let i = 0; i < n; i++) - switch (t[i]) { - case r.OPS.paintInlineImageXObject: - case r.OPS.paintInlineImageXObjectGroup: - case r.OPS.paintImageMaskXObject: - const t = a[i][0]; - !t.cached && - t.data?.buffer instanceof ArrayBuffer && - e.push(t.data.buffer); - } - return e; - } - flush(e = !1, t = null) { - this.optimizer.flush(); - const a = this.length; - this._totalLength += a; - this._streamSink.enqueue( - { - fnArray: this.fnArray, - argsArray: this.argsArray, - lastChunk: e, - separateAnnots: t, - length: a, - }, - 1, - this._transfers, - ); - this.dependencies.clear(); - this.fnArray.length = 0; - this.argsArray.length = 0; - this.weight = 0; - this.optimizer.reset(); - } - } - t.OperatorList = OperatorList; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.PDFImage = void 0; - var r = a(2), - n = a(28), - i = a(5), - s = a(12), - o = a(18), - c = a(62), - l = a(26), - h = a(30), - u = a(4); - function decodeAndClamp(e, t, a, r) { - (e = t + e * a) < 0 ? (e = 0) : e > r && (e = r); - return e; - } - function resizeImageMask(e, t, a, r, n, i) { - const s = n * i; - let o; - o = - t <= 8 - ? new Uint8Array(s) - : t <= 16 - ? new Uint16Array(s) - : new Uint32Array(s); - const c = a / n, - l = r / i; - let h, - u, - d, - f, - g = 0; - const p = new Uint16Array(n), - m = a; - for (h = 0; h < n; h++) p[h] = Math.floor(h * c); - for (h = 0; h < i; h++) { - d = Math.floor(h * l) * m; - for (u = 0; u < n; u++) { - f = d + p[u]; - o[g++] = e[f]; - } - } - return o; - } - class PDFImage { - constructor({ - xref: e, - res: t, - image: a, - isInline: n = !1, - smask: o = null, - mask: c = null, - isMask: l = !1, - pdfFunctionFactory: d, - localColorSpaceCache: f, - }) { - this.image = a; - const g = a.dict, - p = g.get("F", "Filter"); - let m; - if (p instanceof u.Name) m = p.name; - else if (Array.isArray(p)) { - const t = e.fetchIfRef(p[0]); - t instanceof u.Name && (m = t.name); - } - switch (m) { - case "JPXDecode": - const e = new h.JpxImage(); - e.parseImageProperties(a.stream); - a.stream.reset(); - a.width = e.width; - a.height = e.height; - a.bitsPerComponent = e.bitsPerComponent; - a.numComps = e.componentsCount; - break; - case "JBIG2Decode": - a.bitsPerComponent = 1; - a.numComps = 1; - } - let b = g.get("W", "Width"), - y = g.get("H", "Height"); - if ( - Number.isInteger(a.width) && - a.width > 0 && - Number.isInteger(a.height) && - a.height > 0 && - (a.width !== b || a.height !== y) - ) { - (0, r.warn)( - "PDFImage - using the Width/Height of the image data, rather than the image dictionary.", - ); - b = a.width; - y = a.height; - } - if (b < 1 || y < 1) - throw new r.FormatError( - `Invalid image width: ${b} or height: ${y}`, - ); - this.width = b; - this.height = y; - this.interpolate = g.get("I", "Interpolate"); - this.imageMask = g.get("IM", "ImageMask") || !1; - this.matte = g.get("Matte") || !1; - let w = a.bitsPerComponent; - if (!w) { - w = g.get("BPC", "BitsPerComponent"); - if (!w) { - if (!this.imageMask) - throw new r.FormatError( - `Bits per component missing in image: ${this.imageMask}`, - ); - w = 1; - } - } - this.bpc = w; - if (!this.imageMask) { - let i = g.getRaw("CS") || g.getRaw("ColorSpace"); - if (!i) { - (0, r.info)("JPX images (which do not require color spaces)"); - switch (a.numComps) { - case 1: - i = u.Name.get("DeviceGray"); - break; - case 3: - i = u.Name.get("DeviceRGB"); - break; - case 4: - i = u.Name.get("DeviceCMYK"); - break; - default: - throw new Error( - `JPX images with ${a.numComps} color components not supported.`, - ); - } - } - this.colorSpace = s.ColorSpace.parse({ - cs: i, - xref: e, - resources: n ? t : null, - pdfFunctionFactory: d, - localColorSpaceCache: f, - }); - this.numComps = this.colorSpace.numComps; - } - this.decode = g.getArray("D", "Decode"); - this.needsDecode = !1; - if ( - this.decode && - ((this.colorSpace && - !this.colorSpace.isDefaultDecode(this.decode, w)) || - (l && !s.ColorSpace.isDefaultDecode(this.decode, 1))) - ) { - this.needsDecode = !0; - const e = (1 << w) - 1; - this.decodeCoefficients = []; - this.decodeAddends = []; - const t = "Indexed" === this.colorSpace?.name; - for (let a = 0, r = 0; a < this.decode.length; a += 2, ++r) { - const n = this.decode[a], - i = this.decode[a + 1]; - this.decodeCoefficients[r] = t ? (i - n) / e : i - n; - this.decodeAddends[r] = t ? n : e * n; - } - } - if (o) - this.smask = new PDFImage({ - xref: e, - res: t, - image: o, - isInline: n, - pdfFunctionFactory: d, - localColorSpaceCache: f, - }); - else if (c) - if (c instanceof i.BaseStream) { - c.dict.get("IM", "ImageMask") - ? (this.mask = new PDFImage({ - xref: e, - res: t, - image: c, - isInline: n, - isMask: !0, - pdfFunctionFactory: d, - localColorSpaceCache: f, - })) - : (0, r.warn)( - "Ignoring /Mask in image without /ImageMask.", - ); - } else this.mask = c; - } - static async buildImage({ - xref: e, - res: t, - image: a, - isInline: n = !1, - pdfFunctionFactory: s, - localColorSpaceCache: o, - }) { - const c = a; - let l = null, - h = null; - const u = a.dict.get("SMask"), - d = a.dict.get("Mask"); - u - ? u instanceof i.BaseStream - ? (l = u) - : (0, r.warn)("Unsupported /SMask format.") - : d && - (d instanceof i.BaseStream || Array.isArray(d) - ? (h = d) - : (0, r.warn)("Unsupported /Mask format.")); - return new PDFImage({ - xref: e, - res: t, - image: c, - isInline: n, - smask: l, - mask: h, - pdfFunctionFactory: s, - localColorSpaceCache: o, - }); - } - static createRawMask({ - imgArray: e, - width: t, - height: a, - imageIsFromDecodeStream: r, - inverseDecode: n, - interpolate: i, - }) { - const s = ((t + 7) >> 3) * a, - o = e.byteLength; - let c, l; - if (!r || (n && !(s === o))) - if (n) { - c = new Uint8Array(s); - c.set(e); - c.fill(255, o); - } else c = new Uint8Array(e); - else c = e; - if (n) for (l = 0; l < o; l++) c[l] ^= 255; - return { data: c, width: t, height: a, interpolate: i }; - } - static async createMask({ - imgArray: e, - width: t, - height: a, - imageIsFromDecodeStream: i, - inverseDecode: s, - interpolate: o, - isOffscreenCanvasSupported: l = !1, - }) { - const h = - 1 === t && 1 === a && s === (0 === e.length || !!(128 & e[0])); - if (h) return { isSingleOpaquePixel: h }; - if (l) { - if (c.ImageResizer.needsToBeResized(t, a)) { - const i = new Uint8ClampedArray(t * a * 4); - (0, n.convertBlackAndWhiteToRGBA)({ - src: e, - dest: i, - width: t, - height: a, - nonBlackColor: 0, - inverseDecode: s, - }); - return c.ImageResizer.createImage({ - kind: r.ImageKind.RGBA_32BPP, - data: i, - width: t, - height: a, - interpolate: o, - }); - } - const i = new OffscreenCanvas(t, a), - l = i.getContext("2d"), - h = l.createImageData(t, a); - (0, n.convertBlackAndWhiteToRGBA)({ - src: e, - dest: h.data, - width: t, - height: a, - nonBlackColor: 0, - inverseDecode: s, - }); - l.putImageData(h, 0, 0); - return { - data: null, - width: t, - height: a, - interpolate: o, - bitmap: i.transferToImageBitmap(), - }; - } - return this.createRawMask({ - imgArray: e, - width: t, - height: a, - inverseDecode: s, - imageIsFromDecodeStream: i, - interpolate: o, - }); - } - get drawWidth() { - return Math.max( - this.width, - this.smask?.width || 0, - this.mask?.width || 0, - ); - } - get drawHeight() { - return Math.max( - this.height, - this.smask?.height || 0, - this.mask?.height || 0, - ); - } - decodeBuffer(e) { - const t = this.bpc, - a = this.numComps, - r = this.decodeAddends, - n = this.decodeCoefficients, - i = (1 << t) - 1; - let s, o; - if (1 === t) { - for (s = 0, o = e.length; s < o; s++) e[s] = +!e[s]; - return; - } - let c = 0; - for (s = 0, o = this.width * this.height; s < o; s++) - for (let t = 0; t < a; t++) { - e[c] = decodeAndClamp(e[c], r[t], n[t], i); - c++; - } - } - getComponents(e) { - const t = this.bpc; - if (8 === t) return e; - const a = this.width, - r = this.height, - n = this.numComps, - i = a * r * n; - let s, - o = 0; - s = - t <= 8 - ? new Uint8Array(i) - : t <= 16 - ? new Uint16Array(i) - : new Uint32Array(i); - const c = a * n, - l = (1 << t) - 1; - let h, - u, - d = 0; - if (1 === t) { - let t, a, n; - for (let i = 0; i < r; i++) { - a = d + (-8 & c); - n = d + c; - for (; d < a; ) { - u = e[o++]; - s[d] = (u >> 7) & 1; - s[d + 1] = (u >> 6) & 1; - s[d + 2] = (u >> 5) & 1; - s[d + 3] = (u >> 4) & 1; - s[d + 4] = (u >> 3) & 1; - s[d + 5] = (u >> 2) & 1; - s[d + 6] = (u >> 1) & 1; - s[d + 7] = 1 & u; - d += 8; - } - if (d < n) { - u = e[o++]; - t = 128; - for (; d < n; ) { - s[d++] = +!!(u & t); - t >>= 1; - } - } - } - } else { - let a = 0; - u = 0; - for (d = 0, h = i; d < h; ++d) { - if (d % c == 0) { - u = 0; - a = 0; - } - for (; a < t; ) { - u = (u << 8) | e[o++]; - a += 8; - } - const r = a - t; - let n = u >> r; - n < 0 ? (n = 0) : n > l && (n = l); - s[d] = n; - u &= (1 << r) - 1; - a = r; - } - } - return s; - } - fillOpacity(e, t, a, n, i) { - const s = this.smask, - o = this.mask; - let c, l, h, u, d, f; - if (s) { - l = s.width; - h = s.height; - c = new Uint8ClampedArray(l * h); - s.fillGrayBuffer(c); - (l === t && h === a) || - (c = resizeImageMask(c, s.bpc, l, h, t, a)); - } else if (o) - if (o instanceof PDFImage) { - l = o.width; - h = o.height; - c = new Uint8ClampedArray(l * h); - o.numComps = 1; - o.fillGrayBuffer(c); - for (u = 0, d = l * h; u < d; ++u) c[u] = 255 - c[u]; - (l === t && h === a) || - (c = resizeImageMask(c, o.bpc, l, h, t, a)); - } else { - if (!Array.isArray(o)) - throw new r.FormatError("Unknown mask format."); - { - c = new Uint8ClampedArray(t * a); - const e = this.numComps; - for (u = 0, d = t * a; u < d; ++u) { - let t = 0; - const a = u * e; - for (f = 0; f < e; ++f) { - const e = i[a + f], - r = 2 * f; - if (e < o[r] || e > o[r + 1]) { - t = 255; - break; - } - } - c[u] = t; - } - } - } - if (c) - for (u = 0, f = 3, d = t * n; u < d; ++u, f += 4) e[f] = c[u]; - else for (u = 0, f = 3, d = t * n; u < d; ++u, f += 4) e[f] = 255; - } - undoPreblend(e, t, a) { - const r = this.smask?.matte; - if (!r) return; - const n = this.colorSpace.getRgb(r, 0), - i = n[0], - s = n[1], - o = n[2], - c = t * a * 4; - for (let t = 0; t < c; t += 4) { - const a = e[t + 3]; - if (0 === a) { - e[t] = 255; - e[t + 1] = 255; - e[t + 2] = 255; - continue; - } - const r = 255 / a; - e[t] = (e[t] - i) * r + i; - e[t + 1] = (e[t + 1] - s) * r + s; - e[t + 2] = (e[t + 2] - o) * r + o; - } - } - async createImageData(e = !1, t = !1) { - const a = this.drawWidth, - n = this.drawHeight, - i = { - width: a, - height: n, - interpolate: this.interpolate, - kind: 0, - data: null, - }, - s = this.numComps, - o = this.width, - h = this.height, - u = this.bpc, - d = (o * s * u + 7) >> 3, - f = t && c.ImageResizer.needsToBeResized(a, n); - if (!e) { - let e; - "DeviceGray" === this.colorSpace.name && 1 === u - ? (e = r.ImageKind.GRAYSCALE_1BPP) - : "DeviceRGB" !== this.colorSpace.name || - 8 !== u || - this.needsDecode || - (e = r.ImageKind.RGB_24BPP); - if (e && !this.smask && !this.mask && a === o && n === h) { - const s = this.getImageBytes(h * d, {}); - if (t) - return f - ? c.ImageResizer.createImage( - { - data: s, - kind: e, - width: a, - height: n, - interpolate: this.interpolate, - }, - this.needsDecode, - ) - : this.createBitmap(e, o, h, s); - i.kind = e; - i.data = s; - if (this.needsDecode) { - (0, r.assert)( - e === r.ImageKind.GRAYSCALE_1BPP, - "PDFImage.createImageData: The image must be grayscale.", - ); - const t = i.data; - for (let e = 0, a = t.length; e < a; e++) t[e] ^= 255; - } - return i; - } - if ( - this.image instanceof l.JpegStream && - !this.smask && - !this.mask && - !this.needsDecode - ) { - let e = h * d; - if (t && !f) { - let t = !1; - switch (this.colorSpace.name) { - case "DeviceGray": - e *= 4; - t = !0; - break; - case "DeviceRGB": - e = (e / 3) * 4; - t = !0; - break; - case "DeviceCMYK": - t = !0; - } - if (t) { - const t = this.getImageBytes(e, { - drawWidth: a, - drawHeight: n, - forceRGBA: !0, - }); - return this.createBitmap(r.ImageKind.RGBA_32BPP, a, n, t); - } - } else - switch (this.colorSpace.name) { - case "DeviceGray": - e *= 3; - case "DeviceRGB": - case "DeviceCMYK": - i.kind = r.ImageKind.RGB_24BPP; - i.data = this.getImageBytes(e, { - drawWidth: a, - drawHeight: n, - forceRGB: !0, - }); - return f ? c.ImageResizer.createImage(i) : i; - } - } - } - const g = this.getImageBytes(h * d, { internal: !0 }), - p = 0 | (((g.length / d) * n) / h), - m = this.getComponents(g); - let b, y, w, S, x, C; - if (t && !f) { - w = new OffscreenCanvas(a, n); - S = w.getContext("2d"); - x = S.createImageData(a, n); - C = x.data; - } - i.kind = r.ImageKind.RGBA_32BPP; - if (e || this.smask || this.mask) { - (t && !f) || (C = new Uint8ClampedArray(a * n * 4)); - b = 1; - y = !0; - this.fillOpacity(C, a, n, p, m); - } else { - if (!t || f) { - i.kind = r.ImageKind.RGB_24BPP; - C = new Uint8ClampedArray(a * n * 3); - b = 0; - } else { - new Uint32Array(C.buffer).fill( - r.FeatureTest.isLittleEndian ? 4278190080 : 255, - ); - b = 1; - } - y = !1; - } - this.needsDecode && this.decodeBuffer(m); - this.colorSpace.fillRgb(C, o, h, a, n, p, u, m, b); - y && this.undoPreblend(C, a, p); - if (t && !f) { - S.putImageData(x, 0, 0); - return { - data: null, - width: a, - height: n, - bitmap: w.transferToImageBitmap(), - interpolate: this.interpolate, - }; - } - i.data = C; - return f ? c.ImageResizer.createImage(i) : i; - } - fillGrayBuffer(e) { - const t = this.numComps; - if (1 !== t) - throw new r.FormatError( - `Reading gray scale from a color image: ${t}`, - ); - const a = this.width, - n = this.height, - i = this.bpc, - s = (a * t * i + 7) >> 3, - o = this.getImageBytes(n * s, { internal: !0 }), - c = this.getComponents(o); - let l, h; - if (1 === i) { - h = a * n; - if (this.needsDecode) - for (l = 0; l < h; ++l) e[l] = (c[l] - 1) & 255; - else for (l = 0; l < h; ++l) e[l] = 255 & -c[l]; - return; - } - this.needsDecode && this.decodeBuffer(c); - h = a * n; - const u = 255 / ((1 << i) - 1); - for (l = 0; l < h; ++l) e[l] = u * c[l]; - } - createBitmap(e, t, a, i) { - const s = new OffscreenCanvas(t, a), - o = s.getContext("2d"); - let c; - if (e === r.ImageKind.RGBA_32BPP) c = new ImageData(i, t, a); - else { - c = o.createImageData(t, a); - (0, n.convertToRGBA)({ - kind: e, - src: i, - dest: new Uint32Array(c.data.buffer), - width: t, - height: a, - inverseDecode: this.needsDecode, - }); - } - o.putImageData(c, 0, 0); - return { - data: null, - width: t, - height: a, - bitmap: s.transferToImageBitmap(), - interpolate: this.interpolate, - }; - } - getImageBytes( - e, - { - drawWidth: t, - drawHeight: a, - forceRGBA: n = !1, - forceRGB: i = !1, - internal: s = !1, - }, - ) { - this.image.reset(); - this.image.drawWidth = t || this.width; - this.image.drawHeight = a || this.height; - this.image.forceRGBA = !!n; - this.image.forceRGB = !!i; - const c = this.image.getBytes(e); - if (s || this.image instanceof o.DecodeStream) return c; - (0, r.assert)( - c instanceof Uint8Array, - 'PDFImage.getImageBytes: Unsupported "imageBytes" type.', - ); - return new Uint8Array(c); - } - } - t.PDFImage = PDFImage; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.Catalog = void 0; - var r = a(3), - n = a(2), - i = a(4), - s = a(67), - o = a(5), - c = a(68), - l = a(12), - h = a(69), - u = a(59), - d = a(70), - f = a(72); - function fetchDestination(e) { - e instanceof i.Dict && (e = e.get("D")); - return Array.isArray(e) ? e : null; - } - class Catalog { - constructor(e, t) { - this.pdfManager = e; - this.xref = t; - this._catDict = t.getCatalogObj(); - if (!(this._catDict instanceof i.Dict)) - throw new n.FormatError("Catalog object is not a dictionary."); - this.toplevelPagesDict; - this._actualNumPages = null; - this.fontCache = new i.RefSetCache(); - this.builtInCMapCache = new Map(); - this.standardFontDataCache = new Map(); - this.globalImageCache = new u.GlobalImageCache(); - this.pageKidsCountCache = new i.RefSetCache(); - this.pageIndexCache = new i.RefSetCache(); - this.nonBlendModesSet = new i.RefSet(); - this.systemFontCache = new Map(); - } - cloneDict() { - return this._catDict.clone(); - } - get version() { - const e = this._catDict.get("Version"); - if (e instanceof i.Name) { - if (r.PDF_VERSION_REGEXP.test(e.name)) - return (0, n.shadow)(this, "version", e.name); - (0, n.warn)(`Invalid PDF catalog version: ${e.name}`); - } - return (0, n.shadow)(this, "version", null); - } - get lang() { - const e = this._catDict.get("Lang"); - return (0, n.shadow)( - this, - "lang", - "string" == typeof e ? (0, n.stringToPDFString)(e) : null, - ); - } - get needsRendering() { - const e = this._catDict.get("NeedsRendering"); - return (0, n.shadow)( - this, - "needsRendering", - "boolean" == typeof e && e, - ); - } - get collection() { - let e = null; - try { - const t = this._catDict.get("Collection"); - t instanceof i.Dict && t.size > 0 && (e = t); - } catch (e) { - if (e instanceof r.MissingDataException) throw e; - (0, n.info)( - "Cannot fetch Collection entry; assuming no collection is present.", - ); - } - return (0, n.shadow)(this, "collection", e); - } - get acroForm() { - let e = null; - try { - const t = this._catDict.get("AcroForm"); - t instanceof i.Dict && t.size > 0 && (e = t); - } catch (e) { - if (e instanceof r.MissingDataException) throw e; - (0, n.info)( - "Cannot fetch AcroForm entry; assuming no forms are present.", - ); - } - return (0, n.shadow)(this, "acroForm", e); - } - get acroFormRef() { - const e = this._catDict.getRaw("AcroForm"); - return (0, n.shadow)( - this, - "acroFormRef", - e instanceof i.Ref ? e : null, - ); - } - get metadata() { - const e = this._catDict.getRaw("Metadata"); - if (!(e instanceof i.Ref)) - return (0, n.shadow)(this, "metadata", null); - let t = null; - try { - const a = this.xref.fetch( - e, - !this.xref.encrypt?.encryptMetadata, - ); - if (a instanceof o.BaseStream && a.dict instanceof i.Dict) { - const e = a.dict.get("Type"), - r = a.dict.get("Subtype"); - if ((0, i.isName)(e, "Metadata") && (0, i.isName)(r, "XML")) { - const e = (0, n.stringToUTF8String)(a.getString()); - e && (t = new d.MetadataParser(e).serializable); - } - } - } catch (e) { - if (e instanceof r.MissingDataException) throw e; - (0, n.info)(`Skipping invalid Metadata: "${e}".`); - } - return (0, n.shadow)(this, "metadata", t); - } - get markInfo() { - let e = null; - try { - e = this._readMarkInfo(); - } catch (e) { - if (e instanceof r.MissingDataException) throw e; - (0, n.warn)("Unable to read mark info."); - } - return (0, n.shadow)(this, "markInfo", e); - } - _readMarkInfo() { - const e = this._catDict.get("MarkInfo"); - if (!(e instanceof i.Dict)) return null; - const t = { Marked: !1, UserProperties: !1, Suspects: !1 }; - for (const a in t) { - const r = e.get(a); - "boolean" == typeof r && (t[a] = r); - } - return t; - } - get structTreeRoot() { - let e = null; - try { - e = this._readStructTreeRoot(); - } catch (e) { - if (e instanceof r.MissingDataException) throw e; - (0, n.warn)("Unable read to structTreeRoot info."); - } - return (0, n.shadow)(this, "structTreeRoot", e); - } - _readStructTreeRoot() { - const e = this._catDict.getRaw("StructTreeRoot"), - t = this.xref.fetchIfRef(e); - if (!(t instanceof i.Dict)) return null; - const a = new f.StructTreeRoot(t, e); - a.init(); - return a; - } - get toplevelPagesDict() { - const e = this._catDict.get("Pages"); - if (!(e instanceof i.Dict)) - throw new n.FormatError("Invalid top-level pages dictionary."); - return (0, n.shadow)(this, "toplevelPagesDict", e); - } - get documentOutline() { - let e = null; - try { - e = this._readDocumentOutline(); - } catch (e) { - if (e instanceof r.MissingDataException) throw e; - (0, n.warn)("Unable to read document outline."); - } - return (0, n.shadow)(this, "documentOutline", e); - } - _readDocumentOutline() { - let e = this._catDict.get("Outlines"); - if (!(e instanceof i.Dict)) return null; - e = e.getRaw("First"); - if (!(e instanceof i.Ref)) return null; - const t = { items: [] }, - a = [{ obj: e, parent: t }], - r = new i.RefSet(); - r.put(e); - const s = this.xref, - o = new Uint8ClampedArray(3); - for (; a.length > 0; ) { - const t = a.shift(), - c = s.fetchIfRef(t.obj); - if (null === c) continue; - if (!c.has("Title")) - throw new n.FormatError("Invalid outline item encountered."); - const h = { url: null, dest: null, action: null }; - Catalog.parseDestDictionary({ - destDict: c, - resultObj: h, - docBaseUrl: this.baseUrl, - docAttachments: this.attachments, - }); - const u = c.get("Title"), - d = c.get("F") || 0, - f = c.getArray("C"), - g = c.get("Count"); - let p = o; - !Array.isArray(f) || - 3 !== f.length || - (0 === f[0] && 0 === f[1] && 0 === f[2]) || - (p = l.ColorSpace.singletons.rgb.getRgb(f, 0)); - const m = { - action: h.action, - attachment: h.attachment, - dest: h.dest, - url: h.url, - unsafeUrl: h.unsafeUrl, - newWindow: h.newWindow, - setOCGState: h.setOCGState, - title: (0, n.stringToPDFString)(u), - color: p, - count: Number.isInteger(g) ? g : void 0, - bold: !!(2 & d), - italic: !!(1 & d), - items: [], - }; - t.parent.items.push(m); - e = c.getRaw("First"); - if (e instanceof i.Ref && !r.has(e)) { - a.push({ obj: e, parent: m }); - r.put(e); - } - e = c.getRaw("Next"); - if (e instanceof i.Ref && !r.has(e)) { - a.push({ obj: e, parent: t.parent }); - r.put(e); - } - } - return t.items.length > 0 ? t.items : null; - } - get permissions() { - let e = null; - try { - e = this._readPermissions(); - } catch (e) { - if (e instanceof r.MissingDataException) throw e; - (0, n.warn)("Unable to read permissions."); - } - return (0, n.shadow)(this, "permissions", e); - } - _readPermissions() { - const e = this.xref.trailer.get("Encrypt"); - if (!(e instanceof i.Dict)) return null; - let t = e.get("P"); - if ("number" != typeof t) return null; - t += 2 ** 32; - const a = []; - for (const e in n.PermissionFlag) { - const r = n.PermissionFlag[e]; - t & r && a.push(r); - } - return a; - } - get optionalContentConfig() { - let e = null; - try { - const t = this._catDict.get("OCProperties"); - if (!t) - return (0, n.shadow)(this, "optionalContentConfig", null); - const a = t.get("D"); - if (!a) - return (0, n.shadow)(this, "optionalContentConfig", null); - const r = t.get("OCGs"); - if (!Array.isArray(r)) - return (0, n.shadow)(this, "optionalContentConfig", null); - const s = [], - o = []; - for (const e of r) { - if (!(e instanceof i.Ref)) continue; - o.push(e); - const t = this.xref.fetchIfRef(e); - s.push({ - id: e.toString(), - name: - "string" == typeof t.get("Name") - ? (0, n.stringToPDFString)(t.get("Name")) - : null, - intent: - "string" == typeof t.get("Intent") - ? (0, n.stringToPDFString)(t.get("Intent")) - : null, - }); - } - e = this._readOptionalContentConfig(a, o); - e.groups = s; - } catch (e) { - if (e instanceof r.MissingDataException) throw e; - (0, n.warn)(`Unable to read optional content config: ${e}`); - } - return (0, n.shadow)(this, "optionalContentConfig", e); - } - _readOptionalContentConfig(e, t) { - function parseOnOff(e) { - const a = []; - if (Array.isArray(e)) - for (const r of e) - r instanceof i.Ref && t.includes(r) && a.push(r.toString()); - return a; - } - function parseOrder(e, a = 0) { - if (!Array.isArray(e)) return null; - const n = []; - for (const s of e) { - if (s instanceof i.Ref && t.includes(s)) { - r.put(s); - n.push(s.toString()); - continue; - } - const e = parseNestedOrder(s, a); - e && n.push(e); - } - if (a > 0) return n; - const s = []; - for (const e of t) r.has(e) || s.push(e.toString()); - s.length && n.push({ name: null, order: s }); - return n; - } - function parseNestedOrder(e, t) { - if (++t > s) { - (0, n.warn)("parseNestedOrder - reached MAX_NESTED_LEVELS."); - return null; - } - const r = a.fetchIfRef(e); - if (!Array.isArray(r)) return null; - const i = a.fetchIfRef(r[0]); - if ("string" != typeof i) return null; - const o = parseOrder(r.slice(1), t); - return o && o.length - ? { name: (0, n.stringToPDFString)(i), order: o } - : null; - } - const a = this.xref, - r = new i.RefSet(), - s = 10; - return { - name: - "string" == typeof e.get("Name") - ? (0, n.stringToPDFString)(e.get("Name")) - : null, - creator: - "string" == typeof e.get("Creator") - ? (0, n.stringToPDFString)(e.get("Creator")) - : null, - baseState: - e.get("BaseState") instanceof i.Name - ? e.get("BaseState").name - : null, - on: parseOnOff(e.get("ON")), - off: parseOnOff(e.get("OFF")), - order: parseOrder(e.get("Order")), - groups: null, - }; - } - setActualNumPages(e = null) { - this._actualNumPages = e; - } - get hasActualNumPages() { - return null !== this._actualNumPages; - } - get _pagesCount() { - const e = this.toplevelPagesDict.get("Count"); - if (!Number.isInteger(e)) - throw new n.FormatError( - "Page count in top-level pages dictionary is not an integer.", - ); - return (0, n.shadow)(this, "_pagesCount", e); - } - get numPages() { - return this.hasActualNumPages - ? this._actualNumPages - : this._pagesCount; - } - get destinations() { - const e = this._readDests(), - t = Object.create(null); - if (e instanceof s.NameTree) - for (const [a, r] of e.getAll()) { - const e = fetchDestination(r); - e && (t[(0, n.stringToPDFString)(a)] = e); - } - else - e instanceof i.Dict && - e.forEach(function (e, a) { - const r = fetchDestination(a); - r && (t[e] = r); - }); - return (0, n.shadow)(this, "destinations", t); - } - getDestination(e) { - const t = this._readDests(); - if (t instanceof s.NameTree) { - const a = fetchDestination(t.get(e)); - if (a) return a; - const r = this.destinations[e]; - if (r) { - (0, n.warn)( - `Found "${e}" at an incorrect position in the NameTree.`, - ); - return r; - } - } else if (t instanceof i.Dict) { - const a = fetchDestination(t.get(e)); - if (a) return a; - } - return null; - } - _readDests() { - const e = this._catDict.get("Names"); - return e?.has("Dests") - ? new s.NameTree(e.getRaw("Dests"), this.xref) - : this._catDict.has("Dests") - ? this._catDict.get("Dests") - : void 0; - } - get pageLabels() { - let e = null; - try { - e = this._readPageLabels(); - } catch (e) { - if (e instanceof r.MissingDataException) throw e; - (0, n.warn)("Unable to read page labels."); - } - return (0, n.shadow)(this, "pageLabels", e); - } - _readPageLabels() { - const e = this._catDict.getRaw("PageLabels"); - if (!e) return null; - const t = new Array(this.numPages); - let a = null, - o = ""; - const c = new s.NumberTree(e, this.xref).getAll(); - let l = "", - h = 1; - for (let e = 0, s = this.numPages; e < s; e++) { - const s = c.get(e); - if (void 0 !== s) { - if (!(s instanceof i.Dict)) - throw new n.FormatError("PageLabel is not a dictionary."); - if ( - s.has("Type") && - !(0, i.isName)(s.get("Type"), "PageLabel") - ) - throw new n.FormatError( - "Invalid type in PageLabel dictionary.", - ); - if (s.has("S")) { - const e = s.get("S"); - if (!(e instanceof i.Name)) - throw new n.FormatError( - "Invalid style in PageLabel dictionary.", - ); - a = e.name; - } else a = null; - if (s.has("P")) { - const e = s.get("P"); - if ("string" != typeof e) - throw new n.FormatError( - "Invalid prefix in PageLabel dictionary.", - ); - o = (0, n.stringToPDFString)(e); - } else o = ""; - if (s.has("St")) { - const e = s.get("St"); - if (!(Number.isInteger(e) && e >= 1)) - throw new n.FormatError( - "Invalid start in PageLabel dictionary.", - ); - h = e; - } else h = 1; - } - switch (a) { - case "D": - l = h; - break; - case "R": - case "r": - l = (0, r.toRomanNumerals)(h, "r" === a); - break; - case "A": - case "a": - const e = 26, - t = "a" === a ? 97 : 65, - i = h - 1; - l = String.fromCharCode(t + (i % e)).repeat( - Math.floor(i / e) + 1, - ); - break; - default: - if (a) - throw new n.FormatError( - `Invalid style "${a}" in PageLabel dictionary.`, - ); - l = ""; - } - t[e] = o + l; - h++; - } - return t; - } - get pageLayout() { - const e = this._catDict.get("PageLayout"); - let t = ""; - if (e instanceof i.Name) - switch (e.name) { - case "SinglePage": - case "OneColumn": - case "TwoColumnLeft": - case "TwoColumnRight": - case "TwoPageLeft": - case "TwoPageRight": - t = e.name; - } - return (0, n.shadow)(this, "pageLayout", t); - } - get pageMode() { - const e = this._catDict.get("PageMode"); - let t = "UseNone"; - if (e instanceof i.Name) - switch (e.name) { - case "UseNone": - case "UseOutlines": - case "UseThumbs": - case "FullScreen": - case "UseOC": - case "UseAttachments": - t = e.name; - } - return (0, n.shadow)(this, "pageMode", t); - } - get viewerPreferences() { - const e = this._catDict.get("ViewerPreferences"); - if (!(e instanceof i.Dict)) - return (0, n.shadow)(this, "viewerPreferences", null); - let t = null; - for (const a of e.getKeys()) { - const r = e.get(a); - let s; - switch (a) { - case "HideToolbar": - case "HideMenubar": - case "HideWindowUI": - case "FitWindow": - case "CenterWindow": - case "DisplayDocTitle": - case "PickTrayByPDFSize": - "boolean" == typeof r && (s = r); - break; - case "NonFullScreenPageMode": - if (r instanceof i.Name) - switch (r.name) { - case "UseNone": - case "UseOutlines": - case "UseThumbs": - case "UseOC": - s = r.name; - break; - default: - s = "UseNone"; - } - break; - case "Direction": - if (r instanceof i.Name) - switch (r.name) { - case "L2R": - case "R2L": - s = r.name; - break; - default: - s = "L2R"; - } - break; - case "ViewArea": - case "ViewClip": - case "PrintArea": - case "PrintClip": - if (r instanceof i.Name) - switch (r.name) { - case "MediaBox": - case "CropBox": - case "BleedBox": - case "TrimBox": - case "ArtBox": - s = r.name; - break; - default: - s = "CropBox"; - } - break; - case "PrintScaling": - if (r instanceof i.Name) - switch (r.name) { - case "None": - case "AppDefault": - s = r.name; - break; - default: - s = "AppDefault"; - } - break; - case "Duplex": - if (r instanceof i.Name) - switch (r.name) { - case "Simplex": - case "DuplexFlipShortEdge": - case "DuplexFlipLongEdge": - s = r.name; - break; - default: - s = "None"; - } - break; - case "PrintPageRange": - if (Array.isArray(r) && r.length % 2 == 0) { - r.every( - (e, t, a) => - Number.isInteger(e) && - e > 0 && - (0 === t || e >= a[t - 1]) && - e <= this.numPages, - ) && (s = r); - } - break; - case "NumCopies": - Number.isInteger(r) && r > 0 && (s = r); - break; - default: - (0, n.warn)( - `Ignoring non-standard key in ViewerPreferences: ${a}.`, - ); - continue; - } - if (void 0 !== s) { - t || (t = Object.create(null)); - t[a] = s; - } else - (0, n.warn)( - `Bad value, for key "${a}", in ViewerPreferences: ${r}.`, - ); - } - return (0, n.shadow)(this, "viewerPreferences", t); - } - get openAction() { - const e = this._catDict.get("OpenAction"), - t = Object.create(null); - if (e instanceof i.Dict) { - const a = new i.Dict(this.xref); - a.set("A", e); - const r = { url: null, dest: null, action: null }; - Catalog.parseDestDictionary({ destDict: a, resultObj: r }); - Array.isArray(r.dest) - ? (t.dest = r.dest) - : r.action && (t.action = r.action); - } else Array.isArray(e) && (t.dest = e); - return (0, n.shadow)( - this, - "openAction", - (0, n.objectSize)(t) > 0 ? t : null, - ); - } - get attachments() { - const e = this._catDict.get("Names"); - let t = null; - if (e instanceof i.Dict && e.has("EmbeddedFiles")) { - const a = new s.NameTree(e.getRaw("EmbeddedFiles"), this.xref); - for (const [e, r] of a.getAll()) { - const a = new h.FileSpec(r, this.xref); - t || (t = Object.create(null)); - t[(0, n.stringToPDFString)(e)] = a.serializable; - } - } - return (0, n.shadow)(this, "attachments", t); - } - get xfaImages() { - const e = this._catDict.get("Names"); - let t = null; - if (e instanceof i.Dict && e.has("XFAImages")) { - const a = new s.NameTree(e.getRaw("XFAImages"), this.xref); - for (const [e, r] of a.getAll()) { - t || (t = new i.Dict(this.xref)); - t.set((0, n.stringToPDFString)(e), r); - } - } - return (0, n.shadow)(this, "xfaImages", t); - } - _collectJavaScript() { - const e = this._catDict.get("Names"); - let t = null; - function appendIfJavaScriptDict(e, a) { - if (!(a instanceof i.Dict)) return; - if (!(0, i.isName)(a.get("S"), "JavaScript")) return; - let r = a.get("JS"); - if (r instanceof o.BaseStream) r = r.getString(); - else if ("string" != typeof r) return; - r = (0, n.stringToPDFString)(r).replaceAll("\0", ""); - r && (t ||= new Map()).set(e, r); - } - if (e instanceof i.Dict && e.has("JavaScript")) { - const t = new s.NameTree(e.getRaw("JavaScript"), this.xref); - for (const [e, a] of t.getAll()) - appendIfJavaScriptDict((0, n.stringToPDFString)(e), a); - } - const a = this._catDict.get("OpenAction"); - a && appendIfJavaScriptDict("OpenAction", a); - return t; - } - get jsActions() { - const e = this._collectJavaScript(); - let t = (0, r.collectActions)( - this.xref, - this._catDict, - n.DocumentActionEventType, - ); - if (e) { - t ||= Object.create(null); - for (const [a, r] of e) a in t ? t[a].push(r) : (t[a] = [r]); - } - return (0, n.shadow)(this, "jsActions", t); - } - async fontFallback(e, t) { - const a = await Promise.all(this.fontCache); - for (const r of a) - if (r.loadedName === e) { - r.fallback(t); - return; - } - } - async cleanup(e = !1) { - (0, c.clearGlobalCaches)(); - this.globalImageCache.clear(e); - this.pageKidsCountCache.clear(); - this.pageIndexCache.clear(); - this.nonBlendModesSet.clear(); - const t = await Promise.all(this.fontCache); - for (const { dict: e } of t) delete e.cacheKey; - this.fontCache.clear(); - this.builtInCMapCache.clear(); - this.standardFontDataCache.clear(); - this.systemFontCache.clear(); - } - async getPageDict(e) { - const t = [this.toplevelPagesDict], - a = new i.RefSet(), - r = this._catDict.getRaw("Pages"); - r instanceof i.Ref && a.put(r); - const s = this.xref, - o = this.pageKidsCountCache, - c = this.pageIndexCache; - let l = 0; - for (; t.length; ) { - const r = t.pop(); - if (r instanceof i.Ref) { - const h = o.get(r); - if (h >= 0 && l + h <= e) { - l += h; - continue; - } - if (a.has(r)) - throw new n.FormatError( - "Pages tree contains circular reference.", - ); - a.put(r); - const u = await s.fetchAsync(r); - if (u instanceof i.Dict) { - let t = u.getRaw("Type"); - t instanceof i.Ref && (t = await s.fetchAsync(t)); - if ((0, i.isName)(t, "Page") || !u.has("Kids")) { - o.has(r) || o.put(r, 1); - c.has(r) || c.put(r, l); - if (l === e) return [u, r]; - l++; - continue; - } - } - t.push(u); - continue; - } - if (!(r instanceof i.Dict)) - throw new n.FormatError( - "Page dictionary kid reference points to wrong type of object.", - ); - const { objId: h } = r; - let u = r.getRaw("Count"); - u instanceof i.Ref && (u = await s.fetchAsync(u)); - if (Number.isInteger(u) && u >= 0) { - h && !o.has(h) && o.put(h, u); - if (l + u <= e) { - l += u; - continue; - } - } - let d = r.getRaw("Kids"); - d instanceof i.Ref && (d = await s.fetchAsync(d)); - if (!Array.isArray(d)) { - let t = r.getRaw("Type"); - t instanceof i.Ref && (t = await s.fetchAsync(t)); - if ((0, i.isName)(t, "Page") || !r.has("Kids")) { - if (l === e) return [r, null]; - l++; - continue; - } - throw new n.FormatError( - "Page dictionary kids object is not an array.", - ); - } - for (let e = d.length - 1; e >= 0; e--) t.push(d[e]); - } - throw new Error(`Page index ${e} not found.`); - } - async getAllPageDicts(e = !1) { - const { ignoreErrors: t } = this.pdfManager.evaluatorOptions, - a = [{ currentNode: this.toplevelPagesDict, posInKids: 0 }], - s = new i.RefSet(), - o = this._catDict.getRaw("Pages"); - o instanceof i.Ref && s.put(o); - const c = new Map(), - l = this.xref, - h = this.pageIndexCache; - let u = 0; - function addPageDict(e, t) { - t && !h.has(t) && h.put(t, u); - c.set(u++, [e, t]); - } - function addPageError(a) { - if (a instanceof r.XRefEntryException && !e) throw a; - if (e && t && 0 === u) { - (0, n.warn)( - `getAllPageDicts - Skipping invalid first page: "${a}".`, - ); - a = i.Dict.empty; - } - c.set(u++, [a, null]); - } - for (; a.length > 0; ) { - const e = a.at(-1), - { currentNode: t, posInKids: r } = e; - let o = t.getRaw("Kids"); - if (o instanceof i.Ref) - try { - o = await l.fetchAsync(o); - } catch (e) { - addPageError(e); - break; - } - if (!Array.isArray(o)) { - addPageError( - new n.FormatError( - "Page dictionary kids object is not an array.", - ), - ); - break; - } - if (r >= o.length) { - a.pop(); - continue; - } - const c = o[r]; - let h; - if (c instanceof i.Ref) { - if (s.has(c)) { - addPageError( - new n.FormatError( - "Pages tree contains circular reference.", - ), - ); - break; - } - s.put(c); - try { - h = await l.fetchAsync(c); - } catch (e) { - addPageError(e); - break; - } - } else h = c; - if (!(h instanceof i.Dict)) { - addPageError( - new n.FormatError( - "Page dictionary kid reference points to wrong type of object.", - ), - ); - break; - } - let u = h.getRaw("Type"); - if (u instanceof i.Ref) - try { - u = await l.fetchAsync(u); - } catch (e) { - addPageError(e); - break; - } - (0, i.isName)(u, "Page") || !h.has("Kids") - ? addPageDict(h, c instanceof i.Ref ? c : null) - : a.push({ currentNode: h, posInKids: 0 }); - e.posInKids++; - } - return c; - } - getPageIndex(e) { - const t = this.pageIndexCache.get(e); - if (void 0 !== t) return Promise.resolve(t); - const a = this.xref; - let r = 0; - const next = (t) => - (function pagesBeforeRef(t) { - let r, - s = 0; - return a - .fetchAsync(t) - .then(function (a) { - if ( - (0, i.isRefsEqual)(t, e) && - !(0, i.isDict)(a, "Page") && - !( - a instanceof i.Dict && - !a.has("Type") && - a.has("Contents") - ) - ) - throw new n.FormatError( - "The reference does not point to a /Page dictionary.", - ); - if (!a) return null; - if (!(a instanceof i.Dict)) - throw new n.FormatError("Node must be a dictionary."); - r = a.getRaw("Parent"); - return a.getAsync("Parent"); - }) - .then(function (e) { - if (!e) return null; - if (!(e instanceof i.Dict)) - throw new n.FormatError("Parent must be a dictionary."); - return e.getAsync("Kids"); - }) - .then(function (e) { - if (!e) return null; - const o = []; - let c = !1; - for (const r of e) { - if (!(r instanceof i.Ref)) - throw new n.FormatError("Kid must be a reference."); - if ((0, i.isRefsEqual)(r, t)) { - c = !0; - break; - } - o.push( - a.fetchAsync(r).then(function (e) { - if (!(e instanceof i.Dict)) - throw new n.FormatError( - "Kid node must be a dictionary.", - ); - e.has("Count") ? (s += e.get("Count")) : s++; - }), - ); - } - if (!c) - throw new n.FormatError( - "Kid reference not found in parent's kids.", - ); - return Promise.all(o).then(function () { - return [s, r]; - }); - }); - })(t).then((t) => { - if (!t) { - this.pageIndexCache.put(e, r); - return r; - } - const [a, n] = t; - r += a; - return next(n); - }); - return next(e); - } - get baseUrl() { - const e = this._catDict.get("URI"); - if (e instanceof i.Dict) { - const t = e.get("Base"); - if ("string" == typeof t) { - const e = (0, n.createValidAbsoluteUrl)(t, null, { - tryConvertEncoding: !0, - }); - if (e) return (0, n.shadow)(this, "baseUrl", e.href); - } - } - return (0, n.shadow)(this, "baseUrl", this.pdfManager.docBaseUrl); - } - static parseDestDictionary({ - destDict: e, - resultObj: t, - docBaseUrl: a = null, - docAttachments: s = null, - }) { - if (!(e instanceof i.Dict)) { - (0, n.warn)( - "parseDestDictionary: `destDict` must be a dictionary.", - ); - return; - } - let c, - l, - h = e.get("A"); - if (!(h instanceof i.Dict)) - if (e.has("Dest")) h = e.get("Dest"); - else { - h = e.get("AA"); - h instanceof i.Dict && - (h.has("D") - ? (h = h.get("D")) - : h.has("U") && (h = h.get("U"))); - } - if (h instanceof i.Dict) { - const e = h.get("S"); - if (!(e instanceof i.Name)) { - (0, n.warn)( - "parseDestDictionary: Invalid type in Action dictionary.", - ); - return; - } - const a = e.name; - switch (a) { - case "ResetForm": - const e = h.get("Flags"), - u = 0 == (1 & ("number" == typeof e ? e : 0)), - d = [], - f = []; - for (const e of h.get("Fields") || []) - e instanceof i.Ref - ? f.push(e.toString()) - : "string" == typeof e && - d.push((0, n.stringToPDFString)(e)); - t.resetForm = { fields: d, refs: f, include: u }; - break; - case "URI": - c = h.get("URI"); - c instanceof i.Name && (c = "/" + c.name); - break; - case "GoTo": - l = h.get("D"); - break; - case "Launch": - case "GoToR": - const g = h.get("F"); - g instanceof i.Dict - ? (c = g.get("F") || null) - : "string" == typeof g && (c = g); - let p = h.get("D"); - if (p) { - p instanceof i.Name && (p = p.name); - if ("string" == typeof c) { - const e = c.split("#")[0]; - "string" == typeof p - ? (c = e + "#" + p) - : Array.isArray(p) && - (c = e + "#" + JSON.stringify(p)); - } - } - const m = h.get("NewWindow"); - "boolean" == typeof m && (t.newWindow = m); - break; - case "GoToE": - const b = h.get("T"); - let y; - if (s && b instanceof i.Dict) { - const e = b.get("R"), - t = b.get("N"); - (0, i.isName)(e, "C") && - "string" == typeof t && - (y = s[(0, n.stringToPDFString)(t)]); - } - y - ? (t.attachment = y) - : (0, n.warn)( - 'parseDestDictionary - unimplemented "GoToE" action.', - ); - break; - case "Named": - const w = h.get("N"); - w instanceof i.Name && (t.action = w.name); - break; - case "SetOCGState": - const S = h.get("State"), - x = h.get("PreserveRB"); - if (!Array.isArray(S) || 0 === S.length) break; - const C = []; - for (const e of S) - if (e instanceof i.Name) - switch (e.name) { - case "ON": - case "OFF": - case "Toggle": - C.push(e.name); - } - else e instanceof i.Ref && C.push(e.toString()); - if (C.length !== S.length) break; - t.setOCGState = { - state: C, - preserveRB: "boolean" != typeof x || x, - }; - break; - case "JavaScript": - const k = h.get("JS"); - let v; - k instanceof o.BaseStream - ? (v = k.getString()) - : "string" == typeof k && (v = k); - const F = - v && (0, r.recoverJsURL)((0, n.stringToPDFString)(v)); - if (F) { - c = F.url; - t.newWindow = F.newWindow; - break; - } - default: - if ("JavaScript" === a || "SubmitForm" === a) break; - (0, n.warn)( - `parseDestDictionary - unsupported action: "${a}".`, - ); - } - } else e.has("Dest") && (l = e.get("Dest")); - if ("string" == typeof c) { - const e = (0, n.createValidAbsoluteUrl)(c, a, { - addDefaultProtocol: !0, - tryConvertEncoding: !0, - }); - e && (t.url = e.href); - t.unsafeUrl = c; - } - if (l) { - l instanceof i.Name && (l = l.name); - "string" == typeof l - ? (t.dest = (0, n.stringToPDFString)(l)) - : Array.isArray(l) && (t.dest = l); - } - } - } - t.Catalog = Catalog; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.NumberTree = t.NameTree = void 0; - var r = a(4), - n = a(2); - class NameOrNumberTree { - constructor(e, t, a) { - this.constructor === NameOrNumberTree && - (0, n.unreachable)("Cannot initialize NameOrNumberTree."); - this.root = e; - this.xref = t; - this._type = a; - } - getAll() { - const e = new Map(); - if (!this.root) return e; - const t = this.xref, - a = new r.RefSet(); - a.put(this.root); - const i = [this.root]; - for (; i.length > 0; ) { - const s = t.fetchIfRef(i.shift()); - if (!(s instanceof r.Dict)) continue; - if (s.has("Kids")) { - const e = s.get("Kids"); - if (!Array.isArray(e)) continue; - for (const t of e) { - if (a.has(t)) - throw new n.FormatError( - `Duplicate entry in "${this._type}" tree.`, - ); - i.push(t); - a.put(t); - } - continue; - } - const o = s.get(this._type); - if (Array.isArray(o)) - for (let a = 0, r = o.length; a < r; a += 2) - e.set(t.fetchIfRef(o[a]), t.fetchIfRef(o[a + 1])); - } - return e; - } - get(e) { - if (!this.root) return null; - const t = this.xref; - let a = t.fetchIfRef(this.root), - r = 0; - for (; a.has("Kids"); ) { - if (++r > 10) { - (0, n.warn)( - `Search depth limit reached for "${this._type}" tree.`, - ); - return null; - } - const i = a.get("Kids"); - if (!Array.isArray(i)) return null; - let s = 0, - o = i.length - 1; - for (; s <= o; ) { - const r = (s + o) >> 1, - n = t.fetchIfRef(i[r]), - c = n.get("Limits"); - if (e < t.fetchIfRef(c[0])) o = r - 1; - else { - if (!(e > t.fetchIfRef(c[1]))) { - a = n; - break; - } - s = r + 1; - } - } - if (s > o) return null; - } - const i = a.get(this._type); - if (Array.isArray(i)) { - let a = 0, - r = i.length - 2; - for (; a <= r; ) { - const n = (a + r) >> 1, - s = n + (1 & n), - o = t.fetchIfRef(i[s]); - if (e < o) r = s - 2; - else { - if (!(e > o)) return t.fetchIfRef(i[s + 1]); - a = s + 2; - } - } - } - return null; - } - } - t.NameTree = class NameTree extends NameOrNumberTree { - constructor(e, t) { - super(e, t, "Names"); - } - }; - t.NumberTree = class NumberTree extends NameOrNumberTree { - constructor(e, t) { - super(e, t, "Nums"); - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.clearGlobalCaches = function clearGlobalCaches() { - (0, r.clearPatternCaches)(); - (0, n.clearPrimitiveCaches)(); - (0, i.clearUnicodeCaches)(); - }; - var r = a(50), - n = a(4), - i = a(40); - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.FileSpec = void 0; - var r = a(2), - n = a(5), - i = a(4); - function pickPlatformItem(e) { - return e.has("UF") - ? e.get("UF") - : e.has("F") - ? e.get("F") - : e.has("Unix") - ? e.get("Unix") - : e.has("Mac") - ? e.get("Mac") - : e.has("DOS") - ? e.get("DOS") - : null; - } - t.FileSpec = class FileSpec { - constructor(e, t) { - if (e instanceof i.Dict) { - this.xref = t; - this.root = e; - e.has("FS") && (this.fs = e.get("FS")); - this.description = e.has("Desc") - ? (0, r.stringToPDFString)(e.get("Desc")) - : ""; - e.has("RF") && - (0, r.warn)("Related file specifications are not supported"); - this.contentAvailable = !0; - if (!e.has("EF")) { - this.contentAvailable = !1; - (0, r.warn)( - "Non-embedded file specifications are not supported", - ); - } - } - } - get filename() { - if (!this._filename && this.root) { - const e = pickPlatformItem(this.root) || "unnamed"; - this._filename = (0, r.stringToPDFString)(e) - .replaceAll("\\\\", "\\") - .replaceAll("\\/", "/") - .replaceAll("\\", "/"); - } - return this._filename; - } - get content() { - if (!this.contentAvailable) return null; - !this.contentRef && - this.root && - (this.contentRef = pickPlatformItem(this.root.get("EF"))); - let e = null; - if (this.contentRef) { - const t = this.xref.fetchIfRef(this.contentRef); - t instanceof n.BaseStream - ? (e = t.getBytes()) - : (0, r.warn)( - "Embedded file specification points to non-existing/invalid content", - ); - } else - (0, r.warn)( - "Embedded file specification does not have a content", - ); - return e; - } - get serializable() { - return { filename: this.filename, content: this.content }; - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.MetadataParser = void 0; - var r = a(71); - t.MetadataParser = class MetadataParser { - constructor(e) { - e = this._repair(e); - const t = new r.SimpleXMLParser({ - lowerCaseName: !0, - }).parseFromString(e); - this._metadataMap = new Map(); - this._data = e; - t && this._parse(t); - } - _repair(e) { - return e - .replace(/^[^<]+/, "") - .replaceAll(/>\\376\\377([^<]+)/g, function (e, t) { - const a = t - .replaceAll( - /\\([0-3])([0-7])([0-7])/g, - function (e, t, a, r) { - return String.fromCharCode(64 * t + 8 * a + 1 * r); - }, - ) - .replaceAll(/&(amp|apos|gt|lt|quot);/g, function (e, t) { - switch (t) { - case "amp": - return "&"; - case "apos": - return "'"; - case "gt": - return ">"; - case "lt": - return "<"; - case "quot": - return '"'; - } - throw new Error(`_repair: ${t} isn't defined.`); - }), - r = [">"]; - for (let e = 0, t = a.length; e < t; e += 2) { - const t = 256 * a.charCodeAt(e) + a.charCodeAt(e + 1); - t >= 32 && t < 127 && 60 !== t && 62 !== t && 38 !== t - ? r.push(String.fromCharCode(t)) - : r.push( - "&#x" + (65536 + t).toString(16).substring(1) + ";", - ); - } - return r.join(""); - }); - } - _getSequence(e) { - const t = e.nodeName; - return "rdf:bag" !== t && "rdf:seq" !== t && "rdf:alt" !== t - ? null - : e.childNodes.filter((e) => "rdf:li" === e.nodeName); - } - _parseArray(e) { - if (!e.hasChildNodes()) return; - const [t] = e.childNodes, - a = this._getSequence(t) || []; - this._metadataMap.set( - e.nodeName, - a.map((e) => e.textContent.trim()), - ); - } - _parse(e) { - let t = e.documentElement; - if ("rdf:rdf" !== t.nodeName) { - t = t.firstChild; - for (; t && "rdf:rdf" !== t.nodeName; ) t = t.nextSibling; - } - if (t && "rdf:rdf" === t.nodeName && t.hasChildNodes()) - for (const e of t.childNodes) - if ("rdf:description" === e.nodeName) - for (const t of e.childNodes) { - const e = t.nodeName; - switch (e) { - case "#text": - continue; - case "dc:creator": - case "dc:subject": - this._parseArray(t); - continue; - } - this._metadataMap.set(e, t.textContent.trim()); - } - } - get serializable() { - return { parsedData: this._metadataMap, rawData: this._data }; - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.XMLParserErrorCode = - t.XMLParserBase = - t.SimpleXMLParser = - t.SimpleDOMNode = - void 0; - var r = a(3); - const n = { - NoError: 0, - EndOfDocument: -1, - UnterminatedCdat: -2, - UnterminatedXmlDeclaration: -3, - UnterminatedDoctypeDeclaration: -4, - UnterminatedComment: -5, - MalformedElement: -6, - OutOfMemory: -7, - UnterminatedAttributeValue: -8, - UnterminatedElement: -9, - ElementNeverBegun: -10, - }; - t.XMLParserErrorCode = n; - function isWhitespace(e, t) { - const a = e[t]; - return " " === a || "\n" === a || "\r" === a || "\t" === a; - } - class XMLParserBase { - _resolveEntities(e) { - return e.replaceAll(/&([^;]+);/g, (e, t) => { - if ("#x" === t.substring(0, 2)) - return String.fromCodePoint(parseInt(t.substring(2), 16)); - if ("#" === t.substring(0, 1)) - return String.fromCodePoint(parseInt(t.substring(1), 10)); - switch (t) { - case "lt": - return "<"; - case "gt": - return ">"; - case "amp": - return "&"; - case "quot": - return '"'; - case "apos": - return "'"; - } - return this.onResolveEntity(t); - }); - } - _parseContent(e, t) { - const a = []; - let r = t; - function skipWs() { - for (; r < e.length && isWhitespace(e, r); ) ++r; - } - for ( - ; - r < e.length && - !isWhitespace(e, r) && - ">" !== e[r] && - "/" !== e[r]; - - ) - ++r; - const n = e.substring(t, r); - skipWs(); - for ( - ; - r < e.length && ">" !== e[r] && "/" !== e[r] && "?" !== e[r]; - - ) { - skipWs(); - let t = "", - n = ""; - for (; r < e.length && !isWhitespace(e, r) && "=" !== e[r]; ) { - t += e[r]; - ++r; - } - skipWs(); - if ("=" !== e[r]) return null; - ++r; - skipWs(); - const i = e[r]; - if ('"' !== i && "'" !== i) return null; - const s = e.indexOf(i, ++r); - if (s < 0) return null; - n = e.substring(r, s); - a.push({ name: t, value: this._resolveEntities(n) }); - r = s + 1; - skipWs(); - } - return { name: n, attributes: a, parsed: r - t }; - } - _parseProcessingInstruction(e, t) { - let a = t; - for ( - ; - a < e.length && - !isWhitespace(e, a) && - ">" !== e[a] && - "?" !== e[a] && - "/" !== e[a]; - - ) - ++a; - const r = e.substring(t, a); - !(function skipWs() { - for (; a < e.length && isWhitespace(e, a); ) ++a; - })(); - const n = a; - for (; a < e.length && ("?" !== e[a] || ">" !== e[a + 1]); ) ++a; - return { name: r, value: e.substring(n, a), parsed: a - t }; - } - parseXml(e) { - let t = 0; - for (; t < e.length; ) { - let a = t; - if ("<" === e[t]) { - ++a; - let t; - switch (e[a]) { - case "/": - ++a; - t = e.indexOf(">", a); - if (t < 0) { - this.onError(n.UnterminatedElement); - return; - } - this.onEndElement(e.substring(a, t)); - a = t + 1; - break; - case "?": - ++a; - const r = this._parseProcessingInstruction(e, a); - if ( - "?>" !== e.substring(a + r.parsed, a + r.parsed + 2) - ) { - this.onError(n.UnterminatedXmlDeclaration); - return; - } - this.onPi(r.name, r.value); - a += r.parsed + 2; - break; - case "!": - if ("--" === e.substring(a + 1, a + 3)) { - t = e.indexOf("--\x3e", a + 3); - if (t < 0) { - this.onError(n.UnterminatedComment); - return; - } - this.onComment(e.substring(a + 3, t)); - a = t + 3; - } else if ("[CDATA[" === e.substring(a + 1, a + 8)) { - t = e.indexOf("]]>", a + 8); - if (t < 0) { - this.onError(n.UnterminatedCdat); - return; - } - this.onCdata(e.substring(a + 8, t)); - a = t + 3; - } else { - if ("DOCTYPE" !== e.substring(a + 1, a + 8)) { - this.onError(n.MalformedElement); - return; - } - { - const r = e.indexOf("[", a + 8); - let i = !1; - t = e.indexOf(">", a + 8); - if (t < 0) { - this.onError(n.UnterminatedDoctypeDeclaration); - return; - } - if (r > 0 && t > r) { - t = e.indexOf("]>", a + 8); - if (t < 0) { - this.onError(n.UnterminatedDoctypeDeclaration); - return; - } - i = !0; - } - const s = e.substring(a + 8, t + (i ? 1 : 0)); - this.onDoctype(s); - a = t + (i ? 2 : 1); - } - } - break; - default: - const i = this._parseContent(e, a); - if (null === i) { - this.onError(n.MalformedElement); - return; - } - let s = !1; - if ("/>" === e.substring(a + i.parsed, a + i.parsed + 2)) - s = !0; - else if ( - ">" !== e.substring(a + i.parsed, a + i.parsed + 1) - ) { - this.onError(n.UnterminatedElement); - return; - } - this.onBeginElement(i.name, i.attributes, s); - a += i.parsed + (s ? 2 : 1); - } - } else { - for (; a < e.length && "<" !== e[a]; ) a++; - const r = e.substring(t, a); - this.onText(this._resolveEntities(r)); - } - t = a; - } - } - onResolveEntity(e) { - return `&${e};`; - } - onPi(e, t) {} - onComment(e) {} - onCdata(e) {} - onDoctype(e) {} - onText(e) {} - onBeginElement(e, t, a) {} - onEndElement(e) {} - onError(e) {} - } - t.XMLParserBase = XMLParserBase; - class SimpleDOMNode { - constructor(e, t) { - this.nodeName = e; - this.nodeValue = t; - Object.defineProperty(this, "parentNode", { - value: null, - writable: !0, - }); - } - get firstChild() { - return this.childNodes?.[0]; - } - get nextSibling() { - const e = this.parentNode.childNodes; - if (!e) return; - const t = e.indexOf(this); - return -1 !== t ? e[t + 1] : void 0; - } - get textContent() { - return this.childNodes - ? this.childNodes - .map(function (e) { - return e.textContent; - }) - .join("") - : this.nodeValue || ""; - } - get children() { - return this.childNodes || []; - } - hasChildNodes() { - return this.childNodes?.length > 0; - } - searchNode(e, t) { - if (t >= e.length) return this; - const a = e[t]; - if (a.name.startsWith("#") && t < e.length - 1) - return this.searchNode(e, t + 1); - const r = []; - let n = this; - for (;;) { - if (a.name === n.nodeName) { - if (0 !== a.pos) { - if (0 === r.length) return null; - { - const [i] = r.pop(); - let s = 0; - for (const r of i.childNodes) - if (a.name === r.nodeName) { - if (s === a.pos) return r.searchNode(e, t + 1); - s++; - } - return n.searchNode(e, t + 1); - } - } - { - const a = n.searchNode(e, t + 1); - if (null !== a) return a; - } - } - if (n.childNodes?.length > 0) { - r.push([n, 0]); - n = n.childNodes[0]; - } else { - if (0 === r.length) return null; - for (; 0 !== r.length; ) { - const [e, t] = r.pop(), - a = t + 1; - if (a < e.childNodes.length) { - r.push([e, a]); - n = e.childNodes[a]; - break; - } - } - if (0 === r.length) return null; - } - } - } - dump(e) { - if ("#text" !== this.nodeName) { - e.push(`<${this.nodeName}`); - if (this.attributes) - for (const t of this.attributes) - e.push(` ${t.name}="${(0, r.encodeToXmlString)(t.value)}"`); - if (this.hasChildNodes()) { - e.push(">"); - for (const t of this.childNodes) t.dump(e); - e.push(``); - } else - this.nodeValue - ? e.push( - `>${(0, r.encodeToXmlString)(this.nodeValue)}`, - ) - : e.push("/>"); - } else e.push((0, r.encodeToXmlString)(this.nodeValue)); - } - } - t.SimpleDOMNode = SimpleDOMNode; - t.SimpleXMLParser = class SimpleXMLParser extends XMLParserBase { - constructor({ hasAttributes: e = !1, lowerCaseName: t = !1 }) { - super(); - this._currentFragment = null; - this._stack = null; - this._errorCode = n.NoError; - this._hasAttributes = e; - this._lowerCaseName = t; - } - parseFromString(e) { - this._currentFragment = []; - this._stack = []; - this._errorCode = n.NoError; - this.parseXml(e); - if (this._errorCode !== n.NoError) return; - const [t] = this._currentFragment; - return t ? { documentElement: t } : void 0; - } - onText(e) { - if ( - (function isWhitespaceString(e) { - for (let t = 0, a = e.length; t < a; t++) - if (!isWhitespace(e, t)) return !1; - return !0; - })(e) - ) - return; - const t = new SimpleDOMNode("#text", e); - this._currentFragment.push(t); - } - onCdata(e) { - const t = new SimpleDOMNode("#text", e); - this._currentFragment.push(t); - } - onBeginElement(e, t, a) { - this._lowerCaseName && (e = e.toLowerCase()); - const r = new SimpleDOMNode(e); - r.childNodes = []; - this._hasAttributes && (r.attributes = t); - this._currentFragment.push(r); - if (!a) { - this._stack.push(this._currentFragment); - this._currentFragment = r.childNodes; - } - } - onEndElement(e) { - this._currentFragment = this._stack.pop() || []; - const t = this._currentFragment.at(-1); - if (!t) return null; - for (const e of t.childNodes) e.parentNode = t; - return t; - } - onError(e) { - this._errorCode = e; - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.StructTreeRoot = t.StructTreePage = void 0; - var r = a(2), - n = a(4), - i = a(67), - s = a(73); - const o = 1, - c = 2, - l = 3, - h = 4, - u = 5; - class StructTreeRoot { - constructor(e, t) { - this.dict = e; - this.ref = t instanceof n.Ref ? t : null; - this.roleMap = new Map(); - this.structParentIds = null; - } - init() { - this.readRoleMap(); - } - #C(e, t, a) { - if (!(e instanceof n.Ref) || t < 0) return; - this.structParentIds ||= new n.RefSetCache(); - let r = this.structParentIds.get(e); - if (!r) { - r = []; - this.structParentIds.put(e, r); - } - r.push([t, a]); - } - addAnnotationIdToPage(e, t) { - this.#C(e, t, h); - } - readRoleMap() { - const e = this.dict.get("RoleMap"); - e instanceof n.Dict && - e.forEach((e, t) => { - t instanceof n.Name && this.roleMap.set(e, t.name); - }); - } - static async canCreateStructureTree({ - catalogRef: e, - pdfManager: t, - newAnnotationsByPage: a, - }) { - if (!(e instanceof n.Ref)) { - (0, r.warn)( - "Cannot save the struct tree: no catalog reference.", - ); - return !1; - } - let i = 0, - s = !0; - for (const [e, o] of a) { - const { ref: a } = await t.getPage(e); - if (!(a instanceof n.Ref)) { - (0, r.warn)( - `Cannot save the struct tree: page ${e} has no ref.`, - ); - s = !0; - break; - } - for (const e of o) - if (e.accessibilityData?.type) { - e.parentTreeId = i++; - s = !1; - } - } - if (s) { - for (const e of a.values()) - for (const t of e) delete t.parentTreeId; - return !1; - } - return !0; - } - static async createStructureTree({ - newAnnotationsByPage: e, - xref: t, - catalogRef: a, - pdfManager: r, - newRefs: i, - }) { - const o = r.catalog.cloneDict(), - c = t.getNewTemporaryRef(); - o.set("StructTreeRoot", c); - const l = []; - await (0, s.writeObject)(a, o, l, t); - i.push({ ref: a, data: l.join("") }); - const h = new n.Dict(t); - h.set("Type", n.Name.get("StructTreeRoot")); - const u = t.getNewTemporaryRef(); - h.set("ParentTree", u); - const d = []; - h.set("K", d); - const f = new n.Dict(t), - g = []; - f.set("Nums", g); - const p = await this.#k({ - newAnnotationsByPage: e, - structTreeRootRef: c, - kids: d, - nums: g, - xref: t, - pdfManager: r, - newRefs: i, - buffer: l, - }); - h.set("ParentTreeNextKey", p); - l.length = 0; - await (0, s.writeObject)(u, f, l, t); - i.push({ ref: u, data: l.join("") }); - l.length = 0; - await (0, s.writeObject)(c, h, l, t); - i.push({ ref: c, data: l.join("") }); - } - async canUpdateStructTree({ - pdfManager: e, - newAnnotationsByPage: t, - }) { - if (!this.ref) { - (0, r.warn)( - "Cannot update the struct tree: no root reference.", - ); - return !1; - } - let a = this.dict.get("ParentTreeNextKey"); - if (!Number.isInteger(a) || a < 0) { - (0, r.warn)("Cannot update the struct tree: invalid next key."); - return !1; - } - const i = this.dict.get("ParentTree"); - if (!(i instanceof n.Dict)) { - (0, r.warn)( - "Cannot update the struct tree: ParentTree isn't a dict.", - ); - return !1; - } - const s = i.get("Nums"); - if (!Array.isArray(s)) { - (0, r.warn)( - "Cannot update the struct tree: nums isn't an array.", - ); - return !1; - } - const { numPages: o } = e.catalog; - for (const a of t.keys()) { - const { pageDict: t, ref: i } = await e.getPage(a); - if (!(i instanceof n.Ref)) { - (0, r.warn)( - `Cannot save the struct tree: page ${a} has no ref.`, - ); - return !1; - } - const s = t.get("StructParents"); - if (!Number.isInteger(s) || s < 0 || s >= o) { - (0, r.warn)( - `Cannot save the struct tree: page ${a} has no id.`, - ); - return !1; - } - } - let c = !0; - for (const [r, n] of t) { - const { pageDict: t } = await e.getPage(r); - StructTreeRoot.#v({ - elements: n, - xref: this.dict.xref, - pageDict: t, - parentTree: i, - }); - for (const e of n) - if (e.accessibilityData?.type) { - e.parentTreeId = a++; - c = !1; - } - } - if (c) { - for (const e of t.values()) - for (const t of e) { - delete t.parentTreeId; - delete t.structTreeParent; - } - return !1; - } - return !0; - } - async updateStructureTree({ - newAnnotationsByPage: e, - pdfManager: t, - newRefs: a, - }) { - const r = this.dict.xref, - i = this.dict.clone(), - o = this.ref; - let c, - l = i.getRaw("ParentTree"); - if (l instanceof n.Ref) c = r.fetch(l); - else { - c = l; - l = r.getNewTemporaryRef(); - i.set("ParentTree", l); - } - c = c.clone(); - let h = c.getRaw("Nums"), - u = null; - if (h instanceof n.Ref) { - u = h; - h = r.fetch(u); - } - h = h.slice(); - u || c.set("Nums", h); - let d = i.getRaw("K"), - f = null; - if (d instanceof n.Ref) { - f = d; - d = r.fetch(f); - } else { - f = r.getNewTemporaryRef(); - i.set("K", f); - } - d = Array.isArray(d) ? d.slice() : [d]; - const g = [], - p = await StructTreeRoot.#k({ - newAnnotationsByPage: e, - structTreeRootRef: o, - kids: d, - nums: h, - xref: r, - pdfManager: t, - newRefs: a, - buffer: g, - }); - i.set("ParentTreeNextKey", p); - g.length = 0; - await (0, s.writeObject)(f, d, g, r); - a.push({ ref: f, data: g.join("") }); - if (u) { - g.length = 0; - await (0, s.writeObject)(u, h, g, r); - a.push({ ref: u, data: g.join("") }); - } - g.length = 0; - await (0, s.writeObject)(l, c, g, r); - a.push({ ref: l, data: g.join("") }); - g.length = 0; - await (0, s.writeObject)(o, i, g, r); - a.push({ ref: o, data: g.join("") }); - } - static async #k({ - newAnnotationsByPage: e, - structTreeRootRef: t, - kids: a, - nums: r, - xref: i, - pdfManager: o, - newRefs: c, - buffer: l, - }) { - const h = n.Name.get("OBJR"); - let u = -1 / 0; - for (const [d, f] of e) { - const { ref: e } = await o.getPage(d); - for (const { - accessibilityData: { - type: o, - title: d, - lang: g, - alt: p, - expanded: m, - actualText: b, - }, - ref: y, - parentTreeId: w, - structTreeParent: S, - } of f) { - u = Math.max(u, w); - const f = i.getNewTemporaryRef(), - x = new n.Dict(i); - x.set("S", n.Name.get(o)); - d && x.set("T", d); - g && x.set("Lang", g); - p && x.set("Alt", p); - m && x.set("E", m); - b && x.set("ActualText", b); - S - ? await this.#F({ - structTreeParent: S, - tagDict: x, - newTagRef: f, - fallbackRef: t, - xref: i, - newRefs: c, - buffer: l, - }) - : x.set("P", t); - const C = new n.Dict(i); - x.set("K", C); - C.set("Type", h); - C.set("Pg", e); - C.set("Obj", y); - l.length = 0; - await (0, s.writeObject)(f, x, l, i); - c.push({ ref: f, data: l.join("") }); - r.push(w, f); - a.push(f); - } - } - return u + 1; - } - static #v({ elements: e, xref: t, pageDict: a, parentTree: r }) { - const s = new Map(); - for (const t of e) - if (t.structTreeParentId) { - const e = parseInt(t.structTreeParentId.split("_mc")[1], 10); - s.set(e, t); - } - const o = a.get("StructParents"), - c = new i.NumberTree(r, t).get(o); - if (!Array.isArray(c)) return; - const updateElement = (e, a, r) => { - const i = s.get(e); - if (i) { - const e = a.getRaw("P"), - s = t.fetchIfRef(e); - e instanceof n.Ref && - s instanceof n.Dict && - (i.structTreeParent = { ref: r, dict: a }); - return !0; - } - return !1; - }; - for (const e of c) { - if (!(e instanceof n.Ref)) continue; - const a = t.fetch(e), - r = a.get("K"); - if (Number.isInteger(r)) updateElement(r, a, e); - else if (Array.isArray(r)) - for (let n of r) { - n = t.fetchIfRef(n); - if (Number.isInteger(n) && updateElement(n, a, e)) break; - } - } - } - static async #F({ - structTreeParent: { ref: e, dict: t }, - tagDict: a, - newTagRef: i, - fallbackRef: o, - xref: c, - newRefs: l, - buffer: h, - }) { - const u = t.getRaw("P"); - let d = c.fetchIfRef(u); - a.set("P", u); - let f, - g = !1, - p = d.getRaw("K"); - if (p instanceof n.Ref) f = c.fetch(p); - else { - f = p; - p = c.getNewTemporaryRef(); - d = d.clone(); - d.set("K", p); - g = !0; - } - if (Array.isArray(f)) { - const t = f.indexOf(e); - if (!(t >= 0)) { - (0, r.warn)( - "Cannot update the struct tree: parent kid not found.", - ); - a.set("P", o); - return; - } - f = f.slice(); - f.splice(t + 1, 0, i); - } else if (f instanceof n.Dict) { - f = [p, i]; - p = c.getNewTemporaryRef(); - d.set("K", p); - g = !0; - } - h.length = 0; - await (0, s.writeObject)(p, f, h, c); - l.push({ ref: p, data: h.join("") }); - if (g) { - h.length = 0; - await (0, s.writeObject)(u, d, h, c); - l.push({ ref: u, data: h.join("") }); - } - } - } - t.StructTreeRoot = StructTreeRoot; - class StructElementNode { - constructor(e, t) { - this.tree = e; - this.dict = t; - this.kids = []; - this.parseKids(); - } - get role() { - const e = this.dict.get("S"), - t = e instanceof n.Name ? e.name : "", - { root: a } = this.tree; - return a.roleMap.has(t) ? a.roleMap.get(t) : t; - } - parseKids() { - let e = null; - const t = this.dict.getRaw("Pg"); - t instanceof n.Ref && (e = t.toString()); - const a = this.dict.get("K"); - if (Array.isArray(a)) - for (const t of a) { - const a = this.parseKid(e, t); - a && this.kids.push(a); - } - else { - const t = this.parseKid(e, a); - t && this.kids.push(t); - } - } - parseKid(e, t) { - if (Number.isInteger(t)) - return this.tree.pageDict.objId !== e - ? null - : new StructElement({ type: o, mcid: t, pageObjId: e }); - let a = null; - t instanceof n.Ref - ? (a = this.dict.xref.fetch(t)) - : t instanceof n.Dict && (a = t); - if (!a) return null; - const r = a.getRaw("Pg"); - r instanceof n.Ref && (e = r.toString()); - const i = - a.get("Type") instanceof n.Name ? a.get("Type").name : null; - if ("MCR" === i) { - if (this.tree.pageDict.objId !== e) return null; - const t = a.getRaw("Stm"); - return new StructElement({ - type: c, - refObjId: t instanceof n.Ref ? t.toString() : null, - pageObjId: e, - mcid: a.get("MCID"), - }); - } - if ("OBJR" === i) { - if (this.tree.pageDict.objId !== e) return null; - const t = a.getRaw("Obj"); - return new StructElement({ - type: l, - refObjId: t instanceof n.Ref ? t.toString() : null, - pageObjId: e, - }); - } - return new StructElement({ type: u, dict: a }); - } - } - class StructElement { - constructor({ - type: e, - dict: t = null, - mcid: a = null, - pageObjId: r = null, - refObjId: n = null, - }) { - this.type = e; - this.dict = t; - this.mcid = a; - this.pageObjId = r; - this.refObjId = n; - this.parentNode = null; - } - } - t.StructTreePage = class StructTreePage { - constructor(e, t) { - this.root = e; - this.rootDict = e ? e.dict : null; - this.pageDict = t; - this.nodes = []; - } - parse(e) { - if (!this.root || !this.rootDict) return; - const t = this.rootDict.get("ParentTree"); - if (!t) return; - const a = this.pageDict.get("StructParents"), - r = e instanceof n.Ref && this.root.structParentIds?.get(e); - if (!Number.isInteger(a) && !r) return; - const s = new Map(), - o = new i.NumberTree(t, this.rootDict.xref); - if (Number.isInteger(a)) { - const e = o.get(a); - if (Array.isArray(e)) - for (const t of e) - t instanceof n.Ref && - this.addNode(this.rootDict.xref.fetch(t), s); - } - if (r) - for (const [e, t] of r) { - const a = o.get(e); - if (a) { - const e = this.addNode(this.rootDict.xref.fetchIfRef(a), s); - 1 === e?.kids?.length && - e.kids[0].type === l && - (e.kids[0].type = t); - } - } - } - addNode(e, t, a = 0) { - if (a > 40) { - (0, r.warn)("StructTree MAX_DEPTH reached."); - return null; - } - if (t.has(e)) return t.get(e); - const i = new StructElementNode(this, e); - t.set(e, i); - const s = e.get("P"); - if (!s || (0, n.isName)(s.get("Type"), "StructTreeRoot")) { - this.addTopLevelNode(e, i) || t.delete(e); - return i; - } - const o = this.addNode(s, t, a + 1); - if (!o) return i; - let c = !1; - for (const t of o.kids) - if (t.type === u && t.dict === e) { - t.parentNode = i; - c = !0; - } - c || t.delete(e); - return i; - } - addTopLevelNode(e, t) { - const a = this.rootDict.get("K"); - if (!a) return !1; - if (a instanceof n.Dict) { - if (a.objId !== e.objId) return !1; - this.nodes[0] = t; - return !0; - } - if (!Array.isArray(a)) return !0; - let r = !1; - for (let n = 0; n < a.length; n++) { - const i = a[n]; - if (i?.toString() === e.objId) { - this.nodes[n] = t; - r = !0; - } - } - return r; - } - get serializable() { - function nodeToSerializable(e, t, a = 0) { - if (a > 40) { - (0, r.warn)("StructTree too deep to be fully serialized."); - return; - } - const n = Object.create(null); - n.role = e.role; - n.children = []; - t.children.push(n); - const i = e.dict.get("Alt"); - "string" == typeof i && (n.alt = (0, r.stringToPDFString)(i)); - const s = e.dict.get("Lang"); - "string" == typeof s && (n.lang = (0, r.stringToPDFString)(s)); - for (const t of e.kids) { - const e = t.type === u ? t.parentNode : null; - e - ? nodeToSerializable(e, n, a + 1) - : t.type === o || t.type === c - ? n.children.push({ - type: "content", - id: `p${t.pageObjId}_mc${t.mcid}`, - }) - : t.type === l - ? n.children.push({ type: "object", id: t.refObjId }) - : t.type === h && - n.children.push({ - type: "annotation", - id: `${r.AnnotationPrefix}${t.refObjId}`, - }); - } - } - const e = Object.create(null); - e.children = []; - e.role = "Root"; - for (const t of this.nodes) t && nodeToSerializable(t, e); - return e; - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.incrementalUpdate = async function incrementalUpdate({ - originalData: e, - xrefInfo: t, - newRefs: a, - xref: o = null, - hasXfa: l = !1, - xfaDatasetsRef: h = null, - hasXfaDatasetsEntry: u = !1, - needAppearances: d, - acroFormRef: f = null, - acroForm: g = null, - xfaData: p = null, - }) { - await (async function updateAcroform({ - xref: e, - acroForm: t, - acroFormRef: a, - hasXfa: n, - hasXfaDatasetsEntry: i, - xfaDatasetsRef: s, - needAppearances: o, - newRefs: c, - }) { - !n || i || s || (0, r.warn)("XFA - Cannot save it"); - if (!o && (!n || !s || i)) return; - const l = t.clone(); - if (n && !i) { - const e = t.get("XFA").slice(); - e.splice(2, 0, "datasets"); - e.splice(3, 0, s); - l.set("XFA", e); - } - o && l.set("NeedAppearances", !0); - const h = []; - await writeObject(a, l, h, e); - c.push({ ref: a, data: h.join("") }); - })({ - xref: o, - acroForm: g, - acroFormRef: f, - hasXfa: l, - hasXfaDatasetsEntry: u, - xfaDatasetsRef: h, - needAppearances: d, - newRefs: a, - }); - l && - (function updateXFA({ - xfaData: e, - xfaDatasetsRef: t, - newRefs: a, - xref: n, - }) { - if (null === e) { - e = (function writeXFADataForAcroform(e, t) { - const a = new s.SimpleXMLParser({ - hasAttributes: !0, - }).parseFromString(e); - for (const { xfa: e } of t) { - if (!e) continue; - const { path: t, value: n } = e; - if (!t) continue; - const o = (0, i.parseXFAPath)(t); - let c = a.documentElement.searchNode(o, 0); - !c && - o.length > 1 && - (c = a.documentElement.searchNode([o.at(-1)], 0)); - c - ? (c.childNodes = Array.isArray(n) - ? n.map((e) => new s.SimpleDOMNode("value", e)) - : [new s.SimpleDOMNode("#text", n)]) - : (0, r.warn)(`Node not found for path: ${t}`); - } - const n = []; - a.documentElement.dump(n); - return n.join(""); - })(n.fetchIfRef(t).getString(), a); - } - const o = n.encrypt; - if (o) { - e = o.createCipherTransform(t.num, t.gen).encryptString(e); - } - const c = - `${t.num} ${t.gen} obj\n<< /Type /EmbeddedFile /Length ${e.length}>>\nstream\n` + - e + - "\nendstream\nendobj\n"; - a.push({ ref: t, data: c }); - })({ xfaData: p, xfaDatasetsRef: h, newRefs: a, xref: o }); - const m = new n.Dict(null), - b = t.newRef; - let y, w; - const S = e.at(-1); - if (10 === S || 13 === S) { - y = []; - w = e.length; - } else { - y = ["\n"]; - w = e.length + 1; - } - m.set("Size", b.num + 1); - m.set("Prev", t.startXRef); - m.set("Type", n.Name.get("XRef")); - null !== t.rootRef && m.set("Root", t.rootRef); - null !== t.infoRef && m.set("Info", t.infoRef); - null !== t.encryptRef && m.set("Encrypt", t.encryptRef); - a.push({ ref: b, data: "" }); - a = a.sort((e, t) => e.ref.num - t.ref.num); - const x = [[0, 1, 65535]], - C = [0, 1]; - let k = 0; - for (const { ref: e, data: t } of a) { - k = Math.max(k, w); - x.push([1, w, Math.min(e.gen, 65535)]); - w += t.length; - C.push(e.num, 1); - y.push(t); - } - m.set("Index", C); - if (Array.isArray(t.fileIds) && t.fileIds.length > 0) { - const e = (function computeMD5(e, t) { - const a = Math.floor(Date.now() / 1e3), - n = t.filename || "", - i = [a.toString(), n, e.toString()]; - let s = i.reduce((e, t) => e + t.length, 0); - for (const e of Object.values(t.info)) { - i.push(e); - s += e.length; - } - const o = new Uint8Array(s); - let l = 0; - for (const e of i) { - writeString(e, l, o); - l += e.length; - } - return (0, r.bytesToString)((0, c.calculateMD5)(o)); - })(w, t); - m.set("ID", [t.fileIds[0], e]); - } - const v = [1, Math.ceil(Math.log2(k) / 8), 2], - F = (v[0] + v[1] + v[2]) * x.length; - m.set("W", v); - m.set("Length", F); - y.push(`${b.num} ${b.gen} obj\n`); - await writeDict(m, y, null); - y.push(" stream\n"); - const O = y.reduce((e, t) => e + t.length, 0), - T = `\nendstream\nendobj\nstartxref\n${w}\n%%EOF\n`, - M = new Uint8Array(e.length + O + F + T.length); - M.set(e); - let D = e.length; - for (const e of y) { - writeString(e, D, M); - D += e.length; - } - for (const [e, t, a] of x) { - D = writeInt(e, v[0], D, M); - D = writeInt(t, v[1], D, M); - D = writeInt(a, v[2], D, M); - } - writeString(T, D, M); - return M; - }; - t.writeDict = writeDict; - t.writeObject = writeObject; - var r = a(2), - n = a(4), - i = a(3), - s = a(71), - o = a(5), - c = a(74); - async function writeObject(e, t, a, { encrypt: r = null }) { - const i = r?.createCipherTransform(e.num, e.gen); - a.push(`${e.num} ${e.gen} obj\n`); - t instanceof n.Dict - ? await writeDict(t, a, i) - : t instanceof o.BaseStream - ? await writeStream(t, a, i) - : Array.isArray(t) && (await writeArray(t, a, i)); - a.push("\nendobj\n"); - } - async function writeDict(e, t, a) { - t.push("<<"); - for (const r of e.getKeys()) { - t.push(` /${(0, i.escapePDFName)(r)} `); - await writeValue(e.getRaw(r), t, a); - } - t.push(">>"); - } - async function writeStream(e, t, a) { - let i = e.getString(); - const { dict: s } = e, - [o, c] = await Promise.all([ - s.getAsync("Filter"), - s.getAsync("DecodeParms"), - ]), - l = Array.isArray(o) ? await s.xref.fetchIfRefAsync(o[0]) : o, - h = (0, n.isName)(l, "FlateDecode"); - if ( - "undefined" != typeof CompressionStream && - (i.length >= 256 || h) - ) - try { - const e = (0, r.stringToBytes)(i), - t = new CompressionStream("deflate"), - a = t.writable.getWriter(); - a.write(e); - a.close(); - const l = await new Response(t.readable).arrayBuffer(); - i = (0, r.bytesToString)(new Uint8Array(l)); - let u, d; - if (o) { - if (!h) { - u = Array.isArray(o) - ? [n.Name.get("FlateDecode"), ...o] - : [n.Name.get("FlateDecode"), o]; - c && (d = Array.isArray(c) ? [null, ...c] : [null, c]); - } - } else u = n.Name.get("FlateDecode"); - u && s.set("Filter", u); - d && s.set("DecodeParms", d); - } catch (e) { - (0, r.info)(`writeStream - cannot compress data: "${e}".`); - } - a && (i = a.encryptString(i)); - s.set("Length", i.length); - await writeDict(s, t, a); - t.push(" stream\n", i, "\nendstream"); - } - async function writeArray(e, t, a) { - t.push("["); - let r = !0; - for (const n of e) { - r ? (r = !1) : t.push(" "); - await writeValue(n, t, a); - } - t.push("]"); - } - async function writeValue(e, t, a) { - if (e instanceof n.Name) t.push(`/${(0, i.escapePDFName)(e.name)}`); - else if (e instanceof n.Ref) t.push(`${e.num} ${e.gen} R`); - else if (Array.isArray(e)) await writeArray(e, t, a); - else if ("string" == typeof e) { - a && (e = a.encryptString(e)); - t.push(`(${(0, i.escapeString)(e)})`); - } else - "number" == typeof e - ? t.push((0, i.numberToString)(e)) - : "boolean" == typeof e - ? t.push(e.toString()) - : e instanceof n.Dict - ? await writeDict(e, t, a) - : e instanceof o.BaseStream - ? await writeStream(e, t, a) - : null === e - ? t.push("null") - : (0, r.warn)( - `Unhandled value in writer: ${typeof e}, please file a bug.`, - ); - } - function writeInt(e, t, a, r) { - for (let n = t + a - 1; n > a - 1; n--) { - r[n] = 255 & e; - e >>= 8; - } - return a + t; - } - function writeString(e, t, a) { - for (let r = 0, n = e.length; r < n; r++) - a[t + r] = 255 & e.charCodeAt(r); - } - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.calculateSHA256 = - t.calculateMD5 = - t.PDF20 = - t.PDF17 = - t.CipherTransformFactory = - t.ARCFourCipher = - t.AES256Cipher = - t.AES128Cipher = - void 0; - t.calculateSHA384 = calculateSHA384; - t.calculateSHA512 = void 0; - var r = a(2), - n = a(4), - i = a(75); - class ARCFourCipher { - constructor(e) { - this.a = 0; - this.b = 0; - const t = new Uint8Array(256), - a = e.length; - for (let e = 0; e < 256; ++e) t[e] = e; - for (let r = 0, n = 0; r < 256; ++r) { - const i = t[r]; - n = (n + i + e[r % a]) & 255; - t[r] = t[n]; - t[n] = i; - } - this.s = t; - } - encryptBlock(e) { - let t = this.a, - a = this.b; - const r = this.s, - n = e.length, - i = new Uint8Array(n); - for (let s = 0; s < n; ++s) { - t = (t + 1) & 255; - const n = r[t]; - a = (a + n) & 255; - const o = r[a]; - r[t] = o; - r[a] = n; - i[s] = e[s] ^ r[(n + o) & 255]; - } - this.a = t; - this.b = a; - return i; - } - decryptBlock(e) { - return this.encryptBlock(e); - } - encrypt(e) { - return this.encryptBlock(e); - } - } - t.ARCFourCipher = ARCFourCipher; - const s = (function calculateMD5Closure() { - const e = new Uint8Array([ - 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5, - 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 4, 11, 16, - 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21, - 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, - ]), - t = new Int32Array([ - -680876936, -389564586, 606105819, -1044525330, -176418897, - 1200080426, -1473231341, -45705983, 1770035416, -1958414417, - -42063, -1990404162, 1804603682, -40341101, -1502002290, - 1236535329, -165796510, -1069501632, 643717713, -373897302, - -701558691, 38016083, -660478335, -405537848, 568446438, - -1019803690, -187363961, 1163531501, -1444681467, -51403784, - 1735328473, -1926607734, -378558, -2022574463, 1839030562, - -35309556, -1530992060, 1272893353, -155497632, -1094730640, - 681279174, -358537222, -722521979, 76029189, -640364487, - -421815835, 530742520, -995338651, -198630844, 1126891415, - -1416354905, -57434055, 1700485571, -1894986606, -1051523, - -2054922799, 1873313359, -30611744, -1560198380, 1309151649, - -145523070, -1120210379, 718787259, -343485551, - ]); - return function hash(a, r, n) { - let i = 1732584193, - s = -271733879, - o = -1732584194, - c = 271733878; - const l = (n + 72) & -64, - h = new Uint8Array(l); - let u, d; - for (u = 0; u < n; ++u) h[u] = a[r++]; - h[u++] = 128; - const f = l - 8; - for (; u < f; ) h[u++] = 0; - h[u++] = (n << 3) & 255; - h[u++] = (n >> 5) & 255; - h[u++] = (n >> 13) & 255; - h[u++] = (n >> 21) & 255; - h[u++] = (n >>> 29) & 255; - h[u++] = 0; - h[u++] = 0; - h[u++] = 0; - const g = new Int32Array(16); - for (u = 0; u < l; ) { - for (d = 0; d < 16; ++d, u += 4) - g[d] = - h[u] | - (h[u + 1] << 8) | - (h[u + 2] << 16) | - (h[u + 3] << 24); - let a, - r, - n = i, - l = s, - f = o, - p = c; - for (d = 0; d < 64; ++d) { - if (d < 16) { - a = (l & f) | (~l & p); - r = d; - } else if (d < 32) { - a = (p & l) | (~p & f); - r = (5 * d + 1) & 15; - } else if (d < 48) { - a = l ^ f ^ p; - r = (3 * d + 5) & 15; - } else { - a = f ^ (l | ~p); - r = (7 * d) & 15; - } - const i = p, - s = (n + a + t[d] + g[r]) | 0, - o = e[d]; - p = f; - f = l; - l = (l + ((s << o) | (s >>> (32 - o)))) | 0; - n = i; - } - i = (i + n) | 0; - s = (s + l) | 0; - o = (o + f) | 0; - c = (c + p) | 0; - } - return new Uint8Array([ - 255 & i, - (i >> 8) & 255, - (i >> 16) & 255, - (i >>> 24) & 255, - 255 & s, - (s >> 8) & 255, - (s >> 16) & 255, - (s >>> 24) & 255, - 255 & o, - (o >> 8) & 255, - (o >> 16) & 255, - (o >>> 24) & 255, - 255 & c, - (c >> 8) & 255, - (c >> 16) & 255, - (c >>> 24) & 255, - ]); - }; - })(); - t.calculateMD5 = s; - class Word64 { - constructor(e, t) { - this.high = 0 | e; - this.low = 0 | t; - } - and(e) { - this.high &= e.high; - this.low &= e.low; - } - xor(e) { - this.high ^= e.high; - this.low ^= e.low; - } - or(e) { - this.high |= e.high; - this.low |= e.low; - } - shiftRight(e) { - if (e >= 32) { - this.low = (this.high >>> (e - 32)) | 0; - this.high = 0; - } else { - this.low = (this.low >>> e) | (this.high << (32 - e)); - this.high = (this.high >>> e) | 0; - } - } - shiftLeft(e) { - if (e >= 32) { - this.high = this.low << (e - 32); - this.low = 0; - } else { - this.high = (this.high << e) | (this.low >>> (32 - e)); - this.low <<= e; - } - } - rotateRight(e) { - let t, a; - if (32 & e) { - a = this.low; - t = this.high; - } else { - t = this.low; - a = this.high; - } - e &= 31; - this.low = (t >>> e) | (a << (32 - e)); - this.high = (a >>> e) | (t << (32 - e)); - } - not() { - this.high = ~this.high; - this.low = ~this.low; - } - add(e) { - const t = (this.low >>> 0) + (e.low >>> 0); - let a = (this.high >>> 0) + (e.high >>> 0); - t > 4294967295 && (a += 1); - this.low = 0 | t; - this.high = 0 | a; - } - copyTo(e, t) { - e[t] = (this.high >>> 24) & 255; - e[t + 1] = (this.high >> 16) & 255; - e[t + 2] = (this.high >> 8) & 255; - e[t + 3] = 255 & this.high; - e[t + 4] = (this.low >>> 24) & 255; - e[t + 5] = (this.low >> 16) & 255; - e[t + 6] = (this.low >> 8) & 255; - e[t + 7] = 255 & this.low; - } - assign(e) { - this.high = e.high; - this.low = e.low; - } - } - const o = (function calculateSHA256Closure() { - function rotr(e, t) { - return (e >>> t) | (e << (32 - t)); - } - function ch(e, t, a) { - return (e & t) ^ (~e & a); - } - function maj(e, t, a) { - return (e & t) ^ (e & a) ^ (t & a); - } - function sigma(e) { - return rotr(e, 2) ^ rotr(e, 13) ^ rotr(e, 22); - } - function sigmaPrime(e) { - return rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25); - } - function littleSigma(e) { - return rotr(e, 7) ^ rotr(e, 18) ^ (e >>> 3); - } - const e = [ - 1116352408, 1899447441, 3049323471, 3921009573, 961987163, - 1508970993, 2453635748, 2870763221, 3624381080, 310598401, - 607225278, 1426881987, 1925078388, 2162078206, 2614888103, - 3248222580, 3835390401, 4022224774, 264347078, 604807628, - 770255983, 1249150122, 1555081692, 1996064986, 2554220882, - 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, - 113926993, 338241895, 666307205, 773529912, 1294757372, - 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, - 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, - 3600352804, 4094571909, 275423344, 430227734, 506948616, - 659060556, 883997877, 958139571, 1322822218, 1537002063, - 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, - 2428436474, 2756734187, 3204031479, 3329325298, - ]; - return function hash(t, a, r) { - let n = 1779033703, - i = 3144134277, - s = 1013904242, - o = 2773480762, - c = 1359893119, - l = 2600822924, - h = 528734635, - u = 1541459225; - const d = 64 * Math.ceil((r + 9) / 64), - f = new Uint8Array(d); - let g, p; - for (g = 0; g < r; ++g) f[g] = t[a++]; - f[g++] = 128; - const m = d - 8; - for (; g < m; ) f[g++] = 0; - f[g++] = 0; - f[g++] = 0; - f[g++] = 0; - f[g++] = (r >>> 29) & 255; - f[g++] = (r >> 21) & 255; - f[g++] = (r >> 13) & 255; - f[g++] = (r >> 5) & 255; - f[g++] = (r << 3) & 255; - const b = new Uint32Array(64); - for (g = 0; g < d; ) { - for (p = 0; p < 16; ++p) { - b[p] = - (f[g] << 24) | - (f[g + 1] << 16) | - (f[g + 2] << 8) | - f[g + 3]; - g += 4; - } - for (p = 16; p < 64; ++p) - b[p] = - ((rotr((y = b[p - 2]), 17) ^ rotr(y, 19) ^ (y >>> 10)) + - b[p - 7] + - littleSigma(b[p - 15]) + - b[p - 16]) | - 0; - let t, - a, - r = n, - d = i, - m = s, - w = o, - S = c, - x = l, - C = h, - k = u; - for (p = 0; p < 64; ++p) { - t = k + sigmaPrime(S) + ch(S, x, C) + e[p] + b[p]; - a = sigma(r) + maj(r, d, m); - k = C; - C = x; - x = S; - S = (w + t) | 0; - w = m; - m = d; - d = r; - r = (t + a) | 0; - } - n = (n + r) | 0; - i = (i + d) | 0; - s = (s + m) | 0; - o = (o + w) | 0; - c = (c + S) | 0; - l = (l + x) | 0; - h = (h + C) | 0; - u = (u + k) | 0; - } - var y; - return new Uint8Array([ - (n >> 24) & 255, - (n >> 16) & 255, - (n >> 8) & 255, - 255 & n, - (i >> 24) & 255, - (i >> 16) & 255, - (i >> 8) & 255, - 255 & i, - (s >> 24) & 255, - (s >> 16) & 255, - (s >> 8) & 255, - 255 & s, - (o >> 24) & 255, - (o >> 16) & 255, - (o >> 8) & 255, - 255 & o, - (c >> 24) & 255, - (c >> 16) & 255, - (c >> 8) & 255, - 255 & c, - (l >> 24) & 255, - (l >> 16) & 255, - (l >> 8) & 255, - 255 & l, - (h >> 24) & 255, - (h >> 16) & 255, - (h >> 8) & 255, - 255 & h, - (u >> 24) & 255, - (u >> 16) & 255, - (u >> 8) & 255, - 255 & u, - ]); - }; - })(); - t.calculateSHA256 = o; - const c = (function calculateSHA512Closure() { - function ch(e, t, a, r, n) { - e.assign(t); - e.and(a); - n.assign(t); - n.not(); - n.and(r); - e.xor(n); - } - function maj(e, t, a, r, n) { - e.assign(t); - e.and(a); - n.assign(t); - n.and(r); - e.xor(n); - n.assign(a); - n.and(r); - e.xor(n); - } - function sigma(e, t, a) { - e.assign(t); - e.rotateRight(28); - a.assign(t); - a.rotateRight(34); - e.xor(a); - a.assign(t); - a.rotateRight(39); - e.xor(a); - } - function sigmaPrime(e, t, a) { - e.assign(t); - e.rotateRight(14); - a.assign(t); - a.rotateRight(18); - e.xor(a); - a.assign(t); - a.rotateRight(41); - e.xor(a); - } - function littleSigma(e, t, a) { - e.assign(t); - e.rotateRight(1); - a.assign(t); - a.rotateRight(8); - e.xor(a); - a.assign(t); - a.shiftRight(7); - e.xor(a); - } - function littleSigmaPrime(e, t, a) { - e.assign(t); - e.rotateRight(19); - a.assign(t); - a.rotateRight(61); - e.xor(a); - a.assign(t); - a.shiftRight(6); - e.xor(a); - } - const e = [ - new Word64(1116352408, 3609767458), - new Word64(1899447441, 602891725), - new Word64(3049323471, 3964484399), - new Word64(3921009573, 2173295548), - new Word64(961987163, 4081628472), - new Word64(1508970993, 3053834265), - new Word64(2453635748, 2937671579), - new Word64(2870763221, 3664609560), - new Word64(3624381080, 2734883394), - new Word64(310598401, 1164996542), - new Word64(607225278, 1323610764), - new Word64(1426881987, 3590304994), - new Word64(1925078388, 4068182383), - new Word64(2162078206, 991336113), - new Word64(2614888103, 633803317), - new Word64(3248222580, 3479774868), - new Word64(3835390401, 2666613458), - new Word64(4022224774, 944711139), - new Word64(264347078, 2341262773), - new Word64(604807628, 2007800933), - new Word64(770255983, 1495990901), - new Word64(1249150122, 1856431235), - new Word64(1555081692, 3175218132), - new Word64(1996064986, 2198950837), - new Word64(2554220882, 3999719339), - new Word64(2821834349, 766784016), - new Word64(2952996808, 2566594879), - new Word64(3210313671, 3203337956), - new Word64(3336571891, 1034457026), - new Word64(3584528711, 2466948901), - new Word64(113926993, 3758326383), - new Word64(338241895, 168717936), - new Word64(666307205, 1188179964), - new Word64(773529912, 1546045734), - new Word64(1294757372, 1522805485), - new Word64(1396182291, 2643833823), - new Word64(1695183700, 2343527390), - new Word64(1986661051, 1014477480), - new Word64(2177026350, 1206759142), - new Word64(2456956037, 344077627), - new Word64(2730485921, 1290863460), - new Word64(2820302411, 3158454273), - new Word64(3259730800, 3505952657), - new Word64(3345764771, 106217008), - new Word64(3516065817, 3606008344), - new Word64(3600352804, 1432725776), - new Word64(4094571909, 1467031594), - new Word64(275423344, 851169720), - new Word64(430227734, 3100823752), - new Word64(506948616, 1363258195), - new Word64(659060556, 3750685593), - new Word64(883997877, 3785050280), - new Word64(958139571, 3318307427), - new Word64(1322822218, 3812723403), - new Word64(1537002063, 2003034995), - new Word64(1747873779, 3602036899), - new Word64(1955562222, 1575990012), - new Word64(2024104815, 1125592928), - new Word64(2227730452, 2716904306), - new Word64(2361852424, 442776044), - new Word64(2428436474, 593698344), - new Word64(2756734187, 3733110249), - new Word64(3204031479, 2999351573), - new Word64(3329325298, 3815920427), - new Word64(3391569614, 3928383900), - new Word64(3515267271, 566280711), - new Word64(3940187606, 3454069534), - new Word64(4118630271, 4000239992), - new Word64(116418474, 1914138554), - new Word64(174292421, 2731055270), - new Word64(289380356, 3203993006), - new Word64(460393269, 320620315), - new Word64(685471733, 587496836), - new Word64(852142971, 1086792851), - new Word64(1017036298, 365543100), - new Word64(1126000580, 2618297676), - new Word64(1288033470, 3409855158), - new Word64(1501505948, 4234509866), - new Word64(1607167915, 987167468), - new Word64(1816402316, 1246189591), - ]; - return function hash(t, a, r, n = !1) { - let i, s, o, c, l, h, u, d; - if (n) { - i = new Word64(3418070365, 3238371032); - s = new Word64(1654270250, 914150663); - o = new Word64(2438529370, 812702999); - c = new Word64(355462360, 4144912697); - l = new Word64(1731405415, 4290775857); - h = new Word64(2394180231, 1750603025); - u = new Word64(3675008525, 1694076839); - d = new Word64(1203062813, 3204075428); - } else { - i = new Word64(1779033703, 4089235720); - s = new Word64(3144134277, 2227873595); - o = new Word64(1013904242, 4271175723); - c = new Word64(2773480762, 1595750129); - l = new Word64(1359893119, 2917565137); - h = new Word64(2600822924, 725511199); - u = new Word64(528734635, 4215389547); - d = new Word64(1541459225, 327033209); - } - const f = 128 * Math.ceil((r + 17) / 128), - g = new Uint8Array(f); - let p, m; - for (p = 0; p < r; ++p) g[p] = t[a++]; - g[p++] = 128; - const b = f - 16; - for (; p < b; ) g[p++] = 0; - g[p++] = 0; - g[p++] = 0; - g[p++] = 0; - g[p++] = 0; - g[p++] = 0; - g[p++] = 0; - g[p++] = 0; - g[p++] = 0; - g[p++] = 0; - g[p++] = 0; - g[p++] = 0; - g[p++] = (r >>> 29) & 255; - g[p++] = (r >> 21) & 255; - g[p++] = (r >> 13) & 255; - g[p++] = (r >> 5) & 255; - g[p++] = (r << 3) & 255; - const y = new Array(80); - for (p = 0; p < 80; p++) y[p] = new Word64(0, 0); - let w = new Word64(0, 0), - S = new Word64(0, 0), - x = new Word64(0, 0), - C = new Word64(0, 0), - k = new Word64(0, 0), - v = new Word64(0, 0), - F = new Word64(0, 0), - O = new Word64(0, 0); - const T = new Word64(0, 0), - M = new Word64(0, 0), - D = new Word64(0, 0), - E = new Word64(0, 0); - let N, R; - for (p = 0; p < f; ) { - for (m = 0; m < 16; ++m) { - y[m].high = - (g[p] << 24) | - (g[p + 1] << 16) | - (g[p + 2] << 8) | - g[p + 3]; - y[m].low = - (g[p + 4] << 24) | - (g[p + 5] << 16) | - (g[p + 6] << 8) | - g[p + 7]; - p += 8; - } - for (m = 16; m < 80; ++m) { - N = y[m]; - littleSigmaPrime(N, y[m - 2], E); - N.add(y[m - 7]); - littleSigma(D, y[m - 15], E); - N.add(D); - N.add(y[m - 16]); - } - w.assign(i); - S.assign(s); - x.assign(o); - C.assign(c); - k.assign(l); - v.assign(h); - F.assign(u); - O.assign(d); - for (m = 0; m < 80; ++m) { - T.assign(O); - sigmaPrime(D, k, E); - T.add(D); - ch(D, k, v, F, E); - T.add(D); - T.add(e[m]); - T.add(y[m]); - sigma(M, w, E); - maj(D, w, S, x, E); - M.add(D); - N = O; - O = F; - F = v; - v = k; - C.add(T); - k = C; - C = x; - x = S; - S = w; - N.assign(T); - N.add(M); - w = N; - } - i.add(w); - s.add(S); - o.add(x); - c.add(C); - l.add(k); - h.add(v); - u.add(F); - d.add(O); - } - if (n) { - R = new Uint8Array(48); - i.copyTo(R, 0); - s.copyTo(R, 8); - o.copyTo(R, 16); - c.copyTo(R, 24); - l.copyTo(R, 32); - h.copyTo(R, 40); - } else { - R = new Uint8Array(64); - i.copyTo(R, 0); - s.copyTo(R, 8); - o.copyTo(R, 16); - c.copyTo(R, 24); - l.copyTo(R, 32); - h.copyTo(R, 40); - u.copyTo(R, 48); - d.copyTo(R, 56); - } - return R; - }; - })(); - t.calculateSHA512 = c; - function calculateSHA384(e, t, a) { - return c(e, t, a, !0); - } - class NullCipher { - decryptBlock(e) { - return e; - } - encrypt(e) { - return e; - } - } - class AESBaseCipher { - constructor() { - this.constructor === AESBaseCipher && - (0, r.unreachable)("Cannot initialize AESBaseCipher."); - this._s = new Uint8Array([ - 99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, - 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, - 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, - 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, - 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, - 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, - 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, - 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, - 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, - 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, - 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, - 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, - 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, - 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, - 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, - 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, - 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, - 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, - 153, 45, 15, 176, 84, 187, 22, - ]); - this._inv_s = new Uint8Array([ - 82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, - 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, - 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, - 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, - 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, - 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, - 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, - 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, - 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, - 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, - 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, - 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, - 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, - 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, - 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, - 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, - 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, - 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, - 225, 105, 20, 99, 85, 33, 12, 125, - ]); - this._mix = new Uint32Array([ - 0, 235474187, 470948374, 303765277, 941896748, 908933415, - 607530554, 708780849, 1883793496, 2118214995, 1817866830, - 1649639237, 1215061108, 1181045119, 1417561698, 1517767529, - 3767586992, 4003061179, 4236429990, 4069246893, 3635733660, - 3602770327, 3299278474, 3400528769, 2430122216, 2664543715, - 2362090238, 2193862645, 2835123396, 2801107407, 3035535058, - 3135740889, 3678124923, 3576870512, 3341394285, 3374361702, - 3810496343, 3977675356, 4279080257, 4043610186, 2876494627, - 2776292904, 3076639029, 3110650942, 2472011535, 2640243204, - 2403728665, 2169303058, 1001089995, 899835584, 666464733, - 699432150, 59727847, 226906860, 530400753, 294930682, - 1273168787, 1172967064, 1475418501, 1509430414, 1942435775, - 2110667444, 1876241833, 1641816226, 2910219766, 2743034109, - 2976151520, 3211623147, 2505202138, 2606453969, 2302690252, - 2269728455, 3711829422, 3543599269, 3240894392, 3475313331, - 3843699074, 3943906441, 4178062228, 4144047775, 1306967366, - 1139781709, 1374988112, 1610459739, 1975683434, 2076935265, - 1775276924, 1742315127, 1034867998, 866637845, 566021896, - 800440835, 92987698, 193195065, 429456164, 395441711, - 1984812685, 2017778566, 1784663195, 1683407248, 1315562145, - 1080094634, 1383856311, 1551037884, 101039829, 135050206, - 437757123, 337553864, 1042385657, 807962610, 573804783, - 742039012, 2531067453, 2564033334, 2328828971, 2227573024, - 2935566865, 2700099354, 3001755655, 3168937228, 3868552805, - 3902563182, 4203181171, 4102977912, 3736164937, 3501741890, - 3265478751, 3433712980, 1106041591, 1340463100, 1576976609, - 1408749034, 2043211483, 2009195472, 1708848333, 1809054150, - 832877231, 1068351396, 766945465, 599762354, 159417987, - 126454664, 361929877, 463180190, 2709260871, 2943682380, - 3178106961, 3009879386, 2572697195, 2538681184, 2236228733, - 2336434550, 3509871135, 3745345300, 3441850377, 3274667266, - 3910161971, 3877198648, 4110568485, 4211818798, 2597806476, - 2497604743, 2261089178, 2295101073, 2733856160, 2902087851, - 3202437046, 2968011453, 3936291284, 3835036895, 4136440770, - 4169408201, 3535486456, 3702665459, 3467192302, 3231722213, - 2051518780, 1951317047, 1716890410, 1750902305, 1113818384, - 1282050075, 1584504582, 1350078989, 168810852, 67556463, - 371049330, 404016761, 841739592, 1008918595, 775550814, - 540080725, 3969562369, 3801332234, 4035489047, 4269907996, - 3569255213, 3669462566, 3366754619, 3332740144, 2631065433, - 2463879762, 2160117071, 2395588676, 2767645557, 2868897406, - 3102011747, 3069049960, 202008497, 33778362, 270040487, - 504459436, 875451293, 975658646, 675039627, 641025152, - 2084704233, 1917518562, 1615861247, 1851332852, 1147550661, - 1248802510, 1484005843, 1451044056, 933301370, 967311729, - 733156972, 632953703, 260388950, 25965917, 328671808, 496906059, - 1206477858, 1239443753, 1543208500, 1441952575, 2144161806, - 1908694277, 1675577880, 1842759443, 3610369226, 3644379585, - 3408119516, 3307916247, 4011190502, 3776767469, 4077384432, - 4245618683, 2809771154, 2842737049, 3144396420, 3043140495, - 2673705150, 2438237621, 2203032232, 2370213795, - ]); - this._mixCol = new Uint8Array(256); - for (let e = 0; e < 256; e++) - this._mixCol[e] = e < 128 ? e << 1 : (e << 1) ^ 27; - this.buffer = new Uint8Array(16); - this.bufferPosition = 0; - } - _expandKey(e) { - (0, r.unreachable)("Cannot call `_expandKey` on the base class"); - } - _decrypt(e, t) { - let a, r, n; - const i = new Uint8Array(16); - i.set(e); - for (let e = 0, a = this._keySize; e < 16; ++e, ++a) i[e] ^= t[a]; - for (let e = this._cyclesOfRepetition - 1; e >= 1; --e) { - a = i[13]; - i[13] = i[9]; - i[9] = i[5]; - i[5] = i[1]; - i[1] = a; - a = i[14]; - r = i[10]; - i[14] = i[6]; - i[10] = i[2]; - i[6] = a; - i[2] = r; - a = i[15]; - r = i[11]; - n = i[7]; - i[15] = i[3]; - i[11] = a; - i[7] = r; - i[3] = n; - for (let e = 0; e < 16; ++e) i[e] = this._inv_s[i[e]]; - for (let a = 0, r = 16 * e; a < 16; ++a, ++r) i[a] ^= t[r]; - for (let e = 0; e < 16; e += 4) { - const t = this._mix[i[e]], - r = this._mix[i[e + 1]], - n = this._mix[i[e + 2]], - s = this._mix[i[e + 3]]; - a = - t ^ - (r >>> 8) ^ - (r << 24) ^ - (n >>> 16) ^ - (n << 16) ^ - (s >>> 24) ^ - (s << 8); - i[e] = (a >>> 24) & 255; - i[e + 1] = (a >> 16) & 255; - i[e + 2] = (a >> 8) & 255; - i[e + 3] = 255 & a; - } - } - a = i[13]; - i[13] = i[9]; - i[9] = i[5]; - i[5] = i[1]; - i[1] = a; - a = i[14]; - r = i[10]; - i[14] = i[6]; - i[10] = i[2]; - i[6] = a; - i[2] = r; - a = i[15]; - r = i[11]; - n = i[7]; - i[15] = i[3]; - i[11] = a; - i[7] = r; - i[3] = n; - for (let e = 0; e < 16; ++e) { - i[e] = this._inv_s[i[e]]; - i[e] ^= t[e]; - } - return i; - } - _encrypt(e, t) { - const a = this._s; - let r, n, i; - const s = new Uint8Array(16); - s.set(e); - for (let e = 0; e < 16; ++e) s[e] ^= t[e]; - for (let e = 1; e < this._cyclesOfRepetition; e++) { - for (let e = 0; e < 16; ++e) s[e] = a[s[e]]; - i = s[1]; - s[1] = s[5]; - s[5] = s[9]; - s[9] = s[13]; - s[13] = i; - i = s[2]; - n = s[6]; - s[2] = s[10]; - s[6] = s[14]; - s[10] = i; - s[14] = n; - i = s[3]; - n = s[7]; - r = s[11]; - s[3] = s[15]; - s[7] = i; - s[11] = n; - s[15] = r; - for (let e = 0; e < 16; e += 4) { - const t = s[e + 0], - a = s[e + 1], - n = s[e + 2], - i = s[e + 3]; - r = t ^ a ^ n ^ i; - s[e + 0] ^= r ^ this._mixCol[t ^ a]; - s[e + 1] ^= r ^ this._mixCol[a ^ n]; - s[e + 2] ^= r ^ this._mixCol[n ^ i]; - s[e + 3] ^= r ^ this._mixCol[i ^ t]; - } - for (let a = 0, r = 16 * e; a < 16; ++a, ++r) s[a] ^= t[r]; - } - for (let e = 0; e < 16; ++e) s[e] = a[s[e]]; - i = s[1]; - s[1] = s[5]; - s[5] = s[9]; - s[9] = s[13]; - s[13] = i; - i = s[2]; - n = s[6]; - s[2] = s[10]; - s[6] = s[14]; - s[10] = i; - s[14] = n; - i = s[3]; - n = s[7]; - r = s[11]; - s[3] = s[15]; - s[7] = i; - s[11] = n; - s[15] = r; - for (let e = 0, a = this._keySize; e < 16; ++e, ++a) s[e] ^= t[a]; - return s; - } - _decryptBlock2(e, t) { - const a = e.length; - let r = this.buffer, - n = this.bufferPosition; - const i = []; - let s = this.iv; - for (let t = 0; t < a; ++t) { - r[n] = e[t]; - ++n; - if (n < 16) continue; - const a = this._decrypt(r, this._key); - for (let e = 0; e < 16; ++e) a[e] ^= s[e]; - s = r; - i.push(a); - r = new Uint8Array(16); - n = 0; - } - this.buffer = r; - this.bufferLength = n; - this.iv = s; - if (0 === i.length) return new Uint8Array(0); - let o = 16 * i.length; - if (t) { - const e = i.at(-1); - let t = e[15]; - if (t <= 16) { - for (let a = 15, r = 16 - t; a >= r; --a) - if (e[a] !== t) { - t = 0; - break; - } - o -= t; - i[i.length - 1] = e.subarray(0, 16 - t); - } - } - const c = new Uint8Array(o); - for (let e = 0, t = 0, a = i.length; e < a; ++e, t += 16) - c.set(i[e], t); - return c; - } - decryptBlock(e, t, a = null) { - const r = e.length, - n = this.buffer; - let i = this.bufferPosition; - if (a) this.iv = a; - else { - for (let t = 0; i < 16 && t < r; ++t, ++i) n[i] = e[t]; - if (i < 16) { - this.bufferLength = i; - return new Uint8Array(0); - } - this.iv = n; - e = e.subarray(16); - } - this.buffer = new Uint8Array(16); - this.bufferLength = 0; - this.decryptBlock = this._decryptBlock2; - return this.decryptBlock(e, t); - } - encrypt(e, t) { - const a = e.length; - let r = this.buffer, - n = this.bufferPosition; - const i = []; - t || (t = new Uint8Array(16)); - for (let s = 0; s < a; ++s) { - r[n] = e[s]; - ++n; - if (n < 16) continue; - for (let e = 0; e < 16; ++e) r[e] ^= t[e]; - const a = this._encrypt(r, this._key); - t = a; - i.push(a); - r = new Uint8Array(16); - n = 0; - } - this.buffer = r; - this.bufferLength = n; - this.iv = t; - if (0 === i.length) return new Uint8Array(0); - const s = 16 * i.length, - o = new Uint8Array(s); - for (let e = 0, t = 0, a = i.length; e < a; ++e, t += 16) - o.set(i[e], t); - return o; - } - } - class AES128Cipher extends AESBaseCipher { - constructor(e) { - super(); - this._cyclesOfRepetition = 10; - this._keySize = 160; - this._rcon = new Uint8Array([ - 141, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, - 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, - 239, 197, 145, 57, 114, 228, 211, 189, 97, 194, 159, 37, 74, - 148, 51, 102, 204, 131, 29, 58, 116, 232, 203, 141, 1, 2, 4, 8, - 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, - 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145, 57, - 114, 228, 211, 189, 97, 194, 159, 37, 74, 148, 51, 102, 204, - 131, 29, 58, 116, 232, 203, 141, 1, 2, 4, 8, 16, 32, 64, 128, - 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, - 106, 212, 179, 125, 250, 239, 197, 145, 57, 114, 228, 211, 189, - 97, 194, 159, 37, 74, 148, 51, 102, 204, 131, 29, 58, 116, 232, - 203, 141, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, - 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, - 239, 197, 145, 57, 114, 228, 211, 189, 97, 194, 159, 37, 74, - 148, 51, 102, 204, 131, 29, 58, 116, 232, 203, 141, 1, 2, 4, 8, - 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, - 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145, 57, - 114, 228, 211, 189, 97, 194, 159, 37, 74, 148, 51, 102, 204, - 131, 29, 58, 116, 232, 203, 141, - ]); - this._key = this._expandKey(e); - } - _expandKey(e) { - const t = this._s, - a = this._rcon, - r = new Uint8Array(176); - r.set(e); - for (let e = 16, n = 1; e < 176; ++n) { - let i = r[e - 3], - s = r[e - 2], - o = r[e - 1], - c = r[e - 4]; - i = t[i]; - s = t[s]; - o = t[o]; - c = t[c]; - i ^= a[n]; - for (let t = 0; t < 4; ++t) { - r[e] = i ^= r[e - 16]; - e++; - r[e] = s ^= r[e - 16]; - e++; - r[e] = o ^= r[e - 16]; - e++; - r[e] = c ^= r[e - 16]; - e++; - } - } - return r; - } - } - t.AES128Cipher = AES128Cipher; - class AES256Cipher extends AESBaseCipher { - constructor(e) { - super(); - this._cyclesOfRepetition = 14; - this._keySize = 224; - this._key = this._expandKey(e); - } - _expandKey(e) { - const t = this._s, - a = new Uint8Array(240); - a.set(e); - let r, - n, - i, - s, - o = 1; - for (let e = 32, c = 1; e < 240; ++c) { - if (e % 32 == 16) { - r = t[r]; - n = t[n]; - i = t[i]; - s = t[s]; - } else if (e % 32 == 0) { - r = a[e - 3]; - n = a[e - 2]; - i = a[e - 1]; - s = a[e - 4]; - r = t[r]; - n = t[n]; - i = t[i]; - s = t[s]; - r ^= o; - (o <<= 1) >= 256 && (o = 255 & (27 ^ o)); - } - for (let t = 0; t < 4; ++t) { - a[e] = r ^= a[e - 32]; - e++; - a[e] = n ^= a[e - 32]; - e++; - a[e] = i ^= a[e - 32]; - e++; - a[e] = s ^= a[e - 32]; - e++; - } - } - return a; - } - } - t.AES256Cipher = AES256Cipher; - class PDF17 { - checkOwnerPassword(e, t, a, n) { - const i = new Uint8Array(e.length + 56); - i.set(e, 0); - i.set(t, e.length); - i.set(a, e.length + t.length); - const s = o(i, 0, i.length); - return (0, r.isArrayEqual)(s, n); - } - checkUserPassword(e, t, a) { - const n = new Uint8Array(e.length + 8); - n.set(e, 0); - n.set(t, e.length); - const i = o(n, 0, n.length); - return (0, r.isArrayEqual)(i, a); - } - getOwnerKey(e, t, a, r) { - const n = new Uint8Array(e.length + 56); - n.set(e, 0); - n.set(t, e.length); - n.set(a, e.length + t.length); - const i = o(n, 0, n.length); - return new AES256Cipher(i).decryptBlock( - r, - !1, - new Uint8Array(16), - ); - } - getUserKey(e, t, a) { - const r = new Uint8Array(e.length + 8); - r.set(e, 0); - r.set(t, e.length); - const n = o(r, 0, r.length); - return new AES256Cipher(n).decryptBlock( - a, - !1, - new Uint8Array(16), - ); - } - } - t.PDF17 = PDF17; - class PDF20 { - _hash(e, t, a) { - let r = o(t, 0, t.length).subarray(0, 32), - n = [0], - i = 0; - for (; i < 64 || n.at(-1) > i - 32; ) { - const t = e.length + r.length + a.length, - s = new Uint8Array(t); - let l = 0; - s.set(e, l); - l += e.length; - s.set(r, l); - l += r.length; - s.set(a, l); - const h = new Uint8Array(64 * t); - for (let e = 0, a = 0; e < 64; e++, a += t) h.set(s, a); - n = new AES128Cipher(r.subarray(0, 16)).encrypt( - h, - r.subarray(16, 32), - ); - const u = n.slice(0, 16).reduce((e, t) => e + t, 0) % 3; - 0 === u - ? (r = o(n, 0, n.length)) - : 1 === u - ? (r = calculateSHA384(n, 0, n.length)) - : 2 === u && (r = c(n, 0, n.length)); - i++; - } - return r.subarray(0, 32); - } - checkOwnerPassword(e, t, a, n) { - const i = new Uint8Array(e.length + 56); - i.set(e, 0); - i.set(t, e.length); - i.set(a, e.length + t.length); - const s = this._hash(e, i, a); - return (0, r.isArrayEqual)(s, n); - } - checkUserPassword(e, t, a) { - const n = new Uint8Array(e.length + 8); - n.set(e, 0); - n.set(t, e.length); - const i = this._hash(e, n, []); - return (0, r.isArrayEqual)(i, a); - } - getOwnerKey(e, t, a, r) { - const n = new Uint8Array(e.length + 56); - n.set(e, 0); - n.set(t, e.length); - n.set(a, e.length + t.length); - const i = this._hash(e, n, a); - return new AES256Cipher(i).decryptBlock( - r, - !1, - new Uint8Array(16), - ); - } - getUserKey(e, t, a) { - const r = new Uint8Array(e.length + 8); - r.set(e, 0); - r.set(t, e.length); - const n = this._hash(e, r, []); - return new AES256Cipher(n).decryptBlock( - a, - !1, - new Uint8Array(16), - ); - } - } - t.PDF20 = PDF20; - class CipherTransform { - constructor(e, t) { - this.StringCipherConstructor = e; - this.StreamCipherConstructor = t; - } - createStream(e, t) { - const a = new this.StreamCipherConstructor(); - return new i.DecryptStream( - e, - t, - function cipherTransformDecryptStream(e, t) { - return a.decryptBlock(e, t); - }, - ); - } - decryptString(e) { - const t = new this.StringCipherConstructor(); - let a = (0, r.stringToBytes)(e); - a = t.decryptBlock(a, !0); - return (0, r.bytesToString)(a); - } - encryptString(e) { - const t = new this.StringCipherConstructor(); - if (t instanceof AESBaseCipher) { - const a = 16 - (e.length % 16); - e += String.fromCharCode(a).repeat(a); - const n = new Uint8Array(16); - if ("undefined" != typeof crypto) crypto.getRandomValues(n); - else - for (let e = 0; e < 16; e++) - n[e] = Math.floor(256 * Math.random()); - let i = (0, r.stringToBytes)(e); - i = t.encrypt(i, n); - const s = new Uint8Array(16 + i.length); - s.set(n); - s.set(i, 16); - return (0, r.bytesToString)(s); - } - let a = (0, r.stringToBytes)(e); - a = t.encrypt(a); - return (0, r.bytesToString)(a); - } - } - class CipherTransformFactory { - static #O = new Uint8Array([ - 40, 191, 78, 94, 78, 117, 138, 65, 100, 0, 78, 86, 255, 250, 1, 8, - 46, 46, 0, 182, 208, 104, 62, 128, 47, 12, 169, 254, 100, 83, 105, - 122, - ]); - #I(e, t, a, r, n, i, s, o, c, l, h, u) { - if (t) { - const e = Math.min(127, t.length); - t = t.subarray(0, e); - } else t = []; - const d = 6 === e ? new PDF20() : new PDF17(); - return d.checkUserPassword(t, o, s) - ? d.getUserKey(t, c, h) - : t.length && d.checkOwnerPassword(t, r, i, a) - ? d.getOwnerKey(t, n, i, l) - : null; - } - #T(e, t, a, r, n, i, o, c) { - const l = 40 + a.length + e.length, - h = new Uint8Array(l); - let u, - d, - f = 0; - if (t) { - d = Math.min(32, t.length); - for (; f < d; ++f) h[f] = t[f]; - } - u = 0; - for (; f < 32; ) h[f++] = CipherTransformFactory.#O[u++]; - for (u = 0, d = a.length; u < d; ++u) h[f++] = a[u]; - h[f++] = 255 & n; - h[f++] = (n >> 8) & 255; - h[f++] = (n >> 16) & 255; - h[f++] = (n >>> 24) & 255; - for (u = 0, d = e.length; u < d; ++u) h[f++] = e[u]; - if (i >= 4 && !c) { - h[f++] = 255; - h[f++] = 255; - h[f++] = 255; - h[f++] = 255; - } - let g = s(h, 0, f); - const p = o >> 3; - if (i >= 3) for (u = 0; u < 50; ++u) g = s(g, 0, p); - const m = g.subarray(0, p); - let b, y; - if (i >= 3) { - for (f = 0; f < 32; ++f) h[f] = CipherTransformFactory.#O[f]; - for (u = 0, d = e.length; u < d; ++u) h[f++] = e[u]; - b = new ARCFourCipher(m); - y = b.encryptBlock(s(h, 0, f)); - d = m.length; - const t = new Uint8Array(d); - for (u = 1; u <= 19; ++u) { - for (let e = 0; e < d; ++e) t[e] = m[e] ^ u; - b = new ARCFourCipher(t); - y = b.encryptBlock(y); - } - for (u = 0, d = y.length; u < d; ++u) - if (r[u] !== y[u]) return null; - } else { - b = new ARCFourCipher(m); - y = b.encryptBlock(CipherTransformFactory.#O); - for (u = 0, d = y.length; u < d; ++u) - if (r[u] !== y[u]) return null; - } - return m; - } - #M(e, t, a, r) { - const n = new Uint8Array(32); - let i = 0; - const o = Math.min(32, e.length); - for (; i < o; ++i) n[i] = e[i]; - let c = 0; - for (; i < 32; ) n[i++] = CipherTransformFactory.#O[c++]; - let l = s(n, 0, i); - const h = r >> 3; - if (a >= 3) for (c = 0; c < 50; ++c) l = s(l, 0, l.length); - let u, d; - if (a >= 3) { - d = t; - const e = new Uint8Array(h); - for (c = 19; c >= 0; c--) { - for (let t = 0; t < h; ++t) e[t] = l[t] ^ c; - u = new ARCFourCipher(e); - d = u.encryptBlock(d); - } - } else { - u = new ARCFourCipher(l.subarray(0, h)); - d = u.encryptBlock(t); - } - return d; - } - #P(e, t, a, r = !1) { - const n = new Uint8Array(a.length + 9), - i = a.length; - let o; - for (o = 0; o < i; ++o) n[o] = a[o]; - n[o++] = 255 & e; - n[o++] = (e >> 8) & 255; - n[o++] = (e >> 16) & 255; - n[o++] = 255 & t; - n[o++] = (t >> 8) & 255; - if (r) { - n[o++] = 115; - n[o++] = 65; - n[o++] = 108; - n[o++] = 84; - } - return s(n, 0, o).subarray(0, Math.min(a.length + 5, 16)); - } - #D(e, t, a, i, s) { - if (!(t instanceof n.Name)) - throw new r.FormatError("Invalid crypt filter name."); - const o = this, - c = e.get(t.name), - l = c?.get("CFM"); - if (!l || "None" === l.name) - return function () { - return new NullCipher(); - }; - if ("V2" === l.name) - return function () { - return new ARCFourCipher(o.#P(a, i, s, !1)); - }; - if ("AESV2" === l.name) - return function () { - return new AES128Cipher(o.#P(a, i, s, !0)); - }; - if ("AESV3" === l.name) - return function () { - return new AES256Cipher(s); - }; - throw new r.FormatError("Unknown crypto method"); - } - constructor(e, t, a) { - const i = e.get("Filter"); - if (!(0, n.isName)(i, "Standard")) - throw new r.FormatError("unknown encryption method"); - this.filterName = i.name; - this.dict = e; - const s = e.get("V"); - if ( - !Number.isInteger(s) || - (1 !== s && 2 !== s && 4 !== s && 5 !== s) - ) - throw new r.FormatError("unsupported encryption algorithm"); - this.algorithm = s; - let o = e.get("Length"); - if (!o) - if (s <= 3) o = 40; - else { - const t = e.get("CF"), - a = e.get("StmF"); - if (t instanceof n.Dict && a instanceof n.Name) { - t.suppressEncryption = !0; - const e = t.get(a.name); - o = e?.get("Length") || 128; - o < 40 && (o <<= 3); - } - } - if (!Number.isInteger(o) || o < 40 || o % 8 != 0) - throw new r.FormatError("invalid key length"); - const c = (0, r.stringToBytes)(e.get("O")), - l = (0, r.stringToBytes)(e.get("U")), - h = c.subarray(0, 32), - u = l.subarray(0, 32), - d = e.get("P"), - f = e.get("R"), - g = (4 === s || 5 === s) && !1 !== e.get("EncryptMetadata"); - this.encryptMetadata = g; - const p = (0, r.stringToBytes)(t); - let m, b; - if (a) { - if (6 === f) - try { - a = (0, r.utf8StringToString)(a); - } catch { - (0, r.warn)( - "CipherTransformFactory: Unable to convert UTF8 encoded password.", - ); - } - m = (0, r.stringToBytes)(a); - } - if (5 !== s) b = this.#T(p, m, h, u, d, f, o, g); - else { - const t = c.subarray(32, 40), - a = c.subarray(40, 48), - n = l.subarray(0, 48), - i = l.subarray(32, 40), - s = l.subarray(40, 48), - o = (0, r.stringToBytes)(e.get("OE")), - d = (0, r.stringToBytes)(e.get("UE")), - g = (0, r.stringToBytes)(e.get("Perms")); - b = this.#I(f, m, h, t, a, n, u, i, s, o, d, g); - } - if (!b && !a) - throw new r.PasswordException( - "No password given", - r.PasswordResponses.NEED_PASSWORD, - ); - if (!b && a) { - const e = this.#M(m, h, f, o); - b = this.#T(p, e, h, u, d, f, o, g); - } - if (!b) - throw new r.PasswordException( - "Incorrect Password", - r.PasswordResponses.INCORRECT_PASSWORD, - ); - this.encryptionKey = b; - if (s >= 4) { - const t = e.get("CF"); - t instanceof n.Dict && (t.suppressEncryption = !0); - this.cf = t; - this.stmf = e.get("StmF") || n.Name.get("Identity"); - this.strf = e.get("StrF") || n.Name.get("Identity"); - this.eff = e.get("EFF") || this.stmf; - } - } - createCipherTransform(e, t) { - if (4 === this.algorithm || 5 === this.algorithm) - return new CipherTransform( - this.#D(this.cf, this.strf, e, t, this.encryptionKey), - this.#D(this.cf, this.stmf, e, t, this.encryptionKey), - ); - const a = this.#P(e, t, this.encryptionKey, !1), - cipherConstructor = function () { - return new ARCFourCipher(a); - }; - return new CipherTransform(cipherConstructor, cipherConstructor); - } - } - t.CipherTransformFactory = CipherTransformFactory; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.DecryptStream = void 0; - var r = a(18); - class DecryptStream extends r.DecodeStream { - constructor(e, t, a) { - super(t); - this.str = e; - this.dict = e.dict; - this.decrypt = a; - this.nextChunk = null; - this.initialized = !1; - } - readBlock() { - let e; - if (this.initialized) e = this.nextChunk; - else { - e = this.str.getBytes(512); - this.initialized = !0; - } - if (!e || 0 === e.length) { - this.eof = !0; - return; - } - this.nextChunk = this.str.getBytes(512); - const t = this.nextChunk?.length > 0; - e = (0, this.decrypt)(e, !t); - const a = this.bufferLength, - r = a + e.length; - this.ensureBuffer(r).set(e, a); - this.bufferLength = r; - } - } - t.DecryptStream = DecryptStream; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.ObjectLoader = void 0; - var r = a(4), - n = a(5), - i = a(3), - s = a(2); - function addChildren(e, t) { - if (e instanceof r.Dict) e = e.getRawValues(); - else if (e instanceof n.BaseStream) e = e.dict.getRawValues(); - else if (!Array.isArray(e)) return; - for (const i of e) - ((a = i) instanceof r.Ref || - a instanceof r.Dict || - a instanceof n.BaseStream || - Array.isArray(a)) && - t.push(i); - var a; - } - t.ObjectLoader = class ObjectLoader { - constructor(e, t, a) { - this.dict = e; - this.keys = t; - this.xref = a; - this.refSet = null; - } - async load() { - if (this.xref.stream.isDataLoaded) return; - const { keys: e, dict: t } = this; - this.refSet = new r.RefSet(); - const a = []; - for (const r of e) { - const e = t.getRaw(r); - void 0 !== e && a.push(e); - } - return this._walk(a); - } - async _walk(e) { - const t = [], - a = []; - for (; e.length; ) { - let o = e.pop(); - if (o instanceof r.Ref) { - if (this.refSet.has(o)) continue; - try { - this.refSet.put(o); - o = this.xref.fetch(o); - } catch (e) { - if (!(e instanceof i.MissingDataException)) { - (0, s.warn)( - `ObjectLoader._walk - requesting all data: "${e}".`, - ); - this.refSet = null; - const { manager: t } = this.xref.stream; - return t.requestAllChunks(); - } - t.push(o); - a.push({ begin: e.begin, end: e.end }); - } - } - if (o instanceof n.BaseStream) { - const e = o.getBaseStreams(); - if (e) { - let r = !1; - for (const t of e) - if (!t.isDataLoaded) { - r = !0; - a.push({ begin: t.start, end: t.end }); - } - r && t.push(o); - } - } - addChildren(o, e); - } - if (a.length) { - await this.xref.stream.manager.requestRanges(a); - for (const e of t) e instanceof r.Ref && this.refSet.remove(e); - return this._walk(t); - } - this.refSet = null; - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.XFAFactory = void 0; - var r = a(78), - n = a(79), - i = a(89), - s = a(85), - o = a(84), - c = a(2), - l = a(90), - h = a(100); - class XFAFactory { - constructor(e) { - try { - this.root = new l.XFAParser().parse( - XFAFactory._createDocument(e), - ); - const t = new n.Binder(this.root); - this.form = t.bind(); - this.dataHandler = new i.DataHandler(this.root, t.getData()); - this.form[r.$globalData].template = this.form; - } catch (e) { - (0, c.warn)( - `XFA - an error occurred during parsing and binding: ${e}`, - ); - } - } - isValid() { - return this.root && this.form; - } - _createPagesHelper() { - const e = this.form[r.$toPages](); - return new Promise((t, a) => { - const nextIteration = () => { - try { - const a = e.next(); - a.done ? t(a.value) : setTimeout(nextIteration, 0); - } catch (e) { - a(e); - } - }; - setTimeout(nextIteration, 0); - }); - } - async _createPages() { - try { - this.pages = await this._createPagesHelper(); - this.dims = this.pages.children.map((e) => { - const { width: t, height: a } = e.attributes.style; - return [0, 0, parseInt(t), parseInt(a)]; - }); - } catch (e) { - (0, c.warn)(`XFA - an error occurred during layout: ${e}`); - } - } - getBoundingBox(e) { - return this.dims[e]; - } - async getNumPages() { - this.pages || (await this._createPages()); - return this.dims.length; - } - setImages(e) { - this.form[r.$globalData].images = e; - } - setFonts(e) { - this.form[r.$globalData].fontFinder = new s.FontFinder(e); - const t = []; - for (let e of this.form[r.$globalData].usedTypefaces) { - e = (0, o.stripQuotes)(e); - this.form[r.$globalData].fontFinder.find(e) || t.push(e); - } - return t.length > 0 ? t : null; - } - appendFonts(e, t) { - this.form[r.$globalData].fontFinder.add(e, t); - } - async getPages() { - this.pages || (await this._createPages()); - const e = this.pages; - this.pages = null; - return e; - } - serializeData(e) { - return this.dataHandler.serialize(e); - } - static _createDocument(e) { - return e["/xdp:xdp"] ? Object.values(e).join("") : e["xdp:xdp"]; - } - static getRichTextAsHtml(e) { - if (!e || "string" != typeof e) return null; - try { - let t = new l.XFAParser(h.XhtmlNamespace, !0).parse(e); - if (!["body", "xhtml"].includes(t[r.$nodeName])) { - const e = h.XhtmlNamespace.body({}); - e[r.$appendChild](t); - t = e; - } - const a = t[r.$toHTML](); - if (!a.success) return null; - const { html: n } = a, - { attributes: i } = n; - if (i) { - i.class && - (i.class = i.class.filter((e) => !e.startsWith("xfa"))); - i.dir = "auto"; - } - return { html: n, str: t[r.$text]() }; - } catch (e) { - (0, c.warn)( - `XFA - an error occurred during parsing of rich text: ${e}`, - ); - } - return null; - } - } - t.XFAFactory = XFAFactory; - }, - (e, t) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.$uid = - t.$toStyle = - t.$toString = - t.$toPages = - t.$toHTML = - t.$text = - t.$tabIndex = - t.$setValue = - t.$setSetAttributes = - t.$setId = - t.$searchNode = - t.$root = - t.$resolvePrototypes = - t.$removeChild = - t.$pushPara = - t.$pushGlyphs = - t.$popPara = - t.$onText = - t.$onChildCheck = - t.$onChild = - t.$nsAttributes = - t.$nodeName = - t.$namespaceId = - t.$lastAttribute = - t.$isUsable = - t.$isTransparent = - t.$isThereMoreWidth = - t.$isSplittable = - t.$isNsAgnostic = - t.$isDescendent = - t.$isDataValue = - t.$isCDATAXml = - t.$isBindable = - t.$insertAt = - t.$indexOf = - t.$ids = - t.$hasSettableValue = - t.$globalData = - t.$getTemplateRoot = - t.$getSubformParent = - t.$getRealChildrenByNameIt = - t.$getParent = - t.$getNextPage = - t.$getExtra = - t.$getDataValue = - t.$getContainedChildren = - t.$getChildrenByNameIt = - t.$getChildrenByName = - t.$getChildrenByClass = - t.$getChildren = - t.$getAvailableSpace = - t.$getAttributes = - t.$getAttributeIt = - t.$flushHTML = - t.$finalize = - t.$extra = - t.$dump = - t.$data = - t.$content = - t.$consumed = - t.$clone = - t.$cleanup = - t.$cleanPage = - t.$clean = - t.$childrenToHTML = - t.$appendChild = - t.$addHTML = - t.$acceptWhitespace = - void 0; - const a = Symbol(); - t.$acceptWhitespace = a; - const r = Symbol(); - t.$addHTML = r; - const n = Symbol(); - t.$appendChild = n; - const i = Symbol(); - t.$childrenToHTML = i; - const s = Symbol(); - t.$clean = s; - const o = Symbol(); - t.$cleanPage = o; - const c = Symbol(); - t.$cleanup = c; - const l = Symbol(); - t.$clone = l; - const h = Symbol(); - t.$consumed = h; - const u = Symbol("content"); - t.$content = u; - const d = Symbol("data"); - t.$data = d; - const f = Symbol(); - t.$dump = f; - const g = Symbol("extra"); - t.$extra = g; - const p = Symbol(); - t.$finalize = p; - const m = Symbol(); - t.$flushHTML = m; - const b = Symbol(); - t.$getAttributeIt = b; - const y = Symbol(); - t.$getAttributes = y; - const w = Symbol(); - t.$getAvailableSpace = w; - const S = Symbol(); - t.$getChildrenByClass = S; - const x = Symbol(); - t.$getChildrenByName = x; - const C = Symbol(); - t.$getChildrenByNameIt = C; - const k = Symbol(); - t.$getDataValue = k; - const v = Symbol(); - t.$getExtra = v; - const F = Symbol(); - t.$getRealChildrenByNameIt = F; - const O = Symbol(); - t.$getChildren = O; - const T = Symbol(); - t.$getContainedChildren = T; - const M = Symbol(); - t.$getNextPage = M; - const D = Symbol(); - t.$getSubformParent = D; - const E = Symbol(); - t.$getParent = E; - const N = Symbol(); - t.$getTemplateRoot = N; - const R = Symbol(); - t.$globalData = R; - const L = Symbol(); - t.$hasSettableValue = L; - const $ = Symbol(); - t.$ids = $; - const _ = Symbol(); - t.$indexOf = _; - const j = Symbol(); - t.$insertAt = j; - const U = Symbol(); - t.$isCDATAXml = U; - const X = Symbol(); - t.$isBindable = X; - const H = Symbol(); - t.$isDataValue = H; - const q = Symbol(); - t.$isDescendent = q; - const z = Symbol(); - t.$isNsAgnostic = z; - const W = Symbol(); - t.$isSplittable = W; - const G = Symbol(); - t.$isThereMoreWidth = G; - const V = Symbol(); - t.$isTransparent = V; - const K = Symbol(); - t.$isUsable = K; - const J = Symbol(); - t.$lastAttribute = J; - const Y = Symbol("namespaceId"); - t.$namespaceId = Y; - const Z = Symbol("nodeName"); - t.$nodeName = Z; - const Q = Symbol(); - t.$nsAttributes = Q; - const ee = Symbol(); - t.$onChild = ee; - const te = Symbol(); - t.$onChildCheck = te; - const ae = Symbol(); - t.$onText = ae; - const re = Symbol(); - t.$pushGlyphs = re; - const ne = Symbol(); - t.$popPara = ne; - const ie = Symbol(); - t.$pushPara = ie; - const se = Symbol(); - t.$removeChild = se; - const oe = Symbol("root"); - t.$root = oe; - const ce = Symbol(); - t.$resolvePrototypes = ce; - const le = Symbol(); - t.$searchNode = le; - const he = Symbol(); - t.$setId = he; - const ue = Symbol(); - t.$setSetAttributes = ue; - const de = Symbol(); - t.$setValue = de; - const fe = Symbol(); - t.$tabIndex = fe; - const ge = Symbol(); - t.$text = ge; - const pe = Symbol(); - t.$toPages = pe; - const me = Symbol(); - t.$toHTML = me; - const be = Symbol(); - t.$toString = be; - const ye = Symbol(); - t.$toStyle = ye; - const we = Symbol("uid"); - t.$uid = we; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.Binder = void 0; - var r = a(78), - n = a(80), - i = a(88), - s = a(87), - o = a(81), - c = a(2); - const l = o.NamespaceIds.datasets.id; - function createText(e) { - const t = new n.Text({}); - t[r.$content] = e; - return t; - } - t.Binder = class Binder { - constructor(e) { - this.root = e; - this.datasets = e.datasets; - this.data = - e.datasets?.data || - new s.XmlObject(o.NamespaceIds.datasets.id, "data"); - this.emptyMerge = 0 === this.data[r.$getChildren]().length; - this.root.form = this.form = e.template[r.$clone](); - } - _isConsumeData() { - return !this.emptyMerge && this._mergeMode; - } - _isMatchTemplate() { - return !this._isConsumeData(); - } - bind() { - this._bindElement(this.form, this.data); - return this.form; - } - getData() { - return this.data; - } - _bindValue(e, t, a) { - e[r.$data] = t; - if (e[r.$hasSettableValue]()) - if (t[r.$isDataValue]()) { - const a = t[r.$getDataValue](); - e[r.$setValue](createText(a)); - } else if ( - e instanceof n.Field && - "multiSelect" === e.ui?.choiceList?.open - ) { - const a = t[r.$getChildren]() - .map((e) => e[r.$content].trim()) - .join("\n"); - e[r.$setValue](createText(a)); - } else - this._isConsumeData() && - (0, c.warn)("XFA - Nodes haven't the same type."); - else - !t[r.$isDataValue]() || this._isMatchTemplate() - ? this._bindElement(e, t) - : (0, c.warn)("XFA - Nodes haven't the same type."); - } - _findDataByNameToConsume(e, t, a, n) { - if (!e) return null; - let i, s; - for (let n = 0; n < 3; n++) { - i = a[r.$getRealChildrenByNameIt](e, !1, !0); - for (;;) { - s = i.next().value; - if (!s) break; - if (t === s[r.$isDataValue]()) return s; - } - if ( - a[r.$namespaceId] === o.NamespaceIds.datasets.id && - "data" === a[r.$nodeName] - ) - break; - a = a[r.$getParent](); - } - if (!n) return null; - i = this.data[r.$getRealChildrenByNameIt](e, !0, !1); - s = i.next().value; - if (s) return s; - i = this.data[r.$getAttributeIt](e, !0); - s = i.next().value; - return s?.[r.$isDataValue]() ? s : null; - } - _setProperties(e, t) { - if (e.hasOwnProperty("setProperty")) - for (const { ref: a, target: o, connection: l } of e.setProperty - .children) { - if (l) continue; - if (!a) continue; - const h = (0, i.searchNode)(this.root, t, a, !1, !1); - if (!h) { - (0, c.warn)(`XFA - Invalid reference: ${a}.`); - continue; - } - const [u] = h; - if (!u[r.$isDescendent](this.data)) { - (0, c.warn)("XFA - Invalid node: must be a data node."); - continue; - } - const d = (0, i.searchNode)(this.root, e, o, !1, !1); - if (!d) { - (0, c.warn)(`XFA - Invalid target: ${o}.`); - continue; - } - const [f] = d; - if (!f[r.$isDescendent](e)) { - (0, c.warn)( - "XFA - Invalid target: must be a property or subproperty.", - ); - continue; - } - const g = f[r.$getParent](); - if ( - f instanceof n.SetProperty || - g instanceof n.SetProperty - ) { - (0, c.warn)( - "XFA - Invalid target: cannot be a setProperty or one of its properties.", - ); - continue; - } - if (f instanceof n.BindItems || g instanceof n.BindItems) { - (0, c.warn)( - "XFA - Invalid target: cannot be a bindItems or one of its properties.", - ); - continue; - } - const p = u[r.$text](), - m = f[r.$nodeName]; - if (f instanceof s.XFAAttribute) { - const e = Object.create(null); - e[m] = p; - const t = Reflect.construct( - Object.getPrototypeOf(g).constructor, - [e], - ); - g[m] = t[m]; - } else if (f.hasOwnProperty(r.$content)) { - f[r.$data] = u; - f[r.$content] = p; - f[r.$finalize](); - } else - (0, c.warn)("XFA - Invalid node to use in setProperty"); - } - } - _bindItems(e, t) { - if ( - !e.hasOwnProperty("items") || - !e.hasOwnProperty("bindItems") || - e.bindItems.isEmpty() - ) - return; - for (const t of e.items.children) e[r.$removeChild](t); - e.items.clear(); - const a = new n.Items({}), - s = new n.Items({}); - e[r.$appendChild](a); - e.items.push(a); - e[r.$appendChild](s); - e.items.push(s); - for (const { - ref: n, - labelRef: o, - valueRef: l, - connection: h, - } of e.bindItems.children) { - if (h) continue; - if (!n) continue; - const e = (0, i.searchNode)(this.root, t, n, !1, !1); - if (e) - for (const t of e) { - if (!t[r.$isDescendent](this.datasets)) { - (0, c.warn)( - `XFA - Invalid ref (${n}): must be a datasets child.`, - ); - continue; - } - const e = (0, i.searchNode)(this.root, t, o, !0, !1); - if (!e) { - (0, c.warn)(`XFA - Invalid label: ${o}.`); - continue; - } - const [h] = e; - if (!h[r.$isDescendent](this.datasets)) { - (0, c.warn)( - "XFA - Invalid label: must be a datasets child.", - ); - continue; - } - const u = (0, i.searchNode)(this.root, t, l, !0, !1); - if (!u) { - (0, c.warn)(`XFA - Invalid value: ${l}.`); - continue; - } - const [d] = u; - if (!d[r.$isDescendent](this.datasets)) { - (0, c.warn)( - "XFA - Invalid value: must be a datasets child.", - ); - continue; - } - const f = createText(h[r.$text]()), - g = createText(d[r.$text]()); - a[r.$appendChild](f); - a.text.push(f); - s[r.$appendChild](g); - s.text.push(g); - } - else (0, c.warn)(`XFA - Invalid reference: ${n}.`); - } - } - _bindOccurrences(e, t, a) { - let n; - if (t.length > 1) { - n = e[r.$clone](); - n[r.$removeChild](n.occur); - n.occur = null; - } - this._bindValue(e, t[0], a); - this._setProperties(e, t[0]); - this._bindItems(e, t[0]); - if (1 === t.length) return; - const i = e[r.$getParent](), - s = e[r.$nodeName], - o = i[r.$indexOf](e); - for (let e = 1, c = t.length; e < c; e++) { - const c = t[e], - l = n[r.$clone](); - i[s].push(l); - i[r.$insertAt](o + e, l); - this._bindValue(l, c, a); - this._setProperties(l, c); - this._bindItems(l, c); - } - } - _createOccurrences(e) { - if (!this.emptyMerge) return; - const { occur: t } = e; - if (!t || t.initial <= 1) return; - const a = e[r.$getParent](), - n = e[r.$nodeName]; - if (!(a[n] instanceof s.XFAObjectArray)) return; - let i; - i = e.name - ? a[n].children.filter((t) => t.name === e.name).length - : a[n].children.length; - const o = a[r.$indexOf](e) + 1, - c = t.initial - i; - if (c) { - const t = e[r.$clone](); - t[r.$removeChild](t.occur); - t.occur = null; - a[n].push(t); - a[r.$insertAt](o, t); - for (let e = 1; e < c; e++) { - const i = t[r.$clone](); - a[n].push(i); - a[r.$insertAt](o + e, i); - } - } - } - _getOccurInfo(e) { - const { name: t, occur: a } = e; - if (!a || !t) return [1, 1]; - const r = -1 === a.max ? 1 / 0 : a.max; - return [a.min, r]; - } - _setAndBind(e, t) { - this._setProperties(e, t); - this._bindItems(e, t); - this._bindElement(e, t); - } - _bindElement(e, t) { - const a = []; - this._createOccurrences(e); - for (const n of e[r.$getChildren]()) { - if (n[r.$data]) continue; - if ( - void 0 === this._mergeMode && - "subform" === n[r.$nodeName] - ) { - this._mergeMode = "consumeData" === n.mergeMode; - const e = t[r.$getChildren](); - if (e.length > 0) this._bindOccurrences(n, [e[0]], null); - else if (this.emptyMerge) { - const e = t[r.$namespaceId] === l ? -1 : t[r.$namespaceId], - a = (n[r.$data] = new s.XmlObject(e, n.name || "root")); - t[r.$appendChild](a); - this._bindElement(n, a); - } - continue; - } - if (!n[r.$isBindable]()) continue; - let e = !1, - o = null, - h = null, - u = null; - if (n.bind) { - switch (n.bind.match) { - case "none": - this._setAndBind(n, t); - continue; - case "global": - e = !0; - break; - case "dataRef": - if (!n.bind.ref) { - (0, c.warn)( - `XFA - ref is empty in node ${n[r.$nodeName]}.`, - ); - this._setAndBind(n, t); - continue; - } - h = n.bind.ref; - } - n.bind.picture && (o = n.bind.picture[r.$content]); - } - const [d, f] = this._getOccurInfo(n); - if (h) { - u = (0, i.searchNode)(this.root, t, h, !0, !1); - if (null === u) { - u = (0, i.createDataNode)(this.data, t, h); - if (!u) continue; - this._isConsumeData() && (u[r.$consumed] = !0); - this._setAndBind(n, u); - continue; - } - this._isConsumeData() && - (u = u.filter((e) => !e[r.$consumed])); - u.length > f - ? (u = u.slice(0, f)) - : 0 === u.length && (u = null); - u && - this._isConsumeData() && - u.forEach((e) => { - e[r.$consumed] = !0; - }); - } else { - if (!n.name) { - this._setAndBind(n, t); - continue; - } - if (this._isConsumeData()) { - const a = []; - for (; a.length < f; ) { - const i = this._findDataByNameToConsume( - n.name, - n[r.$hasSettableValue](), - t, - e, - ); - if (!i) break; - i[r.$consumed] = !0; - a.push(i); - } - u = a.length > 0 ? a : null; - } else { - u = t[r.$getRealChildrenByNameIt]( - n.name, - !1, - this.emptyMerge, - ).next().value; - if (!u) { - if (0 === d) { - a.push(n); - continue; - } - const e = - t[r.$namespaceId] === l ? -1 : t[r.$namespaceId]; - u = n[r.$data] = new s.XmlObject(e, n.name); - this.emptyMerge && (u[r.$consumed] = !0); - t[r.$appendChild](u); - this._setAndBind(n, u); - continue; - } - this.emptyMerge && (u[r.$consumed] = !0); - u = [u]; - } - } - u - ? this._bindOccurrences(n, u, o) - : d > 0 - ? this._setAndBind(n, t) - : a.push(n); - } - a.forEach((e) => e[r.$getParent]()[r.$removeChild](e)); - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.Value = - t.Text = - t.TemplateNamespace = - t.Template = - t.SetProperty = - t.Items = - t.Field = - t.BindItems = - void 0; - var r = a(78), - n = a(81), - i = a(82), - s = a(83), - o = a(87), - c = a(84), - l = a(2), - h = a(85), - u = a(3), - d = a(88); - const f = n.NamespaceIds.template.id, - g = "http://www.w3.org/2000/svg", - p = /^H(\d+)$/, - m = new Set([ - "image/gif", - "image/jpeg", - "image/jpg", - "image/pjpeg", - "image/png", - "image/apng", - "image/x-png", - "image/bmp", - "image/x-ms-bmp", - "image/tiff", - "image/tif", - "application/octet-stream", - ]), - b = [ - [[66, 77], "image/bmp"], - [[255, 216, 255], "image/jpeg"], - [[73, 73, 42, 0], "image/tiff"], - [[77, 77, 0, 42], "image/tiff"], - [[71, 73, 70, 56, 57, 97], "image/gif"], - [[137, 80, 78, 71, 13, 10, 26, 10], "image/png"], - ]; - function getBorderDims(e) { - if (!e || !e.border) return { w: 0, h: 0 }; - const t = e.border[r.$getExtra](); - return t - ? { - w: t.widths[0] + t.widths[2] + t.insets[0] + t.insets[2], - h: t.widths[1] + t.widths[3] + t.insets[1] + t.insets[3], - } - : { w: 0, h: 0 }; - } - function hasMargin(e) { - return ( - e.margin && - (e.margin.topInset || - e.margin.rightInset || - e.margin.bottomInset || - e.margin.leftInset) - ); - } - function _setValue(e, t) { - if (!e.value) { - const t = new Value({}); - e[r.$appendChild](t); - e.value = t; - } - e.value[r.$setValue](t); - } - function* getContainedChildren(e) { - for (const t of e[r.$getChildren]()) - t instanceof SubformSet - ? yield* t[r.$getContainedChildren]() - : yield t; - } - function isRequired(e) { - return "error" === e.validate?.nullTest; - } - function setTabIndex(e) { - for (; e; ) { - if (!e.traversal) { - e[r.$tabIndex] = e[r.$getParent]()[r.$tabIndex]; - return; - } - if (e[r.$tabIndex]) return; - let t = null; - for (const a of e.traversal[r.$getChildren]()) - if ("next" === a.operation) { - t = a; - break; - } - if (!t || !t.ref) { - e[r.$tabIndex] = e[r.$getParent]()[r.$tabIndex]; - return; - } - const a = e[r.$getTemplateRoot](); - e[r.$tabIndex] = ++a[r.$tabIndex]; - const n = a[r.$searchNode](t.ref, e); - if (!n) return; - e = n[0]; - } - } - function applyAssist(e, t) { - const a = e.assist; - if (a) { - const e = a[r.$toHTML](); - e && (t.title = e); - const n = a.role.match(p); - if (n) { - const e = "heading", - a = n[1]; - t.role = e; - t["aria-level"] = a; - } - } - if ("table" === e.layout) t.role = "table"; - else if ("row" === e.layout) t.role = "row"; - else { - const a = e[r.$getParent](); - "row" === a.layout && - (t.role = "TH" === a.assist?.role ? "columnheader" : "cell"); - } - } - function ariaLabel(e) { - if (!e.assist) return null; - const t = e.assist; - return t.speak && "" !== t.speak[r.$content] - ? t.speak[r.$content] - : t.toolTip - ? t.toolTip[r.$content] - : null; - } - function valueToHtml(e) { - return c.HTMLResult.success({ - name: "div", - attributes: { class: ["xfaRich"], style: Object.create(null) }, - children: [ - { - name: "span", - attributes: { style: Object.create(null) }, - value: e, - }, - ], - }); - } - function setFirstUnsplittable(e) { - const t = e[r.$getTemplateRoot](); - if (null === t[r.$extra].firstUnsplittable) { - t[r.$extra].firstUnsplittable = e; - t[r.$extra].noLayoutFailure = !0; - } - } - function unsetFirstUnsplittable(e) { - const t = e[r.$getTemplateRoot](); - t[r.$extra].firstUnsplittable === e && - (t[r.$extra].noLayoutFailure = !1); - } - function handleBreak(e) { - if (e[r.$extra]) return !1; - e[r.$extra] = Object.create(null); - if ("auto" === e.targetType) return !1; - const t = e[r.$getTemplateRoot](); - let a = null; - if (e.target) { - a = t[r.$searchNode](e.target, e[r.$getParent]()); - if (!a) return !1; - a = a[0]; - } - const { currentPageArea: n, currentContentArea: i } = t[r.$extra]; - if ("pageArea" === e.targetType) { - a instanceof PageArea || (a = null); - if (e.startNew) { - e[r.$extra].target = a || n; - return !0; - } - if (a && a !== n) { - e[r.$extra].target = a; - return !0; - } - return !1; - } - a instanceof ContentArea || (a = null); - const s = a && a[r.$getParent](); - let o, - c = s; - if (e.startNew) - if (a) { - const e = s.contentArea.children, - t = e.indexOf(i), - r = e.indexOf(a); - -1 !== t && t < r && (c = null); - o = r - 1; - } else o = n.contentArea.children.indexOf(i); - else { - if (!a || a === i) return !1; - o = s.contentArea.children.indexOf(a) - 1; - c = s === n ? null : s; - } - e[r.$extra].target = c; - e[r.$extra].index = o; - return !0; - } - function handleOverflow(e, t, a) { - const n = e[r.$getTemplateRoot](), - i = n[r.$extra].noLayoutFailure, - s = t[r.$getSubformParent]; - t[r.$getSubformParent] = () => e; - n[r.$extra].noLayoutFailure = !0; - const o = t[r.$toHTML](a); - e[r.$addHTML](o.html, o.bbox); - n[r.$extra].noLayoutFailure = i; - t[r.$getSubformParent] = s; - } - class AppearanceFilter extends o.StringObject { - constructor(e) { - super(f, "appearanceFilter"); - this.id = e.id || ""; - this.type = (0, c.getStringOption)(e.type, [ - "optional", - "required", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class Arc extends o.XFAObject { - constructor(e) { - super(f, "arc", !0); - this.circular = (0, c.getInteger)({ - data: e.circular, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.hand = (0, c.getStringOption)(e.hand, [ - "even", - "left", - "right", - ]); - this.id = e.id || ""; - this.startAngle = (0, c.getFloat)({ - data: e.startAngle, - defaultValue: 0, - validate: (e) => !0, - }); - this.sweepAngle = (0, c.getFloat)({ - data: e.sweepAngle, - defaultValue: 360, - validate: (e) => !0, - }); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.edge = null; - this.fill = null; - } - [r.$toHTML]() { - const e = this.edge || new Edge({}), - t = e[r.$toStyle](), - a = Object.create(null); - "visible" === this.fill?.presence - ? Object.assign(a, this.fill[r.$toStyle]()) - : (a.fill = "transparent"); - a.strokeWidth = (0, s.measureToString)( - "visible" === e.presence ? e.thickness : 0, - ); - a.stroke = t.color; - let n; - const i = { - xmlns: g, - style: { width: "100%", height: "100%", overflow: "visible" }, - }; - if (360 === this.sweepAngle) - n = { - name: "ellipse", - attributes: { - xmlns: g, - cx: "50%", - cy: "50%", - rx: "50%", - ry: "50%", - style: a, - }, - }; - else { - const e = (this.startAngle * Math.PI) / 180, - t = (this.sweepAngle * Math.PI) / 180, - r = this.sweepAngle > 180 ? 1 : 0, - [s, o, c, l] = [ - 50 * (1 + Math.cos(e)), - 50 * (1 - Math.sin(e)), - 50 * (1 + Math.cos(e + t)), - 50 * (1 - Math.sin(e + t)), - ]; - n = { - name: "path", - attributes: { - xmlns: g, - d: `M ${s} ${o} A 50 50 0 ${r} 0 ${c} ${l}`, - vectorEffect: "non-scaling-stroke", - style: a, - }, - }; - Object.assign(i, { - viewBox: "0 0 100 100", - preserveAspectRatio: "none", - }); - } - const o = { name: "svg", children: [n], attributes: i }; - if (hasMargin(this[r.$getParent]()[r.$getParent]())) - return c.HTMLResult.success({ - name: "div", - attributes: { - style: { display: "inline", width: "100%", height: "100%" }, - }, - children: [o], - }); - o.attributes.style.position = "absolute"; - return c.HTMLResult.success(o); - } - } - class Area extends o.XFAObject { - constructor(e) { - super(f, "area", !0); - this.colSpan = (0, c.getInteger)({ - data: e.colSpan, - defaultValue: 1, - validate: (e) => e >= 1 || -1 === e, - }); - this.id = e.id || ""; - this.name = e.name || ""; - this.relevant = (0, c.getRelevant)(e.relevant); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.x = (0, c.getMeasurement)(e.x, "0pt"); - this.y = (0, c.getMeasurement)(e.y, "0pt"); - this.desc = null; - this.extras = null; - this.area = new o.XFAObjectArray(); - this.draw = new o.XFAObjectArray(); - this.exObject = new o.XFAObjectArray(); - this.exclGroup = new o.XFAObjectArray(); - this.field = new o.XFAObjectArray(); - this.subform = new o.XFAObjectArray(); - this.subformSet = new o.XFAObjectArray(); - } - *[r.$getContainedChildren]() { - yield* getContainedChildren(this); - } - [r.$isTransparent]() { - return !0; - } - [r.$isBindable]() { - return !0; - } - [r.$addHTML](e, t) { - const [a, n, i, s] = t; - this[r.$extra].width = Math.max(this[r.$extra].width, a + i); - this[r.$extra].height = Math.max(this[r.$extra].height, n + s); - this[r.$extra].children.push(e); - } - [r.$getAvailableSpace]() { - return this[r.$extra].availableSpace; - } - [r.$toHTML](e) { - const t = (0, s.toStyle)(this, "position"), - a = { style: t, id: this[r.$uid], class: ["xfaArea"] }; - (0, s.isPrintOnly)(this) && a.class.push("xfaPrintOnly"); - this.name && (a.xfaName = this.name); - const n = []; - this[r.$extra] = { - children: n, - width: 0, - height: 0, - availableSpace: e, - }; - const i = this[r.$childrenToHTML]({ - filter: new Set([ - "area", - "draw", - "field", - "exclGroup", - "subform", - "subformSet", - ]), - include: !0, - }); - if (!i.success) { - if (i.isBreak()) return i; - delete this[r.$extra]; - return c.HTMLResult.FAILURE; - } - t.width = (0, s.measureToString)(this[r.$extra].width); - t.height = (0, s.measureToString)(this[r.$extra].height); - const o = { name: "div", attributes: a, children: n }, - l = [ - this.x, - this.y, - this[r.$extra].width, - this[r.$extra].height, - ]; - delete this[r.$extra]; - return c.HTMLResult.success(o, l); - } - } - class Assist extends o.XFAObject { - constructor(e) { - super(f, "assist", !0); - this.id = e.id || ""; - this.role = e.role || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.speak = null; - this.toolTip = null; - } - [r.$toHTML]() { - return this.toolTip?.[r.$content] || null; - } - } - class Barcode extends o.XFAObject { - constructor(e) { - super(f, "barcode", !0); - this.charEncoding = (0, c.getKeyword)({ - data: e.charEncoding ? e.charEncoding.toLowerCase() : "", - defaultValue: "", - validate: (e) => - [ - "utf-8", - "big-five", - "fontspecific", - "gbk", - "gb-18030", - "gb-2312", - "ksc-5601", - "none", - "shift-jis", - "ucs-2", - "utf-16", - ].includes(e) || e.match(/iso-8859-\d{2}/), - }); - this.checksum = (0, c.getStringOption)(e.checksum, [ - "none", - "1mod10", - "1mod10_1mod11", - "2mod10", - "auto", - ]); - this.dataColumnCount = (0, c.getInteger)({ - data: e.dataColumnCount, - defaultValue: -1, - validate: (e) => e >= 0, - }); - this.dataLength = (0, c.getInteger)({ - data: e.dataLength, - defaultValue: -1, - validate: (e) => e >= 0, - }); - this.dataPrep = (0, c.getStringOption)(e.dataPrep, [ - "none", - "flateCompress", - ]); - this.dataRowCount = (0, c.getInteger)({ - data: e.dataRowCount, - defaultValue: -1, - validate: (e) => e >= 0, - }); - this.endChar = e.endChar || ""; - this.errorCorrectionLevel = (0, c.getInteger)({ - data: e.errorCorrectionLevel, - defaultValue: -1, - validate: (e) => e >= 0 && e <= 8, - }); - this.id = e.id || ""; - this.moduleHeight = (0, c.getMeasurement)(e.moduleHeight, "5mm"); - this.moduleWidth = (0, c.getMeasurement)(e.moduleWidth, "0.25mm"); - this.printCheckDigit = (0, c.getInteger)({ - data: e.printCheckDigit, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.rowColumnRatio = (0, c.getRatio)(e.rowColumnRatio); - this.startChar = e.startChar || ""; - this.textLocation = (0, c.getStringOption)(e.textLocation, [ - "below", - "above", - "aboveEmbedded", - "belowEmbedded", - "none", - ]); - this.truncate = (0, c.getInteger)({ - data: e.truncate, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.type = (0, c.getStringOption)( - e.type ? e.type.toLowerCase() : "", - [ - "aztec", - "codabar", - "code2of5industrial", - "code2of5interleaved", - "code2of5matrix", - "code2of5standard", - "code3of9", - "code3of9extended", - "code11", - "code49", - "code93", - "code128", - "code128a", - "code128b", - "code128c", - "code128sscc", - "datamatrix", - "ean8", - "ean8add2", - "ean8add5", - "ean13", - "ean13add2", - "ean13add5", - "ean13pwcd", - "fim", - "logmars", - "maxicode", - "msi", - "pdf417", - "pdf417macro", - "plessey", - "postauscust2", - "postauscust3", - "postausreplypaid", - "postausstandard", - "postukrm4scc", - "postusdpbc", - "postusimb", - "postusstandard", - "postus5zip", - "qrcode", - "rfid", - "rss14", - "rss14expanded", - "rss14limited", - "rss14stacked", - "rss14stackedomni", - "rss14truncated", - "telepen", - "ucc128", - "ucc128random", - "ucc128sscc", - "upca", - "upcaadd2", - "upcaadd5", - "upcapwcd", - "upce", - "upceadd2", - "upceadd5", - "upcean2", - "upcean5", - "upsmaxicode", - ], - ); - this.upsMode = (0, c.getStringOption)(e.upsMode, [ - "usCarrier", - "internationalCarrier", - "secureSymbol", - "standardSymbol", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.wideNarrowRatio = (0, c.getRatio)(e.wideNarrowRatio); - this.encrypt = null; - this.extras = null; - } - } - class Bind extends o.XFAObject { - constructor(e) { - super(f, "bind", !0); - this.match = (0, c.getStringOption)(e.match, [ - "once", - "dataRef", - "global", - "none", - ]); - this.ref = e.ref || ""; - this.picture = null; - } - } - class BindItems extends o.XFAObject { - constructor(e) { - super(f, "bindItems"); - this.connection = e.connection || ""; - this.labelRef = e.labelRef || ""; - this.ref = e.ref || ""; - this.valueRef = e.valueRef || ""; - } - } - t.BindItems = BindItems; - class Bookend extends o.XFAObject { - constructor(e) { - super(f, "bookend"); - this.id = e.id || ""; - this.leader = e.leader || ""; - this.trailer = e.trailer || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class BooleanElement extends o.Option01 { - constructor(e) { - super(f, "boolean"); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - [r.$toHTML](e) { - return valueToHtml(1 === this[r.$content] ? "1" : "0"); - } - } - class Border extends o.XFAObject { - constructor(e) { - super(f, "border", !0); - this.break = (0, c.getStringOption)(e.break, ["close", "open"]); - this.hand = (0, c.getStringOption)(e.hand, [ - "even", - "left", - "right", - ]); - this.id = e.id || ""; - this.presence = (0, c.getStringOption)(e.presence, [ - "visible", - "hidden", - "inactive", - "invisible", - ]); - this.relevant = (0, c.getRelevant)(e.relevant); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.corner = new o.XFAObjectArray(4); - this.edge = new o.XFAObjectArray(4); - this.extras = null; - this.fill = null; - this.margin = null; - } - [r.$getExtra]() { - if (!this[r.$extra]) { - const e = this.edge.children.slice(); - if (e.length < 4) { - const t = e.at(-1) || new Edge({}); - for (let a = e.length; a < 4; a++) e.push(t); - } - const t = e.map((e) => e.thickness), - a = [0, 0, 0, 0]; - if (this.margin) { - a[0] = this.margin.topInset; - a[1] = this.margin.rightInset; - a[2] = this.margin.bottomInset; - a[3] = this.margin.leftInset; - } - this[r.$extra] = { widths: t, insets: a, edges: e }; - } - return this[r.$extra]; - } - [r.$toStyle]() { - const { edges: e } = this[r.$getExtra](), - t = e.map((e) => { - const t = e[r.$toStyle](); - t.color ||= "#000000"; - return t; - }), - a = Object.create(null); - this.margin && Object.assign(a, this.margin[r.$toStyle]()); - "visible" === this.fill?.presence && - Object.assign(a, this.fill[r.$toStyle]()); - if (this.corner.children.some((e) => 0 !== e.radius)) { - const e = this.corner.children.map((e) => e[r.$toStyle]()); - if (2 === e.length || 3 === e.length) { - const t = e.at(-1); - for (let a = e.length; a < 4; a++) e.push(t); - } - a.borderRadius = e.map((e) => e.radius).join(" "); - } - switch (this.presence) { - case "invisible": - case "hidden": - a.borderStyle = ""; - break; - case "inactive": - a.borderStyle = "none"; - break; - default: - a.borderStyle = t.map((e) => e.style).join(" "); - } - a.borderWidth = t.map((e) => e.width).join(" "); - a.borderColor = t.map((e) => e.color).join(" "); - return a; - } - } - class Break extends o.XFAObject { - constructor(e) { - super(f, "break", !0); - this.after = (0, c.getStringOption)(e.after, [ - "auto", - "contentArea", - "pageArea", - "pageEven", - "pageOdd", - ]); - this.afterTarget = e.afterTarget || ""; - this.before = (0, c.getStringOption)(e.before, [ - "auto", - "contentArea", - "pageArea", - "pageEven", - "pageOdd", - ]); - this.beforeTarget = e.beforeTarget || ""; - this.bookendLeader = e.bookendLeader || ""; - this.bookendTrailer = e.bookendTrailer || ""; - this.id = e.id || ""; - this.overflowLeader = e.overflowLeader || ""; - this.overflowTarget = e.overflowTarget || ""; - this.overflowTrailer = e.overflowTrailer || ""; - this.startNew = (0, c.getInteger)({ - data: e.startNew, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - } - } - class BreakAfter extends o.XFAObject { - constructor(e) { - super(f, "breakAfter", !0); - this.id = e.id || ""; - this.leader = e.leader || ""; - this.startNew = (0, c.getInteger)({ - data: e.startNew, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.target = e.target || ""; - this.targetType = (0, c.getStringOption)(e.targetType, [ - "auto", - "contentArea", - "pageArea", - ]); - this.trailer = e.trailer || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.script = null; - } - } - class BreakBefore extends o.XFAObject { - constructor(e) { - super(f, "breakBefore", !0); - this.id = e.id || ""; - this.leader = e.leader || ""; - this.startNew = (0, c.getInteger)({ - data: e.startNew, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.target = e.target || ""; - this.targetType = (0, c.getStringOption)(e.targetType, [ - "auto", - "contentArea", - "pageArea", - ]); - this.trailer = e.trailer || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.script = null; - } - [r.$toHTML](e) { - this[r.$extra] = {}; - return c.HTMLResult.FAILURE; - } - } - class Button extends o.XFAObject { - constructor(e) { - super(f, "button", !0); - this.highlight = (0, c.getStringOption)(e.highlight, [ - "inverted", - "none", - "outline", - "push", - ]); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - } - [r.$toHTML](e) { - const t = this[r.$getParent]()[r.$getParent](), - a = { - name: "button", - attributes: { - id: this[r.$uid], - class: ["xfaButton"], - style: {}, - }, - children: [], - }; - for (const e of t.event.children) { - if ("click" !== e.activity || !e.script) continue; - const t = (0, u.recoverJsURL)(e.script[r.$content]); - if (!t) continue; - const n = (0, s.fixURL)(t.url); - n && - a.children.push({ - name: "a", - attributes: { - id: "link" + this[r.$uid], - href: n, - newWindow: t.newWindow, - class: ["xfaLink"], - style: {}, - }, - children: [], - }); - } - return c.HTMLResult.success(a); - } - } - class Calculate extends o.XFAObject { - constructor(e) { - super(f, "calculate", !0); - this.id = e.id || ""; - this.override = (0, c.getStringOption)(e.override, [ - "disabled", - "error", - "ignore", - "warning", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - this.message = null; - this.script = null; - } - } - class Caption extends o.XFAObject { - constructor(e) { - super(f, "caption", !0); - this.id = e.id || ""; - this.placement = (0, c.getStringOption)(e.placement, [ - "left", - "bottom", - "inline", - "right", - "top", - ]); - this.presence = (0, c.getStringOption)(e.presence, [ - "visible", - "hidden", - "inactive", - "invisible", - ]); - this.reserve = Math.ceil((0, c.getMeasurement)(e.reserve)); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - this.font = null; - this.margin = null; - this.para = null; - this.value = null; - } - [r.$setValue](e) { - _setValue(this, e); - } - [r.$getExtra](e) { - if (!this[r.$extra]) { - let { width: t, height: a } = e; - switch (this.placement) { - case "left": - case "right": - case "inline": - t = this.reserve <= 0 ? t : this.reserve; - break; - case "top": - case "bottom": - a = this.reserve <= 0 ? a : this.reserve; - } - this[r.$extra] = (0, s.layoutNode)(this, { - width: t, - height: a, - }); - } - return this[r.$extra]; - } - [r.$toHTML](e) { - if (!this.value) return c.HTMLResult.EMPTY; - this[r.$pushPara](); - const t = this.value[r.$toHTML](e).html; - if (!t) { - this[r.$popPara](); - return c.HTMLResult.EMPTY; - } - const a = this.reserve; - if (this.reserve <= 0) { - const { w: t, h: a } = this[r.$getExtra](e); - switch (this.placement) { - case "left": - case "right": - case "inline": - this.reserve = t; - break; - case "top": - case "bottom": - this.reserve = a; - } - } - const n = []; - "string" == typeof t - ? n.push({ name: "#text", value: t }) - : n.push(t); - const i = (0, s.toStyle)(this, "font", "margin", "visibility"); - switch (this.placement) { - case "left": - case "right": - this.reserve > 0 && - (i.width = (0, s.measureToString)(this.reserve)); - break; - case "top": - case "bottom": - this.reserve > 0 && - (i.height = (0, s.measureToString)(this.reserve)); - } - (0, s.setPara)(this, null, t); - this[r.$popPara](); - this.reserve = a; - return c.HTMLResult.success({ - name: "div", - attributes: { style: i, class: ["xfaCaption"] }, - children: n, - }); - } - } - class Certificate extends o.StringObject { - constructor(e) { - super(f, "certificate"); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class Certificates extends o.XFAObject { - constructor(e) { - super(f, "certificates", !0); - this.credentialServerPolicy = (0, c.getStringOption)( - e.credentialServerPolicy, - ["optional", "required"], - ); - this.id = e.id || ""; - this.url = e.url || ""; - this.urlPolicy = e.urlPolicy || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.encryption = null; - this.issuers = null; - this.keyUsage = null; - this.oids = null; - this.signing = null; - this.subjectDNs = null; - } - } - class CheckButton extends o.XFAObject { - constructor(e) { - super(f, "checkButton", !0); - this.id = e.id || ""; - this.mark = (0, c.getStringOption)(e.mark, [ - "default", - "check", - "circle", - "cross", - "diamond", - "square", - "star", - ]); - this.shape = (0, c.getStringOption)(e.shape, ["square", "round"]); - this.size = (0, c.getMeasurement)(e.size, "10pt"); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.border = null; - this.extras = null; - this.margin = null; - } - [r.$toHTML](e) { - const t = (0, s.toStyle)("margin"), - a = (0, s.measureToString)(this.size); - t.width = t.height = a; - let n, i, o; - const l = this[r.$getParent]()[r.$getParent](), - h = - (l.items.children.length && - l.items.children[0][r.$toHTML]().html) || - [], - u = { - on: (void 0 !== h[0] ? h[0] : "on").toString(), - off: (void 0 !== h[1] ? h[1] : "off").toString(), - }, - d = (l.value?.[r.$text]() || "off") === u.on || void 0, - f = l[r.$getSubformParent](), - g = l[r.$uid]; - let p; - if (f instanceof ExclGroup) { - o = f[r.$uid]; - n = "radio"; - i = "xfaRadio"; - p = f[r.$data]?.[r.$uid] || f[r.$uid]; - } else { - n = "checkbox"; - i = "xfaCheckbox"; - p = l[r.$data]?.[r.$uid] || l[r.$uid]; - } - const m = { - name: "input", - attributes: { - class: [i], - style: t, - fieldId: g, - dataId: p, - type: n, - checked: d, - xfaOn: u.on, - xfaOff: u.off, - "aria-label": ariaLabel(l), - "aria-required": !1, - }, - }; - o && (m.attributes.name = o); - if (isRequired(l)) { - m.attributes["aria-required"] = !0; - m.attributes.required = !0; - } - return c.HTMLResult.success({ - name: "label", - attributes: { class: ["xfaLabel"] }, - children: [m], - }); - } - } - class ChoiceList extends o.XFAObject { - constructor(e) { - super(f, "choiceList", !0); - this.commitOn = (0, c.getStringOption)(e.commitOn, [ - "select", - "exit", - ]); - this.id = e.id || ""; - this.open = (0, c.getStringOption)(e.open, [ - "userControl", - "always", - "multiSelect", - "onEntry", - ]); - this.textEntry = (0, c.getInteger)({ - data: e.textEntry, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.border = null; - this.extras = null; - this.margin = null; - } - [r.$toHTML](e) { - const t = (0, s.toStyle)(this, "border", "margin"), - a = this[r.$getParent]()[r.$getParent](), - n = { - fontSize: `calc(${a.font?.size || 10}px * var(--scale-factor))`, - }, - i = []; - if (a.items.children.length > 0) { - const e = a.items; - let t = 0, - s = 0; - if (2 === e.children.length) { - t = e.children[0].save; - s = 1 - t; - } - const o = e.children[t][r.$toHTML]().html, - c = e.children[s][r.$toHTML]().html; - let l = !1; - const h = a.value?.[r.$text]() || ""; - for (let e = 0, t = o.length; e < t; e++) { - const t = { - name: "option", - attributes: { value: c[e] || o[e], style: n }, - value: o[e], - }; - c[e] === h && (t.attributes.selected = l = !0); - i.push(t); - } - l || - i.splice(0, 0, { - name: "option", - attributes: { hidden: !0, selected: !0 }, - value: " ", - }); - } - const o = { - class: ["xfaSelect"], - fieldId: a[r.$uid], - dataId: a[r.$data]?.[r.$uid] || a[r.$uid], - style: t, - "aria-label": ariaLabel(a), - "aria-required": !1, - }; - if (isRequired(a)) { - o["aria-required"] = !0; - o.required = !0; - } - "multiSelect" === this.open && (o.multiple = !0); - return c.HTMLResult.success({ - name: "label", - attributes: { class: ["xfaLabel"] }, - children: [{ name: "select", children: i, attributes: o }], - }); - } - } - class Color extends o.XFAObject { - constructor(e) { - super(f, "color", !0); - this.cSpace = (0, c.getStringOption)(e.cSpace, ["SRGB"]); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.value = e.value ? (0, c.getColor)(e.value) : ""; - this.extras = null; - } - [r.$hasSettableValue]() { - return !1; - } - [r.$toStyle]() { - return this.value - ? l.Util.makeHexColor(this.value.r, this.value.g, this.value.b) - : null; - } - } - class Comb extends o.XFAObject { - constructor(e) { - super(f, "comb"); - this.id = e.id || ""; - this.numberOfCells = (0, c.getInteger)({ - data: e.numberOfCells, - defaultValue: 0, - validate: (e) => e >= 0, - }); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class Connect extends o.XFAObject { - constructor(e) { - super(f, "connect", !0); - this.connection = e.connection || ""; - this.id = e.id || ""; - this.ref = e.ref || ""; - this.usage = (0, c.getStringOption)(e.usage, [ - "exportAndImport", - "exportOnly", - "importOnly", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.picture = null; - } - } - class ContentArea extends o.XFAObject { - constructor(e) { - super(f, "contentArea", !0); - this.h = (0, c.getMeasurement)(e.h); - this.id = e.id || ""; - this.name = e.name || ""; - this.relevant = (0, c.getRelevant)(e.relevant); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.w = (0, c.getMeasurement)(e.w); - this.x = (0, c.getMeasurement)(e.x, "0pt"); - this.y = (0, c.getMeasurement)(e.y, "0pt"); - this.desc = null; - this.extras = null; - } - [r.$toHTML](e) { - const t = { - left: (0, s.measureToString)(this.x), - top: (0, s.measureToString)(this.y), - width: (0, s.measureToString)(this.w), - height: (0, s.measureToString)(this.h), - }, - a = ["xfaContentarea"]; - (0, s.isPrintOnly)(this) && a.push("xfaPrintOnly"); - return c.HTMLResult.success({ - name: "div", - children: [], - attributes: { style: t, class: a, id: this[r.$uid] }, - }); - } - } - class Corner extends o.XFAObject { - constructor(e) { - super(f, "corner", !0); - this.id = e.id || ""; - this.inverted = (0, c.getInteger)({ - data: e.inverted, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.join = (0, c.getStringOption)(e.join, ["square", "round"]); - this.presence = (0, c.getStringOption)(e.presence, [ - "visible", - "hidden", - "inactive", - "invisible", - ]); - this.radius = (0, c.getMeasurement)(e.radius); - this.stroke = (0, c.getStringOption)(e.stroke, [ - "solid", - "dashDot", - "dashDotDot", - "dashed", - "dotted", - "embossed", - "etched", - "lowered", - "raised", - ]); - this.thickness = (0, c.getMeasurement)(e.thickness, "0.5pt"); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.color = null; - this.extras = null; - } - [r.$toStyle]() { - const e = (0, s.toStyle)(this, "visibility"); - e.radius = (0, s.measureToString)( - "square" === this.join ? 0 : this.radius, - ); - return e; - } - } - class DateElement extends o.ContentObject { - constructor(e) { - super(f, "date"); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - [r.$finalize]() { - const e = this[r.$content].trim(); - this[r.$content] = e ? new Date(e) : null; - } - [r.$toHTML](e) { - return valueToHtml( - this[r.$content] ? this[r.$content].toString() : "", - ); - } - } - class DateTime extends o.ContentObject { - constructor(e) { - super(f, "dateTime"); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - [r.$finalize]() { - const e = this[r.$content].trim(); - this[r.$content] = e ? new Date(e) : null; - } - [r.$toHTML](e) { - return valueToHtml( - this[r.$content] ? this[r.$content].toString() : "", - ); - } - } - class DateTimeEdit extends o.XFAObject { - constructor(e) { - super(f, "dateTimeEdit", !0); - this.hScrollPolicy = (0, c.getStringOption)(e.hScrollPolicy, [ - "auto", - "off", - "on", - ]); - this.id = e.id || ""; - this.picker = (0, c.getStringOption)(e.picker, ["host", "none"]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.border = null; - this.comb = null; - this.extras = null; - this.margin = null; - } - [r.$toHTML](e) { - const t = (0, s.toStyle)(this, "border", "font", "margin"), - a = this[r.$getParent]()[r.$getParent](), - n = { - name: "input", - attributes: { - type: "text", - fieldId: a[r.$uid], - dataId: a[r.$data]?.[r.$uid] || a[r.$uid], - class: ["xfaTextfield"], - style: t, - "aria-label": ariaLabel(a), - "aria-required": !1, - }, - }; - if (isRequired(a)) { - n.attributes["aria-required"] = !0; - n.attributes.required = !0; - } - return c.HTMLResult.success({ - name: "label", - attributes: { class: ["xfaLabel"] }, - children: [n], - }); - } - } - class Decimal extends o.ContentObject { - constructor(e) { - super(f, "decimal"); - this.fracDigits = (0, c.getInteger)({ - data: e.fracDigits, - defaultValue: 2, - validate: (e) => !0, - }); - this.id = e.id || ""; - this.leadDigits = (0, c.getInteger)({ - data: e.leadDigits, - defaultValue: -1, - validate: (e) => !0, - }); - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - [r.$finalize]() { - const e = parseFloat(this[r.$content].trim()); - this[r.$content] = isNaN(e) ? null : e; - } - [r.$toHTML](e) { - return valueToHtml( - null !== this[r.$content] ? this[r.$content].toString() : "", - ); - } - } - class DefaultUi extends o.XFAObject { - constructor(e) { - super(f, "defaultUi", !0); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - } - } - class Desc extends o.XFAObject { - constructor(e) { - super(f, "desc", !0); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.boolean = new o.XFAObjectArray(); - this.date = new o.XFAObjectArray(); - this.dateTime = new o.XFAObjectArray(); - this.decimal = new o.XFAObjectArray(); - this.exData = new o.XFAObjectArray(); - this.float = new o.XFAObjectArray(); - this.image = new o.XFAObjectArray(); - this.integer = new o.XFAObjectArray(); - this.text = new o.XFAObjectArray(); - this.time = new o.XFAObjectArray(); - } - } - class DigestMethod extends o.OptionObject { - constructor(e) { - super(f, "digestMethod", [ - "", - "SHA1", - "SHA256", - "SHA512", - "RIPEMD160", - ]); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class DigestMethods extends o.XFAObject { - constructor(e) { - super(f, "digestMethods", !0); - this.id = e.id || ""; - this.type = (0, c.getStringOption)(e.type, [ - "optional", - "required", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.digestMethod = new o.XFAObjectArray(); - } - } - class Draw extends o.XFAObject { - constructor(e) { - super(f, "draw", !0); - this.anchorType = (0, c.getStringOption)(e.anchorType, [ - "topLeft", - "bottomCenter", - "bottomLeft", - "bottomRight", - "middleCenter", - "middleLeft", - "middleRight", - "topCenter", - "topRight", - ]); - this.colSpan = (0, c.getInteger)({ - data: e.colSpan, - defaultValue: 1, - validate: (e) => e >= 1 || -1 === e, - }); - this.h = e.h ? (0, c.getMeasurement)(e.h) : ""; - this.hAlign = (0, c.getStringOption)(e.hAlign, [ - "left", - "center", - "justify", - "justifyAll", - "radix", - "right", - ]); - this.id = e.id || ""; - this.locale = e.locale || ""; - this.maxH = (0, c.getMeasurement)(e.maxH, "0pt"); - this.maxW = (0, c.getMeasurement)(e.maxW, "0pt"); - this.minH = (0, c.getMeasurement)(e.minH, "0pt"); - this.minW = (0, c.getMeasurement)(e.minW, "0pt"); - this.name = e.name || ""; - this.presence = (0, c.getStringOption)(e.presence, [ - "visible", - "hidden", - "inactive", - "invisible", - ]); - this.relevant = (0, c.getRelevant)(e.relevant); - this.rotate = (0, c.getInteger)({ - data: e.rotate, - defaultValue: 0, - validate: (e) => e % 90 == 0, - }); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.w = e.w ? (0, c.getMeasurement)(e.w) : ""; - this.x = (0, c.getMeasurement)(e.x, "0pt"); - this.y = (0, c.getMeasurement)(e.y, "0pt"); - this.assist = null; - this.border = null; - this.caption = null; - this.desc = null; - this.extras = null; - this.font = null; - this.keep = null; - this.margin = null; - this.para = null; - this.traversal = null; - this.ui = null; - this.value = null; - this.setProperty = new o.XFAObjectArray(); - } - [r.$setValue](e) { - _setValue(this, e); - } - [r.$toHTML](e) { - setTabIndex(this); - if ("hidden" === this.presence || "inactive" === this.presence) - return c.HTMLResult.EMPTY; - (0, s.fixDimensions)(this); - this[r.$pushPara](); - const t = this.w, - a = this.h, - { w: n, h: o, isBroken: l } = (0, s.layoutNode)(this, e); - if (n && "" === this.w) { - if (l && this[r.$getSubformParent]()[r.$isThereMoreWidth]()) { - this[r.$popPara](); - return c.HTMLResult.FAILURE; - } - this.w = n; - } - o && "" === this.h && (this.h = o); - setFirstUnsplittable(this); - if (!(0, i.checkDimensions)(this, e)) { - this.w = t; - this.h = a; - this[r.$popPara](); - return c.HTMLResult.FAILURE; - } - unsetFirstUnsplittable(this); - const h = (0, s.toStyle)( - this, - "font", - "hAlign", - "dimensions", - "position", - "presence", - "rotate", - "anchorType", - "border", - "margin", - ); - (0, s.setMinMaxDimensions)(this, h); - if (h.margin) { - h.padding = h.margin; - delete h.margin; - } - const u = ["xfaDraw"]; - this.font && u.push("xfaFont"); - (0, s.isPrintOnly)(this) && u.push("xfaPrintOnly"); - const d = { style: h, id: this[r.$uid], class: u }; - this.name && (d.xfaName = this.name); - const f = { name: "div", attributes: d, children: [] }; - applyAssist(this, d); - const g = (0, s.computeBbox)(this, f, e), - p = this.value ? this.value[r.$toHTML](e).html : null; - if (null === p) { - this.w = t; - this.h = a; - this[r.$popPara](); - return c.HTMLResult.success((0, s.createWrapper)(this, f), g); - } - f.children.push(p); - (0, s.setPara)(this, h, p); - this.w = t; - this.h = a; - this[r.$popPara](); - return c.HTMLResult.success((0, s.createWrapper)(this, f), g); - } - } - class Edge extends o.XFAObject { - constructor(e) { - super(f, "edge", !0); - this.cap = (0, c.getStringOption)(e.cap, [ - "square", - "butt", - "round", - ]); - this.id = e.id || ""; - this.presence = (0, c.getStringOption)(e.presence, [ - "visible", - "hidden", - "inactive", - "invisible", - ]); - this.stroke = (0, c.getStringOption)(e.stroke, [ - "solid", - "dashDot", - "dashDotDot", - "dashed", - "dotted", - "embossed", - "etched", - "lowered", - "raised", - ]); - this.thickness = (0, c.getMeasurement)(e.thickness, "0.5pt"); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.color = null; - this.extras = null; - } - [r.$toStyle]() { - const e = (0, s.toStyle)(this, "visibility"); - Object.assign(e, { - linecap: this.cap, - width: (0, s.measureToString)(this.thickness), - color: this.color ? this.color[r.$toStyle]() : "#000000", - style: "", - }); - if ("visible" !== this.presence) e.style = "none"; - else - switch (this.stroke) { - case "solid": - e.style = "solid"; - break; - case "dashDot": - case "dashDotDot": - case "dashed": - e.style = "dashed"; - break; - case "dotted": - e.style = "dotted"; - break; - case "embossed": - e.style = "ridge"; - break; - case "etched": - e.style = "groove"; - break; - case "lowered": - e.style = "inset"; - break; - case "raised": - e.style = "outset"; - } - return e; - } - } - class Encoding extends o.OptionObject { - constructor(e) { - super(f, "encoding", [ - "adbe.x509.rsa_sha1", - "adbe.pkcs7.detached", - "adbe.pkcs7.sha1", - ]); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class Encodings extends o.XFAObject { - constructor(e) { - super(f, "encodings", !0); - this.id = e.id || ""; - this.type = (0, c.getStringOption)(e.type, [ - "optional", - "required", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.encoding = new o.XFAObjectArray(); - } - } - class Encrypt extends o.XFAObject { - constructor(e) { - super(f, "encrypt", !0); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.certificate = null; - } - } - class EncryptData extends o.XFAObject { - constructor(e) { - super(f, "encryptData", !0); - this.id = e.id || ""; - this.operation = (0, c.getStringOption)(e.operation, [ - "encrypt", - "decrypt", - ]); - this.target = e.target || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.filter = null; - this.manifest = null; - } - } - class Encryption extends o.XFAObject { - constructor(e) { - super(f, "encryption", !0); - this.id = e.id || ""; - this.type = (0, c.getStringOption)(e.type, [ - "optional", - "required", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.certificate = new o.XFAObjectArray(); - } - } - class EncryptionMethod extends o.OptionObject { - constructor(e) { - super(f, "encryptionMethod", [ - "", - "AES256-CBC", - "TRIPLEDES-CBC", - "AES128-CBC", - "AES192-CBC", - ]); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class EncryptionMethods extends o.XFAObject { - constructor(e) { - super(f, "encryptionMethods", !0); - this.id = e.id || ""; - this.type = (0, c.getStringOption)(e.type, [ - "optional", - "required", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.encryptionMethod = new o.XFAObjectArray(); - } - } - class Event extends o.XFAObject { - constructor(e) { - super(f, "event", !0); - this.activity = (0, c.getStringOption)(e.activity, [ - "click", - "change", - "docClose", - "docReady", - "enter", - "exit", - "full", - "indexChange", - "initialize", - "mouseDown", - "mouseEnter", - "mouseExit", - "mouseUp", - "postExecute", - "postOpen", - "postPrint", - "postSave", - "postSign", - "postSubmit", - "preExecute", - "preOpen", - "prePrint", - "preSave", - "preSign", - "preSubmit", - "ready", - "validationState", - ]); - this.id = e.id || ""; - this.listen = (0, c.getStringOption)(e.listen, [ - "refOnly", - "refAndDescendents", - ]); - this.name = e.name || ""; - this.ref = e.ref || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - this.encryptData = null; - this.execute = null; - this.script = null; - this.signData = null; - this.submit = null; - } - } - class ExData extends o.ContentObject { - constructor(e) { - super(f, "exData"); - this.contentType = e.contentType || ""; - this.href = e.href || ""; - this.id = e.id || ""; - this.maxLength = (0, c.getInteger)({ - data: e.maxLength, - defaultValue: -1, - validate: (e) => e >= -1, - }); - this.name = e.name || ""; - this.rid = e.rid || ""; - this.transferEncoding = (0, c.getStringOption)( - e.transferEncoding, - ["none", "base64", "package"], - ); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - [r.$isCDATAXml]() { - return "text/html" === this.contentType; - } - [r.$onChild](e) { - if ( - "text/html" === this.contentType && - e[r.$namespaceId] === n.NamespaceIds.xhtml.id - ) { - this[r.$content] = e; - return !0; - } - if ("text/xml" === this.contentType) { - this[r.$content] = e; - return !0; - } - return !1; - } - [r.$toHTML](e) { - return "text/html" === this.contentType && this[r.$content] - ? this[r.$content][r.$toHTML](e) - : c.HTMLResult.EMPTY; - } - } - class ExObject extends o.XFAObject { - constructor(e) { - super(f, "exObject", !0); - this.archive = e.archive || ""; - this.classId = e.classId || ""; - this.codeBase = e.codeBase || ""; - this.codeType = e.codeType || ""; - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - this.boolean = new o.XFAObjectArray(); - this.date = new o.XFAObjectArray(); - this.dateTime = new o.XFAObjectArray(); - this.decimal = new o.XFAObjectArray(); - this.exData = new o.XFAObjectArray(); - this.exObject = new o.XFAObjectArray(); - this.float = new o.XFAObjectArray(); - this.image = new o.XFAObjectArray(); - this.integer = new o.XFAObjectArray(); - this.text = new o.XFAObjectArray(); - this.time = new o.XFAObjectArray(); - } - } - class ExclGroup extends o.XFAObject { - constructor(e) { - super(f, "exclGroup", !0); - this.access = (0, c.getStringOption)(e.access, [ - "open", - "nonInteractive", - "protected", - "readOnly", - ]); - this.accessKey = e.accessKey || ""; - this.anchorType = (0, c.getStringOption)(e.anchorType, [ - "topLeft", - "bottomCenter", - "bottomLeft", - "bottomRight", - "middleCenter", - "middleLeft", - "middleRight", - "topCenter", - "topRight", - ]); - this.colSpan = (0, c.getInteger)({ - data: e.colSpan, - defaultValue: 1, - validate: (e) => e >= 1 || -1 === e, - }); - this.h = e.h ? (0, c.getMeasurement)(e.h) : ""; - this.hAlign = (0, c.getStringOption)(e.hAlign, [ - "left", - "center", - "justify", - "justifyAll", - "radix", - "right", - ]); - this.id = e.id || ""; - this.layout = (0, c.getStringOption)(e.layout, [ - "position", - "lr-tb", - "rl-row", - "rl-tb", - "row", - "table", - "tb", - ]); - this.maxH = (0, c.getMeasurement)(e.maxH, "0pt"); - this.maxW = (0, c.getMeasurement)(e.maxW, "0pt"); - this.minH = (0, c.getMeasurement)(e.minH, "0pt"); - this.minW = (0, c.getMeasurement)(e.minW, "0pt"); - this.name = e.name || ""; - this.presence = (0, c.getStringOption)(e.presence, [ - "visible", - "hidden", - "inactive", - "invisible", - ]); - this.relevant = (0, c.getRelevant)(e.relevant); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.w = e.w ? (0, c.getMeasurement)(e.w) : ""; - this.x = (0, c.getMeasurement)(e.x, "0pt"); - this.y = (0, c.getMeasurement)(e.y, "0pt"); - this.assist = null; - this.bind = null; - this.border = null; - this.calculate = null; - this.caption = null; - this.desc = null; - this.extras = null; - this.margin = null; - this.para = null; - this.traversal = null; - this.validate = null; - this.connect = new o.XFAObjectArray(); - this.event = new o.XFAObjectArray(); - this.field = new o.XFAObjectArray(); - this.setProperty = new o.XFAObjectArray(); - } - [r.$isBindable]() { - return !0; - } - [r.$hasSettableValue]() { - return !0; - } - [r.$setValue](e) { - for (const t of this.field.children) { - if (!t.value) { - const e = new Value({}); - t[r.$appendChild](e); - t.value = e; - } - t.value[r.$setValue](e); - } - } - [r.$isThereMoreWidth]() { - return ( - (this.layout.endsWith("-tb") && - 0 === this[r.$extra].attempt && - this[r.$extra].numberInLine > 0) || - this[r.$getParent]()[r.$isThereMoreWidth]() - ); - } - [r.$isSplittable]() { - const e = this[r.$getSubformParent](); - if (!e[r.$isSplittable]()) return !1; - if (void 0 !== this[r.$extra]._isSplittable) - return this[r.$extra]._isSplittable; - if ("position" === this.layout || this.layout.includes("row")) { - this[r.$extra]._isSplittable = !1; - return !1; - } - if (e.layout?.endsWith("-tb") && 0 !== e[r.$extra].numberInLine) - return !1; - this[r.$extra]._isSplittable = !0; - return !0; - } - [r.$flushHTML]() { - return (0, i.flushHTML)(this); - } - [r.$addHTML](e, t) { - (0, i.addHTML)(this, e, t); - } - [r.$getAvailableSpace]() { - return (0, i.getAvailableSpace)(this); - } - [r.$toHTML](e) { - setTabIndex(this); - if ( - "hidden" === this.presence || - "inactive" === this.presence || - 0 === this.h || - 0 === this.w - ) - return c.HTMLResult.EMPTY; - (0, s.fixDimensions)(this); - const t = [], - a = { id: this[r.$uid], class: [] }; - (0, s.setAccess)(this, a.class); - this[r.$extra] || (this[r.$extra] = Object.create(null)); - Object.assign(this[r.$extra], { - children: t, - attributes: a, - attempt: 0, - line: null, - numberInLine: 0, - availableSpace: { - width: Math.min(this.w || 1 / 0, e.width), - height: Math.min(this.h || 1 / 0, e.height), - }, - width: 0, - height: 0, - prevHeight: 0, - currentWidth: 0, - }); - const n = this[r.$isSplittable](); - n || setFirstUnsplittable(this); - if (!(0, i.checkDimensions)(this, e)) return c.HTMLResult.FAILURE; - const o = new Set(["field"]); - if (this.layout.includes("row")) { - const e = this[r.$getSubformParent]().columnWidths; - if (Array.isArray(e) && e.length > 0) { - this[r.$extra].columnWidths = e; - this[r.$extra].currentColumn = 0; - } - } - const l = (0, s.toStyle)( - this, - "anchorType", - "dimensions", - "position", - "presence", - "border", - "margin", - "hAlign", - ), - h = ["xfaExclgroup"], - u = (0, s.layoutClass)(this); - u && h.push(u); - (0, s.isPrintOnly)(this) && h.push("xfaPrintOnly"); - a.style = l; - a.class = h; - this.name && (a.xfaName = this.name); - this[r.$pushPara](); - const d = "lr-tb" === this.layout || "rl-tb" === this.layout, - f = d ? 2 : 1; - for (; this[r.$extra].attempt < f; this[r.$extra].attempt++) { - d && - 1 === this[r.$extra].attempt && - (this[r.$extra].numberInLine = 0); - const e = this[r.$childrenToHTML]({ filter: o, include: !0 }); - if (e.success) break; - if (e.isBreak()) { - this[r.$popPara](); - return e; - } - if ( - d && - 0 === this[r.$extra].attempt && - 0 === this[r.$extra].numberInLine && - !this[r.$getTemplateRoot]()[r.$extra].noLayoutFailure - ) { - this[r.$extra].attempt = f; - break; - } - } - this[r.$popPara](); - n || unsetFirstUnsplittable(this); - if (this[r.$extra].attempt === f) { - n || delete this[r.$extra]; - return c.HTMLResult.FAILURE; - } - let g = 0, - p = 0; - if (this.margin) { - g = this.margin.leftInset + this.margin.rightInset; - p = this.margin.topInset + this.margin.bottomInset; - } - const m = Math.max(this[r.$extra].width + g, this.w || 0), - b = Math.max(this[r.$extra].height + p, this.h || 0), - y = [this.x, this.y, m, b]; - "" === this.w && (l.width = (0, s.measureToString)(m)); - "" === this.h && (l.height = (0, s.measureToString)(b)); - const w = { name: "div", attributes: a, children: t }; - applyAssist(this, a); - delete this[r.$extra]; - return c.HTMLResult.success((0, s.createWrapper)(this, w), y); - } - } - class Execute extends o.XFAObject { - constructor(e) { - super(f, "execute"); - this.connection = e.connection || ""; - this.executeType = (0, c.getStringOption)(e.executeType, [ - "import", - "remerge", - ]); - this.id = e.id || ""; - this.runAt = (0, c.getStringOption)(e.runAt, [ - "client", - "both", - "server", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class Extras extends o.XFAObject { - constructor(e) { - super(f, "extras", !0); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.boolean = new o.XFAObjectArray(); - this.date = new o.XFAObjectArray(); - this.dateTime = new o.XFAObjectArray(); - this.decimal = new o.XFAObjectArray(); - this.exData = new o.XFAObjectArray(); - this.extras = new o.XFAObjectArray(); - this.float = new o.XFAObjectArray(); - this.image = new o.XFAObjectArray(); - this.integer = new o.XFAObjectArray(); - this.text = new o.XFAObjectArray(); - this.time = new o.XFAObjectArray(); - } - } - class Field extends o.XFAObject { - constructor(e) { - super(f, "field", !0); - this.access = (0, c.getStringOption)(e.access, [ - "open", - "nonInteractive", - "protected", - "readOnly", - ]); - this.accessKey = e.accessKey || ""; - this.anchorType = (0, c.getStringOption)(e.anchorType, [ - "topLeft", - "bottomCenter", - "bottomLeft", - "bottomRight", - "middleCenter", - "middleLeft", - "middleRight", - "topCenter", - "topRight", - ]); - this.colSpan = (0, c.getInteger)({ - data: e.colSpan, - defaultValue: 1, - validate: (e) => e >= 1 || -1 === e, - }); - this.h = e.h ? (0, c.getMeasurement)(e.h) : ""; - this.hAlign = (0, c.getStringOption)(e.hAlign, [ - "left", - "center", - "justify", - "justifyAll", - "radix", - "right", - ]); - this.id = e.id || ""; - this.locale = e.locale || ""; - this.maxH = (0, c.getMeasurement)(e.maxH, "0pt"); - this.maxW = (0, c.getMeasurement)(e.maxW, "0pt"); - this.minH = (0, c.getMeasurement)(e.minH, "0pt"); - this.minW = (0, c.getMeasurement)(e.minW, "0pt"); - this.name = e.name || ""; - this.presence = (0, c.getStringOption)(e.presence, [ - "visible", - "hidden", - "inactive", - "invisible", - ]); - this.relevant = (0, c.getRelevant)(e.relevant); - this.rotate = (0, c.getInteger)({ - data: e.rotate, - defaultValue: 0, - validate: (e) => e % 90 == 0, - }); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.w = e.w ? (0, c.getMeasurement)(e.w) : ""; - this.x = (0, c.getMeasurement)(e.x, "0pt"); - this.y = (0, c.getMeasurement)(e.y, "0pt"); - this.assist = null; - this.bind = null; - this.border = null; - this.calculate = null; - this.caption = null; - this.desc = null; - this.extras = null; - this.font = null; - this.format = null; - this.items = new o.XFAObjectArray(2); - this.keep = null; - this.margin = null; - this.para = null; - this.traversal = null; - this.ui = null; - this.validate = null; - this.value = null; - this.bindItems = new o.XFAObjectArray(); - this.connect = new o.XFAObjectArray(); - this.event = new o.XFAObjectArray(); - this.setProperty = new o.XFAObjectArray(); - } - [r.$isBindable]() { - return !0; - } - [r.$setValue](e) { - _setValue(this, e); - } - [r.$toHTML](e) { - setTabIndex(this); - if (!this.ui) { - this.ui = new Ui({}); - this.ui[r.$globalData] = this[r.$globalData]; - this[r.$appendChild](this.ui); - let e; - switch (this.items.children.length) { - case 0: - e = new TextEdit({}); - this.ui.textEdit = e; - break; - case 1: - e = new CheckButton({}); - this.ui.checkButton = e; - break; - case 2: - e = new ChoiceList({}); - this.ui.choiceList = e; - } - this.ui[r.$appendChild](e); - } - if ( - !this.ui || - "hidden" === this.presence || - "inactive" === this.presence || - 0 === this.h || - 0 === this.w - ) - return c.HTMLResult.EMPTY; - this.caption && delete this.caption[r.$extra]; - this[r.$pushPara](); - const t = this.caption ? this.caption[r.$toHTML](e).html : null, - a = this.w, - n = this.h; - let o = 0, - l = 0; - if (this.margin) { - o = this.margin.leftInset + this.margin.rightInset; - l = this.margin.topInset + this.margin.bottomInset; - } - let u = null; - if ("" === this.w || "" === this.h) { - let t = null, - a = null, - n = 0, - i = 0; - if (this.ui.checkButton) n = i = this.ui.checkButton.size; - else { - const { w: t, h: a } = (0, s.layoutNode)(this, e); - if (null !== t) { - n = t; - i = a; - } else i = (0, h.getMetrics)(this.font, !0).lineNoGap; - } - u = getBorderDims(this.ui[r.$getExtra]()); - n += u.w; - i += u.h; - if (this.caption) { - const { - w: s, - h: o, - isBroken: l, - } = this.caption[r.$getExtra](e); - if (l && this[r.$getSubformParent]()[r.$isThereMoreWidth]()) { - this[r.$popPara](); - return c.HTMLResult.FAILURE; - } - t = s; - a = o; - switch (this.caption.placement) { - case "left": - case "right": - case "inline": - t += n; - break; - case "top": - case "bottom": - a += i; - } - } else { - t = n; - a = i; - } - if (t && "" === this.w) { - t += o; - this.w = Math.min( - this.maxW <= 0 ? 1 / 0 : this.maxW, - this.minW + 1 < t ? t : this.minW, - ); - } - if (a && "" === this.h) { - a += l; - this.h = Math.min( - this.maxH <= 0 ? 1 / 0 : this.maxH, - this.minH + 1 < a ? a : this.minH, - ); - } - } - this[r.$popPara](); - (0, s.fixDimensions)(this); - setFirstUnsplittable(this); - if (!(0, i.checkDimensions)(this, e)) { - this.w = a; - this.h = n; - this[r.$popPara](); - return c.HTMLResult.FAILURE; - } - unsetFirstUnsplittable(this); - const d = (0, s.toStyle)( - this, - "font", - "dimensions", - "position", - "rotate", - "anchorType", - "presence", - "margin", - "hAlign", - ); - (0, s.setMinMaxDimensions)(this, d); - const f = ["xfaField"]; - this.font && f.push("xfaFont"); - (0, s.isPrintOnly)(this) && f.push("xfaPrintOnly"); - const g = { style: d, id: this[r.$uid], class: f }; - if (d.margin) { - d.padding = d.margin; - delete d.margin; - } - (0, s.setAccess)(this, f); - this.name && (g.xfaName = this.name); - const p = [], - m = { name: "div", attributes: g, children: p }; - applyAssist(this, g); - const b = this.border ? this.border[r.$toStyle]() : null, - y = (0, s.computeBbox)(this, m, e), - w = this.ui[r.$toHTML]().html; - if (!w) { - Object.assign(d, b); - return c.HTMLResult.success((0, s.createWrapper)(this, m), y); - } - this[r.$tabIndex] && - (w.children?.[0] - ? (w.children[0].attributes.tabindex = this[r.$tabIndex]) - : (w.attributes.tabindex = this[r.$tabIndex])); - w.attributes.style || (w.attributes.style = Object.create(null)); - let S = null; - if (this.ui.button) { - 1 === w.children.length && ([S] = w.children.splice(0, 1)); - Object.assign(w.attributes.style, b); - } else Object.assign(d, b); - p.push(w); - if (this.value) - if (this.ui.imageEdit) - w.children.push(this.value[r.$toHTML]().html); - else if (!this.ui.button) { - let e = ""; - if (this.value.exData) e = this.value.exData[r.$text](); - else if (this.value.text) e = this.value.text[r.$getExtra](); - else { - const t = this.value[r.$toHTML]().html; - null !== t && (e = t.children[0].value); - } - this.ui.textEdit && - this.value.text?.maxChars && - (w.children[0].attributes.maxLength = - this.value.text.maxChars); - if (e) { - if (this.ui.numericEdit) { - e = parseFloat(e); - e = isNaN(e) ? "" : e.toString(); - } - "textarea" === w.children[0].name - ? (w.children[0].attributes.textContent = e) - : (w.children[0].attributes.value = e); - } - } - if (!this.ui.imageEdit && w.children?.[0] && this.h) { - u = u || getBorderDims(this.ui[r.$getExtra]()); - let t = 0; - if ( - this.caption && - ["top", "bottom"].includes(this.caption.placement) - ) { - t = this.caption.reserve; - t <= 0 && (t = this.caption[r.$getExtra](e).h); - const a = this.h - t - l - u.h; - w.children[0].attributes.style.height = (0, - s.measureToString)(a); - } else w.children[0].attributes.style.height = "100%"; - } - S && w.children.push(S); - if (!t) { - w.attributes.class && w.attributes.class.push("xfaLeft"); - this.w = a; - this.h = n; - return c.HTMLResult.success((0, s.createWrapper)(this, m), y); - } - if (this.ui.button) { - d.padding && delete d.padding; - "div" === t.name && (t.name = "span"); - w.children.push(t); - return c.HTMLResult.success(m, y); - } - this.ui.checkButton && - (t.attributes.class[0] = "xfaCaptionForCheckButton"); - w.attributes.class || (w.attributes.class = []); - w.children.splice(0, 0, t); - switch (this.caption.placement) { - case "left": - case "inline": - w.attributes.class.push("xfaLeft"); - break; - case "right": - w.attributes.class.push("xfaRight"); - break; - case "top": - w.attributes.class.push("xfaTop"); - break; - case "bottom": - w.attributes.class.push("xfaBottom"); - } - this.w = a; - this.h = n; - return c.HTMLResult.success((0, s.createWrapper)(this, m), y); - } - } - t.Field = Field; - class Fill extends o.XFAObject { - constructor(e) { - super(f, "fill", !0); - this.id = e.id || ""; - this.presence = (0, c.getStringOption)(e.presence, [ - "visible", - "hidden", - "inactive", - "invisible", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.color = null; - this.extras = null; - this.linear = null; - this.pattern = null; - this.radial = null; - this.solid = null; - this.stipple = null; - } - [r.$toStyle]() { - const e = this[r.$getParent](), - t = e[r.$getParent]()[r.$getParent](), - a = Object.create(null); - let n = "color", - i = n; - if (e instanceof Border) { - n = "background-color"; - i = "background"; - t instanceof Ui && (a.backgroundColor = "white"); - } - if (e instanceof Rectangle || e instanceof Arc) { - n = i = "fill"; - a.fill = "white"; - } - for (const e of Object.getOwnPropertyNames(this)) { - if ("extras" === e || "color" === e) continue; - const t = this[e]; - if (!(t instanceof o.XFAObject)) continue; - const s = t[r.$toStyle](this.color); - s && (a[s.startsWith("#") ? n : i] = s); - return a; - } - if (this.color?.value) { - const e = this.color[r.$toStyle](); - a[e.startsWith("#") ? n : i] = e; - } - return a; - } - } - class Filter extends o.XFAObject { - constructor(e) { - super(f, "filter", !0); - this.addRevocationInfo = (0, c.getStringOption)( - e.addRevocationInfo, - ["", "required", "optional", "none"], - ); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.version = (0, c.getInteger)({ - data: this.version, - defaultValue: 5, - validate: (e) => e >= 1 && e <= 5, - }); - this.appearanceFilter = null; - this.certificates = null; - this.digestMethods = null; - this.encodings = null; - this.encryptionMethods = null; - this.handler = null; - this.lockDocument = null; - this.mdp = null; - this.reasons = null; - this.timeStamp = null; - } - } - class Float extends o.ContentObject { - constructor(e) { - super(f, "float"); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - [r.$finalize]() { - const e = parseFloat(this[r.$content].trim()); - this[r.$content] = isNaN(e) ? null : e; - } - [r.$toHTML](e) { - return valueToHtml( - null !== this[r.$content] ? this[r.$content].toString() : "", - ); - } - } - class Font extends o.XFAObject { - constructor(e) { - super(f, "font", !0); - this.baselineShift = (0, c.getMeasurement)(e.baselineShift); - this.fontHorizontalScale = (0, c.getFloat)({ - data: e.fontHorizontalScale, - defaultValue: 100, - validate: (e) => e >= 0, - }); - this.fontVerticalScale = (0, c.getFloat)({ - data: e.fontVerticalScale, - defaultValue: 100, - validate: (e) => e >= 0, - }); - this.id = e.id || ""; - this.kerningMode = (0, c.getStringOption)(e.kerningMode, [ - "none", - "pair", - ]); - this.letterSpacing = (0, c.getMeasurement)(e.letterSpacing, "0"); - this.lineThrough = (0, c.getInteger)({ - data: e.lineThrough, - defaultValue: 0, - validate: (e) => 1 === e || 2 === e, - }); - this.lineThroughPeriod = (0, c.getStringOption)( - e.lineThroughPeriod, - ["all", "word"], - ); - this.overline = (0, c.getInteger)({ - data: e.overline, - defaultValue: 0, - validate: (e) => 1 === e || 2 === e, - }); - this.overlinePeriod = (0, c.getStringOption)(e.overlinePeriod, [ - "all", - "word", - ]); - this.posture = (0, c.getStringOption)(e.posture, [ - "normal", - "italic", - ]); - this.size = (0, c.getMeasurement)(e.size, "10pt"); - this.typeface = e.typeface || "Courier"; - this.underline = (0, c.getInteger)({ - data: e.underline, - defaultValue: 0, - validate: (e) => 1 === e || 2 === e, - }); - this.underlinePeriod = (0, c.getStringOption)(e.underlinePeriod, [ - "all", - "word", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.weight = (0, c.getStringOption)(e.weight, [ - "normal", - "bold", - ]); - this.extras = null; - this.fill = null; - } - [r.$clean](e) { - super[r.$clean](e); - this[r.$globalData].usedTypefaces.add(this.typeface); - } - [r.$toStyle]() { - const e = (0, s.toStyle)(this, "fill"), - t = e.color; - if (t) - if ("#000000" === t) delete e.color; - else if (!t.startsWith("#")) { - e.background = t; - e.backgroundClip = "text"; - e.color = "transparent"; - } - this.baselineShift && - (e.verticalAlign = (0, s.measureToString)(this.baselineShift)); - e.fontKerning = "none" === this.kerningMode ? "none" : "normal"; - e.letterSpacing = (0, s.measureToString)(this.letterSpacing); - if (0 !== this.lineThrough) { - e.textDecoration = "line-through"; - 2 === this.lineThrough && (e.textDecorationStyle = "double"); - } - if (0 !== this.overline) { - e.textDecoration = "overline"; - 2 === this.overline && (e.textDecorationStyle = "double"); - } - e.fontStyle = this.posture; - e.fontSize = (0, s.measureToString)(0.99 * this.size); - (0, s.setFontFamily)( - this, - this, - this[r.$globalData].fontFinder, - e, - ); - if (0 !== this.underline) { - e.textDecoration = "underline"; - 2 === this.underline && (e.textDecorationStyle = "double"); - } - e.fontWeight = this.weight; - return e; - } - } - class Format extends o.XFAObject { - constructor(e) { - super(f, "format", !0); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - this.picture = null; - } - } - class Handler extends o.StringObject { - constructor(e) { - super(f, "handler"); - this.id = e.id || ""; - this.type = (0, c.getStringOption)(e.type, [ - "optional", - "required", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class Hyphenation extends o.XFAObject { - constructor(e) { - super(f, "hyphenation"); - this.excludeAllCaps = (0, c.getInteger)({ - data: e.excludeAllCaps, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.excludeInitialCap = (0, c.getInteger)({ - data: e.excludeInitialCap, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.hyphenate = (0, c.getInteger)({ - data: e.hyphenate, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.id = e.id || ""; - this.pushCharacterCount = (0, c.getInteger)({ - data: e.pushCharacterCount, - defaultValue: 3, - validate: (e) => e >= 0, - }); - this.remainCharacterCount = (0, c.getInteger)({ - data: e.remainCharacterCount, - defaultValue: 3, - validate: (e) => e >= 0, - }); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.wordCharacterCount = (0, c.getInteger)({ - data: e.wordCharacterCount, - defaultValue: 7, - validate: (e) => e >= 0, - }); - } - } - class Image extends o.StringObject { - constructor(e) { - super(f, "image"); - this.aspect = (0, c.getStringOption)(e.aspect, [ - "fit", - "actual", - "height", - "none", - "width", - ]); - this.contentType = e.contentType || ""; - this.href = e.href || ""; - this.id = e.id || ""; - this.name = e.name || ""; - this.transferEncoding = (0, c.getStringOption)( - e.transferEncoding, - ["base64", "none", "package"], - ); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - [r.$toHTML]() { - if (this.contentType && !m.has(this.contentType.toLowerCase())) - return c.HTMLResult.EMPTY; - let e = - this[r.$globalData].images && - this[r.$globalData].images.get(this.href); - if (!e && (this.href || !this[r.$content])) - return c.HTMLResult.EMPTY; - e || - "base64" !== this.transferEncoding || - (e = (0, l.stringToBytes)(atob(this[r.$content]))); - if (!e) return c.HTMLResult.EMPTY; - if (!this.contentType) { - for (const [t, a] of b) - if (e.length > t.length && t.every((t, a) => t === e[a])) { - this.contentType = a; - break; - } - if (!this.contentType) return c.HTMLResult.EMPTY; - } - const t = new Blob([e], { type: this.contentType }); - let a; - switch (this.aspect) { - case "fit": - case "actual": - break; - case "height": - a = { height: "100%", objectFit: "fill" }; - break; - case "none": - a = { width: "100%", height: "100%", objectFit: "fill" }; - break; - case "width": - a = { width: "100%", objectFit: "fill" }; - } - const n = this[r.$getParent](); - return c.HTMLResult.success({ - name: "img", - attributes: { - class: ["xfaImage"], - style: a, - src: URL.createObjectURL(t), - alt: n ? ariaLabel(n[r.$getParent]()) : null, - }, - }); - } - } - class ImageEdit extends o.XFAObject { - constructor(e) { - super(f, "imageEdit", !0); - this.data = (0, c.getStringOption)(e.data, ["link", "embed"]); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.border = null; - this.extras = null; - this.margin = null; - } - [r.$toHTML](e) { - return "embed" === this.data - ? c.HTMLResult.success({ - name: "div", - children: [], - attributes: {}, - }) - : c.HTMLResult.EMPTY; - } - } - class Integer extends o.ContentObject { - constructor(e) { - super(f, "integer"); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - [r.$finalize]() { - const e = parseInt(this[r.$content].trim(), 10); - this[r.$content] = isNaN(e) ? null : e; - } - [r.$toHTML](e) { - return valueToHtml( - null !== this[r.$content] ? this[r.$content].toString() : "", - ); - } - } - class Issuers extends o.XFAObject { - constructor(e) { - super(f, "issuers", !0); - this.id = e.id || ""; - this.type = (0, c.getStringOption)(e.type, [ - "optional", - "required", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.certificate = new o.XFAObjectArray(); - } - } - class Items extends o.XFAObject { - constructor(e) { - super(f, "items", !0); - this.id = e.id || ""; - this.name = e.name || ""; - this.presence = (0, c.getStringOption)(e.presence, [ - "visible", - "hidden", - "inactive", - "invisible", - ]); - this.ref = e.ref || ""; - this.save = (0, c.getInteger)({ - data: e.save, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.boolean = new o.XFAObjectArray(); - this.date = new o.XFAObjectArray(); - this.dateTime = new o.XFAObjectArray(); - this.decimal = new o.XFAObjectArray(); - this.exData = new o.XFAObjectArray(); - this.float = new o.XFAObjectArray(); - this.image = new o.XFAObjectArray(); - this.integer = new o.XFAObjectArray(); - this.text = new o.XFAObjectArray(); - this.time = new o.XFAObjectArray(); - } - [r.$toHTML]() { - const e = []; - for (const t of this[r.$getChildren]()) e.push(t[r.$text]()); - return c.HTMLResult.success(e); - } - } - t.Items = Items; - class Keep extends o.XFAObject { - constructor(e) { - super(f, "keep", !0); - this.id = e.id || ""; - const t = ["none", "contentArea", "pageArea"]; - this.intact = (0, c.getStringOption)(e.intact, t); - this.next = (0, c.getStringOption)(e.next, t); - this.previous = (0, c.getStringOption)(e.previous, t); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - } - } - class KeyUsage extends o.XFAObject { - constructor(e) { - super(f, "keyUsage"); - const t = ["", "yes", "no"]; - this.crlSign = (0, c.getStringOption)(e.crlSign, t); - this.dataEncipherment = (0, c.getStringOption)( - e.dataEncipherment, - t, - ); - this.decipherOnly = (0, c.getStringOption)(e.decipherOnly, t); - this.digitalSignature = (0, c.getStringOption)( - e.digitalSignature, - t, - ); - this.encipherOnly = (0, c.getStringOption)(e.encipherOnly, t); - this.id = e.id || ""; - this.keyAgreement = (0, c.getStringOption)(e.keyAgreement, t); - this.keyCertSign = (0, c.getStringOption)(e.keyCertSign, t); - this.keyEncipherment = (0, c.getStringOption)( - e.keyEncipherment, - t, - ); - this.nonRepudiation = (0, c.getStringOption)(e.nonRepudiation, t); - this.type = (0, c.getStringOption)(e.type, [ - "optional", - "required", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class Line extends o.XFAObject { - constructor(e) { - super(f, "line", !0); - this.hand = (0, c.getStringOption)(e.hand, [ - "even", - "left", - "right", - ]); - this.id = e.id || ""; - this.slope = (0, c.getStringOption)(e.slope, ["\\", "/"]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.edge = null; - } - [r.$toHTML]() { - const e = this[r.$getParent]()[r.$getParent](), - t = this.edge || new Edge({}), - a = t[r.$toStyle](), - n = Object.create(null), - i = "visible" === t.presence ? t.thickness : 0; - n.strokeWidth = (0, s.measureToString)(i); - n.stroke = a.color; - let o, - l, - h, - u, - d = "100%", - f = "100%"; - if (e.w <= i) { - [o, l, h, u] = ["50%", 0, "50%", "100%"]; - d = n.strokeWidth; - } else if (e.h <= i) { - [o, l, h, u] = [0, "50%", "100%", "50%"]; - f = n.strokeWidth; - } else - "\\" === this.slope - ? ([o, l, h, u] = [0, 0, "100%", "100%"]) - : ([o, l, h, u] = [0, "100%", "100%", 0]); - const p = { - name: "svg", - children: [ - { - name: "line", - attributes: { - xmlns: g, - x1: o, - y1: l, - x2: h, - y2: u, - style: n, - }, - }, - ], - attributes: { - xmlns: g, - width: d, - height: f, - style: { overflow: "visible" }, - }, - }; - if (hasMargin(e)) - return c.HTMLResult.success({ - name: "div", - attributes: { - style: { display: "inline", width: "100%", height: "100%" }, - }, - children: [p], - }); - p.attributes.style.position = "absolute"; - return c.HTMLResult.success(p); - } - } - class Linear extends o.XFAObject { - constructor(e) { - super(f, "linear", !0); - this.id = e.id || ""; - this.type = (0, c.getStringOption)(e.type, [ - "toRight", - "toBottom", - "toLeft", - "toTop", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.color = null; - this.extras = null; - } - [r.$toStyle](e) { - e = e ? e[r.$toStyle]() : "#FFFFFF"; - return `linear-gradient(${this.type.replace(/([RBLT])/, " $1").toLowerCase()}, ${e}, ${this.color ? this.color[r.$toStyle]() : "#000000"})`; - } - } - class LockDocument extends o.ContentObject { - constructor(e) { - super(f, "lockDocument"); - this.id = e.id || ""; - this.type = (0, c.getStringOption)(e.type, [ - "optional", - "required", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - [r.$finalize]() { - this[r.$content] = (0, c.getStringOption)(this[r.$content], [ - "auto", - "0", - "1", - ]); - } - } - class Manifest extends o.XFAObject { - constructor(e) { - super(f, "manifest", !0); - this.action = (0, c.getStringOption)(e.action, [ - "include", - "all", - "exclude", - ]); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - this.ref = new o.XFAObjectArray(); - } - } - class Margin extends o.XFAObject { - constructor(e) { - super(f, "margin", !0); - this.bottomInset = (0, c.getMeasurement)(e.bottomInset, "0"); - this.id = e.id || ""; - this.leftInset = (0, c.getMeasurement)(e.leftInset, "0"); - this.rightInset = (0, c.getMeasurement)(e.rightInset, "0"); - this.topInset = (0, c.getMeasurement)(e.topInset, "0"); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - } - [r.$toStyle]() { - return { - margin: - (0, s.measureToString)(this.topInset) + - " " + - (0, s.measureToString)(this.rightInset) + - " " + - (0, s.measureToString)(this.bottomInset) + - " " + - (0, s.measureToString)(this.leftInset), - }; - } - } - class Mdp extends o.XFAObject { - constructor(e) { - super(f, "mdp"); - this.id = e.id || ""; - this.permissions = (0, c.getInteger)({ - data: e.permissions, - defaultValue: 2, - validate: (e) => 1 === e || 3 === e, - }); - this.signatureType = (0, c.getStringOption)(e.signatureType, [ - "filler", - "author", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class Medium extends o.XFAObject { - constructor(e) { - super(f, "medium"); - this.id = e.id || ""; - this.imagingBBox = (0, c.getBBox)(e.imagingBBox); - this.long = (0, c.getMeasurement)(e.long); - this.orientation = (0, c.getStringOption)(e.orientation, [ - "portrait", - "landscape", - ]); - this.short = (0, c.getMeasurement)(e.short); - this.stock = e.stock || ""; - this.trayIn = (0, c.getStringOption)(e.trayIn, [ - "auto", - "delegate", - "pageFront", - ]); - this.trayOut = (0, c.getStringOption)(e.trayOut, [ - "auto", - "delegate", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class Message extends o.XFAObject { - constructor(e) { - super(f, "message", !0); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.text = new o.XFAObjectArray(); - } - } - class NumericEdit extends o.XFAObject { - constructor(e) { - super(f, "numericEdit", !0); - this.hScrollPolicy = (0, c.getStringOption)(e.hScrollPolicy, [ - "auto", - "off", - "on", - ]); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.border = null; - this.comb = null; - this.extras = null; - this.margin = null; - } - [r.$toHTML](e) { - const t = (0, s.toStyle)(this, "border", "font", "margin"), - a = this[r.$getParent]()[r.$getParent](), - n = { - name: "input", - attributes: { - type: "text", - fieldId: a[r.$uid], - dataId: a[r.$data]?.[r.$uid] || a[r.$uid], - class: ["xfaTextfield"], - style: t, - "aria-label": ariaLabel(a), - "aria-required": !1, - }, - }; - if (isRequired(a)) { - n.attributes["aria-required"] = !0; - n.attributes.required = !0; - } - return c.HTMLResult.success({ - name: "label", - attributes: { class: ["xfaLabel"] }, - children: [n], - }); - } - } - class Occur extends o.XFAObject { - constructor(e) { - super(f, "occur", !0); - this.id = e.id || ""; - this.initial = - "" !== e.initial - ? (0, c.getInteger)({ - data: e.initial, - defaultValue: "", - validate: (e) => !0, - }) - : ""; - this.max = - "" !== e.max - ? (0, c.getInteger)({ - data: e.max, - defaultValue: 1, - validate: (e) => !0, - }) - : ""; - this.min = - "" !== e.min - ? (0, c.getInteger)({ - data: e.min, - defaultValue: 1, - validate: (e) => !0, - }) - : ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - } - [r.$clean]() { - const e = this[r.$getParent](), - t = this.min; - "" === this.min && - (this.min = - e instanceof PageArea || e instanceof PageSet ? 0 : 1); - "" === this.max && - (this.max = - "" === t - ? e instanceof PageArea || e instanceof PageSet - ? -1 - : 1 - : this.min); - -1 !== this.max && this.max < this.min && (this.max = this.min); - "" === this.initial && - (this.initial = e instanceof Template ? 1 : this.min); - } - } - class Oid extends o.StringObject { - constructor(e) { - super(f, "oid"); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class Oids extends o.XFAObject { - constructor(e) { - super(f, "oids", !0); - this.id = e.id || ""; - this.type = (0, c.getStringOption)(e.type, [ - "optional", - "required", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.oid = new o.XFAObjectArray(); - } - } - class Overflow extends o.XFAObject { - constructor(e) { - super(f, "overflow"); - this.id = e.id || ""; - this.leader = e.leader || ""; - this.target = e.target || ""; - this.trailer = e.trailer || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - [r.$getExtra]() { - if (!this[r.$extra]) { - const e = this[r.$getParent](), - t = this[r.$getTemplateRoot](), - a = t[r.$searchNode](this.target, e), - n = t[r.$searchNode](this.leader, e), - i = t[r.$searchNode](this.trailer, e); - this[r.$extra] = { - target: a?.[0] || null, - leader: n?.[0] || null, - trailer: i?.[0] || null, - addLeader: !1, - addTrailer: !1, - }; - } - return this[r.$extra]; - } - } - class PageArea extends o.XFAObject { - constructor(e) { - super(f, "pageArea", !0); - this.blankOrNotBlank = (0, c.getStringOption)(e.blankOrNotBlank, [ - "any", - "blank", - "notBlank", - ]); - this.id = e.id || ""; - this.initialNumber = (0, c.getInteger)({ - data: e.initialNumber, - defaultValue: 1, - validate: (e) => !0, - }); - this.name = e.name || ""; - this.numbered = (0, c.getInteger)({ - data: e.numbered, - defaultValue: 1, - validate: (e) => !0, - }); - this.oddOrEven = (0, c.getStringOption)(e.oddOrEven, [ - "any", - "even", - "odd", - ]); - this.pagePosition = (0, c.getStringOption)(e.pagePosition, [ - "any", - "first", - "last", - "only", - "rest", - ]); - this.relevant = (0, c.getRelevant)(e.relevant); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.desc = null; - this.extras = null; - this.medium = null; - this.occur = null; - this.area = new o.XFAObjectArray(); - this.contentArea = new o.XFAObjectArray(); - this.draw = new o.XFAObjectArray(); - this.exclGroup = new o.XFAObjectArray(); - this.field = new o.XFAObjectArray(); - this.subform = new o.XFAObjectArray(); - } - [r.$isUsable]() { - if (!this[r.$extra]) { - this[r.$extra] = { numberOfUse: 0 }; - return !0; - } - return ( - !this.occur || - -1 === this.occur.max || - this[r.$extra].numberOfUse < this.occur.max - ); - } - [r.$cleanPage]() { - delete this[r.$extra]; - } - [r.$getNextPage]() { - this[r.$extra] || (this[r.$extra] = { numberOfUse: 0 }); - const e = this[r.$getParent](); - if ("orderedOccurrence" === e.relation && this[r.$isUsable]()) { - this[r.$extra].numberOfUse += 1; - return this; - } - return e[r.$getNextPage](); - } - [r.$getAvailableSpace]() { - return this[r.$extra].space || { width: 0, height: 0 }; - } - [r.$toHTML]() { - this[r.$extra] || (this[r.$extra] = { numberOfUse: 1 }); - const e = []; - this[r.$extra].children = e; - const t = Object.create(null); - if (this.medium && this.medium.short && this.medium.long) { - t.width = (0, s.measureToString)(this.medium.short); - t.height = (0, s.measureToString)(this.medium.long); - this[r.$extra].space = { - width: this.medium.short, - height: this.medium.long, - }; - if ("landscape" === this.medium.orientation) { - const e = t.width; - t.width = t.height; - t.height = e; - this[r.$extra].space = { - width: this.medium.long, - height: this.medium.short, - }; - } - } else - (0, l.warn)( - "XFA - No medium specified in pageArea: please file a bug.", - ); - this[r.$childrenToHTML]({ - filter: new Set(["area", "draw", "field", "subform"]), - include: !0, - }); - this[r.$childrenToHTML]({ - filter: new Set(["contentArea"]), - include: !0, - }); - return c.HTMLResult.success({ - name: "div", - children: e, - attributes: { - class: ["xfaPage"], - id: this[r.$uid], - style: t, - xfaName: this.name, - }, - }); - } - } - class PageSet extends o.XFAObject { - constructor(e) { - super(f, "pageSet", !0); - this.duplexImposition = (0, c.getStringOption)( - e.duplexImposition, - ["longEdge", "shortEdge"], - ); - this.id = e.id || ""; - this.name = e.name || ""; - this.relation = (0, c.getStringOption)(e.relation, [ - "orderedOccurrence", - "duplexPaginated", - "simplexPaginated", - ]); - this.relevant = (0, c.getRelevant)(e.relevant); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - this.occur = null; - this.pageArea = new o.XFAObjectArray(); - this.pageSet = new o.XFAObjectArray(); - } - [r.$cleanPage]() { - for (const e of this.pageArea.children) e[r.$cleanPage](); - for (const e of this.pageSet.children) e[r.$cleanPage](); - } - [r.$isUsable]() { - return ( - !this.occur || - -1 === this.occur.max || - this[r.$extra].numberOfUse < this.occur.max - ); - } - [r.$getNextPage]() { - this[r.$extra] || - (this[r.$extra] = { - numberOfUse: 1, - pageIndex: -1, - pageSetIndex: -1, - }); - if ("orderedOccurrence" === this.relation) { - if ( - this[r.$extra].pageIndex + 1 < - this.pageArea.children.length - ) { - this[r.$extra].pageIndex += 1; - return this.pageArea.children[this[r.$extra].pageIndex][ - r.$getNextPage - ](); - } - if ( - this[r.$extra].pageSetIndex + 1 < - this.pageSet.children.length - ) { - this[r.$extra].pageSetIndex += 1; - return this.pageSet.children[this[r.$extra].pageSetIndex][ - r.$getNextPage - ](); - } - if (this[r.$isUsable]()) { - this[r.$extra].numberOfUse += 1; - this[r.$extra].pageIndex = -1; - this[r.$extra].pageSetIndex = -1; - return this[r.$getNextPage](); - } - const e = this[r.$getParent](); - if (e instanceof PageSet) return e[r.$getNextPage](); - this[r.$cleanPage](); - return this[r.$getNextPage](); - } - const e = this[r.$getTemplateRoot]()[r.$extra].pageNumber, - t = e % 2 == 0 ? "even" : "odd", - a = 0 === e ? "first" : "rest"; - let n = this.pageArea.children.find( - (e) => e.oddOrEven === t && e.pagePosition === a, - ); - if (n) return n; - n = this.pageArea.children.find( - (e) => "any" === e.oddOrEven && e.pagePosition === a, - ); - if (n) return n; - n = this.pageArea.children.find( - (e) => "any" === e.oddOrEven && "any" === e.pagePosition, - ); - return n || this.pageArea.children[0]; - } - } - class Para extends o.XFAObject { - constructor(e) { - super(f, "para", !0); - this.hAlign = (0, c.getStringOption)(e.hAlign, [ - "left", - "center", - "justify", - "justifyAll", - "radix", - "right", - ]); - this.id = e.id || ""; - this.lineHeight = e.lineHeight - ? (0, c.getMeasurement)(e.lineHeight, "0pt") - : ""; - this.marginLeft = e.marginLeft - ? (0, c.getMeasurement)(e.marginLeft, "0pt") - : ""; - this.marginRight = e.marginRight - ? (0, c.getMeasurement)(e.marginRight, "0pt") - : ""; - this.orphans = (0, c.getInteger)({ - data: e.orphans, - defaultValue: 0, - validate: (e) => e >= 0, - }); - this.preserve = e.preserve || ""; - this.radixOffset = e.radixOffset - ? (0, c.getMeasurement)(e.radixOffset, "0pt") - : ""; - this.spaceAbove = e.spaceAbove - ? (0, c.getMeasurement)(e.spaceAbove, "0pt") - : ""; - this.spaceBelow = e.spaceBelow - ? (0, c.getMeasurement)(e.spaceBelow, "0pt") - : ""; - this.tabDefault = e.tabDefault - ? (0, c.getMeasurement)(this.tabDefault) - : ""; - this.tabStops = (e.tabStops || "") - .trim() - .split(/\s+/) - .map((e, t) => (t % 2 == 1 ? (0, c.getMeasurement)(e) : e)); - this.textIndent = e.textIndent - ? (0, c.getMeasurement)(e.textIndent, "0pt") - : ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.vAlign = (0, c.getStringOption)(e.vAlign, [ - "top", - "bottom", - "middle", - ]); - this.widows = (0, c.getInteger)({ - data: e.widows, - defaultValue: 0, - validate: (e) => e >= 0, - }); - this.hyphenation = null; - } - [r.$toStyle]() { - const e = (0, s.toStyle)(this, "hAlign"); - "" !== this.marginLeft && - (e.paddingLeft = (0, s.measureToString)(this.marginLeft)); - "" !== this.marginRight && - (e.paddingight = (0, s.measureToString)(this.marginRight)); - "" !== this.spaceAbove && - (e.paddingTop = (0, s.measureToString)(this.spaceAbove)); - "" !== this.spaceBelow && - (e.paddingBottom = (0, s.measureToString)(this.spaceBelow)); - if ("" !== this.textIndent) { - e.textIndent = (0, s.measureToString)(this.textIndent); - (0, s.fixTextIndent)(e); - } - this.lineHeight > 0 && - (e.lineHeight = (0, s.measureToString)(this.lineHeight)); - "" !== this.tabDefault && - (e.tabSize = (0, s.measureToString)(this.tabDefault)); - this.tabStops.length; - this.hyphenatation && - Object.assign(e, this.hyphenatation[r.$toStyle]()); - return e; - } - } - class PasswordEdit extends o.XFAObject { - constructor(e) { - super(f, "passwordEdit", !0); - this.hScrollPolicy = (0, c.getStringOption)(e.hScrollPolicy, [ - "auto", - "off", - "on", - ]); - this.id = e.id || ""; - this.passwordChar = e.passwordChar || "*"; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.border = null; - this.extras = null; - this.margin = null; - } - } - class Pattern extends o.XFAObject { - constructor(e) { - super(f, "pattern", !0); - this.id = e.id || ""; - this.type = (0, c.getStringOption)(e.type, [ - "crossHatch", - "crossDiagonal", - "diagonalLeft", - "diagonalRight", - "horizontal", - "vertical", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.color = null; - this.extras = null; - } - [r.$toStyle](e) { - e = e ? e[r.$toStyle]() : "#FFFFFF"; - const t = this.color ? this.color[r.$toStyle]() : "#000000", - a = "repeating-linear-gradient", - n = `${e},${e} 5px,${t} 5px,${t} 10px`; - switch (this.type) { - case "crossHatch": - return `${a}(to top,${n}) ${a}(to right,${n})`; - case "crossDiagonal": - return `${a}(45deg,${n}) ${a}(-45deg,${n})`; - case "diagonalLeft": - return `${a}(45deg,${n})`; - case "diagonalRight": - return `${a}(-45deg,${n})`; - case "horizontal": - return `${a}(to top,${n})`; - case "vertical": - return `${a}(to right,${n})`; - } - return ""; - } - } - class Picture extends o.StringObject { - constructor(e) { - super(f, "picture"); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class Proto extends o.XFAObject { - constructor(e) { - super(f, "proto", !0); - this.appearanceFilter = new o.XFAObjectArray(); - this.arc = new o.XFAObjectArray(); - this.area = new o.XFAObjectArray(); - this.assist = new o.XFAObjectArray(); - this.barcode = new o.XFAObjectArray(); - this.bindItems = new o.XFAObjectArray(); - this.bookend = new o.XFAObjectArray(); - this.boolean = new o.XFAObjectArray(); - this.border = new o.XFAObjectArray(); - this.break = new o.XFAObjectArray(); - this.breakAfter = new o.XFAObjectArray(); - this.breakBefore = new o.XFAObjectArray(); - this.button = new o.XFAObjectArray(); - this.calculate = new o.XFAObjectArray(); - this.caption = new o.XFAObjectArray(); - this.certificate = new o.XFAObjectArray(); - this.certificates = new o.XFAObjectArray(); - this.checkButton = new o.XFAObjectArray(); - this.choiceList = new o.XFAObjectArray(); - this.color = new o.XFAObjectArray(); - this.comb = new o.XFAObjectArray(); - this.connect = new o.XFAObjectArray(); - this.contentArea = new o.XFAObjectArray(); - this.corner = new o.XFAObjectArray(); - this.date = new o.XFAObjectArray(); - this.dateTime = new o.XFAObjectArray(); - this.dateTimeEdit = new o.XFAObjectArray(); - this.decimal = new o.XFAObjectArray(); - this.defaultUi = new o.XFAObjectArray(); - this.desc = new o.XFAObjectArray(); - this.digestMethod = new o.XFAObjectArray(); - this.digestMethods = new o.XFAObjectArray(); - this.draw = new o.XFAObjectArray(); - this.edge = new o.XFAObjectArray(); - this.encoding = new o.XFAObjectArray(); - this.encodings = new o.XFAObjectArray(); - this.encrypt = new o.XFAObjectArray(); - this.encryptData = new o.XFAObjectArray(); - this.encryption = new o.XFAObjectArray(); - this.encryptionMethod = new o.XFAObjectArray(); - this.encryptionMethods = new o.XFAObjectArray(); - this.event = new o.XFAObjectArray(); - this.exData = new o.XFAObjectArray(); - this.exObject = new o.XFAObjectArray(); - this.exclGroup = new o.XFAObjectArray(); - this.execute = new o.XFAObjectArray(); - this.extras = new o.XFAObjectArray(); - this.field = new o.XFAObjectArray(); - this.fill = new o.XFAObjectArray(); - this.filter = new o.XFAObjectArray(); - this.float = new o.XFAObjectArray(); - this.font = new o.XFAObjectArray(); - this.format = new o.XFAObjectArray(); - this.handler = new o.XFAObjectArray(); - this.hyphenation = new o.XFAObjectArray(); - this.image = new o.XFAObjectArray(); - this.imageEdit = new o.XFAObjectArray(); - this.integer = new o.XFAObjectArray(); - this.issuers = new o.XFAObjectArray(); - this.items = new o.XFAObjectArray(); - this.keep = new o.XFAObjectArray(); - this.keyUsage = new o.XFAObjectArray(); - this.line = new o.XFAObjectArray(); - this.linear = new o.XFAObjectArray(); - this.lockDocument = new o.XFAObjectArray(); - this.manifest = new o.XFAObjectArray(); - this.margin = new o.XFAObjectArray(); - this.mdp = new o.XFAObjectArray(); - this.medium = new o.XFAObjectArray(); - this.message = new o.XFAObjectArray(); - this.numericEdit = new o.XFAObjectArray(); - this.occur = new o.XFAObjectArray(); - this.oid = new o.XFAObjectArray(); - this.oids = new o.XFAObjectArray(); - this.overflow = new o.XFAObjectArray(); - this.pageArea = new o.XFAObjectArray(); - this.pageSet = new o.XFAObjectArray(); - this.para = new o.XFAObjectArray(); - this.passwordEdit = new o.XFAObjectArray(); - this.pattern = new o.XFAObjectArray(); - this.picture = new o.XFAObjectArray(); - this.radial = new o.XFAObjectArray(); - this.reason = new o.XFAObjectArray(); - this.reasons = new o.XFAObjectArray(); - this.rectangle = new o.XFAObjectArray(); - this.ref = new o.XFAObjectArray(); - this.script = new o.XFAObjectArray(); - this.setProperty = new o.XFAObjectArray(); - this.signData = new o.XFAObjectArray(); - this.signature = new o.XFAObjectArray(); - this.signing = new o.XFAObjectArray(); - this.solid = new o.XFAObjectArray(); - this.speak = new o.XFAObjectArray(); - this.stipple = new o.XFAObjectArray(); - this.subform = new o.XFAObjectArray(); - this.subformSet = new o.XFAObjectArray(); - this.subjectDN = new o.XFAObjectArray(); - this.subjectDNs = new o.XFAObjectArray(); - this.submit = new o.XFAObjectArray(); - this.text = new o.XFAObjectArray(); - this.textEdit = new o.XFAObjectArray(); - this.time = new o.XFAObjectArray(); - this.timeStamp = new o.XFAObjectArray(); - this.toolTip = new o.XFAObjectArray(); - this.traversal = new o.XFAObjectArray(); - this.traverse = new o.XFAObjectArray(); - this.ui = new o.XFAObjectArray(); - this.validate = new o.XFAObjectArray(); - this.value = new o.XFAObjectArray(); - this.variables = new o.XFAObjectArray(); - } - } - class Radial extends o.XFAObject { - constructor(e) { - super(f, "radial", !0); - this.id = e.id || ""; - this.type = (0, c.getStringOption)(e.type, [ - "toEdge", - "toCenter", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.color = null; - this.extras = null; - } - [r.$toStyle](e) { - e = e ? e[r.$toStyle]() : "#FFFFFF"; - const t = this.color ? this.color[r.$toStyle]() : "#000000"; - return `radial-gradient(circle at center, ${"toEdge" === this.type ? `${e},${t}` : `${t},${e}`})`; - } - } - class Reason extends o.StringObject { - constructor(e) { - super(f, "reason"); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class Reasons extends o.XFAObject { - constructor(e) { - super(f, "reasons", !0); - this.id = e.id || ""; - this.type = (0, c.getStringOption)(e.type, [ - "optional", - "required", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.reason = new o.XFAObjectArray(); - } - } - class Rectangle extends o.XFAObject { - constructor(e) { - super(f, "rectangle", !0); - this.hand = (0, c.getStringOption)(e.hand, [ - "even", - "left", - "right", - ]); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.corner = new o.XFAObjectArray(4); - this.edge = new o.XFAObjectArray(4); - this.fill = null; - } - [r.$toHTML]() { - const e = this.edge.children.length - ? this.edge.children[0] - : new Edge({}), - t = e[r.$toStyle](), - a = Object.create(null); - "visible" === this.fill?.presence - ? Object.assign(a, this.fill[r.$toStyle]()) - : (a.fill = "transparent"); - a.strokeWidth = (0, s.measureToString)( - "visible" === e.presence ? e.thickness : 0, - ); - a.stroke = t.color; - const n = ( - this.corner.children.length - ? this.corner.children[0] - : new Corner({}) - )[r.$toStyle](), - i = { - name: "svg", - children: [ - { - name: "rect", - attributes: { - xmlns: g, - width: "100%", - height: "100%", - x: 0, - y: 0, - rx: n.radius, - ry: n.radius, - style: a, - }, - }, - ], - attributes: { - xmlns: g, - style: { overflow: "visible" }, - width: "100%", - height: "100%", - }, - }; - if (hasMargin(this[r.$getParent]()[r.$getParent]())) - return c.HTMLResult.success({ - name: "div", - attributes: { - style: { display: "inline", width: "100%", height: "100%" }, - }, - children: [i], - }); - i.attributes.style.position = "absolute"; - return c.HTMLResult.success(i); - } - } - class RefElement extends o.StringObject { - constructor(e) { - super(f, "ref"); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class Script extends o.StringObject { - constructor(e) { - super(f, "script"); - this.binding = e.binding || ""; - this.contentType = e.contentType || ""; - this.id = e.id || ""; - this.name = e.name || ""; - this.runAt = (0, c.getStringOption)(e.runAt, [ - "client", - "both", - "server", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class SetProperty extends o.XFAObject { - constructor(e) { - super(f, "setProperty"); - this.connection = e.connection || ""; - this.ref = e.ref || ""; - this.target = e.target || ""; - } - } - t.SetProperty = SetProperty; - class SignData extends o.XFAObject { - constructor(e) { - super(f, "signData", !0); - this.id = e.id || ""; - this.operation = (0, c.getStringOption)(e.operation, [ - "sign", - "clear", - "verify", - ]); - this.ref = e.ref || ""; - this.target = e.target || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.filter = null; - this.manifest = null; - } - } - class Signature extends o.XFAObject { - constructor(e) { - super(f, "signature", !0); - this.id = e.id || ""; - this.type = (0, c.getStringOption)(e.type, ["PDF1.3", "PDF1.6"]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.border = null; - this.extras = null; - this.filter = null; - this.manifest = null; - this.margin = null; - } - } - class Signing extends o.XFAObject { - constructor(e) { - super(f, "signing", !0); - this.id = e.id || ""; - this.type = (0, c.getStringOption)(e.type, [ - "optional", - "required", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.certificate = new o.XFAObjectArray(); - } - } - class Solid extends o.XFAObject { - constructor(e) { - super(f, "solid", !0); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - } - [r.$toStyle](e) { - return e ? e[r.$toStyle]() : "#FFFFFF"; - } - } - class Speak extends o.StringObject { - constructor(e) { - super(f, "speak"); - this.disable = (0, c.getInteger)({ - data: e.disable, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.id = e.id || ""; - this.priority = (0, c.getStringOption)(e.priority, [ - "custom", - "caption", - "name", - "toolTip", - ]); - this.rid = e.rid || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class Stipple extends o.XFAObject { - constructor(e) { - super(f, "stipple", !0); - this.id = e.id || ""; - this.rate = (0, c.getInteger)({ - data: e.rate, - defaultValue: 50, - validate: (e) => e >= 0 && e <= 100, - }); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.color = null; - this.extras = null; - } - [r.$toStyle](e) { - const t = this.rate / 100; - return l.Util.makeHexColor( - Math.round(e.value.r * (1 - t) + this.value.r * t), - Math.round(e.value.g * (1 - t) + this.value.g * t), - Math.round(e.value.b * (1 - t) + this.value.b * t), - ); - } - } - class Subform extends o.XFAObject { - constructor(e) { - super(f, "subform", !0); - this.access = (0, c.getStringOption)(e.access, [ - "open", - "nonInteractive", - "protected", - "readOnly", - ]); - this.allowMacro = (0, c.getInteger)({ - data: e.allowMacro, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.anchorType = (0, c.getStringOption)(e.anchorType, [ - "topLeft", - "bottomCenter", - "bottomLeft", - "bottomRight", - "middleCenter", - "middleLeft", - "middleRight", - "topCenter", - "topRight", - ]); - this.colSpan = (0, c.getInteger)({ - data: e.colSpan, - defaultValue: 1, - validate: (e) => e >= 1 || -1 === e, - }); - this.columnWidths = (e.columnWidths || "") - .trim() - .split(/\s+/) - .map((e) => ("-1" === e ? -1 : (0, c.getMeasurement)(e))); - this.h = e.h ? (0, c.getMeasurement)(e.h) : ""; - this.hAlign = (0, c.getStringOption)(e.hAlign, [ - "left", - "center", - "justify", - "justifyAll", - "radix", - "right", - ]); - this.id = e.id || ""; - this.layout = (0, c.getStringOption)(e.layout, [ - "position", - "lr-tb", - "rl-row", - "rl-tb", - "row", - "table", - "tb", - ]); - this.locale = e.locale || ""; - this.maxH = (0, c.getMeasurement)(e.maxH, "0pt"); - this.maxW = (0, c.getMeasurement)(e.maxW, "0pt"); - this.mergeMode = (0, c.getStringOption)(e.mergeMode, [ - "consumeData", - "matchTemplate", - ]); - this.minH = (0, c.getMeasurement)(e.minH, "0pt"); - this.minW = (0, c.getMeasurement)(e.minW, "0pt"); - this.name = e.name || ""; - this.presence = (0, c.getStringOption)(e.presence, [ - "visible", - "hidden", - "inactive", - "invisible", - ]); - this.relevant = (0, c.getRelevant)(e.relevant); - this.restoreState = (0, c.getStringOption)(e.restoreState, [ - "manual", - "auto", - ]); - this.scope = (0, c.getStringOption)(e.scope, ["name", "none"]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.w = e.w ? (0, c.getMeasurement)(e.w) : ""; - this.x = (0, c.getMeasurement)(e.x, "0pt"); - this.y = (0, c.getMeasurement)(e.y, "0pt"); - this.assist = null; - this.bind = null; - this.bookend = null; - this.border = null; - this.break = null; - this.calculate = null; - this.desc = null; - this.extras = null; - this.keep = null; - this.margin = null; - this.occur = null; - this.overflow = null; - this.pageSet = null; - this.para = null; - this.traversal = null; - this.validate = null; - this.variables = null; - this.area = new o.XFAObjectArray(); - this.breakAfter = new o.XFAObjectArray(); - this.breakBefore = new o.XFAObjectArray(); - this.connect = new o.XFAObjectArray(); - this.draw = new o.XFAObjectArray(); - this.event = new o.XFAObjectArray(); - this.exObject = new o.XFAObjectArray(); - this.exclGroup = new o.XFAObjectArray(); - this.field = new o.XFAObjectArray(); - this.proto = new o.XFAObjectArray(); - this.setProperty = new o.XFAObjectArray(); - this.subform = new o.XFAObjectArray(); - this.subformSet = new o.XFAObjectArray(); - } - [r.$getSubformParent]() { - const e = this[r.$getParent](); - return e instanceof SubformSet ? e[r.$getSubformParent]() : e; - } - [r.$isBindable]() { - return !0; - } - [r.$isThereMoreWidth]() { - return ( - (this.layout.endsWith("-tb") && - 0 === this[r.$extra].attempt && - this[r.$extra].numberInLine > 0) || - this[r.$getParent]()[r.$isThereMoreWidth]() - ); - } - *[r.$getContainedChildren]() { - yield* getContainedChildren(this); - } - [r.$flushHTML]() { - return (0, i.flushHTML)(this); - } - [r.$addHTML](e, t) { - (0, i.addHTML)(this, e, t); - } - [r.$getAvailableSpace]() { - return (0, i.getAvailableSpace)(this); - } - [r.$isSplittable]() { - const e = this[r.$getSubformParent](); - if (!e[r.$isSplittable]()) return !1; - if (void 0 !== this[r.$extra]._isSplittable) - return this[r.$extra]._isSplittable; - if ("position" === this.layout || this.layout.includes("row")) { - this[r.$extra]._isSplittable = !1; - return !1; - } - if (this.keep && "none" !== this.keep.intact) { - this[r.$extra]._isSplittable = !1; - return !1; - } - if (e.layout?.endsWith("-tb") && 0 !== e[r.$extra].numberInLine) - return !1; - this[r.$extra]._isSplittable = !0; - return !0; - } - [r.$toHTML](e) { - setTabIndex(this); - if (this.break) { - if ( - "auto" !== this.break.after || - "" !== this.break.afterTarget - ) { - const e = new BreakAfter({ - targetType: this.break.after, - target: this.break.afterTarget, - startNew: this.break.startNew.toString(), - }); - e[r.$globalData] = this[r.$globalData]; - this[r.$appendChild](e); - this.breakAfter.push(e); - } - if ( - "auto" !== this.break.before || - "" !== this.break.beforeTarget - ) { - const e = new BreakBefore({ - targetType: this.break.before, - target: this.break.beforeTarget, - startNew: this.break.startNew.toString(), - }); - e[r.$globalData] = this[r.$globalData]; - this[r.$appendChild](e); - this.breakBefore.push(e); - } - if ("" !== this.break.overflowTarget) { - const e = new Overflow({ - target: this.break.overflowTarget, - leader: this.break.overflowLeader, - trailer: this.break.overflowTrailer, - }); - e[r.$globalData] = this[r.$globalData]; - this[r.$appendChild](e); - this.overflow.push(e); - } - this[r.$removeChild](this.break); - this.break = null; - } - if ("hidden" === this.presence || "inactive" === this.presence) - return c.HTMLResult.EMPTY; - (this.breakBefore.children.length > 1 || - this.breakAfter.children.length > 1) && - (0, l.warn)( - "XFA - Several breakBefore or breakAfter in subforms: please file a bug.", - ); - if (this.breakBefore.children.length >= 1) { - const e = this.breakBefore.children[0]; - if (handleBreak(e)) return c.HTMLResult.breakNode(e); - } - if (this[r.$extra]?.afterBreakAfter) return c.HTMLResult.EMPTY; - (0, s.fixDimensions)(this); - const t = [], - a = { id: this[r.$uid], class: [] }; - (0, s.setAccess)(this, a.class); - this[r.$extra] || (this[r.$extra] = Object.create(null)); - Object.assign(this[r.$extra], { - children: t, - line: null, - attributes: a, - attempt: 0, - numberInLine: 0, - availableSpace: { - width: Math.min(this.w || 1 / 0, e.width), - height: Math.min(this.h || 1 / 0, e.height), - }, - width: 0, - height: 0, - prevHeight: 0, - currentWidth: 0, - }); - const n = this[r.$getTemplateRoot](), - o = n[r.$extra].noLayoutFailure, - h = this[r.$isSplittable](); - h || setFirstUnsplittable(this); - if (!(0, i.checkDimensions)(this, e)) return c.HTMLResult.FAILURE; - const u = new Set([ - "area", - "draw", - "exclGroup", - "field", - "subform", - "subformSet", - ]); - if (this.layout.includes("row")) { - const e = this[r.$getSubformParent]().columnWidths; - if (Array.isArray(e) && e.length > 0) { - this[r.$extra].columnWidths = e; - this[r.$extra].currentColumn = 0; - } - } - const d = (0, s.toStyle)( - this, - "anchorType", - "dimensions", - "position", - "presence", - "border", - "margin", - "hAlign", - ), - f = ["xfaSubform"], - g = (0, s.layoutClass)(this); - g && f.push(g); - a.style = d; - a.class = f; - this.name && (a.xfaName = this.name); - if (this.overflow) { - const t = this.overflow[r.$getExtra](); - if (t.addLeader) { - t.addLeader = !1; - handleOverflow(this, t.leader, e); - } - } - this[r.$pushPara](); - const p = "lr-tb" === this.layout || "rl-tb" === this.layout, - m = p ? 2 : 1; - for (; this[r.$extra].attempt < m; this[r.$extra].attempt++) { - p && - 1 === this[r.$extra].attempt && - (this[r.$extra].numberInLine = 0); - const e = this[r.$childrenToHTML]({ filter: u, include: !0 }); - if (e.success) break; - if (e.isBreak()) { - this[r.$popPara](); - return e; - } - if ( - p && - 0 === this[r.$extra].attempt && - 0 === this[r.$extra].numberInLine && - !n[r.$extra].noLayoutFailure - ) { - this[r.$extra].attempt = m; - break; - } - } - this[r.$popPara](); - h || unsetFirstUnsplittable(this); - n[r.$extra].noLayoutFailure = o; - if (this[r.$extra].attempt === m) { - this.overflow && - (this[r.$getTemplateRoot]()[r.$extra].overflowNode = - this.overflow); - h || delete this[r.$extra]; - return c.HTMLResult.FAILURE; - } - if (this.overflow) { - const t = this.overflow[r.$getExtra](); - if (t.addTrailer) { - t.addTrailer = !1; - handleOverflow(this, t.trailer, e); - } - } - let b = 0, - y = 0; - if (this.margin) { - b = this.margin.leftInset + this.margin.rightInset; - y = this.margin.topInset + this.margin.bottomInset; - } - const w = Math.max(this[r.$extra].width + b, this.w || 0), - S = Math.max(this[r.$extra].height + y, this.h || 0), - x = [this.x, this.y, w, S]; - "" === this.w && (d.width = (0, s.measureToString)(w)); - "" === this.h && (d.height = (0, s.measureToString)(S)); - if (("0px" === d.width || "0px" === d.height) && 0 === t.length) - return c.HTMLResult.EMPTY; - const C = { name: "div", attributes: a, children: t }; - applyAssist(this, a); - const k = c.HTMLResult.success((0, s.createWrapper)(this, C), x); - if (this.breakAfter.children.length >= 1) { - const e = this.breakAfter.children[0]; - if (handleBreak(e)) { - this[r.$extra].afterBreakAfter = k; - return c.HTMLResult.breakNode(e); - } - } - delete this[r.$extra]; - return k; - } - } - class SubformSet extends o.XFAObject { - constructor(e) { - super(f, "subformSet", !0); - this.id = e.id || ""; - this.name = e.name || ""; - this.relation = (0, c.getStringOption)(e.relation, [ - "ordered", - "choice", - "unordered", - ]); - this.relevant = (0, c.getRelevant)(e.relevant); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.bookend = null; - this.break = null; - this.desc = null; - this.extras = null; - this.occur = null; - this.overflow = null; - this.breakAfter = new o.XFAObjectArray(); - this.breakBefore = new o.XFAObjectArray(); - this.subform = new o.XFAObjectArray(); - this.subformSet = new o.XFAObjectArray(); - } - *[r.$getContainedChildren]() { - yield* getContainedChildren(this); - } - [r.$getSubformParent]() { - let e = this[r.$getParent](); - for (; !(e instanceof Subform); ) e = e[r.$getParent](); - return e; - } - [r.$isBindable]() { - return !0; - } - } - class SubjectDN extends o.ContentObject { - constructor(e) { - super(f, "subjectDN"); - this.delimiter = e.delimiter || ","; - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - [r.$finalize]() { - this[r.$content] = new Map( - this[r.$content].split(this.delimiter).map((e) => { - (e = e.split("=", 2))[0] = e[0].trim(); - return e; - }), - ); - } - } - class SubjectDNs extends o.XFAObject { - constructor(e) { - super(f, "subjectDNs", !0); - this.id = e.id || ""; - this.type = (0, c.getStringOption)(e.type, [ - "optional", - "required", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.subjectDN = new o.XFAObjectArray(); - } - } - class Submit extends o.XFAObject { - constructor(e) { - super(f, "submit", !0); - this.embedPDF = (0, c.getInteger)({ - data: e.embedPDF, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.format = (0, c.getStringOption)(e.format, [ - "xdp", - "formdata", - "pdf", - "urlencoded", - "xfd", - "xml", - ]); - this.id = e.id || ""; - this.target = e.target || ""; - this.textEncoding = (0, c.getKeyword)({ - data: e.textEncoding ? e.textEncoding.toLowerCase() : "", - defaultValue: "", - validate: (e) => - [ - "utf-8", - "big-five", - "fontspecific", - "gbk", - "gb-18030", - "gb-2312", - "ksc-5601", - "none", - "shift-jis", - "ucs-2", - "utf-16", - ].includes(e) || e.match(/iso-8859-\d{2}/), - }); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.xdpContent = e.xdpContent || ""; - this.encrypt = null; - this.encryptData = new o.XFAObjectArray(); - this.signData = new o.XFAObjectArray(); - } - } - class Template extends o.XFAObject { - constructor(e) { - super(f, "template", !0); - this.baseProfile = (0, c.getStringOption)(e.baseProfile, [ - "full", - "interactiveForms", - ]); - this.extras = null; - this.subform = new o.XFAObjectArray(); - } - [r.$finalize]() { - 0 === this.subform.children.length && - (0, l.warn)("XFA - No subforms in template node."); - this.subform.children.length >= 2 && - (0, l.warn)( - "XFA - Several subforms in template node: please file a bug.", - ); - this[r.$tabIndex] = 5e3; - } - [r.$isSplittable]() { - return !0; - } - [r.$searchNode](e, t) { - return e.startsWith("#") - ? [this[r.$ids].get(e.slice(1))] - : (0, d.searchNode)(this, t, e, !0, !0); - } - *[r.$toPages]() { - if (!this.subform.children.length) - return c.HTMLResult.success({ name: "div", children: [] }); - this[r.$extra] = { - overflowNode: null, - firstUnsplittable: null, - currentContentArea: null, - currentPageArea: null, - noLayoutFailure: !1, - pageNumber: 1, - pagePosition: "first", - oddOrEven: "odd", - blankOrNotBlank: "nonBlank", - paraStack: [], - }; - const e = this.subform.children[0]; - e.pageSet[r.$cleanPage](); - const t = e.pageSet.pageArea.children, - a = { name: "div", children: [] }; - let n = null, - i = null, - s = null; - if (e.breakBefore.children.length >= 1) { - i = e.breakBefore.children[0]; - s = i.target; - } else if ( - e.subform.children.length >= 1 && - e.subform.children[0].breakBefore.children.length >= 1 - ) { - i = e.subform.children[0].breakBefore.children[0]; - s = i.target; - } else if (e.break?.beforeTarget) { - i = e.break; - s = i.beforeTarget; - } else if ( - e.subform.children.length >= 1 && - e.subform.children[0].break?.beforeTarget - ) { - i = e.subform.children[0].break; - s = i.beforeTarget; - } - if (i) { - const e = this[r.$searchNode](s, i[r.$getParent]()); - if (e instanceof PageArea) { - n = e; - i[r.$extra] = {}; - } - } - n || (n = t[0]); - n[r.$extra] = { numberOfUse: 1 }; - const o = n[r.$getParent](); - o[r.$extra] = { - numberOfUse: 1, - pageIndex: o.pageArea.children.indexOf(n), - pageSetIndex: 0, - }; - let h, - u = null, - d = null, - f = !0, - g = 0, - p = 0; - for (;;) { - if (f) g = 0; - else { - a.children.pop(); - if (3 == ++g) { - (0, l.warn)( - "XFA - Something goes wrong: please file a bug.", - ); - return a; - } - } - h = null; - this[r.$extra].currentPageArea = n; - const t = n[r.$toHTML]().html; - a.children.push(t); - if (u) { - this[r.$extra].noLayoutFailure = !0; - t.children.push(u[r.$toHTML](n[r.$extra].space).html); - u = null; - } - if (d) { - this[r.$extra].noLayoutFailure = !0; - t.children.push(d[r.$toHTML](n[r.$extra].space).html); - d = null; - } - const i = n.contentArea.children, - s = t.children.filter((e) => - e.attributes.class.includes("xfaContentarea"), - ); - f = !1; - this[r.$extra].firstUnsplittable = null; - this[r.$extra].noLayoutFailure = !1; - const flush = (t) => { - const a = e[r.$flushHTML](); - if (a) { - f ||= a.children?.length > 0; - s[t].children.push(a); - } - }; - for (let t = p, n = i.length; t < n; t++) { - const n = (this[r.$extra].currentContentArea = i[t]), - o = { width: n.w, height: n.h }; - p = 0; - if (u) { - s[t].children.push(u[r.$toHTML](o).html); - u = null; - } - if (d) { - s[t].children.push(d[r.$toHTML](o).html); - d = null; - } - const c = e[r.$toHTML](o); - if (c.success) { - if (c.html) { - f ||= c.html.children?.length > 0; - s[t].children.push(c.html); - } else !f && a.children.length > 1 && a.children.pop(); - return a; - } - if (c.isBreak()) { - const e = c.breakNode; - flush(t); - if ("auto" === e.targetType) continue; - if (e.leader) { - u = this[r.$searchNode](e.leader, e[r.$getParent]()); - u = u ? u[0] : null; - } - if (e.trailer) { - d = this[r.$searchNode](e.trailer, e[r.$getParent]()); - d = d ? d[0] : null; - } - if ("pageArea" === e.targetType) { - h = e[r.$extra].target; - t = 1 / 0; - } else if (e[r.$extra].target) { - h = e[r.$extra].target; - p = e[r.$extra].index + 1; - t = 1 / 0; - } else t = e[r.$extra].index; - } else if (this[r.$extra].overflowNode) { - const e = this[r.$extra].overflowNode; - this[r.$extra].overflowNode = null; - const a = e[r.$getExtra](), - n = a.target; - a.addLeader = null !== a.leader; - a.addTrailer = null !== a.trailer; - flush(t); - const s = t; - t = 1 / 0; - if (n instanceof PageArea) h = n; - else if (n instanceof ContentArea) { - const e = i.indexOf(n); - if (-1 !== e) e > s ? (t = e - 1) : (p = e); - else { - h = n[r.$getParent](); - p = h.contentArea.children.indexOf(n); - } - } - } else flush(t); - } - this[r.$extra].pageNumber += 1; - h && - (h[r.$isUsable]() - ? (h[r.$extra].numberOfUse += 1) - : (h = null)); - n = h || n[r.$getNextPage](); - yield null; - } - } - } - t.Template = Template; - class Text extends o.ContentObject { - constructor(e) { - super(f, "text"); - this.id = e.id || ""; - this.maxChars = (0, c.getInteger)({ - data: e.maxChars, - defaultValue: 0, - validate: (e) => e >= 0, - }); - this.name = e.name || ""; - this.rid = e.rid || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - [r.$acceptWhitespace]() { - return !0; - } - [r.$onChild](e) { - if (e[r.$namespaceId] === n.NamespaceIds.xhtml.id) { - this[r.$content] = e; - return !0; - } - (0, l.warn)(`XFA - Invalid content in Text: ${e[r.$nodeName]}.`); - return !1; - } - [r.$onText](e) { - this[r.$content] instanceof o.XFAObject || super[r.$onText](e); - } - [r.$finalize]() { - "string" == typeof this[r.$content] && - (this[r.$content] = this[r.$content].replaceAll("\r\n", "\n")); - } - [r.$getExtra]() { - return "string" == typeof this[r.$content] - ? this[r.$content] - .split(/[\u2029\u2028\n]/) - .reduce((e, t) => { - t && e.push(t); - return e; - }, []) - .join("\n") - : this[r.$content][r.$text](); - } - [r.$toHTML](e) { - if ("string" == typeof this[r.$content]) { - const e = valueToHtml(this[r.$content]).html; - if (this[r.$content].includes("\u2029")) { - e.name = "div"; - e.children = []; - this[r.$content] - .split("\u2029") - .map((e) => - e.split(/[\u2028\n]/).reduce((e, t) => { - e.push({ name: "span", value: t }, { name: "br" }); - return e; - }, []), - ) - .forEach((t) => { - e.children.push({ name: "p", children: t }); - }); - } else if (/[\u2028\n]/.test(this[r.$content])) { - e.name = "div"; - e.children = []; - this[r.$content].split(/[\u2028\n]/).forEach((t) => { - e.children.push({ name: "span", value: t }, { name: "br" }); - }); - } - return c.HTMLResult.success(e); - } - return this[r.$content][r.$toHTML](e); - } - } - t.Text = Text; - class TextEdit extends o.XFAObject { - constructor(e) { - super(f, "textEdit", !0); - this.allowRichText = (0, c.getInteger)({ - data: e.allowRichText, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.hScrollPolicy = (0, c.getStringOption)(e.hScrollPolicy, [ - "auto", - "off", - "on", - ]); - this.id = e.id || ""; - this.multiLine = (0, c.getInteger)({ - data: e.multiLine, - defaultValue: "", - validate: (e) => 0 === e || 1 === e, - }); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.vScrollPolicy = (0, c.getStringOption)(e.vScrollPolicy, [ - "auto", - "off", - "on", - ]); - this.border = null; - this.comb = null; - this.extras = null; - this.margin = null; - } - [r.$toHTML](e) { - const t = (0, s.toStyle)(this, "border", "font", "margin"); - let a; - const n = this[r.$getParent]()[r.$getParent](); - "" === this.multiLine && - (this.multiLine = n instanceof Draw ? 1 : 0); - a = - 1 === this.multiLine - ? { - name: "textarea", - attributes: { - dataId: n[r.$data]?.[r.$uid] || n[r.$uid], - fieldId: n[r.$uid], - class: ["xfaTextfield"], - style: t, - "aria-label": ariaLabel(n), - "aria-required": !1, - }, - } - : { - name: "input", - attributes: { - type: "text", - dataId: n[r.$data]?.[r.$uid] || n[r.$uid], - fieldId: n[r.$uid], - class: ["xfaTextfield"], - style: t, - "aria-label": ariaLabel(n), - "aria-required": !1, - }, - }; - if (isRequired(n)) { - a.attributes["aria-required"] = !0; - a.attributes.required = !0; - } - return c.HTMLResult.success({ - name: "label", - attributes: { class: ["xfaLabel"] }, - children: [a], - }); - } - } - class Time extends o.StringObject { - constructor(e) { - super(f, "time"); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - [r.$finalize]() { - const e = this[r.$content].trim(); - this[r.$content] = e ? new Date(e) : null; - } - [r.$toHTML](e) { - return valueToHtml( - this[r.$content] ? this[r.$content].toString() : "", - ); - } - } - class TimeStamp extends o.XFAObject { - constructor(e) { - super(f, "timeStamp"); - this.id = e.id || ""; - this.server = e.server || ""; - this.type = (0, c.getStringOption)(e.type, [ - "optional", - "required", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class ToolTip extends o.StringObject { - constructor(e) { - super(f, "toolTip"); - this.id = e.id || ""; - this.rid = e.rid || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class Traversal extends o.XFAObject { - constructor(e) { - super(f, "traversal", !0); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - this.traverse = new o.XFAObjectArray(); - } - } - class Traverse extends o.XFAObject { - constructor(e) { - super(f, "traverse", !0); - this.id = e.id || ""; - this.operation = (0, c.getStringOption)(e.operation, [ - "next", - "back", - "down", - "first", - "left", - "right", - "up", - ]); - this.ref = e.ref || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - this.script = null; - } - get name() { - return this.operation; - } - [r.$isTransparent]() { - return !1; - } - } - class Ui extends o.XFAObject { - constructor(e) { - super(f, "ui", !0); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - this.picture = null; - this.barcode = null; - this.button = null; - this.checkButton = null; - this.choiceList = null; - this.dateTimeEdit = null; - this.defaultUi = null; - this.imageEdit = null; - this.numericEdit = null; - this.passwordEdit = null; - this.signature = null; - this.textEdit = null; - } - [r.$getExtra]() { - if (void 0 === this[r.$extra]) { - for (const e of Object.getOwnPropertyNames(this)) { - if ("extras" === e || "picture" === e) continue; - const t = this[e]; - if (t instanceof o.XFAObject) { - this[r.$extra] = t; - return t; - } - } - this[r.$extra] = null; - } - return this[r.$extra]; - } - [r.$toHTML](e) { - const t = this[r.$getExtra](); - return t ? t[r.$toHTML](e) : c.HTMLResult.EMPTY; - } - } - class Validate extends o.XFAObject { - constructor(e) { - super(f, "validate", !0); - this.formatTest = (0, c.getStringOption)(e.formatTest, [ - "warning", - "disabled", - "error", - ]); - this.id = e.id || ""; - this.nullTest = (0, c.getStringOption)(e.nullTest, [ - "disabled", - "error", - "warning", - ]); - this.scriptTest = (0, c.getStringOption)(e.scriptTest, [ - "error", - "disabled", - "warning", - ]); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.extras = null; - this.message = null; - this.picture = null; - this.script = null; - } - } - class Value extends o.XFAObject { - constructor(e) { - super(f, "value", !0); - this.id = e.id || ""; - this.override = (0, c.getInteger)({ - data: e.override, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.relevant = (0, c.getRelevant)(e.relevant); - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.arc = null; - this.boolean = null; - this.date = null; - this.dateTime = null; - this.decimal = null; - this.exData = null; - this.float = null; - this.image = null; - this.integer = null; - this.line = null; - this.rectangle = null; - this.text = null; - this.time = null; - } - [r.$setValue](e) { - const t = this[r.$getParent](); - if (t instanceof Field && t.ui?.imageEdit) { - if (!this.image) { - this.image = new Image({}); - this[r.$appendChild](this.image); - } - this.image[r.$content] = e[r.$content]; - return; - } - const a = e[r.$nodeName]; - if (null === this[a]) { - for (const e of Object.getOwnPropertyNames(this)) { - const t = this[e]; - if (t instanceof o.XFAObject) { - this[e] = null; - this[r.$removeChild](t); - } - } - this[e[r.$nodeName]] = e; - this[r.$appendChild](e); - } else this[a][r.$content] = e[r.$content]; - } - [r.$text]() { - if (this.exData) - return "string" == typeof this.exData[r.$content] - ? this.exData[r.$content].trim() - : this.exData[r.$content][r.$text]().trim(); - for (const e of Object.getOwnPropertyNames(this)) { - if ("image" === e) continue; - const t = this[e]; - if (t instanceof o.XFAObject) - return (t[r.$content] || "").toString().trim(); - } - return null; - } - [r.$toHTML](e) { - for (const t of Object.getOwnPropertyNames(this)) { - const a = this[t]; - if (a instanceof o.XFAObject) return a[r.$toHTML](e); - } - return c.HTMLResult.EMPTY; - } - } - t.Value = Value; - class Variables extends o.XFAObject { - constructor(e) { - super(f, "variables", !0); - this.id = e.id || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - this.boolean = new o.XFAObjectArray(); - this.date = new o.XFAObjectArray(); - this.dateTime = new o.XFAObjectArray(); - this.decimal = new o.XFAObjectArray(); - this.exData = new o.XFAObjectArray(); - this.float = new o.XFAObjectArray(); - this.image = new o.XFAObjectArray(); - this.integer = new o.XFAObjectArray(); - this.manifest = new o.XFAObjectArray(); - this.script = new o.XFAObjectArray(); - this.text = new o.XFAObjectArray(); - this.time = new o.XFAObjectArray(); - } - [r.$isTransparent]() { - return !0; - } - } - class TemplateNamespace { - static [n.$buildXFAObject](e, t) { - if (TemplateNamespace.hasOwnProperty(e)) { - const a = TemplateNamespace[e](t); - a[r.$setSetAttributes](t); - return a; - } - } - static appearanceFilter(e) { - return new AppearanceFilter(e); - } - static arc(e) { - return new Arc(e); - } - static area(e) { - return new Area(e); - } - static assist(e) { - return new Assist(e); - } - static barcode(e) { - return new Barcode(e); - } - static bind(e) { - return new Bind(e); - } - static bindItems(e) { - return new BindItems(e); - } - static bookend(e) { - return new Bookend(e); - } - static boolean(e) { - return new BooleanElement(e); - } - static border(e) { - return new Border(e); - } - static break(e) { - return new Break(e); - } - static breakAfter(e) { - return new BreakAfter(e); - } - static breakBefore(e) { - return new BreakBefore(e); - } - static button(e) { - return new Button(e); - } - static calculate(e) { - return new Calculate(e); - } - static caption(e) { - return new Caption(e); - } - static certificate(e) { - return new Certificate(e); - } - static certificates(e) { - return new Certificates(e); - } - static checkButton(e) { - return new CheckButton(e); - } - static choiceList(e) { - return new ChoiceList(e); - } - static color(e) { - return new Color(e); - } - static comb(e) { - return new Comb(e); - } - static connect(e) { - return new Connect(e); - } - static contentArea(e) { - return new ContentArea(e); - } - static corner(e) { - return new Corner(e); - } - static date(e) { - return new DateElement(e); - } - static dateTime(e) { - return new DateTime(e); - } - static dateTimeEdit(e) { - return new DateTimeEdit(e); - } - static decimal(e) { - return new Decimal(e); - } - static defaultUi(e) { - return new DefaultUi(e); - } - static desc(e) { - return new Desc(e); - } - static digestMethod(e) { - return new DigestMethod(e); - } - static digestMethods(e) { - return new DigestMethods(e); - } - static draw(e) { - return new Draw(e); - } - static edge(e) { - return new Edge(e); - } - static encoding(e) { - return new Encoding(e); - } - static encodings(e) { - return new Encodings(e); - } - static encrypt(e) { - return new Encrypt(e); - } - static encryptData(e) { - return new EncryptData(e); - } - static encryption(e) { - return new Encryption(e); - } - static encryptionMethod(e) { - return new EncryptionMethod(e); - } - static encryptionMethods(e) { - return new EncryptionMethods(e); - } - static event(e) { - return new Event(e); - } - static exData(e) { - return new ExData(e); - } - static exObject(e) { - return new ExObject(e); - } - static exclGroup(e) { - return new ExclGroup(e); - } - static execute(e) { - return new Execute(e); - } - static extras(e) { - return new Extras(e); - } - static field(e) { - return new Field(e); - } - static fill(e) { - return new Fill(e); - } - static filter(e) { - return new Filter(e); - } - static float(e) { - return new Float(e); - } - static font(e) { - return new Font(e); - } - static format(e) { - return new Format(e); - } - static handler(e) { - return new Handler(e); - } - static hyphenation(e) { - return new Hyphenation(e); - } - static image(e) { - return new Image(e); - } - static imageEdit(e) { - return new ImageEdit(e); - } - static integer(e) { - return new Integer(e); - } - static issuers(e) { - return new Issuers(e); - } - static items(e) { - return new Items(e); - } - static keep(e) { - return new Keep(e); - } - static keyUsage(e) { - return new KeyUsage(e); - } - static line(e) { - return new Line(e); - } - static linear(e) { - return new Linear(e); - } - static lockDocument(e) { - return new LockDocument(e); - } - static manifest(e) { - return new Manifest(e); - } - static margin(e) { - return new Margin(e); - } - static mdp(e) { - return new Mdp(e); - } - static medium(e) { - return new Medium(e); - } - static message(e) { - return new Message(e); - } - static numericEdit(e) { - return new NumericEdit(e); - } - static occur(e) { - return new Occur(e); - } - static oid(e) { - return new Oid(e); - } - static oids(e) { - return new Oids(e); - } - static overflow(e) { - return new Overflow(e); - } - static pageArea(e) { - return new PageArea(e); - } - static pageSet(e) { - return new PageSet(e); - } - static para(e) { - return new Para(e); - } - static passwordEdit(e) { - return new PasswordEdit(e); - } - static pattern(e) { - return new Pattern(e); - } - static picture(e) { - return new Picture(e); - } - static proto(e) { - return new Proto(e); - } - static radial(e) { - return new Radial(e); - } - static reason(e) { - return new Reason(e); - } - static reasons(e) { - return new Reasons(e); - } - static rectangle(e) { - return new Rectangle(e); - } - static ref(e) { - return new RefElement(e); - } - static script(e) { - return new Script(e); - } - static setProperty(e) { - return new SetProperty(e); - } - static signData(e) { - return new SignData(e); - } - static signature(e) { - return new Signature(e); - } - static signing(e) { - return new Signing(e); - } - static solid(e) { - return new Solid(e); - } - static speak(e) { - return new Speak(e); - } - static stipple(e) { - return new Stipple(e); - } - static subform(e) { - return new Subform(e); - } - static subformSet(e) { - return new SubformSet(e); - } - static subjectDN(e) { - return new SubjectDN(e); - } - static subjectDNs(e) { - return new SubjectDNs(e); - } - static submit(e) { - return new Submit(e); - } - static template(e) { - return new Template(e); - } - static text(e) { - return new Text(e); - } - static textEdit(e) { - return new TextEdit(e); - } - static time(e) { - return new Time(e); - } - static timeStamp(e) { - return new TimeStamp(e); - } - static toolTip(e) { - return new ToolTip(e); - } - static traversal(e) { - return new Traversal(e); - } - static traverse(e) { - return new Traverse(e); - } - static ui(e) { - return new Ui(e); - } - static validate(e) { - return new Validate(e); - } - static value(e) { - return new Value(e); - } - static variables(e) { - return new Variables(e); - } - } - t.TemplateNamespace = TemplateNamespace; - }, - (e, t) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.NamespaceIds = t.$buildXFAObject = void 0; - const a = Symbol(); - t.$buildXFAObject = a; - t.NamespaceIds = { - config: { - id: 0, - check: (e) => e.startsWith("http://www.xfa.org/schema/xci/"), - }, - connectionSet: { - id: 1, - check: (e) => - e.startsWith("http://www.xfa.org/schema/xfa-connection-set/"), - }, - datasets: { - id: 2, - check: (e) => e.startsWith("http://www.xfa.org/schema/xfa-data/"), - }, - form: { - id: 3, - check: (e) => e.startsWith("http://www.xfa.org/schema/xfa-form/"), - }, - localeSet: { - id: 4, - check: (e) => - e.startsWith("http://www.xfa.org/schema/xfa-locale-set/"), - }, - pdf: { id: 5, check: (e) => "http://ns.adobe.com/xdp/pdf/" === e }, - signature: { - id: 6, - check: (e) => "http://www.w3.org/2000/09/xmldsig#" === e, - }, - sourceSet: { - id: 7, - check: (e) => - e.startsWith("http://www.xfa.org/schema/xfa-source-set/"), - }, - stylesheet: { - id: 8, - check: (e) => "http://www.w3.org/1999/XSL/Transform" === e, - }, - template: { - id: 9, - check: (e) => - e.startsWith("http://www.xfa.org/schema/xfa-template/"), - }, - xdc: { - id: 10, - check: (e) => e.startsWith("http://www.xfa.org/schema/xdc/"), - }, - xdp: { id: 11, check: (e) => "http://ns.adobe.com/xdp/" === e }, - xfdf: { id: 12, check: (e) => "http://ns.adobe.com/xfdf/" === e }, - xhtml: { - id: 13, - check: (e) => "http://www.w3.org/1999/xhtml" === e, - }, - xmpmeta: { - id: 14, - check: (e) => "http://ns.adobe.com/xmpmeta/" === e, - }, - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.addHTML = function addHTML(e, t, a) { - const i = e[r.$extra], - s = i.availableSpace, - [o, c, l, h] = a; - switch (e.layout) { - case "position": - i.width = Math.max(i.width, o + l); - i.height = Math.max(i.height, c + h); - i.children.push(t); - break; - case "lr-tb": - case "rl-tb": - if (!i.line || 1 === i.attempt) { - i.line = createLine(e, []); - i.children.push(i.line); - i.numberInLine = 0; - } - i.numberInLine += 1; - i.line.children.push(t); - if (0 === i.attempt) { - i.currentWidth += l; - i.height = Math.max(i.height, i.prevHeight + h); - } else { - i.currentWidth = l; - i.prevHeight = i.height; - i.height += h; - i.attempt = 0; - } - i.width = Math.max(i.width, i.currentWidth); - break; - case "rl-row": - case "row": { - i.children.push(t); - i.width += l; - i.height = Math.max(i.height, h); - const e = (0, n.measureToString)(i.height); - for (const t of i.children) t.attributes.style.height = e; - break; - } - case "table": - case "tb": - i.width = Math.min(s.width, Math.max(i.width, l)); - i.height += h; - i.children.push(t); - } - }; - t.checkDimensions = function checkDimensions(e, t) { - if (null === e[r.$getTemplateRoot]()[r.$extra].firstUnsplittable) - return !0; - if (0 === e.w || 0 === e.h) return !0; - const a = e[r.$getSubformParent](), - n = a[r.$extra]?.attempt || 0, - [, i, s, o] = (function getTransformedBBox(e) { - let t, - a, - r = "" === e.w ? NaN : e.w, - n = "" === e.h ? NaN : e.h, - [i, s] = [0, 0]; - switch (e.anchorType || "") { - case "bottomCenter": - [i, s] = [r / 2, n]; - break; - case "bottomLeft": - [i, s] = [0, n]; - break; - case "bottomRight": - [i, s] = [r, n]; - break; - case "middleCenter": - [i, s] = [r / 2, n / 2]; - break; - case "middleLeft": - [i, s] = [0, n / 2]; - break; - case "middleRight": - [i, s] = [r, n / 2]; - break; - case "topCenter": - [i, s] = [r / 2, 0]; - break; - case "topRight": - [i, s] = [r, 0]; - } - switch (e.rotate || 0) { - case 0: - [t, a] = [-i, -s]; - break; - case 90: - [t, a] = [-s, i]; - [r, n] = [n, -r]; - break; - case 180: - [t, a] = [i, s]; - [r, n] = [-r, -n]; - break; - case 270: - [t, a] = [s, -i]; - [r, n] = [-n, r]; - } - return [ - e.x + t + Math.min(0, r), - e.y + a + Math.min(0, n), - Math.abs(r), - Math.abs(n), - ]; - })(e); - switch (a.layout) { - case "lr-tb": - case "rl-tb": - return 0 === n - ? e[r.$getTemplateRoot]()[r.$extra].noLayoutFailure - ? "" !== e.w - ? Math.round(s - t.width) <= 2 - : t.width > 2 - : !("" !== e.h && Math.round(o - t.height) > 2) && - ("" !== e.w - ? Math.round(s - t.width) <= 2 || - (0 === a[r.$extra].numberInLine && t.height > 2) - : t.width > 2) - : !!e[r.$getTemplateRoot]()[r.$extra].noLayoutFailure || - (!("" !== e.h && Math.round(o - t.height) > 2) && - ("" === e.w || - Math.round(s - t.width) <= 2 || - !a[r.$isThereMoreWidth]()) && - t.height > 2); - case "table": - case "tb": - return ( - !!e[r.$getTemplateRoot]()[r.$extra].noLayoutFailure || - ("" === e.h || e[r.$isSplittable]() - ? ("" === e.w || - Math.round(s - t.width) <= 2 || - !a[r.$isThereMoreWidth]()) && - t.height > 2 - : Math.round(o - t.height) <= 2) - ); - case "position": - if (e[r.$getTemplateRoot]()[r.$extra].noLayoutFailure) - return !0; - if ("" === e.h || Math.round(o + i - t.height) <= 2) return !0; - return ( - o + i > e[r.$getTemplateRoot]()[r.$extra].currentContentArea.h - ); - case "rl-row": - case "row": - return ( - !!e[r.$getTemplateRoot]()[r.$extra].noLayoutFailure || - "" === e.h || - Math.round(o - t.height) <= 2 - ); - default: - return !0; - } - }; - t.flushHTML = function flushHTML(e) { - if (!e[r.$extra]) return null; - const t = { - name: "div", - attributes: e[r.$extra].attributes, - children: e[r.$extra].children, - }; - if (e[r.$extra].failingNode) { - const a = e[r.$extra].failingNode[r.$flushHTML](); - a && - (e.layout.endsWith("-tb") - ? t.children.push(createLine(e, [a])) - : t.children.push(a)); - } - if (0 === t.children.length) return null; - return t; - }; - t.getAvailableSpace = function getAvailableSpace(e) { - const t = e[r.$extra].availableSpace, - a = e.margin ? e.margin.topInset + e.margin.bottomInset : 0, - n = e.margin ? e.margin.leftInset + e.margin.rightInset : 0; - switch (e.layout) { - case "lr-tb": - case "rl-tb": - return 0 === e[r.$extra].attempt - ? { - width: t.width - n - e[r.$extra].currentWidth, - height: t.height - a - e[r.$extra].prevHeight, - } - : { - width: t.width - n, - height: t.height - a - e[r.$extra].height, - }; - case "rl-row": - case "row": - return { - width: e[r.$extra].columnWidths - .slice(e[r.$extra].currentColumn) - .reduce((e, t) => e + t), - height: t.height - n, - }; - case "table": - case "tb": - return { - width: t.width - n, - height: t.height - a - e[r.$extra].height, - }; - default: - return t; - } - }; - var r = a(78), - n = a(83); - function createLine(e, t) { - return { - name: "div", - attributes: { class: ["lr-tb" === e.layout ? "xfaLr" : "xfaRl"] }, - children: t, - }; - } - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.computeBbox = function computeBbox(e, t, a) { - let n; - if ("" !== e.w && "" !== e.h) n = [e.x, e.y, e.w, e.h]; - else { - if (!a) return null; - let i = e.w; - if ("" === i) { - if (0 === e.maxW) { - const t = e[r.$getSubformParent](); - i = "position" === t.layout && "" !== t.w ? 0 : e.minW; - } else i = Math.min(e.maxW, a.width); - t.attributes.style.width = measureToString(i); - } - let s = e.h; - if ("" === s) { - if (0 === e.maxH) { - const t = e[r.$getSubformParent](); - s = "position" === t.layout && "" !== t.h ? 0 : e.minH; - } else s = Math.min(e.maxH, a.height); - t.attributes.style.height = measureToString(s); - } - n = [e.x, e.y, i, s]; - } - return n; - }; - t.createWrapper = function createWrapper(e, t) { - const { attributes: a } = t, - { style: n } = a, - i = { - name: "div", - attributes: { - class: ["xfaWrapper"], - style: Object.create(null), - }, - children: [], - }; - a.class.push("xfaWrapped"); - if (e.border) { - const { widths: a, insets: s } = e.border[r.$extra]; - let o, - c, - l = s[0], - h = s[3]; - const u = s[0] + s[2], - d = s[1] + s[3]; - switch (e.border.hand) { - case "even": - l -= a[0] / 2; - h -= a[3] / 2; - o = `calc(100% + ${(a[1] + a[3]) / 2 - d}px)`; - c = `calc(100% + ${(a[0] + a[2]) / 2 - u}px)`; - break; - case "left": - l -= a[0]; - h -= a[3]; - o = `calc(100% + ${a[1] + a[3] - d}px)`; - c = `calc(100% + ${a[0] + a[2] - u}px)`; - break; - case "right": - o = d ? `calc(100% - ${d}px)` : "100%"; - c = u ? `calc(100% - ${u}px)` : "100%"; - } - const f = ["xfaBorder"]; - isPrintOnly(e.border) && f.push("xfaPrintOnly"); - const g = { - name: "div", - attributes: { - class: f, - style: { top: `${l}px`, left: `${h}px`, width: o, height: c }, - }, - children: [], - }; - for (const e of [ - "border", - "borderWidth", - "borderColor", - "borderRadius", - "borderStyle", - ]) - if (void 0 !== n[e]) { - g.attributes.style[e] = n[e]; - delete n[e]; - } - i.children.push(g, t); - } else i.children.push(t); - for (const e of [ - "background", - "backgroundClip", - "top", - "left", - "width", - "height", - "minWidth", - "minHeight", - "maxWidth", - "maxHeight", - "transform", - "transformOrigin", - "visibility", - ]) - if (void 0 !== n[e]) { - i.attributes.style[e] = n[e]; - delete n[e]; - } - i.attributes.style.position = - "absolute" === n.position ? "absolute" : "relative"; - delete n.position; - if (n.alignSelf) { - i.attributes.style.alignSelf = n.alignSelf; - delete n.alignSelf; - } - return i; - }; - t.fixDimensions = function fixDimensions(e) { - const t = e[r.$getSubformParent](); - if (t.layout?.includes("row")) { - const a = t[r.$extra], - n = e.colSpan; - let i; - i = - -1 === n - ? a.columnWidths - .slice(a.currentColumn) - .reduce((e, t) => e + t, 0) - : a.columnWidths - .slice(a.currentColumn, a.currentColumn + n) - .reduce((e, t) => e + t, 0); - isNaN(i) || (e.w = i); - } - t.layout && "position" !== t.layout && (e.x = e.y = 0); - "table" === e.layout && - "" === e.w && - Array.isArray(e.columnWidths) && - (e.w = e.columnWidths.reduce((e, t) => e + t, 0)); - }; - t.fixTextIndent = function fixTextIndent(e) { - const t = (0, i.getMeasurement)(e.textIndent, "0px"); - if (t >= 0) return; - const a = - "padding" + - ("left" == ("right" === e.textAlign ? "right" : "left") - ? "Left" - : "Right"), - r = (0, i.getMeasurement)(e[a], "0px"); - e[a] = r - t + "px"; - }; - t.fixURL = function fixURL(e) { - const t = (0, n.createValidAbsoluteUrl)(e, null, { - addDefaultProtocol: !0, - tryConvertEncoding: !0, - }); - return t ? t.href : null; - }; - t.isPrintOnly = isPrintOnly; - t.layoutClass = function layoutClass(e) { - switch (e.layout) { - case "position": - default: - return "xfaPosition"; - case "lr-tb": - return "xfaLrTb"; - case "rl-row": - return "xfaRlRow"; - case "rl-tb": - return "xfaRlTb"; - case "row": - return "xfaRow"; - case "table": - return "xfaTable"; - case "tb": - return "xfaTb"; - } - }; - t.layoutNode = function layoutNode(e, t) { - let a = null, - n = null, - i = !1; - if ((!e.w || !e.h) && e.value) { - let s = 0, - o = 0; - if (e.margin) { - s = e.margin.leftInset + e.margin.rightInset; - o = e.margin.topInset + e.margin.bottomInset; - } - let c = null, - l = null; - if (e.para) { - l = Object.create(null); - c = "" === e.para.lineHeight ? null : e.para.lineHeight; - l.top = "" === e.para.spaceAbove ? 0 : e.para.spaceAbove; - l.bottom = "" === e.para.spaceBelow ? 0 : e.para.spaceBelow; - l.left = "" === e.para.marginLeft ? 0 : e.para.marginLeft; - l.right = "" === e.para.marginRight ? 0 : e.para.marginRight; - } - let h = e.font; - if (!h) { - const t = e[r.$getTemplateRoot](); - let a = e[r.$getParent](); - for (; a && a !== t; ) { - if (a.font) { - h = a.font; - break; - } - a = a[r.$getParent](); - } - } - const u = (e.w || t.width) - s, - d = e[r.$globalData].fontFinder; - if ( - e.value.exData && - e.value.exData[r.$content] && - "text/html" === e.value.exData.contentType - ) { - const t = layoutText(e.value.exData[r.$content], h, l, c, d, u); - n = t.width; - a = t.height; - i = t.isBroken; - } else { - const t = e.value[r.$text](); - if (t) { - const e = layoutText(t, h, l, c, d, u); - n = e.width; - a = e.height; - i = e.isBroken; - } - } - null === n || e.w || (n += s); - null === a || e.h || (a += o); - } - return { w: n, h: a, isBroken: i }; - }; - t.measureToString = measureToString; - t.setAccess = function setAccess(e, t) { - switch (e.access) { - case "nonInteractive": - t.push("xfaNonInteractive"); - break; - case "readOnly": - t.push("xfaReadOnly"); - break; - case "protected": - t.push("xfaDisabled"); - } - }; - t.setFontFamily = function setFontFamily(e, t, a, r) { - if (!a) { - delete r.fontFamily; - return; - } - const n = (0, i.stripQuotes)(e.typeface); - r.fontFamily = `"${n}"`; - const o = a.find(n); - if (o) { - const { fontFamily: a } = o.regular.cssFontInfo; - a !== n && (r.fontFamily = `"${a}"`); - const i = getCurrentPara(t); - if (i && "" !== i.lineHeight) return; - if (r.lineHeight) return; - const c = (0, s.selectFont)(e, o); - c && (r.lineHeight = Math.max(1.2, c.lineHeight)); - } - }; - t.setMinMaxDimensions = function setMinMaxDimensions(e, t) { - if ("position" === e[r.$getSubformParent]().layout) { - e.minW > 0 && (t.minWidth = measureToString(e.minW)); - e.maxW > 0 && (t.maxWidth = measureToString(e.maxW)); - e.minH > 0 && (t.minHeight = measureToString(e.minH)); - e.maxH > 0 && (t.maxHeight = measureToString(e.maxH)); - } - }; - t.setPara = function setPara(e, t, a) { - if (a.attributes.class?.includes("xfaRich")) { - if (t) { - "" === e.h && (t.height = "auto"); - "" === e.w && (t.width = "auto"); - } - const n = getCurrentPara(e); - if (n) { - const e = a.attributes.style; - e.display = "flex"; - e.flexDirection = "column"; - switch (n.vAlign) { - case "top": - e.justifyContent = "start"; - break; - case "bottom": - e.justifyContent = "end"; - break; - case "middle": - e.justifyContent = "center"; - } - const t = n[r.$toStyle](); - for (const [a, r] of Object.entries(t)) a in e || (e[a] = r); - } - } - }; - t.toStyle = function toStyle(e, ...t) { - const a = Object.create(null); - for (const i of t) { - const t = e[i]; - if (null !== t) - if (l.hasOwnProperty(i)) l[i](e, a); - else if (t instanceof c.XFAObject) { - const e = t[r.$toStyle](); - e - ? Object.assign(a, e) - : (0, n.warn)( - `(DEBUG) - XFA - style for ${i} not implemented yet`, - ); - } - } - return a; - }; - var r = a(78), - n = a(2), - i = a(84), - s = a(85), - o = a(86), - c = a(87); - function measureToString(e) { - return "string" == typeof e - ? "0px" - : Number.isInteger(e) - ? `${e}px` - : `${e.toFixed(2)}px`; - } - const l = { - anchorType(e, t) { - const a = e[r.$getSubformParent](); - if (a && (!a.layout || "position" === a.layout)) { - "transform" in t || (t.transform = ""); - switch (e.anchorType) { - case "bottomCenter": - t.transform += "translate(-50%, -100%)"; - break; - case "bottomLeft": - t.transform += "translate(0,-100%)"; - break; - case "bottomRight": - t.transform += "translate(-100%,-100%)"; - break; - case "middleCenter": - t.transform += "translate(-50%,-50%)"; - break; - case "middleLeft": - t.transform += "translate(0,-50%)"; - break; - case "middleRight": - t.transform += "translate(-100%,-50%)"; - break; - case "topCenter": - t.transform += "translate(-50%,0)"; - break; - case "topRight": - t.transform += "translate(-100%,0)"; - } - } - }, - dimensions(e, t) { - const a = e[r.$getSubformParent](); - let n = e.w; - const i = e.h; - if (a.layout?.includes("row")) { - const t = a[r.$extra], - i = e.colSpan; - let s; - if (-1 === i) { - s = t.columnWidths - .slice(t.currentColumn) - .reduce((e, t) => e + t, 0); - t.currentColumn = 0; - } else { - s = t.columnWidths - .slice(t.currentColumn, t.currentColumn + i) - .reduce((e, t) => e + t, 0); - t.currentColumn = - (t.currentColumn + e.colSpan) % t.columnWidths.length; - } - isNaN(s) || (n = e.w = s); - } - t.width = "" !== n ? measureToString(n) : "auto"; - t.height = "" !== i ? measureToString(i) : "auto"; - }, - position(e, t) { - const a = e[r.$getSubformParent](); - if (!a?.layout || "position" === a.layout) { - t.position = "absolute"; - t.left = measureToString(e.x); - t.top = measureToString(e.y); - } - }, - rotate(e, t) { - if (e.rotate) { - "transform" in t || (t.transform = ""); - t.transform += `rotate(-${e.rotate}deg)`; - t.transformOrigin = "top left"; - } - }, - presence(e, t) { - switch (e.presence) { - case "invisible": - t.visibility = "hidden"; - break; - case "hidden": - case "inactive": - t.display = "none"; - } - }, - hAlign(e, t) { - if ("para" === e[r.$nodeName]) - switch (e.hAlign) { - case "justifyAll": - t.textAlign = "justify-all"; - break; - case "radix": - t.textAlign = "left"; - break; - default: - t.textAlign = e.hAlign; - } - else - switch (e.hAlign) { - case "left": - t.alignSelf = "start"; - break; - case "center": - t.alignSelf = "center"; - break; - case "right": - t.alignSelf = "end"; - } - }, - margin(e, t) { - e.margin && (t.margin = e.margin[r.$toStyle]().margin); - }, - }; - function layoutText(e, t, a, n, i, s) { - const c = new o.TextMeasure(t, a, n, i); - "string" == typeof e ? c.addString(e) : e[r.$pushGlyphs](c); - return c.compute(s); - } - function isPrintOnly(e) { - return ( - e.relevant.length > 0 && - !e.relevant[0].excluded && - "print" === e.relevant[0].viewname - ); - } - function getCurrentPara(e) { - const t = e[r.$getTemplateRoot]()[r.$extra].paraStack; - return t.length ? t.at(-1) : null; - } - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.HTMLResult = void 0; - t.getBBox = function getBBox(e) { - const t = -1; - if (!e) return { x: t, y: t, width: t, height: t }; - const a = e - .trim() - .split(/\s*,\s*/) - .map((e) => getMeasurement(e, "-1")); - if (a.length < 4 || a[2] < 0 || a[3] < 0) - return { x: t, y: t, width: t, height: t }; - const [r, n, i, s] = a; - return { x: r, y: n, width: i, height: s }; - }; - t.getColor = function getColor(e, t = [0, 0, 0]) { - let [a, r, n] = t; - if (!e) return { r: a, g: r, b: n }; - const i = e - .trim() - .split(/\s*,\s*/) - .map((e) => Math.min(Math.max(0, parseInt(e.trim(), 10)), 255)) - .map((e) => (isNaN(e) ? 0 : e)); - if (i.length < 3) return { r: a, g: r, b: n }; - [a, r, n] = i; - return { r: a, g: r, b: n }; - }; - t.getFloat = function getFloat({ - data: e, - defaultValue: t, - validate: a, - }) { - if (!e) return t; - e = e.trim(); - const r = parseFloat(e); - if (!isNaN(r) && a(r)) return r; - return t; - }; - t.getInteger = function getInteger({ - data: e, - defaultValue: t, - validate: a, - }) { - if (!e) return t; - e = e.trim(); - const r = parseInt(e, 10); - if (!isNaN(r) && a(r)) return r; - return t; - }; - t.getKeyword = getKeyword; - t.getMeasurement = getMeasurement; - t.getRatio = function getRatio(e) { - if (!e) return { num: 1, den: 1 }; - const t = e - .trim() - .split(/\s*:\s*/) - .map((e) => parseFloat(e)) - .filter((e) => !isNaN(e)); - 1 === t.length && t.push(1); - if (0 === t.length) return { num: 1, den: 1 }; - const [a, r] = t; - return { num: a, den: r }; - }; - t.getRelevant = function getRelevant(e) { - if (!e) return []; - return e - .trim() - .split(/\s+/) - .map((e) => ({ - excluded: "-" === e[0], - viewname: e.substring(1), - })); - }; - t.getStringOption = function getStringOption(e, t) { - return getKeyword({ - data: e, - defaultValue: t[0], - validate: (e) => t.includes(e), - }); - }; - t.stripQuotes = function stripQuotes(e) { - if (e.startsWith("'") || e.startsWith('"')) return e.slice(1, -1); - return e; - }; - var r = a(2); - const n = { - pt: (e) => e, - cm: (e) => (e / 2.54) * 72, - mm: (e) => (e / 25.4) * 72, - in: (e) => 72 * e, - px: (e) => e, - }, - i = /([+-]?\d+\.?\d*)(.*)/; - function getKeyword({ data: e, defaultValue: t, validate: a }) { - return e && a((e = e.trim())) ? e : t; - } - function getMeasurement(e, t = "0") { - t ||= "0"; - if (!e) return getMeasurement(t); - const a = e.trim().match(i); - if (!a) return getMeasurement(t); - const [, r, s] = a, - o = parseFloat(r); - if (isNaN(o)) return getMeasurement(t); - if (0 === o) return 0; - const c = n[s]; - return c ? c(o) : o; - } - class HTMLResult { - static get FAILURE() { - return (0, r.shadow)( - this, - "FAILURE", - new HTMLResult(!1, null, null, null), - ); - } - static get EMPTY() { - return (0, r.shadow)( - this, - "EMPTY", - new HTMLResult(!0, null, null, null), - ); - } - constructor(e, t, a, r) { - this.success = e; - this.html = t; - this.bbox = a; - this.breakNode = r; - } - isBreak() { - return !!this.breakNode; - } - static breakNode(e) { - return new HTMLResult(!1, null, null, e); - } - static success(e, t = null) { - return new HTMLResult(!0, e, t, null); - } - } - t.HTMLResult = HTMLResult; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.FontFinder = void 0; - t.getMetrics = function getMetrics(e, t = !1) { - let a = null; - if (e) { - const t = (0, n.stripQuotes)(e.typeface), - i = e[r.$globalData].fontFinder.find(t); - a = selectFont(e, i); - } - if (!a) return { lineHeight: 12, lineGap: 2, lineNoGap: 10 }; - const i = e.size || 10, - s = a.lineHeight ? Math.max(t ? 0 : 1.2, a.lineHeight) : 1.2, - o = void 0 === a.lineGap ? 0.2 : a.lineGap; - return { - lineHeight: s * i, - lineGap: o * i, - lineNoGap: Math.max(1, s - o) * i, - }; - }; - t.selectFont = selectFont; - var r = a(78), - n = a(84), - i = a(2); - t.FontFinder = class FontFinder { - constructor(e) { - this.fonts = new Map(); - this.cache = new Map(); - this.warned = new Set(); - this.defaultFont = null; - this.add(e); - } - add(e, t = null) { - for (const t of e) this.addPdfFont(t); - for (const e of this.fonts.values()) - e.regular || (e.regular = e.italic || e.bold || e.bolditalic); - if (!t || 0 === t.size) return; - const a = this.fonts.get("PdfJS-Fallback-PdfJS-XFA"); - for (const e of t) this.fonts.set(e, a); - } - addPdfFont(e) { - const t = e.cssFontInfo, - a = t.fontFamily; - let r = this.fonts.get(a); - if (!r) { - r = Object.create(null); - this.fonts.set(a, r); - this.defaultFont || (this.defaultFont = r); - } - let n = ""; - const i = parseFloat(t.fontWeight); - 0 !== parseFloat(t.italicAngle) - ? (n = i >= 700 ? "bolditalic" : "italic") - : i >= 700 && (n = "bold"); - if (!n) { - (e.name.includes("Bold") || e.psName?.includes("Bold")) && - (n = "bold"); - (e.name.includes("Italic") || - e.name.endsWith("It") || - e.psName?.includes("Italic") || - e.psName?.endsWith("It")) && - (n += "italic"); - } - n || (n = "regular"); - r[n] = e; - } - getDefault() { - return this.defaultFont; - } - find(e, t = !0) { - let a = this.fonts.get(e) || this.cache.get(e); - if (a) return a; - const r = /,|-|_| |bolditalic|bold|italic|regular|it/gi; - let n = e.replaceAll(r, ""); - a = this.fonts.get(n); - if (a) { - this.cache.set(e, a); - return a; - } - n = n.toLowerCase(); - const s = []; - for (const [e, t] of this.fonts.entries()) - e.replaceAll(r, "").toLowerCase().startsWith(n) && s.push(t); - if (0 === s.length) - for (const [, e] of this.fonts.entries()) - e.regular.name - ?.replaceAll(r, "") - .toLowerCase() - .startsWith(n) && s.push(e); - if (0 === s.length) { - n = n.replaceAll(/psmt|mt/gi, ""); - for (const [e, t] of this.fonts.entries()) - e.replaceAll(r, "").toLowerCase().startsWith(n) && s.push(t); - } - if (0 === s.length) - for (const e of this.fonts.values()) - e.regular.name - ?.replaceAll(r, "") - .toLowerCase() - .startsWith(n) && s.push(e); - if (s.length >= 1) { - 1 !== s.length && - t && - (0, i.warn)( - `XFA - Too many choices to guess the correct font: ${e}`, - ); - this.cache.set(e, s[0]); - return s[0]; - } - if (t && !this.warned.has(e)) { - this.warned.add(e); - (0, i.warn)(`XFA - Cannot find the font: ${e}`); - } - return null; - } - }; - function selectFont(e, t) { - return "italic" === e.posture - ? "bold" === e.weight - ? t.bolditalic - : t.italic - : "bold" === e.weight - ? t.bold - : t.regular; - } - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.TextMeasure = void 0; - var r = a(85); - class FontInfo { - constructor(e, t, a, n) { - this.lineHeight = a; - this.paraMargin = t || { top: 0, bottom: 0, left: 0, right: 0 }; - if (!e) { - [this.pdfFont, this.xfaFont] = this.defaultFont(n); - return; - } - this.xfaFont = { - typeface: e.typeface, - posture: e.posture, - weight: e.weight, - size: e.size, - letterSpacing: e.letterSpacing, - }; - const i = n.find(e.typeface); - if (i) { - this.pdfFont = (0, r.selectFont)(e, i); - this.pdfFont || - ([this.pdfFont, this.xfaFont] = this.defaultFont(n)); - } else [this.pdfFont, this.xfaFont] = this.defaultFont(n); - } - defaultFont(e) { - const t = - e.find("Helvetica", !1) || - e.find("Myriad Pro", !1) || - e.find("Arial", !1) || - e.getDefault(); - if (t?.regular) { - const e = t.regular; - return [ - e, - { - typeface: e.cssFontInfo.fontFamily, - posture: "normal", - weight: "normal", - size: 10, - letterSpacing: 0, - }, - ]; - } - return [ - null, - { - typeface: "Courier", - posture: "normal", - weight: "normal", - size: 10, - letterSpacing: 0, - }, - ]; - } - } - class FontSelector { - constructor(e, t, a, r) { - this.fontFinder = r; - this.stack = [new FontInfo(e, t, a, r)]; - } - pushData(e, t, a) { - const r = this.stack.at(-1); - for (const t of [ - "typeface", - "posture", - "weight", - "size", - "letterSpacing", - ]) - e[t] || (e[t] = r.xfaFont[t]); - for (const e of ["top", "bottom", "left", "right"]) - isNaN(t[e]) && (t[e] = r.paraMargin[e]); - const n = new FontInfo(e, t, a || r.lineHeight, this.fontFinder); - n.pdfFont || (n.pdfFont = r.pdfFont); - this.stack.push(n); - } - popFont() { - this.stack.pop(); - } - topFont() { - return this.stack.at(-1); - } - } - t.TextMeasure = class TextMeasure { - constructor(e, t, a, r) { - this.glyphs = []; - this.fontSelector = new FontSelector(e, t, a, r); - this.extraHeight = 0; - } - pushData(e, t, a) { - this.fontSelector.pushData(e, t, a); - } - popFont(e) { - return this.fontSelector.popFont(); - } - addPara() { - const e = this.fontSelector.topFont(); - this.extraHeight += e.paraMargin.top + e.paraMargin.bottom; - } - addString(e) { - if (!e) return; - const t = this.fontSelector.topFont(), - a = t.xfaFont.size; - if (t.pdfFont) { - const r = t.xfaFont.letterSpacing, - n = t.pdfFont, - i = n.lineHeight || 1.2, - s = t.lineHeight || Math.max(1.2, i) * a, - o = i - (void 0 === n.lineGap ? 0.2 : n.lineGap), - c = Math.max(1, o) * a, - l = a / 1e3, - h = n.defaultWidth || n.charsToGlyphs(" ")[0].width; - for (const t of e.split(/[\u2029\n]/)) { - const e = n.encodeString(t).join(""), - a = n.charsToGlyphs(e); - for (const e of a) { - const t = e.width || h; - this.glyphs.push([t * l + r, s, c, e.unicode, !1]); - } - this.glyphs.push([0, 0, 0, "\n", !0]); - } - this.glyphs.pop(); - } else { - for (const t of e.split(/[\u2029\n]/)) { - for (const e of t.split("")) - this.glyphs.push([a, 1.2 * a, a, e, !1]); - this.glyphs.push([0, 0, 0, "\n", !0]); - } - this.glyphs.pop(); - } - } - compute(e) { - let t = -1, - a = 0, - r = 0, - n = 0, - i = 0, - s = 0, - o = !1, - c = !0; - for (let l = 0, h = this.glyphs.length; l < h; l++) { - const [h, u, d, f, g] = this.glyphs[l], - p = " " === f, - m = c ? d : u; - if (g) { - r = Math.max(r, i); - i = 0; - n += s; - s = m; - t = -1; - a = 0; - c = !1; - } else if (p) - if (i + h > e) { - r = Math.max(r, i); - i = 0; - n += s; - s = m; - t = -1; - a = 0; - o = !0; - c = !1; - } else { - s = Math.max(m, s); - a = i; - i += h; - t = l; - } - else if (i + h > e) { - n += s; - s = m; - if (-1 !== t) { - l = t; - r = Math.max(r, a); - i = 0; - t = -1; - a = 0; - } else { - r = Math.max(r, i); - i = h; - } - o = !0; - c = !1; - } else { - i += h; - s = Math.max(m, s); - } - } - r = Math.max(r, i); - n += s + this.extraHeight; - return { width: 1.02 * r, height: n, isBroken: o }; - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.XmlObject = - t.XFAObjectArray = - t.XFAObject = - t.XFAAttribute = - t.StringObject = - t.OptionObject = - t.Option10 = - t.Option01 = - t.IntegerObject = - t.ContentObject = - void 0; - var r = a(78), - n = a(84), - i = a(2), - s = a(3), - o = a(81), - c = a(88); - const l = Symbol(), - h = Symbol(), - u = Symbol(), - d = Symbol("_children"), - f = Symbol(), - g = Symbol(), - p = Symbol(), - m = Symbol(), - b = Symbol(), - y = Symbol(), - w = Symbol(), - S = Symbol(), - x = Symbol(), - C = Symbol("parent"), - k = Symbol(), - v = Symbol(), - F = Symbol(); - let O = 0; - const T = o.NamespaceIds.datasets.id; - class XFAObject { - constructor(e, t, a = !1) { - this[r.$namespaceId] = e; - this[r.$nodeName] = t; - this[w] = a; - this[C] = null; - this[d] = []; - this[r.$uid] = `${t}${O++}`; - this[r.$globalData] = null; - } - get isXFAObject() { - return !0; - } - get isXFAObjectArray() { - return !1; - } - createNodes(e) { - let t = this, - a = null; - for (const { name: n, index: i } of e) { - for (let e = 0, s = isFinite(i) ? i : 0; e <= s; e++) { - const e = t[r.$namespaceId] === T ? -1 : t[r.$namespaceId]; - a = new XmlObject(e, n); - t[r.$appendChild](a); - } - t = a; - } - return a; - } - [r.$onChild](e) { - if (!this[w] || !this[r.$onChildCheck](e)) return !1; - const t = e[r.$nodeName], - a = this[t]; - if (!(a instanceof XFAObjectArray)) { - null !== a && this[r.$removeChild](a); - this[t] = e; - this[r.$appendChild](e); - return !0; - } - if (a.push(e)) { - this[r.$appendChild](e); - return !0; - } - let n = ""; - this.id - ? (n = ` (id: ${this.id})`) - : this.name && (n = ` (name: ${this.name} ${this.h.value})`); - (0, i.warn)( - `XFA - node "${this[r.$nodeName]}"${n} has already enough "${t}"!`, - ); - return !1; - } - [r.$onChildCheck](e) { - return ( - this.hasOwnProperty(e[r.$nodeName]) && - e[r.$namespaceId] === this[r.$namespaceId] - ); - } - [r.$isNsAgnostic]() { - return !1; - } - [r.$acceptWhitespace]() { - return !1; - } - [r.$isCDATAXml]() { - return !1; - } - [r.$isBindable]() { - return !1; - } - [r.$popPara]() { - this.para && this[r.$getTemplateRoot]()[r.$extra].paraStack.pop(); - } - [r.$pushPara]() { - this[r.$getTemplateRoot]()[r.$extra].paraStack.push(this.para); - } - [r.$setId](e) { - this.id && - this[r.$namespaceId] === o.NamespaceIds.template.id && - e.set(this.id, this); - } - [r.$getTemplateRoot]() { - return this[r.$globalData].template; - } - [r.$isSplittable]() { - return !1; - } - [r.$isThereMoreWidth]() { - return !1; - } - [r.$appendChild](e) { - e[C] = this; - this[d].push(e); - !e[r.$globalData] && - this[r.$globalData] && - (e[r.$globalData] = this[r.$globalData]); - } - [r.$removeChild](e) { - const t = this[d].indexOf(e); - this[d].splice(t, 1); - } - [r.$hasSettableValue]() { - return this.hasOwnProperty("value"); - } - [r.$setValue](e) {} - [r.$onText](e) {} - [r.$finalize]() {} - [r.$clean](e) { - delete this[w]; - if (this[r.$cleanup]) { - e.clean(this[r.$cleanup]); - delete this[r.$cleanup]; - } - } - [r.$indexOf](e) { - return this[d].indexOf(e); - } - [r.$insertAt](e, t) { - t[C] = this; - this[d].splice(e, 0, t); - !t[r.$globalData] && - this[r.$globalData] && - (t[r.$globalData] = this[r.$globalData]); - } - [r.$isTransparent]() { - return !this.name; - } - [r.$lastAttribute]() { - return ""; - } - [r.$text]() { - return 0 === this[d].length - ? this[r.$content] - : this[d].map((e) => e[r.$text]()).join(""); - } - get [u]() { - const e = Object.getPrototypeOf(this); - if (!e._attributes) { - const t = (e._attributes = new Set()); - for (const e of Object.getOwnPropertyNames(this)) { - if ( - null === this[e] || - this[e] instanceof XFAObject || - this[e] instanceof XFAObjectArray - ) - break; - t.add(e); - } - } - return (0, i.shadow)(this, u, e._attributes); - } - [r.$isDescendent](e) { - let t = this; - for (; t; ) { - if (t === e) return !0; - t = t[r.$getParent](); - } - return !1; - } - [r.$getParent]() { - return this[C]; - } - [r.$getSubformParent]() { - return this[r.$getParent](); - } - [r.$getChildren](e = null) { - return e ? this[e] : this[d]; - } - [r.$dump]() { - const e = Object.create(null); - this[r.$content] && (e.$content = this[r.$content]); - for (const t of Object.getOwnPropertyNames(this)) { - const a = this[t]; - null !== a && - (a instanceof XFAObject - ? (e[t] = a[r.$dump]()) - : a instanceof XFAObjectArray - ? a.isEmpty() || (e[t] = a.dump()) - : (e[t] = a)); - } - return e; - } - [r.$toStyle]() { - return null; - } - [r.$toHTML]() { - return n.HTMLResult.EMPTY; - } - *[r.$getContainedChildren]() { - for (const e of this[r.$getChildren]()) yield e; - } - *[m](e, t) { - for (const a of this[r.$getContainedChildren]()) - if (!e || t === e.has(a[r.$nodeName])) { - const e = this[r.$getAvailableSpace](), - t = a[r.$toHTML](e); - t.success || (this[r.$extra].failingNode = a); - yield t; - } - } - [r.$flushHTML]() { - return null; - } - [r.$addHTML](e, t) { - this[r.$extra].children.push(e); - } - [r.$getAvailableSpace]() {} - [r.$childrenToHTML]({ filter: e = null, include: t = !0 }) { - if (this[r.$extra].generator) { - const e = this[r.$getAvailableSpace](), - t = this[r.$extra].failingNode[r.$toHTML](e); - if (!t.success) return t; - t.html && this[r.$addHTML](t.html, t.bbox); - delete this[r.$extra].failingNode; - } else this[r.$extra].generator = this[m](e, t); - for (;;) { - const e = this[r.$extra].generator.next(); - if (e.done) break; - const t = e.value; - if (!t.success) return t; - t.html && this[r.$addHTML](t.html, t.bbox); - } - this[r.$extra].generator = null; - return n.HTMLResult.EMPTY; - } - [r.$setSetAttributes](e) { - this[v] = new Set(Object.keys(e)); - } - [y](e) { - const t = this[u], - a = this[v]; - return [...e].filter((e) => t.has(e) && !a.has(e)); - } - [r.$resolvePrototypes](e, t = new Set()) { - for (const a of this[d]) a[k](e, t); - } - [k](e, t) { - const a = this[b](e, t); - a ? this[l](a, e, t) : this[r.$resolvePrototypes](e, t); - } - [b](e, t) { - const { use: a, usehref: n } = this; - if (!a && !n) return null; - let s = null, - o = null, - h = null, - u = a; - if (n) { - u = n; - n.startsWith("#som(") && n.endsWith(")") - ? (o = n.slice(5, -1)) - : n.startsWith(".#som(") && n.endsWith(")") - ? (o = n.slice(6, -1)) - : n.startsWith("#") - ? (h = n.slice(1)) - : n.startsWith(".#") && (h = n.slice(2)); - } else a.startsWith("#") ? (h = a.slice(1)) : (o = a); - this.use = this.usehref = ""; - if (h) s = e.get(h); - else { - s = (0, c.searchNode)(e.get(r.$root), this, o, !0, !1); - s && (s = s[0]); - } - if (!s) { - (0, i.warn)(`XFA - Invalid prototype reference: ${u}.`); - return null; - } - if (s[r.$nodeName] !== this[r.$nodeName]) { - (0, i.warn)( - `XFA - Incompatible prototype: ${s[r.$nodeName]} !== ${this[r.$nodeName]}.`, - ); - return null; - } - if (t.has(s)) { - (0, i.warn)("XFA - Cycle detected in prototypes use."); - return null; - } - t.add(s); - const d = s[b](e, t); - d && s[l](d, e, t); - s[r.$resolvePrototypes](e, t); - t.delete(s); - return s; - } - [l](e, t, a) { - if (a.has(e)) { - (0, i.warn)("XFA - Cycle detected in prototypes use."); - return; - } - !this[r.$content] && - e[r.$content] && - (this[r.$content] = e[r.$content]); - new Set(a).add(e); - for (const t of this[y](e[v])) { - this[t] = e[t]; - this[v] && this[v].add(t); - } - for (const n of Object.getOwnPropertyNames(this)) { - if (this[u].has(n)) continue; - const i = this[n], - s = e[n]; - if (i instanceof XFAObjectArray) { - for (const e of i[d]) e[k](t, a); - for (let n = i[d].length, o = s[d].length; n < o; n++) { - const s = e[d][n][r.$clone](); - if (!i.push(s)) break; - s[C] = this; - this[d].push(s); - s[k](t, a); - } - } else if (null === i) { - if (null !== s) { - const e = s[r.$clone](); - e[C] = this; - this[n] = e; - this[d].push(e); - e[k](t, a); - } - } else { - i[r.$resolvePrototypes](t, a); - s && i[l](s, t, a); - } - } - } - static [f](e) { - return Array.isArray(e) - ? e.map((e) => XFAObject[f](e)) - : "object" == typeof e && null !== e - ? Object.assign({}, e) - : e; - } - [r.$clone]() { - const e = Object.create(Object.getPrototypeOf(this)); - for (const t of Object.getOwnPropertySymbols(this)) - try { - e[t] = this[t]; - } catch { - (0, i.shadow)(e, t, this[t]); - } - e[r.$uid] = `${e[r.$nodeName]}${O++}`; - e[d] = []; - for (const t of Object.getOwnPropertyNames(this)) { - if (this[u].has(t)) { - e[t] = XFAObject[f](this[t]); - continue; - } - const a = this[t]; - e[t] = - a instanceof XFAObjectArray ? new XFAObjectArray(a[S]) : null; - } - for (const t of this[d]) { - const a = t[r.$nodeName], - n = t[r.$clone](); - e[d].push(n); - n[C] = e; - null === e[a] ? (e[a] = n) : e[a][d].push(n); - } - return e; - } - [r.$getChildren](e = null) { - return e ? this[d].filter((t) => t[r.$nodeName] === e) : this[d]; - } - [r.$getChildrenByClass](e) { - return this[e]; - } - [r.$getChildrenByName](e, t, a = !0) { - return Array.from(this[r.$getChildrenByNameIt](e, t, a)); - } - *[r.$getChildrenByNameIt](e, t, a = !0) { - if ("parent" !== e) { - for (const a of this[d]) { - a[r.$nodeName] === e && (yield a); - a.name === e && (yield a); - (t || a[r.$isTransparent]()) && - (yield* a[r.$getChildrenByNameIt](e, t, !1)); - } - a && - this[u].has(e) && - (yield new XFAAttribute(this, e, this[e])); - } else yield this[C]; - } - } - t.XFAObject = XFAObject; - class XFAObjectArray { - constructor(e = 1 / 0) { - this[S] = e; - this[d] = []; - } - get isXFAObject() { - return !1; - } - get isXFAObjectArray() { - return !0; - } - push(e) { - if (this[d].length <= this[S]) { - this[d].push(e); - return !0; - } - (0, i.warn)( - `XFA - node "${e[r.$nodeName]}" accepts no more than ${this[S]} children`, - ); - return !1; - } - isEmpty() { - return 0 === this[d].length; - } - dump() { - return 1 === this[d].length - ? this[d][0][r.$dump]() - : this[d].map((e) => e[r.$dump]()); - } - [r.$clone]() { - const e = new XFAObjectArray(this[S]); - e[d] = this[d].map((e) => e[r.$clone]()); - return e; - } - get children() { - return this[d]; - } - clear() { - this[d].length = 0; - } - } - t.XFAObjectArray = XFAObjectArray; - class XFAAttribute { - constructor(e, t, a) { - this[C] = e; - this[r.$nodeName] = t; - this[r.$content] = a; - this[r.$consumed] = !1; - this[r.$uid] = "attribute" + O++; - } - [r.$getParent]() { - return this[C]; - } - [r.$isDataValue]() { - return !0; - } - [r.$getDataValue]() { - return this[r.$content].trim(); - } - [r.$setValue](e) { - e = e.value || ""; - this[r.$content] = e.toString(); - } - [r.$text]() { - return this[r.$content]; - } - [r.$isDescendent](e) { - return this[C] === e || this[C][r.$isDescendent](e); - } - } - t.XFAAttribute = XFAAttribute; - class XmlObject extends XFAObject { - constructor(e, t, a = {}) { - super(e, t); - this[r.$content] = ""; - this[g] = null; - if ("#text" !== t) { - const e = new Map(); - this[h] = e; - for (const [t, r] of Object.entries(a)) - e.set(t, new XFAAttribute(this, t, r)); - if (a.hasOwnProperty(r.$nsAttributes)) { - const e = a[r.$nsAttributes].xfa.dataNode; - void 0 !== e && - ("dataGroup" === e - ? (this[g] = !1) - : "dataValue" === e && (this[g] = !0)); - } - } - this[r.$consumed] = !1; - } - [r.$toString](e) { - const t = this[r.$nodeName]; - if ("#text" === t) { - e.push((0, s.encodeToXmlString)(this[r.$content])); - return; - } - const a = (0, i.utf8StringToString)(t), - n = this[r.$namespaceId] === T ? "xfa:" : ""; - e.push(`<${n}${a}`); - for (const [t, a] of this[h].entries()) { - const n = (0, i.utf8StringToString)(t); - e.push(` ${n}="${(0, s.encodeToXmlString)(a[r.$content])}"`); - } - null !== this[g] && - (this[g] - ? e.push(' xfa:dataNode="dataValue"') - : e.push(' xfa:dataNode="dataGroup"')); - if (this[r.$content] || 0 !== this[d].length) { - e.push(">"); - if (this[r.$content]) - "string" == typeof this[r.$content] - ? e.push((0, s.encodeToXmlString)(this[r.$content])) - : this[r.$content][r.$toString](e); - else for (const t of this[d]) t[r.$toString](e); - e.push(``); - } else e.push("/>"); - } - [r.$onChild](e) { - if (this[r.$content]) { - const e = new XmlObject(this[r.$namespaceId], "#text"); - this[r.$appendChild](e); - e[r.$content] = this[r.$content]; - this[r.$content] = ""; - } - this[r.$appendChild](e); - return !0; - } - [r.$onText](e) { - this[r.$content] += e; - } - [r.$finalize]() { - if (this[r.$content] && this[d].length > 0) { - const e = new XmlObject(this[r.$namespaceId], "#text"); - this[r.$appendChild](e); - e[r.$content] = this[r.$content]; - delete this[r.$content]; - } - } - [r.$toHTML]() { - return "#text" === this[r.$nodeName] - ? n.HTMLResult.success({ - name: "#text", - value: this[r.$content], - }) - : n.HTMLResult.EMPTY; - } - [r.$getChildren](e = null) { - return e ? this[d].filter((t) => t[r.$nodeName] === e) : this[d]; - } - [r.$getAttributes]() { - return this[h]; - } - [r.$getChildrenByClass](e) { - const t = this[h].get(e); - return void 0 !== t ? t : this[r.$getChildren](e); - } - *[r.$getChildrenByNameIt](e, t) { - const a = this[h].get(e); - a && (yield a); - for (const a of this[d]) { - a[r.$nodeName] === e && (yield a); - t && (yield* a[r.$getChildrenByNameIt](e, t)); - } - } - *[r.$getAttributeIt](e, t) { - const a = this[h].get(e); - !a || (t && a[r.$consumed]) || (yield a); - for (const a of this[d]) yield* a[r.$getAttributeIt](e, t); - } - *[r.$getRealChildrenByNameIt](e, t, a) { - for (const n of this[d]) { - n[r.$nodeName] !== e || (a && n[r.$consumed]) || (yield n); - t && (yield* n[r.$getRealChildrenByNameIt](e, t, a)); - } - } - [r.$isDataValue]() { - return null === this[g] - ? 0 === this[d].length || - this[d][0][r.$namespaceId] === o.NamespaceIds.xhtml.id - : this[g]; - } - [r.$getDataValue]() { - return null === this[g] - ? 0 === this[d].length - ? this[r.$content].trim() - : this[d][0][r.$namespaceId] === o.NamespaceIds.xhtml.id - ? this[d][0][r.$text]().trim() - : null - : this[r.$content].trim(); - } - [r.$setValue](e) { - e = e.value || ""; - this[r.$content] = e.toString(); - } - [r.$dump](e = !1) { - const t = Object.create(null); - e && (t.$ns = this[r.$namespaceId]); - this[r.$content] && (t.$content = this[r.$content]); - t.$name = this[r.$nodeName]; - t.children = []; - for (const a of this[d]) t.children.push(a[r.$dump](e)); - t.attributes = Object.create(null); - for (const [e, a] of this[h]) t.attributes[e] = a[r.$content]; - return t; - } - } - t.XmlObject = XmlObject; - class ContentObject extends XFAObject { - constructor(e, t) { - super(e, t); - this[r.$content] = ""; - } - [r.$onText](e) { - this[r.$content] += e; - } - [r.$finalize]() {} - } - t.ContentObject = ContentObject; - class OptionObject extends ContentObject { - constructor(e, t, a) { - super(e, t); - this[x] = a; - } - [r.$finalize]() { - this[r.$content] = (0, n.getKeyword)({ - data: this[r.$content], - defaultValue: this[x][0], - validate: (e) => this[x].includes(e), - }); - } - [r.$clean](e) { - super[r.$clean](e); - delete this[x]; - } - } - t.OptionObject = OptionObject; - class StringObject extends ContentObject { - [r.$finalize]() { - this[r.$content] = this[r.$content].trim(); - } - } - t.StringObject = StringObject; - class IntegerObject extends ContentObject { - constructor(e, t, a, r) { - super(e, t); - this[p] = a; - this[F] = r; - } - [r.$finalize]() { - this[r.$content] = (0, n.getInteger)({ - data: this[r.$content], - defaultValue: this[p], - validate: this[F], - }); - } - [r.$clean](e) { - super[r.$clean](e); - delete this[p]; - delete this[F]; - } - } - t.IntegerObject = IntegerObject; - t.Option01 = class Option01 extends IntegerObject { - constructor(e, t) { - super(e, t, 0, (e) => 1 === e); - } - }; - t.Option10 = class Option10 extends IntegerObject { - constructor(e, t) { - super(e, t, 1, (e) => 0 === e); - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.createDataNode = function createDataNode(e, t, a) { - const i = parseExpression(a); - if (!i) return null; - if (i.some((e) => e.operator === o.dotDot)) return null; - const s = c.get(i[0].name); - let l = 0; - if (s) { - e = s(e, t); - l = 1; - } else e = t || e; - for (let t = i.length; l < t; l++) { - const { name: t, operator: a, index: s } = i[l]; - if (!isFinite(s)) { - i[l].index = 0; - return e.createNodes(i.slice(l)); - } - let c; - switch (a) { - case o.dot: - c = e[r.$getChildrenByName](t, !1); - break; - case o.dotDot: - c = e[r.$getChildrenByName](t, !0); - break; - case o.dotHash: - c = e[r.$getChildrenByClass](t); - c = c.isXFAObjectArray ? c.children : [c]; - } - if (0 === c.length) return e.createNodes(i.slice(l)); - if (!(s < c.length)) { - i[l].index = s - c.length; - return e.createNodes(i.slice(l)); - } - { - const t = c[s]; - if (!t.isXFAObject) { - (0, n.warn)("XFA - Cannot create a node."); - return null; - } - e = t; - } - } - return null; - }; - t.searchNode = function searchNode(e, t, a, n = !0, i = !0) { - const s = parseExpression(a, n); - if (!s) return null; - const h = c.get(s[0].name); - let u, - d = 0; - if (h) { - u = !0; - e = [h(e, t)]; - d = 1; - } else { - u = null === t; - e = [t || e]; - } - for (let a = s.length; d < a; d++) { - const { name: a, cacheName: n, operator: c, index: h } = s[d], - f = []; - for (const t of e) { - if (!t.isXFAObject) continue; - let e, s; - if (i) { - s = l.get(t); - if (!s) { - s = new Map(); - l.set(t, s); - } - e = s.get(n); - } - if (!e) { - switch (c) { - case o.dot: - e = t[r.$getChildrenByName](a, !1); - break; - case o.dotDot: - e = t[r.$getChildrenByName](a, !0); - break; - case o.dotHash: - e = t[r.$getChildrenByClass](a); - e = e.isXFAObjectArray ? e.children : [e]; - } - i && s.set(n, e); - } - e.length > 0 && f.push(e); - } - if (0 !== f.length || u || 0 !== d) - e = isFinite(h) - ? f.filter((e) => h < e.length).map((e) => e[h]) - : f.flat(); - else { - const a = t[r.$getParent](); - if (!(t = a)) return null; - d = -1; - e = [t]; - } - } - if (0 === e.length) return null; - return e; - }; - var r = a(78), - n = a(2); - const i = /^[^.[]+/, - s = /^[^\]]+/, - o = { dot: 0, dotDot: 1, dotHash: 2, dotBracket: 3, dotParen: 4 }, - c = new Map([ - ["$data", (e, t) => (e.datasets ? e.datasets.data : e)], - [ - "$record", - (e, t) => - (e.datasets ? e.datasets.data : e)[r.$getChildren]()[0], - ], - ["$template", (e, t) => e.template], - ["$connectionSet", (e, t) => e.connectionSet], - ["$form", (e, t) => e.form], - ["$layout", (e, t) => e.layout], - ["$host", (e, t) => e.host], - ["$dataWindow", (e, t) => e.dataWindow], - ["$event", (e, t) => e.event], - ["!", (e, t) => e.datasets], - ["$xfa", (e, t) => e], - ["xfa", (e, t) => e], - ["$", (e, t) => t], - ]), - l = new WeakMap(); - function parseExpression(e, t, a = !0) { - let r = e.match(i); - if (!r) return null; - let [c] = r; - const l = [ - { - name: c, - cacheName: "." + c, - index: 0, - js: null, - formCalc: null, - operator: o.dot, - }, - ]; - let h = c.length; - for (; h < e.length; ) { - const d = h; - if ("[" === e.charAt(h++)) { - r = e.slice(h).match(s); - if (!r) { - (0, n.warn)("XFA - Invalid index in SOM expression"); - return null; - } - l.at(-1).index = - "*" === (u = (u = r[0]).trim()) - ? 1 / 0 - : parseInt(u, 10) || 0; - h += r[0].length + 1; - continue; - } - let f; - switch (e.charAt(h)) { - case ".": - if (!t) return null; - h++; - f = o.dotDot; - break; - case "#": - h++; - f = o.dotHash; - break; - case "[": - if (a) { - (0, n.warn)( - "XFA - SOM expression contains a FormCalc subexpression which is not supported for now.", - ); - return null; - } - f = o.dotBracket; - break; - case "(": - if (a) { - (0, n.warn)( - "XFA - SOM expression contains a JavaScript subexpression which is not supported for now.", - ); - return null; - } - f = o.dotParen; - break; - default: - f = o.dot; - } - r = e.slice(h).match(i); - if (!r) break; - [c] = r; - h += c.length; - l.push({ - name: c, - cacheName: e.slice(d, h), - operator: f, - index: 0, - js: null, - formCalc: null, - }); - } - var u; - return l; - } - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.DataHandler = void 0; - var r = a(78); - t.DataHandler = class DataHandler { - constructor(e, t) { - this.data = t; - this.dataset = e.datasets || null; - } - serialize(e) { - const t = [[-1, this.data[r.$getChildren]()]]; - for (; t.length > 0; ) { - const a = t.at(-1), - [n, i] = a; - if (n + 1 === i.length) { - t.pop(); - continue; - } - const s = i[++a[0]], - o = e.get(s[r.$uid]); - if (o) s[r.$setValue](o); - else { - const t = s[r.$getAttributes](); - for (const a of t.values()) { - const t = e.get(a[r.$uid]); - if (t) { - a[r.$setValue](t); - break; - } - } - } - const c = s[r.$getChildren](); - c.length > 0 && t.push([-1, c]); - } - const a = [ - '', - ]; - if (this.dataset) - for (const e of this.dataset[r.$getChildren]()) - "data" !== e[r.$nodeName] && e[r.$toString](a); - this.data[r.$toString](a); - a.push(""); - return a.join(""); - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.XFAParser = void 0; - var r = a(78), - n = a(71), - i = a(91), - s = a(2); - class XFAParser extends n.XMLParserBase { - constructor(e = null, t = !1) { - super(); - this._builder = new i.Builder(e); - this._stack = []; - this._globalData = { usedTypefaces: new Set() }; - this._ids = new Map(); - this._current = this._builder.buildRoot(this._ids); - this._errorCode = n.XMLParserErrorCode.NoError; - this._whiteRegex = /^\s+$/; - this._nbsps = /\xa0+/g; - this._richText = t; - } - parse(e) { - this.parseXml(e); - if (this._errorCode === n.XMLParserErrorCode.NoError) { - this._current[r.$finalize](); - return this._current.element; - } - } - onText(e) { - e = e.replace(this._nbsps, (e) => e.slice(1) + " "); - this._richText || this._current[r.$acceptWhitespace]() - ? this._current[r.$onText](e, this._richText) - : this._whiteRegex.test(e) || - this._current[r.$onText](e.trim()); - } - onCdata(e) { - this._current[r.$onText](e); - } - _mkAttributes(e, t) { - let a = null, - n = null; - const i = Object.create({}); - for (const { name: o, value: c } of e) - if ("xmlns" === o) - a - ? (0, s.warn)( - `XFA - multiple namespace definition in <${t}>`, - ) - : (a = c); - else if (o.startsWith("xmlns:")) { - const e = o.substring(6); - n || (n = []); - n.push({ prefix: e, value: c }); - } else { - const e = o.indexOf(":"); - if (-1 === e) i[o] = c; - else { - let t = i[r.$nsAttributes]; - t || (t = i[r.$nsAttributes] = Object.create(null)); - const [a, n] = [o.slice(0, e), o.slice(e + 1)]; - (t[a] ||= Object.create(null))[n] = c; - } - } - return [a, n, i]; - } - _getNameAndPrefix(e, t) { - const a = e.indexOf(":"); - return -1 === a - ? [e, null] - : [e.substring(a + 1), t ? "" : e.substring(0, a)]; - } - onBeginElement(e, t, a) { - const [n, i, s] = this._mkAttributes(t, e), - [o, c] = this._getNameAndPrefix( - e, - this._builder.isNsAgnostic(), - ), - l = this._builder.build({ - nsPrefix: c, - name: o, - attributes: s, - namespace: n, - prefixes: i, - }); - l[r.$globalData] = this._globalData; - if (a) { - l[r.$finalize](); - this._current[r.$onChild](l) && l[r.$setId](this._ids); - l[r.$clean](this._builder); - } else { - this._stack.push(this._current); - this._current = l; - } - } - onEndElement(e) { - const t = this._current; - if (t[r.$isCDATAXml]() && "string" == typeof t[r.$content]) { - const e = new XFAParser(); - e._globalData = this._globalData; - const a = e.parse(t[r.$content]); - t[r.$content] = null; - t[r.$onChild](a); - } - t[r.$finalize](); - this._current = this._stack.pop(); - this._current[r.$onChild](t) && t[r.$setId](this._ids); - t[r.$clean](this._builder); - } - onError(e) { - this._errorCode = e; - } - } - t.XFAParser = XFAParser; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.Builder = void 0; - var r = a(81), - n = a(78), - i = a(92), - s = a(80), - o = a(101), - c = a(2), - l = a(87); - class Root extends l.XFAObject { - constructor(e) { - super(-1, "root", Object.create(null)); - this.element = null; - this[n.$ids] = e; - } - [n.$onChild](e) { - this.element = e; - return !0; - } - [n.$finalize]() { - super[n.$finalize](); - if (this.element.template instanceof s.Template) { - this[n.$ids].set(n.$root, this.element); - this.element.template[n.$resolvePrototypes](this[n.$ids]); - this.element.template[n.$ids] = this[n.$ids]; - } - } - } - class Empty extends l.XFAObject { - constructor() { - super(-1, "", Object.create(null)); - } - [n.$onChild](e) { - return !1; - } - } - t.Builder = class Builder { - constructor(e = null) { - this._namespaceStack = []; - this._nsAgnosticLevel = 0; - this._namespacePrefixes = new Map(); - this._namespaces = new Map(); - this._nextNsId = Math.max( - ...Object.values(r.NamespaceIds).map(({ id: e }) => e), - ); - this._currentNamespace = - e || new o.UnknownNamespace(++this._nextNsId); - } - buildRoot(e) { - return new Root(e); - } - build({ - nsPrefix: e, - name: t, - attributes: a, - namespace: s, - prefixes: o, - }) { - const c = null !== s; - if (c) { - this._namespaceStack.push(this._currentNamespace); - this._currentNamespace = this._searchNamespace(s); - } - o && this._addNamespacePrefix(o); - if (a.hasOwnProperty(n.$nsAttributes)) { - const e = i.NamespaceSetUp.datasets, - t = a[n.$nsAttributes]; - let r = null; - for (const [a, n] of Object.entries(t)) { - if (this._getNamespaceToUse(a) === e) { - r = { xfa: n }; - break; - } - } - r ? (a[n.$nsAttributes] = r) : delete a[n.$nsAttributes]; - } - const l = this._getNamespaceToUse(e), - h = l?.[r.$buildXFAObject](t, a) || new Empty(); - h[n.$isNsAgnostic]() && this._nsAgnosticLevel++; - (c || o || h[n.$isNsAgnostic]()) && - (h[n.$cleanup] = { - hasNamespace: c, - prefixes: o, - nsAgnostic: h[n.$isNsAgnostic](), - }); - return h; - } - isNsAgnostic() { - return this._nsAgnosticLevel > 0; - } - _searchNamespace(e) { - let t = this._namespaces.get(e); - if (t) return t; - for (const [a, { check: n }] of Object.entries(r.NamespaceIds)) - if (n(e)) { - t = i.NamespaceSetUp[a]; - if (t) { - this._namespaces.set(e, t); - return t; - } - break; - } - t = new o.UnknownNamespace(++this._nextNsId); - this._namespaces.set(e, t); - return t; - } - _addNamespacePrefix(e) { - for (const { prefix: t, value: a } of e) { - const e = this._searchNamespace(a); - let r = this._namespacePrefixes.get(t); - if (!r) { - r = []; - this._namespacePrefixes.set(t, r); - } - r.push(e); - } - } - _getNamespaceToUse(e) { - if (!e) return this._currentNamespace; - const t = this._namespacePrefixes.get(e); - if (t?.length > 0) return t.at(-1); - (0, c.warn)(`Unknown namespace prefix: ${e}.`); - return null; - } - clean(e) { - const { hasNamespace: t, prefixes: a, nsAgnostic: r } = e; - t && (this._currentNamespace = this._namespaceStack.pop()); - a && - a.forEach(({ prefix: e }) => { - this._namespacePrefixes.get(e).pop(); - }); - r && this._nsAgnosticLevel--; - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.NamespaceSetUp = void 0; - var r = a(93), - n = a(94), - i = a(95), - s = a(96), - o = a(97), - c = a(98), - l = a(80), - h = a(99), - u = a(100); - const d = { - config: r.ConfigNamespace, - connection: n.ConnectionSetNamespace, - datasets: i.DatasetsNamespace, - localeSet: s.LocaleSetNamespace, - signature: o.SignatureNamespace, - stylesheet: c.StylesheetNamespace, - template: l.TemplateNamespace, - xdp: h.XdpNamespace, - xhtml: u.XhtmlNamespace, - }; - t.NamespaceSetUp = d; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.ConfigNamespace = void 0; - var r = a(81), - n = a(78), - i = a(87), - s = a(84), - o = a(2); - const c = r.NamespaceIds.config.id; - class Acrobat extends i.XFAObject { - constructor(e) { - super(c, "acrobat", !0); - this.acrobat7 = null; - this.autoSave = null; - this.common = null; - this.validate = null; - this.validateApprovalSignatures = null; - this.submitUrl = new i.XFAObjectArray(); - } - } - class Acrobat7 extends i.XFAObject { - constructor(e) { - super(c, "acrobat7", !0); - this.dynamicRender = null; - } - } - class ADBE_JSConsole extends i.OptionObject { - constructor(e) { - super(c, "ADBE_JSConsole", ["delegate", "Enable", "Disable"]); - } - } - class ADBE_JSDebugger extends i.OptionObject { - constructor(e) { - super(c, "ADBE_JSDebugger", ["delegate", "Enable", "Disable"]); - } - } - class AddSilentPrint extends i.Option01 { - constructor(e) { - super(c, "addSilentPrint"); - } - } - class AddViewerPreferences extends i.Option01 { - constructor(e) { - super(c, "addViewerPreferences"); - } - } - class AdjustData extends i.Option10 { - constructor(e) { - super(c, "adjustData"); - } - } - class AdobeExtensionLevel extends i.IntegerObject { - constructor(e) { - super(c, "adobeExtensionLevel", 0, (e) => e >= 1 && e <= 8); - } - } - class Agent extends i.XFAObject { - constructor(e) { - super(c, "agent", !0); - this.name = e.name ? e.name.trim() : ""; - this.common = new i.XFAObjectArray(); - } - } - class AlwaysEmbed extends i.ContentObject { - constructor(e) { - super(c, "alwaysEmbed"); - } - } - class Amd extends i.StringObject { - constructor(e) { - super(c, "amd"); - } - } - class Area extends i.XFAObject { - constructor(e) { - super(c, "area"); - this.level = (0, s.getInteger)({ - data: e.level, - defaultValue: 0, - validate: (e) => e >= 1 && e <= 3, - }); - this.name = (0, s.getStringOption)(e.name, [ - "", - "barcode", - "coreinit", - "deviceDriver", - "font", - "general", - "layout", - "merge", - "script", - "signature", - "sourceSet", - "templateCache", - ]); - } - } - class Attributes extends i.OptionObject { - constructor(e) { - super(c, "attributes", ["preserve", "delegate", "ignore"]); - } - } - class AutoSave extends i.OptionObject { - constructor(e) { - super(c, "autoSave", ["disabled", "enabled"]); - } - } - class Base extends i.StringObject { - constructor(e) { - super(c, "base"); - } - } - class BatchOutput extends i.XFAObject { - constructor(e) { - super(c, "batchOutput"); - this.format = (0, s.getStringOption)(e.format, [ - "none", - "concat", - "zip", - "zipCompress", - ]); - } - } - class BehaviorOverride extends i.ContentObject { - constructor(e) { - super(c, "behaviorOverride"); - } - [n.$finalize]() { - this[n.$content] = new Map( - this[n.$content] - .trim() - .split(/\s+/) - .filter((e) => e.includes(":")) - .map((e) => e.split(":", 2)), - ); - } - } - class Cache extends i.XFAObject { - constructor(e) { - super(c, "cache", !0); - this.templateCache = null; - } - } - class Change extends i.Option01 { - constructor(e) { - super(c, "change"); - } - } - class Common extends i.XFAObject { - constructor(e) { - super(c, "common", !0); - this.data = null; - this.locale = null; - this.localeSet = null; - this.messaging = null; - this.suppressBanner = null; - this.template = null; - this.validationMessaging = null; - this.versionControl = null; - this.log = new i.XFAObjectArray(); - } - } - class Compress extends i.XFAObject { - constructor(e) { - super(c, "compress"); - this.scope = (0, s.getStringOption)(e.scope, [ - "imageOnly", - "document", - ]); - } - } - class CompressLogicalStructure extends i.Option01 { - constructor(e) { - super(c, "compressLogicalStructure"); - } - } - class CompressObjectStream extends i.Option10 { - constructor(e) { - super(c, "compressObjectStream"); - } - } - class Compression extends i.XFAObject { - constructor(e) { - super(c, "compression", !0); - this.compressLogicalStructure = null; - this.compressObjectStream = null; - this.level = null; - this.type = null; - } - } - class Config extends i.XFAObject { - constructor(e) { - super(c, "config", !0); - this.acrobat = null; - this.present = null; - this.trace = null; - this.agent = new i.XFAObjectArray(); - } - } - class Conformance extends i.OptionObject { - constructor(e) { - super(c, "conformance", ["A", "B"]); - } - } - class ContentCopy extends i.Option01 { - constructor(e) { - super(c, "contentCopy"); - } - } - class Copies extends i.IntegerObject { - constructor(e) { - super(c, "copies", 1, (e) => e >= 1); - } - } - class Creator extends i.StringObject { - constructor(e) { - super(c, "creator"); - } - } - class CurrentPage extends i.IntegerObject { - constructor(e) { - super(c, "currentPage", 0, (e) => e >= 0); - } - } - class Data extends i.XFAObject { - constructor(e) { - super(c, "data", !0); - this.adjustData = null; - this.attributes = null; - this.incrementalLoad = null; - this.outputXSL = null; - this.range = null; - this.record = null; - this.startNode = null; - this.uri = null; - this.window = null; - this.xsl = null; - this.excludeNS = new i.XFAObjectArray(); - this.transform = new i.XFAObjectArray(); - } - } - class Debug extends i.XFAObject { - constructor(e) { - super(c, "debug", !0); - this.uri = null; - } - } - class DefaultTypeface extends i.ContentObject { - constructor(e) { - super(c, "defaultTypeface"); - this.writingScript = (0, s.getStringOption)(e.writingScript, [ - "*", - "Arabic", - "Cyrillic", - "EastEuropeanRoman", - "Greek", - "Hebrew", - "Japanese", - "Korean", - "Roman", - "SimplifiedChinese", - "Thai", - "TraditionalChinese", - "Vietnamese", - ]); - } - } - class Destination extends i.OptionObject { - constructor(e) { - super(c, "destination", ["pdf", "pcl", "ps", "webClient", "zpl"]); - } - } - class DocumentAssembly extends i.Option01 { - constructor(e) { - super(c, "documentAssembly"); - } - } - class Driver extends i.XFAObject { - constructor(e) { - super(c, "driver", !0); - this.name = e.name ? e.name.trim() : ""; - this.fontInfo = null; - this.xdc = null; - } - } - class DuplexOption extends i.OptionObject { - constructor(e) { - super(c, "duplexOption", [ - "simplex", - "duplexFlipLongEdge", - "duplexFlipShortEdge", - ]); - } - } - class DynamicRender extends i.OptionObject { - constructor(e) { - super(c, "dynamicRender", ["forbidden", "required"]); - } - } - class Embed extends i.Option01 { - constructor(e) { - super(c, "embed"); - } - } - class Encrypt extends i.Option01 { - constructor(e) { - super(c, "encrypt"); - } - } - class Encryption extends i.XFAObject { - constructor(e) { - super(c, "encryption", !0); - this.encrypt = null; - this.encryptionLevel = null; - this.permissions = null; - } - } - class EncryptionLevel extends i.OptionObject { - constructor(e) { - super(c, "encryptionLevel", ["40bit", "128bit"]); - } - } - class Enforce extends i.StringObject { - constructor(e) { - super(c, "enforce"); - } - } - class Equate extends i.XFAObject { - constructor(e) { - super(c, "equate"); - this.force = (0, s.getInteger)({ - data: e.force, - defaultValue: 1, - validate: (e) => 0 === e, - }); - this.from = e.from || ""; - this.to = e.to || ""; - } - } - class EquateRange extends i.XFAObject { - constructor(e) { - super(c, "equateRange"); - this.from = e.from || ""; - this.to = e.to || ""; - this._unicodeRange = e.unicodeRange || ""; - } - get unicodeRange() { - const e = [], - t = /U\+([0-9a-fA-F]+)/, - a = this._unicodeRange; - for (let r of a - .split(",") - .map((e) => e.trim()) - .filter((e) => !!e)) { - r = r.split("-", 2).map((e) => { - const a = e.match(t); - return a ? parseInt(a[1], 16) : 0; - }); - 1 === r.length && r.push(r[0]); - e.push(r); - } - return (0, o.shadow)(this, "unicodeRange", e); - } - } - class Exclude extends i.ContentObject { - constructor(e) { - super(c, "exclude"); - } - [n.$finalize]() { - this[n.$content] = this[n.$content] - .trim() - .split(/\s+/) - .filter( - (e) => - e && - [ - "calculate", - "close", - "enter", - "exit", - "initialize", - "ready", - "validate", - ].includes(e), - ); - } - } - class ExcludeNS extends i.StringObject { - constructor(e) { - super(c, "excludeNS"); - } - } - class FlipLabel extends i.OptionObject { - constructor(e) { - super(c, "flipLabel", ["usePrinterSetting", "on", "off"]); - } - } - class FontInfo extends i.XFAObject { - constructor(e) { - super(c, "fontInfo", !0); - this.embed = null; - this.map = null; - this.subsetBelow = null; - this.alwaysEmbed = new i.XFAObjectArray(); - this.defaultTypeface = new i.XFAObjectArray(); - this.neverEmbed = new i.XFAObjectArray(); - } - } - class FormFieldFilling extends i.Option01 { - constructor(e) { - super(c, "formFieldFilling"); - } - } - class GroupParent extends i.StringObject { - constructor(e) { - super(c, "groupParent"); - } - } - class IfEmpty extends i.OptionObject { - constructor(e) { - super(c, "ifEmpty", [ - "dataValue", - "dataGroup", - "ignore", - "remove", - ]); - } - } - class IncludeXDPContent extends i.StringObject { - constructor(e) { - super(c, "includeXDPContent"); - } - } - class IncrementalLoad extends i.OptionObject { - constructor(e) { - super(c, "incrementalLoad", ["none", "forwardOnly"]); - } - } - class IncrementalMerge extends i.Option01 { - constructor(e) { - super(c, "incrementalMerge"); - } - } - class Interactive extends i.Option01 { - constructor(e) { - super(c, "interactive"); - } - } - class Jog extends i.OptionObject { - constructor(e) { - super(c, "jog", ["usePrinterSetting", "none", "pageSet"]); - } - } - class LabelPrinter extends i.XFAObject { - constructor(e) { - super(c, "labelPrinter", !0); - this.name = (0, s.getStringOption)(e.name, [ - "zpl", - "dpl", - "ipl", - "tcpl", - ]); - this.batchOutput = null; - this.flipLabel = null; - this.fontInfo = null; - this.xdc = null; - } - } - class Layout extends i.OptionObject { - constructor(e) { - super(c, "layout", ["paginate", "panel"]); - } - } - class Level extends i.IntegerObject { - constructor(e) { - super(c, "level", 0, (e) => e > 0); - } - } - class Linearized extends i.Option01 { - constructor(e) { - super(c, "linearized"); - } - } - class Locale extends i.StringObject { - constructor(e) { - super(c, "locale"); - } - } - class LocaleSet extends i.StringObject { - constructor(e) { - super(c, "localeSet"); - } - } - class Log extends i.XFAObject { - constructor(e) { - super(c, "log", !0); - this.mode = null; - this.threshold = null; - this.to = null; - this.uri = null; - } - } - class MapElement extends i.XFAObject { - constructor(e) { - super(c, "map", !0); - this.equate = new i.XFAObjectArray(); - this.equateRange = new i.XFAObjectArray(); - } - } - class MediumInfo extends i.XFAObject { - constructor(e) { - super(c, "mediumInfo", !0); - this.map = null; - } - } - class Message extends i.XFAObject { - constructor(e) { - super(c, "message", !0); - this.msgId = null; - this.severity = null; - } - } - class Messaging extends i.XFAObject { - constructor(e) { - super(c, "messaging", !0); - this.message = new i.XFAObjectArray(); - } - } - class Mode extends i.OptionObject { - constructor(e) { - super(c, "mode", ["append", "overwrite"]); - } - } - class ModifyAnnots extends i.Option01 { - constructor(e) { - super(c, "modifyAnnots"); - } - } - class MsgId extends i.IntegerObject { - constructor(e) { - super(c, "msgId", 1, (e) => e >= 1); - } - } - class NameAttr extends i.StringObject { - constructor(e) { - super(c, "nameAttr"); - } - } - class NeverEmbed extends i.ContentObject { - constructor(e) { - super(c, "neverEmbed"); - } - } - class NumberOfCopies extends i.IntegerObject { - constructor(e) { - super(c, "numberOfCopies", null, (e) => e >= 2 && e <= 5); - } - } - class OpenAction extends i.XFAObject { - constructor(e) { - super(c, "openAction", !0); - this.destination = null; - } - } - class Output extends i.XFAObject { - constructor(e) { - super(c, "output", !0); - this.to = null; - this.type = null; - this.uri = null; - } - } - class OutputBin extends i.StringObject { - constructor(e) { - super(c, "outputBin"); - } - } - class OutputXSL extends i.XFAObject { - constructor(e) { - super(c, "outputXSL", !0); - this.uri = null; - } - } - class Overprint extends i.OptionObject { - constructor(e) { - super(c, "overprint", ["none", "both", "draw", "field"]); - } - } - class Packets extends i.StringObject { - constructor(e) { - super(c, "packets"); - } - [n.$finalize]() { - "*" !== this[n.$content] && - (this[n.$content] = this[n.$content] - .trim() - .split(/\s+/) - .filter((e) => - ["config", "datasets", "template", "xfdf", "xslt"].includes( - e, - ), - )); - } - } - class PageOffset extends i.XFAObject { - constructor(e) { - super(c, "pageOffset"); - this.x = (0, s.getInteger)({ - data: e.x, - defaultValue: "useXDCSetting", - validate: (e) => !0, - }); - this.y = (0, s.getInteger)({ - data: e.y, - defaultValue: "useXDCSetting", - validate: (e) => !0, - }); - } - } - class PageRange extends i.StringObject { - constructor(e) { - super(c, "pageRange"); - } - [n.$finalize]() { - const e = this[n.$content] - .trim() - .split(/\s+/) - .map((e) => parseInt(e, 10)), - t = []; - for (let a = 0, r = e.length; a < r; a += 2) - t.push(e.slice(a, a + 2)); - this[n.$content] = t; - } - } - class Pagination extends i.OptionObject { - constructor(e) { - super(c, "pagination", [ - "simplex", - "duplexShortEdge", - "duplexLongEdge", - ]); - } - } - class PaginationOverride extends i.OptionObject { - constructor(e) { - super(c, "paginationOverride", [ - "none", - "forceDuplex", - "forceDuplexLongEdge", - "forceDuplexShortEdge", - "forceSimplex", - ]); - } - } - class Part extends i.IntegerObject { - constructor(e) { - super(c, "part", 1, (e) => !1); - } - } - class Pcl extends i.XFAObject { - constructor(e) { - super(c, "pcl", !0); - this.name = e.name || ""; - this.batchOutput = null; - this.fontInfo = null; - this.jog = null; - this.mediumInfo = null; - this.outputBin = null; - this.pageOffset = null; - this.staple = null; - this.xdc = null; - } - } - class Pdf extends i.XFAObject { - constructor(e) { - super(c, "pdf", !0); - this.name = e.name || ""; - this.adobeExtensionLevel = null; - this.batchOutput = null; - this.compression = null; - this.creator = null; - this.encryption = null; - this.fontInfo = null; - this.interactive = null; - this.linearized = null; - this.openAction = null; - this.pdfa = null; - this.producer = null; - this.renderPolicy = null; - this.scriptModel = null; - this.silentPrint = null; - this.submitFormat = null; - this.tagged = null; - this.version = null; - this.viewerPreferences = null; - this.xdc = null; - } - } - class Pdfa extends i.XFAObject { - constructor(e) { - super(c, "pdfa", !0); - this.amd = null; - this.conformance = null; - this.includeXDPContent = null; - this.part = null; - } - } - class Permissions extends i.XFAObject { - constructor(e) { - super(c, "permissions", !0); - this.accessibleContent = null; - this.change = null; - this.contentCopy = null; - this.documentAssembly = null; - this.formFieldFilling = null; - this.modifyAnnots = null; - this.plaintextMetadata = null; - this.print = null; - this.printHighQuality = null; - } - } - class PickTrayByPDFSize extends i.Option01 { - constructor(e) { - super(c, "pickTrayByPDFSize"); - } - } - class Picture extends i.StringObject { - constructor(e) { - super(c, "picture"); - } - } - class PlaintextMetadata extends i.Option01 { - constructor(e) { - super(c, "plaintextMetadata"); - } - } - class Presence extends i.OptionObject { - constructor(e) { - super(c, "presence", [ - "preserve", - "dissolve", - "dissolveStructure", - "ignore", - "remove", - ]); - } - } - class Present extends i.XFAObject { - constructor(e) { - super(c, "present", !0); - this.behaviorOverride = null; - this.cache = null; - this.common = null; - this.copies = null; - this.destination = null; - this.incrementalMerge = null; - this.layout = null; - this.output = null; - this.overprint = null; - this.pagination = null; - this.paginationOverride = null; - this.script = null; - this.validate = null; - this.xdp = null; - this.driver = new i.XFAObjectArray(); - this.labelPrinter = new i.XFAObjectArray(); - this.pcl = new i.XFAObjectArray(); - this.pdf = new i.XFAObjectArray(); - this.ps = new i.XFAObjectArray(); - this.submitUrl = new i.XFAObjectArray(); - this.webClient = new i.XFAObjectArray(); - this.zpl = new i.XFAObjectArray(); - } - } - class Print extends i.Option01 { - constructor(e) { - super(c, "print"); - } - } - class PrintHighQuality extends i.Option01 { - constructor(e) { - super(c, "printHighQuality"); - } - } - class PrintScaling extends i.OptionObject { - constructor(e) { - super(c, "printScaling", ["appdefault", "noScaling"]); - } - } - class PrinterName extends i.StringObject { - constructor(e) { - super(c, "printerName"); - } - } - class Producer extends i.StringObject { - constructor(e) { - super(c, "producer"); - } - } - class Ps extends i.XFAObject { - constructor(e) { - super(c, "ps", !0); - this.name = e.name || ""; - this.batchOutput = null; - this.fontInfo = null; - this.jog = null; - this.mediumInfo = null; - this.outputBin = null; - this.staple = null; - this.xdc = null; - } - } - class Range extends i.ContentObject { - constructor(e) { - super(c, "range"); - } - [n.$finalize]() { - this[n.$content] = this[n.$content] - .trim() - .split(/\s*,\s*/, 2) - .map((e) => e.split("-").map((e) => parseInt(e.trim(), 10))) - .filter((e) => e.every((e) => !isNaN(e))) - .map((e) => { - 1 === e.length && e.push(e[0]); - return e; - }); - } - } - class Record extends i.ContentObject { - constructor(e) { - super(c, "record"); - } - [n.$finalize]() { - this[n.$content] = this[n.$content].trim(); - const e = parseInt(this[n.$content], 10); - !isNaN(e) && e >= 0 && (this[n.$content] = e); - } - } - class Relevant extends i.ContentObject { - constructor(e) { - super(c, "relevant"); - } - [n.$finalize]() { - this[n.$content] = this[n.$content].trim().split(/\s+/); - } - } - class Rename extends i.ContentObject { - constructor(e) { - super(c, "rename"); - } - [n.$finalize]() { - this[n.$content] = this[n.$content].trim(); - (this[n.$content].toLowerCase().startsWith("xml") || - new RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*", "u").test( - this[n.$content], - )) && - (0, o.warn)("XFA - Rename: invalid XFA name"); - } - } - class RenderPolicy extends i.OptionObject { - constructor(e) { - super(c, "renderPolicy", ["server", "client"]); - } - } - class RunScripts extends i.OptionObject { - constructor(e) { - super(c, "runScripts", ["both", "client", "none", "server"]); - } - } - class Script extends i.XFAObject { - constructor(e) { - super(c, "script", !0); - this.currentPage = null; - this.exclude = null; - this.runScripts = null; - } - } - class ScriptModel extends i.OptionObject { - constructor(e) { - super(c, "scriptModel", ["XFA", "none"]); - } - } - class Severity extends i.OptionObject { - constructor(e) { - super(c, "severity", [ - "ignore", - "error", - "information", - "trace", - "warning", - ]); - } - } - class SilentPrint extends i.XFAObject { - constructor(e) { - super(c, "silentPrint", !0); - this.addSilentPrint = null; - this.printerName = null; - } - } - class Staple extends i.XFAObject { - constructor(e) { - super(c, "staple"); - this.mode = (0, s.getStringOption)(e.mode, [ - "usePrinterSetting", - "on", - "off", - ]); - } - } - class StartNode extends i.StringObject { - constructor(e) { - super(c, "startNode"); - } - } - class StartPage extends i.IntegerObject { - constructor(e) { - super(c, "startPage", 0, (e) => !0); - } - } - class SubmitFormat extends i.OptionObject { - constructor(e) { - super(c, "submitFormat", [ - "html", - "delegate", - "fdf", - "xml", - "pdf", - ]); - } - } - class SubmitUrl extends i.StringObject { - constructor(e) { - super(c, "submitUrl"); - } - } - class SubsetBelow extends i.IntegerObject { - constructor(e) { - super(c, "subsetBelow", 100, (e) => e >= 0 && e <= 100); - } - } - class SuppressBanner extends i.Option01 { - constructor(e) { - super(c, "suppressBanner"); - } - } - class Tagged extends i.Option01 { - constructor(e) { - super(c, "tagged"); - } - } - class Template extends i.XFAObject { - constructor(e) { - super(c, "template", !0); - this.base = null; - this.relevant = null; - this.startPage = null; - this.uri = null; - this.xsl = null; - } - } - class Threshold extends i.OptionObject { - constructor(e) { - super(c, "threshold", [ - "trace", - "error", - "information", - "warning", - ]); - } - } - class To extends i.OptionObject { - constructor(e) { - super(c, "to", [ - "null", - "memory", - "stderr", - "stdout", - "system", - "uri", - ]); - } - } - class TemplateCache extends i.XFAObject { - constructor(e) { - super(c, "templateCache"); - this.maxEntries = (0, s.getInteger)({ - data: e.maxEntries, - defaultValue: 5, - validate: (e) => e >= 0, - }); - } - } - class Trace extends i.XFAObject { - constructor(e) { - super(c, "trace", !0); - this.area = new i.XFAObjectArray(); - } - } - class Transform extends i.XFAObject { - constructor(e) { - super(c, "transform", !0); - this.groupParent = null; - this.ifEmpty = null; - this.nameAttr = null; - this.picture = null; - this.presence = null; - this.rename = null; - this.whitespace = null; - } - } - class Type extends i.OptionObject { - constructor(e) { - super(c, "type", [ - "none", - "ascii85", - "asciiHex", - "ccittfax", - "flate", - "lzw", - "runLength", - "native", - "xdp", - "mergedXDP", - ]); - } - } - class Uri extends i.StringObject { - constructor(e) { - super(c, "uri"); - } - } - class Validate extends i.OptionObject { - constructor(e) { - super(c, "validate", [ - "preSubmit", - "prePrint", - "preExecute", - "preSave", - ]); - } - } - class ValidateApprovalSignatures extends i.ContentObject { - constructor(e) { - super(c, "validateApprovalSignatures"); - } - [n.$finalize]() { - this[n.$content] = this[n.$content] - .trim() - .split(/\s+/) - .filter((e) => ["docReady", "postSign"].includes(e)); - } - } - class ValidationMessaging extends i.OptionObject { - constructor(e) { - super(c, "validationMessaging", [ - "allMessagesIndividually", - "allMessagesTogether", - "firstMessageOnly", - "noMessages", - ]); - } - } - class Version extends i.OptionObject { - constructor(e) { - super(c, "version", ["1.7", "1.6", "1.5", "1.4", "1.3", "1.2"]); - } - } - class VersionControl extends i.XFAObject { - constructor(e) { - super(c, "VersionControl"); - this.outputBelow = (0, s.getStringOption)(e.outputBelow, [ - "warn", - "error", - "update", - ]); - this.sourceAbove = (0, s.getStringOption)(e.sourceAbove, [ - "warn", - "error", - ]); - this.sourceBelow = (0, s.getStringOption)(e.sourceBelow, [ - "update", - "maintain", - ]); - } - } - class ViewerPreferences extends i.XFAObject { - constructor(e) { - super(c, "viewerPreferences", !0); - this.ADBE_JSConsole = null; - this.ADBE_JSDebugger = null; - this.addViewerPreferences = null; - this.duplexOption = null; - this.enforce = null; - this.numberOfCopies = null; - this.pageRange = null; - this.pickTrayByPDFSize = null; - this.printScaling = null; - } - } - class WebClient extends i.XFAObject { - constructor(e) { - super(c, "webClient", !0); - this.name = e.name ? e.name.trim() : ""; - this.fontInfo = null; - this.xdc = null; - } - } - class Whitespace extends i.OptionObject { - constructor(e) { - super(c, "whitespace", [ - "preserve", - "ltrim", - "normalize", - "rtrim", - "trim", - ]); - } - } - class Window extends i.ContentObject { - constructor(e) { - super(c, "window"); - } - [n.$finalize]() { - const e = this[n.$content] - .trim() - .split(/\s*,\s*/, 2) - .map((e) => parseInt(e, 10)); - if (e.some((e) => isNaN(e))) this[n.$content] = [0, 0]; - else { - 1 === e.length && e.push(e[0]); - this[n.$content] = e; - } - } - } - class Xdc extends i.XFAObject { - constructor(e) { - super(c, "xdc", !0); - this.uri = new i.XFAObjectArray(); - this.xsl = new i.XFAObjectArray(); - } - } - class Xdp extends i.XFAObject { - constructor(e) { - super(c, "xdp", !0); - this.packets = null; - } - } - class Xsl extends i.XFAObject { - constructor(e) { - super(c, "xsl", !0); - this.debug = null; - this.uri = null; - } - } - class Zpl extends i.XFAObject { - constructor(e) { - super(c, "zpl", !0); - this.name = e.name ? e.name.trim() : ""; - this.batchOutput = null; - this.flipLabel = null; - this.fontInfo = null; - this.xdc = null; - } - } - class ConfigNamespace { - static [r.$buildXFAObject](e, t) { - if (ConfigNamespace.hasOwnProperty(e)) - return ConfigNamespace[e](t); - } - static acrobat(e) { - return new Acrobat(e); - } - static acrobat7(e) { - return new Acrobat7(e); - } - static ADBE_JSConsole(e) { - return new ADBE_JSConsole(e); - } - static ADBE_JSDebugger(e) { - return new ADBE_JSDebugger(e); - } - static addSilentPrint(e) { - return new AddSilentPrint(e); - } - static addViewerPreferences(e) { - return new AddViewerPreferences(e); - } - static adjustData(e) { - return new AdjustData(e); - } - static adobeExtensionLevel(e) { - return new AdobeExtensionLevel(e); - } - static agent(e) { - return new Agent(e); - } - static alwaysEmbed(e) { - return new AlwaysEmbed(e); - } - static amd(e) { - return new Amd(e); - } - static area(e) { - return new Area(e); - } - static attributes(e) { - return new Attributes(e); - } - static autoSave(e) { - return new AutoSave(e); - } - static base(e) { - return new Base(e); - } - static batchOutput(e) { - return new BatchOutput(e); - } - static behaviorOverride(e) { - return new BehaviorOverride(e); - } - static cache(e) { - return new Cache(e); - } - static change(e) { - return new Change(e); - } - static common(e) { - return new Common(e); - } - static compress(e) { - return new Compress(e); - } - static compressLogicalStructure(e) { - return new CompressLogicalStructure(e); - } - static compressObjectStream(e) { - return new CompressObjectStream(e); - } - static compression(e) { - return new Compression(e); - } - static config(e) { - return new Config(e); - } - static conformance(e) { - return new Conformance(e); - } - static contentCopy(e) { - return new ContentCopy(e); - } - static copies(e) { - return new Copies(e); - } - static creator(e) { - return new Creator(e); - } - static currentPage(e) { - return new CurrentPage(e); - } - static data(e) { - return new Data(e); - } - static debug(e) { - return new Debug(e); - } - static defaultTypeface(e) { - return new DefaultTypeface(e); - } - static destination(e) { - return new Destination(e); - } - static documentAssembly(e) { - return new DocumentAssembly(e); - } - static driver(e) { - return new Driver(e); - } - static duplexOption(e) { - return new DuplexOption(e); - } - static dynamicRender(e) { - return new DynamicRender(e); - } - static embed(e) { - return new Embed(e); - } - static encrypt(e) { - return new Encrypt(e); - } - static encryption(e) { - return new Encryption(e); - } - static encryptionLevel(e) { - return new EncryptionLevel(e); - } - static enforce(e) { - return new Enforce(e); - } - static equate(e) { - return new Equate(e); - } - static equateRange(e) { - return new EquateRange(e); - } - static exclude(e) { - return new Exclude(e); - } - static excludeNS(e) { - return new ExcludeNS(e); - } - static flipLabel(e) { - return new FlipLabel(e); - } - static fontInfo(e) { - return new FontInfo(e); - } - static formFieldFilling(e) { - return new FormFieldFilling(e); - } - static groupParent(e) { - return new GroupParent(e); - } - static ifEmpty(e) { - return new IfEmpty(e); - } - static includeXDPContent(e) { - return new IncludeXDPContent(e); - } - static incrementalLoad(e) { - return new IncrementalLoad(e); - } - static incrementalMerge(e) { - return new IncrementalMerge(e); - } - static interactive(e) { - return new Interactive(e); - } - static jog(e) { - return new Jog(e); - } - static labelPrinter(e) { - return new LabelPrinter(e); - } - static layout(e) { - return new Layout(e); - } - static level(e) { - return new Level(e); - } - static linearized(e) { - return new Linearized(e); - } - static locale(e) { - return new Locale(e); - } - static localeSet(e) { - return new LocaleSet(e); - } - static log(e) { - return new Log(e); - } - static map(e) { - return new MapElement(e); - } - static mediumInfo(e) { - return new MediumInfo(e); - } - static message(e) { - return new Message(e); - } - static messaging(e) { - return new Messaging(e); - } - static mode(e) { - return new Mode(e); - } - static modifyAnnots(e) { - return new ModifyAnnots(e); - } - static msgId(e) { - return new MsgId(e); - } - static nameAttr(e) { - return new NameAttr(e); - } - static neverEmbed(e) { - return new NeverEmbed(e); - } - static numberOfCopies(e) { - return new NumberOfCopies(e); - } - static openAction(e) { - return new OpenAction(e); - } - static output(e) { - return new Output(e); - } - static outputBin(e) { - return new OutputBin(e); - } - static outputXSL(e) { - return new OutputXSL(e); - } - static overprint(e) { - return new Overprint(e); - } - static packets(e) { - return new Packets(e); - } - static pageOffset(e) { - return new PageOffset(e); - } - static pageRange(e) { - return new PageRange(e); - } - static pagination(e) { - return new Pagination(e); - } - static paginationOverride(e) { - return new PaginationOverride(e); - } - static part(e) { - return new Part(e); - } - static pcl(e) { - return new Pcl(e); - } - static pdf(e) { - return new Pdf(e); - } - static pdfa(e) { - return new Pdfa(e); - } - static permissions(e) { - return new Permissions(e); - } - static pickTrayByPDFSize(e) { - return new PickTrayByPDFSize(e); - } - static picture(e) { - return new Picture(e); - } - static plaintextMetadata(e) { - return new PlaintextMetadata(e); - } - static presence(e) { - return new Presence(e); - } - static present(e) { - return new Present(e); - } - static print(e) { - return new Print(e); - } - static printHighQuality(e) { - return new PrintHighQuality(e); - } - static printScaling(e) { - return new PrintScaling(e); - } - static printerName(e) { - return new PrinterName(e); - } - static producer(e) { - return new Producer(e); - } - static ps(e) { - return new Ps(e); - } - static range(e) { - return new Range(e); - } - static record(e) { - return new Record(e); - } - static relevant(e) { - return new Relevant(e); - } - static rename(e) { - return new Rename(e); - } - static renderPolicy(e) { - return new RenderPolicy(e); - } - static runScripts(e) { - return new RunScripts(e); - } - static script(e) { - return new Script(e); - } - static scriptModel(e) { - return new ScriptModel(e); - } - static severity(e) { - return new Severity(e); - } - static silentPrint(e) { - return new SilentPrint(e); - } - static staple(e) { - return new Staple(e); - } - static startNode(e) { - return new StartNode(e); - } - static startPage(e) { - return new StartPage(e); - } - static submitFormat(e) { - return new SubmitFormat(e); - } - static submitUrl(e) { - return new SubmitUrl(e); - } - static subsetBelow(e) { - return new SubsetBelow(e); - } - static suppressBanner(e) { - return new SuppressBanner(e); - } - static tagged(e) { - return new Tagged(e); - } - static template(e) { - return new Template(e); - } - static templateCache(e) { - return new TemplateCache(e); - } - static threshold(e) { - return new Threshold(e); - } - static to(e) { - return new To(e); - } - static trace(e) { - return new Trace(e); - } - static transform(e) { - return new Transform(e); - } - static type(e) { - return new Type(e); - } - static uri(e) { - return new Uri(e); - } - static validate(e) { - return new Validate(e); - } - static validateApprovalSignatures(e) { - return new ValidateApprovalSignatures(e); - } - static validationMessaging(e) { - return new ValidationMessaging(e); - } - static version(e) { - return new Version(e); - } - static versionControl(e) { - return new VersionControl(e); - } - static viewerPreferences(e) { - return new ViewerPreferences(e); - } - static webClient(e) { - return new WebClient(e); - } - static whitespace(e) { - return new Whitespace(e); - } - static window(e) { - return new Window(e); - } - static xdc(e) { - return new Xdc(e); - } - static xdp(e) { - return new Xdp(e); - } - static xsl(e) { - return new Xsl(e); - } - static zpl(e) { - return new Zpl(e); - } - } - t.ConfigNamespace = ConfigNamespace; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.ConnectionSetNamespace = void 0; - var r = a(81), - n = a(87); - const i = r.NamespaceIds.connectionSet.id; - class ConnectionSet extends n.XFAObject { - constructor(e) { - super(i, "connectionSet", !0); - this.wsdlConnection = new n.XFAObjectArray(); - this.xmlConnection = new n.XFAObjectArray(); - this.xsdConnection = new n.XFAObjectArray(); - } - } - class EffectiveInputPolicy extends n.XFAObject { - constructor(e) { - super(i, "effectiveInputPolicy"); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class EffectiveOutputPolicy extends n.XFAObject { - constructor(e) { - super(i, "effectiveOutputPolicy"); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class Operation extends n.StringObject { - constructor(e) { - super(i, "operation"); - this.id = e.id || ""; - this.input = e.input || ""; - this.name = e.name || ""; - this.output = e.output || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class RootElement extends n.StringObject { - constructor(e) { - super(i, "rootElement"); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class SoapAction extends n.StringObject { - constructor(e) { - super(i, "soapAction"); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class SoapAddress extends n.StringObject { - constructor(e) { - super(i, "soapAddress"); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class Uri extends n.StringObject { - constructor(e) { - super(i, "uri"); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class WsdlAddress extends n.StringObject { - constructor(e) { - super(i, "wsdlAddress"); - this.id = e.id || ""; - this.name = e.name || ""; - this.use = e.use || ""; - this.usehref = e.usehref || ""; - } - } - class WsdlConnection extends n.XFAObject { - constructor(e) { - super(i, "wsdlConnection", !0); - this.dataDescription = e.dataDescription || ""; - this.name = e.name || ""; - this.effectiveInputPolicy = null; - this.effectiveOutputPolicy = null; - this.operation = null; - this.soapAction = null; - this.soapAddress = null; - this.wsdlAddress = null; - } - } - class XmlConnection extends n.XFAObject { - constructor(e) { - super(i, "xmlConnection", !0); - this.dataDescription = e.dataDescription || ""; - this.name = e.name || ""; - this.uri = null; - } - } - class XsdConnection extends n.XFAObject { - constructor(e) { - super(i, "xsdConnection", !0); - this.dataDescription = e.dataDescription || ""; - this.name = e.name || ""; - this.rootElement = null; - this.uri = null; - } - } - class ConnectionSetNamespace { - static [r.$buildXFAObject](e, t) { - if (ConnectionSetNamespace.hasOwnProperty(e)) - return ConnectionSetNamespace[e](t); - } - static connectionSet(e) { - return new ConnectionSet(e); - } - static effectiveInputPolicy(e) { - return new EffectiveInputPolicy(e); - } - static effectiveOutputPolicy(e) { - return new EffectiveOutputPolicy(e); - } - static operation(e) { - return new Operation(e); - } - static rootElement(e) { - return new RootElement(e); - } - static soapAction(e) { - return new SoapAction(e); - } - static soapAddress(e) { - return new SoapAddress(e); - } - static uri(e) { - return new Uri(e); - } - static wsdlAddress(e) { - return new WsdlAddress(e); - } - static wsdlConnection(e) { - return new WsdlConnection(e); - } - static xmlConnection(e) { - return new XmlConnection(e); - } - static xsdConnection(e) { - return new XsdConnection(e); - } - } - t.ConnectionSetNamespace = ConnectionSetNamespace; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.DatasetsNamespace = void 0; - var r = a(78), - n = a(81), - i = a(87); - const s = n.NamespaceIds.datasets.id; - class Data extends i.XmlObject { - constructor(e) { - super(s, "data", e); - } - [r.$isNsAgnostic]() { - return !0; - } - } - class Datasets extends i.XFAObject { - constructor(e) { - super(s, "datasets", !0); - this.data = null; - this.Signature = null; - } - [r.$onChild](e) { - const t = e[r.$nodeName]; - (("data" === t && e[r.$namespaceId] === s) || - ("Signature" === t && - e[r.$namespaceId] === n.NamespaceIds.signature.id)) && - (this[t] = e); - this[r.$appendChild](e); - } - } - class DatasetsNamespace { - static [n.$buildXFAObject](e, t) { - if (DatasetsNamespace.hasOwnProperty(e)) - return DatasetsNamespace[e](t); - } - static datasets(e) { - return new Datasets(e); - } - static data(e) { - return new Data(e); - } - } - t.DatasetsNamespace = DatasetsNamespace; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.LocaleSetNamespace = void 0; - var r = a(81), - n = a(87), - i = a(84); - const s = r.NamespaceIds.localeSet.id; - class CalendarSymbols extends n.XFAObject { - constructor(e) { - super(s, "calendarSymbols", !0); - this.name = "gregorian"; - this.dayNames = new n.XFAObjectArray(2); - this.eraNames = null; - this.meridiemNames = null; - this.monthNames = new n.XFAObjectArray(2); - } - } - class CurrencySymbol extends n.StringObject { - constructor(e) { - super(s, "currencySymbol"); - this.name = (0, i.getStringOption)(e.name, [ - "symbol", - "isoname", - "decimal", - ]); - } - } - class CurrencySymbols extends n.XFAObject { - constructor(e) { - super(s, "currencySymbols", !0); - this.currencySymbol = new n.XFAObjectArray(3); - } - } - class DatePattern extends n.StringObject { - constructor(e) { - super(s, "datePattern"); - this.name = (0, i.getStringOption)(e.name, [ - "full", - "long", - "med", - "short", - ]); - } - } - class DatePatterns extends n.XFAObject { - constructor(e) { - super(s, "datePatterns", !0); - this.datePattern = new n.XFAObjectArray(4); - } - } - class DateTimeSymbols extends n.ContentObject { - constructor(e) { - super(s, "dateTimeSymbols"); - } - } - class Day extends n.StringObject { - constructor(e) { - super(s, "day"); - } - } - class DayNames extends n.XFAObject { - constructor(e) { - super(s, "dayNames", !0); - this.abbr = (0, i.getInteger)({ - data: e.abbr, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.day = new n.XFAObjectArray(7); - } - } - class Era extends n.StringObject { - constructor(e) { - super(s, "era"); - } - } - class EraNames extends n.XFAObject { - constructor(e) { - super(s, "eraNames", !0); - this.era = new n.XFAObjectArray(2); - } - } - class Locale extends n.XFAObject { - constructor(e) { - super(s, "locale", !0); - this.desc = e.desc || ""; - this.name = "isoname"; - this.calendarSymbols = null; - this.currencySymbols = null; - this.datePatterns = null; - this.dateTimeSymbols = null; - this.numberPatterns = null; - this.numberSymbols = null; - this.timePatterns = null; - this.typeFaces = null; - } - } - class LocaleSet extends n.XFAObject { - constructor(e) { - super(s, "localeSet", !0); - this.locale = new n.XFAObjectArray(); - } - } - class Meridiem extends n.StringObject { - constructor(e) { - super(s, "meridiem"); - } - } - class MeridiemNames extends n.XFAObject { - constructor(e) { - super(s, "meridiemNames", !0); - this.meridiem = new n.XFAObjectArray(2); - } - } - class Month extends n.StringObject { - constructor(e) { - super(s, "month"); - } - } - class MonthNames extends n.XFAObject { - constructor(e) { - super(s, "monthNames", !0); - this.abbr = (0, i.getInteger)({ - data: e.abbr, - defaultValue: 0, - validate: (e) => 1 === e, - }); - this.month = new n.XFAObjectArray(12); - } - } - class NumberPattern extends n.StringObject { - constructor(e) { - super(s, "numberPattern"); - this.name = (0, i.getStringOption)(e.name, [ - "full", - "long", - "med", - "short", - ]); - } - } - class NumberPatterns extends n.XFAObject { - constructor(e) { - super(s, "numberPatterns", !0); - this.numberPattern = new n.XFAObjectArray(4); - } - } - class NumberSymbol extends n.StringObject { - constructor(e) { - super(s, "numberSymbol"); - this.name = (0, i.getStringOption)(e.name, [ - "decimal", - "grouping", - "percent", - "minus", - "zero", - ]); - } - } - class NumberSymbols extends n.XFAObject { - constructor(e) { - super(s, "numberSymbols", !0); - this.numberSymbol = new n.XFAObjectArray(5); - } - } - class TimePattern extends n.StringObject { - constructor(e) { - super(s, "timePattern"); - this.name = (0, i.getStringOption)(e.name, [ - "full", - "long", - "med", - "short", - ]); - } - } - class TimePatterns extends n.XFAObject { - constructor(e) { - super(s, "timePatterns", !0); - this.timePattern = new n.XFAObjectArray(4); - } - } - class TypeFace extends n.XFAObject { - constructor(e) { - super(s, "typeFace", !0); - this.name = "" | e.name; - } - } - class TypeFaces extends n.XFAObject { - constructor(e) { - super(s, "typeFaces", !0); - this.typeFace = new n.XFAObjectArray(); - } - } - class LocaleSetNamespace { - static [r.$buildXFAObject](e, t) { - if (LocaleSetNamespace.hasOwnProperty(e)) - return LocaleSetNamespace[e](t); - } - static calendarSymbols(e) { - return new CalendarSymbols(e); - } - static currencySymbol(e) { - return new CurrencySymbol(e); - } - static currencySymbols(e) { - return new CurrencySymbols(e); - } - static datePattern(e) { - return new DatePattern(e); - } - static datePatterns(e) { - return new DatePatterns(e); - } - static dateTimeSymbols(e) { - return new DateTimeSymbols(e); - } - static day(e) { - return new Day(e); - } - static dayNames(e) { - return new DayNames(e); - } - static era(e) { - return new Era(e); - } - static eraNames(e) { - return new EraNames(e); - } - static locale(e) { - return new Locale(e); - } - static localeSet(e) { - return new LocaleSet(e); - } - static meridiem(e) { - return new Meridiem(e); - } - static meridiemNames(e) { - return new MeridiemNames(e); - } - static month(e) { - return new Month(e); - } - static monthNames(e) { - return new MonthNames(e); - } - static numberPattern(e) { - return new NumberPattern(e); - } - static numberPatterns(e) { - return new NumberPatterns(e); - } - static numberSymbol(e) { - return new NumberSymbol(e); - } - static numberSymbols(e) { - return new NumberSymbols(e); - } - static timePattern(e) { - return new TimePattern(e); - } - static timePatterns(e) { - return new TimePatterns(e); - } - static typeFace(e) { - return new TypeFace(e); - } - static typeFaces(e) { - return new TypeFaces(e); - } - } - t.LocaleSetNamespace = LocaleSetNamespace; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.SignatureNamespace = void 0; - var r = a(81), - n = a(87); - const i = r.NamespaceIds.signature.id; - class Signature extends n.XFAObject { - constructor(e) { - super(i, "signature", !0); - } - } - class SignatureNamespace { - static [r.$buildXFAObject](e, t) { - if (SignatureNamespace.hasOwnProperty(e)) - return SignatureNamespace[e](t); - } - static signature(e) { - return new Signature(e); - } - } - t.SignatureNamespace = SignatureNamespace; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.StylesheetNamespace = void 0; - var r = a(81), - n = a(87); - const i = r.NamespaceIds.stylesheet.id; - class Stylesheet extends n.XFAObject { - constructor(e) { - super(i, "stylesheet", !0); - } - } - class StylesheetNamespace { - static [r.$buildXFAObject](e, t) { - if (StylesheetNamespace.hasOwnProperty(e)) - return StylesheetNamespace[e](t); - } - static stylesheet(e) { - return new Stylesheet(e); - } - } - t.StylesheetNamespace = StylesheetNamespace; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.XdpNamespace = void 0; - var r = a(81), - n = a(78), - i = a(87); - const s = r.NamespaceIds.xdp.id; - class Xdp extends i.XFAObject { - constructor(e) { - super(s, "xdp", !0); - this.uuid = e.uuid || ""; - this.timeStamp = e.timeStamp || ""; - this.config = null; - this.connectionSet = null; - this.datasets = null; - this.localeSet = null; - this.stylesheet = new i.XFAObjectArray(); - this.template = null; - } - [n.$onChildCheck](e) { - const t = r.NamespaceIds[e[n.$nodeName]]; - return t && e[n.$namespaceId] === t.id; - } - } - class XdpNamespace { - static [r.$buildXFAObject](e, t) { - if (XdpNamespace.hasOwnProperty(e)) return XdpNamespace[e](t); - } - static xdp(e) { - return new Xdp(e); - } - } - t.XdpNamespace = XdpNamespace; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.XhtmlNamespace = void 0; - var r = a(78), - n = a(81), - i = a(83), - s = a(84), - o = a(87); - const c = n.NamespaceIds.xhtml.id, - l = Symbol(), - h = new Set([ - "color", - "font", - "font-family", - "font-size", - "font-stretch", - "font-style", - "font-weight", - "margin", - "margin-bottom", - "margin-left", - "margin-right", - "margin-top", - "letter-spacing", - "line-height", - "orphans", - "page-break-after", - "page-break-before", - "page-break-inside", - "tab-interval", - "tab-stop", - "text-align", - "text-decoration", - "text-indent", - "vertical-align", - "widows", - "kerning-mode", - "xfa-font-horizontal-scale", - "xfa-font-vertical-scale", - "xfa-spacerun", - "xfa-tab-stops", - ]), - u = new Map([ - ["page-break-after", "breakAfter"], - ["page-break-before", "breakBefore"], - ["page-break-inside", "breakInside"], - ["kerning-mode", (e) => ("none" === e ? "none" : "normal")], - [ - "xfa-font-horizontal-scale", - (e) => - `scaleX(${Math.max(0, Math.min(parseInt(e) / 100)).toFixed(2)})`, - ], - [ - "xfa-font-vertical-scale", - (e) => - `scaleY(${Math.max(0, Math.min(parseInt(e) / 100)).toFixed(2)})`, - ], - ["xfa-spacerun", ""], - ["xfa-tab-stops", ""], - [ - "font-size", - (e, t) => { - e = t.fontSize = (0, s.getMeasurement)(e); - return (0, i.measureToString)(0.99 * e); - }, - ], - [ - "letter-spacing", - (e) => (0, i.measureToString)((0, s.getMeasurement)(e)), - ], - [ - "line-height", - (e) => (0, i.measureToString)((0, s.getMeasurement)(e)), - ], - [ - "margin", - (e) => (0, i.measureToString)((0, s.getMeasurement)(e)), - ], - [ - "margin-bottom", - (e) => (0, i.measureToString)((0, s.getMeasurement)(e)), - ], - [ - "margin-left", - (e) => (0, i.measureToString)((0, s.getMeasurement)(e)), - ], - [ - "margin-right", - (e) => (0, i.measureToString)((0, s.getMeasurement)(e)), - ], - [ - "margin-top", - (e) => (0, i.measureToString)((0, s.getMeasurement)(e)), - ], - [ - "text-indent", - (e) => (0, i.measureToString)((0, s.getMeasurement)(e)), - ], - ["font-family", (e) => e], - [ - "vertical-align", - (e) => (0, i.measureToString)((0, s.getMeasurement)(e)), - ], - ]), - d = /\s+/g, - f = /[\r\n]+/g, - g = /\r\n?/g; - function mapStyle(e, t, a) { - const n = Object.create(null); - if (!e) return n; - const o = Object.create(null); - for (const [t, a] of e.split(";").map((e) => e.split(":", 2))) { - const e = u.get(t); - if ("" === e) continue; - let r = a; - e && (r = "string" == typeof e ? e : e(a, o)); - t.endsWith("scale") - ? (n.transform = n.transform ? `${n[t]} ${r}` : r) - : (n[t.replaceAll(/-([a-zA-Z])/g, (e, t) => t.toUpperCase())] = - r); - } - n.fontFamily && - (0, i.setFontFamily)( - { - typeface: n.fontFamily, - weight: n.fontWeight || "normal", - posture: n.fontStyle || "normal", - size: o.fontSize || 0, - }, - t, - t[r.$globalData].fontFinder, - n, - ); - if ( - a && - n.verticalAlign && - "0px" !== n.verticalAlign && - n.fontSize - ) { - const e = 0.583, - t = 0.333, - a = (0, s.getMeasurement)(n.fontSize); - n.fontSize = (0, i.measureToString)(a * e); - n.verticalAlign = (0, i.measureToString)( - Math.sign((0, s.getMeasurement)(n.verticalAlign)) * a * t, - ); - } - a && - n.fontSize && - (n.fontSize = `calc(${n.fontSize} * var(--scale-factor))`); - (0, i.fixTextIndent)(n); - return n; - } - const p = new Set(["body", "html"]); - class XhtmlObject extends o.XmlObject { - constructor(e, t) { - super(c, t); - this[l] = !1; - this.style = e.style || ""; - } - [r.$clean](e) { - super[r.$clean](e); - this.style = (function checkStyle(e) { - return e.style - ? e.style - .trim() - .split(/\s*;\s*/) - .filter((e) => !!e) - .map((e) => e.split(/\s*:\s*/, 2)) - .filter(([t, a]) => { - "font-family" === t && - e[r.$globalData].usedTypefaces.add(a); - return h.has(t); - }) - .map((e) => e.join(":")) - .join(";") - : ""; - })(this); - } - [r.$acceptWhitespace]() { - return !p.has(this[r.$nodeName]); - } - [r.$onText](e, t = !1) { - if (t) this[l] = !0; - else { - e = e.replaceAll(f, ""); - this.style.includes("xfa-spacerun:yes") || - (e = e.replaceAll(d, " ")); - } - e && (this[r.$content] += e); - } - [r.$pushGlyphs](e, t = !0) { - const a = Object.create(null), - n = { top: NaN, bottom: NaN, left: NaN, right: NaN }; - let i = null; - for (const [e, t] of this.style - .split(";") - .map((e) => e.split(":", 2))) - switch (e) { - case "font-family": - a.typeface = (0, s.stripQuotes)(t); - break; - case "font-size": - a.size = (0, s.getMeasurement)(t); - break; - case "font-weight": - a.weight = t; - break; - case "font-style": - a.posture = t; - break; - case "letter-spacing": - a.letterSpacing = (0, s.getMeasurement)(t); - break; - case "margin": - const e = t - .split(/ \t/) - .map((e) => (0, s.getMeasurement)(e)); - switch (e.length) { - case 1: - n.top = n.bottom = n.left = n.right = e[0]; - break; - case 2: - n.top = n.bottom = e[0]; - n.left = n.right = e[1]; - break; - case 3: - n.top = e[0]; - n.bottom = e[2]; - n.left = n.right = e[1]; - break; - case 4: - n.top = e[0]; - n.left = e[1]; - n.bottom = e[2]; - n.right = e[3]; - } - break; - case "margin-top": - n.top = (0, s.getMeasurement)(t); - break; - case "margin-bottom": - n.bottom = (0, s.getMeasurement)(t); - break; - case "margin-left": - n.left = (0, s.getMeasurement)(t); - break; - case "margin-right": - n.right = (0, s.getMeasurement)(t); - break; - case "line-height": - i = (0, s.getMeasurement)(t); - } - e.pushData(a, n, i); - if (this[r.$content]) e.addString(this[r.$content]); - else - for (const t of this[r.$getChildren]()) - "#text" !== t[r.$nodeName] - ? t[r.$pushGlyphs](e) - : e.addString(t[r.$content]); - t && e.popFont(); - } - [r.$toHTML](e) { - const t = []; - this[r.$extra] = { children: t }; - this[r.$childrenToHTML]({}); - if (0 === t.length && !this[r.$content]) - return s.HTMLResult.EMPTY; - let a; - a = this[l] - ? this[r.$content] - ? this[r.$content].replaceAll(g, "\n") - : void 0 - : this[r.$content] || void 0; - return s.HTMLResult.success({ - name: this[r.$nodeName], - attributes: { - href: this.href, - style: mapStyle(this.style, this, this[l]), - }, - children: t, - value: a, - }); - } - } - class A extends XhtmlObject { - constructor(e) { - super(e, "a"); - this.href = (0, i.fixURL)(e.href) || ""; - } - } - class B extends XhtmlObject { - constructor(e) { - super(e, "b"); - } - [r.$pushGlyphs](e) { - e.pushFont({ weight: "bold" }); - super[r.$pushGlyphs](e); - e.popFont(); - } - } - class Body extends XhtmlObject { - constructor(e) { - super(e, "body"); - } - [r.$toHTML](e) { - const t = super[r.$toHTML](e), - { html: a } = t; - if (!a) return s.HTMLResult.EMPTY; - a.name = "div"; - a.attributes.class = ["xfaRich"]; - return t; - } - } - class Br extends XhtmlObject { - constructor(e) { - super(e, "br"); - } - [r.$text]() { - return "\n"; - } - [r.$pushGlyphs](e) { - e.addString("\n"); - } - [r.$toHTML](e) { - return s.HTMLResult.success({ name: "br" }); - } - } - class Html extends XhtmlObject { - constructor(e) { - super(e, "html"); - } - [r.$toHTML](e) { - const t = []; - this[r.$extra] = { children: t }; - this[r.$childrenToHTML]({}); - if (0 === t.length) - return s.HTMLResult.success({ - name: "div", - attributes: { class: ["xfaRich"], style: {} }, - value: this[r.$content] || "", - }); - if (1 === t.length) { - const e = t[0]; - if (e.attributes?.class.includes("xfaRich")) - return s.HTMLResult.success(e); - } - return s.HTMLResult.success({ - name: "div", - attributes: { class: ["xfaRich"], style: {} }, - children: t, - }); - } - } - class I extends XhtmlObject { - constructor(e) { - super(e, "i"); - } - [r.$pushGlyphs](e) { - e.pushFont({ posture: "italic" }); - super[r.$pushGlyphs](e); - e.popFont(); - } - } - class Li extends XhtmlObject { - constructor(e) { - super(e, "li"); - } - } - class Ol extends XhtmlObject { - constructor(e) { - super(e, "ol"); - } - } - class P extends XhtmlObject { - constructor(e) { - super(e, "p"); - } - [r.$pushGlyphs](e) { - super[r.$pushGlyphs](e, !1); - e.addString("\n"); - e.addPara(); - e.popFont(); - } - [r.$text]() { - return this[r.$getParent]()[r.$getChildren]().at(-1) === this - ? super[r.$text]() - : super[r.$text]() + "\n"; - } - } - class Span extends XhtmlObject { - constructor(e) { - super(e, "span"); - } - } - class Sub extends XhtmlObject { - constructor(e) { - super(e, "sub"); - } - } - class Sup extends XhtmlObject { - constructor(e) { - super(e, "sup"); - } - } - class Ul extends XhtmlObject { - constructor(e) { - super(e, "ul"); - } - } - class XhtmlNamespace { - static [n.$buildXFAObject](e, t) { - if (XhtmlNamespace.hasOwnProperty(e)) return XhtmlNamespace[e](t); - } - static a(e) { - return new A(e); - } - static b(e) { - return new B(e); - } - static body(e) { - return new Body(e); - } - static br(e) { - return new Br(e); - } - static html(e) { - return new Html(e); - } - static i(e) { - return new I(e); - } - static li(e) { - return new Li(e); - } - static ol(e) { - return new Ol(e); - } - static p(e) { - return new P(e); - } - static span(e) { - return new Span(e); - } - static sub(e) { - return new Sub(e); - } - static sup(e) { - return new Sup(e); - } - static ul(e) { - return new Ul(e); - } - } - t.XhtmlNamespace = XhtmlNamespace; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.UnknownNamespace = void 0; - var r = a(81), - n = a(87); - class UnknownNamespace { - constructor(e) { - this.namespaceId = e; - } - [r.$buildXFAObject](e, t) { - return new n.XmlObject(this.namespaceId, e, t); - } - } - t.UnknownNamespace = UnknownNamespace; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.DatasetReader = void 0; - var r = a(2), - n = a(3), - i = a(71); - function decodeString(e) { - try { - return (0, r.stringToUTF8String)(e); - } catch (t) { - (0, r.warn)(`UTF-8 decoding failed: "${t}".`); - return e; - } - } - class DatasetXMLParser extends i.SimpleXMLParser { - constructor(e) { - super(e); - this.node = null; - } - onEndElement(e) { - const t = super.onEndElement(e); - if (t && "xfa:datasets" === e) { - this.node = t; - throw new Error("Aborting DatasetXMLParser."); - } - } - } - t.DatasetReader = class DatasetReader { - constructor(e) { - if (e.datasets) - this.node = new i.SimpleXMLParser({ - hasAttributes: !0, - }).parseFromString(e.datasets).documentElement; - else { - const t = new DatasetXMLParser({ hasAttributes: !0 }); - try { - t.parseFromString(e["xdp:xdp"]); - } catch {} - this.node = t.node; - } - } - getValue(e) { - if (!this.node || !e) return ""; - const t = this.node.searchNode((0, n.parseXFAPath)(e), 0); - if (!t) return ""; - const a = t.firstChild; - return "value" === a?.nodeName - ? t.children.map((e) => decodeString(e.textContent)) - : decodeString(t.textContent); - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.XRef = void 0; - var r = a(2), - n = a(4), - i = a(16), - s = a(3), - o = a(5), - c = a(74); - t.XRef = class XRef { - #B = null; - constructor(e, t) { - this.stream = e; - this.pdfManager = t; - this.entries = []; - this._xrefStms = new Set(); - this._cacheMap = new Map(); - this._pendingRefs = new n.RefSet(); - this._newPersistentRefNum = null; - this._newTemporaryRefNum = null; - } - getNewPersistentRef(e) { - null === this._newPersistentRefNum && - (this._newPersistentRefNum = this.entries.length || 1); - const t = this._newPersistentRefNum++; - this._cacheMap.set(t, e); - return n.Ref.get(t, 0); - } - getNewTemporaryRef() { - null === this._newTemporaryRefNum && - (this._newTemporaryRefNum = this.entries.length || 1); - return n.Ref.get(this._newTemporaryRefNum++, 0); - } - resetNewTemporaryRef() { - this._newTemporaryRefNum = null; - } - setStartXRef(e) { - this.startXRefQueue = [e]; - } - parse(e = !1) { - let t, a, i; - if (e) { - (0, r.warn)("Indexing all PDF objects"); - t = this.indexObjects(); - } else t = this.readXRef(); - t.assignXref(this); - this.trailer = t; - try { - a = t.get("Encrypt"); - } catch (e) { - if (e instanceof s.MissingDataException) throw e; - (0, r.warn)( - `XRef.parse - Invalid "Encrypt" reference: "${e}".`, - ); - } - if (a instanceof n.Dict) { - const e = t.get("ID"), - r = e?.length ? e[0] : ""; - a.suppressEncryption = !0; - this.encrypt = new c.CipherTransformFactory( - a, - r, - this.pdfManager.password, - ); - } - try { - i = t.get("Root"); - } catch (e) { - if (e instanceof s.MissingDataException) throw e; - (0, r.warn)(`XRef.parse - Invalid "Root" reference: "${e}".`); - } - if (i instanceof n.Dict) - try { - if (i.get("Pages") instanceof n.Dict) { - this.root = i; - return; - } - } catch (e) { - if (e instanceof s.MissingDataException) throw e; - (0, r.warn)( - `XRef.parse - Invalid "Pages" reference: "${e}".`, - ); - } - if (!e) throw new s.XRefParseException(); - throw new r.InvalidPDFException("Invalid Root reference."); - } - processXRefTable(e) { - "tableState" in this || - (this.tableState = { - entryNum: 0, - streamPos: e.lexer.stream.pos, - parserBuf1: e.buf1, - parserBuf2: e.buf2, - }); - const t = this.readXRefTable(e); - if (!(0, n.isCmd)(t, "trailer")) - throw new r.FormatError( - "Invalid XRef table: could not find trailer dictionary", - ); - let a = e.getObj(); - a instanceof n.Dict || !a.dict || (a = a.dict); - if (!(a instanceof n.Dict)) - throw new r.FormatError( - "Invalid XRef table: could not parse trailer dictionary", - ); - delete this.tableState; - return a; - } - readXRefTable(e) { - const t = e.lexer.stream, - a = this.tableState; - t.pos = a.streamPos; - e.buf1 = a.parserBuf1; - e.buf2 = a.parserBuf2; - let i; - for (;;) { - if (!("firstEntryNum" in a) || !("entryCount" in a)) { - if ((0, n.isCmd)((i = e.getObj()), "trailer")) break; - a.firstEntryNum = i; - a.entryCount = e.getObj(); - } - let s = a.firstEntryNum; - const o = a.entryCount; - if (!Number.isInteger(s) || !Number.isInteger(o)) - throw new r.FormatError( - "Invalid XRef table: wrong types in subsection header", - ); - for (let i = a.entryNum; i < o; i++) { - a.streamPos = t.pos; - a.entryNum = i; - a.parserBuf1 = e.buf1; - a.parserBuf2 = e.buf2; - const c = {}; - c.offset = e.getObj(); - c.gen = e.getObj(); - const l = e.getObj(); - if (l instanceof n.Cmd) - switch (l.cmd) { - case "f": - c.free = !0; - break; - case "n": - c.uncompressed = !0; - } - if ( - !Number.isInteger(c.offset) || - !Number.isInteger(c.gen) || - (!c.free && !c.uncompressed) - ) - throw new r.FormatError( - `Invalid entry in XRef subsection: ${s}, ${o}`, - ); - 0 === i && c.free && 1 === s && (s = 0); - this.entries[i + s] || (this.entries[i + s] = c); - } - a.entryNum = 0; - a.streamPos = t.pos; - a.parserBuf1 = e.buf1; - a.parserBuf2 = e.buf2; - delete a.firstEntryNum; - delete a.entryCount; - } - if (this.entries[0] && !this.entries[0].free) - throw new r.FormatError( - "Invalid XRef table: unexpected first object", - ); - return i; - } - processXRefStream(e) { - if (!("streamState" in this)) { - const t = e.dict, - a = t.get("W"); - let r = t.get("Index"); - r || (r = [0, t.get("Size")]); - this.streamState = { - entryRanges: r, - byteWidths: a, - entryNum: 0, - streamPos: e.pos, - }; - } - this.readXRefStream(e); - delete this.streamState; - return e.dict; - } - readXRefStream(e) { - const t = this.streamState; - e.pos = t.streamPos; - const [a, n, i] = t.byteWidths, - s = t.entryRanges; - for (; s.length > 0; ) { - const [o, c] = s; - if (!Number.isInteger(o) || !Number.isInteger(c)) - throw new r.FormatError( - `Invalid XRef range fields: ${o}, ${c}`, - ); - if ( - !Number.isInteger(a) || - !Number.isInteger(n) || - !Number.isInteger(i) - ) - throw new r.FormatError( - `Invalid XRef entry fields length: ${o}, ${c}`, - ); - for (let s = t.entryNum; s < c; ++s) { - t.entryNum = s; - t.streamPos = e.pos; - let c = 0, - l = 0, - h = 0; - for (let t = 0; t < a; ++t) { - const t = e.getByte(); - if (-1 === t) - throw new r.FormatError( - "Invalid XRef byteWidths 'type'.", - ); - c = (c << 8) | t; - } - 0 === a && (c = 1); - for (let t = 0; t < n; ++t) { - const t = e.getByte(); - if (-1 === t) - throw new r.FormatError( - "Invalid XRef byteWidths 'offset'.", - ); - l = (l << 8) | t; - } - for (let t = 0; t < i; ++t) { - const t = e.getByte(); - if (-1 === t) - throw new r.FormatError( - "Invalid XRef byteWidths 'generation'.", - ); - h = (h << 8) | t; - } - const u = {}; - u.offset = l; - u.gen = h; - switch (c) { - case 0: - u.free = !0; - break; - case 1: - u.uncompressed = !0; - break; - case 2: - break; - default: - throw new r.FormatError(`Invalid XRef entry type: ${c}`); - } - this.entries[o + s] || (this.entries[o + s] = u); - } - t.entryNum = 0; - t.streamPos = e.pos; - s.splice(0, 2); - } - } - indexObjects() { - function readToken(e, t) { - let a = "", - r = e[t]; - for ( - ; - 10 !== r && 13 !== r && 60 !== r && !(++t >= e.length); - - ) { - a += String.fromCharCode(r); - r = e[t]; - } - return a; - } - function skipUntil(e, t, a) { - const r = a.length, - n = e.length; - let i = 0; - for (; t < n; ) { - let n = 0; - for (; n < r && e[t + n] === a[n]; ) ++n; - if (n >= r) break; - t++; - i++; - } - return i; - } - const e = /\b(endobj|\d+\s+\d+\s+obj|xref|trailer\s*<<)\b/g, - t = /\b(startxref|\d+\s+\d+\s+obj)\b/g, - a = /^(\d+)\s+(\d+)\s+obj\b/, - o = new Uint8Array([116, 114, 97, 105, 108, 101, 114]), - c = new Uint8Array([ - 115, 116, 97, 114, 116, 120, 114, 101, 102, - ]), - l = new Uint8Array([47, 88, 82, 101, 102]); - this.entries.length = 0; - this._cacheMap.clear(); - const h = this.stream; - h.pos = 0; - const u = h.getBytes(), - d = (0, r.bytesToString)(u), - f = u.length; - let g = h.start; - const p = [], - m = []; - for (; g < f; ) { - let n = u[g]; - if (9 === n || 10 === n || 13 === n || 32 === n) { - ++g; - continue; - } - if (37 === n) { - do { - ++g; - if (g >= f) break; - n = u[g]; - } while (10 !== n && 13 !== n); - continue; - } - const b = readToken(u, g); - let y; - if ( - b.startsWith("xref") && - (4 === b.length || /\s/.test(b[4])) - ) { - g += skipUntil(u, g, o); - p.push(g); - g += skipUntil(u, g, c); - } else if ((y = a.exec(b))) { - const t = 0 | y[1], - a = 0 | y[2], - n = g + b.length; - let o, - c = !1; - if (this.entries[t]) { - if (this.entries[t].gen === a) - try { - new i.Parser({ - lexer: new i.Lexer(h.makeSubStream(n)), - }).getObj(); - c = !0; - } catch (e) { - e instanceof s.ParserEOFException - ? (0, r.warn)( - `indexObjects -- checking object (${b}): "${e}".`, - ) - : (c = !0); - } - } else c = !0; - c && - (this.entries[t] = { - offset: g - h.start, - gen: a, - uncompressed: !0, - }); - e.lastIndex = n; - const p = e.exec(d); - if (p) { - o = e.lastIndex + 1 - g; - if ("endobj" !== p[1]) { - (0, r.warn)( - `indexObjects: Found "${p[1]}" inside of another "obj", caused by missing "endobj" -- trying to recover.`, - ); - o -= p[1].length + 1; - } - } else o = f - g; - const w = u.subarray(g, g + o), - S = skipUntil(w, 0, l); - if (S < o && w[S + 5] < 64) { - m.push(g - h.start); - this._xrefStms.add(g - h.start); - } - g += o; - } else if ( - b.startsWith("trailer") && - (7 === b.length || /\s/.test(b[7])) - ) { - p.push(g); - const e = g + b.length; - let a; - t.lastIndex = e; - const n = t.exec(d); - if (n) { - a = t.lastIndex + 1 - g; - if ("startxref" !== n[1]) { - (0, r.warn)( - `indexObjects: Found "${n[1]}" after "trailer", caused by missing "startxref" -- trying to recover.`, - ); - a -= n[1].length + 1; - } - } else a = f - g; - g += a; - } else g += b.length + 1; - } - for (const e of m) { - this.startXRefQueue.push(e); - this.readXRef(!0); - } - const b = []; - let y, - w, - S = !1; - for (const e of p) { - h.pos = e; - const t = new i.Parser({ - lexer: new i.Lexer(h), - xref: this, - allowStreams: !0, - recoveryMode: !0, - }), - a = t.getObj(); - if (!(0, n.isCmd)(a, "trailer")) continue; - const r = t.getObj(); - if (r instanceof n.Dict) { - b.push(r); - r.has("Encrypt") && (S = !0); - } - } - for (const e of [...b, "genFallback", ...b]) { - if ("genFallback" === e) { - if (!w) break; - this._generationFallback = !0; - continue; - } - let t = !1; - try { - const a = e.get("Root"); - if (!(a instanceof n.Dict)) continue; - const r = a.get("Pages"); - if (!(r instanceof n.Dict)) continue; - const i = r.get("Count"); - Number.isInteger(i) && (t = !0); - } catch (e) { - w = e; - continue; - } - if (t && (!S || e.has("Encrypt")) && e.has("ID")) return e; - y = e; - } - if (y) return y; - if (this.topDict) return this.topDict; - throw new r.InvalidPDFException("Invalid PDF structure."); - } - readXRef(e = !1) { - const t = this.stream, - a = new Set(); - for (; this.startXRefQueue.length; ) { - try { - const e = this.startXRefQueue[0]; - if (a.has(e)) { - (0, r.warn)( - "readXRef - skipping XRef table since it was already parsed.", - ); - this.startXRefQueue.shift(); - continue; - } - a.add(e); - t.pos = e + t.start; - const s = new i.Parser({ - lexer: new i.Lexer(t), - xref: this, - allowStreams: !0, - }); - let c, - l = s.getObj(); - if ((0, n.isCmd)(l, "xref")) { - c = this.processXRefTable(s); - this.topDict || (this.topDict = c); - l = c.get("XRefStm"); - if (Number.isInteger(l) && !this._xrefStms.has(l)) { - this._xrefStms.add(l); - this.startXRefQueue.push(l); - this.#B ??= l; - } - } else { - if (!Number.isInteger(l)) - throw new r.FormatError("Invalid XRef stream header"); - if ( - !( - Number.isInteger(s.getObj()) && - (0, n.isCmd)(s.getObj(), "obj") && - (l = s.getObj()) instanceof o.BaseStream - ) - ) - throw new r.FormatError("Invalid XRef stream"); - c = this.processXRefStream(l); - this.topDict || (this.topDict = c); - if (!c) - throw new r.FormatError("Failed to read XRef stream"); - } - l = c.get("Prev"); - Number.isInteger(l) - ? this.startXRefQueue.push(l) - : l instanceof n.Ref && this.startXRefQueue.push(l.num); - } catch (e) { - if (e instanceof s.MissingDataException) throw e; - (0, r.info)("(while reading XRef): " + e); - } - this.startXRefQueue.shift(); - } - if (this.topDict) return this.topDict; - if (!e) throw new s.XRefParseException(); - } - get lastXRefStreamPos() { - return ( - this.#B ?? - (this._xrefStms.size > 0 ? Math.max(...this._xrefStms) : null) - ); - } - getEntry(e) { - const t = this.entries[e]; - return t && !t.free && t.offset ? t : null; - } - fetchIfRef(e, t = !1) { - return e instanceof n.Ref ? this.fetch(e, t) : e; - } - fetch(e, t = !1) { - if (!(e instanceof n.Ref)) - throw new Error("ref object is not a reference"); - const a = e.num, - i = this._cacheMap.get(a); - if (void 0 !== i) { - i instanceof n.Dict && !i.objId && (i.objId = e.toString()); - return i; - } - let s = this.getEntry(a); - if (null === s) { - this._cacheMap.set(a, s); - return s; - } - if (this._pendingRefs.has(e)) { - this._pendingRefs.remove(e); - (0, r.warn)(`Ignoring circular reference: ${e}.`); - return n.CIRCULAR_REF; - } - this._pendingRefs.put(e); - try { - s = s.uncompressed - ? this.fetchUncompressed(e, s, t) - : this.fetchCompressed(e, s, t); - this._pendingRefs.remove(e); - } catch (t) { - this._pendingRefs.remove(e); - throw t; - } - s instanceof n.Dict - ? (s.objId = e.toString()) - : s instanceof o.BaseStream && (s.dict.objId = e.toString()); - return s; - } - fetchUncompressed(e, t, a = !1) { - const c = e.gen; - let l = e.num; - if (t.gen !== c) { - const i = `Inconsistent generation in XRef: ${e}`; - if (this._generationFallback && t.gen < c) { - (0, r.warn)(i); - return this.fetchUncompressed(n.Ref.get(l, t.gen), t, a); - } - throw new s.XRefEntryException(i); - } - const h = this.stream.makeSubStream(t.offset + this.stream.start), - u = new i.Parser({ - lexer: new i.Lexer(h), - xref: this, - allowStreams: !0, - }), - d = u.getObj(), - f = u.getObj(), - g = u.getObj(); - if (d !== l || f !== c || !(g instanceof n.Cmd)) - throw new s.XRefEntryException( - `Bad (uncompressed) XRef entry: ${e}`, - ); - if ("obj" !== g.cmd) { - if (g.cmd.startsWith("obj")) { - l = parseInt(g.cmd.substring(3), 10); - if (!Number.isNaN(l)) return l; - } - throw new s.XRefEntryException( - `Bad (uncompressed) XRef entry: ${e}`, - ); - } - (t = - this.encrypt && !a - ? u.getObj(this.encrypt.createCipherTransform(l, c)) - : u.getObj()) instanceof o.BaseStream || - this._cacheMap.set(l, t); - return t; - } - fetchCompressed(e, t, a = !1) { - const c = t.offset, - l = this.fetch(n.Ref.get(c, 0)); - if (!(l instanceof o.BaseStream)) - throw new r.FormatError("bad ObjStm stream"); - const h = l.dict.get("First"), - u = l.dict.get("N"); - if (!Number.isInteger(h) || !Number.isInteger(u)) - throw new r.FormatError( - "invalid first and n parameters for ObjStm stream", - ); - let d = new i.Parser({ - lexer: new i.Lexer(l), - xref: this, - allowStreams: !0, - }); - const f = new Array(u), - g = new Array(u); - for (let e = 0; e < u; ++e) { - const t = d.getObj(); - if (!Number.isInteger(t)) - throw new r.FormatError( - `invalid object number in the ObjStm stream: ${t}`, - ); - const a = d.getObj(); - if (!Number.isInteger(a)) - throw new r.FormatError( - `invalid object offset in the ObjStm stream: ${a}`, - ); - f[e] = t; - g[e] = a; - } - const p = (l.start || 0) + h, - m = new Array(u); - for (let e = 0; e < u; ++e) { - const t = e < u - 1 ? g[e + 1] - g[e] : void 0; - if (t < 0) - throw new r.FormatError( - "Invalid offset in the ObjStm stream.", - ); - d = new i.Parser({ - lexer: new i.Lexer(l.makeSubStream(p + g[e], t, l.dict)), - xref: this, - allowStreams: !0, - }); - const a = d.getObj(); - m[e] = a; - if (a instanceof o.BaseStream) continue; - const n = f[e], - s = this.entries[n]; - s && s.offset === c && s.gen === e && this._cacheMap.set(n, a); - } - if (void 0 === (t = m[t.gen])) - throw new s.XRefEntryException( - `Bad (compressed) XRef entry: ${e}`, - ); - return t; - } - async fetchIfRefAsync(e, t) { - return e instanceof n.Ref ? this.fetchAsync(e, t) : e; - } - async fetchAsync(e, t) { - try { - return this.fetch(e, t); - } catch (a) { - if (!(a instanceof s.MissingDataException)) throw a; - await this.pdfManager.requestRange(a.begin, a.end); - return this.fetchAsync(e, t); - } - } - getCatalogObj() { - return this.root; - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.MessageHandler = void 0; - var r = a(2); - const n = 1, - i = 2, - s = 1, - o = 2, - c = 3, - l = 4, - h = 5, - u = 6, - d = 7, - f = 8; - function wrapReason(e) { - e instanceof Error || - ("object" == typeof e && null !== e) || - (0, r.unreachable)( - 'wrapReason: Expected "reason" to be a (possibly cloned) Error.', - ); - switch (e.name) { - case "AbortException": - return new r.AbortException(e.message); - case "MissingPDFException": - return new r.MissingPDFException(e.message); - case "PasswordException": - return new r.PasswordException(e.message, e.code); - case "UnexpectedResponseException": - return new r.UnexpectedResponseException(e.message, e.status); - case "UnknownErrorException": - return new r.UnknownErrorException(e.message, e.details); - default: - return new r.UnknownErrorException(e.message, e.toString()); - } - } - t.MessageHandler = class MessageHandler { - constructor(e, t, a) { - this.sourceName = e; - this.targetName = t; - this.comObj = a; - this.callbackId = 1; - this.streamId = 1; - this.streamSinks = Object.create(null); - this.streamControllers = Object.create(null); - this.callbackCapabilities = Object.create(null); - this.actionHandler = Object.create(null); - this._onComObjOnMessage = (e) => { - const t = e.data; - if (t.targetName !== this.sourceName) return; - if (t.stream) { - this.#E(t); - return; - } - if (t.callback) { - const e = t.callbackId, - a = this.callbackCapabilities[e]; - if (!a) throw new Error(`Cannot resolve callback ${e}`); - delete this.callbackCapabilities[e]; - if (t.callback === n) a.resolve(t.data); - else { - if (t.callback !== i) - throw new Error("Unexpected callback case"); - a.reject(wrapReason(t.reason)); - } - return; - } - const r = this.actionHandler[t.action]; - if (!r) - throw new Error(`Unknown action from worker: ${t.action}`); - if (t.callbackId) { - const e = this.sourceName, - s = t.sourceName; - new Promise(function (e) { - e(r(t.data)); - }).then( - function (r) { - a.postMessage({ - sourceName: e, - targetName: s, - callback: n, - callbackId: t.callbackId, - data: r, - }); - }, - function (r) { - a.postMessage({ - sourceName: e, - targetName: s, - callback: i, - callbackId: t.callbackId, - reason: wrapReason(r), - }); - }, - ); - } else t.streamId ? this.#N(t) : r(t.data); - }; - a.addEventListener("message", this._onComObjOnMessage); - } - on(e, t) { - const a = this.actionHandler; - if (a[e]) - throw new Error(`There is already an actionName called "${e}"`); - a[e] = t; - } - send(e, t, a) { - this.comObj.postMessage( - { - sourceName: this.sourceName, - targetName: this.targetName, - action: e, - data: t, - }, - a, - ); - } - sendWithPromise(e, t, a) { - const n = this.callbackId++, - i = new r.PromiseCapability(); - this.callbackCapabilities[n] = i; - try { - this.comObj.postMessage( - { - sourceName: this.sourceName, - targetName: this.targetName, - action: e, - callbackId: n, - data: t, - }, - a, - ); - } catch (e) { - i.reject(e); - } - return i.promise; - } - sendWithStream(e, t, a, n) { - const i = this.streamId++, - o = this.sourceName, - c = this.targetName, - l = this.comObj; - return new ReadableStream( - { - start: (a) => { - const s = new r.PromiseCapability(); - this.streamControllers[i] = { - controller: a, - startCall: s, - pullCall: null, - cancelCall: null, - isClosed: !1, - }; - l.postMessage( - { - sourceName: o, - targetName: c, - action: e, - streamId: i, - data: t, - desiredSize: a.desiredSize, - }, - n, - ); - return s.promise; - }, - pull: (e) => { - const t = new r.PromiseCapability(); - this.streamControllers[i].pullCall = t; - l.postMessage({ - sourceName: o, - targetName: c, - stream: u, - streamId: i, - desiredSize: e.desiredSize, - }); - return t.promise; - }, - cancel: (e) => { - (0, r.assert)( - e instanceof Error, - "cancel must have a valid reason", - ); - const t = new r.PromiseCapability(); - this.streamControllers[i].cancelCall = t; - this.streamControllers[i].isClosed = !0; - l.postMessage({ - sourceName: o, - targetName: c, - stream: s, - streamId: i, - reason: wrapReason(e), - }); - return t.promise; - }, - }, - a, - ); - } - #N(e) { - const t = e.streamId, - a = this.sourceName, - n = e.sourceName, - i = this.comObj, - s = this, - o = this.actionHandler[e.action], - u = { - enqueue(e, s = 1, o) { - if (this.isCancelled) return; - const c = this.desiredSize; - this.desiredSize -= s; - if (c > 0 && this.desiredSize <= 0) { - this.sinkCapability = new r.PromiseCapability(); - this.ready = this.sinkCapability.promise; - } - i.postMessage( - { - sourceName: a, - targetName: n, - stream: l, - streamId: t, - chunk: e, - }, - o, - ); - }, - close() { - if (!this.isCancelled) { - this.isCancelled = !0; - i.postMessage({ - sourceName: a, - targetName: n, - stream: c, - streamId: t, - }); - delete s.streamSinks[t]; - } - }, - error(e) { - (0, r.assert)( - e instanceof Error, - "error must have a valid reason", - ); - if (!this.isCancelled) { - this.isCancelled = !0; - i.postMessage({ - sourceName: a, - targetName: n, - stream: h, - streamId: t, - reason: wrapReason(e), - }); - } - }, - sinkCapability: new r.PromiseCapability(), - onPull: null, - onCancel: null, - isCancelled: !1, - desiredSize: e.desiredSize, - ready: null, - }; - u.sinkCapability.resolve(); - u.ready = u.sinkCapability.promise; - this.streamSinks[t] = u; - new Promise(function (t) { - t(o(e.data, u)); - }).then( - function () { - i.postMessage({ - sourceName: a, - targetName: n, - stream: f, - streamId: t, - success: !0, - }); - }, - function (e) { - i.postMessage({ - sourceName: a, - targetName: n, - stream: f, - streamId: t, - reason: wrapReason(e), - }); - }, - ); - } - #E(e) { - const t = e.streamId, - a = this.sourceName, - n = e.sourceName, - i = this.comObj, - g = this.streamControllers[t], - p = this.streamSinks[t]; - switch (e.stream) { - case f: - e.success - ? g.startCall.resolve() - : g.startCall.reject(wrapReason(e.reason)); - break; - case d: - e.success - ? g.pullCall.resolve() - : g.pullCall.reject(wrapReason(e.reason)); - break; - case u: - if (!p) { - i.postMessage({ - sourceName: a, - targetName: n, - stream: d, - streamId: t, - success: !0, - }); - break; - } - p.desiredSize <= 0 && - e.desiredSize > 0 && - p.sinkCapability.resolve(); - p.desiredSize = e.desiredSize; - new Promise(function (e) { - e(p.onPull?.()); - }).then( - function () { - i.postMessage({ - sourceName: a, - targetName: n, - stream: d, - streamId: t, - success: !0, - }); - }, - function (e) { - i.postMessage({ - sourceName: a, - targetName: n, - stream: d, - streamId: t, - reason: wrapReason(e), - }); - }, - ); - break; - case l: - (0, r.assert)(g, "enqueue should have stream controller"); - if (g.isClosed) break; - g.controller.enqueue(e.chunk); - break; - case c: - (0, r.assert)(g, "close should have stream controller"); - if (g.isClosed) break; - g.isClosed = !0; - g.controller.close(); - this.#R(g, t); - break; - case h: - (0, r.assert)(g, "error should have stream controller"); - g.controller.error(wrapReason(e.reason)); - this.#R(g, t); - break; - case o: - e.success - ? g.cancelCall.resolve() - : g.cancelCall.reject(wrapReason(e.reason)); - this.#R(g, t); - break; - case s: - if (!p) break; - new Promise(function (t) { - t(p.onCancel?.(wrapReason(e.reason))); - }).then( - function () { - i.postMessage({ - sourceName: a, - targetName: n, - stream: o, - streamId: t, - success: !0, - }); - }, - function (e) { - i.postMessage({ - sourceName: a, - targetName: n, - stream: o, - streamId: t, - reason: wrapReason(e), - }); - }, - ); - p.sinkCapability.reject(wrapReason(e.reason)); - p.isCancelled = !0; - delete this.streamSinks[t]; - break; - default: - throw new Error("Unexpected stream case"); - } - } - async #R(e, t) { - await Promise.allSettled([ - e.startCall?.promise, - e.pullCall?.promise, - e.cancelCall?.promise, - ]); - delete this.streamControllers[t]; - } - destroy() { - this.comObj.removeEventListener( - "message", - this._onComObjOnMessage, - ); - } - }; - }, - (e, t, a) => { - Object.defineProperty(t, "__esModule", { value: !0 }); - t.PDFWorkerStream = void 0; - var r = a(2); - t.PDFWorkerStream = class PDFWorkerStream { - constructor(e) { - this._msgHandler = e; - this._contentLength = null; - this._fullRequestReader = null; - this._rangeRequestReaders = []; - } - getFullReader() { - (0, r.assert)( - !this._fullRequestReader, - "PDFWorkerStream.getFullReader can only be called once.", - ); - this._fullRequestReader = new PDFWorkerStreamReader( - this._msgHandler, - ); - return this._fullRequestReader; - } - getRangeReader(e, t) { - const a = new PDFWorkerStreamRangeReader(e, t, this._msgHandler); - this._rangeRequestReaders.push(a); - return a; - } - cancelAllRequests(e) { - this._fullRequestReader?.cancel(e); - for (const t of this._rangeRequestReaders.slice(0)) t.cancel(e); - } - }; - class PDFWorkerStreamReader { - constructor(e) { - this._msgHandler = e; - this.onProgress = null; - this._contentLength = null; - this._isRangeSupported = !1; - this._isStreamingSupported = !1; - const t = this._msgHandler.sendWithStream("GetReader"); - this._reader = t.getReader(); - this._headersReady = this._msgHandler - .sendWithPromise("ReaderHeadersReady") - .then((e) => { - this._isStreamingSupported = e.isStreamingSupported; - this._isRangeSupported = e.isRangeSupported; - this._contentLength = e.contentLength; - }); - } - get headersReady() { - return this._headersReady; - } - get contentLength() { - return this._contentLength; - } - get isStreamingSupported() { - return this._isStreamingSupported; - } - get isRangeSupported() { - return this._isRangeSupported; - } - async read() { - const { value: e, done: t } = await this._reader.read(); - return t - ? { value: void 0, done: !0 } - : { value: e.buffer, done: !1 }; - } - cancel(e) { - this._reader.cancel(e); - } - } - class PDFWorkerStreamRangeReader { - constructor(e, t, a) { - this._msgHandler = a; - this.onProgress = null; - const r = this._msgHandler.sendWithStream("GetRangeReader", { - begin: e, - end: t, - }); - this._reader = r.getReader(); - } - get isStreamingSupported() { - return !1; - } - async read() { - const { value: e, done: t } = await this._reader.read(); - return t - ? { value: void 0, done: !0 } - : { value: e.buffer, done: !1 }; - } - cancel(e) { - this._reader.cancel(e); - } - } - }, - ], - t = {}; - function __w_pdfjs_require__(a) { - var r = t[a]; - if (void 0 !== r) return r.exports; - var n = (t[a] = { exports: {} }); - e[a](n, n.exports, __w_pdfjs_require__); - return n.exports; - } - var a = {}; - (() => { - var e = a; - Object.defineProperty(e, "__esModule", { value: !0 }); - Object.defineProperty(e, "WorkerMessageHandler", { - enumerable: !0, - get: function () { - return t.WorkerMessageHandler; - }, - }); - var t = __w_pdfjs_require__(1); - })(); - return a; - })(), -); diff --git a/web-app/build/scripts/pdf.worker.min.mjs b/web-app/build/scripts/pdf.worker.min.mjs new file mode 100644 index 0000000000..6628787d33 --- /dev/null +++ b/web-app/build/scripts/pdf.worker.min.mjs @@ -0,0 +1,56810 @@ +/** + * @licstart The following is the entire license notice for the + * JavaScript code in this page + * + * Copyright 2023 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @licend The above is the entire license notice for the + * JavaScript code in this page + */ var e = { + d: (t, i) => { + for (var a in i) + e.o(i, a) && + !e.o(t, a) && + Object.defineProperty(t, a, { enumerable: !0, get: i[a] }); + }, + o: (e, t) => Object.prototype.hasOwnProperty.call(e, t), + }, + __webpack_exports__ = (globalThis.pdfjsWorker = {}); +e.d(__webpack_exports__, { WorkerMessageHandler: () => WorkerMessageHandler }); +const t = !( + "object" != typeof process || + process + "" != "[object process]" || + process.versions.nw || + (process.versions.electron && process.type && "browser" !== process.type) + ), + i = [1, 0, 0, 1, 0, 0], + a = [0.001, 0, 0, 0.001, 0, 0], + s = 1.35, + r = 0.35, + n = 0.25925925925925924, + o = 1, + g = 2, + c = 4, + h = 8, + l = 16, + C = 64, + Q = 256, + E = "pdfjs_internal_editor_", + u = 3, + d = 9, + f = 13, + p = 15, + m = { + PRINT: 4, + MODIFY_CONTENTS: 8, + COPY: 16, + MODIFY_ANNOTATIONS: 32, + FILL_INTERACTIVE_FORMS: 256, + COPY_FOR_ACCESSIBILITY: 512, + ASSEMBLE: 1024, + PRINT_HIGH_QUALITY: 2048, + }, + y = 0, + w = 4, + b = 1, + D = 2, + F = 3, + S = 1, + k = 2, + R = 3, + N = 4, + G = 5, + x = 6, + M = 7, + U = 8, + L = 9, + J = 10, + H = 11, + Y = 12, + v = 13, + K = 14, + T = 15, + q = 16, + O = 17, + W = 20, + X = "Group", + j = "R", + Z = 1, + V = 2, + z = 4, + _ = 16, + $ = 32, + AA = 128, + eA = 512, + tA = 1, + iA = 2, + aA = 4096, + sA = 8192, + rA = 32768, + nA = 65536, + oA = 131072, + gA = 1048576, + IA = 2097152, + cA = 8388608, + hA = 16777216, + lA = 1, + CA = 2, + BA = 3, + QA = 4, + EA = 5, + uA = { + E: "Mouse Enter", + X: "Mouse Exit", + D: "Mouse Down", + U: "Mouse Up", + Fo: "Focus", + Bl: "Blur", + PO: "PageOpen", + PC: "PageClose", + PV: "PageVisible", + PI: "PageInvisible", + K: "Keystroke", + F: "Format", + V: "Validate", + C: "Calculate", + }, + dA = { + WC: "WillClose", + WS: "WillSave", + DS: "DidSave", + WP: "WillPrint", + DP: "DidPrint", + }, + fA = { O: "PageOpen", C: "PageClose" }, + pA = { ERRORS: 0, WARNINGS: 1, INFOS: 5 }, + mA = { NONE: 0, BINARY: 1 }, + yA = 1, + wA = 2, + bA = 3, + DA = 4, + FA = 5, + SA = 6, + kA = 7, + RA = 8, + NA = 9, + GA = 10, + xA = 11, + MA = 12, + UA = 13, + LA = 14, + JA = 15, + HA = 16, + YA = 17, + vA = 18, + KA = 19, + TA = 20, + qA = 21, + OA = 22, + PA = 23, + WA = 24, + XA = 25, + jA = 26, + ZA = 27, + VA = 28, + zA = 29, + _A = 30, + $A = 31, + Ae = 32, + ee = 33, + te = 34, + ie = 35, + ae = 36, + se = 37, + re = 38, + ne = 39, + oe = 40, + ge = 41, + Ie = 42, + ce = 43, + he = 44, + le = 45, + Ce = 46, + Be = 47, + Qe = 48, + Ee = 49, + ue = 50, + de = 51, + fe = 52, + pe = 53, + me = 54, + ye = 55, + we = 56, + be = 57, + De = 58, + Fe = 59, + Se = 60, + ke = 61, + Re = 62, + Ne = 63, + Ge = 64, + xe = 65, + Me = 66, + Ue = 67, + Le = 68, + Je = 69, + He = 70, + Ye = 71, + ve = 72, + Ke = 73, + Te = 74, + qe = 75, + Oe = 76, + Pe = 77, + We = 80, + Xe = 81, + je = 83, + Ze = 84, + Ve = 85, + ze = 86, + _e = 87, + $e = 88, + At = 89, + et = 90, + tt = 91, + it = 1, + at = 2; +let st = pA.WARNINGS; +function getVerbosityLevel() { + return st; +} +function info(e) { + st >= pA.INFOS && console.log(`Info: ${e}`); +} +function warn(e) { + st >= pA.WARNINGS && console.log(`Warning: ${e}`); +} +function unreachable(e) { + throw new Error(e); +} +function assert(e, t) { + e || unreachable(t); +} +function createValidAbsoluteUrl(e, t = null, i = null) { + if (!e) return null; + try { + if (i && "string" == typeof e) { + if (i.addDefaultProtocol && e.startsWith("www.")) { + const t = e.match(/\./g); + t?.length >= 2 && (e = `http://${e}`); + } + if (i.tryConvertEncoding) + try { + e = stringToUTF8String(e); + } catch {} + } + const a = t ? new URL(e, t) : new URL(e); + if ( + (function _isValidProtocol(e) { + switch (e?.protocol) { + case "http:": + case "https:": + case "ftp:": + case "mailto:": + case "tel:": + return !0; + default: + return !1; + } + })(a) + ) + return a; + } catch {} + return null; +} +function shadow(e, t, i, a = !1) { + Object.defineProperty(e, t, { + value: i, + enumerable: !a, + configurable: !0, + writable: !1, + }); + return i; +} +const rt = (function BaseExceptionClosure() { + function BaseException(e, t) { + this.constructor === BaseException && + unreachable("Cannot initialize BaseException."); + this.message = e; + this.name = t; + } + BaseException.prototype = new Error(); + BaseException.constructor = BaseException; + return BaseException; +})(); +class PasswordException extends rt { + constructor(e, t) { + super(e, "PasswordException"); + this.code = t; + } +} +class UnknownErrorException extends rt { + constructor(e, t) { + super(e, "UnknownErrorException"); + this.details = t; + } +} +class InvalidPDFException extends rt { + constructor(e) { + super(e, "InvalidPDFException"); + } +} +class MissingPDFException extends rt { + constructor(e) { + super(e, "MissingPDFException"); + } +} +class UnexpectedResponseException extends rt { + constructor(e, t) { + super(e, "UnexpectedResponseException"); + this.status = t; + } +} +class FormatError extends rt { + constructor(e) { + super(e, "FormatError"); + } +} +class AbortException extends rt { + constructor(e) { + super(e, "AbortException"); + } +} +function bytesToString(e) { + ("object" == typeof e && void 0 !== e?.length) || + unreachable("Invalid argument for bytesToString"); + const t = e.length, + i = 8192; + if (t < i) return String.fromCharCode.apply(null, e); + const a = []; + for (let s = 0; s < t; s += i) { + const r = Math.min(s + i, t), + n = e.subarray(s, r); + a.push(String.fromCharCode.apply(null, n)); + } + return a.join(""); +} +function stringToBytes(e) { + "string" != typeof e && unreachable("Invalid argument for stringToBytes"); + const t = e.length, + i = new Uint8Array(t); + for (let a = 0; a < t; ++a) i[a] = 255 & e.charCodeAt(a); + return i; +} +function string32(e) { + return String.fromCharCode( + (e >> 24) & 255, + (e >> 16) & 255, + (e >> 8) & 255, + 255 & e, + ); +} +function objectSize(e) { + return Object.keys(e).length; +} +class FeatureTest { + static get isLittleEndian() { + return shadow( + this, + "isLittleEndian", + (function isLittleEndian() { + const e = new Uint8Array(4); + e[0] = 1; + return 1 === new Uint32Array(e.buffer, 0, 1)[0]; + })(), + ); + } + static get isEvalSupported() { + return shadow( + this, + "isEvalSupported", + (function isEvalSupported() { + try { + new Function(""); + return !0; + } catch { + return !1; + } + })(), + ); + } + static get isOffscreenCanvasSupported() { + return shadow( + this, + "isOffscreenCanvasSupported", + "undefined" != typeof OffscreenCanvas, + ); + } + static get platform() { + return "undefined" != typeof navigator && + "string" == typeof navigator?.platform + ? shadow(this, "platform", { isMac: navigator.platform.includes("Mac") }) + : shadow(this, "platform", { isMac: !1 }); + } + static get isCSSRoundSupported() { + return shadow( + this, + "isCSSRoundSupported", + globalThis.CSS?.supports?.("width: round(1.5px, 1px)"), + ); + } +} +const nt = Array.from(Array(256).keys(), (e) => + e.toString(16).padStart(2, "0"), +); +class Util { + static makeHexColor(e, t, i) { + return `#${nt[e]}${nt[t]}${nt[i]}`; + } + static scaleMinMax(e, t) { + let i; + if (e[0]) { + if (e[0] < 0) { + i = t[0]; + t[0] = t[2]; + t[2] = i; + } + t[0] *= e[0]; + t[2] *= e[0]; + if (e[3] < 0) { + i = t[1]; + t[1] = t[3]; + t[3] = i; + } + t[1] *= e[3]; + t[3] *= e[3]; + } else { + i = t[0]; + t[0] = t[1]; + t[1] = i; + i = t[2]; + t[2] = t[3]; + t[3] = i; + if (e[1] < 0) { + i = t[1]; + t[1] = t[3]; + t[3] = i; + } + t[1] *= e[1]; + t[3] *= e[1]; + if (e[2] < 0) { + i = t[0]; + t[0] = t[2]; + t[2] = i; + } + t[0] *= e[2]; + t[2] *= e[2]; + } + t[0] += e[4]; + t[1] += e[5]; + t[2] += e[4]; + t[3] += e[5]; + } + static transform(e, t) { + return [ + e[0] * t[0] + e[2] * t[1], + e[1] * t[0] + e[3] * t[1], + e[0] * t[2] + e[2] * t[3], + e[1] * t[2] + e[3] * t[3], + e[0] * t[4] + e[2] * t[5] + e[4], + e[1] * t[4] + e[3] * t[5] + e[5], + ]; + } + static applyTransform(e, t) { + return [e[0] * t[0] + e[1] * t[2] + t[4], e[0] * t[1] + e[1] * t[3] + t[5]]; + } + static applyInverseTransform(e, t) { + const i = t[0] * t[3] - t[1] * t[2]; + return [ + (e[0] * t[3] - e[1] * t[2] + t[2] * t[5] - t[4] * t[3]) / i, + (-e[0] * t[1] + e[1] * t[0] + t[4] * t[1] - t[5] * t[0]) / i, + ]; + } + static getAxialAlignedBoundingBox(e, t) { + const i = this.applyTransform(e, t), + a = this.applyTransform(e.slice(2, 4), t), + s = this.applyTransform([e[0], e[3]], t), + r = this.applyTransform([e[2], e[1]], t); + return [ + Math.min(i[0], a[0], s[0], r[0]), + Math.min(i[1], a[1], s[1], r[1]), + Math.max(i[0], a[0], s[0], r[0]), + Math.max(i[1], a[1], s[1], r[1]), + ]; + } + static inverseTransform(e) { + const t = e[0] * e[3] - e[1] * e[2]; + return [ + e[3] / t, + -e[1] / t, + -e[2] / t, + e[0] / t, + (e[2] * e[5] - e[4] * e[3]) / t, + (e[4] * e[1] - e[5] * e[0]) / t, + ]; + } + static singularValueDecompose2dScale(e) { + const t = [e[0], e[2], e[1], e[3]], + i = e[0] * t[0] + e[1] * t[2], + a = e[0] * t[1] + e[1] * t[3], + s = e[2] * t[0] + e[3] * t[2], + r = e[2] * t[1] + e[3] * t[3], + n = (i + r) / 2, + o = Math.sqrt((i + r) ** 2 - 4 * (i * r - s * a)) / 2, + g = n + o || 1, + c = n - o || 1; + return [Math.sqrt(g), Math.sqrt(c)]; + } + static normalizeRect(e) { + const t = e.slice(0); + if (e[0] > e[2]) { + t[0] = e[2]; + t[2] = e[0]; + } + if (e[1] > e[3]) { + t[1] = e[3]; + t[3] = e[1]; + } + return t; + } + static intersect(e, t) { + const i = Math.max(Math.min(e[0], e[2]), Math.min(t[0], t[2])), + a = Math.min(Math.max(e[0], e[2]), Math.max(t[0], t[2])); + if (i > a) return null; + const s = Math.max(Math.min(e[1], e[3]), Math.min(t[1], t[3])), + r = Math.min(Math.max(e[1], e[3]), Math.max(t[1], t[3])); + return s > r ? null : [i, s, a, r]; + } + static #A(e, t, i, a, s, r, n, o, g, c) { + if (g <= 0 || g >= 1) return; + const h = 1 - g, + l = g * g, + C = l * g, + Q = h * (h * (h * e + 3 * g * t) + 3 * l * i) + C * a, + E = h * (h * (h * s + 3 * g * r) + 3 * l * n) + C * o; + c[0] = Math.min(c[0], Q); + c[1] = Math.min(c[1], E); + c[2] = Math.max(c[2], Q); + c[3] = Math.max(c[3], E); + } + static #e(e, t, i, a, s, r, n, o, g, c, h, l) { + if (Math.abs(g) < 1e-12) { + Math.abs(c) >= 1e-12 && this.#A(e, t, i, a, s, r, n, o, -h / c, l); + return; + } + const C = c ** 2 - 4 * h * g; + if (C < 0) return; + const Q = Math.sqrt(C), + E = 2 * g; + this.#A(e, t, i, a, s, r, n, o, (-c + Q) / E, l); + this.#A(e, t, i, a, s, r, n, o, (-c - Q) / E, l); + } + static bezierBoundingBox(e, t, i, a, s, r, n, o, g) { + if (g) { + g[0] = Math.min(g[0], e, n); + g[1] = Math.min(g[1], t, o); + g[2] = Math.max(g[2], e, n); + g[3] = Math.max(g[3], t, o); + } else g = [Math.min(e, n), Math.min(t, o), Math.max(e, n), Math.max(t, o)]; + this.#e( + e, + i, + s, + n, + t, + a, + r, + o, + 3 * (3 * (i - s) - e + n), + 6 * (e - 2 * i + s), + 3 * (i - e), + g, + ); + this.#e( + e, + i, + s, + n, + t, + a, + r, + o, + 3 * (3 * (a - r) - t + o), + 6 * (t - 2 * a + r), + 3 * (a - t), + g, + ); + return g; + } +} +const ot = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 728, + 711, 710, 729, 733, 731, 730, 732, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 8226, 8224, 8225, 8230, 8212, 8211, 402, 8260, 8249, 8250, 8722, + 8240, 8222, 8220, 8221, 8216, 8217, 8218, 8482, 64257, 64258, 321, 338, 352, + 376, 381, 305, 322, 339, 353, 382, 0, 8364, +]; +function stringToPDFString(e) { + if (e[0] >= "ï") { + let t; + if ("þ" === e[0] && "ÿ" === e[1]) { + t = "utf-16be"; + e.length % 2 == 1 && (e = e.slice(0, -1)); + } else if ("ÿ" === e[0] && "þ" === e[1]) { + t = "utf-16le"; + e.length % 2 == 1 && (e = e.slice(0, -1)); + } else "ï" === e[0] && "»" === e[1] && "¿" === e[2] && (t = "utf-8"); + if (t) + try { + const i = new TextDecoder(t, { fatal: !0 }), + a = stringToBytes(e), + s = i.decode(a); + return s.includes("") ? s.replaceAll(/\x1b[^\x1b]*(?:\x1b|$)/g, "") : s; + } catch (e) { + warn(`stringToPDFString: "${e}".`); + } + } + const t = []; + for (let i = 0, a = e.length; i < a; i++) { + const s = e.charCodeAt(i); + if (27 === s) { + for (; ++i < a && 27 !== e.charCodeAt(i); ); + continue; + } + const r = ot[s]; + t.push(r ? String.fromCharCode(r) : e.charAt(i)); + } + return t.join(""); +} +function stringToUTF8String(e) { + return decodeURIComponent(escape(e)); +} +function utf8StringToString(e) { + return unescape(encodeURIComponent(e)); +} +function isArrayEqual(e, t) { + if (e.length !== t.length) return !1; + for (let i = 0, a = e.length; i < a; i++) if (e[i] !== t[i]) return !1; + return !0; +} +function getModificationDate(e = new Date()) { + return [ + e.getUTCFullYear().toString(), + (e.getUTCMonth() + 1).toString().padStart(2, "0"), + e.getUTCDate().toString().padStart(2, "0"), + e.getUTCHours().toString().padStart(2, "0"), + e.getUTCMinutes().toString().padStart(2, "0"), + e.getUTCSeconds().toString().padStart(2, "0"), + ].join(""); +} +let gt = null, + It = null; +const ct = 0, + ht = 1, + lt = 2, + Ct = 3, + Bt = 4, + Qt = 5, + Et = 6, + ut = 7, + dt = 8, + ft = Symbol("CIRCULAR_REF"), + pt = Symbol("EOF"); +let mt = Object.create(null), + yt = Object.create(null), + wt = Object.create(null); +class Name { + constructor(e) { + this.name = e; + } + static get(e) { + return (yt[e] ||= new Name(e)); + } +} +class Cmd { + constructor(e) { + this.cmd = e; + } + static get(e) { + return (mt[e] ||= new Cmd(e)); + } +} +const bt = function nonSerializableClosure() { + return bt; +}; +class Dict { + constructor(e = null) { + this._map = Object.create(null); + this.xref = e; + this.objId = null; + this.suppressEncryption = !1; + this.__nonSerializable__ = bt; + } + assignXref(e) { + this.xref = e; + } + get size() { + return Object.keys(this._map).length; + } + get(e, t, i) { + let a = this._map[e]; + if (void 0 === a && void 0 !== t) { + a = this._map[t]; + void 0 === a && void 0 !== i && (a = this._map[i]); + } + return a instanceof Ref && this.xref + ? this.xref.fetch(a, this.suppressEncryption) + : a; + } + async getAsync(e, t, i) { + let a = this._map[e]; + if (void 0 === a && void 0 !== t) { + a = this._map[t]; + void 0 === a && void 0 !== i && (a = this._map[i]); + } + return a instanceof Ref && this.xref + ? this.xref.fetchAsync(a, this.suppressEncryption) + : a; + } + getArray(e, t, i) { + let a = this._map[e]; + if (void 0 === a && void 0 !== t) { + a = this._map[t]; + void 0 === a && void 0 !== i && (a = this._map[i]); + } + a instanceof Ref && + this.xref && + (a = this.xref.fetch(a, this.suppressEncryption)); + if (Array.isArray(a)) { + a = a.slice(); + for (let e = 0, t = a.length; e < t; e++) + a[e] instanceof Ref && + this.xref && + (a[e] = this.xref.fetch(a[e], this.suppressEncryption)); + } + return a; + } + getRaw(e) { + return this._map[e]; + } + getKeys() { + return Object.keys(this._map); + } + getRawValues() { + return Object.values(this._map); + } + set(e, t) { + this._map[e] = t; + } + has(e) { + return void 0 !== this._map[e]; + } + forEach(e) { + for (const t in this._map) e(t, this.get(t)); + } + static get empty() { + const e = new Dict(null); + e.set = (e, t) => { + unreachable("Should not call `set` on the empty dictionary."); + }; + return shadow(this, "empty", e); + } + static merge({ xref: e, dictArray: t, mergeSubDicts: i = !1 }) { + const a = new Dict(e), + s = new Map(); + for (const e of t) + if (e instanceof Dict) + for (const [t, a] of Object.entries(e._map)) { + let e = s.get(t); + if (void 0 === e) { + e = []; + s.set(t, e); + } else if (!(i && a instanceof Dict)) continue; + e.push(a); + } + for (const [t, i] of s) { + if (1 === i.length || !(i[0] instanceof Dict)) { + a._map[t] = i[0]; + continue; + } + const s = new Dict(e); + for (const e of i) + for (const [t, i] of Object.entries(e._map)) + void 0 === s._map[t] && (s._map[t] = i); + s.size > 0 && (a._map[t] = s); + } + s.clear(); + return a.size > 0 ? a : Dict.empty; + } + clone() { + const e = new Dict(this.xref); + for (const t of this.getKeys()) e.set(t, this.getRaw(t)); + return e; + } +} +class Ref { + constructor(e, t) { + this.num = e; + this.gen = t; + } + toString() { + return 0 === this.gen ? `${this.num}R` : `${this.num}R${this.gen}`; + } + static fromString(e) { + const t = wt[e]; + if (t) return t; + const i = /^(\d+)R(\d*)$/.exec(e); + return i && "0" !== i[1] + ? (wt[e] = new Ref(parseInt(i[1]), i[2] ? parseInt(i[2]) : 0)) + : null; + } + static get(e, t) { + const i = 0 === t ? `${e}R` : `${e}R${t}`; + return (wt[i] ||= new Ref(e, t)); + } +} +class RefSet { + constructor(e = null) { + this._set = new Set(e?._set); + } + has(e) { + return this._set.has(e.toString()); + } + put(e) { + this._set.add(e.toString()); + } + remove(e) { + this._set.delete(e.toString()); + } + [Symbol.iterator]() { + return this._set.values(); + } + clear() { + this._set.clear(); + } +} +class RefSetCache { + constructor() { + this._map = new Map(); + } + get size() { + return this._map.size; + } + get(e) { + return this._map.get(e.toString()); + } + has(e) { + return this._map.has(e.toString()); + } + put(e, t) { + this._map.set(e.toString(), t); + } + putAlias(e, t) { + this._map.set(e.toString(), this.get(t)); + } + [Symbol.iterator]() { + return this._map.values(); + } + clear() { + this._map.clear(); + } + *items() { + for (const [e, t] of this._map) yield [Ref.fromString(e), t]; + } +} +function isName(e, t) { + return e instanceof Name && (void 0 === t || e.name === t); +} +function isCmd(e, t) { + return e instanceof Cmd && (void 0 === t || e.cmd === t); +} +function isDict(e, t) { + return e instanceof Dict && (void 0 === t || isName(e.get("Type"), t)); +} +function isRefsEqual(e, t) { + return e.num === t.num && e.gen === t.gen; +} +class BaseStream { + constructor() { + this.constructor === BaseStream && + unreachable("Cannot initialize BaseStream."); + } + get length() { + unreachable("Abstract getter `length` accessed"); + } + get isEmpty() { + unreachable("Abstract getter `isEmpty` accessed"); + } + get isDataLoaded() { + return shadow(this, "isDataLoaded", !0); + } + getByte() { + unreachable("Abstract method `getByte` called"); + } + getBytes(e) { + unreachable("Abstract method `getBytes` called"); + } + peekByte() { + const e = this.getByte(); + -1 !== e && this.pos--; + return e; + } + peekBytes(e) { + const t = this.getBytes(e); + this.pos -= t.length; + return t; + } + getUint16() { + const e = this.getByte(), + t = this.getByte(); + return -1 === e || -1 === t ? -1 : (e << 8) + t; + } + getInt32() { + return ( + (this.getByte() << 24) + + (this.getByte() << 16) + + (this.getByte() << 8) + + this.getByte() + ); + } + getByteRange(e, t) { + unreachable("Abstract method `getByteRange` called"); + } + getString(e) { + return bytesToString(this.getBytes(e)); + } + skip(e) { + this.pos += e || 1; + } + reset() { + unreachable("Abstract method `reset` called"); + } + moveStart() { + unreachable("Abstract method `moveStart` called"); + } + makeSubStream(e, t, i = null) { + unreachable("Abstract method `makeSubStream` called"); + } + getBaseStreams() { + return null; + } +} +const Dt = /^[1-9]\.\d$/; +function getLookupTableFactory(e) { + let t; + return function () { + if (e) { + t = Object.create(null); + e(t); + e = null; + } + return t; + }; +} +class MissingDataException extends rt { + constructor(e, t) { + super(`Missing data [${e}, ${t})`, "MissingDataException"); + this.begin = e; + this.end = t; + } +} +class ParserEOFException extends rt { + constructor(e) { + super(e, "ParserEOFException"); + } +} +class XRefEntryException extends rt { + constructor(e) { + super(e, "XRefEntryException"); + } +} +class XRefParseException extends rt { + constructor(e) { + super(e, "XRefParseException"); + } +} +function arrayBuffersToBytes(e) { + const t = e.length; + if (0 === t) return new Uint8Array(0); + if (1 === t) return new Uint8Array(e[0]); + let i = 0; + for (let a = 0; a < t; a++) i += e[a].byteLength; + const a = new Uint8Array(i); + let s = 0; + for (let i = 0; i < t; i++) { + const t = new Uint8Array(e[i]); + a.set(t, s); + s += t.byteLength; + } + return a; +} +function getInheritableProperty({ + dict: e, + key: t, + getArray: i = !1, + stopWhenFound: a = !0, +}) { + let s; + const r = new RefSet(); + for (; e instanceof Dict && (!e.objId || !r.has(e.objId)); ) { + e.objId && r.put(e.objId); + const n = i ? e.getArray(t) : e.get(t); + if (void 0 !== n) { + if (a) return n; + (s ||= []).push(n); + } + e = e.get("Parent"); + } + return s; +} +const Ft = [ + "", + "C", + "CC", + "CCC", + "CD", + "D", + "DC", + "DCC", + "DCCC", + "CM", + "", + "X", + "XX", + "XXX", + "XL", + "L", + "LX", + "LXX", + "LXXX", + "XC", + "", + "I", + "II", + "III", + "IV", + "V", + "VI", + "VII", + "VIII", + "IX", +]; +function toRomanNumerals(e, t = !1) { + assert( + Number.isInteger(e) && e > 0, + "The number should be a positive integer.", + ); + const i = []; + let a; + for (; e >= 1e3; ) { + e -= 1e3; + i.push("M"); + } + a = (e / 100) | 0; + e %= 100; + i.push(Ft[a]); + a = (e / 10) | 0; + e %= 10; + i.push(Ft[10 + a]); + i.push(Ft[20 + e]); + const s = i.join(""); + return t ? s.toLowerCase() : s; +} +function log2(e) { + return e <= 0 ? 0 : Math.ceil(Math.log2(e)); +} +function readInt8(e, t) { + return (e[t] << 24) >> 24; +} +function readUint16(e, t) { + return (e[t] << 8) | e[t + 1]; +} +function readUint32(e, t) { + return ((e[t] << 24) | (e[t + 1] << 16) | (e[t + 2] << 8) | e[t + 3]) >>> 0; +} +function isWhiteSpace(e) { + return 32 === e || 9 === e || 13 === e || 10 === e; +} +function isNumberArray(e, t) { + return ( + Array.isArray(e) && + (null === t || e.length === t) && + e.every((e) => "number" == typeof e) + ); +} +function lookupMatrix(e, t) { + return isNumberArray(e, 6) ? e : t; +} +function lookupRect(e, t) { + return isNumberArray(e, 4) ? e : t; +} +function lookupNormalRect(e, t) { + return isNumberArray(e, 4) ? Util.normalizeRect(e) : t; +} +function parseXFAPath(e) { + const t = /(.+)\[(\d+)\]$/; + return e.split(".").map((e) => { + const i = e.match(t); + return i ? { name: i[1], pos: parseInt(i[2], 10) } : { name: e, pos: 0 }; + }); +} +function escapePDFName(e) { + const t = []; + let i = 0; + for (let a = 0, s = e.length; a < s; a++) { + const s = e.charCodeAt(a); + if ( + s < 33 || + s > 126 || + 35 === s || + 40 === s || + 41 === s || + 60 === s || + 62 === s || + 91 === s || + 93 === s || + 123 === s || + 125 === s || + 47 === s || + 37 === s + ) { + i < a && t.push(e.substring(i, a)); + t.push(`#${s.toString(16)}`); + i = a + 1; + } + } + if (0 === t.length) return e; + i < e.length && t.push(e.substring(i, e.length)); + return t.join(""); +} +function escapeString(e) { + return e.replaceAll(/([()\\\n\r])/g, (e) => + "\n" === e ? "\\n" : "\r" === e ? "\\r" : `\\${e}`, + ); +} +function _collectJS(e, t, i, a) { + if (!e) return; + let s = null; + if (e instanceof Ref) { + if (a.has(e)) return; + s = e; + a.put(s); + e = t.fetch(e); + } + if (Array.isArray(e)) for (const s of e) _collectJS(s, t, i, a); + else if (e instanceof Dict) { + if (isName(e.get("S"), "JavaScript")) { + const t = e.get("JS"); + let a; + t instanceof BaseStream + ? (a = t.getString()) + : "string" == typeof t && (a = t); + a &&= stringToPDFString(a).replaceAll("\0", ""); + a && i.push(a); + } + _collectJS(e.getRaw("Next"), t, i, a); + } + s && a.remove(s); +} +function collectActions(e, t, i) { + const a = Object.create(null), + s = getInheritableProperty({ dict: t, key: "AA", stopWhenFound: !1 }); + if (s) + for (let t = s.length - 1; t >= 0; t--) { + const r = s[t]; + if (r instanceof Dict) + for (const t of r.getKeys()) { + const s = i[t]; + if (!s) continue; + const n = []; + _collectJS(r.getRaw(t), e, n, new RefSet()); + n.length > 0 && (a[s] = n); + } + } + if (t.has("A")) { + const i = []; + _collectJS(t.get("A"), e, i, new RefSet()); + i.length > 0 && (a.Action = i); + } + return objectSize(a) > 0 ? a : null; +} +const St = { 60: "<", 62: ">", 38: "&", 34: """, 39: "'" }; +function* codePointIter(e) { + for (let t = 0, i = e.length; t < i; t++) { + const i = e.codePointAt(t); + i > 55295 && (i < 57344 || i > 65533) && t++; + yield i; + } +} +function encodeToXmlString(e) { + const t = []; + let i = 0; + for (let a = 0, s = e.length; a < s; a++) { + const s = e.codePointAt(a); + if (32 <= s && s <= 126) { + const r = St[s]; + if (r) { + i < a && t.push(e.substring(i, a)); + t.push(r); + i = a + 1; + } + } else { + i < a && t.push(e.substring(i, a)); + t.push(`&#x${s.toString(16).toUpperCase()};`); + s > 55295 && (s < 57344 || s > 65533) && a++; + i = a + 1; + } + } + if (0 === t.length) return e; + i < e.length && t.push(e.substring(i, e.length)); + return t.join(""); +} +function validateFontName(e, t = !1) { + const i = /^("|').*("|')$/.exec(e); + if (i && i[1] === i[2]) { + if (new RegExp(`[^\\\\]${i[1]}`).test(e.slice(1, -1))) { + t && warn(`FontFamily contains unescaped ${i[1]}: ${e}.`); + return !1; + } + } else + for (const i of e.split(/[ \t]+/)) + if (/^(\d|(-(\d|-)))/.test(i) || !/^[\w-\\]+$/.test(i)) { + t && warn(`FontFamily contains invalid : ${e}.`); + return !1; + } + return !0; +} +function validateCSSFont(e) { + const t = new Set([ + "100", + "200", + "300", + "400", + "500", + "600", + "700", + "800", + "900", + "1000", + "normal", + "bold", + "bolder", + "lighter", + ]), + { fontFamily: i, fontWeight: a, italicAngle: s } = e; + if (!validateFontName(i, !0)) return !1; + const r = a ? a.toString() : ""; + e.fontWeight = t.has(r) ? r : "400"; + const n = parseFloat(s); + e.italicAngle = isNaN(n) || n < -90 || n > 90 ? "14" : s.toString(); + return !0; +} +function recoverJsURL(e) { + const t = new RegExp( + "^\\s*(" + + ["app.launchURL", "window.open", "xfa.host.gotoURL"] + .join("|") + .replaceAll(".", "\\.") + + ")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))", + "i", + ).exec(e); + if (t?.[2]) { + const e = t[2]; + let i = !1; + "true" === t[3] && "app.launchURL" === t[1] && (i = !0); + return { url: e, newWindow: i }; + } + return null; +} +function numberToString(e) { + if (Number.isInteger(e)) return e.toString(); + const t = Math.round(100 * e); + return t % 100 == 0 + ? (t / 100).toString() + : t % 10 == 0 + ? e.toFixed(1) + : e.toFixed(2); +} +function getNewAnnotationsMap(e) { + if (!e) return null; + const t = new Map(); + for (const [i, a] of e) { + if (!i.startsWith(E)) continue; + let e = t.get(a.pageIndex); + if (!e) { + e = []; + t.set(a.pageIndex, e); + } + e.push(a); + } + return t.size > 0 ? t : null; +} +function isAscii(e) { + return /^[\x00-\x7F]*$/.test(e); +} +function stringToUTF16HexString(e) { + const t = []; + for (let i = 0, a = e.length; i < a; i++) { + const a = e.charCodeAt(i); + t.push( + ((a >> 8) & 255).toString(16).padStart(2, "0"), + (255 & a).toString(16).padStart(2, "0"), + ); + } + return t.join(""); +} +function stringToUTF16String(e, t = !1) { + const i = []; + t && i.push("þÿ"); + for (let t = 0, a = e.length; t < a; t++) { + const a = e.charCodeAt(t); + i.push(String.fromCharCode((a >> 8) & 255), String.fromCharCode(255 & a)); + } + return i.join(""); +} +function getRotationMatrix(e, t, i) { + switch (e) { + case 90: + return [0, 1, -1, 0, t, 0]; + case 180: + return [-1, 0, 0, -1, t, i]; + case 270: + return [0, -1, 1, 0, 0, i]; + default: + throw new Error("Invalid rotation"); + } +} +function getSizeInBytes(e) { + return Math.ceil(Math.ceil(Math.log2(1 + e)) / 8); +} +class Stream extends BaseStream { + constructor(e, t, i, a) { + super(); + this.bytes = e instanceof Uint8Array ? e : new Uint8Array(e); + this.start = t || 0; + this.pos = this.start; + this.end = t + i || this.bytes.length; + this.dict = a; + } + get length() { + return this.end - this.start; + } + get isEmpty() { + return 0 === this.length; + } + getByte() { + return this.pos >= this.end ? -1 : this.bytes[this.pos++]; + } + getBytes(e) { + const t = this.bytes, + i = this.pos, + a = this.end; + if (!e) return t.subarray(i, a); + let s = i + e; + s > a && (s = a); + this.pos = s; + return t.subarray(i, s); + } + getByteRange(e, t) { + e < 0 && (e = 0); + t > this.end && (t = this.end); + return this.bytes.subarray(e, t); + } + reset() { + this.pos = this.start; + } + moveStart() { + this.start = this.pos; + } + makeSubStream(e, t, i = null) { + return new Stream(this.bytes.buffer, e, t, i); + } +} +class StringStream extends Stream { + constructor(e) { + super(stringToBytes(e)); + } +} +class NullStream extends Stream { + constructor() { + super(new Uint8Array(0)); + } +} +class ChunkedStream extends Stream { + constructor(e, t, i) { + super(new Uint8Array(e), 0, e, null); + this.chunkSize = t; + this._loadedChunks = new Set(); + this.numChunks = Math.ceil(e / t); + this.manager = i; + this.progressiveDataLength = 0; + this.lastSuccessfulEnsureByteChunk = -1; + } + getMissingChunks() { + const e = []; + for (let t = 0, i = this.numChunks; t < i; ++t) + this._loadedChunks.has(t) || e.push(t); + return e; + } + get numChunksLoaded() { + return this._loadedChunks.size; + } + get isDataLoaded() { + return this.numChunksLoaded === this.numChunks; + } + onReceiveData(e, t) { + const i = this.chunkSize; + if (e % i != 0) throw new Error(`Bad begin offset: ${e}`); + const a = e + t.byteLength; + if (a % i != 0 && a !== this.bytes.length) + throw new Error(`Bad end offset: ${a}`); + this.bytes.set(new Uint8Array(t), e); + const s = Math.floor(e / i), + r = Math.floor((a - 1) / i) + 1; + for (let e = s; e < r; ++e) this._loadedChunks.add(e); + } + onReceiveProgressiveData(e) { + let t = this.progressiveDataLength; + const i = Math.floor(t / this.chunkSize); + this.bytes.set(new Uint8Array(e), t); + t += e.byteLength; + this.progressiveDataLength = t; + const a = t >= this.end ? this.numChunks : Math.floor(t / this.chunkSize); + for (let e = i; e < a; ++e) this._loadedChunks.add(e); + } + ensureByte(e) { + if (e < this.progressiveDataLength) return; + const t = Math.floor(e / this.chunkSize); + if (!(t > this.numChunks) && t !== this.lastSuccessfulEnsureByteChunk) { + if (!this._loadedChunks.has(t)) throw new MissingDataException(e, e + 1); + this.lastSuccessfulEnsureByteChunk = t; + } + } + ensureRange(e, t) { + if (e >= t) return; + if (t <= this.progressiveDataLength) return; + const i = Math.floor(e / this.chunkSize); + if (i > this.numChunks) return; + const a = Math.min( + Math.floor((t - 1) / this.chunkSize) + 1, + this.numChunks, + ); + for (let s = i; s < a; ++s) + if (!this._loadedChunks.has(s)) throw new MissingDataException(e, t); + } + nextEmptyChunk(e) { + const t = this.numChunks; + for (let i = 0; i < t; ++i) { + const a = (e + i) % t; + if (!this._loadedChunks.has(a)) return a; + } + return null; + } + hasChunk(e) { + return this._loadedChunks.has(e); + } + getByte() { + const e = this.pos; + if (e >= this.end) return -1; + e >= this.progressiveDataLength && this.ensureByte(e); + return this.bytes[this.pos++]; + } + getBytes(e) { + const t = this.bytes, + i = this.pos, + a = this.end; + if (!e) { + a > this.progressiveDataLength && this.ensureRange(i, a); + return t.subarray(i, a); + } + let s = i + e; + s > a && (s = a); + s > this.progressiveDataLength && this.ensureRange(i, s); + this.pos = s; + return t.subarray(i, s); + } + getByteRange(e, t) { + e < 0 && (e = 0); + t > this.end && (t = this.end); + t > this.progressiveDataLength && this.ensureRange(e, t); + return this.bytes.subarray(e, t); + } + makeSubStream(e, t, i = null) { + t + ? e + t > this.progressiveDataLength && this.ensureRange(e, e + t) + : e >= this.progressiveDataLength && this.ensureByte(e); + function ChunkedStreamSubstream() {} + ChunkedStreamSubstream.prototype = Object.create(this); + ChunkedStreamSubstream.prototype.getMissingChunks = function () { + const e = this.chunkSize, + t = Math.floor(this.start / e), + i = Math.floor((this.end - 1) / e) + 1, + a = []; + for (let e = t; e < i; ++e) this._loadedChunks.has(e) || a.push(e); + return a; + }; + Object.defineProperty(ChunkedStreamSubstream.prototype, "isDataLoaded", { + get() { + return ( + this.numChunksLoaded === this.numChunks || + 0 === this.getMissingChunks().length + ); + }, + configurable: !0, + }); + const a = new ChunkedStreamSubstream(); + a.pos = a.start = e; + a.end = e + t || this.end; + a.dict = i; + return a; + } + getBaseStreams() { + return [this]; + } +} +class ChunkedStreamManager { + constructor(e, t) { + this.length = t.length; + this.chunkSize = t.rangeChunkSize; + this.stream = new ChunkedStream(this.length, this.chunkSize, this); + this.pdfNetworkStream = e; + this.disableAutoFetch = t.disableAutoFetch; + this.msgHandler = t.msgHandler; + this.currRequestId = 0; + this._chunksNeededByRequest = new Map(); + this._requestsByChunk = new Map(); + this._promisesByRequest = new Map(); + this.progressiveDataLength = 0; + this.aborted = !1; + this._loadedStreamCapability = Promise.withResolvers(); + } + sendRequest(e, t) { + const i = this.pdfNetworkStream.getRangeReader(e, t); + i.isStreamingSupported || (i.onProgress = this.onProgress.bind(this)); + let a = [], + s = 0; + return new Promise((e, t) => { + const readChunk = ({ value: r, done: n }) => { + try { + if (n) { + const t = arrayBuffersToBytes(a); + a = null; + e(t); + return; + } + s += r.byteLength; + i.isStreamingSupported && this.onProgress({ loaded: s }); + a.push(r); + i.read().then(readChunk, t); + } catch (e) { + t(e); + } + }; + i.read().then(readChunk, t); + }).then((t) => { + this.aborted || this.onReceiveData({ chunk: t, begin: e }); + }); + } + requestAllChunks(e = !1) { + if (!e) { + const e = this.stream.getMissingChunks(); + this._requestChunks(e); + } + return this._loadedStreamCapability.promise; + } + _requestChunks(e) { + const t = this.currRequestId++, + i = new Set(); + this._chunksNeededByRequest.set(t, i); + for (const t of e) this.stream.hasChunk(t) || i.add(t); + if (0 === i.size) return Promise.resolve(); + const a = Promise.withResolvers(); + this._promisesByRequest.set(t, a); + const s = []; + for (const e of i) { + let i = this._requestsByChunk.get(e); + if (!i) { + i = []; + this._requestsByChunk.set(e, i); + s.push(e); + } + i.push(t); + } + if (s.length > 0) { + const e = this.groupChunks(s); + for (const t of e) { + const e = t.beginChunk * this.chunkSize, + i = Math.min(t.endChunk * this.chunkSize, this.length); + this.sendRequest(e, i).catch(a.reject); + } + } + return a.promise.catch((e) => { + if (!this.aborted) throw e; + }); + } + getStream() { + return this.stream; + } + requestRange(e, t) { + t = Math.min(t, this.length); + const i = this.getBeginChunk(e), + a = this.getEndChunk(t), + s = []; + for (let e = i; e < a; ++e) s.push(e); + return this._requestChunks(s); + } + requestRanges(e = []) { + const t = []; + for (const i of e) { + const e = this.getBeginChunk(i.begin), + a = this.getEndChunk(i.end); + for (let i = e; i < a; ++i) t.includes(i) || t.push(i); + } + t.sort(function (e, t) { + return e - t; + }); + return this._requestChunks(t); + } + groupChunks(e) { + const t = []; + let i = -1, + a = -1; + for (let s = 0, r = e.length; s < r; ++s) { + const r = e[s]; + i < 0 && (i = r); + if (a >= 0 && a + 1 !== r) { + t.push({ beginChunk: i, endChunk: a + 1 }); + i = r; + } + s + 1 === e.length && t.push({ beginChunk: i, endChunk: r + 1 }); + a = r; + } + return t; + } + onProgress(e) { + this.msgHandler.send("DocProgress", { + loaded: this.stream.numChunksLoaded * this.chunkSize + e.loaded, + total: this.length, + }); + } + onReceiveData(e) { + const t = e.chunk, + i = void 0 === e.begin, + a = i ? this.progressiveDataLength : e.begin, + s = a + t.byteLength, + r = Math.floor(a / this.chunkSize), + n = + s < this.length + ? Math.floor(s / this.chunkSize) + : Math.ceil(s / this.chunkSize); + if (i) { + this.stream.onReceiveProgressiveData(t); + this.progressiveDataLength = s; + } else this.stream.onReceiveData(a, t); + this.stream.isDataLoaded && + this._loadedStreamCapability.resolve(this.stream); + const o = []; + for (let e = r; e < n; ++e) { + const t = this._requestsByChunk.get(e); + if (t) { + this._requestsByChunk.delete(e); + for (const i of t) { + const t = this._chunksNeededByRequest.get(i); + t.has(e) && t.delete(e); + t.size > 0 || o.push(i); + } + } + } + if (!this.disableAutoFetch && 0 === this._requestsByChunk.size) { + let e; + if (1 === this.stream.numChunksLoaded) { + const t = this.stream.numChunks - 1; + this.stream.hasChunk(t) || (e = t); + } else e = this.stream.nextEmptyChunk(n); + Number.isInteger(e) && this._requestChunks([e]); + } + for (const e of o) { + const t = this._promisesByRequest.get(e); + this._promisesByRequest.delete(e); + t.resolve(); + } + this.msgHandler.send("DocProgress", { + loaded: this.stream.numChunksLoaded * this.chunkSize, + total: this.length, + }); + } + onError(e) { + this._loadedStreamCapability.reject(e); + } + getBeginChunk(e) { + return Math.floor(e / this.chunkSize); + } + getEndChunk(e) { + return Math.floor((e - 1) / this.chunkSize) + 1; + } + abort(e) { + this.aborted = !0; + this.pdfNetworkStream?.cancelAllRequests(e); + for (const t of this._promisesByRequest.values()) t.reject(e); + } +} +class ColorSpace { + constructor(e, t) { + this.constructor === ColorSpace && + unreachable("Cannot initialize ColorSpace."); + this.name = e; + this.numComps = t; + } + getRgb(e, t) { + const i = new Uint8ClampedArray(3); + this.getRgbItem(e, t, i, 0); + return i; + } + getRgbItem(e, t, i, a) { + unreachable("Should not call ColorSpace.getRgbItem"); + } + getRgbBuffer(e, t, i, a, s, r, n) { + unreachable("Should not call ColorSpace.getRgbBuffer"); + } + getOutputLength(e, t) { + unreachable("Should not call ColorSpace.getOutputLength"); + } + isPassthrough(e) { + return !1; + } + isDefaultDecode(e, t) { + return ColorSpace.isDefaultDecode(e, this.numComps); + } + fillRgb(e, t, i, a, s, r, n, o, g) { + const c = t * i; + let h = null; + const l = 1 << n, + C = i !== s || t !== a; + if (this.isPassthrough(n)) h = o; + else if ( + 1 === this.numComps && + c > l && + "DeviceGray" !== this.name && + "DeviceRGB" !== this.name + ) { + const t = n <= 8 ? new Uint8Array(l) : new Uint16Array(l); + for (let e = 0; e < l; e++) t[e] = e; + const i = new Uint8ClampedArray(3 * l); + this.getRgbBuffer(t, 0, l, i, 0, n, 0); + if (C) { + h = new Uint8Array(3 * c); + let e = 0; + for (let t = 0; t < c; ++t) { + const a = 3 * o[t]; + h[e++] = i[a]; + h[e++] = i[a + 1]; + h[e++] = i[a + 2]; + } + } else { + let t = 0; + for (let a = 0; a < c; ++a) { + const s = 3 * o[a]; + e[t++] = i[s]; + e[t++] = i[s + 1]; + e[t++] = i[s + 2]; + t += g; + } + } + } else if (C) { + h = new Uint8ClampedArray(3 * c); + this.getRgbBuffer(o, 0, c, h, 0, n, 0); + } else this.getRgbBuffer(o, 0, a * r, e, 0, n, g); + if (h) + if (C) + !(function resizeRgbImage(e, t, i, a, s, r, n) { + n = 1 !== n ? 0 : n; + const o = i / s, + g = a / r; + let c, + h = 0; + const l = new Uint16Array(s), + C = 3 * i; + for (let e = 0; e < s; e++) l[e] = 3 * Math.floor(e * o); + for (let i = 0; i < r; i++) { + const a = Math.floor(i * g) * C; + for (let i = 0; i < s; i++) { + c = a + l[i]; + t[h++] = e[c++]; + t[h++] = e[c++]; + t[h++] = e[c++]; + h += n; + } + } + })(h, e, t, i, a, s, g); + else { + let t = 0, + i = 0; + for (let s = 0, n = a * r; s < n; s++) { + e[t++] = h[i++]; + e[t++] = h[i++]; + e[t++] = h[i++]; + t += g; + } + } + } + get usesZeroToOneRange() { + return shadow(this, "usesZeroToOneRange", !0); + } + static _cache(e, t, i, a) { + if (!i) + throw new Error( + 'ColorSpace._cache - expected "localColorSpaceCache" argument.', + ); + if (!a) + throw new Error( + 'ColorSpace._cache - expected "parsedColorSpace" argument.', + ); + let s, r; + if (e instanceof Ref) { + r = e; + e = t.fetch(e); + } + e instanceof Name && (s = e.name); + (s || r) && i.set(s, r, a); + } + static getCached(e, t, i) { + if (!i) + throw new Error( + 'ColorSpace.getCached - expected "localColorSpaceCache" argument.', + ); + if (e instanceof Ref) { + const a = i.getByRef(e); + if (a) return a; + try { + e = t.fetch(e); + } catch (e) { + if (e instanceof MissingDataException) throw e; + } + } + if (e instanceof Name) { + const t = i.getByName(e.name); + if (t) return t; + } + return null; + } + static async parseAsync({ + cs: e, + xref: t, + resources: i = null, + pdfFunctionFactory: a, + localColorSpaceCache: s, + }) { + const r = this._parse(e, t, i, a); + this._cache(e, t, s, r); + return r; + } + static parse({ + cs: e, + xref: t, + resources: i = null, + pdfFunctionFactory: a, + localColorSpaceCache: s, + }) { + const r = this.getCached(e, t, s); + if (r) return r; + const n = this._parse(e, t, i, a); + this._cache(e, t, s, n); + return n; + } + static _parse(e, t, i = null, a) { + if ((e = t.fetchIfRef(e)) instanceof Name) + switch (e.name) { + case "G": + case "DeviceGray": + return this.singletons.gray; + case "RGB": + case "DeviceRGB": + return this.singletons.rgb; + case "CMYK": + case "DeviceCMYK": + return this.singletons.cmyk; + case "Pattern": + return new PatternCS(null); + default: + if (i instanceof Dict) { + const s = i.get("ColorSpace"); + if (s instanceof Dict) { + const r = s.get(e.name); + if (r) { + if (r instanceof Name) return this._parse(r, t, i, a); + e = r; + break; + } + } + } + throw new FormatError(`Unrecognized ColorSpace: ${e.name}`); + } + if (Array.isArray(e)) { + const s = t.fetchIfRef(e[0]).name; + let r, n, o, g, c, h; + switch (s) { + case "G": + case "DeviceGray": + return this.singletons.gray; + case "RGB": + case "DeviceRGB": + return this.singletons.rgb; + case "CMYK": + case "DeviceCMYK": + return this.singletons.cmyk; + case "CalGray": + r = t.fetchIfRef(e[1]); + g = r.getArray("WhitePoint"); + c = r.getArray("BlackPoint"); + h = r.get("Gamma"); + return new CalGrayCS(g, c, h); + case "CalRGB": + r = t.fetchIfRef(e[1]); + g = r.getArray("WhitePoint"); + c = r.getArray("BlackPoint"); + h = r.getArray("Gamma"); + const l = r.getArray("Matrix"); + return new CalRGBCS(g, c, h, l); + case "ICCBased": + const C = t.fetchIfRef(e[1]).dict; + n = C.get("N"); + const Q = C.get("Alternate"); + if (Q) { + const e = this._parse(Q, t, i, a); + if (e.numComps === n) return e; + warn("ICCBased color space: Ignoring incorrect /Alternate entry."); + } + if (1 === n) return this.singletons.gray; + if (3 === n) return this.singletons.rgb; + if (4 === n) return this.singletons.cmyk; + break; + case "Pattern": + o = e[1] || null; + o && (o = this._parse(o, t, i, a)); + return new PatternCS(o); + case "I": + case "Indexed": + o = this._parse(e[1], t, i, a); + const E = t.fetchIfRef(e[2]) + 1, + u = t.fetchIfRef(e[3]); + return new IndexedCS(o, E, u); + case "Separation": + case "DeviceN": + const d = t.fetchIfRef(e[1]); + n = Array.isArray(d) ? d.length : 1; + o = this._parse(e[2], t, i, a); + const f = a.create(e[3]); + return new AlternateCS(n, o, f); + case "Lab": + r = t.fetchIfRef(e[1]); + g = r.getArray("WhitePoint"); + c = r.getArray("BlackPoint"); + const p = r.getArray("Range"); + return new LabCS(g, c, p); + default: + throw new FormatError(`Unimplemented ColorSpace object: ${s}`); + } + } + throw new FormatError(`Unrecognized ColorSpace object: ${e}`); + } + static isDefaultDecode(e, t) { + if (!Array.isArray(e)) return !0; + if (2 * t !== e.length) { + warn("The decode map is not the correct length"); + return !0; + } + for (let t = 0, i = e.length; t < i; t += 2) + if (0 !== e[t] || 1 !== e[t + 1]) return !1; + return !0; + } + static get singletons() { + return shadow(this, "singletons", { + get gray() { + return shadow(this, "gray", new DeviceGrayCS()); + }, + get rgb() { + return shadow(this, "rgb", new DeviceRgbCS()); + }, + get cmyk() { + return shadow(this, "cmyk", new DeviceCmykCS()); + }, + }); + } +} +class AlternateCS extends ColorSpace { + constructor(e, t, i) { + super("Alternate", e); + this.base = t; + this.tintFn = i; + this.tmpBuf = new Float32Array(t.numComps); + } + getRgbItem(e, t, i, a) { + const s = this.tmpBuf; + this.tintFn(e, t, s, 0); + this.base.getRgbItem(s, 0, i, a); + } + getRgbBuffer(e, t, i, a, s, r, n) { + const o = this.tintFn, + g = this.base, + c = 1 / ((1 << r) - 1), + h = g.numComps, + l = g.usesZeroToOneRange, + C = (g.isPassthrough(8) || !l) && 0 === n; + let Q = C ? s : 0; + const E = C ? a : new Uint8ClampedArray(h * i), + u = this.numComps, + d = new Float32Array(u), + f = new Float32Array(h); + let p, m; + for (p = 0; p < i; p++) { + for (m = 0; m < u; m++) d[m] = e[t++] * c; + o(d, 0, f, 0); + if (l) for (m = 0; m < h; m++) E[Q++] = 255 * f[m]; + else { + g.getRgbItem(f, 0, E, Q); + Q += h; + } + } + C || g.getRgbBuffer(E, 0, i, a, s, 8, n); + } + getOutputLength(e, t) { + return this.base.getOutputLength( + (e * this.base.numComps) / this.numComps, + t, + ); + } +} +class PatternCS extends ColorSpace { + constructor(e) { + super("Pattern", null); + this.base = e; + } + isDefaultDecode(e, t) { + unreachable("Should not call PatternCS.isDefaultDecode"); + } +} +class IndexedCS extends ColorSpace { + constructor(e, t, i) { + super("Indexed", 1); + this.base = e; + this.highVal = t; + const a = e.numComps * t; + this.lookup = new Uint8Array(a); + if (i instanceof BaseStream) { + const e = i.getBytes(a); + this.lookup.set(e); + } else { + if ("string" != typeof i) + throw new FormatError(`IndexedCS - unrecognized lookup table: ${i}`); + for (let e = 0; e < a; ++e) this.lookup[e] = 255 & i.charCodeAt(e); + } + } + getRgbItem(e, t, i, a) { + const s = this.base.numComps, + r = e[t] * s; + this.base.getRgbBuffer(this.lookup, r, 1, i, a, 8, 0); + } + getRgbBuffer(e, t, i, a, s, r, n) { + const o = this.base, + g = o.numComps, + c = o.getOutputLength(g, n), + h = this.lookup; + for (let r = 0; r < i; ++r) { + const i = e[t++] * g; + o.getRgbBuffer(h, i, 1, a, s, 8, n); + s += c; + } + } + getOutputLength(e, t) { + return this.base.getOutputLength(e * this.base.numComps, t); + } + isDefaultDecode(e, t) { + if (!Array.isArray(e)) return !0; + if (2 !== e.length) { + warn("Decode map length is not correct"); + return !0; + } + if (!Number.isInteger(t) || t < 1) { + warn("Bits per component is not correct"); + return !0; + } + return 0 === e[0] && e[1] === (1 << t) - 1; + } +} +class DeviceGrayCS extends ColorSpace { + constructor() { + super("DeviceGray", 1); + } + getRgbItem(e, t, i, a) { + const s = 255 * e[t]; + i[a] = i[a + 1] = i[a + 2] = s; + } + getRgbBuffer(e, t, i, a, s, r, n) { + const o = 255 / ((1 << r) - 1); + let g = t, + c = s; + for (let t = 0; t < i; ++t) { + const t = o * e[g++]; + a[c++] = t; + a[c++] = t; + a[c++] = t; + c += n; + } + } + getOutputLength(e, t) { + return e * (3 + t); + } +} +class DeviceRgbCS extends ColorSpace { + constructor() { + super("DeviceRGB", 3); + } + getRgbItem(e, t, i, a) { + i[a] = 255 * e[t]; + i[a + 1] = 255 * e[t + 1]; + i[a + 2] = 255 * e[t + 2]; + } + getRgbBuffer(e, t, i, a, s, r, n) { + if (8 === r && 0 === n) { + a.set(e.subarray(t, t + 3 * i), s); + return; + } + const o = 255 / ((1 << r) - 1); + let g = t, + c = s; + for (let t = 0; t < i; ++t) { + a[c++] = o * e[g++]; + a[c++] = o * e[g++]; + a[c++] = o * e[g++]; + c += n; + } + } + getOutputLength(e, t) { + return ((e * (3 + t)) / 3) | 0; + } + isPassthrough(e) { + return 8 === e; + } +} +class DeviceCmykCS extends ColorSpace { + constructor() { + super("DeviceCMYK", 4); + } + #t(e, t, i, a, s) { + const r = e[t] * i, + n = e[t + 1] * i, + o = e[t + 2] * i, + g = e[t + 3] * i; + a[s] = + 255 + + r * + (-4.387332384609988 * r + + 54.48615194189176 * n + + 18.82290502165302 * o + + 212.25662451639585 * g - + 285.2331026137004) + + n * + (1.7149763477362134 * n - + 5.6096736904047315 * o + + -17.873870861415444 * g - + 5.497006427196366) + + o * + (-2.5217340131683033 * o - 21.248923337353073 * g + 17.5119270841813) + + g * (-21.86122147463605 * g - 189.48180835922747); + a[s + 1] = + 255 + + r * + (8.841041422036149 * r + + 60.118027045597366 * n + + 6.871425592049007 * o + + 31.159100130055922 * g - + 79.2970844816548) + + n * + (-15.310361306967817 * n + + 17.575251261109482 * o + + 131.35250912493976 * g - + 190.9453302588951) + + o * (4.444339102852739 * o + 9.8632861493405 * g - 24.86741582555878) + + g * (-20.737325471181034 * g - 187.80453709719578); + a[s + 2] = + 255 + + r * + (0.8842522430003296 * r + + 8.078677503112928 * n + + 30.89978309703729 * o - + 0.23883238689178934 * g - + 14.183576799673286) + + n * + (10.49593273432072 * n + + 63.02378494754052 * o + + 50.606957656360734 * g - + 112.23884253719248) + + o * + (0.03296041114873217 * o + + 115.60384449646641 * g - + 193.58209356861505) + + g * (-22.33816807309886 * g - 180.12613974708367); + } + getRgbItem(e, t, i, a) { + this.#t(e, t, 1, i, a); + } + getRgbBuffer(e, t, i, a, s, r, n) { + const o = 1 / ((1 << r) - 1); + for (let r = 0; r < i; r++) { + this.#t(e, t, o, a, s); + t += 4; + s += 3 + n; + } + } + getOutputLength(e, t) { + return ((e / 4) * (3 + t)) | 0; + } +} +class CalGrayCS extends ColorSpace { + constructor(e, t, i) { + super("CalGray", 1); + if (!e) + throw new FormatError( + "WhitePoint missing - required for color space CalGray", + ); + [this.XW, this.YW, this.ZW] = e; + [this.XB, this.YB, this.ZB] = t || [0, 0, 0]; + this.G = i || 1; + if (this.XW < 0 || this.ZW < 0 || 1 !== this.YW) + throw new FormatError( + `Invalid WhitePoint components for ${this.name}, no fallback available`, + ); + if (this.XB < 0 || this.YB < 0 || this.ZB < 0) { + info(`Invalid BlackPoint for ${this.name}, falling back to default.`); + this.XB = this.YB = this.ZB = 0; + } + (0 === this.XB && 0 === this.YB && 0 === this.ZB) || + warn( + `${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ZB: ${this.ZB}, only default values are supported.`, + ); + if (this.G < 1) { + info( + `Invalid Gamma: ${this.G} for ${this.name}, falling back to default.`, + ); + this.G = 1; + } + } + #t(e, t, i, a, s) { + const r = (e[t] * s) ** this.G, + n = this.YW * r, + o = Math.max(295.8 * n ** 0.3333333333333333 - 40.8, 0); + i[a] = o; + i[a + 1] = o; + i[a + 2] = o; + } + getRgbItem(e, t, i, a) { + this.#t(e, t, i, a, 1); + } + getRgbBuffer(e, t, i, a, s, r, n) { + const o = 1 / ((1 << r) - 1); + for (let r = 0; r < i; ++r) { + this.#t(e, t, a, s, o); + t += 1; + s += 3 + n; + } + } + getOutputLength(e, t) { + return e * (3 + t); + } +} +class CalRGBCS extends ColorSpace { + static #i = new Float32Array([ + 0.8951, 0.2664, -0.1614, -0.7502, 1.7135, 0.0367, 0.0389, -0.0685, 1.0296, + ]); + static #a = new Float32Array([ + 0.9869929, -0.1470543, 0.1599627, 0.4323053, 0.5183603, 0.0492912, + -0.0085287, 0.0400428, 0.9684867, + ]); + static #s = new Float32Array([ + 3.2404542, -1.5371385, -0.4985314, -0.969266, 1.8760108, 0.041556, + 0.0556434, -0.2040259, 1.0572252, + ]); + static #r = new Float32Array([1, 1, 1]); + static #n = new Float32Array(3); + static #o = new Float32Array(3); + static #g = new Float32Array(3); + static #I = (24 / 116) ** 3 / 8; + constructor(e, t, i, a) { + super("CalRGB", 3); + if (!e) + throw new FormatError( + "WhitePoint missing - required for color space CalRGB", + ); + const [s, r, n] = (this.whitePoint = e), + [o, g, c] = (this.blackPoint = t || new Float32Array(3)); + [this.GR, this.GG, this.GB] = i || new Float32Array([1, 1, 1]); + [ + this.MXA, + this.MYA, + this.MZA, + this.MXB, + this.MYB, + this.MZB, + this.MXC, + this.MYC, + this.MZC, + ] = a || new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]); + if (s < 0 || n < 0 || 1 !== r) + throw new FormatError( + `Invalid WhitePoint components for ${this.name}, no fallback available`, + ); + if (o < 0 || g < 0 || c < 0) { + info( + `Invalid BlackPoint for ${this.name} [${o}, ${g}, ${c}], falling back to default.`, + ); + this.blackPoint = new Float32Array(3); + } + if (this.GR < 0 || this.GG < 0 || this.GB < 0) { + info( + `Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ${this.name}, falling back to default.`, + ); + this.GR = this.GG = this.GB = 1; + } + } + #c(e, t, i) { + i[0] = e[0] * t[0] + e[1] * t[1] + e[2] * t[2]; + i[1] = e[3] * t[0] + e[4] * t[1] + e[5] * t[2]; + i[2] = e[6] * t[0] + e[7] * t[1] + e[8] * t[2]; + } + #h(e, t, i) { + i[0] = (1 * t[0]) / e[0]; + i[1] = (1 * t[1]) / e[1]; + i[2] = (1 * t[2]) / e[2]; + } + #l(e, t, i) { + i[0] = (0.95047 * t[0]) / e[0]; + i[1] = (1 * t[1]) / e[1]; + i[2] = (1.08883 * t[2]) / e[2]; + } + #C(e) { + return e <= 0.0031308 + ? this.#B(0, 1, 12.92 * e) + : e >= 0.99554525 + ? 1 + : this.#B(0, 1, 1.055 * e ** (1 / 2.4) - 0.055); + } + #B(e, t, i) { + return Math.max(e, Math.min(t, i)); + } + #Q(e) { + return e < 0 + ? -this.#Q(-e) + : e > 8 + ? ((e + 16) / 116) ** 3 + : e * CalRGBCS.#I; + } + #E(e, t, i) { + if (0 === e[0] && 0 === e[1] && 0 === e[2]) { + i[0] = t[0]; + i[1] = t[1]; + i[2] = t[2]; + return; + } + const a = this.#Q(0), + s = (1 - a) / (1 - this.#Q(e[0])), + r = 1 - s, + n = (1 - a) / (1 - this.#Q(e[1])), + o = 1 - n, + g = (1 - a) / (1 - this.#Q(e[2])), + c = 1 - g; + i[0] = t[0] * s + r; + i[1] = t[1] * n + o; + i[2] = t[2] * g + c; + } + #u(e, t, i) { + if (1 === e[0] && 1 === e[2]) { + i[0] = t[0]; + i[1] = t[1]; + i[2] = t[2]; + return; + } + const a = i; + this.#c(CalRGBCS.#i, t, a); + const s = CalRGBCS.#n; + this.#h(e, a, s); + this.#c(CalRGBCS.#a, s, i); + } + #d(e, t, i) { + const a = i; + this.#c(CalRGBCS.#i, t, a); + const s = CalRGBCS.#n; + this.#l(e, a, s); + this.#c(CalRGBCS.#a, s, i); + } + #t(e, t, i, a, s) { + const r = this.#B(0, 1, e[t] * s), + n = this.#B(0, 1, e[t + 1] * s), + o = this.#B(0, 1, e[t + 2] * s), + g = 1 === r ? 1 : r ** this.GR, + c = 1 === n ? 1 : n ** this.GG, + h = 1 === o ? 1 : o ** this.GB, + l = this.MXA * g + this.MXB * c + this.MXC * h, + C = this.MYA * g + this.MYB * c + this.MYC * h, + Q = this.MZA * g + this.MZB * c + this.MZC * h, + E = CalRGBCS.#o; + E[0] = l; + E[1] = C; + E[2] = Q; + const u = CalRGBCS.#g; + this.#u(this.whitePoint, E, u); + const d = CalRGBCS.#o; + this.#E(this.blackPoint, u, d); + const f = CalRGBCS.#g; + this.#d(CalRGBCS.#r, d, f); + const p = CalRGBCS.#o; + this.#c(CalRGBCS.#s, f, p); + i[a] = 255 * this.#C(p[0]); + i[a + 1] = 255 * this.#C(p[1]); + i[a + 2] = 255 * this.#C(p[2]); + } + getRgbItem(e, t, i, a) { + this.#t(e, t, i, a, 1); + } + getRgbBuffer(e, t, i, a, s, r, n) { + const o = 1 / ((1 << r) - 1); + for (let r = 0; r < i; ++r) { + this.#t(e, t, a, s, o); + t += 3; + s += 3 + n; + } + } + getOutputLength(e, t) { + return ((e * (3 + t)) / 3) | 0; + } +} +class LabCS extends ColorSpace { + constructor(e, t, i) { + super("Lab", 3); + if (!e) + throw new FormatError( + "WhitePoint missing - required for color space Lab", + ); + [this.XW, this.YW, this.ZW] = e; + [this.amin, this.amax, this.bmin, this.bmax] = i || [-100, 100, -100, 100]; + [this.XB, this.YB, this.ZB] = t || [0, 0, 0]; + if (this.XW < 0 || this.ZW < 0 || 1 !== this.YW) + throw new FormatError( + "Invalid WhitePoint components, no fallback available", + ); + if (this.XB < 0 || this.YB < 0 || this.ZB < 0) { + info("Invalid BlackPoint, falling back to default"); + this.XB = this.YB = this.ZB = 0; + } + if (this.amin > this.amax || this.bmin > this.bmax) { + info("Invalid Range, falling back to defaults"); + this.amin = -100; + this.amax = 100; + this.bmin = -100; + this.bmax = 100; + } + } + #f(e) { + return e >= 6 / 29 ? e ** 3 : (108 / 841) * (e - 4 / 29); + } + #p(e, t, i, a) { + return i + (e * (a - i)) / t; + } + #t(e, t, i, a, s) { + let r = e[t], + n = e[t + 1], + o = e[t + 2]; + if (!1 !== i) { + r = this.#p(r, i, 0, 100); + n = this.#p(n, i, this.amin, this.amax); + o = this.#p(o, i, this.bmin, this.bmax); + } + n > this.amax ? (n = this.amax) : n < this.amin && (n = this.amin); + o > this.bmax ? (o = this.bmax) : o < this.bmin && (o = this.bmin); + const g = (r + 16) / 116, + c = g + n / 500, + h = g - o / 200, + l = this.XW * this.#f(c), + C = this.YW * this.#f(g), + Q = this.ZW * this.#f(h); + let E, u, d; + if (this.ZW < 1) { + E = 3.1339 * l + -1.617 * C + -0.4906 * Q; + u = -0.9785 * l + 1.916 * C + 0.0333 * Q; + d = 0.072 * l + -0.229 * C + 1.4057 * Q; + } else { + E = 3.2406 * l + -1.5372 * C + -0.4986 * Q; + u = -0.9689 * l + 1.8758 * C + 0.0415 * Q; + d = 0.0557 * l + -0.204 * C + 1.057 * Q; + } + a[s] = 255 * Math.sqrt(E); + a[s + 1] = 255 * Math.sqrt(u); + a[s + 2] = 255 * Math.sqrt(d); + } + getRgbItem(e, t, i, a) { + this.#t(e, t, !1, i, a); + } + getRgbBuffer(e, t, i, a, s, r, n) { + const o = (1 << r) - 1; + for (let r = 0; r < i; r++) { + this.#t(e, t, o, a, s); + t += 3; + s += 3 + n; + } + } + getOutputLength(e, t) { + return ((e * (3 + t)) / 3) | 0; + } + isDefaultDecode(e, t) { + return !0; + } + get usesZeroToOneRange() { + return shadow(this, "usesZeroToOneRange", !1); + } +} +function hexToInt(e, t) { + let i = 0; + for (let a = 0; a <= t; a++) i = (i << 8) | e[a]; + return i >>> 0; +} +function hexToStr(e, t) { + return 1 === t + ? String.fromCharCode(e[0], e[1]) + : 3 === t + ? String.fromCharCode(e[0], e[1], e[2], e[3]) + : String.fromCharCode(...e.subarray(0, t + 1)); +} +function addHex(e, t, i) { + let a = 0; + for (let s = i; s >= 0; s--) { + a += e[s] + t[s]; + e[s] = 255 & a; + a >>= 8; + } +} +function incHex(e, t) { + let i = 1; + for (let a = t; a >= 0 && i > 0; a--) { + i += e[a]; + e[a] = 255 & i; + i >>= 8; + } +} +const kt = 16; +class BinaryCMapStream { + constructor(e) { + this.buffer = e; + this.pos = 0; + this.end = e.length; + this.tmpBuf = new Uint8Array(19); + } + readByte() { + return this.pos >= this.end ? -1 : this.buffer[this.pos++]; + } + readNumber() { + let e, + t = 0; + do { + const i = this.readByte(); + if (i < 0) throw new FormatError("unexpected EOF in bcmap"); + e = !(128 & i); + t = (t << 7) | (127 & i); + } while (!e); + return t; + } + readSigned() { + const e = this.readNumber(); + return 1 & e ? ~(e >>> 1) : e >>> 1; + } + readHex(e, t) { + e.set(this.buffer.subarray(this.pos, this.pos + t + 1)); + this.pos += t + 1; + } + readHexNumber(e, t) { + let i; + const a = this.tmpBuf; + let s = 0; + do { + const e = this.readByte(); + if (e < 0) throw new FormatError("unexpected EOF in bcmap"); + i = !(128 & e); + a[s++] = 127 & e; + } while (!i); + let r = t, + n = 0, + o = 0; + for (; r >= 0; ) { + for (; o < 8 && a.length > 0; ) { + n |= a[--s] << o; + o += 7; + } + e[r] = 255 & n; + r--; + n >>= 8; + o -= 8; + } + } + readHexSigned(e, t) { + this.readHexNumber(e, t); + const i = 1 & e[t] ? 255 : 0; + let a = 0; + for (let s = 0; s <= t; s++) { + a = ((1 & a) << 8) | e[s]; + e[s] = (a >> 1) ^ i; + } + } + readString() { + const e = this.readNumber(), + t = new Array(e); + for (let i = 0; i < e; i++) t[i] = this.readNumber(); + return String.fromCharCode(...t); + } +} +class BinaryCMapReader { + async process(e, t, i) { + const a = new BinaryCMapStream(e), + s = a.readByte(); + t.vertical = !!(1 & s); + let r = null; + const n = new Uint8Array(kt), + o = new Uint8Array(kt), + g = new Uint8Array(kt), + c = new Uint8Array(kt), + h = new Uint8Array(kt); + let l, C; + for (; (C = a.readByte()) >= 0; ) { + const e = C >> 5; + if (7 === e) { + switch (31 & C) { + case 0: + a.readString(); + break; + case 1: + r = a.readString(); + } + continue; + } + const i = !!(16 & C), + s = 15 & C; + if (s + 1 > kt) + throw new Error("BinaryCMapReader.process: Invalid dataSize."); + const Q = 1, + E = a.readNumber(); + switch (e) { + case 0: + a.readHex(n, s); + a.readHexNumber(o, s); + addHex(o, n, s); + t.addCodespaceRange(s + 1, hexToInt(n, s), hexToInt(o, s)); + for (let e = 1; e < E; e++) { + incHex(o, s); + a.readHexNumber(n, s); + addHex(n, o, s); + a.readHexNumber(o, s); + addHex(o, n, s); + t.addCodespaceRange(s + 1, hexToInt(n, s), hexToInt(o, s)); + } + break; + case 1: + a.readHex(n, s); + a.readHexNumber(o, s); + addHex(o, n, s); + a.readNumber(); + for (let e = 1; e < E; e++) { + incHex(o, s); + a.readHexNumber(n, s); + addHex(n, o, s); + a.readHexNumber(o, s); + addHex(o, n, s); + a.readNumber(); + } + break; + case 2: + a.readHex(g, s); + l = a.readNumber(); + t.mapOne(hexToInt(g, s), l); + for (let e = 1; e < E; e++) { + incHex(g, s); + if (!i) { + a.readHexNumber(h, s); + addHex(g, h, s); + } + l = a.readSigned() + (l + 1); + t.mapOne(hexToInt(g, s), l); + } + break; + case 3: + a.readHex(n, s); + a.readHexNumber(o, s); + addHex(o, n, s); + l = a.readNumber(); + t.mapCidRange(hexToInt(n, s), hexToInt(o, s), l); + for (let e = 1; e < E; e++) { + incHex(o, s); + if (i) n.set(o); + else { + a.readHexNumber(n, s); + addHex(n, o, s); + } + a.readHexNumber(o, s); + addHex(o, n, s); + l = a.readNumber(); + t.mapCidRange(hexToInt(n, s), hexToInt(o, s), l); + } + break; + case 4: + a.readHex(g, Q); + a.readHex(c, s); + t.mapOne(hexToInt(g, Q), hexToStr(c, s)); + for (let e = 1; e < E; e++) { + incHex(g, Q); + if (!i) { + a.readHexNumber(h, Q); + addHex(g, h, Q); + } + incHex(c, s); + a.readHexSigned(h, s); + addHex(c, h, s); + t.mapOne(hexToInt(g, Q), hexToStr(c, s)); + } + break; + case 5: + a.readHex(n, Q); + a.readHexNumber(o, Q); + addHex(o, n, Q); + a.readHex(c, s); + t.mapBfRange(hexToInt(n, Q), hexToInt(o, Q), hexToStr(c, s)); + for (let e = 1; e < E; e++) { + incHex(o, Q); + if (i) n.set(o); + else { + a.readHexNumber(n, Q); + addHex(n, o, Q); + } + a.readHexNumber(o, Q); + addHex(o, n, Q); + a.readHex(c, s); + t.mapBfRange(hexToInt(n, Q), hexToInt(o, Q), hexToStr(c, s)); + } + break; + default: + throw new Error(`BinaryCMapReader.process - unknown type: ${e}`); + } + } + return r ? i(r) : t; + } +} +const Rt = new Uint8Array(0); +class DecodeStream extends BaseStream { + constructor(e) { + super(); + this._rawMinBufferLength = e || 0; + this.pos = 0; + this.bufferLength = 0; + this.eof = !1; + this.buffer = Rt; + this.minBufferLength = 512; + if (e) for (; this.minBufferLength < e; ) this.minBufferLength *= 2; + } + get isEmpty() { + for (; !this.eof && 0 === this.bufferLength; ) this.readBlock(); + return 0 === this.bufferLength; + } + ensureBuffer(e) { + const t = this.buffer; + if (e <= t.byteLength) return t; + let i = this.minBufferLength; + for (; i < e; ) i *= 2; + const a = new Uint8Array(i); + a.set(t); + return (this.buffer = a); + } + getByte() { + const e = this.pos; + for (; this.bufferLength <= e; ) { + if (this.eof) return -1; + this.readBlock(); + } + return this.buffer[this.pos++]; + } + getBytes(e, t = !1) { + const i = this.pos; + let a; + if (e) { + this.ensureBuffer(i + e); + a = i + e; + for (; !this.eof && this.bufferLength < a; ) this.readBlock(t); + const s = this.bufferLength; + a > s && (a = s); + } else { + for (; !this.eof; ) this.readBlock(t); + a = this.bufferLength; + } + this.pos = a; + return this.buffer.subarray(i, a); + } + reset() { + this.pos = 0; + } + makeSubStream(e, t, i = null) { + if (void 0 === t) for (; !this.eof; ) this.readBlock(); + else { + const i = e + t; + for (; this.bufferLength <= i && !this.eof; ) this.readBlock(); + } + return new Stream(this.buffer, e, t, i); + } + getBaseStreams() { + return this.str ? this.str.getBaseStreams() : null; + } +} +class StreamsSequenceStream extends DecodeStream { + constructor(e, t = null) { + let i = 0; + for (const t of e) + i += t instanceof DecodeStream ? t._rawMinBufferLength : t.length; + super(i); + this.streams = e; + this._onError = t; + } + readBlock() { + const e = this.streams; + if (0 === e.length) { + this.eof = !0; + return; + } + const t = e.shift(); + let i; + try { + i = t.getBytes(); + } catch (e) { + if (this._onError) { + this._onError(e, t.dict?.objId); + return; + } + throw e; + } + const a = this.bufferLength, + s = a + i.length; + this.ensureBuffer(s).set(i, a); + this.bufferLength = s; + } + getBaseStreams() { + const e = []; + for (const t of this.streams) { + const i = t.getBaseStreams(); + i && e.push(...i); + } + return e.length > 0 ? e : null; + } +} +class Ascii85Stream extends DecodeStream { + constructor(e, t) { + t && (t *= 0.8); + super(t); + this.str = e; + this.dict = e.dict; + this.input = new Uint8Array(5); + } + readBlock() { + const e = this.str; + let t = e.getByte(); + for (; isWhiteSpace(t); ) t = e.getByte(); + if (-1 === t || 126 === t) { + this.eof = !0; + return; + } + const i = this.bufferLength; + let a, s; + if (122 === t) { + a = this.ensureBuffer(i + 4); + for (s = 0; s < 4; ++s) a[i + s] = 0; + this.bufferLength += 4; + } else { + const r = this.input; + r[0] = t; + for (s = 1; s < 5; ++s) { + t = e.getByte(); + for (; isWhiteSpace(t); ) t = e.getByte(); + r[s] = t; + if (-1 === t || 126 === t) break; + } + a = this.ensureBuffer(i + s - 1); + this.bufferLength += s - 1; + if (s < 5) { + for (; s < 5; ++s) r[s] = 117; + this.eof = !0; + } + let n = 0; + for (s = 0; s < 5; ++s) n = 85 * n + (r[s] - 33); + for (s = 3; s >= 0; --s) { + a[i + s] = 255 & n; + n >>= 8; + } + } + } +} +class AsciiHexStream extends DecodeStream { + constructor(e, t) { + t && (t *= 0.5); + super(t); + this.str = e; + this.dict = e.dict; + this.firstDigit = -1; + } + readBlock() { + const e = this.str.getBytes(8e3); + if (!e.length) { + this.eof = !0; + return; + } + const t = (e.length + 1) >> 1, + i = this.ensureBuffer(this.bufferLength + t); + let a = this.bufferLength, + s = this.firstDigit; + for (const t of e) { + let e; + if (t >= 48 && t <= 57) e = 15 & t; + else { + if (!((t >= 65 && t <= 70) || (t >= 97 && t <= 102))) { + if (62 === t) { + this.eof = !0; + break; + } + continue; + } + e = 9 + (15 & t); + } + if (s < 0) s = e; + else { + i[a++] = (s << 4) | e; + s = -1; + } + } + if (s >= 0 && this.eof) { + i[a++] = s << 4; + s = -1; + } + this.firstDigit = s; + this.bufferLength = a; + } +} +const Nt = -1, + Gt = [ + [-1, -1], + [-1, -1], + [7, 8], + [7, 7], + [6, 6], + [6, 6], + [6, 5], + [6, 5], + [4, 0], + [4, 0], + [4, 0], + [4, 0], + [4, 0], + [4, 0], + [4, 0], + [4, 0], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [3, 3], + [3, 3], + [3, 3], + [3, 3], + [3, 3], + [3, 3], + [3, 3], + [3, 3], + [3, 3], + [3, 3], + [3, 3], + [3, 3], + [3, 3], + [3, 3], + [3, 3], + [3, 3], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + [1, 2], + ], + xt = [ + [-1, -1], + [12, -2], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [11, 1792], + [11, 1792], + [12, 1984], + [12, 2048], + [12, 2112], + [12, 2176], + [12, 2240], + [12, 2304], + [11, 1856], + [11, 1856], + [11, 1920], + [11, 1920], + [12, 2368], + [12, 2432], + [12, 2496], + [12, 2560], + ], + Mt = [ + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [8, 29], + [8, 29], + [8, 30], + [8, 30], + [8, 45], + [8, 45], + [8, 46], + [8, 46], + [7, 22], + [7, 22], + [7, 22], + [7, 22], + [7, 23], + [7, 23], + [7, 23], + [7, 23], + [8, 47], + [8, 47], + [8, 48], + [8, 48], + [6, 13], + [6, 13], + [6, 13], + [6, 13], + [6, 13], + [6, 13], + [6, 13], + [6, 13], + [7, 20], + [7, 20], + [7, 20], + [7, 20], + [8, 33], + [8, 33], + [8, 34], + [8, 34], + [8, 35], + [8, 35], + [8, 36], + [8, 36], + [8, 37], + [8, 37], + [8, 38], + [8, 38], + [7, 19], + [7, 19], + [7, 19], + [7, 19], + [8, 31], + [8, 31], + [8, 32], + [8, 32], + [6, 1], + [6, 1], + [6, 1], + [6, 1], + [6, 1], + [6, 1], + [6, 1], + [6, 1], + [6, 12], + [6, 12], + [6, 12], + [6, 12], + [6, 12], + [6, 12], + [6, 12], + [6, 12], + [8, 53], + [8, 53], + [8, 54], + [8, 54], + [7, 26], + [7, 26], + [7, 26], + [7, 26], + [8, 39], + [8, 39], + [8, 40], + [8, 40], + [8, 41], + [8, 41], + [8, 42], + [8, 42], + [8, 43], + [8, 43], + [8, 44], + [8, 44], + [7, 21], + [7, 21], + [7, 21], + [7, 21], + [7, 28], + [7, 28], + [7, 28], + [7, 28], + [8, 61], + [8, 61], + [8, 62], + [8, 62], + [8, 63], + [8, 63], + [8, 0], + [8, 0], + [8, 320], + [8, 320], + [8, 384], + [8, 384], + [5, 10], + [5, 10], + [5, 10], + [5, 10], + [5, 10], + [5, 10], + [5, 10], + [5, 10], + [5, 10], + [5, 10], + [5, 10], + [5, 10], + [5, 10], + [5, 10], + [5, 10], + [5, 10], + [5, 11], + [5, 11], + [5, 11], + [5, 11], + [5, 11], + [5, 11], + [5, 11], + [5, 11], + [5, 11], + [5, 11], + [5, 11], + [5, 11], + [5, 11], + [5, 11], + [5, 11], + [5, 11], + [7, 27], + [7, 27], + [7, 27], + [7, 27], + [8, 59], + [8, 59], + [8, 60], + [8, 60], + [9, 1472], + [9, 1536], + [9, 1600], + [9, 1728], + [7, 18], + [7, 18], + [7, 18], + [7, 18], + [7, 24], + [7, 24], + [7, 24], + [7, 24], + [8, 49], + [8, 49], + [8, 50], + [8, 50], + [8, 51], + [8, 51], + [8, 52], + [8, 52], + [7, 25], + [7, 25], + [7, 25], + [7, 25], + [8, 55], + [8, 55], + [8, 56], + [8, 56], + [8, 57], + [8, 57], + [8, 58], + [8, 58], + [6, 192], + [6, 192], + [6, 192], + [6, 192], + [6, 192], + [6, 192], + [6, 192], + [6, 192], + [6, 1664], + [6, 1664], + [6, 1664], + [6, 1664], + [6, 1664], + [6, 1664], + [6, 1664], + [6, 1664], + [8, 448], + [8, 448], + [8, 512], + [8, 512], + [9, 704], + [9, 768], + [8, 640], + [8, 640], + [8, 576], + [8, 576], + [9, 832], + [9, 896], + [9, 960], + [9, 1024], + [9, 1088], + [9, 1152], + [9, 1216], + [9, 1280], + [9, 1344], + [9, 1408], + [7, 256], + [7, 256], + [7, 256], + [7, 256], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 2], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [4, 3], + [5, 128], + [5, 128], + [5, 128], + [5, 128], + [5, 128], + [5, 128], + [5, 128], + [5, 128], + [5, 128], + [5, 128], + [5, 128], + [5, 128], + [5, 128], + [5, 128], + [5, 128], + [5, 128], + [5, 8], + [5, 8], + [5, 8], + [5, 8], + [5, 8], + [5, 8], + [5, 8], + [5, 8], + [5, 8], + [5, 8], + [5, 8], + [5, 8], + [5, 8], + [5, 8], + [5, 8], + [5, 8], + [5, 9], + [5, 9], + [5, 9], + [5, 9], + [5, 9], + [5, 9], + [5, 9], + [5, 9], + [5, 9], + [5, 9], + [5, 9], + [5, 9], + [5, 9], + [5, 9], + [5, 9], + [5, 9], + [6, 16], + [6, 16], + [6, 16], + [6, 16], + [6, 16], + [6, 16], + [6, 16], + [6, 16], + [6, 17], + [6, 17], + [6, 17], + [6, 17], + [6, 17], + [6, 17], + [6, 17], + [6, 17], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 4], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [6, 14], + [6, 14], + [6, 14], + [6, 14], + [6, 14], + [6, 14], + [6, 14], + [6, 14], + [6, 15], + [6, 15], + [6, 15], + [6, 15], + [6, 15], + [6, 15], + [6, 15], + [6, 15], + [5, 64], + [5, 64], + [5, 64], + [5, 64], + [5, 64], + [5, 64], + [5, 64], + [5, 64], + [5, 64], + [5, 64], + [5, 64], + [5, 64], + [5, 64], + [5, 64], + [5, 64], + [5, 64], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + [4, 7], + ], + Ut = [ + [-1, -1], + [-1, -1], + [12, -2], + [12, -2], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [11, 1792], + [11, 1792], + [11, 1792], + [11, 1792], + [12, 1984], + [12, 1984], + [12, 2048], + [12, 2048], + [12, 2112], + [12, 2112], + [12, 2176], + [12, 2176], + [12, 2240], + [12, 2240], + [12, 2304], + [12, 2304], + [11, 1856], + [11, 1856], + [11, 1856], + [11, 1856], + [11, 1920], + [11, 1920], + [11, 1920], + [11, 1920], + [12, 2368], + [12, 2368], + [12, 2432], + [12, 2432], + [12, 2496], + [12, 2496], + [12, 2560], + [12, 2560], + [10, 18], + [10, 18], + [10, 18], + [10, 18], + [10, 18], + [10, 18], + [10, 18], + [10, 18], + [12, 52], + [12, 52], + [13, 640], + [13, 704], + [13, 768], + [13, 832], + [12, 55], + [12, 55], + [12, 56], + [12, 56], + [13, 1280], + [13, 1344], + [13, 1408], + [13, 1472], + [12, 59], + [12, 59], + [12, 60], + [12, 60], + [13, 1536], + [13, 1600], + [11, 24], + [11, 24], + [11, 24], + [11, 24], + [11, 25], + [11, 25], + [11, 25], + [11, 25], + [13, 1664], + [13, 1728], + [12, 320], + [12, 320], + [12, 384], + [12, 384], + [12, 448], + [12, 448], + [13, 512], + [13, 576], + [12, 53], + [12, 53], + [12, 54], + [12, 54], + [13, 896], + [13, 960], + [13, 1024], + [13, 1088], + [13, 1152], + [13, 1216], + [10, 64], + [10, 64], + [10, 64], + [10, 64], + [10, 64], + [10, 64], + [10, 64], + [10, 64], + ], + Lt = [ + [8, 13], + [8, 13], + [8, 13], + [8, 13], + [8, 13], + [8, 13], + [8, 13], + [8, 13], + [8, 13], + [8, 13], + [8, 13], + [8, 13], + [8, 13], + [8, 13], + [8, 13], + [8, 13], + [11, 23], + [11, 23], + [12, 50], + [12, 51], + [12, 44], + [12, 45], + [12, 46], + [12, 47], + [12, 57], + [12, 58], + [12, 61], + [12, 256], + [10, 16], + [10, 16], + [10, 16], + [10, 16], + [10, 17], + [10, 17], + [10, 17], + [10, 17], + [12, 48], + [12, 49], + [12, 62], + [12, 63], + [12, 30], + [12, 31], + [12, 32], + [12, 33], + [12, 40], + [12, 41], + [11, 22], + [11, 22], + [8, 14], + [8, 14], + [8, 14], + [8, 14], + [8, 14], + [8, 14], + [8, 14], + [8, 14], + [8, 14], + [8, 14], + [8, 14], + [8, 14], + [8, 14], + [8, 14], + [8, 14], + [8, 14], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 10], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [7, 11], + [9, 15], + [9, 15], + [9, 15], + [9, 15], + [9, 15], + [9, 15], + [9, 15], + [9, 15], + [12, 128], + [12, 192], + [12, 26], + [12, 27], + [12, 28], + [12, 29], + [11, 19], + [11, 19], + [11, 20], + [11, 20], + [12, 34], + [12, 35], + [12, 36], + [12, 37], + [12, 38], + [12, 39], + [11, 21], + [11, 21], + [12, 42], + [12, 43], + [10, 0], + [10, 0], + [10, 0], + [10, 0], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + [7, 12], + ], + Jt = [ + [-1, -1], + [-1, -1], + [-1, -1], + [-1, -1], + [6, 9], + [6, 8], + [5, 7], + [5, 7], + [4, 6], + [4, 6], + [4, 6], + [4, 6], + [4, 5], + [4, 5], + [4, 5], + [4, 5], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 1], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [3, 4], + [2, 3], + [2, 3], + [2, 3], + [2, 3], + [2, 3], + [2, 3], + [2, 3], + [2, 3], + [2, 3], + [2, 3], + [2, 3], + [2, 3], + [2, 3], + [2, 3], + [2, 3], + [2, 3], + [2, 2], + [2, 2], + [2, 2], + [2, 2], + [2, 2], + [2, 2], + [2, 2], + [2, 2], + [2, 2], + [2, 2], + [2, 2], + [2, 2], + [2, 2], + [2, 2], + [2, 2], + [2, 2], + ]; +class CCITTFaxDecoder { + constructor(e, t = {}) { + if (!e || "function" != typeof e.next) + throw new Error('CCITTFaxDecoder - invalid "source" parameter.'); + this.source = e; + this.eof = !1; + this.encoding = t.K || 0; + this.eoline = t.EndOfLine || !1; + this.byteAlign = t.EncodedByteAlign || !1; + this.columns = t.Columns || 1728; + this.rows = t.Rows || 0; + this.eoblock = t.EndOfBlock ?? !0; + this.black = t.BlackIs1 || !1; + this.codingLine = new Uint32Array(this.columns + 1); + this.refLine = new Uint32Array(this.columns + 2); + this.codingLine[0] = this.columns; + this.codingPos = 0; + this.row = 0; + this.nextLine2D = this.encoding < 0; + this.inputBits = 0; + this.inputBuf = 0; + this.outputBits = 0; + this.rowsDone = !1; + let i; + for (; 0 === (i = this._lookBits(12)); ) this._eatBits(1); + 1 === i && this._eatBits(12); + if (this.encoding > 0) { + this.nextLine2D = !this._lookBits(1); + this._eatBits(1); + } + } + readNextChar() { + if (this.eof) return -1; + const e = this.refLine, + t = this.codingLine, + i = this.columns; + let a, s, r, n, o; + if (0 === this.outputBits) { + this.rowsDone && (this.eof = !0); + if (this.eof) return -1; + this.err = !1; + let r, o, g; + if (this.nextLine2D) { + for (n = 0; t[n] < i; ++n) e[n] = t[n]; + e[n++] = i; + e[n] = i; + t[0] = 0; + this.codingPos = 0; + a = 0; + s = 0; + for (; t[this.codingPos] < i; ) { + r = this._getTwoDimCode(); + switch (r) { + case 0: + this._addPixels(e[a + 1], s); + e[a + 1] < i && (a += 2); + break; + case 1: + r = o = 0; + if (s) { + do { + r += g = this._getBlackCode(); + } while (g >= 64); + do { + o += g = this._getWhiteCode(); + } while (g >= 64); + } else { + do { + r += g = this._getWhiteCode(); + } while (g >= 64); + do { + o += g = this._getBlackCode(); + } while (g >= 64); + } + this._addPixels(t[this.codingPos] + r, s); + t[this.codingPos] < i && + this._addPixels(t[this.codingPos] + o, 1 ^ s); + for (; e[a] <= t[this.codingPos] && e[a] < i; ) a += 2; + break; + case 7: + this._addPixels(e[a] + 3, s); + s ^= 1; + if (t[this.codingPos] < i) { + ++a; + for (; e[a] <= t[this.codingPos] && e[a] < i; ) a += 2; + } + break; + case 5: + this._addPixels(e[a] + 2, s); + s ^= 1; + if (t[this.codingPos] < i) { + ++a; + for (; e[a] <= t[this.codingPos] && e[a] < i; ) a += 2; + } + break; + case 3: + this._addPixels(e[a] + 1, s); + s ^= 1; + if (t[this.codingPos] < i) { + ++a; + for (; e[a] <= t[this.codingPos] && e[a] < i; ) a += 2; + } + break; + case 2: + this._addPixels(e[a], s); + s ^= 1; + if (t[this.codingPos] < i) { + ++a; + for (; e[a] <= t[this.codingPos] && e[a] < i; ) a += 2; + } + break; + case 8: + this._addPixelsNeg(e[a] - 3, s); + s ^= 1; + if (t[this.codingPos] < i) { + a > 0 ? --a : ++a; + for (; e[a] <= t[this.codingPos] && e[a] < i; ) a += 2; + } + break; + case 6: + this._addPixelsNeg(e[a] - 2, s); + s ^= 1; + if (t[this.codingPos] < i) { + a > 0 ? --a : ++a; + for (; e[a] <= t[this.codingPos] && e[a] < i; ) a += 2; + } + break; + case 4: + this._addPixelsNeg(e[a] - 1, s); + s ^= 1; + if (t[this.codingPos] < i) { + a > 0 ? --a : ++a; + for (; e[a] <= t[this.codingPos] && e[a] < i; ) a += 2; + } + break; + case Nt: + this._addPixels(i, 0); + this.eof = !0; + break; + default: + info("bad 2d code"); + this._addPixels(i, 0); + this.err = !0; + } + } + } else { + t[0] = 0; + this.codingPos = 0; + s = 0; + for (; t[this.codingPos] < i; ) { + r = 0; + if (s) + do { + r += g = this._getBlackCode(); + } while (g >= 64); + else + do { + r += g = this._getWhiteCode(); + } while (g >= 64); + this._addPixels(t[this.codingPos] + r, s); + s ^= 1; + } + } + let c = !1; + this.byteAlign && (this.inputBits &= -8); + if (this.eoblock || this.row !== this.rows - 1) { + r = this._lookBits(12); + if (this.eoline) + for (; r !== Nt && 1 !== r; ) { + this._eatBits(1); + r = this._lookBits(12); + } + else + for (; 0 === r; ) { + this._eatBits(1); + r = this._lookBits(12); + } + if (1 === r) { + this._eatBits(12); + c = !0; + } else r === Nt && (this.eof = !0); + } else this.rowsDone = !0; + if (!this.eof && this.encoding > 0 && !this.rowsDone) { + this.nextLine2D = !this._lookBits(1); + this._eatBits(1); + } + if (this.eoblock && c && this.byteAlign) { + r = this._lookBits(12); + if (1 === r) { + this._eatBits(12); + if (this.encoding > 0) { + this._lookBits(1); + this._eatBits(1); + } + if (this.encoding >= 0) + for (n = 0; n < 4; ++n) { + r = this._lookBits(12); + 1 !== r && info("bad rtc code: " + r); + this._eatBits(12); + if (this.encoding > 0) { + this._lookBits(1); + this._eatBits(1); + } + } + this.eof = !0; + } + } else if (this.err && this.eoline) { + for (;;) { + r = this._lookBits(13); + if (r === Nt) { + this.eof = !0; + return -1; + } + if (r >> 1 == 1) break; + this._eatBits(1); + } + this._eatBits(12); + if (this.encoding > 0) { + this._eatBits(1); + this.nextLine2D = !(1 & r); + } + } + this.outputBits = + t[0] > 0 ? t[(this.codingPos = 0)] : t[(this.codingPos = 1)]; + this.row++; + } + if (this.outputBits >= 8) { + o = 1 & this.codingPos ? 0 : 255; + this.outputBits -= 8; + if (0 === this.outputBits && t[this.codingPos] < i) { + this.codingPos++; + this.outputBits = t[this.codingPos] - t[this.codingPos - 1]; + } + } else { + r = 8; + o = 0; + do { + if ("number" != typeof this.outputBits) + throw new FormatError( + 'Invalid /CCITTFaxDecode data, "outputBits" must be a number.', + ); + if (this.outputBits > r) { + o <<= r; + 1 & this.codingPos || (o |= 255 >> (8 - r)); + this.outputBits -= r; + r = 0; + } else { + o <<= this.outputBits; + 1 & this.codingPos || (o |= 255 >> (8 - this.outputBits)); + r -= this.outputBits; + this.outputBits = 0; + if (t[this.codingPos] < i) { + this.codingPos++; + this.outputBits = t[this.codingPos] - t[this.codingPos - 1]; + } else if (r > 0) { + o <<= r; + r = 0; + } + } + } while (r); + } + this.black && (o ^= 255); + return o; + } + _addPixels(e, t) { + const i = this.codingLine; + let a = this.codingPos; + if (e > i[a]) { + if (e > this.columns) { + info("row is wrong length"); + this.err = !0; + e = this.columns; + } + (1 & a) ^ t && ++a; + i[a] = e; + } + this.codingPos = a; + } + _addPixelsNeg(e, t) { + const i = this.codingLine; + let a = this.codingPos; + if (e > i[a]) { + if (e > this.columns) { + info("row is wrong length"); + this.err = !0; + e = this.columns; + } + (1 & a) ^ t && ++a; + i[a] = e; + } else if (e < i[a]) { + if (e < 0) { + info("invalid code"); + this.err = !0; + e = 0; + } + for (; a > 0 && e < i[a - 1]; ) --a; + i[a] = e; + } + this.codingPos = a; + } + _findTableCode(e, t, i, a) { + const s = a || 0; + for (let a = e; a <= t; ++a) { + let e = this._lookBits(a); + if (e === Nt) return [!0, 1, !1]; + a < t && (e <<= t - a); + if (!s || e >= s) { + const t = i[e - s]; + if (t[0] === a) { + this._eatBits(a); + return [!0, t[1], !0]; + } + } + } + return [!1, 0, !1]; + } + _getTwoDimCode() { + let e, + t = 0; + if (this.eoblock) { + t = this._lookBits(7); + e = Gt[t]; + if (e?.[0] > 0) { + this._eatBits(e[0]); + return e[1]; + } + } else { + const e = this._findTableCode(1, 7, Gt); + if (e[0] && e[2]) return e[1]; + } + info("Bad two dim code"); + return Nt; + } + _getWhiteCode() { + let e, + t = 0; + if (this.eoblock) { + t = this._lookBits(12); + if (t === Nt) return 1; + e = t >> 5 == 0 ? xt[t] : Mt[t >> 3]; + if (e[0] > 0) { + this._eatBits(e[0]); + return e[1]; + } + } else { + let e = this._findTableCode(1, 9, Mt); + if (e[0]) return e[1]; + e = this._findTableCode(11, 12, xt); + if (e[0]) return e[1]; + } + info("bad white code"); + this._eatBits(1); + return 1; + } + _getBlackCode() { + let e, t; + if (this.eoblock) { + e = this._lookBits(13); + if (e === Nt) return 1; + t = + e >> 7 == 0 + ? Ut[e] + : e >> 9 == 0 && e >> 7 != 0 + ? Lt[(e >> 1) - 64] + : Jt[e >> 7]; + if (t[0] > 0) { + this._eatBits(t[0]); + return t[1]; + } + } else { + let e = this._findTableCode(2, 6, Jt); + if (e[0]) return e[1]; + e = this._findTableCode(7, 12, Lt, 64); + if (e[0]) return e[1]; + e = this._findTableCode(10, 13, Ut); + if (e[0]) return e[1]; + } + info("bad black code"); + this._eatBits(1); + return 1; + } + _lookBits(e) { + let t; + for (; this.inputBits < e; ) { + if (-1 === (t = this.source.next())) + return 0 === this.inputBits + ? Nt + : (this.inputBuf << (e - this.inputBits)) & (65535 >> (16 - e)); + this.inputBuf = (this.inputBuf << 8) | t; + this.inputBits += 8; + } + return (this.inputBuf >> (this.inputBits - e)) & (65535 >> (16 - e)); + } + _eatBits(e) { + (this.inputBits -= e) < 0 && (this.inputBits = 0); + } +} +class CCITTFaxStream extends DecodeStream { + constructor(e, t, i) { + super(t); + this.str = e; + this.dict = e.dict; + i instanceof Dict || (i = Dict.empty); + const a = { next: () => e.getByte() }; + this.ccittFaxDecoder = new CCITTFaxDecoder(a, { + K: i.get("K"), + EndOfLine: i.get("EndOfLine"), + EncodedByteAlign: i.get("EncodedByteAlign"), + Columns: i.get("Columns"), + Rows: i.get("Rows"), + EndOfBlock: i.get("EndOfBlock"), + BlackIs1: i.get("BlackIs1"), + }); + } + readBlock() { + for (; !this.eof; ) { + const e = this.ccittFaxDecoder.readNextChar(); + if (-1 === e) { + this.eof = !0; + return; + } + this.ensureBuffer(this.bufferLength + 1); + this.buffer[this.bufferLength++] = e; + } + } +} +const Ht = new Int32Array([ + 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15, + ]), + Yt = new Int32Array([ + 3, 4, 5, 6, 7, 8, 9, 10, 65547, 65549, 65551, 65553, 131091, 131095, 131099, + 131103, 196643, 196651, 196659, 196667, 262211, 262227, 262243, 262259, + 327811, 327843, 327875, 327907, 258, 258, 258, + ]), + vt = new Int32Array([ + 1, 2, 3, 4, 65541, 65543, 131081, 131085, 196625, 196633, 262177, 262193, + 327745, 327777, 393345, 393409, 459009, 459137, 524801, 525057, 590849, + 591361, 657409, 658433, 724993, 727041, 794625, 798721, 868353, 876545, + ]), + Kt = [ + new Int32Array([ + 459008, 524368, 524304, 524568, 459024, 524400, 524336, 590016, 459016, + 524384, 524320, 589984, 524288, 524416, 524352, 590048, 459012, 524376, + 524312, 589968, 459028, 524408, 524344, 590032, 459020, 524392, 524328, + 59e4, 524296, 524424, 524360, 590064, 459010, 524372, 524308, 524572, + 459026, 524404, 524340, 590024, 459018, 524388, 524324, 589992, 524292, + 524420, 524356, 590056, 459014, 524380, 524316, 589976, 459030, 524412, + 524348, 590040, 459022, 524396, 524332, 590008, 524300, 524428, 524364, + 590072, 459009, 524370, 524306, 524570, 459025, 524402, 524338, 590020, + 459017, 524386, 524322, 589988, 524290, 524418, 524354, 590052, 459013, + 524378, 524314, 589972, 459029, 524410, 524346, 590036, 459021, 524394, + 524330, 590004, 524298, 524426, 524362, 590068, 459011, 524374, 524310, + 524574, 459027, 524406, 524342, 590028, 459019, 524390, 524326, 589996, + 524294, 524422, 524358, 590060, 459015, 524382, 524318, 589980, 459031, + 524414, 524350, 590044, 459023, 524398, 524334, 590012, 524302, 524430, + 524366, 590076, 459008, 524369, 524305, 524569, 459024, 524401, 524337, + 590018, 459016, 524385, 524321, 589986, 524289, 524417, 524353, 590050, + 459012, 524377, 524313, 589970, 459028, 524409, 524345, 590034, 459020, + 524393, 524329, 590002, 524297, 524425, 524361, 590066, 459010, 524373, + 524309, 524573, 459026, 524405, 524341, 590026, 459018, 524389, 524325, + 589994, 524293, 524421, 524357, 590058, 459014, 524381, 524317, 589978, + 459030, 524413, 524349, 590042, 459022, 524397, 524333, 590010, 524301, + 524429, 524365, 590074, 459009, 524371, 524307, 524571, 459025, 524403, + 524339, 590022, 459017, 524387, 524323, 589990, 524291, 524419, 524355, + 590054, 459013, 524379, 524315, 589974, 459029, 524411, 524347, 590038, + 459021, 524395, 524331, 590006, 524299, 524427, 524363, 590070, 459011, + 524375, 524311, 524575, 459027, 524407, 524343, 590030, 459019, 524391, + 524327, 589998, 524295, 524423, 524359, 590062, 459015, 524383, 524319, + 589982, 459031, 524415, 524351, 590046, 459023, 524399, 524335, 590014, + 524303, 524431, 524367, 590078, 459008, 524368, 524304, 524568, 459024, + 524400, 524336, 590017, 459016, 524384, 524320, 589985, 524288, 524416, + 524352, 590049, 459012, 524376, 524312, 589969, 459028, 524408, 524344, + 590033, 459020, 524392, 524328, 590001, 524296, 524424, 524360, 590065, + 459010, 524372, 524308, 524572, 459026, 524404, 524340, 590025, 459018, + 524388, 524324, 589993, 524292, 524420, 524356, 590057, 459014, 524380, + 524316, 589977, 459030, 524412, 524348, 590041, 459022, 524396, 524332, + 590009, 524300, 524428, 524364, 590073, 459009, 524370, 524306, 524570, + 459025, 524402, 524338, 590021, 459017, 524386, 524322, 589989, 524290, + 524418, 524354, 590053, 459013, 524378, 524314, 589973, 459029, 524410, + 524346, 590037, 459021, 524394, 524330, 590005, 524298, 524426, 524362, + 590069, 459011, 524374, 524310, 524574, 459027, 524406, 524342, 590029, + 459019, 524390, 524326, 589997, 524294, 524422, 524358, 590061, 459015, + 524382, 524318, 589981, 459031, 524414, 524350, 590045, 459023, 524398, + 524334, 590013, 524302, 524430, 524366, 590077, 459008, 524369, 524305, + 524569, 459024, 524401, 524337, 590019, 459016, 524385, 524321, 589987, + 524289, 524417, 524353, 590051, 459012, 524377, 524313, 589971, 459028, + 524409, 524345, 590035, 459020, 524393, 524329, 590003, 524297, 524425, + 524361, 590067, 459010, 524373, 524309, 524573, 459026, 524405, 524341, + 590027, 459018, 524389, 524325, 589995, 524293, 524421, 524357, 590059, + 459014, 524381, 524317, 589979, 459030, 524413, 524349, 590043, 459022, + 524397, 524333, 590011, 524301, 524429, 524365, 590075, 459009, 524371, + 524307, 524571, 459025, 524403, 524339, 590023, 459017, 524387, 524323, + 589991, 524291, 524419, 524355, 590055, 459013, 524379, 524315, 589975, + 459029, 524411, 524347, 590039, 459021, 524395, 524331, 590007, 524299, + 524427, 524363, 590071, 459011, 524375, 524311, 524575, 459027, 524407, + 524343, 590031, 459019, 524391, 524327, 589999, 524295, 524423, 524359, + 590063, 459015, 524383, 524319, 589983, 459031, 524415, 524351, 590047, + 459023, 524399, 524335, 590015, 524303, 524431, 524367, 590079, + ]), + 9, + ], + Tt = [ + new Int32Array([ + 327680, 327696, 327688, 327704, 327684, 327700, 327692, 327708, 327682, + 327698, 327690, 327706, 327686, 327702, 327694, 0, 327681, 327697, 327689, + 327705, 327685, 327701, 327693, 327709, 327683, 327699, 327691, 327707, + 327687, 327703, 327695, 0, + ]), + 5, + ]; +class FlateStream extends DecodeStream { + constructor(e, t) { + super(t); + this.str = e; + this.dict = e.dict; + const i = e.getByte(), + a = e.getByte(); + if (-1 === i || -1 === a) + throw new FormatError(`Invalid header in flate stream: ${i}, ${a}`); + if (8 != (15 & i)) + throw new FormatError( + `Unknown compression method in flate stream: ${i}, ${a}`, + ); + if (((i << 8) + a) % 31 != 0) + throw new FormatError(`Bad FCHECK in flate stream: ${i}, ${a}`); + if (32 & a) + throw new FormatError(`FDICT bit set in flate stream: ${i}, ${a}`); + this.codeSize = 0; + this.codeBuf = 0; + } + getBits(e) { + const t = this.str; + let i, + a = this.codeSize, + s = this.codeBuf; + for (; a < e; ) { + if (-1 === (i = t.getByte())) + throw new FormatError("Bad encoding in flate stream"); + s |= i << a; + a += 8; + } + i = s & ((1 << e) - 1); + this.codeBuf = s >> e; + this.codeSize = a -= e; + return i; + } + getCode(e) { + const t = this.str, + i = e[0], + a = e[1]; + let s, + r = this.codeSize, + n = this.codeBuf; + for (; r < a && -1 !== (s = t.getByte()); ) { + n |= s << r; + r += 8; + } + const o = i[n & ((1 << a) - 1)], + g = o >> 16, + c = 65535 & o; + if (g < 1 || r < g) throw new FormatError("Bad encoding in flate stream"); + this.codeBuf = n >> g; + this.codeSize = r - g; + return c; + } + generateHuffmanTable(e) { + const t = e.length; + let i, + a = 0; + for (i = 0; i < t; ++i) e[i] > a && (a = e[i]); + const s = 1 << a, + r = new Int32Array(s); + for (let n = 1, o = 0, g = 2; n <= a; ++n, o <<= 1, g <<= 1) + for (let a = 0; a < t; ++a) + if (e[a] === n) { + let e = 0, + t = o; + for (i = 0; i < n; ++i) { + e = (e << 1) | (1 & t); + t >>= 1; + } + for (i = e; i < s; i += g) r[i] = (n << 16) | a; + ++o; + } + return [r, a]; + } + #m(e) { + info(e); + this.eof = !0; + } + readBlock() { + let e, t; + const i = this.str; + let a, + s, + r = this.getBits(3); + 1 & r && (this.eof = !0); + r >>= 1; + if (0 === r) { + let t; + if (-1 === (t = i.getByte())) { + this.#m("Bad block header in flate stream"); + return; + } + let a = t; + if (-1 === (t = i.getByte())) { + this.#m("Bad block header in flate stream"); + return; + } + a |= t << 8; + if (-1 === (t = i.getByte())) { + this.#m("Bad block header in flate stream"); + return; + } + let s = t; + if (-1 === (t = i.getByte())) { + this.#m("Bad block header in flate stream"); + return; + } + s |= t << 8; + if (s !== (65535 & ~a) && (0 !== a || 0 !== s)) + throw new FormatError("Bad uncompressed block length in flate stream"); + this.codeBuf = 0; + this.codeSize = 0; + const r = this.bufferLength, + n = r + a; + e = this.ensureBuffer(n); + this.bufferLength = n; + if (0 === a) -1 === i.peekByte() && (this.eof = !0); + else { + const t = i.getBytes(a); + e.set(t, r); + t.length < a && (this.eof = !0); + } + return; + } + if (1 === r) { + a = Kt; + s = Tt; + } else { + if (2 !== r) throw new FormatError("Unknown block type in flate stream"); + { + const e = this.getBits(5) + 257, + i = this.getBits(5) + 1, + r = this.getBits(4) + 4, + n = new Uint8Array(Ht.length); + let o; + for (o = 0; o < r; ++o) n[Ht[o]] = this.getBits(3); + const g = this.generateHuffmanTable(n); + t = 0; + o = 0; + const c = e + i, + h = new Uint8Array(c); + let l, C, Q; + for (; o < c; ) { + const e = this.getCode(g); + if (16 === e) { + l = 2; + C = 3; + Q = t; + } else if (17 === e) { + l = 3; + C = 3; + Q = t = 0; + } else { + if (18 !== e) { + h[o++] = t = e; + continue; + } + l = 7; + C = 11; + Q = t = 0; + } + let i = this.getBits(l) + C; + for (; i-- > 0; ) h[o++] = Q; + } + a = this.generateHuffmanTable(h.subarray(0, e)); + s = this.generateHuffmanTable(h.subarray(e, c)); + } + } + e = this.buffer; + let n = e ? e.length : 0, + o = this.bufferLength; + for (;;) { + let i = this.getCode(a); + if (i < 256) { + if (o + 1 >= n) { + e = this.ensureBuffer(o + 1); + n = e.length; + } + e[o++] = i; + continue; + } + if (256 === i) { + this.bufferLength = o; + return; + } + i -= 257; + i = Yt[i]; + let r = i >> 16; + r > 0 && (r = this.getBits(r)); + t = (65535 & i) + r; + i = this.getCode(s); + i = vt[i]; + r = i >> 16; + r > 0 && (r = this.getBits(r)); + const g = (65535 & i) + r; + if (o + t >= n) { + e = this.ensureBuffer(o + t); + n = e.length; + } + for (let i = 0; i < t; ++i, ++o) e[o] = e[o - g]; + } + } +} +const qt = [ + { qe: 22017, nmps: 1, nlps: 1, switchFlag: 1 }, + { qe: 13313, nmps: 2, nlps: 6, switchFlag: 0 }, + { qe: 6145, nmps: 3, nlps: 9, switchFlag: 0 }, + { qe: 2753, nmps: 4, nlps: 12, switchFlag: 0 }, + { qe: 1313, nmps: 5, nlps: 29, switchFlag: 0 }, + { qe: 545, nmps: 38, nlps: 33, switchFlag: 0 }, + { qe: 22017, nmps: 7, nlps: 6, switchFlag: 1 }, + { qe: 21505, nmps: 8, nlps: 14, switchFlag: 0 }, + { qe: 18433, nmps: 9, nlps: 14, switchFlag: 0 }, + { qe: 14337, nmps: 10, nlps: 14, switchFlag: 0 }, + { qe: 12289, nmps: 11, nlps: 17, switchFlag: 0 }, + { qe: 9217, nmps: 12, nlps: 18, switchFlag: 0 }, + { qe: 7169, nmps: 13, nlps: 20, switchFlag: 0 }, + { qe: 5633, nmps: 29, nlps: 21, switchFlag: 0 }, + { qe: 22017, nmps: 15, nlps: 14, switchFlag: 1 }, + { qe: 21505, nmps: 16, nlps: 14, switchFlag: 0 }, + { qe: 20737, nmps: 17, nlps: 15, switchFlag: 0 }, + { qe: 18433, nmps: 18, nlps: 16, switchFlag: 0 }, + { qe: 14337, nmps: 19, nlps: 17, switchFlag: 0 }, + { qe: 13313, nmps: 20, nlps: 18, switchFlag: 0 }, + { qe: 12289, nmps: 21, nlps: 19, switchFlag: 0 }, + { qe: 10241, nmps: 22, nlps: 19, switchFlag: 0 }, + { qe: 9217, nmps: 23, nlps: 20, switchFlag: 0 }, + { qe: 8705, nmps: 24, nlps: 21, switchFlag: 0 }, + { qe: 7169, nmps: 25, nlps: 22, switchFlag: 0 }, + { qe: 6145, nmps: 26, nlps: 23, switchFlag: 0 }, + { qe: 5633, nmps: 27, nlps: 24, switchFlag: 0 }, + { qe: 5121, nmps: 28, nlps: 25, switchFlag: 0 }, + { qe: 4609, nmps: 29, nlps: 26, switchFlag: 0 }, + { qe: 4353, nmps: 30, nlps: 27, switchFlag: 0 }, + { qe: 2753, nmps: 31, nlps: 28, switchFlag: 0 }, + { qe: 2497, nmps: 32, nlps: 29, switchFlag: 0 }, + { qe: 2209, nmps: 33, nlps: 30, switchFlag: 0 }, + { qe: 1313, nmps: 34, nlps: 31, switchFlag: 0 }, + { qe: 1089, nmps: 35, nlps: 32, switchFlag: 0 }, + { qe: 673, nmps: 36, nlps: 33, switchFlag: 0 }, + { qe: 545, nmps: 37, nlps: 34, switchFlag: 0 }, + { qe: 321, nmps: 38, nlps: 35, switchFlag: 0 }, + { qe: 273, nmps: 39, nlps: 36, switchFlag: 0 }, + { qe: 133, nmps: 40, nlps: 37, switchFlag: 0 }, + { qe: 73, nmps: 41, nlps: 38, switchFlag: 0 }, + { qe: 37, nmps: 42, nlps: 39, switchFlag: 0 }, + { qe: 21, nmps: 43, nlps: 40, switchFlag: 0 }, + { qe: 9, nmps: 44, nlps: 41, switchFlag: 0 }, + { qe: 5, nmps: 45, nlps: 42, switchFlag: 0 }, + { qe: 1, nmps: 45, nlps: 43, switchFlag: 0 }, + { qe: 22017, nmps: 46, nlps: 46, switchFlag: 0 }, +]; +class ArithmeticDecoder { + constructor(e, t, i) { + this.data = e; + this.bp = t; + this.dataEnd = i; + this.chigh = e[t]; + this.clow = 0; + this.byteIn(); + this.chigh = ((this.chigh << 7) & 65535) | ((this.clow >> 9) & 127); + this.clow = (this.clow << 7) & 65535; + this.ct -= 7; + this.a = 32768; + } + byteIn() { + const e = this.data; + let t = this.bp; + if (255 === e[t]) + if (e[t + 1] > 143) { + this.clow += 65280; + this.ct = 8; + } else { + t++; + this.clow += e[t] << 9; + this.ct = 7; + this.bp = t; + } + else { + t++; + this.clow += t < this.dataEnd ? e[t] << 8 : 65280; + this.ct = 8; + this.bp = t; + } + if (this.clow > 65535) { + this.chigh += this.clow >> 16; + this.clow &= 65535; + } + } + readBit(e, t) { + let i = e[t] >> 1, + a = 1 & e[t]; + const s = qt[i], + r = s.qe; + let n, + o = this.a - r; + if (this.chigh < r) + if (o < r) { + o = r; + n = a; + i = s.nmps; + } else { + o = r; + n = 1 ^ a; + 1 === s.switchFlag && (a = n); + i = s.nlps; + } + else { + this.chigh -= r; + if (0 != (32768 & o)) { + this.a = o; + return a; + } + if (o < r) { + n = 1 ^ a; + 1 === s.switchFlag && (a = n); + i = s.nlps; + } else { + n = a; + i = s.nmps; + } + } + do { + 0 === this.ct && this.byteIn(); + o <<= 1; + this.chigh = ((this.chigh << 1) & 65535) | ((this.clow >> 15) & 1); + this.clow = (this.clow << 1) & 65535; + this.ct--; + } while (0 == (32768 & o)); + this.a = o; + e[t] = (i << 1) | a; + return n; + } +} +class Jbig2Error extends rt { + constructor(e) { + super(e, "Jbig2Error"); + } +} +class ContextCache { + getContexts(e) { + return e in this ? this[e] : (this[e] = new Int8Array(65536)); + } +} +class DecodingContext { + constructor(e, t, i) { + this.data = e; + this.start = t; + this.end = i; + } + get decoder() { + return shadow( + this, + "decoder", + new ArithmeticDecoder(this.data, this.start, this.end), + ); + } + get contextCache() { + return shadow(this, "contextCache", new ContextCache()); + } +} +const Ot = 2 ** 31 - 1, + Pt = -(2 ** 31); +function decodeInteger(e, t, i) { + const a = e.getContexts(t); + let s = 1; + function readBits(e) { + let t = 0; + for (let r = 0; r < e; r++) { + const e = i.readBit(a, s); + s = s < 256 ? (s << 1) | e : (511 & ((s << 1) | e)) | 256; + t = (t << 1) | e; + } + return t >>> 0; + } + const r = readBits(1), + n = readBits(1) + ? readBits(1) + ? readBits(1) + ? readBits(1) + ? readBits(1) + ? readBits(32) + 4436 + : readBits(12) + 340 + : readBits(8) + 84 + : readBits(6) + 20 + : readBits(4) + 4 + : readBits(2); + let o; + 0 === r ? (o = n) : n > 0 && (o = -n); + return o >= Pt && o <= Ot ? o : null; +} +function decodeIAID(e, t, i) { + const a = e.getContexts("IAID"); + let s = 1; + for (let e = 0; e < i; e++) { + s = (s << 1) | t.readBit(a, s); + } + return i < 31 ? s & ((1 << i) - 1) : 2147483647 & s; +} +const Wt = [ + "SymbolDictionary", + null, + null, + null, + "IntermediateTextRegion", + null, + "ImmediateTextRegion", + "ImmediateLosslessTextRegion", + null, + null, + null, + null, + null, + null, + null, + null, + "PatternDictionary", + null, + null, + null, + "IntermediateHalftoneRegion", + null, + "ImmediateHalftoneRegion", + "ImmediateLosslessHalftoneRegion", + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + "IntermediateGenericRegion", + null, + "ImmediateGenericRegion", + "ImmediateLosslessGenericRegion", + "IntermediateGenericRefinementRegion", + null, + "ImmediateGenericRefinementRegion", + "ImmediateLosslessGenericRefinementRegion", + null, + null, + null, + null, + "PageInformation", + "EndOfPage", + "EndOfStripe", + "EndOfFile", + "Profiles", + "Tables", + null, + null, + null, + null, + null, + null, + null, + null, + "Extension", + ], + Xt = [ + [ + { x: -1, y: -2 }, + { x: 0, y: -2 }, + { x: 1, y: -2 }, + { x: -2, y: -1 }, + { x: -1, y: -1 }, + { x: 0, y: -1 }, + { x: 1, y: -1 }, + { x: 2, y: -1 }, + { x: -4, y: 0 }, + { x: -3, y: 0 }, + { x: -2, y: 0 }, + { x: -1, y: 0 }, + ], + [ + { x: -1, y: -2 }, + { x: 0, y: -2 }, + { x: 1, y: -2 }, + { x: 2, y: -2 }, + { x: -2, y: -1 }, + { x: -1, y: -1 }, + { x: 0, y: -1 }, + { x: 1, y: -1 }, + { x: 2, y: -1 }, + { x: -3, y: 0 }, + { x: -2, y: 0 }, + { x: -1, y: 0 }, + ], + [ + { x: -1, y: -2 }, + { x: 0, y: -2 }, + { x: 1, y: -2 }, + { x: -2, y: -1 }, + { x: -1, y: -1 }, + { x: 0, y: -1 }, + { x: 1, y: -1 }, + { x: -2, y: 0 }, + { x: -1, y: 0 }, + ], + [ + { x: -3, y: -1 }, + { x: -2, y: -1 }, + { x: -1, y: -1 }, + { x: 0, y: -1 }, + { x: 1, y: -1 }, + { x: -4, y: 0 }, + { x: -3, y: 0 }, + { x: -2, y: 0 }, + { x: -1, y: 0 }, + ], + ], + jt = [ + { + coding: [ + { x: 0, y: -1 }, + { x: 1, y: -1 }, + { x: -1, y: 0 }, + ], + reference: [ + { x: 0, y: -1 }, + { x: 1, y: -1 }, + { x: -1, y: 0 }, + { x: 0, y: 0 }, + { x: 1, y: 0 }, + { x: -1, y: 1 }, + { x: 0, y: 1 }, + { x: 1, y: 1 }, + ], + }, + { + coding: [ + { x: -1, y: -1 }, + { x: 0, y: -1 }, + { x: 1, y: -1 }, + { x: -1, y: 0 }, + ], + reference: [ + { x: 0, y: -1 }, + { x: -1, y: 0 }, + { x: 0, y: 0 }, + { x: 1, y: 0 }, + { x: 0, y: 1 }, + { x: 1, y: 1 }, + ], + }, + ], + Zt = [39717, 1941, 229, 405], + Vt = [32, 8]; +function decodeBitmap(e, t, i, a, s, r, n, o) { + if (e) { + return decodeMMRBitmap(new Reader(o.data, o.start, o.end), t, i, !1); + } + if ( + 0 === a && + !r && + !s && + 4 === n.length && + 3 === n[0].x && + -1 === n[0].y && + -3 === n[1].x && + -1 === n[1].y && + 2 === n[2].x && + -2 === n[2].y && + -2 === n[3].x && + -2 === n[3].y + ) + return (function decodeBitmapTemplate0(e, t, i) { + const a = i.decoder, + s = i.contextCache.getContexts("GB"), + r = []; + let n, o, g, c, h, l, C; + for (o = 0; o < t; o++) { + h = r[o] = new Uint8Array(e); + l = o < 1 ? h : r[o - 1]; + C = o < 2 ? h : r[o - 2]; + n = + (C[0] << 13) | + (C[1] << 12) | + (C[2] << 11) | + (l[0] << 7) | + (l[1] << 6) | + (l[2] << 5) | + (l[3] << 4); + for (g = 0; g < e; g++) { + h[g] = c = a.readBit(s, n); + n = + ((31735 & n) << 1) | + (g + 3 < e ? C[g + 3] << 11 : 0) | + (g + 4 < e ? l[g + 4] << 4 : 0) | + c; + } + } + return r; + })(t, i, o); + const g = !!r, + c = Xt[a].concat(n); + c.sort(function (e, t) { + return e.y - t.y || e.x - t.x; + }); + const h = c.length, + l = new Int8Array(h), + C = new Int8Array(h), + Q = []; + let E, + u, + d = 0, + f = 0, + p = 0, + m = 0; + for (u = 0; u < h; u++) { + l[u] = c[u].x; + C[u] = c[u].y; + f = Math.min(f, c[u].x); + p = Math.max(p, c[u].x); + m = Math.min(m, c[u].y); + u < h - 1 && c[u].y === c[u + 1].y && c[u].x === c[u + 1].x - 1 + ? (d |= 1 << (h - 1 - u)) + : Q.push(u); + } + const y = Q.length, + w = new Int8Array(y), + b = new Int8Array(y), + D = new Uint16Array(y); + for (E = 0; E < y; E++) { + u = Q[E]; + w[E] = c[u].x; + b[E] = c[u].y; + D[E] = 1 << (h - 1 - u); + } + const F = -f, + S = -m, + k = t - p, + R = Zt[a]; + let N = new Uint8Array(t); + const G = [], + x = o.decoder, + M = o.contextCache.getContexts("GB"); + let U, + L, + J, + H, + Y, + v = 0, + K = 0; + for (let e = 0; e < i; e++) { + if (s) { + v ^= x.readBit(M, R); + if (v) { + G.push(N); + continue; + } + } + N = new Uint8Array(N); + G.push(N); + for (U = 0; U < t; U++) { + if (g && r[e][U]) { + N[U] = 0; + continue; + } + if (U >= F && U < k && e >= S) { + K = (K << 1) & d; + for (u = 0; u < y; u++) { + L = e + b[u]; + J = U + w[u]; + H = G[L][J]; + if (H) { + H = D[u]; + K |= H; + } + } + } else { + K = 0; + Y = h - 1; + for (u = 0; u < h; u++, Y--) { + J = U + l[u]; + if (J >= 0 && J < t) { + L = e + C[u]; + if (L >= 0) { + H = G[L][J]; + H && (K |= H << Y); + } + } + } + } + const i = x.readBit(M, K); + N[U] = i; + } + } + return G; +} +function decodeRefinement(e, t, i, a, s, r, n, o, g) { + let c = jt[i].coding; + 0 === i && (c = c.concat([o[0]])); + const h = c.length, + l = new Int32Array(h), + C = new Int32Array(h); + let Q; + for (Q = 0; Q < h; Q++) { + l[Q] = c[Q].x; + C[Q] = c[Q].y; + } + let E = jt[i].reference; + 0 === i && (E = E.concat([o[1]])); + const u = E.length, + d = new Int32Array(u), + f = new Int32Array(u); + for (Q = 0; Q < u; Q++) { + d[Q] = E[Q].x; + f[Q] = E[Q].y; + } + const p = a[0].length, + m = a.length, + y = Vt[i], + w = [], + b = g.decoder, + D = g.contextCache.getContexts("GR"); + let F = 0; + for (let i = 0; i < t; i++) { + if (n) { + F ^= b.readBit(D, y); + if (F) throw new Jbig2Error("prediction is not supported"); + } + const t = new Uint8Array(e); + w.push(t); + for (let n = 0; n < e; n++) { + let o, + g, + c = 0; + for (Q = 0; Q < h; Q++) { + o = i + C[Q]; + g = n + l[Q]; + o < 0 || g < 0 || g >= e ? (c <<= 1) : (c = (c << 1) | w[o][g]); + } + for (Q = 0; Q < u; Q++) { + o = i + f[Q] - r; + g = n + d[Q] - s; + o < 0 || o >= m || g < 0 || g >= p + ? (c <<= 1) + : (c = (c << 1) | a[o][g]); + } + const E = b.readBit(D, c); + t[n] = E; + } + } + return w; +} +function decodeTextRegion( + e, + t, + i, + a, + s, + r, + n, + o, + g, + c, + h, + l, + C, + Q, + E, + u, + d, + f, + p, +) { + if (e && t) throw new Jbig2Error("refinement with Huffman is not supported"); + const m = []; + let y, w; + for (y = 0; y < a; y++) { + w = new Uint8Array(i); + if (s) for (let e = 0; e < i; e++) w[e] = s; + m.push(w); + } + const b = d.decoder, + D = d.contextCache; + let F = e ? -Q.tableDeltaT.decode(p) : -decodeInteger(D, "IADT", b), + S = 0; + y = 0; + for (; y < r; ) { + F += e ? Q.tableDeltaT.decode(p) : decodeInteger(D, "IADT", b); + S += e ? Q.tableFirstS.decode(p) : decodeInteger(D, "IAFS", b); + let a = S; + for (;;) { + let s = 0; + n > 1 && (s = e ? p.readBits(f) : decodeInteger(D, "IAIT", b)); + const r = n * F + s, + S = e ? Q.symbolIDTable.decode(p) : decodeIAID(D, b, g), + k = t && (e ? p.readBit() : decodeInteger(D, "IARI", b)); + let R = o[S], + N = R[0].length, + G = R.length; + if (k) { + const e = decodeInteger(D, "IARDW", b), + t = decodeInteger(D, "IARDH", b); + N += e; + G += t; + R = decodeRefinement( + N, + G, + E, + R, + (e >> 1) + decodeInteger(D, "IARDX", b), + (t >> 1) + decodeInteger(D, "IARDY", b), + !1, + u, + d, + ); + } + let x = 0; + c + ? 1 & l + ? (x = G - 1) + : (a += G - 1) + : l > 1 + ? (a += N - 1) + : (x = N - 1); + const M = r - (1 & l ? 0 : G - 1), + U = a - (2 & l ? N - 1 : 0); + let L, J, H; + if (c) + for (L = 0; L < G; L++) { + w = m[U + L]; + if (!w) continue; + H = R[L]; + const e = Math.min(i - M, N); + switch (C) { + case 0: + for (J = 0; J < e; J++) w[M + J] |= H[J]; + break; + case 2: + for (J = 0; J < e; J++) w[M + J] ^= H[J]; + break; + default: + throw new Jbig2Error(`operator ${C} is not supported`); + } + } + else + for (J = 0; J < G; J++) { + w = m[M + J]; + if (w) { + H = R[J]; + switch (C) { + case 0: + for (L = 0; L < N; L++) w[U + L] |= H[L]; + break; + case 2: + for (L = 0; L < N; L++) w[U + L] ^= H[L]; + break; + default: + throw new Jbig2Error(`operator ${C} is not supported`); + } + } + } + y++; + const Y = e ? Q.tableDeltaS.decode(p) : decodeInteger(D, "IADS", b); + if (null === Y) break; + a += x + Y + h; + } + } + return m; +} +function readSegmentHeader(e, t) { + const i = {}; + i.number = readUint32(e, t); + const a = e[t + 4], + s = 63 & a; + if (!Wt[s]) throw new Jbig2Error("invalid segment type: " + s); + i.type = s; + i.typeName = Wt[s]; + i.deferredNonRetain = !!(128 & a); + const r = !!(64 & a), + n = e[t + 5]; + let o = (n >> 5) & 7; + const g = [31 & n]; + let c = t + 6; + if (7 === n) { + o = 536870911 & readUint32(e, c - 1); + c += 3; + let t = (o + 7) >> 3; + g[0] = e[c++]; + for (; --t > 0; ) g.push(e[c++]); + } else if (5 === n || 6 === n) + throw new Jbig2Error("invalid referred-to flags"); + i.retainBits = g; + let h = 4; + i.number <= 256 ? (h = 1) : i.number <= 65536 && (h = 2); + const l = []; + let C, Q; + for (C = 0; C < o; C++) { + let t; + t = 1 === h ? e[c] : 2 === h ? readUint16(e, c) : readUint32(e, c); + l.push(t); + c += h; + } + i.referredTo = l; + if (r) { + i.pageAssociation = readUint32(e, c); + c += 4; + } else i.pageAssociation = e[c++]; + i.length = readUint32(e, c); + c += 4; + if (4294967295 === i.length) { + if (38 !== s) throw new Jbig2Error("invalid unknown segment length"); + { + const t = readRegionSegmentInformation(e, c), + a = !!(1 & e[c + zt]), + s = 6, + r = new Uint8Array(s); + if (!a) { + r[0] = 255; + r[1] = 172; + } + r[2] = (t.height >>> 24) & 255; + r[3] = (t.height >> 16) & 255; + r[4] = (t.height >> 8) & 255; + r[5] = 255 & t.height; + for (C = c, Q = e.length; C < Q; C++) { + let t = 0; + for (; t < s && r[t] === e[C + t]; ) t++; + if (t === s) { + i.length = C + s; + break; + } + } + if (4294967295 === i.length) + throw new Jbig2Error("segment end was not found"); + } + } + i.headerEnd = c; + return i; +} +function readSegments(e, t, i, a) { + const s = []; + let r = i; + for (; r < a; ) { + const i = readSegmentHeader(t, r); + r = i.headerEnd; + const a = { header: i, data: t }; + if (!e.randomAccess) { + a.start = r; + r += i.length; + a.end = r; + } + s.push(a); + if (51 === i.type) break; + } + if (e.randomAccess) + for (let e = 0, t = s.length; e < t; e++) { + s[e].start = r; + r += s[e].header.length; + s[e].end = r; + } + return s; +} +function readRegionSegmentInformation(e, t) { + return { + width: readUint32(e, t), + height: readUint32(e, t + 4), + x: readUint32(e, t + 8), + y: readUint32(e, t + 12), + combinationOperator: 7 & e[t + 16], + }; +} +const zt = 17; +function processSegment(e, t) { + const i = e.header, + a = e.data, + s = e.end; + let r, + n, + o, + g, + c = e.start; + switch (i.type) { + case 0: + const e = {}, + t = readUint16(a, c); + e.huffman = !!(1 & t); + e.refinement = !!(2 & t); + e.huffmanDHSelector = (t >> 2) & 3; + e.huffmanDWSelector = (t >> 4) & 3; + e.bitmapSizeSelector = (t >> 6) & 1; + e.aggregationInstancesSelector = (t >> 7) & 1; + e.bitmapCodingContextUsed = !!(256 & t); + e.bitmapCodingContextRetained = !!(512 & t); + e.template = (t >> 10) & 3; + e.refinementTemplate = (t >> 12) & 1; + c += 2; + if (!e.huffman) { + g = 0 === e.template ? 4 : 1; + n = []; + for (o = 0; o < g; o++) { + n.push({ x: readInt8(a, c), y: readInt8(a, c + 1) }); + c += 2; + } + e.at = n; + } + if (e.refinement && !e.refinementTemplate) { + n = []; + for (o = 0; o < 2; o++) { + n.push({ x: readInt8(a, c), y: readInt8(a, c + 1) }); + c += 2; + } + e.refinementAt = n; + } + e.numberOfExportedSymbols = readUint32(a, c); + c += 4; + e.numberOfNewSymbols = readUint32(a, c); + c += 4; + r = [e, i.number, i.referredTo, a, c, s]; + break; + case 6: + case 7: + const h = {}; + h.info = readRegionSegmentInformation(a, c); + c += zt; + const l = readUint16(a, c); + c += 2; + h.huffman = !!(1 & l); + h.refinement = !!(2 & l); + h.logStripSize = (l >> 2) & 3; + h.stripSize = 1 << h.logStripSize; + h.referenceCorner = (l >> 4) & 3; + h.transposed = !!(64 & l); + h.combinationOperator = (l >> 7) & 3; + h.defaultPixelValue = (l >> 9) & 1; + h.dsOffset = (l << 17) >> 27; + h.refinementTemplate = (l >> 15) & 1; + if (h.huffman) { + const e = readUint16(a, c); + c += 2; + h.huffmanFS = 3 & e; + h.huffmanDS = (e >> 2) & 3; + h.huffmanDT = (e >> 4) & 3; + h.huffmanRefinementDW = (e >> 6) & 3; + h.huffmanRefinementDH = (e >> 8) & 3; + h.huffmanRefinementDX = (e >> 10) & 3; + h.huffmanRefinementDY = (e >> 12) & 3; + h.huffmanRefinementSizeSelector = !!(16384 & e); + } + if (h.refinement && !h.refinementTemplate) { + n = []; + for (o = 0; o < 2; o++) { + n.push({ x: readInt8(a, c), y: readInt8(a, c + 1) }); + c += 2; + } + h.refinementAt = n; + } + h.numberOfSymbolInstances = readUint32(a, c); + c += 4; + r = [h, i.referredTo, a, c, s]; + break; + case 16: + const C = {}, + Q = a[c++]; + C.mmr = !!(1 & Q); + C.template = (Q >> 1) & 3; + C.patternWidth = a[c++]; + C.patternHeight = a[c++]; + C.maxPatternIndex = readUint32(a, c); + c += 4; + r = [C, i.number, a, c, s]; + break; + case 22: + case 23: + const E = {}; + E.info = readRegionSegmentInformation(a, c); + c += zt; + const u = a[c++]; + E.mmr = !!(1 & u); + E.template = (u >> 1) & 3; + E.enableSkip = !!(8 & u); + E.combinationOperator = (u >> 4) & 7; + E.defaultPixelValue = (u >> 7) & 1; + E.gridWidth = readUint32(a, c); + c += 4; + E.gridHeight = readUint32(a, c); + c += 4; + E.gridOffsetX = 4294967295 & readUint32(a, c); + c += 4; + E.gridOffsetY = 4294967295 & readUint32(a, c); + c += 4; + E.gridVectorX = readUint16(a, c); + c += 2; + E.gridVectorY = readUint16(a, c); + c += 2; + r = [E, i.referredTo, a, c, s]; + break; + case 38: + case 39: + const d = {}; + d.info = readRegionSegmentInformation(a, c); + c += zt; + const f = a[c++]; + d.mmr = !!(1 & f); + d.template = (f >> 1) & 3; + d.prediction = !!(8 & f); + if (!d.mmr) { + g = 0 === d.template ? 4 : 1; + n = []; + for (o = 0; o < g; o++) { + n.push({ x: readInt8(a, c), y: readInt8(a, c + 1) }); + c += 2; + } + d.at = n; + } + r = [d, a, c, s]; + break; + case 48: + const p = { + width: readUint32(a, c), + height: readUint32(a, c + 4), + resolutionX: readUint32(a, c + 8), + resolutionY: readUint32(a, c + 12), + }; + 4294967295 === p.height && delete p.height; + const m = a[c + 16]; + readUint16(a, c + 17); + p.lossless = !!(1 & m); + p.refinement = !!(2 & m); + p.defaultPixelValue = (m >> 2) & 1; + p.combinationOperator = (m >> 3) & 3; + p.requiresBuffer = !!(32 & m); + p.combinationOperatorOverride = !!(64 & m); + r = [p]; + break; + case 49: + case 50: + case 51: + case 62: + break; + case 53: + r = [i.number, a, c, s]; + break; + default: + throw new Jbig2Error( + `segment type ${i.typeName}(${i.type}) is not implemented`, + ); + } + const h = "on" + i.typeName; + h in t && t[h].apply(t, r); +} +function processSegments(e, t) { + for (let i = 0, a = e.length; i < a; i++) processSegment(e[i], t); +} +class SimpleSegmentVisitor { + onPageInformation(e) { + this.currentPageInfo = e; + const t = (e.width + 7) >> 3, + i = new Uint8ClampedArray(t * e.height); + e.defaultPixelValue && i.fill(255); + this.buffer = i; + } + drawBitmap(e, t) { + const i = this.currentPageInfo, + a = e.width, + s = e.height, + r = (i.width + 7) >> 3, + n = i.combinationOperatorOverride + ? e.combinationOperator + : i.combinationOperator, + o = this.buffer, + g = 128 >> (7 & e.x); + let c, + h, + l, + C, + Q = e.y * r + (e.x >> 3); + switch (n) { + case 0: + for (c = 0; c < s; c++) { + l = g; + C = Q; + for (h = 0; h < a; h++) { + t[c][h] && (o[C] |= l); + l >>= 1; + if (!l) { + l = 128; + C++; + } + } + Q += r; + } + break; + case 2: + for (c = 0; c < s; c++) { + l = g; + C = Q; + for (h = 0; h < a; h++) { + t[c][h] && (o[C] ^= l); + l >>= 1; + if (!l) { + l = 128; + C++; + } + } + Q += r; + } + break; + default: + throw new Jbig2Error(`operator ${n} is not supported`); + } + } + onImmediateGenericRegion(e, t, i, a) { + const s = e.info, + r = new DecodingContext(t, i, a), + n = decodeBitmap( + e.mmr, + s.width, + s.height, + e.template, + e.prediction, + null, + e.at, + r, + ); + this.drawBitmap(s, n); + } + onImmediateLosslessGenericRegion() { + this.onImmediateGenericRegion(...arguments); + } + onSymbolDictionary(e, t, i, a, s, r) { + let n, o; + if (e.huffman) { + n = (function getSymbolDictionaryHuffmanTables(e, t, i) { + let a, + s, + r, + n, + o = 0; + switch (e.huffmanDHSelector) { + case 0: + case 1: + a = getStandardTable(e.huffmanDHSelector + 4); + break; + case 3: + a = getCustomHuffmanTable(o, t, i); + o++; + break; + default: + throw new Jbig2Error("invalid Huffman DH selector"); + } + switch (e.huffmanDWSelector) { + case 0: + case 1: + s = getStandardTable(e.huffmanDWSelector + 2); + break; + case 3: + s = getCustomHuffmanTable(o, t, i); + o++; + break; + default: + throw new Jbig2Error("invalid Huffman DW selector"); + } + if (e.bitmapSizeSelector) { + r = getCustomHuffmanTable(o, t, i); + o++; + } else r = getStandardTable(1); + n = e.aggregationInstancesSelector + ? getCustomHuffmanTable(o, t, i) + : getStandardTable(1); + return { + tableDeltaHeight: a, + tableDeltaWidth: s, + tableBitmapSize: r, + tableAggregateInstances: n, + }; + })(e, i, this.customTables); + o = new Reader(a, s, r); + } + let g = this.symbols; + g || (this.symbols = g = {}); + const c = []; + for (const e of i) { + const t = g[e]; + t && c.push(...t); + } + const h = new DecodingContext(a, s, r); + g[t] = (function decodeSymbolDictionary( + e, + t, + i, + a, + s, + r, + n, + o, + g, + c, + h, + l, + ) { + if (e && t) + throw new Jbig2Error("symbol refinement with Huffman is not supported"); + const C = []; + let Q = 0, + E = log2(i.length + a); + const u = h.decoder, + d = h.contextCache; + let f, p; + if (e) { + f = getStandardTable(1); + p = []; + E = Math.max(E, 1); + } + for (; C.length < a; ) { + Q += e ? r.tableDeltaHeight.decode(l) : decodeInteger(d, "IADH", u); + let a = 0, + s = 0; + const f = e ? p.length : 0; + for (;;) { + const f = e + ? r.tableDeltaWidth.decode(l) + : decodeInteger(d, "IADW", u); + if (null === f) break; + a += f; + s += a; + let m; + if (t) { + const s = decodeInteger(d, "IAAI", u); + if (s > 1) + m = decodeTextRegion( + e, + t, + a, + Q, + 0, + s, + 1, + i.concat(C), + E, + 0, + 0, + 1, + 0, + r, + g, + c, + h, + 0, + l, + ); + else { + const e = decodeIAID(d, u, E), + t = decodeInteger(d, "IARDX", u), + s = decodeInteger(d, "IARDY", u); + m = decodeRefinement( + a, + Q, + g, + e < i.length ? i[e] : C[e - i.length], + t, + s, + !1, + c, + h, + ); + } + C.push(m); + } else if (e) p.push(a); + else { + m = decodeBitmap(!1, a, Q, n, !1, null, o, h); + C.push(m); + } + } + if (e && !t) { + const e = r.tableBitmapSize.decode(l); + l.byteAlign(); + let t; + if (0 === e) t = readUncompressedBitmap(l, s, Q); + else { + const i = l.end, + a = l.position + e; + l.end = a; + t = decodeMMRBitmap(l, s, Q, !1); + l.end = i; + l.position = a; + } + const i = p.length; + if (f === i - 1) C.push(t); + else { + let e, + a, + s, + r, + n, + o = 0; + for (e = f; e < i; e++) { + r = p[e]; + s = o + r; + n = []; + for (a = 0; a < Q; a++) n.push(t[a].subarray(o, s)); + C.push(n); + o = s; + } + } + } + } + const m = [], + y = []; + let w, + b, + D = !1; + const F = i.length + a; + for (; y.length < F; ) { + let t = e ? f.decode(l) : decodeInteger(d, "IAEX", u); + for (; t--; ) y.push(D); + D = !D; + } + for (w = 0, b = i.length; w < b; w++) y[w] && m.push(i[w]); + for (let e = 0; e < a; w++, e++) y[w] && m.push(C[e]); + return m; + })( + e.huffman, + e.refinement, + c, + e.numberOfNewSymbols, + e.numberOfExportedSymbols, + n, + e.template, + e.at, + e.refinementTemplate, + e.refinementAt, + h, + o, + ); + } + onImmediateTextRegion(e, t, i, a, s) { + const r = e.info; + let n, o; + const g = this.symbols, + c = []; + for (const e of t) { + const t = g[e]; + t && c.push(...t); + } + const h = log2(c.length); + if (e.huffman) { + o = new Reader(i, a, s); + n = (function getTextRegionHuffmanTables(e, t, i, a, s) { + const r = []; + for (let e = 0; e <= 34; e++) { + const t = s.readBits(4); + r.push(new HuffmanLine([e, t, 0, 0])); + } + const n = new HuffmanTable(r, !1); + r.length = 0; + for (let e = 0; e < a; ) { + const t = n.decode(s); + if (t >= 32) { + let i, a, n; + switch (t) { + case 32: + if (0 === e) + throw new Jbig2Error("no previous value in symbol ID table"); + a = s.readBits(2) + 3; + i = r[e - 1].prefixLength; + break; + case 33: + a = s.readBits(3) + 3; + i = 0; + break; + case 34: + a = s.readBits(7) + 11; + i = 0; + break; + default: + throw new Jbig2Error("invalid code length in symbol ID table"); + } + for (n = 0; n < a; n++) { + r.push(new HuffmanLine([e, i, 0, 0])); + e++; + } + } else { + r.push(new HuffmanLine([e, t, 0, 0])); + e++; + } + } + s.byteAlign(); + const o = new HuffmanTable(r, !1); + let g, + c, + h, + l = 0; + switch (e.huffmanFS) { + case 0: + case 1: + g = getStandardTable(e.huffmanFS + 6); + break; + case 3: + g = getCustomHuffmanTable(l, t, i); + l++; + break; + default: + throw new Jbig2Error("invalid Huffman FS selector"); + } + switch (e.huffmanDS) { + case 0: + case 1: + case 2: + c = getStandardTable(e.huffmanDS + 8); + break; + case 3: + c = getCustomHuffmanTable(l, t, i); + l++; + break; + default: + throw new Jbig2Error("invalid Huffman DS selector"); + } + switch (e.huffmanDT) { + case 0: + case 1: + case 2: + h = getStandardTable(e.huffmanDT + 11); + break; + case 3: + h = getCustomHuffmanTable(l, t, i); + l++; + break; + default: + throw new Jbig2Error("invalid Huffman DT selector"); + } + if (e.refinement) + throw new Jbig2Error("refinement with Huffman is not supported"); + return { + symbolIDTable: o, + tableFirstS: g, + tableDeltaS: c, + tableDeltaT: h, + }; + })(e, t, this.customTables, c.length, o); + } + const l = new DecodingContext(i, a, s), + C = decodeTextRegion( + e.huffman, + e.refinement, + r.width, + r.height, + e.defaultPixelValue, + e.numberOfSymbolInstances, + e.stripSize, + c, + h, + e.transposed, + e.dsOffset, + e.referenceCorner, + e.combinationOperator, + n, + e.refinementTemplate, + e.refinementAt, + l, + e.logStripSize, + o, + ); + this.drawBitmap(r, C); + } + onImmediateLosslessTextRegion() { + this.onImmediateTextRegion(...arguments); + } + onPatternDictionary(e, t, i, a, s) { + let r = this.patterns; + r || (this.patterns = r = {}); + const n = new DecodingContext(i, a, s); + r[t] = (function decodePatternDictionary(e, t, i, a, s, r) { + const n = []; + if (!e) { + n.push({ x: -t, y: 0 }); + 0 === s && n.push({ x: -3, y: -1 }, { x: 2, y: -2 }, { x: -2, y: -2 }); + } + const o = decodeBitmap(e, (a + 1) * t, i, s, !1, null, n, r), + g = []; + for (let e = 0; e <= a; e++) { + const a = [], + s = t * e, + r = s + t; + for (let e = 0; e < i; e++) a.push(o[e].subarray(s, r)); + g.push(a); + } + return g; + })( + e.mmr, + e.patternWidth, + e.patternHeight, + e.maxPatternIndex, + e.template, + n, + ); + } + onImmediateHalftoneRegion(e, t, i, a, s) { + const r = this.patterns[t[0]], + n = e.info, + o = new DecodingContext(i, a, s), + g = (function decodeHalftoneRegion( + e, + t, + i, + a, + s, + r, + n, + o, + g, + c, + h, + l, + C, + Q, + E, + ) { + if (n) throw new Jbig2Error("skip is not supported"); + if (0 !== o) + throw new Jbig2Error( + `operator "${o}" is not supported in halftone region`, + ); + const u = []; + let d, f, p; + for (d = 0; d < s; d++) { + p = new Uint8Array(a); + if (r) for (f = 0; f < a; f++) p[f] = r; + u.push(p); + } + const m = t.length, + y = t[0], + w = y[0].length, + b = y.length, + D = log2(m), + F = []; + if (!e) { + F.push({ x: i <= 1 ? 3 : 2, y: -1 }); + 0 === i && + F.push({ x: -3, y: -1 }, { x: 2, y: -2 }, { x: -2, y: -2 }); + } + const S = []; + let k, R, N, G, x, M, U, L, J, H, Y; + e && (k = new Reader(E.data, E.start, E.end)); + for (d = D - 1; d >= 0; d--) { + R = e + ? decodeMMRBitmap(k, g, c, !0) + : decodeBitmap(!1, g, c, i, !1, null, F, E); + S[d] = R; + } + for (N = 0; N < c; N++) + for (G = 0; G < g; G++) { + x = 0; + M = 0; + for (f = D - 1; f >= 0; f--) { + x ^= S[f][N][G]; + M |= x << f; + } + U = t[M]; + L = (h + N * Q + G * C) >> 8; + J = (l + N * C - G * Q) >> 8; + if (L >= 0 && L + w <= a && J >= 0 && J + b <= s) + for (d = 0; d < b; d++) { + Y = u[J + d]; + H = U[d]; + for (f = 0; f < w; f++) Y[L + f] |= H[f]; + } + else { + let e, t; + for (d = 0; d < b; d++) { + t = J + d; + if (!(t < 0 || t >= s)) { + Y = u[t]; + H = U[d]; + for (f = 0; f < w; f++) { + e = L + f; + e >= 0 && e < a && (Y[e] |= H[f]); + } + } + } + } + } + return u; + })( + e.mmr, + r, + e.template, + n.width, + n.height, + e.defaultPixelValue, + e.enableSkip, + e.combinationOperator, + e.gridWidth, + e.gridHeight, + e.gridOffsetX, + e.gridOffsetY, + e.gridVectorX, + e.gridVectorY, + o, + ); + this.drawBitmap(n, g); + } + onImmediateLosslessHalftoneRegion() { + this.onImmediateHalftoneRegion(...arguments); + } + onTables(e, t, i, a) { + let s = this.customTables; + s || (this.customTables = s = {}); + s[e] = (function decodeTablesSegment(e, t, i) { + const a = e[t], + s = 4294967295 & readUint32(e, t + 1), + r = 4294967295 & readUint32(e, t + 5), + n = new Reader(e, t + 9, i), + o = 1 + ((a >> 1) & 7), + g = 1 + ((a >> 4) & 7), + c = []; + let h, + l, + C = s; + do { + h = n.readBits(o); + l = n.readBits(g); + c.push(new HuffmanLine([C, h, l, 0])); + C += 1 << l; + } while (C < r); + h = n.readBits(o); + c.push(new HuffmanLine([s - 1, h, 32, 0, "lower"])); + h = n.readBits(o); + c.push(new HuffmanLine([r, h, 32, 0])); + if (1 & a) { + h = n.readBits(o); + c.push(new HuffmanLine([h, 0])); + } + return new HuffmanTable(c, !1); + })(t, i, a); + } +} +class HuffmanLine { + constructor(e) { + if (2 === e.length) { + this.isOOB = !0; + this.rangeLow = 0; + this.prefixLength = e[0]; + this.rangeLength = 0; + this.prefixCode = e[1]; + this.isLowerRange = !1; + } else { + this.isOOB = !1; + this.rangeLow = e[0]; + this.prefixLength = e[1]; + this.rangeLength = e[2]; + this.prefixCode = e[3]; + this.isLowerRange = "lower" === e[4]; + } + } +} +class HuffmanTreeNode { + constructor(e) { + this.children = []; + if (e) { + this.isLeaf = !0; + this.rangeLength = e.rangeLength; + this.rangeLow = e.rangeLow; + this.isLowerRange = e.isLowerRange; + this.isOOB = e.isOOB; + } else this.isLeaf = !1; + } + buildTree(e, t) { + const i = (e.prefixCode >> t) & 1; + if (t <= 0) this.children[i] = new HuffmanTreeNode(e); + else { + let a = this.children[i]; + a || (this.children[i] = a = new HuffmanTreeNode(null)); + a.buildTree(e, t - 1); + } + } + decodeNode(e) { + if (this.isLeaf) { + if (this.isOOB) return null; + const t = e.readBits(this.rangeLength); + return this.rangeLow + (this.isLowerRange ? -t : t); + } + const t = this.children[e.readBit()]; + if (!t) throw new Jbig2Error("invalid Huffman data"); + return t.decodeNode(e); + } +} +class HuffmanTable { + constructor(e, t) { + t || this.assignPrefixCodes(e); + this.rootNode = new HuffmanTreeNode(null); + for (let t = 0, i = e.length; t < i; t++) { + const i = e[t]; + i.prefixLength > 0 && this.rootNode.buildTree(i, i.prefixLength - 1); + } + } + decode(e) { + return this.rootNode.decodeNode(e); + } + assignPrefixCodes(e) { + const t = e.length; + let i = 0; + for (let a = 0; a < t; a++) i = Math.max(i, e[a].prefixLength); + const a = new Uint32Array(i + 1); + for (let i = 0; i < t; i++) a[e[i].prefixLength]++; + let s, + r, + n, + o = 1, + g = 0; + a[0] = 0; + for (; o <= i; ) { + g = (g + a[o - 1]) << 1; + s = g; + r = 0; + for (; r < t; ) { + n = e[r]; + if (n.prefixLength === o) { + n.prefixCode = s; + s++; + } + r++; + } + o++; + } + } +} +const _t = {}; +function getStandardTable(e) { + let t, + i = _t[e]; + if (i) return i; + switch (e) { + case 1: + t = [ + [0, 1, 4, 0], + [16, 2, 8, 2], + [272, 3, 16, 6], + [65808, 3, 32, 7], + ]; + break; + case 2: + t = [ + [0, 1, 0, 0], + [1, 2, 0, 2], + [2, 3, 0, 6], + [3, 4, 3, 14], + [11, 5, 6, 30], + [75, 6, 32, 62], + [6, 63], + ]; + break; + case 3: + t = [ + [-256, 8, 8, 254], + [0, 1, 0, 0], + [1, 2, 0, 2], + [2, 3, 0, 6], + [3, 4, 3, 14], + [11, 5, 6, 30], + [-257, 8, 32, 255, "lower"], + [75, 7, 32, 126], + [6, 62], + ]; + break; + case 4: + t = [ + [1, 1, 0, 0], + [2, 2, 0, 2], + [3, 3, 0, 6], + [4, 4, 3, 14], + [12, 5, 6, 30], + [76, 5, 32, 31], + ]; + break; + case 5: + t = [ + [-255, 7, 8, 126], + [1, 1, 0, 0], + [2, 2, 0, 2], + [3, 3, 0, 6], + [4, 4, 3, 14], + [12, 5, 6, 30], + [-256, 7, 32, 127, "lower"], + [76, 6, 32, 62], + ]; + break; + case 6: + t = [ + [-2048, 5, 10, 28], + [-1024, 4, 9, 8], + [-512, 4, 8, 9], + [-256, 4, 7, 10], + [-128, 5, 6, 29], + [-64, 5, 5, 30], + [-32, 4, 5, 11], + [0, 2, 7, 0], + [128, 3, 7, 2], + [256, 3, 8, 3], + [512, 4, 9, 12], + [1024, 4, 10, 13], + [-2049, 6, 32, 62, "lower"], + [2048, 6, 32, 63], + ]; + break; + case 7: + t = [ + [-1024, 4, 9, 8], + [-512, 3, 8, 0], + [-256, 4, 7, 9], + [-128, 5, 6, 26], + [-64, 5, 5, 27], + [-32, 4, 5, 10], + [0, 4, 5, 11], + [32, 5, 5, 28], + [64, 5, 6, 29], + [128, 4, 7, 12], + [256, 3, 8, 1], + [512, 3, 9, 2], + [1024, 3, 10, 3], + [-1025, 5, 32, 30, "lower"], + [2048, 5, 32, 31], + ]; + break; + case 8: + t = [ + [-15, 8, 3, 252], + [-7, 9, 1, 508], + [-5, 8, 1, 253], + [-3, 9, 0, 509], + [-2, 7, 0, 124], + [-1, 4, 0, 10], + [0, 2, 1, 0], + [2, 5, 0, 26], + [3, 6, 0, 58], + [4, 3, 4, 4], + [20, 6, 1, 59], + [22, 4, 4, 11], + [38, 4, 5, 12], + [70, 5, 6, 27], + [134, 5, 7, 28], + [262, 6, 7, 60], + [390, 7, 8, 125], + [646, 6, 10, 61], + [-16, 9, 32, 510, "lower"], + [1670, 9, 32, 511], + [2, 1], + ]; + break; + case 9: + t = [ + [-31, 8, 4, 252], + [-15, 9, 2, 508], + [-11, 8, 2, 253], + [-7, 9, 1, 509], + [-5, 7, 1, 124], + [-3, 4, 1, 10], + [-1, 3, 1, 2], + [1, 3, 1, 3], + [3, 5, 1, 26], + [5, 6, 1, 58], + [7, 3, 5, 4], + [39, 6, 2, 59], + [43, 4, 5, 11], + [75, 4, 6, 12], + [139, 5, 7, 27], + [267, 5, 8, 28], + [523, 6, 8, 60], + [779, 7, 9, 125], + [1291, 6, 11, 61], + [-32, 9, 32, 510, "lower"], + [3339, 9, 32, 511], + [2, 0], + ]; + break; + case 10: + t = [ + [-21, 7, 4, 122], + [-5, 8, 0, 252], + [-4, 7, 0, 123], + [-3, 5, 0, 24], + [-2, 2, 2, 0], + [2, 5, 0, 25], + [3, 6, 0, 54], + [4, 7, 0, 124], + [5, 8, 0, 253], + [6, 2, 6, 1], + [70, 5, 5, 26], + [102, 6, 5, 55], + [134, 6, 6, 56], + [198, 6, 7, 57], + [326, 6, 8, 58], + [582, 6, 9, 59], + [1094, 6, 10, 60], + [2118, 7, 11, 125], + [-22, 8, 32, 254, "lower"], + [4166, 8, 32, 255], + [2, 2], + ]; + break; + case 11: + t = [ + [1, 1, 0, 0], + [2, 2, 1, 2], + [4, 4, 0, 12], + [5, 4, 1, 13], + [7, 5, 1, 28], + [9, 5, 2, 29], + [13, 6, 2, 60], + [17, 7, 2, 122], + [21, 7, 3, 123], + [29, 7, 4, 124], + [45, 7, 5, 125], + [77, 7, 6, 126], + [141, 7, 32, 127], + ]; + break; + case 12: + t = [ + [1, 1, 0, 0], + [2, 2, 0, 2], + [3, 3, 1, 6], + [5, 5, 0, 28], + [6, 5, 1, 29], + [8, 6, 1, 60], + [10, 7, 0, 122], + [11, 7, 1, 123], + [13, 7, 2, 124], + [17, 7, 3, 125], + [25, 7, 4, 126], + [41, 8, 5, 254], + [73, 8, 32, 255], + ]; + break; + case 13: + t = [ + [1, 1, 0, 0], + [2, 3, 0, 4], + [3, 4, 0, 12], + [4, 5, 0, 28], + [5, 4, 1, 13], + [7, 3, 3, 5], + [15, 6, 1, 58], + [17, 6, 2, 59], + [21, 6, 3, 60], + [29, 6, 4, 61], + [45, 6, 5, 62], + [77, 7, 6, 126], + [141, 7, 32, 127], + ]; + break; + case 14: + t = [ + [-2, 3, 0, 4], + [-1, 3, 0, 5], + [0, 1, 0, 0], + [1, 3, 0, 6], + [2, 3, 0, 7], + ]; + break; + case 15: + t = [ + [-24, 7, 4, 124], + [-8, 6, 2, 60], + [-4, 5, 1, 28], + [-2, 4, 0, 12], + [-1, 3, 0, 4], + [0, 1, 0, 0], + [1, 3, 0, 5], + [2, 4, 0, 13], + [3, 5, 1, 29], + [5, 6, 2, 61], + [9, 7, 4, 125], + [-25, 7, 32, 126, "lower"], + [25, 7, 32, 127], + ]; + break; + default: + throw new Jbig2Error(`standard table B.${e} does not exist`); + } + for (let e = 0, i = t.length; e < i; e++) t[e] = new HuffmanLine(t[e]); + i = new HuffmanTable(t, !0); + _t[e] = i; + return i; +} +class Reader { + constructor(e, t, i) { + this.data = e; + this.start = t; + this.end = i; + this.position = t; + this.shift = -1; + this.currentByte = 0; + } + readBit() { + if (this.shift < 0) { + if (this.position >= this.end) + throw new Jbig2Error("end of data while reading bit"); + this.currentByte = this.data[this.position++]; + this.shift = 7; + } + const e = (this.currentByte >> this.shift) & 1; + this.shift--; + return e; + } + readBits(e) { + let t, + i = 0; + for (t = e - 1; t >= 0; t--) i |= this.readBit() << t; + return i; + } + byteAlign() { + this.shift = -1; + } + next() { + return this.position >= this.end ? -1 : this.data[this.position++]; + } +} +function getCustomHuffmanTable(e, t, i) { + let a = 0; + for (let s = 0, r = t.length; s < r; s++) { + const r = i[t[s]]; + if (r) { + if (e === a) return r; + a++; + } + } + throw new Jbig2Error("can't find custom Huffman table"); +} +function readUncompressedBitmap(e, t, i) { + const a = []; + for (let s = 0; s < i; s++) { + const i = new Uint8Array(t); + a.push(i); + for (let a = 0; a < t; a++) i[a] = e.readBit(); + e.byteAlign(); + } + return a; +} +function decodeMMRBitmap(e, t, i, a) { + const s = new CCITTFaxDecoder(e, { + K: -1, + Columns: t, + Rows: i, + BlackIs1: !0, + EndOfBlock: a, + }), + r = []; + let n, + o = !1; + for (let e = 0; e < i; e++) { + const e = new Uint8Array(t); + r.push(e); + let i = -1; + for (let a = 0; a < t; a++) { + if (i < 0) { + n = s.readNextChar(); + if (-1 === n) { + n = 0; + o = !0; + } + i = 7; + } + e[a] = (n >> i) & 1; + i--; + } + } + if (a && !o) { + const e = 5; + for (let t = 0; t < e && -1 !== s.readNextChar(); t++); + } + return r; +} +class Jbig2Image { + parseChunks(e) { + return (function parseJbig2Chunks(e) { + const t = new SimpleSegmentVisitor(); + for (let i = 0, a = e.length; i < a; i++) { + const a = e[i]; + processSegments(readSegments({}, a.data, a.start, a.end), t); + } + return t.buffer; + })(e); + } + parse(e) { + throw new Error("Not implemented: Jbig2Image.parse"); + } +} +class Jbig2Stream extends DecodeStream { + constructor(e, t, i) { + super(t); + this.stream = e; + this.dict = e.dict; + this.maybeLength = t; + this.params = i; + } + get bytes() { + return shadow(this, "bytes", this.stream.getBytes(this.maybeLength)); + } + ensureBuffer(e) {} + readBlock() { + if (this.eof) return; + const e = new Jbig2Image(), + t = []; + if (this.params instanceof Dict) { + const e = this.params.get("JBIG2Globals"); + if (e instanceof BaseStream) { + const i = e.getBytes(); + t.push({ data: i, start: 0, end: i.length }); + } + } + t.push({ data: this.bytes, start: 0, end: this.bytes.length }); + const i = e.parseChunks(t), + a = i.length; + for (let e = 0; e < a; e++) i[e] ^= 255; + this.buffer = i; + this.bufferLength = a; + this.eof = !0; + } +} +function convertToRGBA(e) { + switch (e.kind) { + case b: + return convertBlackAndWhiteToRGBA(e); + case D: + return (function convertRGBToRGBA({ + src: e, + srcPos: t = 0, + dest: i, + destPos: a = 0, + width: s, + height: r, + }) { + let n = 0; + const o = e.length >> 2, + g = new Uint32Array(e.buffer, t, o); + if (FeatureTest.isLittleEndian) { + for (; n < o - 2; n += 3, a += 4) { + const e = g[n], + t = g[n + 1], + s = g[n + 2]; + i[a] = 4278190080 | e; + i[a + 1] = (e >>> 24) | (t << 8) | 4278190080; + i[a + 2] = (t >>> 16) | (s << 16) | 4278190080; + i[a + 3] = (s >>> 8) | 4278190080; + } + for (let t = 4 * n, s = e.length; t < s; t += 3) + i[a++] = e[t] | (e[t + 1] << 8) | (e[t + 2] << 16) | 4278190080; + } else { + for (; n < o - 2; n += 3, a += 4) { + const e = g[n], + t = g[n + 1], + s = g[n + 2]; + i[a] = 255 | e; + i[a + 1] = (e << 24) | (t >>> 8) | 255; + i[a + 2] = (t << 16) | (s >>> 16) | 255; + i[a + 3] = (s << 8) | 255; + } + for (let t = 4 * n, s = e.length; t < s; t += 3) + i[a++] = (e[t] << 24) | (e[t + 1] << 16) | (e[t + 2] << 8) | 255; + } + return { srcPos: t, destPos: a }; + })(e); + } + return null; +} +function convertBlackAndWhiteToRGBA({ + src: e, + srcPos: t = 0, + dest: i, + width: a, + height: s, + nonBlackColor: r = 4294967295, + inverseDecode: n = !1, +}) { + const o = FeatureTest.isLittleEndian ? 4278190080 : 255, + [g, c] = n ? [r, o] : [o, r], + h = a >> 3, + l = 7 & a, + C = e.length; + i = new Uint32Array(i.buffer); + let Q = 0; + for (let a = 0; a < s; a++) { + for (const a = t + h; t < a; t++) { + const a = t < C ? e[t] : 255; + i[Q++] = 128 & a ? c : g; + i[Q++] = 64 & a ? c : g; + i[Q++] = 32 & a ? c : g; + i[Q++] = 16 & a ? c : g; + i[Q++] = 8 & a ? c : g; + i[Q++] = 4 & a ? c : g; + i[Q++] = 2 & a ? c : g; + i[Q++] = 1 & a ? c : g; + } + if (0 === l) continue; + const a = t < C ? e[t++] : 255; + for (let e = 0; e < l; e++) i[Q++] = a & (1 << (7 - e)) ? c : g; + } + return { srcPos: t, destPos: Q }; +} +class JpegError extends rt { + constructor(e) { + super(e, "JpegError"); + } +} +class DNLMarkerError extends rt { + constructor(e, t) { + super(e, "DNLMarkerError"); + this.scanLines = t; + } +} +class EOIMarkerError extends rt { + constructor(e) { + super(e, "EOIMarkerError"); + } +} +const $t = new Uint8Array([ + 0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, 26, 33, 40, + 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49, 56, 57, 50, 43, 36, + 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, + 54, 47, 55, 62, 63, + ]), + Ai = 4017, + ei = 799, + ti = 3406, + ii = 2276, + ai = 1567, + si = 3784, + ri = 5793, + ni = 2896; +function buildHuffmanTable(e, t) { + let i, + a, + s = 0, + r = 16; + for (; r > 0 && !e[r - 1]; ) r--; + const n = [{ children: [], index: 0 }]; + let o, + g = n[0]; + for (i = 0; i < r; i++) { + for (a = 0; a < e[i]; a++) { + g = n.pop(); + g.children[g.index] = t[s]; + for (; g.index > 0; ) g = n.pop(); + g.index++; + n.push(g); + for (; n.length <= i; ) { + n.push((o = { children: [], index: 0 })); + g.children[g.index] = o.children; + g = o; + } + s++; + } + if (i + 1 < r) { + n.push((o = { children: [], index: 0 })); + g.children[g.index] = o.children; + g = o; + } + } + return n[0].children; +} +function getBlockBufferOffset(e, t, i) { + return 64 * ((e.blocksPerLine + 1) * t + i); +} +function decodeScan(e, t, i, a, s, r, n, o, g, c = !1) { + const h = i.mcusPerLine, + l = i.progressive, + C = t; + let Q = 0, + E = 0; + function readBit() { + if (E > 0) { + E--; + return (Q >> E) & 1; + } + Q = e[t++]; + if (255 === Q) { + const a = e[t++]; + if (a) { + if (220 === a && c) { + const a = readUint16(e, (t += 2)); + t += 2; + if (a > 0 && a !== i.scanLines) + throw new DNLMarkerError( + "Found DNL marker (0xFFDC) while parsing scan data", + a, + ); + } else if (217 === a) { + if (c) { + const e = p * (8 === i.precision ? 8 : 0); + if (e > 0 && Math.round(i.scanLines / e) >= 5) + throw new DNLMarkerError( + "Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter", + e, + ); + } + throw new EOIMarkerError( + "Found EOI marker (0xFFD9) while parsing scan data", + ); + } + throw new JpegError(`unexpected marker ${((Q << 8) | a).toString(16)}`); + } + } + E = 7; + return Q >>> 7; + } + function decodeHuffman(e) { + let t = e; + for (;;) { + t = t[readBit()]; + switch (typeof t) { + case "number": + return t; + case "object": + continue; + } + throw new JpegError("invalid huffman sequence"); + } + } + function receive(e) { + let t = 0; + for (; e > 0; ) { + t = (t << 1) | readBit(); + e--; + } + return t; + } + function receiveAndExtend(e) { + if (1 === e) return 1 === readBit() ? 1 : -1; + const t = receive(e); + return t >= 1 << (e - 1) ? t : t + (-1 << e) + 1; + } + let u = 0; + let d, + f = 0; + let p = 0; + function decodeMcu(e, t, i, a, s) { + const r = i % h; + p = ((i / h) | 0) * e.v + a; + const n = r * e.h + s; + t(e, getBlockBufferOffset(e, p, n)); + } + function decodeBlock(e, t, i) { + p = (i / e.blocksPerLine) | 0; + const a = i % e.blocksPerLine; + t(e, getBlockBufferOffset(e, p, a)); + } + const m = a.length; + let y, w, b, D, F, S; + S = l + ? 0 === r + ? 0 === o + ? function decodeDCFirst(e, t) { + const i = decodeHuffman(e.huffmanTableDC), + a = 0 === i ? 0 : receiveAndExtend(i) << g; + e.blockData[t] = e.pred += a; + } + : function decodeDCSuccessive(e, t) { + e.blockData[t] |= readBit() << g; + } + : 0 === o + ? function decodeACFirst(e, t) { + if (u > 0) { + u--; + return; + } + let i = r; + const a = n; + for (; i <= a; ) { + const a = decodeHuffman(e.huffmanTableAC), + s = 15 & a, + r = a >> 4; + if (0 === s) { + if (r < 15) { + u = receive(r) + (1 << r) - 1; + break; + } + i += 16; + continue; + } + i += r; + const n = $t[i]; + e.blockData[t + n] = receiveAndExtend(s) * (1 << g); + i++; + } + } + : function decodeACSuccessive(e, t) { + let i = r; + const a = n; + let s, + o, + c = 0; + for (; i <= a; ) { + const a = t + $t[i], + r = e.blockData[a] < 0 ? -1 : 1; + switch (f) { + case 0: + o = decodeHuffman(e.huffmanTableAC); + s = 15 & o; + c = o >> 4; + if (0 === s) + if (c < 15) { + u = receive(c) + (1 << c); + f = 4; + } else { + c = 16; + f = 1; + } + else { + if (1 !== s) throw new JpegError("invalid ACn encoding"); + d = receiveAndExtend(s); + f = c ? 2 : 3; + } + continue; + case 1: + case 2: + if (e.blockData[a]) e.blockData[a] += r * (readBit() << g); + else { + c--; + 0 === c && (f = 2 === f ? 3 : 0); + } + break; + case 3: + if (e.blockData[a]) e.blockData[a] += r * (readBit() << g); + else { + e.blockData[a] = d << g; + f = 0; + } + break; + case 4: + e.blockData[a] && (e.blockData[a] += r * (readBit() << g)); + } + i++; + } + if (4 === f) { + u--; + 0 === u && (f = 0); + } + } + : function decodeBaseline(e, t) { + const i = decodeHuffman(e.huffmanTableDC), + a = 0 === i ? 0 : receiveAndExtend(i); + e.blockData[t] = e.pred += a; + let s = 1; + for (; s < 64; ) { + const i = decodeHuffman(e.huffmanTableAC), + a = 15 & i, + r = i >> 4; + if (0 === a) { + if (r < 15) break; + s += 16; + continue; + } + s += r; + const n = $t[s]; + e.blockData[t + n] = receiveAndExtend(a); + s++; + } + }; + let k, + R = 0; + const N = + 1 === m ? a[0].blocksPerLine * a[0].blocksPerColumn : h * i.mcusPerColumn; + let G, x; + for (; R <= N; ) { + const i = s ? Math.min(N - R, s) : N; + if (i > 0) { + for (w = 0; w < m; w++) a[w].pred = 0; + u = 0; + if (1 === m) { + y = a[0]; + for (F = 0; F < i; F++) { + decodeBlock(y, S, R); + R++; + } + } else + for (F = 0; F < i; F++) { + for (w = 0; w < m; w++) { + y = a[w]; + G = y.h; + x = y.v; + for (b = 0; b < x; b++) + for (D = 0; D < G; D++) decodeMcu(y, S, R, b, D); + } + R++; + } + } + E = 0; + k = findNextFileMarker(e, t); + if (!k) break; + if (k.invalid) { + warn( + `decodeScan - ${i > 0 ? "unexpected" : "excessive"} MCU data, current marker is: ${k.invalid}`, + ); + t = k.offset; + } + if (!(k.marker >= 65488 && k.marker <= 65495)) break; + t += 2; + } + return t - C; +} +function quantizeAndInverse(e, t, i) { + const a = e.quantizationTable, + s = e.blockData; + let r, n, o, g, c, h, l, C, Q, E, u, d, f, p, m, y, w; + if (!a) throw new JpegError("missing required Quantization Table."); + for (let e = 0; e < 64; e += 8) { + Q = s[t + e]; + E = s[t + e + 1]; + u = s[t + e + 2]; + d = s[t + e + 3]; + f = s[t + e + 4]; + p = s[t + e + 5]; + m = s[t + e + 6]; + y = s[t + e + 7]; + Q *= a[e]; + if (0 != (E | u | d | f | p | m | y)) { + E *= a[e + 1]; + u *= a[e + 2]; + d *= a[e + 3]; + f *= a[e + 4]; + p *= a[e + 5]; + m *= a[e + 6]; + y *= a[e + 7]; + r = (ri * Q + 128) >> 8; + n = (ri * f + 128) >> 8; + o = u; + g = m; + c = (ni * (E - y) + 128) >> 8; + C = (ni * (E + y) + 128) >> 8; + h = d << 4; + l = p << 4; + r = (r + n + 1) >> 1; + n = r - n; + w = (o * si + g * ai + 128) >> 8; + o = (o * ai - g * si + 128) >> 8; + g = w; + c = (c + l + 1) >> 1; + l = c - l; + C = (C + h + 1) >> 1; + h = C - h; + r = (r + g + 1) >> 1; + g = r - g; + n = (n + o + 1) >> 1; + o = n - o; + w = (c * ii + C * ti + 2048) >> 12; + c = (c * ti - C * ii + 2048) >> 12; + C = w; + w = (h * ei + l * Ai + 2048) >> 12; + h = (h * Ai - l * ei + 2048) >> 12; + l = w; + i[e] = r + C; + i[e + 7] = r - C; + i[e + 1] = n + l; + i[e + 6] = n - l; + i[e + 2] = o + h; + i[e + 5] = o - h; + i[e + 3] = g + c; + i[e + 4] = g - c; + } else { + w = (ri * Q + 512) >> 10; + i[e] = w; + i[e + 1] = w; + i[e + 2] = w; + i[e + 3] = w; + i[e + 4] = w; + i[e + 5] = w; + i[e + 6] = w; + i[e + 7] = w; + } + } + for (let e = 0; e < 8; ++e) { + Q = i[e]; + E = i[e + 8]; + u = i[e + 16]; + d = i[e + 24]; + f = i[e + 32]; + p = i[e + 40]; + m = i[e + 48]; + y = i[e + 56]; + if (0 != (E | u | d | f | p | m | y)) { + r = (ri * Q + 2048) >> 12; + n = (ri * f + 2048) >> 12; + o = u; + g = m; + c = (ni * (E - y) + 2048) >> 12; + C = (ni * (E + y) + 2048) >> 12; + h = d; + l = p; + r = 4112 + ((r + n + 1) >> 1); + n = r - n; + w = (o * si + g * ai + 2048) >> 12; + o = (o * ai - g * si + 2048) >> 12; + g = w; + c = (c + l + 1) >> 1; + l = c - l; + C = (C + h + 1) >> 1; + h = C - h; + r = (r + g + 1) >> 1; + g = r - g; + n = (n + o + 1) >> 1; + o = n - o; + w = (c * ii + C * ti + 2048) >> 12; + c = (c * ti - C * ii + 2048) >> 12; + C = w; + w = (h * ei + l * Ai + 2048) >> 12; + h = (h * Ai - l * ei + 2048) >> 12; + l = w; + Q = r + C; + y = r - C; + E = n + l; + m = n - l; + u = o + h; + p = o - h; + d = g + c; + f = g - c; + Q < 16 ? (Q = 0) : Q >= 4080 ? (Q = 255) : (Q >>= 4); + E < 16 ? (E = 0) : E >= 4080 ? (E = 255) : (E >>= 4); + u < 16 ? (u = 0) : u >= 4080 ? (u = 255) : (u >>= 4); + d < 16 ? (d = 0) : d >= 4080 ? (d = 255) : (d >>= 4); + f < 16 ? (f = 0) : f >= 4080 ? (f = 255) : (f >>= 4); + p < 16 ? (p = 0) : p >= 4080 ? (p = 255) : (p >>= 4); + m < 16 ? (m = 0) : m >= 4080 ? (m = 255) : (m >>= 4); + y < 16 ? (y = 0) : y >= 4080 ? (y = 255) : (y >>= 4); + s[t + e] = Q; + s[t + e + 8] = E; + s[t + e + 16] = u; + s[t + e + 24] = d; + s[t + e + 32] = f; + s[t + e + 40] = p; + s[t + e + 48] = m; + s[t + e + 56] = y; + } else { + w = (ri * Q + 8192) >> 14; + w = w < -2040 ? 0 : w >= 2024 ? 255 : (w + 2056) >> 4; + s[t + e] = w; + s[t + e + 8] = w; + s[t + e + 16] = w; + s[t + e + 24] = w; + s[t + e + 32] = w; + s[t + e + 40] = w; + s[t + e + 48] = w; + s[t + e + 56] = w; + } + } +} +function buildComponentData(e, t) { + const i = t.blocksPerLine, + a = t.blocksPerColumn, + s = new Int16Array(64); + for (let e = 0; e < a; e++) + for (let a = 0; a < i; a++) { + quantizeAndInverse(t, getBlockBufferOffset(t, e, a), s); + } + return t.blockData; +} +function findNextFileMarker(e, t, i = t) { + const a = e.length - 1; + let s = i < t ? i : t; + if (t >= a) return null; + const r = readUint16(e, t); + if (r >= 65472 && r <= 65534) return { invalid: null, marker: r, offset: t }; + let n = readUint16(e, s); + for (; !(n >= 65472 && n <= 65534); ) { + if (++s >= a) return null; + n = readUint16(e, s); + } + return { invalid: r.toString(16), marker: n, offset: s }; +} +class JpegImage { + constructor({ decodeTransform: e = null, colorTransform: t = -1 } = {}) { + this._decodeTransform = e; + this._colorTransform = t; + } + parse(e, { dnlScanLines: t = null } = {}) { + function readDataBlock() { + const t = readUint16(e, s); + s += 2; + let i = s + t - 2; + const a = findNextFileMarker(e, i, s); + if (a?.invalid) { + warn( + "readDataBlock - incorrect length, current marker is: " + a.invalid, + ); + i = a.offset; + } + const r = e.subarray(s, i); + s += r.length; + return r; + } + function prepareComponents(e) { + const t = Math.ceil(e.samplesPerLine / 8 / e.maxH), + i = Math.ceil(e.scanLines / 8 / e.maxV); + for (const a of e.components) { + const s = Math.ceil((Math.ceil(e.samplesPerLine / 8) * a.h) / e.maxH), + r = Math.ceil((Math.ceil(e.scanLines / 8) * a.v) / e.maxV), + n = t * a.h, + o = 64 * (i * a.v) * (n + 1); + a.blockData = new Int16Array(o); + a.blocksPerLine = s; + a.blocksPerColumn = r; + } + e.mcusPerLine = t; + e.mcusPerColumn = i; + } + let i, + a, + s = 0, + r = null, + n = null, + o = 0; + const g = [], + c = [], + h = []; + let l = readUint16(e, s); + s += 2; + if (65496 !== l) throw new JpegError("SOI not found"); + l = readUint16(e, s); + s += 2; + A: for (; 65497 !== l; ) { + let C, Q, E; + switch (l) { + case 65504: + case 65505: + case 65506: + case 65507: + case 65508: + case 65509: + case 65510: + case 65511: + case 65512: + case 65513: + case 65514: + case 65515: + case 65516: + case 65517: + case 65518: + case 65519: + case 65534: + const u = readDataBlock(); + 65504 === l && + 74 === u[0] && + 70 === u[1] && + 73 === u[2] && + 70 === u[3] && + 0 === u[4] && + (r = { + version: { major: u[5], minor: u[6] }, + densityUnits: u[7], + xDensity: (u[8] << 8) | u[9], + yDensity: (u[10] << 8) | u[11], + thumbWidth: u[12], + thumbHeight: u[13], + thumbData: u.subarray(14, 14 + 3 * u[12] * u[13]), + }); + 65518 === l && + 65 === u[0] && + 100 === u[1] && + 111 === u[2] && + 98 === u[3] && + 101 === u[4] && + (n = { + version: (u[5] << 8) | u[6], + flags0: (u[7] << 8) | u[8], + flags1: (u[9] << 8) | u[10], + transformCode: u[11], + }); + break; + case 65499: + const d = readUint16(e, s); + s += 2; + const f = d + s - 2; + let p; + for (; s < f; ) { + const t = e[s++], + i = new Uint16Array(64); + if (t >> 4 == 0) + for (Q = 0; Q < 64; Q++) { + p = $t[Q]; + i[p] = e[s++]; + } + else { + if (t >> 4 != 1) throw new JpegError("DQT - invalid table spec"); + for (Q = 0; Q < 64; Q++) { + p = $t[Q]; + i[p] = readUint16(e, s); + s += 2; + } + } + g[15 & t] = i; + } + break; + case 65472: + case 65473: + case 65474: + if (i) throw new JpegError("Only single frame JPEGs supported"); + s += 2; + i = {}; + i.extended = 65473 === l; + i.progressive = 65474 === l; + i.precision = e[s++]; + const m = readUint16(e, s); + s += 2; + i.scanLines = t || m; + i.samplesPerLine = readUint16(e, s); + s += 2; + i.components = []; + i.componentIds = {}; + const y = e[s++]; + let w = 0, + b = 0; + for (C = 0; C < y; C++) { + const t = e[s], + a = e[s + 1] >> 4, + r = 15 & e[s + 1]; + w < a && (w = a); + b < r && (b = r); + const n = e[s + 2]; + E = i.components.push({ + h: a, + v: r, + quantizationId: n, + quantizationTable: null, + }); + i.componentIds[t] = E - 1; + s += 3; + } + i.maxH = w; + i.maxV = b; + prepareComponents(i); + break; + case 65476: + const D = readUint16(e, s); + s += 2; + for (C = 2; C < D; ) { + const t = e[s++], + i = new Uint8Array(16); + let a = 0; + for (Q = 0; Q < 16; Q++, s++) a += i[Q] = e[s]; + const r = new Uint8Array(a); + for (Q = 0; Q < a; Q++, s++) r[Q] = e[s]; + C += 17 + a; + (t >> 4 == 0 ? h : c)[15 & t] = buildHuffmanTable(i, r); + } + break; + case 65501: + s += 2; + a = readUint16(e, s); + s += 2; + break; + case 65498: + const F = 1 == ++o && !t; + s += 2; + const S = e[s++], + k = []; + for (C = 0; C < S; C++) { + const t = e[s++], + a = i.componentIds[t], + r = i.components[a]; + r.index = t; + const n = e[s++]; + r.huffmanTableDC = h[n >> 4]; + r.huffmanTableAC = c[15 & n]; + k.push(r); + } + const R = e[s++], + N = e[s++], + G = e[s++]; + try { + const t = decodeScan(e, s, i, k, a, R, N, G >> 4, 15 & G, F); + s += t; + } catch (t) { + if (t instanceof DNLMarkerError) { + warn(`${t.message} -- attempting to re-parse the JPEG image.`); + return this.parse(e, { dnlScanLines: t.scanLines }); + } + if (t instanceof EOIMarkerError) { + warn(`${t.message} -- ignoring the rest of the image data.`); + break A; + } + throw t; + } + break; + case 65500: + s += 4; + break; + case 65535: + 255 !== e[s] && s--; + break; + default: + const x = findNextFileMarker(e, s - 2, s - 3); + if (x?.invalid) { + warn( + "JpegImage.parse - unexpected data, current marker is: " + + x.invalid, + ); + s = x.offset; + break; + } + if (!x || s >= e.length - 1) { + warn( + "JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).", + ); + break A; + } + throw new JpegError( + "JpegImage.parse - unknown marker: " + l.toString(16), + ); + } + l = readUint16(e, s); + s += 2; + } + if (!i) throw new JpegError("JpegImage.parse - no frame data found."); + this.width = i.samplesPerLine; + this.height = i.scanLines; + this.jfif = r; + this.adobe = n; + this.components = []; + for (const e of i.components) { + const t = g[e.quantizationId]; + t && (e.quantizationTable = t); + this.components.push({ + index: e.index, + output: buildComponentData(0, e), + scaleX: e.h / i.maxH, + scaleY: e.v / i.maxV, + blocksPerLine: e.blocksPerLine, + blocksPerColumn: e.blocksPerColumn, + }); + } + this.numComponents = this.components.length; + } + _getLinearizedBlockData(e, t, i = !1) { + const a = this.width / e, + s = this.height / t; + let r, + n, + o, + g, + c, + h, + l, + C, + Q, + E, + u, + d = 0; + const f = this.components.length, + p = e * t * f, + m = new Uint8ClampedArray(p), + y = new Uint32Array(e), + w = 4294967288; + let b; + for (l = 0; l < f; l++) { + r = this.components[l]; + n = r.scaleX * a; + o = r.scaleY * s; + d = l; + u = r.output; + g = (r.blocksPerLine + 1) << 3; + if (n !== b) { + for (c = 0; c < e; c++) { + C = 0 | (c * n); + y[c] = ((C & w) << 3) | (7 & C); + } + b = n; + } + for (h = 0; h < t; h++) { + C = 0 | (h * o); + E = (g * (C & w)) | ((7 & C) << 3); + for (c = 0; c < e; c++) { + m[d] = u[E + y[c]]; + d += f; + } + } + } + let D = this._decodeTransform; + i || + 4 !== f || + D || + (D = new Int32Array([-256, 255, -256, 255, -256, 255, -256, 255])); + if (D) + for (l = 0; l < p; ) + for (C = 0, Q = 0; C < f; C++, l++, Q += 2) + m[l] = ((m[l] * D[Q]) >> 8) + D[Q + 1]; + return m; + } + get _isColorConversionNeeded() { + return this.adobe + ? !!this.adobe.transformCode + : 3 === this.numComponents + ? 0 !== this._colorTransform && + (82 !== this.components[0].index || + 71 !== this.components[1].index || + 66 !== this.components[2].index) + : 1 === this._colorTransform; + } + _convertYccToRgb(e) { + let t, i, a; + for (let s = 0, r = e.length; s < r; s += 3) { + t = e[s]; + i = e[s + 1]; + a = e[s + 2]; + e[s] = t - 179.456 + 1.402 * a; + e[s + 1] = t + 135.459 - 0.344 * i - 0.714 * a; + e[s + 2] = t - 226.816 + 1.772 * i; + } + return e; + } + _convertYccToRgba(e, t) { + for (let i = 0, a = 0, s = e.length; i < s; i += 3, a += 4) { + const s = e[i], + r = e[i + 1], + n = e[i + 2]; + t[a] = s - 179.456 + 1.402 * n; + t[a + 1] = s + 135.459 - 0.344 * r - 0.714 * n; + t[a + 2] = s - 226.816 + 1.772 * r; + t[a + 3] = 255; + } + return t; + } + _convertYcckToRgb(e) { + let t, + i, + a, + s, + r = 0; + for (let n = 0, o = e.length; n < o; n += 4) { + t = e[n]; + i = e[n + 1]; + a = e[n + 2]; + s = e[n + 3]; + e[r++] = + i * + (-660635669420364e-19 * i + + 0.000437130475926232 * a - + 54080610064599e-18 * t + + 0.00048449797120281 * s - + 0.154362151871126) - + 122.67195406894 + + a * + (-0.000957964378445773 * a + + 0.000817076911346625 * t - + 0.00477271405408747 * s + + 1.53380253221734) + + t * + (0.000961250184130688 * t - + 0.00266257332283933 * s + + 0.48357088451265) + + s * (-0.000336197177618394 * s + 0.484791561490776); + e[r++] = + 107.268039397724 + + i * + (219927104525741e-19 * i - + 0.000640992018297945 * a + + 0.000659397001245577 * t + + 0.000426105652938837 * s - + 0.176491792462875) + + a * + (-0.000778269941513683 * a + + 0.00130872261408275 * t + + 0.000770482631801132 * s - + 0.151051492775562) + + t * + (0.00126935368114843 * t - + 0.00265090189010898 * s + + 0.25802910206845) + + s * (-0.000318913117588328 * s - 0.213742400323665); + e[r++] = + i * + (-0.000570115196973677 * i - + 263409051004589e-19 * a + + 0.0020741088115012 * t - + 0.00288260236853442 * s + + 0.814272968359295) - + 20.810012546947 + + a * + (-153496057440975e-19 * a - + 0.000132689043961446 * t + + 0.000560833691242812 * s - + 0.195152027534049) + + t * + (0.00174418132927582 * t - + 0.00255243321439347 * s + + 0.116935020465145) + + s * (-0.000343531996510555 * s + 0.24165260232407); + } + return e.subarray(0, r); + } + _convertYcckToRgba(e) { + for (let t = 0, i = e.length; t < i; t += 4) { + const i = e[t], + a = e[t + 1], + s = e[t + 2], + r = e[t + 3]; + e[t] = + a * + (-660635669420364e-19 * a + + 0.000437130475926232 * s - + 54080610064599e-18 * i + + 0.00048449797120281 * r - + 0.154362151871126) - + 122.67195406894 + + s * + (-0.000957964378445773 * s + + 0.000817076911346625 * i - + 0.00477271405408747 * r + + 1.53380253221734) + + i * + (0.000961250184130688 * i - + 0.00266257332283933 * r + + 0.48357088451265) + + r * (-0.000336197177618394 * r + 0.484791561490776); + e[t + 1] = + 107.268039397724 + + a * + (219927104525741e-19 * a - + 0.000640992018297945 * s + + 0.000659397001245577 * i + + 0.000426105652938837 * r - + 0.176491792462875) + + s * + (-0.000778269941513683 * s + + 0.00130872261408275 * i + + 0.000770482631801132 * r - + 0.151051492775562) + + i * + (0.00126935368114843 * i - + 0.00265090189010898 * r + + 0.25802910206845) + + r * (-0.000318913117588328 * r - 0.213742400323665); + e[t + 2] = + a * + (-0.000570115196973677 * a - + 263409051004589e-19 * s + + 0.0020741088115012 * i - + 0.00288260236853442 * r + + 0.814272968359295) - + 20.810012546947 + + s * + (-153496057440975e-19 * s - + 0.000132689043961446 * i + + 0.000560833691242812 * r - + 0.195152027534049) + + i * + (0.00174418132927582 * i - + 0.00255243321439347 * r + + 0.116935020465145) + + r * (-0.000343531996510555 * r + 0.24165260232407); + e[t + 3] = 255; + } + return e; + } + _convertYcckToCmyk(e) { + let t, i, a; + for (let s = 0, r = e.length; s < r; s += 4) { + t = e[s]; + i = e[s + 1]; + a = e[s + 2]; + e[s] = 434.456 - t - 1.402 * a; + e[s + 1] = 119.541 - t + 0.344 * i + 0.714 * a; + e[s + 2] = 481.816 - t - 1.772 * i; + } + return e; + } + _convertCmykToRgb(e) { + let t, + i, + a, + s, + r = 0; + for (let n = 0, o = e.length; n < o; n += 4) { + t = e[n]; + i = e[n + 1]; + a = e[n + 2]; + s = e[n + 3]; + e[r++] = + 255 + + t * + (-6747147073602441e-20 * t + + 0.0008379262121013727 * i + + 0.0002894718188643294 * a + + 0.003264231057537806 * s - + 1.1185611867203937) + + i * + (26374107616089405e-21 * i - + 8626949158638572e-20 * a - + 0.0002748769067499491 * s - + 0.02155688794978967) + + a * + (-3878099212869363e-20 * a - + 0.0003267808279485286 * s + + 0.0686742238595345) - + s * (0.0003361971776183937 * s + 0.7430659151342254); + e[r++] = + 255 + + t * + (0.00013596372813588848 * t + + 0.000924537132573585 * i + + 0.00010567359618683593 * a + + 0.0004791864687436512 * s - + 0.3109689587515875) + + i * + (-0.00023545346108370344 * i + + 0.0002702845253534714 * a + + 0.0020200308977307156 * s - + 0.7488052167015494) + + a * + (6834815998235662e-20 * a + + 0.00015168452363460973 * s - + 0.09751927774728933) - + s * (0.0003189131175883281 * s + 0.7364883807733168); + e[r++] = + 255 + + t * + (13598650411385307e-21 * t + + 0.00012423956175490851 * i + + 0.0004751985097583589 * a - + 36729317476630422e-22 * s - + 0.05562186980264034) + + i * + (0.00016141380598724676 * i + + 0.0009692239130725186 * a + + 0.0007782692450036253 * s - + 0.44015232367526463) + + a * + (5.068882914068769e-7 * a + + 0.0017778369011375071 * s - + 0.7591454649749609) - + s * (0.0003435319965105553 * s + 0.7063770186160144); + } + return e.subarray(0, r); + } + _convertCmykToRgba(e) { + for (let t = 0, i = e.length; t < i; t += 4) { + const i = e[t], + a = e[t + 1], + s = e[t + 2], + r = e[t + 3]; + e[t] = + 255 + + i * + (-6747147073602441e-20 * i + + 0.0008379262121013727 * a + + 0.0002894718188643294 * s + + 0.003264231057537806 * r - + 1.1185611867203937) + + a * + (26374107616089405e-21 * a - + 8626949158638572e-20 * s - + 0.0002748769067499491 * r - + 0.02155688794978967) + + s * + (-3878099212869363e-20 * s - + 0.0003267808279485286 * r + + 0.0686742238595345) - + r * (0.0003361971776183937 * r + 0.7430659151342254); + e[t + 1] = + 255 + + i * + (0.00013596372813588848 * i + + 0.000924537132573585 * a + + 0.00010567359618683593 * s + + 0.0004791864687436512 * r - + 0.3109689587515875) + + a * + (-0.00023545346108370344 * a + + 0.0002702845253534714 * s + + 0.0020200308977307156 * r - + 0.7488052167015494) + + s * + (6834815998235662e-20 * s + + 0.00015168452363460973 * r - + 0.09751927774728933) - + r * (0.0003189131175883281 * r + 0.7364883807733168); + e[t + 2] = + 255 + + i * + (13598650411385307e-21 * i + + 0.00012423956175490851 * a + + 0.0004751985097583589 * s - + 36729317476630422e-22 * r - + 0.05562186980264034) + + a * + (0.00016141380598724676 * a + + 0.0009692239130725186 * s + + 0.0007782692450036253 * r - + 0.44015232367526463) + + s * + (5.068882914068769e-7 * s + + 0.0017778369011375071 * r - + 0.7591454649749609) - + r * (0.0003435319965105553 * r + 0.7063770186160144); + e[t + 3] = 255; + } + return e; + } + getData({ + width: e, + height: t, + forceRGBA: i = !1, + forceRGB: a = !1, + isSourcePDF: s = !1, + }) { + if (this.numComponents > 4) throw new JpegError("Unsupported color mode"); + const r = this._getLinearizedBlockData(e, t, s); + if (1 === this.numComponents && (i || a)) { + const e = r.length * (i ? 4 : 3), + t = new Uint8ClampedArray(e); + let a = 0; + if (i) + !(function grayToRGBA(e, t) { + if (FeatureTest.isLittleEndian) + for (let i = 0, a = e.length; i < a; i++) + t[i] = (65793 * e[i]) | 4278190080; + else + for (let i = 0, a = e.length; i < a; i++) + t[i] = (16843008 * e[i]) | 255; + })(r, new Uint32Array(t.buffer)); + else + for (const e of r) { + t[a++] = e; + t[a++] = e; + t[a++] = e; + } + return t; + } + if (3 === this.numComponents && this._isColorConversionNeeded) { + if (i) { + const e = new Uint8ClampedArray((r.length / 3) * 4); + return this._convertYccToRgba(r, e); + } + return this._convertYccToRgb(r); + } + if (4 === this.numComponents) { + if (this._isColorConversionNeeded) + return i + ? this._convertYcckToRgba(r) + : a + ? this._convertYcckToRgb(r) + : this._convertYcckToCmyk(r); + if (i) return this._convertCmykToRgba(r); + if (a) return this._convertCmykToRgb(r); + } + return r; + } +} +class JpegStream extends DecodeStream { + constructor(e, t, i) { + let a; + for (; -1 !== (a = e.getByte()); ) + if (255 === a) { + e.skip(-1); + break; + } + super(t); + this.stream = e; + this.dict = e.dict; + this.maybeLength = t; + this.params = i; + } + get bytes() { + return shadow(this, "bytes", this.stream.getBytes(this.maybeLength)); + } + ensureBuffer(e) {} + readBlock() { + if (this.eof) return; + const e = { decodeTransform: void 0, colorTransform: void 0 }, + t = this.dict.getArray("D", "Decode"); + if ((this.forceRGBA || this.forceRGB) && Array.isArray(t)) { + const i = this.dict.get("BPC", "BitsPerComponent") || 8, + a = t.length, + s = new Int32Array(a); + let r = !1; + const n = (1 << i) - 1; + for (let e = 0; e < a; e += 2) { + s[e] = (256 * (t[e + 1] - t[e])) | 0; + s[e + 1] = (t[e] * n) | 0; + (256 === s[e] && 0 === s[e + 1]) || (r = !0); + } + r && (e.decodeTransform = s); + } + if (this.params instanceof Dict) { + const t = this.params.get("ColorTransform"); + Number.isInteger(t) && (e.colorTransform = t); + } + const i = new JpegImage(e); + i.parse(this.bytes); + const a = i.getData({ + width: this.drawWidth, + height: this.drawHeight, + forceRGBA: this.forceRGBA, + forceRGB: this.forceRGB, + isSourcePDF: !0, + }); + this.buffer = a; + this.bufferLength = a.length; + this.eof = !0; + } +} +var oi, + gi = + ((oi = + "undefined" != typeof document ? document.currentScript?.src : void 0), + function (e = {}) { + var t, + i, + a = Object.assign({}, e); + new Promise((e, a) => { + t = e; + i = a; + }); + a.decode = function (e, t) { + const i = e.length, + s = a._malloc(i); + a.HEAPU8.set(e, s); + const r = a._jp2_decode(s, i, t ? 1 : 0); + a._free(s); + if (r) { + const { errorMessages: e } = a; + if (e) { + delete a.errorMessages; + return e; + } + return "Unknown error"; + } + const { imageData: n } = a; + a.imageData = null; + return n; + }; + var s, + r = Object.assign({}, a), + n = "./this.program", + o = ""; + "undefined" != typeof document && + document.currentScript && + (o = document.currentScript.src); + oi && (o = oi); + o = o.startsWith("blob:") + ? "" + : o.substr(0, o.replace(/[?#].*/, "").lastIndexOf("/") + 1); + var g, + c, + h, + l, + C, + Q = a.print || console.log.bind(console), + E = a.printErr || console.error.bind(console); + Object.assign(a, r); + r = null; + a.arguments && a.arguments; + a.thisProgram && (n = a.thisProgram); + a.quit && a.quit; + a.wasmBinary && (g = a.wasmBinary); + function tryParseAsDataURI(e) { + if (isDataURI(e)) + return (function intArrayFromBase64(e) { + for ( + var t = atob(e), i = new Uint8Array(t.length), a = 0; + a < t.length; + ++a + ) + i[a] = t.charCodeAt(a); + return i; + })(e.slice(b.length)); + } + function updateMemoryViews() { + var e = c.buffer; + a.HEAP8 = h = new Int8Array(e); + a.HEAP16 = new Int16Array(e); + a.HEAPU8 = l = new Uint8Array(e); + a.HEAPU16 = new Uint16Array(e); + a.HEAP32 = new Int32Array(e); + a.HEAPU32 = C = new Uint32Array(e); + a.HEAPF32 = new Float32Array(e); + a.HEAPF64 = new Float64Array(e); + } + var u, + d = [], + f = [], + p = [], + m = 0, + y = null, + w = null, + b = "data:application/octet-stream;base64,", + isDataURI = (e) => e.startsWith(b); + function instantiateSync(e, t) { + var i, + a = (function getBinarySync(e) { + if (e == u && g) return new Uint8Array(g); + var t = tryParseAsDataURI(e); + if (t) return t; + if (s) return s(e); + throw 'sync fetching of the wasm failed: you can preload it to Module["wasmBinary"] manually, or emcc.py will do that for you when generating HTML (but not JS)'; + })(e); + i = new WebAssembly.Module(a); + return [new WebAssembly.Instance(i, t), i]; + } + var D, + callRuntimeCallbacks = (e) => { + for (; e.length > 0; ) e.shift()(a); + }, + F = + (a.noExitRuntime, + (e) => { + var t = (e - c.buffer.byteLength + 65535) / 65536; + try { + c.grow(t); + updateMemoryViews(); + return 1; + } catch (e) {} + }), + S = {}, + getEnvStrings = () => { + if (!getEnvStrings.strings) { + var e = { + USER: "web_user", + LOGNAME: "web_user", + PATH: "/", + PWD: "/", + HOME: "/home/web_user", + LANG: + ( + ("object" == typeof navigator && + navigator.languages && + navigator.languages[0]) || + "C" + ).replace("-", "_") + ".UTF-8", + _: n || "./this.program", + }; + for (var t in S) void 0 === S[t] ? delete e[t] : (e[t] = S[t]); + var i = []; + for (var t in e) i.push(`${t}=${e[t]}`); + getEnvStrings.strings = i; + } + return getEnvStrings.strings; + }, + k = [null, [], []], + R = + "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0, + UTF8ArrayToString = (e, t, i) => { + for (var a = t + i, s = t; e[s] && !(s >= a); ) ++s; + if (s - t > 16 && e.buffer && R) return R.decode(e.subarray(t, s)); + for (var r = ""; t < s; ) { + var n = e[t++]; + if (128 & n) { + var o = 63 & e[t++]; + if (192 != (224 & n)) { + var g = 63 & e[t++]; + if ( + (n = + 224 == (240 & n) + ? ((15 & n) << 12) | (o << 6) | g + : ((7 & n) << 18) | + (o << 12) | + (g << 6) | + (63 & e[t++])) < 65536 + ) + r += String.fromCharCode(n); + else { + var c = n - 65536; + r += String.fromCharCode( + 55296 | (c >> 10), + 56320 | (1023 & c), + ); + } + } else r += String.fromCharCode(((31 & n) << 6) | o); + } else r += String.fromCharCode(n); + } + return r; + }, + printChar = (e, t) => { + var i = k[e]; + if (0 === t || 10 === t) { + (1 === e ? Q : E)(UTF8ArrayToString(i, 0)); + i.length = 0; + } else i.push(t); + }, + UTF8ToString = (e, t) => (e ? UTF8ArrayToString(l, e, t) : ""), + N = { + f: (e, t, i) => l.copyWithin(e, t, t + i), + b: (e) => { + var t = l.length, + i = 2147483648; + if ((e >>>= 0) > i) return !1; + for (var a, s, r = 1; r <= 4; r *= 2) { + var n = t * (1 + 0.2 / r); + n = Math.min(n, e + 100663296); + var o = Math.min( + i, + (a = Math.max(e, n)) + (((s = 65536) - (a % s)) % s), + ); + if (F(o)) return !0; + } + return !1; + }, + c: (e, t) => { + var i = 0; + getEnvStrings().forEach((a, s) => { + var r = t + i; + C[(e + 4 * s) >> 2] = r; + ((e, t) => { + for (var i = 0; i < e.length; ++i) h[t++] = e.charCodeAt(i); + h[t] = 0; + })(a, r); + i += a.length + 1; + }); + return 0; + }, + d: (e, t) => { + var i = getEnvStrings(); + C[e >> 2] = i.length; + var a = 0; + i.forEach((e) => (a += e.length + 1)); + C[t >> 2] = a; + return 0; + }, + e: (e, t, i, a) => { + for (var s = 0, r = 0; r < i; r++) { + var n = C[t >> 2], + o = C[(t + 4) >> 2]; + t += 8; + for (var g = 0; g < o; g++) printChar(e, l[n + g]); + s += o; + } + C[a >> 2] = s; + return 0; + }, + g: function _jsPrintWarning(e) { + const t = UTF8ToString(e); + (a.warn || console.warn)(`OpenJPEG: ${t}`); + }, + h: function _setImageData(e, t) { + a.imageData = new Uint8ClampedArray(a.HEAPU8.subarray(e, e + t)); + }, + a: function _storeErrorMessage(e) { + const t = UTF8ToString(e); + a.errorMessages + ? (a.errorMessages += "\n" + t) + : (a.errorMessages = t); + }, + }, + G = (function createWasm() { + var e = (function getWasmImports() { + return { a: N }; + })(); + function receiveInstance(e, t) { + G = e.exports; + c = G.i; + updateMemoryViews(); + !(function addOnInit(e) { + f.unshift(e); + })(G.j); + !(function removeRunDependency(e) { + m--; + a.monitorRunDependencies?.(m); + if (0 == m) { + if (null !== y) { + clearInterval(y); + y = null; + } + if (w) { + var t = w; + w = null; + t(); + } + } + })(); + return G; + } + !(function addRunDependency(e) { + m++; + a.monitorRunDependencies?.(m); + })(); + if (a.instantiateWasm) + try { + return a.instantiateWasm(e, receiveInstance); + } catch (e) { + E(`Module.instantiateWasm callback failed with error: ${e}`); + i(e); + } + u || + (u = + "data:application/octet-stream;base64,AGFzbQEAAAABzgEaYAN/f38Bf2AEf39/fwF/YAF/AGACf38AYAF/AX9gA39/fwBgAn9/AX9gBH9/f38AYAN/fn8BfmACfn8Bf2AFf39/f38Bf2ACfn8BfmADf35/AX9gAAF/YAd/f39/f39/AX9gBX9/f39/AGAJf39/f39/f39/AX9gC39/f39/f39/f39/AX9gBn9/f39/fwF/YAZ/fH9/f38Bf2AIf39/f39/f38AYAh/f39/f39/fwF/YAAAYAZ/f39/f38AYAd/f39/f39/AGACfH8BfAIxCAFhAWEAAgFhAWIABAFhAWMABgFhAWQABgFhAWUAAQFhAWYABQFhAWcAAgFhAWgAAwO+AbwBBwIFAAYEAAUGBQEEDwUEFAIGAgYCAgAQEQQCCRICBQICAgQHBAINDAYCFQMHAAAEAwEWCgoDAAoGAQQEBQUNDgEBAwADBgIQBBcYAgcGAwcHAQECAAQEGQYHBA4PAAQCAgIABgAGAQEBAQEBAQEAAAAAAAYDAgICAwMDAwMAAxMIBA0AAwMABAgJCwgAAAEBAQEBAQEBDAEABAQFCg4BEhEBAAAGAwMBBQUFBQUFBQUBCwEBAQEBAQEBAQkEBQFwAWxsBQcBAYICgIACBggBfwFBgNgFCwcbBgFpAgABagA6AWsAjwEBbAAJAW0BAAFuAI4BCbIBAQBBAQtrSsMBuQFsbC+eAZMBkAGEAYMBggGBAYABf359S3p5eHd2dXRzcnFwb27CAcEBwAG/Ab4BvQE5vAG7ATk5ugG4AbcBtgG1AbQBswGyAbEBsAGqAZ8BnQGcAZsBmgGZAZgBlwGWAZUBl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gLyAvKAIAICAoAgBBAXRBAmpBAnVrNgIAICMgIygCACAfKAIAQQF0QQJqQQJ1azYCACBDKAIAIgcLIQEgPSA9KAIAIAEgB2pBAmpBAnVrNgIAIBUhBiAQIgEiByAPSARAA0AgFCABQQV0aiIHIAf9AAIAIDYgBkEFdGr9AAIAIAf9AAIQ/a4B/QwCAAAAAgAAAAIAAAACAAAA/a4BQQL9rAH9sQH9CwIAIAEiBkEBaiIBIA9HDQALIA8hBwsgByAbTg0AA0AgB0EDdCEBIAcgLEghBgJAIAdBAEwEQCA2KAIAIQogB0EATgRAIBQgAUECdCIBaiIyIDIoAgAgCiABIDZqIEUgBhsoAgBqQQJqQQJ1azYCACABICRqIgogCigCACAgKAIAIAEgIGogPCAGGygCAGpBAmpBAnVrNgIAIAEgKmoiCiAKKAIAIB8oAgAgASAfaiA6IAYbKAIAakECakECdWs2AgAgQygCACABIENqICYgBhsoAgBqQQJqIQYgASApaiEBDAILIBQgAUECdCIBaiIGIAYoAgAgCkEBdEECakECdWs2AgAgASAkaiIGIAYoAgAgFCgCFEEBdEECakECdWs2AgAgASAqaiIGIAYoAgAgFCgCGEEBdEECakECdWs2AgAgASApaiEBIBQoAhxBAXRBAmohBgwBCyAUIAcgLCAGG0EDdEEEa0ECdCIKaigCACEyIAZFBEAgFCABQQJ0IgFqIgYgBigCACAyIEUoAgBqQQJqQQJ1azYCACABICRqIgYgBigCACAKICRqKAIAIDwoAgBqQQJqQQJ1azYCACABICpqIgYgBigCACAKICpqKAIAIDooAgBqQQJqQQJ1azYCACABIClqIQEgCiApaigCACAmKAIAakECaiEGDAELIBQgAUECdCIBaiIGIAYoAgAgMiAGKAIQakECakECdWs2AgAgASAkaiIGIAYoAgAgCiAkaigCACAGKAIQakECakECdWs2AgAgASAqaiIGIAYoAgAgCiAqaigCACAGKAIQakECakECdWs2AgAgCiApaigCACABIClqIgEoAhBqQQJqIQYLIAEgASgCACAGQQJ1azYCACAHQQFqIgcgG0cNAAsLIA4gHE4NACAM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FqIgIgA0cNAAsgACgCnAEFIAELEAkgAEEANgKcAQsgACgCdCIBBEAgACgCcCICBEBBACEBA0AgACgCdCABQQN0aigCACIDBEAgAxAJIAAoAnAhAgsgAUEBaiIBIAJJDQALIAAoAnQhAQsgAEEANgJwIAEQCSAAQQA2AnQLIAAoAogBEAkgAEEANgJ4IABBADYCiAEgACgCZBAJIABBADYCZCAALQC8AUECcUUEQCAAKAKoARAJCyAAQdAAakEAQfAAEA4aIAAoAsABEC0gAEEANgLAASAAKALEARAtIABBADYCwAEgACgCyAEiAQRAIAEoAhwiAgRAIAIQCSABQQA2AhwLIAEoAigiAgRAIAEoAiQEQANAIAIgBUEobCIDaigCJCIEBEAgBBAJIAEoAigiAiADakEANgIkCyACIANqKAIQIgQEQCAEEAkgASgCKCICIANqQQA2AhALIAIgA2ooAhgiBARAIAQQCSABKAIoIgIgA2pBADYCGAsgBUEBaiIFIAEoAiRJDQALCyACEAkgAUEANgIoCyABEAkLIABBADYCyAEgACgCSBAYIABBADYCSCAAKAJMEBggAEEANgJMIAAoAtQBIgMEQAJAIAMoAghFDQAgAygCDARAIANBADYCKANAIAMoAhhBAEoNAAsLIANBATYCECADKAIAEAkgAygCHCICRQ0AA0AgAigCBCEBIAIQCSADIAE2AhwgASICDQALCyADKAIkIgIEQCACKAIEIgVBAEoEQEEAIQEDQCACKAIAIAFBDGxqIgQoAggiBgRAIAQoAgQgBhECACACKAIEIQULIAFBAWoiASAFSA0ACwsgAigCABAJIAIQCQsgAxAJCyAAQQA2AtQBIAAQCQsL5gMCCH8EfiAAKAIUKAIAKAIUIAFBzABsaiIJKAIMIgggACgCGCgCGCABQTRsaiIKNQIEIhBCAX0iEiAANQI8fCAQgKciCyAIIAtJGyEMIAkoAggiCCAKNQIAIhFCAX0iEyAANQI4fCARgKciCiAIIApJGyEKIAkoAgQiCCASIAA1AjR8IBCApyILIAggC0sbIQsgCSgCACIIIBMgADUCMHwgEYCnIg0gCCANSxshDUEAIQggACgCICgC0CsgAUG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AggDkECdCICaigCACIJQQBMDQAgCUEBayEMQQAhBwJAIAhBgAFqIAJqKAIAIgJBAEwEQEEAIQUgCUEBRwRAIAlB/v///wdxIQoDQCAFIAxGIQ8gBUECaiEFIAEgBCAPGyIEIQEgB0ECaiIHIApHDQALCyAJQQFxDQEgBCEBDAILA0AgBCEFIAIhBANAAkAgACABNgIAIARBAUYEQCAAQRBqIQAgAUEQaiEBDAELIAAgATYCECABQRBqIQEgAEEgaiEAIARBAkohECAEQQJrIQQgEA0BCwsgASAFIAJBBHRqIAcgByAMRnJBAXEiChshBCABIAUgChshASAHQQFqIgcgCUcNAAsMAQsgASAEIAJBBHRqIAUgBSAMRnJBAXEiBRshESABIAQgBRshASARIQQLIA5BAWoiDiANRw0ACwsgAEEANgIAAkAgC0UNACALQQRPBEAgC0F8cSEAQQAhAQNAIANBADYCPCADQucHNwI0IANBADYCLCADQucHNwIkIANBADYCHCADQucHNwIUIANBADYCDCADQucHNwIEIANBQGshAyABQQRqIgEgAEcNAAsLIAtBA3EiAEUNAEEAIQEDQCADQQA2AgwgA0LnBzcCBCADQRBqIQMgAUEBaiIBIABHDQALCyAGCyESIAhBgAJqJAAgEgtTAQF/An8gAC0ADEH/AUYEQCAAQoD+g4DwADcCDEEAIAAoAggiASAAKAIETw0BGiAAIAFBAWo2AgggACABLQAAQYD+A3I2AgwLIABBADYCEEEBCwtJAQF/AkBBAUEsEAwiAQRAIAFBADYCEAJAIABBAEwEQCABQQFBCBAMIgA2AiQgAEUNAQwDCyABQQA2AgwLIAEQCQtBACEBCyABC34CAX8BfiAAvSIDQjSIp0H/D3EiAkH/D0cEfCACRQRAIAEgAEQAAAAAAAAAAGEEf0EABSAARAAAAAAAAPBDoiABEF8hACABKAIAQUBqCzYCACAADwsgASACQf4HazYCACADQv////////+HgH+DQoCAgICAgIDwP4S/BSAACwuRAgAgAEUEQEEADwsCfwJAIAFB/wBNDQACQEGUzwEoAgAoAgBFBEAgAUGAf3FBgL8DRg0CDAELIAFB/w9NBEAgACABQT9xQYABcjoAASAAIAFBBnZBwAFyOgAAQQIMAwsgAUGAQHFBgMADRyABQYCwA09xRQRAIAAgAUE/cUGAAXI6AAIgACABQQx2QeABcjoAACAAIAFBBnZBP3FBgAFyOgABQQMMAwsgAUGAgARrQf//P00EQCAAIAFBP3FBgAFyOgADIAAgAUESdkHwAXI6AAAgACABQQZ2QT9xQYABcjoAAiAAIAFBDHZBP3FBgAFyOgABQQQMAwsLQZTGAUEZNgIAQX8MAQsgACABOgAAQQELC7wCAAJAAkACQAJAAkACQAJAAkACQAJAAkAgAUEJaw4SAAgJCggJAQIDBAoJCgoICQUGBwsgAiACKAIAIgFBBGo2AgAgACABKAIANgIADwsgAiACKAIAIgFBBGo2AgAgACABMgEANwMADwsgAiACKAIAIgFBBGo2AgAgACABMwEANwMADwsgAiACKAIAIgFBBGo2AgAgACABMAAANwMADwsgAiACKAIAIgFBBGo2AgAgACABMQAANwMADwsgAiACKAIAQQdqQXhxIgFBCGo2AgAgACABKwMAOQMADwsgACACIAMRAwALDwsgAiACKAIAIgFBBGo2AgAgACABNAIANwMADwsgAiACKAIAIgFBBGo2AgAgACABNQIANwMADwsgAiACKAIAQQdqQXhxIgFBCGo2AgAgACABKQMANwMAC3MBBn8gACgCACIDLAAAQTBrIgFBCUsEQEEADwsDQEF/IQQgAkHMmbPmAE0EQEF/IAEgAkEKbCIFaiABIAVB/////wdzSxshBAsgACADQQFqIgU2AgAgAywAASEGIAQhAiAFIQMgBkEwayIBQQpJDQALIAILtBQCFX8BfiMAQUBqIggkACAIIAE2AjwgCEEnaiEWIAhBKGohEQJAAkACQAJAA0BBACEHA0AgASENIAcgDkH/////B3NKDQIgByAOaiEOAkACQAJAAkAgASIHLQAAIgsEQANAAkACQCALQf8BcSIBRQRAIAchAQwBCyABQSVHDQEgByELA0AgCy0AAUElRwRAIAshAQwCCyAHQQFqIQcgCy0AAiEZIAtBAmoiASELIBlBJUYNAAsLIAcgDWsiByAOQf////8HcyIXSg0JIAAE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ACELIAEpAwAhAyABKQMIIQcjAEEgayIIJAAgB0L///////8/gyEEAn4gB0IwiEL//wGDIgWnIgpBgfgAa0H9D00EQCAEQgSGIANCPIiEIQIgCkGA+ABrrSEFAkAgA0L//////////w+DIgNCgYCAgICAgIAIWgRAIAJCAXwhAgwBCyADQoCAgICAgICACFINACACQgGDIAJ8IQILQgAgAiACQv////////8HViIAGyECIACtIAV8DAELAkAgAyAEhFANACAFQv//AVINACAEQgSGIANCPIiEQoCAgICAgIAEhCECQv8PDAELQv8PIApB/ocBSw0AGkIAQYD4AEGB+AAgBVAiARsiACAKayIJQfAASg0AGiADIQIgBCAEQoCAgICAgMAAhCABGyIGIQQCQEGAASAJayIBQcAAcQRAIAMgAUFAaq2GIQRCACECDAELIAFFDQAgBCABrSIFhiACQcAAIAFrrYiEIQQgAiAFhiECCyAIIAI3AxAgCCAENwMYAkAgCUHAAHEEQCAGIAlBQGqtiCEDQgAhBgwBCyAJRQ0AIAZBwAAgCWuthiADIAmtIgKIhCEDIAYgAoghBgsgCCADNwMAIAggBjcDCCAIKQMIQgSGIAgpAwAiAkI8iIQhAwJAIAAgCkcgCCkDECAIKQMYhEIAUnGtIAJC//////////8Pg4QiAkKBgICAgICAgAhaBEAgA0IBfCEDDAELIAJCgICAgICAgIAIUg0AIANCAYMgA3whAwsgA0KAgICAgICACIUgAyADQv////////8HViIAGyECIACtCyEDIAhBIGokACALIAdCgICAgICAgICAf4MgA0I0hoQgAoS/OQMAC4MYAxN/AXwDfiMAQbAEayIMJAAgDEEANgIsAkAgAb0iGkIAUwRAQQEhEUG6CCETIAGaIgG9IRoMAQsgBEGAEHEEQEEBIRFBvQghEwwBC0HACEG7CCAEQQFxIhEbIRMgEUUhFQsCQCAaQoCAgICAgID4/wCDQoCAgICAgID4/wBRBEAgAEEgIAIgEUEDaiIDIARB//97cRAUIAAgEyAREBEgAEG3CUH2CiAFQSBxIgUbQaAKQfoKIAUbIAEgAWIbQQMQESAAQSAgAiADIARBgMAAcxAUI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AAAAAAAAGQAKChkZGQMKBwABAAkLGAAACQYLAAALAAYZAAAAGRkZAEHhwQELIQ4AAAAAAAAAABkACw0ZGRkADQAAAgAJDgAAAAkADgAADgBBm8IBCwEMAEGnwgELFRMAAAAAEwAAAAAJDAAAAAAADAAADABB1cIBCwEQAEHhwgELFQ8AAAAEDwAAAAAJEAAAAAAAEAAAEABBj8MBCwESAEGbwwELHhEAAAAAEQAAAAAJEgAAAAAAEgAAEgAAGgAAABoaGgBB0sMBCw4aAAAAGhoaAAAAAAAACQBBg8QBCwEUAEGPxAELFRcAAAAAFwAAAAAJFAAAAAAAFAAAFABBvcQBCwEWAEHJxAELJxUAAAAAFQAAAAAJFgAAAAAAFgAAFgAAMDEyMzQ1Njc4OUFCQ0RFRgBB8cQBCwhsAQAAAAAABQBBhMUBCwFpAEGcxQELDmoAAABrAAAA+GcAAAAEAEG0xQELAQEAQcTFAQsF/////wo="); + return receiveInstance(instantiateSync(u, e)[0]); + })(); + G.j, + (a._malloc = G.k), + (a._free = G.l), + (a._jp2_decode = G.n), + G._emscripten_stack_restore, + G._emscripten_stack_alloc, + G.emscripten_stack_get_current; + w = function runCaller() { + D || run(); + D || (w = runCaller); + }; + function run() { + if (!(m > 0)) { + !(function preRun() { + if (a.preRun) { + "function" == typeof a.preRun && (a.preRun = [a.preRun]); + for (; a.preRun.length; ) (e = a.preRun.shift()), d.unshift(e); + } + var e; + callRuntimeCallbacks(d); + })(); + if (!(m > 0)) + if (a.setStatus) { + a.setStatus("Running..."); + setTimeout(function () { + setTimeout(function () { + a.setStatus(""); + }, 1); + doRun(); + }, 1); + } else doRun(); + } + function doRun() { + if (!D) { + D = !0; + a.calledRun = !0; + !(function initRuntime() { + callRuntimeCallbacks(f); + })(); + t(a); + a.onRuntimeInitialized && a.onRuntimeInitialized(); + !(function postRun() { + if (a.postRun) { + "function" == typeof a.postRun && (a.postRun = [a.postRun]); + for (; a.postRun.length; ) + (e = a.postRun.shift()), p.unshift(e); + } + var e; + callRuntimeCallbacks(p); + })(); + } + } + } + if (a.preInit) { + "function" == typeof a.preInit && (a.preInit = [a.preInit]); + for (; a.preInit.length > 0; ) a.preInit.pop()(); + } + run(); + return a; + }); +const Ii = gi; +class JpxError extends rt { + constructor(e) { + super(e, "JpxError"); + } +} +class JpxImage { + static #y = null; + static decode(e, t = !1) { + this.#y ||= Ii({ warn }); + const i = this.#y.decode(e, t); + if ("string" == typeof i) throw new JpxError(i); + return i; + } + static cleanup() { + this.#y = null; + } + static parseImageProperties(e) { + let t = e.getByte(); + for (; t >= 0; ) { + const i = t; + t = e.getByte(); + if (65361 === ((i << 8) | t)) { + e.skip(4); + const t = e.getInt32() >>> 0, + i = e.getInt32() >>> 0, + a = e.getInt32() >>> 0, + s = e.getInt32() >>> 0; + e.skip(16); + return { + width: t - a, + height: i - s, + bitsPerComponent: 8, + componentsCount: e.getUint16(), + }; + } + } + throw new JpxError("No size marker found in JPX stream"); + } +} +class JpxStream extends DecodeStream { + constructor(e, t, i) { + super(t); + this.stream = e; + this.dict = e.dict; + this.maybeLength = t; + this.params = i; + } + get bytes() { + return shadow(this, "bytes", this.stream.getBytes(this.maybeLength)); + } + ensureBuffer(e) {} + readBlock(e) { + if (!this.eof) { + this.buffer = JpxImage.decode(this.bytes, e); + this.bufferLength = this.buffer.length; + this.eof = !0; + } + } +} +class LZWStream extends DecodeStream { + constructor(e, t, i) { + super(t); + this.str = e; + this.dict = e.dict; + this.cachedData = 0; + this.bitsCached = 0; + const a = 4096, + s = { + earlyChange: i, + codeLength: 9, + nextCode: 258, + dictionaryValues: new Uint8Array(a), + dictionaryLengths: new Uint16Array(a), + dictionaryPrevCodes: new Uint16Array(a), + currentSequence: new Uint8Array(a), + currentSequenceLength: 0, + }; + for (let e = 0; e < 256; ++e) { + s.dictionaryValues[e] = e; + s.dictionaryLengths[e] = 1; + } + this.lzwState = s; + } + readBits(e) { + let t = this.bitsCached, + i = this.cachedData; + for (; t < e; ) { + const e = this.str.getByte(); + if (-1 === e) { + this.eof = !0; + return null; + } + i = (i << 8) | e; + t += 8; + } + this.bitsCached = t -= e; + this.cachedData = i; + this.lastCode = null; + return (i >>> t) & ((1 << e) - 1); + } + readBlock() { + let e, + t, + i, + a = 1024; + const s = this.lzwState; + if (!s) return; + const r = s.earlyChange; + let n = s.nextCode; + const o = s.dictionaryValues, + g = s.dictionaryLengths, + c = s.dictionaryPrevCodes; + let h = s.codeLength, + l = s.prevCode; + const C = s.currentSequence; + let Q = s.currentSequenceLength, + E = 0, + u = this.bufferLength, + d = this.ensureBuffer(this.bufferLength + a); + for (e = 0; e < 512; e++) { + const e = this.readBits(h), + s = Q > 0; + if (e < 256) { + C[0] = e; + Q = 1; + } else { + if (!(e >= 258)) { + if (256 === e) { + h = 9; + n = 258; + Q = 0; + continue; + } + this.eof = !0; + delete this.lzwState; + break; + } + if (e < n) { + Q = g[e]; + for (t = Q - 1, i = e; t >= 0; t--) { + C[t] = o[i]; + i = c[i]; + } + } else C[Q++] = C[0]; + } + if (s) { + c[n] = l; + g[n] = g[l] + 1; + o[n] = C[0]; + n++; + h = + (n + r) & (n + r - 1) + ? h + : 0 | Math.min(Math.log(n + r) / 0.6931471805599453 + 1, 12); + } + l = e; + E += Q; + if (a < E) { + do { + a += 512; + } while (a < E); + d = this.ensureBuffer(this.bufferLength + a); + } + for (t = 0; t < Q; t++) d[u++] = C[t]; + } + s.nextCode = n; + s.codeLength = h; + s.prevCode = l; + s.currentSequenceLength = Q; + this.bufferLength = u; + } +} +class PredictorStream extends DecodeStream { + constructor(e, t, i) { + super(t); + if (!(i instanceof Dict)) return e; + const a = (this.predictor = i.get("Predictor") || 1); + if (a <= 1) return e; + if (2 !== a && (a < 10 || a > 15)) + throw new FormatError(`Unsupported predictor: ${a}`); + this.readBlock = 2 === a ? this.readBlockTiff : this.readBlockPng; + this.str = e; + this.dict = e.dict; + const s = (this.colors = i.get("Colors") || 1), + r = (this.bits = i.get("BPC", "BitsPerComponent") || 8), + n = (this.columns = i.get("Columns") || 1); + this.pixBytes = (s * r + 7) >> 3; + this.rowBytes = (n * s * r + 7) >> 3; + return this; + } + readBlockTiff() { + const e = this.rowBytes, + t = this.bufferLength, + i = this.ensureBuffer(t + e), + a = this.bits, + s = this.colors, + r = this.str.getBytes(e); + this.eof = !r.length; + if (this.eof) return; + let n, + o = 0, + g = 0, + c = 0, + h = 0, + l = t; + if (1 === a && 1 === s) + for (n = 0; n < e; ++n) { + let e = r[n] ^ o; + e ^= e >> 1; + e ^= e >> 2; + e ^= e >> 4; + o = (1 & e) << 7; + i[l++] = e; + } + else if (8 === a) { + for (n = 0; n < s; ++n) i[l++] = r[n]; + for (; n < e; ++n) { + i[l] = i[l - s] + r[n]; + l++; + } + } else if (16 === a) { + const t = 2 * s; + for (n = 0; n < t; ++n) i[l++] = r[n]; + for (; n < e; n += 2) { + const e = + ((255 & r[n]) << 8) + + (255 & r[n + 1]) + + ((255 & i[l - t]) << 8) + + (255 & i[l - t + 1]); + i[l++] = (e >> 8) & 255; + i[l++] = 255 & e; + } + } else { + const e = new Uint8Array(s + 1), + l = (1 << a) - 1; + let C = 0, + Q = t; + const E = this.columns; + for (n = 0; n < E; ++n) + for (let t = 0; t < s; ++t) { + if (c < a) { + o = (o << 8) | (255 & r[C++]); + c += 8; + } + e[t] = (e[t] + (o >> (c - a))) & l; + c -= a; + g = (g << a) | e[t]; + h += a; + if (h >= 8) { + i[Q++] = (g >> (h - 8)) & 255; + h -= 8; + } + } + h > 0 && (i[Q++] = (g << (8 - h)) + (o & ((1 << (8 - h)) - 1))); + } + this.bufferLength += e; + } + readBlockPng() { + const e = this.rowBytes, + t = this.pixBytes, + i = this.str.getByte(), + a = this.str.getBytes(e); + this.eof = !a.length; + if (this.eof) return; + const s = this.bufferLength, + r = this.ensureBuffer(s + e); + let n = r.subarray(s - e, s); + 0 === n.length && (n = new Uint8Array(e)); + let o, + g, + c, + h = s; + switch (i) { + case 0: + for (o = 0; o < e; ++o) r[h++] = a[o]; + break; + case 1: + for (o = 0; o < t; ++o) r[h++] = a[o]; + for (; o < e; ++o) { + r[h] = (r[h - t] + a[o]) & 255; + h++; + } + break; + case 2: + for (o = 0; o < e; ++o) r[h++] = (n[o] + a[o]) & 255; + break; + case 3: + for (o = 0; o < t; ++o) r[h++] = (n[o] >> 1) + a[o]; + for (; o < e; ++o) { + r[h] = (((n[o] + r[h - t]) >> 1) + a[o]) & 255; + h++; + } + break; + case 4: + for (o = 0; o < t; ++o) { + g = n[o]; + c = a[o]; + r[h++] = g + c; + } + for (; o < e; ++o) { + g = n[o]; + const e = n[o - t], + i = r[h - t], + s = i + g - e; + let l = s - i; + l < 0 && (l = -l); + let C = s - g; + C < 0 && (C = -C); + let Q = s - e; + Q < 0 && (Q = -Q); + c = a[o]; + r[h++] = l <= C && l <= Q ? i + c : C <= Q ? g + c : e + c; + } + break; + default: + throw new FormatError(`Unsupported predictor: ${i}`); + } + this.bufferLength += e; + } +} +class RunLengthStream extends DecodeStream { + constructor(e, t) { + super(t); + this.str = e; + this.dict = e.dict; + } + readBlock() { + const e = this.str.getBytes(2); + if (!e || e.length < 2 || 128 === e[0]) { + this.eof = !0; + return; + } + let t, + i = this.bufferLength, + a = e[0]; + if (a < 128) { + t = this.ensureBuffer(i + a + 1); + t[i++] = e[1]; + if (a > 0) { + const e = this.str.getBytes(a); + t.set(e, i); + i += a; + } + } else { + a = 257 - a; + const s = e[1]; + t = this.ensureBuffer(i + a + 1); + for (let e = 0; e < a; e++) t[i++] = s; + } + this.bufferLength = i; + } +} +class Parser { + constructor({ + lexer: e, + xref: t, + allowStreams: i = !1, + recoveryMode: a = !1, + }) { + this.lexer = e; + this.xref = t; + this.allowStreams = i; + this.recoveryMode = a; + this.imageCache = Object.create(null); + this._imageId = 0; + this.refill(); + } + refill() { + this.buf1 = this.lexer.getObj(); + this.buf2 = this.lexer.getObj(); + } + shift() { + if (this.buf2 instanceof Cmd && "ID" === this.buf2.cmd) { + this.buf1 = this.buf2; + this.buf2 = null; + } else { + this.buf1 = this.buf2; + this.buf2 = this.lexer.getObj(); + } + } + tryShift() { + try { + this.shift(); + return !0; + } catch (e) { + if (e instanceof MissingDataException) throw e; + return !1; + } + } + getObj(e = null) { + const t = this.buf1; + this.shift(); + if (t instanceof Cmd) + switch (t.cmd) { + case "BI": + return this.makeInlineImage(e); + case "[": + const i = []; + for (; !isCmd(this.buf1, "]") && this.buf1 !== pt; ) + i.push(this.getObj(e)); + if (this.buf1 === pt) { + if (this.recoveryMode) return i; + throw new ParserEOFException("End of file inside array."); + } + this.shift(); + return i; + case "<<": + const a = new Dict(this.xref); + for (; !isCmd(this.buf1, ">>") && this.buf1 !== pt; ) { + if (!(this.buf1 instanceof Name)) { + info("Malformed dictionary: key must be a name object"); + this.shift(); + continue; + } + const t = this.buf1.name; + this.shift(); + if (this.buf1 === pt) break; + a.set(t, this.getObj(e)); + } + if (this.buf1 === pt) { + if (this.recoveryMode) return a; + throw new ParserEOFException("End of file inside dictionary."); + } + if (isCmd(this.buf2, "stream")) + return this.allowStreams ? this.makeStream(a, e) : a; + this.shift(); + return a; + default: + return t; + } + if (Number.isInteger(t)) { + if (Number.isInteger(this.buf1) && isCmd(this.buf2, "R")) { + const e = Ref.get(t, this.buf1); + this.shift(); + this.shift(); + return e; + } + return t; + } + return "string" == typeof t && e ? e.decryptString(t) : t; + } + findDefaultInlineStreamEnd(e) { + const { knownCommands: t } = this.lexer, + i = e.pos; + let a, + s, + r = 0; + for (; -1 !== (a = e.getByte()); ) + if (0 === r) r = 69 === a ? 1 : 0; + else if (1 === r) r = 73 === a ? 2 : 0; + else if (32 === a || 10 === a || 13 === a) { + s = e.pos; + const i = e.peekBytes(15), + n = i.length; + if (0 === n) break; + for (let e = 0; e < n; e++) { + a = i[e]; + if ( + (0 !== a || 0 === i[e + 1]) && + 10 !== a && + 13 !== a && + (a < 32 || a > 127) + ) { + r = 0; + break; + } + } + if (2 !== r) continue; + if (!t) { + warn( + "findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.", + ); + continue; + } + const o = new Lexer(new Stream(i.slice()), t); + o._hexStringWarn = () => {}; + let g = 0; + for (;;) { + const e = o.getObj(); + if (e === pt) { + r = 0; + break; + } + if (e instanceof Cmd) { + const i = t[e.cmd]; + if (!i) { + r = 0; + break; + } + if (i.variableArgs ? g <= i.numArgs : g === i.numArgs) break; + g = 0; + } else g++; + } + if (2 === r) break; + } else r = 0; + if (-1 === a) { + warn( + "findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker", + ); + if (s) { + warn('... trying to recover by using the last "EI" occurrence.'); + e.skip(-(e.pos - s)); + } + } + let n = 4; + e.skip(-n); + a = e.peekByte(); + e.skip(n); + isWhiteSpace(a) || n--; + return e.pos - n - i; + } + findDCTDecodeInlineStreamEnd(e) { + const t = e.pos; + let i, + a, + s = !1; + for (; -1 !== (i = e.getByte()); ) + if (255 === i) { + switch (e.getByte()) { + case 0: + break; + case 255: + e.skip(-1); + break; + case 217: + s = !0; + break; + case 192: + case 193: + case 194: + case 195: + case 197: + case 198: + case 199: + case 201: + case 202: + case 203: + case 205: + case 206: + case 207: + case 196: + case 204: + case 218: + case 219: + case 220: + case 221: + case 222: + case 223: + case 224: + case 225: + case 226: + case 227: + case 228: + case 229: + case 230: + case 231: + case 232: + case 233: + case 234: + case 235: + case 236: + case 237: + case 238: + case 239: + case 254: + a = e.getUint16(); + a > 2 ? e.skip(a - 2) : e.skip(-2); + } + if (s) break; + } + const r = e.pos - t; + if (-1 === i) { + warn( + "Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead.", + ); + e.skip(-r); + return this.findDefaultInlineStreamEnd(e); + } + this.inlineStreamSkipEI(e); + return r; + } + findASCII85DecodeInlineStreamEnd(e) { + const t = e.pos; + let i; + for (; -1 !== (i = e.getByte()); ) + if (126 === i) { + const t = e.pos; + i = e.peekByte(); + for (; isWhiteSpace(i); ) { + e.skip(); + i = e.peekByte(); + } + if (62 === i) { + e.skip(); + break; + } + if (e.pos > t) { + const t = e.peekBytes(2); + if (69 === t[0] && 73 === t[1]) break; + } + } + const a = e.pos - t; + if (-1 === i) { + warn( + "Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead.", + ); + e.skip(-a); + return this.findDefaultInlineStreamEnd(e); + } + this.inlineStreamSkipEI(e); + return a; + } + findASCIIHexDecodeInlineStreamEnd(e) { + const t = e.pos; + let i; + for (; -1 !== (i = e.getByte()) && 62 !== i; ); + const a = e.pos - t; + if (-1 === i) { + warn( + "Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead.", + ); + e.skip(-a); + return this.findDefaultInlineStreamEnd(e); + } + this.inlineStreamSkipEI(e); + return a; + } + inlineStreamSkipEI(e) { + let t, + i = 0; + for (; -1 !== (t = e.getByte()); ) + if (0 === i) i = 69 === t ? 1 : 0; + else if (1 === i) i = 73 === t ? 2 : 0; + else if (2 === i) break; + } + makeInlineImage(e) { + const t = this.lexer, + i = t.stream, + a = Object.create(null); + let s; + for (; !isCmd(this.buf1, "ID") && this.buf1 !== pt; ) { + if (!(this.buf1 instanceof Name)) + throw new FormatError("Dictionary key must be a name object"); + const t = this.buf1.name; + this.shift(); + if (this.buf1 === pt) break; + a[t] = this.getObj(e); + } + -1 !== t.beginInlineImagePos && (s = i.pos - t.beginInlineImagePos); + const r = this.xref.fetchIfRef(a.F || a.Filter); + let n; + if (r instanceof Name) n = r.name; + else if (Array.isArray(r)) { + const e = this.xref.fetchIfRef(r[0]); + e instanceof Name && (n = e.name); + } + const o = i.pos; + let g, c; + switch (n) { + case "DCT": + case "DCTDecode": + g = this.findDCTDecodeInlineStreamEnd(i); + break; + case "A85": + case "ASCII85Decode": + g = this.findASCII85DecodeInlineStreamEnd(i); + break; + case "AHx": + case "ASCIIHexDecode": + g = this.findASCIIHexDecodeInlineStreamEnd(i); + break; + default: + g = this.findDefaultInlineStreamEnd(i); + } + if (g < 1e3 && s > 0) { + const e = i.pos; + i.pos = t.beginInlineImagePos; + c = (function getInlineImageCacheKey(e) { + const t = [], + i = e.length; + let a = 0; + for (; a < i - 1; ) t.push((e[a++] << 8) | e[a++]); + a < i && t.push(e[a]); + return i + "_" + String.fromCharCode.apply(null, t); + })(i.getBytes(s + g)); + i.pos = e; + const a = this.imageCache[c]; + if (void 0 !== a) { + this.buf2 = Cmd.get("EI"); + this.shift(); + a.reset(); + return a; + } + } + const h = new Dict(this.xref); + for (const e in a) h.set(e, a[e]); + let l = i.makeSubStream(o, g, h); + e && (l = e.createStream(l, g)); + l = this.filter(l, h, g); + l.dict = h; + if (void 0 !== c) { + l.cacheKey = "inline_img_" + ++this._imageId; + this.imageCache[c] = l; + } + this.buf2 = Cmd.get("EI"); + this.shift(); + return l; + } + #w(e) { + const { stream: t } = this.lexer; + t.pos = e; + const i = new Uint8Array([101, 110, 100]), + a = i.length, + s = [ + new Uint8Array([115, 116, 114, 101, 97, 109]), + new Uint8Array([115, 116, 101, 97, 109]), + new Uint8Array([115, 116, 114, 101, 97]), + ], + r = 9 - a; + for (; t.pos < t.end; ) { + const n = t.peekBytes(2048), + o = n.length - 9; + if (o <= 0) break; + let g = 0; + for (; g < o; ) { + let o = 0; + for (; o < a && n[g + o] === i[o]; ) o++; + if (o >= a) { + let a = !1; + for (const e of s) { + const t = e.length; + let s = 0; + for (; s < t && n[g + o + s] === e[s]; ) s++; + if (s >= r) { + a = !0; + break; + } + if (s >= t) { + if (isWhiteSpace(n[g + o + s])) { + info( + `Found "${bytesToString([...i, ...e])}" when searching for endstream command.`, + ); + a = !0; + } + break; + } + } + if (a) { + t.pos += g; + return t.pos - e; + } + } + g++; + } + t.pos += o; + } + return -1; + } + makeStream(e, t) { + const i = this.lexer; + let a = i.stream; + i.skipToNextLine(); + const s = a.pos - 1; + let r = e.get("Length"); + if (!Number.isInteger(r)) { + info(`Bad length "${r && r.toString()}" in stream.`); + r = 0; + } + a.pos = s + r; + i.nextChar(); + if (this.tryShift() && isCmd(this.buf2, "endstream")) this.shift(); + else { + r = this.#w(s); + if (r < 0) throw new FormatError("Missing endstream command."); + i.nextChar(); + this.shift(); + this.shift(); + } + this.shift(); + a = a.makeSubStream(s, r, e); + t && (a = t.createStream(a, r)); + a = this.filter(a, e, r); + a.dict = e; + return a; + } + filter(e, t, i) { + let a = t.get("F", "Filter"), + s = t.get("DP", "DecodeParms"); + if (a instanceof Name) { + Array.isArray(s) && + warn("/DecodeParms should not be an Array, when /Filter is a Name."); + return this.makeFilter(e, a.name, i, s); + } + let r = i; + if (Array.isArray(a)) { + const t = a, + i = s; + for (let n = 0, o = t.length; n < o; ++n) { + a = this.xref.fetchIfRef(t[n]); + if (!(a instanceof Name)) + throw new FormatError(`Bad filter name "${a}"`); + s = null; + Array.isArray(i) && n in i && (s = this.xref.fetchIfRef(i[n])); + e = this.makeFilter(e, a.name, r, s); + r = null; + } + } + return e; + } + makeFilter(e, t, i, a) { + if (0 === i) { + warn(`Empty "${t}" stream.`); + return new NullStream(); + } + try { + switch (t) { + case "Fl": + case "FlateDecode": + return a + ? new PredictorStream(new FlateStream(e, i), i, a) + : new FlateStream(e, i); + case "LZW": + case "LZWDecode": + let t = 1; + if (a) { + a.has("EarlyChange") && (t = a.get("EarlyChange")); + return new PredictorStream(new LZWStream(e, i, t), i, a); + } + return new LZWStream(e, i, t); + case "DCT": + case "DCTDecode": + return new JpegStream(e, i, a); + case "JPX": + case "JPXDecode": + return new JpxStream(e, i, a); + case "A85": + case "ASCII85Decode": + return new Ascii85Stream(e, i); + case "AHx": + case "ASCIIHexDecode": + return new AsciiHexStream(e, i); + case "CCF": + case "CCITTFaxDecode": + return new CCITTFaxStream(e, i, a); + case "RL": + case "RunLengthDecode": + return new RunLengthStream(e, i); + case "JBIG2Decode": + return new Jbig2Stream(e, i, a); + } + warn(`Filter "${t}" is not supported.`); + return e; + } catch (e) { + if (e instanceof MissingDataException) throw e; + warn(`Invalid stream: "${e}"`); + return new NullStream(); + } + } +} +const ci = [ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +]; +function toHexDigit(e) { + return e >= 48 && e <= 57 + ? 15 & e + : (e >= 65 && e <= 70) || (e >= 97 && e <= 102) + ? 9 + (15 & e) + : -1; +} +class Lexer { + constructor(e, t = null) { + this.stream = e; + this.nextChar(); + this.strBuf = []; + this.knownCommands = t; + this._hexStringNumWarn = 0; + this.beginInlineImagePos = -1; + } + nextChar() { + return (this.currentChar = this.stream.getByte()); + } + peekChar() { + return this.stream.peekByte(); + } + getNumber() { + let e = this.currentChar, + t = !1, + i = 0, + a = 1; + if (45 === e) { + a = -1; + e = this.nextChar(); + 45 === e && (e = this.nextChar()); + } else 43 === e && (e = this.nextChar()); + if (10 === e || 13 === e) + do { + e = this.nextChar(); + } while (10 === e || 13 === e); + if (46 === e) { + i = 10; + e = this.nextChar(); + } + if (e < 48 || e > 57) { + const t = `Invalid number: ${String.fromCharCode(e)} (charCode ${e})`; + if (isWhiteSpace(e) || -1 === e) { + info(`Lexer.getNumber - "${t}".`); + return 0; + } + throw new FormatError(t); + } + let s = e - 48, + r = 0, + n = 1; + for (; (e = this.nextChar()) >= 0; ) + if (e >= 48 && e <= 57) { + const a = e - 48; + if (t) r = 10 * r + a; + else { + 0 !== i && (i *= 10); + s = 10 * s + a; + } + } else if (46 === e) { + if (0 !== i) break; + i = 1; + } else if (45 === e) + warn("Badly formatted number: minus sign in the middle"); + else { + if (69 !== e && 101 !== e) break; + e = this.peekChar(); + if (43 === e || 45 === e) { + n = 45 === e ? -1 : 1; + this.nextChar(); + } else if (e < 48 || e > 57) break; + t = !0; + } + 0 !== i && (s /= i); + t && (s *= 10 ** (n * r)); + return a * s; + } + getString() { + let e = 1, + t = !1; + const i = this.strBuf; + i.length = 0; + let a = this.nextChar(); + for (;;) { + let s = !1; + switch (0 | a) { + case -1: + warn("Unterminated string"); + t = !0; + break; + case 40: + ++e; + i.push("("); + break; + case 41: + if (0 == --e) { + this.nextChar(); + t = !0; + } else i.push(")"); + break; + case 92: + a = this.nextChar(); + switch (a) { + case -1: + warn("Unterminated string"); + t = !0; + break; + case 110: + i.push("\n"); + break; + case 114: + i.push("\r"); + break; + case 116: + i.push("\t"); + break; + case 98: + i.push("\b"); + break; + case 102: + i.push("\f"); + break; + case 92: + case 40: + case 41: + i.push(String.fromCharCode(a)); + break; + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + let e = 15 & a; + a = this.nextChar(); + s = !0; + if (a >= 48 && a <= 55) { + e = (e << 3) + (15 & a); + a = this.nextChar(); + if (a >= 48 && a <= 55) { + s = !1; + e = (e << 3) + (15 & a); + } + } + i.push(String.fromCharCode(e)); + break; + case 13: + 10 === this.peekChar() && this.nextChar(); + break; + case 10: + break; + default: + i.push(String.fromCharCode(a)); + } + break; + default: + i.push(String.fromCharCode(a)); + } + if (t) break; + s || (a = this.nextChar()); + } + return i.join(""); + } + getName() { + let e, t; + const i = this.strBuf; + i.length = 0; + for (; (e = this.nextChar()) >= 0 && !ci[e]; ) + if (35 === e) { + e = this.nextChar(); + if (ci[e]) { + warn( + "Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number.", + ); + i.push("#"); + break; + } + const a = toHexDigit(e); + if (-1 !== a) { + t = e; + e = this.nextChar(); + const s = toHexDigit(e); + if (-1 === s) { + warn( + `Lexer_getName: Illegal digit (${String.fromCharCode(e)}) in hexadecimal number.`, + ); + i.push("#", String.fromCharCode(t)); + if (ci[e]) break; + i.push(String.fromCharCode(e)); + continue; + } + i.push(String.fromCharCode((a << 4) | s)); + } else i.push("#", String.fromCharCode(e)); + } else i.push(String.fromCharCode(e)); + i.length > 127 && + warn(`Name token is longer than allowed by the spec: ${i.length}`); + return Name.get(i.join("")); + } + _hexStringWarn(e) { + 5 != this._hexStringNumWarn++ + ? this._hexStringNumWarn > 5 || + warn(`getHexString - ignoring invalid character: ${e}`) + : warn("getHexString - ignoring additional invalid characters."); + } + getHexString() { + const e = this.strBuf; + e.length = 0; + let t, + i, + a = this.currentChar, + s = !0; + this._hexStringNumWarn = 0; + for (;;) { + if (a < 0) { + warn("Unterminated hex string"); + break; + } + if (62 === a) { + this.nextChar(); + break; + } + if (1 !== ci[a]) { + if (s) { + t = toHexDigit(a); + if (-1 === t) { + this._hexStringWarn(a); + a = this.nextChar(); + continue; + } + } else { + i = toHexDigit(a); + if (-1 === i) { + this._hexStringWarn(a); + a = this.nextChar(); + continue; + } + e.push(String.fromCharCode((t << 4) | i)); + } + s = !s; + a = this.nextChar(); + } else a = this.nextChar(); + } + return e.join(""); + } + getObj() { + let e = !1, + t = this.currentChar; + for (;;) { + if (t < 0) return pt; + if (e) (10 !== t && 13 !== t) || (e = !1); + else if (37 === t) e = !0; + else if (1 !== ci[t]) break; + t = this.nextChar(); + } + switch (0 | t) { + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + case 43: + case 45: + case 46: + return this.getNumber(); + case 40: + return this.getString(); + case 47: + return this.getName(); + case 91: + this.nextChar(); + return Cmd.get("["); + case 93: + this.nextChar(); + return Cmd.get("]"); + case 60: + t = this.nextChar(); + if (60 === t) { + this.nextChar(); + return Cmd.get("<<"); + } + return this.getHexString(); + case 62: + t = this.nextChar(); + if (62 === t) { + this.nextChar(); + return Cmd.get(">>"); + } + return Cmd.get(">"); + case 123: + this.nextChar(); + return Cmd.get("{"); + case 125: + this.nextChar(); + return Cmd.get("}"); + case 41: + this.nextChar(); + throw new FormatError(`Illegal character: ${t}`); + } + let i = String.fromCharCode(t); + if (t < 32 || t > 127) { + const e = this.peekChar(); + if (e >= 32 && e <= 127) { + this.nextChar(); + return Cmd.get(i); + } + } + const a = this.knownCommands; + let s = void 0 !== a?.[i]; + for (; (t = this.nextChar()) >= 0 && !ci[t]; ) { + const e = i + String.fromCharCode(t); + if (s && void 0 === a[e]) break; + if (128 === i.length) + throw new FormatError(`Command token too long: ${i.length}`); + i = e; + s = void 0 !== a?.[i]; + } + if ("true" === i) return !0; + if ("false" === i) return !1; + if ("null" === i) return null; + "BI" === i && (this.beginInlineImagePos = this.stream.pos); + return Cmd.get(i); + } + skipToNextLine() { + let e = this.currentChar; + for (; e >= 0; ) { + if (13 === e) { + e = this.nextChar(); + 10 === e && this.nextChar(); + break; + } + if (10 === e) { + this.nextChar(); + break; + } + e = this.nextChar(); + } + } +} +class Linearization { + static create(e) { + function getInt(e, t, i = !1) { + const a = e.get(t); + if (Number.isInteger(a) && (i ? a >= 0 : a > 0)) return a; + throw new Error( + `The "${t}" parameter in the linearization dictionary is invalid.`, + ); + } + const t = new Parser({ lexer: new Lexer(e), xref: null }), + i = t.getObj(), + a = t.getObj(), + s = t.getObj(), + r = t.getObj(); + let n, o; + if ( + !( + Number.isInteger(i) && + Number.isInteger(a) && + isCmd(s, "obj") && + r instanceof Dict && + "number" == typeof (n = r.get("Linearized")) && + n > 0 + ) + ) + return null; + if ((o = getInt(r, "L")) !== e.length) + throw new Error( + 'The "L" parameter in the linearization dictionary does not equal the stream length.', + ); + return { + length: o, + hints: (function getHints(e) { + const t = e.get("H"); + let i; + if (Array.isArray(t) && (2 === (i = t.length) || 4 === i)) { + for (let e = 0; e < i; e++) { + const i = t[e]; + if (!(Number.isInteger(i) && i > 0)) + throw new Error( + `Hint (${e}) in the linearization dictionary is invalid.`, + ); + } + return t; + } + throw new Error( + "Hint array in the linearization dictionary is invalid.", + ); + })(r), + objectNumberFirst: getInt(r, "O"), + endFirst: getInt(r, "E"), + numPages: getInt(r, "N"), + mainXRefEntriesOffset: getInt(r, "T"), + pageFirst: r.has("P") ? getInt(r, "P", !0) : 0, + }; + } +} +const hi = [ + "Adobe-GB1-UCS2", + "Adobe-CNS1-UCS2", + "Adobe-Japan1-UCS2", + "Adobe-Korea1-UCS2", + "78-EUC-H", + "78-EUC-V", + "78-H", + "78-RKSJ-H", + "78-RKSJ-V", + "78-V", + "78ms-RKSJ-H", + "78ms-RKSJ-V", + "83pv-RKSJ-H", + "90ms-RKSJ-H", + "90ms-RKSJ-V", + "90msp-RKSJ-H", + "90msp-RKSJ-V", + "90pv-RKSJ-H", + "90pv-RKSJ-V", + "Add-H", + "Add-RKSJ-H", + "Add-RKSJ-V", + "Add-V", + "Adobe-CNS1-0", + "Adobe-CNS1-1", + "Adobe-CNS1-2", + "Adobe-CNS1-3", + "Adobe-CNS1-4", + "Adobe-CNS1-5", + "Adobe-CNS1-6", + "Adobe-GB1-0", + "Adobe-GB1-1", + "Adobe-GB1-2", + "Adobe-GB1-3", + "Adobe-GB1-4", + "Adobe-GB1-5", + "Adobe-Japan1-0", + "Adobe-Japan1-1", + "Adobe-Japan1-2", + "Adobe-Japan1-3", + "Adobe-Japan1-4", + "Adobe-Japan1-5", + "Adobe-Japan1-6", + "Adobe-Korea1-0", + "Adobe-Korea1-1", + "Adobe-Korea1-2", + "B5-H", + "B5-V", + "B5pc-H", + "B5pc-V", + "CNS-EUC-H", + "CNS-EUC-V", + "CNS1-H", + "CNS1-V", + "CNS2-H", + "CNS2-V", + "ETHK-B5-H", + "ETHK-B5-V", + "ETen-B5-H", + "ETen-B5-V", + "ETenms-B5-H", + "ETenms-B5-V", + "EUC-H", + "EUC-V", + "Ext-H", + "Ext-RKSJ-H", + "Ext-RKSJ-V", + "Ext-V", + "GB-EUC-H", + "GB-EUC-V", + "GB-H", + "GB-V", + "GBK-EUC-H", + "GBK-EUC-V", + "GBK2K-H", + "GBK2K-V", + "GBKp-EUC-H", + "GBKp-EUC-V", + "GBT-EUC-H", + "GBT-EUC-V", + "GBT-H", + "GBT-V", + "GBTpc-EUC-H", + "GBTpc-EUC-V", + "GBpc-EUC-H", + "GBpc-EUC-V", + "H", + "HKdla-B5-H", + "HKdla-B5-V", + "HKdlb-B5-H", + "HKdlb-B5-V", + "HKgccs-B5-H", + "HKgccs-B5-V", + "HKm314-B5-H", + "HKm314-B5-V", + "HKm471-B5-H", + "HKm471-B5-V", + "HKscs-B5-H", + "HKscs-B5-V", + "Hankaku", + "Hiragana", + "KSC-EUC-H", + "KSC-EUC-V", + "KSC-H", + "KSC-Johab-H", + "KSC-Johab-V", + "KSC-V", + "KSCms-UHC-H", + "KSCms-UHC-HW-H", + "KSCms-UHC-HW-V", + "KSCms-UHC-V", + "KSCpc-EUC-H", + "KSCpc-EUC-V", + "Katakana", + "NWP-H", + "NWP-V", + "RKSJ-H", + "RKSJ-V", + "Roman", + "UniCNS-UCS2-H", + "UniCNS-UCS2-V", + "UniCNS-UTF16-H", + "UniCNS-UTF16-V", + "UniCNS-UTF32-H", + "UniCNS-UTF32-V", + "UniCNS-UTF8-H", + "UniCNS-UTF8-V", + "UniGB-UCS2-H", + "UniGB-UCS2-V", + "UniGB-UTF16-H", + "UniGB-UTF16-V", + "UniGB-UTF32-H", + "UniGB-UTF32-V", + "UniGB-UTF8-H", + "UniGB-UTF8-V", + "UniJIS-UCS2-H", + "UniJIS-UCS2-HW-H", + "UniJIS-UCS2-HW-V", + "UniJIS-UCS2-V", + "UniJIS-UTF16-H", + "UniJIS-UTF16-V", + "UniJIS-UTF32-H", + "UniJIS-UTF32-V", + "UniJIS-UTF8-H", + "UniJIS-UTF8-V", + "UniJIS2004-UTF16-H", + "UniJIS2004-UTF16-V", + "UniJIS2004-UTF32-H", + "UniJIS2004-UTF32-V", + "UniJIS2004-UTF8-H", + "UniJIS2004-UTF8-V", + "UniJISPro-UCS2-HW-V", + "UniJISPro-UCS2-V", + "UniJISPro-UTF8-V", + "UniJISX0213-UTF32-H", + "UniJISX0213-UTF32-V", + "UniJISX02132004-UTF32-H", + "UniJISX02132004-UTF32-V", + "UniKS-UCS2-H", + "UniKS-UCS2-V", + "UniKS-UTF16-H", + "UniKS-UTF16-V", + "UniKS-UTF32-H", + "UniKS-UTF32-V", + "UniKS-UTF8-H", + "UniKS-UTF8-V", + "V", + "WP-Symbol", + ], + li = 2 ** 24 - 1; +class CMap { + constructor(e = !1) { + this.codespaceRanges = [[], [], [], []]; + this.numCodespaceRanges = 0; + this._map = []; + this.name = ""; + this.vertical = !1; + this.useCMap = null; + this.builtInCMap = e; + } + addCodespaceRange(e, t, i) { + this.codespaceRanges[e - 1].push(t, i); + this.numCodespaceRanges++; + } + mapCidRange(e, t, i) { + if (t - e > li) + throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE."); + for (; e <= t; ) this._map[e++] = i++; + } + mapBfRange(e, t, i) { + if (t - e > li) + throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE."); + const a = i.length - 1; + for (; e <= t; ) { + this._map[e++] = i; + const t = i.charCodeAt(a) + 1; + t > 255 + ? (i = + i.substring(0, a - 1) + + String.fromCharCode(i.charCodeAt(a - 1) + 1) + + "\0") + : (i = i.substring(0, a) + String.fromCharCode(t)); + } + } + mapBfRangeToArray(e, t, i) { + if (t - e > li) + throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE."); + const a = i.length; + let s = 0; + for (; e <= t && s < a; ) { + this._map[e] = i[s++]; + ++e; + } + } + mapOne(e, t) { + this._map[e] = t; + } + lookup(e) { + return this._map[e]; + } + contains(e) { + return void 0 !== this._map[e]; + } + forEach(e) { + const t = this._map, + i = t.length; + if (i <= 65536) for (let a = 0; a < i; a++) void 0 !== t[a] && e(a, t[a]); + else for (const i in t) e(i, t[i]); + } + charCodeOf(e) { + const t = this._map; + if (t.length <= 65536) return t.indexOf(e); + for (const i in t) if (t[i] === e) return 0 | i; + return -1; + } + getMap() { + return this._map; + } + readCharCode(e, t, i) { + let a = 0; + const s = this.codespaceRanges; + for (let r = 0, n = s.length; r < n; r++) { + a = ((a << 8) | e.charCodeAt(t + r)) >>> 0; + const n = s[r]; + for (let e = 0, t = n.length; e < t; ) { + const t = n[e++], + s = n[e++]; + if (a >= t && a <= s) { + i.charcode = a; + i.length = r + 1; + return; + } + } + } + i.charcode = 0; + i.length = 1; + } + getCharCodeLength(e) { + const t = this.codespaceRanges; + for (let i = 0, a = t.length; i < a; i++) { + const a = t[i]; + for (let t = 0, s = a.length; t < s; ) { + const s = a[t++], + r = a[t++]; + if (e >= s && e <= r) return i + 1; + } + } + return 1; + } + get length() { + return this._map.length; + } + get isIdentityCMap() { + if ("Identity-H" !== this.name && "Identity-V" !== this.name) return !1; + if (65536 !== this._map.length) return !1; + for (let e = 0; e < 65536; e++) if (this._map[e] !== e) return !1; + return !0; + } +} +class IdentityCMap extends CMap { + constructor(e, t) { + super(); + this.vertical = e; + this.addCodespaceRange(t, 0, 65535); + } + mapCidRange(e, t, i) { + unreachable("should not call mapCidRange"); + } + mapBfRange(e, t, i) { + unreachable("should not call mapBfRange"); + } + mapBfRangeToArray(e, t, i) { + unreachable("should not call mapBfRangeToArray"); + } + mapOne(e, t) { + unreachable("should not call mapCidOne"); + } + lookup(e) { + return Number.isInteger(e) && e <= 65535 ? e : void 0; + } + contains(e) { + return Number.isInteger(e) && e <= 65535; + } + forEach(e) { + for (let t = 0; t <= 65535; t++) e(t, t); + } + charCodeOf(e) { + return Number.isInteger(e) && e <= 65535 ? e : -1; + } + getMap() { + const e = new Array(65536); + for (let t = 0; t <= 65535; t++) e[t] = t; + return e; + } + get length() { + return 65536; + } + get isIdentityCMap() { + unreachable("should not access .isIdentityCMap"); + } +} +function strToInt(e) { + let t = 0; + for (let i = 0; i < e.length; i++) t = (t << 8) | e.charCodeAt(i); + return t >>> 0; +} +function expectString(e) { + if ("string" != typeof e) + throw new FormatError("Malformed CMap: expected string."); +} +function expectInt(e) { + if (!Number.isInteger(e)) + throw new FormatError("Malformed CMap: expected int."); +} +function parseBfChar(e, t) { + for (;;) { + let i = t.getObj(); + if (i === pt) break; + if (isCmd(i, "endbfchar")) return; + expectString(i); + const a = strToInt(i); + i = t.getObj(); + expectString(i); + const s = i; + e.mapOne(a, s); + } +} +function parseBfRange(e, t) { + for (;;) { + let i = t.getObj(); + if (i === pt) break; + if (isCmd(i, "endbfrange")) return; + expectString(i); + const a = strToInt(i); + i = t.getObj(); + expectString(i); + const s = strToInt(i); + i = t.getObj(); + if (Number.isInteger(i) || "string" == typeof i) { + const t = Number.isInteger(i) ? String.fromCharCode(i) : i; + e.mapBfRange(a, s, t); + } else { + if (!isCmd(i, "[")) break; + { + i = t.getObj(); + const r = []; + for (; !isCmd(i, "]") && i !== pt; ) { + r.push(i); + i = t.getObj(); + } + e.mapBfRangeToArray(a, s, r); + } + } + } + throw new FormatError("Invalid bf range."); +} +function parseCidChar(e, t) { + for (;;) { + let i = t.getObj(); + if (i === pt) break; + if (isCmd(i, "endcidchar")) return; + expectString(i); + const a = strToInt(i); + i = t.getObj(); + expectInt(i); + const s = i; + e.mapOne(a, s); + } +} +function parseCidRange(e, t) { + for (;;) { + let i = t.getObj(); + if (i === pt) break; + if (isCmd(i, "endcidrange")) return; + expectString(i); + const a = strToInt(i); + i = t.getObj(); + expectString(i); + const s = strToInt(i); + i = t.getObj(); + expectInt(i); + const r = i; + e.mapCidRange(a, s, r); + } +} +function parseCodespaceRange(e, t) { + for (;;) { + let i = t.getObj(); + if (i === pt) break; + if (isCmd(i, "endcodespacerange")) return; + if ("string" != typeof i) break; + const a = strToInt(i); + i = t.getObj(); + if ("string" != typeof i) break; + const s = strToInt(i); + e.addCodespaceRange(i.length, a, s); + } + throw new FormatError("Invalid codespace range."); +} +function parseWMode(e, t) { + const i = t.getObj(); + Number.isInteger(i) && (e.vertical = !!i); +} +function parseCMapName(e, t) { + const i = t.getObj(); + i instanceof Name && (e.name = i.name); +} +async function parseCMap(e, t, i, a) { + let s, r; + A: for (;;) + try { + const i = t.getObj(); + if (i === pt) break; + if (i instanceof Name) { + "WMode" === i.name + ? parseWMode(e, t) + : "CMapName" === i.name && parseCMapName(e, t); + s = i; + } else if (i instanceof Cmd) + switch (i.cmd) { + case "endcmap": + break A; + case "usecmap": + s instanceof Name && (r = s.name); + break; + case "begincodespacerange": + parseCodespaceRange(e, t); + break; + case "beginbfchar": + parseBfChar(e, t); + break; + case "begincidchar": + parseCidChar(e, t); + break; + case "beginbfrange": + parseBfRange(e, t); + break; + case "begincidrange": + parseCidRange(e, t); + } + } catch (e) { + if (e instanceof MissingDataException) throw e; + warn("Invalid cMap data: " + e); + continue; + } + !a && r && (a = r); + return a ? extendCMap(e, i, a) : e; +} +async function extendCMap(e, t, i) { + e.useCMap = await createBuiltInCMap(i, t); + if (0 === e.numCodespaceRanges) { + const t = e.useCMap.codespaceRanges; + for (let i = 0; i < t.length; i++) e.codespaceRanges[i] = t[i].slice(); + e.numCodespaceRanges = e.useCMap.numCodespaceRanges; + } + e.useCMap.forEach(function (t, i) { + e.contains(t) || e.mapOne(t, e.useCMap.lookup(t)); + }); + return e; +} +async function createBuiltInCMap(e, t) { + if ("Identity-H" === e) return new IdentityCMap(!1, 2); + if ("Identity-V" === e) return new IdentityCMap(!0, 2); + if (!hi.includes(e)) throw new Error("Unknown CMap name: " + e); + if (!t) throw new Error("Built-in CMap parameters are not provided."); + const { cMapData: i, compressionType: a } = await t(e), + s = new CMap(!0); + if (a === mA.BINARY) + return new BinaryCMapReader().process(i, s, (e) => extendCMap(s, t, e)); + if (a === mA.NONE) { + const e = new Lexer(new Stream(i)); + return parseCMap(s, e, t, null); + } + throw new Error(`Invalid CMap "compressionType" value: ${a}`); +} +class CMapFactory { + static async create({ encoding: e, fetchBuiltInCMap: t, useCMap: i }) { + if (e instanceof Name) return createBuiltInCMap(e.name, t); + if (e instanceof BaseStream) { + const a = await parseCMap(new CMap(), new Lexer(e), t, i); + return a.isIdentityCMap ? createBuiltInCMap(a.name, t) : a; + } + throw new Error("Encoding required."); + } +} +const Ci = [ + ".notdef", + "space", + "exclam", + "quotedbl", + "numbersign", + "dollar", + "percent", + "ampersand", + "quoteright", + "parenleft", + "parenright", + "asterisk", + "plus", + "comma", + "hyphen", + "period", + "slash", + "zero", + "one", + "two", + "three", + "four", + "five", + "six", + "seven", + "eight", + "nine", + "colon", + "semicolon", + "less", + "equal", + "greater", + "question", + "at", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + "bracketleft", + "backslash", + "bracketright", + "asciicircum", + "underscore", + "quoteleft", + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "n", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z", + "braceleft", + "bar", + "braceright", + "asciitilde", + "exclamdown", + "cent", + "sterling", + "fraction", + "yen", + "florin", + "section", + "currency", + "quotesingle", + "quotedblleft", + "guillemotleft", + "guilsinglleft", + "guilsinglright", + "fi", + "fl", + "endash", + "dagger", + "daggerdbl", + "periodcentered", + "paragraph", + "bullet", + "quotesinglbase", + "quotedblbase", + "quotedblright", + "guillemotright", + "ellipsis", + "perthousand", + "questiondown", + "grave", + "acute", + "circumflex", + "tilde", + "macron", + "breve", + "dotaccent", + "dieresis", + "ring", + "cedilla", + "hungarumlaut", + "ogonek", + "caron", + "emdash", + "AE", + "ordfeminine", + "Lslash", + "Oslash", + "OE", + "ordmasculine", + "ae", + "dotlessi", + "lslash", + "oslash", + "oe", + "germandbls", + "onesuperior", + "logicalnot", + "mu", + "trademark", + "Eth", + "onehalf", + "plusminus", + "Thorn", + "onequarter", + "divide", + "brokenbar", + "degree", + "thorn", + "threequarters", + "twosuperior", + "registered", + "minus", + "eth", + "multiply", + "threesuperior", + "copyright", + "Aacute", + "Acircumflex", + "Adieresis", + "Agrave", + "Aring", + "Atilde", + "Ccedilla", + "Eacute", + "Ecircumflex", + "Edieresis", + "Egrave", + "Iacute", + "Icircumflex", + "Idieresis", + "Igrave", + "Ntilde", + "Oacute", + "Ocircumflex", + "Odieresis", + "Ograve", + "Otilde", + "Scaron", + "Uacute", + "Ucircumflex", + "Udieresis", + "Ugrave", + "Yacute", + "Ydieresis", + "Zcaron", + "aacute", + "acircumflex", + "adieresis", + "agrave", + "aring", + "atilde", + "ccedilla", + "eacute", + "ecircumflex", + "edieresis", + "egrave", + "iacute", + "icircumflex", + "idieresis", + "igrave", + "ntilde", + "oacute", + "ocircumflex", + "odieresis", + "ograve", + "otilde", + "scaron", + "uacute", + "ucircumflex", + "udieresis", + "ugrave", + "yacute", + "ydieresis", + "zcaron", + ], + Bi = [ + ".notdef", + "space", + "exclamsmall", + "Hungarumlautsmall", + "dollaroldstyle", + "dollarsuperior", + "ampersandsmall", + "Acutesmall", + "parenleftsuperior", + "parenrightsuperior", + "twodotenleader", + "onedotenleader", + "comma", + "hyphen", + "period", + "fraction", + "zerooldstyle", + "oneoldstyle", + "twooldstyle", + "threeoldstyle", + "fouroldstyle", + "fiveoldstyle", + "sixoldstyle", + "sevenoldstyle", + "eightoldstyle", + "nineoldstyle", + "colon", + "semicolon", + "commasuperior", + "threequartersemdash", + "periodsuperior", + "questionsmall", + "asuperior", + "bsuperior", + "centsuperior", + "dsuperior", + "esuperior", + "isuperior", + "lsuperior", + "msuperior", + "nsuperior", + "osuperior", + "rsuperior", + "ssuperior", + "tsuperior", + "ff", + "fi", + "fl", + "ffi", + "ffl", + "parenleftinferior", + "parenrightinferior", + "Circumflexsmall", + "hyphensuperior", + "Gravesmall", + "Asmall", + "Bsmall", + "Csmall", + "Dsmall", + "Esmall", + "Fsmall", + "Gsmall", + "Hsmall", + "Ismall", + "Jsmall", + "Ksmall", + "Lsmall", + "Msmall", + "Nsmall", + "Osmall", + "Psmall", + "Qsmall", + "Rsmall", + "Ssmall", + "Tsmall", + "Usmall", + "Vsmall", + "Wsmall", + "Xsmall", + "Ysmall", + "Zsmall", + "colonmonetary", + "onefitted", + "rupiah", + "Tildesmall", + "exclamdownsmall", + "centoldstyle", + "Lslashsmall", + "Scaronsmall", + "Zcaronsmall", + "Dieresissmall", + "Brevesmall", + "Caronsmall", + "Dotaccentsmall", + "Macronsmall", + "figuredash", + "hypheninferior", + "Ogoneksmall", + "Ringsmall", + "Cedillasmall", + "onequarter", + "onehalf", + "threequarters", + "questiondownsmall", + "oneeighth", + "threeeighths", + "fiveeighths", + "seveneighths", + "onethird", + "twothirds", + "zerosuperior", + "onesuperior", + "twosuperior", + "threesuperior", + "foursuperior", + "fivesuperior", + "sixsuperior", + "sevensuperior", + "eightsuperior", + "ninesuperior", + "zeroinferior", + "oneinferior", + "twoinferior", + "threeinferior", + "fourinferior", + "fiveinferior", + "sixinferior", + "seveninferior", + "eightinferior", + "nineinferior", + "centinferior", + "dollarinferior", + "periodinferior", + "commainferior", + "Agravesmall", + "Aacutesmall", + "Acircumflexsmall", + "Atildesmall", + "Adieresissmall", + "Aringsmall", + "AEsmall", + "Ccedillasmall", + "Egravesmall", + "Eacutesmall", + "Ecircumflexsmall", + "Edieresissmall", + "Igravesmall", + "Iacutesmall", + "Icircumflexsmall", + "Idieresissmall", + "Ethsmall", + "Ntildesmall", + "Ogravesmall", + "Oacutesmall", + "Ocircumflexsmall", + "Otildesmall", + "Odieresissmall", + "OEsmall", + "Oslashsmall", + "Ugravesmall", + "Uacutesmall", + "Ucircumflexsmall", + "Udieresissmall", + "Yacutesmall", + "Thornsmall", + "Ydieresissmall", + ], + Qi = [ + ".notdef", + "space", + "dollaroldstyle", + "dollarsuperior", + "parenleftsuperior", + "parenrightsuperior", + "twodotenleader", + "onedotenleader", + "comma", + "hyphen", + "period", + "fraction", + "zerooldstyle", + "oneoldstyle", + "twooldstyle", + "threeoldstyle", + "fouroldstyle", + "fiveoldstyle", + "sixoldstyle", + "sevenoldstyle", + "eightoldstyle", + "nineoldstyle", + "colon", + "semicolon", + "commasuperior", + "threequartersemdash", + "periodsuperior", + "asuperior", + "bsuperior", + "centsuperior", + "dsuperior", + "esuperior", + "isuperior", + "lsuperior", + "msuperior", + "nsuperior", + "osuperior", + "rsuperior", + "ssuperior", + "tsuperior", + "ff", + "fi", + "fl", + "ffi", + "ffl", + "parenleftinferior", + "parenrightinferior", + "hyphensuperior", + "colonmonetary", + "onefitted", + "rupiah", + "centoldstyle", + "figuredash", + "hypheninferior", + "onequarter", + "onehalf", + "threequarters", + "oneeighth", + "threeeighths", + "fiveeighths", + "seveneighths", + "onethird", + "twothirds", + "zerosuperior", + "onesuperior", + "twosuperior", + "threesuperior", + "foursuperior", + "fivesuperior", + "sixsuperior", + "sevensuperior", + "eightsuperior", + "ninesuperior", + "zeroinferior", + "oneinferior", + "twoinferior", + "threeinferior", + "fourinferior", + "fiveinferior", + "sixinferior", + "seveninferior", + "eightinferior", + "nineinferior", + "centinferior", + "dollarinferior", + "periodinferior", + "commainferior", + ], + Ei = [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "space", + "exclamsmall", + "Hungarumlautsmall", + "", + "dollaroldstyle", + "dollarsuperior", + "ampersandsmall", + "Acutesmall", + "parenleftsuperior", + "parenrightsuperior", + "twodotenleader", + "onedotenleader", + "comma", + "hyphen", + "period", + "fraction", + "zerooldstyle", + "oneoldstyle", + "twooldstyle", + "threeoldstyle", + "fouroldstyle", + "fiveoldstyle", + "sixoldstyle", + "sevenoldstyle", + "eightoldstyle", + "nineoldstyle", + "colon", + "semicolon", + "commasuperior", + "threequartersemdash", + "periodsuperior", + "questionsmall", + "", + "asuperior", + "bsuperior", + "centsuperior", + "dsuperior", + "esuperior", + "", + "", + "", + "isuperior", + "", + "", + "lsuperior", + "msuperior", + "nsuperior", + "osuperior", + "", + "", + "rsuperior", + "ssuperior", + "tsuperior", + "", + "ff", + "fi", + "fl", + "ffi", + "ffl", + "parenleftinferior", + "", + "parenrightinferior", + "Circumflexsmall", + "hyphensuperior", + "Gravesmall", + "Asmall", + "Bsmall", + "Csmall", + "Dsmall", + "Esmall", + "Fsmall", + "Gsmall", + "Hsmall", + "Ismall", + "Jsmall", + "Ksmall", + "Lsmall", + "Msmall", + "Nsmall", + "Osmall", + "Psmall", + "Qsmall", + "Rsmall", + "Ssmall", + "Tsmall", + "Usmall", + "Vsmall", + "Wsmall", + "Xsmall", + "Ysmall", + "Zsmall", + "colonmonetary", + "onefitted", + "rupiah", + "Tildesmall", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "exclamdownsmall", + "centoldstyle", + "Lslashsmall", + "", + "", + "Scaronsmall", + "Zcaronsmall", + "Dieresissmall", + "Brevesmall", + "Caronsmall", + "", + "Dotaccentsmall", + "", + "", + "Macronsmall", + "", + "", + "figuredash", + "hypheninferior", + "", + "", + "Ogoneksmall", + "Ringsmall", + "Cedillasmall", + "", + "", + "", + "onequarter", + "onehalf", + "threequarters", + "questiondownsmall", + "oneeighth", + "threeeighths", + "fiveeighths", + "seveneighths", + "onethird", + "twothirds", + "", + "", + "zerosuperior", + "onesuperior", + "twosuperior", + "threesuperior", + "foursuperior", + "fivesuperior", + "sixsuperior", + "sevensuperior", + "eightsuperior", + "ninesuperior", + "zeroinferior", + "oneinferior", + "twoinferior", + "threeinferior", + "fourinferior", + "fiveinferior", + "sixinferior", + "seveninferior", + "eightinferior", + "nineinferior", + "centinferior", + "dollarinferior", + "periodinferior", + "commainferior", + "Agravesmall", + "Aacutesmall", + "Acircumflexsmall", + "Atildesmall", + "Adieresissmall", + "Aringsmall", + "AEsmall", + "Ccedillasmall", + "Egravesmall", + "Eacutesmall", + "Ecircumflexsmall", + "Edieresissmall", + "Igravesmall", + "Iacutesmall", + "Icircumflexsmall", + "Idieresissmall", + "Ethsmall", + "Ntildesmall", + "Ogravesmall", + "Oacutesmall", + "Ocircumflexsmall", + "Otildesmall", + "Odieresissmall", + "OEsmall", + "Oslashsmall", + "Ugravesmall", + "Uacutesmall", + "Ucircumflexsmall", + "Udieresissmall", + "Yacutesmall", + "Thornsmall", + "Ydieresissmall", + ], + ui = [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "space", + "exclamsmall", + "Hungarumlautsmall", + "centoldstyle", + "dollaroldstyle", + "dollarsuperior", + "ampersandsmall", + "Acutesmall", + "parenleftsuperior", + "parenrightsuperior", + "twodotenleader", + "onedotenleader", + "comma", + "hyphen", + "period", + "fraction", + "zerooldstyle", + "oneoldstyle", + "twooldstyle", + "threeoldstyle", + "fouroldstyle", + "fiveoldstyle", + "sixoldstyle", + "sevenoldstyle", + "eightoldstyle", + "nineoldstyle", + "colon", + "semicolon", + "", + "threequartersemdash", + "", + "questionsmall", + "", + "", + "", + "", + "Ethsmall", + "", + "", + "onequarter", + "onehalf", + "threequarters", + "oneeighth", + "threeeighths", + "fiveeighths", + "seveneighths", + "onethird", + "twothirds", + "", + "", + "", + "", + "", + "", + "ff", + "fi", + "fl", + "ffi", + "ffl", + "parenleftinferior", + "", + "parenrightinferior", + "Circumflexsmall", + "hypheninferior", + "Gravesmall", + "Asmall", + "Bsmall", + "Csmall", + "Dsmall", + "Esmall", + "Fsmall", + "Gsmall", + "Hsmall", + "Ismall", + "Jsmall", + "Ksmall", + "Lsmall", + "Msmall", + "Nsmall", + "Osmall", + "Psmall", + "Qsmall", + "Rsmall", + "Ssmall", + "Tsmall", + "Usmall", + "Vsmall", + "Wsmall", + "Xsmall", + "Ysmall", + "Zsmall", + "colonmonetary", + "onefitted", + "rupiah", + "Tildesmall", + "", + "", + "asuperior", + "centsuperior", + "", + "", + "", + "", + "Aacutesmall", + "Agravesmall", + "Acircumflexsmall", + "Adieresissmall", + "Atildesmall", + "Aringsmall", + "Ccedillasmall", + "Eacutesmall", + "Egravesmall", + "Ecircumflexsmall", + "Edieresissmall", + "Iacutesmall", + "Igravesmall", + "Icircumflexsmall", + "Idieresissmall", + "Ntildesmall", + "Oacutesmall", + "Ogravesmall", + "Ocircumflexsmall", + "Odieresissmall", + "Otildesmall", + "Uacutesmall", + "Ugravesmall", + "Ucircumflexsmall", + "Udieresissmall", + "", + "eightsuperior", + "fourinferior", + "threeinferior", + "sixinferior", + "eightinferior", + "seveninferior", + "Scaronsmall", + "", + "centinferior", + "twoinferior", + "", + "Dieresissmall", + "", + "Caronsmall", + "osuperior", + "fiveinferior", + "", + "commainferior", + "periodinferior", + "Yacutesmall", + "", + "dollarinferior", + "", + "", + "Thornsmall", + "", + "nineinferior", + "zeroinferior", + "Zcaronsmall", + "AEsmall", + "Oslashsmall", + "questiondownsmall", + "oneinferior", + "Lslashsmall", + "", + "", + "", + "", + "", + "", + "Cedillasmall", + "", + "", + "", + "", + "", + "OEsmall", + "figuredash", + "hyphensuperior", + "", + "", + "", + "", + "exclamdownsmall", + "", + "Ydieresissmall", + "", + "onesuperior", + "twosuperior", + "threesuperior", + "foursuperior", + "fivesuperior", + "sixsuperior", + "sevensuperior", + "ninesuperior", + "zerosuperior", + "", + "esuperior", + "rsuperior", + "tsuperior", + "", + "", + "isuperior", + "ssuperior", + "dsuperior", + "", + "", + "", + "", + "", + "lsuperior", + "Ogoneksmall", + "Brevesmall", + "Macronsmall", + "bsuperior", + "nsuperior", + "msuperior", + "commasuperior", + "periodsuperior", + "Dotaccentsmall", + "Ringsmall", + "", + "", + "", + "", + ], + di = [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "space", + "exclam", + "quotedbl", + "numbersign", + "dollar", + "percent", + "ampersand", + "quotesingle", + "parenleft", + "parenright", + "asterisk", + "plus", + "comma", + "hyphen", + "period", + "slash", + "zero", + "one", + "two", + "three", + "four", + "five", + "six", + "seven", + "eight", + "nine", + "colon", + "semicolon", + "less", + "equal", + "greater", + "question", + "at", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + "bracketleft", + "backslash", + "bracketright", + "asciicircum", + "underscore", + "grave", + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "n", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z", + "braceleft", + "bar", + "braceright", + "asciitilde", + "", + "Adieresis", + "Aring", + "Ccedilla", + "Eacute", + "Ntilde", + "Odieresis", + "Udieresis", + "aacute", + "agrave", + "acircumflex", + "adieresis", + "atilde", + "aring", + "ccedilla", + "eacute", + "egrave", + "ecircumflex", + "edieresis", + "iacute", + "igrave", + "icircumflex", + "idieresis", + "ntilde", + "oacute", + "ograve", + "ocircumflex", + "odieresis", + "otilde", + "uacute", + "ugrave", + "ucircumflex", + "udieresis", + "dagger", + "degree", + "cent", + "sterling", + "section", + "bullet", + "paragraph", + "germandbls", + "registered", + "copyright", + "trademark", + "acute", + "dieresis", + "notequal", + "AE", + "Oslash", + "infinity", + "plusminus", + "lessequal", + "greaterequal", + "yen", + "mu", + "partialdiff", + "summation", + "product", + "pi", + "integral", + "ordfeminine", + "ordmasculine", + "Omega", + "ae", + "oslash", + "questiondown", + "exclamdown", + "logicalnot", + "radical", + "florin", + "approxequal", + "Delta", + "guillemotleft", + "guillemotright", + "ellipsis", + "space", + "Agrave", + "Atilde", + "Otilde", + "OE", + "oe", + "endash", + "emdash", + "quotedblleft", + "quotedblright", + "quoteleft", + "quoteright", + "divide", + "lozenge", + "ydieresis", + "Ydieresis", + "fraction", + "currency", + "guilsinglleft", + "guilsinglright", + "fi", + "fl", + "daggerdbl", + "periodcentered", + "quotesinglbase", + "quotedblbase", + "perthousand", + "Acircumflex", + "Ecircumflex", + "Aacute", + "Edieresis", + "Egrave", + "Iacute", + "Icircumflex", + "Idieresis", + "Igrave", + "Oacute", + "Ocircumflex", + "apple", + "Ograve", + "Uacute", + "Ucircumflex", + "Ugrave", + "dotlessi", + "circumflex", + "tilde", + "macron", + "breve", + "dotaccent", + "ring", + "cedilla", + "hungarumlaut", + "ogonek", + "caron", + ], + fi = [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "space", + "exclam", + "quotedbl", + "numbersign", + "dollar", + "percent", + "ampersand", + "quoteright", + "parenleft", + "parenright", + "asterisk", + "plus", + "comma", + "hyphen", + "period", + "slash", + "zero", + "one", + "two", + "three", + "four", + "five", + "six", + "seven", + "eight", + "nine", + "colon", + "semicolon", + "less", + "equal", + "greater", + "question", + "at", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + "bracketleft", + "backslash", + "bracketright", + "asciicircum", + "underscore", + "quoteleft", + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "n", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z", + "braceleft", + "bar", + "braceright", + "asciitilde", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "exclamdown", + "cent", + "sterling", + "fraction", + "yen", + "florin", + "section", + "currency", + "quotesingle", + "quotedblleft", + "guillemotleft", + "guilsinglleft", + "guilsinglright", + "fi", + "fl", + "", + "endash", + "dagger", + "daggerdbl", + "periodcentered", + "", + "paragraph", + "bullet", + "quotesinglbase", + "quotedblbase", + "quotedblright", + "guillemotright", + "ellipsis", + "perthousand", + "", + "questiondown", + "", + "grave", + "acute", + "circumflex", + "tilde", + "macron", + "breve", + "dotaccent", + "dieresis", + "", + "ring", + "cedilla", + "", + "hungarumlaut", + "ogonek", + "caron", + "emdash", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "AE", + "", + "ordfeminine", + "", + "", + "", + "", + "Lslash", + "Oslash", + "OE", + "ordmasculine", + "", + "", + "", + "", + "", + "ae", + "", + "", + "", + "dotlessi", + "", + "", + "lslash", + "oslash", + "oe", + "germandbls", + "", + "", + "", + "", + ], + pi = [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "space", + "exclam", + "quotedbl", + "numbersign", + "dollar", + "percent", + "ampersand", + "quotesingle", + "parenleft", + "parenright", + "asterisk", + "plus", + "comma", + "hyphen", + "period", + "slash", + "zero", + "one", + "two", + "three", + "four", + "five", + "six", + "seven", + "eight", + "nine", + "colon", + "semicolon", + "less", + "equal", + "greater", + "question", + "at", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + "bracketleft", + "backslash", + "bracketright", + "asciicircum", + "underscore", + "grave", + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "n", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z", + "braceleft", + "bar", + "braceright", + "asciitilde", + "bullet", + "Euro", + "bullet", + "quotesinglbase", + "florin", + "quotedblbase", + "ellipsis", + "dagger", + "daggerdbl", + "circumflex", + "perthousand", + "Scaron", + "guilsinglleft", + "OE", + "bullet", + "Zcaron", + "bullet", + "bullet", + "quoteleft", + "quoteright", + "quotedblleft", + "quotedblright", + "bullet", + "endash", + "emdash", + "tilde", + "trademark", + "scaron", + "guilsinglright", + "oe", + "bullet", + "zcaron", + "Ydieresis", + "space", + "exclamdown", + "cent", + "sterling", + "currency", + "yen", + "brokenbar", + "section", + "dieresis", + "copyright", + "ordfeminine", + "guillemotleft", + "logicalnot", + "hyphen", + "registered", + "macron", + "degree", + "plusminus", + "twosuperior", + "threesuperior", + "acute", + "mu", + "paragraph", + "periodcentered", + "cedilla", + "onesuperior", + "ordmasculine", + "guillemotright", + "onequarter", + "onehalf", + "threequarters", + "questiondown", + "Agrave", + "Aacute", + "Acircumflex", + "Atilde", + "Adieresis", + "Aring", + "AE", + "Ccedilla", + "Egrave", + "Eacute", + "Ecircumflex", + "Edieresis", + "Igrave", + "Iacute", + "Icircumflex", + "Idieresis", + "Eth", + "Ntilde", + "Ograve", + "Oacute", + "Ocircumflex", + "Otilde", + "Odieresis", + "multiply", + "Oslash", + "Ugrave", + "Uacute", + "Ucircumflex", + "Udieresis", + "Yacute", + "Thorn", + "germandbls", + "agrave", + "aacute", + "acircumflex", + "atilde", + "adieresis", + "aring", + "ae", + "ccedilla", + "egrave", + "eacute", + "ecircumflex", + "edieresis", + "igrave", + "iacute", + "icircumflex", + "idieresis", + "eth", + "ntilde", + "ograve", + "oacute", + "ocircumflex", + "otilde", + "odieresis", + "divide", + "oslash", + "ugrave", + "uacute", + "ucircumflex", + "udieresis", + "yacute", + "thorn", + "ydieresis", + ], + mi = [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "space", + "exclam", + "universal", + "numbersign", + "existential", + "percent", + "ampersand", + "suchthat", + "parenleft", + "parenright", + "asteriskmath", + "plus", + "comma", + "minus", + "period", + "slash", + "zero", + "one", + "two", + "three", + "four", + "five", + "six", + "seven", + "eight", + "nine", + "colon", + "semicolon", + "less", + "equal", + "greater", + "question", + "congruent", + "Alpha", + "Beta", + "Chi", + "Delta", + "Epsilon", + "Phi", + "Gamma", + "Eta", + "Iota", + "theta1", + "Kappa", + "Lambda", + "Mu", + "Nu", + "Omicron", + "Pi", + "Theta", + "Rho", + "Sigma", + "Tau", + "Upsilon", + "sigma1", + "Omega", + "Xi", + "Psi", + "Zeta", + "bracketleft", + "therefore", + "bracketright", + "perpendicular", + "underscore", + "radicalex", + "alpha", + "beta", + "chi", + "delta", + "epsilon", + "phi", + "gamma", + "eta", + "iota", + "phi1", + "kappa", + "lambda", + "mu", + "nu", + "omicron", + "pi", + "theta", + "rho", + "sigma", + "tau", + "upsilon", + "omega1", + "omega", + "xi", + "psi", + "zeta", + "braceleft", + "bar", + "braceright", + "similar", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "Euro", + "Upsilon1", + "minute", + "lessequal", + "fraction", + "infinity", + "florin", + "club", + "diamond", + "heart", + "spade", + "arrowboth", + "arrowleft", + "arrowup", + "arrowright", + "arrowdown", + "degree", + "plusminus", + "second", + "greaterequal", + "multiply", + "proportional", + "partialdiff", + "bullet", + "divide", + "notequal", + "equivalence", + "approxequal", + "ellipsis", + "arrowvertex", + "arrowhorizex", + "carriagereturn", + "aleph", + "Ifraktur", + "Rfraktur", + "weierstrass", + "circlemultiply", + "circleplus", + "emptyset", + "intersection", + "union", + "propersuperset", + "reflexsuperset", + "notsubset", + "propersubset", + "reflexsubset", + "element", + "notelement", + "angle", + "gradient", + "registerserif", + "copyrightserif", + "trademarkserif", + "product", + "radical", + "dotmath", + "logicalnot", + "logicaland", + "logicalor", + "arrowdblboth", + "arrowdblleft", + "arrowdblup", + "arrowdblright", + "arrowdbldown", + "lozenge", + "angleleft", + "registersans", + "copyrightsans", + "trademarksans", + "summation", + "parenlefttp", + "parenleftex", + "parenleftbt", + "bracketlefttp", + "bracketleftex", + "bracketleftbt", + "bracelefttp", + "braceleftmid", + "braceleftbt", + "braceex", + "", + "angleright", + "integral", + "integraltp", + "integralex", + "integralbt", + "parenrighttp", + "parenrightex", + "parenrightbt", + "bracketrighttp", + "bracketrightex", + "bracketrightbt", + "bracerighttp", + "bracerightmid", + "bracerightbt", + "", + ], + yi = [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "space", + "a1", + "a2", + "a202", + "a3", + "a4", + "a5", + "a119", + "a118", + "a117", + "a11", + "a12", + "a13", + "a14", + "a15", + "a16", + "a105", + "a17", + "a18", + "a19", + "a20", + "a21", + "a22", + "a23", + "a24", + "a25", + "a26", + "a27", + "a28", + "a6", + "a7", + "a8", + "a9", + "a10", + "a29", + "a30", + "a31", + "a32", + "a33", + "a34", + "a35", + "a36", + "a37", + "a38", + "a39", + "a40", + "a41", + "a42", + "a43", + "a44", + "a45", + "a46", + "a47", + "a48", + "a49", + "a50", + "a51", + "a52", + "a53", + "a54", + "a55", + "a56", + "a57", + "a58", + "a59", + "a60", + "a61", + "a62", + "a63", + "a64", + "a65", + "a66", + "a67", + "a68", + "a69", + "a70", + "a71", + "a72", + "a73", + "a74", + "a203", + "a75", + "a204", + "a76", + "a77", + "a78", + "a79", + "a81", + "a82", + "a83", + "a84", + "a97", + "a98", + "a99", + "a100", + "", + "a89", + "a90", + "a93", + "a94", + "a91", + "a92", + "a205", + "a85", + "a206", + "a86", + "a87", + "a88", + "a95", + "a96", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "a101", + "a102", + "a103", + "a104", + "a106", + "a107", + "a108", + "a112", + "a111", + "a110", + "a109", + "a120", + "a121", + "a122", + "a123", + "a124", + "a125", + "a126", + "a127", + "a128", + "a129", + "a130", + "a131", + "a132", + "a133", + "a134", + "a135", + "a136", + "a137", + "a138", + "a139", + "a140", + "a141", + "a142", + "a143", + "a144", + "a145", + "a146", + "a147", + "a148", + "a149", + "a150", + "a151", + "a152", + "a153", + "a154", + "a155", + "a156", + "a157", + "a158", + "a159", + "a160", + "a161", + "a163", + "a164", + "a196", + "a165", + "a192", + "a166", + "a167", + "a168", + "a169", + "a170", + "a171", + "a172", + "a173", + "a162", + "a174", + "a175", + "a176", + "a177", + "a178", + "a179", + "a193", + "a180", + "a199", + "a181", + "a200", + "a182", + "", + "a201", + "a183", + "a184", + "a197", + "a185", + "a194", + "a198", + "a186", + "a195", + "a187", + "a188", + "a189", + "a190", + "a191", + "", + ]; +function getEncoding(e) { + switch (e) { + case "WinAnsiEncoding": + return pi; + case "StandardEncoding": + return fi; + case "MacRomanEncoding": + return di; + case "SymbolSetEncoding": + return mi; + case "ZapfDingbatsEncoding": + return yi; + case "ExpertEncoding": + return Ei; + case "MacExpertEncoding": + return ui; + default: + return null; + } +} +const wi = [ + ".notdef", + "space", + "exclam", + "quotedbl", + "numbersign", + "dollar", + "percent", + "ampersand", + "quoteright", + "parenleft", + "parenright", + "asterisk", + "plus", + "comma", + "hyphen", + "period", + "slash", + "zero", + "one", + "two", + "three", + "four", + "five", + "six", + "seven", + "eight", + "nine", + "colon", + "semicolon", + "less", + "equal", + "greater", + "question", + "at", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + "bracketleft", + "backslash", + "bracketright", + "asciicircum", + "underscore", + "quoteleft", + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "n", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z", + "braceleft", + "bar", + "braceright", + "asciitilde", + "exclamdown", + "cent", + "sterling", + "fraction", + "yen", + "florin", + "section", + "currency", + "quotesingle", + "quotedblleft", + "guillemotleft", + "guilsinglleft", + "guilsinglright", + "fi", + "fl", + "endash", + "dagger", + "daggerdbl", + "periodcentered", + "paragraph", + "bullet", + "quotesinglbase", + "quotedblbase", + "quotedblright", + "guillemotright", + "ellipsis", + "perthousand", + "questiondown", + "grave", + "acute", + "circumflex", + "tilde", + "macron", + "breve", + "dotaccent", + "dieresis", + "ring", + "cedilla", + "hungarumlaut", + "ogonek", + "caron", + "emdash", + "AE", + "ordfeminine", + "Lslash", + "Oslash", + "OE", + "ordmasculine", + "ae", + "dotlessi", + "lslash", + "oslash", + "oe", + "germandbls", + "onesuperior", + "logicalnot", + "mu", + "trademark", + "Eth", + "onehalf", + "plusminus", + "Thorn", + "onequarter", + "divide", + "brokenbar", + "degree", + "thorn", + "threequarters", + "twosuperior", + "registered", + "minus", + "eth", + "multiply", + "threesuperior", + "copyright", + "Aacute", + "Acircumflex", + "Adieresis", + "Agrave", + "Aring", + "Atilde", + "Ccedilla", + "Eacute", + "Ecircumflex", + "Edieresis", + "Egrave", + "Iacute", + "Icircumflex", + "Idieresis", + "Igrave", + "Ntilde", + "Oacute", + "Ocircumflex", + "Odieresis", + "Ograve", + "Otilde", + "Scaron", + "Uacute", + "Ucircumflex", + "Udieresis", + "Ugrave", + "Yacute", + "Ydieresis", + "Zcaron", + "aacute", + "acircumflex", + "adieresis", + "agrave", + "aring", + "atilde", + "ccedilla", + "eacute", + "ecircumflex", + "edieresis", + "egrave", + "iacute", + "icircumflex", + "idieresis", + "igrave", + "ntilde", + "oacute", + "ocircumflex", + "odieresis", + "ograve", + "otilde", + "scaron", + "uacute", + "ucircumflex", + "udieresis", + "ugrave", + "yacute", + "ydieresis", + "zcaron", + "exclamsmall", + "Hungarumlautsmall", + "dollaroldstyle", + "dollarsuperior", + "ampersandsmall", + "Acutesmall", + "parenleftsuperior", + "parenrightsuperior", + "twodotenleader", + "onedotenleader", + "zerooldstyle", + "oneoldstyle", + "twooldstyle", + "threeoldstyle", + "fouroldstyle", + "fiveoldstyle", + "sixoldstyle", + "sevenoldstyle", + "eightoldstyle", + "nineoldstyle", + "commasuperior", + "threequartersemdash", + "periodsuperior", + "questionsmall", + "asuperior", + "bsuperior", + "centsuperior", + "dsuperior", + "esuperior", + "isuperior", + "lsuperior", + "msuperior", + "nsuperior", + "osuperior", + "rsuperior", + "ssuperior", + "tsuperior", + "ff", + "ffi", + "ffl", + "parenleftinferior", + "parenrightinferior", + "Circumflexsmall", + "hyphensuperior", + "Gravesmall", + "Asmall", + "Bsmall", + "Csmall", + "Dsmall", + "Esmall", + "Fsmall", + "Gsmall", + "Hsmall", + "Ismall", + "Jsmall", + "Ksmall", + "Lsmall", + "Msmall", + "Nsmall", + "Osmall", + "Psmall", + "Qsmall", + "Rsmall", + "Ssmall", + "Tsmall", + "Usmall", + "Vsmall", + "Wsmall", + "Xsmall", + "Ysmall", + "Zsmall", + "colonmonetary", + "onefitted", + "rupiah", + "Tildesmall", + "exclamdownsmall", + "centoldstyle", + "Lslashsmall", + "Scaronsmall", + "Zcaronsmall", + "Dieresissmall", + "Brevesmall", + "Caronsmall", + "Dotaccentsmall", + "Macronsmall", + "figuredash", + "hypheninferior", + "Ogoneksmall", + "Ringsmall", + "Cedillasmall", + "questiondownsmall", + "oneeighth", + "threeeighths", + "fiveeighths", + "seveneighths", + "onethird", + "twothirds", + "zerosuperior", + "foursuperior", + "fivesuperior", + "sixsuperior", + "sevensuperior", + "eightsuperior", + "ninesuperior", + "zeroinferior", + "oneinferior", + "twoinferior", + "threeinferior", + "fourinferior", + "fiveinferior", + "sixinferior", + "seveninferior", + "eightinferior", + "nineinferior", + "centinferior", + "dollarinferior", + "periodinferior", + "commainferior", + "Agravesmall", + "Aacutesmall", + "Acircumflexsmall", + "Atildesmall", + "Adieresissmall", + "Aringsmall", + "AEsmall", + "Ccedillasmall", + "Egravesmall", + "Eacutesmall", + "Ecircumflexsmall", + "Edieresissmall", + "Igravesmall", + "Iacutesmall", + "Icircumflexsmall", + "Idieresissmall", + "Ethsmall", + "Ntildesmall", + "Ogravesmall", + "Oacutesmall", + "Ocircumflexsmall", + "Otildesmall", + "Odieresissmall", + "OEsmall", + "Oslashsmall", + "Ugravesmall", + "Uacutesmall", + "Ucircumflexsmall", + "Udieresissmall", + "Yacutesmall", + "Thornsmall", + "Ydieresissmall", + "001.000", + "001.001", + "001.002", + "001.003", + "Black", + "Bold", + "Book", + "Light", + "Medium", + "Regular", + "Roman", + "Semibold", + ], + bi = 391, + Di = [ + null, + { id: "hstem", min: 2, stackClearing: !0, stem: !0 }, + null, + { id: "vstem", min: 2, stackClearing: !0, stem: !0 }, + { id: "vmoveto", min: 1, stackClearing: !0 }, + { id: "rlineto", min: 2, resetStack: !0 }, + { id: "hlineto", min: 1, resetStack: !0 }, + { id: "vlineto", min: 1, resetStack: !0 }, + { id: "rrcurveto", min: 6, resetStack: !0 }, + null, + { id: "callsubr", min: 1, undefStack: !0 }, + { id: "return", min: 0, undefStack: !0 }, + null, + null, + { id: "endchar", min: 0, stackClearing: !0 }, + null, + null, + null, + { id: "hstemhm", min: 2, stackClearing: !0, stem: !0 }, + { id: "hintmask", min: 0, stackClearing: !0 }, + { id: "cntrmask", min: 0, stackClearing: !0 }, + { id: "rmoveto", min: 2, stackClearing: !0 }, + { id: "hmoveto", min: 1, stackClearing: !0 }, + { id: "vstemhm", min: 2, stackClearing: !0, stem: !0 }, + { id: "rcurveline", min: 8, resetStack: !0 }, + { id: "rlinecurve", min: 8, resetStack: !0 }, + { id: "vvcurveto", min: 4, resetStack: !0 }, + { id: "hhcurveto", min: 4, resetStack: !0 }, + null, + { id: "callgsubr", min: 1, undefStack: !0 }, + { id: "vhcurveto", min: 4, resetStack: !0 }, + { id: "hvcurveto", min: 4, resetStack: !0 }, + ], + Fi = [ + null, + null, + null, + { id: "and", min: 2, stackDelta: -1 }, + { id: "or", min: 2, stackDelta: -1 }, + { id: "not", min: 1, stackDelta: 0 }, + null, + null, + null, + { id: "abs", min: 1, stackDelta: 0 }, + { + id: "add", + min: 2, + stackDelta: -1, + stackFn(e, t) { + e[t - 2] = e[t - 2] + e[t - 1]; + }, + }, + { + id: "sub", + min: 2, + stackDelta: -1, + stackFn(e, t) { + e[t - 2] = e[t - 2] - e[t - 1]; + }, + }, + { + id: "div", + min: 2, + stackDelta: -1, + stackFn(e, t) { + e[t - 2] = e[t - 2] / e[t - 1]; + }, + }, + null, + { + id: "neg", + min: 1, + stackDelta: 0, + stackFn(e, t) { + e[t - 1] = -e[t - 1]; + }, + }, + { id: "eq", min: 2, stackDelta: -1 }, + null, + null, + { id: "drop", min: 1, stackDelta: -1 }, + null, + { id: "put", min: 2, stackDelta: -2 }, + { id: "get", min: 1, stackDelta: 0 }, + { id: "ifelse", min: 4, stackDelta: -3 }, + { id: "random", min: 0, stackDelta: 1 }, + { + id: "mul", + min: 2, + stackDelta: -1, + stackFn(e, t) { + e[t - 2] = e[t - 2] * e[t - 1]; + }, + }, + null, + { id: "sqrt", min: 1, stackDelta: 0 }, + { id: "dup", min: 1, stackDelta: 1 }, + { id: "exch", min: 2, stackDelta: 0 }, + { id: "index", min: 2, stackDelta: 0 }, + { id: "roll", min: 3, stackDelta: -2 }, + null, + null, + null, + { id: "hflex", min: 7, resetStack: !0 }, + { id: "flex", min: 13, resetStack: !0 }, + { id: "hflex1", min: 9, resetStack: !0 }, + { id: "flex1", min: 11, resetStack: !0 }, + ]; +class CFFParser { + constructor(e, t, i) { + this.bytes = e.getBytes(); + this.properties = t; + this.seacAnalysisEnabled = !!i; + } + parse() { + const e = this.properties, + t = new CFF(); + this.cff = t; + const i = this.parseHeader(), + a = this.parseIndex(i.endPos), + s = this.parseIndex(a.endPos), + r = this.parseIndex(s.endPos), + n = this.parseIndex(r.endPos), + o = this.parseDict(s.obj.get(0)), + g = this.createDict(CFFTopDict, o, t.strings); + t.header = i.obj; + t.names = this.parseNameIndex(a.obj); + t.strings = this.parseStringIndex(r.obj); + t.topDict = g; + t.globalSubrIndex = n.obj; + this.parsePrivateDict(t.topDict); + t.isCIDFont = g.hasName("ROS"); + const c = g.getByName("CharStrings"), + h = this.parseIndex(c).obj, + l = g.getByName("FontMatrix"); + l && (e.fontMatrix = l); + const C = g.getByName("FontBBox"); + if (C) { + e.ascent = Math.max(C[3], C[1]); + e.descent = Math.min(C[1], C[3]); + e.ascentScaled = !0; + } + let Q, E; + if (t.isCIDFont) { + const e = this.parseIndex(g.getByName("FDArray")).obj; + for (let i = 0, a = e.count; i < a; ++i) { + const a = e.get(i), + s = this.createDict(CFFTopDict, this.parseDict(a), t.strings); + this.parsePrivateDict(s); + t.fdArray.push(s); + } + E = null; + Q = this.parseCharsets(g.getByName("charset"), h.count, t.strings, !0); + t.fdSelect = this.parseFDSelect(g.getByName("FDSelect"), h.count); + } else { + Q = this.parseCharsets(g.getByName("charset"), h.count, t.strings, !1); + E = this.parseEncoding(g.getByName("Encoding"), e, t.strings, Q.charset); + } + t.charset = Q; + t.encoding = E; + const u = this.parseCharStrings({ + charStrings: h, + localSubrIndex: g.privateDict.subrsIndex, + globalSubrIndex: n.obj, + fdSelect: t.fdSelect, + fdArray: t.fdArray, + privateDict: g.privateDict, + }); + t.charStrings = u.charStrings; + t.seacs = u.seacs; + t.widths = u.widths; + return t; + } + parseHeader() { + let e = this.bytes; + const t = e.length; + let i = 0; + for (; i < t && 1 !== e[i]; ) ++i; + if (i >= t) throw new FormatError("Invalid CFF header"); + if (0 !== i) { + info("cff data is shifted"); + e = e.subarray(i); + this.bytes = e; + } + const a = e[0], + s = e[1], + r = e[2], + n = e[3]; + return { obj: new CFFHeader(a, s, r, n), endPos: r }; + } + parseDict(e) { + let t = 0; + function parseOperand() { + let i = e[t++]; + if (30 === i) + return (function parseFloatOperand() { + let i = ""; + const a = 15, + s = [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + ".", + "E", + "E-", + null, + "-", + ], + r = e.length; + for (; t < r; ) { + const r = e[t++], + n = r >> 4, + o = 15 & r; + if (n === a) break; + i += s[n]; + if (o === a) break; + i += s[o]; + } + return parseFloat(i); + })(); + if (28 === i) { + i = e[t++]; + i = ((i << 24) | (e[t++] << 16)) >> 16; + return i; + } + if (29 === i) { + i = e[t++]; + i = (i << 8) | e[t++]; + i = (i << 8) | e[t++]; + i = (i << 8) | e[t++]; + return i; + } + if (i >= 32 && i <= 246) return i - 139; + if (i >= 247 && i <= 250) return 256 * (i - 247) + e[t++] + 108; + if (i >= 251 && i <= 254) return -256 * (i - 251) - e[t++] - 108; + warn('CFFParser_parseDict: "' + i + '" is a reserved command.'); + return NaN; + } + let i = []; + const a = []; + t = 0; + const s = e.length; + for (; t < s; ) { + let s = e[t]; + if (s <= 21) { + 12 === s && (s = (s << 8) | e[++t]); + a.push([s, i]); + i = []; + ++t; + } else i.push(parseOperand()); + } + return a; + } + parseIndex(e) { + const t = new CFFIndex(), + i = this.bytes, + a = (i[e++] << 8) | i[e++], + s = []; + let r, + n, + o = e; + if (0 !== a) { + const t = i[e++], + g = e + (a + 1) * t - 1; + for (r = 0, n = a + 1; r < n; ++r) { + let a = 0; + for (let s = 0; s < t; ++s) { + a <<= 8; + a += i[e++]; + } + s.push(g + a); + } + o = s[a]; + } + for (r = 0, n = s.length - 1; r < n; ++r) { + const e = s[r], + a = s[r + 1]; + t.add(i.subarray(e, a)); + } + return { obj: t, endPos: o }; + } + parseNameIndex(e) { + const t = []; + for (let i = 0, a = e.count; i < a; ++i) { + const a = e.get(i); + t.push(bytesToString(a)); + } + return t; + } + parseStringIndex(e) { + const t = new CFFStrings(); + for (let i = 0, a = e.count; i < a; ++i) { + const a = e.get(i); + t.add(bytesToString(a)); + } + return t; + } + createDict(e, t, i) { + const a = new e(i); + for (const [e, i] of t) a.setByKey(e, i); + return a; + } + parseCharString(e, t, i, a) { + if (!t || e.callDepth > 10) return !1; + let s = e.stackSize; + const r = e.stack; + let n = t.length; + for (let o = 0; o < n; ) { + const g = t[o++]; + let c = null; + if (12 === g) { + const e = t[o++]; + if (0 === e) { + t[o - 2] = 139; + t[o - 1] = 22; + s = 0; + } else c = Fi[e]; + } else if (28 === g) { + r[s] = ((t[o] << 24) | (t[o + 1] << 16)) >> 16; + o += 2; + s++; + } else if (14 === g) { + if (s >= 4) { + s -= 4; + if (this.seacAnalysisEnabled) { + e.seac = r.slice(s, s + 4); + return !1; + } + } + c = Di[g]; + } else if (g >= 32 && g <= 246) { + r[s] = g - 139; + s++; + } else if (g >= 247 && g <= 254) { + r[s] = + g < 251 + ? ((g - 247) << 8) + t[o] + 108 + : -((g - 251) << 8) - t[o] - 108; + o++; + s++; + } else if (255 === g) { + r[s] = + ((t[o] << 24) | (t[o + 1] << 16) | (t[o + 2] << 8) | t[o + 3]) / + 65536; + o += 4; + s++; + } else if (19 === g || 20 === g) { + e.hints += s >> 1; + if (0 === e.hints) { + t.copyWithin(o - 1, o, -1); + o -= 1; + n -= 1; + continue; + } + o += (e.hints + 7) >> 3; + s %= 2; + c = Di[g]; + } else { + if (10 === g || 29 === g) { + const t = 10 === g ? i : a; + if (!t) { + c = Di[g]; + warn("Missing subrsIndex for " + c.id); + return !1; + } + let n = 32768; + t.count < 1240 ? (n = 107) : t.count < 33900 && (n = 1131); + const o = r[--s] + n; + if (o < 0 || o >= t.count || isNaN(o)) { + c = Di[g]; + warn("Out of bounds subrIndex for " + c.id); + return !1; + } + e.stackSize = s; + e.callDepth++; + if (!this.parseCharString(e, t.get(o), i, a)) return !1; + e.callDepth--; + s = e.stackSize; + continue; + } + if (11 === g) { + e.stackSize = s; + return !0; + } + if (0 === g && o === t.length) { + t[o - 1] = 14; + c = Di[14]; + } else { + if (9 === g) { + t.copyWithin(o - 1, o, -1); + o -= 1; + n -= 1; + continue; + } + c = Di[g]; + } + } + if (c) { + if (c.stem) { + e.hints += s >> 1; + if (3 === g || 23 === g) e.hasVStems = !0; + else if (e.hasVStems && (1 === g || 18 === g)) { + warn("CFF stem hints are in wrong order"); + t[o - 1] = 1 === g ? 3 : 23; + } + } + if ("min" in c && !e.undefStack && s < c.min) { + warn( + "Not enough parameters for " + + c.id + + "; actual: " + + s + + ", expected: " + + c.min, + ); + if (0 === s) { + t[o - 1] = 14; + return !0; + } + return !1; + } + if (e.firstStackClearing && c.stackClearing) { + e.firstStackClearing = !1; + s -= c.min; + s >= 2 && c.stem + ? (s %= 2) + : s > 1 && + warn("Found too many parameters for stack-clearing command"); + s > 0 && (e.width = r[s - 1]); + } + if ("stackDelta" in c) { + "stackFn" in c && c.stackFn(r, s); + s += c.stackDelta; + } else if (c.stackClearing) s = 0; + else if (c.resetStack) { + s = 0; + e.undefStack = !1; + } else if (c.undefStack) { + s = 0; + e.undefStack = !0; + e.firstStackClearing = !1; + } + } + } + n < t.length && t.fill(14, n); + e.stackSize = s; + return !0; + } + parseCharStrings({ + charStrings: e, + localSubrIndex: t, + globalSubrIndex: i, + fdSelect: a, + fdArray: s, + privateDict: r, + }) { + const n = [], + o = [], + g = e.count; + for (let c = 0; c < g; c++) { + const g = e.get(c), + h = { + callDepth: 0, + stackSize: 0, + stack: [], + undefStack: !0, + hints: 0, + firstStackClearing: !0, + seac: null, + width: null, + hasVStems: !1, + }; + let l = !0, + C = null, + Q = r; + if (a && s.length) { + const e = a.getFDIndex(c); + if (-1 === e) { + warn("Glyph index is not in fd select."); + l = !1; + } + if (e >= s.length) { + warn("Invalid fd index for glyph index."); + l = !1; + } + if (l) { + Q = s[e].privateDict; + C = Q.subrsIndex; + } + } else t && (C = t); + l && (l = this.parseCharString(h, g, C, i)); + if (null !== h.width) { + const e = Q.getByName("nominalWidthX"); + o[c] = e + h.width; + } else { + const e = Q.getByName("defaultWidthX"); + o[c] = e; + } + null !== h.seac && (n[c] = h.seac); + l || e.set(c, new Uint8Array([14])); + } + return { charStrings: e, seacs: n, widths: o }; + } + emptyPrivateDictionary(e) { + const t = this.createDict(CFFPrivateDict, [], e.strings); + e.setByKey(18, [0, 0]); + e.privateDict = t; + } + parsePrivateDict(e) { + if (!e.hasName("Private")) { + this.emptyPrivateDictionary(e); + return; + } + const t = e.getByName("Private"); + if (!Array.isArray(t) || 2 !== t.length) { + e.removeByName("Private"); + return; + } + const i = t[0], + a = t[1]; + if (0 === i || a >= this.bytes.length) { + this.emptyPrivateDictionary(e); + return; + } + const s = a + i, + r = this.bytes.subarray(a, s), + n = this.parseDict(r), + o = this.createDict(CFFPrivateDict, n, e.strings); + e.privateDict = o; + 0 === o.getByName("ExpansionFactor") && + o.setByName("ExpansionFactor", 0.06); + if (!o.getByName("Subrs")) return; + const g = o.getByName("Subrs"), + c = a + g; + if (0 === g || c >= this.bytes.length) { + this.emptyPrivateDictionary(e); + return; + } + const h = this.parseIndex(c); + o.subrsIndex = h.obj; + } + parseCharsets(e, t, i, a) { + if (0 === e) return new CFFCharset(!0, Ri.ISO_ADOBE, Ci); + if (1 === e) return new CFFCharset(!0, Ri.EXPERT, Bi); + if (2 === e) return new CFFCharset(!0, Ri.EXPERT_SUBSET, Qi); + const s = this.bytes, + r = e, + n = s[e++], + o = [a ? 0 : ".notdef"]; + let g, c, h; + t -= 1; + switch (n) { + case 0: + for (h = 0; h < t; h++) { + g = (s[e++] << 8) | s[e++]; + o.push(a ? g : i.get(g)); + } + break; + case 1: + for (; o.length <= t; ) { + g = (s[e++] << 8) | s[e++]; + c = s[e++]; + for (h = 0; h <= c; h++) o.push(a ? g++ : i.get(g++)); + } + break; + case 2: + for (; o.length <= t; ) { + g = (s[e++] << 8) | s[e++]; + c = (s[e++] << 8) | s[e++]; + for (h = 0; h <= c; h++) o.push(a ? g++ : i.get(g++)); + } + break; + default: + throw new FormatError("Unknown charset format"); + } + const l = e, + C = s.subarray(r, l); + return new CFFCharset(!1, n, o, C); + } + parseEncoding(e, t, i, a) { + const s = Object.create(null), + r = this.bytes; + let n, + o, + g, + c = !1, + h = null; + if (0 === e || 1 === e) { + c = !0; + n = e; + const t = e ? Ei : fi; + for (o = 0, g = a.length; o < g; o++) { + const e = t.indexOf(a[o]); + -1 !== e && (s[e] = o); + } + } else { + const t = e; + n = r[e++]; + switch (127 & n) { + case 0: + const t = r[e++]; + for (o = 1; o <= t; o++) s[r[e++]] = o; + break; + case 1: + const i = r[e++]; + let a = 1; + for (o = 0; o < i; o++) { + const t = r[e++], + i = r[e++]; + for (let e = t; e <= t + i; e++) s[e] = a++; + } + break; + default: + throw new FormatError(`Unknown encoding format: ${n} in CFF`); + } + const g = e; + if (128 & n) { + r[t] &= 127; + !(function readSupplement() { + const t = r[e++]; + for (o = 0; o < t; o++) { + const t = r[e++], + n = (r[e++] << 8) + (255 & r[e++]); + s[t] = a.indexOf(i.get(n)); + } + })(); + } + h = r.subarray(t, g); + } + n &= 127; + return new CFFEncoding(c, n, s, h); + } + parseFDSelect(e, t) { + const i = this.bytes, + a = i[e++], + s = []; + let r; + switch (a) { + case 0: + for (r = 0; r < t; ++r) { + const t = i[e++]; + s.push(t); + } + break; + case 3: + const n = (i[e++] << 8) | i[e++]; + for (r = 0; r < n; ++r) { + let t = (i[e++] << 8) | i[e++]; + if (0 === r && 0 !== t) { + warn( + "parseFDSelect: The first range must have a first GID of 0 -- trying to recover.", + ); + t = 0; + } + const a = i[e++], + n = (i[e] << 8) | i[e + 1]; + for (let e = t; e < n; ++e) s.push(a); + } + e += 2; + break; + default: + throw new FormatError(`parseFDSelect: Unknown format "${a}".`); + } + if (s.length !== t) + throw new FormatError("parseFDSelect: Invalid font data."); + return new CFFFDSelect(a, s); + } +} +class CFF { + constructor() { + this.header = null; + this.names = []; + this.topDict = null; + this.strings = new CFFStrings(); + this.globalSubrIndex = null; + this.encoding = null; + this.charset = null; + this.charStrings = null; + this.fdArray = []; + this.fdSelect = null; + this.isCIDFont = !1; + } + duplicateFirstGlyph() { + if (this.charStrings.count >= 65535) { + warn("Not enough space in charstrings to duplicate first glyph."); + return; + } + const e = this.charStrings.get(0); + this.charStrings.add(e); + this.isCIDFont && this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0]); + } + hasGlyphId(e) { + if (e < 0 || e >= this.charStrings.count) return !1; + return this.charStrings.get(e).length > 0; + } +} +class CFFHeader { + constructor(e, t, i, a) { + this.major = e; + this.minor = t; + this.hdrSize = i; + this.offSize = a; + } +} +class CFFStrings { + constructor() { + this.strings = []; + } + get(e) { + return e >= 0 && e <= 390 + ? wi[e] + : e - bi <= this.strings.length + ? this.strings[e - bi] + : wi[0]; + } + getSID(e) { + let t = wi.indexOf(e); + if (-1 !== t) return t; + t = this.strings.indexOf(e); + return -1 !== t ? t + bi : -1; + } + add(e) { + this.strings.push(e); + } + get count() { + return this.strings.length; + } +} +class CFFIndex { + constructor() { + this.objects = []; + this.length = 0; + } + add(e) { + this.length += e.length; + this.objects.push(e); + } + set(e, t) { + this.length += t.length - this.objects[e].length; + this.objects[e] = t; + } + get(e) { + return this.objects[e]; + } + get count() { + return this.objects.length; + } +} +class CFFDict { + constructor(e, t) { + this.keyToNameMap = e.keyToNameMap; + this.nameToKeyMap = e.nameToKeyMap; + this.defaults = e.defaults; + this.types = e.types; + this.opcodes = e.opcodes; + this.order = e.order; + this.strings = t; + this.values = Object.create(null); + } + setByKey(e, t) { + if (!(e in this.keyToNameMap)) return !1; + if (0 === t.length) return !0; + for (const i of t) + if (isNaN(i)) { + warn(`Invalid CFFDict value: "${t}" for key "${e}".`); + return !0; + } + const i = this.types[e]; + ("num" !== i && "sid" !== i && "offset" !== i) || (t = t[0]); + this.values[e] = t; + return !0; + } + setByName(e, t) { + if (!(e in this.nameToKeyMap)) + throw new FormatError(`Invalid dictionary name "${e}"`); + this.values[this.nameToKeyMap[e]] = t; + } + hasName(e) { + return this.nameToKeyMap[e] in this.values; + } + getByName(e) { + if (!(e in this.nameToKeyMap)) + throw new FormatError(`Invalid dictionary name ${e}"`); + const t = this.nameToKeyMap[e]; + return t in this.values ? this.values[t] : this.defaults[t]; + } + removeByName(e) { + delete this.values[this.nameToKeyMap[e]]; + } + static createTables(e) { + const t = { + keyToNameMap: {}, + nameToKeyMap: {}, + defaults: {}, + types: {}, + opcodes: {}, + order: [], + }; + for (const i of e) { + const e = Array.isArray(i[0]) ? (i[0][0] << 8) + i[0][1] : i[0]; + t.keyToNameMap[e] = i[1]; + t.nameToKeyMap[i[1]] = e; + t.types[e] = i[2]; + t.defaults[e] = i[3]; + t.opcodes[e] = Array.isArray(i[0]) ? i[0] : [i[0]]; + t.order.push(e); + } + return t; + } +} +const Si = [ + [[12, 30], "ROS", ["sid", "sid", "num"], null], + [[12, 20], "SyntheticBase", "num", null], + [0, "version", "sid", null], + [1, "Notice", "sid", null], + [[12, 0], "Copyright", "sid", null], + [2, "FullName", "sid", null], + [3, "FamilyName", "sid", null], + [4, "Weight", "sid", null], + [[12, 1], "isFixedPitch", "num", 0], + [[12, 2], "ItalicAngle", "num", 0], + [[12, 3], "UnderlinePosition", "num", -100], + [[12, 4], "UnderlineThickness", "num", 50], + [[12, 5], "PaintType", "num", 0], + [[12, 6], "CharstringType", "num", 2], + [ + [12, 7], + "FontMatrix", + ["num", "num", "num", "num", "num", "num"], + [0.001, 0, 0, 0.001, 0, 0], + ], + [13, "UniqueID", "num", null], + [5, "FontBBox", ["num", "num", "num", "num"], [0, 0, 0, 0]], + [[12, 8], "StrokeWidth", "num", 0], + [14, "XUID", "array", null], + [15, "charset", "offset", 0], + [16, "Encoding", "offset", 0], + [17, "CharStrings", "offset", 0], + [18, "Private", ["offset", "offset"], null], + [[12, 21], "PostScript", "sid", null], + [[12, 22], "BaseFontName", "sid", null], + [[12, 23], "BaseFontBlend", "delta", null], + [[12, 31], "CIDFontVersion", "num", 0], + [[12, 32], "CIDFontRevision", "num", 0], + [[12, 33], "CIDFontType", "num", 0], + [[12, 34], "CIDCount", "num", 8720], + [[12, 35], "UIDBase", "num", null], + [[12, 37], "FDSelect", "offset", null], + [[12, 36], "FDArray", "offset", null], + [[12, 38], "FontName", "sid", null], +]; +class CFFTopDict extends CFFDict { + static get tables() { + return shadow(this, "tables", this.createTables(Si)); + } + constructor(e) { + super(CFFTopDict.tables, e); + this.privateDict = null; + } +} +const ki = [ + [6, "BlueValues", "delta", null], + [7, "OtherBlues", "delta", null], + [8, "FamilyBlues", "delta", null], + [9, "FamilyOtherBlues", "delta", null], + [[12, 9], "BlueScale", "num", 0.039625], + [[12, 10], "BlueShift", "num", 7], + [[12, 11], "BlueFuzz", "num", 1], + [10, "StdHW", "num", null], + [11, "StdVW", "num", null], + [[12, 12], "StemSnapH", "delta", null], + [[12, 13], "StemSnapV", "delta", null], + [[12, 14], "ForceBold", "num", 0], + [[12, 17], "LanguageGroup", "num", 0], + [[12, 18], "ExpansionFactor", "num", 0.06], + [[12, 19], "initialRandomSeed", "num", 0], + [20, "defaultWidthX", "num", 0], + [21, "nominalWidthX", "num", 0], + [19, "Subrs", "offset", null], +]; +class CFFPrivateDict extends CFFDict { + static get tables() { + return shadow(this, "tables", this.createTables(ki)); + } + constructor(e) { + super(CFFPrivateDict.tables, e); + this.subrsIndex = null; + } +} +const Ri = { ISO_ADOBE: 0, EXPERT: 1, EXPERT_SUBSET: 2 }; +class CFFCharset { + constructor(e, t, i, a) { + this.predefined = e; + this.format = t; + this.charset = i; + this.raw = a; + } +} +class CFFEncoding { + constructor(e, t, i, a) { + this.predefined = e; + this.format = t; + this.encoding = i; + this.raw = a; + } +} +class CFFFDSelect { + constructor(e, t) { + this.format = e; + this.fdSelect = t; + } + getFDIndex(e) { + return e < 0 || e >= this.fdSelect.length ? -1 : this.fdSelect[e]; + } +} +class CFFOffsetTracker { + constructor() { + this.offsets = Object.create(null); + } + isTracking(e) { + return e in this.offsets; + } + track(e, t) { + if (e in this.offsets) + throw new FormatError(`Already tracking location of ${e}`); + this.offsets[e] = t; + } + offset(e) { + for (const t in this.offsets) this.offsets[t] += e; + } + setEntryLocation(e, t, i) { + if (!(e in this.offsets)) + throw new FormatError(`Not tracking location of ${e}`); + const a = i.data, + s = this.offsets[e]; + for (let e = 0, i = t.length; e < i; ++e) { + const i = 5 * e + s, + r = i + 1, + n = i + 2, + o = i + 3, + g = i + 4; + if (29 !== a[i] || 0 !== a[r] || 0 !== a[n] || 0 !== a[o] || 0 !== a[g]) + throw new FormatError("writing to an offset that is not empty"); + const c = t[e]; + a[i] = 29; + a[r] = (c >> 24) & 255; + a[n] = (c >> 16) & 255; + a[o] = (c >> 8) & 255; + a[g] = 255 & c; + } + } +} +class CFFCompiler { + constructor(e) { + this.cff = e; + } + compile() { + const e = this.cff, + t = { + data: [], + length: 0, + add(e) { + try { + this.data.push(...e); + } catch { + this.data = this.data.concat(e); + } + this.length = this.data.length; + }, + }, + i = this.compileHeader(e.header); + t.add(i); + const a = this.compileNameIndex(e.names); + t.add(a); + if (e.isCIDFont && e.topDict.hasName("FontMatrix")) { + const t = e.topDict.getByName("FontMatrix"); + e.topDict.removeByName("FontMatrix"); + for (const i of e.fdArray) { + let e = t.slice(0); + i.hasName("FontMatrix") && + (e = Util.transform(e, i.getByName("FontMatrix"))); + i.setByName("FontMatrix", e); + } + } + const s = e.topDict.getByName("XUID"); + s?.length > 16 && e.topDict.removeByName("XUID"); + e.topDict.setByName("charset", 0); + let r = this.compileTopDicts([e.topDict], t.length, e.isCIDFont); + t.add(r.output); + const n = r.trackers[0], + o = this.compileStringIndex(e.strings.strings); + t.add(o); + const g = this.compileIndex(e.globalSubrIndex); + t.add(g); + if (e.encoding && e.topDict.hasName("Encoding")) + if (e.encoding.predefined) + n.setEntryLocation("Encoding", [e.encoding.format], t); + else { + const i = this.compileEncoding(e.encoding); + n.setEntryLocation("Encoding", [t.length], t); + t.add(i); + } + const c = this.compileCharset( + e.charset, + e.charStrings.count, + e.strings, + e.isCIDFont, + ); + n.setEntryLocation("charset", [t.length], t); + t.add(c); + const h = this.compileCharStrings(e.charStrings); + n.setEntryLocation("CharStrings", [t.length], t); + t.add(h); + if (e.isCIDFont) { + n.setEntryLocation("FDSelect", [t.length], t); + const i = this.compileFDSelect(e.fdSelect); + t.add(i); + r = this.compileTopDicts(e.fdArray, t.length, !0); + n.setEntryLocation("FDArray", [t.length], t); + t.add(r.output); + const a = r.trackers; + this.compilePrivateDicts(e.fdArray, a, t); + } + this.compilePrivateDicts([e.topDict], [n], t); + t.add([0]); + return t.data; + } + encodeNumber(e) { + return Number.isInteger(e) ? this.encodeInteger(e) : this.encodeFloat(e); + } + static get EncodeFloatRegExp() { + return shadow( + this, + "EncodeFloatRegExp", + /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/, + ); + } + encodeFloat(e) { + let t = e.toString(); + const i = CFFCompiler.EncodeFloatRegExp.exec(t); + if (i) { + const a = parseFloat("1e" + ((i[2] ? +i[2] : 0) + i[1].length)); + t = (Math.round(e * a) / a).toString(); + } + let a, + s, + r = ""; + for (a = 0, s = t.length; a < s; ++a) { + const e = t[a]; + r += + "e" === e + ? "-" === t[++a] + ? "c" + : "b" + : "." === e + ? "a" + : "-" === e + ? "e" + : e; + } + r += 1 & r.length ? "f" : "ff"; + const n = [30]; + for (a = 0, s = r.length; a < s; a += 2) + n.push(parseInt(r.substring(a, a + 2), 16)); + return n; + } + encodeInteger(e) { + let t; + t = + e >= -107 && e <= 107 + ? [e + 139] + : e >= 108 && e <= 1131 + ? [247 + ((e -= 108) >> 8), 255 & e] + : e >= -1131 && e <= -108 + ? [251 + ((e = -e - 108) >> 8), 255 & e] + : e >= -32768 && e <= 32767 + ? [28, (e >> 8) & 255, 255 & e] + : [29, (e >> 24) & 255, (e >> 16) & 255, (e >> 8) & 255, 255 & e]; + return t; + } + compileHeader(e) { + return [e.major, e.minor, 4, e.offSize]; + } + compileNameIndex(e) { + const t = new CFFIndex(); + for (const i of e) { + const e = Math.min(i.length, 127); + let a = new Array(e); + for (let t = 0; t < e; t++) { + let e = i[t]; + (e < "!" || + e > "~" || + "[" === e || + "]" === e || + "(" === e || + ")" === e || + "{" === e || + "}" === e || + "<" === e || + ">" === e || + "/" === e || + "%" === e) && + (e = "_"); + a[t] = e; + } + a = a.join(""); + "" === a && (a = "Bad_Font_Name"); + t.add(stringToBytes(a)); + } + return this.compileIndex(t); + } + compileTopDicts(e, t, i) { + const a = []; + let s = new CFFIndex(); + for (const r of e) { + if (i) { + r.removeByName("CIDFontVersion"); + r.removeByName("CIDFontRevision"); + r.removeByName("CIDFontType"); + r.removeByName("CIDCount"); + r.removeByName("UIDBase"); + } + const e = new CFFOffsetTracker(), + n = this.compileDict(r, e); + a.push(e); + s.add(n); + e.offset(t); + } + s = this.compileIndex(s, a); + return { trackers: a, output: s }; + } + compilePrivateDicts(e, t, i) { + for (let a = 0, s = e.length; a < s; ++a) { + const s = e[a], + r = s.privateDict; + if (!r || !s.hasName("Private")) + throw new FormatError("There must be a private dictionary."); + const n = new CFFOffsetTracker(), + o = this.compileDict(r, n); + let g = i.length; + n.offset(g); + o.length || (g = 0); + t[a].setEntryLocation("Private", [o.length, g], i); + i.add(o); + if (r.subrsIndex && r.hasName("Subrs")) { + const e = this.compileIndex(r.subrsIndex); + n.setEntryLocation("Subrs", [o.length], i); + i.add(e); + } + } + } + compileDict(e, t) { + const i = []; + for (const a of e.order) { + if (!(a in e.values)) continue; + let s = e.values[a], + r = e.types[a]; + Array.isArray(r) || (r = [r]); + Array.isArray(s) || (s = [s]); + if (0 !== s.length) { + for (let n = 0, o = r.length; n < o; ++n) { + const o = r[n], + g = s[n]; + switch (o) { + case "num": + case "sid": + i.push(...this.encodeNumber(g)); + break; + case "offset": + const r = e.keyToNameMap[a]; + t.isTracking(r) || t.track(r, i.length); + i.push(29, 0, 0, 0, 0); + break; + case "array": + case "delta": + i.push(...this.encodeNumber(g)); + for (let e = 1, t = s.length; e < t; ++e) + i.push(...this.encodeNumber(s[e])); + break; + default: + throw new FormatError(`Unknown data type of ${o}`); + } + } + i.push(...e.opcodes[a]); + } + } + return i; + } + compileStringIndex(e) { + const t = new CFFIndex(); + for (const i of e) t.add(stringToBytes(i)); + return this.compileIndex(t); + } + compileCharStrings(e) { + const t = new CFFIndex(); + for (let i = 0; i < e.count; i++) { + const a = e.get(i); + 0 !== a.length ? t.add(a) : t.add(new Uint8Array([139, 14])); + } + return this.compileIndex(t); + } + compileCharset(e, t, i, a) { + let s; + const r = t - 1; + if (a) s = new Uint8Array([2, 0, 0, (r >> 8) & 255, 255 & r]); + else { + s = new Uint8Array(1 + 2 * r); + s[0] = 0; + let t = 0; + const a = e.charset.length; + let n = !1; + for (let r = 1; r < s.length; r += 2) { + let o = 0; + if (t < a) { + const a = e.charset[t++]; + o = i.getSID(a); + if (-1 === o) { + o = 0; + if (!n) { + n = !0; + warn(`Couldn't find ${a} in CFF strings`); + } + } + } + s[r] = (o >> 8) & 255; + s[r + 1] = 255 & o; + } + } + return this.compileTypedArray(s); + } + compileEncoding(e) { + return this.compileTypedArray(e.raw); + } + compileFDSelect(e) { + const t = e.format; + let i, a; + switch (t) { + case 0: + i = new Uint8Array(1 + e.fdSelect.length); + i[0] = t; + for (a = 0; a < e.fdSelect.length; a++) i[a + 1] = e.fdSelect[a]; + break; + case 3: + const s = 0; + let r = e.fdSelect[0]; + const n = [t, 0, 0, (s >> 8) & 255, 255 & s, r]; + for (a = 1; a < e.fdSelect.length; a++) { + const t = e.fdSelect[a]; + if (t !== r) { + n.push((a >> 8) & 255, 255 & a, t); + r = t; + } + } + const o = (n.length - 3) / 3; + n[1] = (o >> 8) & 255; + n[2] = 255 & o; + n.push((a >> 8) & 255, 255 & a); + i = new Uint8Array(n); + } + return this.compileTypedArray(i); + } + compileTypedArray(e) { + return Array.from(e); + } + compileIndex(e, t = []) { + const i = e.objects, + a = i.length; + if (0 === a) return [0, 0]; + const s = [(a >> 8) & 255, 255 & a]; + let r, + n, + o = 1; + for (r = 0; r < a; ++r) o += i[r].length; + n = o < 256 ? 1 : o < 65536 ? 2 : o < 16777216 ? 3 : 4; + s.push(n); + let g = 1; + for (r = 0; r < a + 1; r++) { + 1 === n + ? s.push(255 & g) + : 2 === n + ? s.push((g >> 8) & 255, 255 & g) + : 3 === n + ? s.push((g >> 16) & 255, (g >> 8) & 255, 255 & g) + : s.push( + (g >>> 24) & 255, + (g >> 16) & 255, + (g >> 8) & 255, + 255 & g, + ); + i[r] && (g += i[r].length); + } + for (r = 0; r < a; r++) { + t[r] && t[r].offset(s.length); + s.push(...i[r]); + } + return s; + } +} +const Ni = getLookupTableFactory(function (e) { + e.A = 65; + e.AE = 198; + e.AEacute = 508; + e.AEmacron = 482; + e.AEsmall = 63462; + e.Aacute = 193; + e.Aacutesmall = 63457; + e.Abreve = 258; + e.Abreveacute = 7854; + e.Abrevecyrillic = 1232; + e.Abrevedotbelow = 7862; + e.Abrevegrave = 7856; + e.Abrevehookabove = 7858; + e.Abrevetilde = 7860; + e.Acaron = 461; + e.Acircle = 9398; + e.Acircumflex = 194; + e.Acircumflexacute = 7844; + e.Acircumflexdotbelow = 7852; + e.Acircumflexgrave = 7846; + e.Acircumflexhookabove = 7848; + e.Acircumflexsmall = 63458; + e.Acircumflextilde = 7850; + e.Acute = 63177; + e.Acutesmall = 63412; + e.Acyrillic = 1040; + e.Adblgrave = 512; + e.Adieresis = 196; + e.Adieresiscyrillic = 1234; + e.Adieresismacron = 478; + e.Adieresissmall = 63460; + e.Adotbelow = 7840; + e.Adotmacron = 480; + e.Agrave = 192; + e.Agravesmall = 63456; + e.Ahookabove = 7842; + e.Aiecyrillic = 1236; + e.Ainvertedbreve = 514; + e.Alpha = 913; + e.Alphatonos = 902; + e.Amacron = 256; + e.Amonospace = 65313; + e.Aogonek = 260; + e.Aring = 197; + e.Aringacute = 506; + e.Aringbelow = 7680; + e.Aringsmall = 63461; + e.Asmall = 63329; + e.Atilde = 195; + e.Atildesmall = 63459; + e.Aybarmenian = 1329; + e.B = 66; + e.Bcircle = 9399; + e.Bdotaccent = 7682; + e.Bdotbelow = 7684; + e.Becyrillic = 1041; + e.Benarmenian = 1330; + e.Beta = 914; + e.Bhook = 385; + e.Blinebelow = 7686; + e.Bmonospace = 65314; + e.Brevesmall = 63220; + e.Bsmall = 63330; + e.Btopbar = 386; + e.C = 67; + e.Caarmenian = 1342; + e.Cacute = 262; + e.Caron = 63178; + e.Caronsmall = 63221; + e.Ccaron = 268; + e.Ccedilla = 199; + e.Ccedillaacute = 7688; + e.Ccedillasmall = 63463; + e.Ccircle = 9400; + e.Ccircumflex = 264; + e.Cdot = 266; + e.Cdotaccent = 266; + e.Cedillasmall = 63416; + e.Chaarmenian = 1353; + e.Cheabkhasiancyrillic = 1212; + e.Checyrillic = 1063; + e.Chedescenderabkhasiancyrillic = 1214; + e.Chedescendercyrillic = 1206; + e.Chedieresiscyrillic = 1268; + e.Cheharmenian = 1347; + e.Chekhakassiancyrillic = 1227; + e.Cheverticalstrokecyrillic = 1208; + e.Chi = 935; + e.Chook = 391; + e.Circumflexsmall = 63222; + e.Cmonospace = 65315; + e.Coarmenian = 1361; + e.Csmall = 63331; + e.D = 68; + e.DZ = 497; + e.DZcaron = 452; + e.Daarmenian = 1332; + e.Dafrican = 393; + e.Dcaron = 270; + e.Dcedilla = 7696; + e.Dcircle = 9401; + e.Dcircumflexbelow = 7698; + e.Dcroat = 272; + e.Ddotaccent = 7690; + e.Ddotbelow = 7692; + e.Decyrillic = 1044; + e.Deicoptic = 1006; + e.Delta = 8710; + e.Deltagreek = 916; + e.Dhook = 394; + e.Dieresis = 63179; + e.DieresisAcute = 63180; + e.DieresisGrave = 63181; + e.Dieresissmall = 63400; + e.Digammagreek = 988; + e.Djecyrillic = 1026; + e.Dlinebelow = 7694; + e.Dmonospace = 65316; + e.Dotaccentsmall = 63223; + e.Dslash = 272; + e.Dsmall = 63332; + e.Dtopbar = 395; + e.Dz = 498; + e.Dzcaron = 453; + e.Dzeabkhasiancyrillic = 1248; + e.Dzecyrillic = 1029; + e.Dzhecyrillic = 1039; + e.E = 69; + e.Eacute = 201; + e.Eacutesmall = 63465; + e.Ebreve = 276; + e.Ecaron = 282; + e.Ecedillabreve = 7708; + e.Echarmenian = 1333; + e.Ecircle = 9402; + e.Ecircumflex = 202; + e.Ecircumflexacute = 7870; + e.Ecircumflexbelow = 7704; + e.Ecircumflexdotbelow = 7878; + e.Ecircumflexgrave = 7872; + e.Ecircumflexhookabove = 7874; + e.Ecircumflexsmall = 63466; + e.Ecircumflextilde = 7876; + e.Ecyrillic = 1028; + e.Edblgrave = 516; + e.Edieresis = 203; + e.Edieresissmall = 63467; + e.Edot = 278; + e.Edotaccent = 278; + e.Edotbelow = 7864; + e.Efcyrillic = 1060; + e.Egrave = 200; + e.Egravesmall = 63464; + e.Eharmenian = 1335; + e.Ehookabove = 7866; + e.Eightroman = 8551; + e.Einvertedbreve = 518; + e.Eiotifiedcyrillic = 1124; + e.Elcyrillic = 1051; + e.Elevenroman = 8554; + e.Emacron = 274; + e.Emacronacute = 7702; + e.Emacrongrave = 7700; + e.Emcyrillic = 1052; + e.Emonospace = 65317; + e.Encyrillic = 1053; + e.Endescendercyrillic = 1186; + e.Eng = 330; + e.Enghecyrillic = 1188; + e.Enhookcyrillic = 1223; + e.Eogonek = 280; + e.Eopen = 400; + e.Epsilon = 917; + e.Epsilontonos = 904; + e.Ercyrillic = 1056; + e.Ereversed = 398; + e.Ereversedcyrillic = 1069; + e.Escyrillic = 1057; + e.Esdescendercyrillic = 1194; + e.Esh = 425; + e.Esmall = 63333; + e.Eta = 919; + e.Etarmenian = 1336; + e.Etatonos = 905; + e.Eth = 208; + e.Ethsmall = 63472; + e.Etilde = 7868; + e.Etildebelow = 7706; + e.Euro = 8364; + e.Ezh = 439; + e.Ezhcaron = 494; + e.Ezhreversed = 440; + e.F = 70; + e.Fcircle = 9403; + e.Fdotaccent = 7710; + e.Feharmenian = 1366; + e.Feicoptic = 996; + e.Fhook = 401; + e.Fitacyrillic = 1138; + e.Fiveroman = 8548; + e.Fmonospace = 65318; + e.Fourroman = 8547; + e.Fsmall = 63334; + e.G = 71; + e.GBsquare = 13191; + e.Gacute = 500; + e.Gamma = 915; + e.Gammaafrican = 404; + e.Gangiacoptic = 1002; + e.Gbreve = 286; + e.Gcaron = 486; + e.Gcedilla = 290; + e.Gcircle = 9404; + e.Gcircumflex = 284; + e.Gcommaaccent = 290; + e.Gdot = 288; + e.Gdotaccent = 288; + e.Gecyrillic = 1043; + e.Ghadarmenian = 1346; + e.Ghemiddlehookcyrillic = 1172; + e.Ghestrokecyrillic = 1170; + e.Gheupturncyrillic = 1168; + e.Ghook = 403; + e.Gimarmenian = 1331; + e.Gjecyrillic = 1027; + e.Gmacron = 7712; + e.Gmonospace = 65319; + e.Grave = 63182; + e.Gravesmall = 63328; + e.Gsmall = 63335; + e.Gsmallhook = 667; + e.Gstroke = 484; + e.H = 72; + e.H18533 = 9679; + e.H18543 = 9642; + e.H18551 = 9643; + e.H22073 = 9633; + e.HPsquare = 13259; + e.Haabkhasiancyrillic = 1192; + e.Hadescendercyrillic = 1202; + e.Hardsigncyrillic = 1066; + e.Hbar = 294; + e.Hbrevebelow = 7722; + e.Hcedilla = 7720; + e.Hcircle = 9405; + e.Hcircumflex = 292; + e.Hdieresis = 7718; + e.Hdotaccent = 7714; + e.Hdotbelow = 7716; + e.Hmonospace = 65320; + e.Hoarmenian = 1344; + e.Horicoptic = 1e3; + e.Hsmall = 63336; + e.Hungarumlaut = 63183; + e.Hungarumlautsmall = 63224; + e.Hzsquare = 13200; + e.I = 73; + e.IAcyrillic = 1071; + e.IJ = 306; + e.IUcyrillic = 1070; + e.Iacute = 205; + e.Iacutesmall = 63469; + e.Ibreve = 300; + e.Icaron = 463; + e.Icircle = 9406; + e.Icircumflex = 206; + e.Icircumflexsmall = 63470; + e.Icyrillic = 1030; + e.Idblgrave = 520; + e.Idieresis = 207; + e.Idieresisacute = 7726; + e.Idieresiscyrillic = 1252; + e.Idieresissmall = 63471; + e.Idot = 304; + e.Idotaccent = 304; + e.Idotbelow = 7882; + e.Iebrevecyrillic = 1238; + e.Iecyrillic = 1045; + e.Ifraktur = 8465; + e.Igrave = 204; + e.Igravesmall = 63468; + e.Ihookabove = 7880; + e.Iicyrillic = 1048; + e.Iinvertedbreve = 522; + e.Iishortcyrillic = 1049; + e.Imacron = 298; + e.Imacroncyrillic = 1250; + e.Imonospace = 65321; + e.Iniarmenian = 1339; + e.Iocyrillic = 1025; + e.Iogonek = 302; + e.Iota = 921; + e.Iotaafrican = 406; + e.Iotadieresis = 938; + e.Iotatonos = 906; + e.Ismall = 63337; + e.Istroke = 407; + e.Itilde = 296; + e.Itildebelow = 7724; + e.Izhitsacyrillic = 1140; + e.Izhitsadblgravecyrillic = 1142; + e.J = 74; + e.Jaarmenian = 1345; + e.Jcircle = 9407; + e.Jcircumflex = 308; + e.Jecyrillic = 1032; + e.Jheharmenian = 1355; + e.Jmonospace = 65322; + e.Jsmall = 63338; + e.K = 75; + e.KBsquare = 13189; + e.KKsquare = 13261; + e.Kabashkircyrillic = 1184; + e.Kacute = 7728; + e.Kacyrillic = 1050; + e.Kadescendercyrillic = 1178; + e.Kahookcyrillic = 1219; + e.Kappa = 922; + e.Kastrokecyrillic = 1182; + e.Kaverticalstrokecyrillic = 1180; + e.Kcaron = 488; + e.Kcedilla = 310; + e.Kcircle = 9408; + e.Kcommaaccent = 310; + e.Kdotbelow = 7730; + e.Keharmenian = 1364; + e.Kenarmenian = 1343; + e.Khacyrillic = 1061; + e.Kheicoptic = 998; + e.Khook = 408; + e.Kjecyrillic = 1036; + e.Klinebelow = 7732; + e.Kmonospace = 65323; + e.Koppacyrillic = 1152; + e.Koppagreek = 990; + e.Ksicyrillic = 1134; + e.Ksmall = 63339; + e.L = 76; + e.LJ = 455; + e.LL = 63167; + e.Lacute = 313; + e.Lambda = 923; + e.Lcaron = 317; + e.Lcedilla = 315; + e.Lcircle = 9409; + e.Lcircumflexbelow = 7740; + e.Lcommaaccent = 315; + e.Ldot = 319; + e.Ldotaccent = 319; + e.Ldotbelow = 7734; + e.Ldotbelowmacron = 7736; + e.Liwnarmenian = 1340; + e.Lj = 456; + e.Ljecyrillic = 1033; + e.Llinebelow = 7738; + e.Lmonospace = 65324; + e.Lslash = 321; + e.Lslashsmall = 63225; + e.Lsmall = 63340; + e.M = 77; + e.MBsquare = 13190; + e.Macron = 63184; + e.Macronsmall = 63407; + e.Macute = 7742; + e.Mcircle = 9410; + e.Mdotaccent = 7744; + e.Mdotbelow = 7746; + e.Menarmenian = 1348; + e.Mmonospace = 65325; + e.Msmall = 63341; + e.Mturned = 412; + e.Mu = 924; + e.N = 78; + e.NJ = 458; + e.Nacute = 323; + e.Ncaron = 327; + e.Ncedilla = 325; + e.Ncircle = 9411; + e.Ncircumflexbelow = 7754; + e.Ncommaaccent = 325; + e.Ndotaccent = 7748; + e.Ndotbelow = 7750; + e.Nhookleft = 413; + e.Nineroman = 8552; + e.Nj = 459; + e.Njecyrillic = 1034; + e.Nlinebelow = 7752; + e.Nmonospace = 65326; + e.Nowarmenian = 1350; + e.Nsmall = 63342; + e.Ntilde = 209; + e.Ntildesmall = 63473; + e.Nu = 925; + e.O = 79; + e.OE = 338; + e.OEsmall = 63226; + e.Oacute = 211; + e.Oacutesmall = 63475; + e.Obarredcyrillic = 1256; + e.Obarreddieresiscyrillic = 1258; + e.Obreve = 334; + e.Ocaron = 465; + e.Ocenteredtilde = 415; + e.Ocircle = 9412; + e.Ocircumflex = 212; + e.Ocircumflexacute = 7888; + e.Ocircumflexdotbelow = 7896; + e.Ocircumflexgrave = 7890; + e.Ocircumflexhookabove = 7892; + e.Ocircumflexsmall = 63476; + e.Ocircumflextilde = 7894; + e.Ocyrillic = 1054; + e.Odblacute = 336; + e.Odblgrave = 524; + e.Odieresis = 214; + e.Odieresiscyrillic = 1254; + e.Odieresissmall = 63478; + e.Odotbelow = 7884; + e.Ogoneksmall = 63227; + e.Ograve = 210; + e.Ogravesmall = 63474; + e.Oharmenian = 1365; + e.Ohm = 8486; + e.Ohookabove = 7886; + e.Ohorn = 416; + e.Ohornacute = 7898; + e.Ohorndotbelow = 7906; + e.Ohorngrave = 7900; + e.Ohornhookabove = 7902; + e.Ohorntilde = 7904; + e.Ohungarumlaut = 336; + e.Oi = 418; + e.Oinvertedbreve = 526; + e.Omacron = 332; + e.Omacronacute = 7762; + e.Omacrongrave = 7760; + e.Omega = 8486; + e.Omegacyrillic = 1120; + e.Omegagreek = 937; + e.Omegaroundcyrillic = 1146; + e.Omegatitlocyrillic = 1148; + e.Omegatonos = 911; + e.Omicron = 927; + e.Omicrontonos = 908; + e.Omonospace = 65327; + e.Oneroman = 8544; + e.Oogonek = 490; + e.Oogonekmacron = 492; + e.Oopen = 390; + e.Oslash = 216; + e.Oslashacute = 510; + e.Oslashsmall = 63480; + e.Osmall = 63343; + e.Ostrokeacute = 510; + e.Otcyrillic = 1150; + e.Otilde = 213; + e.Otildeacute = 7756; + e.Otildedieresis = 7758; + e.Otildesmall = 63477; + e.P = 80; + e.Pacute = 7764; + e.Pcircle = 9413; + e.Pdotaccent = 7766; + e.Pecyrillic = 1055; + e.Peharmenian = 1354; + e.Pemiddlehookcyrillic = 1190; + e.Phi = 934; + e.Phook = 420; + e.Pi = 928; + e.Piwrarmenian = 1363; + e.Pmonospace = 65328; + e.Psi = 936; + e.Psicyrillic = 1136; + e.Psmall = 63344; + e.Q = 81; + e.Qcircle = 9414; + e.Qmonospace = 65329; + e.Qsmall = 63345; + e.R = 82; + e.Raarmenian = 1356; + e.Racute = 340; + e.Rcaron = 344; + e.Rcedilla = 342; + e.Rcircle = 9415; + e.Rcommaaccent = 342; + e.Rdblgrave = 528; + e.Rdotaccent = 7768; + e.Rdotbelow = 7770; + e.Rdotbelowmacron = 7772; + e.Reharmenian = 1360; + e.Rfraktur = 8476; + e.Rho = 929; + e.Ringsmall = 63228; + e.Rinvertedbreve = 530; + e.Rlinebelow = 7774; + e.Rmonospace = 65330; + e.Rsmall = 63346; + e.Rsmallinverted = 641; + e.Rsmallinvertedsuperior = 694; + e.S = 83; + e.SF010000 = 9484; + e.SF020000 = 9492; + e.SF030000 = 9488; + e.SF040000 = 9496; + e.SF050000 = 9532; + e.SF060000 = 9516; + e.SF070000 = 9524; + e.SF080000 = 9500; + e.SF090000 = 9508; + e.SF100000 = 9472; + e.SF110000 = 9474; + e.SF190000 = 9569; + e.SF200000 = 9570; + e.SF210000 = 9558; + e.SF220000 = 9557; + e.SF230000 = 9571; + e.SF240000 = 9553; + e.SF250000 = 9559; + e.SF260000 = 9565; + e.SF270000 = 9564; + e.SF280000 = 9563; + e.SF360000 = 9566; + e.SF370000 = 9567; + e.SF380000 = 9562; + e.SF390000 = 9556; + e.SF400000 = 9577; + e.SF410000 = 9574; + e.SF420000 = 9568; + e.SF430000 = 9552; + e.SF440000 = 9580; + e.SF450000 = 9575; + e.SF460000 = 9576; + e.SF470000 = 9572; + e.SF480000 = 9573; + e.SF490000 = 9561; + e.SF500000 = 9560; + e.SF510000 = 9554; + e.SF520000 = 9555; + e.SF530000 = 9579; + e.SF540000 = 9578; + e.Sacute = 346; + e.Sacutedotaccent = 7780; + e.Sampigreek = 992; + e.Scaron = 352; + e.Scarondotaccent = 7782; + e.Scaronsmall = 63229; + e.Scedilla = 350; + e.Schwa = 399; + e.Schwacyrillic = 1240; + e.Schwadieresiscyrillic = 1242; + e.Scircle = 9416; + e.Scircumflex = 348; + e.Scommaaccent = 536; + e.Sdotaccent = 7776; + e.Sdotbelow = 7778; + e.Sdotbelowdotaccent = 7784; + e.Seharmenian = 1357; + e.Sevenroman = 8550; + e.Shaarmenian = 1351; + e.Shacyrillic = 1064; + e.Shchacyrillic = 1065; + e.Sheicoptic = 994; + e.Shhacyrillic = 1210; + e.Shimacoptic = 1004; + e.Sigma = 931; + e.Sixroman = 8549; + e.Smonospace = 65331; + e.Softsigncyrillic = 1068; + e.Ssmall = 63347; + e.Stigmagreek = 986; + e.T = 84; + e.Tau = 932; + e.Tbar = 358; + e.Tcaron = 356; + e.Tcedilla = 354; + e.Tcircle = 9417; + e.Tcircumflexbelow = 7792; + e.Tcommaaccent = 354; + e.Tdotaccent = 7786; + e.Tdotbelow = 7788; + e.Tecyrillic = 1058; + e.Tedescendercyrillic = 1196; + e.Tenroman = 8553; + e.Tetsecyrillic = 1204; + e.Theta = 920; + e.Thook = 428; + e.Thorn = 222; + e.Thornsmall = 63486; + e.Threeroman = 8546; + e.Tildesmall = 63230; + e.Tiwnarmenian = 1359; + e.Tlinebelow = 7790; + e.Tmonospace = 65332; + e.Toarmenian = 1337; + e.Tonefive = 444; + e.Tonesix = 388; + e.Tonetwo = 423; + e.Tretroflexhook = 430; + e.Tsecyrillic = 1062; + e.Tshecyrillic = 1035; + e.Tsmall = 63348; + e.Twelveroman = 8555; + e.Tworoman = 8545; + e.U = 85; + e.Uacute = 218; + e.Uacutesmall = 63482; + e.Ubreve = 364; + e.Ucaron = 467; + e.Ucircle = 9418; + e.Ucircumflex = 219; + e.Ucircumflexbelow = 7798; + e.Ucircumflexsmall = 63483; + e.Ucyrillic = 1059; + e.Udblacute = 368; + e.Udblgrave = 532; + e.Udieresis = 220; + e.Udieresisacute = 471; + e.Udieresisbelow = 7794; + e.Udieresiscaron = 473; + e.Udieresiscyrillic = 1264; + e.Udieresisgrave = 475; + e.Udieresismacron = 469; + e.Udieresissmall = 63484; + e.Udotbelow = 7908; + e.Ugrave = 217; + e.Ugravesmall = 63481; + e.Uhookabove = 7910; + e.Uhorn = 431; + e.Uhornacute = 7912; + e.Uhorndotbelow = 7920; + e.Uhorngrave = 7914; + e.Uhornhookabove = 7916; + e.Uhorntilde = 7918; + e.Uhungarumlaut = 368; + e.Uhungarumlautcyrillic = 1266; + e.Uinvertedbreve = 534; + e.Ukcyrillic = 1144; + e.Umacron = 362; + e.Umacroncyrillic = 1262; + e.Umacrondieresis = 7802; + e.Umonospace = 65333; + e.Uogonek = 370; + e.Upsilon = 933; + e.Upsilon1 = 978; + e.Upsilonacutehooksymbolgreek = 979; + e.Upsilonafrican = 433; + e.Upsilondieresis = 939; + e.Upsilondieresishooksymbolgreek = 980; + e.Upsilonhooksymbol = 978; + e.Upsilontonos = 910; + e.Uring = 366; + e.Ushortcyrillic = 1038; + e.Usmall = 63349; + e.Ustraightcyrillic = 1198; + e.Ustraightstrokecyrillic = 1200; + e.Utilde = 360; + e.Utildeacute = 7800; + e.Utildebelow = 7796; + e.V = 86; + e.Vcircle = 9419; + e.Vdotbelow = 7806; + e.Vecyrillic = 1042; + e.Vewarmenian = 1358; + e.Vhook = 434; + e.Vmonospace = 65334; + e.Voarmenian = 1352; + e.Vsmall = 63350; + e.Vtilde = 7804; + e.W = 87; + e.Wacute = 7810; + e.Wcircle = 9420; + e.Wcircumflex = 372; + e.Wdieresis = 7812; + e.Wdotaccent = 7814; + e.Wdotbelow = 7816; + e.Wgrave = 7808; + e.Wmonospace = 65335; + e.Wsmall = 63351; + e.X = 88; + e.Xcircle = 9421; + e.Xdieresis = 7820; + e.Xdotaccent = 7818; + e.Xeharmenian = 1341; + e.Xi = 926; + e.Xmonospace = 65336; + e.Xsmall = 63352; + e.Y = 89; + e.Yacute = 221; + e.Yacutesmall = 63485; + e.Yatcyrillic = 1122; + e.Ycircle = 9422; + e.Ycircumflex = 374; + e.Ydieresis = 376; + e.Ydieresissmall = 63487; + e.Ydotaccent = 7822; + e.Ydotbelow = 7924; + e.Yericyrillic = 1067; + e.Yerudieresiscyrillic = 1272; + e.Ygrave = 7922; + e.Yhook = 435; + e.Yhookabove = 7926; + e.Yiarmenian = 1349; + e.Yicyrillic = 1031; + e.Yiwnarmenian = 1362; + e.Ymonospace = 65337; + e.Ysmall = 63353; + e.Ytilde = 7928; + e.Yusbigcyrillic = 1130; + e.Yusbigiotifiedcyrillic = 1132; + e.Yuslittlecyrillic = 1126; + e.Yuslittleiotifiedcyrillic = 1128; + e.Z = 90; + e.Zaarmenian = 1334; + e.Zacute = 377; + e.Zcaron = 381; + e.Zcaronsmall = 63231; + e.Zcircle = 9423; + e.Zcircumflex = 7824; + e.Zdot = 379; + e.Zdotaccent = 379; + e.Zdotbelow = 7826; + e.Zecyrillic = 1047; + e.Zedescendercyrillic = 1176; + e.Zedieresiscyrillic = 1246; + e.Zeta = 918; + e.Zhearmenian = 1338; + e.Zhebrevecyrillic = 1217; + e.Zhecyrillic = 1046; + e.Zhedescendercyrillic = 1174; + e.Zhedieresiscyrillic = 1244; + e.Zlinebelow = 7828; + e.Zmonospace = 65338; + e.Zsmall = 63354; + e.Zstroke = 437; + e.a = 97; + e.aabengali = 2438; + e.aacute = 225; + e.aadeva = 2310; + e.aagujarati = 2694; + e.aagurmukhi = 2566; + e.aamatragurmukhi = 2622; + e.aarusquare = 13059; + e.aavowelsignbengali = 2494; + e.aavowelsigndeva = 2366; + e.aavowelsigngujarati = 2750; + e.abbreviationmarkarmenian = 1375; + e.abbreviationsigndeva = 2416; + e.abengali = 2437; + e.abopomofo = 12570; + e.abreve = 259; + e.abreveacute = 7855; + e.abrevecyrillic = 1233; + e.abrevedotbelow = 7863; + e.abrevegrave = 7857; + e.abrevehookabove = 7859; + e.abrevetilde = 7861; + e.acaron = 462; + e.acircle = 9424; + e.acircumflex = 226; + e.acircumflexacute = 7845; + e.acircumflexdotbelow = 7853; + e.acircumflexgrave = 7847; + e.acircumflexhookabove = 7849; + e.acircumflextilde = 7851; + e.acute = 180; + e.acutebelowcmb = 791; + e.acutecmb = 769; + e.acutecomb = 769; + e.acutedeva = 2388; + e.acutelowmod = 719; + e.acutetonecmb = 833; + e.acyrillic = 1072; + e.adblgrave = 513; + e.addakgurmukhi = 2673; + e.adeva = 2309; + e.adieresis = 228; + e.adieresiscyrillic = 1235; + e.adieresismacron = 479; + e.adotbelow = 7841; + e.adotmacron = 481; + e.ae = 230; + e.aeacute = 509; + e.aekorean = 12624; + e.aemacron = 483; + e.afii00208 = 8213; + e.afii08941 = 8356; + e.afii10017 = 1040; + e.afii10018 = 1041; + e.afii10019 = 1042; + e.afii10020 = 1043; + e.afii10021 = 1044; + e.afii10022 = 1045; + e.afii10023 = 1025; + e.afii10024 = 1046; + e.afii10025 = 1047; + e.afii10026 = 1048; + e.afii10027 = 1049; + e.afii10028 = 1050; + e.afii10029 = 1051; + e.afii10030 = 1052; + e.afii10031 = 1053; + e.afii10032 = 1054; + e.afii10033 = 1055; + e.afii10034 = 1056; + e.afii10035 = 1057; + e.afii10036 = 1058; + e.afii10037 = 1059; + e.afii10038 = 1060; + e.afii10039 = 1061; + e.afii10040 = 1062; + e.afii10041 = 1063; + e.afii10042 = 1064; + e.afii10043 = 1065; + e.afii10044 = 1066; + e.afii10045 = 1067; + e.afii10046 = 1068; + e.afii10047 = 1069; + e.afii10048 = 1070; + e.afii10049 = 1071; + e.afii10050 = 1168; + e.afii10051 = 1026; + e.afii10052 = 1027; + e.afii10053 = 1028; + e.afii10054 = 1029; + e.afii10055 = 1030; + e.afii10056 = 1031; + e.afii10057 = 1032; + e.afii10058 = 1033; + e.afii10059 = 1034; + e.afii10060 = 1035; + e.afii10061 = 1036; + e.afii10062 = 1038; + e.afii10063 = 63172; + e.afii10064 = 63173; + e.afii10065 = 1072; + e.afii10066 = 1073; + e.afii10067 = 1074; + e.afii10068 = 1075; + e.afii10069 = 1076; + e.afii10070 = 1077; + e.afii10071 = 1105; + e.afii10072 = 1078; + e.afii10073 = 1079; + e.afii10074 = 1080; + e.afii10075 = 1081; + e.afii10076 = 1082; + e.afii10077 = 1083; + e.afii10078 = 1084; + e.afii10079 = 1085; + e.afii10080 = 1086; + e.afii10081 = 1087; + e.afii10082 = 1088; + e.afii10083 = 1089; + e.afii10084 = 1090; + e.afii10085 = 1091; + e.afii10086 = 1092; + e.afii10087 = 1093; + e.afii10088 = 1094; + e.afii10089 = 1095; + e.afii10090 = 1096; + e.afii10091 = 1097; + e.afii10092 = 1098; + e.afii10093 = 1099; + e.afii10094 = 1100; + e.afii10095 = 1101; + e.afii10096 = 1102; + e.afii10097 = 1103; + e.afii10098 = 1169; + e.afii10099 = 1106; + e.afii10100 = 1107; + e.afii10101 = 1108; + e.afii10102 = 1109; + e.afii10103 = 1110; + e.afii10104 = 1111; + e.afii10105 = 1112; + e.afii10106 = 1113; + e.afii10107 = 1114; + e.afii10108 = 1115; + e.afii10109 = 1116; + e.afii10110 = 1118; + e.afii10145 = 1039; + e.afii10146 = 1122; + e.afii10147 = 1138; + e.afii10148 = 1140; + e.afii10192 = 63174; + e.afii10193 = 1119; + e.afii10194 = 1123; + e.afii10195 = 1139; + e.afii10196 = 1141; + e.afii10831 = 63175; + e.afii10832 = 63176; + e.afii10846 = 1241; + e.afii299 = 8206; + e.afii300 = 8207; + e.afii301 = 8205; + e.afii57381 = 1642; + e.afii57388 = 1548; + e.afii57392 = 1632; + e.afii57393 = 1633; + e.afii57394 = 1634; + e.afii57395 = 1635; + e.afii57396 = 1636; + e.afii57397 = 1637; + e.afii57398 = 1638; + e.afii57399 = 1639; + e.afii57400 = 1640; + e.afii57401 = 1641; + e.afii57403 = 1563; + e.afii57407 = 1567; + e.afii57409 = 1569; + e.afii57410 = 1570; + e.afii57411 = 1571; + e.afii57412 = 1572; + e.afii57413 = 1573; + e.afii57414 = 1574; + e.afii57415 = 1575; + e.afii57416 = 1576; + e.afii57417 = 1577; + e.afii57418 = 1578; + e.afii57419 = 1579; + e.afii57420 = 1580; + e.afii57421 = 1581; + e.afii57422 = 1582; + e.afii57423 = 1583; + e.afii57424 = 1584; + e.afii57425 = 1585; + e.afii57426 = 1586; + e.afii57427 = 1587; + e.afii57428 = 1588; + e.afii57429 = 1589; + e.afii57430 = 1590; + e.afii57431 = 1591; + e.afii57432 = 1592; + e.afii57433 = 1593; + e.afii57434 = 1594; + e.afii57440 = 1600; + e.afii57441 = 1601; + e.afii57442 = 1602; + e.afii57443 = 1603; + e.afii57444 = 1604; + e.afii57445 = 1605; + e.afii57446 = 1606; + e.afii57448 = 1608; + e.afii57449 = 1609; + e.afii57450 = 1610; + e.afii57451 = 1611; + e.afii57452 = 1612; + e.afii57453 = 1613; + e.afii57454 = 1614; + e.afii57455 = 1615; + e.afii57456 = 1616; + e.afii57457 = 1617; + e.afii57458 = 1618; + e.afii57470 = 1607; + e.afii57505 = 1700; + e.afii57506 = 1662; + e.afii57507 = 1670; + e.afii57508 = 1688; + e.afii57509 = 1711; + e.afii57511 = 1657; + e.afii57512 = 1672; + e.afii57513 = 1681; + e.afii57514 = 1722; + e.afii57519 = 1746; + e.afii57534 = 1749; + e.afii57636 = 8362; + e.afii57645 = 1470; + e.afii57658 = 1475; + e.afii57664 = 1488; + e.afii57665 = 1489; + e.afii57666 = 1490; + e.afii57667 = 1491; + e.afii57668 = 1492; + e.afii57669 = 1493; + e.afii57670 = 1494; + e.afii57671 = 1495; + e.afii57672 = 1496; + e.afii57673 = 1497; + e.afii57674 = 1498; + e.afii57675 = 1499; + e.afii57676 = 1500; + e.afii57677 = 1501; + e.afii57678 = 1502; + e.afii57679 = 1503; + e.afii57680 = 1504; + e.afii57681 = 1505; + e.afii57682 = 1506; + e.afii57683 = 1507; + e.afii57684 = 1508; + e.afii57685 = 1509; + e.afii57686 = 1510; + e.afii57687 = 1511; + e.afii57688 = 1512; + e.afii57689 = 1513; + e.afii57690 = 1514; + e.afii57694 = 64298; + e.afii57695 = 64299; + e.afii57700 = 64331; + e.afii57705 = 64287; + e.afii57716 = 1520; + e.afii57717 = 1521; + e.afii57718 = 1522; + e.afii57723 = 64309; + e.afii57793 = 1460; + e.afii57794 = 1461; + e.afii57795 = 1462; + e.afii57796 = 1467; + e.afii57797 = 1464; + e.afii57798 = 1463; + e.afii57799 = 1456; + e.afii57800 = 1458; + e.afii57801 = 1457; + e.afii57802 = 1459; + e.afii57803 = 1474; + e.afii57804 = 1473; + e.afii57806 = 1465; + e.afii57807 = 1468; + e.afii57839 = 1469; + e.afii57841 = 1471; + e.afii57842 = 1472; + e.afii57929 = 700; + e.afii61248 = 8453; + e.afii61289 = 8467; + e.afii61352 = 8470; + e.afii61573 = 8236; + e.afii61574 = 8237; + e.afii61575 = 8238; + e.afii61664 = 8204; + e.afii63167 = 1645; + e.afii64937 = 701; + e.agrave = 224; + e.agujarati = 2693; + e.agurmukhi = 2565; + e.ahiragana = 12354; + e.ahookabove = 7843; + e.aibengali = 2448; + e.aibopomofo = 12574; + e.aideva = 2320; + e.aiecyrillic = 1237; + e.aigujarati = 2704; + e.aigurmukhi = 2576; + e.aimatragurmukhi = 2632; + e.ainarabic = 1593; + e.ainfinalarabic = 65226; + e.aininitialarabic = 65227; + e.ainmedialarabic = 65228; + e.ainvertedbreve = 515; + e.aivowelsignbengali = 2504; + e.aivowelsigndeva = 2376; + e.aivowelsigngujarati = 2760; + e.akatakana = 12450; + e.akatakanahalfwidth = 65393; + e.akorean = 12623; + e.alef = 1488; + e.alefarabic = 1575; + e.alefdageshhebrew = 64304; + e.aleffinalarabic = 65166; + e.alefhamzaabovearabic = 1571; + e.alefhamzaabovefinalarabic = 65156; + e.alefhamzabelowarabic = 1573; + e.alefhamzabelowfinalarabic = 65160; + e.alefhebrew = 1488; + e.aleflamedhebrew = 64335; + e.alefmaddaabovearabic = 1570; + e.alefmaddaabovefinalarabic = 65154; + e.alefmaksuraarabic = 1609; + e.alefmaksurafinalarabic = 65264; + e.alefmaksurainitialarabic = 65267; + e.alefmaksuramedialarabic = 65268; + e.alefpatahhebrew = 64302; + e.alefqamatshebrew = 64303; + e.aleph = 8501; + e.allequal = 8780; + e.alpha = 945; + e.alphatonos = 940; + e.amacron = 257; + e.amonospace = 65345; + e.ampersand = 38; + e.ampersandmonospace = 65286; + e.ampersandsmall = 63270; + e.amsquare = 13250; + e.anbopomofo = 12578; + e.angbopomofo = 12580; + e.angbracketleft = 12296; + e.angbracketright = 12297; + e.angkhankhuthai = 3674; + e.angle = 8736; + e.anglebracketleft = 12296; + e.anglebracketleftvertical = 65087; + e.anglebracketright = 12297; + e.anglebracketrightvertical = 65088; + e.angleleft = 9001; + e.angleright = 9002; + e.angstrom = 8491; + e.anoteleia = 903; + e.anudattadeva = 2386; + e.anusvarabengali = 2434; + e.anusvaradeva = 2306; + e.anusvaragujarati = 2690; + e.aogonek = 261; + e.apaatosquare = 13056; + e.aparen = 9372; + e.apostrophearmenian = 1370; + e.apostrophemod = 700; + e.apple = 63743; + e.approaches = 8784; + e.approxequal = 8776; + e.approxequalorimage = 8786; + e.approximatelyequal = 8773; + e.araeaekorean = 12686; + e.araeakorean = 12685; + e.arc = 8978; + e.arighthalfring = 7834; + e.aring = 229; + e.aringacute = 507; + e.aringbelow = 7681; + e.arrowboth = 8596; + e.arrowdashdown = 8675; + e.arrowdashleft = 8672; + e.arrowdashright = 8674; + e.arrowdashup = 8673; + e.arrowdblboth = 8660; + e.arrowdbldown = 8659; + e.arrowdblleft = 8656; + e.arrowdblright = 8658; + e.arrowdblup = 8657; + e.arrowdown = 8595; + e.arrowdownleft = 8601; + e.arrowdownright = 8600; + e.arrowdownwhite = 8681; + e.arrowheaddownmod = 709; + e.arrowheadleftmod = 706; + e.arrowheadrightmod = 707; + e.arrowheadupmod = 708; + e.arrowhorizex = 63719; + e.arrowleft = 8592; + e.arrowleftdbl = 8656; + e.arrowleftdblstroke = 8653; + e.arrowleftoverright = 8646; + e.arrowleftwhite = 8678; + e.arrowright = 8594; + e.arrowrightdblstroke = 8655; + e.arrowrightheavy = 10142; + e.arrowrightoverleft = 8644; + e.arrowrightwhite = 8680; + e.arrowtableft = 8676; + e.arrowtabright = 8677; + e.arrowup = 8593; + e.arrowupdn = 8597; + e.arrowupdnbse = 8616; + e.arrowupdownbase = 8616; + e.arrowupleft = 8598; + e.arrowupleftofdown = 8645; + e.arrowupright = 8599; + e.arrowupwhite = 8679; + e.arrowvertex = 63718; + e.asciicircum = 94; + e.asciicircummonospace = 65342; + e.asciitilde = 126; + e.asciitildemonospace = 65374; + e.ascript = 593; + e.ascriptturned = 594; + e.asmallhiragana = 12353; + e.asmallkatakana = 12449; + e.asmallkatakanahalfwidth = 65383; + e.asterisk = 42; + e.asteriskaltonearabic = 1645; + e.asteriskarabic = 1645; + e.asteriskmath = 8727; + e.asteriskmonospace = 65290; + e.asterisksmall = 65121; + e.asterism = 8258; + e.asuperior = 63209; + e.asymptoticallyequal = 8771; + e.at = 64; + e.atilde = 227; + e.atmonospace = 65312; + e.atsmall = 65131; + e.aturned = 592; + e.aubengali = 2452; + e.aubopomofo = 12576; + e.audeva = 2324; + e.augujarati = 2708; + e.augurmukhi = 2580; + e.aulengthmarkbengali = 2519; + e.aumatragurmukhi = 2636; + e.auvowelsignbengali = 2508; + e.auvowelsigndeva = 2380; + e.auvowelsigngujarati = 2764; + e.avagrahadeva = 2365; + e.aybarmenian = 1377; + e.ayin = 1506; + e.ayinaltonehebrew = 64288; + e.ayinhebrew = 1506; + e.b = 98; + e.babengali = 2476; + e.backslash = 92; + e.backslashmonospace = 65340; + e.badeva = 2348; + e.bagujarati = 2732; + e.bagurmukhi = 2604; + e.bahiragana = 12400; + e.bahtthai = 3647; + e.bakatakana = 12496; + e.bar = 124; + e.barmonospace = 65372; + e.bbopomofo = 12549; + e.bcircle = 9425; + e.bdotaccent = 7683; + e.bdotbelow = 7685; + e.beamedsixteenthnotes = 9836; + e.because = 8757; + e.becyrillic = 1073; + e.beharabic = 1576; + e.behfinalarabic = 65168; + e.behinitialarabic = 65169; + e.behiragana = 12409; + e.behmedialarabic = 65170; + e.behmeeminitialarabic = 64671; + e.behmeemisolatedarabic = 64520; + e.behnoonfinalarabic = 64621; + e.bekatakana = 12505; + e.benarmenian = 1378; + e.bet = 1489; + e.beta = 946; + e.betasymbolgreek = 976; + e.betdagesh = 64305; + e.betdageshhebrew = 64305; + e.bethebrew = 1489; + e.betrafehebrew = 64332; + e.bhabengali = 2477; + e.bhadeva = 2349; + e.bhagujarati = 2733; + e.bhagurmukhi = 2605; + e.bhook = 595; + e.bihiragana = 12403; + e.bikatakana = 12499; + e.bilabialclick = 664; + e.bindigurmukhi = 2562; + e.birusquare = 13105; + e.blackcircle = 9679; + e.blackdiamond = 9670; + e.blackdownpointingtriangle = 9660; + e.blackleftpointingpointer = 9668; + e.blackleftpointingtriangle = 9664; + e.blacklenticularbracketleft = 12304; + e.blacklenticularbracketleftvertical = 65083; + e.blacklenticularbracketright = 12305; + e.blacklenticularbracketrightvertical = 65084; + e.blacklowerlefttriangle = 9699; + e.blacklowerrighttriangle = 9698; + e.blackrectangle = 9644; + e.blackrightpointingpointer = 9658; + e.blackrightpointingtriangle = 9654; + e.blacksmallsquare = 9642; + e.blacksmilingface = 9787; + e.blacksquare = 9632; + e.blackstar = 9733; + e.blackupperlefttriangle = 9700; + e.blackupperrighttriangle = 9701; + e.blackuppointingsmalltriangle = 9652; + e.blackuppointingtriangle = 9650; + e.blank = 9251; + e.blinebelow = 7687; + e.block = 9608; + e.bmonospace = 65346; + e.bobaimaithai = 3610; + e.bohiragana = 12412; + e.bokatakana = 12508; + e.bparen = 9373; + e.bqsquare = 13251; + e.braceex = 63732; + e.braceleft = 123; + e.braceleftbt = 63731; + e.braceleftmid = 63730; + e.braceleftmonospace = 65371; + e.braceleftsmall = 65115; + e.bracelefttp = 63729; + e.braceleftvertical = 65079; + e.braceright = 125; + e.bracerightbt = 63742; + e.bracerightmid = 63741; + e.bracerightmonospace = 65373; + e.bracerightsmall = 65116; + e.bracerighttp = 63740; + e.bracerightvertical = 65080; + e.bracketleft = 91; + e.bracketleftbt = 63728; + e.bracketleftex = 63727; + e.bracketleftmonospace = 65339; + e.bracketlefttp = 63726; + e.bracketright = 93; + e.bracketrightbt = 63739; + e.bracketrightex = 63738; + e.bracketrightmonospace = 65341; + e.bracketrighttp = 63737; + e.breve = 728; + e.brevebelowcmb = 814; + e.brevecmb = 774; + e.breveinvertedbelowcmb = 815; + e.breveinvertedcmb = 785; + e.breveinverteddoublecmb = 865; + e.bridgebelowcmb = 810; + e.bridgeinvertedbelowcmb = 826; + e.brokenbar = 166; + e.bstroke = 384; + e.bsuperior = 63210; + e.btopbar = 387; + e.buhiragana = 12406; + e.bukatakana = 12502; + e.bullet = 8226; + e.bulletinverse = 9688; + e.bulletoperator = 8729; + e.bullseye = 9678; + e.c = 99; + e.caarmenian = 1390; + e.cabengali = 2458; + e.cacute = 263; + e.cadeva = 2330; + e.cagujarati = 2714; + e.cagurmukhi = 2586; + e.calsquare = 13192; + e.candrabindubengali = 2433; + e.candrabinducmb = 784; + e.candrabindudeva = 2305; + e.candrabindugujarati = 2689; + e.capslock = 8682; + e.careof = 8453; + e.caron = 711; + e.caronbelowcmb = 812; + e.caroncmb = 780; + e.carriagereturn = 8629; + e.cbopomofo = 12568; + e.ccaron = 269; + e.ccedilla = 231; + e.ccedillaacute = 7689; + e.ccircle = 9426; + e.ccircumflex = 265; + e.ccurl = 597; + e.cdot = 267; + e.cdotaccent = 267; + e.cdsquare = 13253; + e.cedilla = 184; + e.cedillacmb = 807; + e.cent = 162; + e.centigrade = 8451; + e.centinferior = 63199; + e.centmonospace = 65504; + e.centoldstyle = 63394; + e.centsuperior = 63200; + e.chaarmenian = 1401; + e.chabengali = 2459; + e.chadeva = 2331; + e.chagujarati = 2715; + e.chagurmukhi = 2587; + e.chbopomofo = 12564; + e.cheabkhasiancyrillic = 1213; + e.checkmark = 10003; + e.checyrillic = 1095; + e.chedescenderabkhasiancyrillic = 1215; + e.chedescendercyrillic = 1207; + e.chedieresiscyrillic = 1269; + e.cheharmenian = 1395; + e.chekhakassiancyrillic = 1228; + e.cheverticalstrokecyrillic = 1209; + e.chi = 967; + e.chieuchacirclekorean = 12919; + e.chieuchaparenkorean = 12823; + e.chieuchcirclekorean = 12905; + e.chieuchkorean = 12618; + e.chieuchparenkorean = 12809; + e.chochangthai = 3594; + e.chochanthai = 3592; + e.chochingthai = 3593; + e.chochoethai = 3596; + e.chook = 392; + e.cieucacirclekorean = 12918; + e.cieucaparenkorean = 12822; + e.cieuccirclekorean = 12904; + e.cieuckorean = 12616; + e.cieucparenkorean = 12808; + e.cieucuparenkorean = 12828; + e.circle = 9675; + e.circlecopyrt = 169; + e.circlemultiply = 8855; + e.circleot = 8857; + e.circleplus = 8853; + e.circlepostalmark = 12342; + e.circlewithlefthalfblack = 9680; + e.circlewithrighthalfblack = 9681; + e.circumflex = 710; + e.circumflexbelowcmb = 813; + e.circumflexcmb = 770; + e.clear = 8999; + e.clickalveolar = 450; + e.clickdental = 448; + e.clicklateral = 449; + e.clickretroflex = 451; + e.club = 9827; + e.clubsuitblack = 9827; + e.clubsuitwhite = 9831; + e.cmcubedsquare = 13220; + e.cmonospace = 65347; + e.cmsquaredsquare = 13216; + e.coarmenian = 1409; + e.colon = 58; + e.colonmonetary = 8353; + e.colonmonospace = 65306; + e.colonsign = 8353; + e.colonsmall = 65109; + e.colontriangularhalfmod = 721; + e.colontriangularmod = 720; + e.comma = 44; + e.commaabovecmb = 787; + e.commaaboverightcmb = 789; + e.commaaccent = 63171; + e.commaarabic = 1548; + e.commaarmenian = 1373; + e.commainferior = 63201; + e.commamonospace = 65292; + e.commareversedabovecmb = 788; + e.commareversedmod = 701; + e.commasmall = 65104; + e.commasuperior = 63202; + e.commaturnedabovecmb = 786; + e.commaturnedmod = 699; + e.compass = 9788; + e.congruent = 8773; + e.contourintegral = 8750; + e.control = 8963; + e.controlACK = 6; + e.controlBEL = 7; + e.controlBS = 8; + e.controlCAN = 24; + e.controlCR = 13; + e.controlDC1 = 17; + e.controlDC2 = 18; + e.controlDC3 = 19; + e.controlDC4 = 20; + e.controlDEL = 127; + e.controlDLE = 16; + e.controlEM = 25; + e.controlENQ = 5; + e.controlEOT = 4; + e.controlESC = 27; + e.controlETB = 23; + e.controlETX = 3; + e.controlFF = 12; + e.controlFS = 28; + e.controlGS = 29; + e.controlHT = 9; + e.controlLF = 10; + e.controlNAK = 21; + e.controlNULL = 0; + e.controlRS = 30; + e.controlSI = 15; + e.controlSO = 14; + e.controlSOT = 2; + e.controlSTX = 1; + e.controlSUB = 26; + e.controlSYN = 22; + e.controlUS = 31; + e.controlVT = 11; + e.copyright = 169; + e.copyrightsans = 63721; + e.copyrightserif = 63193; + e.cornerbracketleft = 12300; + e.cornerbracketlefthalfwidth = 65378; + e.cornerbracketleftvertical = 65089; + e.cornerbracketright = 12301; + e.cornerbracketrighthalfwidth = 65379; + e.cornerbracketrightvertical = 65090; + e.corporationsquare = 13183; + e.cosquare = 13255; + e.coverkgsquare = 13254; + e.cparen = 9374; + e.cruzeiro = 8354; + e.cstretched = 663; + e.curlyand = 8911; + e.curlyor = 8910; + e.currency = 164; + e.cyrBreve = 63185; + e.cyrFlex = 63186; + e.cyrbreve = 63188; + e.cyrflex = 63189; + e.d = 100; + e.daarmenian = 1380; + e.dabengali = 2470; + e.dadarabic = 1590; + e.dadeva = 2342; + e.dadfinalarabic = 65214; + e.dadinitialarabic = 65215; + e.dadmedialarabic = 65216; + e.dagesh = 1468; + e.dageshhebrew = 1468; + e.dagger = 8224; + e.daggerdbl = 8225; + e.dagujarati = 2726; + e.dagurmukhi = 2598; + e.dahiragana = 12384; + e.dakatakana = 12480; + e.dalarabic = 1583; + e.dalet = 1491; + e.daletdagesh = 64307; + e.daletdageshhebrew = 64307; + e.dalethebrew = 1491; + e.dalfinalarabic = 65194; + e.dammaarabic = 1615; + e.dammalowarabic = 1615; + e.dammatanaltonearabic = 1612; + e.dammatanarabic = 1612; + e.danda = 2404; + e.dargahebrew = 1447; + e.dargalefthebrew = 1447; + e.dasiapneumatacyrilliccmb = 1157; + e.dblGrave = 63187; + e.dblanglebracketleft = 12298; + e.dblanglebracketleftvertical = 65085; + e.dblanglebracketright = 12299; + e.dblanglebracketrightvertical = 65086; + e.dblarchinvertedbelowcmb = 811; + e.dblarrowleft = 8660; + e.dblarrowright = 8658; + e.dbldanda = 2405; + e.dblgrave = 63190; + e.dblgravecmb = 783; + e.dblintegral = 8748; + e.dbllowline = 8215; + e.dbllowlinecmb = 819; + e.dbloverlinecmb = 831; + e.dblprimemod = 698; + e.dblverticalbar = 8214; + e.dblverticallineabovecmb = 782; + e.dbopomofo = 12553; + e.dbsquare = 13256; + e.dcaron = 271; + e.dcedilla = 7697; + e.dcircle = 9427; + e.dcircumflexbelow = 7699; + e.dcroat = 273; + e.ddabengali = 2465; + e.ddadeva = 2337; + e.ddagujarati = 2721; + e.ddagurmukhi = 2593; + e.ddalarabic = 1672; + e.ddalfinalarabic = 64393; + e.dddhadeva = 2396; + e.ddhabengali = 2466; + e.ddhadeva = 2338; + e.ddhagujarati = 2722; + e.ddhagurmukhi = 2594; + e.ddotaccent = 7691; + e.ddotbelow = 7693; + e.decimalseparatorarabic = 1643; + e.decimalseparatorpersian = 1643; + e.decyrillic = 1076; + e.degree = 176; + e.dehihebrew = 1453; + e.dehiragana = 12391; + e.deicoptic = 1007; + e.dekatakana = 12487; + e.deleteleft = 9003; + e.deleteright = 8998; + e.delta = 948; + e.deltaturned = 397; + e.denominatorminusonenumeratorbengali = 2552; + e.dezh = 676; + e.dhabengali = 2471; + e.dhadeva = 2343; + e.dhagujarati = 2727; + e.dhagurmukhi = 2599; + e.dhook = 599; + e.dialytikatonos = 901; + e.dialytikatonoscmb = 836; + e.diamond = 9830; + e.diamondsuitwhite = 9826; + e.dieresis = 168; + e.dieresisacute = 63191; + e.dieresisbelowcmb = 804; + e.dieresiscmb = 776; + e.dieresisgrave = 63192; + e.dieresistonos = 901; + e.dihiragana = 12386; + e.dikatakana = 12482; + e.dittomark = 12291; + e.divide = 247; + e.divides = 8739; + e.divisionslash = 8725; + e.djecyrillic = 1106; + e.dkshade = 9619; + e.dlinebelow = 7695; + e.dlsquare = 13207; + e.dmacron = 273; + e.dmonospace = 65348; + e.dnblock = 9604; + e.dochadathai = 3598; + e.dodekthai = 3604; + e.dohiragana = 12393; + e.dokatakana = 12489; + e.dollar = 36; + e.dollarinferior = 63203; + e.dollarmonospace = 65284; + e.dollaroldstyle = 63268; + e.dollarsmall = 65129; + e.dollarsuperior = 63204; + e.dong = 8363; + e.dorusquare = 13094; + e.dotaccent = 729; + e.dotaccentcmb = 775; + e.dotbelowcmb = 803; + e.dotbelowcomb = 803; + e.dotkatakana = 12539; + e.dotlessi = 305; + e.dotlessj = 63166; + e.dotlessjstrokehook = 644; + e.dotmath = 8901; + e.dottedcircle = 9676; + e.doubleyodpatah = 64287; + e.doubleyodpatahhebrew = 64287; + e.downtackbelowcmb = 798; + e.downtackmod = 725; + e.dparen = 9375; + e.dsuperior = 63211; + e.dtail = 598; + e.dtopbar = 396; + e.duhiragana = 12389; + e.dukatakana = 12485; + e.dz = 499; + e.dzaltone = 675; + e.dzcaron = 454; + e.dzcurl = 677; + e.dzeabkhasiancyrillic = 1249; + e.dzecyrillic = 1109; + e.dzhecyrillic = 1119; + e.e = 101; + e.eacute = 233; + e.earth = 9793; + e.ebengali = 2447; + e.ebopomofo = 12572; + e.ebreve = 277; + e.ecandradeva = 2317; + e.ecandragujarati = 2701; + e.ecandravowelsigndeva = 2373; + e.ecandravowelsigngujarati = 2757; + e.ecaron = 283; + e.ecedillabreve = 7709; + e.echarmenian = 1381; + e.echyiwnarmenian = 1415; + e.ecircle = 9428; + e.ecircumflex = 234; + e.ecircumflexacute = 7871; + e.ecircumflexbelow = 7705; + e.ecircumflexdotbelow = 7879; + e.ecircumflexgrave = 7873; + e.ecircumflexhookabove = 7875; + e.ecircumflextilde = 7877; + e.ecyrillic = 1108; + e.edblgrave = 517; + e.edeva = 2319; + e.edieresis = 235; + e.edot = 279; + e.edotaccent = 279; + e.edotbelow = 7865; + e.eegurmukhi = 2575; + e.eematragurmukhi = 2631; + e.efcyrillic = 1092; + e.egrave = 232; + e.egujarati = 2703; + e.eharmenian = 1383; + e.ehbopomofo = 12573; + e.ehiragana = 12360; + e.ehookabove = 7867; + e.eibopomofo = 12575; + e.eight = 56; + e.eightarabic = 1640; + e.eightbengali = 2542; + e.eightcircle = 9319; + e.eightcircleinversesansserif = 10129; + e.eightdeva = 2414; + e.eighteencircle = 9329; + e.eighteenparen = 9349; + e.eighteenperiod = 9369; + e.eightgujarati = 2798; + e.eightgurmukhi = 2670; + e.eighthackarabic = 1640; + e.eighthangzhou = 12328; + e.eighthnotebeamed = 9835; + e.eightideographicparen = 12839; + e.eightinferior = 8328; + e.eightmonospace = 65304; + e.eightoldstyle = 63288; + e.eightparen = 9339; + e.eightperiod = 9359; + e.eightpersian = 1784; + e.eightroman = 8567; + e.eightsuperior = 8312; + e.eightthai = 3672; + e.einvertedbreve = 519; + e.eiotifiedcyrillic = 1125; + e.ekatakana = 12456; + e.ekatakanahalfwidth = 65396; + e.ekonkargurmukhi = 2676; + e.ekorean = 12628; + e.elcyrillic = 1083; + e.element = 8712; + e.elevencircle = 9322; + e.elevenparen = 9342; + e.elevenperiod = 9362; + e.elevenroman = 8570; + e.ellipsis = 8230; + e.ellipsisvertical = 8942; + e.emacron = 275; + e.emacronacute = 7703; + e.emacrongrave = 7701; + e.emcyrillic = 1084; + e.emdash = 8212; + e.emdashvertical = 65073; + e.emonospace = 65349; + e.emphasismarkarmenian = 1371; + e.emptyset = 8709; + e.enbopomofo = 12579; + e.encyrillic = 1085; + e.endash = 8211; + e.endashvertical = 65074; + e.endescendercyrillic = 1187; + e.eng = 331; + e.engbopomofo = 12581; + e.enghecyrillic = 1189; + e.enhookcyrillic = 1224; + e.enspace = 8194; + e.eogonek = 281; + e.eokorean = 12627; + e.eopen = 603; + e.eopenclosed = 666; + e.eopenreversed = 604; + e.eopenreversedclosed = 606; + e.eopenreversedhook = 605; + e.eparen = 9376; + e.epsilon = 949; + e.epsilontonos = 941; + e.equal = 61; + e.equalmonospace = 65309; + e.equalsmall = 65126; + e.equalsuperior = 8316; + e.equivalence = 8801; + e.erbopomofo = 12582; + e.ercyrillic = 1088; + e.ereversed = 600; + e.ereversedcyrillic = 1101; + e.escyrillic = 1089; + e.esdescendercyrillic = 1195; + e.esh = 643; + e.eshcurl = 646; + e.eshortdeva = 2318; + e.eshortvowelsigndeva = 2374; + e.eshreversedloop = 426; + e.eshsquatreversed = 645; + e.esmallhiragana = 12359; + e.esmallkatakana = 12455; + e.esmallkatakanahalfwidth = 65386; + e.estimated = 8494; + e.esuperior = 63212; + e.eta = 951; + e.etarmenian = 1384; + e.etatonos = 942; + e.eth = 240; + e.etilde = 7869; + e.etildebelow = 7707; + e.etnahtafoukhhebrew = 1425; + e.etnahtafoukhlefthebrew = 1425; + e.etnahtahebrew = 1425; + e.etnahtalefthebrew = 1425; + e.eturned = 477; + e.eukorean = 12641; + e.euro = 8364; + e.evowelsignbengali = 2503; + e.evowelsigndeva = 2375; + e.evowelsigngujarati = 2759; + e.exclam = 33; + e.exclamarmenian = 1372; + e.exclamdbl = 8252; + e.exclamdown = 161; + e.exclamdownsmall = 63393; + e.exclammonospace = 65281; + e.exclamsmall = 63265; + e.existential = 8707; + e.ezh = 658; + e.ezhcaron = 495; + e.ezhcurl = 659; + e.ezhreversed = 441; + e.ezhtail = 442; + e.f = 102; + e.fadeva = 2398; + e.fagurmukhi = 2654; + e.fahrenheit = 8457; + e.fathaarabic = 1614; + e.fathalowarabic = 1614; + e.fathatanarabic = 1611; + e.fbopomofo = 12552; + e.fcircle = 9429; + e.fdotaccent = 7711; + e.feharabic = 1601; + e.feharmenian = 1414; + e.fehfinalarabic = 65234; + e.fehinitialarabic = 65235; + e.fehmedialarabic = 65236; + e.feicoptic = 997; + e.female = 9792; + e.ff = 64256; + e.f_f = 64256; + e.ffi = 64259; + e.f_f_i = 64259; + e.ffl = 64260; + e.f_f_l = 64260; + e.fi = 64257; + e.f_i = 64257; + e.fifteencircle = 9326; + e.fifteenparen = 9346; + e.fifteenperiod = 9366; + e.figuredash = 8210; + e.filledbox = 9632; + e.filledrect = 9644; + e.finalkaf = 1498; + e.finalkafdagesh = 64314; + e.finalkafdageshhebrew = 64314; + e.finalkafhebrew = 1498; + e.finalmem = 1501; + e.finalmemhebrew = 1501; + e.finalnun = 1503; + e.finalnunhebrew = 1503; + e.finalpe = 1507; + e.finalpehebrew = 1507; + e.finaltsadi = 1509; + e.finaltsadihebrew = 1509; + e.firsttonechinese = 713; + e.fisheye = 9673; + e.fitacyrillic = 1139; + e.five = 53; + e.fivearabic = 1637; + e.fivebengali = 2539; + e.fivecircle = 9316; + e.fivecircleinversesansserif = 10126; + e.fivedeva = 2411; + e.fiveeighths = 8541; + e.fivegujarati = 2795; + e.fivegurmukhi = 2667; + e.fivehackarabic = 1637; + e.fivehangzhou = 12325; + e.fiveideographicparen = 12836; + e.fiveinferior = 8325; + e.fivemonospace = 65301; + e.fiveoldstyle = 63285; + e.fiveparen = 9336; + e.fiveperiod = 9356; + e.fivepersian = 1781; + e.fiveroman = 8564; + e.fivesuperior = 8309; + e.fivethai = 3669; + e.fl = 64258; + e.f_l = 64258; + e.florin = 402; + e.fmonospace = 65350; + e.fmsquare = 13209; + e.fofanthai = 3615; + e.fofathai = 3613; + e.fongmanthai = 3663; + e.forall = 8704; + e.four = 52; + e.fourarabic = 1636; + e.fourbengali = 2538; + e.fourcircle = 9315; + e.fourcircleinversesansserif = 10125; + e.fourdeva = 2410; + e.fourgujarati = 2794; + e.fourgurmukhi = 2666; + e.fourhackarabic = 1636; + e.fourhangzhou = 12324; + e.fourideographicparen = 12835; + e.fourinferior = 8324; + e.fourmonospace = 65300; + e.fournumeratorbengali = 2551; + e.fouroldstyle = 63284; + e.fourparen = 9335; + e.fourperiod = 9355; + e.fourpersian = 1780; + e.fourroman = 8563; + e.foursuperior = 8308; + e.fourteencircle = 9325; + e.fourteenparen = 9345; + e.fourteenperiod = 9365; + e.fourthai = 3668; + e.fourthtonechinese = 715; + e.fparen = 9377; + e.fraction = 8260; + e.franc = 8355; + e.g = 103; + e.gabengali = 2455; + e.gacute = 501; + e.gadeva = 2327; + e.gafarabic = 1711; + e.gaffinalarabic = 64403; + e.gafinitialarabic = 64404; + e.gafmedialarabic = 64405; + e.gagujarati = 2711; + e.gagurmukhi = 2583; + e.gahiragana = 12364; + e.gakatakana = 12460; + e.gamma = 947; + e.gammalatinsmall = 611; + e.gammasuperior = 736; + e.gangiacoptic = 1003; + e.gbopomofo = 12557; + e.gbreve = 287; + e.gcaron = 487; + e.gcedilla = 291; + e.gcircle = 9430; + e.gcircumflex = 285; + e.gcommaaccent = 291; + e.gdot = 289; + e.gdotaccent = 289; + e.gecyrillic = 1075; + e.gehiragana = 12370; + e.gekatakana = 12466; + e.geometricallyequal = 8785; + e.gereshaccenthebrew = 1436; + e.gereshhebrew = 1523; + e.gereshmuqdamhebrew = 1437; + e.germandbls = 223; + e.gershayimaccenthebrew = 1438; + e.gershayimhebrew = 1524; + e.getamark = 12307; + e.ghabengali = 2456; + e.ghadarmenian = 1394; + e.ghadeva = 2328; + e.ghagujarati = 2712; + e.ghagurmukhi = 2584; + e.ghainarabic = 1594; + e.ghainfinalarabic = 65230; + e.ghaininitialarabic = 65231; + e.ghainmedialarabic = 65232; + e.ghemiddlehookcyrillic = 1173; + e.ghestrokecyrillic = 1171; + e.gheupturncyrillic = 1169; + e.ghhadeva = 2394; + e.ghhagurmukhi = 2650; + e.ghook = 608; + e.ghzsquare = 13203; + e.gihiragana = 12366; + e.gikatakana = 12462; + e.gimarmenian = 1379; + e.gimel = 1490; + e.gimeldagesh = 64306; + e.gimeldageshhebrew = 64306; + e.gimelhebrew = 1490; + e.gjecyrillic = 1107; + e.glottalinvertedstroke = 446; + e.glottalstop = 660; + e.glottalstopinverted = 662; + e.glottalstopmod = 704; + e.glottalstopreversed = 661; + e.glottalstopreversedmod = 705; + e.glottalstopreversedsuperior = 740; + e.glottalstopstroke = 673; + e.glottalstopstrokereversed = 674; + e.gmacron = 7713; + e.gmonospace = 65351; + e.gohiragana = 12372; + e.gokatakana = 12468; + e.gparen = 9378; + e.gpasquare = 13228; + e.gradient = 8711; + e.grave = 96; + e.gravebelowcmb = 790; + e.gravecmb = 768; + e.gravecomb = 768; + e.gravedeva = 2387; + e.gravelowmod = 718; + e.gravemonospace = 65344; + e.gravetonecmb = 832; + e.greater = 62; + e.greaterequal = 8805; + e.greaterequalorless = 8923; + e.greatermonospace = 65310; + e.greaterorequivalent = 8819; + e.greaterorless = 8823; + e.greateroverequal = 8807; + e.greatersmall = 65125; + e.gscript = 609; + e.gstroke = 485; + e.guhiragana = 12368; + e.guillemotleft = 171; + e.guillemotright = 187; + e.guilsinglleft = 8249; + e.guilsinglright = 8250; + e.gukatakana = 12464; + e.guramusquare = 13080; + e.gysquare = 13257; + e.h = 104; + e.haabkhasiancyrillic = 1193; + e.haaltonearabic = 1729; + e.habengali = 2489; + e.hadescendercyrillic = 1203; + e.hadeva = 2361; + e.hagujarati = 2745; + e.hagurmukhi = 2617; + e.haharabic = 1581; + e.hahfinalarabic = 65186; + e.hahinitialarabic = 65187; + e.hahiragana = 12399; + e.hahmedialarabic = 65188; + e.haitusquare = 13098; + e.hakatakana = 12495; + e.hakatakanahalfwidth = 65418; + e.halantgurmukhi = 2637; + e.hamzaarabic = 1569; + e.hamzalowarabic = 1569; + e.hangulfiller = 12644; + e.hardsigncyrillic = 1098; + e.harpoonleftbarbup = 8636; + e.harpoonrightbarbup = 8640; + e.hasquare = 13258; + e.hatafpatah = 1458; + e.hatafpatah16 = 1458; + e.hatafpatah23 = 1458; + e.hatafpatah2f = 1458; + e.hatafpatahhebrew = 1458; + e.hatafpatahnarrowhebrew = 1458; + e.hatafpatahquarterhebrew = 1458; + e.hatafpatahwidehebrew = 1458; + e.hatafqamats = 1459; + e.hatafqamats1b = 1459; + e.hatafqamats28 = 1459; + e.hatafqamats34 = 1459; + e.hatafqamatshebrew = 1459; + e.hatafqamatsnarrowhebrew = 1459; + e.hatafqamatsquarterhebrew = 1459; + e.hatafqamatswidehebrew = 1459; + e.hatafsegol = 1457; + e.hatafsegol17 = 1457; + e.hatafsegol24 = 1457; + e.hatafsegol30 = 1457; + e.hatafsegolhebrew = 1457; + e.hatafsegolnarrowhebrew = 1457; + e.hatafsegolquarterhebrew = 1457; + e.hatafsegolwidehebrew = 1457; + e.hbar = 295; + e.hbopomofo = 12559; + e.hbrevebelow = 7723; + e.hcedilla = 7721; + e.hcircle = 9431; + e.hcircumflex = 293; + e.hdieresis = 7719; + e.hdotaccent = 7715; + e.hdotbelow = 7717; + e.he = 1492; + e.heart = 9829; + e.heartsuitblack = 9829; + e.heartsuitwhite = 9825; + e.hedagesh = 64308; + e.hedageshhebrew = 64308; + e.hehaltonearabic = 1729; + e.heharabic = 1607; + e.hehebrew = 1492; + e.hehfinalaltonearabic = 64423; + e.hehfinalalttwoarabic = 65258; + e.hehfinalarabic = 65258; + e.hehhamzaabovefinalarabic = 64421; + e.hehhamzaaboveisolatedarabic = 64420; + e.hehinitialaltonearabic = 64424; + e.hehinitialarabic = 65259; + e.hehiragana = 12408; + e.hehmedialaltonearabic = 64425; + e.hehmedialarabic = 65260; + e.heiseierasquare = 13179; + e.hekatakana = 12504; + e.hekatakanahalfwidth = 65421; + e.hekutaarusquare = 13110; + e.henghook = 615; + e.herutusquare = 13113; + e.het = 1495; + e.hethebrew = 1495; + e.hhook = 614; + e.hhooksuperior = 689; + e.hieuhacirclekorean = 12923; + e.hieuhaparenkorean = 12827; + e.hieuhcirclekorean = 12909; + e.hieuhkorean = 12622; + e.hieuhparenkorean = 12813; + e.hihiragana = 12402; + e.hikatakana = 12498; + e.hikatakanahalfwidth = 65419; + e.hiriq = 1460; + e.hiriq14 = 1460; + e.hiriq21 = 1460; + e.hiriq2d = 1460; + e.hiriqhebrew = 1460; + e.hiriqnarrowhebrew = 1460; + e.hiriqquarterhebrew = 1460; + e.hiriqwidehebrew = 1460; + e.hlinebelow = 7830; + e.hmonospace = 65352; + e.hoarmenian = 1392; + e.hohipthai = 3627; + e.hohiragana = 12411; + e.hokatakana = 12507; + e.hokatakanahalfwidth = 65422; + e.holam = 1465; + e.holam19 = 1465; + e.holam26 = 1465; + e.holam32 = 1465; + e.holamhebrew = 1465; + e.holamnarrowhebrew = 1465; + e.holamquarterhebrew = 1465; + e.holamwidehebrew = 1465; + e.honokhukthai = 3630; + e.hookabovecomb = 777; + e.hookcmb = 777; + e.hookpalatalizedbelowcmb = 801; + e.hookretroflexbelowcmb = 802; + e.hoonsquare = 13122; + e.horicoptic = 1001; + e.horizontalbar = 8213; + e.horncmb = 795; + e.hotsprings = 9832; + e.house = 8962; + e.hparen = 9379; + e.hsuperior = 688; + e.hturned = 613; + e.huhiragana = 12405; + e.huiitosquare = 13107; + e.hukatakana = 12501; + e.hukatakanahalfwidth = 65420; + e.hungarumlaut = 733; + e.hungarumlautcmb = 779; + e.hv = 405; + e.hyphen = 45; + e.hypheninferior = 63205; + e.hyphenmonospace = 65293; + e.hyphensmall = 65123; + e.hyphensuperior = 63206; + e.hyphentwo = 8208; + e.i = 105; + e.iacute = 237; + e.iacyrillic = 1103; + e.ibengali = 2439; + e.ibopomofo = 12583; + e.ibreve = 301; + e.icaron = 464; + e.icircle = 9432; + e.icircumflex = 238; + e.icyrillic = 1110; + e.idblgrave = 521; + e.ideographearthcircle = 12943; + e.ideographfirecircle = 12939; + e.ideographicallianceparen = 12863; + e.ideographiccallparen = 12858; + e.ideographiccentrecircle = 12965; + e.ideographicclose = 12294; + e.ideographiccomma = 12289; + e.ideographiccommaleft = 65380; + e.ideographiccongratulationparen = 12855; + e.ideographiccorrectcircle = 12963; + e.ideographicearthparen = 12847; + e.ideographicenterpriseparen = 12861; + e.ideographicexcellentcircle = 12957; + e.ideographicfestivalparen = 12864; + e.ideographicfinancialcircle = 12950; + e.ideographicfinancialparen = 12854; + e.ideographicfireparen = 12843; + e.ideographichaveparen = 12850; + e.ideographichighcircle = 12964; + e.ideographiciterationmark = 12293; + e.ideographiclaborcircle = 12952; + e.ideographiclaborparen = 12856; + e.ideographicleftcircle = 12967; + e.ideographiclowcircle = 12966; + e.ideographicmedicinecircle = 12969; + e.ideographicmetalparen = 12846; + e.ideographicmoonparen = 12842; + e.ideographicnameparen = 12852; + e.ideographicperiod = 12290; + e.ideographicprintcircle = 12958; + e.ideographicreachparen = 12867; + e.ideographicrepresentparen = 12857; + e.ideographicresourceparen = 12862; + e.ideographicrightcircle = 12968; + e.ideographicsecretcircle = 12953; + e.ideographicselfparen = 12866; + e.ideographicsocietyparen = 12851; + e.ideographicspace = 12288; + e.ideographicspecialparen = 12853; + e.ideographicstockparen = 12849; + e.ideographicstudyparen = 12859; + e.ideographicsunparen = 12848; + e.ideographicsuperviseparen = 12860; + e.ideographicwaterparen = 12844; + e.ideographicwoodparen = 12845; + e.ideographiczero = 12295; + e.ideographmetalcircle = 12942; + e.ideographmooncircle = 12938; + e.ideographnamecircle = 12948; + e.ideographsuncircle = 12944; + e.ideographwatercircle = 12940; + e.ideographwoodcircle = 12941; + e.ideva = 2311; + e.idieresis = 239; + e.idieresisacute = 7727; + e.idieresiscyrillic = 1253; + e.idotbelow = 7883; + e.iebrevecyrillic = 1239; + e.iecyrillic = 1077; + e.ieungacirclekorean = 12917; + e.ieungaparenkorean = 12821; + e.ieungcirclekorean = 12903; + e.ieungkorean = 12615; + e.ieungparenkorean = 12807; + e.igrave = 236; + e.igujarati = 2695; + e.igurmukhi = 2567; + e.ihiragana = 12356; + e.ihookabove = 7881; + e.iibengali = 2440; + e.iicyrillic = 1080; + e.iideva = 2312; + e.iigujarati = 2696; + e.iigurmukhi = 2568; + e.iimatragurmukhi = 2624; + e.iinvertedbreve = 523; + e.iishortcyrillic = 1081; + e.iivowelsignbengali = 2496; + e.iivowelsigndeva = 2368; + e.iivowelsigngujarati = 2752; + e.ij = 307; + e.ikatakana = 12452; + e.ikatakanahalfwidth = 65394; + e.ikorean = 12643; + e.ilde = 732; + e.iluyhebrew = 1452; + e.imacron = 299; + e.imacroncyrillic = 1251; + e.imageorapproximatelyequal = 8787; + e.imatragurmukhi = 2623; + e.imonospace = 65353; + e.increment = 8710; + e.infinity = 8734; + e.iniarmenian = 1387; + e.integral = 8747; + e.integralbottom = 8993; + e.integralbt = 8993; + e.integralex = 63733; + e.integraltop = 8992; + e.integraltp = 8992; + e.intersection = 8745; + e.intisquare = 13061; + e.invbullet = 9688; + e.invcircle = 9689; + e.invsmileface = 9787; + e.iocyrillic = 1105; + e.iogonek = 303; + e.iota = 953; + e.iotadieresis = 970; + e.iotadieresistonos = 912; + e.iotalatin = 617; + e.iotatonos = 943; + e.iparen = 9380; + e.irigurmukhi = 2674; + e.ismallhiragana = 12355; + e.ismallkatakana = 12451; + e.ismallkatakanahalfwidth = 65384; + e.issharbengali = 2554; + e.istroke = 616; + e.isuperior = 63213; + e.iterationhiragana = 12445; + e.iterationkatakana = 12541; + e.itilde = 297; + e.itildebelow = 7725; + e.iubopomofo = 12585; + e.iucyrillic = 1102; + e.ivowelsignbengali = 2495; + e.ivowelsigndeva = 2367; + e.ivowelsigngujarati = 2751; + e.izhitsacyrillic = 1141; + e.izhitsadblgravecyrillic = 1143; + e.j = 106; + e.jaarmenian = 1393; + e.jabengali = 2460; + e.jadeva = 2332; + e.jagujarati = 2716; + e.jagurmukhi = 2588; + e.jbopomofo = 12560; + e.jcaron = 496; + e.jcircle = 9433; + e.jcircumflex = 309; + e.jcrossedtail = 669; + e.jdotlessstroke = 607; + e.jecyrillic = 1112; + e.jeemarabic = 1580; + e.jeemfinalarabic = 65182; + e.jeeminitialarabic = 65183; + e.jeemmedialarabic = 65184; + e.jeharabic = 1688; + e.jehfinalarabic = 64395; + e.jhabengali = 2461; + e.jhadeva = 2333; + e.jhagujarati = 2717; + e.jhagurmukhi = 2589; + e.jheharmenian = 1403; + e.jis = 12292; + e.jmonospace = 65354; + e.jparen = 9381; + e.jsuperior = 690; + e.k = 107; + e.kabashkircyrillic = 1185; + e.kabengali = 2453; + e.kacute = 7729; + e.kacyrillic = 1082; + e.kadescendercyrillic = 1179; + e.kadeva = 2325; + e.kaf = 1499; + e.kafarabic = 1603; + e.kafdagesh = 64315; + e.kafdageshhebrew = 64315; + e.kaffinalarabic = 65242; + e.kafhebrew = 1499; + e.kafinitialarabic = 65243; + e.kafmedialarabic = 65244; + e.kafrafehebrew = 64333; + e.kagujarati = 2709; + e.kagurmukhi = 2581; + e.kahiragana = 12363; + e.kahookcyrillic = 1220; + e.kakatakana = 12459; + e.kakatakanahalfwidth = 65398; + e.kappa = 954; + e.kappasymbolgreek = 1008; + e.kapyeounmieumkorean = 12657; + e.kapyeounphieuphkorean = 12676; + e.kapyeounpieupkorean = 12664; + e.kapyeounssangpieupkorean = 12665; + e.karoriisquare = 13069; + e.kashidaautoarabic = 1600; + e.kashidaautonosidebearingarabic = 1600; + e.kasmallkatakana = 12533; + e.kasquare = 13188; + e.kasraarabic = 1616; + e.kasratanarabic = 1613; + e.kastrokecyrillic = 1183; + e.katahiraprolongmarkhalfwidth = 65392; + e.kaverticalstrokecyrillic = 1181; + e.kbopomofo = 12558; + e.kcalsquare = 13193; + e.kcaron = 489; + e.kcedilla = 311; + e.kcircle = 9434; + e.kcommaaccent = 311; + e.kdotbelow = 7731; + e.keharmenian = 1412; + e.kehiragana = 12369; + e.kekatakana = 12465; + e.kekatakanahalfwidth = 65401; + e.kenarmenian = 1391; + e.kesmallkatakana = 12534; + e.kgreenlandic = 312; + e.khabengali = 2454; + e.khacyrillic = 1093; + e.khadeva = 2326; + e.khagujarati = 2710; + e.khagurmukhi = 2582; + e.khaharabic = 1582; + e.khahfinalarabic = 65190; + e.khahinitialarabic = 65191; + e.khahmedialarabic = 65192; + e.kheicoptic = 999; + e.khhadeva = 2393; + e.khhagurmukhi = 2649; + e.khieukhacirclekorean = 12920; + e.khieukhaparenkorean = 12824; + e.khieukhcirclekorean = 12906; + e.khieukhkorean = 12619; + e.khieukhparenkorean = 12810; + e.khokhaithai = 3586; + e.khokhonthai = 3589; + e.khokhuatthai = 3587; + e.khokhwaithai = 3588; + e.khomutthai = 3675; + e.khook = 409; + e.khorakhangthai = 3590; + e.khzsquare = 13201; + e.kihiragana = 12365; + e.kikatakana = 12461; + e.kikatakanahalfwidth = 65399; + e.kiroguramusquare = 13077; + e.kiromeetorusquare = 13078; + e.kirosquare = 13076; + e.kiyeokacirclekorean = 12910; + e.kiyeokaparenkorean = 12814; + e.kiyeokcirclekorean = 12896; + e.kiyeokkorean = 12593; + e.kiyeokparenkorean = 12800; + e.kiyeoksioskorean = 12595; + e.kjecyrillic = 1116; + e.klinebelow = 7733; + e.klsquare = 13208; + e.kmcubedsquare = 13222; + e.kmonospace = 65355; + e.kmsquaredsquare = 13218; + e.kohiragana = 12371; + e.kohmsquare = 13248; + e.kokaithai = 3585; + e.kokatakana = 12467; + e.kokatakanahalfwidth = 65402; + e.kooposquare = 13086; + e.koppacyrillic = 1153; + e.koreanstandardsymbol = 12927; + e.koroniscmb = 835; + e.kparen = 9382; + e.kpasquare = 13226; + e.ksicyrillic = 1135; + e.ktsquare = 13263; + e.kturned = 670; + e.kuhiragana = 12367; + e.kukatakana = 12463; + e.kukatakanahalfwidth = 65400; + e.kvsquare = 13240; + e.kwsquare = 13246; + e.l = 108; + e.labengali = 2482; + e.lacute = 314; + e.ladeva = 2354; + e.lagujarati = 2738; + e.lagurmukhi = 2610; + e.lakkhangyaothai = 3653; + e.lamaleffinalarabic = 65276; + e.lamalefhamzaabovefinalarabic = 65272; + e.lamalefhamzaaboveisolatedarabic = 65271; + e.lamalefhamzabelowfinalarabic = 65274; + e.lamalefhamzabelowisolatedarabic = 65273; + e.lamalefisolatedarabic = 65275; + e.lamalefmaddaabovefinalarabic = 65270; + e.lamalefmaddaaboveisolatedarabic = 65269; + e.lamarabic = 1604; + e.lambda = 955; + e.lambdastroke = 411; + e.lamed = 1500; + e.lameddagesh = 64316; + e.lameddageshhebrew = 64316; + e.lamedhebrew = 1500; + e.lamfinalarabic = 65246; + e.lamhahinitialarabic = 64714; + e.laminitialarabic = 65247; + e.lamjeeminitialarabic = 64713; + e.lamkhahinitialarabic = 64715; + e.lamlamhehisolatedarabic = 65010; + e.lammedialarabic = 65248; + e.lammeemhahinitialarabic = 64904; + e.lammeeminitialarabic = 64716; + e.largecircle = 9711; + e.lbar = 410; + e.lbelt = 620; + e.lbopomofo = 12556; + e.lcaron = 318; + e.lcedilla = 316; + e.lcircle = 9435; + e.lcircumflexbelow = 7741; + e.lcommaaccent = 316; + e.ldot = 320; + e.ldotaccent = 320; + e.ldotbelow = 7735; + e.ldotbelowmacron = 7737; + e.leftangleabovecmb = 794; + e.lefttackbelowcmb = 792; + e.less = 60; + e.lessequal = 8804; + e.lessequalorgreater = 8922; + e.lessmonospace = 65308; + e.lessorequivalent = 8818; + e.lessorgreater = 8822; + e.lessoverequal = 8806; + e.lesssmall = 65124; + e.lezh = 622; + e.lfblock = 9612; + e.lhookretroflex = 621; + e.lira = 8356; + e.liwnarmenian = 1388; + e.lj = 457; + e.ljecyrillic = 1113; + e.ll = 63168; + e.lladeva = 2355; + e.llagujarati = 2739; + e.llinebelow = 7739; + e.llladeva = 2356; + e.llvocalicbengali = 2529; + e.llvocalicdeva = 2401; + e.llvocalicvowelsignbengali = 2531; + e.llvocalicvowelsigndeva = 2403; + e.lmiddletilde = 619; + e.lmonospace = 65356; + e.lmsquare = 13264; + e.lochulathai = 3628; + e.logicaland = 8743; + e.logicalnot = 172; + e.logicalnotreversed = 8976; + e.logicalor = 8744; + e.lolingthai = 3621; + e.longs = 383; + e.lowlinecenterline = 65102; + e.lowlinecmb = 818; + e.lowlinedashed = 65101; + e.lozenge = 9674; + e.lparen = 9383; + e.lslash = 322; + e.lsquare = 8467; + e.lsuperior = 63214; + e.ltshade = 9617; + e.luthai = 3622; + e.lvocalicbengali = 2444; + e.lvocalicdeva = 2316; + e.lvocalicvowelsignbengali = 2530; + e.lvocalicvowelsigndeva = 2402; + e.lxsquare = 13267; + e.m = 109; + e.mabengali = 2478; + e.macron = 175; + e.macronbelowcmb = 817; + e.macroncmb = 772; + e.macronlowmod = 717; + e.macronmonospace = 65507; + e.macute = 7743; + e.madeva = 2350; + e.magujarati = 2734; + e.magurmukhi = 2606; + e.mahapakhhebrew = 1444; + e.mahapakhlefthebrew = 1444; + e.mahiragana = 12414; + e.maichattawalowleftthai = 63637; + e.maichattawalowrightthai = 63636; + e.maichattawathai = 3659; + e.maichattawaupperleftthai = 63635; + e.maieklowleftthai = 63628; + e.maieklowrightthai = 63627; + e.maiekthai = 3656; + e.maiekupperleftthai = 63626; + e.maihanakatleftthai = 63620; + e.maihanakatthai = 3633; + e.maitaikhuleftthai = 63625; + e.maitaikhuthai = 3655; + e.maitholowleftthai = 63631; + e.maitholowrightthai = 63630; + e.maithothai = 3657; + e.maithoupperleftthai = 63629; + e.maitrilowleftthai = 63634; + e.maitrilowrightthai = 63633; + e.maitrithai = 3658; + e.maitriupperleftthai = 63632; + e.maiyamokthai = 3654; + e.makatakana = 12510; + e.makatakanahalfwidth = 65423; + e.male = 9794; + e.mansyonsquare = 13127; + e.maqafhebrew = 1470; + e.mars = 9794; + e.masoracirclehebrew = 1455; + e.masquare = 13187; + e.mbopomofo = 12551; + e.mbsquare = 13268; + e.mcircle = 9436; + e.mcubedsquare = 13221; + e.mdotaccent = 7745; + e.mdotbelow = 7747; + e.meemarabic = 1605; + e.meemfinalarabic = 65250; + e.meeminitialarabic = 65251; + e.meemmedialarabic = 65252; + e.meemmeeminitialarabic = 64721; + e.meemmeemisolatedarabic = 64584; + e.meetorusquare = 13133; + e.mehiragana = 12417; + e.meizierasquare = 13182; + e.mekatakana = 12513; + e.mekatakanahalfwidth = 65426; + e.mem = 1502; + e.memdagesh = 64318; + e.memdageshhebrew = 64318; + e.memhebrew = 1502; + e.menarmenian = 1396; + e.merkhahebrew = 1445; + e.merkhakefulahebrew = 1446; + e.merkhakefulalefthebrew = 1446; + e.merkhalefthebrew = 1445; + e.mhook = 625; + e.mhzsquare = 13202; + e.middledotkatakanahalfwidth = 65381; + e.middot = 183; + e.mieumacirclekorean = 12914; + e.mieumaparenkorean = 12818; + e.mieumcirclekorean = 12900; + e.mieumkorean = 12609; + e.mieumpansioskorean = 12656; + e.mieumparenkorean = 12804; + e.mieumpieupkorean = 12654; + e.mieumsioskorean = 12655; + e.mihiragana = 12415; + e.mikatakana = 12511; + e.mikatakanahalfwidth = 65424; + e.minus = 8722; + e.minusbelowcmb = 800; + e.minuscircle = 8854; + e.minusmod = 727; + e.minusplus = 8723; + e.minute = 8242; + e.miribaarusquare = 13130; + e.mirisquare = 13129; + e.mlonglegturned = 624; + e.mlsquare = 13206; + e.mmcubedsquare = 13219; + e.mmonospace = 65357; + e.mmsquaredsquare = 13215; + e.mohiragana = 12418; + e.mohmsquare = 13249; + e.mokatakana = 12514; + e.mokatakanahalfwidth = 65427; + e.molsquare = 13270; + e.momathai = 3617; + e.moverssquare = 13223; + e.moverssquaredsquare = 13224; + e.mparen = 9384; + e.mpasquare = 13227; + e.mssquare = 13235; + e.msuperior = 63215; + e.mturned = 623; + e.mu = 181; + e.mu1 = 181; + e.muasquare = 13186; + e.muchgreater = 8811; + e.muchless = 8810; + e.mufsquare = 13196; + e.mugreek = 956; + e.mugsquare = 13197; + e.muhiragana = 12416; + e.mukatakana = 12512; + e.mukatakanahalfwidth = 65425; + e.mulsquare = 13205; + e.multiply = 215; + e.mumsquare = 13211; + e.munahhebrew = 1443; + e.munahlefthebrew = 1443; + e.musicalnote = 9834; + e.musicalnotedbl = 9835; + e.musicflatsign = 9837; + e.musicsharpsign = 9839; + e.mussquare = 13234; + e.muvsquare = 13238; + e.muwsquare = 13244; + e.mvmegasquare = 13241; + e.mvsquare = 13239; + e.mwmegasquare = 13247; + e.mwsquare = 13245; + e.n = 110; + e.nabengali = 2472; + e.nabla = 8711; + e.nacute = 324; + e.nadeva = 2344; + e.nagujarati = 2728; + e.nagurmukhi = 2600; + e.nahiragana = 12394; + e.nakatakana = 12490; + e.nakatakanahalfwidth = 65413; + e.napostrophe = 329; + e.nasquare = 13185; + e.nbopomofo = 12555; + e.nbspace = 160; + e.ncaron = 328; + e.ncedilla = 326; + e.ncircle = 9437; + e.ncircumflexbelow = 7755; + e.ncommaaccent = 326; + e.ndotaccent = 7749; + e.ndotbelow = 7751; + e.nehiragana = 12397; + e.nekatakana = 12493; + e.nekatakanahalfwidth = 65416; + e.newsheqelsign = 8362; + e.nfsquare = 13195; + e.ngabengali = 2457; + e.ngadeva = 2329; + e.ngagujarati = 2713; + e.ngagurmukhi = 2585; + e.ngonguthai = 3591; + e.nhiragana = 12435; + e.nhookleft = 626; + e.nhookretroflex = 627; + e.nieunacirclekorean = 12911; + e.nieunaparenkorean = 12815; + e.nieuncieuckorean = 12597; + e.nieuncirclekorean = 12897; + e.nieunhieuhkorean = 12598; + e.nieunkorean = 12596; + e.nieunpansioskorean = 12648; + e.nieunparenkorean = 12801; + e.nieunsioskorean = 12647; + e.nieuntikeutkorean = 12646; + e.nihiragana = 12395; + e.nikatakana = 12491; + e.nikatakanahalfwidth = 65414; + e.nikhahitleftthai = 63641; + e.nikhahitthai = 3661; + e.nine = 57; + e.ninearabic = 1641; + e.ninebengali = 2543; + e.ninecircle = 9320; + e.ninecircleinversesansserif = 10130; + e.ninedeva = 2415; + e.ninegujarati = 2799; + e.ninegurmukhi = 2671; + e.ninehackarabic = 1641; + e.ninehangzhou = 12329; + e.nineideographicparen = 12840; + e.nineinferior = 8329; + e.ninemonospace = 65305; + e.nineoldstyle = 63289; + e.nineparen = 9340; + e.nineperiod = 9360; + e.ninepersian = 1785; + e.nineroman = 8568; + e.ninesuperior = 8313; + e.nineteencircle = 9330; + e.nineteenparen = 9350; + e.nineteenperiod = 9370; + e.ninethai = 3673; + e.nj = 460; + e.njecyrillic = 1114; + e.nkatakana = 12531; + e.nkatakanahalfwidth = 65437; + e.nlegrightlong = 414; + e.nlinebelow = 7753; + e.nmonospace = 65358; + e.nmsquare = 13210; + e.nnabengali = 2467; + e.nnadeva = 2339; + e.nnagujarati = 2723; + e.nnagurmukhi = 2595; + e.nnnadeva = 2345; + e.nohiragana = 12398; + e.nokatakana = 12494; + e.nokatakanahalfwidth = 65417; + e.nonbreakingspace = 160; + e.nonenthai = 3603; + e.nonuthai = 3609; + e.noonarabic = 1606; + e.noonfinalarabic = 65254; + e.noonghunnaarabic = 1722; + e.noonghunnafinalarabic = 64415; + e.nooninitialarabic = 65255; + e.noonjeeminitialarabic = 64722; + e.noonjeemisolatedarabic = 64587; + e.noonmedialarabic = 65256; + e.noonmeeminitialarabic = 64725; + e.noonmeemisolatedarabic = 64590; + e.noonnoonfinalarabic = 64653; + e.notcontains = 8716; + e.notelement = 8713; + e.notelementof = 8713; + e.notequal = 8800; + e.notgreater = 8815; + e.notgreaternorequal = 8817; + e.notgreaternorless = 8825; + e.notidentical = 8802; + e.notless = 8814; + e.notlessnorequal = 8816; + e.notparallel = 8742; + e.notprecedes = 8832; + e.notsubset = 8836; + e.notsucceeds = 8833; + e.notsuperset = 8837; + e.nowarmenian = 1398; + e.nparen = 9385; + e.nssquare = 13233; + e.nsuperior = 8319; + e.ntilde = 241; + e.nu = 957; + e.nuhiragana = 12396; + e.nukatakana = 12492; + e.nukatakanahalfwidth = 65415; + e.nuktabengali = 2492; + e.nuktadeva = 2364; + e.nuktagujarati = 2748; + e.nuktagurmukhi = 2620; + e.numbersign = 35; + e.numbersignmonospace = 65283; + e.numbersignsmall = 65119; + e.numeralsigngreek = 884; + e.numeralsignlowergreek = 885; + e.numero = 8470; + e.nun = 1504; + e.nundagesh = 64320; + e.nundageshhebrew = 64320; + e.nunhebrew = 1504; + e.nvsquare = 13237; + e.nwsquare = 13243; + e.nyabengali = 2462; + e.nyadeva = 2334; + e.nyagujarati = 2718; + e.nyagurmukhi = 2590; + e.o = 111; + e.oacute = 243; + e.oangthai = 3629; + e.obarred = 629; + e.obarredcyrillic = 1257; + e.obarreddieresiscyrillic = 1259; + e.obengali = 2451; + e.obopomofo = 12571; + e.obreve = 335; + e.ocandradeva = 2321; + e.ocandragujarati = 2705; + e.ocandravowelsigndeva = 2377; + e.ocandravowelsigngujarati = 2761; + e.ocaron = 466; + e.ocircle = 9438; + e.ocircumflex = 244; + e.ocircumflexacute = 7889; + e.ocircumflexdotbelow = 7897; + e.ocircumflexgrave = 7891; + e.ocircumflexhookabove = 7893; + e.ocircumflextilde = 7895; + e.ocyrillic = 1086; + e.odblacute = 337; + e.odblgrave = 525; + e.odeva = 2323; + e.odieresis = 246; + e.odieresiscyrillic = 1255; + e.odotbelow = 7885; + e.oe = 339; + e.oekorean = 12634; + e.ogonek = 731; + e.ogonekcmb = 808; + e.ograve = 242; + e.ogujarati = 2707; + e.oharmenian = 1413; + e.ohiragana = 12362; + e.ohookabove = 7887; + e.ohorn = 417; + e.ohornacute = 7899; + e.ohorndotbelow = 7907; + e.ohorngrave = 7901; + e.ohornhookabove = 7903; + e.ohorntilde = 7905; + e.ohungarumlaut = 337; + e.oi = 419; + e.oinvertedbreve = 527; + e.okatakana = 12458; + e.okatakanahalfwidth = 65397; + e.okorean = 12631; + e.olehebrew = 1451; + e.omacron = 333; + e.omacronacute = 7763; + e.omacrongrave = 7761; + e.omdeva = 2384; + e.omega = 969; + e.omega1 = 982; + e.omegacyrillic = 1121; + e.omegalatinclosed = 631; + e.omegaroundcyrillic = 1147; + e.omegatitlocyrillic = 1149; + e.omegatonos = 974; + e.omgujarati = 2768; + e.omicron = 959; + e.omicrontonos = 972; + e.omonospace = 65359; + e.one = 49; + e.onearabic = 1633; + e.onebengali = 2535; + e.onecircle = 9312; + e.onecircleinversesansserif = 10122; + e.onedeva = 2407; + e.onedotenleader = 8228; + e.oneeighth = 8539; + e.onefitted = 63196; + e.onegujarati = 2791; + e.onegurmukhi = 2663; + e.onehackarabic = 1633; + e.onehalf = 189; + e.onehangzhou = 12321; + e.oneideographicparen = 12832; + e.oneinferior = 8321; + e.onemonospace = 65297; + e.onenumeratorbengali = 2548; + e.oneoldstyle = 63281; + e.oneparen = 9332; + e.oneperiod = 9352; + e.onepersian = 1777; + e.onequarter = 188; + e.oneroman = 8560; + e.onesuperior = 185; + e.onethai = 3665; + e.onethird = 8531; + e.oogonek = 491; + e.oogonekmacron = 493; + e.oogurmukhi = 2579; + e.oomatragurmukhi = 2635; + e.oopen = 596; + e.oparen = 9386; + e.openbullet = 9702; + e.option = 8997; + e.ordfeminine = 170; + e.ordmasculine = 186; + e.orthogonal = 8735; + e.oshortdeva = 2322; + e.oshortvowelsigndeva = 2378; + e.oslash = 248; + e.oslashacute = 511; + e.osmallhiragana = 12361; + e.osmallkatakana = 12457; + e.osmallkatakanahalfwidth = 65387; + e.ostrokeacute = 511; + e.osuperior = 63216; + e.otcyrillic = 1151; + e.otilde = 245; + e.otildeacute = 7757; + e.otildedieresis = 7759; + e.oubopomofo = 12577; + e.overline = 8254; + e.overlinecenterline = 65098; + e.overlinecmb = 773; + e.overlinedashed = 65097; + e.overlinedblwavy = 65100; + e.overlinewavy = 65099; + e.overscore = 175; + e.ovowelsignbengali = 2507; + e.ovowelsigndeva = 2379; + e.ovowelsigngujarati = 2763; + e.p = 112; + e.paampssquare = 13184; + e.paasentosquare = 13099; + e.pabengali = 2474; + e.pacute = 7765; + e.padeva = 2346; + e.pagedown = 8671; + e.pageup = 8670; + e.pagujarati = 2730; + e.pagurmukhi = 2602; + e.pahiragana = 12401; + e.paiyannoithai = 3631; + e.pakatakana = 12497; + e.palatalizationcyrilliccmb = 1156; + e.palochkacyrillic = 1216; + e.pansioskorean = 12671; + e.paragraph = 182; + e.parallel = 8741; + e.parenleft = 40; + e.parenleftaltonearabic = 64830; + e.parenleftbt = 63725; + e.parenleftex = 63724; + e.parenleftinferior = 8333; + e.parenleftmonospace = 65288; + e.parenleftsmall = 65113; + e.parenleftsuperior = 8317; + e.parenlefttp = 63723; + e.parenleftvertical = 65077; + e.parenright = 41; + e.parenrightaltonearabic = 64831; + e.parenrightbt = 63736; + e.parenrightex = 63735; + e.parenrightinferior = 8334; + e.parenrightmonospace = 65289; + e.parenrightsmall = 65114; + e.parenrightsuperior = 8318; + e.parenrighttp = 63734; + e.parenrightvertical = 65078; + e.partialdiff = 8706; + e.paseqhebrew = 1472; + e.pashtahebrew = 1433; + e.pasquare = 13225; + e.patah = 1463; + e.patah11 = 1463; + e.patah1d = 1463; + e.patah2a = 1463; + e.patahhebrew = 1463; + e.patahnarrowhebrew = 1463; + e.patahquarterhebrew = 1463; + e.patahwidehebrew = 1463; + e.pazerhebrew = 1441; + e.pbopomofo = 12550; + e.pcircle = 9439; + e.pdotaccent = 7767; + e.pe = 1508; + e.pecyrillic = 1087; + e.pedagesh = 64324; + e.pedageshhebrew = 64324; + e.peezisquare = 13115; + e.pefinaldageshhebrew = 64323; + e.peharabic = 1662; + e.peharmenian = 1402; + e.pehebrew = 1508; + e.pehfinalarabic = 64343; + e.pehinitialarabic = 64344; + e.pehiragana = 12410; + e.pehmedialarabic = 64345; + e.pekatakana = 12506; + e.pemiddlehookcyrillic = 1191; + e.perafehebrew = 64334; + e.percent = 37; + e.percentarabic = 1642; + e.percentmonospace = 65285; + e.percentsmall = 65130; + e.period = 46; + e.periodarmenian = 1417; + e.periodcentered = 183; + e.periodhalfwidth = 65377; + e.periodinferior = 63207; + e.periodmonospace = 65294; + e.periodsmall = 65106; + e.periodsuperior = 63208; + e.perispomenigreekcmb = 834; + e.perpendicular = 8869; + e.perthousand = 8240; + e.peseta = 8359; + e.pfsquare = 13194; + e.phabengali = 2475; + e.phadeva = 2347; + e.phagujarati = 2731; + e.phagurmukhi = 2603; + e.phi = 966; + e.phi1 = 981; + e.phieuphacirclekorean = 12922; + e.phieuphaparenkorean = 12826; + e.phieuphcirclekorean = 12908; + e.phieuphkorean = 12621; + e.phieuphparenkorean = 12812; + e.philatin = 632; + e.phinthuthai = 3642; + e.phisymbolgreek = 981; + e.phook = 421; + e.phophanthai = 3614; + e.phophungthai = 3612; + e.phosamphaothai = 3616; + e.pi = 960; + e.pieupacirclekorean = 12915; + e.pieupaparenkorean = 12819; + e.pieupcieuckorean = 12662; + e.pieupcirclekorean = 12901; + e.pieupkiyeokkorean = 12658; + e.pieupkorean = 12610; + e.pieupparenkorean = 12805; + e.pieupsioskiyeokkorean = 12660; + e.pieupsioskorean = 12612; + e.pieupsiostikeutkorean = 12661; + e.pieupthieuthkorean = 12663; + e.pieuptikeutkorean = 12659; + e.pihiragana = 12404; + e.pikatakana = 12500; + e.pisymbolgreek = 982; + e.piwrarmenian = 1411; + e.planckover2pi = 8463; + e.planckover2pi1 = 8463; + e.plus = 43; + e.plusbelowcmb = 799; + e.pluscircle = 8853; + e.plusminus = 177; + e.plusmod = 726; + e.plusmonospace = 65291; + e.plussmall = 65122; + e.plussuperior = 8314; + e.pmonospace = 65360; + e.pmsquare = 13272; + e.pohiragana = 12413; + e.pointingindexdownwhite = 9759; + e.pointingindexleftwhite = 9756; + e.pointingindexrightwhite = 9758; + e.pointingindexupwhite = 9757; + e.pokatakana = 12509; + e.poplathai = 3611; + e.postalmark = 12306; + e.postalmarkface = 12320; + e.pparen = 9387; + e.precedes = 8826; + e.prescription = 8478; + e.primemod = 697; + e.primereversed = 8245; + e.product = 8719; + e.projective = 8965; + e.prolongedkana = 12540; + e.propellor = 8984; + e.propersubset = 8834; + e.propersuperset = 8835; + e.proportion = 8759; + e.proportional = 8733; + e.psi = 968; + e.psicyrillic = 1137; + e.psilipneumatacyrilliccmb = 1158; + e.pssquare = 13232; + e.puhiragana = 12407; + e.pukatakana = 12503; + e.pvsquare = 13236; + e.pwsquare = 13242; + e.q = 113; + e.qadeva = 2392; + e.qadmahebrew = 1448; + e.qafarabic = 1602; + e.qaffinalarabic = 65238; + e.qafinitialarabic = 65239; + e.qafmedialarabic = 65240; + e.qamats = 1464; + e.qamats10 = 1464; + e.qamats1a = 1464; + e.qamats1c = 1464; + e.qamats27 = 1464; + e.qamats29 = 1464; + e.qamats33 = 1464; + e.qamatsde = 1464; + e.qamatshebrew = 1464; + e.qamatsnarrowhebrew = 1464; + e.qamatsqatanhebrew = 1464; + e.qamatsqatannarrowhebrew = 1464; + e.qamatsqatanquarterhebrew = 1464; + e.qamatsqatanwidehebrew = 1464; + e.qamatsquarterhebrew = 1464; + e.qamatswidehebrew = 1464; + e.qarneyparahebrew = 1439; + e.qbopomofo = 12561; + e.qcircle = 9440; + e.qhook = 672; + e.qmonospace = 65361; + e.qof = 1511; + e.qofdagesh = 64327; + e.qofdageshhebrew = 64327; + e.qofhebrew = 1511; + e.qparen = 9388; + e.quarternote = 9833; + e.qubuts = 1467; + e.qubuts18 = 1467; + e.qubuts25 = 1467; + e.qubuts31 = 1467; + e.qubutshebrew = 1467; + e.qubutsnarrowhebrew = 1467; + e.qubutsquarterhebrew = 1467; + e.qubutswidehebrew = 1467; + e.question = 63; + e.questionarabic = 1567; + e.questionarmenian = 1374; + e.questiondown = 191; + e.questiondownsmall = 63423; + e.questiongreek = 894; + e.questionmonospace = 65311; + e.questionsmall = 63295; + e.quotedbl = 34; + e.quotedblbase = 8222; + e.quotedblleft = 8220; + e.quotedblmonospace = 65282; + e.quotedblprime = 12318; + e.quotedblprimereversed = 12317; + e.quotedblright = 8221; + e.quoteleft = 8216; + e.quoteleftreversed = 8219; + e.quotereversed = 8219; + e.quoteright = 8217; + e.quoterightn = 329; + e.quotesinglbase = 8218; + e.quotesingle = 39; + e.quotesinglemonospace = 65287; + e.r = 114; + e.raarmenian = 1404; + e.rabengali = 2480; + e.racute = 341; + e.radeva = 2352; + e.radical = 8730; + e.radicalex = 63717; + e.radoverssquare = 13230; + e.radoverssquaredsquare = 13231; + e.radsquare = 13229; + e.rafe = 1471; + e.rafehebrew = 1471; + e.ragujarati = 2736; + e.ragurmukhi = 2608; + e.rahiragana = 12425; + e.rakatakana = 12521; + e.rakatakanahalfwidth = 65431; + e.ralowerdiagonalbengali = 2545; + e.ramiddlediagonalbengali = 2544; + e.ramshorn = 612; + e.ratio = 8758; + e.rbopomofo = 12566; + e.rcaron = 345; + e.rcedilla = 343; + e.rcircle = 9441; + e.rcommaaccent = 343; + e.rdblgrave = 529; + e.rdotaccent = 7769; + e.rdotbelow = 7771; + e.rdotbelowmacron = 7773; + e.referencemark = 8251; + e.reflexsubset = 8838; + e.reflexsuperset = 8839; + e.registered = 174; + e.registersans = 63720; + e.registerserif = 63194; + e.reharabic = 1585; + e.reharmenian = 1408; + e.rehfinalarabic = 65198; + e.rehiragana = 12428; + e.rekatakana = 12524; + e.rekatakanahalfwidth = 65434; + e.resh = 1512; + e.reshdageshhebrew = 64328; + e.reshhebrew = 1512; + e.reversedtilde = 8765; + e.reviahebrew = 1431; + e.reviamugrashhebrew = 1431; + e.revlogicalnot = 8976; + e.rfishhook = 638; + e.rfishhookreversed = 639; + e.rhabengali = 2525; + e.rhadeva = 2397; + e.rho = 961; + e.rhook = 637; + e.rhookturned = 635; + e.rhookturnedsuperior = 693; + e.rhosymbolgreek = 1009; + e.rhotichookmod = 734; + e.rieulacirclekorean = 12913; + e.rieulaparenkorean = 12817; + e.rieulcirclekorean = 12899; + e.rieulhieuhkorean = 12608; + e.rieulkiyeokkorean = 12602; + e.rieulkiyeoksioskorean = 12649; + e.rieulkorean = 12601; + e.rieulmieumkorean = 12603; + e.rieulpansioskorean = 12652; + e.rieulparenkorean = 12803; + e.rieulphieuphkorean = 12607; + e.rieulpieupkorean = 12604; + e.rieulpieupsioskorean = 12651; + e.rieulsioskorean = 12605; + e.rieulthieuthkorean = 12606; + e.rieultikeutkorean = 12650; + e.rieulyeorinhieuhkorean = 12653; + e.rightangle = 8735; + e.righttackbelowcmb = 793; + e.righttriangle = 8895; + e.rihiragana = 12426; + e.rikatakana = 12522; + e.rikatakanahalfwidth = 65432; + e.ring = 730; + e.ringbelowcmb = 805; + e.ringcmb = 778; + e.ringhalfleft = 703; + e.ringhalfleftarmenian = 1369; + e.ringhalfleftbelowcmb = 796; + e.ringhalfleftcentered = 723; + e.ringhalfright = 702; + e.ringhalfrightbelowcmb = 825; + e.ringhalfrightcentered = 722; + e.rinvertedbreve = 531; + e.rittorusquare = 13137; + e.rlinebelow = 7775; + e.rlongleg = 636; + e.rlonglegturned = 634; + e.rmonospace = 65362; + e.rohiragana = 12429; + e.rokatakana = 12525; + e.rokatakanahalfwidth = 65435; + e.roruathai = 3619; + e.rparen = 9389; + e.rrabengali = 2524; + e.rradeva = 2353; + e.rragurmukhi = 2652; + e.rreharabic = 1681; + e.rrehfinalarabic = 64397; + e.rrvocalicbengali = 2528; + e.rrvocalicdeva = 2400; + e.rrvocalicgujarati = 2784; + e.rrvocalicvowelsignbengali = 2500; + e.rrvocalicvowelsigndeva = 2372; + e.rrvocalicvowelsigngujarati = 2756; + e.rsuperior = 63217; + e.rtblock = 9616; + e.rturned = 633; + e.rturnedsuperior = 692; + e.ruhiragana = 12427; + e.rukatakana = 12523; + e.rukatakanahalfwidth = 65433; + e.rupeemarkbengali = 2546; + e.rupeesignbengali = 2547; + e.rupiah = 63197; + e.ruthai = 3620; + e.rvocalicbengali = 2443; + e.rvocalicdeva = 2315; + e.rvocalicgujarati = 2699; + e.rvocalicvowelsignbengali = 2499; + e.rvocalicvowelsigndeva = 2371; + e.rvocalicvowelsigngujarati = 2755; + e.s = 115; + e.sabengali = 2488; + e.sacute = 347; + e.sacutedotaccent = 7781; + e.sadarabic = 1589; + e.sadeva = 2360; + e.sadfinalarabic = 65210; + e.sadinitialarabic = 65211; + e.sadmedialarabic = 65212; + e.sagujarati = 2744; + e.sagurmukhi = 2616; + e.sahiragana = 12373; + e.sakatakana = 12469; + e.sakatakanahalfwidth = 65403; + e.sallallahoualayhewasallamarabic = 65018; + e.samekh = 1505; + e.samekhdagesh = 64321; + e.samekhdageshhebrew = 64321; + e.samekhhebrew = 1505; + e.saraaathai = 3634; + e.saraaethai = 3649; + e.saraaimaimalaithai = 3652; + e.saraaimaimuanthai = 3651; + e.saraamthai = 3635; + e.saraathai = 3632; + e.saraethai = 3648; + e.saraiileftthai = 63622; + e.saraiithai = 3637; + e.saraileftthai = 63621; + e.saraithai = 3636; + e.saraothai = 3650; + e.saraueeleftthai = 63624; + e.saraueethai = 3639; + e.saraueleftthai = 63623; + e.sarauethai = 3638; + e.sarauthai = 3640; + e.sarauuthai = 3641; + e.sbopomofo = 12569; + e.scaron = 353; + e.scarondotaccent = 7783; + e.scedilla = 351; + e.schwa = 601; + e.schwacyrillic = 1241; + e.schwadieresiscyrillic = 1243; + e.schwahook = 602; + e.scircle = 9442; + e.scircumflex = 349; + e.scommaaccent = 537; + e.sdotaccent = 7777; + e.sdotbelow = 7779; + e.sdotbelowdotaccent = 7785; + e.seagullbelowcmb = 828; + e.second = 8243; + e.secondtonechinese = 714; + e.section = 167; + e.seenarabic = 1587; + e.seenfinalarabic = 65202; + e.seeninitialarabic = 65203; + e.seenmedialarabic = 65204; + e.segol = 1462; + e.segol13 = 1462; + e.segol1f = 1462; + e.segol2c = 1462; + e.segolhebrew = 1462; + e.segolnarrowhebrew = 1462; + e.segolquarterhebrew = 1462; + e.segoltahebrew = 1426; + e.segolwidehebrew = 1462; + e.seharmenian = 1405; + e.sehiragana = 12379; + e.sekatakana = 12475; + e.sekatakanahalfwidth = 65406; + e.semicolon = 59; + e.semicolonarabic = 1563; + e.semicolonmonospace = 65307; + e.semicolonsmall = 65108; + e.semivoicedmarkkana = 12444; + e.semivoicedmarkkanahalfwidth = 65439; + e.sentisquare = 13090; + e.sentosquare = 13091; + e.seven = 55; + e.sevenarabic = 1639; + e.sevenbengali = 2541; + e.sevencircle = 9318; + e.sevencircleinversesansserif = 10128; + e.sevendeva = 2413; + e.seveneighths = 8542; + e.sevengujarati = 2797; + e.sevengurmukhi = 2669; + e.sevenhackarabic = 1639; + e.sevenhangzhou = 12327; + e.sevenideographicparen = 12838; + e.seveninferior = 8327; + e.sevenmonospace = 65303; + e.sevenoldstyle = 63287; + e.sevenparen = 9338; + e.sevenperiod = 9358; + e.sevenpersian = 1783; + e.sevenroman = 8566; + e.sevensuperior = 8311; + e.seventeencircle = 9328; + e.seventeenparen = 9348; + e.seventeenperiod = 9368; + e.seventhai = 3671; + e.sfthyphen = 173; + e.shaarmenian = 1399; + e.shabengali = 2486; + e.shacyrillic = 1096; + e.shaddaarabic = 1617; + e.shaddadammaarabic = 64609; + e.shaddadammatanarabic = 64606; + e.shaddafathaarabic = 64608; + e.shaddakasraarabic = 64610; + e.shaddakasratanarabic = 64607; + e.shade = 9618; + e.shadedark = 9619; + e.shadelight = 9617; + e.shademedium = 9618; + e.shadeva = 2358; + e.shagujarati = 2742; + e.shagurmukhi = 2614; + e.shalshelethebrew = 1427; + e.shbopomofo = 12565; + e.shchacyrillic = 1097; + e.sheenarabic = 1588; + e.sheenfinalarabic = 65206; + e.sheeninitialarabic = 65207; + e.sheenmedialarabic = 65208; + e.sheicoptic = 995; + e.sheqel = 8362; + e.sheqelhebrew = 8362; + e.sheva = 1456; + e.sheva115 = 1456; + e.sheva15 = 1456; + e.sheva22 = 1456; + e.sheva2e = 1456; + e.shevahebrew = 1456; + e.shevanarrowhebrew = 1456; + e.shevaquarterhebrew = 1456; + e.shevawidehebrew = 1456; + e.shhacyrillic = 1211; + e.shimacoptic = 1005; + e.shin = 1513; + e.shindagesh = 64329; + e.shindageshhebrew = 64329; + e.shindageshshindot = 64300; + e.shindageshshindothebrew = 64300; + e.shindageshsindot = 64301; + e.shindageshsindothebrew = 64301; + e.shindothebrew = 1473; + e.shinhebrew = 1513; + e.shinshindot = 64298; + e.shinshindothebrew = 64298; + e.shinsindot = 64299; + e.shinsindothebrew = 64299; + e.shook = 642; + e.sigma = 963; + e.sigma1 = 962; + e.sigmafinal = 962; + e.sigmalunatesymbolgreek = 1010; + e.sihiragana = 12375; + e.sikatakana = 12471; + e.sikatakanahalfwidth = 65404; + e.siluqhebrew = 1469; + e.siluqlefthebrew = 1469; + e.similar = 8764; + e.sindothebrew = 1474; + e.siosacirclekorean = 12916; + e.siosaparenkorean = 12820; + e.sioscieuckorean = 12670; + e.sioscirclekorean = 12902; + e.sioskiyeokkorean = 12666; + e.sioskorean = 12613; + e.siosnieunkorean = 12667; + e.siosparenkorean = 12806; + e.siospieupkorean = 12669; + e.siostikeutkorean = 12668; + e.six = 54; + e.sixarabic = 1638; + e.sixbengali = 2540; + e.sixcircle = 9317; + e.sixcircleinversesansserif = 10127; + e.sixdeva = 2412; + e.sixgujarati = 2796; + e.sixgurmukhi = 2668; + e.sixhackarabic = 1638; + e.sixhangzhou = 12326; + e.sixideographicparen = 12837; + e.sixinferior = 8326; + e.sixmonospace = 65302; + e.sixoldstyle = 63286; + e.sixparen = 9337; + e.sixperiod = 9357; + e.sixpersian = 1782; + e.sixroman = 8565; + e.sixsuperior = 8310; + e.sixteencircle = 9327; + e.sixteencurrencydenominatorbengali = 2553; + e.sixteenparen = 9347; + e.sixteenperiod = 9367; + e.sixthai = 3670; + e.slash = 47; + e.slashmonospace = 65295; + e.slong = 383; + e.slongdotaccent = 7835; + e.smileface = 9786; + e.smonospace = 65363; + e.sofpasuqhebrew = 1475; + e.softhyphen = 173; + e.softsigncyrillic = 1100; + e.sohiragana = 12381; + e.sokatakana = 12477; + e.sokatakanahalfwidth = 65407; + e.soliduslongoverlaycmb = 824; + e.solidusshortoverlaycmb = 823; + e.sorusithai = 3625; + e.sosalathai = 3624; + e.sosothai = 3595; + e.sosuathai = 3626; + e.space = 32; + e.spacehackarabic = 32; + e.spade = 9824; + e.spadesuitblack = 9824; + e.spadesuitwhite = 9828; + e.sparen = 9390; + e.squarebelowcmb = 827; + e.squarecc = 13252; + e.squarecm = 13213; + e.squarediagonalcrosshatchfill = 9641; + e.squarehorizontalfill = 9636; + e.squarekg = 13199; + e.squarekm = 13214; + e.squarekmcapital = 13262; + e.squareln = 13265; + e.squarelog = 13266; + e.squaremg = 13198; + e.squaremil = 13269; + e.squaremm = 13212; + e.squaremsquared = 13217; + e.squareorthogonalcrosshatchfill = 9638; + e.squareupperlefttolowerrightfill = 9639; + e.squareupperrighttolowerleftfill = 9640; + e.squareverticalfill = 9637; + e.squarewhitewithsmallblack = 9635; + e.srsquare = 13275; + e.ssabengali = 2487; + e.ssadeva = 2359; + e.ssagujarati = 2743; + e.ssangcieuckorean = 12617; + e.ssanghieuhkorean = 12677; + e.ssangieungkorean = 12672; + e.ssangkiyeokkorean = 12594; + e.ssangnieunkorean = 12645; + e.ssangpieupkorean = 12611; + e.ssangsioskorean = 12614; + e.ssangtikeutkorean = 12600; + e.ssuperior = 63218; + e.sterling = 163; + e.sterlingmonospace = 65505; + e.strokelongoverlaycmb = 822; + e.strokeshortoverlaycmb = 821; + e.subset = 8834; + e.subsetnotequal = 8842; + e.subsetorequal = 8838; + e.succeeds = 8827; + e.suchthat = 8715; + e.suhiragana = 12377; + e.sukatakana = 12473; + e.sukatakanahalfwidth = 65405; + e.sukunarabic = 1618; + e.summation = 8721; + e.sun = 9788; + e.superset = 8835; + e.supersetnotequal = 8843; + e.supersetorequal = 8839; + e.svsquare = 13276; + e.syouwaerasquare = 13180; + e.t = 116; + e.tabengali = 2468; + e.tackdown = 8868; + e.tackleft = 8867; + e.tadeva = 2340; + e.tagujarati = 2724; + e.tagurmukhi = 2596; + e.taharabic = 1591; + e.tahfinalarabic = 65218; + e.tahinitialarabic = 65219; + e.tahiragana = 12383; + e.tahmedialarabic = 65220; + e.taisyouerasquare = 13181; + e.takatakana = 12479; + e.takatakanahalfwidth = 65408; + e.tatweelarabic = 1600; + e.tau = 964; + e.tav = 1514; + e.tavdages = 64330; + e.tavdagesh = 64330; + e.tavdageshhebrew = 64330; + e.tavhebrew = 1514; + e.tbar = 359; + e.tbopomofo = 12554; + e.tcaron = 357; + e.tccurl = 680; + e.tcedilla = 355; + e.tcheharabic = 1670; + e.tchehfinalarabic = 64379; + e.tchehinitialarabic = 64380; + e.tchehmedialarabic = 64381; + e.tcircle = 9443; + e.tcircumflexbelow = 7793; + e.tcommaaccent = 355; + e.tdieresis = 7831; + e.tdotaccent = 7787; + e.tdotbelow = 7789; + e.tecyrillic = 1090; + e.tedescendercyrillic = 1197; + e.teharabic = 1578; + e.tehfinalarabic = 65174; + e.tehhahinitialarabic = 64674; + e.tehhahisolatedarabic = 64524; + e.tehinitialarabic = 65175; + e.tehiragana = 12390; + e.tehjeeminitialarabic = 64673; + e.tehjeemisolatedarabic = 64523; + e.tehmarbutaarabic = 1577; + e.tehmarbutafinalarabic = 65172; + e.tehmedialarabic = 65176; + e.tehmeeminitialarabic = 64676; + e.tehmeemisolatedarabic = 64526; + e.tehnoonfinalarabic = 64627; + e.tekatakana = 12486; + e.tekatakanahalfwidth = 65411; + e.telephone = 8481; + e.telephoneblack = 9742; + e.telishagedolahebrew = 1440; + e.telishaqetanahebrew = 1449; + e.tencircle = 9321; + e.tenideographicparen = 12841; + e.tenparen = 9341; + e.tenperiod = 9361; + e.tenroman = 8569; + e.tesh = 679; + e.tet = 1496; + e.tetdagesh = 64312; + e.tetdageshhebrew = 64312; + e.tethebrew = 1496; + e.tetsecyrillic = 1205; + e.tevirhebrew = 1435; + e.tevirlefthebrew = 1435; + e.thabengali = 2469; + e.thadeva = 2341; + e.thagujarati = 2725; + e.thagurmukhi = 2597; + e.thalarabic = 1584; + e.thalfinalarabic = 65196; + e.thanthakhatlowleftthai = 63640; + e.thanthakhatlowrightthai = 63639; + e.thanthakhatthai = 3660; + e.thanthakhatupperleftthai = 63638; + e.theharabic = 1579; + e.thehfinalarabic = 65178; + e.thehinitialarabic = 65179; + e.thehmedialarabic = 65180; + e.thereexists = 8707; + e.therefore = 8756; + e.theta = 952; + e.theta1 = 977; + e.thetasymbolgreek = 977; + e.thieuthacirclekorean = 12921; + e.thieuthaparenkorean = 12825; + e.thieuthcirclekorean = 12907; + e.thieuthkorean = 12620; + e.thieuthparenkorean = 12811; + e.thirteencircle = 9324; + e.thirteenparen = 9344; + e.thirteenperiod = 9364; + e.thonangmonthothai = 3601; + e.thook = 429; + e.thophuthaothai = 3602; + e.thorn = 254; + e.thothahanthai = 3607; + e.thothanthai = 3600; + e.thothongthai = 3608; + e.thothungthai = 3606; + e.thousandcyrillic = 1154; + e.thousandsseparatorarabic = 1644; + e.thousandsseparatorpersian = 1644; + e.three = 51; + e.threearabic = 1635; + e.threebengali = 2537; + e.threecircle = 9314; + e.threecircleinversesansserif = 10124; + e.threedeva = 2409; + e.threeeighths = 8540; + e.threegujarati = 2793; + e.threegurmukhi = 2665; + e.threehackarabic = 1635; + e.threehangzhou = 12323; + e.threeideographicparen = 12834; + e.threeinferior = 8323; + e.threemonospace = 65299; + e.threenumeratorbengali = 2550; + e.threeoldstyle = 63283; + e.threeparen = 9334; + e.threeperiod = 9354; + e.threepersian = 1779; + e.threequarters = 190; + e.threequartersemdash = 63198; + e.threeroman = 8562; + e.threesuperior = 179; + e.threethai = 3667; + e.thzsquare = 13204; + e.tihiragana = 12385; + e.tikatakana = 12481; + e.tikatakanahalfwidth = 65409; + e.tikeutacirclekorean = 12912; + e.tikeutaparenkorean = 12816; + e.tikeutcirclekorean = 12898; + e.tikeutkorean = 12599; + e.tikeutparenkorean = 12802; + e.tilde = 732; + e.tildebelowcmb = 816; + e.tildecmb = 771; + e.tildecomb = 771; + e.tildedoublecmb = 864; + e.tildeoperator = 8764; + e.tildeoverlaycmb = 820; + e.tildeverticalcmb = 830; + e.timescircle = 8855; + e.tipehahebrew = 1430; + e.tipehalefthebrew = 1430; + e.tippigurmukhi = 2672; + e.titlocyrilliccmb = 1155; + e.tiwnarmenian = 1407; + e.tlinebelow = 7791; + e.tmonospace = 65364; + e.toarmenian = 1385; + e.tohiragana = 12392; + e.tokatakana = 12488; + e.tokatakanahalfwidth = 65412; + e.tonebarextrahighmod = 741; + e.tonebarextralowmod = 745; + e.tonebarhighmod = 742; + e.tonebarlowmod = 744; + e.tonebarmidmod = 743; + e.tonefive = 445; + e.tonesix = 389; + e.tonetwo = 424; + e.tonos = 900; + e.tonsquare = 13095; + e.topatakthai = 3599; + e.tortoiseshellbracketleft = 12308; + e.tortoiseshellbracketleftsmall = 65117; + e.tortoiseshellbracketleftvertical = 65081; + e.tortoiseshellbracketright = 12309; + e.tortoiseshellbracketrightsmall = 65118; + e.tortoiseshellbracketrightvertical = 65082; + e.totaothai = 3605; + e.tpalatalhook = 427; + e.tparen = 9391; + e.trademark = 8482; + e.trademarksans = 63722; + e.trademarkserif = 63195; + e.tretroflexhook = 648; + e.triagdn = 9660; + e.triaglf = 9668; + e.triagrt = 9658; + e.triagup = 9650; + e.ts = 678; + e.tsadi = 1510; + e.tsadidagesh = 64326; + e.tsadidageshhebrew = 64326; + e.tsadihebrew = 1510; + e.tsecyrillic = 1094; + e.tsere = 1461; + e.tsere12 = 1461; + e.tsere1e = 1461; + e.tsere2b = 1461; + e.tserehebrew = 1461; + e.tserenarrowhebrew = 1461; + e.tserequarterhebrew = 1461; + e.tserewidehebrew = 1461; + e.tshecyrillic = 1115; + e.tsuperior = 63219; + e.ttabengali = 2463; + e.ttadeva = 2335; + e.ttagujarati = 2719; + e.ttagurmukhi = 2591; + e.tteharabic = 1657; + e.ttehfinalarabic = 64359; + e.ttehinitialarabic = 64360; + e.ttehmedialarabic = 64361; + e.tthabengali = 2464; + e.tthadeva = 2336; + e.tthagujarati = 2720; + e.tthagurmukhi = 2592; + e.tturned = 647; + e.tuhiragana = 12388; + e.tukatakana = 12484; + e.tukatakanahalfwidth = 65410; + e.tusmallhiragana = 12387; + e.tusmallkatakana = 12483; + e.tusmallkatakanahalfwidth = 65391; + e.twelvecircle = 9323; + e.twelveparen = 9343; + e.twelveperiod = 9363; + e.twelveroman = 8571; + e.twentycircle = 9331; + e.twentyhangzhou = 21316; + e.twentyparen = 9351; + e.twentyperiod = 9371; + e.two = 50; + e.twoarabic = 1634; + e.twobengali = 2536; + e.twocircle = 9313; + e.twocircleinversesansserif = 10123; + e.twodeva = 2408; + e.twodotenleader = 8229; + e.twodotleader = 8229; + e.twodotleadervertical = 65072; + e.twogujarati = 2792; + e.twogurmukhi = 2664; + e.twohackarabic = 1634; + e.twohangzhou = 12322; + e.twoideographicparen = 12833; + e.twoinferior = 8322; + e.twomonospace = 65298; + e.twonumeratorbengali = 2549; + e.twooldstyle = 63282; + e.twoparen = 9333; + e.twoperiod = 9353; + e.twopersian = 1778; + e.tworoman = 8561; + e.twostroke = 443; + e.twosuperior = 178; + e.twothai = 3666; + e.twothirds = 8532; + e.u = 117; + e.uacute = 250; + e.ubar = 649; + e.ubengali = 2441; + e.ubopomofo = 12584; + e.ubreve = 365; + e.ucaron = 468; + e.ucircle = 9444; + e.ucircumflex = 251; + e.ucircumflexbelow = 7799; + e.ucyrillic = 1091; + e.udattadeva = 2385; + e.udblacute = 369; + e.udblgrave = 533; + e.udeva = 2313; + e.udieresis = 252; + e.udieresisacute = 472; + e.udieresisbelow = 7795; + e.udieresiscaron = 474; + e.udieresiscyrillic = 1265; + e.udieresisgrave = 476; + e.udieresismacron = 470; + e.udotbelow = 7909; + e.ugrave = 249; + e.ugujarati = 2697; + e.ugurmukhi = 2569; + e.uhiragana = 12358; + e.uhookabove = 7911; + e.uhorn = 432; + e.uhornacute = 7913; + e.uhorndotbelow = 7921; + e.uhorngrave = 7915; + e.uhornhookabove = 7917; + e.uhorntilde = 7919; + e.uhungarumlaut = 369; + e.uhungarumlautcyrillic = 1267; + e.uinvertedbreve = 535; + e.ukatakana = 12454; + e.ukatakanahalfwidth = 65395; + e.ukcyrillic = 1145; + e.ukorean = 12636; + e.umacron = 363; + e.umacroncyrillic = 1263; + e.umacrondieresis = 7803; + e.umatragurmukhi = 2625; + e.umonospace = 65365; + e.underscore = 95; + e.underscoredbl = 8215; + e.underscoremonospace = 65343; + e.underscorevertical = 65075; + e.underscorewavy = 65103; + e.union = 8746; + e.universal = 8704; + e.uogonek = 371; + e.uparen = 9392; + e.upblock = 9600; + e.upperdothebrew = 1476; + e.upsilon = 965; + e.upsilondieresis = 971; + e.upsilondieresistonos = 944; + e.upsilonlatin = 650; + e.upsilontonos = 973; + e.uptackbelowcmb = 797; + e.uptackmod = 724; + e.uragurmukhi = 2675; + e.uring = 367; + e.ushortcyrillic = 1118; + e.usmallhiragana = 12357; + e.usmallkatakana = 12453; + e.usmallkatakanahalfwidth = 65385; + e.ustraightcyrillic = 1199; + e.ustraightstrokecyrillic = 1201; + e.utilde = 361; + e.utildeacute = 7801; + e.utildebelow = 7797; + e.uubengali = 2442; + e.uudeva = 2314; + e.uugujarati = 2698; + e.uugurmukhi = 2570; + e.uumatragurmukhi = 2626; + e.uuvowelsignbengali = 2498; + e.uuvowelsigndeva = 2370; + e.uuvowelsigngujarati = 2754; + e.uvowelsignbengali = 2497; + e.uvowelsigndeva = 2369; + e.uvowelsigngujarati = 2753; + e.v = 118; + e.vadeva = 2357; + e.vagujarati = 2741; + e.vagurmukhi = 2613; + e.vakatakana = 12535; + e.vav = 1493; + e.vavdagesh = 64309; + e.vavdagesh65 = 64309; + e.vavdageshhebrew = 64309; + e.vavhebrew = 1493; + e.vavholam = 64331; + e.vavholamhebrew = 64331; + e.vavvavhebrew = 1520; + e.vavyodhebrew = 1521; + e.vcircle = 9445; + e.vdotbelow = 7807; + e.vecyrillic = 1074; + e.veharabic = 1700; + e.vehfinalarabic = 64363; + e.vehinitialarabic = 64364; + e.vehmedialarabic = 64365; + e.vekatakana = 12537; + e.venus = 9792; + e.verticalbar = 124; + e.verticallineabovecmb = 781; + e.verticallinebelowcmb = 809; + e.verticallinelowmod = 716; + e.verticallinemod = 712; + e.vewarmenian = 1406; + e.vhook = 651; + e.vikatakana = 12536; + e.viramabengali = 2509; + e.viramadeva = 2381; + e.viramagujarati = 2765; + e.visargabengali = 2435; + e.visargadeva = 2307; + e.visargagujarati = 2691; + e.vmonospace = 65366; + e.voarmenian = 1400; + e.voicediterationhiragana = 12446; + e.voicediterationkatakana = 12542; + e.voicedmarkkana = 12443; + e.voicedmarkkanahalfwidth = 65438; + e.vokatakana = 12538; + e.vparen = 9393; + e.vtilde = 7805; + e.vturned = 652; + e.vuhiragana = 12436; + e.vukatakana = 12532; + e.w = 119; + e.wacute = 7811; + e.waekorean = 12633; + e.wahiragana = 12431; + e.wakatakana = 12527; + e.wakatakanahalfwidth = 65436; + e.wakorean = 12632; + e.wasmallhiragana = 12430; + e.wasmallkatakana = 12526; + e.wattosquare = 13143; + e.wavedash = 12316; + e.wavyunderscorevertical = 65076; + e.wawarabic = 1608; + e.wawfinalarabic = 65262; + e.wawhamzaabovearabic = 1572; + e.wawhamzaabovefinalarabic = 65158; + e.wbsquare = 13277; + e.wcircle = 9446; + e.wcircumflex = 373; + e.wdieresis = 7813; + e.wdotaccent = 7815; + e.wdotbelow = 7817; + e.wehiragana = 12433; + e.weierstrass = 8472; + e.wekatakana = 12529; + e.wekorean = 12638; + e.weokorean = 12637; + e.wgrave = 7809; + e.whitebullet = 9702; + e.whitecircle = 9675; + e.whitecircleinverse = 9689; + e.whitecornerbracketleft = 12302; + e.whitecornerbracketleftvertical = 65091; + e.whitecornerbracketright = 12303; + e.whitecornerbracketrightvertical = 65092; + e.whitediamond = 9671; + e.whitediamondcontainingblacksmalldiamond = 9672; + e.whitedownpointingsmalltriangle = 9663; + e.whitedownpointingtriangle = 9661; + e.whiteleftpointingsmalltriangle = 9667; + e.whiteleftpointingtriangle = 9665; + e.whitelenticularbracketleft = 12310; + e.whitelenticularbracketright = 12311; + e.whiterightpointingsmalltriangle = 9657; + e.whiterightpointingtriangle = 9655; + e.whitesmallsquare = 9643; + e.whitesmilingface = 9786; + e.whitesquare = 9633; + e.whitestar = 9734; + e.whitetelephone = 9743; + e.whitetortoiseshellbracketleft = 12312; + e.whitetortoiseshellbracketright = 12313; + e.whiteuppointingsmalltriangle = 9653; + e.whiteuppointingtriangle = 9651; + e.wihiragana = 12432; + e.wikatakana = 12528; + e.wikorean = 12639; + e.wmonospace = 65367; + e.wohiragana = 12434; + e.wokatakana = 12530; + e.wokatakanahalfwidth = 65382; + e.won = 8361; + e.wonmonospace = 65510; + e.wowaenthai = 3623; + e.wparen = 9394; + e.wring = 7832; + e.wsuperior = 695; + e.wturned = 653; + e.wynn = 447; + e.x = 120; + e.xabovecmb = 829; + e.xbopomofo = 12562; + e.xcircle = 9447; + e.xdieresis = 7821; + e.xdotaccent = 7819; + e.xeharmenian = 1389; + e.xi = 958; + e.xmonospace = 65368; + e.xparen = 9395; + e.xsuperior = 739; + e.y = 121; + e.yaadosquare = 13134; + e.yabengali = 2479; + e.yacute = 253; + e.yadeva = 2351; + e.yaekorean = 12626; + e.yagujarati = 2735; + e.yagurmukhi = 2607; + e.yahiragana = 12420; + e.yakatakana = 12516; + e.yakatakanahalfwidth = 65428; + e.yakorean = 12625; + e.yamakkanthai = 3662; + e.yasmallhiragana = 12419; + e.yasmallkatakana = 12515; + e.yasmallkatakanahalfwidth = 65388; + e.yatcyrillic = 1123; + e.ycircle = 9448; + e.ycircumflex = 375; + e.ydieresis = 255; + e.ydotaccent = 7823; + e.ydotbelow = 7925; + e.yeharabic = 1610; + e.yehbarreearabic = 1746; + e.yehbarreefinalarabic = 64431; + e.yehfinalarabic = 65266; + e.yehhamzaabovearabic = 1574; + e.yehhamzaabovefinalarabic = 65162; + e.yehhamzaaboveinitialarabic = 65163; + e.yehhamzaabovemedialarabic = 65164; + e.yehinitialarabic = 65267; + e.yehmedialarabic = 65268; + e.yehmeeminitialarabic = 64733; + e.yehmeemisolatedarabic = 64600; + e.yehnoonfinalarabic = 64660; + e.yehthreedotsbelowarabic = 1745; + e.yekorean = 12630; + e.yen = 165; + e.yenmonospace = 65509; + e.yeokorean = 12629; + e.yeorinhieuhkorean = 12678; + e.yerahbenyomohebrew = 1450; + e.yerahbenyomolefthebrew = 1450; + e.yericyrillic = 1099; + e.yerudieresiscyrillic = 1273; + e.yesieungkorean = 12673; + e.yesieungpansioskorean = 12675; + e.yesieungsioskorean = 12674; + e.yetivhebrew = 1434; + e.ygrave = 7923; + e.yhook = 436; + e.yhookabove = 7927; + e.yiarmenian = 1397; + e.yicyrillic = 1111; + e.yikorean = 12642; + e.yinyang = 9775; + e.yiwnarmenian = 1410; + e.ymonospace = 65369; + e.yod = 1497; + e.yoddagesh = 64313; + e.yoddageshhebrew = 64313; + e.yodhebrew = 1497; + e.yodyodhebrew = 1522; + e.yodyodpatahhebrew = 64287; + e.yohiragana = 12424; + e.yoikorean = 12681; + e.yokatakana = 12520; + e.yokatakanahalfwidth = 65430; + e.yokorean = 12635; + e.yosmallhiragana = 12423; + e.yosmallkatakana = 12519; + e.yosmallkatakanahalfwidth = 65390; + e.yotgreek = 1011; + e.yoyaekorean = 12680; + e.yoyakorean = 12679; + e.yoyakthai = 3618; + e.yoyingthai = 3597; + e.yparen = 9396; + e.ypogegrammeni = 890; + e.ypogegrammenigreekcmb = 837; + e.yr = 422; + e.yring = 7833; + e.ysuperior = 696; + e.ytilde = 7929; + e.yturned = 654; + e.yuhiragana = 12422; + e.yuikorean = 12684; + e.yukatakana = 12518; + e.yukatakanahalfwidth = 65429; + e.yukorean = 12640; + e.yusbigcyrillic = 1131; + e.yusbigiotifiedcyrillic = 1133; + e.yuslittlecyrillic = 1127; + e.yuslittleiotifiedcyrillic = 1129; + e.yusmallhiragana = 12421; + e.yusmallkatakana = 12517; + e.yusmallkatakanahalfwidth = 65389; + e.yuyekorean = 12683; + e.yuyeokorean = 12682; + e.yyabengali = 2527; + e.yyadeva = 2399; + e.z = 122; + e.zaarmenian = 1382; + e.zacute = 378; + e.zadeva = 2395; + e.zagurmukhi = 2651; + e.zaharabic = 1592; + e.zahfinalarabic = 65222; + e.zahinitialarabic = 65223; + e.zahiragana = 12374; + e.zahmedialarabic = 65224; + e.zainarabic = 1586; + e.zainfinalarabic = 65200; + e.zakatakana = 12470; + e.zaqefgadolhebrew = 1429; + e.zaqefqatanhebrew = 1428; + e.zarqahebrew = 1432; + e.zayin = 1494; + e.zayindagesh = 64310; + e.zayindageshhebrew = 64310; + e.zayinhebrew = 1494; + e.zbopomofo = 12567; + e.zcaron = 382; + e.zcircle = 9449; + e.zcircumflex = 7825; + e.zcurl = 657; + e.zdot = 380; + e.zdotaccent = 380; + e.zdotbelow = 7827; + e.zecyrillic = 1079; + e.zedescendercyrillic = 1177; + e.zedieresiscyrillic = 1247; + e.zehiragana = 12380; + e.zekatakana = 12476; + e.zero = 48; + e.zeroarabic = 1632; + e.zerobengali = 2534; + e.zerodeva = 2406; + e.zerogujarati = 2790; + e.zerogurmukhi = 2662; + e.zerohackarabic = 1632; + e.zeroinferior = 8320; + e.zeromonospace = 65296; + e.zerooldstyle = 63280; + e.zeropersian = 1776; + e.zerosuperior = 8304; + e.zerothai = 3664; + e.zerowidthjoiner = 65279; + e.zerowidthnonjoiner = 8204; + e.zerowidthspace = 8203; + e.zeta = 950; + e.zhbopomofo = 12563; + e.zhearmenian = 1386; + e.zhebrevecyrillic = 1218; + e.zhecyrillic = 1078; + e.zhedescendercyrillic = 1175; + e.zhedieresiscyrillic = 1245; + e.zihiragana = 12376; + e.zikatakana = 12472; + e.zinorhebrew = 1454; + e.zlinebelow = 7829; + e.zmonospace = 65370; + e.zohiragana = 12382; + e.zokatakana = 12478; + e.zparen = 9397; + e.zretroflexhook = 656; + e.zstroke = 438; + e.zuhiragana = 12378; + e.zukatakana = 12474; + e[".notdef"] = 0; + e.angbracketleftbig = 9001; + e.angbracketleftBig = 9001; + e.angbracketleftbigg = 9001; + e.angbracketleftBigg = 9001; + e.angbracketrightBig = 9002; + e.angbracketrightbig = 9002; + e.angbracketrightBigg = 9002; + e.angbracketrightbigg = 9002; + e.arrowhookleft = 8618; + e.arrowhookright = 8617; + e.arrowlefttophalf = 8636; + e.arrowleftbothalf = 8637; + e.arrownortheast = 8599; + e.arrownorthwest = 8598; + e.arrowrighttophalf = 8640; + e.arrowrightbothalf = 8641; + e.arrowsoutheast = 8600; + e.arrowsouthwest = 8601; + e.backslashbig = 8726; + e.backslashBig = 8726; + e.backslashBigg = 8726; + e.backslashbigg = 8726; + e.bardbl = 8214; + e.bracehtipdownleft = 65079; + e.bracehtipdownright = 65079; + e.bracehtipupleft = 65080; + e.bracehtipupright = 65080; + e.braceleftBig = 123; + e.braceleftbig = 123; + e.braceleftbigg = 123; + e.braceleftBigg = 123; + e.bracerightBig = 125; + e.bracerightbig = 125; + e.bracerightbigg = 125; + e.bracerightBigg = 125; + e.bracketleftbig = 91; + e.bracketleftBig = 91; + e.bracketleftbigg = 91; + e.bracketleftBigg = 91; + e.bracketrightBig = 93; + e.bracketrightbig = 93; + e.bracketrightbigg = 93; + e.bracketrightBigg = 93; + e.ceilingleftbig = 8968; + e.ceilingleftBig = 8968; + e.ceilingleftBigg = 8968; + e.ceilingleftbigg = 8968; + e.ceilingrightbig = 8969; + e.ceilingrightBig = 8969; + e.ceilingrightbigg = 8969; + e.ceilingrightBigg = 8969; + e.circledotdisplay = 8857; + e.circledottext = 8857; + e.circlemultiplydisplay = 8855; + e.circlemultiplytext = 8855; + e.circleplusdisplay = 8853; + e.circleplustext = 8853; + e.contintegraldisplay = 8750; + e.contintegraltext = 8750; + e.coproductdisplay = 8720; + e.coproducttext = 8720; + e.floorleftBig = 8970; + e.floorleftbig = 8970; + e.floorleftbigg = 8970; + e.floorleftBigg = 8970; + e.floorrightbig = 8971; + e.floorrightBig = 8971; + e.floorrightBigg = 8971; + e.floorrightbigg = 8971; + e.hatwide = 770; + e.hatwider = 770; + e.hatwidest = 770; + e.intercal = 7488; + e.integraldisplay = 8747; + e.integraltext = 8747; + e.intersectiondisplay = 8898; + e.intersectiontext = 8898; + e.logicalanddisplay = 8743; + e.logicalandtext = 8743; + e.logicalordisplay = 8744; + e.logicalortext = 8744; + e.parenleftBig = 40; + e.parenleftbig = 40; + e.parenleftBigg = 40; + e.parenleftbigg = 40; + e.parenrightBig = 41; + e.parenrightbig = 41; + e.parenrightBigg = 41; + e.parenrightbigg = 41; + e.prime = 8242; + e.productdisplay = 8719; + e.producttext = 8719; + e.radicalbig = 8730; + e.radicalBig = 8730; + e.radicalBigg = 8730; + e.radicalbigg = 8730; + e.radicalbt = 8730; + e.radicaltp = 8730; + e.radicalvertex = 8730; + e.slashbig = 47; + e.slashBig = 47; + e.slashBigg = 47; + e.slashbigg = 47; + e.summationdisplay = 8721; + e.summationtext = 8721; + e.tildewide = 732; + e.tildewider = 732; + e.tildewidest = 732; + e.uniondisplay = 8899; + e.unionmultidisplay = 8846; + e.unionmultitext = 8846; + e.unionsqdisplay = 8852; + e.unionsqtext = 8852; + e.uniontext = 8899; + e.vextenddouble = 8741; + e.vextendsingle = 8739; + }), + Gi = getLookupTableFactory(function (e) { + e.space = 32; + e.a1 = 9985; + e.a2 = 9986; + e.a202 = 9987; + e.a3 = 9988; + e.a4 = 9742; + e.a5 = 9990; + e.a119 = 9991; + e.a118 = 9992; + e.a117 = 9993; + e.a11 = 9755; + e.a12 = 9758; + e.a13 = 9996; + e.a14 = 9997; + e.a15 = 9998; + e.a16 = 9999; + e.a105 = 1e4; + e.a17 = 10001; + e.a18 = 10002; + e.a19 = 10003; + e.a20 = 10004; + e.a21 = 10005; + e.a22 = 10006; + e.a23 = 10007; + e.a24 = 10008; + e.a25 = 10009; + e.a26 = 10010; + e.a27 = 10011; + e.a28 = 10012; + e.a6 = 10013; + e.a7 = 10014; + e.a8 = 10015; + e.a9 = 10016; + e.a10 = 10017; + e.a29 = 10018; + e.a30 = 10019; + e.a31 = 10020; + e.a32 = 10021; + e.a33 = 10022; + e.a34 = 10023; + e.a35 = 9733; + e.a36 = 10025; + e.a37 = 10026; + e.a38 = 10027; + e.a39 = 10028; + e.a40 = 10029; + e.a41 = 10030; + e.a42 = 10031; + e.a43 = 10032; + e.a44 = 10033; + e.a45 = 10034; + e.a46 = 10035; + e.a47 = 10036; + e.a48 = 10037; + e.a49 = 10038; + e.a50 = 10039; + e.a51 = 10040; + e.a52 = 10041; + e.a53 = 10042; + e.a54 = 10043; + e.a55 = 10044; + e.a56 = 10045; + e.a57 = 10046; + e.a58 = 10047; + e.a59 = 10048; + e.a60 = 10049; + e.a61 = 10050; + e.a62 = 10051; + e.a63 = 10052; + e.a64 = 10053; + e.a65 = 10054; + e.a66 = 10055; + e.a67 = 10056; + e.a68 = 10057; + e.a69 = 10058; + e.a70 = 10059; + e.a71 = 9679; + e.a72 = 10061; + e.a73 = 9632; + e.a74 = 10063; + e.a203 = 10064; + e.a75 = 10065; + e.a204 = 10066; + e.a76 = 9650; + e.a77 = 9660; + e.a78 = 9670; + e.a79 = 10070; + e.a81 = 9687; + e.a82 = 10072; + e.a83 = 10073; + e.a84 = 10074; + e.a97 = 10075; + e.a98 = 10076; + e.a99 = 10077; + e.a100 = 10078; + e.a101 = 10081; + e.a102 = 10082; + e.a103 = 10083; + e.a104 = 10084; + e.a106 = 10085; + e.a107 = 10086; + e.a108 = 10087; + e.a112 = 9827; + e.a111 = 9830; + e.a110 = 9829; + e.a109 = 9824; + e.a120 = 9312; + e.a121 = 9313; + e.a122 = 9314; + e.a123 = 9315; + e.a124 = 9316; + e.a125 = 9317; + e.a126 = 9318; + e.a127 = 9319; + e.a128 = 9320; + e.a129 = 9321; + e.a130 = 10102; + e.a131 = 10103; + e.a132 = 10104; + e.a133 = 10105; + e.a134 = 10106; + e.a135 = 10107; + e.a136 = 10108; + e.a137 = 10109; + e.a138 = 10110; + e.a139 = 10111; + e.a140 = 10112; + e.a141 = 10113; + e.a142 = 10114; + e.a143 = 10115; + e.a144 = 10116; + e.a145 = 10117; + e.a146 = 10118; + e.a147 = 10119; + e.a148 = 10120; + e.a149 = 10121; + e.a150 = 10122; + e.a151 = 10123; + e.a152 = 10124; + e.a153 = 10125; + e.a154 = 10126; + e.a155 = 10127; + e.a156 = 10128; + e.a157 = 10129; + e.a158 = 10130; + e.a159 = 10131; + e.a160 = 10132; + e.a161 = 8594; + e.a163 = 8596; + e.a164 = 8597; + e.a196 = 10136; + e.a165 = 10137; + e.a192 = 10138; + e.a166 = 10139; + e.a167 = 10140; + e.a168 = 10141; + e.a169 = 10142; + e.a170 = 10143; + e.a171 = 10144; + e.a172 = 10145; + e.a173 = 10146; + e.a162 = 10147; + e.a174 = 10148; + e.a175 = 10149; + e.a176 = 10150; + e.a177 = 10151; + e.a178 = 10152; + e.a179 = 10153; + e.a193 = 10154; + e.a180 = 10155; + e.a199 = 10156; + e.a181 = 10157; + e.a200 = 10158; + e.a182 = 10159; + e.a201 = 10161; + e.a183 = 10162; + e.a184 = 10163; + e.a197 = 10164; + e.a185 = 10165; + e.a194 = 10166; + e.a198 = 10167; + e.a186 = 10168; + e.a195 = 10169; + e.a187 = 10170; + e.a188 = 10171; + e.a189 = 10172; + e.a190 = 10173; + e.a191 = 10174; + e.a89 = 10088; + e.a90 = 10089; + e.a93 = 10090; + e.a94 = 10091; + e.a91 = 10092; + e.a92 = 10093; + e.a205 = 10094; + e.a85 = 10095; + e.a206 = 10096; + e.a86 = 10097; + e.a87 = 10098; + e.a88 = 10099; + e.a95 = 10100; + e.a96 = 10101; + e[".notdef"] = 0; + }), + xi = getLookupTableFactory(function (e) { + e[63721] = 169; + e[63193] = 169; + e[63720] = 174; + e[63194] = 174; + e[63722] = 8482; + e[63195] = 8482; + e[63729] = 9127; + e[63730] = 9128; + e[63731] = 9129; + e[63740] = 9131; + e[63741] = 9132; + e[63742] = 9133; + e[63726] = 9121; + e[63727] = 9122; + e[63728] = 9123; + e[63737] = 9124; + e[63738] = 9125; + e[63739] = 9126; + e[63723] = 9115; + e[63724] = 9116; + e[63725] = 9117; + e[63734] = 9118; + e[63735] = 9119; + e[63736] = 9120; + }); +function getUnicodeForGlyph(e, t) { + let i = t[e]; + if (void 0 !== i) return i; + if (!e) return -1; + if ("u" === e[0]) { + const t = e.length; + let a; + if (7 === t && "n" === e[1] && "i" === e[2]) a = e.substring(3); + else { + if (!(t >= 5 && t <= 7)) return -1; + a = e.substring(1); + } + if (a === a.toUpperCase()) { + i = parseInt(a, 16); + if (i >= 0) return i; + } + } + return -1; +} +const Mi = [ + [0, 127], + [128, 255], + [256, 383], + [384, 591], + [592, 687, 7424, 7551, 7552, 7615], + [688, 767, 42752, 42783], + [768, 879, 7616, 7679], + [880, 1023], + [11392, 11519], + [1024, 1279, 1280, 1327, 11744, 11775, 42560, 42655], + [1328, 1423], + [1424, 1535], + [42240, 42559], + [1536, 1791, 1872, 1919], + [1984, 2047], + [2304, 2431], + [2432, 2559], + [2560, 2687], + [2688, 2815], + [2816, 2943], + [2944, 3071], + [3072, 3199], + [3200, 3327], + [3328, 3455], + [3584, 3711], + [3712, 3839], + [4256, 4351, 11520, 11567], + [6912, 7039], + [4352, 4607], + [7680, 7935, 11360, 11391, 42784, 43007], + [7936, 8191], + [8192, 8303, 11776, 11903], + [8304, 8351], + [8352, 8399], + [8400, 8447], + [8448, 8527], + [8528, 8591], + [8592, 8703, 10224, 10239, 10496, 10623, 11008, 11263], + [8704, 8959, 10752, 11007, 10176, 10223, 10624, 10751], + [8960, 9215], + [9216, 9279], + [9280, 9311], + [9312, 9471], + [9472, 9599], + [9600, 9631], + [9632, 9727], + [9728, 9983], + [9984, 10175], + [12288, 12351], + [12352, 12447], + [12448, 12543, 12784, 12799], + [12544, 12591, 12704, 12735], + [12592, 12687], + [43072, 43135], + [12800, 13055], + [13056, 13311], + [44032, 55215], + [55296, 57343], + [67840, 67871], + [ + 19968, 40959, 11904, 12031, 12032, 12255, 12272, 12287, 13312, 19903, + 131072, 173791, 12688, 12703, + ], + [57344, 63743], + [12736, 12783, 63744, 64255, 194560, 195103], + [64256, 64335], + [64336, 65023], + [65056, 65071], + [65040, 65055], + [65104, 65135], + [65136, 65279], + [65280, 65519], + [65520, 65535], + [3840, 4095], + [1792, 1871], + [1920, 1983], + [3456, 3583], + [4096, 4255], + [4608, 4991, 4992, 5023, 11648, 11743], + [5024, 5119], + [5120, 5759], + [5760, 5791], + [5792, 5887], + [6016, 6143], + [6144, 6319], + [10240, 10495], + [40960, 42127], + [5888, 5919, 5920, 5951, 5952, 5983, 5984, 6015], + [66304, 66351], + [66352, 66383], + [66560, 66639], + [118784, 119039, 119040, 119295, 119296, 119375], + [119808, 120831], + [1044480, 1048573], + [65024, 65039, 917760, 917999], + [917504, 917631], + [6400, 6479], + [6480, 6527], + [6528, 6623], + [6656, 6687], + [11264, 11359], + [11568, 11647], + [19904, 19967], + [43008, 43055], + [65536, 65663, 65664, 65791, 65792, 65855], + [65856, 65935], + [66432, 66463], + [66464, 66527], + [66640, 66687], + [66688, 66735], + [67584, 67647], + [68096, 68191], + [119552, 119647], + [73728, 74751, 74752, 74879], + [119648, 119679], + [7040, 7103], + [7168, 7247], + [7248, 7295], + [43136, 43231], + [43264, 43311], + [43312, 43359], + [43520, 43615], + [65936, 65999], + [66e3, 66047], + [66208, 66271, 66176, 66207, 67872, 67903], + [127024, 127135, 126976, 127023], +]; +function getUnicodeRangeFor(e, t = -1) { + if (-1 !== t) { + const i = Mi[t]; + for (let a = 0, s = i.length; a < s; a += 2) + if (e >= i[a] && e <= i[a + 1]) return t; + } + for (let t = 0, i = Mi.length; t < i; t++) { + const i = Mi[t]; + for (let a = 0, s = i.length; a < s; a += 2) + if (e >= i[a] && e <= i[a + 1]) return t; + } + return -1; +} +const Ji = new RegExp("^(\\s)|(\\p{Mn})|(\\p{Cf})$", "u"), + Hi = new Map(); +const Yi = !0, + vi = 1, + Ki = 2, + Ti = 4, + qi = 32, + Oi = [ + ".notdef", + ".null", + "nonmarkingreturn", + "space", + "exclam", + "quotedbl", + "numbersign", + "dollar", + "percent", + "ampersand", + "quotesingle", + "parenleft", + "parenright", + "asterisk", + "plus", + "comma", + "hyphen", + "period", + "slash", + "zero", + "one", + "two", + "three", + "four", + "five", + "six", + "seven", + "eight", + "nine", + "colon", + "semicolon", + "less", + "equal", + "greater", + "question", + "at", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + "bracketleft", + "backslash", + "bracketright", + "asciicircum", + "underscore", + "grave", + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "n", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z", + "braceleft", + "bar", + "braceright", + "asciitilde", + "Adieresis", + "Aring", + "Ccedilla", + "Eacute", + "Ntilde", + "Odieresis", + "Udieresis", + "aacute", + "agrave", + "acircumflex", + "adieresis", + "atilde", + "aring", + "ccedilla", + "eacute", + "egrave", + "ecircumflex", + "edieresis", + "iacute", + "igrave", + "icircumflex", + "idieresis", + "ntilde", + "oacute", + "ograve", + "ocircumflex", + "odieresis", + "otilde", + "uacute", + "ugrave", + "ucircumflex", + "udieresis", + "dagger", + "degree", + "cent", + "sterling", + "section", + "bullet", + "paragraph", + "germandbls", + "registered", + "copyright", + "trademark", + "acute", + "dieresis", + "notequal", + "AE", + "Oslash", + "infinity", + "plusminus", + "lessequal", + "greaterequal", + "yen", + "mu", + "partialdiff", + "summation", + "product", + "pi", + "integral", + "ordfeminine", + "ordmasculine", + "Omega", + "ae", + "oslash", + "questiondown", + "exclamdown", + "logicalnot", + "radical", + "florin", + "approxequal", + "Delta", + "guillemotleft", + "guillemotright", + "ellipsis", + "nonbreakingspace", + "Agrave", + "Atilde", + "Otilde", + "OE", + "oe", + "endash", + "emdash", + "quotedblleft", + "quotedblright", + "quoteleft", + "quoteright", + "divide", + "lozenge", + "ydieresis", + "Ydieresis", + "fraction", + "currency", + "guilsinglleft", + "guilsinglright", + "fi", + "fl", + "daggerdbl", + "periodcentered", + "quotesinglbase", + "quotedblbase", + "perthousand", + "Acircumflex", + "Ecircumflex", + "Aacute", + "Edieresis", + "Egrave", + "Iacute", + "Icircumflex", + "Idieresis", + "Igrave", + "Oacute", + "Ocircumflex", + "apple", + "Ograve", + "Uacute", + "Ucircumflex", + "Ugrave", + "dotlessi", + "circumflex", + "tilde", + "macron", + "breve", + "dotaccent", + "ring", + "cedilla", + "hungarumlaut", + "ogonek", + "caron", + "Lslash", + "lslash", + "Scaron", + "scaron", + "Zcaron", + "zcaron", + "brokenbar", + "Eth", + "eth", + "Yacute", + "yacute", + "Thorn", + "thorn", + "minus", + "multiply", + "onesuperior", + "twosuperior", + "threesuperior", + "onehalf", + "onequarter", + "threequarters", + "franc", + "Gbreve", + "gbreve", + "Idotaccent", + "Scedilla", + "scedilla", + "Cacute", + "cacute", + "Ccaron", + "ccaron", + "dcroat", + ]; +function recoverGlyphName(e, t) { + if (void 0 !== t[e]) return e; + const i = getUnicodeForGlyph(e, t); + if (-1 !== i) for (const e in t) if (t[e] === i) return e; + info("Unable to recover a standard glyph name for: " + e); + return e; +} +function type1FontGlyphMapping(e, t, i) { + const a = Object.create(null); + let s, r, n; + const o = !!(e.flags & Ti); + if (e.isInternalFont) { + n = t; + for (r = 0; r < n.length; r++) { + s = i.indexOf(n[r]); + a[r] = s >= 0 ? s : 0; + } + } else if (e.baseEncodingName) { + n = getEncoding(e.baseEncodingName); + for (r = 0; r < n.length; r++) { + s = i.indexOf(n[r]); + a[r] = s >= 0 ? s : 0; + } + } else if (o) for (r in t) a[r] = t[r]; + else { + n = fi; + for (r = 0; r < n.length; r++) { + s = i.indexOf(n[r]); + a[r] = s >= 0 ? s : 0; + } + } + const g = e.differences; + let c; + if (g) + for (r in g) { + const e = g[r]; + s = i.indexOf(e); + if (-1 === s) { + c || (c = Ni()); + const t = recoverGlyphName(e, c); + t !== e && (s = i.indexOf(t)); + } + a[r] = s >= 0 ? s : 0; + } + return a; +} +function normalizeFontName(e) { + return e.replaceAll(/[,_]/g, "-").replaceAll(/\s/g, ""); +} +const Pi = getLookupTableFactory(function (e) { + e["Times-Roman"] = "Times-Roman"; + e.Helvetica = "Helvetica"; + e.Courier = "Courier"; + e.Symbol = "Symbol"; + e["Times-Bold"] = "Times-Bold"; + e["Helvetica-Bold"] = "Helvetica-Bold"; + e["Courier-Bold"] = "Courier-Bold"; + e.ZapfDingbats = "ZapfDingbats"; + e["Times-Italic"] = "Times-Italic"; + e["Helvetica-Oblique"] = "Helvetica-Oblique"; + e["Courier-Oblique"] = "Courier-Oblique"; + e["Times-BoldItalic"] = "Times-BoldItalic"; + e["Helvetica-BoldOblique"] = "Helvetica-BoldOblique"; + e["Courier-BoldOblique"] = "Courier-BoldOblique"; + e.ArialNarrow = "Helvetica"; + e["ArialNarrow-Bold"] = "Helvetica-Bold"; + e["ArialNarrow-BoldItalic"] = "Helvetica-BoldOblique"; + e["ArialNarrow-Italic"] = "Helvetica-Oblique"; + e.ArialBlack = "Helvetica"; + e["ArialBlack-Bold"] = "Helvetica-Bold"; + e["ArialBlack-BoldItalic"] = "Helvetica-BoldOblique"; + e["ArialBlack-Italic"] = "Helvetica-Oblique"; + e["Arial-Black"] = "Helvetica"; + e["Arial-Black-Bold"] = "Helvetica-Bold"; + e["Arial-Black-BoldItalic"] = "Helvetica-BoldOblique"; + e["Arial-Black-Italic"] = "Helvetica-Oblique"; + e.Arial = "Helvetica"; + e["Arial-Bold"] = "Helvetica-Bold"; + e["Arial-BoldItalic"] = "Helvetica-BoldOblique"; + e["Arial-Italic"] = "Helvetica-Oblique"; + e.ArialMT = "Helvetica"; + e["Arial-BoldItalicMT"] = "Helvetica-BoldOblique"; + e["Arial-BoldMT"] = "Helvetica-Bold"; + e["Arial-ItalicMT"] = "Helvetica-Oblique"; + e["Arial-BoldItalicMT-BoldItalic"] = "Helvetica-BoldOblique"; + e["Arial-BoldMT-Bold"] = "Helvetica-Bold"; + e["Arial-ItalicMT-Italic"] = "Helvetica-Oblique"; + e.ArialUnicodeMS = "Helvetica"; + e["ArialUnicodeMS-Bold"] = "Helvetica-Bold"; + e["ArialUnicodeMS-BoldItalic"] = "Helvetica-BoldOblique"; + e["ArialUnicodeMS-Italic"] = "Helvetica-Oblique"; + e["Courier-BoldItalic"] = "Courier-BoldOblique"; + e["Courier-Italic"] = "Courier-Oblique"; + e.CourierNew = "Courier"; + e["CourierNew-Bold"] = "Courier-Bold"; + e["CourierNew-BoldItalic"] = "Courier-BoldOblique"; + e["CourierNew-Italic"] = "Courier-Oblique"; + e["CourierNewPS-BoldItalicMT"] = "Courier-BoldOblique"; + e["CourierNewPS-BoldMT"] = "Courier-Bold"; + e["CourierNewPS-ItalicMT"] = "Courier-Oblique"; + e.CourierNewPSMT = "Courier"; + e["Helvetica-BoldItalic"] = "Helvetica-BoldOblique"; + e["Helvetica-Italic"] = "Helvetica-Oblique"; + e["Symbol-Bold"] = "Symbol"; + e["Symbol-BoldItalic"] = "Symbol"; + e["Symbol-Italic"] = "Symbol"; + e.TimesNewRoman = "Times-Roman"; + e["TimesNewRoman-Bold"] = "Times-Bold"; + e["TimesNewRoman-BoldItalic"] = "Times-BoldItalic"; + e["TimesNewRoman-Italic"] = "Times-Italic"; + e.TimesNewRomanPS = "Times-Roman"; + e["TimesNewRomanPS-Bold"] = "Times-Bold"; + e["TimesNewRomanPS-BoldItalic"] = "Times-BoldItalic"; + e["TimesNewRomanPS-BoldItalicMT"] = "Times-BoldItalic"; + e["TimesNewRomanPS-BoldMT"] = "Times-Bold"; + e["TimesNewRomanPS-Italic"] = "Times-Italic"; + e["TimesNewRomanPS-ItalicMT"] = "Times-Italic"; + e.TimesNewRomanPSMT = "Times-Roman"; + e["TimesNewRomanPSMT-Bold"] = "Times-Bold"; + e["TimesNewRomanPSMT-BoldItalic"] = "Times-BoldItalic"; + e["TimesNewRomanPSMT-Italic"] = "Times-Italic"; + }), + Wi = getLookupTableFactory(function (e) { + e.Courier = "FoxitFixed.pfb"; + e["Courier-Bold"] = "FoxitFixedBold.pfb"; + e["Courier-BoldOblique"] = "FoxitFixedBoldItalic.pfb"; + e["Courier-Oblique"] = "FoxitFixedItalic.pfb"; + e.Helvetica = "LiberationSans-Regular.ttf"; + e["Helvetica-Bold"] = "LiberationSans-Bold.ttf"; + e["Helvetica-BoldOblique"] = "LiberationSans-BoldItalic.ttf"; + e["Helvetica-Oblique"] = "LiberationSans-Italic.ttf"; + e["Times-Roman"] = "FoxitSerif.pfb"; + e["Times-Bold"] = "FoxitSerifBold.pfb"; + e["Times-BoldItalic"] = "FoxitSerifBoldItalic.pfb"; + e["Times-Italic"] = "FoxitSerifItalic.pfb"; + e.Symbol = "FoxitSymbol.pfb"; + e.ZapfDingbats = "FoxitDingbats.pfb"; + e["LiberationSans-Regular"] = "LiberationSans-Regular.ttf"; + e["LiberationSans-Bold"] = "LiberationSans-Bold.ttf"; + e["LiberationSans-Italic"] = "LiberationSans-Italic.ttf"; + e["LiberationSans-BoldItalic"] = "LiberationSans-BoldItalic.ttf"; + }), + Xi = getLookupTableFactory(function (e) { + e.Calibri = "Helvetica"; + e["Calibri-Bold"] = "Helvetica-Bold"; + e["Calibri-BoldItalic"] = "Helvetica-BoldOblique"; + e["Calibri-Italic"] = "Helvetica-Oblique"; + e.CenturyGothic = "Helvetica"; + e["CenturyGothic-Bold"] = "Helvetica-Bold"; + e["CenturyGothic-BoldItalic"] = "Helvetica-BoldOblique"; + e["CenturyGothic-Italic"] = "Helvetica-Oblique"; + e.ComicSansMS = "Comic Sans MS"; + e["ComicSansMS-Bold"] = "Comic Sans MS-Bold"; + e["ComicSansMS-BoldItalic"] = "Comic Sans MS-BoldItalic"; + e["ComicSansMS-Italic"] = "Comic Sans MS-Italic"; + e.Impact = "Helvetica"; + e["ItcSymbol-Bold"] = "Helvetica-Bold"; + e["ItcSymbol-BoldItalic"] = "Helvetica-BoldOblique"; + e["ItcSymbol-Book"] = "Helvetica"; + e["ItcSymbol-BookItalic"] = "Helvetica-Oblique"; + e["ItcSymbol-Medium"] = "Helvetica"; + e["ItcSymbol-MediumItalic"] = "Helvetica-Oblique"; + e.LucidaConsole = "Courier"; + e["LucidaConsole-Bold"] = "Courier-Bold"; + e["LucidaConsole-BoldItalic"] = "Courier-BoldOblique"; + e["LucidaConsole-Italic"] = "Courier-Oblique"; + e["LucidaSans-Demi"] = "Helvetica-Bold"; + e["MS-Gothic"] = "MS Gothic"; + e["MS-Gothic-Bold"] = "MS Gothic-Bold"; + e["MS-Gothic-BoldItalic"] = "MS Gothic-BoldItalic"; + e["MS-Gothic-Italic"] = "MS Gothic-Italic"; + e["MS-Mincho"] = "MS Mincho"; + e["MS-Mincho-Bold"] = "MS Mincho-Bold"; + e["MS-Mincho-BoldItalic"] = "MS Mincho-BoldItalic"; + e["MS-Mincho-Italic"] = "MS Mincho-Italic"; + e["MS-PGothic"] = "MS PGothic"; + e["MS-PGothic-Bold"] = "MS PGothic-Bold"; + e["MS-PGothic-BoldItalic"] = "MS PGothic-BoldItalic"; + e["MS-PGothic-Italic"] = "MS PGothic-Italic"; + e["MS-PMincho"] = "MS PMincho"; + e["MS-PMincho-Bold"] = "MS PMincho-Bold"; + e["MS-PMincho-BoldItalic"] = "MS PMincho-BoldItalic"; + e["MS-PMincho-Italic"] = "MS PMincho-Italic"; + e.NuptialScript = "Times-Italic"; + e.SegoeUISymbol = "Helvetica"; + }), + ji = getLookupTableFactory(function (e) { + e["Adobe Jenson"] = !0; + e["Adobe Text"] = !0; + e.Albertus = !0; + e.Aldus = !0; + e.Alexandria = !0; + e.Algerian = !0; + e["American Typewriter"] = !0; + e.Antiqua = !0; + e.Apex = !0; + e.Arno = !0; + e.Aster = !0; + e.Aurora = !0; + e.Baskerville = !0; + e.Bell = !0; + e.Bembo = !0; + e["Bembo Schoolbook"] = !0; + e.Benguiat = !0; + e["Berkeley Old Style"] = !0; + e["Bernhard Modern"] = !0; + e["Berthold City"] = !0; + e.Bodoni = !0; + e["Bauer Bodoni"] = !0; + e["Book Antiqua"] = !0; + e.Bookman = !0; + e["Bordeaux Roman"] = !0; + e["Californian FB"] = !0; + e.Calisto = !0; + e.Calvert = !0; + e.Capitals = !0; + e.Cambria = !0; + e.Cartier = !0; + e.Caslon = !0; + e.Catull = !0; + e.Centaur = !0; + e["Century Old Style"] = !0; + e["Century Schoolbook"] = !0; + e.Chaparral = !0; + e["Charis SIL"] = !0; + e.Cheltenham = !0; + e["Cholla Slab"] = !0; + e.Clarendon = !0; + e.Clearface = !0; + e.Cochin = !0; + e.Colonna = !0; + e["Computer Modern"] = !0; + e["Concrete Roman"] = !0; + e.Constantia = !0; + e["Cooper Black"] = !0; + e.Corona = !0; + e.Ecotype = !0; + e.Egyptienne = !0; + e.Elephant = !0; + e.Excelsior = !0; + e.Fairfield = !0; + e["FF Scala"] = !0; + e.Folkard = !0; + e.Footlight = !0; + e.FreeSerif = !0; + e["Friz Quadrata"] = !0; + e.Garamond = !0; + e.Gentium = !0; + e.Georgia = !0; + e.Gloucester = !0; + e["Goudy Old Style"] = !0; + e["Goudy Schoolbook"] = !0; + e["Goudy Pro Font"] = !0; + e.Granjon = !0; + e["Guardian Egyptian"] = !0; + e.Heather = !0; + e.Hercules = !0; + e["High Tower Text"] = !0; + e.Hiroshige = !0; + e["Hoefler Text"] = !0; + e["Humana Serif"] = !0; + e.Imprint = !0; + e["Ionic No. 5"] = !0; + e.Janson = !0; + e.Joanna = !0; + e.Korinna = !0; + e.Lexicon = !0; + e.LiberationSerif = !0; + e["Liberation Serif"] = !0; + e["Linux Libertine"] = !0; + e.Literaturnaya = !0; + e.Lucida = !0; + e["Lucida Bright"] = !0; + e.Melior = !0; + e.Memphis = !0; + e.Miller = !0; + e.Minion = !0; + e.Modern = !0; + e["Mona Lisa"] = !0; + e["Mrs Eaves"] = !0; + e["MS Serif"] = !0; + e["Museo Slab"] = !0; + e["New York"] = !0; + e["Nimbus Roman"] = !0; + e["NPS Rawlinson Roadway"] = !0; + e.NuptialScript = !0; + e.Palatino = !0; + e.Perpetua = !0; + e.Plantin = !0; + e["Plantin Schoolbook"] = !0; + e.Playbill = !0; + e["Poor Richard"] = !0; + e["Rawlinson Roadway"] = !0; + e.Renault = !0; + e.Requiem = !0; + e.Rockwell = !0; + e.Roman = !0; + e["Rotis Serif"] = !0; + e.Sabon = !0; + e.Scala = !0; + e.Seagull = !0; + e.Sistina = !0; + e.Souvenir = !0; + e.STIX = !0; + e["Stone Informal"] = !0; + e["Stone Serif"] = !0; + e.Sylfaen = !0; + e.Times = !0; + e.Trajan = !0; + e["Trinité"] = !0; + e["Trump Mediaeval"] = !0; + e.Utopia = !0; + e["Vale Type"] = !0; + e["Bitstream Vera"] = !0; + e["Vera Serif"] = !0; + e.Versailles = !0; + e.Wanted = !0; + e.Weiss = !0; + e["Wide Latin"] = !0; + e.Windsor = !0; + e.XITS = !0; + }), + Zi = getLookupTableFactory(function (e) { + e.Dingbats = !0; + e.Symbol = !0; + e.ZapfDingbats = !0; + e.Wingdings = !0; + e["Wingdings-Bold"] = !0; + e["Wingdings-Regular"] = !0; + }), + Vi = getLookupTableFactory(function (e) { + e[2] = 10; + e[3] = 32; + e[4] = 33; + e[5] = 34; + e[6] = 35; + e[7] = 36; + e[8] = 37; + e[9] = 38; + e[10] = 39; + e[11] = 40; + e[12] = 41; + e[13] = 42; + e[14] = 43; + e[15] = 44; + e[16] = 45; + e[17] = 46; + e[18] = 47; + e[19] = 48; + e[20] = 49; + e[21] = 50; + e[22] = 51; + e[23] = 52; + e[24] = 53; + e[25] = 54; + e[26] = 55; + e[27] = 56; + e[28] = 57; + e[29] = 58; + e[30] = 894; + e[31] = 60; + e[32] = 61; + e[33] = 62; + e[34] = 63; + e[35] = 64; + e[36] = 65; + e[37] = 66; + e[38] = 67; + e[39] = 68; + e[40] = 69; + e[41] = 70; + e[42] = 71; + e[43] = 72; + e[44] = 73; + e[45] = 74; + e[46] = 75; + e[47] = 76; + e[48] = 77; + e[49] = 78; + e[50] = 79; + e[51] = 80; + e[52] = 81; + e[53] = 82; + e[54] = 83; + e[55] = 84; + e[56] = 85; + e[57] = 86; + e[58] = 87; + e[59] = 88; + e[60] = 89; + e[61] = 90; + e[62] = 91; + e[63] = 92; + e[64] = 93; + e[65] = 94; + e[66] = 95; + e[67] = 96; + e[68] = 97; + e[69] = 98; + e[70] = 99; + e[71] = 100; + e[72] = 101; + e[73] = 102; + e[74] = 103; + e[75] = 104; + e[76] = 105; + e[77] = 106; + e[78] = 107; + e[79] = 108; + e[80] = 109; + e[81] = 110; + e[82] = 111; + e[83] = 112; + e[84] = 113; + e[85] = 114; + e[86] = 115; + e[87] = 116; + e[88] = 117; + e[89] = 118; + e[90] = 119; + e[91] = 120; + e[92] = 121; + e[93] = 122; + e[94] = 123; + e[95] = 124; + e[96] = 125; + e[97] = 126; + e[98] = 196; + e[99] = 197; + e[100] = 199; + e[101] = 201; + e[102] = 209; + e[103] = 214; + e[104] = 220; + e[105] = 225; + e[106] = 224; + e[107] = 226; + e[108] = 228; + e[109] = 227; + e[110] = 229; + e[111] = 231; + e[112] = 233; + e[113] = 232; + e[114] = 234; + e[115] = 235; + e[116] = 237; + e[117] = 236; + e[118] = 238; + e[119] = 239; + e[120] = 241; + e[121] = 243; + e[122] = 242; + e[123] = 244; + e[124] = 246; + e[125] = 245; + e[126] = 250; + e[127] = 249; + e[128] = 251; + e[129] = 252; + e[130] = 8224; + e[131] = 176; + e[132] = 162; + e[133] = 163; + e[134] = 167; + e[135] = 8226; + e[136] = 182; + e[137] = 223; + e[138] = 174; + e[139] = 169; + e[140] = 8482; + e[141] = 180; + e[142] = 168; + e[143] = 8800; + e[144] = 198; + e[145] = 216; + e[146] = 8734; + e[147] = 177; + e[148] = 8804; + e[149] = 8805; + e[150] = 165; + e[151] = 181; + e[152] = 8706; + e[153] = 8721; + e[154] = 8719; + e[156] = 8747; + e[157] = 170; + e[158] = 186; + e[159] = 8486; + e[160] = 230; + e[161] = 248; + e[162] = 191; + e[163] = 161; + e[164] = 172; + e[165] = 8730; + e[166] = 402; + e[167] = 8776; + e[168] = 8710; + e[169] = 171; + e[170] = 187; + e[171] = 8230; + e[179] = 8220; + e[180] = 8221; + e[181] = 8216; + e[182] = 8217; + e[200] = 193; + e[203] = 205; + e[207] = 211; + e[210] = 218; + e[223] = 711; + e[224] = 321; + e[225] = 322; + e[226] = 352; + e[227] = 353; + e[228] = 381; + e[229] = 382; + e[233] = 221; + e[234] = 253; + e[252] = 263; + e[253] = 268; + e[254] = 269; + e[258] = 258; + e[260] = 260; + e[261] = 261; + e[265] = 280; + e[266] = 281; + e[267] = 282; + e[268] = 283; + e[269] = 313; + e[275] = 323; + e[276] = 324; + e[278] = 328; + e[283] = 344; + e[284] = 345; + e[285] = 346; + e[286] = 347; + e[292] = 367; + e[295] = 377; + e[296] = 378; + e[298] = 380; + e[305] = 963; + e[306] = 964; + e[307] = 966; + e[308] = 8215; + e[309] = 8252; + e[310] = 8319; + e[311] = 8359; + e[312] = 8592; + e[313] = 8593; + e[337] = 9552; + e[493] = 1039; + e[494] = 1040; + e[672] = 1488; + e[673] = 1489; + e[674] = 1490; + e[675] = 1491; + e[676] = 1492; + e[677] = 1493; + e[678] = 1494; + e[679] = 1495; + e[680] = 1496; + e[681] = 1497; + e[682] = 1498; + e[683] = 1499; + e[684] = 1500; + e[685] = 1501; + e[686] = 1502; + e[687] = 1503; + e[688] = 1504; + e[689] = 1505; + e[690] = 1506; + e[691] = 1507; + e[692] = 1508; + e[693] = 1509; + e[694] = 1510; + e[695] = 1511; + e[696] = 1512; + e[697] = 1513; + e[698] = 1514; + e[705] = 1524; + e[706] = 8362; + e[710] = 64288; + e[711] = 64298; + e[759] = 1617; + e[761] = 1776; + e[763] = 1778; + e[775] = 1652; + e[777] = 1764; + e[778] = 1780; + e[779] = 1781; + e[780] = 1782; + e[782] = 771; + e[783] = 64726; + e[786] = 8363; + e[788] = 8532; + e[790] = 768; + e[791] = 769; + e[792] = 768; + e[795] = 803; + e[797] = 64336; + e[798] = 64337; + e[799] = 64342; + e[800] = 64343; + e[801] = 64344; + e[802] = 64345; + e[803] = 64362; + e[804] = 64363; + e[805] = 64364; + e[2424] = 7821; + e[2425] = 7822; + e[2426] = 7823; + e[2427] = 7824; + e[2428] = 7825; + e[2429] = 7826; + e[2430] = 7827; + e[2433] = 7682; + e[2678] = 8045; + e[2679] = 8046; + e[2830] = 1552; + e[2838] = 686; + e[2840] = 751; + e[2842] = 753; + e[2843] = 754; + e[2844] = 755; + e[2846] = 757; + e[2856] = 767; + e[2857] = 848; + e[2858] = 849; + e[2862] = 853; + e[2863] = 854; + e[2864] = 855; + e[2865] = 861; + e[2866] = 862; + e[2906] = 7460; + e[2908] = 7462; + e[2909] = 7463; + e[2910] = 7464; + e[2912] = 7466; + e[2913] = 7467; + e[2914] = 7468; + e[2916] = 7470; + e[2917] = 7471; + e[2918] = 7472; + e[2920] = 7474; + e[2921] = 7475; + e[2922] = 7476; + e[2924] = 7478; + e[2925] = 7479; + e[2926] = 7480; + e[2928] = 7482; + e[2929] = 7483; + e[2930] = 7484; + e[2932] = 7486; + e[2933] = 7487; + e[2934] = 7488; + e[2936] = 7490; + e[2937] = 7491; + e[2938] = 7492; + e[2940] = 7494; + e[2941] = 7495; + e[2942] = 7496; + e[2944] = 7498; + e[2946] = 7500; + e[2948] = 7502; + e[2950] = 7504; + e[2951] = 7505; + e[2952] = 7506; + e[2954] = 7508; + e[2955] = 7509; + e[2956] = 7510; + e[2958] = 7512; + e[2959] = 7513; + e[2960] = 7514; + e[2962] = 7516; + e[2963] = 7517; + e[2964] = 7518; + e[2966] = 7520; + e[2967] = 7521; + e[2968] = 7522; + e[2970] = 7524; + e[2971] = 7525; + e[2972] = 7526; + e[2974] = 7528; + e[2975] = 7529; + e[2976] = 7530; + e[2978] = 1537; + e[2979] = 1538; + e[2980] = 1539; + e[2982] = 1549; + e[2983] = 1551; + e[2984] = 1552; + e[2986] = 1554; + e[2987] = 1555; + e[2988] = 1556; + e[2990] = 1623; + e[2991] = 1624; + e[2995] = 1775; + e[2999] = 1791; + e[3002] = 64290; + e[3003] = 64291; + e[3004] = 64292; + e[3006] = 64294; + e[3007] = 64295; + e[3008] = 64296; + e[3011] = 1900; + e[3014] = 8223; + e[3015] = 8244; + e[3017] = 7532; + e[3018] = 7533; + e[3019] = 7534; + e[3075] = 7590; + e[3076] = 7591; + e[3079] = 7594; + e[3080] = 7595; + e[3083] = 7598; + e[3084] = 7599; + e[3087] = 7602; + e[3088] = 7603; + e[3091] = 7606; + e[3092] = 7607; + e[3095] = 7610; + e[3096] = 7611; + e[3099] = 7614; + e[3100] = 7615; + e[3103] = 7618; + e[3104] = 7619; + e[3107] = 8337; + e[3108] = 8338; + e[3116] = 1884; + e[3119] = 1885; + e[3120] = 1885; + e[3123] = 1886; + e[3124] = 1886; + e[3127] = 1887; + e[3128] = 1887; + e[3131] = 1888; + e[3132] = 1888; + e[3135] = 1889; + e[3136] = 1889; + e[3139] = 1890; + e[3140] = 1890; + e[3143] = 1891; + e[3144] = 1891; + e[3147] = 1892; + e[3148] = 1892; + e[3153] = 580; + e[3154] = 581; + e[3157] = 584; + e[3158] = 585; + e[3161] = 588; + e[3162] = 589; + e[3165] = 891; + e[3166] = 892; + e[3169] = 1274; + e[3170] = 1275; + e[3173] = 1278; + e[3174] = 1279; + e[3181] = 7622; + e[3182] = 7623; + e[3282] = 11799; + e[3316] = 578; + e[3379] = 42785; + e[3393] = 1159; + e[3416] = 8377; + }), + zi = getLookupTableFactory(function (e) { + e[227] = 322; + e[264] = 261; + e[291] = 346; + }), + _i = getLookupTableFactory(function (e) { + e[1] = 32; + e[4] = 65; + e[5] = 192; + e[6] = 193; + e[9] = 196; + e[17] = 66; + e[18] = 67; + e[21] = 268; + e[24] = 68; + e[28] = 69; + e[29] = 200; + e[30] = 201; + e[32] = 282; + e[38] = 70; + e[39] = 71; + e[44] = 72; + e[47] = 73; + e[48] = 204; + e[49] = 205; + e[58] = 74; + e[60] = 75; + e[62] = 76; + e[68] = 77; + e[69] = 78; + e[75] = 79; + e[76] = 210; + e[80] = 214; + e[87] = 80; + e[89] = 81; + e[90] = 82; + e[92] = 344; + e[94] = 83; + e[97] = 352; + e[100] = 84; + e[104] = 85; + e[109] = 220; + e[115] = 86; + e[116] = 87; + e[121] = 88; + e[122] = 89; + e[124] = 221; + e[127] = 90; + e[129] = 381; + e[258] = 97; + e[259] = 224; + e[260] = 225; + e[263] = 228; + e[268] = 261; + e[271] = 98; + e[272] = 99; + e[273] = 263; + e[275] = 269; + e[282] = 100; + e[286] = 101; + e[287] = 232; + e[288] = 233; + e[290] = 283; + e[295] = 281; + e[296] = 102; + e[336] = 103; + e[346] = 104; + e[349] = 105; + e[350] = 236; + e[351] = 237; + e[361] = 106; + e[364] = 107; + e[367] = 108; + e[371] = 322; + e[373] = 109; + e[374] = 110; + e[381] = 111; + e[382] = 242; + e[383] = 243; + e[386] = 246; + e[393] = 112; + e[395] = 113; + e[396] = 114; + e[398] = 345; + e[400] = 115; + e[401] = 347; + e[403] = 353; + e[410] = 116; + e[437] = 117; + e[442] = 252; + e[448] = 118; + e[449] = 119; + e[454] = 120; + e[455] = 121; + e[457] = 253; + e[460] = 122; + e[462] = 382; + e[463] = 380; + e[853] = 44; + e[855] = 58; + e[856] = 46; + e[876] = 47; + e[878] = 45; + e[882] = 45; + e[894] = 40; + e[895] = 41; + e[896] = 91; + e[897] = 93; + e[923] = 64; + e[1004] = 48; + e[1005] = 49; + e[1006] = 50; + e[1007] = 51; + e[1008] = 52; + e[1009] = 53; + e[1010] = 54; + e[1011] = 55; + e[1012] = 56; + e[1013] = 57; + e[1081] = 37; + e[1085] = 43; + e[1086] = 45; + }); +function getStandardFontName(e) { + const t = normalizeFontName(e); + return Pi()[t]; +} +function isKnownFontName(e) { + const t = normalizeFontName(e); + return !!(Pi()[t] || Xi()[t] || ji()[t] || Zi()[t]); +} +class ToUnicodeMap { + constructor(e = []) { + this._map = e; + } + get length() { + return this._map.length; + } + forEach(e) { + for (const t in this._map) e(t, this._map[t].charCodeAt(0)); + } + has(e) { + return void 0 !== this._map[e]; + } + get(e) { + return this._map[e]; + } + charCodeOf(e) { + const t = this._map; + if (t.length <= 65536) return t.indexOf(e); + for (const i in t) if (t[i] === e) return 0 | i; + return -1; + } + amend(e) { + for (const t in e) this._map[t] = e[t]; + } +} +class IdentityToUnicodeMap { + constructor(e, t) { + this.firstChar = e; + this.lastChar = t; + } + get length() { + return this.lastChar + 1 - this.firstChar; + } + forEach(e) { + for (let t = this.firstChar, i = this.lastChar; t <= i; t++) e(t, t); + } + has(e) { + return this.firstChar <= e && e <= this.lastChar; + } + get(e) { + if (this.firstChar <= e && e <= this.lastChar) + return String.fromCharCode(e); + } + charCodeOf(e) { + return Number.isInteger(e) && e >= this.firstChar && e <= this.lastChar + ? e + : -1; + } + amend(e) { + unreachable("Should not call amend()"); + } +} +class CFFFont { + constructor(e, t) { + this.properties = t; + const i = new CFFParser(e, t, Yi); + this.cff = i.parse(); + this.cff.duplicateFirstGlyph(); + const a = new CFFCompiler(this.cff); + this.seacs = this.cff.seacs; + try { + this.data = a.compile(); + } catch { + warn("Failed to compile font " + t.loadedName); + this.data = e; + } + this._createBuiltInEncoding(); + } + get numGlyphs() { + return this.cff.charStrings.count; + } + getCharset() { + return this.cff.charset.charset; + } + getGlyphMapping() { + const e = this.cff, + t = this.properties, + { cidToGidMap: i, cMap: a } = t, + s = e.charset.charset; + let r, n; + if (t.composite) { + let t, o; + if (i?.length > 0) { + t = Object.create(null); + for (let e = 0, a = i.length; e < a; e++) { + const a = i[e]; + void 0 !== a && (t[a] = e); + } + } + r = Object.create(null); + if (e.isCIDFont) + for (n = 0; n < s.length; n++) { + const e = s[n]; + o = a.charCodeOf(e); + void 0 !== t?.[o] && (o = t[o]); + r[o] = n; + } + else + for (n = 0; n < e.charStrings.count; n++) { + o = a.charCodeOf(n); + r[o] = n; + } + return r; + } + let o = e.encoding ? e.encoding.encoding : null; + t.isInternalFont && (o = t.defaultEncoding); + r = type1FontGlyphMapping(t, o, s); + return r; + } + hasGlyphId(e) { + return this.cff.hasGlyphId(e); + } + _createBuiltInEncoding() { + const { charset: e, encoding: t } = this.cff; + if (!e || !t) return; + const i = e.charset, + a = t.encoding, + s = []; + for (const e in a) { + const t = a[e]; + if (t >= 0) { + const a = i[t]; + a && (s[e] = a); + } + } + s.length > 0 && (this.properties.builtInEncoding = s); + } +} +function getUint32(e, t) { + return ((e[t] << 24) | (e[t + 1] << 16) | (e[t + 2] << 8) | e[t + 3]) >>> 0; +} +function getUint16(e, t) { + return (e[t] << 8) | e[t + 1]; +} +function getInt16(e, t) { + return ((e[t] << 24) | (e[t + 1] << 16)) >> 16; +} +function getInt8(e, t) { + return (e[t] << 24) >> 24; +} +function getFloat214(e, t) { + return getInt16(e, t) / 16384; +} +function getSubroutineBias(e) { + const t = e.length; + let i = 32768; + t < 1240 ? (i = 107) : t < 33900 && (i = 1131); + return i; +} +function parseCmap(e, t, i) { + const a = + 1 === getUint16(e, t + 2) ? getUint32(e, t + 8) : getUint32(e, t + 16), + s = getUint16(e, t + a); + let r, n, o; + if (4 === s) { + getUint16(e, t + a + 2); + const i = getUint16(e, t + a + 6) >> 1; + n = t + a + 14; + r = []; + for (o = 0; o < i; o++, n += 2) r[o] = { end: getUint16(e, n) }; + n += 2; + for (o = 0; o < i; o++, n += 2) r[o].start = getUint16(e, n); + for (o = 0; o < i; o++, n += 2) r[o].idDelta = getUint16(e, n); + for (o = 0; o < i; o++, n += 2) { + let t = getUint16(e, n); + if (0 !== t) { + r[o].ids = []; + for (let i = 0, a = r[o].end - r[o].start + 1; i < a; i++) { + r[o].ids[i] = getUint16(e, n + t); + t += 2; + } + } + } + return r; + } + if (12 === s) { + const i = getUint32(e, t + a + 12); + n = t + a + 16; + r = []; + for (o = 0; o < i; o++) { + t = getUint32(e, n); + r.push({ + start: t, + end: getUint32(e, n + 4), + idDelta: getUint32(e, n + 8) - t, + }); + n += 12; + } + return r; + } + throw new FormatError(`unsupported cmap: ${s}`); +} +function parseCff(e, t, i, a) { + const s = new CFFParser(new Stream(e, t, i - t), {}, a).parse(); + return { + glyphs: s.charStrings.objects, + subrs: s.topDict.privateDict?.subrsIndex?.objects, + gsubrs: s.globalSubrIndex?.objects, + isCFFCIDFont: s.isCIDFont, + fdSelect: s.fdSelect, + fdArray: s.fdArray, + }; +} +function lookupCmap(e, t) { + const i = t.codePointAt(0); + let a = 0, + s = 0, + r = e.length - 1; + for (; s < r; ) { + const t = (s + r + 1) >> 1; + i < e[t].start ? (r = t - 1) : (s = t); + } + e[s].start <= i && + i <= e[s].end && + (a = (e[s].idDelta + (e[s].ids ? e[s].ids[i - e[s].start] : i)) & 65535); + return { charCode: i, glyphId: a }; +} +function compileGlyf(e, t, i) { + function moveTo(e, i) { + t.add(ht, [e, i]); + } + function lineTo(e, i) { + t.add(lt, [e, i]); + } + function quadraticCurveTo(e, i, a, s) { + t.add(Ct, [e, i, a, s]); + } + let a = 0; + const s = getInt16(e, a); + let r, + n = 0, + o = 0; + a += 10; + if (s < 0) + do { + r = getUint16(e, a); + const s = getUint16(e, a + 2); + a += 4; + let g, c; + if (1 & r) { + if (2 & r) { + g = getInt16(e, a); + c = getInt16(e, a + 2); + } else { + g = getUint16(e, a); + c = getUint16(e, a + 2); + } + a += 4; + } else if (2 & r) { + g = getInt8(e, a++); + c = getInt8(e, a++); + } else { + g = e[a++]; + c = e[a++]; + } + if (2 & r) { + n = g; + o = c; + } else { + n = 0; + o = 0; + } + let h = 1, + l = 1, + C = 0, + Q = 0; + if (8 & r) { + h = l = getFloat214(e, a); + a += 2; + } else if (64 & r) { + h = getFloat214(e, a); + l = getFloat214(e, a + 2); + a += 4; + } else if (128 & r) { + h = getFloat214(e, a); + C = getFloat214(e, a + 2); + Q = getFloat214(e, a + 4); + l = getFloat214(e, a + 6); + a += 8; + } + const E = i.glyphs[s]; + if (E) { + t.add(Qt); + t.add(ut, [h, C, Q, l, n, o]); + compileGlyf(E, t, i); + t.add(Bt); + } + } while (32 & r); + else { + const t = []; + let i, g; + for (i = 0; i < s; i++) { + t.push(getUint16(e, a)); + a += 2; + } + a += 2 + getUint16(e, a); + const c = t.at(-1) + 1, + h = []; + for (; h.length < c; ) { + r = e[a++]; + let t = 1; + 8 & r && (t += e[a++]); + for (; t-- > 0; ) h.push({ flags: r }); + } + for (i = 0; i < c; i++) { + switch (18 & h[i].flags) { + case 0: + n += getInt16(e, a); + a += 2; + break; + case 2: + n -= e[a++]; + break; + case 18: + n += e[a++]; + } + h[i].x = n; + } + for (i = 0; i < c; i++) { + switch (36 & h[i].flags) { + case 0: + o += getInt16(e, a); + a += 2; + break; + case 4: + o -= e[a++]; + break; + case 36: + o += e[a++]; + } + h[i].y = o; + } + let l = 0; + for (a = 0; a < s; a++) { + const e = t[a], + s = h.slice(l, e + 1); + if (1 & s[0].flags) s.push(s[0]); + else if (1 & s.at(-1).flags) s.unshift(s.at(-1)); + else { + const e = { + flags: 1, + x: (s[0].x + s.at(-1).x) / 2, + y: (s[0].y + s.at(-1).y) / 2, + }; + s.unshift(e); + s.push(e); + } + moveTo(s[0].x, s[0].y); + for (i = 1, g = s.length; i < g; i++) + if (1 & s[i].flags) lineTo(s[i].x, s[i].y); + else if (1 & s[i + 1].flags) { + quadraticCurveTo(s[i].x, s[i].y, s[i + 1].x, s[i + 1].y); + i++; + } else + quadraticCurveTo( + s[i].x, + s[i].y, + (s[i].x + s[i + 1].x) / 2, + (s[i].y + s[i + 1].y) / 2, + ); + l = e + 1; + } + } +} +function compileCharString(e, t, i, a) { + function moveTo(e, i) { + t.add(ht, [e, i]); + } + function lineTo(e, i) { + t.add(lt, [e, i]); + } + function bezierCurveTo(e, i, a, s, r, n) { + t.add(ct, [e, i, a, s, r, n]); + } + const s = []; + let r = 0, + n = 0, + o = 0; + !(function parse(e) { + let g = 0; + for (; g < e.length; ) { + let c, + h, + l, + C, + Q, + E, + u, + d, + f, + p = !1, + m = e[g++]; + switch (m) { + case 1: + case 3: + case 18: + case 23: + o += s.length >> 1; + p = !0; + break; + case 4: + n += s.pop(); + moveTo(r, n); + p = !0; + break; + case 5: + for (; s.length > 0; ) { + r += s.shift(); + n += s.shift(); + lineTo(r, n); + } + break; + case 6: + for (; s.length > 0; ) { + r += s.shift(); + lineTo(r, n); + if (0 === s.length) break; + n += s.shift(); + lineTo(r, n); + } + break; + case 7: + for (; s.length > 0; ) { + n += s.shift(); + lineTo(r, n); + if (0 === s.length) break; + r += s.shift(); + lineTo(r, n); + } + break; + case 8: + for (; s.length > 0; ) { + c = r + s.shift(); + l = n + s.shift(); + h = c + s.shift(); + C = l + s.shift(); + r = h + s.shift(); + n = C + s.shift(); + bezierCurveTo(c, l, h, C, r, n); + } + break; + case 10: + d = s.pop(); + f = null; + if (i.isCFFCIDFont) { + const e = i.fdSelect.getFDIndex(a); + if (e >= 0 && e < i.fdArray.length) { + const t = i.fdArray[e]; + let a; + t.privateDict?.subrsIndex && + (a = t.privateDict.subrsIndex.objects); + if (a) { + d += getSubroutineBias(a); + f = a[d]; + } + } else warn("Invalid fd index for glyph index."); + } else f = i.subrs[d + i.subrsBias]; + f && parse(f); + break; + case 11: + return; + case 12: + m = e[g++]; + switch (m) { + case 34: + c = r + s.shift(); + h = c + s.shift(); + Q = n + s.shift(); + r = h + s.shift(); + bezierCurveTo(c, n, h, Q, r, Q); + c = r + s.shift(); + h = c + s.shift(); + r = h + s.shift(); + bezierCurveTo(c, Q, h, n, r, n); + break; + case 35: + c = r + s.shift(); + l = n + s.shift(); + h = c + s.shift(); + C = l + s.shift(); + r = h + s.shift(); + n = C + s.shift(); + bezierCurveTo(c, l, h, C, r, n); + c = r + s.shift(); + l = n + s.shift(); + h = c + s.shift(); + C = l + s.shift(); + r = h + s.shift(); + n = C + s.shift(); + bezierCurveTo(c, l, h, C, r, n); + s.pop(); + break; + case 36: + c = r + s.shift(); + Q = n + s.shift(); + h = c + s.shift(); + E = Q + s.shift(); + r = h + s.shift(); + bezierCurveTo(c, Q, h, E, r, E); + c = r + s.shift(); + h = c + s.shift(); + u = E + s.shift(); + r = h + s.shift(); + bezierCurveTo(c, E, h, u, r, n); + break; + case 37: + const e = r, + t = n; + c = r + s.shift(); + l = n + s.shift(); + h = c + s.shift(); + C = l + s.shift(); + r = h + s.shift(); + n = C + s.shift(); + bezierCurveTo(c, l, h, C, r, n); + c = r + s.shift(); + l = n + s.shift(); + h = c + s.shift(); + C = l + s.shift(); + r = h; + n = C; + Math.abs(r - e) > Math.abs(n - t) + ? (r += s.shift()) + : (n += s.shift()); + bezierCurveTo(c, l, h, C, r, n); + break; + default: + throw new FormatError(`unknown operator: 12 ${m}`); + } + break; + case 14: + if (s.length >= 4) { + const e = s.pop(), + a = s.pop(); + n = s.pop(); + r = s.pop(); + t.add(Qt); + t.add(dt, [r, n]); + let o = lookupCmap( + i.cmap, + String.fromCharCode(i.glyphNameMap[fi[e]]), + ); + compileCharString(i.glyphs[o.glyphId], t, i, o.glyphId); + t.add(Bt); + o = lookupCmap(i.cmap, String.fromCharCode(i.glyphNameMap[fi[a]])); + compileCharString(i.glyphs[o.glyphId], t, i, o.glyphId); + } + return; + case 19: + case 20: + o += s.length >> 1; + g += (o + 7) >> 3; + p = !0; + break; + case 21: + n += s.pop(); + r += s.pop(); + moveTo(r, n); + p = !0; + break; + case 22: + r += s.pop(); + moveTo(r, n); + p = !0; + break; + case 24: + for (; s.length > 2; ) { + c = r + s.shift(); + l = n + s.shift(); + h = c + s.shift(); + C = l + s.shift(); + r = h + s.shift(); + n = C + s.shift(); + bezierCurveTo(c, l, h, C, r, n); + } + r += s.shift(); + n += s.shift(); + lineTo(r, n); + break; + case 25: + for (; s.length > 6; ) { + r += s.shift(); + n += s.shift(); + lineTo(r, n); + } + c = r + s.shift(); + l = n + s.shift(); + h = c + s.shift(); + C = l + s.shift(); + r = h + s.shift(); + n = C + s.shift(); + bezierCurveTo(c, l, h, C, r, n); + break; + case 26: + s.length % 2 && (r += s.shift()); + for (; s.length > 0; ) { + c = r; + l = n + s.shift(); + h = c + s.shift(); + C = l + s.shift(); + r = h; + n = C + s.shift(); + bezierCurveTo(c, l, h, C, r, n); + } + break; + case 27: + s.length % 2 && (n += s.shift()); + for (; s.length > 0; ) { + c = r + s.shift(); + l = n; + h = c + s.shift(); + C = l + s.shift(); + r = h + s.shift(); + n = C; + bezierCurveTo(c, l, h, C, r, n); + } + break; + case 28: + s.push(((e[g] << 24) | (e[g + 1] << 16)) >> 16); + g += 2; + break; + case 29: + d = s.pop() + i.gsubrsBias; + f = i.gsubrs[d]; + f && parse(f); + break; + case 30: + for (; s.length > 0; ) { + c = r; + l = n + s.shift(); + h = c + s.shift(); + C = l + s.shift(); + r = h + s.shift(); + n = C + (1 === s.length ? s.shift() : 0); + bezierCurveTo(c, l, h, C, r, n); + if (0 === s.length) break; + c = r + s.shift(); + l = n; + h = c + s.shift(); + C = l + s.shift(); + n = C + s.shift(); + r = h + (1 === s.length ? s.shift() : 0); + bezierCurveTo(c, l, h, C, r, n); + } + break; + case 31: + for (; s.length > 0; ) { + c = r + s.shift(); + l = n; + h = c + s.shift(); + C = l + s.shift(); + n = C + s.shift(); + r = h + (1 === s.length ? s.shift() : 0); + bezierCurveTo(c, l, h, C, r, n); + if (0 === s.length) break; + c = r; + l = n + s.shift(); + h = c + s.shift(); + C = l + s.shift(); + r = h + s.shift(); + n = C + (1 === s.length ? s.shift() : 0); + bezierCurveTo(c, l, h, C, r, n); + } + break; + default: + if (m < 32) throw new FormatError(`unknown operator: ${m}`); + if (m < 247) s.push(m - 139); + else if (m < 251) s.push(256 * (m - 247) + e[g++] + 108); + else if (m < 255) s.push(256 * -(m - 251) - e[g++] - 108); + else { + s.push( + ((e[g] << 24) | (e[g + 1] << 16) | (e[g + 2] << 8) | e[g + 3]) / + 65536, + ); + g += 4; + } + } + p && (s.length = 0); + } + })(e); +} +const $i = []; +class Commands { + cmds = []; + add(e, t) { + if (t) + if (isNumberArray(t, null)) this.cmds.push(e, ...t); + else { + warn(`Commands.add - "${e}" has at least one non-number arg: "${t}".`); + const i = t.map((e) => ("number" == typeof e ? e : 0)); + this.cmds.push(e, ...i); + } + else this.cmds.push(e); + } +} +class CompiledFont { + constructor(e) { + this.constructor === CompiledFont && + unreachable("Cannot initialize CompiledFont."); + this.fontMatrix = e; + this.compiledGlyphs = Object.create(null); + this.compiledCharCodeToGlyphId = Object.create(null); + } + getPathJs(e) { + const { charCode: t, glyphId: i } = lookupCmap(this.cmap, e); + let a, + s = this.compiledGlyphs[i]; + if (!s) { + try { + s = this.compileGlyph(this.glyphs[i], i); + } catch (e) { + s = $i; + a = e; + } + this.compiledGlyphs[i] = s; + } + this.compiledCharCodeToGlyphId[t] ??= i; + if (a) throw a; + return s; + } + compileGlyph(e, t) { + if (!e || 0 === e.length || 14 === e[0]) return $i; + let i = this.fontMatrix; + if (this.isCFFCIDFont) { + const e = this.fdSelect.getFDIndex(t); + if (e >= 0 && e < this.fdArray.length) { + i = this.fdArray[e].getByName("FontMatrix") || a; + } else warn("Invalid fd index for glyph index."); + } + const s = new Commands(); + s.add(Qt); + s.add(ut, i.slice()); + s.add(Et); + this.compileGlyphImpl(e, s, t); + s.add(Bt); + return s.cmds; + } + compileGlyphImpl() { + unreachable("Children classes should implement this."); + } + hasBuiltPath(e) { + const { charCode: t, glyphId: i } = lookupCmap(this.cmap, e); + return ( + void 0 !== this.compiledGlyphs[i] && + void 0 !== this.compiledCharCodeToGlyphId[t] + ); + } +} +class TrueTypeCompiled extends CompiledFont { + constructor(e, t, i) { + super(i || [488e-6, 0, 0, 488e-6, 0, 0]); + this.glyphs = e; + this.cmap = t; + } + compileGlyphImpl(e, t) { + compileGlyf(e, t, this); + } +} +class Type2Compiled extends CompiledFont { + constructor(e, t, i, a) { + super(i || [0.001, 0, 0, 0.001, 0, 0]); + this.glyphs = e.glyphs; + this.gsubrs = e.gsubrs || []; + this.subrs = e.subrs || []; + this.cmap = t; + this.glyphNameMap = a || Ni(); + this.gsubrsBias = getSubroutineBias(this.gsubrs); + this.subrsBias = getSubroutineBias(this.subrs); + this.isCFFCIDFont = e.isCFFCIDFont; + this.fdSelect = e.fdSelect; + this.fdArray = e.fdArray; + } + compileGlyphImpl(e, t, i) { + compileCharString(e, t, this, i); + } +} +class FontRendererFactory { + static create(e, t) { + const i = new Uint8Array(e.data); + let a, s, r, n, o, g; + const c = getUint16(i, 4); + for (let e = 0, h = 12; e < c; e++, h += 16) { + const e = bytesToString(i.subarray(h, h + 4)), + c = getUint32(i, h + 8), + l = getUint32(i, h + 12); + switch (e) { + case "cmap": + a = parseCmap(i, c); + break; + case "glyf": + s = i.subarray(c, c + l); + break; + case "loca": + r = i.subarray(c, c + l); + break; + case "head": + g = getUint16(i, c + 18); + o = getUint16(i, c + 50); + break; + case "CFF ": + n = parseCff(i, c, c + l, t); + } + } + if (s) { + const t = g ? [1 / g, 0, 0, 1 / g, 0, 0] : e.fontMatrix; + return new TrueTypeCompiled( + (function parseGlyfTable(e, t, i) { + let a, s; + if (i) { + a = 4; + s = getUint32; + } else { + a = 2; + s = (e, t) => 2 * getUint16(e, t); + } + const r = []; + let n = s(t, 0); + for (let i = a; i < t.length; i += a) { + const a = s(t, i); + r.push(e.subarray(n, a)); + n = a; + } + return r; + })(s, r, o), + a, + t, + ); + } + return new Type2Compiled(n, a, e.fontMatrix, e.glyphNameMap); + } +} +const Aa = getLookupTableFactory(function (e) { + e.Courier = 600; + e["Courier-Bold"] = 600; + e["Courier-BoldOblique"] = 600; + e["Courier-Oblique"] = 600; + e.Helvetica = getLookupTableFactory(function (e) { + e.space = 278; + e.exclam = 278; + e.quotedbl = 355; + e.numbersign = 556; + e.dollar = 556; + e.percent = 889; + e.ampersand = 667; + e.quoteright = 222; + e.parenleft = 333; + e.parenright = 333; + e.asterisk = 389; + e.plus = 584; + e.comma = 278; + e.hyphen = 333; + e.period = 278; + e.slash = 278; + e.zero = 556; + e.one = 556; + e.two = 556; + e.three = 556; + e.four = 556; + e.five = 556; + e.six = 556; + e.seven = 556; + e.eight = 556; + e.nine = 556; + e.colon = 278; + e.semicolon = 278; + e.less = 584; + e.equal = 584; + e.greater = 584; + e.question = 556; + e.at = 1015; + e.A = 667; + e.B = 667; + e.C = 722; + e.D = 722; + e.E = 667; + e.F = 611; + e.G = 778; + e.H = 722; + e.I = 278; + e.J = 500; + e.K = 667; + e.L = 556; + e.M = 833; + e.N = 722; + e.O = 778; + e.P = 667; + e.Q = 778; + e.R = 722; + e.S = 667; + e.T = 611; + e.U = 722; + e.V = 667; + e.W = 944; + e.X = 667; + e.Y = 667; + e.Z = 611; + e.bracketleft = 278; + e.backslash = 278; + e.bracketright = 278; + e.asciicircum = 469; + e.underscore = 556; + e.quoteleft = 222; + e.a = 556; + e.b = 556; + e.c = 500; + e.d = 556; + e.e = 556; + e.f = 278; + e.g = 556; + e.h = 556; + e.i = 222; + e.j = 222; + e.k = 500; + e.l = 222; + e.m = 833; + e.n = 556; + e.o = 556; + e.p = 556; + e.q = 556; + e.r = 333; + e.s = 500; + e.t = 278; + e.u = 556; + e.v = 500; + e.w = 722; + e.x = 500; + e.y = 500; + e.z = 500; + e.braceleft = 334; + e.bar = 260; + e.braceright = 334; + e.asciitilde = 584; + e.exclamdown = 333; + e.cent = 556; + e.sterling = 556; + e.fraction = 167; + e.yen = 556; + e.florin = 556; + e.section = 556; + e.currency = 556; + e.quotesingle = 191; + e.quotedblleft = 333; + e.guillemotleft = 556; + e.guilsinglleft = 333; + e.guilsinglright = 333; + e.fi = 500; + e.fl = 500; + e.endash = 556; + e.dagger = 556; + e.daggerdbl = 556; + e.periodcentered = 278; + e.paragraph = 537; + e.bullet = 350; + e.quotesinglbase = 222; + e.quotedblbase = 333; + e.quotedblright = 333; + e.guillemotright = 556; + e.ellipsis = 1e3; + e.perthousand = 1e3; + e.questiondown = 611; + e.grave = 333; + e.acute = 333; + e.circumflex = 333; + e.tilde = 333; + e.macron = 333; + e.breve = 333; + e.dotaccent = 333; + e.dieresis = 333; + e.ring = 333; + e.cedilla = 333; + e.hungarumlaut = 333; + e.ogonek = 333; + e.caron = 333; + e.emdash = 1e3; + e.AE = 1e3; + e.ordfeminine = 370; + e.Lslash = 556; + e.Oslash = 778; + e.OE = 1e3; + e.ordmasculine = 365; + e.ae = 889; + e.dotlessi = 278; + e.lslash = 222; + e.oslash = 611; + e.oe = 944; + e.germandbls = 611; + e.Idieresis = 278; + e.eacute = 556; + e.abreve = 556; + e.uhungarumlaut = 556; + e.ecaron = 556; + e.Ydieresis = 667; + e.divide = 584; + e.Yacute = 667; + e.Acircumflex = 667; + e.aacute = 556; + e.Ucircumflex = 722; + e.yacute = 500; + e.scommaaccent = 500; + e.ecircumflex = 556; + e.Uring = 722; + e.Udieresis = 722; + e.aogonek = 556; + e.Uacute = 722; + e.uogonek = 556; + e.Edieresis = 667; + e.Dcroat = 722; + e.commaaccent = 250; + e.copyright = 737; + e.Emacron = 667; + e.ccaron = 500; + e.aring = 556; + e.Ncommaaccent = 722; + e.lacute = 222; + e.agrave = 556; + e.Tcommaaccent = 611; + e.Cacute = 722; + e.atilde = 556; + e.Edotaccent = 667; + e.scaron = 500; + e.scedilla = 500; + e.iacute = 278; + e.lozenge = 471; + e.Rcaron = 722; + e.Gcommaaccent = 778; + e.ucircumflex = 556; + e.acircumflex = 556; + e.Amacron = 667; + e.rcaron = 333; + e.ccedilla = 500; + e.Zdotaccent = 611; + e.Thorn = 667; + e.Omacron = 778; + e.Racute = 722; + e.Sacute = 667; + e.dcaron = 643; + e.Umacron = 722; + e.uring = 556; + e.threesuperior = 333; + e.Ograve = 778; + e.Agrave = 667; + e.Abreve = 667; + e.multiply = 584; + e.uacute = 556; + e.Tcaron = 611; + e.partialdiff = 476; + e.ydieresis = 500; + e.Nacute = 722; + e.icircumflex = 278; + e.Ecircumflex = 667; + e.adieresis = 556; + e.edieresis = 556; + e.cacute = 500; + e.nacute = 556; + e.umacron = 556; + e.Ncaron = 722; + e.Iacute = 278; + e.plusminus = 584; + e.brokenbar = 260; + e.registered = 737; + e.Gbreve = 778; + e.Idotaccent = 278; + e.summation = 600; + e.Egrave = 667; + e.racute = 333; + e.omacron = 556; + e.Zacute = 611; + e.Zcaron = 611; + e.greaterequal = 549; + e.Eth = 722; + e.Ccedilla = 722; + e.lcommaaccent = 222; + e.tcaron = 317; + e.eogonek = 556; + e.Uogonek = 722; + e.Aacute = 667; + e.Adieresis = 667; + e.egrave = 556; + e.zacute = 500; + e.iogonek = 222; + e.Oacute = 778; + e.oacute = 556; + e.amacron = 556; + e.sacute = 500; + e.idieresis = 278; + e.Ocircumflex = 778; + e.Ugrave = 722; + e.Delta = 612; + e.thorn = 556; + e.twosuperior = 333; + e.Odieresis = 778; + e.mu = 556; + e.igrave = 278; + e.ohungarumlaut = 556; + e.Eogonek = 667; + e.dcroat = 556; + e.threequarters = 834; + e.Scedilla = 667; + e.lcaron = 299; + e.Kcommaaccent = 667; + e.Lacute = 556; + e.trademark = 1e3; + e.edotaccent = 556; + e.Igrave = 278; + e.Imacron = 278; + e.Lcaron = 556; + e.onehalf = 834; + e.lessequal = 549; + e.ocircumflex = 556; + e.ntilde = 556; + e.Uhungarumlaut = 722; + e.Eacute = 667; + e.emacron = 556; + e.gbreve = 556; + e.onequarter = 834; + e.Scaron = 667; + e.Scommaaccent = 667; + e.Ohungarumlaut = 778; + e.degree = 400; + e.ograve = 556; + e.Ccaron = 722; + e.ugrave = 556; + e.radical = 453; + e.Dcaron = 722; + e.rcommaaccent = 333; + e.Ntilde = 722; + e.otilde = 556; + e.Rcommaaccent = 722; + e.Lcommaaccent = 556; + e.Atilde = 667; + e.Aogonek = 667; + e.Aring = 667; + e.Otilde = 778; + e.zdotaccent = 500; + e.Ecaron = 667; + e.Iogonek = 278; + e.kcommaaccent = 500; + e.minus = 584; + e.Icircumflex = 278; + e.ncaron = 556; + e.tcommaaccent = 278; + e.logicalnot = 584; + e.odieresis = 556; + e.udieresis = 556; + e.notequal = 549; + e.gcommaaccent = 556; + e.eth = 556; + e.zcaron = 500; + e.ncommaaccent = 556; + e.onesuperior = 333; + e.imacron = 278; + e.Euro = 556; + }); + e["Helvetica-Bold"] = getLookupTableFactory(function (e) { + e.space = 278; + e.exclam = 333; + e.quotedbl = 474; + e.numbersign = 556; + e.dollar = 556; + e.percent = 889; + e.ampersand = 722; + e.quoteright = 278; + e.parenleft = 333; + e.parenright = 333; + e.asterisk = 389; + e.plus = 584; + e.comma = 278; + e.hyphen = 333; + e.period = 278; + e.slash = 278; + e.zero = 556; + e.one = 556; + e.two = 556; + e.three = 556; + e.four = 556; + e.five = 556; + e.six = 556; + e.seven = 556; + e.eight = 556; + e.nine = 556; + e.colon = 333; + e.semicolon = 333; + e.less = 584; + e.equal = 584; + e.greater = 584; + e.question = 611; + e.at = 975; + e.A = 722; + e.B = 722; + e.C = 722; + e.D = 722; + e.E = 667; + e.F = 611; + e.G = 778; + e.H = 722; + e.I = 278; + e.J = 556; + e.K = 722; + e.L = 611; + e.M = 833; + e.N = 722; + e.O = 778; + e.P = 667; + e.Q = 778; + e.R = 722; + e.S = 667; + e.T = 611; + e.U = 722; + e.V = 667; + e.W = 944; + e.X = 667; + e.Y = 667; + e.Z = 611; + e.bracketleft = 333; + e.backslash = 278; + e.bracketright = 333; + e.asciicircum = 584; + e.underscore = 556; + e.quoteleft = 278; + e.a = 556; + e.b = 611; + e.c = 556; + e.d = 611; + e.e = 556; + e.f = 333; + e.g = 611; + e.h = 611; + e.i = 278; + e.j = 278; + e.k = 556; + e.l = 278; + e.m = 889; + e.n = 611; + e.o = 611; + e.p = 611; + e.q = 611; + e.r = 389; + e.s = 556; + e.t = 333; + e.u = 611; + e.v = 556; + e.w = 778; + e.x = 556; + e.y = 556; + e.z = 500; + e.braceleft = 389; + e.bar = 280; + e.braceright = 389; + e.asciitilde = 584; + e.exclamdown = 333; + e.cent = 556; + e.sterling = 556; + e.fraction = 167; + e.yen = 556; + e.florin = 556; + e.section = 556; + e.currency = 556; + e.quotesingle = 238; + e.quotedblleft = 500; + e.guillemotleft = 556; + e.guilsinglleft = 333; + e.guilsinglright = 333; + e.fi = 611; + e.fl = 611; + e.endash = 556; + e.dagger = 556; + e.daggerdbl = 556; + e.periodcentered = 278; + e.paragraph = 556; + e.bullet = 350; + e.quotesinglbase = 278; + e.quotedblbase = 500; + e.quotedblright = 500; + e.guillemotright = 556; + e.ellipsis = 1e3; + e.perthousand = 1e3; + e.questiondown = 611; + e.grave = 333; + e.acute = 333; + e.circumflex = 333; + e.tilde = 333; + e.macron = 333; + e.breve = 333; + e.dotaccent = 333; + e.dieresis = 333; + e.ring = 333; + e.cedilla = 333; + e.hungarumlaut = 333; + e.ogonek = 333; + e.caron = 333; + e.emdash = 1e3; + e.AE = 1e3; + e.ordfeminine = 370; + e.Lslash = 611; + e.Oslash = 778; + e.OE = 1e3; + e.ordmasculine = 365; + e.ae = 889; + e.dotlessi = 278; + e.lslash = 278; + e.oslash = 611; + e.oe = 944; + e.germandbls = 611; + e.Idieresis = 278; + e.eacute = 556; + e.abreve = 556; + e.uhungarumlaut = 611; + e.ecaron = 556; + e.Ydieresis = 667; + e.divide = 584; + e.Yacute = 667; + e.Acircumflex = 722; + e.aacute = 556; + e.Ucircumflex = 722; + e.yacute = 556; + e.scommaaccent = 556; + e.ecircumflex = 556; + e.Uring = 722; + e.Udieresis = 722; + e.aogonek = 556; + e.Uacute = 722; + e.uogonek = 611; + e.Edieresis = 667; + e.Dcroat = 722; + e.commaaccent = 250; + e.copyright = 737; + e.Emacron = 667; + e.ccaron = 556; + e.aring = 556; + e.Ncommaaccent = 722; + e.lacute = 278; + e.agrave = 556; + e.Tcommaaccent = 611; + e.Cacute = 722; + e.atilde = 556; + e.Edotaccent = 667; + e.scaron = 556; + e.scedilla = 556; + e.iacute = 278; + e.lozenge = 494; + e.Rcaron = 722; + e.Gcommaaccent = 778; + e.ucircumflex = 611; + e.acircumflex = 556; + e.Amacron = 722; + e.rcaron = 389; + e.ccedilla = 556; + e.Zdotaccent = 611; + e.Thorn = 667; + e.Omacron = 778; + e.Racute = 722; + e.Sacute = 667; + e.dcaron = 743; + e.Umacron = 722; + e.uring = 611; + e.threesuperior = 333; + e.Ograve = 778; + e.Agrave = 722; + e.Abreve = 722; + e.multiply = 584; + e.uacute = 611; + e.Tcaron = 611; + e.partialdiff = 494; + e.ydieresis = 556; + e.Nacute = 722; + e.icircumflex = 278; + e.Ecircumflex = 667; + e.adieresis = 556; + e.edieresis = 556; + e.cacute = 556; + e.nacute = 611; + e.umacron = 611; + e.Ncaron = 722; + e.Iacute = 278; + e.plusminus = 584; + e.brokenbar = 280; + e.registered = 737; + e.Gbreve = 778; + e.Idotaccent = 278; + e.summation = 600; + e.Egrave = 667; + e.racute = 389; + e.omacron = 611; + e.Zacute = 611; + e.Zcaron = 611; + e.greaterequal = 549; + e.Eth = 722; + e.Ccedilla = 722; + e.lcommaaccent = 278; + e.tcaron = 389; + e.eogonek = 556; + e.Uogonek = 722; + e.Aacute = 722; + e.Adieresis = 722; + e.egrave = 556; + e.zacute = 500; + e.iogonek = 278; + e.Oacute = 778; + e.oacute = 611; + e.amacron = 556; + e.sacute = 556; + e.idieresis = 278; + e.Ocircumflex = 778; + e.Ugrave = 722; + e.Delta = 612; + e.thorn = 611; + e.twosuperior = 333; + e.Odieresis = 778; + e.mu = 611; + e.igrave = 278; + e.ohungarumlaut = 611; + e.Eogonek = 667; + e.dcroat = 611; + e.threequarters = 834; + e.Scedilla = 667; + e.lcaron = 400; + e.Kcommaaccent = 722; + e.Lacute = 611; + e.trademark = 1e3; + e.edotaccent = 556; + e.Igrave = 278; + e.Imacron = 278; + e.Lcaron = 611; + e.onehalf = 834; + e.lessequal = 549; + e.ocircumflex = 611; + e.ntilde = 611; + e.Uhungarumlaut = 722; + e.Eacute = 667; + e.emacron = 556; + e.gbreve = 611; + e.onequarter = 834; + e.Scaron = 667; + e.Scommaaccent = 667; + e.Ohungarumlaut = 778; + e.degree = 400; + e.ograve = 611; + e.Ccaron = 722; + e.ugrave = 611; + e.radical = 549; + e.Dcaron = 722; + e.rcommaaccent = 389; + e.Ntilde = 722; + e.otilde = 611; + e.Rcommaaccent = 722; + e.Lcommaaccent = 611; + e.Atilde = 722; + e.Aogonek = 722; + e.Aring = 722; + e.Otilde = 778; + e.zdotaccent = 500; + e.Ecaron = 667; + e.Iogonek = 278; + e.kcommaaccent = 556; + e.minus = 584; + e.Icircumflex = 278; + e.ncaron = 611; + e.tcommaaccent = 333; + e.logicalnot = 584; + e.odieresis = 611; + e.udieresis = 611; + e.notequal = 549; + e.gcommaaccent = 611; + e.eth = 611; + e.zcaron = 500; + e.ncommaaccent = 611; + e.onesuperior = 333; + e.imacron = 278; + e.Euro = 556; + }); + e["Helvetica-BoldOblique"] = getLookupTableFactory(function (e) { + e.space = 278; + e.exclam = 333; + e.quotedbl = 474; + e.numbersign = 556; + e.dollar = 556; + e.percent = 889; + e.ampersand = 722; + e.quoteright = 278; + e.parenleft = 333; + e.parenright = 333; + e.asterisk = 389; + e.plus = 584; + e.comma = 278; + e.hyphen = 333; + e.period = 278; + e.slash = 278; + e.zero = 556; + e.one = 556; + e.two = 556; + e.three = 556; + e.four = 556; + e.five = 556; + e.six = 556; + e.seven = 556; + e.eight = 556; + e.nine = 556; + e.colon = 333; + e.semicolon = 333; + e.less = 584; + e.equal = 584; + e.greater = 584; + e.question = 611; + e.at = 975; + e.A = 722; + e.B = 722; + e.C = 722; + e.D = 722; + e.E = 667; + e.F = 611; + e.G = 778; + e.H = 722; + e.I = 278; + e.J = 556; + e.K = 722; + e.L = 611; + e.M = 833; + e.N = 722; + e.O = 778; + e.P = 667; + e.Q = 778; + e.R = 722; + e.S = 667; + e.T = 611; + e.U = 722; + e.V = 667; + e.W = 944; + e.X = 667; + e.Y = 667; + e.Z = 611; + e.bracketleft = 333; + e.backslash = 278; + e.bracketright = 333; + e.asciicircum = 584; + e.underscore = 556; + e.quoteleft = 278; + e.a = 556; + e.b = 611; + e.c = 556; + e.d = 611; + e.e = 556; + e.f = 333; + e.g = 611; + e.h = 611; + e.i = 278; + e.j = 278; + e.k = 556; + e.l = 278; + e.m = 889; + e.n = 611; + e.o = 611; + e.p = 611; + e.q = 611; + e.r = 389; + e.s = 556; + e.t = 333; + e.u = 611; + e.v = 556; + e.w = 778; + e.x = 556; + e.y = 556; + e.z = 500; + e.braceleft = 389; + e.bar = 280; + e.braceright = 389; + e.asciitilde = 584; + e.exclamdown = 333; + e.cent = 556; + e.sterling = 556; + e.fraction = 167; + e.yen = 556; + e.florin = 556; + e.section = 556; + e.currency = 556; + e.quotesingle = 238; + e.quotedblleft = 500; + e.guillemotleft = 556; + e.guilsinglleft = 333; + e.guilsinglright = 333; + e.fi = 611; + e.fl = 611; + e.endash = 556; + e.dagger = 556; + e.daggerdbl = 556; + e.periodcentered = 278; + e.paragraph = 556; + e.bullet = 350; + e.quotesinglbase = 278; + e.quotedblbase = 500; + e.quotedblright = 500; + e.guillemotright = 556; + e.ellipsis = 1e3; + e.perthousand = 1e3; + e.questiondown = 611; + e.grave = 333; + e.acute = 333; + e.circumflex = 333; + e.tilde = 333; + e.macron = 333; + e.breve = 333; + e.dotaccent = 333; + e.dieresis = 333; + e.ring = 333; + e.cedilla = 333; + e.hungarumlaut = 333; + e.ogonek = 333; + e.caron = 333; + e.emdash = 1e3; + e.AE = 1e3; + e.ordfeminine = 370; + e.Lslash = 611; + e.Oslash = 778; + e.OE = 1e3; + e.ordmasculine = 365; + e.ae = 889; + e.dotlessi = 278; + e.lslash = 278; + e.oslash = 611; + e.oe = 944; + e.germandbls = 611; + e.Idieresis = 278; + e.eacute = 556; + e.abreve = 556; + e.uhungarumlaut = 611; + e.ecaron = 556; + e.Ydieresis = 667; + e.divide = 584; + e.Yacute = 667; + e.Acircumflex = 722; + e.aacute = 556; + e.Ucircumflex = 722; + e.yacute = 556; + e.scommaaccent = 556; + e.ecircumflex = 556; + e.Uring = 722; + e.Udieresis = 722; + e.aogonek = 556; + e.Uacute = 722; + e.uogonek = 611; + e.Edieresis = 667; + e.Dcroat = 722; + e.commaaccent = 250; + e.copyright = 737; + e.Emacron = 667; + e.ccaron = 556; + e.aring = 556; + e.Ncommaaccent = 722; + e.lacute = 278; + e.agrave = 556; + e.Tcommaaccent = 611; + e.Cacute = 722; + e.atilde = 556; + e.Edotaccent = 667; + e.scaron = 556; + e.scedilla = 556; + e.iacute = 278; + e.lozenge = 494; + e.Rcaron = 722; + e.Gcommaaccent = 778; + e.ucircumflex = 611; + e.acircumflex = 556; + e.Amacron = 722; + e.rcaron = 389; + e.ccedilla = 556; + e.Zdotaccent = 611; + e.Thorn = 667; + e.Omacron = 778; + e.Racute = 722; + e.Sacute = 667; + e.dcaron = 743; + e.Umacron = 722; + e.uring = 611; + e.threesuperior = 333; + e.Ograve = 778; + e.Agrave = 722; + e.Abreve = 722; + e.multiply = 584; + e.uacute = 611; + e.Tcaron = 611; + e.partialdiff = 494; + e.ydieresis = 556; + e.Nacute = 722; + e.icircumflex = 278; + e.Ecircumflex = 667; + e.adieresis = 556; + e.edieresis = 556; + e.cacute = 556; + e.nacute = 611; + e.umacron = 611; + e.Ncaron = 722; + e.Iacute = 278; + e.plusminus = 584; + e.brokenbar = 280; + e.registered = 737; + e.Gbreve = 778; + e.Idotaccent = 278; + e.summation = 600; + e.Egrave = 667; + e.racute = 389; + e.omacron = 611; + e.Zacute = 611; + e.Zcaron = 611; + e.greaterequal = 549; + e.Eth = 722; + e.Ccedilla = 722; + e.lcommaaccent = 278; + e.tcaron = 389; + e.eogonek = 556; + e.Uogonek = 722; + e.Aacute = 722; + e.Adieresis = 722; + e.egrave = 556; + e.zacute = 500; + e.iogonek = 278; + e.Oacute = 778; + e.oacute = 611; + e.amacron = 556; + e.sacute = 556; + e.idieresis = 278; + e.Ocircumflex = 778; + e.Ugrave = 722; + e.Delta = 612; + e.thorn = 611; + e.twosuperior = 333; + e.Odieresis = 778; + e.mu = 611; + e.igrave = 278; + e.ohungarumlaut = 611; + e.Eogonek = 667; + e.dcroat = 611; + e.threequarters = 834; + e.Scedilla = 667; + e.lcaron = 400; + e.Kcommaaccent = 722; + e.Lacute = 611; + e.trademark = 1e3; + e.edotaccent = 556; + e.Igrave = 278; + e.Imacron = 278; + e.Lcaron = 611; + e.onehalf = 834; + e.lessequal = 549; + e.ocircumflex = 611; + e.ntilde = 611; + e.Uhungarumlaut = 722; + e.Eacute = 667; + e.emacron = 556; + e.gbreve = 611; + e.onequarter = 834; + e.Scaron = 667; + e.Scommaaccent = 667; + e.Ohungarumlaut = 778; + e.degree = 400; + e.ograve = 611; + e.Ccaron = 722; + e.ugrave = 611; + e.radical = 549; + e.Dcaron = 722; + e.rcommaaccent = 389; + e.Ntilde = 722; + e.otilde = 611; + e.Rcommaaccent = 722; + e.Lcommaaccent = 611; + e.Atilde = 722; + e.Aogonek = 722; + e.Aring = 722; + e.Otilde = 778; + e.zdotaccent = 500; + e.Ecaron = 667; + e.Iogonek = 278; + e.kcommaaccent = 556; + e.minus = 584; + e.Icircumflex = 278; + e.ncaron = 611; + e.tcommaaccent = 333; + e.logicalnot = 584; + e.odieresis = 611; + e.udieresis = 611; + e.notequal = 549; + e.gcommaaccent = 611; + e.eth = 611; + e.zcaron = 500; + e.ncommaaccent = 611; + e.onesuperior = 333; + e.imacron = 278; + e.Euro = 556; + }); + e["Helvetica-Oblique"] = getLookupTableFactory(function (e) { + e.space = 278; + e.exclam = 278; + e.quotedbl = 355; + e.numbersign = 556; + e.dollar = 556; + e.percent = 889; + e.ampersand = 667; + e.quoteright = 222; + e.parenleft = 333; + e.parenright = 333; + e.asterisk = 389; + e.plus = 584; + e.comma = 278; + e.hyphen = 333; + e.period = 278; + e.slash = 278; + e.zero = 556; + e.one = 556; + e.two = 556; + e.three = 556; + e.four = 556; + e.five = 556; + e.six = 556; + e.seven = 556; + e.eight = 556; + e.nine = 556; + e.colon = 278; + e.semicolon = 278; + e.less = 584; + e.equal = 584; + e.greater = 584; + e.question = 556; + e.at = 1015; + e.A = 667; + e.B = 667; + e.C = 722; + e.D = 722; + e.E = 667; + e.F = 611; + e.G = 778; + e.H = 722; + e.I = 278; + e.J = 500; + e.K = 667; + e.L = 556; + e.M = 833; + e.N = 722; + e.O = 778; + e.P = 667; + e.Q = 778; + e.R = 722; + e.S = 667; + e.T = 611; + e.U = 722; + e.V = 667; + e.W = 944; + e.X = 667; + e.Y = 667; + e.Z = 611; + e.bracketleft = 278; + e.backslash = 278; + e.bracketright = 278; + e.asciicircum = 469; + e.underscore = 556; + e.quoteleft = 222; + e.a = 556; + e.b = 556; + e.c = 500; + e.d = 556; + e.e = 556; + e.f = 278; + e.g = 556; + e.h = 556; + e.i = 222; + e.j = 222; + e.k = 500; + e.l = 222; + e.m = 833; + e.n = 556; + e.o = 556; + e.p = 556; + e.q = 556; + e.r = 333; + e.s = 500; + e.t = 278; + e.u = 556; + e.v = 500; + e.w = 722; + e.x = 500; + e.y = 500; + e.z = 500; + e.braceleft = 334; + e.bar = 260; + e.braceright = 334; + e.asciitilde = 584; + e.exclamdown = 333; + e.cent = 556; + e.sterling = 556; + e.fraction = 167; + e.yen = 556; + e.florin = 556; + e.section = 556; + e.currency = 556; + e.quotesingle = 191; + e.quotedblleft = 333; + e.guillemotleft = 556; + e.guilsinglleft = 333; + e.guilsinglright = 333; + e.fi = 500; + e.fl = 500; + e.endash = 556; + e.dagger = 556; + e.daggerdbl = 556; + e.periodcentered = 278; + e.paragraph = 537; + e.bullet = 350; + e.quotesinglbase = 222; + e.quotedblbase = 333; + e.quotedblright = 333; + e.guillemotright = 556; + e.ellipsis = 1e3; + e.perthousand = 1e3; + e.questiondown = 611; + e.grave = 333; + e.acute = 333; + e.circumflex = 333; + e.tilde = 333; + e.macron = 333; + e.breve = 333; + e.dotaccent = 333; + e.dieresis = 333; + e.ring = 333; + e.cedilla = 333; + e.hungarumlaut = 333; + e.ogonek = 333; + e.caron = 333; + e.emdash = 1e3; + e.AE = 1e3; + e.ordfeminine = 370; + e.Lslash = 556; + e.Oslash = 778; + e.OE = 1e3; + e.ordmasculine = 365; + e.ae = 889; + e.dotlessi = 278; + e.lslash = 222; + e.oslash = 611; + e.oe = 944; + e.germandbls = 611; + e.Idieresis = 278; + e.eacute = 556; + e.abreve = 556; + e.uhungarumlaut = 556; + e.ecaron = 556; + e.Ydieresis = 667; + e.divide = 584; + e.Yacute = 667; + e.Acircumflex = 667; + e.aacute = 556; + e.Ucircumflex = 722; + e.yacute = 500; + e.scommaaccent = 500; + e.ecircumflex = 556; + e.Uring = 722; + e.Udieresis = 722; + e.aogonek = 556; + e.Uacute = 722; + e.uogonek = 556; + e.Edieresis = 667; + e.Dcroat = 722; + e.commaaccent = 250; + e.copyright = 737; + e.Emacron = 667; + e.ccaron = 500; + e.aring = 556; + e.Ncommaaccent = 722; + e.lacute = 222; + e.agrave = 556; + e.Tcommaaccent = 611; + e.Cacute = 722; + e.atilde = 556; + e.Edotaccent = 667; + e.scaron = 500; + e.scedilla = 500; + e.iacute = 278; + e.lozenge = 471; + e.Rcaron = 722; + e.Gcommaaccent = 778; + e.ucircumflex = 556; + e.acircumflex = 556; + e.Amacron = 667; + e.rcaron = 333; + e.ccedilla = 500; + e.Zdotaccent = 611; + e.Thorn = 667; + e.Omacron = 778; + e.Racute = 722; + e.Sacute = 667; + e.dcaron = 643; + e.Umacron = 722; + e.uring = 556; + e.threesuperior = 333; + e.Ograve = 778; + e.Agrave = 667; + e.Abreve = 667; + e.multiply = 584; + e.uacute = 556; + e.Tcaron = 611; + e.partialdiff = 476; + e.ydieresis = 500; + e.Nacute = 722; + e.icircumflex = 278; + e.Ecircumflex = 667; + e.adieresis = 556; + e.edieresis = 556; + e.cacute = 500; + e.nacute = 556; + e.umacron = 556; + e.Ncaron = 722; + e.Iacute = 278; + e.plusminus = 584; + e.brokenbar = 260; + e.registered = 737; + e.Gbreve = 778; + e.Idotaccent = 278; + e.summation = 600; + e.Egrave = 667; + e.racute = 333; + e.omacron = 556; + e.Zacute = 611; + e.Zcaron = 611; + e.greaterequal = 549; + e.Eth = 722; + e.Ccedilla = 722; + e.lcommaaccent = 222; + e.tcaron = 317; + e.eogonek = 556; + e.Uogonek = 722; + e.Aacute = 667; + e.Adieresis = 667; + e.egrave = 556; + e.zacute = 500; + e.iogonek = 222; + e.Oacute = 778; + e.oacute = 556; + e.amacron = 556; + e.sacute = 500; + e.idieresis = 278; + e.Ocircumflex = 778; + e.Ugrave = 722; + e.Delta = 612; + e.thorn = 556; + e.twosuperior = 333; + e.Odieresis = 778; + e.mu = 556; + e.igrave = 278; + e.ohungarumlaut = 556; + e.Eogonek = 667; + e.dcroat = 556; + e.threequarters = 834; + e.Scedilla = 667; + e.lcaron = 299; + e.Kcommaaccent = 667; + e.Lacute = 556; + e.trademark = 1e3; + e.edotaccent = 556; + e.Igrave = 278; + e.Imacron = 278; + e.Lcaron = 556; + e.onehalf = 834; + e.lessequal = 549; + e.ocircumflex = 556; + e.ntilde = 556; + e.Uhungarumlaut = 722; + e.Eacute = 667; + e.emacron = 556; + e.gbreve = 556; + e.onequarter = 834; + e.Scaron = 667; + e.Scommaaccent = 667; + e.Ohungarumlaut = 778; + e.degree = 400; + e.ograve = 556; + e.Ccaron = 722; + e.ugrave = 556; + e.radical = 453; + e.Dcaron = 722; + e.rcommaaccent = 333; + e.Ntilde = 722; + e.otilde = 556; + e.Rcommaaccent = 722; + e.Lcommaaccent = 556; + e.Atilde = 667; + e.Aogonek = 667; + e.Aring = 667; + e.Otilde = 778; + e.zdotaccent = 500; + e.Ecaron = 667; + e.Iogonek = 278; + e.kcommaaccent = 500; + e.minus = 584; + e.Icircumflex = 278; + e.ncaron = 556; + e.tcommaaccent = 278; + e.logicalnot = 584; + e.odieresis = 556; + e.udieresis = 556; + e.notequal = 549; + e.gcommaaccent = 556; + e.eth = 556; + e.zcaron = 500; + e.ncommaaccent = 556; + e.onesuperior = 333; + e.imacron = 278; + e.Euro = 556; + }); + e.Symbol = getLookupTableFactory(function (e) { + e.space = 250; + e.exclam = 333; + e.universal = 713; + e.numbersign = 500; + e.existential = 549; + e.percent = 833; + e.ampersand = 778; + e.suchthat = 439; + e.parenleft = 333; + e.parenright = 333; + e.asteriskmath = 500; + e.plus = 549; + e.comma = 250; + e.minus = 549; + e.period = 250; + e.slash = 278; + e.zero = 500; + e.one = 500; + e.two = 500; + e.three = 500; + e.four = 500; + e.five = 500; + e.six = 500; + e.seven = 500; + e.eight = 500; + e.nine = 500; + e.colon = 278; + e.semicolon = 278; + e.less = 549; + e.equal = 549; + e.greater = 549; + e.question = 444; + e.congruent = 549; + e.Alpha = 722; + e.Beta = 667; + e.Chi = 722; + e.Delta = 612; + e.Epsilon = 611; + e.Phi = 763; + e.Gamma = 603; + e.Eta = 722; + e.Iota = 333; + e.theta1 = 631; + e.Kappa = 722; + e.Lambda = 686; + e.Mu = 889; + e.Nu = 722; + e.Omicron = 722; + e.Pi = 768; + e.Theta = 741; + e.Rho = 556; + e.Sigma = 592; + e.Tau = 611; + e.Upsilon = 690; + e.sigma1 = 439; + e.Omega = 768; + e.Xi = 645; + e.Psi = 795; + e.Zeta = 611; + e.bracketleft = 333; + e.therefore = 863; + e.bracketright = 333; + e.perpendicular = 658; + e.underscore = 500; + e.radicalex = 500; + e.alpha = 631; + e.beta = 549; + e.chi = 549; + e.delta = 494; + e.epsilon = 439; + e.phi = 521; + e.gamma = 411; + e.eta = 603; + e.iota = 329; + e.phi1 = 603; + e.kappa = 549; + e.lambda = 549; + e.mu = 576; + e.nu = 521; + e.omicron = 549; + e.pi = 549; + e.theta = 521; + e.rho = 549; + e.sigma = 603; + e.tau = 439; + e.upsilon = 576; + e.omega1 = 713; + e.omega = 686; + e.xi = 493; + e.psi = 686; + e.zeta = 494; + e.braceleft = 480; + e.bar = 200; + e.braceright = 480; + e.similar = 549; + e.Euro = 750; + e.Upsilon1 = 620; + e.minute = 247; + e.lessequal = 549; + e.fraction = 167; + e.infinity = 713; + e.florin = 500; + e.club = 753; + e.diamond = 753; + e.heart = 753; + e.spade = 753; + e.arrowboth = 1042; + e.arrowleft = 987; + e.arrowup = 603; + e.arrowright = 987; + e.arrowdown = 603; + e.degree = 400; + e.plusminus = 549; + e.second = 411; + e.greaterequal = 549; + e.multiply = 549; + e.proportional = 713; + e.partialdiff = 494; + e.bullet = 460; + e.divide = 549; + e.notequal = 549; + e.equivalence = 549; + e.approxequal = 549; + e.ellipsis = 1e3; + e.arrowvertex = 603; + e.arrowhorizex = 1e3; + e.carriagereturn = 658; + e.aleph = 823; + e.Ifraktur = 686; + e.Rfraktur = 795; + e.weierstrass = 987; + e.circlemultiply = 768; + e.circleplus = 768; + e.emptyset = 823; + e.intersection = 768; + e.union = 768; + e.propersuperset = 713; + e.reflexsuperset = 713; + e.notsubset = 713; + e.propersubset = 713; + e.reflexsubset = 713; + e.element = 713; + e.notelement = 713; + e.angle = 768; + e.gradient = 713; + e.registerserif = 790; + e.copyrightserif = 790; + e.trademarkserif = 890; + e.product = 823; + e.radical = 549; + e.dotmath = 250; + e.logicalnot = 713; + e.logicaland = 603; + e.logicalor = 603; + e.arrowdblboth = 1042; + e.arrowdblleft = 987; + e.arrowdblup = 603; + e.arrowdblright = 987; + e.arrowdbldown = 603; + e.lozenge = 494; + e.angleleft = 329; + e.registersans = 790; + e.copyrightsans = 790; + e.trademarksans = 786; + e.summation = 713; + e.parenlefttp = 384; + e.parenleftex = 384; + e.parenleftbt = 384; + e.bracketlefttp = 384; + e.bracketleftex = 384; + e.bracketleftbt = 384; + e.bracelefttp = 494; + e.braceleftmid = 494; + e.braceleftbt = 494; + e.braceex = 494; + e.angleright = 329; + e.integral = 274; + e.integraltp = 686; + e.integralex = 686; + e.integralbt = 686; + e.parenrighttp = 384; + e.parenrightex = 384; + e.parenrightbt = 384; + e.bracketrighttp = 384; + e.bracketrightex = 384; + e.bracketrightbt = 384; + e.bracerighttp = 494; + e.bracerightmid = 494; + e.bracerightbt = 494; + e.apple = 790; + }); + e["Times-Roman"] = getLookupTableFactory(function (e) { + e.space = 250; + e.exclam = 333; + e.quotedbl = 408; + e.numbersign = 500; + e.dollar = 500; + e.percent = 833; + e.ampersand = 778; + e.quoteright = 333; + e.parenleft = 333; + e.parenright = 333; + e.asterisk = 500; + e.plus = 564; + e.comma = 250; + e.hyphen = 333; + e.period = 250; + e.slash = 278; + e.zero = 500; + e.one = 500; + e.two = 500; + e.three = 500; + e.four = 500; + e.five = 500; + e.six = 500; + e.seven = 500; + e.eight = 500; + e.nine = 500; + e.colon = 278; + e.semicolon = 278; + e.less = 564; + e.equal = 564; + e.greater = 564; + e.question = 444; + e.at = 921; + e.A = 722; + e.B = 667; + e.C = 667; + e.D = 722; + e.E = 611; + e.F = 556; + e.G = 722; + e.H = 722; + e.I = 333; + e.J = 389; + e.K = 722; + e.L = 611; + e.M = 889; + e.N = 722; + e.O = 722; + e.P = 556; + e.Q = 722; + e.R = 667; + e.S = 556; + e.T = 611; + e.U = 722; + e.V = 722; + e.W = 944; + e.X = 722; + e.Y = 722; + e.Z = 611; + e.bracketleft = 333; + e.backslash = 278; + e.bracketright = 333; + e.asciicircum = 469; + e.underscore = 500; + e.quoteleft = 333; + e.a = 444; + e.b = 500; + e.c = 444; + e.d = 500; + e.e = 444; + e.f = 333; + e.g = 500; + e.h = 500; + e.i = 278; + e.j = 278; + e.k = 500; + e.l = 278; + e.m = 778; + e.n = 500; + e.o = 500; + e.p = 500; + e.q = 500; + e.r = 333; + e.s = 389; + e.t = 278; + e.u = 500; + e.v = 500; + e.w = 722; + e.x = 500; + e.y = 500; + e.z = 444; + e.braceleft = 480; + e.bar = 200; + e.braceright = 480; + e.asciitilde = 541; + e.exclamdown = 333; + e.cent = 500; + e.sterling = 500; + e.fraction = 167; + e.yen = 500; + e.florin = 500; + e.section = 500; + e.currency = 500; + e.quotesingle = 180; + e.quotedblleft = 444; + e.guillemotleft = 500; + e.guilsinglleft = 333; + e.guilsinglright = 333; + e.fi = 556; + e.fl = 556; + e.endash = 500; + e.dagger = 500; + e.daggerdbl = 500; + e.periodcentered = 250; + e.paragraph = 453; + e.bullet = 350; + e.quotesinglbase = 333; + e.quotedblbase = 444; + e.quotedblright = 444; + e.guillemotright = 500; + e.ellipsis = 1e3; + e.perthousand = 1e3; + e.questiondown = 444; + e.grave = 333; + e.acute = 333; + e.circumflex = 333; + e.tilde = 333; + e.macron = 333; + e.breve = 333; + e.dotaccent = 333; + e.dieresis = 333; + e.ring = 333; + e.cedilla = 333; + e.hungarumlaut = 333; + e.ogonek = 333; + e.caron = 333; + e.emdash = 1e3; + e.AE = 889; + e.ordfeminine = 276; + e.Lslash = 611; + e.Oslash = 722; + e.OE = 889; + e.ordmasculine = 310; + e.ae = 667; + e.dotlessi = 278; + e.lslash = 278; + e.oslash = 500; + e.oe = 722; + e.germandbls = 500; + e.Idieresis = 333; + e.eacute = 444; + e.abreve = 444; + e.uhungarumlaut = 500; + e.ecaron = 444; + e.Ydieresis = 722; + e.divide = 564; + e.Yacute = 722; + e.Acircumflex = 722; + e.aacute = 444; + e.Ucircumflex = 722; + e.yacute = 500; + e.scommaaccent = 389; + e.ecircumflex = 444; + e.Uring = 722; + e.Udieresis = 722; + e.aogonek = 444; + e.Uacute = 722; + e.uogonek = 500; + e.Edieresis = 611; + e.Dcroat = 722; + e.commaaccent = 250; + e.copyright = 760; + e.Emacron = 611; + e.ccaron = 444; + e.aring = 444; + e.Ncommaaccent = 722; + e.lacute = 278; + e.agrave = 444; + e.Tcommaaccent = 611; + e.Cacute = 667; + e.atilde = 444; + e.Edotaccent = 611; + e.scaron = 389; + e.scedilla = 389; + e.iacute = 278; + e.lozenge = 471; + e.Rcaron = 667; + e.Gcommaaccent = 722; + e.ucircumflex = 500; + e.acircumflex = 444; + e.Amacron = 722; + e.rcaron = 333; + e.ccedilla = 444; + e.Zdotaccent = 611; + e.Thorn = 556; + e.Omacron = 722; + e.Racute = 667; + e.Sacute = 556; + e.dcaron = 588; + e.Umacron = 722; + e.uring = 500; + e.threesuperior = 300; + e.Ograve = 722; + e.Agrave = 722; + e.Abreve = 722; + e.multiply = 564; + e.uacute = 500; + e.Tcaron = 611; + e.partialdiff = 476; + e.ydieresis = 500; + e.Nacute = 722; + e.icircumflex = 278; + e.Ecircumflex = 611; + e.adieresis = 444; + e.edieresis = 444; + e.cacute = 444; + e.nacute = 500; + e.umacron = 500; + e.Ncaron = 722; + e.Iacute = 333; + e.plusminus = 564; + e.brokenbar = 200; + e.registered = 760; + e.Gbreve = 722; + e.Idotaccent = 333; + e.summation = 600; + e.Egrave = 611; + e.racute = 333; + e.omacron = 500; + e.Zacute = 611; + e.Zcaron = 611; + e.greaterequal = 549; + e.Eth = 722; + e.Ccedilla = 667; + e.lcommaaccent = 278; + e.tcaron = 326; + e.eogonek = 444; + e.Uogonek = 722; + e.Aacute = 722; + e.Adieresis = 722; + e.egrave = 444; + e.zacute = 444; + e.iogonek = 278; + e.Oacute = 722; + e.oacute = 500; + e.amacron = 444; + e.sacute = 389; + e.idieresis = 278; + e.Ocircumflex = 722; + e.Ugrave = 722; + e.Delta = 612; + e.thorn = 500; + e.twosuperior = 300; + e.Odieresis = 722; + e.mu = 500; + e.igrave = 278; + e.ohungarumlaut = 500; + e.Eogonek = 611; + e.dcroat = 500; + e.threequarters = 750; + e.Scedilla = 556; + e.lcaron = 344; + e.Kcommaaccent = 722; + e.Lacute = 611; + e.trademark = 980; + e.edotaccent = 444; + e.Igrave = 333; + e.Imacron = 333; + e.Lcaron = 611; + e.onehalf = 750; + e.lessequal = 549; + e.ocircumflex = 500; + e.ntilde = 500; + e.Uhungarumlaut = 722; + e.Eacute = 611; + e.emacron = 444; + e.gbreve = 500; + e.onequarter = 750; + e.Scaron = 556; + e.Scommaaccent = 556; + e.Ohungarumlaut = 722; + e.degree = 400; + e.ograve = 500; + e.Ccaron = 667; + e.ugrave = 500; + e.radical = 453; + e.Dcaron = 722; + e.rcommaaccent = 333; + e.Ntilde = 722; + e.otilde = 500; + e.Rcommaaccent = 667; + e.Lcommaaccent = 611; + e.Atilde = 722; + e.Aogonek = 722; + e.Aring = 722; + e.Otilde = 722; + e.zdotaccent = 444; + e.Ecaron = 611; + e.Iogonek = 333; + e.kcommaaccent = 500; + e.minus = 564; + e.Icircumflex = 333; + e.ncaron = 500; + e.tcommaaccent = 278; + e.logicalnot = 564; + e.odieresis = 500; + e.udieresis = 500; + e.notequal = 549; + e.gcommaaccent = 500; + e.eth = 500; + e.zcaron = 444; + e.ncommaaccent = 500; + e.onesuperior = 300; + e.imacron = 278; + e.Euro = 500; + }); + e["Times-Bold"] = getLookupTableFactory(function (e) { + e.space = 250; + e.exclam = 333; + e.quotedbl = 555; + e.numbersign = 500; + e.dollar = 500; + e.percent = 1e3; + e.ampersand = 833; + e.quoteright = 333; + e.parenleft = 333; + e.parenright = 333; + e.asterisk = 500; + e.plus = 570; + e.comma = 250; + e.hyphen = 333; + e.period = 250; + e.slash = 278; + e.zero = 500; + e.one = 500; + e.two = 500; + e.three = 500; + e.four = 500; + e.five = 500; + e.six = 500; + e.seven = 500; + e.eight = 500; + e.nine = 500; + e.colon = 333; + e.semicolon = 333; + e.less = 570; + e.equal = 570; + e.greater = 570; + e.question = 500; + e.at = 930; + e.A = 722; + e.B = 667; + e.C = 722; + e.D = 722; + e.E = 667; + e.F = 611; + e.G = 778; + e.H = 778; + e.I = 389; + e.J = 500; + e.K = 778; + e.L = 667; + e.M = 944; + e.N = 722; + e.O = 778; + e.P = 611; + e.Q = 778; + e.R = 722; + e.S = 556; + e.T = 667; + e.U = 722; + e.V = 722; + e.W = 1e3; + e.X = 722; + e.Y = 722; + e.Z = 667; + e.bracketleft = 333; + e.backslash = 278; + e.bracketright = 333; + e.asciicircum = 581; + e.underscore = 500; + e.quoteleft = 333; + e.a = 500; + e.b = 556; + e.c = 444; + e.d = 556; + e.e = 444; + e.f = 333; + e.g = 500; + e.h = 556; + e.i = 278; + e.j = 333; + e.k = 556; + e.l = 278; + e.m = 833; + e.n = 556; + e.o = 500; + e.p = 556; + e.q = 556; + e.r = 444; + e.s = 389; + e.t = 333; + e.u = 556; + e.v = 500; + e.w = 722; + e.x = 500; + e.y = 500; + e.z = 444; + e.braceleft = 394; + e.bar = 220; + e.braceright = 394; + e.asciitilde = 520; + e.exclamdown = 333; + e.cent = 500; + e.sterling = 500; + e.fraction = 167; + e.yen = 500; + e.florin = 500; + e.section = 500; + e.currency = 500; + e.quotesingle = 278; + e.quotedblleft = 500; + e.guillemotleft = 500; + e.guilsinglleft = 333; + e.guilsinglright = 333; + e.fi = 556; + e.fl = 556; + e.endash = 500; + e.dagger = 500; + e.daggerdbl = 500; + e.periodcentered = 250; + e.paragraph = 540; + e.bullet = 350; + e.quotesinglbase = 333; + e.quotedblbase = 500; + e.quotedblright = 500; + e.guillemotright = 500; + e.ellipsis = 1e3; + e.perthousand = 1e3; + e.questiondown = 500; + e.grave = 333; + e.acute = 333; + e.circumflex = 333; + e.tilde = 333; + e.macron = 333; + e.breve = 333; + e.dotaccent = 333; + e.dieresis = 333; + e.ring = 333; + e.cedilla = 333; + e.hungarumlaut = 333; + e.ogonek = 333; + e.caron = 333; + e.emdash = 1e3; + e.AE = 1e3; + e.ordfeminine = 300; + e.Lslash = 667; + e.Oslash = 778; + e.OE = 1e3; + e.ordmasculine = 330; + e.ae = 722; + e.dotlessi = 278; + e.lslash = 278; + e.oslash = 500; + e.oe = 722; + e.germandbls = 556; + e.Idieresis = 389; + e.eacute = 444; + e.abreve = 500; + e.uhungarumlaut = 556; + e.ecaron = 444; + e.Ydieresis = 722; + e.divide = 570; + e.Yacute = 722; + e.Acircumflex = 722; + e.aacute = 500; + e.Ucircumflex = 722; + e.yacute = 500; + e.scommaaccent = 389; + e.ecircumflex = 444; + e.Uring = 722; + e.Udieresis = 722; + e.aogonek = 500; + e.Uacute = 722; + e.uogonek = 556; + e.Edieresis = 667; + e.Dcroat = 722; + e.commaaccent = 250; + e.copyright = 747; + e.Emacron = 667; + e.ccaron = 444; + e.aring = 500; + e.Ncommaaccent = 722; + e.lacute = 278; + e.agrave = 500; + e.Tcommaaccent = 667; + e.Cacute = 722; + e.atilde = 500; + e.Edotaccent = 667; + e.scaron = 389; + e.scedilla = 389; + e.iacute = 278; + e.lozenge = 494; + e.Rcaron = 722; + e.Gcommaaccent = 778; + e.ucircumflex = 556; + e.acircumflex = 500; + e.Amacron = 722; + e.rcaron = 444; + e.ccedilla = 444; + e.Zdotaccent = 667; + e.Thorn = 611; + e.Omacron = 778; + e.Racute = 722; + e.Sacute = 556; + e.dcaron = 672; + e.Umacron = 722; + e.uring = 556; + e.threesuperior = 300; + e.Ograve = 778; + e.Agrave = 722; + e.Abreve = 722; + e.multiply = 570; + e.uacute = 556; + e.Tcaron = 667; + e.partialdiff = 494; + e.ydieresis = 500; + e.Nacute = 722; + e.icircumflex = 278; + e.Ecircumflex = 667; + e.adieresis = 500; + e.edieresis = 444; + e.cacute = 444; + e.nacute = 556; + e.umacron = 556; + e.Ncaron = 722; + e.Iacute = 389; + e.plusminus = 570; + e.brokenbar = 220; + e.registered = 747; + e.Gbreve = 778; + e.Idotaccent = 389; + e.summation = 600; + e.Egrave = 667; + e.racute = 444; + e.omacron = 500; + e.Zacute = 667; + e.Zcaron = 667; + e.greaterequal = 549; + e.Eth = 722; + e.Ccedilla = 722; + e.lcommaaccent = 278; + e.tcaron = 416; + e.eogonek = 444; + e.Uogonek = 722; + e.Aacute = 722; + e.Adieresis = 722; + e.egrave = 444; + e.zacute = 444; + e.iogonek = 278; + e.Oacute = 778; + e.oacute = 500; + e.amacron = 500; + e.sacute = 389; + e.idieresis = 278; + e.Ocircumflex = 778; + e.Ugrave = 722; + e.Delta = 612; + e.thorn = 556; + e.twosuperior = 300; + e.Odieresis = 778; + e.mu = 556; + e.igrave = 278; + e.ohungarumlaut = 500; + e.Eogonek = 667; + e.dcroat = 556; + e.threequarters = 750; + e.Scedilla = 556; + e.lcaron = 394; + e.Kcommaaccent = 778; + e.Lacute = 667; + e.trademark = 1e3; + e.edotaccent = 444; + e.Igrave = 389; + e.Imacron = 389; + e.Lcaron = 667; + e.onehalf = 750; + e.lessequal = 549; + e.ocircumflex = 500; + e.ntilde = 556; + e.Uhungarumlaut = 722; + e.Eacute = 667; + e.emacron = 444; + e.gbreve = 500; + e.onequarter = 750; + e.Scaron = 556; + e.Scommaaccent = 556; + e.Ohungarumlaut = 778; + e.degree = 400; + e.ograve = 500; + e.Ccaron = 722; + e.ugrave = 556; + e.radical = 549; + e.Dcaron = 722; + e.rcommaaccent = 444; + e.Ntilde = 722; + e.otilde = 500; + e.Rcommaaccent = 722; + e.Lcommaaccent = 667; + e.Atilde = 722; + e.Aogonek = 722; + e.Aring = 722; + e.Otilde = 778; + e.zdotaccent = 444; + e.Ecaron = 667; + e.Iogonek = 389; + e.kcommaaccent = 556; + e.minus = 570; + e.Icircumflex = 389; + e.ncaron = 556; + e.tcommaaccent = 333; + e.logicalnot = 570; + e.odieresis = 500; + e.udieresis = 556; + e.notequal = 549; + e.gcommaaccent = 500; + e.eth = 500; + e.zcaron = 444; + e.ncommaaccent = 556; + e.onesuperior = 300; + e.imacron = 278; + e.Euro = 500; + }); + e["Times-BoldItalic"] = getLookupTableFactory(function (e) { + e.space = 250; + e.exclam = 389; + e.quotedbl = 555; + e.numbersign = 500; + e.dollar = 500; + e.percent = 833; + e.ampersand = 778; + e.quoteright = 333; + e.parenleft = 333; + e.parenright = 333; + e.asterisk = 500; + e.plus = 570; + e.comma = 250; + e.hyphen = 333; + e.period = 250; + e.slash = 278; + e.zero = 500; + e.one = 500; + e.two = 500; + e.three = 500; + e.four = 500; + e.five = 500; + e.six = 500; + e.seven = 500; + e.eight = 500; + e.nine = 500; + e.colon = 333; + e.semicolon = 333; + e.less = 570; + e.equal = 570; + e.greater = 570; + e.question = 500; + e.at = 832; + e.A = 667; + e.B = 667; + e.C = 667; + e.D = 722; + e.E = 667; + e.F = 667; + e.G = 722; + e.H = 778; + e.I = 389; + e.J = 500; + e.K = 667; + e.L = 611; + e.M = 889; + e.N = 722; + e.O = 722; + e.P = 611; + e.Q = 722; + e.R = 667; + e.S = 556; + e.T = 611; + e.U = 722; + e.V = 667; + e.W = 889; + e.X = 667; + e.Y = 611; + e.Z = 611; + e.bracketleft = 333; + e.backslash = 278; + e.bracketright = 333; + e.asciicircum = 570; + e.underscore = 500; + e.quoteleft = 333; + e.a = 500; + e.b = 500; + e.c = 444; + e.d = 500; + e.e = 444; + e.f = 333; + e.g = 500; + e.h = 556; + e.i = 278; + e.j = 278; + e.k = 500; + e.l = 278; + e.m = 778; + e.n = 556; + e.o = 500; + e.p = 500; + e.q = 500; + e.r = 389; + e.s = 389; + e.t = 278; + e.u = 556; + e.v = 444; + e.w = 667; + e.x = 500; + e.y = 444; + e.z = 389; + e.braceleft = 348; + e.bar = 220; + e.braceright = 348; + e.asciitilde = 570; + e.exclamdown = 389; + e.cent = 500; + e.sterling = 500; + e.fraction = 167; + e.yen = 500; + e.florin = 500; + e.section = 500; + e.currency = 500; + e.quotesingle = 278; + e.quotedblleft = 500; + e.guillemotleft = 500; + e.guilsinglleft = 333; + e.guilsinglright = 333; + e.fi = 556; + e.fl = 556; + e.endash = 500; + e.dagger = 500; + e.daggerdbl = 500; + e.periodcentered = 250; + e.paragraph = 500; + e.bullet = 350; + e.quotesinglbase = 333; + e.quotedblbase = 500; + e.quotedblright = 500; + e.guillemotright = 500; + e.ellipsis = 1e3; + e.perthousand = 1e3; + e.questiondown = 500; + e.grave = 333; + e.acute = 333; + e.circumflex = 333; + e.tilde = 333; + e.macron = 333; + e.breve = 333; + e.dotaccent = 333; + e.dieresis = 333; + e.ring = 333; + e.cedilla = 333; + e.hungarumlaut = 333; + e.ogonek = 333; + e.caron = 333; + e.emdash = 1e3; + e.AE = 944; + e.ordfeminine = 266; + e.Lslash = 611; + e.Oslash = 722; + e.OE = 944; + e.ordmasculine = 300; + e.ae = 722; + e.dotlessi = 278; + e.lslash = 278; + e.oslash = 500; + e.oe = 722; + e.germandbls = 500; + e.Idieresis = 389; + e.eacute = 444; + e.abreve = 500; + e.uhungarumlaut = 556; + e.ecaron = 444; + e.Ydieresis = 611; + e.divide = 570; + e.Yacute = 611; + e.Acircumflex = 667; + e.aacute = 500; + e.Ucircumflex = 722; + e.yacute = 444; + e.scommaaccent = 389; + e.ecircumflex = 444; + e.Uring = 722; + e.Udieresis = 722; + e.aogonek = 500; + e.Uacute = 722; + e.uogonek = 556; + e.Edieresis = 667; + e.Dcroat = 722; + e.commaaccent = 250; + e.copyright = 747; + e.Emacron = 667; + e.ccaron = 444; + e.aring = 500; + e.Ncommaaccent = 722; + e.lacute = 278; + e.agrave = 500; + e.Tcommaaccent = 611; + e.Cacute = 667; + e.atilde = 500; + e.Edotaccent = 667; + e.scaron = 389; + e.scedilla = 389; + e.iacute = 278; + e.lozenge = 494; + e.Rcaron = 667; + e.Gcommaaccent = 722; + e.ucircumflex = 556; + e.acircumflex = 500; + e.Amacron = 667; + e.rcaron = 389; + e.ccedilla = 444; + e.Zdotaccent = 611; + e.Thorn = 611; + e.Omacron = 722; + e.Racute = 667; + e.Sacute = 556; + e.dcaron = 608; + e.Umacron = 722; + e.uring = 556; + e.threesuperior = 300; + e.Ograve = 722; + e.Agrave = 667; + e.Abreve = 667; + e.multiply = 570; + e.uacute = 556; + e.Tcaron = 611; + e.partialdiff = 494; + e.ydieresis = 444; + e.Nacute = 722; + e.icircumflex = 278; + e.Ecircumflex = 667; + e.adieresis = 500; + e.edieresis = 444; + e.cacute = 444; + e.nacute = 556; + e.umacron = 556; + e.Ncaron = 722; + e.Iacute = 389; + e.plusminus = 570; + e.brokenbar = 220; + e.registered = 747; + e.Gbreve = 722; + e.Idotaccent = 389; + e.summation = 600; + e.Egrave = 667; + e.racute = 389; + e.omacron = 500; + e.Zacute = 611; + e.Zcaron = 611; + e.greaterequal = 549; + e.Eth = 722; + e.Ccedilla = 667; + e.lcommaaccent = 278; + e.tcaron = 366; + e.eogonek = 444; + e.Uogonek = 722; + e.Aacute = 667; + e.Adieresis = 667; + e.egrave = 444; + e.zacute = 389; + e.iogonek = 278; + e.Oacute = 722; + e.oacute = 500; + e.amacron = 500; + e.sacute = 389; + e.idieresis = 278; + e.Ocircumflex = 722; + e.Ugrave = 722; + e.Delta = 612; + e.thorn = 500; + e.twosuperior = 300; + e.Odieresis = 722; + e.mu = 576; + e.igrave = 278; + e.ohungarumlaut = 500; + e.Eogonek = 667; + e.dcroat = 500; + e.threequarters = 750; + e.Scedilla = 556; + e.lcaron = 382; + e.Kcommaaccent = 667; + e.Lacute = 611; + e.trademark = 1e3; + e.edotaccent = 444; + e.Igrave = 389; + e.Imacron = 389; + e.Lcaron = 611; + e.onehalf = 750; + e.lessequal = 549; + e.ocircumflex = 500; + e.ntilde = 556; + e.Uhungarumlaut = 722; + e.Eacute = 667; + e.emacron = 444; + e.gbreve = 500; + e.onequarter = 750; + e.Scaron = 556; + e.Scommaaccent = 556; + e.Ohungarumlaut = 722; + e.degree = 400; + e.ograve = 500; + e.Ccaron = 667; + e.ugrave = 556; + e.radical = 549; + e.Dcaron = 722; + e.rcommaaccent = 389; + e.Ntilde = 722; + e.otilde = 500; + e.Rcommaaccent = 667; + e.Lcommaaccent = 611; + e.Atilde = 667; + e.Aogonek = 667; + e.Aring = 667; + e.Otilde = 722; + e.zdotaccent = 389; + e.Ecaron = 667; + e.Iogonek = 389; + e.kcommaaccent = 500; + e.minus = 606; + e.Icircumflex = 389; + e.ncaron = 556; + e.tcommaaccent = 278; + e.logicalnot = 606; + e.odieresis = 500; + e.udieresis = 556; + e.notequal = 549; + e.gcommaaccent = 500; + e.eth = 500; + e.zcaron = 389; + e.ncommaaccent = 556; + e.onesuperior = 300; + e.imacron = 278; + e.Euro = 500; + }); + e["Times-Italic"] = getLookupTableFactory(function (e) { + e.space = 250; + e.exclam = 333; + e.quotedbl = 420; + e.numbersign = 500; + e.dollar = 500; + e.percent = 833; + e.ampersand = 778; + e.quoteright = 333; + e.parenleft = 333; + e.parenright = 333; + e.asterisk = 500; + e.plus = 675; + e.comma = 250; + e.hyphen = 333; + e.period = 250; + e.slash = 278; + e.zero = 500; + e.one = 500; + e.two = 500; + e.three = 500; + e.four = 500; + e.five = 500; + e.six = 500; + e.seven = 500; + e.eight = 500; + e.nine = 500; + e.colon = 333; + e.semicolon = 333; + e.less = 675; + e.equal = 675; + e.greater = 675; + e.question = 500; + e.at = 920; + e.A = 611; + e.B = 611; + e.C = 667; + e.D = 722; + e.E = 611; + e.F = 611; + e.G = 722; + e.H = 722; + e.I = 333; + e.J = 444; + e.K = 667; + e.L = 556; + e.M = 833; + e.N = 667; + e.O = 722; + e.P = 611; + e.Q = 722; + e.R = 611; + e.S = 500; + e.T = 556; + e.U = 722; + e.V = 611; + e.W = 833; + e.X = 611; + e.Y = 556; + e.Z = 556; + e.bracketleft = 389; + e.backslash = 278; + e.bracketright = 389; + e.asciicircum = 422; + e.underscore = 500; + e.quoteleft = 333; + e.a = 500; + e.b = 500; + e.c = 444; + e.d = 500; + e.e = 444; + e.f = 278; + e.g = 500; + e.h = 500; + e.i = 278; + e.j = 278; + e.k = 444; + e.l = 278; + e.m = 722; + e.n = 500; + e.o = 500; + e.p = 500; + e.q = 500; + e.r = 389; + e.s = 389; + e.t = 278; + e.u = 500; + e.v = 444; + e.w = 667; + e.x = 444; + e.y = 444; + e.z = 389; + e.braceleft = 400; + e.bar = 275; + e.braceright = 400; + e.asciitilde = 541; + e.exclamdown = 389; + e.cent = 500; + e.sterling = 500; + e.fraction = 167; + e.yen = 500; + e.florin = 500; + e.section = 500; + e.currency = 500; + e.quotesingle = 214; + e.quotedblleft = 556; + e.guillemotleft = 500; + e.guilsinglleft = 333; + e.guilsinglright = 333; + e.fi = 500; + e.fl = 500; + e.endash = 500; + e.dagger = 500; + e.daggerdbl = 500; + e.periodcentered = 250; + e.paragraph = 523; + e.bullet = 350; + e.quotesinglbase = 333; + e.quotedblbase = 556; + e.quotedblright = 556; + e.guillemotright = 500; + e.ellipsis = 889; + e.perthousand = 1e3; + e.questiondown = 500; + e.grave = 333; + e.acute = 333; + e.circumflex = 333; + e.tilde = 333; + e.macron = 333; + e.breve = 333; + e.dotaccent = 333; + e.dieresis = 333; + e.ring = 333; + e.cedilla = 333; + e.hungarumlaut = 333; + e.ogonek = 333; + e.caron = 333; + e.emdash = 889; + e.AE = 889; + e.ordfeminine = 276; + e.Lslash = 556; + e.Oslash = 722; + e.OE = 944; + e.ordmasculine = 310; + e.ae = 667; + e.dotlessi = 278; + e.lslash = 278; + e.oslash = 500; + e.oe = 667; + e.germandbls = 500; + e.Idieresis = 333; + e.eacute = 444; + e.abreve = 500; + e.uhungarumlaut = 500; + e.ecaron = 444; + e.Ydieresis = 556; + e.divide = 675; + e.Yacute = 556; + e.Acircumflex = 611; + e.aacute = 500; + e.Ucircumflex = 722; + e.yacute = 444; + e.scommaaccent = 389; + e.ecircumflex = 444; + e.Uring = 722; + e.Udieresis = 722; + e.aogonek = 500; + e.Uacute = 722; + e.uogonek = 500; + e.Edieresis = 611; + e.Dcroat = 722; + e.commaaccent = 250; + e.copyright = 760; + e.Emacron = 611; + e.ccaron = 444; + e.aring = 500; + e.Ncommaaccent = 667; + e.lacute = 278; + e.agrave = 500; + e.Tcommaaccent = 556; + e.Cacute = 667; + e.atilde = 500; + e.Edotaccent = 611; + e.scaron = 389; + e.scedilla = 389; + e.iacute = 278; + e.lozenge = 471; + e.Rcaron = 611; + e.Gcommaaccent = 722; + e.ucircumflex = 500; + e.acircumflex = 500; + e.Amacron = 611; + e.rcaron = 389; + e.ccedilla = 444; + e.Zdotaccent = 556; + e.Thorn = 611; + e.Omacron = 722; + e.Racute = 611; + e.Sacute = 500; + e.dcaron = 544; + e.Umacron = 722; + e.uring = 500; + e.threesuperior = 300; + e.Ograve = 722; + e.Agrave = 611; + e.Abreve = 611; + e.multiply = 675; + e.uacute = 500; + e.Tcaron = 556; + e.partialdiff = 476; + e.ydieresis = 444; + e.Nacute = 667; + e.icircumflex = 278; + e.Ecircumflex = 611; + e.adieresis = 500; + e.edieresis = 444; + e.cacute = 444; + e.nacute = 500; + e.umacron = 500; + e.Ncaron = 667; + e.Iacute = 333; + e.plusminus = 675; + e.brokenbar = 275; + e.registered = 760; + e.Gbreve = 722; + e.Idotaccent = 333; + e.summation = 600; + e.Egrave = 611; + e.racute = 389; + e.omacron = 500; + e.Zacute = 556; + e.Zcaron = 556; + e.greaterequal = 549; + e.Eth = 722; + e.Ccedilla = 667; + e.lcommaaccent = 278; + e.tcaron = 300; + e.eogonek = 444; + e.Uogonek = 722; + e.Aacute = 611; + e.Adieresis = 611; + e.egrave = 444; + e.zacute = 389; + e.iogonek = 278; + e.Oacute = 722; + e.oacute = 500; + e.amacron = 500; + e.sacute = 389; + e.idieresis = 278; + e.Ocircumflex = 722; + e.Ugrave = 722; + e.Delta = 612; + e.thorn = 500; + e.twosuperior = 300; + e.Odieresis = 722; + e.mu = 500; + e.igrave = 278; + e.ohungarumlaut = 500; + e.Eogonek = 611; + e.dcroat = 500; + e.threequarters = 750; + e.Scedilla = 500; + e.lcaron = 300; + e.Kcommaaccent = 667; + e.Lacute = 556; + e.trademark = 980; + e.edotaccent = 444; + e.Igrave = 333; + e.Imacron = 333; + e.Lcaron = 611; + e.onehalf = 750; + e.lessequal = 549; + e.ocircumflex = 500; + e.ntilde = 500; + e.Uhungarumlaut = 722; + e.Eacute = 611; + e.emacron = 444; + e.gbreve = 500; + e.onequarter = 750; + e.Scaron = 500; + e.Scommaaccent = 500; + e.Ohungarumlaut = 722; + e.degree = 400; + e.ograve = 500; + e.Ccaron = 667; + e.ugrave = 500; + e.radical = 453; + e.Dcaron = 722; + e.rcommaaccent = 389; + e.Ntilde = 667; + e.otilde = 500; + e.Rcommaaccent = 611; + e.Lcommaaccent = 556; + e.Atilde = 611; + e.Aogonek = 611; + e.Aring = 611; + e.Otilde = 722; + e.zdotaccent = 389; + e.Ecaron = 611; + e.Iogonek = 333; + e.kcommaaccent = 444; + e.minus = 675; + e.Icircumflex = 333; + e.ncaron = 500; + e.tcommaaccent = 278; + e.logicalnot = 675; + e.odieresis = 500; + e.udieresis = 500; + e.notequal = 549; + e.gcommaaccent = 500; + e.eth = 500; + e.zcaron = 389; + e.ncommaaccent = 500; + e.onesuperior = 300; + e.imacron = 278; + e.Euro = 500; + }); + e.ZapfDingbats = getLookupTableFactory(function (e) { + e.space = 278; + e.a1 = 974; + e.a2 = 961; + e.a202 = 974; + e.a3 = 980; + e.a4 = 719; + e.a5 = 789; + e.a119 = 790; + e.a118 = 791; + e.a117 = 690; + e.a11 = 960; + e.a12 = 939; + e.a13 = 549; + e.a14 = 855; + e.a15 = 911; + e.a16 = 933; + e.a105 = 911; + e.a17 = 945; + e.a18 = 974; + e.a19 = 755; + e.a20 = 846; + e.a21 = 762; + e.a22 = 761; + e.a23 = 571; + e.a24 = 677; + e.a25 = 763; + e.a26 = 760; + e.a27 = 759; + e.a28 = 754; + e.a6 = 494; + e.a7 = 552; + e.a8 = 537; + e.a9 = 577; + e.a10 = 692; + e.a29 = 786; + e.a30 = 788; + e.a31 = 788; + e.a32 = 790; + e.a33 = 793; + e.a34 = 794; + e.a35 = 816; + e.a36 = 823; + e.a37 = 789; + e.a38 = 841; + e.a39 = 823; + e.a40 = 833; + e.a41 = 816; + e.a42 = 831; + e.a43 = 923; + e.a44 = 744; + e.a45 = 723; + e.a46 = 749; + e.a47 = 790; + e.a48 = 792; + e.a49 = 695; + e.a50 = 776; + e.a51 = 768; + e.a52 = 792; + e.a53 = 759; + e.a54 = 707; + e.a55 = 708; + e.a56 = 682; + e.a57 = 701; + e.a58 = 826; + e.a59 = 815; + e.a60 = 789; + e.a61 = 789; + e.a62 = 707; + e.a63 = 687; + e.a64 = 696; + e.a65 = 689; + e.a66 = 786; + e.a67 = 787; + e.a68 = 713; + e.a69 = 791; + e.a70 = 785; + e.a71 = 791; + e.a72 = 873; + e.a73 = 761; + e.a74 = 762; + e.a203 = 762; + e.a75 = 759; + e.a204 = 759; + e.a76 = 892; + e.a77 = 892; + e.a78 = 788; + e.a79 = 784; + e.a81 = 438; + e.a82 = 138; + e.a83 = 277; + e.a84 = 415; + e.a97 = 392; + e.a98 = 392; + e.a99 = 668; + e.a100 = 668; + e.a89 = 390; + e.a90 = 390; + e.a93 = 317; + e.a94 = 317; + e.a91 = 276; + e.a92 = 276; + e.a205 = 509; + e.a85 = 509; + e.a206 = 410; + e.a86 = 410; + e.a87 = 234; + e.a88 = 234; + e.a95 = 334; + e.a96 = 334; + e.a101 = 732; + e.a102 = 544; + e.a103 = 544; + e.a104 = 910; + e.a106 = 667; + e.a107 = 760; + e.a108 = 760; + e.a112 = 776; + e.a111 = 595; + e.a110 = 694; + e.a109 = 626; + e.a120 = 788; + e.a121 = 788; + e.a122 = 788; + e.a123 = 788; + e.a124 = 788; + e.a125 = 788; + e.a126 = 788; + e.a127 = 788; + e.a128 = 788; + e.a129 = 788; + e.a130 = 788; + e.a131 = 788; + e.a132 = 788; + e.a133 = 788; + e.a134 = 788; + e.a135 = 788; + e.a136 = 788; + e.a137 = 788; + e.a138 = 788; + e.a139 = 788; + e.a140 = 788; + e.a141 = 788; + e.a142 = 788; + e.a143 = 788; + e.a144 = 788; + e.a145 = 788; + e.a146 = 788; + e.a147 = 788; + e.a148 = 788; + e.a149 = 788; + e.a150 = 788; + e.a151 = 788; + e.a152 = 788; + e.a153 = 788; + e.a154 = 788; + e.a155 = 788; + e.a156 = 788; + e.a157 = 788; + e.a158 = 788; + e.a159 = 788; + e.a160 = 894; + e.a161 = 838; + e.a163 = 1016; + e.a164 = 458; + e.a196 = 748; + e.a165 = 924; + e.a192 = 748; + e.a166 = 918; + e.a167 = 927; + e.a168 = 928; + e.a169 = 928; + e.a170 = 834; + e.a171 = 873; + e.a172 = 828; + e.a173 = 924; + e.a162 = 924; + e.a174 = 917; + e.a175 = 930; + e.a176 = 931; + e.a177 = 463; + e.a178 = 883; + e.a179 = 836; + e.a193 = 836; + e.a180 = 867; + e.a199 = 867; + e.a181 = 696; + e.a200 = 696; + e.a182 = 874; + e.a201 = 874; + e.a183 = 760; + e.a184 = 946; + e.a197 = 771; + e.a185 = 865; + e.a194 = 771; + e.a198 = 888; + e.a186 = 967; + e.a195 = 888; + e.a187 = 831; + e.a188 = 873; + e.a189 = 927; + e.a190 = 970; + e.a191 = 918; + }); + }), + ea = getLookupTableFactory(function (e) { + e.Courier = { ascent: 629, descent: -157, capHeight: 562, xHeight: -426 }; + e["Courier-Bold"] = { + ascent: 629, + descent: -157, + capHeight: 562, + xHeight: 439, + }; + e["Courier-Oblique"] = { + ascent: 629, + descent: -157, + capHeight: 562, + xHeight: 426, + }; + e["Courier-BoldOblique"] = { + ascent: 629, + descent: -157, + capHeight: 562, + xHeight: 426, + }; + e.Helvetica = { ascent: 718, descent: -207, capHeight: 718, xHeight: 523 }; + e["Helvetica-Bold"] = { + ascent: 718, + descent: -207, + capHeight: 718, + xHeight: 532, + }; + e["Helvetica-Oblique"] = { + ascent: 718, + descent: -207, + capHeight: 718, + xHeight: 523, + }; + e["Helvetica-BoldOblique"] = { + ascent: 718, + descent: -207, + capHeight: 718, + xHeight: 532, + }; + e["Times-Roman"] = { + ascent: 683, + descent: -217, + capHeight: 662, + xHeight: 450, + }; + e["Times-Bold"] = { + ascent: 683, + descent: -217, + capHeight: 676, + xHeight: 461, + }; + e["Times-Italic"] = { + ascent: 683, + descent: -217, + capHeight: 653, + xHeight: 441, + }; + e["Times-BoldItalic"] = { + ascent: 683, + descent: -217, + capHeight: 669, + xHeight: 462, + }; + e.Symbol = { + ascent: Math.NaN, + descent: Math.NaN, + capHeight: Math.NaN, + xHeight: Math.NaN, + }; + e.ZapfDingbats = { + ascent: Math.NaN, + descent: Math.NaN, + capHeight: Math.NaN, + xHeight: Math.NaN, + }; + }); +class GlyfTable { + constructor({ + glyfTable: e, + isGlyphLocationsLong: t, + locaTable: i, + numGlyphs: a, + }) { + this.glyphs = []; + const s = new DataView(i.buffer, i.byteOffset, i.byteLength), + r = new DataView(e.buffer, e.byteOffset, e.byteLength), + n = t ? 4 : 2; + let o = t ? s.getUint32(0) : 2 * s.getUint16(0), + g = 0; + for (let e = 0; e < a; e++) { + g += n; + const e = t ? s.getUint32(g) : 2 * s.getUint16(g); + if (e === o) { + this.glyphs.push(new Glyph({})); + continue; + } + const i = Glyph.parse(o, r); + this.glyphs.push(i); + o = e; + } + } + getSize() { + return this.glyphs.reduce((e, t) => e + ((t.getSize() + 3) & -4), 0); + } + write() { + const e = this.getSize(), + t = new DataView(new ArrayBuffer(e)), + i = e > 131070, + a = i ? 4 : 2, + s = new DataView(new ArrayBuffer((this.glyphs.length + 1) * a)); + i ? s.setUint32(0, 0) : s.setUint16(0, 0); + let r = 0, + n = 0; + for (const e of this.glyphs) { + r += e.write(r, t); + r = (r + 3) & -4; + n += a; + i ? s.setUint32(n, r) : s.setUint16(n, r >> 1); + } + return { + isLocationLong: i, + loca: new Uint8Array(s.buffer), + glyf: new Uint8Array(t.buffer), + }; + } + scale(e) { + for (let t = 0, i = this.glyphs.length; t < i; t++) + this.glyphs[t].scale(e[t]); + } +} +class Glyph { + constructor({ header: e = null, simple: t = null, composites: i = null }) { + this.header = e; + this.simple = t; + this.composites = i; + } + static parse(e, t) { + const [i, a] = GlyphHeader.parse(e, t); + e += i; + if (a.numberOfContours < 0) { + const i = []; + for (;;) { + const [a, s] = CompositeGlyph.parse(e, t); + e += a; + i.push(s); + if (!(32 & s.flags)) break; + } + return new Glyph({ header: a, composites: i }); + } + const s = SimpleGlyph.parse(e, t, a.numberOfContours); + return new Glyph({ header: a, simple: s }); + } + getSize() { + if (!this.header) return 0; + const e = this.simple + ? this.simple.getSize() + : this.composites.reduce((e, t) => e + t.getSize(), 0); + return this.header.getSize() + e; + } + write(e, t) { + if (!this.header) return 0; + const i = e; + e += this.header.write(e, t); + if (this.simple) e += this.simple.write(e, t); + else for (const i of this.composites) e += i.write(e, t); + return e - i; + } + scale(e) { + if (!this.header) return; + const t = (this.header.xMin + this.header.xMax) / 2; + this.header.scale(t, e); + if (this.simple) this.simple.scale(t, e); + else for (const i of this.composites) i.scale(t, e); + } +} +class GlyphHeader { + constructor({ numberOfContours: e, xMin: t, yMin: i, xMax: a, yMax: s }) { + this.numberOfContours = e; + this.xMin = t; + this.yMin = i; + this.xMax = a; + this.yMax = s; + } + static parse(e, t) { + return [ + 10, + new GlyphHeader({ + numberOfContours: t.getInt16(e), + xMin: t.getInt16(e + 2), + yMin: t.getInt16(e + 4), + xMax: t.getInt16(e + 6), + yMax: t.getInt16(e + 8), + }), + ]; + } + getSize() { + return 10; + } + write(e, t) { + t.setInt16(e, this.numberOfContours); + t.setInt16(e + 2, this.xMin); + t.setInt16(e + 4, this.yMin); + t.setInt16(e + 6, this.xMax); + t.setInt16(e + 8, this.yMax); + return 10; + } + scale(e, t) { + this.xMin = Math.round(e + (this.xMin - e) * t); + this.xMax = Math.round(e + (this.xMax - e) * t); + } +} +class Contour { + constructor({ flags: e, xCoordinates: t, yCoordinates: i }) { + this.xCoordinates = t; + this.yCoordinates = i; + this.flags = e; + } +} +class SimpleGlyph { + constructor({ contours: e, instructions: t }) { + this.contours = e; + this.instructions = t; + } + static parse(e, t, i) { + const a = []; + for (let s = 0; s < i; s++) { + const i = t.getUint16(e); + e += 2; + a.push(i); + } + const s = a[i - 1] + 1, + r = t.getUint16(e); + e += 2; + const n = new Uint8Array(t).slice(e, e + r); + e += r; + const o = []; + for (let i = 0; i < s; e++, i++) { + let a = t.getUint8(e); + o.push(a); + if (8 & a) { + const s = t.getUint8(++e); + a ^= 8; + for (let e = 0; e < s; e++) o.push(a); + i += s; + } + } + const g = []; + let c = [], + h = [], + l = []; + const C = []; + let Q = 0, + E = 0; + for (let i = 0; i < s; i++) { + const s = o[i]; + if (2 & s) { + const i = t.getUint8(e++); + E += 16 & s ? i : -i; + c.push(E); + } else if (16 & s) c.push(E); + else { + E += t.getInt16(e); + e += 2; + c.push(E); + } + if (a[Q] === i) { + Q++; + g.push(c); + c = []; + } + } + E = 0; + Q = 0; + for (let i = 0; i < s; i++) { + const s = o[i]; + if (4 & s) { + const i = t.getUint8(e++); + E += 32 & s ? i : -i; + h.push(E); + } else if (32 & s) h.push(E); + else { + E += t.getInt16(e); + e += 2; + h.push(E); + } + l.push((1 & s) | (64 & s)); + if (a[Q] === i) { + c = g[Q]; + Q++; + C.push(new Contour({ flags: l, xCoordinates: c, yCoordinates: h })); + h = []; + l = []; + } + } + return new SimpleGlyph({ contours: C, instructions: n }); + } + getSize() { + let e = 2 * this.contours.length + 2 + this.instructions.length, + t = 0, + i = 0; + for (const a of this.contours) { + e += a.flags.length; + for (let s = 0, r = a.xCoordinates.length; s < r; s++) { + const r = a.xCoordinates[s], + n = a.yCoordinates[s]; + let o = Math.abs(r - t); + o > 255 ? (e += 2) : o > 0 && (e += 1); + t = r; + o = Math.abs(n - i); + o > 255 ? (e += 2) : o > 0 && (e += 1); + i = n; + } + } + return e; + } + write(e, t) { + const i = e, + a = [], + s = [], + r = []; + let n = 0, + o = 0; + for (const i of this.contours) { + for (let e = 0, t = i.xCoordinates.length; e < t; e++) { + let t = i.flags[e]; + const g = i.xCoordinates[e]; + let c = g - n; + if (0 === c) { + t |= 16; + a.push(0); + } else { + const e = Math.abs(c); + if (e <= 255) { + t |= c >= 0 ? 18 : 2; + a.push(e); + } else a.push(c); + } + n = g; + const h = i.yCoordinates[e]; + c = h - o; + if (0 === c) { + t |= 32; + s.push(0); + } else { + const e = Math.abs(c); + if (e <= 255) { + t |= c >= 0 ? 36 : 4; + s.push(e); + } else s.push(c); + } + o = h; + r.push(t); + } + t.setUint16(e, a.length - 1); + e += 2; + } + t.setUint16(e, this.instructions.length); + e += 2; + if (this.instructions.length) { + new Uint8Array(t.buffer, 0, t.buffer.byteLength).set( + this.instructions, + e, + ); + e += this.instructions.length; + } + for (const i of r) t.setUint8(e++, i); + for (let i = 0, s = a.length; i < s; i++) { + const s = a[i], + n = r[i]; + if (2 & n) t.setUint8(e++, s); + else if (!(16 & n)) { + t.setInt16(e, s); + e += 2; + } + } + for (let i = 0, a = s.length; i < a; i++) { + const a = s[i], + n = r[i]; + if (4 & n) t.setUint8(e++, a); + else if (!(32 & n)) { + t.setInt16(e, a); + e += 2; + } + } + return e - i; + } + scale(e, t) { + for (const i of this.contours) + if (0 !== i.xCoordinates.length) + for (let a = 0, s = i.xCoordinates.length; a < s; a++) + i.xCoordinates[a] = Math.round(e + (i.xCoordinates[a] - e) * t); + } +} +class CompositeGlyph { + constructor({ + flags: e, + glyphIndex: t, + argument1: i, + argument2: a, + transf: s, + instructions: r, + }) { + this.flags = e; + this.glyphIndex = t; + this.argument1 = i; + this.argument2 = a; + this.transf = s; + this.instructions = r; + } + static parse(e, t) { + const i = e, + a = []; + let s = t.getUint16(e); + const r = t.getUint16(e + 2); + e += 4; + let n, o; + if (1 & s) { + if (2 & s) { + n = t.getInt16(e); + o = t.getInt16(e + 2); + } else { + n = t.getUint16(e); + o = t.getUint16(e + 2); + } + e += 4; + s ^= 1; + } else { + if (2 & s) { + n = t.getInt8(e); + o = t.getInt8(e + 1); + } else { + n = t.getUint8(e); + o = t.getUint8(e + 1); + } + e += 2; + } + if (8 & s) { + a.push(t.getUint16(e)); + e += 2; + } else if (64 & s) { + a.push(t.getUint16(e), t.getUint16(e + 2)); + e += 4; + } else if (128 & s) { + a.push( + t.getUint16(e), + t.getUint16(e + 2), + t.getUint16(e + 4), + t.getUint16(e + 6), + ); + e += 8; + } + let g = null; + if (256 & s) { + const i = t.getUint16(e); + e += 2; + g = new Uint8Array(t).slice(e, e + i); + e += i; + } + return [ + e - i, + new CompositeGlyph({ + flags: s, + glyphIndex: r, + argument1: n, + argument2: o, + transf: a, + instructions: g, + }), + ]; + } + getSize() { + let e = 4 + 2 * this.transf.length; + 256 & this.flags && (e += 2 + this.instructions.length); + e += 2; + 2 & this.flags + ? (this.argument1 >= -128 && + this.argument1 <= 127 && + this.argument2 >= -128 && + this.argument2 <= 127) || + (e += 2) + : (this.argument1 >= 0 && + this.argument1 <= 255 && + this.argument2 >= 0 && + this.argument2 <= 255) || + (e += 2); + return e; + } + write(e, t) { + const i = e; + 2 & this.flags + ? (this.argument1 >= -128 && + this.argument1 <= 127 && + this.argument2 >= -128 && + this.argument2 <= 127) || + (this.flags |= 1) + : (this.argument1 >= 0 && + this.argument1 <= 255 && + this.argument2 >= 0 && + this.argument2 <= 255) || + (this.flags |= 1); + t.setUint16(e, this.flags); + t.setUint16(e + 2, this.glyphIndex); + e += 4; + if (1 & this.flags) { + if (2 & this.flags) { + t.setInt16(e, this.argument1); + t.setInt16(e + 2, this.argument2); + } else { + t.setUint16(e, this.argument1); + t.setUint16(e + 2, this.argument2); + } + e += 4; + } else { + t.setUint8(e, this.argument1); + t.setUint8(e + 1, this.argument2); + e += 2; + } + if (256 & this.flags) { + t.setUint16(e, this.instructions.length); + e += 2; + if (this.instructions.length) { + new Uint8Array(t.buffer, 0, t.buffer.byteLength).set( + this.instructions, + e, + ); + e += this.instructions.length; + } + } + return e - i; + } + scale(e, t) {} +} +function writeInt16(e, t, i) { + e[t] = (i >> 8) & 255; + e[t + 1] = 255 & i; +} +function writeInt32(e, t, i) { + e[t] = (i >> 24) & 255; + e[t + 1] = (i >> 16) & 255; + e[t + 2] = (i >> 8) & 255; + e[t + 3] = 255 & i; +} +function writeData(e, t, i) { + if (i instanceof Uint8Array) e.set(i, t); + else if ("string" == typeof i) + for (let a = 0, s = i.length; a < s; a++) e[t++] = 255 & i.charCodeAt(a); + else for (const a of i) e[t++] = 255 & a; +} +class OpenTypeFileBuilder { + constructor(e) { + this.sfnt = e; + this.tables = Object.create(null); + } + static getSearchParams(e, t) { + let i = 1, + a = 0; + for (; (i ^ e) > i; ) { + i <<= 1; + a++; + } + const s = i * t; + return { range: s, entry: a, rangeShift: t * e - s }; + } + toArray() { + let e = this.sfnt; + const t = this.tables, + i = Object.keys(t); + i.sort(); + const a = i.length; + let s, + r, + n, + o, + g, + c = 12 + 16 * a; + const h = [c]; + for (s = 0; s < a; s++) { + o = t[i[s]]; + c += ((o.length + 3) & -4) >>> 0; + h.push(c); + } + const l = new Uint8Array(c); + for (s = 0; s < a; s++) { + o = t[i[s]]; + writeData(l, h[s], o); + } + "true" === e && (e = string32(65536)); + l[0] = 255 & e.charCodeAt(0); + l[1] = 255 & e.charCodeAt(1); + l[2] = 255 & e.charCodeAt(2); + l[3] = 255 & e.charCodeAt(3); + writeInt16(l, 4, a); + const C = OpenTypeFileBuilder.getSearchParams(a, 16); + writeInt16(l, 6, C.range); + writeInt16(l, 8, C.entry); + writeInt16(l, 10, C.rangeShift); + c = 12; + for (s = 0; s < a; s++) { + g = i[s]; + l[c] = 255 & g.charCodeAt(0); + l[c + 1] = 255 & g.charCodeAt(1); + l[c + 2] = 255 & g.charCodeAt(2); + l[c + 3] = 255 & g.charCodeAt(3); + let e = 0; + for (r = h[s], n = h[s + 1]; r < n; r += 4) { + e = (e + readUint32(l, r)) >>> 0; + } + writeInt32(l, c + 4, e); + writeInt32(l, c + 8, h[s]); + writeInt32(l, c + 12, t[g].length); + c += 16; + } + return l; + } + addTable(e, t) { + if (e in this.tables) throw new Error("Table " + e + " already exists"); + this.tables[e] = t; + } +} +const ta = [4], + ia = [5], + aa = [6], + sa = [7], + ra = [8], + na = [12, 35], + oa = [14], + ga = [21], + Ia = [22], + ca = [30], + ha = [31]; +class Type1CharString { + constructor() { + this.width = 0; + this.lsb = 0; + this.flexing = !1; + this.output = []; + this.stack = []; + } + convert(e, t, i) { + const a = e.length; + let s, + r, + n, + o = !1; + for (let g = 0; g < a; g++) { + let a = e[g]; + if (a < 32) { + 12 === a && (a = (a << 8) + e[++g]); + switch (a) { + case 1: + case 3: + case 9: + case 3072: + case 3073: + case 3074: + case 3105: + this.stack = []; + break; + case 4: + if (this.flexing) { + if (this.stack.length < 1) { + o = !0; + break; + } + const e = this.stack.pop(); + this.stack.push(0, e); + break; + } + o = this.executeCommand(1, ta); + break; + case 5: + o = this.executeCommand(2, ia); + break; + case 6: + o = this.executeCommand(1, aa); + break; + case 7: + o = this.executeCommand(1, sa); + break; + case 8: + o = this.executeCommand(6, ra); + break; + case 10: + if (this.stack.length < 1) { + o = !0; + break; + } + n = this.stack.pop(); + if (!t[n]) { + o = !0; + break; + } + o = this.convert(t[n], t, i); + break; + case 11: + return o; + case 13: + if (this.stack.length < 2) { + o = !0; + break; + } + s = this.stack.pop(); + r = this.stack.pop(); + this.lsb = r; + this.width = s; + this.stack.push(s, r); + o = this.executeCommand(2, Ia); + break; + case 14: + this.output.push(oa[0]); + break; + case 21: + if (this.flexing) break; + o = this.executeCommand(2, ga); + break; + case 22: + if (this.flexing) { + this.stack.push(0); + break; + } + o = this.executeCommand(1, Ia); + break; + case 30: + o = this.executeCommand(4, ca); + break; + case 31: + o = this.executeCommand(4, ha); + break; + case 3078: + if (i) { + const e = this.stack.at(-5); + this.seac = this.stack.splice(-4, 4); + this.seac[0] += this.lsb - e; + o = this.executeCommand(0, oa); + } else o = this.executeCommand(4, oa); + break; + case 3079: + if (this.stack.length < 4) { + o = !0; + break; + } + this.stack.pop(); + s = this.stack.pop(); + const e = this.stack.pop(); + r = this.stack.pop(); + this.lsb = r; + this.width = s; + this.stack.push(s, r, e); + o = this.executeCommand(3, ga); + break; + case 3084: + if (this.stack.length < 2) { + o = !0; + break; + } + const g = this.stack.pop(), + c = this.stack.pop(); + this.stack.push(c / g); + break; + case 3088: + if (this.stack.length < 2) { + o = !0; + break; + } + n = this.stack.pop(); + const h = this.stack.pop(); + if (0 === n && 3 === h) { + const e = this.stack.splice(-17, 17); + this.stack.push( + e[2] + e[0], + e[3] + e[1], + e[4], + e[5], + e[6], + e[7], + e[8], + e[9], + e[10], + e[11], + e[12], + e[13], + e[14], + ); + o = this.executeCommand(13, na, !0); + this.flexing = !1; + this.stack.push(e[15], e[16]); + } else 1 === n && 0 === h && (this.flexing = !0); + break; + case 3089: + break; + default: + warn('Unknown type 1 charstring command of "' + a + '"'); + } + if (o) break; + } else { + a <= 246 + ? (a -= 139) + : (a = + a <= 250 + ? 256 * (a - 247) + e[++g] + 108 + : a <= 254 + ? -256 * (a - 251) - e[++g] - 108 + : ((255 & e[++g]) << 24) | + ((255 & e[++g]) << 16) | + ((255 & e[++g]) << 8) | + ((255 & e[++g]) << 0)); + this.stack.push(a); + } + } + return o; + } + executeCommand(e, t, i) { + const a = this.stack.length; + if (e > a) return !0; + const s = a - e; + for (let e = s; e < a; e++) { + let t = this.stack[e]; + if (Number.isInteger(t)) this.output.push(28, (t >> 8) & 255, 255 & t); + else { + t = (65536 * t) | 0; + this.output.push( + 255, + (t >> 24) & 255, + (t >> 16) & 255, + (t >> 8) & 255, + 255 & t, + ); + } + } + this.output.push(...t); + i ? this.stack.splice(s, e) : (this.stack.length = 0); + return !1; + } +} +function isHexDigit(e) { + return (e >= 48 && e <= 57) || (e >= 65 && e <= 70) || (e >= 97 && e <= 102); +} +function decrypt(e, t, i) { + if (i >= e.length) return new Uint8Array(0); + let a, + s, + r = 0 | t; + for (a = 0; a < i; a++) r = (52845 * (e[a] + r) + 22719) & 65535; + const n = e.length - i, + o = new Uint8Array(n); + for (a = i, s = 0; s < n; a++, s++) { + const t = e[a]; + o[s] = t ^ (r >> 8); + r = (52845 * (t + r) + 22719) & 65535; + } + return o; +} +function isSpecial(e) { + return ( + 47 === e || + 91 === e || + 93 === e || + 123 === e || + 125 === e || + 40 === e || + 41 === e + ); +} +class Type1Parser { + constructor(e, t, i) { + if (t) { + const t = e.getBytes(), + i = !( + (isHexDigit(t[0]) || isWhiteSpace(t[0])) && + isHexDigit(t[1]) && + isHexDigit(t[2]) && + isHexDigit(t[3]) && + isHexDigit(t[4]) && + isHexDigit(t[5]) && + isHexDigit(t[6]) && + isHexDigit(t[7]) + ); + e = new Stream( + i + ? decrypt(t, 55665, 4) + : (function decryptAscii(e, t, i) { + let a = 0 | t; + const s = e.length, + r = new Uint8Array(s >>> 1); + let n, o; + for (n = 0, o = 0; n < s; n++) { + const t = e[n]; + if (!isHexDigit(t)) continue; + n++; + let i; + for (; n < s && !isHexDigit((i = e[n])); ) n++; + if (n < s) { + const e = parseInt(String.fromCharCode(t, i), 16); + r[o++] = e ^ (a >> 8); + a = (52845 * (e + a) + 22719) & 65535; + } + } + return r.slice(i, o); + })(t, 55665, 4), + ); + } + this.seacAnalysisEnabled = !!i; + this.stream = e; + this.nextChar(); + } + readNumberArray() { + this.getToken(); + const e = []; + for (;;) { + const t = this.getToken(); + if (null === t || "]" === t || "}" === t) break; + e.push(parseFloat(t || 0)); + } + return e; + } + readNumber() { + const e = this.getToken(); + return parseFloat(e || 0); + } + readInt() { + const e = this.getToken(); + return 0 | parseInt(e || 0, 10); + } + readBoolean() { + return "true" === this.getToken() ? 1 : 0; + } + nextChar() { + return (this.currentChar = this.stream.getByte()); + } + prevChar() { + this.stream.skip(-2); + return (this.currentChar = this.stream.getByte()); + } + getToken() { + let e = !1, + t = this.currentChar; + for (;;) { + if (-1 === t) return null; + if (e) (10 !== t && 13 !== t) || (e = !1); + else if (37 === t) e = !0; + else if (!isWhiteSpace(t)) break; + t = this.nextChar(); + } + if (isSpecial(t)) { + this.nextChar(); + return String.fromCharCode(t); + } + let i = ""; + do { + i += String.fromCharCode(t); + t = this.nextChar(); + } while (t >= 0 && !isWhiteSpace(t) && !isSpecial(t)); + return i; + } + readCharStrings(e, t) { + return -1 === t ? e : decrypt(e, 4330, t); + } + extractFontProgram(e) { + const t = this.stream, + i = [], + a = [], + s = Object.create(null); + s.lenIV = 4; + const r = { subrs: [], charstrings: [], properties: { privateData: s } }; + let n, o, g, c; + for (; null !== (n = this.getToken()); ) + if ("/" === n) { + n = this.getToken(); + switch (n) { + case "CharStrings": + this.getToken(); + this.getToken(); + this.getToken(); + this.getToken(); + for (;;) { + n = this.getToken(); + if (null === n || "end" === n) break; + if ("/" !== n) continue; + const e = this.getToken(); + o = this.readInt(); + this.getToken(); + g = o > 0 ? t.getBytes(o) : new Uint8Array(0); + c = r.properties.privateData.lenIV; + const i = this.readCharStrings(g, c); + this.nextChar(); + n = this.getToken(); + "noaccess" === n ? this.getToken() : "/" === n && this.prevChar(); + a.push({ glyph: e, encoded: i }); + } + break; + case "Subrs": + this.readInt(); + this.getToken(); + for (; "dup" === this.getToken(); ) { + const e = this.readInt(); + o = this.readInt(); + this.getToken(); + g = o > 0 ? t.getBytes(o) : new Uint8Array(0); + c = r.properties.privateData.lenIV; + const a = this.readCharStrings(g, c); + this.nextChar(); + n = this.getToken(); + "noaccess" === n && this.getToken(); + i[e] = a; + } + break; + case "BlueValues": + case "OtherBlues": + case "FamilyBlues": + case "FamilyOtherBlues": + const e = this.readNumberArray(); + e.length > 0 && e.length, 0; + break; + case "StemSnapH": + case "StemSnapV": + r.properties.privateData[n] = this.readNumberArray(); + break; + case "StdHW": + case "StdVW": + r.properties.privateData[n] = this.readNumberArray()[0]; + break; + case "BlueShift": + case "lenIV": + case "BlueFuzz": + case "BlueScale": + case "LanguageGroup": + r.properties.privateData[n] = this.readNumber(); + break; + case "ExpansionFactor": + r.properties.privateData[n] = this.readNumber() || 0.06; + break; + case "ForceBold": + r.properties.privateData[n] = this.readBoolean(); + } + } + for (const { encoded: t, glyph: s } of a) { + const a = new Type1CharString(), + n = a.convert(t, i, this.seacAnalysisEnabled); + let o = a.output; + n && (o = [14]); + const g = { + glyphName: s, + charstring: o, + width: a.width, + lsb: a.lsb, + seac: a.seac, + }; + ".notdef" === s ? r.charstrings.unshift(g) : r.charstrings.push(g); + if (e.builtInEncoding) { + const t = e.builtInEncoding.indexOf(s); + t > -1 && + void 0 === e.widths[t] && + t >= e.firstChar && + t <= e.lastChar && + (e.widths[t] = a.width); + } + } + return r; + } + extractFontHeader(e) { + let t; + for (; null !== (t = this.getToken()); ) + if ("/" === t) { + t = this.getToken(); + switch (t) { + case "FontMatrix": + const i = this.readNumberArray(); + e.fontMatrix = i; + break; + case "Encoding": + const a = this.getToken(); + let s; + if (/^\d+$/.test(a)) { + s = []; + const e = 0 | parseInt(a, 10); + this.getToken(); + for (let i = 0; i < e; i++) { + t = this.getToken(); + for (; "dup" !== t && "def" !== t; ) { + t = this.getToken(); + if (null === t) return; + } + if ("def" === t) break; + const e = this.readInt(); + this.getToken(); + const i = this.getToken(); + s[e] = i; + this.getToken(); + } + } else s = getEncoding(a); + e.builtInEncoding = s; + break; + case "FontBBox": + const r = this.readNumberArray(); + e.ascent = Math.max(r[3], r[1]); + e.descent = Math.min(r[1], r[3]); + e.ascentScaled = !0; + } + } + } +} +function findBlock(e, t, i) { + const a = e.length, + s = t.length, + r = a - s; + let n = i, + o = !1; + for (; n < r; ) { + let i = 0; + for (; i < s && e[n + i] === t[i]; ) i++; + if (i >= s) { + n += i; + for (; n < a && isWhiteSpace(e[n]); ) n++; + o = !0; + break; + } + n++; + } + return { found: o, length: n }; +} +class Type1Font { + constructor(e, t, i) { + let a = i.length1, + s = i.length2, + r = t.peekBytes(6); + const n = 128 === r[0] && 1 === r[1]; + if (n) { + t.skip(6); + a = (r[5] << 24) | (r[4] << 16) | (r[3] << 8) | r[2]; + } + const o = (function getHeaderBlock(e, t) { + const i = [101, 101, 120, 101, 99], + a = e.pos; + let s, r, n, o; + try { + s = e.getBytes(t); + r = s.length; + } catch {} + if (r === t) { + n = findBlock(s, i, t - 2 * i.length); + if (n.found && n.length === t) + return { stream: new Stream(s), length: t }; + } + warn('Invalid "Length1" property in Type1 font -- trying to recover.'); + e.pos = a; + for (;;) { + n = findBlock(e.peekBytes(2048), i, 0); + if (0 === n.length) break; + e.pos += n.length; + if (n.found) { + o = e.pos - a; + break; + } + } + e.pos = a; + if (o) return { stream: new Stream(e.getBytes(o)), length: o }; + warn( + 'Unable to recover "Length1" property in Type1 font -- using as is.', + ); + return { stream: new Stream(e.getBytes(t)), length: t }; + })(t, a); + new Type1Parser(o.stream, !1, Yi).extractFontHeader(i); + if (n) { + r = t.getBytes(6); + s = (r[5] << 24) | (r[4] << 16) | (r[3] << 8) | r[2]; + } + const g = (function getEexecBlock(e, t) { + const i = e.getBytes(); + if (0 === i.length) + throw new FormatError("getEexecBlock - no font program found."); + return { stream: new Stream(i), length: i.length }; + })(t), + c = new Type1Parser(g.stream, !0, Yi).extractFontProgram(i); + for (const e in c.properties) i[e] = c.properties[e]; + const h = c.charstrings, + l = this.getType2Charstrings(h), + C = this.getType2Subrs(c.subrs); + this.charstrings = h; + this.data = this.wrap(e, l, this.charstrings, C, i); + this.seacs = this.getSeacs(c.charstrings); + } + get numGlyphs() { + return this.charstrings.length + 1; + } + getCharset() { + const e = [".notdef"]; + for (const { glyphName: t } of this.charstrings) e.push(t); + return e; + } + getGlyphMapping(e) { + const t = this.charstrings; + if (e.composite) { + const i = Object.create(null); + for (let a = 0, s = t.length; a < s; a++) { + i[e.cMap.charCodeOf(a)] = a + 1; + } + return i; + } + const i = [".notdef"]; + let a, s; + for (s = 0; s < t.length; s++) i.push(t[s].glyphName); + const r = e.builtInEncoding; + if (r) { + a = Object.create(null); + for (const e in r) { + s = i.indexOf(r[e]); + s >= 0 && (a[e] = s); + } + } + return type1FontGlyphMapping(e, a, i); + } + hasGlyphId(e) { + if (e < 0 || e >= this.numGlyphs) return !1; + if (0 === e) return !0; + return this.charstrings[e - 1].charstring.length > 0; + } + getSeacs(e) { + const t = []; + for (let i = 0, a = e.length; i < a; i++) { + const a = e[i]; + a.seac && (t[i + 1] = a.seac); + } + return t; + } + getType2Charstrings(e) { + const t = []; + for (const i of e) t.push(i.charstring); + return t; + } + getType2Subrs(e) { + let t = 0; + const i = e.length; + t = i < 1133 ? 107 : i < 33769 ? 1131 : 32768; + const a = []; + let s; + for (s = 0; s < t; s++) a.push([11]); + for (s = 0; s < i; s++) a.push(e[s]); + return a; + } + wrap(e, t, i, a, s) { + const r = new CFF(); + r.header = new CFFHeader(1, 0, 4, 4); + r.names = [e]; + const n = new CFFTopDict(); + n.setByName("version", 391); + n.setByName("Notice", 392); + n.setByName("FullName", 393); + n.setByName("FamilyName", 394); + n.setByName("Weight", 395); + n.setByName("Encoding", null); + n.setByName("FontMatrix", s.fontMatrix); + n.setByName("FontBBox", s.bbox); + n.setByName("charset", null); + n.setByName("CharStrings", null); + n.setByName("Private", null); + r.topDict = n; + const o = new CFFStrings(); + o.add("Version 0.11"); + o.add("See original notice"); + o.add(e); + o.add(e); + o.add("Medium"); + r.strings = o; + r.globalSubrIndex = new CFFIndex(); + const g = t.length, + c = [".notdef"]; + let h, l; + for (h = 0; h < g; h++) { + const e = i[h].glyphName; + -1 === wi.indexOf(e) && o.add(e); + c.push(e); + } + r.charset = new CFFCharset(!1, 0, c); + const C = new CFFIndex(); + C.add([139, 14]); + for (h = 0; h < g; h++) C.add(t[h]); + r.charStrings = C; + const Q = new CFFPrivateDict(); + Q.setByName("Subrs", null); + const E = [ + "BlueValues", + "OtherBlues", + "FamilyBlues", + "FamilyOtherBlues", + "StemSnapH", + "StemSnapV", + "BlueShift", + "BlueFuzz", + "BlueScale", + "LanguageGroup", + "ExpansionFactor", + "ForceBold", + "StdHW", + "StdVW", + ]; + for (h = 0, l = E.length; h < l; h++) { + const e = E[h]; + if (!(e in s.privateData)) continue; + const t = s.privateData[e]; + if (Array.isArray(t)) + for (let e = t.length - 1; e > 0; e--) t[e] -= t[e - 1]; + Q.setByName(e, t); + } + r.topDict.privateDict = Q; + const u = new CFFIndex(); + for (h = 0, l = a.length; h < l; h++) u.add(a[h]); + Q.subrsIndex = u; + return new CFFCompiler(r).compile(); + } +} +const la = [ + [57344, 63743], + [1048576, 1114109], + ], + Ca = 1e3, + Ba = [ + "ascent", + "bbox", + "black", + "bold", + "charProcOperatorList", + "composite", + "cssFontInfo", + "data", + "defaultVMetrics", + "defaultWidth", + "descent", + "fallbackName", + "fontMatrix", + "isInvalidPDFjsFont", + "isType3Font", + "italic", + "loadedName", + "mimetype", + "missingFile", + "name", + "remeasure", + "subtype", + "systemFontInfo", + "type", + "vertical", + ], + Qa = [ + "cMap", + "defaultEncoding", + "differences", + "isMonospace", + "isSerifFont", + "isSymbolicFont", + "seacMap", + "toFontChar", + "toUnicode", + "vmetrics", + "widths", + ]; +function adjustWidths(e) { + if (!e.fontMatrix) return; + if (e.fontMatrix[0] === a[0]) return; + const t = 0.001 / e.fontMatrix[0], + i = e.widths; + for (const e in i) i[e] *= t; + e.defaultWidth *= t; +} +function amendFallbackToUnicode(e) { + if (!e.fallbackToUnicode) return; + if (e.toUnicode instanceof IdentityToUnicodeMap) return; + const t = []; + for (const i in e.fallbackToUnicode) + e.toUnicode.has(i) || (t[i] = e.fallbackToUnicode[i]); + t.length > 0 && e.toUnicode.amend(t); +} +class fonts_Glyph { + constructor(e, t, i, a, s, r, n, o, g) { + this.originalCharCode = e; + this.fontChar = t; + this.unicode = i; + this.accent = a; + this.width = s; + this.vmetric = r; + this.operatorListId = n; + this.isSpace = o; + this.isInFont = g; + } + get category() { + return shadow( + this, + "category", + (function getCharUnicodeCategory(e) { + const t = Hi.get(e); + if (t) return t; + const i = e.match(Ji), + a = { + isWhitespace: !!i?.[1], + isZeroWidthDiacritic: !!i?.[2], + isInvisibleFormatMark: !!i?.[3], + }; + Hi.set(e, a); + return a; + })(this.unicode), + !0, + ); + } +} +function int16(e, t) { + return (e << 8) + t; +} +function writeSignedInt16(e, t, i) { + e[t + 1] = i; + e[t] = i >>> 8; +} +function signedInt16(e, t) { + const i = (e << 8) + t; + return 32768 & i ? i - 65536 : i; +} +function string16(e) { + return String.fromCharCode((e >> 8) & 255, 255 & e); +} +function safeString16(e) { + e > 32767 ? (e = 32767) : e < -32768 && (e = -32768); + return String.fromCharCode((e >> 8) & 255, 255 & e); +} +function isTrueTypeCollectionFile(e) { + return "ttcf" === bytesToString(e.peekBytes(4)); +} +function getFontFileType(e, { type: t, subtype: i, composite: a }) { + let s, r; + if ( + (function isTrueTypeFile(e) { + const t = e.peekBytes(4); + return 65536 === readUint32(t, 0) || "true" === bytesToString(t); + })(e) || + isTrueTypeCollectionFile(e) + ) + s = a ? "CIDFontType2" : "TrueType"; + else if ( + (function isOpenTypeFile(e) { + return "OTTO" === bytesToString(e.peekBytes(4)); + })(e) + ) + s = a ? "CIDFontType2" : "OpenType"; + else if ( + (function isType1File(e) { + const t = e.peekBytes(2); + return (37 === t[0] && 33 === t[1]) || (128 === t[0] && 1 === t[1]); + })(e) + ) + s = a ? "CIDFontType0" : "MMType1" === t ? "MMType1" : "Type1"; + else if ( + (function isCFFFile(e) { + const t = e.peekBytes(4); + return t[0] >= 1 && t[3] >= 1 && t[3] <= 4; + })(e) + ) + if (a) { + s = "CIDFontType0"; + r = "CIDFontType0C"; + } else { + s = "MMType1" === t ? "MMType1" : "Type1"; + r = "Type1C"; + } + else { + warn("getFontFileType: Unable to detect correct font file Type/Subtype."); + s = t; + r = i; + } + return [s, r]; +} +function applyStandardFontGlyphMap(e, t) { + for (const i in t) e[+i] = t[i]; +} +function buildToFontChar(e, t, i) { + const a = []; + let s; + for (let i = 0, r = e.length; i < r; i++) { + s = getUnicodeForGlyph(e[i], t); + -1 !== s && (a[i] = s); + } + for (const e in i) { + s = getUnicodeForGlyph(i[e], t); + -1 !== s && (a[+e] = s); + } + return a; +} +function isMacNameRecord(e) { + return 1 === e.platform && 0 === e.encoding && 0 === e.language; +} +function isWinNameRecord(e) { + return 3 === e.platform && 1 === e.encoding && 1033 === e.language; +} +function convertCidString(e, t, i = !1) { + switch (t.length) { + case 1: + return t.charCodeAt(0); + case 2: + return (t.charCodeAt(0) << 8) | t.charCodeAt(1); + } + const a = `Unsupported CID string (charCode ${e}): "${t}".`; + if (i) throw new FormatError(a); + warn(a); + return t; +} +function adjustMapping(e, t, i, a) { + const s = Object.create(null), + r = new Map(), + n = [], + o = new Set(); + let g = 0; + let c = la[g][0], + h = la[g][1]; + for (const C in e) { + let Q = e[C]; + if (!t(Q)) continue; + if (c > h) { + g++; + if (g >= la.length) { + warn("Ran out of space in font private use area."); + break; + } + c = la[g][0]; + h = la[g][1]; + } + const E = c++; + 0 === Q && (Q = i); + let u = a.get(C); + "string" == typeof u && (u = u.codePointAt(0)); + if ( + u && + !((l = u), + (la[0][0] <= l && l <= la[0][1]) || (la[1][0] <= l && l <= la[1][1])) && + !o.has(Q) + ) { + r.set(u, Q); + o.add(Q); + } + s[E] = Q; + n[C] = E; + } + var l; + return { + toFontChar: n, + charCodeToGlyphId: s, + toUnicodeExtraMap: r, + nextAvailableFontCharCode: c, + }; +} +function createCmapTable(e, t, i) { + const a = (function getRanges(e, t, i) { + const a = []; + for (const t in e) + e[t] >= i || a.push({ fontCharCode: 0 | t, glyphId: e[t] }); + if (t) + for (const [e, s] of t) + s >= i || a.push({ fontCharCode: e, glyphId: s }); + 0 === a.length && a.push({ fontCharCode: 0, glyphId: 0 }); + a.sort(function fontGetRangesSort(e, t) { + return e.fontCharCode - t.fontCharCode; + }); + const s = [], + r = a.length; + for (let e = 0; e < r; ) { + const t = a[e].fontCharCode, + i = [a[e].glyphId]; + ++e; + let n = t; + for (; e < r && n + 1 === a[e].fontCharCode; ) { + i.push(a[e].glyphId); + ++n; + ++e; + if (65535 === n) break; + } + s.push([t, n, i]); + } + return s; + })(e, t, i), + s = a.at(-1)[1] > 65535 ? 2 : 1; + let r, + n, + o, + g, + c = "\0\0" + string16(s) + "\0\0" + string32(4 + 8 * s); + for (r = a.length - 1; r >= 0 && !(a[r][0] <= 65535); --r); + const h = r + 1; + a[r][0] < 65535 && 65535 === a[r][1] && (a[r][1] = 65534); + const l = a[r][1] < 65535 ? 1 : 0, + C = h + l, + Q = OpenTypeFileBuilder.getSearchParams(C, 2); + let E, + u, + d, + f, + p = "", + m = "", + y = "", + w = "", + b = "", + D = 0; + for (r = 0, n = h; r < n; r++) { + E = a[r]; + u = E[0]; + d = E[1]; + p += string16(u); + m += string16(d); + f = E[2]; + let e = !0; + for (o = 1, g = f.length; o < g; ++o) + if (f[o] !== f[o - 1] + 1) { + e = !1; + break; + } + if (e) { + y += string16((f[0] - u) & 65535); + w += string16(0); + } else { + const e = 2 * (C - r) + 2 * D; + D += d - u + 1; + y += string16(0); + w += string16(e); + for (o = 0, g = f.length; o < g; ++o) b += string16(f[o]); + } + } + if (l > 0) { + m += "ÿÿ"; + p += "ÿÿ"; + y += "\0"; + w += "\0\0"; + } + const F = + "\0\0" + + string16(2 * C) + + string16(Q.range) + + string16(Q.entry) + + string16(Q.rangeShift) + + m + + "\0\0" + + p + + y + + w + + b; + let S = "", + k = ""; + if (s > 1) { + c += "\0\0\n" + string32(4 + 8 * s + 4 + F.length); + S = ""; + for (r = 0, n = a.length; r < n; r++) { + E = a[r]; + u = E[0]; + f = E[2]; + let e = f[0]; + for (o = 1, g = f.length; o < g; ++o) + if (f[o] !== f[o - 1] + 1) { + d = E[0] + o - 1; + S += string32(u) + string32(d) + string32(e); + u = d + 1; + e = f[o]; + } + S += string32(u) + string32(E[1]) + string32(e); + } + k = + "\0\f\0\0" + + string32(S.length + 16) + + "\0\0\0\0" + + string32(S.length / 12); + } + return c + "\0" + string16(F.length + 4) + F + k + S; +} +function createOS2Table(e, t, i) { + i ||= { unitsPerEm: 0, yMax: 0, yMin: 0, ascent: 0, descent: 0 }; + let s = 0, + r = 0, + n = 0, + o = 0, + g = null, + c = 0, + h = -1; + if (t) { + for (let e in t) { + e |= 0; + (g > e || !g) && (g = e); + c < e && (c = e); + h = getUnicodeRangeFor(e, h); + if (h < 32) s |= 1 << h; + else if (h < 64) r |= 1 << (h - 32); + else if (h < 96) n |= 1 << (h - 64); + else { + if (!(h < 123)) + throw new FormatError( + "Unicode ranges Bits > 123 are reserved for internal usage", + ); + o |= 1 << (h - 96); + } + } + c > 65535 && (c = 65535); + } else { + g = 0; + c = 255; + } + const l = e.bbox || [0, 0, 0, 0], + C = i.unitsPerEm || 1 / (e.fontMatrix || a)[0], + Q = e.ascentScaled ? 1 : C / Ca, + E = i.ascent || Math.round(Q * (e.ascent || l[3])); + let u = i.descent || Math.round(Q * (e.descent || l[1])); + u > 0 && e.descent > 0 && l[1] < 0 && (u = -u); + const d = i.yMax || E, + f = -i.yMin || -u; + return ( + "\0$ô\0\0\0Š»\0\0\0ŒŠ»\0\0ß\x001\0\0\0\0" + + String.fromCharCode(e.fixedPitch ? 9 : 0) + + "\0\0\0\0\0\0" + + string32(s) + + string32(r) + + string32(n) + + string32(o) + + "*21*" + + string16(e.italicAngle ? 1 : 0) + + string16(g || e.firstChar) + + string16(c || e.lastChar) + + string16(E) + + string16(u) + + "\0d" + + string16(d) + + string16(f) + + "\0\0\0\0\0\0\0\0" + + string16(e.xHeight) + + string16(e.capHeight) + + string16(0) + + string16(g || e.firstChar) + + "\0" + ); +} +function createPostTable(e) { + return ( + "\0\0\0" + + string32(Math.floor(65536 * e.italicAngle)) + + "\0\0\0\0" + + string32(e.fixedPitch ? 1 : 0) + + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + ); +} +function createPostscriptName(e) { + return e.replaceAll(/[^\x21-\x7E]|[[\](){}<>/%]/g, "").slice(0, 63); +} +function createNameTable(e, t) { + t || (t = [[], []]); + const i = [ + t[0][0] || "Original licence", + t[0][1] || e, + t[0][2] || "Unknown", + t[0][3] || "uniqueID", + t[0][4] || e, + t[0][5] || "Version 0.11", + t[0][6] || createPostscriptName(e), + t[0][7] || "Unknown", + t[0][8] || "Unknown", + t[0][9] || "Unknown", + ], + a = []; + let s, r, n, o, g; + for (s = 0, r = i.length; s < r; s++) { + g = t[1][s] || i[s]; + const e = []; + for (n = 0, o = g.length; n < o; n++) e.push(string16(g.charCodeAt(n))); + a.push(e.join("")); + } + const c = [i, a], + h = ["\0", "\0"], + l = ["\0\0", "\0"], + C = ["\0\0", "\t"], + Q = i.length * h.length; + let E = "\0\0" + string16(Q) + string16(12 * Q + 6), + u = 0; + for (s = 0, r = h.length; s < r; s++) { + const e = c[s]; + for (n = 0, o = e.length; n < o; n++) { + g = e[n]; + E += h[s] + l[s] + C[s] + string16(n) + string16(g.length) + string16(u); + u += g.length; + } + } + E += i.join("") + a.join(""); + return E; +} +class Font { + constructor(e, t, i) { + this.name = e; + this.psName = null; + this.mimetype = null; + this.disableFontFace = !1; + this.loadedName = i.loadedName; + this.isType3Font = i.isType3Font; + this.missingFile = !1; + this.cssFontInfo = i.cssFontInfo; + this._charsCache = Object.create(null); + this._glyphCache = Object.create(null); + let a = !!(i.flags & Ki); + if (!a && !i.isSimulatedFlags) { + const t = e.replaceAll(/[,_]/g, "-").split("-", 1)[0], + i = ji(); + for (const e of t.split("+")) + if (i[e]) { + a = !0; + break; + } + } + this.isSerifFont = a; + this.isSymbolicFont = !!(i.flags & Ti); + this.isMonospace = !!(i.flags & vi); + let { type: s, subtype: r } = i; + this.type = s; + this.subtype = r; + this.systemFontInfo = i.systemFontInfo; + const n = e.match(/^InvalidPDFjsFont_(.*)_\d+$/); + this.isInvalidPDFjsFont = !!n; + this.isInvalidPDFjsFont + ? (this.fallbackName = n[1]) + : this.isMonospace + ? (this.fallbackName = "monospace") + : this.isSerifFont + ? (this.fallbackName = "serif") + : (this.fallbackName = "sans-serif"); + if (this.systemFontInfo?.guessFallback) { + this.systemFontInfo.guessFallback = !1; + this.systemFontInfo.css += `,${this.fallbackName}`; + } + this.differences = i.differences; + this.widths = i.widths; + this.defaultWidth = i.defaultWidth; + this.composite = i.composite; + this.cMap = i.cMap; + this.capHeight = i.capHeight / Ca; + this.ascent = i.ascent / Ca; + this.descent = i.descent / Ca; + this.lineHeight = this.ascent - this.descent; + this.fontMatrix = i.fontMatrix; + this.bbox = i.bbox; + this.defaultEncoding = i.defaultEncoding; + this.toUnicode = i.toUnicode; + this.toFontChar = []; + if ("Type3" === i.type) { + for (let e = 0; e < 256; e++) + this.toFontChar[e] = this.differences[e] || i.defaultEncoding[e]; + return; + } + this.cidEncoding = i.cidEncoding || ""; + this.vertical = !!i.vertical; + if (this.vertical) { + this.vmetrics = i.vmetrics; + this.defaultVMetrics = i.defaultVMetrics; + } + if (!t || t.isEmpty) { + t && warn('Font file is empty in "' + e + '" (' + this.loadedName + ")"); + this.fallbackToSystemFont(i); + return; + } + [s, r] = getFontFileType(t, i); + (s === this.type && r === this.subtype) || + info( + `Inconsistent font file Type/SubType, expected: ${this.type}/${this.subtype} but found: ${s}/${r}.`, + ); + let o; + try { + switch (s) { + case "MMType1": + info("MMType1 font (" + e + "), falling back to Type1."); + case "Type1": + case "CIDFontType0": + this.mimetype = "font/opentype"; + const a = + "Type1C" === r || "CIDFontType0C" === r + ? new CFFFont(t, i) + : new Type1Font(e, t, i); + adjustWidths(i); + o = this.convert(e, a, i); + break; + case "OpenType": + case "TrueType": + case "CIDFontType2": + this.mimetype = "font/opentype"; + o = this.checkAndRepair(e, t, i); + if (this.isOpenType) { + adjustWidths(i); + s = "OpenType"; + } + break; + default: + throw new FormatError(`Font ${s} is not supported`); + } + } catch (e) { + warn(e); + this.fallbackToSystemFont(i); + return; + } + amendFallbackToUnicode(i); + this.data = o; + this.type = s; + this.subtype = r; + this.fontMatrix = i.fontMatrix; + this.widths = i.widths; + this.defaultWidth = i.defaultWidth; + this.toUnicode = i.toUnicode; + this.seacMap = i.seacMap; + } + get renderer() { + return shadow(this, "renderer", FontRendererFactory.create(this, Yi)); + } + exportData(e = !1) { + const t = e ? [...Ba, ...Qa] : Ba, + i = Object.create(null); + let a, s; + for (a of t) { + s = this[a]; + void 0 !== s && (i[a] = s); + } + return i; + } + fallbackToSystemFont(e) { + this.missingFile = !0; + const { name: t, type: i } = this; + let a = normalizeFontName(t); + const s = Pi(), + r = Xi(), + n = !!s[a], + o = !(!r[a] || !s[r[a]]); + a = s[a] || r[a] || a; + const g = ea()[a]; + if (g) { + isNaN(this.ascent) && (this.ascent = g.ascent / Ca); + isNaN(this.descent) && (this.descent = g.descent / Ca); + isNaN(this.capHeight) && (this.capHeight = g.capHeight / Ca); + } + this.bold = /bold/gi.test(a); + this.italic = /oblique|italic/gi.test(a); + this.black = /Black/g.test(t); + const c = /Narrow/g.test(t); + this.remeasure = (!n || c) && Object.keys(this.widths).length > 0; + if ( + (n || o) && + "CIDFontType2" === i && + this.cidEncoding.startsWith("Identity-") + ) { + const i = e.cidToGidMap, + a = []; + applyStandardFontGlyphMap(a, Vi()); + /Arial-?Black/i.test(t) + ? applyStandardFontGlyphMap(a, zi()) + : /Calibri/i.test(t) && applyStandardFontGlyphMap(a, _i()); + if (i) { + for (const e in a) { + const t = a[e]; + void 0 !== i[t] && (a[+e] = i[t]); + } + i.length !== this.toUnicode.length && + e.hasIncludedToUnicodeMap && + this.toUnicode instanceof IdentityToUnicodeMap && + this.toUnicode.forEach(function (e, t) { + const s = a[e]; + void 0 === i[s] && (a[+e] = t); + }); + } + this.toUnicode instanceof IdentityToUnicodeMap || + this.toUnicode.forEach(function (e, t) { + a[+e] = t; + }); + this.toFontChar = a; + this.toUnicode = new ToUnicodeMap(a); + } else if (/Symbol/i.test(a)) + this.toFontChar = buildToFontChar(mi, Ni(), this.differences); + else if (/Dingbats/i.test(a)) + this.toFontChar = buildToFontChar(yi, Gi(), this.differences); + else if (n) { + const e = buildToFontChar(this.defaultEncoding, Ni(), this.differences); + "CIDFontType2" !== i || + this.cidEncoding.startsWith("Identity-") || + this.toUnicode instanceof IdentityToUnicodeMap || + this.toUnicode.forEach(function (t, i) { + e[+t] = i; + }); + this.toFontChar = e; + } else { + const e = Ni(), + i = []; + this.toUnicode.forEach((t, a) => { + if (!this.composite) { + const i = getUnicodeForGlyph( + this.differences[t] || this.defaultEncoding[t], + e, + ); + -1 !== i && (a = i); + } + i[+t] = a; + }); + this.composite && + this.toUnicode instanceof IdentityToUnicodeMap && + /Tahoma|Verdana/i.test(t) && + applyStandardFontGlyphMap(i, Vi()); + this.toFontChar = i; + } + amendFallbackToUnicode(e); + this.loadedName = a.split("-", 1)[0]; + } + checkAndRepair(e, t, i) { + const a = [ + "OS/2", + "cmap", + "head", + "hhea", + "hmtx", + "maxp", + "name", + "post", + "loca", + "glyf", + "fpgm", + "prep", + "cvt ", + "CFF ", + ]; + function readTables(e, t) { + const i = Object.create(null); + i["OS/2"] = null; + i.cmap = null; + i.head = null; + i.hhea = null; + i.hmtx = null; + i.maxp = null; + i.name = null; + i.post = null; + for (let s = 0; s < t; s++) { + const t = readTableEntry(e); + a.includes(t.tag) && 0 !== t.length && (i[t.tag] = t); + } + return i; + } + function readTableEntry(e) { + const t = e.getString(4), + i = e.getInt32() >>> 0, + a = e.getInt32() >>> 0, + s = e.getInt32() >>> 0, + r = e.pos; + e.pos = e.start || 0; + e.skip(a); + const n = e.getBytes(s); + e.pos = r; + if ("head" === t) { + n[8] = n[9] = n[10] = n[11] = 0; + n[17] |= 32; + } + return { tag: t, checksum: i, length: s, offset: a, data: n }; + } + function readOpenTypeHeader(e) { + return { + version: e.getString(4), + numTables: e.getUint16(), + searchRange: e.getUint16(), + entrySelector: e.getUint16(), + rangeShift: e.getUint16(), + }; + } + function sanitizeGlyph(e, t, i, a, s, r) { + const n = { length: 0, sizeOfInstructions: 0 }; + if (t < 0 || t >= e.length || i > e.length || i - t <= 12) return n; + const o = e.subarray(t, i), + g = signedInt16(o[2], o[3]), + c = signedInt16(o[4], o[5]), + h = signedInt16(o[6], o[7]), + l = signedInt16(o[8], o[9]); + if (g > h) { + writeSignedInt16(o, 2, h); + writeSignedInt16(o, 6, g); + } + if (c > l) { + writeSignedInt16(o, 4, l); + writeSignedInt16(o, 8, c); + } + const C = signedInt16(o[0], o[1]); + if (C < 0) { + if (C < -1) return n; + a.set(o, s); + n.length = o.length; + return n; + } + let Q, + E = 10, + u = 0; + for (Q = 0; Q < C; Q++) { + u = ((o[E] << 8) | o[E + 1]) + 1; + E += 2; + } + const d = E, + f = (o[E] << 8) | o[E + 1]; + n.sizeOfInstructions = f; + E += 2 + f; + const p = E; + let m = 0; + for (Q = 0; Q < u; Q++) { + const e = o[E++]; + 192 & e && (o[E - 1] = 63 & e); + let t = 2; + 2 & e ? (t = 1) : 16 & e && (t = 0); + let i = 2; + 4 & e ? (i = 1) : 32 & e && (i = 0); + const a = t + i; + m += a; + if (8 & e) { + const e = o[E++]; + 0 === e && (o[E - 1] ^= 8); + Q += e; + m += e * a; + } + } + if (0 === m) return n; + let y = E + m; + if (y > o.length) return n; + if (!r && f > 0) { + a.set(o.subarray(0, d), s); + a.set([0, 0], s + d); + a.set(o.subarray(p, y), s + d + 2); + y -= f; + o.length - y > 3 && (y = (y + 3) & -4); + n.length = y; + return n; + } + if (o.length - y > 3) { + y = (y + 3) & -4; + a.set(o.subarray(0, y), s); + n.length = y; + return n; + } + a.set(o, s); + n.length = o.length; + return n; + } + function readNameTable(e) { + const i = (t.start || 0) + e.offset; + t.pos = i; + const a = [[], []], + s = [], + r = e.length, + n = i + r; + if (0 !== t.getUint16() || r < 6) return [a, s]; + const o = t.getUint16(), + g = t.getUint16(); + let c, h; + for (c = 0; c < o && t.pos + 12 <= n; c++) { + const e = { + platform: t.getUint16(), + encoding: t.getUint16(), + language: t.getUint16(), + name: t.getUint16(), + length: t.getUint16(), + offset: t.getUint16(), + }; + (isMacNameRecord(e) || isWinNameRecord(e)) && s.push(e); + } + for (c = 0, h = s.length; c < h; c++) { + const e = s[c]; + if (e.length <= 0) continue; + const r = i + g + e.offset; + if (r + e.length > n) continue; + t.pos = r; + const o = e.name; + if (e.encoding) { + let i = ""; + for (let a = 0, s = e.length; a < s; a += 2) + i += String.fromCharCode(t.getUint16()); + a[1][o] = i; + } else a[0][o] = t.getString(e.length); + } + return [a, s]; + } + const s = [ + 0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -2, -2, 0, 0, -2, -5, -1, -1, -1, -1, -1, + -1, -1, -1, 0, 0, -1, 0, -1, -1, -1, -1, 1, -1, -999, 0, 1, 0, -1, -2, 0, + -1, -2, -1, -1, 0, -1, -1, 0, 0, -999, -999, -1, -1, -1, -1, -2, -999, -2, + -2, -999, 0, -2, -2, 0, 0, -2, 0, -2, 0, 0, 0, -2, -1, -1, 1, 1, 0, 0, -1, + -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, 0, -999, -1, -1, -1, -1, -1, + -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -999, -999, -999, -999, -999, + -1, -1, -2, -2, 0, 0, 0, 0, -1, -1, -999, -2, -2, 0, 0, -1, -2, -2, 0, 0, + 0, -1, -1, -1, -2, + ]; + function sanitizeTTProgram(e, t) { + let i, + a, + r, + n, + o, + g = e.data, + c = 0, + h = 0, + l = 0; + const C = [], + Q = [], + E = []; + let u = t.tooComplexToFollowFunctions, + d = !1, + f = 0, + p = 0; + for (let e = g.length; c < e; ) { + const e = g[c++]; + if (64 === e) { + a = g[c++]; + if (d || p) c += a; + else for (i = 0; i < a; i++) C.push(g[c++]); + } else if (65 === e) { + a = g[c++]; + if (d || p) c += 2 * a; + else + for (i = 0; i < a; i++) { + r = g[c++]; + C.push((r << 8) | g[c++]); + } + } else if (176 == (248 & e)) { + a = e - 176 + 1; + if (d || p) c += a; + else for (i = 0; i < a; i++) C.push(g[c++]); + } else if (184 == (248 & e)) { + a = e - 184 + 1; + if (d || p) c += 2 * a; + else + for (i = 0; i < a; i++) { + r = g[c++]; + C.push((r << 8) | g[c++]); + } + } else if (43 !== e || u) + if (44 !== e || u) { + if (45 === e) + if (d) { + d = !1; + h = c; + } else { + o = Q.pop(); + if (!o) { + warn("TT: ENDF bad stack"); + t.hintsValid = !1; + return; + } + n = E.pop(); + g = o.data; + c = o.i; + t.functionsStackDeltas[n] = C.length - o.stackTop; + } + else if (137 === e) { + if (d || p) { + warn("TT: nested IDEFs not allowed"); + u = !0; + } + d = !0; + l = c; + } else if (88 === e) ++f; + else if (27 === e) p = f; + else if (89 === e) { + p === f && (p = 0); + --f; + } else if (28 === e && !d && !p) { + const e = C.at(-1); + e > 0 && (c += e - 1); + } + } else { + if (d || p) { + warn("TT: nested FDEFs not allowed"); + u = !0; + } + d = !0; + l = c; + n = C.pop(); + t.functionsDefined[n] = { data: g, i: c }; + } + else if (!d && !p) { + n = C.at(-1); + if (isNaN(n)) info("TT: CALL empty stack (or invalid entry)."); + else { + t.functionsUsed[n] = !0; + if (n in t.functionsStackDeltas) { + const e = C.length + t.functionsStackDeltas[n]; + if (e < 0) { + warn("TT: CALL invalid functions stack delta."); + t.hintsValid = !1; + return; + } + C.length = e; + } else if (n in t.functionsDefined && !E.includes(n)) { + Q.push({ data: g, i: c, stackTop: C.length - 1 }); + E.push(n); + o = t.functionsDefined[n]; + if (!o) { + warn("TT: CALL non-existent function"); + t.hintsValid = !1; + return; + } + g = o.data; + c = o.i; + } + } + } + if (!d && !p) { + let t = 0; + e <= 142 + ? (t = s[e]) + : e >= 192 && e <= 223 + ? (t = -1) + : e >= 224 && (t = -2); + if (e >= 113 && e <= 117) { + a = C.pop(); + isNaN(a) || (t = 2 * -a); + } + for (; t < 0 && C.length > 0; ) { + C.pop(); + t++; + } + for (; t > 0; ) { + C.push(NaN); + t--; + } + } + } + t.tooComplexToFollowFunctions = u; + const m = [g]; + c > g.length && m.push(new Uint8Array(c - g.length)); + if (l > h) { + warn("TT: complementing a missing function tail"); + m.push(new Uint8Array([34, 45])); + } + !(function foldTTTable(e, t) { + if (t.length > 1) { + let i, + a, + s = 0; + for (i = 0, a = t.length; i < a; i++) s += t[i].length; + s = (s + 3) & -4; + const r = new Uint8Array(s); + let n = 0; + for (i = 0, a = t.length; i < a; i++) { + r.set(t[i], n); + n += t[i].length; + } + e.data = r; + e.length = s; + } + })(e, m); + } + let r, n, o, g; + if ( + isTrueTypeCollectionFile((t = new Stream(new Uint8Array(t.getBytes())))) + ) { + const e = (function readTrueTypeCollectionData(e, t) { + const { numFonts: i, offsetTable: a } = + (function readTrueTypeCollectionHeader(e) { + const t = e.getString(4); + assert("ttcf" === t, "Must be a TrueType Collection font."); + const i = e.getUint16(), + a = e.getUint16(), + s = e.getInt32() >>> 0, + r = []; + for (let t = 0; t < s; t++) r.push(e.getInt32() >>> 0); + const n = { + ttcTag: t, + majorVersion: i, + minorVersion: a, + numFonts: s, + offsetTable: r, + }; + switch (i) { + case 1: + return n; + case 2: + n.dsigTag = e.getInt32() >>> 0; + n.dsigLength = e.getInt32() >>> 0; + n.dsigOffset = e.getInt32() >>> 0; + return n; + } + throw new FormatError( + `Invalid TrueType Collection majorVersion: ${i}.`, + ); + })(e), + s = t.split("+"); + let r; + for (let n = 0; n < i; n++) { + e.pos = (e.start || 0) + a[n]; + const i = readOpenTypeHeader(e), + o = readTables(e, i.numTables); + if (!o.name) + throw new FormatError( + 'TrueType Collection font must contain a "name" table.', + ); + const [g] = readNameTable(o.name); + for (let e = 0, a = g.length; e < a; e++) + for (let a = 0, n = g[e].length; a < n; a++) { + const n = g[e][a]?.replaceAll(/\s/g, ""); + if (n) { + if (n === t) return { header: i, tables: o }; + if (!(s.length < 2)) + for (const e of s) + n === e && (r = { name: e, header: i, tables: o }); + } + } + } + if (r) { + warn( + `TrueType Collection does not contain "${t}" font, falling back to "${r.name}" font instead.`, + ); + return { header: r.header, tables: r.tables }; + } + throw new FormatError( + `TrueType Collection does not contain "${t}" font.`, + ); + })(t, this.name); + r = e.header; + n = e.tables; + } else { + r = readOpenTypeHeader(t); + n = readTables(t, r.numTables); + } + const c = !n["CFF "]; + if (c) { + if (!n.loca) throw new FormatError('Required "loca" table is not found'); + if (!n.glyf) { + warn('Required "glyf" table is not found -- trying to recover.'); + n.glyf = { tag: "glyf", data: new Uint8Array(0) }; + } + this.isOpenType = !1; + } else { + const t = + i.composite && + (i.cidToGidMap?.length > 0 || !(i.cMap instanceof IdentityCMap)); + if ( + ("OTTO" === r.version && !t) || + !n.head || + !n.hhea || + !n.maxp || + !n.post + ) { + g = new Stream(n["CFF "].data); + o = new CFFFont(g, i); + adjustWidths(i); + return this.convert(e, o, i); + } + delete n.glyf; + delete n.loca; + delete n.fpgm; + delete n.prep; + delete n["cvt "]; + this.isOpenType = !0; + } + if (!n.maxp) throw new FormatError('Required "maxp" table is not found'); + t.pos = (t.start || 0) + n.maxp.offset; + let h = t.getInt32(); + const l = t.getUint16(); + if (65536 !== h && 20480 !== h) { + if (6 === n.maxp.length) h = 20480; + else { + if (!(n.maxp.length >= 32)) + throw new FormatError('"maxp" table has a wrong version number'); + h = 65536; + } + !(function writeUint32(e, t, i) { + e[t + 3] = 255 & i; + e[t + 2] = i >>> 8; + e[t + 1] = i >>> 16; + e[t] = i >>> 24; + })(n.maxp.data, 0, h); + } + if (i.scaleFactors?.length === l && c) { + const { scaleFactors: e } = i, + t = int16(n.head.data[50], n.head.data[51]), + a = new GlyfTable({ + glyfTable: n.glyf.data, + isGlyphLocationsLong: t, + locaTable: n.loca.data, + numGlyphs: l, + }); + a.scale(e); + const { glyf: s, loca: r, isLocationLong: o } = a.write(); + n.glyf.data = s; + n.loca.data = r; + if (o !== !!t) { + n.head.data[50] = 0; + n.head.data[51] = o ? 1 : 0; + } + const g = n.hmtx.data; + for (let t = 0; t < l; t++) { + const i = 4 * t, + a = Math.round(e[t] * int16(g[i], g[i + 1])); + g[i] = (a >> 8) & 255; + g[i + 1] = 255 & a; + writeSignedInt16( + g, + i + 2, + Math.round(e[t] * signedInt16(g[i + 2], g[i + 3])), + ); + } + } + let C = l + 1, + Q = !0; + if (C > 65535) { + Q = !1; + C = l; + warn("Not enough space in glyfs to duplicate first glyph."); + } + let E = 0, + u = 0; + if (h >= 65536 && n.maxp.length >= 32) { + t.pos += 8; + if (t.getUint16() > 2) { + n.maxp.data[14] = 0; + n.maxp.data[15] = 2; + } + t.pos += 4; + E = t.getUint16(); + t.pos += 4; + u = t.getUint16(); + } + n.maxp.data[4] = C >> 8; + n.maxp.data[5] = 255 & C; + const d = (function sanitizeTTPrograms(e, t, i, a) { + const s = { + functionsDefined: [], + functionsUsed: [], + functionsStackDeltas: [], + tooComplexToFollowFunctions: !1, + hintsValid: !0, + }; + e && sanitizeTTProgram(e, s); + t && sanitizeTTProgram(t, s); + e && + (function checkInvalidFunctions(e, t) { + if (!e.tooComplexToFollowFunctions) + if (e.functionsDefined.length > t) { + warn("TT: more functions defined than expected"); + e.hintsValid = !1; + } else + for (let i = 0, a = e.functionsUsed.length; i < a; i++) { + if (i > t) { + warn("TT: invalid function id: " + i); + e.hintsValid = !1; + return; + } + if (e.functionsUsed[i] && !e.functionsDefined[i]) { + warn("TT: undefined function: " + i); + e.hintsValid = !1; + return; + } + } + })(s, a); + if (i && 1 & i.length) { + const e = new Uint8Array(i.length + 1); + e.set(i.data); + i.data = e; + } + return s.hintsValid; + })(n.fpgm, n.prep, n["cvt "], E); + if (!d) { + delete n.fpgm; + delete n.prep; + delete n["cvt "]; + } + !(function sanitizeMetrics(e, t, i, a, s, r) { + if (!t) { + i && (i.data = null); + return; + } + e.pos = (e.start || 0) + t.offset; + e.pos += 4; + e.pos += 2; + e.pos += 2; + e.pos += 2; + e.pos += 2; + e.pos += 2; + e.pos += 2; + e.pos += 2; + e.pos += 2; + e.pos += 2; + const n = e.getUint16(); + e.pos += 8; + e.pos += 2; + let o = e.getUint16(); + if (0 !== n) { + if (!(2 & int16(a.data[44], a.data[45]))) { + t.data[22] = 0; + t.data[23] = 0; + } + } + if (o > s) { + info( + `The numOfMetrics (${o}) should not be greater than the numGlyphs (${s}).`, + ); + o = s; + t.data[34] = (65280 & o) >> 8; + t.data[35] = 255 & o; + } + const g = s - o - ((i.length - 4 * o) >> 1); + if (g > 0) { + const e = new Uint8Array(i.length + 2 * g); + e.set(i.data); + if (r) { + e[i.length] = i.data[2]; + e[i.length + 1] = i.data[3]; + } + i.data = e; + } + })(t, n.hhea, n.hmtx, n.head, C, Q); + if (!n.head) throw new FormatError('Required "head" table is not found'); + !(function sanitizeHead(e, t, i) { + const a = e.data, + s = (function int32(e, t, i, a) { + return (e << 24) + (t << 16) + (i << 8) + a; + })(a[0], a[1], a[2], a[3]); + if (s >> 16 != 1) { + info("Attempting to fix invalid version in head table: " + s); + a[0] = 0; + a[1] = 1; + a[2] = 0; + a[3] = 0; + } + const r = int16(a[50], a[51]); + if (r < 0 || r > 1) { + info("Attempting to fix invalid indexToLocFormat in head table: " + r); + const e = t + 1; + if (i === e << 1) { + a[50] = 0; + a[51] = 0; + } else { + if (i !== e << 2) + throw new FormatError("Could not fix indexToLocFormat: " + r); + a[50] = 0; + a[51] = 1; + } + } + })(n.head, l, c ? n.loca.length : 0); + let f = Object.create(null); + if (c) { + const e = int16(n.head.data[50], n.head.data[51]), + t = (function sanitizeGlyphLocations(e, t, i, a, s, r, n) { + let o, g, c; + if (a) { + o = 4; + g = function fontItemDecodeLong(e, t) { + return ( + (e[t] << 24) | (e[t + 1] << 16) | (e[t + 2] << 8) | e[t + 3] + ); + }; + c = function fontItemEncodeLong(e, t, i) { + e[t] = (i >>> 24) & 255; + e[t + 1] = (i >> 16) & 255; + e[t + 2] = (i >> 8) & 255; + e[t + 3] = 255 & i; + }; + } else { + o = 2; + g = function fontItemDecode(e, t) { + return (e[t] << 9) | (e[t + 1] << 1); + }; + c = function fontItemEncode(e, t, i) { + e[t] = (i >> 9) & 255; + e[t + 1] = (i >> 1) & 255; + }; + } + const h = r ? i + 1 : i, + l = o * (1 + h), + C = new Uint8Array(l); + C.set(e.data.subarray(0, l)); + e.data = C; + const Q = t.data, + E = Q.length, + u = new Uint8Array(E); + let d, f; + const p = []; + for (d = 0, f = 0; d < i + 1; d++, f += o) { + let e = g(C, f); + e > E && (e = E); + p.push({ index: d, offset: e, endOffset: 0 }); + } + p.sort((e, t) => e.offset - t.offset); + for (d = 0; d < i; d++) p[d].endOffset = p[d + 1].offset; + p.sort((e, t) => e.index - t.index); + for (d = 0; d < i; d++) { + const { offset: e, endOffset: t } = p[d]; + if (0 !== e || 0 !== t) break; + const i = p[d + 1].offset; + if (0 !== i) { + p[d].endOffset = i; + break; + } + } + const m = p.at(-2); + 0 !== m.offset && 0 === m.endOffset && (m.endOffset = E); + const y = Object.create(null); + let w = 0; + c(C, 0, w); + for (d = 0, f = o; d < i; d++, f += o) { + const e = sanitizeGlyph(Q, p[d].offset, p[d].endOffset, u, w, s), + t = e.length; + 0 === t && (y[d] = !0); + e.sizeOfInstructions > n && (n = e.sizeOfInstructions); + w += t; + c(C, f, w); + } + if (0 === w) { + const e = new Uint8Array([ + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, + ]); + for (d = 0, f = o; d < h; d++, f += o) c(C, f, e.length); + t.data = e; + } else if (r) { + const i = g(C, o); + if (u.length > i + w) t.data = u.subarray(0, i + w); + else { + t.data = new Uint8Array(i + w); + t.data.set(u.subarray(0, w)); + } + t.data.set(u.subarray(0, i), w); + c(e.data, C.length - o, w + i); + } else t.data = u.subarray(0, w); + return { missingGlyphs: y, maxSizeOfInstructions: n }; + })(n.loca, n.glyf, l, e, d, Q, u); + f = t.missingGlyphs; + if (h >= 65536 && n.maxp.length >= 32) { + n.maxp.data[26] = t.maxSizeOfInstructions >> 8; + n.maxp.data[27] = 255 & t.maxSizeOfInstructions; + } + } + if (!n.hhea) throw new FormatError('Required "hhea" table is not found'); + if (0 === n.hhea.data[10] && 0 === n.hhea.data[11]) { + n.hhea.data[10] = 255; + n.hhea.data[11] = 255; + } + const p = { + unitsPerEm: int16(n.head.data[18], n.head.data[19]), + yMax: signedInt16(n.head.data[42], n.head.data[43]), + yMin: signedInt16(n.head.data[38], n.head.data[39]), + ascent: signedInt16(n.hhea.data[4], n.hhea.data[5]), + descent: signedInt16(n.hhea.data[6], n.hhea.data[7]), + lineGap: signedInt16(n.hhea.data[8], n.hhea.data[9]), + }; + this.ascent = p.ascent / p.unitsPerEm; + this.descent = p.descent / p.unitsPerEm; + this.lineGap = p.lineGap / p.unitsPerEm; + if (this.cssFontInfo?.lineHeight) { + this.lineHeight = this.cssFontInfo.metrics.lineHeight; + this.lineGap = this.cssFontInfo.metrics.lineGap; + } else this.lineHeight = this.ascent - this.descent + this.lineGap; + n.post && + (function readPostScriptTable(e, i, a) { + const s = (t.start || 0) + e.offset; + t.pos = s; + const r = s + e.length, + n = t.getInt32(); + t.skip(28); + let o, + g, + c = !0; + switch (n) { + case 65536: + o = Oi; + break; + case 131072: + const e = t.getUint16(); + if (e !== a) { + c = !1; + break; + } + const s = []; + for (g = 0; g < e; ++g) { + const e = t.getUint16(); + if (e >= 32768) { + c = !1; + break; + } + s.push(e); + } + if (!c) break; + const h = [], + l = []; + for (; t.pos < r; ) { + const e = t.getByte(); + l.length = e; + for (g = 0; g < e; ++g) l[g] = String.fromCharCode(t.getByte()); + h.push(l.join("")); + } + o = []; + for (g = 0; g < e; ++g) { + const e = s[g]; + e < 258 ? o.push(Oi[e]) : o.push(h[e - 258]); + } + break; + case 196608: + break; + default: + warn("Unknown/unsupported post table version " + n); + c = !1; + i.defaultEncoding && (o = i.defaultEncoding); + } + i.glyphNames = o; + return c; + })(n.post, i, l); + n.post = { tag: "post", data: createPostTable(i) }; + const m = Object.create(null); + function hasGlyph(e) { + return !f[e]; + } + if (i.composite) { + const e = i.cidToGidMap || [], + t = 0 === e.length; + i.cMap.forEach(function (i, a) { + "string" == typeof a && (a = convertCidString(i, a, !0)); + if (a > 65535) throw new FormatError("Max size of CID is 65,535"); + let s = -1; + t ? (s = a) : void 0 !== e[a] && (s = e[a]); + s >= 0 && s < l && hasGlyph(s) && (m[i] = s); + }); + } else { + const e = (function readCmapTable(e, t, i, a) { + if (!e) { + warn("No cmap table available."); + return { + platformId: -1, + encodingId: -1, + mappings: [], + hasShortCmap: !1, + }; + } + let s, + r = (t.start || 0) + e.offset; + t.pos = r; + t.skip(2); + const n = t.getUint16(); + let o, + g = !1; + for (let e = 0; e < n; e++) { + const s = t.getUint16(), + r = t.getUint16(), + c = t.getInt32() >>> 0; + let h = !1; + if (o?.platformId !== s || o?.encodingId !== r) { + if (0 !== s || (0 !== r && 1 !== r && 3 !== r)) + if (1 === s && 0 === r) h = !0; + else if (3 !== s || 1 !== r || (!a && o)) { + if (i && 3 === s && 0 === r) { + h = !0; + let i = !0; + if (e < n - 1) { + const e = t.peekBytes(2); + int16(e[0], e[1]) < s && (i = !1); + } + i && (g = !0); + } + } else { + h = !0; + i || (g = !0); + } + else h = !0; + h && (o = { platformId: s, encodingId: r, offset: c }); + if (g) break; + } + } + o && (t.pos = r + o.offset); + if (!o || -1 === t.peekByte()) { + warn("Could not find a preferred cmap table."); + return { + platformId: -1, + encodingId: -1, + mappings: [], + hasShortCmap: !1, + }; + } + const c = t.getUint16(); + let h = !1; + const l = []; + let C, Q; + if (0 === c) { + t.skip(4); + for (C = 0; C < 256; C++) { + const e = t.getByte(); + e && l.push({ charCode: C, glyphId: e }); + } + h = !0; + } else if (2 === c) { + t.skip(4); + const e = []; + let i = 0; + for (let a = 0; a < 256; a++) { + const a = t.getUint16() >> 3; + e.push(a); + i = Math.max(a, i); + } + const a = []; + for (let e = 0; e <= i; e++) + a.push({ + firstCode: t.getUint16(), + entryCount: t.getUint16(), + idDelta: signedInt16(t.getByte(), t.getByte()), + idRangePos: t.pos + t.getUint16(), + }); + for (let i = 0; i < 256; i++) + if (0 === e[i]) { + t.pos = a[0].idRangePos + 2 * i; + Q = t.getUint16(); + l.push({ charCode: i, glyphId: Q }); + } else { + const s = a[e[i]]; + for (C = 0; C < s.entryCount; C++) { + const e = (i << 8) + C + s.firstCode; + t.pos = s.idRangePos + 2 * C; + Q = t.getUint16(); + 0 !== Q && (Q = (Q + s.idDelta) % 65536); + l.push({ charCode: e, glyphId: Q }); + } + } + } else if (4 === c) { + t.skip(4); + const e = t.getUint16() >> 1; + t.skip(6); + const i = []; + let a; + for (a = 0; a < e; a++) i.push({ end: t.getUint16() }); + t.skip(2); + for (a = 0; a < e; a++) i[a].start = t.getUint16(); + for (a = 0; a < e; a++) i[a].delta = t.getUint16(); + let n, + o = 0; + for (a = 0; a < e; a++) { + s = i[a]; + const r = t.getUint16(); + if (r) { + n = (r >> 1) - (e - a); + s.offsetIndex = n; + o = Math.max(o, n + s.end - s.start + 1); + } else s.offsetIndex = -1; + } + const g = []; + for (C = 0; C < o; C++) g.push(t.getUint16()); + for (a = 0; a < e; a++) { + s = i[a]; + r = s.start; + const e = s.end, + t = s.delta; + n = s.offsetIndex; + for (C = r; C <= e; C++) + if (65535 !== C) { + Q = n < 0 ? C : g[n + C - r]; + Q = (Q + t) & 65535; + l.push({ charCode: C, glyphId: Q }); + } + } + } else if (6 === c) { + t.skip(4); + const e = t.getUint16(), + i = t.getUint16(); + for (C = 0; C < i; C++) { + Q = t.getUint16(); + const i = e + C; + l.push({ charCode: i, glyphId: Q }); + } + } else { + if (12 !== c) { + warn("cmap table has unsupported format: " + c); + return { + platformId: -1, + encodingId: -1, + mappings: [], + hasShortCmap: !1, + }; + } + { + t.skip(10); + const e = t.getInt32() >>> 0; + for (C = 0; C < e; C++) { + const e = t.getInt32() >>> 0, + i = t.getInt32() >>> 0; + let a = t.getInt32() >>> 0; + for (let t = e; t <= i; t++) + l.push({ charCode: t, glyphId: a++ }); + } + } + } + l.sort(function (e, t) { + return e.charCode - t.charCode; + }); + for (let e = 1; e < l.length; e++) + if (l[e - 1].charCode === l[e].charCode) { + l.splice(e, 1); + e--; + } + return { + platformId: o.platformId, + encodingId: o.encodingId, + mappings: l, + hasShortCmap: h, + }; + })(n.cmap, t, this.isSymbolicFont, i.hasEncoding), + a = e.platformId, + s = e.encodingId, + r = e.mappings; + let o = [], + g = !1; + !i.hasEncoding || + ("MacRomanEncoding" !== i.baseEncodingName && + "WinAnsiEncoding" !== i.baseEncodingName) || + (o = getEncoding(i.baseEncodingName)); + if ( + i.hasEncoding && + !this.isSymbolicFont && + ((3 === a && 1 === s) || (1 === a && 0 === s)) + ) { + const e = Ni(); + for (let t = 0; t < 256; t++) { + let n; + n = + void 0 !== this.differences[t] + ? this.differences[t] + : o.length && "" !== o[t] + ? o[t] + : fi[t]; + if (!n) continue; + const g = recoverGlyphName(n, e); + let c; + 3 === a && 1 === s + ? (c = e[g]) + : 1 === a && 0 === s && (c = di.indexOf(g)); + if (void 0 === c) { + if ( + !i.glyphNames && + i.hasIncludedToUnicodeMap && + !(this.toUnicode instanceof IdentityToUnicodeMap) + ) { + const e = this.toUnicode.get(t); + e && (c = e.codePointAt(0)); + } + if (void 0 === c) continue; + } + for (const e of r) + if (e.charCode === c) { + m[t] = e.glyphId; + break; + } + } + } else if (0 === a) { + for (const e of r) m[e.charCode] = e.glyphId; + g = !0; + } else if (3 === a && 0 === s) + for (const e of r) { + let t = e.charCode; + t >= 61440 && t <= 61695 && (t &= 255); + m[t] = e.glyphId; + } + else for (const e of r) m[e.charCode] = e.glyphId; + if (i.glyphNames && (o.length || this.differences.length)) + for (let e = 0; e < 256; ++e) { + if (!g && void 0 !== m[e]) continue; + const t = this.differences[e] || o[e]; + if (!t) continue; + const a = i.glyphNames.indexOf(t); + a > 0 && hasGlyph(a) && (m[e] = a); + } + } + 0 === m.length && (m[0] = 0); + let y = C - 1; + Q || (y = 0); + if (!i.cssFontInfo) { + const e = adjustMapping(m, hasGlyph, y, this.toUnicode); + this.toFontChar = e.toFontChar; + n.cmap = { + tag: "cmap", + data: createCmapTable(e.charCodeToGlyphId, e.toUnicodeExtraMap, C), + }; + (n["OS/2"] && + (function validateOS2Table(e, t) { + t.pos = (t.start || 0) + e.offset; + const i = t.getUint16(); + t.skip(60); + const a = t.getUint16(); + if (i < 4 && 768 & a) return !1; + if (t.getUint16() > t.getUint16()) return !1; + t.skip(6); + if (0 === t.getUint16()) return !1; + e.data[8] = e.data[9] = 0; + return !0; + })(n["OS/2"], t)) || + (n["OS/2"] = { + tag: "OS/2", + data: createOS2Table(i, e.charCodeToGlyphId, p), + }); + } + if (!c) + try { + g = new Stream(n["CFF "].data); + o = new CFFParser(g, i, Yi).parse(); + o.duplicateFirstGlyph(); + const e = new CFFCompiler(o); + n["CFF "].data = e.compile(); + } catch { + warn("Failed to compile font " + i.loadedName); + } + if (n.name) { + const [t, a] = readNameTable(n.name); + n.name.data = createNameTable(e, t); + this.psName = t[0][6] || null; + i.composite || + (function adjustTrueTypeToUnicode(e, t, i) { + if (e.isInternalFont) return; + if (e.hasIncludedToUnicodeMap) return; + if (e.hasEncoding) return; + if (e.toUnicode instanceof IdentityToUnicodeMap) return; + if (!t) return; + if (0 === i.length) return; + if (e.defaultEncoding === pi) return; + for (const e of i) if (!isWinNameRecord(e)) return; + const a = pi, + s = [], + r = Ni(); + for (const e in a) { + const t = a[e]; + if ("" === t) continue; + const i = r[t]; + void 0 !== i && (s[e] = String.fromCharCode(i)); + } + s.length > 0 && e.toUnicode.amend(s); + })(i, this.isSymbolicFont, a); + } else n.name = { tag: "name", data: createNameTable(this.name) }; + const w = new OpenTypeFileBuilder(r.version); + for (const e in n) w.addTable(e, n[e].data); + return w.toArray(); + } + convert(e, t, i) { + i.fixedPitch = !1; + i.builtInEncoding && + (function adjustType1ToUnicode(e, t) { + if (e.isInternalFont) return; + if (e.hasIncludedToUnicodeMap) return; + if (t === e.defaultEncoding) return; + if (e.toUnicode instanceof IdentityToUnicodeMap) return; + const i = [], + a = Ni(); + for (const s in t) { + if ( + e.hasEncoding && + (e.baseEncodingName || void 0 !== e.differences[s]) + ) + continue; + const r = getUnicodeForGlyph(t[s], a); + -1 !== r && (i[s] = String.fromCharCode(r)); + } + i.length > 0 && e.toUnicode.amend(i); + })(i, i.builtInEncoding); + let s = 1; + t instanceof CFFFont && (s = t.numGlyphs - 1); + const r = t.getGlyphMapping(i); + let n = null, + o = r, + g = null; + if (!i.cssFontInfo) { + n = adjustMapping(r, t.hasGlyphId.bind(t), s, this.toUnicode); + this.toFontChar = n.toFontChar; + o = n.charCodeToGlyphId; + g = n.toUnicodeExtraMap; + } + const c = t.numGlyphs; + function getCharCodes(e, t) { + let i = null; + for (const a in e) t === e[a] && (i ||= []).push(0 | a); + return i; + } + function createCharCode(e, t) { + for (const i in e) if (t === e[i]) return 0 | i; + n.charCodeToGlyphId[n.nextAvailableFontCharCode] = t; + return n.nextAvailableFontCharCode++; + } + const h = t.seacs; + if (n && h?.length) { + const e = i.fontMatrix || a, + s = t.getCharset(), + o = Object.create(null); + for (let t in h) { + t |= 0; + const i = h[t], + a = fi[i[2]], + g = fi[i[3]], + c = s.indexOf(a), + l = s.indexOf(g); + if (c < 0 || l < 0) continue; + const C = { + x: i[0] * e[0] + i[1] * e[2] + e[4], + y: i[0] * e[1] + i[1] * e[3] + e[5], + }, + Q = getCharCodes(r, t); + if (Q) + for (const e of Q) { + const t = n.charCodeToGlyphId, + i = createCharCode(t, c), + a = createCharCode(t, l); + o[e] = { + baseFontCharCode: i, + accentFontCharCode: a, + accentOffset: C, + }; + } + } + i.seacMap = o; + } + const l = 1 / (i.fontMatrix || a)[0], + C = new OpenTypeFileBuilder("OTTO"); + C.addTable("CFF ", t.data); + C.addTable("OS/2", createOS2Table(i, o)); + C.addTable("cmap", createCmapTable(o, g, c)); + C.addTable( + "head", + "\0\0\0\0\0\0\0\0\0\0_<õ\0\0" + + safeString16(l) + + "\0\0\0\0ž\v~'\0\0\0\0ž\v~'\0\0" + + safeString16(i.descent) + + "ÿ" + + safeString16(i.ascent) + + string16(i.italicAngle ? 2 : 0) + + "\0\0\0\0\0\0\0", + ); + C.addTable( + "hhea", + "\0\0\0" + + safeString16(i.ascent) + + safeString16(i.descent) + + "\0\0ÿÿ\0\0\0\0\0\0" + + safeString16(i.capHeight) + + safeString16(Math.tan(i.italicAngle) * i.xHeight) + + "\0\0\0\0\0\0\0\0\0\0\0\0" + + string16(c), + ); + C.addTable( + "hmtx", + (function fontFieldsHmtx() { + const e = t.charstrings, + i = t.cff ? t.cff.widths : null; + let a = "\0\0\0\0"; + for (let t = 1, s = c; t < s; t++) { + let s = 0; + if (e) { + const i = e[t - 1]; + s = "width" in i ? i.width : 0; + } else i && (s = Math.ceil(i[t] || 0)); + a += string16(s) + string16(0); + } + return a; + })(), + ); + C.addTable("maxp", "\0\0P\0" + string16(c)); + C.addTable("name", createNameTable(e)); + C.addTable("post", createPostTable(i)); + return C.toArray(); + } + _charToGlyph(e, t = !1) { + let i, + a, + s, + r = this._glyphCache[e]; + if (r?.isSpace === t) return r; + let n = e; + if (this.cMap?.contains(e)) { + n = this.cMap.lookup(e); + "string" == typeof n && (n = convertCidString(e, n)); + } + a = this.widths[n]; + "number" != typeof a && (a = this.defaultWidth); + const o = this.vmetrics?.[n]; + let g = this.toUnicode.get(e) || e; + "number" == typeof g && (g = String.fromCharCode(g)); + let c = void 0 !== this.toFontChar[e]; + i = this.toFontChar[e] || e; + if (this.missingFile) { + const t = this.differences[e] || this.defaultEncoding[e]; + (".notdef" !== t && "" !== t) || "Type1" !== this.type || (i = 32); + i = (function mapSpecialUnicodeValues(e) { + return e >= 65520 && e <= 65535 + ? 0 + : e >= 62976 && e <= 63743 + ? xi()[e] || e + : 173 === e + ? 45 + : e; + })(i); + } + this.isType3Font && (s = i); + let h = null; + if (this.seacMap?.[e]) { + c = !0; + const t = this.seacMap[e]; + i = t.baseFontCharCode; + h = { + fontChar: String.fromCodePoint(t.accentFontCharCode), + offset: t.accentOffset, + }; + } + let l = ""; + "number" == typeof i && + (i <= 1114111 + ? (l = String.fromCodePoint(i)) + : warn(`charToGlyph - invalid fontCharCode: ${i}`)); + r = new fonts_Glyph(e, l, g, h, a, o, s, t, c); + return (this._glyphCache[e] = r); + } + charsToGlyphs(e) { + let t = this._charsCache[e]; + if (t) return t; + t = []; + if (this.cMap) { + const i = Object.create(null), + a = e.length; + let s = 0; + for (; s < a; ) { + this.cMap.readCharCode(e, s, i); + const { charcode: a, length: r } = i; + s += r; + const n = this._charToGlyph(a, 1 === r && 32 === e.charCodeAt(s - 1)); + t.push(n); + } + } else + for (let i = 0, a = e.length; i < a; ++i) { + const a = e.charCodeAt(i), + s = this._charToGlyph(a, 32 === a); + t.push(s); + } + return (this._charsCache[e] = t); + } + getCharPositions(e) { + const t = []; + if (this.cMap) { + const i = Object.create(null); + let a = 0; + for (; a < e.length; ) { + this.cMap.readCharCode(e, a, i); + const s = i.length; + t.push([a, a + s]); + a += s; + } + } else for (let i = 0, a = e.length; i < a; ++i) t.push([i, i + 1]); + return t; + } + get glyphCacheValues() { + return Object.values(this._glyphCache); + } + encodeString(e) { + const t = [], + i = [], + hasCurrentBufErrors = () => t.length % 2 == 1, + a = + this.toUnicode instanceof IdentityToUnicodeMap + ? (e) => this.toUnicode.charCodeOf(e) + : (e) => this.toUnicode.charCodeOf(String.fromCodePoint(e)); + for (let s = 0, r = e.length; s < r; s++) { + const r = e.codePointAt(s); + r > 55295 && (r < 57344 || r > 65533) && s++; + if (this.toUnicode) { + const e = a(r); + if (-1 !== e) { + if (hasCurrentBufErrors()) { + t.push(i.join("")); + i.length = 0; + } + for ( + let t = (this.cMap ? this.cMap.getCharCodeLength(e) : 1) - 1; + t >= 0; + t-- + ) + i.push(String.fromCharCode((e >> (8 * t)) & 255)); + continue; + } + } + if (!hasCurrentBufErrors()) { + t.push(i.join("")); + i.length = 0; + } + i.push(String.fromCodePoint(r)); + } + t.push(i.join("")); + return t; + } +} +class ErrorFont { + constructor(e) { + this.error = e; + this.loadedName = "g_font_error"; + this.missingFile = !0; + } + charsToGlyphs() { + return []; + } + encodeString(e) { + return [e]; + } + exportData(e = !1) { + return { error: this.error }; + } +} +const Ea = 2, + ua = 3, + da = 4, + fa = 5, + pa = 6, + ma = 7; +class Pattern { + constructor() { + unreachable("Cannot initialize Pattern."); + } + static parseShading(e, t, i, a, s) { + const r = e instanceof BaseStream ? e.dict : e, + n = r.get("ShadingType"); + try { + switch (n) { + case Ea: + case ua: + return new RadialAxialShading(r, t, i, a, s); + case da: + case fa: + case pa: + case ma: + return new MeshShading(e, t, i, a, s); + default: + throw new FormatError("Unsupported ShadingType: " + n); + } + } catch (e) { + if (e instanceof MissingDataException) throw e; + warn(e); + return new DummyShading(); + } + } +} +class BaseShading { + static SMALL_NUMBER = 1e-6; + constructor() { + this.constructor === BaseShading && + unreachable("Cannot initialize BaseShading."); + } + getIR() { + unreachable("Abstract method `getIR` called."); + } +} +class RadialAxialShading extends BaseShading { + constructor(e, t, i, a, s) { + super(); + this.shadingType = e.get("ShadingType"); + let r = 0; + this.shadingType === Ea ? (r = 4) : this.shadingType === ua && (r = 6); + this.coordsArr = e.getArray("Coords"); + if (!isNumberArray(this.coordsArr, r)) + throw new FormatError("RadialAxialShading: Invalid /Coords array."); + const n = ColorSpace.parse({ + cs: e.getRaw("CS") || e.getRaw("ColorSpace"), + xref: t, + resources: i, + pdfFunctionFactory: a, + localColorSpaceCache: s, + }); + this.bbox = lookupNormalRect(e.getArray("BBox"), null); + let o = 0, + g = 1; + const c = e.getArray("Domain"); + isNumberArray(c, 2) && ([o, g] = c); + let h = !1, + l = !1; + const C = e.getArray("Extend"); + (function isBooleanArray(e, t) { + return ( + Array.isArray(e) && + (null === t || e.length === t) && + e.every((e) => "boolean" == typeof e) + ); + })(C, 2) && ([h, l] = C); + if (!(this.shadingType !== ua || (h && l))) { + const [e, t, i, a, s, r] = this.coordsArr, + n = Math.hypot(e - a, t - s); + i <= r + n && r <= i + n && warn("Unsupported radial gradient."); + } + this.extendStart = h; + this.extendEnd = l; + const Q = e.getRaw("Function"), + E = a.createFromArray(Q), + u = (g - o) / 840, + d = (this.colorStops = []); + if (o >= g || u <= 0) { + info("Bad shading domain."); + return; + } + const f = new Float32Array(n.numComps), + p = new Float32Array(1); + let m, + y = 0; + p[0] = o; + E(p, 0, f, 0); + let w = n.getRgb(f, 0); + const b = Util.makeHexColor(w[0], w[1], w[2]); + d.push([0, b]); + let D = 1; + p[0] = o + u; + E(p, 0, f, 0); + let F = n.getRgb(f, 0), + S = F[0] - w[0] + 1, + k = F[1] - w[1] + 1, + R = F[2] - w[2] + 1, + N = F[0] - w[0] - 1, + G = F[1] - w[1] - 1, + x = F[2] - w[2] - 1; + for (let e = 2; e < 840; e++) { + p[0] = o + e * u; + E(p, 0, f, 0); + m = n.getRgb(f, 0); + const t = e - y; + S = Math.min(S, (m[0] - w[0] + 1) / t); + k = Math.min(k, (m[1] - w[1] + 1) / t); + R = Math.min(R, (m[2] - w[2] + 1) / t); + N = Math.max(N, (m[0] - w[0] - 1) / t); + G = Math.max(G, (m[1] - w[1] - 1) / t); + x = Math.max(x, (m[2] - w[2] - 1) / t); + if (!(N <= S && G <= k && x <= R)) { + const e = Util.makeHexColor(F[0], F[1], F[2]); + d.push([D / 840, e]); + S = m[0] - F[0] + 1; + k = m[1] - F[1] + 1; + R = m[2] - F[2] + 1; + N = m[0] - F[0] - 1; + G = m[1] - F[1] - 1; + x = m[2] - F[2] - 1; + y = D; + w = F; + } + D = e; + F = m; + } + const M = Util.makeHexColor(F[0], F[1], F[2]); + d.push([1, M]); + let U = "transparent"; + if (e.has("Background")) { + m = n.getRgb(e.get("Background"), 0); + U = Util.makeHexColor(m[0], m[1], m[2]); + } + if (!h) { + d.unshift([0, U]); + d[1][0] += BaseShading.SMALL_NUMBER; + } + if (!l) { + d.at(-1)[0] -= BaseShading.SMALL_NUMBER; + d.push([1, U]); + } + this.colorStops = d; + } + getIR() { + const { coordsArr: e, shadingType: t } = this; + let i, a, s, r, n; + if (t === Ea) { + a = [e[0], e[1]]; + s = [e[2], e[3]]; + r = null; + n = null; + i = "axial"; + } else if (t === ua) { + a = [e[0], e[1]]; + s = [e[3], e[4]]; + r = e[2]; + n = e[5]; + i = "radial"; + } else unreachable(`getPattern type unknown: ${t}`); + return ["RadialAxial", i, this.bbox, this.colorStops, a, s, r, n]; + } +} +class MeshStreamReader { + constructor(e, t) { + this.stream = e; + this.context = t; + this.buffer = 0; + this.bufferLength = 0; + const i = t.numComps; + this.tmpCompsBuf = new Float32Array(i); + const a = t.colorSpace.numComps; + this.tmpCsCompsBuf = t.colorFn ? new Float32Array(a) : this.tmpCompsBuf; + } + get hasData() { + if (this.stream.end) return this.stream.pos < this.stream.end; + if (this.bufferLength > 0) return !0; + const e = this.stream.getByte(); + if (e < 0) return !1; + this.buffer = e; + this.bufferLength = 8; + return !0; + } + readBits(e) { + let t = this.buffer, + i = this.bufferLength; + if (32 === e) { + if (0 === i) + return ( + ((this.stream.getByte() << 24) | + (this.stream.getByte() << 16) | + (this.stream.getByte() << 8) | + this.stream.getByte()) >>> + 0 + ); + t = + (t << 24) | + (this.stream.getByte() << 16) | + (this.stream.getByte() << 8) | + this.stream.getByte(); + const e = this.stream.getByte(); + this.buffer = e & ((1 << i) - 1); + return ((t << (8 - i)) | ((255 & e) >> i)) >>> 0; + } + if (8 === e && 0 === i) return this.stream.getByte(); + for (; i < e; ) { + t = (t << 8) | this.stream.getByte(); + i += 8; + } + i -= e; + this.bufferLength = i; + this.buffer = t & ((1 << i) - 1); + return t >> i; + } + align() { + this.buffer = 0; + this.bufferLength = 0; + } + readFlag() { + return this.readBits(this.context.bitsPerFlag); + } + readCoordinate() { + const e = this.context.bitsPerCoordinate, + t = this.readBits(e), + i = this.readBits(e), + a = this.context.decode, + s = e < 32 ? 1 / ((1 << e) - 1) : 2.3283064365386963e-10; + return [t * s * (a[1] - a[0]) + a[0], i * s * (a[3] - a[2]) + a[2]]; + } + readComponents() { + const e = this.context.numComps, + t = this.context.bitsPerComponent, + i = t < 32 ? 1 / ((1 << t) - 1) : 2.3283064365386963e-10, + a = this.context.decode, + s = this.tmpCompsBuf; + for (let r = 0, n = 4; r < e; r++, n += 2) { + const e = this.readBits(t); + s[r] = e * i * (a[n + 1] - a[n]) + a[n]; + } + const r = this.tmpCsCompsBuf; + this.context.colorFn && this.context.colorFn(s, 0, r, 0); + return this.context.colorSpace.getRgb(r, 0); + } +} +let ya = Object.create(null); +function getB(e) { + return (ya[e] ||= (function buildB(e) { + const t = []; + for (let i = 0; i <= e; i++) { + const a = i / e, + s = 1 - a; + t.push( + new Float32Array([s ** 3, 3 * a * s ** 2, 3 * a ** 2 * s, a ** 3]), + ); + } + return t; + })(e)); +} +class MeshShading extends BaseShading { + static MIN_SPLIT_PATCH_CHUNKS_AMOUNT = 3; + static MAX_SPLIT_PATCH_CHUNKS_AMOUNT = 20; + static TRIANGLE_DENSITY = 20; + constructor(e, t, i, a, s) { + super(); + if (!(e instanceof BaseStream)) + throw new FormatError("Mesh data is not a stream"); + const r = e.dict; + this.shadingType = r.get("ShadingType"); + this.bbox = lookupNormalRect(r.getArray("BBox"), null); + const n = ColorSpace.parse({ + cs: r.getRaw("CS") || r.getRaw("ColorSpace"), + xref: t, + resources: i, + pdfFunctionFactory: a, + localColorSpaceCache: s, + }); + this.background = r.has("Background") + ? n.getRgb(r.get("Background"), 0) + : null; + const o = r.getRaw("Function"), + g = o ? a.createFromArray(o) : null; + this.coords = []; + this.colors = []; + this.figures = []; + const c = { + bitsPerCoordinate: r.get("BitsPerCoordinate"), + bitsPerComponent: r.get("BitsPerComponent"), + bitsPerFlag: r.get("BitsPerFlag"), + decode: r.getArray("Decode"), + colorFn: g, + colorSpace: n, + numComps: g ? 1 : n.numComps, + }, + h = new MeshStreamReader(e, c); + let l = !1; + switch (this.shadingType) { + case da: + this._decodeType4Shading(h); + break; + case fa: + const e = 0 | r.get("VerticesPerRow"); + if (e < 2) throw new FormatError("Invalid VerticesPerRow"); + this._decodeType5Shading(h, e); + break; + case pa: + this._decodeType6Shading(h); + l = !0; + break; + case ma: + this._decodeType7Shading(h); + l = !0; + break; + default: + unreachable("Unsupported mesh type."); + } + if (l) { + this._updateBounds(); + for (let e = 0, t = this.figures.length; e < t; e++) + this._buildFigureFromPatch(e); + } + this._updateBounds(); + this._packData(); + } + _decodeType4Shading(e) { + const t = this.coords, + i = this.colors, + a = [], + s = []; + let r = 0; + for (; e.hasData; ) { + const n = e.readFlag(), + o = e.readCoordinate(), + g = e.readComponents(); + if (0 === r) { + if (!(0 <= n && n <= 2)) throw new FormatError("Unknown type4 flag"); + switch (n) { + case 0: + r = 3; + break; + case 1: + s.push(s.at(-2), s.at(-1)); + r = 1; + break; + case 2: + s.push(s.at(-3), s.at(-1)); + r = 1; + } + a.push(n); + } + s.push(t.length); + t.push(o); + i.push(g); + r--; + e.align(); + } + this.figures.push({ + type: "triangles", + coords: new Int32Array(s), + colors: new Int32Array(s), + }); + } + _decodeType5Shading(e, t) { + const i = this.coords, + a = this.colors, + s = []; + for (; e.hasData; ) { + const t = e.readCoordinate(), + r = e.readComponents(); + s.push(i.length); + i.push(t); + a.push(r); + } + this.figures.push({ + type: "lattice", + coords: new Int32Array(s), + colors: new Int32Array(s), + verticesPerRow: t, + }); + } + _decodeType6Shading(e) { + const t = this.coords, + i = this.colors, + a = new Int32Array(16), + s = new Int32Array(4); + for (; e.hasData; ) { + const r = e.readFlag(); + if (!(0 <= r && r <= 3)) throw new FormatError("Unknown type6 flag"); + const n = t.length; + for (let i = 0, a = 0 !== r ? 8 : 12; i < a; i++) + t.push(e.readCoordinate()); + const o = i.length; + for (let t = 0, a = 0 !== r ? 2 : 4; t < a; t++) + i.push(e.readComponents()); + let g, c, h, l; + switch (r) { + case 0: + a[12] = n + 3; + a[13] = n + 4; + a[14] = n + 5; + a[15] = n + 6; + a[8] = n + 2; + a[11] = n + 7; + a[4] = n + 1; + a[7] = n + 8; + a[0] = n; + a[1] = n + 11; + a[2] = n + 10; + a[3] = n + 9; + s[2] = o + 1; + s[3] = o + 2; + s[0] = o; + s[1] = o + 3; + break; + case 1: + g = a[12]; + c = a[13]; + h = a[14]; + l = a[15]; + a[12] = l; + a[13] = n + 0; + a[14] = n + 1; + a[15] = n + 2; + a[8] = h; + a[11] = n + 3; + a[4] = c; + a[7] = n + 4; + a[0] = g; + a[1] = n + 7; + a[2] = n + 6; + a[3] = n + 5; + g = s[2]; + c = s[3]; + s[2] = c; + s[3] = o; + s[0] = g; + s[1] = o + 1; + break; + case 2: + g = a[15]; + c = a[11]; + a[12] = a[3]; + a[13] = n + 0; + a[14] = n + 1; + a[15] = n + 2; + a[8] = a[7]; + a[11] = n + 3; + a[4] = c; + a[7] = n + 4; + a[0] = g; + a[1] = n + 7; + a[2] = n + 6; + a[3] = n + 5; + g = s[3]; + s[2] = s[1]; + s[3] = o; + s[0] = g; + s[1] = o + 1; + break; + case 3: + a[12] = a[0]; + a[13] = n + 0; + a[14] = n + 1; + a[15] = n + 2; + a[8] = a[1]; + a[11] = n + 3; + a[4] = a[2]; + a[7] = n + 4; + a[0] = a[3]; + a[1] = n + 7; + a[2] = n + 6; + a[3] = n + 5; + s[2] = s[0]; + s[3] = o; + s[0] = s[1]; + s[1] = o + 1; + } + a[5] = t.length; + t.push([ + (-4 * t[a[0]][0] - + t[a[15]][0] + + 6 * (t[a[4]][0] + t[a[1]][0]) - + 2 * (t[a[12]][0] + t[a[3]][0]) + + 3 * (t[a[13]][0] + t[a[7]][0])) / + 9, + (-4 * t[a[0]][1] - + t[a[15]][1] + + 6 * (t[a[4]][1] + t[a[1]][1]) - + 2 * (t[a[12]][1] + t[a[3]][1]) + + 3 * (t[a[13]][1] + t[a[7]][1])) / + 9, + ]); + a[6] = t.length; + t.push([ + (-4 * t[a[3]][0] - + t[a[12]][0] + + 6 * (t[a[2]][0] + t[a[7]][0]) - + 2 * (t[a[0]][0] + t[a[15]][0]) + + 3 * (t[a[4]][0] + t[a[14]][0])) / + 9, + (-4 * t[a[3]][1] - + t[a[12]][1] + + 6 * (t[a[2]][1] + t[a[7]][1]) - + 2 * (t[a[0]][1] + t[a[15]][1]) + + 3 * (t[a[4]][1] + t[a[14]][1])) / + 9, + ]); + a[9] = t.length; + t.push([ + (-4 * t[a[12]][0] - + t[a[3]][0] + + 6 * (t[a[8]][0] + t[a[13]][0]) - + 2 * (t[a[0]][0] + t[a[15]][0]) + + 3 * (t[a[11]][0] + t[a[1]][0])) / + 9, + (-4 * t[a[12]][1] - + t[a[3]][1] + + 6 * (t[a[8]][1] + t[a[13]][1]) - + 2 * (t[a[0]][1] + t[a[15]][1]) + + 3 * (t[a[11]][1] + t[a[1]][1])) / + 9, + ]); + a[10] = t.length; + t.push([ + (-4 * t[a[15]][0] - + t[a[0]][0] + + 6 * (t[a[11]][0] + t[a[14]][0]) - + 2 * (t[a[12]][0] + t[a[3]][0]) + + 3 * (t[a[2]][0] + t[a[8]][0])) / + 9, + (-4 * t[a[15]][1] - + t[a[0]][1] + + 6 * (t[a[11]][1] + t[a[14]][1]) - + 2 * (t[a[12]][1] + t[a[3]][1]) + + 3 * (t[a[2]][1] + t[a[8]][1])) / + 9, + ]); + this.figures.push({ + type: "patch", + coords: new Int32Array(a), + colors: new Int32Array(s), + }); + } + } + _decodeType7Shading(e) { + const t = this.coords, + i = this.colors, + a = new Int32Array(16), + s = new Int32Array(4); + for (; e.hasData; ) { + const r = e.readFlag(); + if (!(0 <= r && r <= 3)) throw new FormatError("Unknown type7 flag"); + const n = t.length; + for (let i = 0, a = 0 !== r ? 12 : 16; i < a; i++) + t.push(e.readCoordinate()); + const o = i.length; + for (let t = 0, a = 0 !== r ? 2 : 4; t < a; t++) + i.push(e.readComponents()); + let g, c, h, l; + switch (r) { + case 0: + a[12] = n + 3; + a[13] = n + 4; + a[14] = n + 5; + a[15] = n + 6; + a[8] = n + 2; + a[9] = n + 13; + a[10] = n + 14; + a[11] = n + 7; + a[4] = n + 1; + a[5] = n + 12; + a[6] = n + 15; + a[7] = n + 8; + a[0] = n; + a[1] = n + 11; + a[2] = n + 10; + a[3] = n + 9; + s[2] = o + 1; + s[3] = o + 2; + s[0] = o; + s[1] = o + 3; + break; + case 1: + g = a[12]; + c = a[13]; + h = a[14]; + l = a[15]; + a[12] = l; + a[13] = n + 0; + a[14] = n + 1; + a[15] = n + 2; + a[8] = h; + a[9] = n + 9; + a[10] = n + 10; + a[11] = n + 3; + a[4] = c; + a[5] = n + 8; + a[6] = n + 11; + a[7] = n + 4; + a[0] = g; + a[1] = n + 7; + a[2] = n + 6; + a[3] = n + 5; + g = s[2]; + c = s[3]; + s[2] = c; + s[3] = o; + s[0] = g; + s[1] = o + 1; + break; + case 2: + g = a[15]; + c = a[11]; + a[12] = a[3]; + a[13] = n + 0; + a[14] = n + 1; + a[15] = n + 2; + a[8] = a[7]; + a[9] = n + 9; + a[10] = n + 10; + a[11] = n + 3; + a[4] = c; + a[5] = n + 8; + a[6] = n + 11; + a[7] = n + 4; + a[0] = g; + a[1] = n + 7; + a[2] = n + 6; + a[3] = n + 5; + g = s[3]; + s[2] = s[1]; + s[3] = o; + s[0] = g; + s[1] = o + 1; + break; + case 3: + a[12] = a[0]; + a[13] = n + 0; + a[14] = n + 1; + a[15] = n + 2; + a[8] = a[1]; + a[9] = n + 9; + a[10] = n + 10; + a[11] = n + 3; + a[4] = a[2]; + a[5] = n + 8; + a[6] = n + 11; + a[7] = n + 4; + a[0] = a[3]; + a[1] = n + 7; + a[2] = n + 6; + a[3] = n + 5; + s[2] = s[0]; + s[3] = o; + s[0] = s[1]; + s[1] = o + 1; + } + this.figures.push({ + type: "patch", + coords: new Int32Array(a), + colors: new Int32Array(s), + }); + } + } + _buildFigureFromPatch(e) { + const t = this.figures[e]; + assert("patch" === t.type, "Unexpected patch mesh figure"); + const i = this.coords, + a = this.colors, + s = t.coords, + r = t.colors, + n = Math.min(i[s[0]][0], i[s[3]][0], i[s[12]][0], i[s[15]][0]), + o = Math.min(i[s[0]][1], i[s[3]][1], i[s[12]][1], i[s[15]][1]), + g = Math.max(i[s[0]][0], i[s[3]][0], i[s[12]][0], i[s[15]][0]), + c = Math.max(i[s[0]][1], i[s[3]][1], i[s[12]][1], i[s[15]][1]); + let h = Math.ceil( + ((g - n) * MeshShading.TRIANGLE_DENSITY) / + (this.bounds[2] - this.bounds[0]), + ); + h = Math.max( + MeshShading.MIN_SPLIT_PATCH_CHUNKS_AMOUNT, + Math.min(MeshShading.MAX_SPLIT_PATCH_CHUNKS_AMOUNT, h), + ); + let l = Math.ceil( + ((c - o) * MeshShading.TRIANGLE_DENSITY) / + (this.bounds[3] - this.bounds[1]), + ); + l = Math.max( + MeshShading.MIN_SPLIT_PATCH_CHUNKS_AMOUNT, + Math.min(MeshShading.MAX_SPLIT_PATCH_CHUNKS_AMOUNT, l), + ); + const C = h + 1, + Q = new Int32Array((l + 1) * C), + E = new Int32Array((l + 1) * C); + let u = 0; + const d = new Uint8Array(3), + f = new Uint8Array(3), + p = a[r[0]], + m = a[r[1]], + y = a[r[2]], + w = a[r[3]], + b = getB(l), + D = getB(h); + for (let e = 0; e <= l; e++) { + d[0] = ((p[0] * (l - e) + y[0] * e) / l) | 0; + d[1] = ((p[1] * (l - e) + y[1] * e) / l) | 0; + d[2] = ((p[2] * (l - e) + y[2] * e) / l) | 0; + f[0] = ((m[0] * (l - e) + w[0] * e) / l) | 0; + f[1] = ((m[1] * (l - e) + w[1] * e) / l) | 0; + f[2] = ((m[2] * (l - e) + w[2] * e) / l) | 0; + for (let t = 0; t <= h; t++, u++) { + if (!((0 !== e && e !== l) || (0 !== t && t !== h))) continue; + let r = 0, + n = 0, + o = 0; + for (let a = 0; a <= 3; a++) + for (let g = 0; g <= 3; g++, o++) { + const c = b[e][a] * D[t][g]; + r += i[s[o]][0] * c; + n += i[s[o]][1] * c; + } + Q[u] = i.length; + i.push([r, n]); + E[u] = a.length; + const g = new Uint8Array(3); + g[0] = ((d[0] * (h - t) + f[0] * t) / h) | 0; + g[1] = ((d[1] * (h - t) + f[1] * t) / h) | 0; + g[2] = ((d[2] * (h - t) + f[2] * t) / h) | 0; + a.push(g); + } + } + Q[0] = s[0]; + E[0] = r[0]; + Q[h] = s[3]; + E[h] = r[1]; + Q[C * l] = s[12]; + E[C * l] = r[2]; + Q[C * l + h] = s[15]; + E[C * l + h] = r[3]; + this.figures[e] = { + type: "lattice", + coords: Q, + colors: E, + verticesPerRow: C, + }; + } + _updateBounds() { + let e = this.coords[0][0], + t = this.coords[0][1], + i = e, + a = t; + for (let s = 1, r = this.coords.length; s < r; s++) { + const r = this.coords[s][0], + n = this.coords[s][1]; + e = e > r ? r : e; + t = t > n ? n : t; + i = i < r ? r : i; + a = a < n ? n : a; + } + this.bounds = [e, t, i, a]; + } + _packData() { + let e, t, i, a; + const s = this.coords, + r = new Float32Array(2 * s.length); + for (e = 0, i = 0, t = s.length; e < t; e++) { + const t = s[e]; + r[i++] = t[0]; + r[i++] = t[1]; + } + this.coords = r; + const n = this.colors, + o = new Uint8Array(3 * n.length); + for (e = 0, i = 0, t = n.length; e < t; e++) { + const t = n[e]; + o[i++] = t[0]; + o[i++] = t[1]; + o[i++] = t[2]; + } + this.colors = o; + const g = this.figures; + for (e = 0, t = g.length; e < t; e++) { + const t = g[e], + s = t.coords, + r = t.colors; + for (i = 0, a = s.length; i < a; i++) { + s[i] *= 2; + r[i] *= 3; + } + } + } + getIR() { + const { bounds: e } = this; + if (e[2] - e[0] == 0 || e[3] - e[1] == 0) + throw new FormatError(`Invalid MeshShading bounds: [${e}].`); + return [ + "Mesh", + this.shadingType, + this.coords, + this.colors, + this.figures, + e, + this.bbox, + this.background, + ]; + } +} +class DummyShading extends BaseShading { + getIR() { + return ["Dummy"]; + } +} +function getTilingPatternIR(e, t, a) { + const s = lookupMatrix(t.getArray("Matrix"), i), + r = lookupNormalRect(t.getArray("BBox"), null); + if (!r || r[2] - r[0] == 0 || r[3] - r[1] == 0) + throw new FormatError("Invalid getTilingPatternIR /BBox array."); + const n = t.get("XStep"); + if ("number" != typeof n) + throw new FormatError("Invalid getTilingPatternIR /XStep value."); + const o = t.get("YStep"); + if ("number" != typeof o) + throw new FormatError("Invalid getTilingPatternIR /YStep value."); + const g = t.get("PaintType"); + if (!Number.isInteger(g)) + throw new FormatError("Invalid getTilingPatternIR /PaintType value."); + const c = t.get("TilingType"); + if (!Number.isInteger(c)) + throw new FormatError("Invalid getTilingPatternIR /TilingType value."); + return ["TilingPattern", a, e, s, r, n, o, g, c]; +} +const wa = [ + 1.3877, 1, 1, 1, 0.97801, 0.92482, 0.89552, 0.91133, 0.81988, 0.97566, + 0.98152, 0.93548, 0.93548, 1.2798, 0.85284, 0.92794, 1, 0.96134, 1.54657, + 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, + 0.91133, 0.91133, 0.82845, 0.82845, 0.85284, 0.85284, 0.85284, 0.75859, + 0.92138, 0.83908, 0.7762, 0.73293, 0.87289, 0.73133, 0.7514, 0.81921, + 0.87356, 0.95958, 0.59526, 0.75727, 0.69225, 1.04924, 0.9121, 0.86943, + 0.79795, 0.88198, 0.77958, 0.70864, 0.81055, 0.90399, 0.88653, 0.96017, + 0.82577, 0.77892, 0.78257, 0.97507, 1.54657, 0.97507, 0.85284, 0.89552, + 0.90176, 0.88762, 0.8785, 0.75241, 0.8785, 0.90518, 0.95015, 0.77618, + 0.8785, 0.88401, 0.91916, 0.86304, 0.88401, 0.91488, 0.8785, 0.8801, 0.8785, + 0.8785, 0.91343, 0.7173, 1.04106, 0.8785, 0.85075, 0.95794, 0.82616, + 0.85162, 0.79492, 0.88331, 1.69808, 0.88331, 0.85284, 0.97801, 0.89552, + 0.91133, 0.89552, 0.91133, 1.7801, 0.89552, 1.24487, 1.13254, 1.12401, + 0.96839, 0.85284, 0.68787, 0.70645, 0.85592, 0.90747, 1.01466, 1.0088, + 0.90323, 1, 1.07463, 1, 0.91056, 0.75806, 1.19118, 0.96839, 0.78864, + 0.82845, 0.84133, 0.75859, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, + 0.83908, 0.77539, 0.73293, 0.73133, 0.73133, 0.73133, 0.73133, 0.95958, + 0.95958, 0.95958, 0.95958, 0.88506, 0.9121, 0.86943, 0.86943, 0.86943, + 0.86943, 0.86943, 0.85284, 0.87508, 0.90399, 0.90399, 0.90399, 0.90399, + 0.77892, 0.79795, 0.90807, 0.88762, 0.88762, 0.88762, 0.88762, 0.88762, + 0.88762, 0.8715, 0.75241, 0.90518, 0.90518, 0.90518, 0.90518, 0.88401, + 0.88401, 0.88401, 0.88401, 0.8785, 0.8785, 0.8801, 0.8801, 0.8801, 0.8801, + 0.8801, 0.90747, 0.89049, 0.8785, 0.8785, 0.8785, 0.8785, 0.85162, 0.8785, + 0.85162, 0.83908, 0.88762, 0.83908, 0.88762, 0.83908, 0.88762, 0.73293, + 0.75241, 0.73293, 0.75241, 0.73293, 0.75241, 0.73293, 0.75241, 0.87289, + 0.83016, 0.88506, 0.93125, 0.73133, 0.90518, 0.73133, 0.90518, 0.73133, + 0.90518, 0.73133, 0.90518, 0.73133, 0.90518, 0.81921, 0.77618, 0.81921, + 0.77618, 0.81921, 0.77618, 1, 1, 0.87356, 0.8785, 0.91075, 0.89608, 0.95958, + 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, + 0.88401, 0.76229, 0.90167, 0.59526, 0.91916, 1, 1, 0.86304, 0.69225, + 0.88401, 1, 1, 0.70424, 0.79468, 0.91926, 0.88175, 0.70823, 0.94903, 0.9121, + 0.8785, 1, 1, 0.9121, 0.8785, 0.87802, 0.88656, 0.8785, 0.86943, 0.8801, + 0.86943, 0.8801, 0.86943, 0.8801, 0.87402, 0.89291, 0.77958, 0.91343, 1, 1, + 0.77958, 0.91343, 0.70864, 0.7173, 0.70864, 0.7173, 0.70864, 0.7173, + 0.70864, 0.7173, 1, 1, 0.81055, 0.75841, 0.81055, 1.06452, 0.90399, 0.8785, + 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, + 0.8785, 0.96017, 0.95794, 0.77892, 0.85162, 0.77892, 0.78257, 0.79492, + 0.78257, 0.79492, 0.78257, 0.79492, 0.9297, 0.56892, 0.83908, 0.88762, + 0.77539, 0.8715, 0.87508, 0.89049, 1, 1, 0.81055, 1.04106, 1.20528, 1.20528, + 1, 1.15543, 0.70674, 0.98387, 0.94721, 1.33431, 1.45894, 0.95161, 1.06303, + 0.83908, 0.80352, 0.57184, 0.6965, 0.56289, 0.82001, 0.56029, 0.81235, + 1.02988, 0.83908, 0.7762, 0.68156, 0.80367, 0.73133, 0.78257, 0.87356, + 0.86943, 0.95958, 0.75727, 0.89019, 1.04924, 0.9121, 0.7648, 0.86943, + 0.87356, 0.79795, 0.78275, 0.81055, 0.77892, 0.9762, 0.82577, 0.99819, + 0.84896, 0.95958, 0.77892, 0.96108, 1.01407, 0.89049, 1.02988, 0.94211, + 0.96108, 0.8936, 0.84021, 0.87842, 0.96399, 0.79109, 0.89049, 1.00813, + 1.02988, 0.86077, 0.87445, 0.92099, 0.84723, 0.86513, 0.8801, 0.75638, + 0.85714, 0.78216, 0.79586, 0.87965, 0.94211, 0.97747, 0.78287, 0.97926, + 0.84971, 1.02988, 0.94211, 0.8801, 0.94211, 0.84971, 0.73133, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0.90264, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0.90518, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90548, 1, 1, 1, 1, 1, 1, + 0.96017, 0.95794, 0.96017, 0.95794, 0.96017, 0.95794, 0.77892, 0.85162, 1, + 1, 0.89552, 0.90527, 1, 0.90363, 0.92794, 0.92794, 0.92794, 0.92794, + 0.87012, 0.87012, 0.87012, 0.89552, 0.89552, 1.42259, 0.71143, 1.06152, 1, + 1, 1.03372, 1.03372, 0.97171, 1.4956, 2.2807, 0.93835, 0.83406, 0.91133, + 0.84107, 0.91133, 1, 1, 1, 0.72021, 1, 1.23108, 0.83489, 0.88525, 0.88525, + 0.81499, 0.90527, 1.81055, 0.90527, 1.81055, 1.31006, 1.53711, 0.94434, + 1.08696, 1, 0.95018, 0.77192, 0.85284, 0.90747, 1.17534, 0.69825, 0.9716, + 1.37077, 0.90747, 0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, + 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862, 0.99862, 1, 1, 1, + 1, 1, 1.08004, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0.90727, 0.90727, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + ], + ba = { lineHeight: 1.2207, lineGap: 0.2207 }, + Da = [ + 1.3877, 1, 1, 1, 0.97801, 0.92482, 0.89552, 0.91133, 0.81988, 0.97566, + 0.98152, 0.93548, 0.93548, 1.2798, 0.85284, 0.92794, 1, 0.96134, 1.56239, + 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, + 0.91133, 0.91133, 0.82845, 0.82845, 0.85284, 0.85284, 0.85284, 0.75859, + 0.92138, 0.83908, 0.7762, 0.71805, 0.87289, 0.73133, 0.7514, 0.81921, + 0.87356, 0.95958, 0.59526, 0.75727, 0.69225, 1.04924, 0.90872, 0.85938, + 0.79795, 0.87068, 0.77958, 0.69766, 0.81055, 0.90399, 0.88653, 0.96068, + 0.82577, 0.77892, 0.78257, 0.97507, 1.529, 0.97507, 0.85284, 0.89552, + 0.90176, 0.94908, 0.86411, 0.74012, 0.86411, 0.88323, 0.95015, 0.86411, + 0.86331, 0.88401, 0.91916, 0.86304, 0.88401, 0.9039, 0.86331, 0.86331, + 0.86411, 0.86411, 0.90464, 0.70852, 1.04106, 0.86331, 0.84372, 0.95794, + 0.82616, 0.84548, 0.79492, 0.88331, 1.69808, 0.88331, 0.85284, 0.97801, + 0.89552, 0.91133, 0.89552, 0.91133, 1.7801, 0.89552, 1.24487, 1.13254, + 1.19129, 0.96839, 0.85284, 0.68787, 0.70645, 0.85592, 0.90747, 1.01466, + 1.0088, 0.90323, 1, 1.07463, 1, 0.91056, 0.75806, 1.19118, 0.96839, 0.78864, + 0.82845, 0.84133, 0.75859, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, + 0.83908, 0.77539, 0.71805, 0.73133, 0.73133, 0.73133, 0.73133, 0.95958, + 0.95958, 0.95958, 0.95958, 0.88506, 0.90872, 0.85938, 0.85938, 0.85938, + 0.85938, 0.85938, 0.85284, 0.87068, 0.90399, 0.90399, 0.90399, 0.90399, + 0.77892, 0.79795, 0.90807, 0.94908, 0.94908, 0.94908, 0.94908, 0.94908, + 0.94908, 0.85887, 0.74012, 0.88323, 0.88323, 0.88323, 0.88323, 0.88401, + 0.88401, 0.88401, 0.88401, 0.8785, 0.86331, 0.86331, 0.86331, 0.86331, + 0.86331, 0.86331, 0.90747, 0.89049, 0.86331, 0.86331, 0.86331, 0.86331, + 0.84548, 0.86411, 0.84548, 0.83908, 0.94908, 0.83908, 0.94908, 0.83908, + 0.94908, 0.71805, 0.74012, 0.71805, 0.74012, 0.71805, 0.74012, 0.71805, + 0.74012, 0.87289, 0.79538, 0.88506, 0.92726, 0.73133, 0.88323, 0.73133, + 0.88323, 0.73133, 0.88323, 0.73133, 0.88323, 0.73133, 0.88323, 0.81921, + 0.86411, 0.81921, 0.86411, 0.81921, 0.86411, 1, 1, 0.87356, 0.86331, + 0.91075, 0.8777, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, + 0.95958, 0.88401, 0.95958, 0.88401, 0.76467, 0.90167, 0.59526, 0.91916, 1, + 1, 0.86304, 0.69225, 0.88401, 1, 1, 0.70424, 0.77312, 0.91926, 0.88175, + 0.70823, 0.94903, 0.90872, 0.86331, 1, 1, 0.90872, 0.86331, 0.86906, + 0.88116, 0.86331, 0.85938, 0.86331, 0.85938, 0.86331, 0.85938, 0.86331, + 0.87402, 0.86549, 0.77958, 0.90464, 1, 1, 0.77958, 0.90464, 0.69766, + 0.70852, 0.69766, 0.70852, 0.69766, 0.70852, 0.69766, 0.70852, 1, 1, + 0.81055, 0.75841, 0.81055, 1.06452, 0.90399, 0.86331, 0.90399, 0.86331, + 0.90399, 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, + 0.96068, 0.95794, 0.77892, 0.84548, 0.77892, 0.78257, 0.79492, 0.78257, + 0.79492, 0.78257, 0.79492, 0.9297, 0.56892, 0.83908, 0.94908, 0.77539, + 0.85887, 0.87068, 0.89049, 1, 1, 0.81055, 1.04106, 1.20528, 1.20528, 1, + 1.15543, 0.70088, 0.98387, 0.94721, 1.33431, 1.45894, 0.95161, 1.48387, + 0.83908, 0.80352, 0.57118, 0.6965, 0.56347, 0.79179, 0.55853, 0.80346, + 1.02988, 0.83908, 0.7762, 0.67174, 0.86036, 0.73133, 0.78257, 0.87356, + 0.86441, 0.95958, 0.75727, 0.89019, 1.04924, 0.90872, 0.74889, 0.85938, + 0.87891, 0.79795, 0.7957, 0.81055, 0.77892, 0.97447, 0.82577, 0.97466, + 0.87179, 0.95958, 0.77892, 0.94252, 0.95612, 0.8753, 1.02988, 0.92733, + 0.94252, 0.87411, 0.84021, 0.8728, 0.95612, 0.74081, 0.8753, 1.02189, + 1.02988, 0.84814, 0.87445, 0.91822, 0.84723, 0.85668, 0.86331, 0.81344, + 0.87581, 0.76422, 0.82046, 0.96057, 0.92733, 0.99375, 0.78022, 0.95452, + 0.86015, 1.02988, 0.92733, 0.86331, 0.92733, 0.86015, 0.73133, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0.90631, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0.88323, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.85174, 1, 1, 1, 1, 1, + 1, 0.96068, 0.95794, 0.96068, 0.95794, 0.96068, 0.95794, 0.77892, 0.84548, + 1, 1, 0.89552, 0.90527, 1, 0.90363, 0.92794, 0.92794, 0.92794, 0.89807, + 0.87012, 0.87012, 0.87012, 0.89552, 0.89552, 1.42259, 0.71094, 1.06152, 1, + 1, 1.03372, 1.03372, 0.97171, 1.4956, 2.2807, 0.92972, 0.83406, 0.91133, + 0.83326, 0.91133, 1, 1, 1, 0.72021, 1, 1.23108, 0.83489, 0.88525, 0.88525, + 0.81499, 0.90616, 1.81055, 0.90527, 1.81055, 1.3107, 1.53711, 0.94434, + 1.08696, 1, 0.95018, 0.77192, 0.85284, 0.90747, 1.17534, 0.69825, 0.9716, + 1.37077, 0.90747, 0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, + 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862, 0.99862, 1, 1, 1, + 1, 1, 1.08004, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0.90727, 0.90727, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + ], + Fa = { lineHeight: 1.2207, lineGap: 0.2207 }, + Sa = [ + 1.3877, 1, 1, 1, 1.17223, 1.1293, 0.89552, 0.91133, 0.80395, 1.02269, + 1.15601, 0.91056, 0.91056, 1.2798, 0.85284, 0.89807, 1, 0.90861, 1.39543, + 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, + 0.91133, 0.91133, 0.96309, 0.96309, 0.85284, 0.85284, 0.85284, 0.83319, + 0.88071, 0.8675, 0.81552, 0.72346, 0.85193, 0.73206, 0.7522, 0.81105, + 0.86275, 0.90685, 0.6377, 0.77892, 0.75593, 1.02638, 0.89249, 0.84118, + 0.77452, 0.85374, 0.75186, 0.67789, 0.79776, 0.88844, 0.85066, 0.94309, + 0.77818, 0.7306, 0.76659, 1.10369, 1.38313, 1.10369, 1.06139, 0.89552, + 0.8739, 0.9245, 0.9245, 0.83203, 0.9245, 0.85865, 1.09842, 0.9245, 0.9245, + 1.03297, 1.07692, 0.90918, 1.03297, 0.94959, 0.9245, 0.92274, 0.9245, + 0.9245, 1.02933, 0.77832, 1.20562, 0.9245, 0.8916, 0.98986, 0.86621, + 0.89453, 0.79004, 0.94152, 1.77256, 0.94152, 0.85284, 0.97801, 0.89552, + 0.91133, 0.89552, 0.91133, 1.91729, 0.89552, 1.17889, 1.13254, 1.16359, + 0.92098, 0.85284, 0.68787, 0.71353, 0.84737, 0.90747, 1.0088, 1.0044, + 0.87683, 1, 1.09091, 1, 0.92229, 0.739, 1.15642, 0.92098, 0.76288, 0.80504, + 0.80972, 0.75859, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.76318, + 0.72346, 0.73206, 0.73206, 0.73206, 0.73206, 0.90685, 0.90685, 0.90685, + 0.90685, 0.86477, 0.89249, 0.84118, 0.84118, 0.84118, 0.84118, 0.84118, + 0.85284, 0.84557, 0.88844, 0.88844, 0.88844, 0.88844, 0.7306, 0.77452, + 0.86331, 0.9245, 0.9245, 0.9245, 0.9245, 0.9245, 0.9245, 0.84843, 0.83203, + 0.85865, 0.85865, 0.85865, 0.85865, 0.82601, 0.82601, 0.82601, 0.82601, + 0.94469, 0.9245, 0.92274, 0.92274, 0.92274, 0.92274, 0.92274, 0.90747, + 0.86651, 0.9245, 0.9245, 0.9245, 0.9245, 0.89453, 0.9245, 0.89453, 0.8675, + 0.9245, 0.8675, 0.9245, 0.8675, 0.9245, 0.72346, 0.83203, 0.72346, 0.83203, + 0.72346, 0.83203, 0.72346, 0.83203, 0.85193, 0.8875, 0.86477, 0.99034, + 0.73206, 0.85865, 0.73206, 0.85865, 0.73206, 0.85865, 0.73206, 0.85865, + 0.73206, 0.85865, 0.81105, 0.9245, 0.81105, 0.9245, 0.81105, 0.9245, 1, 1, + 0.86275, 0.9245, 0.90872, 0.93591, 0.90685, 0.82601, 0.90685, 0.82601, + 0.90685, 0.82601, 0.90685, 1.03297, 0.90685, 0.82601, 0.77896, 1.05611, + 0.6377, 1.07692, 1, 1, 0.90918, 0.75593, 1.03297, 1, 1, 0.76032, 0.9375, + 0.98156, 0.93407, 0.77261, 1.11429, 0.89249, 0.9245, 1, 1, 0.89249, 0.9245, + 0.92534, 0.86698, 0.9245, 0.84118, 0.92274, 0.84118, 0.92274, 0.84118, + 0.92274, 0.8667, 0.86291, 0.75186, 1.02933, 1, 1, 0.75186, 1.02933, 0.67789, + 0.77832, 0.67789, 0.77832, 0.67789, 0.77832, 0.67789, 0.77832, 1, 1, + 0.79776, 0.97655, 0.79776, 1.23023, 0.88844, 0.9245, 0.88844, 0.9245, + 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, 0.94309, + 0.98986, 0.7306, 0.89453, 0.7306, 0.76659, 0.79004, 0.76659, 0.79004, + 0.76659, 0.79004, 1.09231, 0.54873, 0.8675, 0.9245, 0.76318, 0.84843, + 0.84557, 0.86651, 1, 1, 0.79776, 1.20562, 1.18622, 1.18622, 1, 1.1437, + 0.67009, 0.96334, 0.93695, 1.35191, 1.40909, 0.95161, 1.48387, 0.8675, + 0.90861, 0.6192, 0.7363, 0.64824, 0.82411, 0.56321, 0.85696, 1.23516, + 0.8675, 0.81552, 0.7286, 0.84134, 0.73206, 0.76659, 0.86275, 0.84369, + 0.90685, 0.77892, 0.85871, 1.02638, 0.89249, 0.75828, 0.84118, 0.85984, + 0.77452, 0.76466, 0.79776, 0.7306, 0.90782, 0.77818, 0.903, 0.87291, + 0.90685, 0.7306, 0.99058, 1.03667, 0.94635, 1.23516, 0.9849, 0.99058, + 0.92393, 0.8916, 0.942, 1.03667, 0.75026, 0.94635, 1.0297, 1.23516, 0.90918, + 0.94048, 0.98217, 0.89746, 0.84153, 0.92274, 0.82507, 0.88832, 0.84438, + 0.88178, 1.03525, 0.9849, 1.00225, 0.78086, 0.97248, 0.89404, 1.23516, + 0.9849, 0.92274, 0.9849, 0.89404, 0.73206, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0.89693, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.85865, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90933, 1, 1, 1, 1, 1, 1, 0.94309, 0.98986, + 0.94309, 0.98986, 0.94309, 0.98986, 0.7306, 0.89453, 1, 1, 0.89552, 0.90527, + 1, 0.90186, 1.12308, 1.12308, 1.12308, 1.12308, 1.2566, 1.2566, 1.2566, + 0.89552, 0.89552, 1.42259, 0.68994, 1.03809, 1, 1, 1.0176, 1.0176, 1.11523, + 1.4956, 2.01462, 0.97858, 0.82616, 0.91133, 0.83437, 0.91133, 1, 1, 1, + 0.70508, 1, 1.23108, 0.79801, 0.84426, 0.84426, 0.774, 0.90572, 1.81055, + 0.90749, 1.81055, 1.28809, 1.55469, 0.94434, 1.07806, 1, 0.97094, 0.7589, + 0.85284, 0.90747, 1.19658, 0.69825, 0.97622, 1.33512, 0.90747, 0.90747, + 0.85284, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941, 0.8941, 0.70572, 0.8, + 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0.99862, 0.99862, 1, 1, 1, 1, 1, 1.0336, 0.91027, 1, 1, 1, + 0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05859, 1.05859, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + ], + ka = { lineHeight: 1.2207, lineGap: 0.2207 }, + Ra = [ + 1.3877, 1, 1, 1, 1.17223, 1.1293, 0.89552, 0.91133, 0.80395, 1.02269, + 1.15601, 0.91056, 0.91056, 1.2798, 0.85284, 0.89807, 1, 0.90861, 1.39016, + 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, + 0.91133, 0.91133, 0.96309, 0.96309, 0.85284, 0.85284, 0.85284, 0.83319, + 0.88071, 0.8675, 0.81552, 0.73834, 0.85193, 0.73206, 0.7522, 0.81105, + 0.86275, 0.90685, 0.6377, 0.77892, 0.75593, 1.02638, 0.89385, 0.85122, + 0.77452, 0.86503, 0.75186, 0.68887, 0.79776, 0.88844, 0.85066, 0.94258, + 0.77818, 0.7306, 0.76659, 1.10369, 1.39016, 1.10369, 1.06139, 0.89552, + 0.8739, 0.86128, 0.94469, 0.8457, 0.94469, 0.89464, 1.09842, 0.84636, + 0.94469, 1.03297, 1.07692, 0.90918, 1.03297, 0.95897, 0.94469, 0.9482, + 0.94469, 0.94469, 1.04692, 0.78223, 1.20562, 0.94469, 0.90332, 0.98986, + 0.86621, 0.90527, 0.79004, 0.94152, 1.77256, 0.94152, 0.85284, 0.97801, + 0.89552, 0.91133, 0.89552, 0.91133, 1.91729, 0.89552, 1.17889, 1.13254, + 1.08707, 0.92098, 0.85284, 0.68787, 0.71353, 0.84737, 0.90747, 1.0088, + 1.0044, 0.87683, 1, 1.09091, 1, 0.92229, 0.739, 1.15642, 0.92098, 0.76288, + 0.80504, 0.80972, 0.75859, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, + 0.76318, 0.73834, 0.73206, 0.73206, 0.73206, 0.73206, 0.90685, 0.90685, + 0.90685, 0.90685, 0.86477, 0.89385, 0.85122, 0.85122, 0.85122, 0.85122, + 0.85122, 0.85284, 0.85311, 0.88844, 0.88844, 0.88844, 0.88844, 0.7306, + 0.77452, 0.86331, 0.86128, 0.86128, 0.86128, 0.86128, 0.86128, 0.86128, + 0.8693, 0.8457, 0.89464, 0.89464, 0.89464, 0.89464, 0.82601, 0.82601, + 0.82601, 0.82601, 0.94469, 0.94469, 0.9482, 0.9482, 0.9482, 0.9482, 0.9482, + 0.90747, 0.86651, 0.94469, 0.94469, 0.94469, 0.94469, 0.90527, 0.94469, + 0.90527, 0.8675, 0.86128, 0.8675, 0.86128, 0.8675, 0.86128, 0.73834, 0.8457, + 0.73834, 0.8457, 0.73834, 0.8457, 0.73834, 0.8457, 0.85193, 0.92454, + 0.86477, 0.9921, 0.73206, 0.89464, 0.73206, 0.89464, 0.73206, 0.89464, + 0.73206, 0.89464, 0.73206, 0.89464, 0.81105, 0.84636, 0.81105, 0.84636, + 0.81105, 0.84636, 1, 1, 0.86275, 0.94469, 0.90872, 0.95786, 0.90685, + 0.82601, 0.90685, 0.82601, 0.90685, 0.82601, 0.90685, 1.03297, 0.90685, + 0.82601, 0.77741, 1.05611, 0.6377, 1.07692, 1, 1, 0.90918, 0.75593, 1.03297, + 1, 1, 0.76032, 0.90452, 0.98156, 1.11842, 0.77261, 1.11429, 0.89385, + 0.94469, 1, 1, 0.89385, 0.94469, 0.95877, 0.86901, 0.94469, 0.85122, 0.9482, + 0.85122, 0.9482, 0.85122, 0.9482, 0.8667, 0.90016, 0.75186, 1.04692, 1, 1, + 0.75186, 1.04692, 0.68887, 0.78223, 0.68887, 0.78223, 0.68887, 0.78223, + 0.68887, 0.78223, 1, 1, 0.79776, 0.92188, 0.79776, 1.23023, 0.88844, + 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, + 0.94469, 0.88844, 0.94469, 0.94258, 0.98986, 0.7306, 0.90527, 0.7306, + 0.76659, 0.79004, 0.76659, 0.79004, 0.76659, 0.79004, 1.09231, 0.54873, + 0.8675, 0.86128, 0.76318, 0.8693, 0.85311, 0.86651, 1, 1, 0.79776, 1.20562, + 1.18622, 1.18622, 1, 1.1437, 0.67742, 0.96334, 0.93695, 1.35191, 1.40909, + 0.95161, 1.48387, 0.86686, 0.90861, 0.62267, 0.74359, 0.65649, 0.85498, + 0.56963, 0.88254, 1.23516, 0.8675, 0.81552, 0.75443, 0.84503, 0.73206, + 0.76659, 0.86275, 0.85122, 0.90685, 0.77892, 0.85746, 1.02638, 0.89385, + 0.75657, 0.85122, 0.86275, 0.77452, 0.74171, 0.79776, 0.7306, 0.95165, + 0.77818, 0.89772, 0.88831, 0.90685, 0.7306, 0.98142, 1.02191, 0.96576, + 1.23516, 0.99018, 0.98142, 0.9236, 0.89258, 0.94035, 1.02191, 0.78848, + 0.96576, 0.9561, 1.23516, 0.90918, 0.92578, 0.95424, 0.89746, 0.83969, + 0.9482, 0.80113, 0.89442, 0.85208, 0.86155, 0.98022, 0.99018, 1.00452, + 0.81209, 0.99247, 0.89181, 1.23516, 0.99018, 0.9482, 0.99018, 0.89181, + 0.73206, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.88844, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.89464, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0.96766, 1, 1, 1, 1, 1, 1, 0.94258, 0.98986, 0.94258, 0.98986, 0.94258, + 0.98986, 0.7306, 0.90527, 1, 1, 0.89552, 0.90527, 1, 0.90186, 1.12308, + 1.12308, 1.12308, 1.12308, 1.2566, 1.2566, 1.2566, 0.89552, 0.89552, + 1.42259, 0.69043, 1.03809, 1, 1, 1.0176, 1.0176, 1.11523, 1.4956, 2.01462, + 0.99331, 0.82616, 0.91133, 0.84286, 0.91133, 1, 1, 1, 0.70508, 1, 1.23108, + 0.79801, 0.84426, 0.84426, 0.774, 0.90527, 1.81055, 0.90527, 1.81055, + 1.28809, 1.55469, 0.94434, 1.07806, 1, 0.97094, 0.7589, 0.85284, 0.90747, + 1.19658, 0.69825, 0.97622, 1.33512, 0.90747, 0.90747, 0.85356, 0.90747, + 0.90747, 1.44947, 0.85284, 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, + 0.70572, 0.70572, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0.99862, 0.99862, 1, 1, 1, 1, 1, 1.0336, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05859, 1.05859, 1, 1, 1, 1.07185, 0.99413, + 0.96334, 1.08065, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + ], + Na = { lineHeight: 1.2207, lineGap: 0.2207 }, + Ga = [ + 0.76116, 1, 1, 1.0006, 0.99998, 0.99974, 0.99973, 0.99973, 0.99982, 0.99977, + 1.00087, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, 0.99998, 1.0006, + 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, + 0.99973, 0.99973, 0.99973, 0.99998, 1, 1.00003, 1.00003, 1.00003, 1.00026, + 0.9999, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, + 0.99977, 1.0006, 0.99973, 0.99977, 1.00026, 0.99999, 0.99977, 1.00022, + 1.00001, 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, + 1.00001, 1.00001, 1.00026, 0.99998, 1.0006, 0.99998, 1.00003, 0.99973, + 0.99998, 0.99973, 1.00026, 0.99973, 1.00026, 0.99973, 0.99998, 1.00026, + 1.00026, 1.0006, 1.0006, 0.99973, 1.0006, 0.99982, 1.00026, 1.00026, + 1.00026, 1.00026, 0.99959, 0.99973, 0.99998, 1.00026, 0.99973, 1.00022, + 0.99973, 0.99973, 1, 0.99959, 1.00077, 0.99959, 1.00003, 0.99998, 0.99973, + 0.99973, 0.99973, 0.99973, 1.00077, 0.99973, 0.99998, 1.00025, 0.99968, + 0.99973, 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, + 0.99973, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002, + 1.00026, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1, 0.99977, + 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006, 1.0006, 0.99977, + 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00003, 1.00022, + 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.00026, 0.99973, + 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99982, 0.99973, 0.99973, + 0.99973, 0.99973, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.00026, 1.00026, + 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.06409, 1.00026, 1.00026, + 1.00026, 1.00026, 1.00026, 0.99973, 1.00026, 0.99973, 0.99977, 0.99973, + 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, + 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 1.03374, 0.99977, 1.00026, + 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, + 1.00001, 0.99973, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, + 1.00022, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 1.0006, 1.0006, + 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.00042, + 0.99973, 0.99973, 1.0006, 0.99977, 0.99973, 0.99973, 1.00026, 1.0006, + 1.00026, 1.0006, 1.00026, 1.03828, 1.00026, 0.99999, 1.00026, 1.0006, + 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.9993, 0.9998, + 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1, 1.00016, + 0.99977, 0.99959, 0.99977, 0.99959, 0.99977, 0.99959, 1.00001, 0.99973, + 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00026, 0.99998, + 1.00026, 0.8121, 1.00026, 0.99998, 0.99977, 1.00026, 0.99977, 1.00026, + 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, + 1.00016, 1.00022, 1.00001, 0.99973, 1.00001, 1.00026, 1, 1.00026, 1, + 1.00026, 1, 1.0006, 0.99973, 0.99977, 0.99973, 1, 0.99982, 1.00022, 1.00026, + 1.00001, 0.99973, 1.00026, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, + 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 1.00034, 0.99977, 1, + 0.99997, 1.00026, 1.00078, 1.00036, 0.99973, 1.00013, 1.0006, 0.99977, + 0.99977, 0.99988, 0.85148, 1.00001, 1.00026, 0.99977, 1.00022, 1.0006, + 0.99977, 1.00001, 0.99999, 0.99977, 1.00069, 1.00022, 0.99977, 1.00001, + 0.99984, 1.00026, 1.00001, 1.00024, 1.00001, 0.9999, 1, 1.0006, 1.00001, + 1.00041, 0.99962, 1.00026, 1.0006, 0.99995, 1.00041, 0.99942, 0.99973, + 0.99927, 1.00082, 0.99902, 1.00026, 1.00087, 1.0006, 1.00069, 0.99973, + 0.99867, 0.99973, 0.9993, 1.00026, 1.00049, 1.00056, 1, 0.99988, 0.99935, + 0.99995, 0.99954, 1.00055, 0.99945, 1.00032, 1.0006, 0.99995, 1.00026, + 0.99995, 1.00032, 1.00001, 1.00008, 0.99971, 1.00019, 0.9994, 1.00001, + 1.0006, 1.00044, 0.99973, 1.00023, 1.00047, 1, 0.99942, 0.99561, 0.99989, + 1.00035, 0.99977, 1.00035, 0.99977, 1.00019, 0.99944, 1.00001, 1.00021, + 0.99926, 1.00035, 1.00035, 0.99942, 1.00048, 0.99999, 0.99977, 1.00022, + 1.00035, 1.00001, 0.99977, 1.00026, 0.99989, 1.00057, 1.00001, 0.99936, + 1.00052, 1.00012, 0.99996, 1.00043, 1, 1.00035, 0.9994, 0.99976, 1.00035, + 0.99973, 1.00052, 1.00041, 1.00119, 1.00037, 0.99973, 1.00002, 0.99986, + 1.00041, 1.00041, 0.99902, 0.9996, 1.00034, 0.99999, 1.00026, 0.99999, + 1.00026, 0.99973, 1.00052, 0.99973, 1, 0.99973, 1.00041, 1.00075, 0.9994, + 1.0003, 0.99999, 1, 1.00041, 0.99955, 1, 0.99915, 0.99973, 0.99973, 1.00026, + 1.00119, 0.99955, 0.99973, 1.0006, 0.99911, 1.0006, 1.00026, 0.99972, + 1.00026, 0.99902, 1.00041, 0.99973, 0.99999, 1, 1, 1.00038, 1.0005, 1.00016, + 1.00022, 1.00016, 1.00022, 1.00016, 1.00022, 1.00001, 0.99973, 1, 1, + 0.99973, 1, 1, 0.99955, 1.0006, 1.0006, 1.0006, 1.0006, 1, 1, 1, 0.99973, + 0.99973, 0.99972, 1, 1, 1.00106, 0.99999, 0.99998, 0.99998, 0.99999, + 0.99998, 1.66475, 1, 0.99973, 0.99973, 1.00023, 0.99973, 0.99971, 1.00047, + 1.00023, 1, 0.99991, 0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1, 1, 1, + 1, 1, 1, 1, 0.99972, 1, 1.20985, 1.39713, 1.00003, 1.00031, 1.00015, 1, + 0.99561, 1.00027, 1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999, + 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, + 1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, + 1.00026, 1.00026, 0.99972, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, + 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, 1, 1, 1, + 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + ], + xa = { lineHeight: 1.2, lineGap: 0.2 }, + Ma = [ + 0.76116, 1, 1, 1.0006, 0.99998, 0.99974, 0.99973, 0.99973, 0.99982, 0.99977, + 1.00087, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, 0.99998, 1.0006, + 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, + 0.99973, 0.99973, 0.99973, 0.99998, 1, 1.00003, 1.00003, 1.00003, 1.00026, + 0.9999, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, + 0.99977, 1.0006, 0.99973, 0.99977, 1.00026, 0.99999, 0.99977, 1.00022, + 1.00001, 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, + 1.00001, 1.00001, 1.00026, 0.99998, 1.0006, 0.99998, 1.00003, 0.99973, + 0.99998, 0.99973, 1.00026, 0.99973, 1.00026, 0.99973, 0.99998, 1.00026, + 1.00026, 1.0006, 1.0006, 0.99973, 1.0006, 0.99982, 1.00026, 1.00026, + 1.00026, 1.00026, 0.99959, 0.99973, 0.99998, 1.00026, 0.99973, 1.00022, + 0.99973, 0.99973, 1, 0.99959, 1.00077, 0.99959, 1.00003, 0.99998, 0.99973, + 0.99973, 0.99973, 0.99973, 1.00077, 0.99973, 0.99998, 1.00025, 0.99968, + 0.99973, 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, + 0.99973, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002, + 1.00026, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1, 0.99977, + 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006, 1.0006, 0.99977, + 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00003, 1.00022, + 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.00026, 0.99973, + 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99982, 0.99973, 0.99973, + 0.99973, 0.99973, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.00026, 1.00026, + 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.06409, 1.00026, 1.00026, + 1.00026, 1.00026, 1.00026, 0.99973, 1.00026, 0.99973, 0.99977, 0.99973, + 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, + 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 1.0044, 0.99977, 1.00026, + 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, + 1.00001, 0.99973, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, + 1.00022, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 1.0006, 1.0006, + 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99971, + 0.99973, 0.99973, 1.0006, 0.99977, 0.99973, 0.99973, 1.00026, 1.0006, + 1.00026, 1.0006, 1.00026, 1.01011, 1.00026, 0.99999, 1.00026, 1.0006, + 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.9993, 0.9998, + 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1, 1.00016, + 0.99977, 0.99959, 0.99977, 0.99959, 0.99977, 0.99959, 1.00001, 0.99973, + 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00026, 0.99998, + 1.00026, 0.8121, 1.00026, 0.99998, 0.99977, 1.00026, 0.99977, 1.00026, + 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, + 1.00016, 1.00022, 1.00001, 0.99973, 1.00001, 1.00026, 1, 1.00026, 1, + 1.00026, 1, 1.0006, 0.99973, 0.99977, 0.99973, 1, 0.99982, 1.00022, 1.00026, + 1.00001, 0.99973, 1.00026, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, + 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99977, 1, + 1, 1.00026, 0.99969, 0.99972, 0.99981, 0.9998, 1.0006, 0.99977, 0.99977, + 1.00022, 0.91155, 1.00001, 1.00026, 0.99977, 1.00022, 1.0006, 0.99977, + 1.00001, 0.99999, 0.99977, 0.99966, 1.00022, 1.00032, 1.00001, 0.99944, + 1.00026, 1.00001, 0.99968, 1.00001, 1.00047, 1, 1.0006, 1.00001, 0.99981, + 1.00101, 1.00026, 1.0006, 0.99948, 0.99981, 1.00064, 0.99973, 0.99942, + 1.00101, 1.00061, 1.00026, 1.00069, 1.0006, 1.00014, 0.99973, 1.01322, + 0.99973, 1.00065, 1.00026, 1.00012, 0.99923, 1, 1.00064, 1.00076, 0.99948, + 1.00055, 1.00063, 1.00007, 0.99943, 1.0006, 0.99948, 1.00026, 0.99948, + 0.99943, 1.00001, 1.00001, 1.00029, 1.00038, 1.00035, 1.00001, 1.0006, + 1.0006, 0.99973, 0.99978, 1.00001, 1.00057, 0.99989, 0.99967, 0.99964, + 0.99967, 0.99977, 0.99999, 0.99977, 1.00038, 0.99977, 1.00001, 0.99973, + 1.00066, 0.99967, 0.99967, 1.00041, 0.99998, 0.99999, 0.99977, 1.00022, + 0.99967, 1.00001, 0.99977, 1.00026, 0.99964, 1.00031, 1.00001, 0.99999, + 0.99999, 1, 1.00023, 1, 1, 0.99999, 1.00035, 1.00001, 0.99999, 0.99973, + 0.99977, 0.99999, 1.00058, 0.99973, 0.99973, 0.99955, 0.9995, 1.00026, + 1.00026, 1.00032, 0.99989, 1.00034, 0.99999, 1.00026, 1.00026, 1.00026, + 0.99973, 0.45998, 0.99973, 1.00026, 0.99973, 1.00001, 0.99999, 0.99982, + 0.99994, 0.99996, 1, 1.00042, 1.00044, 1.00029, 1.00023, 0.99973, 0.99973, + 1.00026, 0.99949, 1.00002, 0.99973, 1.0006, 1.0006, 1.0006, 0.99975, + 1.00026, 1.00026, 1.00032, 0.98685, 0.99973, 1.00026, 1, 1, 0.99966, + 1.00044, 1.00016, 1.00022, 1.00016, 1.00022, 1.00016, 1.00022, 1.00001, + 0.99973, 1, 1, 0.99973, 1, 1, 0.99955, 1.0006, 1.0006, 1.0006, 1.0006, 1, 1, + 1, 0.99973, 0.99973, 0.99972, 1, 1, 1.00106, 0.99999, 0.99998, 0.99998, + 0.99999, 0.99998, 1.66475, 1, 0.99973, 0.99973, 1, 0.99973, 0.99971, + 0.99978, 1, 1, 0.99991, 0.99984, 1.00002, 1.00002, 1.00002, 1.00002, + 1.00098, 1, 1, 1, 1.00049, 1, 1, 0.99972, 1, 1.20985, 1.39713, 1.00003, + 1.00031, 1.00015, 1, 0.99561, 1.00027, 1.00031, 1.00031, 0.99915, 1.00031, + 1.00031, 0.99999, 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.40579, 1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, + 1.00026, 1.00026, 1.00026, 1.00026, 0.99972, 0.99999, 0.99999, 0.99999, + 0.99999, 1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, + 0.9995, 1, 1, 1, 1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + ], + Ua = { lineHeight: 1.35, lineGap: 0.2 }, + La = [ + 0.76116, 1, 1, 1.0006, 1.0006, 1.00006, 0.99973, 0.99973, 0.99982, 1.00001, + 1.00043, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, 0.99998, 1.0006, + 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, + 0.99973, 0.99973, 0.99973, 1.0006, 1, 1.00003, 1.00003, 1.00003, 0.99973, + 0.99987, 1.00001, 1.00001, 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, + 0.99977, 1.0006, 1, 1.00001, 0.99973, 0.99999, 0.99977, 1.00022, 1.00001, + 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001, + 1.00001, 1.00026, 1.0006, 1.0006, 1.0006, 0.99949, 0.99973, 0.99998, + 0.99973, 0.99973, 1, 0.99973, 0.99973, 1.0006, 0.99973, 0.99973, 0.99924, + 0.99924, 1, 0.99924, 0.99999, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, + 1, 1.0006, 0.99973, 1, 0.99977, 1, 1, 1, 1.00005, 1.0009, 1.00005, 1.00003, + 0.99998, 0.99973, 0.99973, 0.99973, 0.99973, 1.0009, 0.99973, 0.99998, + 1.00025, 0.99968, 0.99973, 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, + 1, 0.99998, 1, 0.9998, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, + 1.00002, 1.00002, 1.00026, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, + 1.00001, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, + 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, + 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, + 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, + 0.99982, 1, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1.0006, 1.0006, + 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, + 1.06409, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 1, 0.99973, 1, + 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 0.99977, 1, 0.99977, + 1, 0.99977, 1, 0.99977, 1, 0.99977, 1.0288, 0.99977, 0.99973, 1.00001, + 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, + 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, + 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, + 1.0006, 1.0006, 1.0006, 0.99924, 1.0006, 1.0006, 0.99946, 1.00034, 1, + 0.99924, 1.00001, 1, 1, 0.99973, 0.99924, 0.99973, 0.99924, 0.99973, + 1.06311, 0.99973, 1.00024, 0.99973, 0.99924, 0.99977, 0.99973, 0.99977, + 0.99973, 0.99977, 0.99973, 1.00041, 0.9998, 0.99973, 1.00022, 0.99973, + 1.00022, 0.99973, 1.00022, 0.99973, 1, 1.00016, 0.99977, 0.99998, 0.99977, + 0.99998, 0.99977, 0.99998, 1.00001, 1, 1.00001, 1, 1.00001, 1, 1.00001, 1, + 1.00026, 1.0006, 1.00026, 0.89547, 1.00026, 1.0006, 0.99977, 0.99973, + 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, + 0.99977, 0.99973, 1.00016, 0.99977, 1.00001, 1, 1.00001, 1.00026, 1, + 1.00026, 1, 1.00026, 1, 0.99924, 0.99973, 1.00001, 0.99973, 1, 0.99982, + 1.00022, 1.00026, 1.00001, 1, 1.00026, 1.0006, 0.99998, 0.99998, 0.99998, + 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, + 1.00001, 1, 1.00054, 0.99977, 1.00084, 1.00007, 0.99973, 1.00013, 0.99924, + 1.00001, 1.00001, 0.99945, 0.91221, 1.00001, 1.00026, 0.99977, 1.00022, + 1.0006, 1.00001, 1.00001, 0.99999, 0.99977, 0.99933, 1.00022, 1.00054, + 1.00001, 1.00065, 1.00026, 1.00001, 1.0001, 1.00001, 1.00052, 1, 1.0006, + 1.00001, 0.99945, 0.99897, 0.99968, 0.99924, 1.00036, 0.99945, 0.99949, 1, + 1.0006, 0.99897, 0.99918, 0.99968, 0.99911, 0.99924, 1, 0.99962, 1.01487, 1, + 1.0005, 0.99973, 1.00012, 1.00043, 1, 0.99995, 0.99994, 1.00036, 0.99947, + 1.00019, 1.00063, 1.00025, 0.99924, 1.00036, 0.99973, 1.00036, 1.00025, + 1.00001, 1.00001, 1.00027, 1.0001, 1.00068, 1.00001, 1.0006, 1.0006, 1, + 1.00008, 0.99957, 0.99972, 0.9994, 0.99954, 0.99975, 1.00051, 1.00001, + 1.00019, 1.00001, 1.0001, 0.99986, 1.00001, 1.00001, 1.00038, 0.99954, + 0.99954, 0.9994, 1.00066, 0.99999, 0.99977, 1.00022, 1.00054, 1.00001, + 0.99977, 1.00026, 0.99975, 1.0001, 1.00001, 0.99993, 0.9995, 0.99955, + 1.00016, 0.99978, 0.99974, 1.00019, 1.00022, 0.99955, 1.00053, 0.99973, + 1.00089, 1.00005, 0.99967, 1.00048, 0.99973, 1.00002, 1.00034, 0.99973, + 0.99973, 0.99964, 1.00006, 1.00066, 0.99947, 0.99973, 0.98894, 0.99973, 1, + 0.44898, 1, 0.99946, 1, 1.00039, 1.00082, 0.99991, 0.99991, 0.99985, + 1.00022, 1.00023, 1.00061, 1.00006, 0.99966, 0.99973, 0.99973, 0.99973, + 1.00019, 1.0008, 1, 0.99924, 0.99924, 0.99924, 0.99983, 1.00044, 0.99973, + 0.99964, 0.98332, 1, 0.99973, 1, 1, 0.99962, 0.99895, 1.00016, 0.99977, + 1.00016, 0.99977, 1.00016, 0.99977, 1.00001, 1, 1, 1, 0.99973, 1, 1, + 0.99955, 0.99924, 0.99924, 0.99924, 0.99924, 0.99998, 0.99998, 0.99998, + 0.99973, 0.99973, 0.99972, 1, 1, 1.00267, 0.99999, 0.99998, 0.99998, 1, + 0.99998, 1.66475, 1, 0.99973, 0.99973, 1.00023, 0.99973, 1.00423, 0.99925, + 0.99999, 1, 0.99991, 0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1.00049, + 1, 1.00245, 1, 1, 1, 1, 0.96329, 1, 1.20985, 1.39713, 1.00003, 0.8254, + 1.00015, 1, 1.00035, 1.00027, 1.00031, 1.00031, 1.00003, 1.00031, 1.00031, + 0.99999, 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.40579, 1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, + 1.00026, 1.00026, 1.00026, 0.95317, 0.99999, 0.99999, 0.99999, 0.99999, + 1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, + 1, 1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, + ], + Ja = { lineHeight: 1.35, lineGap: 0.2 }, + Ha = [ + 0.76116, 1, 1, 1.0006, 1.0006, 1.00006, 0.99973, 0.99973, 0.99982, 1.00001, + 1.00043, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, 0.99998, 1.0006, + 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, + 0.99973, 0.99973, 0.99973, 1.0006, 1, 1.00003, 1.00003, 1.00003, 0.99973, + 0.99987, 1.00001, 1.00001, 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, + 0.99977, 1.0006, 1, 1.00001, 0.99973, 0.99999, 0.99977, 1.00022, 1.00001, + 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001, + 1.00001, 1.00026, 1.0006, 1.0006, 1.0006, 0.99949, 0.99973, 0.99998, + 0.99973, 0.99973, 1, 0.99973, 0.99973, 1.0006, 0.99973, 0.99973, 0.99924, + 0.99924, 1, 0.99924, 0.99999, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, + 1, 1.0006, 0.99973, 1, 0.99977, 1, 1, 1, 1.00005, 1.0009, 1.00005, 1.00003, + 0.99998, 0.99973, 0.99973, 0.99973, 0.99973, 1.0009, 0.99973, 0.99998, + 1.00025, 0.99968, 0.99973, 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, + 1, 0.99998, 1, 0.9998, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, + 1.00002, 1.00002, 1.00026, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, + 1.00001, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, + 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, + 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, + 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, + 0.99982, 1, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1.0006, 1.0006, + 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, + 1.06409, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 1, 0.99973, 1, + 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 0.99977, 1, 0.99977, + 1, 0.99977, 1, 0.99977, 1, 0.99977, 1.04596, 0.99977, 0.99973, 1.00001, + 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, + 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, + 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, + 1.0006, 1.0006, 1.0006, 0.99924, 1.0006, 1.0006, 1.00019, 1.00034, 1, + 0.99924, 1.00001, 1, 1, 0.99973, 0.99924, 0.99973, 0.99924, 0.99973, + 1.02572, 0.99973, 1.00005, 0.99973, 0.99924, 0.99977, 0.99973, 0.99977, + 0.99973, 0.99977, 0.99973, 0.99999, 0.9998, 0.99973, 1.00022, 0.99973, + 1.00022, 0.99973, 1.00022, 0.99973, 1, 1.00016, 0.99977, 0.99998, 0.99977, + 0.99998, 0.99977, 0.99998, 1.00001, 1, 1.00001, 1, 1.00001, 1, 1.00001, 1, + 1.00026, 1.0006, 1.00026, 0.84533, 1.00026, 1.0006, 0.99977, 0.99973, + 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, + 0.99977, 0.99973, 1.00016, 0.99977, 1.00001, 1, 1.00001, 1.00026, 1, + 1.00026, 1, 1.00026, 1, 0.99924, 0.99973, 1.00001, 0.99973, 1, 0.99982, + 1.00022, 1.00026, 1.00001, 1, 1.00026, 1.0006, 0.99998, 0.99998, 0.99998, + 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, + 0.99928, 1, 0.99977, 1.00013, 1.00055, 0.99947, 0.99945, 0.99941, 0.99924, + 1.00001, 1.00001, 1.0004, 0.91621, 1.00001, 1.00026, 0.99977, 1.00022, + 1.0006, 1.00001, 1.00005, 0.99999, 0.99977, 1.00015, 1.00022, 0.99977, + 1.00001, 0.99973, 1.00026, 1.00001, 1.00019, 1.00001, 0.99946, 1, 1.0006, + 1.00001, 0.99978, 1.00045, 0.99973, 0.99924, 1.00023, 0.99978, 0.99966, 1, + 1.00065, 1.00045, 1.00019, 0.99973, 0.99973, 0.99924, 1, 1, 0.96499, 1, + 1.00055, 0.99973, 1.00008, 1.00027, 1, 0.9997, 0.99995, 1.00023, 0.99933, + 1.00019, 1.00015, 1.00031, 0.99924, 1.00023, 0.99973, 1.00023, 1.00031, + 1.00001, 0.99928, 1.00029, 1.00092, 1.00035, 1.00001, 1.0006, 1.0006, 1, + 0.99988, 0.99975, 1, 1.00082, 0.99561, 0.9996, 1.00035, 1.00001, 0.99962, + 1.00001, 1.00092, 0.99964, 1.00001, 0.99963, 0.99999, 1.00035, 1.00035, + 1.00082, 0.99962, 0.99999, 0.99977, 1.00022, 1.00035, 1.00001, 0.99977, + 1.00026, 0.9996, 0.99967, 1.00001, 1.00034, 1.00074, 1.00054, 1.00053, + 1.00063, 0.99971, 0.99962, 1.00035, 0.99975, 0.99977, 0.99973, 1.00043, + 0.99953, 1.0007, 0.99915, 0.99973, 1.00008, 0.99892, 1.00073, 1.00073, + 1.00114, 0.99915, 1.00073, 0.99955, 0.99973, 1.00092, 0.99973, 1, 0.99998, + 1, 1.0003, 1, 1.00043, 1.00001, 0.99969, 1.0003, 1, 1.00035, 1.00001, + 0.9995, 1, 1.00092, 0.99973, 0.99973, 0.99973, 1.0007, 0.9995, 1, 0.99924, + 1.0006, 0.99924, 0.99972, 1.00062, 0.99973, 1.00114, 1.00073, 1, 0.99955, 1, + 1, 1.00047, 0.99968, 1.00016, 0.99977, 1.00016, 0.99977, 1.00016, 0.99977, + 1.00001, 1, 1, 1, 0.99973, 1, 1, 0.99955, 0.99924, 0.99924, 0.99924, + 0.99924, 0.99998, 0.99998, 0.99998, 0.99973, 0.99973, 0.99972, 1, 1, + 1.00267, 0.99999, 0.99998, 0.99998, 1, 0.99998, 1.66475, 1, 0.99973, + 0.99973, 1.00023, 0.99973, 0.99971, 0.99925, 1.00023, 1, 0.99991, 0.99984, + 1.00002, 1.00002, 1.00002, 1.00002, 1, 1, 1, 1, 1, 1, 1, 0.96329, 1, + 1.20985, 1.39713, 1.00003, 0.8254, 1.00015, 1, 1.00035, 1.00027, 1.00031, + 1.00031, 0.99915, 1.00031, 1.00031, 0.99999, 1.00003, 0.99999, 0.99999, + 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, + 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, 1.36625, 0.99999, 1, + 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.95317, 0.99999, + 0.99999, 0.99999, 0.99999, 1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, + 0.99962, 1.00042, 0.9995, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, + ], + Ya = { lineHeight: 1.2, lineGap: 0.2 }, + va = [ + 365, 0, 333, 278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389, 584, + 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, + 333, 584, 584, 584, 611, 975, 722, 722, 722, 722, 667, 611, 778, 722, 278, + 556, 722, 611, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, + 667, 611, 333, 278, 333, 584, 556, 333, 556, 611, 556, 611, 556, 333, 611, + 611, 278, 278, 556, 278, 889, 611, 611, 611, 611, 389, 556, 333, 611, 556, + 778, 556, 556, 500, 389, 280, 389, 584, 333, 556, 556, 556, 556, 280, 556, + 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, 556, 278, + 333, 333, 365, 556, 834, 834, 834, 611, 722, 722, 722, 722, 722, 722, 1e3, + 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, + 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, + 556, 889, 556, 556, 556, 556, 556, 278, 278, 278, 278, 611, 611, 611, 611, + 611, 611, 611, 549, 611, 611, 611, 611, 611, 556, 611, 556, 722, 556, 722, + 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 719, 722, 611, + 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 611, 778, 611, 778, + 611, 778, 611, 722, 611, 722, 611, 278, 278, 278, 278, 278, 278, 278, 278, + 278, 278, 785, 556, 556, 278, 722, 556, 556, 611, 278, 611, 278, 611, 385, + 611, 479, 611, 278, 722, 611, 722, 611, 722, 611, 708, 723, 611, 778, 611, + 778, 611, 778, 611, 1e3, 944, 722, 389, 722, 389, 722, 389, 667, 556, 667, + 556, 667, 556, 667, 556, 611, 333, 611, 479, 611, 333, 722, 611, 722, 611, + 722, 611, 722, 611, 722, 611, 722, 611, 944, 778, 667, 556, 667, 611, 500, + 611, 500, 611, 500, 278, 556, 722, 556, 1e3, 889, 778, 611, 667, 556, 611, + 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 465, 722, 333, 853, + 906, 474, 825, 927, 838, 278, 722, 722, 601, 719, 667, 611, 722, 778, 278, + 722, 667, 833, 722, 644, 778, 722, 667, 600, 611, 667, 821, 667, 809, 802, + 278, 667, 615, 451, 611, 278, 582, 615, 610, 556, 606, 475, 460, 611, 541, + 278, 558, 556, 612, 556, 445, 611, 766, 619, 520, 684, 446, 582, 715, 576, + 753, 845, 278, 582, 611, 582, 845, 667, 669, 885, 567, 711, 667, 278, 276, + 556, 1094, 1062, 875, 610, 722, 622, 719, 722, 719, 722, 567, 712, 667, 904, + 626, 719, 719, 610, 702, 833, 722, 778, 719, 667, 722, 611, 622, 854, 667, + 730, 703, 1005, 1019, 870, 979, 719, 711, 1031, 719, 556, 618, 615, 417, + 635, 556, 709, 497, 615, 615, 500, 635, 740, 604, 611, 604, 611, 556, 490, + 556, 875, 556, 615, 581, 833, 844, 729, 854, 615, 552, 854, 583, 556, 556, + 611, 417, 552, 556, 278, 281, 278, 969, 906, 611, 500, 615, 556, 604, 778, + 611, 487, 447, 944, 778, 944, 778, 944, 778, 667, 556, 333, 333, 556, 1e3, + 1e3, 552, 278, 278, 278, 278, 500, 500, 500, 556, 556, 350, 1e3, 1e3, 240, + 479, 333, 333, 604, 333, 167, 396, 556, 556, 1094, 556, 885, 489, 1115, 1e3, + 768, 600, 834, 834, 834, 834, 1e3, 500, 1e3, 500, 1e3, 500, 500, 494, 612, + 823, 713, 584, 549, 713, 979, 722, 274, 549, 549, 583, 549, 549, 604, 584, + 604, 604, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, + 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, + 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, + 708, 708, 708, 708, 729, 604, 604, 354, 354, 1e3, 990, 990, 990, 990, 494, + 604, 604, 604, 604, 354, 1021, 1052, 917, 750, 750, 531, 656, 594, 510, 500, + 750, 750, 611, 611, 333, 333, 333, 333, 333, 333, 333, 333, 222, 222, 333, + 333, 333, 333, 333, 333, 333, 333, + ], + Ka = [ + -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, + 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, + 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, 538, + 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, 902, 903, 904, + 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, + 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, + 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, + 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, + 968, 969, 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, + 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, + 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, + 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, + 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, + 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, + 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, + 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, + 1115, 1116, 1117, 1118, 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, + 7811, 7812, 7813, 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, + 8217, 8218, 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, + 8243, 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, + 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, 8594, + 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, 8734, 8735, + 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, 8992, 8993, 9472, + 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, 9524, 9532, 9552, 9553, + 9554, 9555, 9556, 9557, 9558, 9559, 9560, 9561, 9562, 9563, 9564, 9565, + 9566, 9567, 9568, 9569, 9570, 9571, 9572, 9573, 9574, 9575, 9576, 9577, + 9578, 9579, 9580, 9600, 9604, 9608, 9612, 9616, 9617, 9618, 9619, 9632, + 9633, 9642, 9643, 9644, 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, + 9689, 9702, 9786, 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, + 9835, 9836, 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + ], + Ta = [ + 365, 0, 333, 278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389, 584, + 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, + 333, 584, 584, 584, 611, 975, 722, 722, 722, 722, 667, 611, 778, 722, 278, + 556, 722, 611, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, + 667, 611, 333, 278, 333, 584, 556, 333, 556, 611, 556, 611, 556, 333, 611, + 611, 278, 278, 556, 278, 889, 611, 611, 611, 611, 389, 556, 333, 611, 556, + 778, 556, 556, 500, 389, 280, 389, 584, 333, 556, 556, 556, 556, 280, 556, + 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, 556, 278, + 333, 333, 365, 556, 834, 834, 834, 611, 722, 722, 722, 722, 722, 722, 1e3, + 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, + 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, + 556, 889, 556, 556, 556, 556, 556, 278, 278, 278, 278, 611, 611, 611, 611, + 611, 611, 611, 549, 611, 611, 611, 611, 611, 556, 611, 556, 722, 556, 722, + 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 740, 722, 611, + 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 611, 778, 611, 778, + 611, 778, 611, 722, 611, 722, 611, 278, 278, 278, 278, 278, 278, 278, 278, + 278, 278, 782, 556, 556, 278, 722, 556, 556, 611, 278, 611, 278, 611, 396, + 611, 479, 611, 278, 722, 611, 722, 611, 722, 611, 708, 723, 611, 778, 611, + 778, 611, 778, 611, 1e3, 944, 722, 389, 722, 389, 722, 389, 667, 556, 667, + 556, 667, 556, 667, 556, 611, 333, 611, 479, 611, 333, 722, 611, 722, 611, + 722, 611, 722, 611, 722, 611, 722, 611, 944, 778, 667, 556, 667, 611, 500, + 611, 500, 611, 500, 278, 556, 722, 556, 1e3, 889, 778, 611, 667, 556, 611, + 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 722, 333, 854, + 906, 473, 844, 930, 847, 278, 722, 722, 610, 671, 667, 611, 722, 778, 278, + 722, 667, 833, 722, 657, 778, 718, 667, 590, 611, 667, 822, 667, 829, 781, + 278, 667, 620, 479, 611, 278, 591, 620, 621, 556, 610, 479, 492, 611, 558, + 278, 566, 556, 603, 556, 450, 611, 712, 605, 532, 664, 409, 591, 704, 578, + 773, 834, 278, 591, 611, 591, 834, 667, 667, 886, 614, 719, 667, 278, 278, + 556, 1094, 1042, 854, 622, 719, 677, 719, 722, 708, 722, 614, 722, 667, 927, + 643, 719, 719, 615, 687, 833, 722, 778, 719, 667, 722, 611, 677, 781, 667, + 729, 708, 979, 989, 854, 1e3, 708, 719, 1042, 729, 556, 619, 604, 534, 618, + 556, 736, 510, 611, 611, 507, 622, 740, 604, 611, 611, 611, 556, 889, 556, + 885, 556, 646, 583, 889, 935, 707, 854, 594, 552, 865, 589, 556, 556, 611, + 469, 563, 556, 278, 278, 278, 969, 906, 611, 507, 619, 556, 611, 778, 611, + 575, 467, 944, 778, 944, 778, 944, 778, 667, 556, 333, 333, 556, 1e3, 1e3, + 552, 278, 278, 278, 278, 500, 500, 500, 556, 556, 350, 1e3, 1e3, 240, 479, + 333, 333, 604, 333, 167, 396, 556, 556, 1104, 556, 885, 516, 1146, 1e3, 768, + 600, 834, 834, 834, 834, 999, 500, 1e3, 500, 1e3, 500, 500, 494, 612, 823, + 713, 584, 549, 713, 979, 722, 274, 549, 549, 583, 549, 549, 604, 584, 604, + 604, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, + 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, + 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, + 708, 708, 708, 729, 604, 604, 354, 354, 1e3, 990, 990, 990, 990, 494, 604, + 604, 604, 604, 354, 1021, 1052, 917, 750, 750, 531, 656, 594, 510, 500, 750, + 750, 611, 611, 333, 333, 333, 333, 333, 333, 333, 333, 222, 222, 333, 333, + 333, 333, 333, 333, 333, 333, + ], + qa = [ + -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, + 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, + 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, 538, + 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, 902, 903, 904, + 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, + 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, + 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, + 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, + 968, 969, 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, + 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, + 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, + 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, + 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, + 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, + 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, + 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, + 1115, 1116, 1117, 1118, 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, + 7811, 7812, 7813, 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, + 8217, 8218, 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, + 8243, 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, + 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, 8594, + 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, 8734, 8735, + 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, 8992, 8993, 9472, + 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, 9524, 9532, 9552, 9553, + 9554, 9555, 9556, 9557, 9558, 9559, 9560, 9561, 9562, 9563, 9564, 9565, + 9566, 9567, 9568, 9569, 9570, 9571, 9572, 9573, 9574, 9575, 9576, 9577, + 9578, 9579, 9580, 9600, 9604, 9608, 9612, 9616, 9617, 9618, 9619, 9632, + 9633, 9642, 9643, 9644, 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, + 9689, 9702, 9786, 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, + 9835, 9836, 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + ], + Oa = [ + 365, 0, 333, 278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389, 584, + 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, + 278, 584, 584, 584, 556, 1015, 667, 667, 722, 722, 667, 611, 778, 722, 278, + 500, 667, 556, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, + 667, 611, 278, 278, 278, 469, 556, 333, 556, 556, 500, 556, 556, 278, 556, + 556, 222, 222, 500, 222, 833, 556, 556, 556, 556, 333, 500, 278, 556, 500, + 722, 500, 500, 500, 334, 260, 334, 584, 333, 556, 556, 556, 556, 260, 556, + 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, 537, 278, + 333, 333, 365, 556, 834, 834, 834, 611, 667, 667, 667, 667, 667, 667, 1e3, + 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, + 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, + 556, 889, 500, 556, 556, 556, 556, 278, 278, 278, 278, 556, 556, 556, 556, + 556, 556, 556, 549, 611, 556, 556, 556, 556, 500, 556, 500, 667, 556, 667, + 556, 667, 556, 722, 500, 722, 500, 722, 500, 722, 500, 722, 625, 722, 556, + 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 556, 778, 556, 778, + 556, 778, 556, 722, 556, 722, 556, 278, 278, 278, 278, 278, 278, 278, 222, + 278, 278, 733, 444, 500, 222, 667, 500, 500, 556, 222, 556, 222, 556, 281, + 556, 400, 556, 222, 722, 556, 722, 556, 722, 556, 615, 723, 556, 778, 556, + 778, 556, 778, 556, 1e3, 944, 722, 333, 722, 333, 722, 333, 667, 500, 667, + 500, 667, 500, 667, 500, 611, 278, 611, 354, 611, 278, 722, 556, 722, 556, + 722, 556, 722, 556, 722, 556, 722, 556, 944, 722, 667, 500, 667, 611, 500, + 611, 500, 611, 500, 222, 556, 667, 556, 1e3, 889, 778, 611, 667, 500, 611, + 278, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 667, 278, 789, + 846, 389, 794, 865, 775, 222, 667, 667, 570, 671, 667, 611, 722, 778, 278, + 667, 667, 833, 722, 648, 778, 725, 667, 600, 611, 667, 837, 667, 831, 761, + 278, 667, 570, 439, 555, 222, 550, 570, 571, 500, 556, 439, 463, 555, 542, + 222, 500, 492, 548, 500, 447, 556, 670, 573, 486, 603, 374, 550, 652, 546, + 728, 779, 222, 550, 556, 550, 779, 667, 667, 843, 544, 708, 667, 278, 278, + 500, 1066, 982, 844, 589, 715, 639, 724, 667, 651, 667, 544, 704, 667, 917, + 614, 715, 715, 589, 686, 833, 722, 778, 725, 667, 722, 611, 639, 795, 667, + 727, 673, 920, 923, 805, 886, 651, 694, 1022, 682, 556, 562, 522, 493, 553, + 556, 688, 465, 556, 556, 472, 564, 686, 550, 556, 556, 556, 500, 833, 500, + 835, 500, 572, 518, 830, 851, 621, 736, 526, 492, 752, 534, 556, 556, 556, + 378, 496, 500, 222, 222, 222, 910, 828, 556, 472, 565, 500, 556, 778, 556, + 492, 339, 944, 722, 944, 722, 944, 722, 667, 500, 333, 333, 556, 1e3, 1e3, + 552, 222, 222, 222, 222, 333, 333, 333, 556, 556, 350, 1e3, 1e3, 188, 354, + 333, 333, 500, 333, 167, 365, 556, 556, 1094, 556, 885, 323, 1083, 1e3, 768, + 600, 834, 834, 834, 834, 1e3, 500, 998, 500, 1e3, 500, 500, 494, 612, 823, + 713, 584, 549, 713, 979, 719, 274, 549, 549, 584, 549, 549, 604, 584, 604, + 604, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, + 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, + 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, + 708, 708, 708, 729, 604, 604, 354, 354, 1e3, 990, 990, 990, 990, 494, 604, + 604, 604, 604, 354, 1021, 1052, 917, 750, 750, 531, 656, 594, 510, 500, 750, + 750, 500, 500, 333, 333, 333, 333, 333, 333, 333, 333, 222, 222, 294, 294, + 324, 324, 316, 328, 398, 285, + ], + Pa = [ + -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, + 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, + 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, 538, + 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, 902, 903, 904, + 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, + 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, + 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, + 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, + 968, 969, 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, + 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, + 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, + 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, + 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, + 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, + 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, + 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, + 1115, 1116, 1117, 1118, 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, + 7811, 7812, 7813, 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, + 8217, 8218, 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, + 8243, 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, + 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, 8594, + 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, 8734, 8735, + 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, 8992, 8993, 9472, + 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, 9524, 9532, 9552, 9553, + 9554, 9555, 9556, 9557, 9558, 9559, 9560, 9561, 9562, 9563, 9564, 9565, + 9566, 9567, 9568, 9569, 9570, 9571, 9572, 9573, 9574, 9575, 9576, 9577, + 9578, 9579, 9580, 9600, 9604, 9608, 9612, 9616, 9617, 9618, 9619, 9632, + 9633, 9642, 9643, 9644, 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, + 9689, 9702, 9786, 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, + 9835, 9836, 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + ], + Wa = [ + 365, 0, 333, 278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389, 584, + 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, + 278, 584, 584, 584, 556, 1015, 667, 667, 722, 722, 667, 611, 778, 722, 278, + 500, 667, 556, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, + 667, 611, 278, 278, 278, 469, 556, 333, 556, 556, 500, 556, 556, 278, 556, + 556, 222, 222, 500, 222, 833, 556, 556, 556, 556, 333, 500, 278, 556, 500, + 722, 500, 500, 500, 334, 260, 334, 584, 333, 556, 556, 556, 556, 260, 556, + 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, 537, 278, + 333, 333, 365, 556, 834, 834, 834, 611, 667, 667, 667, 667, 667, 667, 1e3, + 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, + 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, + 556, 889, 500, 556, 556, 556, 556, 278, 278, 278, 278, 556, 556, 556, 556, + 556, 556, 556, 549, 611, 556, 556, 556, 556, 500, 556, 500, 667, 556, 667, + 556, 667, 556, 722, 500, 722, 500, 722, 500, 722, 500, 722, 615, 722, 556, + 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 556, 778, 556, 778, + 556, 778, 556, 722, 556, 722, 556, 278, 278, 278, 278, 278, 278, 278, 222, + 278, 278, 735, 444, 500, 222, 667, 500, 500, 556, 222, 556, 222, 556, 292, + 556, 334, 556, 222, 722, 556, 722, 556, 722, 556, 604, 723, 556, 778, 556, + 778, 556, 778, 556, 1e3, 944, 722, 333, 722, 333, 722, 333, 667, 500, 667, + 500, 667, 500, 667, 500, 611, 278, 611, 375, 611, 278, 722, 556, 722, 556, + 722, 556, 722, 556, 722, 556, 722, 556, 944, 722, 667, 500, 667, 611, 500, + 611, 500, 611, 500, 222, 556, 667, 556, 1e3, 889, 778, 611, 667, 500, 611, + 278, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 667, 278, 784, + 838, 384, 774, 855, 752, 222, 667, 667, 551, 668, 667, 611, 722, 778, 278, + 667, 668, 833, 722, 650, 778, 722, 667, 618, 611, 667, 798, 667, 835, 748, + 278, 667, 578, 446, 556, 222, 547, 578, 575, 500, 557, 446, 441, 556, 556, + 222, 500, 500, 576, 500, 448, 556, 690, 569, 482, 617, 395, 547, 648, 525, + 713, 781, 222, 547, 556, 547, 781, 667, 667, 865, 542, 719, 667, 278, 278, + 500, 1057, 1010, 854, 583, 722, 635, 719, 667, 656, 667, 542, 677, 667, 923, + 604, 719, 719, 583, 656, 833, 722, 778, 719, 667, 722, 611, 635, 760, 667, + 740, 667, 917, 938, 792, 885, 656, 719, 1010, 722, 556, 573, 531, 365, 583, + 556, 669, 458, 559, 559, 438, 583, 688, 552, 556, 542, 556, 500, 458, 500, + 823, 500, 573, 521, 802, 823, 625, 719, 521, 510, 750, 542, 556, 556, 556, + 365, 510, 500, 222, 278, 222, 906, 812, 556, 438, 559, 500, 552, 778, 556, + 489, 411, 944, 722, 944, 722, 944, 722, 667, 500, 333, 333, 556, 1e3, 1e3, + 552, 222, 222, 222, 222, 333, 333, 333, 556, 556, 350, 1e3, 1e3, 188, 354, + 333, 333, 500, 333, 167, 365, 556, 556, 1094, 556, 885, 323, 1073, 1e3, 768, + 600, 834, 834, 834, 834, 1e3, 500, 1e3, 500, 1e3, 500, 500, 494, 612, 823, + 713, 584, 549, 713, 979, 719, 274, 549, 549, 583, 549, 549, 604, 584, 604, + 604, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, + 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, + 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, + 708, 708, 708, 729, 604, 604, 354, 354, 1e3, 990, 990, 990, 990, 494, 604, + 604, 604, 604, 354, 1021, 1052, 917, 750, 750, 531, 656, 594, 510, 500, 750, + 750, 500, 500, 333, 333, 333, 333, 333, 333, 333, 333, 222, 222, 294, 294, + 324, 324, 316, 328, 398, 285, + ], + Xa = [ + -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, + 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, + 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, 538, + 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, 902, 903, 904, + 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, + 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, + 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, + 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, + 968, 969, 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, + 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, + 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, + 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, + 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, + 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, + 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, + 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, + 1115, 1116, 1117, 1118, 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, + 7811, 7812, 7813, 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, + 8217, 8218, 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, + 8243, 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, + 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, 8594, + 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, 8734, 8735, + 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, 8992, 8993, 9472, + 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, 9524, 9532, 9552, 9553, + 9554, 9555, 9556, 9557, 9558, 9559, 9560, 9561, 9562, 9563, 9564, 9565, + 9566, 9567, 9568, 9569, 9570, 9571, 9572, 9573, 9574, 9575, 9576, 9577, + 9578, 9579, 9580, 9600, 9604, 9608, 9612, 9616, 9617, 9618, 9619, 9632, + 9633, 9642, 9643, 9644, 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, + 9689, 9702, 9786, 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, + 9835, 9836, 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, + ], + ja = [ + 1.36898, 1, 1, 0.72706, 0.80479, 0.83734, 0.98894, 0.99793, 0.9897, 0.93884, + 0.86209, 0.94292, 0.94292, 1.16661, 1.02058, 0.93582, 0.96694, 0.93582, + 1.19137, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, + 0.99793, 0.99793, 0.99793, 0.78076, 0.78076, 1.02058, 1.02058, 1.02058, + 0.72851, 0.78966, 0.90838, 0.83637, 0.82391, 0.96376, 0.80061, 0.86275, + 0.8768, 0.95407, 1.0258, 0.73901, 0.85022, 0.83655, 1.0156, 0.95546, + 0.92179, 0.87107, 0.92179, 0.82114, 0.8096, 0.89713, 0.94438, 0.95353, + 0.94083, 0.91905, 0.90406, 0.9446, 0.94292, 1.18777, 0.94292, 1.02058, + 0.89903, 0.90088, 0.94938, 0.97898, 0.81093, 0.97571, 0.94938, 1.024, + 0.9577, 0.95933, 0.98621, 1.0474, 0.97455, 0.98981, 0.9672, 0.95933, 0.9446, + 0.97898, 0.97407, 0.97646, 0.78036, 1.10208, 0.95442, 0.95298, 0.97579, + 0.9332, 0.94039, 0.938, 0.80687, 1.01149, 0.80687, 1.02058, 0.80479, + 0.99793, 0.99793, 0.99793, 0.99793, 1.01149, 1.00872, 0.90088, 0.91882, + 1.0213, 0.8361, 1.02058, 0.62295, 0.54324, 0.89022, 1.08595, 1, 1, 0.90088, + 1, 0.97455, 0.93582, 0.90088, 1, 1.05686, 0.8361, 0.99642, 0.99642, 0.99642, + 0.72851, 0.90838, 0.90838, 0.90838, 0.90838, 0.90838, 0.90838, 0.868, + 0.82391, 0.80061, 0.80061, 0.80061, 0.80061, 1.0258, 1.0258, 1.0258, 1.0258, + 0.97484, 0.95546, 0.92179, 0.92179, 0.92179, 0.92179, 0.92179, 1.02058, + 0.92179, 0.94438, 0.94438, 0.94438, 0.94438, 0.90406, 0.86958, 0.98225, + 0.94938, 0.94938, 0.94938, 0.94938, 0.94938, 0.94938, 0.9031, 0.81093, + 0.94938, 0.94938, 0.94938, 0.94938, 0.98621, 0.98621, 0.98621, 0.98621, + 0.93969, 0.95933, 0.9446, 0.9446, 0.9446, 0.9446, 0.9446, 1.08595, 0.9446, + 0.95442, 0.95442, 0.95442, 0.95442, 0.94039, 0.97898, 0.94039, 0.90838, + 0.94938, 0.90838, 0.94938, 0.90838, 0.94938, 0.82391, 0.81093, 0.82391, + 0.81093, 0.82391, 0.81093, 0.82391, 0.81093, 0.96376, 0.84313, 0.97484, + 0.97571, 0.80061, 0.94938, 0.80061, 0.94938, 0.80061, 0.94938, 0.80061, + 0.94938, 0.80061, 0.94938, 0.8768, 0.9577, 0.8768, 0.9577, 0.8768, 0.9577, + 1, 1, 0.95407, 0.95933, 0.97069, 0.95933, 1.0258, 0.98621, 1.0258, 0.98621, + 1.0258, 0.98621, 1.0258, 0.98621, 1.0258, 0.98621, 0.887, 1.01591, 0.73901, + 1.0474, 1, 1, 0.97455, 0.83655, 0.98981, 1, 1, 0.83655, 0.73977, 0.83655, + 0.73903, 0.84638, 1.033, 0.95546, 0.95933, 1, 1, 0.95546, 0.95933, 0.8271, + 0.95417, 0.95933, 0.92179, 0.9446, 0.92179, 0.9446, 0.92179, 0.9446, 0.936, + 0.91964, 0.82114, 0.97646, 1, 1, 0.82114, 0.97646, 0.8096, 0.78036, 0.8096, + 0.78036, 1, 1, 0.8096, 0.78036, 1, 1, 0.89713, 0.77452, 0.89713, 1.10208, + 0.94438, 0.95442, 0.94438, 0.95442, 0.94438, 0.95442, 0.94438, 0.95442, + 0.94438, 0.95442, 0.94438, 0.95442, 0.94083, 0.97579, 0.90406, 0.94039, + 0.90406, 0.9446, 0.938, 0.9446, 0.938, 0.9446, 0.938, 1, 0.99793, 0.90838, + 0.94938, 0.868, 0.9031, 0.92179, 0.9446, 1, 1, 0.89713, 1.10208, 0.90088, + 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, + 0.90989, 0.9358, 0.91945, 0.83181, 0.75261, 0.87992, 0.82976, 0.96034, + 0.83689, 0.97268, 1.0078, 0.90838, 0.83637, 0.8019, 0.90157, 0.80061, + 0.9446, 0.95407, 0.92436, 1.0258, 0.85022, 0.97153, 1.0156, 0.95546, + 0.89192, 0.92179, 0.92361, 0.87107, 0.96318, 0.89713, 0.93704, 0.95638, + 0.91905, 0.91709, 0.92796, 1.0258, 0.93704, 0.94836, 1.0373, 0.95933, + 1.0078, 0.95871, 0.94836, 0.96174, 0.92601, 0.9498, 0.98607, 0.95776, + 0.95933, 1.05453, 1.0078, 0.98275, 0.9314, 0.95617, 0.91701, 1.05993, + 0.9446, 0.78367, 0.9553, 1, 0.86832, 1.0128, 0.95871, 0.99394, 0.87548, + 0.96361, 0.86774, 1.0078, 0.95871, 0.9446, 0.95871, 0.86774, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.94083, + 0.97579, 0.94083, 0.97579, 0.94083, 0.97579, 0.90406, 0.94039, 0.96694, 1, + 0.89903, 1, 1, 1, 0.93582, 0.93582, 0.93582, 1, 0.908, 0.908, 0.918, + 0.94219, 0.94219, 0.96544, 1, 1.285, 1, 1, 0.81079, 0.81079, 1, 1, 0.74854, + 1, 1, 1, 1, 0.99793, 1, 1, 1, 0.65, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1.17173, 1, 0.80535, 0.76169, 1.02058, 1.0732, 1.05486, 1, 1, 1.30692, + 1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1.16161, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + ], + Za = { lineHeight: 1.2, lineGap: 0.2 }, + Va = [ + 1.36898, 1, 1, 0.66227, 0.80779, 0.81625, 0.97276, 0.97276, 0.97733, + 0.92222, 0.83266, 0.94292, 0.94292, 1.16148, 1.02058, 0.93582, 0.96694, + 0.93582, 1.17337, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, + 0.97276, 0.97276, 0.97276, 0.97276, 0.78076, 0.78076, 1.02058, 1.02058, + 1.02058, 0.71541, 0.76813, 0.85576, 0.80591, 0.80729, 0.94299, 0.77512, + 0.83655, 0.86523, 0.92222, 0.98621, 0.71743, 0.81698, 0.79726, 0.98558, + 0.92222, 0.90637, 0.83809, 0.90637, 0.80729, 0.76463, 0.86275, 0.90699, + 0.91605, 0.9154, 0.85308, 0.85458, 0.90531, 0.94292, 1.21296, 0.94292, + 1.02058, 0.89903, 1.18616, 0.99613, 0.91677, 0.78216, 0.91677, 0.90083, + 0.98796, 0.9135, 0.92168, 0.95381, 0.98981, 0.95298, 0.95381, 0.93459, + 0.92168, 0.91513, 0.92004, 0.91677, 0.95077, 0.748, 1.04502, 0.91677, + 0.92061, 0.94236, 0.89544, 0.89364, 0.9, 0.80687, 0.8578, 0.80687, 1.02058, + 0.80779, 0.97276, 0.97276, 0.97276, 0.97276, 0.8578, 0.99973, 1.18616, + 0.91339, 1.08074, 0.82891, 1.02058, 0.55509, 0.71526, 0.89022, 1.08595, 1, + 1, 1.18616, 1, 0.96736, 0.93582, 1.18616, 1, 1.04864, 0.82711, 0.99043, + 0.99043, 0.99043, 0.71541, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576, + 0.85576, 0.845, 0.80729, 0.77512, 0.77512, 0.77512, 0.77512, 0.98621, + 0.98621, 0.98621, 0.98621, 0.95961, 0.92222, 0.90637, 0.90637, 0.90637, + 0.90637, 0.90637, 1.02058, 0.90251, 0.90699, 0.90699, 0.90699, 0.90699, + 0.85458, 0.83659, 0.94951, 0.99613, 0.99613, 0.99613, 0.99613, 0.99613, + 0.99613, 0.85811, 0.78216, 0.90083, 0.90083, 0.90083, 0.90083, 0.95381, + 0.95381, 0.95381, 0.95381, 0.9135, 0.92168, 0.91513, 0.91513, 0.91513, + 0.91513, 0.91513, 1.08595, 0.91677, 0.91677, 0.91677, 0.91677, 0.91677, + 0.89364, 0.92332, 0.89364, 0.85576, 0.99613, 0.85576, 0.99613, 0.85576, + 0.99613, 0.80729, 0.78216, 0.80729, 0.78216, 0.80729, 0.78216, 0.80729, + 0.78216, 0.94299, 0.76783, 0.95961, 0.91677, 0.77512, 0.90083, 0.77512, + 0.90083, 0.77512, 0.90083, 0.77512, 0.90083, 0.77512, 0.90083, 0.86523, + 0.9135, 0.86523, 0.9135, 0.86523, 0.9135, 1, 1, 0.92222, 0.92168, 0.92222, + 0.92168, 0.98621, 0.95381, 0.98621, 0.95381, 0.98621, 0.95381, 0.98621, + 0.95381, 0.98621, 0.95381, 0.86036, 0.97096, 0.71743, 0.98981, 1, 1, + 0.95298, 0.79726, 0.95381, 1, 1, 0.79726, 0.6894, 0.79726, 0.74321, 0.81691, + 1.0006, 0.92222, 0.92168, 1, 1, 0.92222, 0.92168, 0.79464, 0.92098, 0.92168, + 0.90637, 0.91513, 0.90637, 0.91513, 0.90637, 0.91513, 0.909, 0.87514, + 0.80729, 0.95077, 1, 1, 0.80729, 0.95077, 0.76463, 0.748, 0.76463, 0.748, 1, + 1, 0.76463, 0.748, 1, 1, 0.86275, 0.72651, 0.86275, 1.04502, 0.90699, + 0.91677, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, + 0.91677, 0.90699, 0.91677, 0.9154, 0.94236, 0.85458, 0.89364, 0.85458, + 0.90531, 0.9, 0.90531, 0.9, 0.90531, 0.9, 1, 0.97276, 0.85576, 0.99613, + 0.845, 0.85811, 0.90251, 0.91677, 1, 1, 0.86275, 1.04502, 1.18616, 1.18616, + 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.00899, + 1.30628, 0.85576, 0.80178, 0.66862, 0.7927, 0.69323, 0.88127, 0.72459, + 0.89711, 0.95381, 0.85576, 0.80591, 0.7805, 0.94729, 0.77512, 0.90531, + 0.92222, 0.90637, 0.98621, 0.81698, 0.92655, 0.98558, 0.92222, 0.85359, + 0.90637, 0.90976, 0.83809, 0.94523, 0.86275, 0.83509, 0.93157, 0.85308, + 0.83392, 0.92346, 0.98621, 0.83509, 0.92886, 0.91324, 0.92168, 0.95381, + 0.90646, 0.92886, 0.90557, 0.86847, 0.90276, 0.91324, 0.86842, 0.92168, + 0.99531, 0.95381, 0.9224, 0.85408, 0.92699, 0.86847, 1.0051, 0.91513, + 0.80487, 0.93481, 1, 0.88159, 1.05214, 0.90646, 0.97355, 0.81539, 0.89398, + 0.85923, 0.95381, 0.90646, 0.91513, 0.90646, 0.85923, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.9154, 0.94236, + 0.9154, 0.94236, 0.9154, 0.94236, 0.85458, 0.89364, 0.96694, 1, 0.89903, 1, + 1, 1, 0.91782, 0.91782, 0.91782, 1, 0.896, 0.896, 0.896, 0.9332, 0.9332, + 0.95973, 1, 1.26, 1, 1, 0.80479, 0.80178, 1, 1, 0.85633, 1, 1, 1, 1, + 0.97276, 1, 1, 1, 0.698, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1.14542, 1, 0.79199, 0.78694, 1.02058, 1.03493, 1.05486, 1, 1, 1.23026, + 1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1.20006, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + ], + za = { lineHeight: 1.2, lineGap: 0.2 }, + _a = [ + 1.36898, 1, 1, 0.65507, 0.84943, 0.85639, 0.88465, 0.88465, 0.86936, + 0.88307, 0.86948, 0.85283, 0.85283, 1.06383, 1.02058, 0.75945, 0.9219, + 0.75945, 1.17337, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, + 0.88465, 0.88465, 0.88465, 0.88465, 0.75945, 0.75945, 1.02058, 1.02058, + 1.02058, 0.69046, 0.70926, 0.85158, 0.77812, 0.76852, 0.89591, 0.70466, + 0.76125, 0.80094, 0.86822, 0.83864, 0.728, 0.77212, 0.79475, 0.93637, + 0.87514, 0.8588, 0.76013, 0.8588, 0.72421, 0.69866, 0.77598, 0.85991, + 0.80811, 0.87832, 0.78112, 0.77512, 0.8562, 1.0222, 1.18417, 1.0222, + 1.27014, 0.89903, 1.15012, 0.93859, 0.94399, 0.846, 0.94399, 0.81453, + 1.0186, 0.94219, 0.96017, 1.03075, 1.02175, 0.912, 1.03075, 0.96998, + 0.96017, 0.93859, 0.94399, 0.94399, 0.95493, 0.746, 1.12658, 0.94578, 0.91, + 0.979, 0.882, 0.882, 0.83, 0.85034, 0.83537, 0.85034, 1.02058, 0.70869, + 0.88465, 0.88465, 0.88465, 0.88465, 0.83537, 0.90083, 1.15012, 0.9161, + 0.94565, 0.73541, 1.02058, 0.53609, 0.69353, 0.79519, 1.08595, 1, 1, + 1.15012, 1, 0.91974, 0.75945, 1.15012, 1, 0.9446, 0.73361, 0.9005, 0.9005, + 0.9005, 0.62864, 0.85158, 0.85158, 0.85158, 0.85158, 0.85158, 0.85158, + 0.773, 0.76852, 0.70466, 0.70466, 0.70466, 0.70466, 0.83864, 0.83864, + 0.83864, 0.83864, 0.90561, 0.87514, 0.8588, 0.8588, 0.8588, 0.8588, 0.8588, + 1.02058, 0.85751, 0.85991, 0.85991, 0.85991, 0.85991, 0.77512, 0.76013, + 0.88075, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859, 0.8075, + 0.846, 0.81453, 0.81453, 0.81453, 0.81453, 0.82424, 0.82424, 0.82424, + 0.82424, 0.9278, 0.96017, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859, + 1.08595, 0.8562, 0.94578, 0.94578, 0.94578, 0.94578, 0.882, 0.94578, 0.882, + 0.85158, 0.93859, 0.85158, 0.93859, 0.85158, 0.93859, 0.76852, 0.846, + 0.76852, 0.846, 0.76852, 0.846, 0.76852, 0.846, 0.89591, 0.8544, 0.90561, + 0.94399, 0.70466, 0.81453, 0.70466, 0.81453, 0.70466, 0.81453, 0.70466, + 0.81453, 0.70466, 0.81453, 0.80094, 0.94219, 0.80094, 0.94219, 0.80094, + 0.94219, 1, 1, 0.86822, 0.96017, 0.86822, 0.96017, 0.83864, 0.82424, + 0.83864, 0.82424, 0.83864, 0.82424, 0.83864, 1.03075, 0.83864, 0.82424, + 0.81402, 1.02738, 0.728, 1.02175, 1, 1, 0.912, 0.79475, 1.03075, 1, 1, + 0.79475, 0.83911, 0.79475, 0.66266, 0.80553, 1.06676, 0.87514, 0.96017, 1, + 1, 0.87514, 0.96017, 0.86865, 0.87396, 0.96017, 0.8588, 0.93859, 0.8588, + 0.93859, 0.8588, 0.93859, 0.867, 0.84759, 0.72421, 0.95493, 1, 1, 0.72421, + 0.95493, 0.69866, 0.746, 0.69866, 0.746, 1, 1, 0.69866, 0.746, 1, 1, + 0.77598, 0.88417, 0.77598, 1.12658, 0.85991, 0.94578, 0.85991, 0.94578, + 0.85991, 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, + 0.87832, 0.979, 0.77512, 0.882, 0.77512, 0.8562, 0.83, 0.8562, 0.83, 0.8562, + 0.83, 1, 0.88465, 0.85158, 0.93859, 0.773, 0.8075, 0.85751, 0.8562, 1, 1, + 0.77598, 1.12658, 1.15012, 1.15012, 1.15012, 1.15012, 1.15012, 1.15313, + 1.15012, 1.15012, 1.15012, 1.08106, 1.03901, 0.85158, 0.77025, 0.62264, + 0.7646, 0.65351, 0.86026, 0.69461, 0.89947, 1.03075, 0.85158, 0.77812, + 0.76449, 0.88836, 0.70466, 0.8562, 0.86822, 0.8588, 0.83864, 0.77212, + 0.85308, 0.93637, 0.87514, 0.82352, 0.8588, 0.85701, 0.76013, 0.89058, + 0.77598, 0.8156, 0.82565, 0.78112, 0.77899, 0.89386, 0.83864, 0.8156, + 0.9486, 0.92388, 0.96186, 1.03075, 0.91123, 0.9486, 0.93298, 0.878, 0.93942, + 0.92388, 0.84596, 0.96186, 0.95119, 1.03075, 0.922, 0.88787, 0.95829, 0.88, + 0.93559, 0.93859, 0.78815, 0.93758, 1, 0.89217, 1.03737, 0.91123, 0.93969, + 0.77487, 0.85769, 0.86799, 1.03075, 0.91123, 0.93859, 0.91123, 0.86799, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0.87832, 0.979, 0.87832, 0.979, 0.87832, 0.979, 0.77512, 0.882, 0.9219, 1, + 0.89903, 1, 1, 1, 0.87321, 0.87321, 0.87321, 1, 1.027, 1.027, 1.027, + 0.86847, 0.86847, 0.79121, 1, 1.124, 1, 1, 0.73572, 0.73572, 1, 1, 0.85034, + 1, 1, 1, 1, 0.88465, 1, 1, 1, 0.669, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1.04828, 1, 0.74948, 0.75187, 1.02058, 0.98391, 1.02119, 1, 1, + 1.06233, 1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1.05233, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + ], + $a = { lineHeight: 1.2, lineGap: 0.2 }, + As = [ + 1.36898, 1, 1, 0.76305, 0.82784, 0.94935, 0.89364, 0.92241, 0.89073, + 0.90706, 0.98472, 0.85283, 0.85283, 1.0664, 1.02058, 0.74505, 0.9219, + 0.74505, 1.23456, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, + 0.92241, 0.92241, 0.92241, 0.92241, 0.74505, 0.74505, 1.02058, 1.02058, + 1.02058, 0.73002, 0.72601, 0.91755, 0.8126, 0.80314, 0.92222, 0.73764, + 0.79726, 0.83051, 0.90284, 0.86023, 0.74, 0.8126, 0.84869, 0.96518, 0.91115, + 0.8858, 0.79761, 0.8858, 0.74498, 0.73914, 0.81363, 0.89591, 0.83659, + 0.89633, 0.85608, 0.8111, 0.90531, 1.0222, 1.22736, 1.0222, 1.27014, + 0.89903, 0.90088, 0.86667, 1.0231, 0.896, 1.01411, 0.90083, 1.05099, + 1.00512, 0.99793, 1.05326, 1.09377, 0.938, 1.06226, 1.00119, 0.99793, + 0.98714, 1.0231, 1.01231, 0.98196, 0.792, 1.19137, 0.99074, 0.962, 1.01915, + 0.926, 0.942, 0.856, 0.85034, 0.92006, 0.85034, 1.02058, 0.69067, 0.92241, + 0.92241, 0.92241, 0.92241, 0.92006, 0.9332, 0.90088, 0.91882, 0.93484, + 0.75339, 1.02058, 0.56866, 0.54324, 0.79519, 1.08595, 1, 1, 0.90088, 1, + 0.95325, 0.74505, 0.90088, 1, 0.97198, 0.75339, 0.91009, 0.91009, 0.91009, + 0.66466, 0.91755, 0.91755, 0.91755, 0.91755, 0.91755, 0.91755, 0.788, + 0.80314, 0.73764, 0.73764, 0.73764, 0.73764, 0.86023, 0.86023, 0.86023, + 0.86023, 0.92915, 0.91115, 0.8858, 0.8858, 0.8858, 0.8858, 0.8858, 1.02058, + 0.8858, 0.89591, 0.89591, 0.89591, 0.89591, 0.8111, 0.79611, 0.89713, + 0.86667, 0.86667, 0.86667, 0.86667, 0.86667, 0.86667, 0.86936, 0.896, + 0.90083, 0.90083, 0.90083, 0.90083, 0.84224, 0.84224, 0.84224, 0.84224, + 0.97276, 0.99793, 0.98714, 0.98714, 0.98714, 0.98714, 0.98714, 1.08595, + 0.89876, 0.99074, 0.99074, 0.99074, 0.99074, 0.942, 1.0231, 0.942, 0.91755, + 0.86667, 0.91755, 0.86667, 0.91755, 0.86667, 0.80314, 0.896, 0.80314, 0.896, + 0.80314, 0.896, 0.80314, 0.896, 0.92222, 0.93372, 0.92915, 1.01411, 0.73764, + 0.90083, 0.73764, 0.90083, 0.73764, 0.90083, 0.73764, 0.90083, 0.73764, + 0.90083, 0.83051, 1.00512, 0.83051, 1.00512, 0.83051, 1.00512, 1, 1, + 0.90284, 0.99793, 0.90976, 0.99793, 0.86023, 0.84224, 0.86023, 0.84224, + 0.86023, 0.84224, 0.86023, 1.05326, 0.86023, 0.84224, 0.82873, 1.07469, + 0.74, 1.09377, 1, 1, 0.938, 0.84869, 1.06226, 1, 1, 0.84869, 0.83704, + 0.84869, 0.81441, 0.85588, 1.08927, 0.91115, 0.99793, 1, 1, 0.91115, + 0.99793, 0.91887, 0.90991, 0.99793, 0.8858, 0.98714, 0.8858, 0.98714, + 0.8858, 0.98714, 0.894, 0.91434, 0.74498, 0.98196, 1, 1, 0.74498, 0.98196, + 0.73914, 0.792, 0.73914, 0.792, 1, 1, 0.73914, 0.792, 1, 1, 0.81363, 0.904, + 0.81363, 1.19137, 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, + 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, 0.89633, 1.01915, + 0.8111, 0.942, 0.8111, 0.90531, 0.856, 0.90531, 0.856, 0.90531, 0.856, 1, + 0.92241, 0.91755, 0.86667, 0.788, 0.86936, 0.8858, 0.89876, 1, 1, 0.81363, + 1.19137, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, + 0.90088, 0.90088, 0.90388, 1.03901, 0.92138, 0.78105, 0.7154, 0.86169, + 0.80513, 0.94007, 0.82528, 0.98612, 1.06226, 0.91755, 0.8126, 0.81884, + 0.92819, 0.73764, 0.90531, 0.90284, 0.8858, 0.86023, 0.8126, 0.91172, + 0.96518, 0.91115, 0.83089, 0.8858, 0.87791, 0.79761, 0.89297, 0.81363, + 0.88157, 0.89992, 0.85608, 0.81992, 0.94307, 0.86023, 0.88157, 0.95308, + 0.98699, 0.99793, 1.06226, 0.95817, 0.95308, 0.97358, 0.928, 0.98088, + 0.98699, 0.92761, 0.99793, 0.96017, 1.06226, 0.986, 0.944, 0.95978, 0.938, + 0.96705, 0.98714, 0.80442, 0.98972, 1, 0.89762, 1.04552, 0.95817, 0.99007, + 0.87064, 0.91879, 0.88888, 1.06226, 0.95817, 0.98714, 0.95817, 0.88888, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0.89633, 1.01915, 0.89633, 1.01915, 0.89633, 1.01915, 0.8111, 0.942, 0.9219, + 1, 0.89903, 1, 1, 1, 0.93173, 0.93173, 0.93173, 1, 1.06304, 1.06304, + 1.06904, 0.89903, 0.89903, 0.80549, 1, 1.156, 1, 1, 0.76575, 0.76575, 1, 1, + 0.72458, 1, 1, 1, 1, 0.92241, 1, 1, 1, 0.619, 1, 1.36145, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1.07257, 1, 0.74705, 0.71119, 1.02058, 1.024, 1.02119, 1, 1, + 1.1536, 1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1.05638, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + ], + es = { lineHeight: 1.2, lineGap: 0.2 }, + ts = [ + 1.76738, 1, 1, 0.99297, 0.9824, 1.04016, 1.06497, 1.03424, 0.97529, 1.17647, + 1.23203, 1.1085, 1.1085, 1.16939, 1.2107, 0.9754, 1.21408, 0.9754, 1.59578, + 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, + 1.03424, 1.03424, 0.81378, 0.81378, 1.2107, 1.2107, 1.2107, 0.71703, + 0.97847, 0.97363, 0.88776, 0.8641, 1.02096, 0.79795, 0.85132, 0.914, + 1.06085, 1.1406, 0.8007, 0.89858, 0.83693, 1.14889, 1.09398, 0.97489, + 0.92094, 0.97489, 0.90399, 0.84041, 0.95923, 1.00135, 1, 1.06467, 0.98243, + 0.90996, 0.99361, 1.1085, 1.56942, 1.1085, 1.2107, 0.74627, 0.94282, + 0.96752, 1.01519, 0.86304, 1.01359, 0.97278, 1.15103, 1.01359, 0.98561, + 1.02285, 1.02285, 1.00527, 1.02285, 1.0302, 0.99041, 1.0008, 1.01519, + 1.01359, 1.02258, 0.79104, 1.16862, 0.99041, 0.97454, 1.02511, 0.99298, + 0.96752, 0.95801, 0.94856, 1.16579, 0.94856, 1.2107, 0.9824, 1.03424, + 1.03424, 1, 1.03424, 1.16579, 0.8727, 1.3871, 1.18622, 1.10818, 1.04478, + 1.2107, 1.18622, 0.75155, 0.94994, 1.28826, 1.21408, 1.21408, 0.91056, 1, + 0.91572, 0.9754, 0.64663, 1.18328, 1.24866, 1.04478, 1.14169, 1.15749, + 1.17389, 0.71703, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, + 0.93506, 0.8641, 0.79795, 0.79795, 0.79795, 0.79795, 1.1406, 1.1406, 1.1406, + 1.1406, 1.02096, 1.09398, 0.97426, 0.97426, 0.97426, 0.97426, 0.97426, + 1.2107, 0.97489, 1.00135, 1.00135, 1.00135, 1.00135, 0.90996, 0.92094, + 1.02798, 0.96752, 0.96752, 0.96752, 0.96752, 0.96752, 0.96752, 0.93136, + 0.86304, 0.97278, 0.97278, 0.97278, 0.97278, 1.02285, 1.02285, 1.02285, + 1.02285, 0.97122, 0.99041, 1, 1, 1, 1, 1, 1.28826, 1.0008, 0.99041, 0.99041, + 0.99041, 0.99041, 0.96752, 1.01519, 0.96752, 0.97363, 0.96752, 0.97363, + 0.96752, 0.97363, 0.96752, 0.8641, 0.86304, 0.8641, 0.86304, 0.8641, + 0.86304, 0.8641, 0.86304, 1.02096, 1.03057, 1.02096, 1.03517, 0.79795, + 0.97278, 0.79795, 0.97278, 0.79795, 0.97278, 0.79795, 0.97278, 0.79795, + 0.97278, 0.914, 1.01359, 0.914, 1.01359, 0.914, 1.01359, 1, 1, 1.06085, + 0.98561, 1.06085, 1.00879, 1.1406, 1.02285, 1.1406, 1.02285, 1.1406, + 1.02285, 1.1406, 1.02285, 1.1406, 1.02285, 0.97138, 1.08692, 0.8007, + 1.02285, 1, 1, 1.00527, 0.83693, 1.02285, 1, 1, 0.83693, 0.9455, 0.83693, + 0.90418, 0.83693, 1.13005, 1.09398, 0.99041, 1, 1, 1.09398, 0.99041, + 0.96692, 1.09251, 0.99041, 0.97489, 1.0008, 0.97489, 1.0008, 0.97489, + 1.0008, 0.93994, 0.97931, 0.90399, 1.02258, 1, 1, 0.90399, 1.02258, 0.84041, + 0.79104, 0.84041, 0.79104, 0.84041, 0.79104, 0.84041, 0.79104, 1, 1, + 0.95923, 1.07034, 0.95923, 1.16862, 1.00135, 0.99041, 1.00135, 0.99041, + 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, + 1.06467, 1.02511, 0.90996, 0.96752, 0.90996, 0.99361, 0.95801, 0.99361, + 0.95801, 0.99361, 0.95801, 1.07733, 1.03424, 0.97363, 0.96752, 0.93506, + 0.93136, 0.97489, 1.0008, 1, 1, 0.95923, 1.16862, 1.15103, 1.15103, 1.01173, + 1.03959, 0.75953, 0.81378, 0.79912, 1.15103, 1.21994, 0.95161, 0.87815, + 1.01149, 0.81525, 0.7676, 0.98167, 1.01134, 1.02546, 0.84097, 1.03089, + 1.18102, 0.97363, 0.88776, 0.85134, 0.97826, 0.79795, 0.99361, 1.06085, + 0.97489, 1.1406, 0.89858, 1.0388, 1.14889, 1.09398, 0.86039, 0.97489, + 1.0595, 0.92094, 0.94793, 0.95923, 0.90996, 0.99346, 0.98243, 1.02112, + 0.95493, 1.1406, 0.90996, 1.03574, 1.02597, 1.0008, 1.18102, 1.06628, + 1.03574, 1.0192, 1.01932, 1.00886, 0.97531, 1.0106, 1.0008, 1.13189, + 1.18102, 1.02277, 0.98683, 1.0016, 0.99561, 1.07237, 1.0008, 0.90434, + 0.99921, 0.93803, 0.8965, 1.23085, 1.06628, 1.04983, 0.96268, 1.0499, + 0.98439, 1.18102, 1.06628, 1.0008, 1.06628, 0.98439, 0.79795, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1.09466, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0.97278, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.02065, 1, 1, 1, 1, 1, 1, + 1.06467, 1.02511, 1.06467, 1.02511, 1.06467, 1.02511, 0.90996, 0.96752, 1, + 1.21408, 0.89903, 1, 1, 0.75155, 1.04394, 1.04394, 1.04394, 1.04394, + 0.98633, 0.98633, 0.98633, 0.73047, 0.73047, 1.20642, 0.91211, 1.25635, + 1.222, 1.02956, 1.03372, 1.03372, 0.96039, 1.24633, 1, 1.12454, 0.93503, + 1.03424, 1.19687, 1.03424, 1, 1, 1, 0.771, 1, 1, 1.15749, 1.15749, 1.15749, + 1.10948, 0.86279, 0.94434, 0.86279, 0.94434, 0.86182, 1, 1, 1.16897, 1, + 0.96085, 0.90137, 1.2107, 1.18416, 1.13973, 0.69825, 0.9716, 2.10339, + 1.29004, 1.29004, 1.21172, 1.29004, 1.29004, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.42603, 1, 0.99862, + 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025, 1.18874, 1.42603, 1, + 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, + 1, 1, 1, 1.09193, 1.09193, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, + ], + is = { lineHeight: 1.33008, lineGap: 0 }, + as = [ + 1.76738, 1, 1, 0.98946, 1.03959, 1.04016, 1.02809, 1.036, 0.97639, 1.10953, + 1.23203, 1.11144, 1.11144, 1.16939, 1.21237, 0.9754, 1.21261, 0.9754, + 1.59754, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, + 1.036, 0.81378, 0.81378, 1.21237, 1.21237, 1.21237, 0.73541, 0.97847, + 0.97363, 0.89723, 0.87897, 1.0426, 0.79429, 0.85292, 0.91149, 1.05815, + 1.1406, 0.79631, 0.90128, 0.83853, 1.04396, 1.10615, 0.97552, 0.94436, + 0.97552, 0.88641, 0.80527, 0.96083, 1.00135, 1, 1.06777, 0.9817, 0.91142, + 0.99361, 1.11144, 1.57293, 1.11144, 1.21237, 0.74627, 1.31818, 1.06585, + 0.97042, 0.83055, 0.97042, 0.93503, 1.1261, 0.97042, 0.97922, 1.14236, + 0.94552, 1.01054, 1.14236, 1.02471, 0.97922, 0.94165, 0.97042, 0.97042, + 1.0276, 0.78929, 1.1261, 0.97922, 0.95874, 1.02197, 0.98507, 0.96752, + 0.97168, 0.95107, 1.16579, 0.95107, 1.21237, 1.03959, 1.036, 1.036, 1, + 1.036, 1.16579, 0.87357, 1.31818, 1.18754, 1.26781, 1.05356, 1.21237, + 1.18622, 0.79487, 0.94994, 1.29004, 1.24047, 1.24047, 1.31818, 1, 0.91484, + 0.9754, 1.31818, 1.1349, 1.24866, 1.05356, 1.13934, 1.15574, 1.17389, + 0.73541, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.94385, + 0.87897, 0.79429, 0.79429, 0.79429, 0.79429, 1.1406, 1.1406, 1.1406, 1.1406, + 1.0426, 1.10615, 0.97552, 0.97552, 0.97552, 0.97552, 0.97552, 1.21237, + 0.97552, 1.00135, 1.00135, 1.00135, 1.00135, 0.91142, 0.94436, 0.98721, + 1.06585, 1.06585, 1.06585, 1.06585, 1.06585, 1.06585, 0.96705, 0.83055, + 0.93503, 0.93503, 0.93503, 0.93503, 1.14236, 1.14236, 1.14236, 1.14236, + 0.93125, 0.97922, 0.94165, 0.94165, 0.94165, 0.94165, 0.94165, 1.29004, + 0.94165, 0.97922, 0.97922, 0.97922, 0.97922, 0.96752, 0.97042, 0.96752, + 0.97363, 1.06585, 0.97363, 1.06585, 0.97363, 1.06585, 0.87897, 0.83055, + 0.87897, 0.83055, 0.87897, 0.83055, 0.87897, 0.83055, 1.0426, 1.0033, + 1.0426, 0.97042, 0.79429, 0.93503, 0.79429, 0.93503, 0.79429, 0.93503, + 0.79429, 0.93503, 0.79429, 0.93503, 0.91149, 0.97042, 0.91149, 0.97042, + 0.91149, 0.97042, 1, 1, 1.05815, 0.97922, 1.05815, 0.97922, 1.1406, 1.14236, + 1.1406, 1.14236, 1.1406, 1.14236, 1.1406, 1.14236, 1.1406, 1.14236, 0.97441, + 1.04302, 0.79631, 1.01582, 1, 1, 1.01054, 0.83853, 1.14236, 1, 1, 0.83853, + 1.09125, 0.83853, 0.90418, 0.83853, 1.19508, 1.10615, 0.97922, 1, 1, + 1.10615, 0.97922, 1.01034, 1.10466, 0.97922, 0.97552, 0.94165, 0.97552, + 0.94165, 0.97552, 0.94165, 0.91602, 0.91981, 0.88641, 1.0276, 1, 1, 0.88641, + 1.0276, 0.80527, 0.78929, 0.80527, 0.78929, 0.80527, 0.78929, 0.80527, + 0.78929, 1, 1, 0.96083, 1.05403, 0.95923, 1.16862, 1.00135, 0.97922, + 1.00135, 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, + 1.00135, 0.97922, 1.06777, 1.02197, 0.91142, 0.96752, 0.91142, 0.99361, + 0.97168, 0.99361, 0.97168, 0.99361, 0.97168, 1.23199, 1.036, 0.97363, + 1.06585, 0.94385, 0.96705, 0.97552, 0.94165, 1, 1, 0.96083, 1.1261, 1.31818, + 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, + 0.95161, 1.27126, 1.00811, 0.83284, 0.77702, 0.99137, 0.95253, 1.0347, + 0.86142, 1.07205, 1.14236, 0.97363, 0.89723, 0.86869, 1.09818, 0.79429, + 0.99361, 1.05815, 0.97552, 1.1406, 0.90128, 1.06662, 1.04396, 1.10615, + 0.84918, 0.97552, 1.04694, 0.94436, 0.98015, 0.96083, 0.91142, 1.00356, + 0.9817, 1.01945, 0.98999, 1.1406, 0.91142, 1.04961, 0.9898, 1.00639, + 1.14236, 1.07514, 1.04961, 0.99607, 1.02897, 1.008, 0.9898, 0.95134, + 1.00639, 1.11121, 1.14236, 1.00518, 0.97981, 1.02186, 1, 1.08578, 0.94165, + 0.99314, 0.98387, 0.93028, 0.93377, 1.35125, 1.07514, 1.10687, 0.93491, + 1.04232, 1.00351, 1.14236, 1.07514, 0.94165, 1.07514, 1.00351, 0.79429, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.09097, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 0.93503, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.96609, 1, 1, + 1, 1, 1, 1, 1.06777, 1.02197, 1.06777, 1.02197, 1.06777, 1.02197, 0.91142, + 0.96752, 1, 1.21261, 0.89903, 1, 1, 0.75155, 1.04745, 1.04745, 1.04745, + 1.04394, 0.98633, 0.98633, 0.98633, 0.72959, 0.72959, 1.20502, 0.91406, + 1.26514, 1.222, 1.02956, 1.03372, 1.03372, 0.96039, 1.24633, 1, 1.09125, + 0.93327, 1.03336, 1.16541, 1.036, 1, 1, 1, 0.771, 1, 1, 1.15574, 1.15574, + 1.15574, 1.15574, 0.86364, 0.94434, 0.86279, 0.94434, 0.86224, 1, 1, + 1.16798, 1, 0.96085, 0.90068, 1.21237, 1.18416, 1.13904, 0.69825, 0.9716, + 2.10339, 1.29004, 1.29004, 1.21339, 1.29004, 1.29004, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.42603, 1, + 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025, 1.18775, 1.42603, + 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, + 1.34163, 1, 1, 1, 1.13269, 1.13269, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, + ], + ss = { lineHeight: 1.33008, lineGap: 0 }, + rs = [ + 1.76738, 1, 1, 0.98946, 1.14763, 1.05365, 1.06234, 0.96927, 0.92586, + 1.15373, 1.18414, 0.91349, 0.91349, 1.07403, 1.17308, 0.78383, 1.20088, + 0.78383, 1.42531, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, + 0.96927, 0.96927, 0.96927, 0.96927, 0.78383, 0.78383, 1.17308, 1.17308, + 1.17308, 0.77349, 0.94565, 0.94729, 0.85944, 0.88506, 0.9858, 0.74817, + 0.80016, 0.88449, 0.98039, 0.95782, 0.69238, 0.89898, 0.83231, 0.98183, + 1.03989, 0.96924, 0.86237, 0.96924, 0.80595, 0.74524, 0.86091, 0.95402, + 0.94143, 0.98448, 0.8858, 0.83089, 0.93285, 1.0949, 1.39016, 1.0949, + 1.45994, 0.74627, 1.04839, 0.97454, 0.97454, 0.87207, 0.97454, 0.87533, + 1.06151, 0.97454, 1.00176, 1.16484, 1.08132, 0.98047, 1.16484, 1.02989, + 1.01054, 0.96225, 0.97454, 0.97454, 1.06598, 0.79004, 1.16344, 1.00351, + 0.94629, 0.9973, 0.91016, 0.96777, 0.9043, 0.91082, 0.92481, 0.91082, + 1.17308, 0.95748, 0.96927, 0.96927, 1, 0.96927, 0.92481, 0.80597, 1.04839, + 1.23393, 1.1781, 0.9245, 1.17308, 1.20808, 0.63218, 0.94261, 1.24822, + 1.09971, 1.09971, 1.04839, 1, 0.85273, 0.78032, 1.04839, 1.09971, 1.22326, + 0.9245, 1.09836, 1.13525, 1.15222, 0.70424, 0.94729, 0.94729, 0.94729, + 0.94729, 0.94729, 0.94729, 0.85498, 0.88506, 0.74817, 0.74817, 0.74817, + 0.74817, 0.95782, 0.95782, 0.95782, 0.95782, 0.9858, 1.03989, 0.96924, + 0.96924, 0.96924, 0.96924, 0.96924, 1.17308, 0.96924, 0.95402, 0.95402, + 0.95402, 0.95402, 0.83089, 0.86237, 0.88409, 0.97454, 0.97454, 0.97454, + 0.97454, 0.97454, 0.97454, 0.92916, 0.87207, 0.87533, 0.87533, 0.87533, + 0.87533, 0.93146, 0.93146, 0.93146, 0.93146, 0.93854, 1.01054, 0.96225, + 0.96225, 0.96225, 0.96225, 0.96225, 1.24822, 0.8761, 1.00351, 1.00351, + 1.00351, 1.00351, 0.96777, 0.97454, 0.96777, 0.94729, 0.97454, 0.94729, + 0.97454, 0.94729, 0.97454, 0.88506, 0.87207, 0.88506, 0.87207, 0.88506, + 0.87207, 0.88506, 0.87207, 0.9858, 0.95391, 0.9858, 0.97454, 0.74817, + 0.87533, 0.74817, 0.87533, 0.74817, 0.87533, 0.74817, 0.87533, 0.74817, + 0.87533, 0.88449, 0.97454, 0.88449, 0.97454, 0.88449, 0.97454, 1, 1, + 0.98039, 1.00176, 0.98039, 1.00176, 0.95782, 0.93146, 0.95782, 0.93146, + 0.95782, 0.93146, 0.95782, 1.16484, 0.95782, 0.93146, 0.84421, 1.12761, + 0.69238, 1.08132, 1, 1, 0.98047, 0.83231, 1.16484, 1, 1, 0.84723, 1.04861, + 0.84723, 0.78755, 0.83231, 1.23736, 1.03989, 1.01054, 1, 1, 1.03989, + 1.01054, 0.9857, 1.03849, 1.01054, 0.96924, 0.96225, 0.96924, 0.96225, + 0.96924, 0.96225, 0.92383, 0.90171, 0.80595, 1.06598, 1, 1, 0.80595, + 1.06598, 0.74524, 0.79004, 0.74524, 0.79004, 0.74524, 0.79004, 0.74524, + 0.79004, 1, 1, 0.86091, 1.02759, 0.85771, 1.16344, 0.95402, 1.00351, + 0.95402, 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, + 0.95402, 1.00351, 0.98448, 0.9973, 0.83089, 0.96777, 0.83089, 0.93285, + 0.9043, 0.93285, 0.9043, 0.93285, 0.9043, 1.31868, 0.96927, 0.94729, + 0.97454, 0.85498, 0.92916, 0.96924, 0.8761, 1, 1, 0.86091, 1.16344, 1.04839, + 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, + 0.81965, 0.81965, 0.94729, 0.78032, 0.71022, 0.90883, 0.84171, 0.99877, + 0.77596, 1.05734, 1.2, 0.94729, 0.85944, 0.82791, 0.9607, 0.74817, 0.93285, + 0.98039, 0.96924, 0.95782, 0.89898, 0.98316, 0.98183, 1.03989, 0.78614, + 0.96924, 0.97642, 0.86237, 0.86075, 0.86091, 0.83089, 0.90082, 0.8858, + 0.97296, 1.01284, 0.95782, 0.83089, 1.0976, 1.04, 1.03342, 1.2, 1.0675, + 1.0976, 0.98205, 1.03809, 1.05097, 1.04, 0.95364, 1.03342, 1.05401, 1.2, + 1.02148, 1.0119, 1.04724, 1.0127, 1.02732, 0.96225, 0.8965, 0.97783, + 0.93574, 0.94818, 1.30679, 1.0675, 1.11826, 0.99821, 1.0557, 1.0326, 1.2, + 1.0675, 0.96225, 1.0675, 1.0326, 0.74817, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1.03754, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.87533, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.98705, 1, 1, 1, 1, 1, 1, 0.98448, 0.9973, + 0.98448, 0.9973, 0.98448, 0.9973, 0.83089, 0.96777, 1, 1.20088, 0.89903, 1, + 1, 0.75155, 0.94945, 0.94945, 0.94945, 0.94945, 1.12317, 1.12317, 1.12317, + 0.67603, 0.67603, 1.15621, 0.73584, 1.21191, 1.22135, 1.06483, 0.94868, + 0.94868, 0.95996, 1.24633, 1, 1.07497, 0.87709, 0.96927, 1.01473, 0.96927, + 1, 1, 1, 0.77295, 1, 1, 1.09836, 1.09836, 1.09836, 1.01522, 0.86321, + 0.94434, 0.8649, 0.94434, 0.86182, 1, 1, 1.083, 1, 0.91578, 0.86438, + 1.17308, 1.18416, 1.14589, 0.69825, 0.97622, 1.96791, 1.24822, 1.24822, + 1.17308, 1.24822, 1.24822, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.42603, 1, 0.99862, 0.99862, 1, 0.87025, + 0.87025, 0.87025, 0.87025, 1.17984, 1.42603, 1, 1.42603, 1.42603, 0.99862, + 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.10742, 1.10742, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + ], + ns = { lineHeight: 1.33008, lineGap: 0 }, + os = [ + 1.76738, 1, 1, 0.98594, 1.02285, 1.10454, 1.06234, 0.96927, 0.92037, + 1.19985, 1.2046, 0.90616, 0.90616, 1.07152, 1.1714, 0.78032, 1.20088, + 0.78032, 1.40246, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, + 0.96927, 0.96927, 0.96927, 0.96927, 0.78032, 0.78032, 1.1714, 1.1714, + 1.1714, 0.80597, 0.94084, 0.96706, 0.85944, 0.85734, 0.97093, 0.75842, + 0.79936, 0.88198, 0.9831, 0.95782, 0.71387, 0.86969, 0.84636, 1.07796, + 1.03584, 0.96924, 0.83968, 0.96924, 0.82826, 0.79649, 0.85771, 0.95132, + 0.93119, 0.98965, 0.88433, 0.8287, 0.93365, 1.08612, 1.3638, 1.08612, + 1.45786, 0.74627, 0.80499, 0.91484, 1.05707, 0.92383, 1.05882, 0.9403, + 1.12654, 1.05882, 1.01756, 1.09011, 1.09011, 0.99414, 1.09011, 1.034, + 1.01756, 1.05356, 1.05707, 1.05882, 1.04399, 0.84863, 1.21968, 1.01756, + 0.95801, 1.00068, 0.91797, 0.96777, 0.9043, 0.90351, 0.92105, 0.90351, + 1.1714, 0.85337, 0.96927, 0.96927, 0.99912, 0.96927, 0.92105, 0.80597, + 1.2434, 1.20808, 1.05937, 0.90957, 1.1714, 1.20808, 0.75155, 0.94261, + 1.24644, 1.09971, 1.09971, 0.84751, 1, 0.85273, 0.78032, 0.61584, 1.05425, + 1.17914, 0.90957, 1.08665, 1.11593, 1.14169, 0.73381, 0.96706, 0.96706, + 0.96706, 0.96706, 0.96706, 0.96706, 0.86035, 0.85734, 0.75842, 0.75842, + 0.75842, 0.75842, 0.95782, 0.95782, 0.95782, 0.95782, 0.97093, 1.03584, + 0.96924, 0.96924, 0.96924, 0.96924, 0.96924, 1.1714, 0.96924, 0.95132, + 0.95132, 0.95132, 0.95132, 0.8287, 0.83968, 0.89049, 0.91484, 0.91484, + 0.91484, 0.91484, 0.91484, 0.91484, 0.93575, 0.92383, 0.9403, 0.9403, + 0.9403, 0.9403, 0.8717, 0.8717, 0.8717, 0.8717, 1.00527, 1.01756, 1.05356, + 1.05356, 1.05356, 1.05356, 1.05356, 1.24644, 0.95923, 1.01756, 1.01756, + 1.01756, 1.01756, 0.96777, 1.05707, 0.96777, 0.96706, 0.91484, 0.96706, + 0.91484, 0.96706, 0.91484, 0.85734, 0.92383, 0.85734, 0.92383, 0.85734, + 0.92383, 0.85734, 0.92383, 0.97093, 1.0969, 0.97093, 1.05882, 0.75842, + 0.9403, 0.75842, 0.9403, 0.75842, 0.9403, 0.75842, 0.9403, 0.75842, 0.9403, + 0.88198, 1.05882, 0.88198, 1.05882, 0.88198, 1.05882, 1, 1, 0.9831, 1.01756, + 0.9831, 1.01756, 0.95782, 0.8717, 0.95782, 0.8717, 0.95782, 0.8717, 0.95782, + 1.09011, 0.95782, 0.8717, 0.84784, 1.11551, 0.71387, 1.09011, 1, 1, 0.99414, + 0.84636, 1.09011, 1, 1, 0.84636, 1.0536, 0.84636, 0.94298, 0.84636, 1.23297, + 1.03584, 1.01756, 1, 1, 1.03584, 1.01756, 1.00323, 1.03444, 1.01756, + 0.96924, 1.05356, 0.96924, 1.05356, 0.96924, 1.05356, 0.93066, 0.98293, + 0.82826, 1.04399, 1, 1, 0.82826, 1.04399, 0.79649, 0.84863, 0.79649, + 0.84863, 0.79649, 0.84863, 0.79649, 0.84863, 1, 1, 0.85771, 1.17318, + 0.85771, 1.21968, 0.95132, 1.01756, 0.95132, 1.01756, 0.95132, 1.01756, + 0.95132, 1.01756, 0.95132, 1.01756, 0.95132, 1.01756, 0.98965, 1.00068, + 0.8287, 0.96777, 0.8287, 0.93365, 0.9043, 0.93365, 0.9043, 0.93365, 0.9043, + 1.08571, 0.96927, 0.96706, 0.91484, 0.86035, 0.93575, 0.96924, 0.95923, 1, + 1, 0.85771, 1.21968, 1.11437, 1.11437, 0.93109, 0.91202, 0.60411, 0.84164, + 0.55572, 1.01173, 0.97361, 0.81818, 0.81818, 0.96635, 0.78032, 0.72727, + 0.92366, 0.98601, 1.03405, 0.77968, 1.09799, 1.2, 0.96706, 0.85944, 0.85638, + 0.96491, 0.75842, 0.93365, 0.9831, 0.96924, 0.95782, 0.86969, 0.94152, + 1.07796, 1.03584, 0.78437, 0.96924, 0.98715, 0.83968, 0.83491, 0.85771, + 0.8287, 0.94492, 0.88433, 0.9287, 1.0098, 0.95782, 0.8287, 1.0625, 0.98248, + 1.03424, 1.2, 1.01071, 1.0625, 0.95246, 1.03809, 1.04912, 0.98248, 1.00221, + 1.03424, 1.05443, 1.2, 1.04785, 0.99609, 1.00169, 1.05176, 0.99346, 1.05356, + 0.9087, 1.03004, 0.95542, 0.93117, 1.23362, 1.01071, 1.07831, 1.02512, + 1.05205, 1.03502, 1.2, 1.01071, 1.05356, 1.01071, 1.03502, 0.75842, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.03719, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0.9403, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.04021, 1, 1, 1, 1, 1, + 1, 0.98965, 1.00068, 0.98965, 1.00068, 0.98965, 1.00068, 0.8287, 0.96777, 1, + 1.20088, 0.89903, 1, 1, 0.75155, 1.03077, 1.03077, 1.03077, 1.03077, + 1.13196, 1.13196, 1.13196, 0.67428, 0.67428, 1.16039, 0.73291, 1.20996, + 1.22135, 1.06483, 0.94868, 0.94868, 0.95996, 1.24633, 1, 1.07497, 0.87796, + 0.96927, 1.01518, 0.96927, 1, 1, 1, 0.77295, 1, 1, 1.10539, 1.10539, + 1.11358, 1.06967, 0.86279, 0.94434, 0.86279, 0.94434, 0.86182, 1, 1, 1.083, + 1, 0.91578, 0.86507, 1.1714, 1.18416, 1.14589, 0.69825, 0.97622, 1.9697, + 1.24822, 1.24822, 1.17238, 1.24822, 1.24822, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.42603, 1, 0.99862, + 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025, 1.18083, 1.42603, 1, + 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, + 1, 1, 1, 1.10938, 1.10938, 1, 1, 1, 1.05425, 1.09971, 1.09971, 1.09971, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + ], + gs = { lineHeight: 1.33008, lineGap: 0 }, + Is = getLookupTableFactory(function (e) { + e["MyriadPro-Regular"] = e["PdfJS-Fallback-Regular"] = { + name: "LiberationSans-Regular", + factors: As, + baseWidths: Wa, + baseMapping: Xa, + metrics: es, + }; + e["MyriadPro-Bold"] = e["PdfJS-Fallback-Bold"] = { + name: "LiberationSans-Bold", + factors: ja, + baseWidths: va, + baseMapping: Ka, + metrics: Za, + }; + e["MyriadPro-It"] = + e["MyriadPro-Italic"] = + e["PdfJS-Fallback-Italic"] = + { + name: "LiberationSans-Italic", + factors: _a, + baseWidths: Oa, + baseMapping: Pa, + metrics: $a, + }; + e["MyriadPro-BoldIt"] = + e["MyriadPro-BoldItalic"] = + e["PdfJS-Fallback-BoldItalic"] = + { + name: "LiberationSans-BoldItalic", + factors: Va, + baseWidths: Ta, + baseMapping: qa, + metrics: za, + }; + e.ArialMT = + e.Arial = + e["Arial-Regular"] = + { name: "LiberationSans-Regular", baseWidths: Wa, baseMapping: Xa }; + e["Arial-BoldMT"] = e["Arial-Bold"] = { + name: "LiberationSans-Bold", + baseWidths: va, + baseMapping: Ka, + }; + e["Arial-ItalicMT"] = e["Arial-Italic"] = { + name: "LiberationSans-Italic", + baseWidths: Oa, + baseMapping: Pa, + }; + e["Arial-BoldItalicMT"] = e["Arial-BoldItalic"] = { + name: "LiberationSans-BoldItalic", + baseWidths: Ta, + baseMapping: qa, + }; + e["Calibri-Regular"] = { + name: "LiberationSans-Regular", + factors: Ra, + baseWidths: Wa, + baseMapping: Xa, + metrics: Na, + }; + e["Calibri-Bold"] = { + name: "LiberationSans-Bold", + factors: wa, + baseWidths: va, + baseMapping: Ka, + metrics: ba, + }; + e["Calibri-Italic"] = { + name: "LiberationSans-Italic", + factors: Sa, + baseWidths: Oa, + baseMapping: Pa, + metrics: ka, + }; + e["Calibri-BoldItalic"] = { + name: "LiberationSans-BoldItalic", + factors: Da, + baseWidths: Ta, + baseMapping: qa, + metrics: Fa, + }; + e["Segoeui-Regular"] = { + name: "LiberationSans-Regular", + factors: os, + baseWidths: Wa, + baseMapping: Xa, + metrics: gs, + }; + e["Segoeui-Bold"] = { + name: "LiberationSans-Bold", + factors: ts, + baseWidths: va, + baseMapping: Ka, + metrics: is, + }; + e["Segoeui-Italic"] = { + name: "LiberationSans-Italic", + factors: rs, + baseWidths: Oa, + baseMapping: Pa, + metrics: ns, + }; + e["Segoeui-BoldItalic"] = { + name: "LiberationSans-BoldItalic", + factors: as, + baseWidths: Ta, + baseMapping: qa, + metrics: ss, + }; + e["Helvetica-Regular"] = e.Helvetica = { + name: "LiberationSans-Regular", + factors: Ha, + baseWidths: Wa, + baseMapping: Xa, + metrics: Ya, + }; + e["Helvetica-Bold"] = { + name: "LiberationSans-Bold", + factors: Ga, + baseWidths: va, + baseMapping: Ka, + metrics: xa, + }; + e["Helvetica-Italic"] = { + name: "LiberationSans-Italic", + factors: La, + baseWidths: Oa, + baseMapping: Pa, + metrics: Ja, + }; + e["Helvetica-BoldItalic"] = { + name: "LiberationSans-BoldItalic", + factors: Ma, + baseWidths: Ta, + baseMapping: qa, + metrics: Ua, + }; + }); +function getXfaFontName(e) { + const t = normalizeFontName(e); + return Is()[t]; +} +function getXfaFontDict(e) { + const t = (function getXfaFontWidths(e) { + const t = getXfaFontName(e); + if (!t) return null; + const { baseWidths: i, baseMapping: a, factors: s } = t, + r = s ? i.map((e, t) => e * s[t]) : i; + let n, + o = -2; + const g = []; + for (const [e, t] of a.map((e, t) => [e, t]).sort(([e], [t]) => e - t)) + if (-1 !== e) + if (e === o + 1) { + n.push(r[t]); + o += 1; + } else { + o = e; + n = [r[t]]; + g.push(e, n); + } + return g; + })(e), + i = new Dict(null); + i.set("BaseFont", Name.get(e)); + i.set("Type", Name.get("Font")); + i.set("Subtype", Name.get("CIDFontType2")); + i.set("Encoding", Name.get("Identity-H")); + i.set("CIDToGIDMap", Name.get("Identity")); + i.set("W", t); + i.set("FirstChar", t[0]); + i.set("LastChar", t.at(-2) + t.at(-1).length - 1); + const a = new Dict(null); + i.set("FontDescriptor", a); + const s = new Dict(null); + s.set("Ordering", "Identity"); + s.set("Registry", "Adobe"); + s.set("Supplement", 0); + i.set("CIDSystemInfo", s); + return i; +} +class PostScriptParser { + constructor(e) { + this.lexer = e; + this.operators = []; + this.token = null; + this.prev = null; + } + nextToken() { + this.prev = this.token; + this.token = this.lexer.getToken(); + } + accept(e) { + if (this.token.type === e) { + this.nextToken(); + return !0; + } + return !1; + } + expect(e) { + if (this.accept(e)) return !0; + throw new FormatError( + `Unexpected symbol: found ${this.token.type} expected ${e}.`, + ); + } + parse() { + this.nextToken(); + this.expect(cs.LBRACE); + this.parseBlock(); + this.expect(cs.RBRACE); + return this.operators; + } + parseBlock() { + for (;;) + if (this.accept(cs.NUMBER)) this.operators.push(this.prev.value); + else if (this.accept(cs.OPERATOR)) this.operators.push(this.prev.value); + else { + if (!this.accept(cs.LBRACE)) return; + this.parseCondition(); + } + } + parseCondition() { + const e = this.operators.length; + this.operators.push(null, null); + this.parseBlock(); + this.expect(cs.RBRACE); + if (this.accept(cs.IF)) { + this.operators[e] = this.operators.length; + this.operators[e + 1] = "jz"; + } else { + if (!this.accept(cs.LBRACE)) + throw new FormatError("PS Function: error parsing conditional."); + { + const t = this.operators.length; + this.operators.push(null, null); + const i = this.operators.length; + this.parseBlock(); + this.expect(cs.RBRACE); + this.expect(cs.IFELSE); + this.operators[t] = this.operators.length; + this.operators[t + 1] = "j"; + this.operators[e] = i; + this.operators[e + 1] = "jz"; + } + } + } +} +const cs = { LBRACE: 0, RBRACE: 1, NUMBER: 2, OPERATOR: 3, IF: 4, IFELSE: 5 }; +class PostScriptToken { + static get opCache() { + return shadow(this, "opCache", Object.create(null)); + } + constructor(e, t) { + this.type = e; + this.value = t; + } + static getOperator(e) { + return (PostScriptToken.opCache[e] ||= new PostScriptToken(cs.OPERATOR, e)); + } + static get LBRACE() { + return shadow(this, "LBRACE", new PostScriptToken(cs.LBRACE, "{")); + } + static get RBRACE() { + return shadow(this, "RBRACE", new PostScriptToken(cs.RBRACE, "}")); + } + static get IF() { + return shadow(this, "IF", new PostScriptToken(cs.IF, "IF")); + } + static get IFELSE() { + return shadow(this, "IFELSE", new PostScriptToken(cs.IFELSE, "IFELSE")); + } +} +class PostScriptLexer { + constructor(e) { + this.stream = e; + this.nextChar(); + this.strBuf = []; + } + nextChar() { + return (this.currentChar = this.stream.getByte()); + } + getToken() { + let e = !1, + t = this.currentChar; + for (;;) { + if (t < 0) return pt; + if (e) (10 !== t && 13 !== t) || (e = !1); + else if (37 === t) e = !0; + else if (!isWhiteSpace(t)) break; + t = this.nextChar(); + } + switch (0 | t) { + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + case 43: + case 45: + case 46: + return new PostScriptToken(cs.NUMBER, this.getNumber()); + case 123: + this.nextChar(); + return PostScriptToken.LBRACE; + case 125: + this.nextChar(); + return PostScriptToken.RBRACE; + } + const i = this.strBuf; + i.length = 0; + i[0] = String.fromCharCode(t); + for ( + ; + (t = this.nextChar()) >= 0 && + ((t >= 65 && t <= 90) || (t >= 97 && t <= 122)); + + ) + i.push(String.fromCharCode(t)); + const a = i.join(""); + switch (a.toLowerCase()) { + case "if": + return PostScriptToken.IF; + case "ifelse": + return PostScriptToken.IFELSE; + default: + return PostScriptToken.getOperator(a); + } + } + getNumber() { + let e = this.currentChar; + const t = this.strBuf; + t.length = 0; + t[0] = String.fromCharCode(e); + for ( + ; + (e = this.nextChar()) >= 0 && + ((e >= 48 && e <= 57) || 45 === e || 46 === e); + + ) + t.push(String.fromCharCode(e)); + const i = parseFloat(t.join("")); + if (isNaN(i)) throw new FormatError(`Invalid floating point number: ${i}`); + return i; + } +} +class BaseLocalCache { + constructor(e) { + this.constructor === BaseLocalCache && + unreachable("Cannot initialize BaseLocalCache."); + this._onlyRefs = !0 === e?.onlyRefs; + if (!this._onlyRefs) { + this._nameRefMap = new Map(); + this._imageMap = new Map(); + } + this._imageCache = new RefSetCache(); + } + getByName(e) { + this._onlyRefs && unreachable("Should not call `getByName` method."); + const t = this._nameRefMap.get(e); + return t ? this.getByRef(t) : this._imageMap.get(e) || null; + } + getByRef(e) { + return this._imageCache.get(e) || null; + } + set(e, t, i) { + unreachable("Abstract method `set` called."); + } +} +class LocalImageCache extends BaseLocalCache { + set(e, t = null, i) { + if ("string" != typeof e) + throw new Error('LocalImageCache.set - expected "name" argument.'); + if (t) { + if (this._imageCache.has(t)) return; + this._nameRefMap.set(e, t); + this._imageCache.put(t, i); + } else this._imageMap.has(e) || this._imageMap.set(e, i); + } +} +class LocalColorSpaceCache extends BaseLocalCache { + set(e = null, t = null, i) { + if ("string" != typeof e && !t) + throw new Error( + 'LocalColorSpaceCache.set - expected "name" and/or "ref" argument.', + ); + if (t) { + if (this._imageCache.has(t)) return; + null !== e && this._nameRefMap.set(e, t); + this._imageCache.put(t, i); + } else this._imageMap.has(e) || this._imageMap.set(e, i); + } +} +class LocalFunctionCache extends BaseLocalCache { + constructor(e) { + super({ onlyRefs: !0 }); + } + set(e = null, t, i) { + if (!t) + throw new Error('LocalFunctionCache.set - expected "ref" argument.'); + this._imageCache.has(t) || this._imageCache.put(t, i); + } +} +class LocalGStateCache extends BaseLocalCache { + set(e, t = null, i) { + if ("string" != typeof e) + throw new Error('LocalGStateCache.set - expected "name" argument.'); + if (t) { + if (this._imageCache.has(t)) return; + this._nameRefMap.set(e, t); + this._imageCache.put(t, i); + } else this._imageMap.has(e) || this._imageMap.set(e, i); + } +} +class LocalTilingPatternCache extends BaseLocalCache { + constructor(e) { + super({ onlyRefs: !0 }); + } + set(e = null, t, i) { + if (!t) + throw new Error('LocalTilingPatternCache.set - expected "ref" argument.'); + this._imageCache.has(t) || this._imageCache.put(t, i); + } +} +class RegionalImageCache extends BaseLocalCache { + constructor(e) { + super({ onlyRefs: !0 }); + } + set(e = null, t, i) { + if (!t) + throw new Error('RegionalImageCache.set - expected "ref" argument.'); + this._imageCache.has(t) || this._imageCache.put(t, i); + } +} +class GlobalImageCache { + static NUM_PAGES_THRESHOLD = 2; + static MIN_IMAGES_TO_CACHE = 10; + static MAX_BYTE_SIZE = 5e7; + #b = new RefSet(); + constructor() { + this._refCache = new RefSetCache(); + this._imageCache = new RefSetCache(); + } + get #D() { + let e = 0; + for (const t of this._imageCache) e += t.byteSize; + return e; + } + get #F() { + return ( + !(this._imageCache.size < GlobalImageCache.MIN_IMAGES_TO_CACHE) && + !(this.#D < GlobalImageCache.MAX_BYTE_SIZE) + ); + } + shouldCache(e, t) { + let i = this._refCache.get(e); + if (!i) { + i = new Set(); + this._refCache.put(e, i); + } + i.add(t); + return ( + !(i.size < GlobalImageCache.NUM_PAGES_THRESHOLD) && + !(!this._imageCache.has(e) && this.#F) + ); + } + addDecodeFailed(e) { + this.#b.put(e); + } + hasDecodeFailed(e) { + return this.#b.has(e); + } + addByteSize(e, t) { + const i = this._imageCache.get(e); + i && (i.byteSize || (i.byteSize = t)); + } + getData(e, t) { + const i = this._refCache.get(e); + if (!i) return null; + if (i.size < GlobalImageCache.NUM_PAGES_THRESHOLD) return null; + const a = this._imageCache.get(e); + if (!a) return null; + i.add(t); + return a; + } + setData(e, t) { + if (!this._refCache.has(e)) + throw new Error( + 'GlobalImageCache.setData - expected "shouldCache" to have been called.', + ); + this._imageCache.has(e) || + (this.#F + ? warn("GlobalImageCache.setData - cache limit reached.") + : this._imageCache.put(e, t)); + } + clear(e = !1) { + if (!e) { + this.#b.clear(); + this._refCache.clear(); + } + this._imageCache.clear(); + } +} +class PDFFunctionFactory { + constructor({ xref: e, isEvalSupported: t = !0 }) { + this.xref = e; + this.isEvalSupported = !1 !== t; + } + create(e) { + const t = this.getCached(e); + if (t) return t; + const i = PDFFunction.parse({ + xref: this.xref, + isEvalSupported: this.isEvalSupported, + fn: e instanceof Ref ? this.xref.fetch(e) : e, + }); + this._cache(e, i); + return i; + } + createFromArray(e) { + const t = this.getCached(e); + if (t) return t; + const i = PDFFunction.parseArray({ + xref: this.xref, + isEvalSupported: this.isEvalSupported, + fnObj: e instanceof Ref ? this.xref.fetch(e) : e, + }); + this._cache(e, i); + return i; + } + getCached(e) { + let t; + e instanceof Ref + ? (t = e) + : e instanceof Dict + ? (t = e.objId) + : e instanceof BaseStream && (t = e.dict?.objId); + if (t) { + const e = this._localFunctionCache.getByRef(t); + if (e) return e; + } + return null; + } + _cache(e, t) { + if (!t) + throw new Error( + 'PDFFunctionFactory._cache - expected "parsedFunction" argument.', + ); + let i; + e instanceof Ref + ? (i = e) + : e instanceof Dict + ? (i = e.objId) + : e instanceof BaseStream && (i = e.dict?.objId); + i && this._localFunctionCache.set(null, i, t); + } + get _localFunctionCache() { + return shadow(this, "_localFunctionCache", new LocalFunctionCache()); + } +} +function toNumberArray(e) { + return Array.isArray(e) + ? isNumberArray(e, null) + ? e + : e.map((e) => +e) + : null; +} +class PDFFunction { + static getSampleArray(e, t, i, a) { + let s, + r, + n = 1; + for (s = 0, r = e.length; s < r; s++) n *= e[s]; + n *= t; + const o = new Array(n); + let g = 0, + c = 0; + const h = 1 / (2 ** i - 1), + l = a.getBytes((n * i + 7) / 8); + let C = 0; + for (s = 0; s < n; s++) { + for (; g < i; ) { + c <<= 8; + c |= l[C++]; + g += 8; + } + g -= i; + o[s] = (c >> g) * h; + c &= (1 << g) - 1; + } + return o; + } + static parse({ xref: e, isEvalSupported: t, fn: i }) { + const a = i.dict || i; + switch (a.get("FunctionType")) { + case 0: + return this.constructSampled({ + xref: e, + isEvalSupported: t, + fn: i, + dict: a, + }); + case 1: + break; + case 2: + return this.constructInterpolated({ + xref: e, + isEvalSupported: t, + dict: a, + }); + case 3: + return this.constructStiched({ xref: e, isEvalSupported: t, dict: a }); + case 4: + return this.constructPostScript({ + xref: e, + isEvalSupported: t, + fn: i, + dict: a, + }); + } + throw new FormatError("Unknown type of function"); + } + static parseArray({ xref: e, isEvalSupported: t, fnObj: i }) { + if (!Array.isArray(i)) + return this.parse({ xref: e, isEvalSupported: t, fn: i }); + const a = []; + for (const s of i) + a.push(this.parse({ xref: e, isEvalSupported: t, fn: e.fetchIfRef(s) })); + return function (e, t, i, s) { + for (let r = 0, n = a.length; r < n; r++) a[r](e, t, i, s + r); + }; + } + static constructSampled({ xref: e, isEvalSupported: t, fn: i, dict: a }) { + function toMultiArray(e) { + const t = e.length, + i = []; + let a = 0; + for (let s = 0; s < t; s += 2) i[a++] = [e[s], e[s + 1]]; + return i; + } + function interpolate(e, t, i, a, s) { + return a + ((s - a) / (i - t)) * (e - t); + } + let s = toNumberArray(a.getArray("Domain")), + r = toNumberArray(a.getArray("Range")); + if (!s || !r) throw new FormatError("No domain or range"); + const n = s.length / 2, + o = r.length / 2; + s = toMultiArray(s); + r = toMultiArray(r); + const g = toNumberArray(a.getArray("Size")), + c = a.get("BitsPerSample"), + h = a.get("Order") || 1; + 1 !== h && info("No support for cubic spline interpolation: " + h); + let l = toNumberArray(a.getArray("Encode")); + if (l) l = toMultiArray(l); + else { + l = []; + for (let e = 0; e < n; ++e) l.push([0, g[e] - 1]); + } + let C = toNumberArray(a.getArray("Decode")); + C = C ? toMultiArray(C) : r; + const Q = this.getSampleArray(g, o, c, i); + return function constructSampledFn(e, t, i, a) { + const c = 1 << n, + h = new Float64Array(c), + E = new Uint32Array(c); + let u, d; + for (d = 0; d < c; d++) h[d] = 1; + let f = o, + p = 1; + for (u = 0; u < n; ++u) { + const i = s[u][0], + a = s[u][1]; + let r = interpolate( + Math.min(Math.max(e[t + u], i), a), + i, + a, + l[u][0], + l[u][1], + ); + const n = g[u]; + r = Math.min(Math.max(r, 0), n - 1); + const o = r < n - 1 ? Math.floor(r) : r - 1, + C = o + 1 - r, + Q = r - o, + m = o * f, + y = m + f; + for (d = 0; d < c; d++) + if (d & p) { + h[d] *= Q; + E[d] += y; + } else { + h[d] *= C; + E[d] += m; + } + f *= n; + p <<= 1; + } + for (d = 0; d < o; ++d) { + let e = 0; + for (u = 0; u < c; u++) e += Q[E[u] + d] * h[u]; + e = interpolate(e, 0, 1, C[d][0], C[d][1]); + i[a + d] = Math.min(Math.max(e, r[d][0]), r[d][1]); + } + }; + } + static constructInterpolated({ xref: e, isEvalSupported: t, dict: i }) { + const a = toNumberArray(i.getArray("C0")) || [0], + s = toNumberArray(i.getArray("C1")) || [1], + r = i.get("N"), + n = []; + for (let e = 0, t = a.length; e < t; ++e) n.push(s[e] - a[e]); + const o = n.length; + return function constructInterpolatedFn(e, t, i, s) { + const g = 1 === r ? e[t] : e[t] ** r; + for (let e = 0; e < o; ++e) i[s + e] = a[e] + g * n[e]; + }; + } + static constructStiched({ xref: e, isEvalSupported: t, dict: i }) { + const a = toNumberArray(i.getArray("Domain")); + if (!a) throw new FormatError("No domain"); + if (1 !== a.length / 2) + throw new FormatError("Bad domain for stiched function"); + const s = []; + for (const a of i.get("Functions")) + s.push(this.parse({ xref: e, isEvalSupported: t, fn: e.fetchIfRef(a) })); + const r = toNumberArray(i.getArray("Bounds")), + n = toNumberArray(i.getArray("Encode")), + o = new Float32Array(1); + return function constructStichedFn(e, t, i, g) { + const c = (function constructStichedFromIRClip(e, t, i) { + e > i ? (e = i) : e < t && (e = t); + return e; + })(e[t], a[0], a[1]), + h = r.length; + let l; + for (l = 0; l < h && !(c < r[l]); ++l); + let C = a[0]; + l > 0 && (C = r[l - 1]); + let Q = a[1]; + l < r.length && (Q = r[l]); + const E = n[2 * l], + u = n[2 * l + 1]; + o[0] = C === Q ? E : E + ((c - C) * (u - E)) / (Q - C); + s[l](o, 0, i, g); + }; + } + static constructPostScript({ xref: e, isEvalSupported: t, fn: i, dict: a }) { + const s = toNumberArray(a.getArray("Domain")), + r = toNumberArray(a.getArray("Range")); + if (!s) throw new FormatError("No domain."); + if (!r) throw new FormatError("No range."); + const n = new PostScriptLexer(i), + o = new PostScriptParser(n).parse(); + if (t && FeatureTest.isEvalSupported) { + const e = new PostScriptCompiler().compile(o, s, r); + if (e) return new Function("src", "srcOffset", "dest", "destOffset", e); + } + info("Unable to compile PS function"); + const g = r.length >> 1, + c = s.length >> 1, + h = new PostScriptEvaluator(o), + l = Object.create(null); + let C = 8192; + const Q = new Float32Array(c); + return function constructPostScriptFn(e, t, i, a) { + let s, + n, + o = ""; + const E = Q; + for (s = 0; s < c; s++) { + n = e[t + s]; + E[s] = n; + o += n + "_"; + } + const u = l[o]; + if (void 0 !== u) { + i.set(u, a); + return; + } + const d = new Float32Array(g), + f = h.execute(E), + p = f.length - g; + for (s = 0; s < g; s++) { + n = f[p + s]; + let e = r[2 * s]; + if (n < e) n = e; + else { + e = r[2 * s + 1]; + n > e && (n = e); + } + d[s] = n; + } + if (C > 0) { + C--; + l[o] = d; + } + i.set(d, a); + }; + } +} +function isPDFFunction(e) { + let t; + if (e instanceof Dict) t = e; + else { + if (!(e instanceof BaseStream)) return !1; + t = e.dict; + } + return t.has("FunctionType"); +} +class PostScriptStack { + static MAX_STACK_SIZE = 100; + constructor(e) { + this.stack = e ? Array.from(e) : []; + } + push(e) { + if (this.stack.length >= PostScriptStack.MAX_STACK_SIZE) + throw new Error("PostScript function stack overflow."); + this.stack.push(e); + } + pop() { + if (this.stack.length <= 0) + throw new Error("PostScript function stack underflow."); + return this.stack.pop(); + } + copy(e) { + if (this.stack.length + e >= PostScriptStack.MAX_STACK_SIZE) + throw new Error("PostScript function stack overflow."); + const t = this.stack; + for (let i = t.length - e, a = e - 1; a >= 0; a--, i++) t.push(t[i]); + } + index(e) { + this.push(this.stack[this.stack.length - e - 1]); + } + roll(e, t) { + const i = this.stack, + a = i.length - e, + s = i.length - 1, + r = a + (t - Math.floor(t / e) * e); + for (let e = a, t = s; e < t; e++, t--) { + const a = i[e]; + i[e] = i[t]; + i[t] = a; + } + for (let e = a, t = r - 1; e < t; e++, t--) { + const a = i[e]; + i[e] = i[t]; + i[t] = a; + } + for (let e = r, t = s; e < t; e++, t--) { + const a = i[e]; + i[e] = i[t]; + i[t] = a; + } + } +} +class PostScriptEvaluator { + constructor(e) { + this.operators = e; + } + execute(e) { + const t = new PostScriptStack(e); + let i = 0; + const a = this.operators, + s = a.length; + let r, n, o; + for (; i < s; ) { + r = a[i++]; + if ("number" != typeof r) + switch (r) { + case "jz": + o = t.pop(); + n = t.pop(); + n || (i = o); + break; + case "j": + n = t.pop(); + i = n; + break; + case "abs": + n = t.pop(); + t.push(Math.abs(n)); + break; + case "add": + o = t.pop(); + n = t.pop(); + t.push(n + o); + break; + case "and": + o = t.pop(); + n = t.pop(); + "boolean" == typeof n && "boolean" == typeof o + ? t.push(n && o) + : t.push(n & o); + break; + case "atan": + o = t.pop(); + n = t.pop(); + n = (Math.atan2(n, o) / Math.PI) * 180; + n < 0 && (n += 360); + t.push(n); + break; + case "bitshift": + o = t.pop(); + n = t.pop(); + n > 0 ? t.push(n << o) : t.push(n >> o); + break; + case "ceiling": + n = t.pop(); + t.push(Math.ceil(n)); + break; + case "copy": + n = t.pop(); + t.copy(n); + break; + case "cos": + n = t.pop(); + t.push(Math.cos(((n % 360) / 180) * Math.PI)); + break; + case "cvi": + n = 0 | t.pop(); + t.push(n); + break; + case "cvr": + break; + case "div": + o = t.pop(); + n = t.pop(); + t.push(n / o); + break; + case "dup": + t.copy(1); + break; + case "eq": + o = t.pop(); + n = t.pop(); + t.push(n === o); + break; + case "exch": + t.roll(2, 1); + break; + case "exp": + o = t.pop(); + n = t.pop(); + t.push(n ** o); + break; + case "false": + t.push(!1); + break; + case "floor": + n = t.pop(); + t.push(Math.floor(n)); + break; + case "ge": + o = t.pop(); + n = t.pop(); + t.push(n >= o); + break; + case "gt": + o = t.pop(); + n = t.pop(); + t.push(n > o); + break; + case "idiv": + o = t.pop(); + n = t.pop(); + t.push((n / o) | 0); + break; + case "index": + n = t.pop(); + t.index(n); + break; + case "le": + o = t.pop(); + n = t.pop(); + t.push(n <= o); + break; + case "ln": + n = t.pop(); + t.push(Math.log(n)); + break; + case "log": + n = t.pop(); + t.push(Math.log10(n)); + break; + case "lt": + o = t.pop(); + n = t.pop(); + t.push(n < o); + break; + case "mod": + o = t.pop(); + n = t.pop(); + t.push(n % o); + break; + case "mul": + o = t.pop(); + n = t.pop(); + t.push(n * o); + break; + case "ne": + o = t.pop(); + n = t.pop(); + t.push(n !== o); + break; + case "neg": + n = t.pop(); + t.push(-n); + break; + case "not": + n = t.pop(); + "boolean" == typeof n ? t.push(!n) : t.push(~n); + break; + case "or": + o = t.pop(); + n = t.pop(); + "boolean" == typeof n && "boolean" == typeof o + ? t.push(n || o) + : t.push(n | o); + break; + case "pop": + t.pop(); + break; + case "roll": + o = t.pop(); + n = t.pop(); + t.roll(n, o); + break; + case "round": + n = t.pop(); + t.push(Math.round(n)); + break; + case "sin": + n = t.pop(); + t.push(Math.sin(((n % 360) / 180) * Math.PI)); + break; + case "sqrt": + n = t.pop(); + t.push(Math.sqrt(n)); + break; + case "sub": + o = t.pop(); + n = t.pop(); + t.push(n - o); + break; + case "true": + t.push(!0); + break; + case "truncate": + n = t.pop(); + n = n < 0 ? Math.ceil(n) : Math.floor(n); + t.push(n); + break; + case "xor": + o = t.pop(); + n = t.pop(); + "boolean" == typeof n && "boolean" == typeof o + ? t.push(n !== o) + : t.push(n ^ o); + break; + default: + throw new FormatError(`Unknown operator ${r}`); + } + else t.push(r); + } + return t.stack; + } +} +class AstNode { + constructor(e) { + this.type = e; + } + visit(e) { + unreachable("abstract method"); + } +} +class AstArgument extends AstNode { + constructor(e, t, i) { + super("args"); + this.index = e; + this.min = t; + this.max = i; + } + visit(e) { + e.visitArgument(this); + } +} +class AstLiteral extends AstNode { + constructor(e) { + super("literal"); + this.number = e; + this.min = e; + this.max = e; + } + visit(e) { + e.visitLiteral(this); + } +} +class AstBinaryOperation extends AstNode { + constructor(e, t, i, a, s) { + super("binary"); + this.op = e; + this.arg1 = t; + this.arg2 = i; + this.min = a; + this.max = s; + } + visit(e) { + e.visitBinaryOperation(this); + } +} +class AstMin extends AstNode { + constructor(e, t) { + super("max"); + this.arg = e; + this.min = e.min; + this.max = t; + } + visit(e) { + e.visitMin(this); + } +} +class AstVariable extends AstNode { + constructor(e, t, i) { + super("var"); + this.index = e; + this.min = t; + this.max = i; + } + visit(e) { + e.visitVariable(this); + } +} +class AstVariableDefinition extends AstNode { + constructor(e, t) { + super("definition"); + this.variable = e; + this.arg = t; + } + visit(e) { + e.visitVariableDefinition(this); + } +} +class ExpressionBuilderVisitor { + constructor() { + this.parts = []; + } + visitArgument(e) { + this.parts.push( + "Math.max(", + e.min, + ", Math.min(", + e.max, + ", src[srcOffset + ", + e.index, + "]))", + ); + } + visitVariable(e) { + this.parts.push("v", e.index); + } + visitLiteral(e) { + this.parts.push(e.number); + } + visitBinaryOperation(e) { + this.parts.push("("); + e.arg1.visit(this); + this.parts.push(" ", e.op, " "); + e.arg2.visit(this); + this.parts.push(")"); + } + visitVariableDefinition(e) { + this.parts.push("var "); + e.variable.visit(this); + this.parts.push(" = "); + e.arg.visit(this); + this.parts.push(";"); + } + visitMin(e) { + this.parts.push("Math.min("); + e.arg.visit(this); + this.parts.push(", ", e.max, ")"); + } + toString() { + return this.parts.join(""); + } +} +function buildAddOperation(e, t) { + return "literal" === t.type && 0 === t.number + ? e + : "literal" === e.type && 0 === e.number + ? t + : "literal" === t.type && "literal" === e.type + ? new AstLiteral(e.number + t.number) + : new AstBinaryOperation("+", e, t, e.min + t.min, e.max + t.max); +} +function buildMulOperation(e, t) { + if ("literal" === t.type) { + if (0 === t.number) return new AstLiteral(0); + if (1 === t.number) return e; + if ("literal" === e.type) return new AstLiteral(e.number * t.number); + } + if ("literal" === e.type) { + if (0 === e.number) return new AstLiteral(0); + if (1 === e.number) return t; + } + const i = Math.min( + e.min * t.min, + e.min * t.max, + e.max * t.min, + e.max * t.max, + ), + a = Math.max(e.min * t.min, e.min * t.max, e.max * t.min, e.max * t.max); + return new AstBinaryOperation("*", e, t, i, a); +} +function buildSubOperation(e, t) { + if ("literal" === t.type) { + if (0 === t.number) return e; + if ("literal" === e.type) return new AstLiteral(e.number - t.number); + } + return "binary" === t.type && + "-" === t.op && + "literal" === e.type && + 1 === e.number && + "literal" === t.arg1.type && + 1 === t.arg1.number + ? t.arg2 + : new AstBinaryOperation("-", e, t, e.min - t.max, e.max - t.min); +} +function buildMinOperation(e, t) { + return e.min >= t ? new AstLiteral(t) : e.max <= t ? e : new AstMin(e, t); +} +class PostScriptCompiler { + compile(e, t, i) { + const a = [], + s = [], + r = t.length >> 1, + n = i.length >> 1; + let o, + g, + c, + h, + l, + C, + Q, + E, + u = 0; + for (let e = 0; e < r; e++) + a.push(new AstArgument(e, t[2 * e], t[2 * e + 1])); + for (let t = 0, i = e.length; t < i; t++) { + E = e[t]; + if ("number" != typeof E) + switch (E) { + case "add": + if (a.length < 2) return null; + h = a.pop(); + c = a.pop(); + a.push(buildAddOperation(c, h)); + break; + case "cvr": + if (a.length < 1) return null; + break; + case "mul": + if (a.length < 2) return null; + h = a.pop(); + c = a.pop(); + a.push(buildMulOperation(c, h)); + break; + case "sub": + if (a.length < 2) return null; + h = a.pop(); + c = a.pop(); + a.push(buildSubOperation(c, h)); + break; + case "exch": + if (a.length < 2) return null; + l = a.pop(); + C = a.pop(); + a.push(l, C); + break; + case "pop": + if (a.length < 1) return null; + a.pop(); + break; + case "index": + if (a.length < 1) return null; + c = a.pop(); + if ("literal" !== c.type) return null; + o = c.number; + if (o < 0 || !Number.isInteger(o) || a.length < o) return null; + l = a[a.length - o - 1]; + if ("literal" === l.type || "var" === l.type) { + a.push(l); + break; + } + Q = new AstVariable(u++, l.min, l.max); + a[a.length - o - 1] = Q; + a.push(Q); + s.push(new AstVariableDefinition(Q, l)); + break; + case "dup": + if (a.length < 1) return null; + if ( + "number" == typeof e[t + 1] && + "gt" === e[t + 2] && + e[t + 3] === t + 7 && + "jz" === e[t + 4] && + "pop" === e[t + 5] && + e[t + 6] === e[t + 1] + ) { + c = a.pop(); + a.push(buildMinOperation(c, e[t + 1])); + t += 6; + break; + } + l = a.at(-1); + if ("literal" === l.type || "var" === l.type) { + a.push(l); + break; + } + Q = new AstVariable(u++, l.min, l.max); + a[a.length - 1] = Q; + a.push(Q); + s.push(new AstVariableDefinition(Q, l)); + break; + case "roll": + if (a.length < 2) return null; + h = a.pop(); + c = a.pop(); + if ("literal" !== h.type || "literal" !== c.type) return null; + g = h.number; + o = c.number; + if ( + o <= 0 || + !Number.isInteger(o) || + !Number.isInteger(g) || + a.length < o + ) + return null; + g = ((g % o) + o) % o; + if (0 === g) break; + a.push(...a.splice(a.length - o, o - g)); + break; + default: + return null; + } + else a.push(new AstLiteral(E)); + } + if (a.length !== n) return null; + const d = []; + for (const e of s) { + const t = new ExpressionBuilderVisitor(); + e.visit(t); + d.push(t.toString()); + } + for (let e = 0, t = a.length; e < t; e++) { + const t = a[e], + s = new ExpressionBuilderVisitor(); + t.visit(s); + const r = i[2 * e], + n = i[2 * e + 1], + o = [s.toString()]; + if (r > t.min) { + o.unshift("Math.max(", r, ", "); + o.push(")"); + } + if (n < t.max) { + o.unshift("Math.min(", n, ", "); + o.push(")"); + } + o.unshift("dest[destOffset + ", e, "] = "); + o.push(";"); + d.push(o.join("")); + } + return d.join("\n"); + } +} +const hs = [ + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "S", + "B", + "S", + "WS", + "B", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "B", + "B", + "B", + "S", + "WS", + "ON", + "ON", + "ET", + "ET", + "ET", + "ON", + "ON", + "ON", + "ON", + "ON", + "ES", + "CS", + "ES", + "CS", + "CS", + "EN", + "EN", + "EN", + "EN", + "EN", + "EN", + "EN", + "EN", + "EN", + "EN", + "CS", + "ON", + "ON", + "ON", + "ON", + "ON", + "ON", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "ON", + "ON", + "ON", + "ON", + "ON", + "ON", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "ON", + "ON", + "ON", + "ON", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "B", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "BN", + "CS", + "ON", + "ET", + "ET", + "ET", + "ET", + "ON", + "ON", + "ON", + "ON", + "L", + "ON", + "ON", + "BN", + "ON", + "ON", + "ET", + "ET", + "EN", + "EN", + "ON", + "L", + "ON", + "ON", + "ON", + "EN", + "L", + "ON", + "ON", + "ON", + "ON", + "ON", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "ON", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "ON", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + "L", + ], + ls = [ + "AN", + "AN", + "AN", + "AN", + "AN", + "AN", + "ON", + "ON", + "AL", + "ET", + "ET", + "AL", + "CS", + "AL", + "ON", + "ON", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "AL", + "AL", + "", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "AN", + "AN", + "AN", + "AN", + "AN", + "AN", + "AN", + "AN", + "AN", + "AN", + "ET", + "AN", + "AN", + "AL", + "AL", + "AL", + "NSM", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "AN", + "ON", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "NSM", + "AL", + "AL", + "NSM", + "NSM", + "ON", + "NSM", + "NSM", + "NSM", + "NSM", + "AL", + "AL", + "EN", + "EN", + "EN", + "EN", + "EN", + "EN", + "EN", + "EN", + "EN", + "EN", + "AL", + "AL", + "AL", + "AL", + "AL", + "AL", + ]; +function isOdd(e) { + return 0 != (1 & e); +} +function isEven(e) { + return 0 == (1 & e); +} +function findUnequal(e, t, i) { + let a, s; + for (a = t, s = e.length; a < s; ++a) if (e[a] !== i) return a; + return a; +} +function setValues(e, t, i, a) { + for (let s = t; s < i; ++s) e[s] = a; +} +function reverseValues(e, t, i) { + for (let a = t, s = i - 1; a < s; ++a, --s) { + const t = e[a]; + e[a] = e[s]; + e[s] = t; + } +} +function createBidiText(e, t, i = !1) { + let a = "ltr"; + i ? (a = "ttb") : t || (a = "rtl"); + return { str: e, dir: a }; +} +const Cs = [], + Bs = []; +function bidi(e, t = -1, i = !1) { + let a = !0; + const s = e.length; + if (0 === s || i) return createBidiText(e, a, i); + Cs.length = s; + Bs.length = s; + let r, + n, + o = 0; + for (r = 0; r < s; ++r) { + Cs[r] = e.charAt(r); + const t = e.charCodeAt(r); + let i = "L"; + if (t <= 255) i = hs[t]; + else if (1424 <= t && t <= 1524) i = "R"; + else if (1536 <= t && t <= 1791) { + i = ls[255 & t]; + i || warn("Bidi: invalid Unicode character " + t.toString(16)); + } else + ((1792 <= t && t <= 2220) || + (64336 <= t && t <= 65023) || + (65136 <= t && t <= 65279)) && + (i = "AL"); + ("R" !== i && "AL" !== i && "AN" !== i) || o++; + Bs[r] = i; + } + if (0 === o) { + a = !0; + return createBidiText(e, a); + } + if (-1 === t) + if (o / s < 0.3 && s > 4) { + a = !0; + t = 0; + } else { + a = !1; + t = 1; + } + const g = []; + for (r = 0; r < s; ++r) g[r] = t; + const c = isOdd(t) ? "R" : "L", + h = c, + l = h; + let C, + Q = h; + for (r = 0; r < s; ++r) "NSM" === Bs[r] ? (Bs[r] = Q) : (Q = Bs[r]); + Q = h; + for (r = 0; r < s; ++r) { + C = Bs[r]; + "EN" === C + ? (Bs[r] = "AL" === Q ? "AN" : "EN") + : ("R" !== C && "L" !== C && "AL" !== C) || (Q = C); + } + for (r = 0; r < s; ++r) { + C = Bs[r]; + "AL" === C && (Bs[r] = "R"); + } + for (r = 1; r < s - 1; ++r) { + "ES" === Bs[r] && + "EN" === Bs[r - 1] && + "EN" === Bs[r + 1] && + (Bs[r] = "EN"); + "CS" !== Bs[r] || + ("EN" !== Bs[r - 1] && "AN" !== Bs[r - 1]) || + Bs[r + 1] !== Bs[r - 1] || + (Bs[r] = Bs[r - 1]); + } + for (r = 0; r < s; ++r) + if ("EN" === Bs[r]) { + for (let e = r - 1; e >= 0 && "ET" === Bs[e]; --e) Bs[e] = "EN"; + for (let e = r + 1; e < s && "ET" === Bs[e]; ++e) Bs[e] = "EN"; + } + for (r = 0; r < s; ++r) { + C = Bs[r]; + ("WS" !== C && "ES" !== C && "ET" !== C && "CS" !== C) || (Bs[r] = "ON"); + } + Q = h; + for (r = 0; r < s; ++r) { + C = Bs[r]; + "EN" === C + ? (Bs[r] = "L" === Q ? "L" : "EN") + : ("R" !== C && "L" !== C) || (Q = C); + } + for (r = 0; r < s; ++r) + if ("ON" === Bs[r]) { + const e = findUnequal(Bs, r + 1, "ON"); + let t = h; + r > 0 && (t = Bs[r - 1]); + let i = l; + e + 1 < s && (i = Bs[e + 1]); + "L" !== t && (t = "R"); + "L" !== i && (i = "R"); + t === i && setValues(Bs, r, e, t); + r = e - 1; + } + for (r = 0; r < s; ++r) "ON" === Bs[r] && (Bs[r] = c); + for (r = 0; r < s; ++r) { + C = Bs[r]; + isEven(g[r]) + ? "R" === C + ? (g[r] += 1) + : ("AN" !== C && "EN" !== C) || (g[r] += 2) + : ("L" !== C && "AN" !== C && "EN" !== C) || (g[r] += 1); + } + let E, + u = -1, + d = 99; + for (r = 0, n = g.length; r < n; ++r) { + E = g[r]; + u < E && (u = E); + d > E && isOdd(E) && (d = E); + } + for (E = u; E >= d; --E) { + let e = -1; + for (r = 0, n = g.length; r < n; ++r) + if (g[r] < E) { + if (e >= 0) { + reverseValues(Cs, e, r); + e = -1; + } + } else e < 0 && (e = r); + e >= 0 && reverseValues(Cs, e, g.length); + } + for (r = 0, n = Cs.length; r < n; ++r) { + const e = Cs[r]; + ("<" !== e && ">" !== e) || (Cs[r] = ""); + } + return createBidiText(Cs.join(""), a); +} +const Qs = { style: "normal", weight: "normal" }, + Es = { style: "normal", weight: "bold" }, + us = { style: "italic", weight: "normal" }, + ds = { style: "italic", weight: "bold" }, + fs = new Map([ + [ + "Times-Roman", + { + local: [ + "Times New Roman", + "Times-Roman", + "Times", + "Liberation Serif", + "Nimbus Roman", + "Nimbus Roman L", + "Tinos", + "Thorndale", + "TeX Gyre Termes", + "FreeSerif", + "Linux Libertine O", + "Libertinus Serif", + "DejaVu Serif", + "Bitstream Vera Serif", + "Ubuntu", + ], + style: Qs, + ultimate: "serif", + }, + ], + ["Times-Bold", { alias: "Times-Roman", style: Es, ultimate: "serif" }], + ["Times-Italic", { alias: "Times-Roman", style: us, ultimate: "serif" }], + [ + "Times-BoldItalic", + { alias: "Times-Roman", style: ds, ultimate: "serif" }, + ], + [ + "Helvetica", + { + local: [ + "Helvetica", + "Helvetica Neue", + "Arial", + "Arial Nova", + "Liberation Sans", + "Arimo", + "Nimbus Sans", + "Nimbus Sans L", + "A030", + "TeX Gyre Heros", + "FreeSans", + "DejaVu Sans", + "Albany", + "Bitstream Vera Sans", + "Arial Unicode MS", + "Microsoft Sans Serif", + "Apple Symbols", + "Cantarell", + ], + path: "LiberationSans-Regular.ttf", + style: Qs, + ultimate: "sans-serif", + }, + ], + [ + "Helvetica-Bold", + { + alias: "Helvetica", + path: "LiberationSans-Bold.ttf", + style: Es, + ultimate: "sans-serif", + }, + ], + [ + "Helvetica-Oblique", + { + alias: "Helvetica", + path: "LiberationSans-Italic.ttf", + style: us, + ultimate: "sans-serif", + }, + ], + [ + "Helvetica-BoldOblique", + { + alias: "Helvetica", + path: "LiberationSans-BoldItalic.ttf", + style: ds, + ultimate: "sans-serif", + }, + ], + [ + "Courier", + { + local: [ + "Courier", + "Courier New", + "Liberation Mono", + "Nimbus Mono", + "Nimbus Mono L", + "Cousine", + "Cumberland", + "TeX Gyre Cursor", + "FreeMono", + "Linux Libertine Mono O", + "Libertinus Mono", + ], + style: Qs, + ultimate: "monospace", + }, + ], + ["Courier-Bold", { alias: "Courier", style: Es, ultimate: "monospace" }], + ["Courier-Oblique", { alias: "Courier", style: us, ultimate: "monospace" }], + [ + "Courier-BoldOblique", + { alias: "Courier", style: ds, ultimate: "monospace" }, + ], + [ + "ArialBlack", + { + local: ["Arial Black"], + style: { style: "normal", weight: "900" }, + fallback: "Helvetica-Bold", + }, + ], + ["ArialBlack-Bold", { alias: "ArialBlack" }], + [ + "ArialBlack-Italic", + { + alias: "ArialBlack", + style: { style: "italic", weight: "900" }, + fallback: "Helvetica-BoldOblique", + }, + ], + ["ArialBlack-BoldItalic", { alias: "ArialBlack-Italic" }], + [ + "ArialNarrow", + { + local: [ + "Arial Narrow", + "Liberation Sans Narrow", + "Helvetica Condensed", + "Nimbus Sans Narrow", + "TeX Gyre Heros Cn", + ], + style: Qs, + fallback: "Helvetica", + }, + ], + [ + "ArialNarrow-Bold", + { alias: "ArialNarrow", style: Es, fallback: "Helvetica-Bold" }, + ], + [ + "ArialNarrow-Italic", + { alias: "ArialNarrow", style: us, fallback: "Helvetica-Oblique" }, + ], + [ + "ArialNarrow-BoldItalic", + { alias: "ArialNarrow", style: ds, fallback: "Helvetica-BoldOblique" }, + ], + [ + "Calibri", + { local: ["Calibri", "Carlito"], style: Qs, fallback: "Helvetica" }, + ], + [ + "Calibri-Bold", + { alias: "Calibri", style: Es, fallback: "Helvetica-Bold" }, + ], + [ + "Calibri-Italic", + { alias: "Calibri", style: us, fallback: "Helvetica-Oblique" }, + ], + [ + "Calibri-BoldItalic", + { alias: "Calibri", style: ds, fallback: "Helvetica-BoldOblique" }, + ], + ["Wingdings", { local: ["Wingdings", "URW Dingbats"], style: Qs }], + ["Wingdings-Regular", { alias: "Wingdings" }], + ["Wingdings-Bold", { alias: "Wingdings" }], + ]), + ps = new Map([["Arial-Black", "ArialBlack"]]); +function getFamilyName(e) { + const t = new Set([ + "thin", + "extralight", + "ultralight", + "demilight", + "semilight", + "light", + "book", + "regular", + "normal", + "medium", + "demibold", + "semibold", + "bold", + "extrabold", + "ultrabold", + "black", + "heavy", + "extrablack", + "ultrablack", + "roman", + "italic", + "oblique", + "ultracondensed", + "extracondensed", + "condensed", + "semicondensed", + "normal", + "semiexpanded", + "expanded", + "extraexpanded", + "ultraexpanded", + "bolditalic", + ]); + return e + .split(/[- ,+]+/g) + .filter((e) => !t.has(e.toLowerCase())) + .join(" "); +} +function generateFont( + { alias: e, local: t, path: i, fallback: a, style: s, ultimate: r }, + n, + o, + g = !0, + c = !0, + h = "", +) { + const l = { style: null, ultimate: null }; + if (t) { + const e = h ? ` ${h}` : ""; + for (const i of t) n.push(`local(${i}${e})`); + } + if (e) { + const t = fs.get(e), + r = + h || + (function getStyleToAppend(e) { + switch (e) { + case Es: + return "Bold"; + case us: + return "Italic"; + case ds: + return "Bold Italic"; + default: + if ("bold" === e?.weight) return "Bold"; + if ("italic" === e?.style) return "Italic"; + } + return ""; + })(s); + Object.assign(l, generateFont(t, n, o, g && !a, c && !i, r)); + } + s && (l.style = s); + r && (l.ultimate = r); + if (g && a) { + const e = fs.get(a), + { ultimate: t } = generateFont(e, n, o, g, c && !i, h); + l.ultimate ||= t; + } + c && i && o && n.push(`url(${o}${i})`); + return l; +} +function getFontSubstitution(e, t, i, a, s, r) { + if (a.startsWith("InvalidPDFjsFont_")) return null; + ("TrueType" !== r && "Type1" !== r) || + !/^[A-Z]{6}\+/.test(a) || + (a = a.slice(7)); + const n = (a = normalizeFontName(a)); + let o = e.get(n); + if (o) return o; + let g = fs.get(a); + if (!g) + for (const [e, t] of ps) + if (a.startsWith(e)) { + a = `${t}${a.substring(e.length)}`; + g = fs.get(a); + break; + } + let c = !1; + if (!g) { + g = fs.get(s); + c = !0; + } + const h = `${t.getDocId()}_s${t.createFontId()}`; + if (!g) { + if (!validateFontName(a)) { + warn(`Cannot substitute the font because of its name: ${a}`); + e.set(n, null); + return null; + } + const t = /bold/gi.test(a), + i = /oblique|italic/gi.test(a), + s = (t && i && ds) || (t && Es) || (i && us) || Qs; + o = { + css: `"${getFamilyName(a)}",${h}`, + guessFallback: !0, + loadedName: h, + baseFontName: a, + src: `local(${a})`, + style: s, + }; + e.set(n, o); + return o; + } + const l = []; + c && validateFontName(a) && l.push(`local(${a})`); + const { style: C, ultimate: Q } = generateFont(g, l, i), + E = null === Q, + u = E ? "" : `,${Q}`; + o = { + css: `"${getFamilyName(a)}",${h}${u}`, + guessFallback: E, + loadedName: h, + baseFontName: a, + src: l.join(","), + style: C, + }; + e.set(n, o); + return o; +} +class ImageResizer { + constructor(e, t) { + this._imgData = e; + this._isMask = t; + } + static needsToBeResized(e, t) { + if (e <= this._goodSquareLength && t <= this._goodSquareLength) return !1; + const { MAX_DIM: i } = this; + if (e > i || t > i) return !0; + const a = e * t; + if (this._hasMaxArea) return a > this.MAX_AREA; + if (a < this._goodSquareLength ** 2) return !1; + if (this._areGoodDims(e, t)) { + this._goodSquareLength = Math.max( + this._goodSquareLength, + Math.floor(Math.sqrt(e * t)), + ); + return !1; + } + this._goodSquareLength = this._guessMax(this._goodSquareLength, i, 128, 0); + return a > (this.MAX_AREA = this._goodSquareLength ** 2); + } + static get MAX_DIM() { + return shadow(this, "MAX_DIM", this._guessMax(2048, 65537, 0, 1)); + } + static get MAX_AREA() { + this._hasMaxArea = !0; + return shadow( + this, + "MAX_AREA", + this._guessMax(ImageResizer._goodSquareLength, this.MAX_DIM, 128, 0) ** 2, + ); + } + static set MAX_AREA(e) { + if (e >= 0) { + this._hasMaxArea = !0; + shadow(this, "MAX_AREA", e); + } + } + static setMaxArea(e) { + this._hasMaxArea || (this.MAX_AREA = e >> 2); + } + static _areGoodDims(e, t) { + try { + const i = new OffscreenCanvas(e, t), + a = i.getContext("2d"); + a.fillRect(0, 0, 1, 1); + const s = a.getImageData(0, 0, 1, 1).data[3]; + i.width = i.height = 1; + return 0 !== s; + } catch { + return !1; + } + } + static _guessMax(e, t, i, a) { + for (; e + i + 1 < t; ) { + const i = Math.floor((e + t) / 2), + s = a || i; + this._areGoodDims(i, s) ? (e = i) : (t = i); + } + return e; + } + static async createImage(e, t = !1) { + return new ImageResizer(e, t)._createImage(); + } + async _createImage() { + const e = this._encodeBMP(), + t = new Blob([e.buffer], { type: "image/bmp" }), + i = createImageBitmap(t), + { MAX_AREA: a, MAX_DIM: s } = ImageResizer, + { _imgData: r } = this, + { width: n, height: o } = r, + g = Math.max(n / s, o / s, Math.sqrt((n * o) / a)), + c = Math.max(g, 2), + h = Math.round(10 * (g + 1.25)) / 10 / c, + l = Math.floor(Math.log2(h)), + C = new Array(l + 2).fill(2); + C[0] = c; + C.splice(-1, 1, h / (1 << l)); + let Q = n, + E = o, + u = await i; + for (const e of C) { + const t = Q, + i = E; + Q = Math.floor(Q / e) - 1; + E = Math.floor(E / e) - 1; + const a = new OffscreenCanvas(Q, E); + a.getContext("2d").drawImage(u, 0, 0, t, i, 0, 0, Q, E); + u = a.transferToImageBitmap(); + } + r.data = null; + r.bitmap = u; + r.width = Q; + r.height = E; + return r; + } + _encodeBMP() { + const { width: e, height: t, kind: i } = this._imgData; + let a, + s = this._imgData.data, + r = new Uint8Array(0), + n = r, + o = 0; + switch (i) { + case b: { + a = 1; + r = new Uint8Array( + this._isMask + ? [255, 255, 255, 255, 0, 0, 0, 0] + : [0, 0, 0, 0, 255, 255, 255, 255], + ); + const i = (e + 7) >> 3, + n = (i + 3) & -4; + if (i !== n) { + const e = new Uint8Array(n * t); + let a = 0; + for (let r = 0, o = t * i; r < o; r += i, a += n) + e.set(s.subarray(r, r + i), a); + s = e; + } + break; + } + case D: + a = 24; + if (3 & e) { + const i = 3 * e, + a = (i + 3) & -4, + r = a - i, + n = new Uint8Array(a * t); + let o = 0; + for (let e = 0, a = t * i; e < a; e += i) { + const t = s.subarray(e, e + i); + for (let e = 0; e < i; e += 3) { + n[o++] = t[e + 2]; + n[o++] = t[e + 1]; + n[o++] = t[e]; + } + o += r; + } + s = n; + } else + for (let e = 0, t = s.length; e < t; e += 3) { + const t = s[e]; + s[e] = s[e + 2]; + s[e + 2] = t; + } + break; + case F: + a = 32; + o = 3; + n = new Uint8Array(68); + const i = new DataView(n.buffer); + if (FeatureTest.isLittleEndian) { + i.setUint32(0, 255, !0); + i.setUint32(4, 65280, !0); + i.setUint32(8, 16711680, !0); + i.setUint32(12, 4278190080, !0); + } else { + i.setUint32(0, 4278190080, !0); + i.setUint32(4, 16711680, !0); + i.setUint32(8, 65280, !0); + i.setUint32(12, 255, !0); + } + break; + default: + throw new Error("invalid format"); + } + let g = 0; + const c = 40 + n.length, + h = 14 + c + r.length + s.length, + l = new Uint8Array(h), + C = new DataView(l.buffer); + C.setUint16(g, 19778, !0); + g += 2; + C.setUint32(g, h, !0); + g += 4; + C.setUint32(g, 0, !0); + g += 4; + C.setUint32(g, 14 + c + r.length, !0); + g += 4; + C.setUint32(g, c, !0); + g += 4; + C.setInt32(g, e, !0); + g += 4; + C.setInt32(g, -t, !0); + g += 4; + C.setUint16(g, 1, !0); + g += 2; + C.setUint16(g, a, !0); + g += 2; + C.setUint32(g, o, !0); + g += 4; + C.setUint32(g, 0, !0); + g += 4; + C.setInt32(g, 0, !0); + g += 4; + C.setInt32(g, 0, !0); + g += 4; + C.setUint32(g, r.length / 4, !0); + g += 4; + C.setUint32(g, 0, !0); + g += 4; + l.set(n, g); + g += n.length; + l.set(r, g); + g += r.length; + l.set(s, g); + return l; + } +} +ImageResizer._goodSquareLength = 2048; +const ms = 3285377520, + ys = 4294901760, + ws = 65535; +class MurmurHash3_64 { + constructor(e) { + this.h1 = e ? 4294967295 & e : ms; + this.h2 = e ? 4294967295 & e : ms; + } + update(e) { + let t, i; + if ("string" == typeof e) { + t = new Uint8Array(2 * e.length); + i = 0; + for (let a = 0, s = e.length; a < s; a++) { + const s = e.charCodeAt(a); + if (s <= 255) t[i++] = s; + else { + t[i++] = s >>> 8; + t[i++] = 255 & s; + } + } + } else { + if (!ArrayBuffer.isView(e)) + throw new Error("Invalid data format, must be a string or TypedArray."); + t = e.slice(); + i = t.byteLength; + } + const a = i >> 2, + s = i - 4 * a, + r = new Uint32Array(t.buffer, 0, a); + let n = 0, + o = 0, + g = this.h1, + c = this.h2; + const h = 3432918353, + l = 461845907, + C = 11601, + Q = 13715; + for (let e = 0; e < a; e++) + if (1 & e) { + n = r[e]; + n = ((n * h) & ys) | ((n * C) & ws); + n = (n << 15) | (n >>> 17); + n = ((n * l) & ys) | ((n * Q) & ws); + g ^= n; + g = (g << 13) | (g >>> 19); + g = 5 * g + 3864292196; + } else { + o = r[e]; + o = ((o * h) & ys) | ((o * C) & ws); + o = (o << 15) | (o >>> 17); + o = ((o * l) & ys) | ((o * Q) & ws); + c ^= o; + c = (c << 13) | (c >>> 19); + c = 5 * c + 3864292196; + } + n = 0; + switch (s) { + case 3: + n ^= t[4 * a + 2] << 16; + case 2: + n ^= t[4 * a + 1] << 8; + case 1: + n ^= t[4 * a]; + n = ((n * h) & ys) | ((n * C) & ws); + n = (n << 15) | (n >>> 17); + n = ((n * l) & ys) | ((n * Q) & ws); + 1 & a ? (g ^= n) : (c ^= n); + } + this.h1 = g; + this.h2 = c; + } + hexdigest() { + let e = this.h1, + t = this.h2; + e ^= t >>> 1; + e = ((3981806797 * e) & ys) | ((36045 * e) & ws); + t = + ((4283543511 * t) & ys) | + (((2950163797 * ((t << 16) | (e >>> 16))) & ys) >>> 16); + e ^= t >>> 1; + e = ((444984403 * e) & ys) | ((60499 * e) & ws); + t = + ((3301882366 * t) & ys) | + (((3120437893 * ((t << 16) | (e >>> 16))) & ys) >>> 16); + e ^= t >>> 1; + return ( + (e >>> 0).toString(16).padStart(8, "0") + + (t >>> 0).toString(16).padStart(8, "0") + ); + } +} +function addState(e, t, i, a, s) { + let r = e; + for (let e = 0, i = t.length - 1; e < i; e++) { + const i = t[e]; + r = r[i] ||= []; + } + r[t.at(-1)] = { checkFn: i, iterateFn: a, processFn: s }; +} +const bs = []; +addState( + bs, + [GA, MA, ze, xA], + null, + function iterateInlineImageGroup(e, t) { + const i = e.fnArray, + a = (t - (e.iCurr - 3)) % 4; + switch (a) { + case 0: + return i[t] === GA; + case 1: + return i[t] === MA; + case 2: + return i[t] === ze; + case 3: + return i[t] === xA; + } + throw new Error(`iterateInlineImageGroup - invalid pos: ${a}`); + }, + function foundInlineImageGroup(e, t) { + const i = e.fnArray, + a = e.argsArray, + s = e.iCurr, + r = s - 3, + n = s - 2, + o = s - 1, + g = Math.min(Math.floor((t - r) / 4), 200); + if (g < 10) return t - ((t - r) % 4); + let c = 0; + const h = []; + let l = 0, + C = 1, + Q = 1; + for (let e = 0; e < g; e++) { + const t = a[n + (e << 2)], + i = a[o + (e << 2)][0]; + if (C + i.width > 1e3) { + c = Math.max(c, C); + Q += l + 2; + C = 0; + l = 0; + } + h.push({ transform: t, x: C, y: Q, w: i.width, h: i.height }); + C += i.width + 2; + l = Math.max(l, i.height); + } + const E = Math.max(c, C) + 1, + u = Q + l + 1, + d = new Uint8Array(E * u * 4), + f = E << 2; + for (let e = 0; e < g; e++) { + const t = a[o + (e << 2)][0].data, + i = h[e].w << 2; + let s = 0, + r = (h[e].x + h[e].y * E) << 2; + d.set(t.subarray(0, i), r - f); + for (let a = 0, n = h[e].h; a < n; a++) { + d.set(t.subarray(s, s + i), r); + s += i; + r += f; + } + d.set(t.subarray(s - i, s), r); + for (; r >= 0; ) { + t[r - 4] = t[r]; + t[r - 3] = t[r + 1]; + t[r - 2] = t[r + 2]; + t[r - 1] = t[r + 3]; + t[r + i] = t[r + i - 4]; + t[r + i + 1] = t[r + i - 3]; + t[r + i + 2] = t[r + i - 2]; + t[r + i + 3] = t[r + i - 1]; + r -= f; + } + } + const p = { width: E, height: u }; + if (e.isOffscreenCanvasSupported) { + const e = new OffscreenCanvas(E, u); + e.getContext("2d").putImageData( + new ImageData(new Uint8ClampedArray(d.buffer), E, u), + 0, + 0, + ); + p.bitmap = e.transferToImageBitmap(); + p.data = null; + } else { + p.kind = F; + p.data = d; + } + i.splice(r, 4 * g, _e); + a.splice(r, 4 * g, [p, h]); + return r + 1; + }, +); +addState( + bs, + [GA, MA, je, xA], + null, + function iterateImageMaskGroup(e, t) { + const i = e.fnArray, + a = (t - (e.iCurr - 3)) % 4; + switch (a) { + case 0: + return i[t] === GA; + case 1: + return i[t] === MA; + case 2: + return i[t] === je; + case 3: + return i[t] === xA; + } + throw new Error(`iterateImageMaskGroup - invalid pos: ${a}`); + }, + function foundImageMaskGroup(e, t) { + const i = e.fnArray, + a = e.argsArray, + s = e.iCurr, + r = s - 3, + n = s - 2, + o = s - 1; + let g = Math.floor((t - r) / 4); + if (g < 10) return t - ((t - r) % 4); + let c, + h, + l = !1; + const C = a[o][0], + Q = a[n][0], + E = a[n][1], + u = a[n][2], + d = a[n][3]; + if (E === u) { + l = !0; + c = n + 4; + let e = o + 4; + for (let t = 1; t < g; t++, c += 4, e += 4) { + h = a[c]; + if ( + a[e][0] !== C || + h[0] !== Q || + h[1] !== E || + h[2] !== u || + h[3] !== d + ) { + t < 10 ? (l = !1) : (g = t); + break; + } + } + } + if (l) { + g = Math.min(g, 1e3); + const e = new Float32Array(2 * g); + c = n; + for (let t = 0; t < g; t++, c += 4) { + h = a[c]; + e[t << 1] = h[4]; + e[1 + (t << 1)] = h[5]; + } + i.splice(r, 4 * g, At); + a.splice(r, 4 * g, [C, Q, E, u, d, e]); + } else { + g = Math.min(g, 100); + const e = []; + for (let t = 0; t < g; t++) { + h = a[n + (t << 2)]; + const i = a[o + (t << 2)][0]; + e.push({ + data: i.data, + width: i.width, + height: i.height, + interpolate: i.interpolate, + count: i.count, + transform: h, + }); + } + i.splice(r, 4 * g, Ze); + a.splice(r, 4 * g, [e]); + } + return r + 1; + }, +); +addState( + bs, + [GA, MA, Ve, xA], + function (e) { + const t = e.argsArray, + i = e.iCurr - 2; + return 0 === t[i][1] && 0 === t[i][2]; + }, + function iterateImageGroup(e, t) { + const i = e.fnArray, + a = e.argsArray, + s = (t - (e.iCurr - 3)) % 4; + switch (s) { + case 0: + return i[t] === GA; + case 1: + if (i[t] !== MA) return !1; + const s = e.iCurr - 2, + r = a[s][0], + n = a[s][3]; + return a[t][0] === r && 0 === a[t][1] && 0 === a[t][2] && a[t][3] === n; + case 2: + if (i[t] !== Ve) return !1; + const o = a[e.iCurr - 1][0]; + return a[t][0] === o; + case 3: + return i[t] === xA; + } + throw new Error(`iterateImageGroup - invalid pos: ${s}`); + }, + function (e, t) { + const i = e.fnArray, + a = e.argsArray, + s = e.iCurr, + r = s - 3, + n = s - 2, + o = a[s - 1][0], + g = a[n][0], + c = a[n][3], + h = Math.min(Math.floor((t - r) / 4), 1e3); + if (h < 3) return t - ((t - r) % 4); + const l = new Float32Array(2 * h); + let C = n; + for (let e = 0; e < h; e++, C += 4) { + const t = a[C]; + l[e << 1] = t[4]; + l[1 + (e << 1)] = t[5]; + } + const Q = [o, g, c, l]; + i.splice(r, 4 * h, $e); + a.splice(r, 4 * h, Q); + return r + 1; + }, +); +addState( + bs, + [$A, se, Ie, he, Ae], + null, + function iterateShowTextGroup(e, t) { + const i = e.fnArray, + a = e.argsArray, + s = (t - (e.iCurr - 4)) % 5; + switch (s) { + case 0: + return i[t] === $A; + case 1: + return i[t] === se; + case 2: + return i[t] === Ie; + case 3: + if (i[t] !== he) return !1; + const s = e.iCurr - 3, + r = a[s][0], + n = a[s][1]; + return a[t][0] === r && a[t][1] === n; + case 4: + return i[t] === Ae; + } + throw new Error(`iterateShowTextGroup - invalid pos: ${s}`); + }, + function (e, t) { + const i = e.fnArray, + a = e.argsArray, + s = e.iCurr, + r = s - 4, + n = s - 3, + o = s - 2, + g = s - 1, + c = s, + h = a[n][0], + l = a[n][1]; + let C = Math.min(Math.floor((t - r) / 5), 1e3); + if (C < 3) return t - ((t - r) % 5); + let Q = r; + if ( + r >= 4 && + i[r - 4] === i[n] && + i[r - 3] === i[o] && + i[r - 2] === i[g] && + i[r - 1] === i[c] && + a[r - 4][0] === h && + a[r - 4][1] === l + ) { + C++; + Q -= 5; + } + let E = Q + 4; + for (let e = 1; e < C; e++) { + i.splice(E, 3); + a.splice(E, 3); + E += 2; + } + return E + 1; + }, +); +class NullOptimizer { + constructor(e) { + this.queue = e; + } + _optimize() {} + push(e, t) { + this.queue.fnArray.push(e); + this.queue.argsArray.push(t); + this._optimize(); + } + flush() {} + reset() {} +} +class QueueOptimizer extends NullOptimizer { + constructor(e) { + super(e); + this.state = null; + this.context = { + iCurr: 0, + fnArray: e.fnArray, + argsArray: e.argsArray, + isOffscreenCanvasSupported: !1, + }; + this.match = null; + this.lastProcessed = 0; + } + set isOffscreenCanvasSupported(e) { + this.context.isOffscreenCanvasSupported = e; + } + _optimize() { + const e = this.queue.fnArray; + let t = this.lastProcessed, + i = e.length, + a = this.state, + s = this.match; + if (!a && !s && t + 1 === i && !bs[e[t]]) { + this.lastProcessed = i; + return; + } + const r = this.context; + for (; t < i; ) { + if (s) { + if ((0, s.iterateFn)(r, t)) { + t++; + continue; + } + t = (0, s.processFn)(r, t + 1); + i = e.length; + s = null; + a = null; + if (t >= i) break; + } + a = (a || bs)[e[t]]; + if (a && !Array.isArray(a)) { + r.iCurr = t; + t++; + if (!a.checkFn || (0, a.checkFn)(r)) { + s = a; + a = null; + } else a = null; + } else t++; + } + this.state = a; + this.match = s; + this.lastProcessed = t; + } + flush() { + for (; this.match; ) { + const e = this.queue.fnArray.length; + this.lastProcessed = (0, this.match.processFn)(this.context, e); + this.match = null; + this.state = null; + this._optimize(); + } + } + reset() { + this.state = null; + this.match = null; + this.lastProcessed = 0; + } +} +class OperatorList { + static CHUNK_SIZE = 1e3; + static CHUNK_SIZE_ABOUT = this.CHUNK_SIZE - 5; + constructor(e = 0, t) { + this._streamSink = t; + this.fnArray = []; + this.argsArray = []; + this.optimizer = + !t || e & Q ? new NullOptimizer(this) : new QueueOptimizer(this); + this.dependencies = new Set(); + this._totalLength = 0; + this.weight = 0; + this._resolved = t ? null : Promise.resolve(); + } + set isOffscreenCanvasSupported(e) { + this.optimizer.isOffscreenCanvasSupported = e; + } + get length() { + return this.argsArray.length; + } + get ready() { + return this._resolved || this._streamSink.ready; + } + get totalLength() { + return this._totalLength + this.length; + } + addOp(e, t) { + this.optimizer.push(e, t); + this.weight++; + this._streamSink && + (this.weight >= OperatorList.CHUNK_SIZE || + (this.weight >= OperatorList.CHUNK_SIZE_ABOUT && + (e === xA || e === Ae))) && + this.flush(); + } + addImageOps(e, t, i) { + void 0 !== i && this.addOp(He, ["OC", i]); + this.addOp(e, t); + void 0 !== i && this.addOp(Ye, []); + } + addDependency(e) { + if (!this.dependencies.has(e)) { + this.dependencies.add(e); + this.addOp(yA, [e]); + } + } + addDependencies(e) { + for (const t of e) this.addDependency(t); + } + addOpList(e) { + if (e instanceof OperatorList) { + for (const t of e.dependencies) this.dependencies.add(t); + for (let t = 0, i = e.length; t < i; t++) + this.addOp(e.fnArray[t], e.argsArray[t]); + } else warn('addOpList - ignoring invalid "opList" parameter.'); + } + getIR() { + return { + fnArray: this.fnArray, + argsArray: this.argsArray, + length: this.length, + }; + } + get _transfers() { + const e = [], + { fnArray: t, argsArray: i, length: a } = this; + for (let s = 0; s < a; s++) + switch (t[s]) { + case ze: + case _e: + case je: + const t = i[s][0]; + !t.cached && + t.data?.buffer instanceof ArrayBuffer && + e.push(t.data.buffer); + } + return e; + } + flush(e = !1, t = null) { + this.optimizer.flush(); + const i = this.length; + this._totalLength += i; + this._streamSink.enqueue( + { + fnArray: this.fnArray, + argsArray: this.argsArray, + lastChunk: e, + separateAnnots: t, + length: i, + }, + 1, + this._transfers, + ); + this.dependencies.clear(); + this.fnArray.length = 0; + this.argsArray.length = 0; + this.weight = 0; + this.optimizer.reset(); + } +} +function decodeAndClamp(e, t, i, a) { + (e = t + e * i) < 0 ? (e = 0) : e > a && (e = a); + return e; +} +function resizeImageMask(e, t, i, a, s, r) { + const n = s * r; + let o; + o = + t <= 8 + ? new Uint8Array(n) + : t <= 16 + ? new Uint16Array(n) + : new Uint32Array(n); + const g = i / s, + c = a / r; + let h, + l, + C, + Q, + E = 0; + const u = new Uint16Array(s), + d = i; + for (h = 0; h < s; h++) u[h] = Math.floor(h * g); + for (h = 0; h < r; h++) { + C = Math.floor(h * c) * d; + for (l = 0; l < s; l++) { + Q = C + u[l]; + o[E++] = e[Q]; + } + } + return o; +} +class PDFImage { + constructor({ + xref: e, + res: t, + image: i, + isInline: a = !1, + smask: s = null, + mask: r = null, + isMask: n = !1, + pdfFunctionFactory: o, + localColorSpaceCache: g, + }) { + this.image = i; + let c = !1; + const h = i.dict, + l = h.get("F", "Filter"); + let C; + if (l instanceof Name) C = l.name; + else if (Array.isArray(l)) { + const t = e.fetchIfRef(l[0]); + t instanceof Name && (C = t.name); + } + switch (C) { + case "JPXDecode": + ({ + width: i.width, + height: i.height, + componentsCount: i.numComps, + bitsPerComponent: i.bitsPerComponent, + } = JpxImage.parseImageProperties(i.stream)); + i.stream.reset(); + c = !0; + break; + case "JBIG2Decode": + i.bitsPerComponent = 1; + i.numComps = 1; + } + let Q = h.get("W", "Width"), + E = h.get("H", "Height"); + if ( + Number.isInteger(i.width) && + i.width > 0 && + Number.isInteger(i.height) && + i.height > 0 && + (i.width !== Q || i.height !== E) + ) { + warn( + "PDFImage - using the Width/Height of the image data, rather than the image dictionary.", + ); + Q = i.width; + E = i.height; + } + if (Q < 1 || E < 1) + throw new FormatError(`Invalid image width: ${Q} or height: ${E}`); + this.width = Q; + this.height = E; + this.interpolate = h.get("I", "Interpolate"); + this.imageMask = h.get("IM", "ImageMask") || !1; + this.matte = h.get("Matte") || !1; + let u = i.bitsPerComponent; + if (!u) { + u = h.get("BPC", "BitsPerComponent"); + if (!u) { + if (!this.imageMask) + throw new FormatError( + `Bits per component missing in image: ${this.imageMask}`, + ); + u = 1; + } + } + this.bpc = u; + if (!this.imageMask) { + let s = h.getRaw("CS") || h.getRaw("ColorSpace"); + if (!s) { + info("JPX images (which do not require color spaces)"); + switch (i.numComps) { + case 1: + s = Name.get("DeviceGray"); + break; + case 3: + s = Name.get("DeviceRGB"); + break; + case 4: + s = Name.get("DeviceCMYK"); + break; + default: + throw new Error( + `JPX images with ${i.numComps} color components not supported.`, + ); + } + } + this.colorSpace = ColorSpace.parse({ + cs: s, + xref: e, + resources: a ? t : null, + pdfFunctionFactory: o, + localColorSpaceCache: g, + }); + this.numComps = this.colorSpace.numComps; + this.ignoreColorSpace = c && "Indexed" === this.colorSpace.name; + } + this.decode = h.getArray("D", "Decode"); + this.needsDecode = !1; + if ( + this.decode && + ((this.colorSpace && !this.colorSpace.isDefaultDecode(this.decode, u)) || + (n && !ColorSpace.isDefaultDecode(this.decode, 1))) + ) { + this.needsDecode = !0; + const e = (1 << u) - 1; + this.decodeCoefficients = []; + this.decodeAddends = []; + const t = "Indexed" === this.colorSpace?.name; + for (let i = 0, a = 0; i < this.decode.length; i += 2, ++a) { + const s = this.decode[i], + r = this.decode[i + 1]; + this.decodeCoefficients[a] = t ? (r - s) / e : r - s; + this.decodeAddends[a] = t ? s : e * s; + } + } + if (s) + this.smask = new PDFImage({ + xref: e, + res: t, + image: s, + isInline: a, + pdfFunctionFactory: o, + localColorSpaceCache: g, + }); + else if (r) + if (r instanceof BaseStream) { + r.dict.get("IM", "ImageMask") + ? (this.mask = new PDFImage({ + xref: e, + res: t, + image: r, + isInline: a, + isMask: !0, + pdfFunctionFactory: o, + localColorSpaceCache: g, + })) + : warn("Ignoring /Mask in image without /ImageMask."); + } else this.mask = r; + } + static async buildImage({ + xref: e, + res: t, + image: i, + isInline: a = !1, + pdfFunctionFactory: s, + localColorSpaceCache: r, + }) { + const n = i; + let o = null, + g = null; + const c = i.dict.get("SMask"), + h = i.dict.get("Mask"); + c + ? c instanceof BaseStream + ? (o = c) + : warn("Unsupported /SMask format.") + : h && + (h instanceof BaseStream || Array.isArray(h) + ? (g = h) + : warn("Unsupported /Mask format.")); + return new PDFImage({ + xref: e, + res: t, + image: n, + isInline: a, + smask: o, + mask: g, + pdfFunctionFactory: s, + localColorSpaceCache: r, + }); + } + static createRawMask({ + imgArray: e, + width: t, + height: i, + imageIsFromDecodeStream: a, + inverseDecode: s, + interpolate: r, + }) { + const n = ((t + 7) >> 3) * i, + o = e.byteLength; + let g, c; + if (!a || (s && !(n === o))) + if (s) { + g = new Uint8Array(n); + g.set(e); + g.fill(255, o); + } else g = new Uint8Array(e); + else g = e; + if (s) for (c = 0; c < o; c++) g[c] ^= 255; + return { data: g, width: t, height: i, interpolate: r }; + } + static async createMask({ + imgArray: e, + width: t, + height: i, + imageIsFromDecodeStream: a, + inverseDecode: s, + interpolate: r, + isOffscreenCanvasSupported: n = !1, + }) { + const o = 1 === t && 1 === i && s === (0 === e.length || !!(128 & e[0])); + if (o) return { isSingleOpaquePixel: o }; + if (n) { + if (ImageResizer.needsToBeResized(t, i)) { + const a = new Uint8ClampedArray(t * i * 4); + convertBlackAndWhiteToRGBA({ + src: e, + dest: a, + width: t, + height: i, + nonBlackColor: 0, + inverseDecode: s, + }); + return ImageResizer.createImage({ + kind: F, + data: a, + width: t, + height: i, + interpolate: r, + }); + } + const a = new OffscreenCanvas(t, i), + n = a.getContext("2d"), + o = n.createImageData(t, i); + convertBlackAndWhiteToRGBA({ + src: e, + dest: o.data, + width: t, + height: i, + nonBlackColor: 0, + inverseDecode: s, + }); + n.putImageData(o, 0, 0); + return { + data: null, + width: t, + height: i, + interpolate: r, + bitmap: a.transferToImageBitmap(), + }; + } + return this.createRawMask({ + imgArray: e, + width: t, + height: i, + inverseDecode: s, + imageIsFromDecodeStream: a, + interpolate: r, + }); + } + get drawWidth() { + return Math.max(this.width, this.smask?.width || 0, this.mask?.width || 0); + } + get drawHeight() { + return Math.max( + this.height, + this.smask?.height || 0, + this.mask?.height || 0, + ); + } + decodeBuffer(e) { + const t = this.bpc, + i = this.numComps, + a = this.decodeAddends, + s = this.decodeCoefficients, + r = (1 << t) - 1; + let n, o; + if (1 === t) { + for (n = 0, o = e.length; n < o; n++) e[n] = +!e[n]; + return; + } + let g = 0; + for (n = 0, o = this.width * this.height; n < o; n++) + for (let t = 0; t < i; t++) { + e[g] = decodeAndClamp(e[g], a[t], s[t], r); + g++; + } + } + getComponents(e) { + const t = this.bpc; + if (8 === t) return e; + const i = this.width, + a = this.height, + s = this.numComps, + r = i * a * s; + let n, + o = 0; + n = + t <= 8 + ? new Uint8Array(r) + : t <= 16 + ? new Uint16Array(r) + : new Uint32Array(r); + const g = i * s, + c = (1 << t) - 1; + let h, + l, + C = 0; + if (1 === t) { + let t, i, s; + for (let r = 0; r < a; r++) { + i = C + (-8 & g); + s = C + g; + for (; C < i; ) { + l = e[o++]; + n[C] = (l >> 7) & 1; + n[C + 1] = (l >> 6) & 1; + n[C + 2] = (l >> 5) & 1; + n[C + 3] = (l >> 4) & 1; + n[C + 4] = (l >> 3) & 1; + n[C + 5] = (l >> 2) & 1; + n[C + 6] = (l >> 1) & 1; + n[C + 7] = 1 & l; + C += 8; + } + if (C < s) { + l = e[o++]; + t = 128; + for (; C < s; ) { + n[C++] = +!!(l & t); + t >>= 1; + } + } + } + } else { + let i = 0; + l = 0; + for (C = 0, h = r; C < h; ++C) { + if (C % g == 0) { + l = 0; + i = 0; + } + for (; i < t; ) { + l = (l << 8) | e[o++]; + i += 8; + } + const a = i - t; + let s = l >> a; + s < 0 ? (s = 0) : s > c && (s = c); + n[C] = s; + l &= (1 << a) - 1; + i = a; + } + } + return n; + } + fillOpacity(e, t, i, a, s) { + const r = this.smask, + n = this.mask; + let o, g, c, h, l, C; + if (r) { + g = r.width; + c = r.height; + o = new Uint8ClampedArray(g * c); + r.fillGrayBuffer(o); + (g === t && c === i) || (o = resizeImageMask(o, r.bpc, g, c, t, i)); + } else if (n) + if (n instanceof PDFImage) { + g = n.width; + c = n.height; + o = new Uint8ClampedArray(g * c); + n.numComps = 1; + n.fillGrayBuffer(o); + for (h = 0, l = g * c; h < l; ++h) o[h] = 255 - o[h]; + (g === t && c === i) || (o = resizeImageMask(o, n.bpc, g, c, t, i)); + } else { + if (!Array.isArray(n)) throw new FormatError("Unknown mask format."); + { + o = new Uint8ClampedArray(t * i); + const e = this.numComps; + for (h = 0, l = t * i; h < l; ++h) { + let t = 0; + const i = h * e; + for (C = 0; C < e; ++C) { + const e = s[i + C], + a = 2 * C; + if (e < n[a] || e > n[a + 1]) { + t = 255; + break; + } + } + o[h] = t; + } + } + } + if (o) for (h = 0, C = 3, l = t * a; h < l; ++h, C += 4) e[C] = o[h]; + else for (h = 0, C = 3, l = t * a; h < l; ++h, C += 4) e[C] = 255; + } + undoPreblend(e, t, i) { + const a = this.smask?.matte; + if (!a) return; + const s = this.colorSpace.getRgb(a, 0), + r = s[0], + n = s[1], + o = s[2], + g = t * i * 4; + for (let t = 0; t < g; t += 4) { + const i = e[t + 3]; + if (0 === i) { + e[t] = 255; + e[t + 1] = 255; + e[t + 2] = 255; + continue; + } + const a = 255 / i; + e[t] = (e[t] - r) * a + r; + e[t + 1] = (e[t + 1] - n) * a + n; + e[t + 2] = (e[t + 2] - o) * a + o; + } + } + async createImageData(e = !1, t = !1) { + const i = this.drawWidth, + a = this.drawHeight, + s = { + width: i, + height: a, + interpolate: this.interpolate, + kind: 0, + data: null, + }, + r = this.numComps, + n = this.width, + o = this.height, + g = this.bpc, + c = (n * r * g + 7) >> 3, + h = t && ImageResizer.needsToBeResized(i, a); + if (!e) { + let e; + "DeviceGray" === this.colorSpace.name && 1 === g + ? (e = b) + : "DeviceRGB" !== this.colorSpace.name || + 8 !== g || + this.needsDecode || + (e = D); + if (e && !this.smask && !this.mask && i === n && a === o) { + const r = this.getImageBytes(o * c, {}); + if (t) + return h + ? ImageResizer.createImage( + { + data: r, + kind: e, + width: i, + height: a, + interpolate: this.interpolate, + }, + this.needsDecode, + ) + : this.createBitmap(e, n, o, r); + s.kind = e; + s.data = r; + if (this.needsDecode) { + assert( + e === b, + "PDFImage.createImageData: The image must be grayscale.", + ); + const t = s.data; + for (let e = 0, i = t.length; e < i; e++) t[e] ^= 255; + } + return s; + } + if ( + this.image instanceof JpegStream && + !this.smask && + !this.mask && + !this.needsDecode + ) { + let e = o * c; + if (t && !h) { + let t = !1; + switch (this.colorSpace.name) { + case "DeviceGray": + e *= 4; + t = !0; + break; + case "DeviceRGB": + e = (e / 3) * 4; + t = !0; + break; + case "DeviceCMYK": + t = !0; + } + if (t) { + const t = this.getImageBytes(e, { + drawWidth: i, + drawHeight: a, + forceRGBA: !0, + }); + return this.createBitmap(F, i, a, t); + } + } else + switch (this.colorSpace.name) { + case "DeviceGray": + e *= 3; + case "DeviceRGB": + case "DeviceCMYK": + s.kind = D; + s.data = this.getImageBytes(e, { + drawWidth: i, + drawHeight: a, + forceRGB: !0, + }); + return h ? ImageResizer.createImage(s) : s; + } + } + } + const l = this.getImageBytes(o * c, { internal: !0 }), + C = 0 | (((l.length / c) * a) / o), + Q = this.getComponents(l); + let E, u, d, f, p, m; + if (t && !h) { + d = new OffscreenCanvas(i, a); + f = d.getContext("2d"); + p = f.createImageData(i, a); + m = p.data; + } + s.kind = F; + if (e || this.smask || this.mask) { + (t && !h) || (m = new Uint8ClampedArray(i * a * 4)); + E = 1; + u = !0; + this.fillOpacity(m, i, a, C, Q); + } else { + if (!t || h) { + s.kind = D; + m = new Uint8ClampedArray(i * a * 3); + E = 0; + } else { + new Uint32Array(m.buffer).fill( + FeatureTest.isLittleEndian ? 4278190080 : 255, + ); + E = 1; + } + u = !1; + } + this.needsDecode && this.decodeBuffer(Q); + this.colorSpace.fillRgb(m, n, o, i, a, C, g, Q, E); + u && this.undoPreblend(m, i, C); + if (t && !h) { + f.putImageData(p, 0, 0); + return { + data: null, + width: i, + height: a, + bitmap: d.transferToImageBitmap(), + interpolate: this.interpolate, + }; + } + s.data = m; + return h ? ImageResizer.createImage(s) : s; + } + fillGrayBuffer(e) { + const t = this.numComps; + if (1 !== t) + throw new FormatError(`Reading gray scale from a color image: ${t}`); + const i = this.width, + a = this.height, + s = this.bpc, + r = (i * t * s + 7) >> 3, + n = this.getImageBytes(a * r, { internal: !0 }), + o = this.getComponents(n); + let g, c; + if (1 === s) { + c = i * a; + if (this.needsDecode) for (g = 0; g < c; ++g) e[g] = (o[g] - 1) & 255; + else for (g = 0; g < c; ++g) e[g] = 255 & -o[g]; + return; + } + this.needsDecode && this.decodeBuffer(o); + c = i * a; + const h = 255 / ((1 << s) - 1); + for (g = 0; g < c; ++g) e[g] = h * o[g]; + } + createBitmap(e, t, i, a) { + const s = new OffscreenCanvas(t, i), + r = s.getContext("2d"); + let n; + if (e === F) n = new ImageData(a, t, i); + else { + n = r.createImageData(t, i); + convertToRGBA({ + kind: e, + src: a, + dest: new Uint32Array(n.data.buffer), + width: t, + height: i, + inverseDecode: this.needsDecode, + }); + } + r.putImageData(n, 0, 0); + return { + data: null, + width: t, + height: i, + bitmap: s.transferToImageBitmap(), + interpolate: this.interpolate, + }; + } + getImageBytes( + e, + { + drawWidth: t, + drawHeight: i, + forceRGBA: a = !1, + forceRGB: s = !1, + internal: r = !1, + }, + ) { + this.image.reset(); + this.image.drawWidth = t || this.width; + this.image.drawHeight = i || this.height; + this.image.forceRGBA = !!a; + this.image.forceRGB = !!s; + const n = this.image.getBytes(e, this.ignoreColorSpace); + if (r || this.image instanceof DecodeStream) return n; + assert( + n instanceof Uint8Array, + 'PDFImage.getImageBytes: Unsupported "imageBytes" type.', + ); + return new Uint8Array(n); + } +} +const Ds = Object.freeze({ + maxImageSize: -1, + disableFontFace: !1, + ignoreErrors: !1, + isEvalSupported: !0, + isOffscreenCanvasSupported: !1, + canvasMaxAreaInBytes: -1, + fontExtraProperties: !1, + useSystemFonts: !0, + cMapUrl: null, + standardFontDataUrl: null, + }), + Fs = 1, + Ss = 2, + ks = Promise.resolve(); +function normalizeBlendMode(e, t = !1) { + if (Array.isArray(e)) { + for (const t of e) { + const e = normalizeBlendMode(t, !0); + if (e) return e; + } + warn(`Unsupported blend mode Array: ${e}`); + return "source-over"; + } + if (!(e instanceof Name)) return t ? null : "source-over"; + switch (e.name) { + case "Normal": + case "Compatible": + return "source-over"; + case "Multiply": + return "multiply"; + case "Screen": + return "screen"; + case "Overlay": + return "overlay"; + case "Darken": + return "darken"; + case "Lighten": + return "lighten"; + case "ColorDodge": + return "color-dodge"; + case "ColorBurn": + return "color-burn"; + case "HardLight": + return "hard-light"; + case "SoftLight": + return "soft-light"; + case "Difference": + return "difference"; + case "Exclusion": + return "exclusion"; + case "Hue": + return "hue"; + case "Saturation": + return "saturation"; + case "Color": + return "color"; + case "Luminosity": + return "luminosity"; + } + if (t) return null; + warn(`Unsupported blend mode: ${e.name}`); + return "source-over"; +} +function incrementCachedImageMaskCount(e) { + e.fn === je && e.args[0]?.count > 0 && e.args[0].count++; +} +class TimeSlotManager { + static TIME_SLOT_DURATION_MS = 20; + static CHECK_TIME_EVERY = 100; + constructor() { + this.reset(); + } + check() { + if (++this.checked < TimeSlotManager.CHECK_TIME_EVERY) return !1; + this.checked = 0; + return this.endTime <= Date.now(); + } + reset() { + this.endTime = Date.now() + TimeSlotManager.TIME_SLOT_DURATION_MS; + this.checked = 0; + } +} +class PartialEvaluator { + constructor({ + xref: e, + handler: t, + pageIndex: i, + idFactory: a, + fontCache: s, + builtInCMapCache: r, + standardFontDataCache: n, + globalImageCache: o, + systemFontCache: g, + options: c = null, + }) { + this.xref = e; + this.handler = t; + this.pageIndex = i; + this.idFactory = a; + this.fontCache = s; + this.builtInCMapCache = r; + this.standardFontDataCache = n; + this.globalImageCache = o; + this.systemFontCache = g; + this.options = c || Ds; + this.type3FontRefs = null; + this._regionalImageCache = new RegionalImageCache(); + this._fetchBuiltInCMapBound = this.fetchBuiltInCMap.bind(this); + ImageResizer.setMaxArea(this.options.canvasMaxAreaInBytes); + } + get _pdfFunctionFactory() { + return shadow( + this, + "_pdfFunctionFactory", + new PDFFunctionFactory({ + xref: this.xref, + isEvalSupported: this.options.isEvalSupported, + }), + ); + } + get parsingType3Font() { + return !!this.type3FontRefs; + } + clone(e = null) { + const t = Object.create(this); + t.options = Object.assign(Object.create(null), this.options, e); + return t; + } + hasBlendModes(e, t) { + if (!(e instanceof Dict)) return !1; + if (e.objId && t.has(e.objId)) return !1; + const i = new RefSet(t); + e.objId && i.put(e.objId); + const a = [e], + s = this.xref; + for (; a.length; ) { + const e = a.shift(), + t = e.get("ExtGState"); + if (t instanceof Dict) + for (let e of t.getRawValues()) { + if (e instanceof Ref) { + if (i.has(e)) continue; + try { + e = s.fetch(e); + } catch (t) { + i.put(e); + info(`hasBlendModes - ignoring ExtGState: "${t}".`); + continue; + } + } + if (!(e instanceof Dict)) continue; + e.objId && i.put(e.objId); + const t = e.get("BM"); + if (t instanceof Name) { + if ("Normal" !== t.name) return !0; + } else if (void 0 !== t && Array.isArray(t)) + for (const e of t) + if (e instanceof Name && "Normal" !== e.name) return !0; + } + const r = e.get("XObject"); + if (r instanceof Dict) + for (let e of r.getRawValues()) { + if (e instanceof Ref) { + if (i.has(e)) continue; + try { + e = s.fetch(e); + } catch (t) { + i.put(e); + info(`hasBlendModes - ignoring XObject: "${t}".`); + continue; + } + } + if (!(e instanceof BaseStream)) continue; + e.dict.objId && i.put(e.dict.objId); + const t = e.dict.get("Resources"); + if (t instanceof Dict && (!t.objId || !i.has(t.objId))) { + a.push(t); + t.objId && i.put(t.objId); + } + } + } + for (const e of i) t.put(e); + return !1; + } + async fetchBuiltInCMap(e) { + const t = this.builtInCMapCache.get(e); + if (t) return t; + let i; + if (null !== this.options.cMapUrl) { + const t = `${this.options.cMapUrl}${e}.bcmap`, + a = await fetch(t); + if (!a.ok) + throw new Error( + `fetchBuiltInCMap: failed to fetch file "${t}" with "${a.statusText}".`, + ); + i = { + cMapData: new Uint8Array(await a.arrayBuffer()), + compressionType: mA.BINARY, + }; + } else + i = await this.handler.sendWithPromise("FetchBuiltInCMap", { name: e }); + i.compressionType !== mA.NONE && this.builtInCMapCache.set(e, i); + return i; + } + async fetchStandardFontData(e) { + const t = this.standardFontDataCache.get(e); + if (t) return new Stream(t); + if (this.options.useSystemFonts && "Symbol" !== e && "ZapfDingbats" !== e) + return null; + const i = Wi()[e]; + let a; + if (null !== this.options.standardFontDataUrl) { + const e = `${this.options.standardFontDataUrl}${i}`, + t = await fetch(e); + t.ok + ? (a = new Uint8Array(await t.arrayBuffer())) + : warn( + `fetchStandardFontData: failed to fetch file "${e}" with "${t.statusText}".`, + ); + } else + try { + a = await this.handler.sendWithPromise("FetchStandardFontData", { + filename: i, + }); + } catch (e) { + warn(`fetchStandardFontData: failed to fetch file "${i}" with "${e}".`); + } + if (!a) return null; + this.standardFontDataCache.set(e, a); + return new Stream(a); + } + async buildFormXObject(e, t, i, a, s, r, n) { + const o = t.dict, + g = lookupMatrix(o.getArray("Matrix"), null), + c = lookupNormalRect(o.getArray("BBox"), null); + let h, l; + o.has("OC") && (h = await this.parseMarkedContentProps(o.get("OC"), e)); + void 0 !== h && a.addOp(He, ["OC", h]); + const C = o.get("Group"); + if (C) { + l = { matrix: g, bbox: c, smask: i, isolated: !1, knockout: !1 }; + let t = null; + if (isName(C.get("S"), "Transparency")) { + l.isolated = C.get("I") || !1; + l.knockout = C.get("K") || !1; + if (C.has("CS")) { + const i = C.getRaw("CS"), + a = ColorSpace.getCached(i, this.xref, n); + t = + a || + (await this.parseColorSpace({ + cs: i, + resources: e, + localColorSpaceCache: n, + })); + } + } + if (i?.backdrop) { + t ||= ColorSpace.singletons.rgb; + i.backdrop = t.getRgb(i.backdrop, 0); + } + a.addOp(Oe, [l]); + } + const Q = C ? [g, null] : [g, c]; + a.addOp(Te, Q); + await this.getOperatorList({ + stream: t, + task: s, + resources: o.get("Resources") || e, + operatorList: a, + initialState: r, + }); + a.addOp(qe, []); + C && a.addOp(Pe, [l]); + void 0 !== h && a.addOp(Ye, []); + } + _sendImgData(e, t, i = !1) { + const a = t ? [t.bitmap || t.data.buffer] : null; + return this.parsingType3Font || i + ? this.handler.send("commonobj", [e, "Image", t], a) + : this.handler.send("obj", [e, this.pageIndex, "Image", t], a); + } + async buildPaintImageXObject({ + resources: e, + image: t, + isInline: i = !1, + operatorList: a, + cacheKey: s, + localImageCache: r, + localColorSpaceCache: n, + }) { + const o = t.dict, + g = o.objId, + c = o.get("W", "Width"), + h = o.get("H", "Height"); + if (!c || "number" != typeof c || !h || "number" != typeof h) { + warn("Image dimensions are missing, or not numbers."); + return; + } + const l = this.options.maxImageSize; + if (-1 !== l && c * h > l) { + const e = "Image exceeded maximum allowed size and was removed."; + if (this.options.ignoreErrors) { + warn(e); + return; + } + throw new Error(e); + } + let C; + o.has("OC") && (C = await this.parseMarkedContentProps(o.get("OC"), e)); + let Q, E; + if (o.get("IM", "ImageMask") || !1) { + const e = o.get("I", "Interpolate"), + i = (c + 7) >> 3, + n = t.getBytes(i * h), + l = o.getArray("D", "Decode"); + if (this.parsingType3Font) { + Q = PDFImage.createRawMask({ + imgArray: n, + width: c, + height: h, + imageIsFromDecodeStream: t instanceof DecodeStream, + inverseDecode: l?.[0] > 0, + interpolate: e, + }); + Q.cached = !!s; + E = [Q]; + a.addImageOps(je, E, C); + if (s) { + const e = { fn: je, args: E, optionalContent: C }; + r.set(s, g, e); + g && this._regionalImageCache.set(null, g, e); + } + return; + } + Q = await PDFImage.createMask({ + imgArray: n, + width: c, + height: h, + imageIsFromDecodeStream: t instanceof DecodeStream, + inverseDecode: l?.[0] > 0, + interpolate: e, + isOffscreenCanvasSupported: this.options.isOffscreenCanvasSupported, + }); + if (Q.isSingleOpaquePixel) { + a.addImageOps(et, [], C); + if (s) { + const e = { fn: et, args: [], optionalContent: C }; + r.set(s, g, e); + g && this._regionalImageCache.set(null, g, e); + } + return; + } + const u = `mask_${this.idFactory.createObjId()}`; + a.addDependency(u); + Q.dataLen = Q.bitmap ? Q.width * Q.height * 4 : Q.data.length; + this._sendImgData(u, Q); + E = [ + { + data: u, + width: Q.width, + height: Q.height, + interpolate: Q.interpolate, + count: 1, + }, + ]; + a.addImageOps(je, E, C); + if (s) { + const e = { fn: je, args: E, optionalContent: C }; + r.set(s, g, e); + g && this._regionalImageCache.set(null, g, e); + } + return; + } + if (i && c + h < 200 && !o.has("SMask") && !o.has("Mask")) { + try { + const s = new PDFImage({ + xref: this.xref, + res: e, + image: t, + isInline: i, + pdfFunctionFactory: this._pdfFunctionFactory, + localColorSpaceCache: n, + }); + Q = await s.createImageData(!0, !1); + a.isOffscreenCanvasSupported = this.options.isOffscreenCanvasSupported; + a.addImageOps(ze, [Q], C); + } catch (e) { + const t = `Unable to decode inline image: "${e}".`; + if (!this.options.ignoreErrors) throw new Error(t); + warn(t); + } + return; + } + let u = `img_${this.idFactory.createObjId()}`, + d = !1; + if (this.parsingType3Font) u = `${this.idFactory.getDocId()}_type3_${u}`; + else if (s && g) { + d = this.globalImageCache.shouldCache(g, this.pageIndex); + if (d) { + assert(!i, "Cannot cache an inline image globally."); + u = `${this.idFactory.getDocId()}_${u}`; + } + } + a.addDependency(u); + E = [u, c, h]; + a.addImageOps(Ve, E, C); + if (d) { + if (this.globalImageCache.hasDecodeFailed(g)) { + this.globalImageCache.setData(g, { + objId: u, + fn: Ve, + args: E, + optionalContent: C, + byteSize: 0, + }); + this._sendImgData(u, null, d); + return; + } + if (c * h > 25e4 || o.has("SMask") || o.has("Mask")) { + const e = await this.handler.sendWithPromise("commonobj", [ + u, + "CopyLocalImage", + { imageRef: g }, + ]); + if (e) { + this.globalImageCache.setData(g, { + objId: u, + fn: Ve, + args: E, + optionalContent: C, + byteSize: 0, + }); + this.globalImageCache.addByteSize(g, e); + return; + } + } + } + PDFImage.buildImage({ + xref: this.xref, + res: e, + image: t, + isInline: i, + pdfFunctionFactory: this._pdfFunctionFactory, + localColorSpaceCache: n, + }) + .then(async (e) => { + Q = await e.createImageData( + !1, + this.options.isOffscreenCanvasSupported, + ); + Q.dataLen = Q.bitmap ? Q.width * Q.height * 4 : Q.data.length; + Q.ref = g; + d && this.globalImageCache.addByteSize(g, Q.dataLen); + return this._sendImgData(u, Q, d); + }) + .catch((e) => { + warn(`Unable to decode image "${u}": "${e}".`); + g && this.globalImageCache.addDecodeFailed(g); + return this._sendImgData(u, null, d); + }); + if (s) { + const e = { fn: Ve, args: E, optionalContent: C }; + r.set(s, g, e); + if (g) { + this._regionalImageCache.set(null, g, e); + d && + this.globalImageCache.setData(g, { + objId: u, + fn: Ve, + args: E, + optionalContent: C, + byteSize: 0, + }); + } + } + } + handleSMask(e, t, i, a, s, r) { + const n = e.get("G"), + o = { subtype: e.get("S").name, backdrop: e.get("BC") }, + g = e.get("TR"); + if (isPDFFunction(g)) { + const e = this._pdfFunctionFactory.create(g), + t = new Uint8Array(256), + i = new Float32Array(1); + for (let a = 0; a < 256; a++) { + i[0] = a / 255; + e(i, 0, i, 0); + t[a] = (255 * i[0]) | 0; + } + o.transferMap = t; + } + return this.buildFormXObject(t, n, o, i, a, s.state.clone(), r); + } + handleTransferFunction(e) { + let t; + if (Array.isArray(e)) t = e; + else { + if (!isPDFFunction(e)) return null; + t = [e]; + } + const i = []; + let a = 0, + s = 0; + for (const e of t) { + const t = this.xref.fetchIfRef(e); + a++; + if (isName(t, "Identity")) { + i.push(null); + continue; + } + if (!isPDFFunction(t)) return null; + const r = this._pdfFunctionFactory.create(t), + n = new Uint8Array(256), + o = new Float32Array(1); + for (let e = 0; e < 256; e++) { + o[0] = e / 255; + r(o, 0, o, 0); + n[e] = (255 * o[0]) | 0; + } + i.push(n); + s++; + } + return (1 !== a && 4 !== a) || 0 === s ? null : i; + } + handleTilingType(e, t, i, a, s, r, n, o) { + const g = new OperatorList(), + c = Dict.merge({ xref: this.xref, dictArray: [s.get("Resources"), i] }); + return this.getOperatorList({ + stream: a, + task: n, + resources: c, + operatorList: g, + }) + .then(function () { + const i = g.getIR(), + a = getTilingPatternIR(i, s, t); + r.addDependencies(g.dependencies); + r.addOp(e, a); + s.objId && o.set(null, s.objId, { operatorListIR: i, dict: s }); + }) + .catch((e) => { + if (!(e instanceof AbortException)) { + if (!this.options.ignoreErrors) throw e; + warn(`handleTilingType - ignoring pattern: "${e}".`); + } + }); + } + async handleSetFont(e, t, i, a, s, r, n = null, o = null) { + const g = t?.[0] instanceof Name ? t[0].name : null; + let c = await this.loadFont(g, i, e, n, o); + if (c.font.isType3Font) + try { + await c.loadType3Data(this, e, s); + a.addDependencies(c.type3Dependencies); + } catch (e) { + c = new TranslatedFont({ + loadedName: "g_font_error", + font: new ErrorFont(`Type3 font load error: ${e}`), + dict: c.font, + evaluatorOptions: this.options, + }); + } + r.font = c.font; + c.send(this.handler); + return c.loadedName; + } + handleText(e, t) { + const i = t.font, + a = i.charsToGlyphs(e); + if (i.data) { + (!!(t.textRenderingMode & w) || + "Pattern" === t.fillColorSpace.name || + i.disableFontFace || + this.options.disableFontFace) && + PartialEvaluator.buildFontPaths(i, a, this.handler, this.options); + } + return a; + } + ensureStateFont(e) { + if (e.font) return; + const t = new FormatError( + "Missing setFont (Tf) operator before text rendering operator.", + ); + if (!this.options.ignoreErrors) throw t; + warn(`ensureStateFont: "${t}".`); + } + async setGState({ + resources: e, + gState: t, + operatorList: i, + cacheKey: a, + task: s, + stateManager: r, + localGStateCache: n, + localColorSpaceCache: o, + }) { + const g = t.objId; + let c = !0; + const h = []; + let l = Promise.resolve(); + for (const a of t.getKeys()) { + const n = t.get(a); + switch (a) { + case "Type": + break; + case "LW": + case "LC": + case "LJ": + case "ML": + case "D": + case "RI": + case "FL": + case "CA": + case "ca": + h.push([a, n]); + break; + case "Font": + c = !1; + l = l.then(() => + this.handleSetFont(e, null, n[0], i, s, r.state).then(function (e) { + i.addDependency(e); + h.push([a, [e, n[1]]]); + }), + ); + break; + case "BM": + h.push([a, normalizeBlendMode(n)]); + break; + case "SMask": + if (isName(n, "None")) { + h.push([a, !1]); + break; + } + if (n instanceof Dict) { + c = !1; + l = l.then(() => this.handleSMask(n, e, i, s, r, o)); + h.push([a, !0]); + } else warn("Unsupported SMask type"); + break; + case "TR": + const t = this.handleTransferFunction(n); + h.push([a, t]); + break; + case "OP": + case "op": + case "OPM": + case "BG": + case "BG2": + case "UCR": + case "UCR2": + case "TR2": + case "HT": + case "SM": + case "SA": + case "AIS": + case "TK": + info("graphic state operator " + a); + break; + default: + info("Unknown graphic state operator " + a); + } + } + await l; + h.length > 0 && i.addOp(NA, [h]); + c && n.set(a, g, h); + } + loadFont(e, t, i, a = null, s = null) { + const errorFont = async () => + new TranslatedFont({ + loadedName: "g_font_error", + font: new ErrorFont(`Font "${e}" is not available.`), + dict: t, + evaluatorOptions: this.options, + }); + let r; + if (t) t instanceof Ref && (r = t); + else { + const t = i.get("Font"); + t && (r = t.getRaw(e)); + } + if (r) { + if (this.type3FontRefs?.has(r)) return errorFont(); + if (this.fontCache.has(r)) return this.fontCache.get(r); + try { + t = this.xref.fetchIfRef(r); + } catch (e) { + warn(`loadFont - lookup failed: "${e}".`); + } + } + if (!(t instanceof Dict)) { + if (!this.options.ignoreErrors && !this.parsingType3Font) { + warn(`Font "${e}" is not available.`); + return errorFont(); + } + warn( + `Font "${e}" is not available -- attempting to fallback to a default font.`, + ); + t = a || PartialEvaluator.fallbackFontDict; + } + if (t.cacheKey && this.fontCache.has(t.cacheKey)) + return this.fontCache.get(t.cacheKey); + const { promise: n, resolve: o } = Promise.withResolvers(); + let g; + try { + g = this.preEvaluateFont(t); + g.cssFontInfo = s; + } catch (e) { + warn(`loadFont - preEvaluateFont failed: "${e}".`); + return errorFont(); + } + const { descriptor: c, hash: h } = g, + l = r instanceof Ref; + let C; + if (h && c instanceof Dict) { + const e = (c.fontAliases ||= Object.create(null)); + if (e[h]) { + const t = e[h].aliasRef; + if (l && t && this.fontCache.has(t)) { + this.fontCache.putAlias(r, t); + return this.fontCache.get(r); + } + } else e[h] = { fontID: this.idFactory.createFontId() }; + l && (e[h].aliasRef = r); + C = e[h].fontID; + } else C = this.idFactory.createFontId(); + assert(C?.startsWith("f"), 'The "fontID" must be (correctly) defined.'); + if (l) this.fontCache.put(r, n); + else { + t.cacheKey = `cacheKey_${C}`; + this.fontCache.put(t.cacheKey, n); + } + t.loadedName = `${this.idFactory.getDocId()}_${C}`; + this.translateFont(g) + .then((e) => { + o( + new TranslatedFont({ + loadedName: t.loadedName, + font: e, + dict: t, + evaluatorOptions: this.options, + }), + ); + }) + .catch((e) => { + warn(`loadFont - translateFont failed: "${e}".`); + o( + new TranslatedFont({ + loadedName: t.loadedName, + font: new ErrorFont(e instanceof Error ? e.message : e), + dict: t, + evaluatorOptions: this.options, + }), + ); + }); + return n; + } + buildPath(e, t, i, a = !1) { + const s = e.length - 1; + i || (i = []); + if (s < 0 || e.fnArray[s] !== tt) { + if (a) { + warn(`Encountered path operator "${t}" inside of a text object.`); + e.addOp(GA, null); + } + let s; + switch (t) { + case KA: + const e = i[0] + i[2], + t = i[1] + i[3]; + s = [ + Math.min(i[0], e), + Math.min(i[1], t), + Math.max(i[0], e), + Math.max(i[1], t), + ]; + break; + case UA: + case LA: + s = [i[0], i[1], i[0], i[1]]; + break; + default: + s = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; + } + e.addOp(tt, [[t], i, s]); + a && e.addOp(xA, null); + } else { + const a = e.argsArray[s]; + a[0].push(t); + a[1].push(...i); + const r = a[2]; + switch (t) { + case KA: + const e = i[0] + i[2], + t = i[1] + i[3]; + r[0] = Math.min(r[0], i[0], e); + r[1] = Math.min(r[1], i[1], t); + r[2] = Math.max(r[2], i[0], e); + r[3] = Math.max(r[3], i[1], t); + break; + case UA: + case LA: + r[0] = Math.min(r[0], i[0]); + r[1] = Math.min(r[1], i[1]); + r[2] = Math.max(r[2], i[0]); + r[3] = Math.max(r[3], i[1]); + } + } + } + parseColorSpace({ cs: e, resources: t, localColorSpaceCache: i }) { + return ColorSpace.parseAsync({ + cs: e, + xref: this.xref, + resources: t, + pdfFunctionFactory: this._pdfFunctionFactory, + localColorSpaceCache: i, + }).catch((e) => { + if (e instanceof AbortException) return null; + if (this.options.ignoreErrors) { + warn(`parseColorSpace - ignoring ColorSpace: "${e}".`); + return null; + } + throw e; + }); + } + parseShading({ + shading: e, + resources: t, + localColorSpaceCache: i, + localShadingPatternCache: a, + }) { + let s, + r = a.get(e); + if (r) return r; + try { + s = Pattern.parseShading( + e, + this.xref, + t, + this._pdfFunctionFactory, + i, + ).getIR(); + } catch (t) { + if (t instanceof AbortException) return null; + if (this.options.ignoreErrors) { + warn(`parseShading - ignoring shading: "${t}".`); + a.set(e, null); + return null; + } + throw t; + } + r = `pattern_${this.idFactory.createObjId()}`; + this.parsingType3Font && (r = `${this.idFactory.getDocId()}_type3_${r}`); + a.set(e, r); + this.parsingType3Font + ? this.handler.send("commonobj", [r, "Pattern", s]) + : this.handler.send("obj", [r, this.pageIndex, "Pattern", s]); + return r; + } + handleColorN(e, t, i, a, s, r, n, o, g, c) { + const h = i.pop(); + if (h instanceof Name) { + const l = s.getRaw(h.name), + C = l instanceof Ref && g.getByRef(l); + if (C) + try { + const s = a.base ? a.base.getRgb(i, 0) : null, + r = getTilingPatternIR(C.operatorListIR, C.dict, s); + e.addOp(t, r); + return; + } catch {} + const Q = this.xref.fetchIfRef(l); + if (Q) { + const s = Q instanceof BaseStream ? Q.dict : Q, + h = s.get("PatternType"); + if (h === Fs) { + const o = a.base ? a.base.getRgb(i, 0) : null; + return this.handleTilingType(t, o, r, Q, s, e, n, g); + } + if (h === Ss) { + const i = s.get("Shading"), + a = this.parseShading({ + shading: i, + resources: r, + localColorSpaceCache: o, + localShadingPatternCache: c, + }); + if (a) { + const i = lookupMatrix(s.getArray("Matrix"), null); + e.addOp(t, ["Shading", a, i]); + } + return; + } + throw new FormatError(`Unknown PatternType: ${h}`); + } + } + throw new FormatError(`Unknown PatternName: ${h}`); + } + _parseVisibilityExpression(e, t, i) { + if (++t > 10) { + warn("Visibility expression is too deeply nested"); + return; + } + const a = e.length, + s = this.xref.fetchIfRef(e[0]); + if (!(a < 2) && s instanceof Name) { + switch (s.name) { + case "And": + case "Or": + case "Not": + i.push(s.name); + break; + default: + warn(`Invalid operator ${s.name} in visibility expression`); + return; + } + for (let s = 1; s < a; s++) { + const a = e[s], + r = this.xref.fetchIfRef(a); + if (Array.isArray(r)) { + const e = []; + i.push(e); + this._parseVisibilityExpression(r, t, e); + } else a instanceof Ref && i.push(a.toString()); + } + } else warn("Invalid visibility expression"); + } + async parseMarkedContentProps(e, t) { + let i; + if (e instanceof Name) { + i = t.get("Properties").get(e.name); + } else { + if (!(e instanceof Dict)) + throw new FormatError("Optional content properties malformed."); + i = e; + } + const a = i.get("Type")?.name; + if ("OCG" === a) return { type: a, id: i.objId }; + if ("OCMD" === a) { + const e = i.get("VE"); + if (Array.isArray(e)) { + const t = []; + this._parseVisibilityExpression(e, 0, t); + if (t.length > 0) return { type: "OCMD", expression: t }; + } + const t = i.get("OCGs"); + if (Array.isArray(t) || t instanceof Dict) { + const e = []; + if (Array.isArray(t)) for (const i of t) e.push(i.toString()); + else e.push(t.objId); + return { + type: a, + ids: e, + policy: i.get("P") instanceof Name ? i.get("P").name : null, + expression: null, + }; + } + if (t instanceof Ref) return { type: a, id: t.toString() }; + } + return null; + } + getOperatorList({ + stream: e, + task: t, + resources: i, + operatorList: a, + initialState: s = null, + fallbackFontDict: r = null, + }) { + i ||= Dict.empty; + s ||= new EvalState(); + if (!a) + throw new Error('getOperatorList: missing "operatorList" parameter'); + const n = this, + o = this.xref; + let g = !1; + const c = new LocalImageCache(), + h = new LocalColorSpaceCache(), + l = new LocalGStateCache(), + C = new LocalTilingPatternCache(), + Q = new Map(), + E = i.get("XObject") || Dict.empty, + u = i.get("Pattern") || Dict.empty, + d = new StateManager(s), + f = new EvaluatorPreprocessor(e, o, d), + p = new TimeSlotManager(); + function closePendingRestoreOPS(e) { + for (let e = 0, t = f.savedStatesDepth; e < t; e++) a.addOp(xA, []); + } + return new Promise(function promiseBody(e, s) { + const next = function (t) { + Promise.all([t, a.ready]).then(function () { + try { + promiseBody(e, s); + } catch (e) { + s(e); + } + }, s); + }; + t.ensureNotTerminated(); + p.reset(); + const m = {}; + let y, w, b, D, F, S; + for (; !(y = p.check()); ) { + m.args = null; + if (!f.read(m)) break; + let e = m.args, + s = m.fn; + switch (0 | s) { + case Me: + S = e[0] instanceof Name; + F = e[0].name; + if (S) { + const t = c.getByName(F); + if (t) { + a.addImageOps(t.fn, t.args, t.optionalContent); + incrementCachedImageMaskCount(t); + e = null; + continue; + } + } + next( + new Promise(function (e, s) { + if (!S) + throw new FormatError("XObject must be referred to by name."); + let r = E.getRaw(F); + if (r instanceof Ref) { + const t = c.getByRef(r) || n._regionalImageCache.getByRef(r); + if (t) { + a.addImageOps(t.fn, t.args, t.optionalContent); + incrementCachedImageMaskCount(t); + e(); + return; + } + const i = n.globalImageCache.getData(r, n.pageIndex); + if (i) { + a.addDependency(i.objId); + a.addImageOps(i.fn, i.args, i.optionalContent); + e(); + return; + } + r = o.fetch(r); + } + if (!(r instanceof BaseStream)) + throw new FormatError("XObject should be a stream"); + const g = r.dict.get("Subtype"); + if (!(g instanceof Name)) + throw new FormatError("XObject should have a Name subtype"); + if ("Form" !== g.name) + if ("Image" !== g.name) { + if ("PS" !== g.name) + throw new FormatError( + `Unhandled XObject subtype ${g.name}`, + ); + info("Ignored XObject subtype PS"); + e(); + } else + n.buildPaintImageXObject({ + resources: i, + image: r, + operatorList: a, + cacheKey: F, + localImageCache: c, + localColorSpaceCache: h, + }).then(e, s); + else { + d.save(); + n.buildFormXObject(i, r, null, a, t, d.state.clone(), h).then( + function () { + d.restore(); + e(); + }, + s, + ); + } + }).catch(function (e) { + if (!(e instanceof AbortException)) { + if (!n.options.ignoreErrors) throw e; + warn(`getOperatorList - ignoring XObject: "${e}".`); + } + }), + ); + return; + case se: + var k = e[1]; + next( + n.handleSetFont(i, e, null, a, t, d.state, r).then(function (e) { + a.addDependency(e); + a.addOp(se, [e, k]); + }), + ); + return; + case $A: + g = !0; + break; + case Ae: + g = !1; + break; + case xe: + var R = e[0].cacheKey; + if (R) { + const t = c.getByName(R); + if (t) { + a.addImageOps(t.fn, t.args, t.optionalContent); + incrementCachedImageMaskCount(t); + e = null; + continue; + } + } + next( + n.buildPaintImageXObject({ + resources: i, + image: e[0], + isInline: !0, + operatorList: a, + cacheKey: R, + localImageCache: c, + localColorSpaceCache: h, + }), + ); + return; + case he: + if (!d.state.font) { + n.ensureStateFont(d.state); + continue; + } + e[0] = n.handleText(e[0], d.state); + break; + case le: + if (!d.state.font) { + n.ensureStateFont(d.state); + continue; + } + var N = [], + G = d.state; + for (const t of e[0]) + "string" == typeof t + ? N.push(...n.handleText(t, G)) + : "number" == typeof t && N.push(t); + e[0] = N; + s = he; + break; + case Ce: + if (!d.state.font) { + n.ensureStateFont(d.state); + continue; + } + a.addOp(ce); + e[0] = n.handleText(e[0], d.state); + s = he; + break; + case Be: + if (!d.state.font) { + n.ensureStateFont(d.state); + continue; + } + a.addOp(ce); + a.addOp(te, [e.shift()]); + a.addOp(ee, [e.shift()]); + e[0] = n.handleText(e[0], d.state); + s = he; + break; + case re: + d.state.textRenderingMode = e[0]; + break; + case de: { + const t = ColorSpace.getCached(e[0], o, h); + if (t) { + d.state.fillColorSpace = t; + continue; + } + next( + n + .parseColorSpace({ + cs: e[0], + resources: i, + localColorSpaceCache: h, + }) + .then(function (e) { + e && (d.state.fillColorSpace = e); + }), + ); + return; + } + case ue: { + const t = ColorSpace.getCached(e[0], o, h); + if (t) { + d.state.strokeColorSpace = t; + continue; + } + next( + n + .parseColorSpace({ + cs: e[0], + resources: i, + localColorSpaceCache: h, + }) + .then(function (e) { + e && (d.state.strokeColorSpace = e); + }), + ); + return; + } + case me: + D = d.state.fillColorSpace; + e = D.getRgb(e, 0); + s = Fe; + break; + case fe: + D = d.state.strokeColorSpace; + e = D.getRgb(e, 0); + s = De; + break; + case be: + d.state.fillColorSpace = ColorSpace.singletons.gray; + e = ColorSpace.singletons.gray.getRgb(e, 0); + s = Fe; + break; + case we: + d.state.strokeColorSpace = ColorSpace.singletons.gray; + e = ColorSpace.singletons.gray.getRgb(e, 0); + s = De; + break; + case ke: + d.state.fillColorSpace = ColorSpace.singletons.cmyk; + e = ColorSpace.singletons.cmyk.getRgb(e, 0); + s = Fe; + break; + case Se: + d.state.strokeColorSpace = ColorSpace.singletons.cmyk; + e = ColorSpace.singletons.cmyk.getRgb(e, 0); + s = De; + break; + case Fe: + d.state.fillColorSpace = ColorSpace.singletons.rgb; + e = ColorSpace.singletons.rgb.getRgb(e, 0); + break; + case De: + d.state.strokeColorSpace = ColorSpace.singletons.rgb; + e = ColorSpace.singletons.rgb.getRgb(e, 0); + break; + case ye: + D = d.state.fillColorSpace; + if ("Pattern" === D.name) { + next(n.handleColorN(a, ye, e, D, u, i, t, h, C, Q)); + return; + } + e = D.getRgb(e, 0); + s = Fe; + break; + case pe: + D = d.state.strokeColorSpace; + if ("Pattern" === D.name) { + next(n.handleColorN(a, pe, e, D, u, i, t, h, C, Q)); + return; + } + e = D.getRgb(e, 0); + s = De; + break; + case Re: + var x = i.get("Shading"); + if (!x) throw new FormatError("No shading resource found"); + var M = x.get(e[0].name); + if (!M) throw new FormatError("No shading object found"); + const f = n.parseShading({ + shading: M, + resources: i, + localColorSpaceCache: h, + localShadingPatternCache: Q, + }); + if (!f) continue; + e = [f]; + s = Re; + break; + case NA: + S = e[0] instanceof Name; + F = e[0].name; + if (S) { + const t = l.getByName(F); + if (t) { + t.length > 0 && a.addOp(NA, [t]); + e = null; + continue; + } + } + next( + new Promise(function (e, s) { + if (!S) + throw new FormatError("GState must be referred to by name."); + const r = i.get("ExtGState"); + if (!(r instanceof Dict)) + throw new FormatError("ExtGState should be a dictionary."); + const o = r.get(F); + if (!(o instanceof Dict)) + throw new FormatError("GState should be a dictionary."); + n.setGState({ + resources: i, + gState: o, + operatorList: a, + cacheKey: F, + task: t, + stateManager: d, + localGStateCache: l, + localColorSpaceCache: h, + }).then(e, s); + }).catch(function (e) { + if (!(e instanceof AbortException)) { + if (!n.options.ignoreErrors) throw e; + warn(`getOperatorList - ignoring ExtGState: "${e}".`); + } + }), + ); + return; + case UA: + case LA: + case JA: + case HA: + case YA: + case vA: + case KA: + n.buildPath(a, s, e, g); + continue; + case Ue: + case Le: + case ve: + case Ke: + continue; + case He: + if (!(e[0] instanceof Name)) { + warn(`Expected name for beginMarkedContentProps arg0=${e[0]}`); + a.addOp(He, ["OC", null]); + continue; + } + if ("OC" === e[0].name) { + next( + n + .parseMarkedContentProps(e[1], i) + .then((e) => { + a.addOp(He, ["OC", e]); + }) + .catch((e) => { + if (!(e instanceof AbortException)) { + if (!n.options.ignoreErrors) throw e; + warn( + `getOperatorList - ignoring beginMarkedContentProps: "${e}".`, + ); + a.addOp(He, ["OC", null]); + } + }), + ); + return; + } + e = [e[0].name, e[1] instanceof Dict ? e[1].get("MCID") : null]; + break; + default: + if (null !== e) { + for (w = 0, b = e.length; w < b && !(e[w] instanceof Dict); w++); + if (w < b) { + warn("getOperatorList - ignoring operator: " + s); + continue; + } + } + } + a.addOp(s, e); + } + if (y) next(ks); + else { + closePendingRestoreOPS(); + e(); + } + }).catch((e) => { + if (!(e instanceof AbortException)) { + if (!this.options.ignoreErrors) throw e; + warn( + `getOperatorList - ignoring errors during "${t.name}" task: "${e}".`, + ); + closePendingRestoreOPS(); + } + }); + } + getTextContent({ + stream: e, + task: t, + resources: s, + stateManager: r = null, + includeMarkedContent: n = !1, + sink: o, + seenStyles: g = new Set(), + viewBox: c, + lang: h = null, + markedContentData: l = null, + disableNormalization: C = !1, + keepWhiteSpace: Q = !1, + }) { + s ||= Dict.empty; + r ||= new StateManager(new TextState()); + n && (l ||= { level: 0 }); + const E = { items: [], styles: Object.create(null), lang: h }, + u = { + initialized: !1, + str: [], + totalWidth: 0, + totalHeight: 0, + width: 0, + height: 0, + vertical: !1, + prevTransform: null, + textAdvanceScale: 0, + spaceInFlowMin: 0, + spaceInFlowMax: 0, + trackingSpaceMin: 1 / 0, + negativeSpaceMax: -1 / 0, + notASpace: -1 / 0, + transform: null, + fontName: null, + hasEOL: !1, + }, + d = [" ", " "]; + let f = 0; + function saveLastChar(e) { + const t = (f + 1) % 2, + i = " " !== d[f] && " " === d[t]; + d[f] = e; + f = t; + return !Q && i; + } + function shouldAddWhitepsace() { + return !Q && " " !== d[f] && " " === d[(f + 1) % 2]; + } + function resetLastChars() { + d[0] = d[1] = " "; + f = 0; + } + const p = this, + m = this.xref, + y = []; + let w = null; + const b = new LocalImageCache(), + D = new LocalGStateCache(), + F = new EvaluatorPreprocessor(e, m, r); + let S; + function pushWhitespace({ + width: e = 0, + height: t = 0, + transform: i = u.prevTransform, + fontName: a = u.fontName, + }) { + E.items.push({ + str: " ", + dir: "ltr", + width: e, + height: t, + transform: i, + fontName: a, + hasEOL: !1, + }); + } + function getCurrentTextTransform() { + const e = S.font, + t = [S.fontSize * S.textHScale, 0, 0, S.fontSize, 0, S.textRise]; + if ( + e.isType3Font && + (S.fontSize <= 1 || e.isCharBBox) && + !isArrayEqual(S.fontMatrix, a) + ) { + const i = e.bbox[3] - e.bbox[1]; + i > 0 && (t[3] *= i * S.fontMatrix[3]); + } + return Util.transform(S.ctm, Util.transform(S.textMatrix, t)); + } + function ensureTextContentItem() { + if (u.initialized) return u; + const { font: e, loadedName: t } = S; + if (!g.has(t)) { + g.add(t); + E.styles[t] = { + fontFamily: e.fallbackName, + ascent: e.ascent, + descent: e.descent, + vertical: e.vertical, + }; + if (p.options.fontExtraProperties && e.systemFontInfo) { + const i = E.styles[t]; + i.fontSubstitution = e.systemFontInfo.css; + i.fontSubstitutionLoadedName = e.systemFontInfo.loadedName; + } + } + u.fontName = t; + const i = (u.transform = getCurrentTextTransform()); + if (e.vertical) { + u.width = u.totalWidth = Math.hypot(i[0], i[1]); + u.height = u.totalHeight = 0; + u.vertical = !0; + } else { + u.width = u.totalWidth = 0; + u.height = u.totalHeight = Math.hypot(i[2], i[3]); + u.vertical = !1; + } + const a = Math.hypot(S.textLineMatrix[0], S.textLineMatrix[1]), + s = Math.hypot(S.ctm[0], S.ctm[1]); + u.textAdvanceScale = s * a; + const { fontSize: r } = S; + u.trackingSpaceMin = 0.102 * r; + u.notASpace = 0.03 * r; + u.negativeSpaceMax = -0.2 * r; + u.spaceInFlowMin = 0.102 * r; + u.spaceInFlowMax = 0.6 * r; + u.hasEOL = !1; + u.initialized = !0; + return u; + } + function updateAdvanceScale() { + if (!u.initialized) return; + const e = Math.hypot(S.textLineMatrix[0], S.textLineMatrix[1]), + t = Math.hypot(S.ctm[0], S.ctm[1]) * e; + if (t !== u.textAdvanceScale) { + if (u.vertical) { + u.totalHeight += u.height * u.textAdvanceScale; + u.height = 0; + } else { + u.totalWidth += u.width * u.textAdvanceScale; + u.width = 0; + } + u.textAdvanceScale = t; + } + } + function runBidiTransform(e) { + let t = e.str.join(""); + C || + (t = (function normalizeUnicode(e) { + if (!gt) { + gt = + /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu; + It = new Map([["ſt", "ſt"]]); + } + return e.replaceAll(gt, (e, t, i) => + t ? t.normalize("NFKC") : It.get(i), + ); + })(t)); + const i = bidi(t, -1, e.vertical); + return { + str: i.str, + dir: i.dir, + width: Math.abs(e.totalWidth), + height: Math.abs(e.totalHeight), + transform: e.transform, + fontName: e.fontName, + hasEOL: e.hasEOL, + }; + } + async function handleSetFont(e, i) { + const r = await p.loadFont(e, i, s); + if (r.font.isType3Font) + try { + await r.loadType3Data(p, s, t); + } catch {} + S.loadedName = r.loadedName; + S.font = r.font; + S.fontMatrix = r.font.fontMatrix || a; + } + function applyInverseRotation(e, t, i) { + const a = Math.hypot(i[0], i[1]); + return [(i[0] * e + i[1] * t) / a, (i[2] * e + i[3] * t) / a]; + } + function compareWithLastPosition(e) { + const t = getCurrentTextTransform(); + let i = t[4], + a = t[5]; + if (S.font?.vertical) { + if (i < c[0] || i > c[2] || a + e < c[1] || a > c[3]) return !1; + } else if (i + e < c[0] || i > c[2] || a < c[1] || a > c[3]) return !1; + if (!S.font || !u.prevTransform) return !0; + let s = u.prevTransform[4], + r = u.prevTransform[5]; + if (s === i && r === a) return !0; + let n = -1; + t[0] && 0 === t[1] && 0 === t[2] + ? (n = t[0] > 0 ? 0 : 180) + : t[1] && 0 === t[0] && 0 === t[3] && (n = t[1] > 0 ? 90 : 270); + switch (n) { + case 0: + break; + case 90: + [i, a] = [a, i]; + [s, r] = [r, s]; + break; + case 180: + [i, a, s, r] = [-i, -a, -s, -r]; + break; + case 270: + [i, a] = [-a, -i]; + [s, r] = [-r, -s]; + break; + default: + [i, a] = applyInverseRotation(i, a, t); + [s, r] = applyInverseRotation(s, r, u.prevTransform); + } + if (S.font.vertical) { + const e = (r - a) / u.textAdvanceScale, + t = i - s, + n = Math.sign(u.height); + if (e < n * u.negativeSpaceMax) { + if (Math.abs(t) > 0.5 * u.width) { + appendEOL(); + return !0; + } + resetLastChars(); + flushTextContentItem(); + return !0; + } + if (Math.abs(t) > u.width) { + appendEOL(); + return !0; + } + e <= n * u.notASpace && resetLastChars(); + if (e <= n * u.trackingSpaceMin) + if (shouldAddWhitepsace()) { + resetLastChars(); + flushTextContentItem(); + pushWhitespace({ height: Math.abs(e) }); + } else u.height += e; + else if (!addFakeSpaces(e, u.prevTransform, n)) + if (0 === u.str.length) { + resetLastChars(); + pushWhitespace({ height: Math.abs(e) }); + } else u.height += e; + Math.abs(t) > 0.25 * u.width && flushTextContentItem(); + return !0; + } + const o = (i - s) / u.textAdvanceScale, + g = a - r, + h = Math.sign(u.width); + if (o < h * u.negativeSpaceMax) { + if (Math.abs(g) > 0.5 * u.height) { + appendEOL(); + return !0; + } + resetLastChars(); + flushTextContentItem(); + return !0; + } + if (Math.abs(g) > u.height) { + appendEOL(); + return !0; + } + o <= h * u.notASpace && resetLastChars(); + if (o <= h * u.trackingSpaceMin) + if (shouldAddWhitepsace()) { + resetLastChars(); + flushTextContentItem(); + pushWhitespace({ width: Math.abs(o) }); + } else u.width += o; + else if (!addFakeSpaces(o, u.prevTransform, h)) + if (0 === u.str.length) { + resetLastChars(); + pushWhitespace({ width: Math.abs(o) }); + } else u.width += o; + Math.abs(g) > 0.25 * u.height && flushTextContentItem(); + return !0; + } + function buildTextContentItem({ chars: e, extraSpacing: t }) { + const i = S.font; + if (!e) { + const e = S.charSpacing + t; + e && + (i.vertical + ? S.translateTextMatrix(0, -e) + : S.translateTextMatrix(e * S.textHScale, 0)); + Q && compareWithLastPosition(0); + return; + } + const a = i.charsToGlyphs(e), + s = S.fontMatrix[0] * S.fontSize; + for (let e = 0, r = a.length; e < r; e++) { + const n = a[e], + { category: o } = n; + if (o.isInvisibleFormatMark) continue; + let g = S.charSpacing + (e + 1 === r ? t : 0), + c = n.width; + i.vertical && (c = n.vmetric ? n.vmetric[0] : -c); + let h = c * s; + if (!Q && o.isWhitespace) { + if (i.vertical) { + g += -h + S.wordSpacing; + S.translateTextMatrix(0, -g); + } else { + g += h + S.wordSpacing; + S.translateTextMatrix(g * S.textHScale, 0); + } + saveLastChar(" "); + continue; + } + if (!o.isZeroWidthDiacritic && !compareWithLastPosition(h)) { + i.vertical + ? S.translateTextMatrix(0, h) + : S.translateTextMatrix(h * S.textHScale, 0); + continue; + } + const l = ensureTextContentItem(); + o.isZeroWidthDiacritic && (h = 0); + if (i.vertical) { + S.translateTextMatrix(0, h); + h = Math.abs(h); + l.height += h; + } else { + h *= S.textHScale; + S.translateTextMatrix(h, 0); + l.width += h; + } + h && (l.prevTransform = getCurrentTextTransform()); + const C = n.unicode; + saveLastChar(C) && l.str.push(" "); + l.str.push(C); + g && + (i.vertical + ? S.translateTextMatrix(0, -g) + : S.translateTextMatrix(g * S.textHScale, 0)); + } + } + function appendEOL() { + resetLastChars(); + if (u.initialized) { + u.hasEOL = !0; + flushTextContentItem(); + } else + E.items.push({ + str: "", + dir: "ltr", + width: 0, + height: 0, + transform: getCurrentTextTransform(), + fontName: S.loadedName, + hasEOL: !0, + }); + } + function addFakeSpaces(e, t, i) { + if (i * u.spaceInFlowMin <= e && e <= i * u.spaceInFlowMax) { + if (u.initialized) { + resetLastChars(); + u.str.push(" "); + } + return !1; + } + const a = u.fontName; + let s = 0; + if (u.vertical) { + s = e; + e = 0; + } + flushTextContentItem(); + resetLastChars(); + pushWhitespace({ + width: Math.abs(e), + height: Math.abs(s), + transform: t || getCurrentTextTransform(), + fontName: a, + }); + return !0; + } + function flushTextContentItem() { + if (u.initialized && u.str) { + u.vertical + ? (u.totalHeight += u.height * u.textAdvanceScale) + : (u.totalWidth += u.width * u.textAdvanceScale); + E.items.push(runBidiTransform(u)); + u.initialized = !1; + u.str.length = 0; + } + } + function enqueueChunk(e = !1) { + const t = E.items.length; + if (0 !== t && !(e && t < 10)) { + o.enqueue(E, t); + E.items = []; + E.styles = Object.create(null); + } + } + const k = new TimeSlotManager(); + return new Promise(function promiseBody(e, a) { + const next = function (t) { + enqueueChunk(!0); + Promise.all([t, o.ready]).then(function () { + try { + promiseBody(e, a); + } catch (e) { + a(e); + } + }, a); + }; + t.ensureNotTerminated(); + k.reset(); + const u = {}; + let d, + f = []; + for (; !(d = k.check()); ) { + f.length = 0; + u.args = f; + if (!F.read(u)) break; + const e = S; + S = r.state; + const a = u.fn; + f = u.args; + switch (0 | a) { + case se: + var R = f[0].name, + N = f[1]; + if (S.font && R === S.fontName && N === S.fontSize) break; + flushTextContentItem(); + S.fontName = R; + S.fontSize = N; + next(handleSetFont(R, null)); + return; + case ne: + S.textRise = f[0]; + break; + case ie: + S.textHScale = f[0] / 100; + break; + case ae: + S.leading = f[0]; + break; + case oe: + S.translateTextLineMatrix(f[0], f[1]); + S.textMatrix = S.textLineMatrix.slice(); + break; + case ge: + S.leading = -f[1]; + S.translateTextLineMatrix(f[0], f[1]); + S.textMatrix = S.textLineMatrix.slice(); + break; + case ce: + S.carriageReturn(); + break; + case Ie: + S.setTextMatrix(f[0], f[1], f[2], f[3], f[4], f[5]); + S.setTextLineMatrix(f[0], f[1], f[2], f[3], f[4], f[5]); + updateAdvanceScale(); + break; + case ee: + S.charSpacing = f[0]; + break; + case te: + S.wordSpacing = f[0]; + break; + case $A: + S.textMatrix = i.slice(); + S.textLineMatrix = i.slice(); + break; + case le: + if (!r.state.font) { + p.ensureStateFont(r.state); + continue; + } + const a = ((S.font.vertical ? 1 : -1) * S.fontSize) / 1e3, + u = f[0]; + for (let e = 0, t = u.length; e < t; e++) { + const t = u[e]; + if ("string" == typeof t) y.push(t); + else if ("number" == typeof t && 0 !== t) { + const e = y.join(""); + y.length = 0; + buildTextContentItem({ chars: e, extraSpacing: t * a }); + } + } + if (y.length > 0) { + const e = y.join(""); + y.length = 0; + buildTextContentItem({ chars: e, extraSpacing: 0 }); + } + break; + case he: + if (!r.state.font) { + p.ensureStateFont(r.state); + continue; + } + buildTextContentItem({ chars: f[0], extraSpacing: 0 }); + break; + case Ce: + if (!r.state.font) { + p.ensureStateFont(r.state); + continue; + } + S.carriageReturn(); + buildTextContentItem({ chars: f[0], extraSpacing: 0 }); + break; + case Be: + if (!r.state.font) { + p.ensureStateFont(r.state); + continue; + } + S.wordSpacing = f[0]; + S.charSpacing = f[1]; + S.carriageReturn(); + buildTextContentItem({ chars: f[2], extraSpacing: 0 }); + break; + case Me: + flushTextContentItem(); + w || (w = s.get("XObject") || Dict.empty); + var G = f[0] instanceof Name, + x = f[0].name; + if (G && b.getByName(x)) break; + next( + new Promise(function (e, i) { + if (!G) + throw new FormatError("XObject must be referred to by name."); + let a = w.getRaw(x); + if (a instanceof Ref) { + if (b.getByRef(a)) { + e(); + return; + } + if (p.globalImageCache.getData(a, p.pageIndex)) { + e(); + return; + } + a = m.fetch(a); + } + if (!(a instanceof BaseStream)) + throw new FormatError("XObject should be a stream"); + const E = a.dict.get("Subtype"); + if (!(E instanceof Name)) + throw new FormatError("XObject should have a Name subtype"); + if ("Form" !== E.name) { + b.set(x, a.dict.objId, !0); + e(); + return; + } + const u = r.state.clone(), + d = new StateManager(u), + f = lookupMatrix(a.dict.getArray("Matrix"), null); + f && d.transform(f); + enqueueChunk(); + const y = { + enqueueInvoked: !1, + enqueue(e, t) { + this.enqueueInvoked = !0; + o.enqueue(e, t); + }, + get desiredSize() { + return o.desiredSize; + }, + get ready() { + return o.ready; + }, + }; + p.getTextContent({ + stream: a, + task: t, + resources: a.dict.get("Resources") || s, + stateManager: d, + includeMarkedContent: n, + sink: y, + seenStyles: g, + viewBox: c, + lang: h, + markedContentData: l, + disableNormalization: C, + keepWhiteSpace: Q, + }).then(function () { + y.enqueueInvoked || b.set(x, a.dict.objId, !0); + e(); + }, i); + }).catch(function (e) { + if (!(e instanceof AbortException)) { + if (!p.options.ignoreErrors) throw e; + warn(`getTextContent - ignoring XObject: "${e}".`); + } + }), + ); + return; + case NA: + G = f[0] instanceof Name; + x = f[0].name; + if (G && D.getByName(x)) break; + next( + new Promise(function (e, t) { + if (!G) + throw new FormatError("GState must be referred to by name."); + const i = s.get("ExtGState"); + if (!(i instanceof Dict)) + throw new FormatError("ExtGState should be a dictionary."); + const a = i.get(x); + if (!(a instanceof Dict)) + throw new FormatError("GState should be a dictionary."); + const r = a.get("Font"); + if (r) { + flushTextContentItem(); + S.fontName = null; + S.fontSize = r[1]; + handleSetFont(null, r[0]).then(e, t); + } else { + D.set(x, a.objId, !0); + e(); + } + }).catch(function (e) { + if (!(e instanceof AbortException)) { + if (!p.options.ignoreErrors) throw e; + warn(`getTextContent - ignoring ExtGState: "${e}".`); + } + }), + ); + return; + case Je: + flushTextContentItem(); + if (n) { + l.level++; + E.items.push({ + type: "beginMarkedContent", + tag: f[0] instanceof Name ? f[0].name : null, + }); + } + break; + case He: + flushTextContentItem(); + if (n) { + l.level++; + let e = null; + f[1] instanceof Dict && (e = f[1].get("MCID")); + E.items.push({ + type: "beginMarkedContentProps", + id: Number.isInteger(e) + ? `${p.idFactory.getPageObjId()}_mc${e}` + : null, + tag: f[0] instanceof Name ? f[0].name : null, + }); + } + break; + case Ye: + flushTextContentItem(); + if (n) { + if (0 === l.level) break; + l.level--; + E.items.push({ type: "endMarkedContent" }); + } + break; + case xA: + !e || + (e.font === S.font && + e.fontSize === S.fontSize && + e.fontName === S.fontName) || + flushTextContentItem(); + } + if (E.items.length >= o.desiredSize) { + d = !0; + break; + } + } + if (d) next(ks); + else { + flushTextContentItem(); + enqueueChunk(); + e(); + } + }).catch((e) => { + if (!(e instanceof AbortException)) { + if (!this.options.ignoreErrors) throw e; + warn( + `getTextContent - ignoring errors during "${t.name}" task: "${e}".`, + ); + flushTextContentItem(); + enqueueChunk(); + } + }); + } + async extractDataStructures(e, t) { + const i = this.xref; + let a; + const s = this.readToUnicode(t.toUnicode); + if (t.composite) { + const i = e.get("CIDSystemInfo"); + i instanceof Dict && + (t.cidSystemInfo = { + registry: stringToPDFString(i.get("Registry")), + ordering: stringToPDFString(i.get("Ordering")), + supplement: i.get("Supplement"), + }); + try { + const t = e.get("CIDToGIDMap"); + t instanceof BaseStream && (a = t.getBytes()); + } catch (e) { + if (!this.options.ignoreErrors) throw e; + warn(`extractDataStructures - ignoring CIDToGIDMap data: "${e}".`); + } + } + const r = []; + let n, + o = null; + if (e.has("Encoding")) { + n = e.get("Encoding"); + if (n instanceof Dict) { + o = n.get("BaseEncoding"); + o = o instanceof Name ? o.name : null; + if (n.has("Differences")) { + const e = n.get("Differences"); + let t = 0; + for (const a of e) { + const e = i.fetchIfRef(a); + if ("number" == typeof e) t = e; + else { + if (!(e instanceof Name)) + throw new FormatError( + `Invalid entry in 'Differences' array: ${e}`, + ); + r[t++] = e.name; + } + } + } + } else if (n instanceof Name) o = n.name; + else { + const e = "Encoding is not a Name nor a Dict"; + if (!this.options.ignoreErrors) throw new FormatError(e); + warn(e); + } + "MacRomanEncoding" !== o && + "MacExpertEncoding" !== o && + "WinAnsiEncoding" !== o && + (o = null); + } + const g = !t.file || t.isInternalFont, + c = Zi()[t.name]; + o && g && c && (o = null); + if (o) t.defaultEncoding = getEncoding(o); + else { + const e = !!(t.flags & Ti), + i = !!(t.flags & qi); + n = fi; + "TrueType" !== t.type || i || (n = pi); + if (e || c) { + n = di; + g && + (/Symbol/i.test(t.name) + ? (n = mi) + : /Dingbats/i.test(t.name) + ? (n = yi) + : /Wingdings/i.test(t.name) && (n = pi)); + } + t.defaultEncoding = n; + } + t.differences = r; + t.baseEncodingName = o; + t.hasEncoding = !!o || r.length > 0; + t.dict = e; + t.toUnicode = await s; + const h = await this.buildToUnicode(t); + t.toUnicode = h; + a && (t.cidToGidMap = this.readCidToGidMap(a, h)); + return t; + } + _simpleFontToUnicode(e, t = !1) { + assert(!e.composite, "Must be a simple font."); + const i = [], + a = e.defaultEncoding.slice(), + s = e.baseEncodingName, + r = e.differences; + for (const e in r) { + const t = r[e]; + ".notdef" !== t && (a[e] = t); + } + const n = Ni(); + for (const r in a) { + let o = a[r]; + if ("" === o) continue; + let g = n[o]; + if (void 0 !== g) { + i[r] = String.fromCharCode(g); + continue; + } + let c = 0; + switch (o[0]) { + case "G": + 3 === o.length && (c = parseInt(o.substring(1), 16)); + break; + case "g": + 5 === o.length && (c = parseInt(o.substring(1), 16)); + break; + case "C": + case "c": + if (o.length >= 3 && o.length <= 4) { + const i = o.substring(1); + if (t) { + c = parseInt(i, 16); + break; + } + c = +i; + if (Number.isNaN(c) && Number.isInteger(parseInt(i, 16))) + return this._simpleFontToUnicode(e, !0); + } + break; + case "u": + g = getUnicodeForGlyph(o, n); + -1 !== g && (c = g); + break; + default: + switch (o) { + case "f_h": + case "f_t": + case "T_h": + i[r] = o.replaceAll("_", ""); + continue; + } + } + if (c > 0 && c <= 1114111 && Number.isInteger(c)) { + if (s && c === +r) { + const e = getEncoding(s); + if (e && (o = e[r])) { + i[r] = String.fromCharCode(n[o]); + continue; + } + } + i[r] = String.fromCodePoint(c); + } + } + return i; + } + async buildToUnicode(e) { + e.hasIncludedToUnicodeMap = e.toUnicode?.length > 0; + if (e.hasIncludedToUnicodeMap) { + !e.composite && + e.hasEncoding && + (e.fallbackToUnicode = this._simpleFontToUnicode(e)); + return e.toUnicode; + } + if (!e.composite) return new ToUnicodeMap(this._simpleFontToUnicode(e)); + if ( + e.composite && + ((e.cMap.builtInCMap && !(e.cMap instanceof IdentityCMap)) || + ("Adobe" === e.cidSystemInfo?.registry && + ("GB1" === e.cidSystemInfo.ordering || + "CNS1" === e.cidSystemInfo.ordering || + "Japan1" === e.cidSystemInfo.ordering || + "Korea1" === e.cidSystemInfo.ordering))) + ) { + const { registry: t, ordering: i } = e.cidSystemInfo, + a = Name.get(`${t}-${i}-UCS2`), + s = await CMapFactory.create({ + encoding: a, + fetchBuiltInCMap: this._fetchBuiltInCMapBound, + useCMap: null, + }), + r = [], + n = []; + e.cMap.forEach(function (e, t) { + if (t > 65535) throw new FormatError("Max size of CID is 65,535"); + const i = s.lookup(t); + if (i) { + n.length = 0; + for (let e = 0, t = i.length; e < t; e += 2) + n.push((i.charCodeAt(e) << 8) + i.charCodeAt(e + 1)); + r[e] = String.fromCharCode(...n); + } + }); + return new ToUnicodeMap(r); + } + return new IdentityToUnicodeMap(e.firstChar, e.lastChar); + } + async readToUnicode(e) { + if (!e) return null; + if (e instanceof Name) { + const t = await CMapFactory.create({ + encoding: e, + fetchBuiltInCMap: this._fetchBuiltInCMapBound, + useCMap: null, + }); + return t instanceof IdentityCMap + ? new IdentityToUnicodeMap(0, 65535) + : new ToUnicodeMap(t.getMap()); + } + if (e instanceof BaseStream) + try { + const t = await CMapFactory.create({ + encoding: e, + fetchBuiltInCMap: this._fetchBuiltInCMapBound, + useCMap: null, + }); + if (t instanceof IdentityCMap) + return new IdentityToUnicodeMap(0, 65535); + const i = new Array(t.length); + t.forEach(function (e, t) { + if ("number" == typeof t) { + i[e] = String.fromCodePoint(t); + return; + } + const a = []; + for (let e = 0; e < t.length; e += 2) { + const i = (t.charCodeAt(e) << 8) | t.charCodeAt(e + 1); + if (55296 != (63488 & i)) { + a.push(i); + continue; + } + e += 2; + const s = (t.charCodeAt(e) << 8) | t.charCodeAt(e + 1); + a.push(((1023 & i) << 10) + (1023 & s) + 65536); + } + i[e] = String.fromCodePoint(...a); + }); + return new ToUnicodeMap(i); + } catch (e) { + if (e instanceof AbortException) return null; + if (this.options.ignoreErrors) { + warn(`readToUnicode - ignoring ToUnicode data: "${e}".`); + return null; + } + throw e; + } + return null; + } + readCidToGidMap(e, t) { + const i = []; + for (let a = 0, s = e.length; a < s; a++) { + const s = (e[a++] << 8) | e[a], + r = a >> 1; + (0 !== s || t.has(r)) && (i[r] = s); + } + return i; + } + extractWidths(e, t, i) { + const a = this.xref; + let s = [], + r = 0; + const n = []; + let o; + if (i.composite) { + const t = e.get("DW"); + r = Number.isInteger(t) ? t : 1e3; + const g = e.get("W"); + if (Array.isArray(g)) + for (let e = 0, t = g.length; e < t; e++) { + let t = a.fetchIfRef(g[e++]); + if (!Number.isInteger(t)) break; + const i = a.fetchIfRef(g[e]); + if (Array.isArray(i)) + for (const e of i) { + const i = a.fetchIfRef(e); + "number" == typeof i && (s[t] = i); + t++; + } + else { + if (!Number.isInteger(i)) break; + { + const r = a.fetchIfRef(g[++e]); + if ("number" != typeof r) continue; + for (let e = t; e <= i; e++) s[e] = r; + } + } + } + if (i.vertical) { + const t = e.getArray("DW2"); + let i = isNumberArray(t, 2) ? t : [880, -1e3]; + o = [i[1], 0.5 * r, i[0]]; + i = e.get("W2"); + if (Array.isArray(i)) + for (let e = 0, t = i.length; e < t; e++) { + let t = a.fetchIfRef(i[e++]); + if (!Number.isInteger(t)) break; + const s = a.fetchIfRef(i[e]); + if (Array.isArray(s)) + for (let e = 0, i = s.length; e < i; e++) { + const i = [ + a.fetchIfRef(s[e++]), + a.fetchIfRef(s[e++]), + a.fetchIfRef(s[e]), + ]; + isNumberArray(i, null) && (n[t] = i); + t++; + } + else { + if (!Number.isInteger(s)) break; + { + const r = [ + a.fetchIfRef(i[++e]), + a.fetchIfRef(i[++e]), + a.fetchIfRef(i[++e]), + ]; + if (!isNumberArray(r, null)) continue; + for (let e = t; e <= s; e++) n[e] = r; + } + } + } + } + } else { + const n = e.get("Widths"); + if (Array.isArray(n)) { + let e = i.firstChar; + for (const t of n) { + const i = a.fetchIfRef(t); + "number" == typeof i && (s[e] = i); + e++; + } + const o = t.get("MissingWidth"); + r = "number" == typeof o ? o : 0; + } else { + const t = e.get("BaseFont"); + if (t instanceof Name) { + const e = this.getBaseFontMetrics(t.name); + s = this.buildCharCodeToWidth(e.widths, i); + r = e.defaultWidth; + } + } + } + let g = !0, + c = r; + for (const e in s) { + const t = s[e]; + if (t) + if (c) { + if (c !== t) { + g = !1; + break; + } + } else c = t; + } + g ? (i.flags |= vi) : (i.flags &= ~vi); + i.defaultWidth = r; + i.widths = s; + i.defaultVMetrics = o; + i.vmetrics = n; + } + isSerifFont(e) { + const t = e.split("-", 1)[0]; + return t in ji() || /serif/gi.test(t); + } + getBaseFontMetrics(e) { + let t = 0, + i = Object.create(null), + a = !1; + let s = Pi()[e] || e; + const r = Aa(); + s in r || (s = this.isSerifFont(e) ? "Times-Roman" : "Helvetica"); + const n = r[s]; + if ("number" == typeof n) { + t = n; + a = !0; + } else i = n(); + return { defaultWidth: t, monospace: a, widths: i }; + } + buildCharCodeToWidth(e, t) { + const i = Object.create(null), + a = t.differences, + s = t.defaultEncoding; + for (let t = 0; t < 256; t++) + t in a && e[a[t]] + ? (i[t] = e[a[t]]) + : t in s && e[s[t]] && (i[t] = e[s[t]]); + return i; + } + preEvaluateFont(e) { + const t = e; + let i = e.get("Subtype"); + if (!(i instanceof Name)) throw new FormatError("invalid font Subtype"); + let a, + s = !1; + if ("Type0" === i.name) { + const t = e.get("DescendantFonts"); + if (!t) throw new FormatError("Descendant fonts are not specified"); + if ( + !( + (e = Array.isArray(t) ? this.xref.fetchIfRef(t[0]) : t) instanceof + Dict + ) + ) + throw new FormatError("Descendant font is not a dictionary."); + i = e.get("Subtype"); + if (!(i instanceof Name)) throw new FormatError("invalid font Subtype"); + s = !0; + } + let r = e.get("FirstChar"); + Number.isInteger(r) || (r = 0); + let n = e.get("LastChar"); + Number.isInteger(n) || (n = s ? 65535 : 255); + const o = e.get("FontDescriptor"), + g = e.get("ToUnicode") || t.get("ToUnicode"); + if (o) { + a = new MurmurHash3_64(); + const i = t.getRaw("Encoding"); + if (i instanceof Name) a.update(i.name); + else if (i instanceof Ref) a.update(i.toString()); + else if (i instanceof Dict) + for (const e of i.getRawValues()) + if (e instanceof Name) a.update(e.name); + else if (e instanceof Ref) a.update(e.toString()); + else if (Array.isArray(e)) { + const t = e.length, + i = new Array(t); + for (let a = 0; a < t; a++) { + const t = e[a]; + t instanceof Name + ? (i[a] = t.name) + : ("number" == typeof t || t instanceof Ref) && + (i[a] = t.toString()); + } + a.update(i.join()); + } + a.update(`${r}-${n}`); + if (g instanceof BaseStream) { + const e = g.str || g, + t = e.buffer + ? new Uint8Array(e.buffer.buffer, 0, e.bufferLength) + : new Uint8Array(e.bytes.buffer, e.start, e.end - e.start); + a.update(t); + } else g instanceof Name && a.update(g.name); + const o = e.get("Widths") || t.get("Widths"); + if (Array.isArray(o)) { + const e = []; + for (const t of o) + ("number" == typeof t || t instanceof Ref) && e.push(t.toString()); + a.update(e.join()); + } + if (s) { + a.update("compositeFont"); + const i = e.get("W") || t.get("W"); + if (Array.isArray(i)) { + const e = []; + for (const t of i) + if ("number" == typeof t || t instanceof Ref) e.push(t.toString()); + else if (Array.isArray(t)) { + const i = []; + for (const e of t) + ("number" == typeof e || e instanceof Ref) && + i.push(e.toString()); + e.push(`[${i.join()}]`); + } + a.update(e.join()); + } + const s = e.getRaw("CIDToGIDMap") || t.getRaw("CIDToGIDMap"); + s instanceof Name + ? a.update(s.name) + : s instanceof Ref + ? a.update(s.toString()) + : s instanceof BaseStream && a.update(s.peekBytes()); + } + } + return { + descriptor: o, + dict: e, + baseDict: t, + composite: s, + type: i.name, + firstChar: r, + lastChar: n, + toUnicode: g, + hash: a ? a.hexdigest() : "", + }; + } + async translateFont({ + descriptor: e, + dict: t, + baseDict: i, + composite: s, + type: r, + firstChar: n, + lastChar: o, + toUnicode: g, + cssFontInfo: c, + }) { + const h = "Type3" === r; + if (!e) { + if (!h) { + let e = t.get("BaseFont"); + if (!(e instanceof Name)) + throw new FormatError("Base font is not specified"); + e = e.name.replaceAll(/[,_]/g, "-"); + const a = this.getBaseFontMetrics(e), + s = e.split("-", 1)[0], + c = + (this.isSerifFont(s) ? Ki : 0) | + (a.monospace ? vi : 0) | + (Zi()[s] ? Ti : qi), + l = { + type: r, + name: e, + loadedName: i.loadedName, + systemFontInfo: null, + widths: a.widths, + defaultWidth: a.defaultWidth, + isSimulatedFlags: !0, + flags: c, + firstChar: n, + lastChar: o, + toUnicode: g, + xHeight: 0, + capHeight: 0, + italicAngle: 0, + isType3Font: h, + }, + C = t.get("Widths"), + Q = getStandardFontName(e); + let E = null; + if (Q) { + E = await this.fetchStandardFontData(Q); + l.isInternalFont = !!E; + } + !l.isInternalFont && + this.options.useSystemFonts && + (l.systemFontInfo = getFontSubstitution( + this.systemFontCache, + this.idFactory, + this.options.standardFontDataUrl, + e, + Q, + r, + )); + const u = await this.extractDataStructures(t, l); + if (Array.isArray(C)) { + const e = []; + let t = n; + for (const i of C) { + const a = this.xref.fetchIfRef(i); + "number" == typeof a && (e[t] = a); + t++; + } + u.widths = e; + } else u.widths = this.buildCharCodeToWidth(a.widths, u); + return new Font(e, E, u); + } + { + const i = lookupNormalRect(t.getArray("FontBBox"), [0, 0, 0, 0]); + (e = new Dict(null)).set("FontName", Name.get(r)); + e.set("FontBBox", i); + } + } + let l = e.get("FontName"), + C = t.get("BaseFont"); + "string" == typeof l && (l = Name.get(l)); + "string" == typeof C && (C = Name.get(C)); + const Q = l?.name, + E = C?.name; + if (!h && Q !== E) { + info( + `The FontDescriptor's FontName is "${Q}" but should be the same as the Font's BaseFont "${E}".`, + ); + Q && + E && + (E.startsWith(Q) || (!isKnownFontName(Q) && isKnownFontName(E))) && + (l = null); + } + l ||= C; + if (!(l instanceof Name)) throw new FormatError("invalid font name"); + let u, d, f, p, m; + try { + u = e.get("FontFile", "FontFile2", "FontFile3"); + } catch (e) { + if (!this.options.ignoreErrors) throw e; + warn(`translateFont - fetching "${l.name}" font file: "${e}".`); + u = new NullStream(); + } + let y = !1, + w = null, + b = null; + if (u) { + if (u.dict) { + const e = u.dict.get("Subtype"); + e instanceof Name && (d = e.name); + f = u.dict.get("Length1"); + p = u.dict.get("Length2"); + m = u.dict.get("Length3"); + } + } else if (c) { + const e = getXfaFontName(l.name); + if (e) { + c.fontFamily = `${c.fontFamily}-PdfJS-XFA`; + c.metrics = e.metrics || null; + w = e.factors || null; + u = await this.fetchStandardFontData(e.name); + y = !!u; + i = t = getXfaFontDict(l.name); + s = !0; + } + } else if (!h) { + const e = getStandardFontName(l.name); + if (e) { + u = await this.fetchStandardFontData(e); + y = !!u; + } + !y && + this.options.useSystemFonts && + (b = getFontSubstitution( + this.systemFontCache, + this.idFactory, + this.options.standardFontDataUrl, + l.name, + e, + r, + )); + } + const D = lookupMatrix(t.getArray("FontMatrix"), a), + F = lookupNormalRect( + e.getArray("FontBBox") || t.getArray("FontBBox"), + void 0, + ); + let S = e.get("Ascent"); + "number" != typeof S && (S = void 0); + let k = e.get("Descent"); + "number" != typeof k && (k = void 0); + let R = e.get("XHeight"); + "number" != typeof R && (R = 0); + let N = e.get("CapHeight"); + "number" != typeof N && (N = 0); + let G = e.get("Flags"); + Number.isInteger(G) || (G = 0); + let x = e.get("ItalicAngle"); + "number" != typeof x && (x = 0); + const M = { + type: r, + name: l.name, + subtype: d, + file: u, + length1: f, + length2: p, + length3: m, + isInternalFont: y, + loadedName: i.loadedName, + composite: s, + fixedPitch: !1, + fontMatrix: D, + firstChar: n, + lastChar: o, + toUnicode: g, + bbox: F, + ascent: S, + descent: k, + xHeight: R, + capHeight: N, + flags: G, + italicAngle: x, + isType3Font: h, + cssFontInfo: c, + scaleFactors: w, + systemFontInfo: b, + }; + if (s) { + const e = i.get("Encoding"); + e instanceof Name && (M.cidEncoding = e.name); + const t = await CMapFactory.create({ + encoding: e, + fetchBuiltInCMap: this._fetchBuiltInCMapBound, + useCMap: null, + }); + M.cMap = t; + M.vertical = M.cMap.vertical; + } + const U = await this.extractDataStructures(t, M); + this.extractWidths(t, e, U); + return new Font(l.name, u, U); + } + static buildFontPaths(e, t, i, a) { + function buildPath(t) { + const s = `${e.loadedName}_path_${t}`; + try { + if (e.renderer.hasBuiltPath(t)) return; + i.send("commonobj", [s, "FontPath", e.renderer.getPathJs(t)]); + } catch (e) { + if (a.ignoreErrors) { + warn(`buildFontPaths - ignoring ${s} glyph: "${e}".`); + return; + } + throw e; + } + } + for (const e of t) { + buildPath(e.fontChar); + const t = e.accent; + t?.fontChar && buildPath(t.fontChar); + } + } + static get fallbackFontDict() { + const e = new Dict(); + e.set("BaseFont", Name.get("Helvetica")); + e.set("Type", Name.get("FallbackType")); + e.set("Subtype", Name.get("FallbackType")); + e.set("Encoding", Name.get("WinAnsiEncoding")); + return shadow(this, "fallbackFontDict", e); + } +} +class TranslatedFont { + constructor({ loadedName: e, font: t, dict: i, evaluatorOptions: a }) { + this.loadedName = e; + this.font = t; + this.dict = i; + this._evaluatorOptions = a || Ds; + this.type3Loaded = null; + this.type3Dependencies = t.isType3Font ? new Set() : null; + this.sent = !1; + } + send(e) { + if (!this.sent) { + this.sent = !0; + e.send("commonobj", [ + this.loadedName, + "Font", + this.font.exportData(this._evaluatorOptions.fontExtraProperties), + ]); + } + } + fallback(e) { + if (this.font.data) { + this.font.disableFontFace = !0; + PartialEvaluator.buildFontPaths( + this.font, + this.font.glyphCacheValues, + e, + this._evaluatorOptions, + ); + } + } + loadType3Data(e, t, i) { + if (this.type3Loaded) return this.type3Loaded; + if (!this.font.isType3Font) throw new Error("Must be a Type3 font."); + const a = e.clone({ ignoreErrors: !1 }), + s = new RefSet(e.type3FontRefs); + this.dict.objId && !s.has(this.dict.objId) && s.put(this.dict.objId); + a.type3FontRefs = s; + const r = this.font, + n = this.type3Dependencies; + let o = Promise.resolve(); + const g = this.dict.get("CharProcs"), + c = this.dict.get("Resources") || t, + h = Object.create(null), + l = Util.normalizeRect(r.bbox || [0, 0, 0, 0]), + C = l[2] - l[0], + Q = l[3] - l[1], + E = Math.hypot(C, Q); + for (const e of g.getKeys()) + o = o.then(() => { + const t = g.get(e), + s = new OperatorList(); + return a + .getOperatorList({ + stream: t, + task: i, + resources: c, + operatorList: s, + }) + .then(() => { + s.fnArray[0] === Ee && this._removeType3ColorOperators(s, E); + h[e] = s.getIR(); + for (const e of s.dependencies) n.add(e); + }) + .catch(function (t) { + warn(`Type3 font resource "${e}" is not available.`); + const i = new OperatorList(); + h[e] = i.getIR(); + }); + }); + this.type3Loaded = o.then(() => { + r.charProcOperatorList = h; + if (this._bbox) { + r.isCharBBox = !0; + r.bbox = this._bbox; + } + }); + return this.type3Loaded; + } + _removeType3ColorOperators(e, t = NaN) { + const i = Util.normalizeRect(e.argsArray[0].slice(2)), + a = i[2] - i[0], + s = i[3] - i[1], + r = Math.hypot(a, s); + if (0 === a || 0 === s) { + e.fnArray.splice(0, 1); + e.argsArray.splice(0, 1); + } else if (0 === t || Math.round(r / t) >= 10) { + this._bbox || (this._bbox = [1 / 0, 1 / 0, -1 / 0, -1 / 0]); + this._bbox[0] = Math.min(this._bbox[0], i[0]); + this._bbox[1] = Math.min(this._bbox[1], i[1]); + this._bbox[2] = Math.max(this._bbox[2], i[2]); + this._bbox[3] = Math.max(this._bbox[3], i[3]); + } + let n = 0, + o = e.length; + for (; n < o; ) { + switch (e.fnArray[n]) { + case Ee: + break; + case ue: + case de: + case fe: + case pe: + case me: + case ye: + case we: + case be: + case De: + case Fe: + case Se: + case ke: + case Re: + case kA: + e.fnArray.splice(n, 1); + e.argsArray.splice(n, 1); + o--; + continue; + case NA: + const [t] = e.argsArray[n]; + let i = 0, + a = t.length; + for (; i < a; ) { + const [e] = t[i]; + switch (e) { + case "TR": + case "TR2": + case "HT": + case "BG": + case "BG2": + case "UCR": + case "UCR2": + t.splice(i, 1); + a--; + continue; + } + i++; + } + } + n++; + } + } +} +class StateManager { + constructor(e = new EvalState()) { + this.state = e; + this.stateStack = []; + } + save() { + const e = this.state; + this.stateStack.push(this.state); + this.state = e.clone(); + } + restore() { + const e = this.stateStack.pop(); + e && (this.state = e); + } + transform(e) { + this.state.ctm = Util.transform(this.state.ctm, e); + } +} +class TextState { + constructor() { + this.ctm = new Float32Array(i); + this.fontName = null; + this.fontSize = 0; + this.loadedName = null; + this.font = null; + this.fontMatrix = a; + this.textMatrix = i.slice(); + this.textLineMatrix = i.slice(); + this.charSpacing = 0; + this.wordSpacing = 0; + this.leading = 0; + this.textHScale = 1; + this.textRise = 0; + } + setTextMatrix(e, t, i, a, s, r) { + const n = this.textMatrix; + n[0] = e; + n[1] = t; + n[2] = i; + n[3] = a; + n[4] = s; + n[5] = r; + } + setTextLineMatrix(e, t, i, a, s, r) { + const n = this.textLineMatrix; + n[0] = e; + n[1] = t; + n[2] = i; + n[3] = a; + n[4] = s; + n[5] = r; + } + translateTextMatrix(e, t) { + const i = this.textMatrix; + i[4] = i[0] * e + i[2] * t + i[4]; + i[5] = i[1] * e + i[3] * t + i[5]; + } + translateTextLineMatrix(e, t) { + const i = this.textLineMatrix; + i[4] = i[0] * e + i[2] * t + i[4]; + i[5] = i[1] * e + i[3] * t + i[5]; + } + carriageReturn() { + this.translateTextLineMatrix(0, -this.leading); + this.textMatrix = this.textLineMatrix.slice(); + } + clone() { + const e = Object.create(this); + e.textMatrix = this.textMatrix.slice(); + e.textLineMatrix = this.textLineMatrix.slice(); + e.fontMatrix = this.fontMatrix.slice(); + return e; + } +} +class EvalState { + constructor() { + this.ctm = new Float32Array(i); + this.font = null; + this.textRenderingMode = y; + this.fillColorSpace = ColorSpace.singletons.gray; + this.strokeColorSpace = ColorSpace.singletons.gray; + } + clone() { + return Object.create(this); + } +} +class EvaluatorPreprocessor { + static get opMap() { + return shadow( + this, + "opMap", + Object.assign(Object.create(null), { + w: { id: wA, numArgs: 1, variableArgs: !1 }, + J: { id: bA, numArgs: 1, variableArgs: !1 }, + j: { id: DA, numArgs: 1, variableArgs: !1 }, + M: { id: FA, numArgs: 1, variableArgs: !1 }, + d: { id: SA, numArgs: 2, variableArgs: !1 }, + ri: { id: kA, numArgs: 1, variableArgs: !1 }, + i: { id: RA, numArgs: 1, variableArgs: !1 }, + gs: { id: NA, numArgs: 1, variableArgs: !1 }, + q: { id: GA, numArgs: 0, variableArgs: !1 }, + Q: { id: xA, numArgs: 0, variableArgs: !1 }, + cm: { id: MA, numArgs: 6, variableArgs: !1 }, + m: { id: UA, numArgs: 2, variableArgs: !1 }, + l: { id: LA, numArgs: 2, variableArgs: !1 }, + c: { id: JA, numArgs: 6, variableArgs: !1 }, + v: { id: HA, numArgs: 4, variableArgs: !1 }, + y: { id: YA, numArgs: 4, variableArgs: !1 }, + h: { id: vA, numArgs: 0, variableArgs: !1 }, + re: { id: KA, numArgs: 4, variableArgs: !1 }, + S: { id: TA, numArgs: 0, variableArgs: !1 }, + s: { id: qA, numArgs: 0, variableArgs: !1 }, + f: { id: OA, numArgs: 0, variableArgs: !1 }, + F: { id: OA, numArgs: 0, variableArgs: !1 }, + "f*": { id: PA, numArgs: 0, variableArgs: !1 }, + B: { id: WA, numArgs: 0, variableArgs: !1 }, + "B*": { id: XA, numArgs: 0, variableArgs: !1 }, + b: { id: jA, numArgs: 0, variableArgs: !1 }, + "b*": { id: ZA, numArgs: 0, variableArgs: !1 }, + n: { id: VA, numArgs: 0, variableArgs: !1 }, + W: { id: zA, numArgs: 0, variableArgs: !1 }, + "W*": { id: _A, numArgs: 0, variableArgs: !1 }, + BT: { id: $A, numArgs: 0, variableArgs: !1 }, + ET: { id: Ae, numArgs: 0, variableArgs: !1 }, + Tc: { id: ee, numArgs: 1, variableArgs: !1 }, + Tw: { id: te, numArgs: 1, variableArgs: !1 }, + Tz: { id: ie, numArgs: 1, variableArgs: !1 }, + TL: { id: ae, numArgs: 1, variableArgs: !1 }, + Tf: { id: se, numArgs: 2, variableArgs: !1 }, + Tr: { id: re, numArgs: 1, variableArgs: !1 }, + Ts: { id: ne, numArgs: 1, variableArgs: !1 }, + Td: { id: oe, numArgs: 2, variableArgs: !1 }, + TD: { id: ge, numArgs: 2, variableArgs: !1 }, + Tm: { id: Ie, numArgs: 6, variableArgs: !1 }, + "T*": { id: ce, numArgs: 0, variableArgs: !1 }, + Tj: { id: he, numArgs: 1, variableArgs: !1 }, + TJ: { id: le, numArgs: 1, variableArgs: !1 }, + "'": { id: Ce, numArgs: 1, variableArgs: !1 }, + '"': { id: Be, numArgs: 3, variableArgs: !1 }, + d0: { id: Qe, numArgs: 2, variableArgs: !1 }, + d1: { id: Ee, numArgs: 6, variableArgs: !1 }, + CS: { id: ue, numArgs: 1, variableArgs: !1 }, + cs: { id: de, numArgs: 1, variableArgs: !1 }, + SC: { id: fe, numArgs: 4, variableArgs: !0 }, + SCN: { id: pe, numArgs: 33, variableArgs: !0 }, + sc: { id: me, numArgs: 4, variableArgs: !0 }, + scn: { id: ye, numArgs: 33, variableArgs: !0 }, + G: { id: we, numArgs: 1, variableArgs: !1 }, + g: { id: be, numArgs: 1, variableArgs: !1 }, + RG: { id: De, numArgs: 3, variableArgs: !1 }, + rg: { id: Fe, numArgs: 3, variableArgs: !1 }, + K: { id: Se, numArgs: 4, variableArgs: !1 }, + k: { id: ke, numArgs: 4, variableArgs: !1 }, + sh: { id: Re, numArgs: 1, variableArgs: !1 }, + BI: { id: Ne, numArgs: 0, variableArgs: !1 }, + ID: { id: Ge, numArgs: 0, variableArgs: !1 }, + EI: { id: xe, numArgs: 1, variableArgs: !1 }, + Do: { id: Me, numArgs: 1, variableArgs: !1 }, + MP: { id: Ue, numArgs: 1, variableArgs: !1 }, + DP: { id: Le, numArgs: 2, variableArgs: !1 }, + BMC: { id: Je, numArgs: 1, variableArgs: !1 }, + BDC: { id: He, numArgs: 2, variableArgs: !1 }, + EMC: { id: Ye, numArgs: 0, variableArgs: !1 }, + BX: { id: ve, numArgs: 0, variableArgs: !1 }, + EX: { id: Ke, numArgs: 0, variableArgs: !1 }, + BM: null, + BD: null, + true: null, + fa: null, + fal: null, + fals: null, + false: null, + nu: null, + nul: null, + null: null, + }), + ); + } + static MAX_INVALID_PATH_OPS = 10; + constructor(e, t, i = new StateManager()) { + this.parser = new Parser({ + lexer: new Lexer(e, EvaluatorPreprocessor.opMap), + xref: t, + }); + this.stateManager = i; + this.nonProcessedArgs = []; + this._isPathOp = !1; + this._numInvalidPathOPS = 0; + } + get savedStatesDepth() { + return this.stateManager.stateStack.length; + } + read(e) { + let t = e.args; + for (;;) { + const i = this.parser.getObj(); + if (i instanceof Cmd) { + const a = i.cmd, + s = EvaluatorPreprocessor.opMap[a]; + if (!s) { + warn(`Unknown command "${a}".`); + continue; + } + const r = s.id, + n = s.numArgs; + let o = null !== t ? t.length : 0; + this._isPathOp || (this._numInvalidPathOPS = 0); + this._isPathOp = r >= UA && r <= VA; + if (s.variableArgs) + o > n && + info( + `Command ${a}: expected [0, ${n}] args, but received ${o} args.`, + ); + else { + if (o !== n) { + const e = this.nonProcessedArgs; + for (; o > n; ) { + e.push(t.shift()); + o--; + } + for (; o < n && 0 !== e.length; ) { + null === t && (t = []); + t.unshift(e.pop()); + o++; + } + } + if (o < n) { + const e = `command ${a}: expected ${n} args, but received ${o} args.`; + if ( + this._isPathOp && + ++this._numInvalidPathOPS > + EvaluatorPreprocessor.MAX_INVALID_PATH_OPS + ) + throw new FormatError(`Invalid ${e}`); + warn(`Skipping ${e}`); + null !== t && (t.length = 0); + continue; + } + } + this.preprocessCommand(r, t); + e.fn = r; + e.args = t; + return !0; + } + if (i === pt) return !1; + if (null !== i) { + null === t && (t = []); + t.push(i); + if (t.length > 33) throw new FormatError("Too many arguments"); + } + } + } + preprocessCommand(e, t) { + switch (0 | e) { + case GA: + this.stateManager.save(); + break; + case xA: + this.stateManager.restore(); + break; + case MA: + this.stateManager.transform(t); + } + } +} +class DefaultAppearanceEvaluator extends EvaluatorPreprocessor { + constructor(e) { + super(new StringStream(e)); + } + parse() { + const e = { fn: 0, args: [] }, + t = { fontSize: 0, fontName: "", fontColor: new Uint8ClampedArray(3) }; + try { + for (;;) { + e.args.length = 0; + if (!this.read(e)) break; + if (0 !== this.savedStatesDepth) continue; + const { fn: i, args: a } = e; + switch (0 | i) { + case se: + const [e, i] = a; + e instanceof Name && (t.fontName = e.name); + "number" == typeof i && i > 0 && (t.fontSize = i); + break; + case Fe: + ColorSpace.singletons.rgb.getRgbItem(a, 0, t.fontColor, 0); + break; + case be: + ColorSpace.singletons.gray.getRgbItem(a, 0, t.fontColor, 0); + break; + case ke: + ColorSpace.singletons.cmyk.getRgbItem(a, 0, t.fontColor, 0); + } + } + } catch (e) { + warn(`parseDefaultAppearance - ignoring errors: "${e}".`); + } + return t; + } +} +function parseDefaultAppearance(e) { + return new DefaultAppearanceEvaluator(e).parse(); +} +class AppearanceStreamEvaluator extends EvaluatorPreprocessor { + constructor(e, t, i) { + super(e); + this.stream = e; + this.evaluatorOptions = t; + this.xref = i; + this.resources = e.dict?.get("Resources"); + } + parse() { + const e = { fn: 0, args: [] }; + let t = { + scaleFactor: 1, + fontSize: 0, + fontName: "", + fontColor: new Uint8ClampedArray(3), + fillColorSpace: ColorSpace.singletons.gray, + }, + i = !1; + const a = []; + try { + for (;;) { + e.args.length = 0; + if (i || !this.read(e)) break; + const { fn: s, args: r } = e; + switch (0 | s) { + case GA: + a.push({ + scaleFactor: t.scaleFactor, + fontSize: t.fontSize, + fontName: t.fontName, + fontColor: t.fontColor.slice(), + fillColorSpace: t.fillColorSpace, + }); + break; + case xA: + t = a.pop() || t; + break; + case Ie: + t.scaleFactor *= Math.hypot(r[0], r[1]); + break; + case se: + const [e, s] = r; + e instanceof Name && (t.fontName = e.name); + "number" == typeof s && s > 0 && (t.fontSize = s * t.scaleFactor); + break; + case de: + t.fillColorSpace = ColorSpace.parse({ + cs: r[0], + xref: this.xref, + resources: this.resources, + pdfFunctionFactory: this._pdfFunctionFactory, + localColorSpaceCache: this._localColorSpaceCache, + }); + break; + case me: + t.fillColorSpace.getRgbItem(r, 0, t.fontColor, 0); + break; + case Fe: + ColorSpace.singletons.rgb.getRgbItem(r, 0, t.fontColor, 0); + break; + case be: + ColorSpace.singletons.gray.getRgbItem(r, 0, t.fontColor, 0); + break; + case ke: + ColorSpace.singletons.cmyk.getRgbItem(r, 0, t.fontColor, 0); + break; + case he: + case le: + case Ce: + case Be: + i = !0; + } + } + } catch (e) { + warn(`parseAppearanceStream - ignoring errors: "${e}".`); + } + this.stream.reset(); + delete t.scaleFactor; + delete t.fillColorSpace; + return t; + } + get _localColorSpaceCache() { + return shadow(this, "_localColorSpaceCache", new LocalColorSpaceCache()); + } + get _pdfFunctionFactory() { + return shadow( + this, + "_pdfFunctionFactory", + new PDFFunctionFactory({ + xref: this.xref, + isEvalSupported: this.evaluatorOptions.isEvalSupported, + }), + ); + } +} +function getPdfColor(e, t) { + if (e[0] === e[1] && e[1] === e[2]) { + return `${numberToString(e[0] / 255)} ${t ? "g" : "G"}`; + } + return ( + Array.from(e, (e) => numberToString(e / 255)).join(" ") + + " " + + (t ? "rg" : "RG") + ); +} +class FakeUnicodeFont { + constructor(e, t) { + this.xref = e; + this.widths = null; + this.firstChar = 1 / 0; + this.lastChar = -1 / 0; + this.fontFamily = t; + const i = new OffscreenCanvas(1, 1); + this.ctxMeasure = i.getContext("2d"); + FakeUnicodeFont._fontNameId || (FakeUnicodeFont._fontNameId = 1); + this.fontName = Name.get( + `InvalidPDFjsFont_${t}_${FakeUnicodeFont._fontNameId++}`, + ); + } + get fontDescriptorRef() { + if (!FakeUnicodeFont._fontDescriptorRef) { + const e = new Dict(this.xref); + e.set("Type", Name.get("FontDescriptor")); + e.set("FontName", this.fontName); + e.set("FontFamily", "MyriadPro Regular"); + e.set("FontBBox", [0, 0, 0, 0]); + e.set("FontStretch", Name.get("Normal")); + e.set("FontWeight", 400); + e.set("ItalicAngle", 0); + FakeUnicodeFont._fontDescriptorRef = this.xref.getNewPersistentRef(e); + } + return FakeUnicodeFont._fontDescriptorRef; + } + get descendantFontRef() { + const e = new Dict(this.xref); + e.set("BaseFont", this.fontName); + e.set("Type", Name.get("Font")); + e.set("Subtype", Name.get("CIDFontType0")); + e.set("CIDToGIDMap", Name.get("Identity")); + e.set("FirstChar", this.firstChar); + e.set("LastChar", this.lastChar); + e.set("FontDescriptor", this.fontDescriptorRef); + e.set("DW", 1e3); + const t = [], + i = [...this.widths.entries()].sort(); + let a = null, + s = null; + for (const [e, r] of i) + if (a) + if (e === a + s.length) s.push(r); + else { + t.push(a, s); + a = e; + s = [r]; + } + else { + a = e; + s = [r]; + } + a && t.push(a, s); + e.set("W", t); + const r = new Dict(this.xref); + r.set("Ordering", "Identity"); + r.set("Registry", "Adobe"); + r.set("Supplement", 0); + e.set("CIDSystemInfo", r); + return this.xref.getNewPersistentRef(e); + } + get baseFontRef() { + const e = new Dict(this.xref); + e.set("BaseFont", this.fontName); + e.set("Type", Name.get("Font")); + e.set("Subtype", Name.get("Type0")); + e.set("Encoding", Name.get("Identity-H")); + e.set("DescendantFonts", [this.descendantFontRef]); + e.set("ToUnicode", Name.get("Identity-H")); + return this.xref.getNewPersistentRef(e); + } + get resources() { + const e = new Dict(this.xref), + t = new Dict(this.xref); + t.set(this.fontName.name, this.baseFontRef); + e.set("Font", t); + return e; + } + _createContext() { + this.widths = new Map(); + this.ctxMeasure.font = `1000px ${this.fontFamily}`; + return this.ctxMeasure; + } + createFontResources(e) { + const t = this._createContext(); + for (const i of e.split(/\r\n?|\n/)) + for (const e of i.split("")) { + const i = e.charCodeAt(0); + if (this.widths.has(i)) continue; + const a = t.measureText(e), + s = Math.ceil(a.width); + this.widths.set(i, s); + this.firstChar = Math.min(i, this.firstChar); + this.lastChar = Math.max(i, this.lastChar); + } + return this.resources; + } + static getFirstPositionInfo(e, t, i) { + const [a, n, o, g] = e; + let c = o - a, + h = g - n; + t % 180 != 0 && ([c, h] = [h, c]); + const l = s * i; + return { + coords: [0, h + r * i - l], + bbox: [0, 0, c, h], + matrix: 0 !== t ? getRotationMatrix(t, h, l) : void 0, + }; + } + createAppearance(e, t, i, a, n, o) { + const g = this._createContext(), + c = []; + let h = -1 / 0; + for (const t of e.split(/\r\n?|\n/)) { + c.push(t); + const e = g.measureText(t).width; + h = Math.max(h, e); + for (const e of codePointIter(t)) { + const t = String.fromCodePoint(e); + let i = this.widths.get(e); + if (void 0 === i) { + const a = g.measureText(t); + i = Math.ceil(a.width); + this.widths.set(e, i); + this.firstChar = Math.min(e, this.firstChar); + this.lastChar = Math.max(e, this.lastChar); + } + } + } + h *= a / 1e3; + const [l, C, Q, E] = t; + let u = Q - l, + d = E - C; + i % 180 != 0 && ([u, d] = [d, u]); + let f = 1; + h > u && (f = u / h); + let p = 1; + const m = s * a, + y = r * a, + w = m * c.length; + w > d && (p = d / w); + const b = a * Math.min(f, p), + D = [ + "q", + `0 0 ${numberToString(u)} ${numberToString(d)} re W n`, + "BT", + `1 0 0 1 0 ${numberToString(d + y)} Tm 0 Tc ${getPdfColor(n, !0)}`, + `/${this.fontName.name} ${numberToString(b)} Tf`, + ], + { resources: F } = this; + if (1 !== (o = "number" == typeof o && o >= 0 && o <= 1 ? o : 1)) { + D.push("/R0 gs"); + const e = new Dict(this.xref), + t = new Dict(this.xref); + t.set("ca", o); + t.set("CA", o); + t.set("Type", Name.get("ExtGState")); + e.set("R0", t); + F.set("ExtGState", e); + } + const S = numberToString(m); + for (const e of c) D.push(`0 -${S} Td <${stringToUTF16HexString(e)}> Tj`); + D.push("ET", "Q"); + const k = D.join("\n"), + R = new Dict(this.xref); + R.set("Subtype", Name.get("Form")); + R.set("Type", Name.get("XObject")); + R.set("BBox", [0, 0, u, d]); + R.set("Length", k.length); + R.set("Resources", F); + if (i) { + const e = getRotationMatrix(i, u, d); + R.set("Matrix", e); + } + const N = new StringStream(k); + N.dict = R; + return N; + } +} +class NameOrNumberTree { + constructor(e, t, i) { + this.constructor === NameOrNumberTree && + unreachable("Cannot initialize NameOrNumberTree."); + this.root = e; + this.xref = t; + this._type = i; + } + getAll() { + const e = new Map(); + if (!this.root) return e; + const t = this.xref, + i = new RefSet(); + i.put(this.root); + const a = [this.root]; + for (; a.length > 0; ) { + const s = t.fetchIfRef(a.shift()); + if (!(s instanceof Dict)) continue; + if (s.has("Kids")) { + const e = s.get("Kids"); + if (!Array.isArray(e)) continue; + for (const t of e) { + if (i.has(t)) + throw new FormatError(`Duplicate entry in "${this._type}" tree.`); + a.push(t); + i.put(t); + } + continue; + } + const r = s.get(this._type); + if (Array.isArray(r)) + for (let i = 0, a = r.length; i < a; i += 2) + e.set(t.fetchIfRef(r[i]), t.fetchIfRef(r[i + 1])); + } + return e; + } + get(e) { + if (!this.root) return null; + const t = this.xref; + let i = t.fetchIfRef(this.root), + a = 0; + for (; i.has("Kids"); ) { + if (++a > 10) { + warn(`Search depth limit reached for "${this._type}" tree.`); + return null; + } + const s = i.get("Kids"); + if (!Array.isArray(s)) return null; + let r = 0, + n = s.length - 1; + for (; r <= n; ) { + const a = (r + n) >> 1, + o = t.fetchIfRef(s[a]), + g = o.get("Limits"); + if (e < t.fetchIfRef(g[0])) n = a - 1; + else { + if (!(e > t.fetchIfRef(g[1]))) { + i = o; + break; + } + r = a + 1; + } + } + if (r > n) return null; + } + const s = i.get(this._type); + if (Array.isArray(s)) { + let i = 0, + a = s.length - 2; + for (; i <= a; ) { + const r = (i + a) >> 1, + n = r + (1 & r), + o = t.fetchIfRef(s[n]); + if (e < o) a = n - 2; + else { + if (!(e > o)) return t.fetchIfRef(s[n + 1]); + i = n + 2; + } + } + } + return null; + } +} +class NameTree extends NameOrNumberTree { + constructor(e, t) { + super(e, t, "Names"); + } +} +class NumberTree extends NameOrNumberTree { + constructor(e, t) { + super(e, t, "Nums"); + } +} +function clearGlobalCaches() { + !(function clearPatternCaches() { + ya = Object.create(null); + })(); + !(function clearPrimitiveCaches() { + mt = Object.create(null); + yt = Object.create(null); + wt = Object.create(null); + })(); + !(function clearUnicodeCaches() { + Hi.clear(); + })(); + JpxImage.cleanup(); +} +function pickPlatformItem(e) { + return e instanceof Dict + ? e.has("UF") + ? e.get("UF") + : e.has("F") + ? e.get("F") + : e.has("Unix") + ? e.get("Unix") + : e.has("Mac") + ? e.get("Mac") + : e.has("DOS") + ? e.get("DOS") + : null + : null; +} +class FileSpec { + #S = !1; + constructor(e, t, i = !1) { + if (e instanceof Dict) { + this.xref = t; + this.root = e; + e.has("FS") && (this.fs = e.get("FS")); + e.has("RF") && warn("Related file specifications are not supported"); + i || + (e.has("EF") + ? (this.#S = !0) + : warn("Non-embedded file specifications are not supported")); + } + } + get filename() { + let e = ""; + const t = pickPlatformItem(this.root); + t && + "string" == typeof t && + (e = stringToPDFString(t) + .replaceAll("\\\\", "\\") + .replaceAll("\\/", "/") + .replaceAll("\\", "/")); + return shadow(this, "filename", e || "unnamed"); + } + get content() { + if (!this.#S) return null; + this._contentRef ||= pickPlatformItem(this.root?.get("EF")); + let e = null; + if (this._contentRef) { + const t = this.xref.fetchIfRef(this._contentRef); + t instanceof BaseStream + ? (e = t.getBytes()) + : warn( + "Embedded file specification points to non-existing/invalid content", + ); + } else warn("Embedded file specification does not have any content"); + return e; + } + get description() { + let e = ""; + const t = this.root?.get("Desc"); + t && "string" == typeof t && (e = stringToPDFString(t)); + return shadow(this, "description", e); + } + get serializable() { + return { + rawFilename: this.filename, + filename: ((e = this.filename), e.substring(e.lastIndexOf("/") + 1)), + content: this.content, + description: this.description, + }; + var e; + } +} +const Rs = 0, + Ns = -2, + Gs = -3, + xs = -4, + Ms = -5, + Us = -6, + Ls = -9; +function isWhitespace(e, t) { + const i = e[t]; + return " " === i || "\n" === i || "\r" === i || "\t" === i; +} +class XMLParserBase { + _resolveEntities(e) { + return e.replaceAll(/&([^;]+);/g, (e, t) => { + if ("#x" === t.substring(0, 2)) + return String.fromCodePoint(parseInt(t.substring(2), 16)); + if ("#" === t.substring(0, 1)) + return String.fromCodePoint(parseInt(t.substring(1), 10)); + switch (t) { + case "lt": + return "<"; + case "gt": + return ">"; + case "amp": + return "&"; + case "quot": + return '"'; + case "apos": + return "'"; + } + return this.onResolveEntity(t); + }); + } + _parseContent(e, t) { + const i = []; + let a = t; + function skipWs() { + for (; a < e.length && isWhitespace(e, a); ) ++a; + } + for ( + ; + a < e.length && !isWhitespace(e, a) && ">" !== e[a] && "/" !== e[a]; + + ) + ++a; + const s = e.substring(t, a); + skipWs(); + for (; a < e.length && ">" !== e[a] && "/" !== e[a] && "?" !== e[a]; ) { + skipWs(); + let t = "", + s = ""; + for (; a < e.length && !isWhitespace(e, a) && "=" !== e[a]; ) { + t += e[a]; + ++a; + } + skipWs(); + if ("=" !== e[a]) return null; + ++a; + skipWs(); + const r = e[a]; + if ('"' !== r && "'" !== r) return null; + const n = e.indexOf(r, ++a); + if (n < 0) return null; + s = e.substring(a, n); + i.push({ name: t, value: this._resolveEntities(s) }); + a = n + 1; + skipWs(); + } + return { name: s, attributes: i, parsed: a - t }; + } + _parseProcessingInstruction(e, t) { + let i = t; + for ( + ; + i < e.length && + !isWhitespace(e, i) && + ">" !== e[i] && + "?" !== e[i] && + "/" !== e[i]; + + ) + ++i; + const a = e.substring(t, i); + !(function skipWs() { + for (; i < e.length && isWhitespace(e, i); ) ++i; + })(); + const s = i; + for (; i < e.length && ("?" !== e[i] || ">" !== e[i + 1]); ) ++i; + return { name: a, value: e.substring(s, i), parsed: i - t }; + } + parseXml(e) { + let t = 0; + for (; t < e.length; ) { + let i = t; + if ("<" === e[t]) { + ++i; + let t; + switch (e[i]) { + case "/": + ++i; + t = e.indexOf(">", i); + if (t < 0) { + this.onError(Ls); + return; + } + this.onEndElement(e.substring(i, t)); + i = t + 1; + break; + case "?": + ++i; + const a = this._parseProcessingInstruction(e, i); + if ("?>" !== e.substring(i + a.parsed, i + a.parsed + 2)) { + this.onError(Gs); + return; + } + this.onPi(a.name, a.value); + i += a.parsed + 2; + break; + case "!": + if ("--" === e.substring(i + 1, i + 3)) { + t = e.indexOf("--\x3e", i + 3); + if (t < 0) { + this.onError(Ms); + return; + } + this.onComment(e.substring(i + 3, t)); + i = t + 3; + } else if ("[CDATA[" === e.substring(i + 1, i + 8)) { + t = e.indexOf("]]>", i + 8); + if (t < 0) { + this.onError(Ns); + return; + } + this.onCdata(e.substring(i + 8, t)); + i = t + 3; + } else { + if ("DOCTYPE" !== e.substring(i + 1, i + 8)) { + this.onError(Us); + return; + } + { + const a = e.indexOf("[", i + 8); + let s = !1; + t = e.indexOf(">", i + 8); + if (t < 0) { + this.onError(xs); + return; + } + if (a > 0 && t > a) { + t = e.indexOf("]>", i + 8); + if (t < 0) { + this.onError(xs); + return; + } + s = !0; + } + const r = e.substring(i + 8, t + (s ? 1 : 0)); + this.onDoctype(r); + i = t + (s ? 2 : 1); + } + } + break; + default: + const s = this._parseContent(e, i); + if (null === s) { + this.onError(Us); + return; + } + let r = !1; + if ("/>" === e.substring(i + s.parsed, i + s.parsed + 2)) r = !0; + else if (">" !== e.substring(i + s.parsed, i + s.parsed + 1)) { + this.onError(Ls); + return; + } + this.onBeginElement(s.name, s.attributes, r); + i += s.parsed + (r ? 2 : 1); + } + } else { + for (; i < e.length && "<" !== e[i]; ) i++; + const a = e.substring(t, i); + this.onText(this._resolveEntities(a)); + } + t = i; + } + } + onResolveEntity(e) { + return `&${e};`; + } + onPi(e, t) {} + onComment(e) {} + onCdata(e) {} + onDoctype(e) {} + onText(e) {} + onBeginElement(e, t, i) {} + onEndElement(e) {} + onError(e) {} +} +class SimpleDOMNode { + constructor(e, t) { + this.nodeName = e; + this.nodeValue = t; + Object.defineProperty(this, "parentNode", { value: null, writable: !0 }); + } + get firstChild() { + return this.childNodes?.[0]; + } + get nextSibling() { + const e = this.parentNode.childNodes; + if (!e) return; + const t = e.indexOf(this); + return -1 !== t ? e[t + 1] : void 0; + } + get textContent() { + return this.childNodes + ? this.childNodes + .map(function (e) { + return e.textContent; + }) + .join("") + : this.nodeValue || ""; + } + get children() { + return this.childNodes || []; + } + hasChildNodes() { + return this.childNodes?.length > 0; + } + searchNode(e, t) { + if (t >= e.length) return this; + const i = e[t]; + if (i.name.startsWith("#") && t < e.length - 1) + return this.searchNode(e, t + 1); + const a = []; + let s = this; + for (;;) { + if (i.name === s.nodeName) { + if (0 !== i.pos) { + if (0 === a.length) return null; + { + const [r] = a.pop(); + let n = 0; + for (const a of r.childNodes) + if (i.name === a.nodeName) { + if (n === i.pos) return a.searchNode(e, t + 1); + n++; + } + return s.searchNode(e, t + 1); + } + } + { + const i = s.searchNode(e, t + 1); + if (null !== i) return i; + } + } + if (s.childNodes?.length > 0) { + a.push([s, 0]); + s = s.childNodes[0]; + } else { + if (0 === a.length) return null; + for (; 0 !== a.length; ) { + const [e, t] = a.pop(), + i = t + 1; + if (i < e.childNodes.length) { + a.push([e, i]); + s = e.childNodes[i]; + break; + } + } + if (0 === a.length) return null; + } + } + } + dump(e) { + if ("#text" !== this.nodeName) { + e.push(`<${this.nodeName}`); + if (this.attributes) + for (const t of this.attributes) + e.push(` ${t.name}="${encodeToXmlString(t.value)}"`); + if (this.hasChildNodes()) { + e.push(">"); + for (const t of this.childNodes) t.dump(e); + e.push(``); + } else + this.nodeValue + ? e.push(`>${encodeToXmlString(this.nodeValue)}`) + : e.push("/>"); + } else e.push(encodeToXmlString(this.nodeValue)); + } +} +class SimpleXMLParser extends XMLParserBase { + constructor({ hasAttributes: e = !1, lowerCaseName: t = !1 }) { + super(); + this._currentFragment = null; + this._stack = null; + this._errorCode = Rs; + this._hasAttributes = e; + this._lowerCaseName = t; + } + parseFromString(e) { + this._currentFragment = []; + this._stack = []; + this._errorCode = Rs; + this.parseXml(e); + if (this._errorCode !== Rs) return; + const [t] = this._currentFragment; + return t ? { documentElement: t } : void 0; + } + onText(e) { + if ( + (function isWhitespaceString(e) { + for (let t = 0, i = e.length; t < i; t++) + if (!isWhitespace(e, t)) return !1; + return !0; + })(e) + ) + return; + const t = new SimpleDOMNode("#text", e); + this._currentFragment.push(t); + } + onCdata(e) { + const t = new SimpleDOMNode("#text", e); + this._currentFragment.push(t); + } + onBeginElement(e, t, i) { + this._lowerCaseName && (e = e.toLowerCase()); + const a = new SimpleDOMNode(e); + a.childNodes = []; + this._hasAttributes && (a.attributes = t); + this._currentFragment.push(a); + if (!i) { + this._stack.push(this._currentFragment); + this._currentFragment = a.childNodes; + } + } + onEndElement(e) { + this._currentFragment = this._stack.pop() || []; + const t = this._currentFragment.at(-1); + if (!t) return null; + for (const e of t.childNodes) e.parentNode = t; + return t; + } + onError(e) { + this._errorCode = e; + } +} +class MetadataParser { + constructor(e) { + e = this._repair(e); + const t = new SimpleXMLParser({ lowerCaseName: !0 }).parseFromString(e); + this._metadataMap = new Map(); + this._data = e; + t && this._parse(t); + } + _repair(e) { + return e + .replace(/^[^<]+/, "") + .replaceAll(/>\\376\\377([^<]+)/g, function (e, t) { + const i = t + .replaceAll(/\\([0-3])([0-7])([0-7])/g, function (e, t, i, a) { + return String.fromCharCode(64 * t + 8 * i + 1 * a); + }) + .replaceAll(/&(amp|apos|gt|lt|quot);/g, function (e, t) { + switch (t) { + case "amp": + return "&"; + case "apos": + return "'"; + case "gt": + return ">"; + case "lt": + return "<"; + case "quot": + return '"'; + } + throw new Error(`_repair: ${t} isn't defined.`); + }), + a = [">"]; + for (let e = 0, t = i.length; e < t; e += 2) { + const t = 256 * i.charCodeAt(e) + i.charCodeAt(e + 1); + t >= 32 && t < 127 && 60 !== t && 62 !== t && 38 !== t + ? a.push(String.fromCharCode(t)) + : a.push("&#x" + (65536 + t).toString(16).substring(1) + ";"); + } + return a.join(""); + }); + } + _getSequence(e) { + const t = e.nodeName; + return "rdf:bag" !== t && "rdf:seq" !== t && "rdf:alt" !== t + ? null + : e.childNodes.filter((e) => "rdf:li" === e.nodeName); + } + _parseArray(e) { + if (!e.hasChildNodes()) return; + const [t] = e.childNodes, + i = this._getSequence(t) || []; + this._metadataMap.set( + e.nodeName, + i.map((e) => e.textContent.trim()), + ); + } + _parse(e) { + let t = e.documentElement; + if ("rdf:rdf" !== t.nodeName) { + t = t.firstChild; + for (; t && "rdf:rdf" !== t.nodeName; ) t = t.nextSibling; + } + if (t && "rdf:rdf" === t.nodeName && t.hasChildNodes()) + for (const e of t.childNodes) + if ("rdf:description" === e.nodeName) + for (const t of e.childNodes) { + const e = t.nodeName; + switch (e) { + case "#text": + continue; + case "dc:creator": + case "dc:subject": + this._parseArray(t); + continue; + } + this._metadataMap.set(e, t.textContent.trim()); + } + } + get serializable() { + return { parsedData: this._metadataMap, rawData: this._data }; + } +} +class DecryptStream extends DecodeStream { + constructor(e, t, i) { + super(t); + this.str = e; + this.dict = e.dict; + this.decrypt = i; + this.nextChunk = null; + this.initialized = !1; + } + readBlock() { + let e; + if (this.initialized) e = this.nextChunk; + else { + e = this.str.getBytes(512); + this.initialized = !0; + } + if (!e || 0 === e.length) { + this.eof = !0; + return; + } + this.nextChunk = this.str.getBytes(512); + const t = this.nextChunk?.length > 0; + e = (0, this.decrypt)(e, !t); + const i = this.bufferLength, + a = i + e.length; + this.ensureBuffer(a).set(e, i); + this.bufferLength = a; + } +} +class ARCFourCipher { + constructor(e) { + this.a = 0; + this.b = 0; + const t = new Uint8Array(256), + i = e.length; + for (let e = 0; e < 256; ++e) t[e] = e; + for (let a = 0, s = 0; a < 256; ++a) { + const r = t[a]; + s = (s + r + e[a % i]) & 255; + t[a] = t[s]; + t[s] = r; + } + this.s = t; + } + encryptBlock(e) { + let t = this.a, + i = this.b; + const a = this.s, + s = e.length, + r = new Uint8Array(s); + for (let n = 0; n < s; ++n) { + t = (t + 1) & 255; + const s = a[t]; + i = (i + s) & 255; + const o = a[i]; + a[t] = o; + a[i] = s; + r[n] = e[n] ^ a[(s + o) & 255]; + } + this.a = t; + this.b = i; + return r; + } + decryptBlock(e) { + return this.encryptBlock(e); + } + encrypt(e) { + return this.encryptBlock(e); + } +} +const Js = (function calculateMD5Closure() { + const e = new Uint8Array([ + 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5, 9, 14, 20, + 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 4, 11, 16, 23, 4, 11, 16, 23, 4, + 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, + 10, 15, 21, + ]), + t = new Int32Array([ + -680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426, + -1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162, + 1804603682, -40341101, -1502002290, 1236535329, -165796510, -1069501632, + 643717713, -373897302, -701558691, 38016083, -660478335, -405537848, + 568446438, -1019803690, -187363961, 1163531501, -1444681467, -51403784, + 1735328473, -1926607734, -378558, -2022574463, 1839030562, -35309556, + -1530992060, 1272893353, -155497632, -1094730640, 681279174, -358537222, + -722521979, 76029189, -640364487, -421815835, 530742520, -995338651, + -198630844, 1126891415, -1416354905, -57434055, 1700485571, -1894986606, + -1051523, -2054922799, 1873313359, -30611744, -1560198380, 1309151649, + -145523070, -1120210379, 718787259, -343485551, + ]); + return function hash(i, a, s) { + let r = 1732584193, + n = -271733879, + o = -1732584194, + g = 271733878; + const c = (s + 72) & -64, + h = new Uint8Array(c); + let l, C; + for (l = 0; l < s; ++l) h[l] = i[a++]; + h[l++] = 128; + const Q = c - 8; + for (; l < Q; ) h[l++] = 0; + h[l++] = (s << 3) & 255; + h[l++] = (s >> 5) & 255; + h[l++] = (s >> 13) & 255; + h[l++] = (s >> 21) & 255; + h[l++] = (s >>> 29) & 255; + h[l++] = 0; + h[l++] = 0; + h[l++] = 0; + const E = new Int32Array(16); + for (l = 0; l < c; ) { + for (C = 0; C < 16; ++C, l += 4) + E[C] = h[l] | (h[l + 1] << 8) | (h[l + 2] << 16) | (h[l + 3] << 24); + let i, + a, + s = r, + c = n, + Q = o, + u = g; + for (C = 0; C < 64; ++C) { + if (C < 16) { + i = (c & Q) | (~c & u); + a = C; + } else if (C < 32) { + i = (u & c) | (~u & Q); + a = (5 * C + 1) & 15; + } else if (C < 48) { + i = c ^ Q ^ u; + a = (3 * C + 5) & 15; + } else { + i = Q ^ (c | ~u); + a = (7 * C) & 15; + } + const r = u, + n = (s + i + t[C] + E[a]) | 0, + o = e[C]; + u = Q; + Q = c; + c = (c + ((n << o) | (n >>> (32 - o)))) | 0; + s = r; + } + r = (r + s) | 0; + n = (n + c) | 0; + o = (o + Q) | 0; + g = (g + u) | 0; + } + return new Uint8Array([ + 255 & r, + (r >> 8) & 255, + (r >> 16) & 255, + (r >>> 24) & 255, + 255 & n, + (n >> 8) & 255, + (n >> 16) & 255, + (n >>> 24) & 255, + 255 & o, + (o >> 8) & 255, + (o >> 16) & 255, + (o >>> 24) & 255, + 255 & g, + (g >> 8) & 255, + (g >> 16) & 255, + (g >>> 24) & 255, + ]); + }; +})(); +class Word64 { + constructor(e, t) { + this.high = 0 | e; + this.low = 0 | t; + } + and(e) { + this.high &= e.high; + this.low &= e.low; + } + xor(e) { + this.high ^= e.high; + this.low ^= e.low; + } + or(e) { + this.high |= e.high; + this.low |= e.low; + } + shiftRight(e) { + if (e >= 32) { + this.low = (this.high >>> (e - 32)) | 0; + this.high = 0; + } else { + this.low = (this.low >>> e) | (this.high << (32 - e)); + this.high = (this.high >>> e) | 0; + } + } + shiftLeft(e) { + if (e >= 32) { + this.high = this.low << (e - 32); + this.low = 0; + } else { + this.high = (this.high << e) | (this.low >>> (32 - e)); + this.low <<= e; + } + } + rotateRight(e) { + let t, i; + if (32 & e) { + i = this.low; + t = this.high; + } else { + t = this.low; + i = this.high; + } + e &= 31; + this.low = (t >>> e) | (i << (32 - e)); + this.high = (i >>> e) | (t << (32 - e)); + } + not() { + this.high = ~this.high; + this.low = ~this.low; + } + add(e) { + const t = (this.low >>> 0) + (e.low >>> 0); + let i = (this.high >>> 0) + (e.high >>> 0); + t > 4294967295 && (i += 1); + this.low = 0 | t; + this.high = 0 | i; + } + copyTo(e, t) { + e[t] = (this.high >>> 24) & 255; + e[t + 1] = (this.high >> 16) & 255; + e[t + 2] = (this.high >> 8) & 255; + e[t + 3] = 255 & this.high; + e[t + 4] = (this.low >>> 24) & 255; + e[t + 5] = (this.low >> 16) & 255; + e[t + 6] = (this.low >> 8) & 255; + e[t + 7] = 255 & this.low; + } + assign(e) { + this.high = e.high; + this.low = e.low; + } +} +const Hs = (function calculateSHA256Closure() { + function rotr(e, t) { + return (e >>> t) | (e << (32 - t)); + } + function ch(e, t, i) { + return (e & t) ^ (~e & i); + } + function maj(e, t, i) { + return (e & t) ^ (e & i) ^ (t & i); + } + function sigma(e) { + return rotr(e, 2) ^ rotr(e, 13) ^ rotr(e, 22); + } + function sigmaPrime(e) { + return rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25); + } + function littleSigma(e) { + return rotr(e, 7) ^ rotr(e, 18) ^ (e >>> 3); + } + const e = [ + 1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, + 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, + 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, + 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, + 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, + 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, + 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, + 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, + 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, + 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, + 2428436474, 2756734187, 3204031479, 3329325298, + ]; + return function hash(t, i, a) { + let s = 1779033703, + r = 3144134277, + n = 1013904242, + o = 2773480762, + g = 1359893119, + c = 2600822924, + h = 528734635, + l = 1541459225; + const C = 64 * Math.ceil((a + 9) / 64), + Q = new Uint8Array(C); + let E, u; + for (E = 0; E < a; ++E) Q[E] = t[i++]; + Q[E++] = 128; + const d = C - 8; + for (; E < d; ) Q[E++] = 0; + Q[E++] = 0; + Q[E++] = 0; + Q[E++] = 0; + Q[E++] = (a >>> 29) & 255; + Q[E++] = (a >> 21) & 255; + Q[E++] = (a >> 13) & 255; + Q[E++] = (a >> 5) & 255; + Q[E++] = (a << 3) & 255; + const f = new Uint32Array(64); + for (E = 0; E < C; ) { + for (u = 0; u < 16; ++u) { + f[u] = (Q[E] << 24) | (Q[E + 1] << 16) | (Q[E + 2] << 8) | Q[E + 3]; + E += 4; + } + for (u = 16; u < 64; ++u) + f[u] = + ((rotr((p = f[u - 2]), 17) ^ rotr(p, 19) ^ (p >>> 10)) + + f[u - 7] + + littleSigma(f[u - 15]) + + f[u - 16]) | + 0; + let t, + i, + a = s, + C = r, + d = n, + m = o, + y = g, + w = c, + b = h, + D = l; + for (u = 0; u < 64; ++u) { + t = D + sigmaPrime(y) + ch(y, w, b) + e[u] + f[u]; + i = sigma(a) + maj(a, C, d); + D = b; + b = w; + w = y; + y = (m + t) | 0; + m = d; + d = C; + C = a; + a = (t + i) | 0; + } + s = (s + a) | 0; + r = (r + C) | 0; + n = (n + d) | 0; + o = (o + m) | 0; + g = (g + y) | 0; + c = (c + w) | 0; + h = (h + b) | 0; + l = (l + D) | 0; + } + var p; + return new Uint8Array([ + (s >> 24) & 255, + (s >> 16) & 255, + (s >> 8) & 255, + 255 & s, + (r >> 24) & 255, + (r >> 16) & 255, + (r >> 8) & 255, + 255 & r, + (n >> 24) & 255, + (n >> 16) & 255, + (n >> 8) & 255, + 255 & n, + (o >> 24) & 255, + (o >> 16) & 255, + (o >> 8) & 255, + 255 & o, + (g >> 24) & 255, + (g >> 16) & 255, + (g >> 8) & 255, + 255 & g, + (c >> 24) & 255, + (c >> 16) & 255, + (c >> 8) & 255, + 255 & c, + (h >> 24) & 255, + (h >> 16) & 255, + (h >> 8) & 255, + 255 & h, + (l >> 24) & 255, + (l >> 16) & 255, + (l >> 8) & 255, + 255 & l, + ]); + }; + })(), + Ys = (function calculateSHA512Closure() { + function ch(e, t, i, a, s) { + e.assign(t); + e.and(i); + s.assign(t); + s.not(); + s.and(a); + e.xor(s); + } + function maj(e, t, i, a, s) { + e.assign(t); + e.and(i); + s.assign(t); + s.and(a); + e.xor(s); + s.assign(i); + s.and(a); + e.xor(s); + } + function sigma(e, t, i) { + e.assign(t); + e.rotateRight(28); + i.assign(t); + i.rotateRight(34); + e.xor(i); + i.assign(t); + i.rotateRight(39); + e.xor(i); + } + function sigmaPrime(e, t, i) { + e.assign(t); + e.rotateRight(14); + i.assign(t); + i.rotateRight(18); + e.xor(i); + i.assign(t); + i.rotateRight(41); + e.xor(i); + } + function littleSigma(e, t, i) { + e.assign(t); + e.rotateRight(1); + i.assign(t); + i.rotateRight(8); + e.xor(i); + i.assign(t); + i.shiftRight(7); + e.xor(i); + } + function littleSigmaPrime(e, t, i) { + e.assign(t); + e.rotateRight(19); + i.assign(t); + i.rotateRight(61); + e.xor(i); + i.assign(t); + i.shiftRight(6); + e.xor(i); + } + const e = [ + new Word64(1116352408, 3609767458), + new Word64(1899447441, 602891725), + new Word64(3049323471, 3964484399), + new Word64(3921009573, 2173295548), + new Word64(961987163, 4081628472), + new Word64(1508970993, 3053834265), + new Word64(2453635748, 2937671579), + new Word64(2870763221, 3664609560), + new Word64(3624381080, 2734883394), + new Word64(310598401, 1164996542), + new Word64(607225278, 1323610764), + new Word64(1426881987, 3590304994), + new Word64(1925078388, 4068182383), + new Word64(2162078206, 991336113), + new Word64(2614888103, 633803317), + new Word64(3248222580, 3479774868), + new Word64(3835390401, 2666613458), + new Word64(4022224774, 944711139), + new Word64(264347078, 2341262773), + new Word64(604807628, 2007800933), + new Word64(770255983, 1495990901), + new Word64(1249150122, 1856431235), + new Word64(1555081692, 3175218132), + new Word64(1996064986, 2198950837), + new Word64(2554220882, 3999719339), + new Word64(2821834349, 766784016), + new Word64(2952996808, 2566594879), + new Word64(3210313671, 3203337956), + new Word64(3336571891, 1034457026), + new Word64(3584528711, 2466948901), + new Word64(113926993, 3758326383), + new Word64(338241895, 168717936), + new Word64(666307205, 1188179964), + new Word64(773529912, 1546045734), + new Word64(1294757372, 1522805485), + new Word64(1396182291, 2643833823), + new Word64(1695183700, 2343527390), + new Word64(1986661051, 1014477480), + new Word64(2177026350, 1206759142), + new Word64(2456956037, 344077627), + new Word64(2730485921, 1290863460), + new Word64(2820302411, 3158454273), + new Word64(3259730800, 3505952657), + new Word64(3345764771, 106217008), + new Word64(3516065817, 3606008344), + new Word64(3600352804, 1432725776), + new Word64(4094571909, 1467031594), + new Word64(275423344, 851169720), + new Word64(430227734, 3100823752), + new Word64(506948616, 1363258195), + new Word64(659060556, 3750685593), + new Word64(883997877, 3785050280), + new Word64(958139571, 3318307427), + new Word64(1322822218, 3812723403), + new Word64(1537002063, 2003034995), + new Word64(1747873779, 3602036899), + new Word64(1955562222, 1575990012), + new Word64(2024104815, 1125592928), + new Word64(2227730452, 2716904306), + new Word64(2361852424, 442776044), + new Word64(2428436474, 593698344), + new Word64(2756734187, 3733110249), + new Word64(3204031479, 2999351573), + new Word64(3329325298, 3815920427), + new Word64(3391569614, 3928383900), + new Word64(3515267271, 566280711), + new Word64(3940187606, 3454069534), + new Word64(4118630271, 4000239992), + new Word64(116418474, 1914138554), + new Word64(174292421, 2731055270), + new Word64(289380356, 3203993006), + new Word64(460393269, 320620315), + new Word64(685471733, 587496836), + new Word64(852142971, 1086792851), + new Word64(1017036298, 365543100), + new Word64(1126000580, 2618297676), + new Word64(1288033470, 3409855158), + new Word64(1501505948, 4234509866), + new Word64(1607167915, 987167468), + new Word64(1816402316, 1246189591), + ]; + return function hash(t, i, a, s = !1) { + let r, n, o, g, c, h, l, C; + if (s) { + r = new Word64(3418070365, 3238371032); + n = new Word64(1654270250, 914150663); + o = new Word64(2438529370, 812702999); + g = new Word64(355462360, 4144912697); + c = new Word64(1731405415, 4290775857); + h = new Word64(2394180231, 1750603025); + l = new Word64(3675008525, 1694076839); + C = new Word64(1203062813, 3204075428); + } else { + r = new Word64(1779033703, 4089235720); + n = new Word64(3144134277, 2227873595); + o = new Word64(1013904242, 4271175723); + g = new Word64(2773480762, 1595750129); + c = new Word64(1359893119, 2917565137); + h = new Word64(2600822924, 725511199); + l = new Word64(528734635, 4215389547); + C = new Word64(1541459225, 327033209); + } + const Q = 128 * Math.ceil((a + 17) / 128), + E = new Uint8Array(Q); + let u, d; + for (u = 0; u < a; ++u) E[u] = t[i++]; + E[u++] = 128; + const f = Q - 16; + for (; u < f; ) E[u++] = 0; + E[u++] = 0; + E[u++] = 0; + E[u++] = 0; + E[u++] = 0; + E[u++] = 0; + E[u++] = 0; + E[u++] = 0; + E[u++] = 0; + E[u++] = 0; + E[u++] = 0; + E[u++] = 0; + E[u++] = (a >>> 29) & 255; + E[u++] = (a >> 21) & 255; + E[u++] = (a >> 13) & 255; + E[u++] = (a >> 5) & 255; + E[u++] = (a << 3) & 255; + const p = new Array(80); + for (u = 0; u < 80; u++) p[u] = new Word64(0, 0); + let m = new Word64(0, 0), + y = new Word64(0, 0), + w = new Word64(0, 0), + b = new Word64(0, 0), + D = new Word64(0, 0), + F = new Word64(0, 0), + S = new Word64(0, 0), + k = new Word64(0, 0); + const R = new Word64(0, 0), + N = new Word64(0, 0), + G = new Word64(0, 0), + x = new Word64(0, 0); + let M, U; + for (u = 0; u < Q; ) { + for (d = 0; d < 16; ++d) { + p[d].high = + (E[u] << 24) | (E[u + 1] << 16) | (E[u + 2] << 8) | E[u + 3]; + p[d].low = + (E[u + 4] << 24) | (E[u + 5] << 16) | (E[u + 6] << 8) | E[u + 7]; + u += 8; + } + for (d = 16; d < 80; ++d) { + M = p[d]; + littleSigmaPrime(M, p[d - 2], x); + M.add(p[d - 7]); + littleSigma(G, p[d - 15], x); + M.add(G); + M.add(p[d - 16]); + } + m.assign(r); + y.assign(n); + w.assign(o); + b.assign(g); + D.assign(c); + F.assign(h); + S.assign(l); + k.assign(C); + for (d = 0; d < 80; ++d) { + R.assign(k); + sigmaPrime(G, D, x); + R.add(G); + ch(G, D, F, S, x); + R.add(G); + R.add(e[d]); + R.add(p[d]); + sigma(N, m, x); + maj(G, m, y, w, x); + N.add(G); + M = k; + k = S; + S = F; + F = D; + b.add(R); + D = b; + b = w; + w = y; + y = m; + M.assign(R); + M.add(N); + m = M; + } + r.add(m); + n.add(y); + o.add(w); + g.add(b); + c.add(D); + h.add(F); + l.add(S); + C.add(k); + } + if (s) { + U = new Uint8Array(48); + r.copyTo(U, 0); + n.copyTo(U, 8); + o.copyTo(U, 16); + g.copyTo(U, 24); + c.copyTo(U, 32); + h.copyTo(U, 40); + } else { + U = new Uint8Array(64); + r.copyTo(U, 0); + n.copyTo(U, 8); + o.copyTo(U, 16); + g.copyTo(U, 24); + c.copyTo(U, 32); + h.copyTo(U, 40); + l.copyTo(U, 48); + C.copyTo(U, 56); + } + return U; + }; + })(); +class NullCipher { + decryptBlock(e) { + return e; + } + encrypt(e) { + return e; + } +} +class AESBaseCipher { + constructor() { + this.constructor === AESBaseCipher && + unreachable("Cannot initialize AESBaseCipher."); + this._s = new Uint8Array([ + 99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, + 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, + 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, + 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, + 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, + 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, + 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, + 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, + 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, + 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, + 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, + 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, + 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, + 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, + 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, + 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, + 22, + ]); + this._inv_s = new Uint8Array([ + 82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, + 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, + 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, + 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, + 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, + 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, + 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, + 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, + 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, + 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, + 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, + 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, + 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, + 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, + 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, + 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125, + ]); + this._mix = new Uint32Array([ + 0, 235474187, 470948374, 303765277, 941896748, 908933415, 607530554, + 708780849, 1883793496, 2118214995, 1817866830, 1649639237, 1215061108, + 1181045119, 1417561698, 1517767529, 3767586992, 4003061179, 4236429990, + 4069246893, 3635733660, 3602770327, 3299278474, 3400528769, 2430122216, + 2664543715, 2362090238, 2193862645, 2835123396, 2801107407, 3035535058, + 3135740889, 3678124923, 3576870512, 3341394285, 3374361702, 3810496343, + 3977675356, 4279080257, 4043610186, 2876494627, 2776292904, 3076639029, + 3110650942, 2472011535, 2640243204, 2403728665, 2169303058, 1001089995, + 899835584, 666464733, 699432150, 59727847, 226906860, 530400753, + 294930682, 1273168787, 1172967064, 1475418501, 1509430414, 1942435775, + 2110667444, 1876241833, 1641816226, 2910219766, 2743034109, 2976151520, + 3211623147, 2505202138, 2606453969, 2302690252, 2269728455, 3711829422, + 3543599269, 3240894392, 3475313331, 3843699074, 3943906441, 4178062228, + 4144047775, 1306967366, 1139781709, 1374988112, 1610459739, 1975683434, + 2076935265, 1775276924, 1742315127, 1034867998, 866637845, 566021896, + 800440835, 92987698, 193195065, 429456164, 395441711, 1984812685, + 2017778566, 1784663195, 1683407248, 1315562145, 1080094634, 1383856311, + 1551037884, 101039829, 135050206, 437757123, 337553864, 1042385657, + 807962610, 573804783, 742039012, 2531067453, 2564033334, 2328828971, + 2227573024, 2935566865, 2700099354, 3001755655, 3168937228, 3868552805, + 3902563182, 4203181171, 4102977912, 3736164937, 3501741890, 3265478751, + 3433712980, 1106041591, 1340463100, 1576976609, 1408749034, 2043211483, + 2009195472, 1708848333, 1809054150, 832877231, 1068351396, 766945465, + 599762354, 159417987, 126454664, 361929877, 463180190, 2709260871, + 2943682380, 3178106961, 3009879386, 2572697195, 2538681184, 2236228733, + 2336434550, 3509871135, 3745345300, 3441850377, 3274667266, 3910161971, + 3877198648, 4110568485, 4211818798, 2597806476, 2497604743, 2261089178, + 2295101073, 2733856160, 2902087851, 3202437046, 2968011453, 3936291284, + 3835036895, 4136440770, 4169408201, 3535486456, 3702665459, 3467192302, + 3231722213, 2051518780, 1951317047, 1716890410, 1750902305, 1113818384, + 1282050075, 1584504582, 1350078989, 168810852, 67556463, 371049330, + 404016761, 841739592, 1008918595, 775550814, 540080725, 3969562369, + 3801332234, 4035489047, 4269907996, 3569255213, 3669462566, 3366754619, + 3332740144, 2631065433, 2463879762, 2160117071, 2395588676, 2767645557, + 2868897406, 3102011747, 3069049960, 202008497, 33778362, 270040487, + 504459436, 875451293, 975658646, 675039627, 641025152, 2084704233, + 1917518562, 1615861247, 1851332852, 1147550661, 1248802510, 1484005843, + 1451044056, 933301370, 967311729, 733156972, 632953703, 260388950, + 25965917, 328671808, 496906059, 1206477858, 1239443753, 1543208500, + 1441952575, 2144161806, 1908694277, 1675577880, 1842759443, 3610369226, + 3644379585, 3408119516, 3307916247, 4011190502, 3776767469, 4077384432, + 4245618683, 2809771154, 2842737049, 3144396420, 3043140495, 2673705150, + 2438237621, 2203032232, 2370213795, + ]); + this._mixCol = new Uint8Array(256); + for (let e = 0; e < 256; e++) + this._mixCol[e] = e < 128 ? e << 1 : (e << 1) ^ 27; + this.buffer = new Uint8Array(16); + this.bufferPosition = 0; + } + _expandKey(e) { + unreachable("Cannot call `_expandKey` on the base class"); + } + _decrypt(e, t) { + let i, a, s; + const r = new Uint8Array(16); + r.set(e); + for (let e = 0, i = this._keySize; e < 16; ++e, ++i) r[e] ^= t[i]; + for (let e = this._cyclesOfRepetition - 1; e >= 1; --e) { + i = r[13]; + r[13] = r[9]; + r[9] = r[5]; + r[5] = r[1]; + r[1] = i; + i = r[14]; + a = r[10]; + r[14] = r[6]; + r[10] = r[2]; + r[6] = i; + r[2] = a; + i = r[15]; + a = r[11]; + s = r[7]; + r[15] = r[3]; + r[11] = i; + r[7] = a; + r[3] = s; + for (let e = 0; e < 16; ++e) r[e] = this._inv_s[r[e]]; + for (let i = 0, a = 16 * e; i < 16; ++i, ++a) r[i] ^= t[a]; + for (let e = 0; e < 16; e += 4) { + const t = this._mix[r[e]], + a = this._mix[r[e + 1]], + s = this._mix[r[e + 2]], + n = this._mix[r[e + 3]]; + i = + t ^ + (a >>> 8) ^ + (a << 24) ^ + (s >>> 16) ^ + (s << 16) ^ + (n >>> 24) ^ + (n << 8); + r[e] = (i >>> 24) & 255; + r[e + 1] = (i >> 16) & 255; + r[e + 2] = (i >> 8) & 255; + r[e + 3] = 255 & i; + } + } + i = r[13]; + r[13] = r[9]; + r[9] = r[5]; + r[5] = r[1]; + r[1] = i; + i = r[14]; + a = r[10]; + r[14] = r[6]; + r[10] = r[2]; + r[6] = i; + r[2] = a; + i = r[15]; + a = r[11]; + s = r[7]; + r[15] = r[3]; + r[11] = i; + r[7] = a; + r[3] = s; + for (let e = 0; e < 16; ++e) { + r[e] = this._inv_s[r[e]]; + r[e] ^= t[e]; + } + return r; + } + _encrypt(e, t) { + const i = this._s; + let a, s, r; + const n = new Uint8Array(16); + n.set(e); + for (let e = 0; e < 16; ++e) n[e] ^= t[e]; + for (let e = 1; e < this._cyclesOfRepetition; e++) { + for (let e = 0; e < 16; ++e) n[e] = i[n[e]]; + r = n[1]; + n[1] = n[5]; + n[5] = n[9]; + n[9] = n[13]; + n[13] = r; + r = n[2]; + s = n[6]; + n[2] = n[10]; + n[6] = n[14]; + n[10] = r; + n[14] = s; + r = n[3]; + s = n[7]; + a = n[11]; + n[3] = n[15]; + n[7] = r; + n[11] = s; + n[15] = a; + for (let e = 0; e < 16; e += 4) { + const t = n[e + 0], + i = n[e + 1], + s = n[e + 2], + r = n[e + 3]; + a = t ^ i ^ s ^ r; + n[e + 0] ^= a ^ this._mixCol[t ^ i]; + n[e + 1] ^= a ^ this._mixCol[i ^ s]; + n[e + 2] ^= a ^ this._mixCol[s ^ r]; + n[e + 3] ^= a ^ this._mixCol[r ^ t]; + } + for (let i = 0, a = 16 * e; i < 16; ++i, ++a) n[i] ^= t[a]; + } + for (let e = 0; e < 16; ++e) n[e] = i[n[e]]; + r = n[1]; + n[1] = n[5]; + n[5] = n[9]; + n[9] = n[13]; + n[13] = r; + r = n[2]; + s = n[6]; + n[2] = n[10]; + n[6] = n[14]; + n[10] = r; + n[14] = s; + r = n[3]; + s = n[7]; + a = n[11]; + n[3] = n[15]; + n[7] = r; + n[11] = s; + n[15] = a; + for (let e = 0, i = this._keySize; e < 16; ++e, ++i) n[e] ^= t[i]; + return n; + } + _decryptBlock2(e, t) { + const i = e.length; + let a = this.buffer, + s = this.bufferPosition; + const r = []; + let n = this.iv; + for (let t = 0; t < i; ++t) { + a[s] = e[t]; + ++s; + if (s < 16) continue; + const i = this._decrypt(a, this._key); + for (let e = 0; e < 16; ++e) i[e] ^= n[e]; + n = a; + r.push(i); + a = new Uint8Array(16); + s = 0; + } + this.buffer = a; + this.bufferLength = s; + this.iv = n; + if (0 === r.length) return new Uint8Array(0); + let o = 16 * r.length; + if (t) { + const e = r.at(-1); + let t = e[15]; + if (t <= 16) { + for (let i = 15, a = 16 - t; i >= a; --i) + if (e[i] !== t) { + t = 0; + break; + } + o -= t; + r[r.length - 1] = e.subarray(0, 16 - t); + } + } + const g = new Uint8Array(o); + for (let e = 0, t = 0, i = r.length; e < i; ++e, t += 16) g.set(r[e], t); + return g; + } + decryptBlock(e, t, i = null) { + const a = e.length, + s = this.buffer; + let r = this.bufferPosition; + if (i) this.iv = i; + else { + for (let t = 0; r < 16 && t < a; ++t, ++r) s[r] = e[t]; + if (r < 16) { + this.bufferLength = r; + return new Uint8Array(0); + } + this.iv = s; + e = e.subarray(16); + } + this.buffer = new Uint8Array(16); + this.bufferLength = 0; + this.decryptBlock = this._decryptBlock2; + return this.decryptBlock(e, t); + } + encrypt(e, t) { + const i = e.length; + let a = this.buffer, + s = this.bufferPosition; + const r = []; + t || (t = new Uint8Array(16)); + for (let n = 0; n < i; ++n) { + a[s] = e[n]; + ++s; + if (s < 16) continue; + for (let e = 0; e < 16; ++e) a[e] ^= t[e]; + const i = this._encrypt(a, this._key); + t = i; + r.push(i); + a = new Uint8Array(16); + s = 0; + } + this.buffer = a; + this.bufferLength = s; + this.iv = t; + if (0 === r.length) return new Uint8Array(0); + const n = 16 * r.length, + o = new Uint8Array(n); + for (let e = 0, t = 0, i = r.length; e < i; ++e, t += 16) o.set(r[e], t); + return o; + } +} +class AES128Cipher extends AESBaseCipher { + constructor(e) { + super(); + this._cyclesOfRepetition = 10; + this._keySize = 160; + this._rcon = new Uint8Array([ + 141, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, + 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145, 57, 114, + 228, 211, 189, 97, 194, 159, 37, 74, 148, 51, 102, 204, 131, 29, 58, 116, + 232, 203, 141, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, + 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, + 145, 57, 114, 228, 211, 189, 97, 194, 159, 37, 74, 148, 51, 102, 204, 131, + 29, 58, 116, 232, 203, 141, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, + 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, + 197, 145, 57, 114, 228, 211, 189, 97, 194, 159, 37, 74, 148, 51, 102, 204, + 131, 29, 58, 116, 232, 203, 141, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, + 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, + 239, 197, 145, 57, 114, 228, 211, 189, 97, 194, 159, 37, 74, 148, 51, 102, + 204, 131, 29, 58, 116, 232, 203, 141, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54, + 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, + 250, 239, 197, 145, 57, 114, 228, 211, 189, 97, 194, 159, 37, 74, 148, 51, + 102, 204, 131, 29, 58, 116, 232, 203, 141, + ]); + this._key = this._expandKey(e); + } + _expandKey(e) { + const t = this._s, + i = this._rcon, + a = new Uint8Array(176); + a.set(e); + for (let e = 16, s = 1; e < 176; ++s) { + let r = a[e - 3], + n = a[e - 2], + o = a[e - 1], + g = a[e - 4]; + r = t[r]; + n = t[n]; + o = t[o]; + g = t[g]; + r ^= i[s]; + for (let t = 0; t < 4; ++t) { + a[e] = r ^= a[e - 16]; + e++; + a[e] = n ^= a[e - 16]; + e++; + a[e] = o ^= a[e - 16]; + e++; + a[e] = g ^= a[e - 16]; + e++; + } + } + return a; + } +} +class AES256Cipher extends AESBaseCipher { + constructor(e) { + super(); + this._cyclesOfRepetition = 14; + this._keySize = 224; + this._key = this._expandKey(e); + } + _expandKey(e) { + const t = this._s, + i = new Uint8Array(240); + i.set(e); + let a, + s, + r, + n, + o = 1; + for (let e = 32, g = 1; e < 240; ++g) { + if (e % 32 == 16) { + a = t[a]; + s = t[s]; + r = t[r]; + n = t[n]; + } else if (e % 32 == 0) { + a = i[e - 3]; + s = i[e - 2]; + r = i[e - 1]; + n = i[e - 4]; + a = t[a]; + s = t[s]; + r = t[r]; + n = t[n]; + a ^= o; + (o <<= 1) >= 256 && (o = 255 & (27 ^ o)); + } + for (let t = 0; t < 4; ++t) { + i[e] = a ^= i[e - 32]; + e++; + i[e] = s ^= i[e - 32]; + e++; + i[e] = r ^= i[e - 32]; + e++; + i[e] = n ^= i[e - 32]; + e++; + } + } + return i; + } +} +class PDF17 { + checkOwnerPassword(e, t, i, a) { + const s = new Uint8Array(e.length + 56); + s.set(e, 0); + s.set(t, e.length); + s.set(i, e.length + t.length); + return isArrayEqual(Hs(s, 0, s.length), a); + } + checkUserPassword(e, t, i) { + const a = new Uint8Array(e.length + 8); + a.set(e, 0); + a.set(t, e.length); + return isArrayEqual(Hs(a, 0, a.length), i); + } + getOwnerKey(e, t, i, a) { + const s = new Uint8Array(e.length + 56); + s.set(e, 0); + s.set(t, e.length); + s.set(i, e.length + t.length); + const r = Hs(s, 0, s.length); + return new AES256Cipher(r).decryptBlock(a, !1, new Uint8Array(16)); + } + getUserKey(e, t, i) { + const a = new Uint8Array(e.length + 8); + a.set(e, 0); + a.set(t, e.length); + const s = Hs(a, 0, a.length); + return new AES256Cipher(s).decryptBlock(i, !1, new Uint8Array(16)); + } +} +class PDF20 { + _hash(e, t, i) { + let a = Hs(t, 0, t.length).subarray(0, 32), + s = [0], + r = 0; + for (; r < 64 || s.at(-1) > r - 32; ) { + const t = e.length + a.length + i.length, + c = new Uint8Array(t); + let h = 0; + c.set(e, h); + h += e.length; + c.set(a, h); + h += a.length; + c.set(i, h); + const l = new Uint8Array(64 * t); + for (let e = 0, i = 0; e < 64; e++, i += t) l.set(c, i); + s = new AES128Cipher(a.subarray(0, 16)).encrypt(l, a.subarray(16, 32)); + const C = s.slice(0, 16).reduce((e, t) => e + t, 0) % 3; + 0 === C + ? (a = Hs(s, 0, s.length)) + : 1 === C + ? (a = ((n = s), (o = 0), (g = s.length), Ys(n, o, g, !0))) + : 2 === C && (a = Ys(s, 0, s.length)); + r++; + } + var n, o, g; + return a.subarray(0, 32); + } + checkOwnerPassword(e, t, i, a) { + const s = new Uint8Array(e.length + 56); + s.set(e, 0); + s.set(t, e.length); + s.set(i, e.length + t.length); + return isArrayEqual(this._hash(e, s, i), a); + } + checkUserPassword(e, t, i) { + const a = new Uint8Array(e.length + 8); + a.set(e, 0); + a.set(t, e.length); + return isArrayEqual(this._hash(e, a, []), i); + } + getOwnerKey(e, t, i, a) { + const s = new Uint8Array(e.length + 56); + s.set(e, 0); + s.set(t, e.length); + s.set(i, e.length + t.length); + const r = this._hash(e, s, i); + return new AES256Cipher(r).decryptBlock(a, !1, new Uint8Array(16)); + } + getUserKey(e, t, i) { + const a = new Uint8Array(e.length + 8); + a.set(e, 0); + a.set(t, e.length); + const s = this._hash(e, a, []); + return new AES256Cipher(s).decryptBlock(i, !1, new Uint8Array(16)); + } +} +class CipherTransform { + constructor(e, t) { + this.StringCipherConstructor = e; + this.StreamCipherConstructor = t; + } + createStream(e, t) { + const i = new this.StreamCipherConstructor(); + return new DecryptStream(e, t, function cipherTransformDecryptStream(e, t) { + return i.decryptBlock(e, t); + }); + } + decryptString(e) { + const t = new this.StringCipherConstructor(); + let i = stringToBytes(e); + i = t.decryptBlock(i, !0); + return bytesToString(i); + } + encryptString(e) { + const t = new this.StringCipherConstructor(); + if (t instanceof AESBaseCipher) { + const i = 16 - (e.length % 16); + e += String.fromCharCode(i).repeat(i); + const a = new Uint8Array(16); + if ("undefined" != typeof crypto) crypto.getRandomValues(a); + else for (let e = 0; e < 16; e++) a[e] = Math.floor(256 * Math.random()); + let s = stringToBytes(e); + s = t.encrypt(s, a); + const r = new Uint8Array(16 + s.length); + r.set(a); + r.set(s, 16); + return bytesToString(r); + } + let i = stringToBytes(e); + i = t.encrypt(i); + return bytesToString(i); + } +} +class CipherTransformFactory { + static #k = new Uint8Array([ + 40, 191, 78, 94, 78, 117, 138, 65, 100, 0, 78, 86, 255, 250, 1, 8, 46, 46, + 0, 182, 208, 104, 62, 128, 47, 12, 169, 254, 100, 83, 105, 122, + ]); + #R(e, t, i, a, s, r, n, o, g, c, h, l) { + if (t) { + const e = Math.min(127, t.length); + t = t.subarray(0, e); + } else t = []; + const C = 6 === e ? new PDF20() : new PDF17(); + return C.checkUserPassword(t, o, n) + ? C.getUserKey(t, g, h) + : t.length && C.checkOwnerPassword(t, a, r, i) + ? C.getOwnerKey(t, s, r, c) + : null; + } + #N(e, t, i, a, s, r, n, o) { + const g = 40 + i.length + e.length, + c = new Uint8Array(g); + let h, + l, + C = 0; + if (t) { + l = Math.min(32, t.length); + for (; C < l; ++C) c[C] = t[C]; + } + h = 0; + for (; C < 32; ) c[C++] = CipherTransformFactory.#k[h++]; + for (h = 0, l = i.length; h < l; ++h) c[C++] = i[h]; + c[C++] = 255 & s; + c[C++] = (s >> 8) & 255; + c[C++] = (s >> 16) & 255; + c[C++] = (s >>> 24) & 255; + for (h = 0, l = e.length; h < l; ++h) c[C++] = e[h]; + if (r >= 4 && !o) { + c[C++] = 255; + c[C++] = 255; + c[C++] = 255; + c[C++] = 255; + } + let Q = Js(c, 0, C); + const E = n >> 3; + if (r >= 3) for (h = 0; h < 50; ++h) Q = Js(Q, 0, E); + const u = Q.subarray(0, E); + let d, f; + if (r >= 3) { + for (C = 0; C < 32; ++C) c[C] = CipherTransformFactory.#k[C]; + for (h = 0, l = e.length; h < l; ++h) c[C++] = e[h]; + d = new ARCFourCipher(u); + f = d.encryptBlock(Js(c, 0, C)); + l = u.length; + const t = new Uint8Array(l); + for (h = 1; h <= 19; ++h) { + for (let e = 0; e < l; ++e) t[e] = u[e] ^ h; + d = new ARCFourCipher(t); + f = d.encryptBlock(f); + } + for (h = 0, l = f.length; h < l; ++h) if (a[h] !== f[h]) return null; + } else { + d = new ARCFourCipher(u); + f = d.encryptBlock(CipherTransformFactory.#k); + for (h = 0, l = f.length; h < l; ++h) if (a[h] !== f[h]) return null; + } + return u; + } + #G(e, t, i, a) { + const s = new Uint8Array(32); + let r = 0; + const n = Math.min(32, e.length); + for (; r < n; ++r) s[r] = e[r]; + let o = 0; + for (; r < 32; ) s[r++] = CipherTransformFactory.#k[o++]; + let g = Js(s, 0, r); + const c = a >> 3; + if (i >= 3) for (o = 0; o < 50; ++o) g = Js(g, 0, g.length); + let h, l; + if (i >= 3) { + l = t; + const e = new Uint8Array(c); + for (o = 19; o >= 0; o--) { + for (let t = 0; t < c; ++t) e[t] = g[t] ^ o; + h = new ARCFourCipher(e); + l = h.encryptBlock(l); + } + } else { + h = new ARCFourCipher(g.subarray(0, c)); + l = h.encryptBlock(t); + } + return l; + } + #x(e, t, i, a = !1) { + const s = new Uint8Array(i.length + 9), + r = i.length; + let n; + for (n = 0; n < r; ++n) s[n] = i[n]; + s[n++] = 255 & e; + s[n++] = (e >> 8) & 255; + s[n++] = (e >> 16) & 255; + s[n++] = 255 & t; + s[n++] = (t >> 8) & 255; + if (a) { + s[n++] = 115; + s[n++] = 65; + s[n++] = 108; + s[n++] = 84; + } + return Js(s, 0, n).subarray(0, Math.min(i.length + 5, 16)); + } + #M(e, t, i, a, s) { + if (!(t instanceof Name)) + throw new FormatError("Invalid crypt filter name."); + const r = this, + n = e.get(t.name), + o = n?.get("CFM"); + if (!o || "None" === o.name) + return function () { + return new NullCipher(); + }; + if ("V2" === o.name) + return function () { + return new ARCFourCipher(r.#x(i, a, s, !1)); + }; + if ("AESV2" === o.name) + return function () { + return new AES128Cipher(r.#x(i, a, s, !0)); + }; + if ("AESV3" === o.name) + return function () { + return new AES256Cipher(s); + }; + throw new FormatError("Unknown crypto method"); + } + constructor(e, t, i) { + const a = e.get("Filter"); + if (!isName(a, "Standard")) + throw new FormatError("unknown encryption method"); + this.filterName = a.name; + this.dict = e; + const s = e.get("V"); + if (!Number.isInteger(s) || (1 !== s && 2 !== s && 4 !== s && 5 !== s)) + throw new FormatError("unsupported encryption algorithm"); + this.algorithm = s; + let r = e.get("Length"); + if (!r) + if (s <= 3) r = 40; + else { + const t = e.get("CF"), + i = e.get("StmF"); + if (t instanceof Dict && i instanceof Name) { + t.suppressEncryption = !0; + const e = t.get(i.name); + r = e?.get("Length") || 128; + r < 40 && (r <<= 3); + } + } + if (!Number.isInteger(r) || r < 40 || r % 8 != 0) + throw new FormatError("invalid key length"); + const n = stringToBytes(e.get("O")), + o = stringToBytes(e.get("U")), + g = n.subarray(0, 32), + c = o.subarray(0, 32), + h = e.get("P"), + l = e.get("R"), + C = (4 === s || 5 === s) && !1 !== e.get("EncryptMetadata"); + this.encryptMetadata = C; + const Q = stringToBytes(t); + let E, u; + if (i) { + if (6 === l) + try { + i = utf8StringToString(i); + } catch { + warn( + "CipherTransformFactory: Unable to convert UTF8 encoded password.", + ); + } + E = stringToBytes(i); + } + if (5 !== s) u = this.#N(Q, E, g, c, h, l, r, C); + else { + const t = n.subarray(32, 40), + i = n.subarray(40, 48), + a = o.subarray(0, 48), + s = o.subarray(32, 40), + r = o.subarray(40, 48), + h = stringToBytes(e.get("OE")), + C = stringToBytes(e.get("UE")), + Q = stringToBytes(e.get("Perms")); + u = this.#R(l, E, g, t, i, a, c, s, r, h, C, Q); + } + if (!u && !i) throw new PasswordException("No password given", it); + if (!u && i) { + const e = this.#G(E, g, l, r); + u = this.#N(Q, e, g, c, h, l, r, C); + } + if (!u) throw new PasswordException("Incorrect Password", at); + this.encryptionKey = u; + if (s >= 4) { + const t = e.get("CF"); + t instanceof Dict && (t.suppressEncryption = !0); + this.cf = t; + this.stmf = e.get("StmF") || Name.get("Identity"); + this.strf = e.get("StrF") || Name.get("Identity"); + this.eff = e.get("EFF") || this.stmf; + } + } + createCipherTransform(e, t) { + if (4 === this.algorithm || 5 === this.algorithm) + return new CipherTransform( + this.#M(this.cf, this.strf, e, t, this.encryptionKey), + this.#M(this.cf, this.stmf, e, t, this.encryptionKey), + ); + const i = this.#x(e, t, this.encryptionKey, !1), + cipherConstructor = function () { + return new ARCFourCipher(i); + }; + return new CipherTransform(cipherConstructor, cipherConstructor); + } +} +async function writeObject(e, t, i, { encrypt: a = null }) { + const s = a?.createCipherTransform(e.num, e.gen); + i.push(`${e.num} ${e.gen} obj\n`); + t instanceof Dict + ? await writeDict(t, i, s) + : t instanceof BaseStream + ? await writeStream(t, i, s) + : (Array.isArray(t) || ArrayBuffer.isView(t)) && + (await writeArray(t, i, s)); + i.push("\nendobj\n"); +} +async function writeDict(e, t, i) { + t.push("<<"); + for (const a of e.getKeys()) { + t.push(` /${escapePDFName(a)} `); + await writeValue(e.getRaw(a), t, i); + } + t.push(">>"); +} +async function writeStream(e, t, i) { + let a = e.getBytes(); + const { dict: s } = e, + [r, n] = await Promise.all([ + s.getAsync("Filter"), + s.getAsync("DecodeParms"), + ]), + o = isName( + Array.isArray(r) ? await s.xref.fetchIfRefAsync(r[0]) : r, + "FlateDecode", + ); + if (a.length >= 256 || o) + try { + const e = new CompressionStream("deflate"), + t = e.writable.getWriter(); + t.write(a); + t.close(); + const i = await new Response(e.readable).arrayBuffer(); + a = new Uint8Array(i); + let g, c; + if (r) { + if (!o) { + g = Array.isArray(r) + ? [Name.get("FlateDecode"), ...r] + : [Name.get("FlateDecode"), r]; + n && (c = Array.isArray(n) ? [null, ...n] : [null, n]); + } + } else g = Name.get("FlateDecode"); + g && s.set("Filter", g); + c && s.set("DecodeParms", c); + } catch (e) { + info(`writeStream - cannot compress data: "${e}".`); + } + let g = bytesToString(a); + i && (g = i.encryptString(g)); + s.set("Length", g.length); + await writeDict(s, t, i); + t.push(" stream\n", g, "\nendstream"); +} +async function writeArray(e, t, i) { + t.push("["); + let a = !0; + for (const s of e) { + a ? (a = !1) : t.push(" "); + await writeValue(s, t, i); + } + t.push("]"); +} +async function writeValue(e, t, i) { + if (e instanceof Name) t.push(`/${escapePDFName(e.name)}`); + else if (e instanceof Ref) t.push(`${e.num} ${e.gen} R`); + else if (Array.isArray(e) || ArrayBuffer.isView(e)) await writeArray(e, t, i); + else if ("string" == typeof e) { + i && (e = i.encryptString(e)); + t.push(`(${escapeString(e)})`); + } else + "number" == typeof e + ? t.push(numberToString(e)) + : "boolean" == typeof e + ? t.push(e.toString()) + : e instanceof Dict + ? await writeDict(e, t, i) + : e instanceof BaseStream + ? await writeStream(e, t, i) + : null === e + ? t.push("null") + : warn( + `Unhandled value in writer: ${typeof e}, please file a bug.`, + ); +} +function writeInt(e, t, i, a) { + for (let s = t + i - 1; s > i - 1; s--) { + a[s] = 255 & e; + e >>= 8; + } + return i + t; +} +function writeString(e, t, i) { + for (let a = 0, s = e.length; a < s; a++) i[t + a] = 255 & e.charCodeAt(a); +} +function updateXFA({ xfaData: e, xfaDatasetsRef: t, newRefs: i, xref: a }) { + if (null === e) { + e = (function writeXFADataForAcroform(e, t) { + const i = new SimpleXMLParser({ hasAttributes: !0 }).parseFromString(e); + for (const { xfa: e } of t) { + if (!e) continue; + const { path: t, value: a } = e; + if (!t) continue; + const s = parseXFAPath(t); + let r = i.documentElement.searchNode(s, 0); + !r && s.length > 1 && (r = i.documentElement.searchNode([s.at(-1)], 0)); + r + ? (r.childNodes = Array.isArray(a) + ? a.map((e) => new SimpleDOMNode("value", e)) + : [new SimpleDOMNode("#text", a)]) + : warn(`Node not found for path: ${t}`); + } + const a = []; + i.documentElement.dump(a); + return a.join(""); + })(a.fetchIfRef(t).getString(), i); + } + const s = a.encrypt; + if (s) { + e = s.createCipherTransform(t.num, t.gen).encryptString(e); + } + const r = + `${t.num} ${t.gen} obj\n<< /Type /EmbeddedFile /Length ${e.length}>>\nstream\n` + + e + + "\nendstream\nendobj\n"; + i.push({ ref: t, data: r }); +} +function getIndexes(e) { + const t = []; + for (const { ref: i } of e) + i.num === t.at(-2) + t.at(-1) ? (t[t.length - 1] += 1) : t.push(i.num, 1); + return t; +} +function computeIDs(e, t, i) { + if (Array.isArray(t.fileIds) && t.fileIds.length > 0) { + const a = (function computeMD5(e, t) { + const i = Math.floor(Date.now() / 1e3), + a = t.filename || "", + s = [i.toString(), a, e.toString()]; + let r = s.reduce((e, t) => e + t.length, 0); + for (const e of Object.values(t.info)) { + s.push(e); + r += e.length; + } + const n = new Uint8Array(r); + let o = 0; + for (const e of s) { + writeString(e, o, n); + o += e.length; + } + return bytesToString(Js(n)); + })(e, t); + i.set("ID", [t.fileIds[0], a]); + } +} +async function incrementalUpdate({ + originalData: e, + xrefInfo: t, + newRefs: i, + xref: a = null, + hasXfa: s = !1, + xfaDatasetsRef: r = null, + hasXfaDatasetsEntry: n = !1, + needAppearances: o, + acroFormRef: g = null, + acroForm: c = null, + xfaData: h = null, + useXrefStream: l = !1, +}) { + await (async function updateAcroform({ + xref: e, + acroForm: t, + acroFormRef: i, + hasXfa: a, + hasXfaDatasetsEntry: s, + xfaDatasetsRef: r, + needAppearances: n, + newRefs: o, + }) { + !a || s || r || warn("XFA - Cannot save it"); + if (!n && (!a || !r || s)) return; + const g = t.clone(); + if (a && !s) { + const e = t.get("XFA").slice(); + e.splice(2, 0, "datasets"); + e.splice(3, 0, r); + g.set("XFA", e); + } + n && g.set("NeedAppearances", !0); + const c = []; + await writeObject(i, g, c, e); + o.push({ ref: i, data: c.join("") }); + })({ + xref: a, + acroForm: c, + acroFormRef: g, + hasXfa: s, + hasXfaDatasetsEntry: n, + xfaDatasetsRef: r, + needAppearances: o, + newRefs: i, + }); + s && updateXFA({ xfaData: h, xfaDatasetsRef: r, newRefs: i, xref: a }); + const C = []; + let Q = e.length; + const E = e.at(-1); + if (10 !== E && 13 !== E) { + C.push("\n"); + Q += 1; + } + const u = (function getTrailerDict(e, t, i) { + const a = new Dict(null); + a.set("Prev", e.startXRef); + const s = e.newRef; + if (i) { + t.push({ ref: s, data: "" }); + a.set("Size", s.num + 1); + a.set("Type", Name.get("XRef")); + } else a.set("Size", s.num); + null !== e.rootRef && a.set("Root", e.rootRef); + null !== e.infoRef && a.set("Info", e.infoRef); + null !== e.encryptRef && a.set("Encrypt", e.encryptRef); + return a; + })(t, i, l); + i = i.sort((e, t) => e.ref.num - t.ref.num); + for (const { data: e } of i) null !== e && C.push(e); + await (l + ? (async function getXRefStreamTable(e, t, i, a, s) { + const r = []; + let n = 0, + o = 0; + for (const { ref: e, data: a } of i) { + let i; + n = Math.max(n, t); + if (null !== a) { + i = Math.min(e.gen, 65535); + r.push([1, t, i]); + t += a.length; + } else { + i = Math.min(e.gen + 1, 65535); + r.push([0, 0, i]); + } + o = Math.max(o, i); + } + a.set("Index", getIndexes(i)); + const g = [1, getSizeInBytes(n), getSizeInBytes(o)]; + a.set("W", g); + computeIDs(t, e, a); + const c = g.reduce((e, t) => e + t, 0), + h = new Uint8Array(c * r.length), + l = new Stream(h); + l.dict = a; + let C = 0; + for (const [e, t, i] of r) { + C = writeInt(e, g[0], C, h); + C = writeInt(t, g[1], C, h); + C = writeInt(i, g[2], C, h); + } + await writeObject(e.newRef, l, s, {}); + s.push("startxref\n", t.toString(), "\n%%EOF\n"); + })(t, Q, i, u, C) + : (async function getXRefTable(e, t, i, a, s) { + s.push("xref\n"); + const r = getIndexes(i); + let n = 0; + for (const { ref: e, data: a } of i) { + if (e.num === r[n]) { + s.push(`${r[n]} ${r[n + 1]}\n`); + n += 2; + } + if (null !== a) { + s.push( + `${t.toString().padStart(10, "0")} ${Math.min(e.gen, 65535).toString().padStart(5, "0")} n\r\n`, + ); + t += a.length; + } else + s.push( + `0000000000 ${Math.min(e.gen + 1, 65535) + .toString() + .padStart(5, "0")} f\r\n`, + ); + } + computeIDs(t, e, a); + s.push("trailer\n"); + await writeDict(a, s); + s.push("\nstartxref\n", t.toString(), "\n%%EOF\n"); + })(t, Q, i, u, C)); + const d = C.reduce((e, t) => e + t.length, e.length), + f = new Uint8Array(d); + f.set(e); + let p = e.length; + for (const e of C) { + writeString(e, p, f); + p += e.length; + } + return f; +} +const vs = 1, + Ks = 2, + Ts = 3, + qs = 4, + Os = 5; +class StructTreeRoot { + constructor(e, t) { + this.dict = e; + this.ref = t instanceof Ref ? t : null; + this.roleMap = new Map(); + this.structParentIds = null; + } + init() { + this.readRoleMap(); + } + #U(e, t, i) { + if (!(e instanceof Ref) || t < 0) return; + this.structParentIds ||= new RefSetCache(); + let a = this.structParentIds.get(e); + if (!a) { + a = []; + this.structParentIds.put(e, a); + } + a.push([t, i]); + } + addAnnotationIdToPage(e, t) { + this.#U(e, t, qs); + } + readRoleMap() { + const e = this.dict.get("RoleMap"); + e instanceof Dict && + e.forEach((e, t) => { + t instanceof Name && this.roleMap.set(e, t.name); + }); + } + static async canCreateStructureTree({ + catalogRef: e, + pdfManager: t, + newAnnotationsByPage: i, + }) { + if (!(e instanceof Ref)) { + warn("Cannot save the struct tree: no catalog reference."); + return !1; + } + let a = 0, + s = !0; + for (const [e, r] of i) { + const { ref: i } = await t.getPage(e); + if (!(i instanceof Ref)) { + warn(`Cannot save the struct tree: page ${e} has no ref.`); + s = !0; + break; + } + for (const e of r) + if (e.accessibilityData?.type) { + e.parentTreeId = a++; + s = !1; + } + } + if (s) { + for (const e of i.values()) for (const t of e) delete t.parentTreeId; + return !1; + } + return !0; + } + static async createStructureTree({ + newAnnotationsByPage: e, + xref: t, + catalogRef: i, + pdfManager: a, + newRefs: s, + }) { + const r = a.catalog.cloneDict(), + n = new RefSetCache(); + n.put(i, r); + const o = t.getNewTemporaryRef(); + r.set("StructTreeRoot", o); + const g = new Dict(t); + g.set("Type", Name.get("StructTreeRoot")); + const c = t.getNewTemporaryRef(); + g.set("ParentTree", c); + const h = []; + g.set("K", h); + n.put(o, g); + const l = new Dict(t), + C = []; + l.set("Nums", C); + const Q = await this.#L({ + newAnnotationsByPage: e, + structTreeRootRef: o, + kids: h, + nums: C, + xref: t, + pdfManager: a, + cache: n, + }); + g.set("ParentTreeNextKey", Q); + n.put(c, l); + const E = []; + for (const [e, i] of n.items()) { + E.length = 0; + await writeObject(e, i, E, t); + s.push({ ref: e, data: E.join("") }); + } + } + async canUpdateStructTree({ + pdfManager: e, + xref: t, + newAnnotationsByPage: i, + }) { + if (!this.ref) { + warn("Cannot update the struct tree: no root reference."); + return !1; + } + let a = this.dict.get("ParentTreeNextKey"); + if (!Number.isInteger(a) || a < 0) { + warn("Cannot update the struct tree: invalid next key."); + return !1; + } + const s = this.dict.get("ParentTree"); + if (!(s instanceof Dict)) { + warn("Cannot update the struct tree: ParentTree isn't a dict."); + return !1; + } + const r = s.get("Nums"); + if (!Array.isArray(r)) { + warn("Cannot update the struct tree: nums isn't an array."); + return !1; + } + const n = new NumberTree(s, t); + for (const t of i.keys()) { + const { pageDict: i } = await e.getPage(t); + if (!i.has("StructParents")) continue; + const a = i.get("StructParents"); + if (!Number.isInteger(a) || !Array.isArray(n.get(a))) { + warn(`Cannot save the struct tree: page ${t} has a wrong id.`); + return !1; + } + } + let o = !0; + for (const [t, s] of i) { + const { pageDict: i } = await e.getPage(t); + StructTreeRoot.#J({ + elements: s, + xref: this.dict.xref, + pageDict: i, + numberTree: n, + }); + for (const e of s) + if (e.accessibilityData?.type) { + e.parentTreeId = a++; + o = !1; + } + } + if (o) { + for (const e of i.values()) + for (const t of e) { + delete t.parentTreeId; + delete t.structTreeParent; + } + return !1; + } + return !0; + } + async updateStructureTree({ + newAnnotationsByPage: e, + pdfManager: t, + newRefs: i, + }) { + const a = this.dict.xref, + s = this.dict.clone(), + r = this.ref, + n = new RefSetCache(); + n.put(r, s); + let o, + g = s.getRaw("ParentTree"); + if (g instanceof Ref) o = a.fetch(g); + else { + o = g; + g = a.getNewTemporaryRef(); + s.set("ParentTree", g); + } + o = o.clone(); + n.put(g, o); + let c = o.getRaw("Nums"), + h = null; + if (c instanceof Ref) { + h = c; + c = a.fetch(h); + } + c = c.slice(); + h || o.set("Nums", c); + const l = await StructTreeRoot.#L({ + newAnnotationsByPage: e, + structTreeRootRef: r, + kids: null, + nums: c, + xref: a, + pdfManager: t, + cache: n, + }); + s.set("ParentTreeNextKey", l); + h && n.put(h, c); + const C = []; + for (const [e, t] of n.items()) { + C.length = 0; + await writeObject(e, t, C, a); + i.push({ ref: e, data: C.join("") }); + } + } + static async #L({ + newAnnotationsByPage: e, + structTreeRootRef: t, + kids: i, + nums: a, + xref: s, + pdfManager: r, + cache: n, + }) { + const o = Name.get("OBJR"); + let g = -1 / 0; + for (const [c, h] of e) { + const { ref: e } = await r.getPage(c), + l = e instanceof Ref; + for (const { + accessibilityData: r, + ref: c, + parentTreeId: C, + structTreeParent: Q, + } of h) { + if (!r?.type) continue; + const { + type: h, + title: E, + lang: u, + alt: d, + expanded: f, + actualText: p, + } = r; + g = Math.max(g, C); + const m = s.getNewTemporaryRef(), + y = new Dict(s); + y.set("S", Name.get(h)); + E && y.set("T", E); + u && y.set("Lang", u); + d && y.set("Alt", d); + f && y.set("E", f); + p && y.set("ActualText", p); + await this.#H({ + structTreeParent: Q, + tagDict: y, + newTagRef: m, + structTreeRootRef: t, + fallbackKids: i, + xref: s, + cache: n, + }); + const w = new Dict(s); + y.set("K", w); + w.set("Type", o); + l && w.set("Pg", e); + w.set("Obj", c); + n.put(m, y); + a.push(C, m); + } + } + return g + 1; + } + static #J({ elements: e, xref: t, pageDict: i, numberTree: a }) { + const s = new Map(); + for (const t of e) + if (t.structTreeParentId) { + const e = parseInt(t.structTreeParentId.split("_mc")[1], 10); + let i = s.get(e); + if (!i) { + i = []; + s.set(e, i); + } + i.push(t); + } + const r = i.get("StructParents"); + if (!Number.isInteger(r)) return; + const n = a.get(r), + updateElement = (e, i, a) => { + const r = s.get(e); + if (r) { + const e = i.getRaw("P"), + s = t.fetchIfRef(e); + if (e instanceof Ref && s instanceof Dict) { + const e = { ref: a, dict: i }; + for (const t of r) t.structTreeParent = e; + } + return !0; + } + return !1; + }; + for (const e of n) { + if (!(e instanceof Ref)) continue; + const i = t.fetch(e), + a = i.get("K"); + if (Number.isInteger(a)) updateElement(a, i, e); + else if (Array.isArray(a)) + for (let s of a) { + s = t.fetchIfRef(s); + if (Number.isInteger(s) && updateElement(s, i, e)) break; + if (!(s instanceof Dict)) continue; + if (!isName(s.get("Type"), "MCR")) break; + const a = s.get("MCID"); + if (Number.isInteger(a) && updateElement(a, i, e)) break; + } + } + } + static async #H({ + structTreeParent: e, + tagDict: t, + newTagRef: i, + structTreeRootRef: a, + fallbackKids: s, + xref: r, + cache: n, + }) { + let o, + g = null; + if (e) { + ({ ref: g } = e); + o = e.dict.getRaw("P") || a; + } else o = a; + t.set("P", o); + const c = r.fetchIfRef(o); + if (!c) { + s.push(i); + return; + } + let h = n.get(o); + if (!h) { + h = c.clone(); + n.put(o, h); + } + const l = h.getRaw("K"); + let C = l instanceof Ref ? n.get(l) : null; + if (!C) { + C = r.fetchIfRef(l); + C = Array.isArray(C) ? C.slice() : [l]; + const e = r.getNewTemporaryRef(); + h.set("K", e); + n.put(e, C); + } + const Q = C.indexOf(g); + C.splice(Q >= 0 ? Q + 1 : C.length, 0, i); + } +} +class StructElementNode { + constructor(e, t) { + this.tree = e; + this.dict = t; + this.kids = []; + this.parseKids(); + } + get role() { + const e = this.dict.get("S"), + t = e instanceof Name ? e.name : "", + { root: i } = this.tree; + return i.roleMap.has(t) ? i.roleMap.get(t) : t; + } + parseKids() { + let e = null; + const t = this.dict.getRaw("Pg"); + t instanceof Ref && (e = t.toString()); + const i = this.dict.get("K"); + if (Array.isArray(i)) + for (const t of i) { + const i = this.parseKid(e, t); + i && this.kids.push(i); + } + else { + const t = this.parseKid(e, i); + t && this.kids.push(t); + } + } + parseKid(e, t) { + if (Number.isInteger(t)) + return this.tree.pageDict.objId !== e + ? null + : new StructElement({ type: vs, mcid: t, pageObjId: e }); + let i = null; + t instanceof Ref + ? (i = this.dict.xref.fetch(t)) + : t instanceof Dict && (i = t); + if (!i) return null; + const a = i.getRaw("Pg"); + a instanceof Ref && (e = a.toString()); + const s = i.get("Type") instanceof Name ? i.get("Type").name : null; + if ("MCR" === s) { + if (this.tree.pageDict.objId !== e) return null; + const t = i.getRaw("Stm"); + return new StructElement({ + type: Ks, + refObjId: t instanceof Ref ? t.toString() : null, + pageObjId: e, + mcid: i.get("MCID"), + }); + } + if ("OBJR" === s) { + if (this.tree.pageDict.objId !== e) return null; + const t = i.getRaw("Obj"); + return new StructElement({ + type: Ts, + refObjId: t instanceof Ref ? t.toString() : null, + pageObjId: e, + }); + } + return new StructElement({ type: Os, dict: i }); + } +} +class StructElement { + constructor({ + type: e, + dict: t = null, + mcid: i = null, + pageObjId: a = null, + refObjId: s = null, + }) { + this.type = e; + this.dict = t; + this.mcid = i; + this.pageObjId = a; + this.refObjId = s; + this.parentNode = null; + } +} +class StructTreePage { + constructor(e, t) { + this.root = e; + this.rootDict = e ? e.dict : null; + this.pageDict = t; + this.nodes = []; + } + parse(e) { + if (!this.root || !this.rootDict) return; + const t = this.rootDict.get("ParentTree"); + if (!t) return; + const i = this.pageDict.get("StructParents"), + a = e instanceof Ref && this.root.structParentIds?.get(e); + if (!Number.isInteger(i) && !a) return; + const s = new Map(), + r = new NumberTree(t, this.rootDict.xref); + if (Number.isInteger(i)) { + const e = r.get(i); + if (Array.isArray(e)) + for (const t of e) + t instanceof Ref && this.addNode(this.rootDict.xref.fetch(t), s); + } + if (a) + for (const [e, t] of a) { + const i = r.get(e); + if (i) { + const e = this.addNode(this.rootDict.xref.fetchIfRef(i), s); + 1 === e?.kids?.length && + e.kids[0].type === Ts && + (e.kids[0].type = t); + } + } + } + addNode(e, t, i = 0) { + if (i > 40) { + warn("StructTree MAX_DEPTH reached."); + return null; + } + if (t.has(e)) return t.get(e); + const a = new StructElementNode(this, e); + t.set(e, a); + const s = e.get("P"); + if (!s || isName(s.get("Type"), "StructTreeRoot")) { + this.addTopLevelNode(e, a) || t.delete(e); + return a; + } + const r = this.addNode(s, t, i + 1); + if (!r) return a; + let n = !1; + for (const t of r.kids) + if (t.type === Os && t.dict === e) { + t.parentNode = a; + n = !0; + } + n || t.delete(e); + return a; + } + addTopLevelNode(e, t) { + const i = this.rootDict.get("K"); + if (!i) return !1; + if (i instanceof Dict) { + if (i.objId !== e.objId) return !1; + this.nodes[0] = t; + return !0; + } + if (!Array.isArray(i)) return !0; + let a = !1; + for (let s = 0; s < i.length; s++) { + const r = i[s]; + if (r?.toString() === e.objId) { + this.nodes[s] = t; + a = !0; + } + } + return a; + } + get serializable() { + function nodeToSerializable(e, t, i = 0) { + if (i > 40) { + warn("StructTree too deep to be fully serialized."); + return; + } + const a = Object.create(null); + a.role = e.role; + a.children = []; + t.children.push(a); + const s = e.dict.get("Alt"); + "string" == typeof s && (a.alt = stringToPDFString(s)); + const r = e.dict.get("Lang"); + "string" == typeof r && (a.lang = stringToPDFString(r)); + for (const t of e.kids) { + const e = t.type === Os ? t.parentNode : null; + e + ? nodeToSerializable(e, a, i + 1) + : t.type === vs || t.type === Ks + ? a.children.push({ + type: "content", + id: `p${t.pageObjId}_mc${t.mcid}`, + }) + : t.type === Ts + ? a.children.push({ type: "object", id: t.refObjId }) + : t.type === qs && + a.children.push({ + type: "annotation", + id: `pdfjs_internal_id_${t.refObjId}`, + }); + } + } + const e = Object.create(null); + e.children = []; + e.role = "Root"; + for (const t of this.nodes) t && nodeToSerializable(t, e); + return e; + } +} +function isValidExplicitDest(e) { + if (!Array.isArray(e) || e.length < 2) return !1; + const [t, i, ...a] = e; + if (!(t instanceof Ref || Number.isInteger(t))) return !1; + if (!(i instanceof Name)) return !1; + let s = !0; + switch (i.name) { + case "XYZ": + if (3 !== a.length) return !1; + break; + case "Fit": + case "FitB": + return 0 === a.length; + case "FitH": + case "FitBH": + case "FitV": + case "FitBV": + if (1 !== a.length) return !1; + break; + case "FitR": + if (4 !== a.length) return !1; + s = !1; + break; + default: + return !1; + } + for (const e of a) + if (!("number" == typeof e || (s && null === e))) return !1; + return !0; +} +function fetchDest(e) { + e instanceof Dict && (e = e.get("D")); + return isValidExplicitDest(e) ? e : null; +} +function fetchRemoteDest(e) { + let t = e.get("D"); + if (t) { + t instanceof Name && (t = t.name); + if ("string" == typeof t) return stringToPDFString(t); + if (isValidExplicitDest(t)) return JSON.stringify(t); + } + return null; +} +class Catalog { + constructor(e, t) { + this.pdfManager = e; + this.xref = t; + this._catDict = t.getCatalogObj(); + if (!(this._catDict instanceof Dict)) + throw new FormatError("Catalog object is not a dictionary."); + this.toplevelPagesDict; + this._actualNumPages = null; + this.fontCache = new RefSetCache(); + this.builtInCMapCache = new Map(); + this.standardFontDataCache = new Map(); + this.globalImageCache = new GlobalImageCache(); + this.pageKidsCountCache = new RefSetCache(); + this.pageIndexCache = new RefSetCache(); + this.nonBlendModesSet = new RefSet(); + this.systemFontCache = new Map(); + } + cloneDict() { + return this._catDict.clone(); + } + get version() { + const e = this._catDict.get("Version"); + if (e instanceof Name) { + if (Dt.test(e.name)) return shadow(this, "version", e.name); + warn(`Invalid PDF catalog version: ${e.name}`); + } + return shadow(this, "version", null); + } + get lang() { + const e = this._catDict.get("Lang"); + return shadow( + this, + "lang", + e && "string" == typeof e ? stringToPDFString(e) : null, + ); + } + get needsRendering() { + const e = this._catDict.get("NeedsRendering"); + return shadow(this, "needsRendering", "boolean" == typeof e && e); + } + get collection() { + let e = null; + try { + const t = this._catDict.get("Collection"); + t instanceof Dict && t.size > 0 && (e = t); + } catch (e) { + if (e instanceof MissingDataException) throw e; + info("Cannot fetch Collection entry; assuming no collection is present."); + } + return shadow(this, "collection", e); + } + get acroForm() { + let e = null; + try { + const t = this._catDict.get("AcroForm"); + t instanceof Dict && t.size > 0 && (e = t); + } catch (e) { + if (e instanceof MissingDataException) throw e; + info("Cannot fetch AcroForm entry; assuming no forms are present."); + } + return shadow(this, "acroForm", e); + } + get acroFormRef() { + const e = this._catDict.getRaw("AcroForm"); + return shadow(this, "acroFormRef", e instanceof Ref ? e : null); + } + get metadata() { + const e = this._catDict.getRaw("Metadata"); + if (!(e instanceof Ref)) return shadow(this, "metadata", null); + let t = null; + try { + const i = this.xref.fetch(e, !this.xref.encrypt?.encryptMetadata); + if (i instanceof BaseStream && i.dict instanceof Dict) { + const e = i.dict.get("Type"), + a = i.dict.get("Subtype"); + if (isName(e, "Metadata") && isName(a, "XML")) { + const e = stringToUTF8String(i.getString()); + e && (t = new MetadataParser(e).serializable); + } + } + } catch (e) { + if (e instanceof MissingDataException) throw e; + info(`Skipping invalid Metadata: "${e}".`); + } + return shadow(this, "metadata", t); + } + get markInfo() { + let e = null; + try { + e = this._readMarkInfo(); + } catch (e) { + if (e instanceof MissingDataException) throw e; + warn("Unable to read mark info."); + } + return shadow(this, "markInfo", e); + } + _readMarkInfo() { + const e = this._catDict.get("MarkInfo"); + if (!(e instanceof Dict)) return null; + const t = { Marked: !1, UserProperties: !1, Suspects: !1 }; + for (const i in t) { + const a = e.get(i); + "boolean" == typeof a && (t[i] = a); + } + return t; + } + get structTreeRoot() { + let e = null; + try { + e = this._readStructTreeRoot(); + } catch (e) { + if (e instanceof MissingDataException) throw e; + warn("Unable read to structTreeRoot info."); + } + return shadow(this, "structTreeRoot", e); + } + _readStructTreeRoot() { + const e = this._catDict.getRaw("StructTreeRoot"), + t = this.xref.fetchIfRef(e); + if (!(t instanceof Dict)) return null; + const i = new StructTreeRoot(t, e); + i.init(); + return i; + } + get toplevelPagesDict() { + const e = this._catDict.get("Pages"); + if (!(e instanceof Dict)) + throw new FormatError("Invalid top-level pages dictionary."); + return shadow(this, "toplevelPagesDict", e); + } + get documentOutline() { + let e = null; + try { + e = this._readDocumentOutline(); + } catch (e) { + if (e instanceof MissingDataException) throw e; + warn("Unable to read document outline."); + } + return shadow(this, "documentOutline", e); + } + _readDocumentOutline() { + let e = this._catDict.get("Outlines"); + if (!(e instanceof Dict)) return null; + e = e.getRaw("First"); + if (!(e instanceof Ref)) return null; + const t = { items: [] }, + i = [{ obj: e, parent: t }], + a = new RefSet(); + a.put(e); + const s = this.xref, + r = new Uint8ClampedArray(3); + for (; i.length > 0; ) { + const t = i.shift(), + n = s.fetchIfRef(t.obj); + if (null === n) continue; + n.has("Title") || warn("Invalid outline item encountered."); + const o = { url: null, dest: null, action: null }; + Catalog.parseDestDictionary({ + destDict: n, + resultObj: o, + docBaseUrl: this.baseUrl, + docAttachments: this.attachments, + }); + const g = n.get("Title"), + c = n.get("F") || 0, + h = n.getArray("C"), + l = n.get("Count"); + let C = r; + !isNumberArray(h, 3) || + (0 === h[0] && 0 === h[1] && 0 === h[2]) || + (C = ColorSpace.singletons.rgb.getRgb(h, 0)); + const Q = { + action: o.action, + attachment: o.attachment, + dest: o.dest, + url: o.url, + unsafeUrl: o.unsafeUrl, + newWindow: o.newWindow, + setOCGState: o.setOCGState, + title: "string" == typeof g ? stringToPDFString(g) : "", + color: C, + count: Number.isInteger(l) ? l : void 0, + bold: !!(2 & c), + italic: !!(1 & c), + items: [], + }; + t.parent.items.push(Q); + e = n.getRaw("First"); + if (e instanceof Ref && !a.has(e)) { + i.push({ obj: e, parent: Q }); + a.put(e); + } + e = n.getRaw("Next"); + if (e instanceof Ref && !a.has(e)) { + i.push({ obj: e, parent: t.parent }); + a.put(e); + } + } + return t.items.length > 0 ? t.items : null; + } + get permissions() { + let e = null; + try { + e = this._readPermissions(); + } catch (e) { + if (e instanceof MissingDataException) throw e; + warn("Unable to read permissions."); + } + return shadow(this, "permissions", e); + } + _readPermissions() { + const e = this.xref.trailer.get("Encrypt"); + if (!(e instanceof Dict)) return null; + let t = e.get("P"); + if ("number" != typeof t) return null; + t += 2 ** 32; + const i = []; + for (const e in m) { + const a = m[e]; + t & a && i.push(a); + } + return i; + } + get optionalContentConfig() { + let e = null; + try { + const t = this._catDict.get("OCProperties"); + if (!t) return shadow(this, "optionalContentConfig", null); + const i = t.get("D"); + if (!i) return shadow(this, "optionalContentConfig", null); + const a = t.get("OCGs"); + if (!Array.isArray(a)) return shadow(this, "optionalContentConfig", null); + const s = [], + r = new RefSet(); + for (const e of a) + if (e instanceof Ref && !r.has(e)) { + r.put(e); + s.push(this.#Y(e)); + } + e = this.#v(i, r); + e.groups = s; + } catch (e) { + if (e instanceof MissingDataException) throw e; + warn(`Unable to read optional content config: ${e}`); + } + return shadow(this, "optionalContentConfig", e); + } + #Y(e) { + const t = this.xref.fetch(e), + i = { + id: e.toString(), + name: null, + intent: null, + usage: { print: null, view: null }, + }, + a = t.get("Name"); + "string" == typeof a && (i.name = stringToPDFString(a)); + let s = t.getArray("Intent"); + Array.isArray(s) || (s = [s]); + s.every((e) => e instanceof Name) && (i.intent = s.map((e) => e.name)); + const r = t.get("Usage"); + if (!(r instanceof Dict)) return i; + const n = i.usage, + o = r.get("Print"); + if (o instanceof Dict) { + const e = o.get("PrintState"); + if (e instanceof Name) + switch (e.name) { + case "ON": + case "OFF": + n.print = { printState: e.name }; + } + } + const g = r.get("View"); + if (g instanceof Dict) { + const e = g.get("ViewState"); + if (e instanceof Name) + switch (e.name) { + case "ON": + case "OFF": + n.view = { viewState: e.name }; + } + } + return i; + } + #v(e, t) { + function parseOnOff(e) { + const i = []; + if (Array.isArray(e)) + for (const a of e) a instanceof Ref && t.has(a) && i.push(a.toString()); + return i; + } + function parseOrder(e, i = 0) { + if (!Array.isArray(e)) return null; + const s = []; + for (const r of e) { + if (r instanceof Ref && t.has(r)) { + a.put(r); + s.push(r.toString()); + continue; + } + const e = parseNestedOrder(r, i); + e && s.push(e); + } + if (i > 0) return s; + const r = []; + for (const e of t) a.has(e) || r.push(e.toString()); + r.length && s.push({ name: null, order: r }); + return s; + } + function parseNestedOrder(e, t) { + if (++t > s) { + warn("parseNestedOrder - reached MAX_NESTED_LEVELS."); + return null; + } + const a = i.fetchIfRef(e); + if (!Array.isArray(a)) return null; + const r = i.fetchIfRef(a[0]); + if ("string" != typeof r) return null; + const n = parseOrder(a.slice(1), t); + return n && n.length ? { name: stringToPDFString(r), order: n } : null; + } + const i = this.xref, + a = new RefSet(), + s = 10; + return { + name: + "string" == typeof e.get("Name") + ? stringToPDFString(e.get("Name")) + : null, + creator: + "string" == typeof e.get("Creator") + ? stringToPDFString(e.get("Creator")) + : null, + baseState: + e.get("BaseState") instanceof Name ? e.get("BaseState").name : null, + on: parseOnOff(e.get("ON")), + off: parseOnOff(e.get("OFF")), + order: parseOrder(e.get("Order")), + groups: null, + }; + } + setActualNumPages(e = null) { + this._actualNumPages = e; + } + get hasActualNumPages() { + return null !== this._actualNumPages; + } + get _pagesCount() { + const e = this.toplevelPagesDict.get("Count"); + if (!Number.isInteger(e)) + throw new FormatError( + "Page count in top-level pages dictionary is not an integer.", + ); + return shadow(this, "_pagesCount", e); + } + get numPages() { + return this.hasActualNumPages ? this._actualNumPages : this._pagesCount; + } + get destinations() { + const e = this._readDests(), + t = Object.create(null); + if (e instanceof NameTree) + for (const [i, a] of e.getAll()) { + const e = fetchDest(a); + e && (t[stringToPDFString(i)] = e); + } + else + e instanceof Dict && + e.forEach(function (e, i) { + const a = fetchDest(i); + a && (t[e] = a); + }); + return shadow(this, "destinations", t); + } + getDestination(e) { + const t = this._readDests(); + if (t instanceof NameTree) { + const i = fetchDest(t.get(e)); + if (i) return i; + const a = this.destinations[e]; + if (a) { + warn(`Found "${e}" at an incorrect position in the NameTree.`); + return a; + } + } else if (t instanceof Dict) { + const i = fetchDest(t.get(e)); + if (i) return i; + } + return null; + } + _readDests() { + const e = this._catDict.get("Names"); + return e?.has("Dests") + ? new NameTree(e.getRaw("Dests"), this.xref) + : this._catDict.has("Dests") + ? this._catDict.get("Dests") + : void 0; + } + get pageLabels() { + let e = null; + try { + e = this._readPageLabels(); + } catch (e) { + if (e instanceof MissingDataException) throw e; + warn("Unable to read page labels."); + } + return shadow(this, "pageLabels", e); + } + _readPageLabels() { + const e = this._catDict.getRaw("PageLabels"); + if (!e) return null; + const t = new Array(this.numPages); + let i = null, + a = ""; + const s = new NumberTree(e, this.xref).getAll(); + let r = "", + n = 1; + for (let e = 0, o = this.numPages; e < o; e++) { + const o = s.get(e); + if (void 0 !== o) { + if (!(o instanceof Dict)) + throw new FormatError("PageLabel is not a dictionary."); + if (o.has("Type") && !isName(o.get("Type"), "PageLabel")) + throw new FormatError("Invalid type in PageLabel dictionary."); + if (o.has("S")) { + const e = o.get("S"); + if (!(e instanceof Name)) + throw new FormatError("Invalid style in PageLabel dictionary."); + i = e.name; + } else i = null; + if (o.has("P")) { + const e = o.get("P"); + if ("string" != typeof e) + throw new FormatError("Invalid prefix in PageLabel dictionary."); + a = stringToPDFString(e); + } else a = ""; + if (o.has("St")) { + const e = o.get("St"); + if (!(Number.isInteger(e) && e >= 1)) + throw new FormatError("Invalid start in PageLabel dictionary."); + n = e; + } else n = 1; + } + switch (i) { + case "D": + r = n; + break; + case "R": + case "r": + r = toRomanNumerals(n, "r" === i); + break; + case "A": + case "a": + const e = 26, + t = "a" === i ? 97 : 65, + a = n - 1; + r = String.fromCharCode(t + (a % e)).repeat(Math.floor(a / e) + 1); + break; + default: + if (i) + throw new FormatError( + `Invalid style "${i}" in PageLabel dictionary.`, + ); + r = ""; + } + t[e] = a + r; + n++; + } + return t; + } + get pageLayout() { + const e = this._catDict.get("PageLayout"); + let t = ""; + if (e instanceof Name) + switch (e.name) { + case "SinglePage": + case "OneColumn": + case "TwoColumnLeft": + case "TwoColumnRight": + case "TwoPageLeft": + case "TwoPageRight": + t = e.name; + } + return shadow(this, "pageLayout", t); + } + get pageMode() { + const e = this._catDict.get("PageMode"); + let t = "UseNone"; + if (e instanceof Name) + switch (e.name) { + case "UseNone": + case "UseOutlines": + case "UseThumbs": + case "FullScreen": + case "UseOC": + case "UseAttachments": + t = e.name; + } + return shadow(this, "pageMode", t); + } + get viewerPreferences() { + const e = this._catDict.get("ViewerPreferences"); + if (!(e instanceof Dict)) return shadow(this, "viewerPreferences", null); + let t = null; + for (const i of e.getKeys()) { + const a = e.get(i); + let s; + switch (i) { + case "HideToolbar": + case "HideMenubar": + case "HideWindowUI": + case "FitWindow": + case "CenterWindow": + case "DisplayDocTitle": + case "PickTrayByPDFSize": + "boolean" == typeof a && (s = a); + break; + case "NonFullScreenPageMode": + if (a instanceof Name) + switch (a.name) { + case "UseNone": + case "UseOutlines": + case "UseThumbs": + case "UseOC": + s = a.name; + break; + default: + s = "UseNone"; + } + break; + case "Direction": + if (a instanceof Name) + switch (a.name) { + case "L2R": + case "R2L": + s = a.name; + break; + default: + s = "L2R"; + } + break; + case "ViewArea": + case "ViewClip": + case "PrintArea": + case "PrintClip": + if (a instanceof Name) + switch (a.name) { + case "MediaBox": + case "CropBox": + case "BleedBox": + case "TrimBox": + case "ArtBox": + s = a.name; + break; + default: + s = "CropBox"; + } + break; + case "PrintScaling": + if (a instanceof Name) + switch (a.name) { + case "None": + case "AppDefault": + s = a.name; + break; + default: + s = "AppDefault"; + } + break; + case "Duplex": + if (a instanceof Name) + switch (a.name) { + case "Simplex": + case "DuplexFlipShortEdge": + case "DuplexFlipLongEdge": + s = a.name; + break; + default: + s = "None"; + } + break; + case "PrintPageRange": + if (Array.isArray(a) && a.length % 2 == 0) { + a.every( + (e, t, i) => + Number.isInteger(e) && + e > 0 && + (0 === t || e >= i[t - 1]) && + e <= this.numPages, + ) && (s = a); + } + break; + case "NumCopies": + Number.isInteger(a) && a > 0 && (s = a); + break; + default: + warn(`Ignoring non-standard key in ViewerPreferences: ${i}.`); + continue; + } + if (void 0 !== s) { + t || (t = Object.create(null)); + t[i] = s; + } else warn(`Bad value, for key "${i}", in ViewerPreferences: ${a}.`); + } + return shadow(this, "viewerPreferences", t); + } + get openAction() { + const e = this._catDict.get("OpenAction"), + t = Object.create(null); + if (e instanceof Dict) { + const i = new Dict(this.xref); + i.set("A", e); + const a = { url: null, dest: null, action: null }; + Catalog.parseDestDictionary({ destDict: i, resultObj: a }); + Array.isArray(a.dest) + ? (t.dest = a.dest) + : a.action && (t.action = a.action); + } else Array.isArray(e) && (t.dest = e); + return shadow(this, "openAction", objectSize(t) > 0 ? t : null); + } + get attachments() { + const e = this._catDict.get("Names"); + let t = null; + if (e instanceof Dict && e.has("EmbeddedFiles")) { + const i = new NameTree(e.getRaw("EmbeddedFiles"), this.xref); + for (const [e, a] of i.getAll()) { + const i = new FileSpec(a, this.xref); + t || (t = Object.create(null)); + t[stringToPDFString(e)] = i.serializable; + } + } + return shadow(this, "attachments", t); + } + get xfaImages() { + const e = this._catDict.get("Names"); + let t = null; + if (e instanceof Dict && e.has("XFAImages")) { + const i = new NameTree(e.getRaw("XFAImages"), this.xref); + for (const [e, a] of i.getAll()) { + t || (t = new Dict(this.xref)); + t.set(stringToPDFString(e), a); + } + } + return shadow(this, "xfaImages", t); + } + _collectJavaScript() { + const e = this._catDict.get("Names"); + let t = null; + function appendIfJavaScriptDict(e, i) { + if (!(i instanceof Dict)) return; + if (!isName(i.get("S"), "JavaScript")) return; + let a = i.get("JS"); + if (a instanceof BaseStream) a = a.getString(); + else if ("string" != typeof a) return; + a = stringToPDFString(a).replaceAll("\0", ""); + a && (t ||= new Map()).set(e, a); + } + if (e instanceof Dict && e.has("JavaScript")) { + const t = new NameTree(e.getRaw("JavaScript"), this.xref); + for (const [e, i] of t.getAll()) + appendIfJavaScriptDict(stringToPDFString(e), i); + } + const i = this._catDict.get("OpenAction"); + i && appendIfJavaScriptDict("OpenAction", i); + return t; + } + get jsActions() { + const e = this._collectJavaScript(); + let t = collectActions(this.xref, this._catDict, dA); + if (e) { + t ||= Object.create(null); + for (const [i, a] of e) i in t ? t[i].push(a) : (t[i] = [a]); + } + return shadow(this, "jsActions", t); + } + async fontFallback(e, t) { + const i = await Promise.all(this.fontCache); + for (const a of i) + if (a.loadedName === e) { + a.fallback(t); + return; + } + } + async cleanup(e = !1) { + clearGlobalCaches(); + this.globalImageCache.clear(e); + this.pageKidsCountCache.clear(); + this.pageIndexCache.clear(); + this.nonBlendModesSet.clear(); + const t = await Promise.all(this.fontCache); + for (const { dict: e } of t) delete e.cacheKey; + this.fontCache.clear(); + this.builtInCMapCache.clear(); + this.standardFontDataCache.clear(); + this.systemFontCache.clear(); + } + async getPageDict(e) { + const t = [this.toplevelPagesDict], + i = new RefSet(), + a = this._catDict.getRaw("Pages"); + a instanceof Ref && i.put(a); + const s = this.xref, + r = this.pageKidsCountCache, + n = this.pageIndexCache; + let o = 0; + for (; t.length; ) { + const a = t.pop(); + if (a instanceof Ref) { + const g = r.get(a); + if (g >= 0 && o + g <= e) { + o += g; + continue; + } + if (i.has(a)) + throw new FormatError("Pages tree contains circular reference."); + i.put(a); + const c = await s.fetchAsync(a); + if (c instanceof Dict) { + let t = c.getRaw("Type"); + t instanceof Ref && (t = await s.fetchAsync(t)); + if (isName(t, "Page") || !c.has("Kids")) { + r.has(a) || r.put(a, 1); + n.has(a) || n.put(a, o); + if (o === e) return [c, a]; + o++; + continue; + } + } + t.push(c); + continue; + } + if (!(a instanceof Dict)) + throw new FormatError( + "Page dictionary kid reference points to wrong type of object.", + ); + const { objId: g } = a; + let c = a.getRaw("Count"); + c instanceof Ref && (c = await s.fetchAsync(c)); + if (Number.isInteger(c) && c >= 0) { + g && !r.has(g) && r.put(g, c); + if (o + c <= e) { + o += c; + continue; + } + } + let h = a.getRaw("Kids"); + h instanceof Ref && (h = await s.fetchAsync(h)); + if (!Array.isArray(h)) { + let t = a.getRaw("Type"); + t instanceof Ref && (t = await s.fetchAsync(t)); + if (isName(t, "Page") || !a.has("Kids")) { + if (o === e) return [a, null]; + o++; + continue; + } + throw new FormatError("Page dictionary kids object is not an array."); + } + for (let e = h.length - 1; e >= 0; e--) t.push(h[e]); + } + throw new Error(`Page index ${e} not found.`); + } + async getAllPageDicts(e = !1) { + const { ignoreErrors: t } = this.pdfManager.evaluatorOptions, + i = [{ currentNode: this.toplevelPagesDict, posInKids: 0 }], + a = new RefSet(), + s = this._catDict.getRaw("Pages"); + s instanceof Ref && a.put(s); + const r = new Map(), + n = this.xref, + o = this.pageIndexCache; + let g = 0; + function addPageDict(e, t) { + t && !o.has(t) && o.put(t, g); + r.set(g++, [e, t]); + } + function addPageError(i) { + if (i instanceof XRefEntryException && !e) throw i; + if (e && t && 0 === g) { + warn(`getAllPageDicts - Skipping invalid first page: "${i}".`); + i = Dict.empty; + } + r.set(g++, [i, null]); + } + for (; i.length > 0; ) { + const e = i.at(-1), + { currentNode: t, posInKids: s } = e; + let r = t.getRaw("Kids"); + if (r instanceof Ref) + try { + r = await n.fetchAsync(r); + } catch (e) { + addPageError(e); + break; + } + if (!Array.isArray(r)) { + addPageError( + new FormatError("Page dictionary kids object is not an array."), + ); + break; + } + if (s >= r.length) { + i.pop(); + continue; + } + const o = r[s]; + let g; + if (o instanceof Ref) { + if (a.has(o)) { + addPageError( + new FormatError("Pages tree contains circular reference."), + ); + break; + } + a.put(o); + try { + g = await n.fetchAsync(o); + } catch (e) { + addPageError(e); + break; + } + } else g = o; + if (!(g instanceof Dict)) { + addPageError( + new FormatError( + "Page dictionary kid reference points to wrong type of object.", + ), + ); + break; + } + let c = g.getRaw("Type"); + if (c instanceof Ref) + try { + c = await n.fetchAsync(c); + } catch (e) { + addPageError(e); + break; + } + isName(c, "Page") || !g.has("Kids") + ? addPageDict(g, o instanceof Ref ? o : null) + : i.push({ currentNode: g, posInKids: 0 }); + e.posInKids++; + } + return r; + } + getPageIndex(e) { + const t = this.pageIndexCache.get(e); + if (void 0 !== t) return Promise.resolve(t); + const i = this.xref; + let a = 0; + const next = (t) => + (function pagesBeforeRef(t) { + let a, + s = 0; + return i + .fetchAsync(t) + .then(function (i) { + if ( + isRefsEqual(t, e) && + !isDict(i, "Page") && + !(i instanceof Dict && !i.has("Type") && i.has("Contents")) + ) + throw new FormatError( + "The reference does not point to a /Page dictionary.", + ); + if (!i) return null; + if (!(i instanceof Dict)) + throw new FormatError("Node must be a dictionary."); + a = i.getRaw("Parent"); + return i.getAsync("Parent"); + }) + .then(function (e) { + if (!e) return null; + if (!(e instanceof Dict)) + throw new FormatError("Parent must be a dictionary."); + return e.getAsync("Kids"); + }) + .then(function (e) { + if (!e) return null; + const r = []; + let n = !1; + for (const a of e) { + if (!(a instanceof Ref)) + throw new FormatError("Kid must be a reference."); + if (isRefsEqual(a, t)) { + n = !0; + break; + } + r.push( + i.fetchAsync(a).then(function (e) { + if (!(e instanceof Dict)) + throw new FormatError("Kid node must be a dictionary."); + e.has("Count") ? (s += e.get("Count")) : s++; + }), + ); + } + if (!n) + throw new FormatError( + "Kid reference not found in parent's kids.", + ); + return Promise.all(r).then(function () { + return [s, a]; + }); + }); + })(t).then((t) => { + if (!t) { + this.pageIndexCache.put(e, a); + return a; + } + const [i, s] = t; + a += i; + return next(s); + }); + return next(e); + } + get baseUrl() { + const e = this._catDict.get("URI"); + if (e instanceof Dict) { + const t = e.get("Base"); + if ("string" == typeof t) { + const e = createValidAbsoluteUrl(t, null, { tryConvertEncoding: !0 }); + if (e) return shadow(this, "baseUrl", e.href); + } + } + return shadow(this, "baseUrl", this.pdfManager.docBaseUrl); + } + static parseDestDictionary({ + destDict: e, + resultObj: t, + docBaseUrl: i = null, + docAttachments: a = null, + }) { + if (!(e instanceof Dict)) { + warn("parseDestDictionary: `destDict` must be a dictionary."); + return; + } + let s, + r, + n = e.get("A"); + if (!(n instanceof Dict)) + if (e.has("Dest")) n = e.get("Dest"); + else { + n = e.get("AA"); + n instanceof Dict && + (n.has("D") ? (n = n.get("D")) : n.has("U") && (n = n.get("U"))); + } + if (n instanceof Dict) { + const e = n.get("S"); + if (!(e instanceof Name)) { + warn("parseDestDictionary: Invalid type in Action dictionary."); + return; + } + const i = e.name; + switch (i) { + case "ResetForm": + const e = n.get("Flags"), + o = 0 == (1 & ("number" == typeof e ? e : 0)), + g = [], + c = []; + for (const e of n.get("Fields") || []) + e instanceof Ref + ? c.push(e.toString()) + : "string" == typeof e && g.push(stringToPDFString(e)); + t.resetForm = { fields: g, refs: c, include: o }; + break; + case "URI": + s = n.get("URI"); + s instanceof Name && (s = "/" + s.name); + break; + case "GoTo": + r = n.get("D"); + break; + case "Launch": + case "GoToR": + const h = n.get("F"); + if (h instanceof Dict) { + const e = new FileSpec(h, null, !0), + { rawFilename: t } = e.serializable; + s = t; + } else "string" == typeof h && (s = h); + const l = fetchRemoteDest(n); + l && "string" == typeof s && (s = s.split("#", 1)[0] + "#" + l); + const C = n.get("NewWindow"); + "boolean" == typeof C && (t.newWindow = C); + break; + case "GoToE": + const Q = n.get("T"); + let E; + if (a && Q instanceof Dict) { + const e = Q.get("R"), + t = Q.get("N"); + isName(e, "C") && + "string" == typeof t && + (E = a[stringToPDFString(t)]); + } + if (E) { + t.attachment = E; + const e = fetchRemoteDest(n); + e && (t.attachmentDest = e); + } else warn('parseDestDictionary - unimplemented "GoToE" action.'); + break; + case "Named": + const u = n.get("N"); + u instanceof Name && (t.action = u.name); + break; + case "SetOCGState": + const d = n.get("State"), + f = n.get("PreserveRB"); + if (!Array.isArray(d) || 0 === d.length) break; + const p = []; + for (const e of d) + if (e instanceof Name) + switch (e.name) { + case "ON": + case "OFF": + case "Toggle": + p.push(e.name); + } + else e instanceof Ref && p.push(e.toString()); + if (p.length !== d.length) break; + t.setOCGState = { state: p, preserveRB: "boolean" != typeof f || f }; + break; + case "JavaScript": + const m = n.get("JS"); + let y; + m instanceof BaseStream + ? (y = m.getString()) + : "string" == typeof m && (y = m); + const w = y && recoverJsURL(stringToPDFString(y)); + if (w) { + s = w.url; + t.newWindow = w.newWindow; + break; + } + default: + if ("JavaScript" === i || "SubmitForm" === i) break; + warn(`parseDestDictionary - unsupported action: "${i}".`); + } + } else e.has("Dest") && (r = e.get("Dest")); + if ("string" == typeof s) { + const e = createValidAbsoluteUrl(s, i, { + addDefaultProtocol: !0, + tryConvertEncoding: !0, + }); + e && (t.url = e.href); + t.unsafeUrl = s; + } + if (r) { + r instanceof Name && (r = r.name); + "string" == typeof r + ? (t.dest = stringToPDFString(r)) + : isValidExplicitDest(r) && (t.dest = r); + } + } +} +function addChildren(e, t) { + if (e instanceof Dict) e = e.getRawValues(); + else if (e instanceof BaseStream) e = e.dict.getRawValues(); + else if (!Array.isArray(e)) return; + for (const a of e) + ((i = a) instanceof Ref || + i instanceof Dict || + i instanceof BaseStream || + Array.isArray(i)) && + t.push(a); + var i; +} +class ObjectLoader { + constructor(e, t, i) { + this.dict = e; + this.keys = t; + this.xref = i; + this.refSet = null; + } + async load() { + if (this.xref.stream.isDataLoaded) return; + const { keys: e, dict: t } = this; + this.refSet = new RefSet(); + const i = []; + for (const a of e) { + const e = t.getRaw(a); + void 0 !== e && i.push(e); + } + return this._walk(i); + } + async _walk(e) { + const t = [], + i = []; + for (; e.length; ) { + let a = e.pop(); + if (a instanceof Ref) { + if (this.refSet.has(a)) continue; + try { + this.refSet.put(a); + a = this.xref.fetch(a); + } catch (e) { + if (!(e instanceof MissingDataException)) { + warn(`ObjectLoader._walk - requesting all data: "${e}".`); + this.refSet = null; + const { manager: t } = this.xref.stream; + return t.requestAllChunks(); + } + t.push(a); + i.push({ begin: e.begin, end: e.end }); + } + } + if (a instanceof BaseStream) { + const e = a.getBaseStreams(); + if (e) { + let s = !1; + for (const t of e) + if (!t.isDataLoaded) { + s = !0; + i.push({ begin: t.start, end: t.end }); + } + s && t.push(a); + } + } + addChildren(a, e); + } + if (i.length) { + await this.xref.stream.manager.requestRanges(i); + for (const e of t) e instanceof Ref && this.refSet.remove(e); + return this._walk(t); + } + this.refSet = null; + } +} +const Ws = Symbol(), + Xs = Symbol(), + js = Symbol(), + Zs = Symbol(), + Vs = Symbol(), + zs = Symbol(), + _s = Symbol(), + $s = Symbol(), + Ar = Symbol(), + er = Symbol("content"), + tr = Symbol("data"), + ir = Symbol(), + ar = Symbol("extra"), + sr = Symbol(), + rr = Symbol(), + nr = Symbol(), + or = Symbol(), + gr = Symbol(), + Ir = Symbol(), + cr = Symbol(), + hr = Symbol(), + lr = Symbol(), + Cr = Symbol(), + Qr = Symbol(), + Er = Symbol(), + ur = Symbol(), + dr = Symbol(), + fr = Symbol(), + pr = Symbol(), + mr = Symbol(), + yr = Symbol(), + wr = Symbol(), + br = Symbol(), + Dr = Symbol(), + Fr = Symbol(), + Sr = Symbol(), + kr = Symbol(), + Rr = Symbol(), + Nr = Symbol(), + Gr = Symbol(), + xr = Symbol(), + Mr = Symbol(), + Ur = Symbol(), + Lr = Symbol(), + Jr = Symbol(), + Hr = Symbol("namespaceId"), + Yr = Symbol("nodeName"), + vr = Symbol(), + Kr = Symbol(), + Tr = Symbol(), + qr = Symbol(), + Or = Symbol(), + Pr = Symbol(), + Wr = Symbol(), + Xr = Symbol(), + jr = Symbol("root"), + Zr = Symbol(), + Vr = Symbol(), + zr = Symbol(), + _r = Symbol(), + $r = Symbol(), + An = Symbol(), + en = Symbol(), + tn = Symbol(), + an = Symbol(), + sn = Symbol(), + rn = Symbol(), + nn = Symbol("uid"), + on = Symbol(), + gn = { + config: { + id: 0, + check: (e) => e.startsWith("http://www.xfa.org/schema/xci/"), + }, + connectionSet: { + id: 1, + check: (e) => + e.startsWith("http://www.xfa.org/schema/xfa-connection-set/"), + }, + datasets: { + id: 2, + check: (e) => e.startsWith("http://www.xfa.org/schema/xfa-data/"), + }, + form: { + id: 3, + check: (e) => e.startsWith("http://www.xfa.org/schema/xfa-form/"), + }, + localeSet: { + id: 4, + check: (e) => e.startsWith("http://www.xfa.org/schema/xfa-locale-set/"), + }, + pdf: { id: 5, check: (e) => "http://ns.adobe.com/xdp/pdf/" === e }, + signature: { + id: 6, + check: (e) => "http://www.w3.org/2000/09/xmldsig#" === e, + }, + sourceSet: { + id: 7, + check: (e) => e.startsWith("http://www.xfa.org/schema/xfa-source-set/"), + }, + stylesheet: { + id: 8, + check: (e) => "http://www.w3.org/1999/XSL/Transform" === e, + }, + template: { + id: 9, + check: (e) => e.startsWith("http://www.xfa.org/schema/xfa-template/"), + }, + xdc: { + id: 10, + check: (e) => e.startsWith("http://www.xfa.org/schema/xdc/"), + }, + xdp: { id: 11, check: (e) => "http://ns.adobe.com/xdp/" === e }, + xfdf: { id: 12, check: (e) => "http://ns.adobe.com/xfdf/" === e }, + xhtml: { id: 13, check: (e) => "http://www.w3.org/1999/xhtml" === e }, + xmpmeta: { id: 14, check: (e) => "http://ns.adobe.com/xmpmeta/" === e }, + }, + In = { + pt: (e) => e, + cm: (e) => (e / 2.54) * 72, + mm: (e) => (e / 25.4) * 72, + in: (e) => 72 * e, + px: (e) => e, + }, + cn = /([+-]?\d+\.?\d*)(.*)/; +function stripQuotes(e) { + return e.startsWith("'") || e.startsWith('"') ? e.slice(1, -1) : e; +} +function getInteger({ data: e, defaultValue: t, validate: i }) { + if (!e) return t; + e = e.trim(); + const a = parseInt(e, 10); + return !isNaN(a) && i(a) ? a : t; +} +function getFloat({ data: e, defaultValue: t, validate: i }) { + if (!e) return t; + e = e.trim(); + const a = parseFloat(e); + return !isNaN(a) && i(a) ? a : t; +} +function getKeyword({ data: e, defaultValue: t, validate: i }) { + return e && i((e = e.trim())) ? e : t; +} +function getStringOption(e, t) { + return getKeyword({ + data: e, + defaultValue: t[0], + validate: (e) => t.includes(e), + }); +} +function getMeasurement(e, t = "0") { + t ||= "0"; + if (!e) return getMeasurement(t); + const i = e.trim().match(cn); + if (!i) return getMeasurement(t); + const [, a, s] = i, + r = parseFloat(a); + if (isNaN(r)) return getMeasurement(t); + if (0 === r) return 0; + const n = In[s]; + return n ? n(r) : r; +} +function getRatio(e) { + if (!e) return { num: 1, den: 1 }; + const t = e + .trim() + .split(/\s*:\s*/) + .map((e) => parseFloat(e)) + .filter((e) => !isNaN(e)); + 1 === t.length && t.push(1); + if (0 === t.length) return { num: 1, den: 1 }; + const [i, a] = t; + return { num: i, den: a }; +} +function getRelevant(e) { + return e + ? e + .trim() + .split(/\s+/) + .map((e) => ({ excluded: "-" === e[0], viewname: e.substring(1) })) + : []; +} +class HTMLResult { + static get FAILURE() { + return shadow(this, "FAILURE", new HTMLResult(!1, null, null, null)); + } + static get EMPTY() { + return shadow(this, "EMPTY", new HTMLResult(!0, null, null, null)); + } + constructor(e, t, i, a) { + this.success = e; + this.html = t; + this.bbox = i; + this.breakNode = a; + } + isBreak() { + return !!this.breakNode; + } + static breakNode(e) { + return new HTMLResult(!1, null, null, e); + } + static success(e, t = null) { + return new HTMLResult(!0, e, t, null); + } +} +class FontFinder { + constructor(e) { + this.fonts = new Map(); + this.cache = new Map(); + this.warned = new Set(); + this.defaultFont = null; + this.add(e); + } + add(e, t = null) { + for (const t of e) this.addPdfFont(t); + for (const e of this.fonts.values()) + e.regular || (e.regular = e.italic || e.bold || e.bolditalic); + if (!t || 0 === t.size) return; + const i = this.fonts.get("PdfJS-Fallback-PdfJS-XFA"); + for (const e of t) this.fonts.set(e, i); + } + addPdfFont(e) { + const t = e.cssFontInfo, + i = t.fontFamily; + let a = this.fonts.get(i); + if (!a) { + a = Object.create(null); + this.fonts.set(i, a); + this.defaultFont || (this.defaultFont = a); + } + let s = ""; + const r = parseFloat(t.fontWeight); + 0 !== parseFloat(t.italicAngle) + ? (s = r >= 700 ? "bolditalic" : "italic") + : r >= 700 && (s = "bold"); + if (!s) { + (e.name.includes("Bold") || e.psName?.includes("Bold")) && (s = "bold"); + (e.name.includes("Italic") || + e.name.endsWith("It") || + e.psName?.includes("Italic") || + e.psName?.endsWith("It")) && + (s += "italic"); + } + s || (s = "regular"); + a[s] = e; + } + getDefault() { + return this.defaultFont; + } + find(e, t = !0) { + let i = this.fonts.get(e) || this.cache.get(e); + if (i) return i; + const a = /,|-|_| |bolditalic|bold|italic|regular|it/gi; + let s = e.replaceAll(a, ""); + i = this.fonts.get(s); + if (i) { + this.cache.set(e, i); + return i; + } + s = s.toLowerCase(); + const r = []; + for (const [e, t] of this.fonts.entries()) + e.replaceAll(a, "").toLowerCase().startsWith(s) && r.push(t); + if (0 === r.length) + for (const [, e] of this.fonts.entries()) + e.regular.name?.replaceAll(a, "").toLowerCase().startsWith(s) && + r.push(e); + if (0 === r.length) { + s = s.replaceAll(/psmt|mt/gi, ""); + for (const [e, t] of this.fonts.entries()) + e.replaceAll(a, "").toLowerCase().startsWith(s) && r.push(t); + } + if (0 === r.length) + for (const e of this.fonts.values()) + e.regular.name?.replaceAll(a, "").toLowerCase().startsWith(s) && + r.push(e); + if (r.length >= 1) { + 1 !== r.length && + t && + warn(`XFA - Too many choices to guess the correct font: ${e}`); + this.cache.set(e, r[0]); + return r[0]; + } + if (t && !this.warned.has(e)) { + this.warned.add(e); + warn(`XFA - Cannot find the font: ${e}`); + } + return null; + } +} +function selectFont(e, t) { + return "italic" === e.posture + ? "bold" === e.weight + ? t.bolditalic + : t.italic + : "bold" === e.weight + ? t.bold + : t.regular; +} +class FontInfo { + constructor(e, t, i, a) { + this.lineHeight = i; + this.paraMargin = t || { top: 0, bottom: 0, left: 0, right: 0 }; + if (!e) { + [this.pdfFont, this.xfaFont] = this.defaultFont(a); + return; + } + this.xfaFont = { + typeface: e.typeface, + posture: e.posture, + weight: e.weight, + size: e.size, + letterSpacing: e.letterSpacing, + }; + const s = a.find(e.typeface); + if (s) { + this.pdfFont = selectFont(e, s); + this.pdfFont || ([this.pdfFont, this.xfaFont] = this.defaultFont(a)); + } else [this.pdfFont, this.xfaFont] = this.defaultFont(a); + } + defaultFont(e) { + const t = + e.find("Helvetica", !1) || + e.find("Myriad Pro", !1) || + e.find("Arial", !1) || + e.getDefault(); + if (t?.regular) { + const e = t.regular; + return [ + e, + { + typeface: e.cssFontInfo.fontFamily, + posture: "normal", + weight: "normal", + size: 10, + letterSpacing: 0, + }, + ]; + } + return [ + null, + { + typeface: "Courier", + posture: "normal", + weight: "normal", + size: 10, + letterSpacing: 0, + }, + ]; + } +} +class FontSelector { + constructor(e, t, i, a) { + this.fontFinder = a; + this.stack = [new FontInfo(e, t, i, a)]; + } + pushData(e, t, i) { + const a = this.stack.at(-1); + for (const t of ["typeface", "posture", "weight", "size", "letterSpacing"]) + e[t] || (e[t] = a.xfaFont[t]); + for (const e of ["top", "bottom", "left", "right"]) + isNaN(t[e]) && (t[e] = a.paraMargin[e]); + const s = new FontInfo(e, t, i || a.lineHeight, this.fontFinder); + s.pdfFont || (s.pdfFont = a.pdfFont); + this.stack.push(s); + } + popFont() { + this.stack.pop(); + } + topFont() { + return this.stack.at(-1); + } +} +class TextMeasure { + constructor(e, t, i, a) { + this.glyphs = []; + this.fontSelector = new FontSelector(e, t, i, a); + this.extraHeight = 0; + } + pushData(e, t, i) { + this.fontSelector.pushData(e, t, i); + } + popFont(e) { + return this.fontSelector.popFont(); + } + addPara() { + const e = this.fontSelector.topFont(); + this.extraHeight += e.paraMargin.top + e.paraMargin.bottom; + } + addString(e) { + if (!e) return; + const t = this.fontSelector.topFont(), + i = t.xfaFont.size; + if (t.pdfFont) { + const a = t.xfaFont.letterSpacing, + s = t.pdfFont, + r = s.lineHeight || 1.2, + n = t.lineHeight || Math.max(1.2, r) * i, + o = r - (void 0 === s.lineGap ? 0.2 : s.lineGap), + g = Math.max(1, o) * i, + c = i / 1e3, + h = s.defaultWidth || s.charsToGlyphs(" ")[0].width; + for (const t of e.split(/[\u2029\n]/)) { + const e = s.encodeString(t).join(""), + i = s.charsToGlyphs(e); + for (const e of i) { + const t = e.width || h; + this.glyphs.push([t * c + a, n, g, e.unicode, !1]); + } + this.glyphs.push([0, 0, 0, "\n", !0]); + } + this.glyphs.pop(); + } else { + for (const t of e.split(/[\u2029\n]/)) { + for (const e of t.split("")) this.glyphs.push([i, 1.2 * i, i, e, !1]); + this.glyphs.push([0, 0, 0, "\n", !0]); + } + this.glyphs.pop(); + } + } + compute(e) { + let t = -1, + i = 0, + a = 0, + s = 0, + r = 0, + n = 0, + o = !1, + g = !0; + for (let c = 0, h = this.glyphs.length; c < h; c++) { + const [h, l, C, Q, E] = this.glyphs[c], + u = " " === Q, + d = g ? C : l; + if (E) { + a = Math.max(a, r); + r = 0; + s += n; + n = d; + t = -1; + i = 0; + g = !1; + } else if (u) + if (r + h > e) { + a = Math.max(a, r); + r = 0; + s += n; + n = d; + t = -1; + i = 0; + o = !0; + g = !1; + } else { + n = Math.max(d, n); + i = r; + r += h; + t = c; + } + else if (r + h > e) { + s += n; + n = d; + if (-1 !== t) { + c = t; + a = Math.max(a, i); + r = 0; + t = -1; + i = 0; + } else { + a = Math.max(a, r); + r = h; + } + o = !0; + g = !1; + } else { + r += h; + n = Math.max(d, n); + } + } + a = Math.max(a, r); + s += n + this.extraHeight; + return { width: 1.02 * a, height: s, isBroken: o }; + } +} +const hn = /^[^.[]+/, + ln = /^[^\]]+/, + Cn = { dot: 0, dotDot: 1, dotHash: 2, dotBracket: 3, dotParen: 4 }, + Bn = new Map([ + ["$data", (e, t) => (e.datasets ? e.datasets.data : e)], + ["$record", (e, t) => (e.datasets ? e.datasets.data : e)[Er]()[0]], + ["$template", (e, t) => e.template], + ["$connectionSet", (e, t) => e.connectionSet], + ["$form", (e, t) => e.form], + ["$layout", (e, t) => e.layout], + ["$host", (e, t) => e.host], + ["$dataWindow", (e, t) => e.dataWindow], + ["$event", (e, t) => e.event], + ["!", (e, t) => e.datasets], + ["$xfa", (e, t) => e], + ["xfa", (e, t) => e], + ["$", (e, t) => t], + ]), + Qn = new WeakMap(); +function parseExpression(e, t, i = !0) { + let a = e.match(hn); + if (!a) return null; + let [s] = a; + const r = [ + { + name: s, + cacheName: "." + s, + index: 0, + js: null, + formCalc: null, + operator: Cn.dot, + }, + ]; + let n = s.length; + for (; n < e.length; ) { + const g = n; + if ("[" === e.charAt(n++)) { + a = e.slice(n).match(ln); + if (!a) { + warn("XFA - Invalid index in SOM expression"); + return null; + } + r.at(-1).index = + "*" === (o = (o = a[0]).trim()) ? 1 / 0 : parseInt(o, 10) || 0; + n += a[0].length + 1; + continue; + } + let c; + switch (e.charAt(n)) { + case ".": + if (!t) return null; + n++; + c = Cn.dotDot; + break; + case "#": + n++; + c = Cn.dotHash; + break; + case "[": + if (i) { + warn( + "XFA - SOM expression contains a FormCalc subexpression which is not supported for now.", + ); + return null; + } + c = Cn.dotBracket; + break; + case "(": + if (i) { + warn( + "XFA - SOM expression contains a JavaScript subexpression which is not supported for now.", + ); + return null; + } + c = Cn.dotParen; + break; + default: + c = Cn.dot; + } + a = e.slice(n).match(hn); + if (!a) break; + [s] = a; + n += s.length; + r.push({ + name: s, + cacheName: e.slice(g, n), + operator: c, + index: 0, + js: null, + formCalc: null, + }); + } + var o; + return r; +} +function searchNode(e, t, i, a = !0, s = !0) { + const r = parseExpression(i, a); + if (!r) return null; + const n = Bn.get(r[0].name); + let o, + g = 0; + if (n) { + o = !0; + e = [n(e, t)]; + g = 1; + } else { + o = null === t; + e = [t || e]; + } + for (let i = r.length; g < i; g++) { + const { name: i, cacheName: a, operator: n, index: c } = r[g], + h = []; + for (const t of e) { + if (!t.isXFAObject) continue; + let e, r; + if (s) { + r = Qn.get(t); + if (!r) { + r = new Map(); + Qn.set(t, r); + } + e = r.get(a); + } + if (!e) { + switch (n) { + case Cn.dot: + e = t[cr](i, !1); + break; + case Cn.dotDot: + e = t[cr](i, !0); + break; + case Cn.dotHash: + e = t[Ir](i); + e = e.isXFAObjectArray ? e.children : [e]; + } + s && r.set(a, e); + } + e.length > 0 && h.push(e); + } + if (0 !== h.length || o || 0 !== g) + e = isFinite(c) + ? h.filter((e) => c < e.length).map((e) => e[c]) + : h.flat(); + else { + const i = t[pr](); + if (!(t = i)) return null; + g = -1; + e = [t]; + } + } + return 0 === e.length ? null : e; +} +function createDataNode(e, t, i) { + const a = parseExpression(i); + if (!a) return null; + if (a.some((e) => e.operator === Cn.dotDot)) return null; + const s = Bn.get(a[0].name); + let r = 0; + if (s) { + e = s(e, t); + r = 1; + } else e = t || e; + for (let t = a.length; r < t; r++) { + const { name: t, operator: i, index: s } = a[r]; + if (!isFinite(s)) { + a[r].index = 0; + return e.createNodes(a.slice(r)); + } + let n; + switch (i) { + case Cn.dot: + n = e[cr](t, !1); + break; + case Cn.dotDot: + n = e[cr](t, !0); + break; + case Cn.dotHash: + n = e[Ir](t); + n = n.isXFAObjectArray ? n.children : [n]; + } + if (0 === n.length) return e.createNodes(a.slice(r)); + if (!(s < n.length)) { + a[r].index = s - n.length; + return e.createNodes(a.slice(r)); + } + { + const t = n[s]; + if (!t.isXFAObject) { + warn("XFA - Cannot create a node."); + return null; + } + e = t; + } + } + return null; +} +const En = Symbol(), + un = Symbol(), + dn = Symbol(), + fn = Symbol("_children"), + pn = Symbol(), + mn = Symbol(), + yn = Symbol(), + wn = Symbol(), + bn = Symbol(), + Dn = Symbol(), + Fn = Symbol(), + Sn = Symbol(), + kn = Symbol(), + Rn = Symbol("parent"), + Nn = Symbol(), + Gn = Symbol(), + xn = Symbol(); +let Mn = 0; +const Un = gn.datasets.id; +class XFAObject { + constructor(e, t, i = !1) { + this[Hr] = e; + this[Yr] = t; + this[Fn] = i; + this[Rn] = null; + this[fn] = []; + this[nn] = `${t}${Mn++}`; + this[yr] = null; + } + get isXFAObject() { + return !0; + } + get isXFAObjectArray() { + return !1; + } + createNodes(e) { + let t = this, + i = null; + for (const { name: a, index: s } of e) { + for (let e = 0, r = isFinite(s) ? s : 0; e <= r; e++) { + const e = t[Hr] === Un ? -1 : t[Hr]; + i = new XmlObject(e, a); + t[js](i); + } + t = i; + } + return i; + } + [Kr](e) { + if (!this[Fn] || !this[Tr](e)) return !1; + const t = e[Yr], + i = this[t]; + if (!(i instanceof XFAObjectArray)) { + null !== i && this[Xr](i); + this[t] = e; + this[js](e); + return !0; + } + if (i.push(e)) { + this[js](e); + return !0; + } + let a = ""; + this.id + ? (a = ` (id: ${this.id})`) + : this.name && (a = ` (name: ${this.name} ${this.h.value})`); + warn(`XFA - node "${this[Yr]}"${a} has already enough "${t}"!`); + return !1; + } + [Tr](e) { + return this.hasOwnProperty(e[Yr]) && e[Hr] === this[Hr]; + } + [Gr]() { + return !1; + } + [Ws]() { + return !1; + } + [Sr]() { + return !1; + } + [kr]() { + return !1; + } + [Pr]() { + this.para && this[mr]()[ar].paraStack.pop(); + } + [Wr]() { + this[mr]()[ar].paraStack.push(this.para); + } + [zr](e) { + this.id && this[Hr] === gn.template.id && e.set(this.id, this); + } + [mr]() { + return this[yr].template; + } + [xr]() { + return !1; + } + [Mr]() { + return !1; + } + [js](e) { + e[Rn] = this; + this[fn].push(e); + !e[yr] && this[yr] && (e[yr] = this[yr]); + } + [Xr](e) { + const t = this[fn].indexOf(e); + this[fn].splice(t, 1); + } + [wr]() { + return this.hasOwnProperty("value"); + } + [$r](e) {} + [qr](e) {} + [sr]() {} + [Vs](e) { + delete this[Fn]; + if (this[_s]) { + e.clean(this[_s]); + delete this[_s]; + } + } + [Dr](e) { + return this[fn].indexOf(e); + } + [Fr](e, t) { + t[Rn] = this; + this[fn].splice(e, 0, t); + !t[yr] && this[yr] && (t[yr] = this[yr]); + } + [Ur]() { + return !this.name; + } + [Jr]() { + return ""; + } + [en]() { + return 0 === this[fn].length + ? this[er] + : this[fn].map((e) => e[en]()).join(""); + } + get [dn]() { + const e = Object.getPrototypeOf(this); + if (!e._attributes) { + const t = (e._attributes = new Set()); + for (const e of Object.getOwnPropertyNames(this)) { + if ( + null === this[e] || + this[e] instanceof XFAObject || + this[e] instanceof XFAObjectArray + ) + break; + t.add(e); + } + } + return shadow(this, dn, e._attributes); + } + [Nr](e) { + let t = this; + for (; t; ) { + if (t === e) return !0; + t = t[pr](); + } + return !1; + } + [pr]() { + return this[Rn]; + } + [fr]() { + return this[pr](); + } + [Er](e = null) { + return e ? this[e] : this[fn]; + } + [ir]() { + const e = Object.create(null); + this[er] && (e.$content = this[er]); + for (const t of Object.getOwnPropertyNames(this)) { + const i = this[t]; + null !== i && + (i instanceof XFAObject + ? (e[t] = i[ir]()) + : i instanceof XFAObjectArray + ? i.isEmpty() || (e[t] = i.dump()) + : (e[t] = i)); + } + return e; + } + [rn]() { + return null; + } + [an]() { + return HTMLResult.EMPTY; + } + *[ur]() { + for (const e of this[Er]()) yield e; + } + *[wn](e, t) { + for (const i of this[ur]()) + if (!e || t === e.has(i[Yr])) { + const e = this[gr](), + t = i[an](e); + t.success || (this[ar].failingNode = i); + yield t; + } + } + [rr]() { + return null; + } + [Xs](e, t) { + this[ar].children.push(e); + } + [gr]() {} + [Zs]({ filter: e = null, include: t = !0 }) { + if (this[ar].generator) { + const e = this[gr](), + t = this[ar].failingNode[an](e); + if (!t.success) return t; + t.html && this[Xs](t.html, t.bbox); + delete this[ar].failingNode; + } else this[ar].generator = this[wn](e, t); + for (;;) { + const e = this[ar].generator.next(); + if (e.done) break; + const t = e.value; + if (!t.success) return t; + t.html && this[Xs](t.html, t.bbox); + } + this[ar].generator = null; + return HTMLResult.EMPTY; + } + [_r](e) { + this[Gn] = new Set(Object.keys(e)); + } + [Dn](e) { + const t = this[dn], + i = this[Gn]; + return [...e].filter((e) => t.has(e) && !i.has(e)); + } + [Zr](e, t = new Set()) { + for (const i of this[fn]) i[Nn](e, t); + } + [Nn](e, t) { + const i = this[bn](e, t); + i ? this[En](i, e, t) : this[Zr](e, t); + } + [bn](e, t) { + const { use: i, usehref: a } = this; + if (!i && !a) return null; + let s = null, + r = null, + n = null, + o = i; + if (a) { + o = a; + a.startsWith("#som(") && a.endsWith(")") + ? (r = a.slice(5, -1)) + : a.startsWith(".#som(") && a.endsWith(")") + ? (r = a.slice(6, -1)) + : a.startsWith("#") + ? (n = a.slice(1)) + : a.startsWith(".#") && (n = a.slice(2)); + } else i.startsWith("#") ? (n = i.slice(1)) : (r = i); + this.use = this.usehref = ""; + if (n) s = e.get(n); + else { + s = searchNode(e.get(jr), this, r, !0, !1); + s && (s = s[0]); + } + if (!s) { + warn(`XFA - Invalid prototype reference: ${o}.`); + return null; + } + if (s[Yr] !== this[Yr]) { + warn(`XFA - Incompatible prototype: ${s[Yr]} !== ${this[Yr]}.`); + return null; + } + if (t.has(s)) { + warn("XFA - Cycle detected in prototypes use."); + return null; + } + t.add(s); + const g = s[bn](e, t); + g && s[En](g, e, t); + s[Zr](e, t); + t.delete(s); + return s; + } + [En](e, t, i) { + if (i.has(e)) { + warn("XFA - Cycle detected in prototypes use."); + return; + } + !this[er] && e[er] && (this[er] = e[er]); + new Set(i).add(e); + for (const t of this[Dn](e[Gn])) { + this[t] = e[t]; + this[Gn] && this[Gn].add(t); + } + for (const a of Object.getOwnPropertyNames(this)) { + if (this[dn].has(a)) continue; + const s = this[a], + r = e[a]; + if (s instanceof XFAObjectArray) { + for (const e of s[fn]) e[Nn](t, i); + for (let a = s[fn].length, n = r[fn].length; a < n; a++) { + const r = e[fn][a][$s](); + if (!s.push(r)) break; + r[Rn] = this; + this[fn].push(r); + r[Nn](t, i); + } + } else if (null === s) { + if (null !== r) { + const e = r[$s](); + e[Rn] = this; + this[a] = e; + this[fn].push(e); + e[Nn](t, i); + } + } else { + s[Zr](t, i); + r && s[En](r, t, i); + } + } + } + static [pn](e) { + return Array.isArray(e) + ? e.map((e) => XFAObject[pn](e)) + : "object" == typeof e && null !== e + ? Object.assign({}, e) + : e; + } + [$s]() { + const e = Object.create(Object.getPrototypeOf(this)); + for (const t of Object.getOwnPropertySymbols(this)) + try { + e[t] = this[t]; + } catch { + shadow(e, t, this[t]); + } + e[nn] = `${e[Yr]}${Mn++}`; + e[fn] = []; + for (const t of Object.getOwnPropertyNames(this)) { + if (this[dn].has(t)) { + e[t] = XFAObject[pn](this[t]); + continue; + } + const i = this[t]; + e[t] = i instanceof XFAObjectArray ? new XFAObjectArray(i[Sn]) : null; + } + for (const t of this[fn]) { + const i = t[Yr], + a = t[$s](); + e[fn].push(a); + a[Rn] = e; + null === e[i] ? (e[i] = a) : e[i][fn].push(a); + } + return e; + } + [Er](e = null) { + return e ? this[fn].filter((t) => t[Yr] === e) : this[fn]; + } + [Ir](e) { + return this[e]; + } + [cr](e, t, i = !0) { + return Array.from(this[hr](e, t, i)); + } + *[hr](e, t, i = !0) { + if ("parent" !== e) { + for (const i of this[fn]) { + i[Yr] === e && (yield i); + i.name === e && (yield i); + (t || i[Ur]()) && (yield* i[hr](e, t, !1)); + } + i && this[dn].has(e) && (yield new XFAAttribute(this, e, this[e])); + } else yield this[Rn]; + } +} +class XFAObjectArray { + constructor(e = 1 / 0) { + this[Sn] = e; + this[fn] = []; + } + get isXFAObject() { + return !1; + } + get isXFAObjectArray() { + return !0; + } + push(e) { + if (this[fn].length <= this[Sn]) { + this[fn].push(e); + return !0; + } + warn(`XFA - node "${e[Yr]}" accepts no more than ${this[Sn]} children`); + return !1; + } + isEmpty() { + return 0 === this[fn].length; + } + dump() { + return 1 === this[fn].length + ? this[fn][0][ir]() + : this[fn].map((e) => e[ir]()); + } + [$s]() { + const e = new XFAObjectArray(this[Sn]); + e[fn] = this[fn].map((e) => e[$s]()); + return e; + } + get children() { + return this[fn]; + } + clear() { + this[fn].length = 0; + } +} +class XFAAttribute { + constructor(e, t, i) { + this[Rn] = e; + this[Yr] = t; + this[er] = i; + this[Ar] = !1; + this[nn] = "attribute" + Mn++; + } + [pr]() { + return this[Rn]; + } + [Rr]() { + return !0; + } + [lr]() { + return this[er].trim(); + } + [$r](e) { + e = e.value || ""; + this[er] = e.toString(); + } + [en]() { + return this[er]; + } + [Nr](e) { + return this[Rn] === e || this[Rn][Nr](e); + } +} +class XmlObject extends XFAObject { + constructor(e, t, i = {}) { + super(e, t); + this[er] = ""; + this[mn] = null; + if ("#text" !== t) { + const e = new Map(); + this[un] = e; + for (const [t, a] of Object.entries(i)) + e.set(t, new XFAAttribute(this, t, a)); + if (i.hasOwnProperty(vr)) { + const e = i[vr].xfa.dataNode; + void 0 !== e && + ("dataGroup" === e + ? (this[mn] = !1) + : "dataValue" === e && (this[mn] = !0)); + } + } + this[Ar] = !1; + } + [sn](e) { + const t = this[Yr]; + if ("#text" === t) { + e.push(encodeToXmlString(this[er])); + return; + } + const i = utf8StringToString(t), + a = this[Hr] === Un ? "xfa:" : ""; + e.push(`<${a}${i}`); + for (const [t, i] of this[un].entries()) { + const a = utf8StringToString(t); + e.push(` ${a}="${encodeToXmlString(i[er])}"`); + } + null !== this[mn] && + (this[mn] + ? e.push(' xfa:dataNode="dataValue"') + : e.push(' xfa:dataNode="dataGroup"')); + if (this[er] || 0 !== this[fn].length) { + e.push(">"); + if (this[er]) + "string" == typeof this[er] + ? e.push(encodeToXmlString(this[er])) + : this[er][sn](e); + else for (const t of this[fn]) t[sn](e); + e.push(``); + } else e.push("/>"); + } + [Kr](e) { + if (this[er]) { + const e = new XmlObject(this[Hr], "#text"); + this[js](e); + e[er] = this[er]; + this[er] = ""; + } + this[js](e); + return !0; + } + [qr](e) { + this[er] += e; + } + [sr]() { + if (this[er] && this[fn].length > 0) { + const e = new XmlObject(this[Hr], "#text"); + this[js](e); + e[er] = this[er]; + delete this[er]; + } + } + [an]() { + return "#text" === this[Yr] + ? HTMLResult.success({ name: "#text", value: this[er] }) + : HTMLResult.EMPTY; + } + [Er](e = null) { + return e ? this[fn].filter((t) => t[Yr] === e) : this[fn]; + } + [or]() { + return this[un]; + } + [Ir](e) { + const t = this[un].get(e); + return void 0 !== t ? t : this[Er](e); + } + *[hr](e, t) { + const i = this[un].get(e); + i && (yield i); + for (const i of this[fn]) { + i[Yr] === e && (yield i); + t && (yield* i[hr](e, t)); + } + } + *[nr](e, t) { + const i = this[un].get(e); + !i || (t && i[Ar]) || (yield i); + for (const i of this[fn]) yield* i[nr](e, t); + } + *[Qr](e, t, i) { + for (const a of this[fn]) { + a[Yr] !== e || (i && a[Ar]) || (yield a); + t && (yield* a[Qr](e, t, i)); + } + } + [Rr]() { + return null === this[mn] + ? 0 === this[fn].length || this[fn][0][Hr] === gn.xhtml.id + : this[mn]; + } + [lr]() { + return null === this[mn] + ? 0 === this[fn].length + ? this[er].trim() + : this[fn][0][Hr] === gn.xhtml.id + ? this[fn][0][en]().trim() + : null + : this[er].trim(); + } + [$r](e) { + e = e.value || ""; + this[er] = e.toString(); + } + [ir](e = !1) { + const t = Object.create(null); + e && (t.$ns = this[Hr]); + this[er] && (t.$content = this[er]); + t.$name = this[Yr]; + t.children = []; + for (const i of this[fn]) t.children.push(i[ir](e)); + t.attributes = Object.create(null); + for (const [e, i] of this[un]) t.attributes[e] = i[er]; + return t; + } +} +class ContentObject extends XFAObject { + constructor(e, t) { + super(e, t); + this[er] = ""; + } + [qr](e) { + this[er] += e; + } + [sr]() {} +} +class OptionObject extends ContentObject { + constructor(e, t, i) { + super(e, t); + this[kn] = i; + } + [sr]() { + this[er] = getKeyword({ + data: this[er], + defaultValue: this[kn][0], + validate: (e) => this[kn].includes(e), + }); + } + [Vs](e) { + super[Vs](e); + delete this[kn]; + } +} +class StringObject extends ContentObject { + [sr]() { + this[er] = this[er].trim(); + } +} +class IntegerObject extends ContentObject { + constructor(e, t, i, a) { + super(e, t); + this[yn] = i; + this[xn] = a; + } + [sr]() { + this[er] = getInteger({ + data: this[er], + defaultValue: this[yn], + validate: this[xn], + }); + } + [Vs](e) { + super[Vs](e); + delete this[yn]; + delete this[xn]; + } +} +class Option01 extends IntegerObject { + constructor(e, t) { + super(e, t, 0, (e) => 1 === e); + } +} +class Option10 extends IntegerObject { + constructor(e, t) { + super(e, t, 1, (e) => 0 === e); + } +} +function measureToString(e) { + return "string" == typeof e + ? "0px" + : Number.isInteger(e) + ? `${e}px` + : `${e.toFixed(2)}px`; +} +const Ln = { + anchorType(e, t) { + const i = e[fr](); + if (i && (!i.layout || "position" === i.layout)) { + "transform" in t || (t.transform = ""); + switch (e.anchorType) { + case "bottomCenter": + t.transform += "translate(-50%, -100%)"; + break; + case "bottomLeft": + t.transform += "translate(0,-100%)"; + break; + case "bottomRight": + t.transform += "translate(-100%,-100%)"; + break; + case "middleCenter": + t.transform += "translate(-50%,-50%)"; + break; + case "middleLeft": + t.transform += "translate(0,-50%)"; + break; + case "middleRight": + t.transform += "translate(-100%,-50%)"; + break; + case "topCenter": + t.transform += "translate(-50%,0)"; + break; + case "topRight": + t.transform += "translate(-100%,0)"; + } + } + }, + dimensions(e, t) { + const i = e[fr](); + let a = e.w; + const s = e.h; + if (i.layout?.includes("row")) { + const t = i[ar], + s = e.colSpan; + let r; + if (-1 === s) { + r = t.columnWidths.slice(t.currentColumn).reduce((e, t) => e + t, 0); + t.currentColumn = 0; + } else { + r = t.columnWidths + .slice(t.currentColumn, t.currentColumn + s) + .reduce((e, t) => e + t, 0); + t.currentColumn = (t.currentColumn + e.colSpan) % t.columnWidths.length; + } + isNaN(r) || (a = e.w = r); + } + t.width = "" !== a ? measureToString(a) : "auto"; + t.height = "" !== s ? measureToString(s) : "auto"; + }, + position(e, t) { + const i = e[fr](); + if (!i?.layout || "position" === i.layout) { + t.position = "absolute"; + t.left = measureToString(e.x); + t.top = measureToString(e.y); + } + }, + rotate(e, t) { + if (e.rotate) { + "transform" in t || (t.transform = ""); + t.transform += `rotate(-${e.rotate}deg)`; + t.transformOrigin = "top left"; + } + }, + presence(e, t) { + switch (e.presence) { + case "invisible": + t.visibility = "hidden"; + break; + case "hidden": + case "inactive": + t.display = "none"; + } + }, + hAlign(e, t) { + if ("para" === e[Yr]) + switch (e.hAlign) { + case "justifyAll": + t.textAlign = "justify-all"; + break; + case "radix": + t.textAlign = "left"; + break; + default: + t.textAlign = e.hAlign; + } + else + switch (e.hAlign) { + case "left": + t.alignSelf = "start"; + break; + case "center": + t.alignSelf = "center"; + break; + case "right": + t.alignSelf = "end"; + } + }, + margin(e, t) { + e.margin && (t.margin = e.margin[rn]().margin); + }, +}; +function setMinMaxDimensions(e, t) { + if ("position" === e[fr]().layout) { + e.minW > 0 && (t.minWidth = measureToString(e.minW)); + e.maxW > 0 && (t.maxWidth = measureToString(e.maxW)); + e.minH > 0 && (t.minHeight = measureToString(e.minH)); + e.maxH > 0 && (t.maxHeight = measureToString(e.maxH)); + } +} +function layoutText(e, t, i, a, s, r) { + const n = new TextMeasure(t, i, a, s); + "string" == typeof e ? n.addString(e) : e[Or](n); + return n.compute(r); +} +function layoutNode(e, t) { + let i = null, + a = null, + s = !1; + if ((!e.w || !e.h) && e.value) { + let r = 0, + n = 0; + if (e.margin) { + r = e.margin.leftInset + e.margin.rightInset; + n = e.margin.topInset + e.margin.bottomInset; + } + let o = null, + g = null; + if (e.para) { + g = Object.create(null); + o = "" === e.para.lineHeight ? null : e.para.lineHeight; + g.top = "" === e.para.spaceAbove ? 0 : e.para.spaceAbove; + g.bottom = "" === e.para.spaceBelow ? 0 : e.para.spaceBelow; + g.left = "" === e.para.marginLeft ? 0 : e.para.marginLeft; + g.right = "" === e.para.marginRight ? 0 : e.para.marginRight; + } + let c = e.font; + if (!c) { + const t = e[mr](); + let i = e[pr](); + for (; i && i !== t; ) { + if (i.font) { + c = i.font; + break; + } + i = i[pr](); + } + } + const h = (e.w || t.width) - r, + l = e[yr].fontFinder; + if ( + e.value.exData && + e.value.exData[er] && + "text/html" === e.value.exData.contentType + ) { + const t = layoutText(e.value.exData[er], c, g, o, l, h); + a = t.width; + i = t.height; + s = t.isBroken; + } else { + const t = e.value[en](); + if (t) { + const e = layoutText(t, c, g, o, l, h); + a = e.width; + i = e.height; + s = e.isBroken; + } + } + null === a || e.w || (a += r); + null === i || e.h || (i += n); + } + return { w: a, h: i, isBroken: s }; +} +function computeBbox(e, t, i) { + let a; + if ("" !== e.w && "" !== e.h) a = [e.x, e.y, e.w, e.h]; + else { + if (!i) return null; + let s = e.w; + if ("" === s) { + if (0 === e.maxW) { + const t = e[fr](); + s = "position" === t.layout && "" !== t.w ? 0 : e.minW; + } else s = Math.min(e.maxW, i.width); + t.attributes.style.width = measureToString(s); + } + let r = e.h; + if ("" === r) { + if (0 === e.maxH) { + const t = e[fr](); + r = "position" === t.layout && "" !== t.h ? 0 : e.minH; + } else r = Math.min(e.maxH, i.height); + t.attributes.style.height = measureToString(r); + } + a = [e.x, e.y, s, r]; + } + return a; +} +function fixDimensions(e) { + const t = e[fr](); + if (t.layout?.includes("row")) { + const i = t[ar], + a = e.colSpan; + let s; + s = + -1 === a + ? i.columnWidths.slice(i.currentColumn).reduce((e, t) => e + t, 0) + : i.columnWidths + .slice(i.currentColumn, i.currentColumn + a) + .reduce((e, t) => e + t, 0); + isNaN(s) || (e.w = s); + } + t.layout && "position" !== t.layout && (e.x = e.y = 0); + "table" === e.layout && + "" === e.w && + Array.isArray(e.columnWidths) && + (e.w = e.columnWidths.reduce((e, t) => e + t, 0)); +} +function layoutClass(e) { + switch (e.layout) { + case "position": + default: + return "xfaPosition"; + case "lr-tb": + return "xfaLrTb"; + case "rl-row": + return "xfaRlRow"; + case "rl-tb": + return "xfaRlTb"; + case "row": + return "xfaRow"; + case "table": + return "xfaTable"; + case "tb": + return "xfaTb"; + } +} +function toStyle(e, ...t) { + const i = Object.create(null); + for (const a of t) { + const t = e[a]; + if (null !== t) + if (Ln.hasOwnProperty(a)) Ln[a](e, i); + else if (t instanceof XFAObject) { + const e = t[rn](); + e + ? Object.assign(i, e) + : warn(`(DEBUG) - XFA - style for ${a} not implemented yet`); + } + } + return i; +} +function createWrapper(e, t) { + const { attributes: i } = t, + { style: a } = i, + s = { + name: "div", + attributes: { class: ["xfaWrapper"], style: Object.create(null) }, + children: [], + }; + i.class.push("xfaWrapped"); + if (e.border) { + const { widths: i, insets: r } = e.border[ar]; + let n, + o, + g = r[0], + c = r[3]; + const h = r[0] + r[2], + l = r[1] + r[3]; + switch (e.border.hand) { + case "even": + g -= i[0] / 2; + c -= i[3] / 2; + n = `calc(100% + ${(i[1] + i[3]) / 2 - l}px)`; + o = `calc(100% + ${(i[0] + i[2]) / 2 - h}px)`; + break; + case "left": + g -= i[0]; + c -= i[3]; + n = `calc(100% + ${i[1] + i[3] - l}px)`; + o = `calc(100% + ${i[0] + i[2] - h}px)`; + break; + case "right": + n = l ? `calc(100% - ${l}px)` : "100%"; + o = h ? `calc(100% - ${h}px)` : "100%"; + } + const C = ["xfaBorder"]; + isPrintOnly(e.border) && C.push("xfaPrintOnly"); + const Q = { + name: "div", + attributes: { + class: C, + style: { top: `${g}px`, left: `${c}px`, width: n, height: o }, + }, + children: [], + }; + for (const e of [ + "border", + "borderWidth", + "borderColor", + "borderRadius", + "borderStyle", + ]) + if (void 0 !== a[e]) { + Q.attributes.style[e] = a[e]; + delete a[e]; + } + s.children.push(Q, t); + } else s.children.push(t); + for (const e of [ + "background", + "backgroundClip", + "top", + "left", + "width", + "height", + "minWidth", + "minHeight", + "maxWidth", + "maxHeight", + "transform", + "transformOrigin", + "visibility", + ]) + if (void 0 !== a[e]) { + s.attributes.style[e] = a[e]; + delete a[e]; + } + s.attributes.style.position = + "absolute" === a.position ? "absolute" : "relative"; + delete a.position; + if (a.alignSelf) { + s.attributes.style.alignSelf = a.alignSelf; + delete a.alignSelf; + } + return s; +} +function fixTextIndent(e) { + const t = getMeasurement(e.textIndent, "0px"); + if (t >= 0) return; + const i = + "padding" + + ("left" === ("right" === e.textAlign ? "right" : "left") + ? "Left" + : "Right"), + a = getMeasurement(e[i], "0px"); + e[i] = a - t + "px"; +} +function setAccess(e, t) { + switch (e.access) { + case "nonInteractive": + t.push("xfaNonInteractive"); + break; + case "readOnly": + t.push("xfaReadOnly"); + break; + case "protected": + t.push("xfaDisabled"); + } +} +function isPrintOnly(e) { + return ( + e.relevant.length > 0 && + !e.relevant[0].excluded && + "print" === e.relevant[0].viewname + ); +} +function getCurrentPara(e) { + const t = e[mr]()[ar].paraStack; + return t.length ? t.at(-1) : null; +} +function setPara(e, t, i) { + if (i.attributes.class?.includes("xfaRich")) { + if (t) { + "" === e.h && (t.height = "auto"); + "" === e.w && (t.width = "auto"); + } + const a = getCurrentPara(e); + if (a) { + const e = i.attributes.style; + e.display = "flex"; + e.flexDirection = "column"; + switch (a.vAlign) { + case "top": + e.justifyContent = "start"; + break; + case "bottom": + e.justifyContent = "end"; + break; + case "middle": + e.justifyContent = "center"; + } + const t = a[rn](); + for (const [i, a] of Object.entries(t)) i in e || (e[i] = a); + } + } +} +function setFontFamily(e, t, i, a) { + if (!i) { + delete a.fontFamily; + return; + } + const s = stripQuotes(e.typeface); + a.fontFamily = `"${s}"`; + const r = i.find(s); + if (r) { + const { fontFamily: i } = r.regular.cssFontInfo; + i !== s && (a.fontFamily = `"${i}"`); + const n = getCurrentPara(t); + if (n && "" !== n.lineHeight) return; + if (a.lineHeight) return; + const o = selectFont(e, r); + o && (a.lineHeight = Math.max(1.2, o.lineHeight)); + } +} +function fixURL(e) { + const t = createValidAbsoluteUrl(e, null, { + addDefaultProtocol: !0, + tryConvertEncoding: !0, + }); + return t ? t.href : null; +} +function createLine(e, t) { + return { + name: "div", + attributes: { class: ["lr-tb" === e.layout ? "xfaLr" : "xfaRl"] }, + children: t, + }; +} +function flushHTML(e) { + if (!e[ar]) return null; + const t = { + name: "div", + attributes: e[ar].attributes, + children: e[ar].children, + }; + if (e[ar].failingNode) { + const i = e[ar].failingNode[rr](); + i && + (e.layout.endsWith("-tb") + ? t.children.push(createLine(e, [i])) + : t.children.push(i)); + } + return 0 === t.children.length ? null : t; +} +function addHTML(e, t, i) { + const a = e[ar], + s = a.availableSpace, + [r, n, o, g] = i; + switch (e.layout) { + case "position": + a.width = Math.max(a.width, r + o); + a.height = Math.max(a.height, n + g); + a.children.push(t); + break; + case "lr-tb": + case "rl-tb": + if (!a.line || 1 === a.attempt) { + a.line = createLine(e, []); + a.children.push(a.line); + a.numberInLine = 0; + } + a.numberInLine += 1; + a.line.children.push(t); + if (0 === a.attempt) { + a.currentWidth += o; + a.height = Math.max(a.height, a.prevHeight + g); + } else { + a.currentWidth = o; + a.prevHeight = a.height; + a.height += g; + a.attempt = 0; + } + a.width = Math.max(a.width, a.currentWidth); + break; + case "rl-row": + case "row": { + a.children.push(t); + a.width += o; + a.height = Math.max(a.height, g); + const e = measureToString(a.height); + for (const t of a.children) t.attributes.style.height = e; + break; + } + case "table": + case "tb": + a.width = Math.min(s.width, Math.max(a.width, o)); + a.height += g; + a.children.push(t); + } +} +function getAvailableSpace(e) { + const t = e[ar].availableSpace, + i = e.margin ? e.margin.topInset + e.margin.bottomInset : 0, + a = e.margin ? e.margin.leftInset + e.margin.rightInset : 0; + switch (e.layout) { + case "lr-tb": + case "rl-tb": + return 0 === e[ar].attempt + ? { + width: t.width - a - e[ar].currentWidth, + height: t.height - i - e[ar].prevHeight, + } + : { width: t.width - a, height: t.height - i - e[ar].height }; + case "rl-row": + case "row": + return { + width: e[ar].columnWidths + .slice(e[ar].currentColumn) + .reduce((e, t) => e + t), + height: t.height - a, + }; + case "table": + case "tb": + return { width: t.width - a, height: t.height - i - e[ar].height }; + default: + return t; + } +} +function checkDimensions(e, t) { + if (null === e[mr]()[ar].firstUnsplittable) return !0; + if (0 === e.w || 0 === e.h) return !0; + const i = e[fr](), + a = i[ar]?.attempt || 0, + [, s, r, n] = (function getTransformedBBox(e) { + let t, + i, + a = "" === e.w ? NaN : e.w, + s = "" === e.h ? NaN : e.h, + [r, n] = [0, 0]; + switch (e.anchorType || "") { + case "bottomCenter": + [r, n] = [a / 2, s]; + break; + case "bottomLeft": + [r, n] = [0, s]; + break; + case "bottomRight": + [r, n] = [a, s]; + break; + case "middleCenter": + [r, n] = [a / 2, s / 2]; + break; + case "middleLeft": + [r, n] = [0, s / 2]; + break; + case "middleRight": + [r, n] = [a, s / 2]; + break; + case "topCenter": + [r, n] = [a / 2, 0]; + break; + case "topRight": + [r, n] = [a, 0]; + } + switch (e.rotate || 0) { + case 0: + [t, i] = [-r, -n]; + break; + case 90: + [t, i] = [-n, r]; + [a, s] = [s, -a]; + break; + case 180: + [t, i] = [r, n]; + [a, s] = [-a, -s]; + break; + case 270: + [t, i] = [n, -r]; + [a, s] = [-s, a]; + } + return [ + e.x + t + Math.min(0, a), + e.y + i + Math.min(0, s), + Math.abs(a), + Math.abs(s), + ]; + })(e); + switch (i.layout) { + case "lr-tb": + case "rl-tb": + return 0 === a + ? e[mr]()[ar].noLayoutFailure + ? "" !== e.w + ? Math.round(r - t.width) <= 2 + : t.width > 2 + : !("" !== e.h && Math.round(n - t.height) > 2) && + ("" !== e.w + ? Math.round(r - t.width) <= 2 || + (0 === i[ar].numberInLine && t.height > 2) + : t.width > 2) + : !!e[mr]()[ar].noLayoutFailure || + (!("" !== e.h && Math.round(n - t.height) > 2) && + ("" === e.w || Math.round(r - t.width) <= 2 || !i[Mr]()) && + t.height > 2); + case "table": + case "tb": + return ( + !!e[mr]()[ar].noLayoutFailure || + ("" === e.h || e[xr]() + ? ("" === e.w || Math.round(r - t.width) <= 2 || !i[Mr]()) && + t.height > 2 + : Math.round(n - t.height) <= 2) + ); + case "position": + if (e[mr]()[ar].noLayoutFailure) return !0; + if ("" === e.h || Math.round(n + s - t.height) <= 2) return !0; + return n + s > e[mr]()[ar].currentContentArea.h; + case "rl-row": + case "row": + return ( + !!e[mr]()[ar].noLayoutFailure || + "" === e.h || + Math.round(n - t.height) <= 2 + ); + default: + return !0; + } +} +const Jn = gn.template.id, + Hn = "http://www.w3.org/2000/svg", + Yn = /^H(\d+)$/, + vn = new Set([ + "image/gif", + "image/jpeg", + "image/jpg", + "image/pjpeg", + "image/png", + "image/apng", + "image/x-png", + "image/bmp", + "image/x-ms-bmp", + "image/tiff", + "image/tif", + "application/octet-stream", + ]), + Kn = [ + [[66, 77], "image/bmp"], + [[255, 216, 255], "image/jpeg"], + [[73, 73, 42, 0], "image/tiff"], + [[77, 77, 0, 42], "image/tiff"], + [[71, 73, 70, 56, 57, 97], "image/gif"], + [[137, 80, 78, 71, 13, 10, 26, 10], "image/png"], + ]; +function getBorderDims(e) { + if (!e || !e.border) return { w: 0, h: 0 }; + const t = e.border[Cr](); + return t + ? { + w: t.widths[0] + t.widths[2] + t.insets[0] + t.insets[2], + h: t.widths[1] + t.widths[3] + t.insets[1] + t.insets[3], + } + : { w: 0, h: 0 }; +} +function hasMargin(e) { + return ( + e.margin && + (e.margin.topInset || + e.margin.rightInset || + e.margin.bottomInset || + e.margin.leftInset) + ); +} +function _setValue(e, t) { + if (!e.value) { + const t = new Value({}); + e[js](t); + e.value = t; + } + e.value[$r](t); +} +function* getContainedChildren(e) { + for (const t of e[Er]()) t instanceof SubformSet ? yield* t[ur]() : yield t; +} +function isRequired(e) { + return "error" === e.validate?.nullTest; +} +function setTabIndex(e) { + for (; e; ) { + if (!e.traversal) { + e[An] = e[pr]()[An]; + return; + } + if (e[An]) return; + let t = null; + for (const i of e.traversal[Er]()) + if ("next" === i.operation) { + t = i; + break; + } + if (!t || !t.ref) { + e[An] = e[pr]()[An]; + return; + } + const i = e[mr](); + e[An] = ++i[An]; + const a = i[Vr](t.ref, e); + if (!a) return; + e = a[0]; + } +} +function applyAssist(e, t) { + const i = e.assist; + if (i) { + const e = i[an](); + e && (t.title = e); + const a = i.role.match(Yn); + if (a) { + const e = "heading", + i = a[1]; + t.role = e; + t["aria-level"] = i; + } + } + if ("table" === e.layout) t.role = "table"; + else if ("row" === e.layout) t.role = "row"; + else { + const i = e[pr](); + "row" === i.layout && + (t.role = "TH" === i.assist?.role ? "columnheader" : "cell"); + } +} +function ariaLabel(e) { + if (!e.assist) return null; + const t = e.assist; + return t.speak && "" !== t.speak[er] + ? t.speak[er] + : t.toolTip + ? t.toolTip[er] + : null; +} +function valueToHtml(e) { + return HTMLResult.success({ + name: "div", + attributes: { class: ["xfaRich"], style: Object.create(null) }, + children: [ + { name: "span", attributes: { style: Object.create(null) }, value: e }, + ], + }); +} +function setFirstUnsplittable(e) { + const t = e[mr](); + if (null === t[ar].firstUnsplittable) { + t[ar].firstUnsplittable = e; + t[ar].noLayoutFailure = !0; + } +} +function unsetFirstUnsplittable(e) { + const t = e[mr](); + t[ar].firstUnsplittable === e && (t[ar].noLayoutFailure = !1); +} +function handleBreak(e) { + if (e[ar]) return !1; + e[ar] = Object.create(null); + if ("auto" === e.targetType) return !1; + const t = e[mr](); + let i = null; + if (e.target) { + i = t[Vr](e.target, e[pr]()); + if (!i) return !1; + i = i[0]; + } + const { currentPageArea: a, currentContentArea: s } = t[ar]; + if ("pageArea" === e.targetType) { + i instanceof PageArea || (i = null); + if (e.startNew) { + e[ar].target = i || a; + return !0; + } + if (i && i !== a) { + e[ar].target = i; + return !0; + } + return !1; + } + i instanceof ContentArea || (i = null); + const r = i && i[pr](); + let n, + o = r; + if (e.startNew) + if (i) { + const e = r.contentArea.children, + t = e.indexOf(s), + a = e.indexOf(i); + -1 !== t && t < a && (o = null); + n = a - 1; + } else n = a.contentArea.children.indexOf(s); + else { + if (!i || i === s) return !1; + n = r.contentArea.children.indexOf(i) - 1; + o = r === a ? null : r; + } + e[ar].target = o; + e[ar].index = n; + return !0; +} +function handleOverflow(e, t, i) { + const a = e[mr](), + s = a[ar].noLayoutFailure, + r = t[fr]; + t[fr] = () => e; + a[ar].noLayoutFailure = !0; + const n = t[an](i); + e[Xs](n.html, n.bbox); + a[ar].noLayoutFailure = s; + t[fr] = r; +} +class AppearanceFilter extends StringObject { + constructor(e) { + super(Jn, "appearanceFilter"); + this.id = e.id || ""; + this.type = getStringOption(e.type, ["optional", "required"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class Arc extends XFAObject { + constructor(e) { + super(Jn, "arc", !0); + this.circular = getInteger({ + data: e.circular, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.hand = getStringOption(e.hand, ["even", "left", "right"]); + this.id = e.id || ""; + this.startAngle = getFloat({ + data: e.startAngle, + defaultValue: 0, + validate: (e) => !0, + }); + this.sweepAngle = getFloat({ + data: e.sweepAngle, + defaultValue: 360, + validate: (e) => !0, + }); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.edge = null; + this.fill = null; + } + [an]() { + const e = this.edge || new Edge({}), + t = e[rn](), + i = Object.create(null); + "visible" === this.fill?.presence + ? Object.assign(i, this.fill[rn]()) + : (i.fill = "transparent"); + i.strokeWidth = measureToString("visible" === e.presence ? e.thickness : 0); + i.stroke = t.color; + let a; + const s = { + xmlns: Hn, + style: { width: "100%", height: "100%", overflow: "visible" }, + }; + if (360 === this.sweepAngle) + a = { + name: "ellipse", + attributes: { + xmlns: Hn, + cx: "50%", + cy: "50%", + rx: "50%", + ry: "50%", + style: i, + }, + }; + else { + const e = (this.startAngle * Math.PI) / 180, + t = (this.sweepAngle * Math.PI) / 180, + r = this.sweepAngle > 180 ? 1 : 0, + [n, o, g, c] = [ + 50 * (1 + Math.cos(e)), + 50 * (1 - Math.sin(e)), + 50 * (1 + Math.cos(e + t)), + 50 * (1 - Math.sin(e + t)), + ]; + a = { + name: "path", + attributes: { + xmlns: Hn, + d: `M ${n} ${o} A 50 50 0 ${r} 0 ${g} ${c}`, + vectorEffect: "non-scaling-stroke", + style: i, + }, + }; + Object.assign(s, { viewBox: "0 0 100 100", preserveAspectRatio: "none" }); + } + const r = { name: "svg", children: [a], attributes: s }; + if (hasMargin(this[pr]()[pr]())) + return HTMLResult.success({ + name: "div", + attributes: { + style: { display: "inline", width: "100%", height: "100%" }, + }, + children: [r], + }); + r.attributes.style.position = "absolute"; + return HTMLResult.success(r); + } +} +class Area extends XFAObject { + constructor(e) { + super(Jn, "area", !0); + this.colSpan = getInteger({ + data: e.colSpan, + defaultValue: 1, + validate: (e) => e >= 1 || -1 === e, + }); + this.id = e.id || ""; + this.name = e.name || ""; + this.relevant = getRelevant(e.relevant); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.x = getMeasurement(e.x, "0pt"); + this.y = getMeasurement(e.y, "0pt"); + this.desc = null; + this.extras = null; + this.area = new XFAObjectArray(); + this.draw = new XFAObjectArray(); + this.exObject = new XFAObjectArray(); + this.exclGroup = new XFAObjectArray(); + this.field = new XFAObjectArray(); + this.subform = new XFAObjectArray(); + this.subformSet = new XFAObjectArray(); + } + *[ur]() { + yield* getContainedChildren(this); + } + [Ur]() { + return !0; + } + [kr]() { + return !0; + } + [Xs](e, t) { + const [i, a, s, r] = t; + this[ar].width = Math.max(this[ar].width, i + s); + this[ar].height = Math.max(this[ar].height, a + r); + this[ar].children.push(e); + } + [gr]() { + return this[ar].availableSpace; + } + [an](e) { + const t = toStyle(this, "position"), + i = { style: t, id: this[nn], class: ["xfaArea"] }; + isPrintOnly(this) && i.class.push("xfaPrintOnly"); + this.name && (i.xfaName = this.name); + const a = []; + this[ar] = { children: a, width: 0, height: 0, availableSpace: e }; + const s = this[Zs]({ + filter: new Set([ + "area", + "draw", + "field", + "exclGroup", + "subform", + "subformSet", + ]), + include: !0, + }); + if (!s.success) { + if (s.isBreak()) return s; + delete this[ar]; + return HTMLResult.FAILURE; + } + t.width = measureToString(this[ar].width); + t.height = measureToString(this[ar].height); + const r = { name: "div", attributes: i, children: a }, + n = [this.x, this.y, this[ar].width, this[ar].height]; + delete this[ar]; + return HTMLResult.success(r, n); + } +} +class Assist extends XFAObject { + constructor(e) { + super(Jn, "assist", !0); + this.id = e.id || ""; + this.role = e.role || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.speak = null; + this.toolTip = null; + } + [an]() { + return this.toolTip?.[er] || null; + } +} +class Barcode extends XFAObject { + constructor(e) { + super(Jn, "barcode", !0); + this.charEncoding = getKeyword({ + data: e.charEncoding ? e.charEncoding.toLowerCase() : "", + defaultValue: "", + validate: (e) => + [ + "utf-8", + "big-five", + "fontspecific", + "gbk", + "gb-18030", + "gb-2312", + "ksc-5601", + "none", + "shift-jis", + "ucs-2", + "utf-16", + ].includes(e) || e.match(/iso-8859-\d{2}/), + }); + this.checksum = getStringOption(e.checksum, [ + "none", + "1mod10", + "1mod10_1mod11", + "2mod10", + "auto", + ]); + this.dataColumnCount = getInteger({ + data: e.dataColumnCount, + defaultValue: -1, + validate: (e) => e >= 0, + }); + this.dataLength = getInteger({ + data: e.dataLength, + defaultValue: -1, + validate: (e) => e >= 0, + }); + this.dataPrep = getStringOption(e.dataPrep, ["none", "flateCompress"]); + this.dataRowCount = getInteger({ + data: e.dataRowCount, + defaultValue: -1, + validate: (e) => e >= 0, + }); + this.endChar = e.endChar || ""; + this.errorCorrectionLevel = getInteger({ + data: e.errorCorrectionLevel, + defaultValue: -1, + validate: (e) => e >= 0 && e <= 8, + }); + this.id = e.id || ""; + this.moduleHeight = getMeasurement(e.moduleHeight, "5mm"); + this.moduleWidth = getMeasurement(e.moduleWidth, "0.25mm"); + this.printCheckDigit = getInteger({ + data: e.printCheckDigit, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.rowColumnRatio = getRatio(e.rowColumnRatio); + this.startChar = e.startChar || ""; + this.textLocation = getStringOption(e.textLocation, [ + "below", + "above", + "aboveEmbedded", + "belowEmbedded", + "none", + ]); + this.truncate = getInteger({ + data: e.truncate, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.type = getStringOption(e.type ? e.type.toLowerCase() : "", [ + "aztec", + "codabar", + "code2of5industrial", + "code2of5interleaved", + "code2of5matrix", + "code2of5standard", + "code3of9", + "code3of9extended", + "code11", + "code49", + "code93", + "code128", + "code128a", + "code128b", + "code128c", + "code128sscc", + "datamatrix", + "ean8", + "ean8add2", + "ean8add5", + "ean13", + "ean13add2", + "ean13add5", + "ean13pwcd", + "fim", + "logmars", + "maxicode", + "msi", + "pdf417", + "pdf417macro", + "plessey", + "postauscust2", + "postauscust3", + "postausreplypaid", + "postausstandard", + "postukrm4scc", + "postusdpbc", + "postusimb", + "postusstandard", + "postus5zip", + "qrcode", + "rfid", + "rss14", + "rss14expanded", + "rss14limited", + "rss14stacked", + "rss14stackedomni", + "rss14truncated", + "telepen", + "ucc128", + "ucc128random", + "ucc128sscc", + "upca", + "upcaadd2", + "upcaadd5", + "upcapwcd", + "upce", + "upceadd2", + "upceadd5", + "upcean2", + "upcean5", + "upsmaxicode", + ]); + this.upsMode = getStringOption(e.upsMode, [ + "usCarrier", + "internationalCarrier", + "secureSymbol", + "standardSymbol", + ]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.wideNarrowRatio = getRatio(e.wideNarrowRatio); + this.encrypt = null; + this.extras = null; + } +} +class Bind extends XFAObject { + constructor(e) { + super(Jn, "bind", !0); + this.match = getStringOption(e.match, [ + "once", + "dataRef", + "global", + "none", + ]); + this.ref = e.ref || ""; + this.picture = null; + } +} +class BindItems extends XFAObject { + constructor(e) { + super(Jn, "bindItems"); + this.connection = e.connection || ""; + this.labelRef = e.labelRef || ""; + this.ref = e.ref || ""; + this.valueRef = e.valueRef || ""; + } +} +class Bookend extends XFAObject { + constructor(e) { + super(Jn, "bookend"); + this.id = e.id || ""; + this.leader = e.leader || ""; + this.trailer = e.trailer || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class BooleanElement extends Option01 { + constructor(e) { + super(Jn, "boolean"); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } + [an](e) { + return valueToHtml(1 === this[er] ? "1" : "0"); + } +} +class Border extends XFAObject { + constructor(e) { + super(Jn, "border", !0); + this.break = getStringOption(e.break, ["close", "open"]); + this.hand = getStringOption(e.hand, ["even", "left", "right"]); + this.id = e.id || ""; + this.presence = getStringOption(e.presence, [ + "visible", + "hidden", + "inactive", + "invisible", + ]); + this.relevant = getRelevant(e.relevant); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.corner = new XFAObjectArray(4); + this.edge = new XFAObjectArray(4); + this.extras = null; + this.fill = null; + this.margin = null; + } + [Cr]() { + if (!this[ar]) { + const e = this.edge.children.slice(); + if (e.length < 4) { + const t = e.at(-1) || new Edge({}); + for (let i = e.length; i < 4; i++) e.push(t); + } + const t = e.map((e) => e.thickness), + i = [0, 0, 0, 0]; + if (this.margin) { + i[0] = this.margin.topInset; + i[1] = this.margin.rightInset; + i[2] = this.margin.bottomInset; + i[3] = this.margin.leftInset; + } + this[ar] = { widths: t, insets: i, edges: e }; + } + return this[ar]; + } + [rn]() { + const { edges: e } = this[Cr](), + t = e.map((e) => { + const t = e[rn](); + t.color ||= "#000000"; + return t; + }), + i = Object.create(null); + this.margin && Object.assign(i, this.margin[rn]()); + "visible" === this.fill?.presence && Object.assign(i, this.fill[rn]()); + if (this.corner.children.some((e) => 0 !== e.radius)) { + const e = this.corner.children.map((e) => e[rn]()); + if (2 === e.length || 3 === e.length) { + const t = e.at(-1); + for (let i = e.length; i < 4; i++) e.push(t); + } + i.borderRadius = e.map((e) => e.radius).join(" "); + } + switch (this.presence) { + case "invisible": + case "hidden": + i.borderStyle = ""; + break; + case "inactive": + i.borderStyle = "none"; + break; + default: + i.borderStyle = t.map((e) => e.style).join(" "); + } + i.borderWidth = t.map((e) => e.width).join(" "); + i.borderColor = t.map((e) => e.color).join(" "); + return i; + } +} +class Break extends XFAObject { + constructor(e) { + super(Jn, "break", !0); + this.after = getStringOption(e.after, [ + "auto", + "contentArea", + "pageArea", + "pageEven", + "pageOdd", + ]); + this.afterTarget = e.afterTarget || ""; + this.before = getStringOption(e.before, [ + "auto", + "contentArea", + "pageArea", + "pageEven", + "pageOdd", + ]); + this.beforeTarget = e.beforeTarget || ""; + this.bookendLeader = e.bookendLeader || ""; + this.bookendTrailer = e.bookendTrailer || ""; + this.id = e.id || ""; + this.overflowLeader = e.overflowLeader || ""; + this.overflowTarget = e.overflowTarget || ""; + this.overflowTrailer = e.overflowTrailer || ""; + this.startNew = getInteger({ + data: e.startNew, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + } +} +class BreakAfter extends XFAObject { + constructor(e) { + super(Jn, "breakAfter", !0); + this.id = e.id || ""; + this.leader = e.leader || ""; + this.startNew = getInteger({ + data: e.startNew, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.target = e.target || ""; + this.targetType = getStringOption(e.targetType, [ + "auto", + "contentArea", + "pageArea", + ]); + this.trailer = e.trailer || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.script = null; + } +} +class BreakBefore extends XFAObject { + constructor(e) { + super(Jn, "breakBefore", !0); + this.id = e.id || ""; + this.leader = e.leader || ""; + this.startNew = getInteger({ + data: e.startNew, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.target = e.target || ""; + this.targetType = getStringOption(e.targetType, [ + "auto", + "contentArea", + "pageArea", + ]); + this.trailer = e.trailer || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.script = null; + } + [an](e) { + this[ar] = {}; + return HTMLResult.FAILURE; + } +} +class Button extends XFAObject { + constructor(e) { + super(Jn, "button", !0); + this.highlight = getStringOption(e.highlight, [ + "inverted", + "none", + "outline", + "push", + ]); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + } + [an](e) { + const t = this[pr]()[pr](), + i = { + name: "button", + attributes: { id: this[nn], class: ["xfaButton"], style: {} }, + children: [], + }; + for (const e of t.event.children) { + if ("click" !== e.activity || !e.script) continue; + const t = recoverJsURL(e.script[er]); + if (!t) continue; + const a = fixURL(t.url); + a && + i.children.push({ + name: "a", + attributes: { + id: "link" + this[nn], + href: a, + newWindow: t.newWindow, + class: ["xfaLink"], + style: {}, + }, + children: [], + }); + } + return HTMLResult.success(i); + } +} +class Calculate extends XFAObject { + constructor(e) { + super(Jn, "calculate", !0); + this.id = e.id || ""; + this.override = getStringOption(e.override, [ + "disabled", + "error", + "ignore", + "warning", + ]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + this.message = null; + this.script = null; + } +} +class Caption extends XFAObject { + constructor(e) { + super(Jn, "caption", !0); + this.id = e.id || ""; + this.placement = getStringOption(e.placement, [ + "left", + "bottom", + "inline", + "right", + "top", + ]); + this.presence = getStringOption(e.presence, [ + "visible", + "hidden", + "inactive", + "invisible", + ]); + this.reserve = Math.ceil(getMeasurement(e.reserve)); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + this.font = null; + this.margin = null; + this.para = null; + this.value = null; + } + [$r](e) { + _setValue(this, e); + } + [Cr](e) { + if (!this[ar]) { + let { width: t, height: i } = e; + switch (this.placement) { + case "left": + case "right": + case "inline": + t = this.reserve <= 0 ? t : this.reserve; + break; + case "top": + case "bottom": + i = this.reserve <= 0 ? i : this.reserve; + } + this[ar] = layoutNode(this, { width: t, height: i }); + } + return this[ar]; + } + [an](e) { + if (!this.value) return HTMLResult.EMPTY; + this[Wr](); + const t = this.value[an](e).html; + if (!t) { + this[Pr](); + return HTMLResult.EMPTY; + } + const i = this.reserve; + if (this.reserve <= 0) { + const { w: t, h: i } = this[Cr](e); + switch (this.placement) { + case "left": + case "right": + case "inline": + this.reserve = t; + break; + case "top": + case "bottom": + this.reserve = i; + } + } + const a = []; + "string" == typeof t ? a.push({ name: "#text", value: t }) : a.push(t); + const s = toStyle(this, "font", "margin", "visibility"); + switch (this.placement) { + case "left": + case "right": + this.reserve > 0 && (s.width = measureToString(this.reserve)); + break; + case "top": + case "bottom": + this.reserve > 0 && (s.height = measureToString(this.reserve)); + } + setPara(this, null, t); + this[Pr](); + this.reserve = i; + return HTMLResult.success({ + name: "div", + attributes: { style: s, class: ["xfaCaption"] }, + children: a, + }); + } +} +class Certificate extends StringObject { + constructor(e) { + super(Jn, "certificate"); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class Certificates extends XFAObject { + constructor(e) { + super(Jn, "certificates", !0); + this.credentialServerPolicy = getStringOption(e.credentialServerPolicy, [ + "optional", + "required", + ]); + this.id = e.id || ""; + this.url = e.url || ""; + this.urlPolicy = e.urlPolicy || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.encryption = null; + this.issuers = null; + this.keyUsage = null; + this.oids = null; + this.signing = null; + this.subjectDNs = null; + } +} +class CheckButton extends XFAObject { + constructor(e) { + super(Jn, "checkButton", !0); + this.id = e.id || ""; + this.mark = getStringOption(e.mark, [ + "default", + "check", + "circle", + "cross", + "diamond", + "square", + "star", + ]); + this.shape = getStringOption(e.shape, ["square", "round"]); + this.size = getMeasurement(e.size, "10pt"); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.border = null; + this.extras = null; + this.margin = null; + } + [an](e) { + const t = toStyle("margin"), + i = measureToString(this.size); + t.width = t.height = i; + let a, s, r; + const n = this[pr]()[pr](), + o = (n.items.children.length && n.items.children[0][an]().html) || [], + g = { + on: (void 0 !== o[0] ? o[0] : "on").toString(), + off: (void 0 !== o[1] ? o[1] : "off").toString(), + }, + c = (n.value?.[en]() || "off") === g.on || void 0, + h = n[fr](), + l = n[nn]; + let C; + if (h instanceof ExclGroup) { + r = h[nn]; + a = "radio"; + s = "xfaRadio"; + C = h[tr]?.[nn] || h[nn]; + } else { + a = "checkbox"; + s = "xfaCheckbox"; + C = n[tr]?.[nn] || n[nn]; + } + const Q = { + name: "input", + attributes: { + class: [s], + style: t, + fieldId: l, + dataId: C, + type: a, + checked: c, + xfaOn: g.on, + xfaOff: g.off, + "aria-label": ariaLabel(n), + "aria-required": !1, + }, + }; + r && (Q.attributes.name = r); + if (isRequired(n)) { + Q.attributes["aria-required"] = !0; + Q.attributes.required = !0; + } + return HTMLResult.success({ + name: "label", + attributes: { class: ["xfaLabel"] }, + children: [Q], + }); + } +} +class ChoiceList extends XFAObject { + constructor(e) { + super(Jn, "choiceList", !0); + this.commitOn = getStringOption(e.commitOn, ["select", "exit"]); + this.id = e.id || ""; + this.open = getStringOption(e.open, [ + "userControl", + "always", + "multiSelect", + "onEntry", + ]); + this.textEntry = getInteger({ + data: e.textEntry, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.border = null; + this.extras = null; + this.margin = null; + } + [an](e) { + const t = toStyle(this, "border", "margin"), + i = this[pr]()[pr](), + a = { fontSize: `calc(${i.font?.size || 10}px * var(--scale-factor))` }, + s = []; + if (i.items.children.length > 0) { + const e = i.items; + let t = 0, + r = 0; + if (2 === e.children.length) { + t = e.children[0].save; + r = 1 - t; + } + const n = e.children[t][an]().html, + o = e.children[r][an]().html; + let g = !1; + const c = i.value?.[en]() || ""; + for (let e = 0, t = n.length; e < t; e++) { + const t = { + name: "option", + attributes: { value: o[e] || n[e], style: a }, + value: n[e], + }; + o[e] === c && (t.attributes.selected = g = !0); + s.push(t); + } + g || + s.splice(0, 0, { + name: "option", + attributes: { hidden: !0, selected: !0 }, + value: " ", + }); + } + const r = { + class: ["xfaSelect"], + fieldId: i[nn], + dataId: i[tr]?.[nn] || i[nn], + style: t, + "aria-label": ariaLabel(i), + "aria-required": !1, + }; + if (isRequired(i)) { + r["aria-required"] = !0; + r.required = !0; + } + "multiSelect" === this.open && (r.multiple = !0); + return HTMLResult.success({ + name: "label", + attributes: { class: ["xfaLabel"] }, + children: [{ name: "select", children: s, attributes: r }], + }); + } +} +class Color extends XFAObject { + constructor(e) { + super(Jn, "color", !0); + this.cSpace = getStringOption(e.cSpace, ["SRGB"]); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.value = e.value + ? (function getColor(e, t = [0, 0, 0]) { + let [i, a, s] = t; + if (!e) return { r: i, g: a, b: s }; + const r = e + .trim() + .split(/\s*,\s*/) + .map((e) => Math.min(Math.max(0, parseInt(e.trim(), 10)), 255)) + .map((e) => (isNaN(e) ? 0 : e)); + if (r.length < 3) return { r: i, g: a, b: s }; + [i, a, s] = r; + return { r: i, g: a, b: s }; + })(e.value) + : ""; + this.extras = null; + } + [wr]() { + return !1; + } + [rn]() { + return this.value + ? Util.makeHexColor(this.value.r, this.value.g, this.value.b) + : null; + } +} +class Comb extends XFAObject { + constructor(e) { + super(Jn, "comb"); + this.id = e.id || ""; + this.numberOfCells = getInteger({ + data: e.numberOfCells, + defaultValue: 0, + validate: (e) => e >= 0, + }); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class Connect extends XFAObject { + constructor(e) { + super(Jn, "connect", !0); + this.connection = e.connection || ""; + this.id = e.id || ""; + this.ref = e.ref || ""; + this.usage = getStringOption(e.usage, [ + "exportAndImport", + "exportOnly", + "importOnly", + ]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.picture = null; + } +} +class ContentArea extends XFAObject { + constructor(e) { + super(Jn, "contentArea", !0); + this.h = getMeasurement(e.h); + this.id = e.id || ""; + this.name = e.name || ""; + this.relevant = getRelevant(e.relevant); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.w = getMeasurement(e.w); + this.x = getMeasurement(e.x, "0pt"); + this.y = getMeasurement(e.y, "0pt"); + this.desc = null; + this.extras = null; + } + [an](e) { + const t = { + left: measureToString(this.x), + top: measureToString(this.y), + width: measureToString(this.w), + height: measureToString(this.h), + }, + i = ["xfaContentarea"]; + isPrintOnly(this) && i.push("xfaPrintOnly"); + return HTMLResult.success({ + name: "div", + children: [], + attributes: { style: t, class: i, id: this[nn] }, + }); + } +} +class Corner extends XFAObject { + constructor(e) { + super(Jn, "corner", !0); + this.id = e.id || ""; + this.inverted = getInteger({ + data: e.inverted, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.join = getStringOption(e.join, ["square", "round"]); + this.presence = getStringOption(e.presence, [ + "visible", + "hidden", + "inactive", + "invisible", + ]); + this.radius = getMeasurement(e.radius); + this.stroke = getStringOption(e.stroke, [ + "solid", + "dashDot", + "dashDotDot", + "dashed", + "dotted", + "embossed", + "etched", + "lowered", + "raised", + ]); + this.thickness = getMeasurement(e.thickness, "0.5pt"); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.color = null; + this.extras = null; + } + [rn]() { + const e = toStyle(this, "visibility"); + e.radius = measureToString("square" === this.join ? 0 : this.radius); + return e; + } +} +class DateElement extends ContentObject { + constructor(e) { + super(Jn, "date"); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } + [sr]() { + const e = this[er].trim(); + this[er] = e ? new Date(e) : null; + } + [an](e) { + return valueToHtml(this[er] ? this[er].toString() : ""); + } +} +class DateTime extends ContentObject { + constructor(e) { + super(Jn, "dateTime"); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } + [sr]() { + const e = this[er].trim(); + this[er] = e ? new Date(e) : null; + } + [an](e) { + return valueToHtml(this[er] ? this[er].toString() : ""); + } +} +class DateTimeEdit extends XFAObject { + constructor(e) { + super(Jn, "dateTimeEdit", !0); + this.hScrollPolicy = getStringOption(e.hScrollPolicy, [ + "auto", + "off", + "on", + ]); + this.id = e.id || ""; + this.picker = getStringOption(e.picker, ["host", "none"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.border = null; + this.comb = null; + this.extras = null; + this.margin = null; + } + [an](e) { + const t = toStyle(this, "border", "font", "margin"), + i = this[pr]()[pr](), + a = { + name: "input", + attributes: { + type: "text", + fieldId: i[nn], + dataId: i[tr]?.[nn] || i[nn], + class: ["xfaTextfield"], + style: t, + "aria-label": ariaLabel(i), + "aria-required": !1, + }, + }; + if (isRequired(i)) { + a.attributes["aria-required"] = !0; + a.attributes.required = !0; + } + return HTMLResult.success({ + name: "label", + attributes: { class: ["xfaLabel"] }, + children: [a], + }); + } +} +class Decimal extends ContentObject { + constructor(e) { + super(Jn, "decimal"); + this.fracDigits = getInteger({ + data: e.fracDigits, + defaultValue: 2, + validate: (e) => !0, + }); + this.id = e.id || ""; + this.leadDigits = getInteger({ + data: e.leadDigits, + defaultValue: -1, + validate: (e) => !0, + }); + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } + [sr]() { + const e = parseFloat(this[er].trim()); + this[er] = isNaN(e) ? null : e; + } + [an](e) { + return valueToHtml(null !== this[er] ? this[er].toString() : ""); + } +} +class DefaultUi extends XFAObject { + constructor(e) { + super(Jn, "defaultUi", !0); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + } +} +class Desc extends XFAObject { + constructor(e) { + super(Jn, "desc", !0); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.boolean = new XFAObjectArray(); + this.date = new XFAObjectArray(); + this.dateTime = new XFAObjectArray(); + this.decimal = new XFAObjectArray(); + this.exData = new XFAObjectArray(); + this.float = new XFAObjectArray(); + this.image = new XFAObjectArray(); + this.integer = new XFAObjectArray(); + this.text = new XFAObjectArray(); + this.time = new XFAObjectArray(); + } +} +class DigestMethod extends OptionObject { + constructor(e) { + super(Jn, "digestMethod", ["", "SHA1", "SHA256", "SHA512", "RIPEMD160"]); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class DigestMethods extends XFAObject { + constructor(e) { + super(Jn, "digestMethods", !0); + this.id = e.id || ""; + this.type = getStringOption(e.type, ["optional", "required"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.digestMethod = new XFAObjectArray(); + } +} +class Draw extends XFAObject { + constructor(e) { + super(Jn, "draw", !0); + this.anchorType = getStringOption(e.anchorType, [ + "topLeft", + "bottomCenter", + "bottomLeft", + "bottomRight", + "middleCenter", + "middleLeft", + "middleRight", + "topCenter", + "topRight", + ]); + this.colSpan = getInteger({ + data: e.colSpan, + defaultValue: 1, + validate: (e) => e >= 1 || -1 === e, + }); + this.h = e.h ? getMeasurement(e.h) : ""; + this.hAlign = getStringOption(e.hAlign, [ + "left", + "center", + "justify", + "justifyAll", + "radix", + "right", + ]); + this.id = e.id || ""; + this.locale = e.locale || ""; + this.maxH = getMeasurement(e.maxH, "0pt"); + this.maxW = getMeasurement(e.maxW, "0pt"); + this.minH = getMeasurement(e.minH, "0pt"); + this.minW = getMeasurement(e.minW, "0pt"); + this.name = e.name || ""; + this.presence = getStringOption(e.presence, [ + "visible", + "hidden", + "inactive", + "invisible", + ]); + this.relevant = getRelevant(e.relevant); + this.rotate = getInteger({ + data: e.rotate, + defaultValue: 0, + validate: (e) => e % 90 == 0, + }); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.w = e.w ? getMeasurement(e.w) : ""; + this.x = getMeasurement(e.x, "0pt"); + this.y = getMeasurement(e.y, "0pt"); + this.assist = null; + this.border = null; + this.caption = null; + this.desc = null; + this.extras = null; + this.font = null; + this.keep = null; + this.margin = null; + this.para = null; + this.traversal = null; + this.ui = null; + this.value = null; + this.setProperty = new XFAObjectArray(); + } + [$r](e) { + _setValue(this, e); + } + [an](e) { + setTabIndex(this); + if ("hidden" === this.presence || "inactive" === this.presence) + return HTMLResult.EMPTY; + fixDimensions(this); + this[Wr](); + const t = this.w, + i = this.h, + { w: a, h: s, isBroken: r } = layoutNode(this, e); + if (a && "" === this.w) { + if (r && this[fr]()[Mr]()) { + this[Pr](); + return HTMLResult.FAILURE; + } + this.w = a; + } + s && "" === this.h && (this.h = s); + setFirstUnsplittable(this); + if (!checkDimensions(this, e)) { + this.w = t; + this.h = i; + this[Pr](); + return HTMLResult.FAILURE; + } + unsetFirstUnsplittable(this); + const n = toStyle( + this, + "font", + "hAlign", + "dimensions", + "position", + "presence", + "rotate", + "anchorType", + "border", + "margin", + ); + setMinMaxDimensions(this, n); + if (n.margin) { + n.padding = n.margin; + delete n.margin; + } + const o = ["xfaDraw"]; + this.font && o.push("xfaFont"); + isPrintOnly(this) && o.push("xfaPrintOnly"); + const g = { style: n, id: this[nn], class: o }; + this.name && (g.xfaName = this.name); + const c = { name: "div", attributes: g, children: [] }; + applyAssist(this, g); + const h = computeBbox(this, c, e), + l = this.value ? this.value[an](e).html : null; + if (null === l) { + this.w = t; + this.h = i; + this[Pr](); + return HTMLResult.success(createWrapper(this, c), h); + } + c.children.push(l); + setPara(this, n, l); + this.w = t; + this.h = i; + this[Pr](); + return HTMLResult.success(createWrapper(this, c), h); + } +} +class Edge extends XFAObject { + constructor(e) { + super(Jn, "edge", !0); + this.cap = getStringOption(e.cap, ["square", "butt", "round"]); + this.id = e.id || ""; + this.presence = getStringOption(e.presence, [ + "visible", + "hidden", + "inactive", + "invisible", + ]); + this.stroke = getStringOption(e.stroke, [ + "solid", + "dashDot", + "dashDotDot", + "dashed", + "dotted", + "embossed", + "etched", + "lowered", + "raised", + ]); + this.thickness = getMeasurement(e.thickness, "0.5pt"); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.color = null; + this.extras = null; + } + [rn]() { + const e = toStyle(this, "visibility"); + Object.assign(e, { + linecap: this.cap, + width: measureToString(this.thickness), + color: this.color ? this.color[rn]() : "#000000", + style: "", + }); + if ("visible" !== this.presence) e.style = "none"; + else + switch (this.stroke) { + case "solid": + e.style = "solid"; + break; + case "dashDot": + case "dashDotDot": + case "dashed": + e.style = "dashed"; + break; + case "dotted": + e.style = "dotted"; + break; + case "embossed": + e.style = "ridge"; + break; + case "etched": + e.style = "groove"; + break; + case "lowered": + e.style = "inset"; + break; + case "raised": + e.style = "outset"; + } + return e; + } +} +class Encoding extends OptionObject { + constructor(e) { + super(Jn, "encoding", [ + "adbe.x509.rsa_sha1", + "adbe.pkcs7.detached", + "adbe.pkcs7.sha1", + ]); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class Encodings extends XFAObject { + constructor(e) { + super(Jn, "encodings", !0); + this.id = e.id || ""; + this.type = getStringOption(e.type, ["optional", "required"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.encoding = new XFAObjectArray(); + } +} +class Encrypt extends XFAObject { + constructor(e) { + super(Jn, "encrypt", !0); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.certificate = null; + } +} +class EncryptData extends XFAObject { + constructor(e) { + super(Jn, "encryptData", !0); + this.id = e.id || ""; + this.operation = getStringOption(e.operation, ["encrypt", "decrypt"]); + this.target = e.target || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.filter = null; + this.manifest = null; + } +} +class Encryption extends XFAObject { + constructor(e) { + super(Jn, "encryption", !0); + this.id = e.id || ""; + this.type = getStringOption(e.type, ["optional", "required"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.certificate = new XFAObjectArray(); + } +} +class EncryptionMethod extends OptionObject { + constructor(e) { + super(Jn, "encryptionMethod", [ + "", + "AES256-CBC", + "TRIPLEDES-CBC", + "AES128-CBC", + "AES192-CBC", + ]); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class EncryptionMethods extends XFAObject { + constructor(e) { + super(Jn, "encryptionMethods", !0); + this.id = e.id || ""; + this.type = getStringOption(e.type, ["optional", "required"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.encryptionMethod = new XFAObjectArray(); + } +} +class Event extends XFAObject { + constructor(e) { + super(Jn, "event", !0); + this.activity = getStringOption(e.activity, [ + "click", + "change", + "docClose", + "docReady", + "enter", + "exit", + "full", + "indexChange", + "initialize", + "mouseDown", + "mouseEnter", + "mouseExit", + "mouseUp", + "postExecute", + "postOpen", + "postPrint", + "postSave", + "postSign", + "postSubmit", + "preExecute", + "preOpen", + "prePrint", + "preSave", + "preSign", + "preSubmit", + "ready", + "validationState", + ]); + this.id = e.id || ""; + this.listen = getStringOption(e.listen, ["refOnly", "refAndDescendents"]); + this.name = e.name || ""; + this.ref = e.ref || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + this.encryptData = null; + this.execute = null; + this.script = null; + this.signData = null; + this.submit = null; + } +} +class ExData extends ContentObject { + constructor(e) { + super(Jn, "exData"); + this.contentType = e.contentType || ""; + this.href = e.href || ""; + this.id = e.id || ""; + this.maxLength = getInteger({ + data: e.maxLength, + defaultValue: -1, + validate: (e) => e >= -1, + }); + this.name = e.name || ""; + this.rid = e.rid || ""; + this.transferEncoding = getStringOption(e.transferEncoding, [ + "none", + "base64", + "package", + ]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } + [Sr]() { + return "text/html" === this.contentType; + } + [Kr](e) { + if ("text/html" === this.contentType && e[Hr] === gn.xhtml.id) { + this[er] = e; + return !0; + } + if ("text/xml" === this.contentType) { + this[er] = e; + return !0; + } + return !1; + } + [an](e) { + return "text/html" === this.contentType && this[er] + ? this[er][an](e) + : HTMLResult.EMPTY; + } +} +class ExObject extends XFAObject { + constructor(e) { + super(Jn, "exObject", !0); + this.archive = e.archive || ""; + this.classId = e.classId || ""; + this.codeBase = e.codeBase || ""; + this.codeType = e.codeType || ""; + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + this.boolean = new XFAObjectArray(); + this.date = new XFAObjectArray(); + this.dateTime = new XFAObjectArray(); + this.decimal = new XFAObjectArray(); + this.exData = new XFAObjectArray(); + this.exObject = new XFAObjectArray(); + this.float = new XFAObjectArray(); + this.image = new XFAObjectArray(); + this.integer = new XFAObjectArray(); + this.text = new XFAObjectArray(); + this.time = new XFAObjectArray(); + } +} +class ExclGroup extends XFAObject { + constructor(e) { + super(Jn, "exclGroup", !0); + this.access = getStringOption(e.access, [ + "open", + "nonInteractive", + "protected", + "readOnly", + ]); + this.accessKey = e.accessKey || ""; + this.anchorType = getStringOption(e.anchorType, [ + "topLeft", + "bottomCenter", + "bottomLeft", + "bottomRight", + "middleCenter", + "middleLeft", + "middleRight", + "topCenter", + "topRight", + ]); + this.colSpan = getInteger({ + data: e.colSpan, + defaultValue: 1, + validate: (e) => e >= 1 || -1 === e, + }); + this.h = e.h ? getMeasurement(e.h) : ""; + this.hAlign = getStringOption(e.hAlign, [ + "left", + "center", + "justify", + "justifyAll", + "radix", + "right", + ]); + this.id = e.id || ""; + this.layout = getStringOption(e.layout, [ + "position", + "lr-tb", + "rl-row", + "rl-tb", + "row", + "table", + "tb", + ]); + this.maxH = getMeasurement(e.maxH, "0pt"); + this.maxW = getMeasurement(e.maxW, "0pt"); + this.minH = getMeasurement(e.minH, "0pt"); + this.minW = getMeasurement(e.minW, "0pt"); + this.name = e.name || ""; + this.presence = getStringOption(e.presence, [ + "visible", + "hidden", + "inactive", + "invisible", + ]); + this.relevant = getRelevant(e.relevant); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.w = e.w ? getMeasurement(e.w) : ""; + this.x = getMeasurement(e.x, "0pt"); + this.y = getMeasurement(e.y, "0pt"); + this.assist = null; + this.bind = null; + this.border = null; + this.calculate = null; + this.caption = null; + this.desc = null; + this.extras = null; + this.margin = null; + this.para = null; + this.traversal = null; + this.validate = null; + this.connect = new XFAObjectArray(); + this.event = new XFAObjectArray(); + this.field = new XFAObjectArray(); + this.setProperty = new XFAObjectArray(); + } + [kr]() { + return !0; + } + [wr]() { + return !0; + } + [$r](e) { + for (const t of this.field.children) { + if (!t.value) { + const e = new Value({}); + t[js](e); + t.value = e; + } + t.value[$r](e); + } + } + [Mr]() { + return ( + (this.layout.endsWith("-tb") && + 0 === this[ar].attempt && + this[ar].numberInLine > 0) || + this[pr]()[Mr]() + ); + } + [xr]() { + const e = this[fr](); + if (!e[xr]()) return !1; + if (void 0 !== this[ar]._isSplittable) return this[ar]._isSplittable; + if ("position" === this.layout || this.layout.includes("row")) { + this[ar]._isSplittable = !1; + return !1; + } + if (e.layout?.endsWith("-tb") && 0 !== e[ar].numberInLine) return !1; + this[ar]._isSplittable = !0; + return !0; + } + [rr]() { + return flushHTML(this); + } + [Xs](e, t) { + addHTML(this, e, t); + } + [gr]() { + return getAvailableSpace(this); + } + [an](e) { + setTabIndex(this); + if ( + "hidden" === this.presence || + "inactive" === this.presence || + 0 === this.h || + 0 === this.w + ) + return HTMLResult.EMPTY; + fixDimensions(this); + const t = [], + i = { id: this[nn], class: [] }; + setAccess(this, i.class); + this[ar] || (this[ar] = Object.create(null)); + Object.assign(this[ar], { + children: t, + attributes: i, + attempt: 0, + line: null, + numberInLine: 0, + availableSpace: { + width: Math.min(this.w || 1 / 0, e.width), + height: Math.min(this.h || 1 / 0, e.height), + }, + width: 0, + height: 0, + prevHeight: 0, + currentWidth: 0, + }); + const a = this[xr](); + a || setFirstUnsplittable(this); + if (!checkDimensions(this, e)) return HTMLResult.FAILURE; + const s = new Set(["field"]); + if (this.layout.includes("row")) { + const e = this[fr]().columnWidths; + if (Array.isArray(e) && e.length > 0) { + this[ar].columnWidths = e; + this[ar].currentColumn = 0; + } + } + const r = toStyle( + this, + "anchorType", + "dimensions", + "position", + "presence", + "border", + "margin", + "hAlign", + ), + n = ["xfaExclgroup"], + o = layoutClass(this); + o && n.push(o); + isPrintOnly(this) && n.push("xfaPrintOnly"); + i.style = r; + i.class = n; + this.name && (i.xfaName = this.name); + this[Wr](); + const g = "lr-tb" === this.layout || "rl-tb" === this.layout, + c = g ? 2 : 1; + for (; this[ar].attempt < c; this[ar].attempt++) { + g && 1 === this[ar].attempt && (this[ar].numberInLine = 0); + const e = this[Zs]({ filter: s, include: !0 }); + if (e.success) break; + if (e.isBreak()) { + this[Pr](); + return e; + } + if ( + g && + 0 === this[ar].attempt && + 0 === this[ar].numberInLine && + !this[mr]()[ar].noLayoutFailure + ) { + this[ar].attempt = c; + break; + } + } + this[Pr](); + a || unsetFirstUnsplittable(this); + if (this[ar].attempt === c) { + a || delete this[ar]; + return HTMLResult.FAILURE; + } + let h = 0, + l = 0; + if (this.margin) { + h = this.margin.leftInset + this.margin.rightInset; + l = this.margin.topInset + this.margin.bottomInset; + } + const C = Math.max(this[ar].width + h, this.w || 0), + Q = Math.max(this[ar].height + l, this.h || 0), + E = [this.x, this.y, C, Q]; + "" === this.w && (r.width = measureToString(C)); + "" === this.h && (r.height = measureToString(Q)); + const u = { name: "div", attributes: i, children: t }; + applyAssist(this, i); + delete this[ar]; + return HTMLResult.success(createWrapper(this, u), E); + } +} +class Execute extends XFAObject { + constructor(e) { + super(Jn, "execute"); + this.connection = e.connection || ""; + this.executeType = getStringOption(e.executeType, ["import", "remerge"]); + this.id = e.id || ""; + this.runAt = getStringOption(e.runAt, ["client", "both", "server"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class Extras extends XFAObject { + constructor(e) { + super(Jn, "extras", !0); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.boolean = new XFAObjectArray(); + this.date = new XFAObjectArray(); + this.dateTime = new XFAObjectArray(); + this.decimal = new XFAObjectArray(); + this.exData = new XFAObjectArray(); + this.extras = new XFAObjectArray(); + this.float = new XFAObjectArray(); + this.image = new XFAObjectArray(); + this.integer = new XFAObjectArray(); + this.text = new XFAObjectArray(); + this.time = new XFAObjectArray(); + } +} +class Field extends XFAObject { + constructor(e) { + super(Jn, "field", !0); + this.access = getStringOption(e.access, [ + "open", + "nonInteractive", + "protected", + "readOnly", + ]); + this.accessKey = e.accessKey || ""; + this.anchorType = getStringOption(e.anchorType, [ + "topLeft", + "bottomCenter", + "bottomLeft", + "bottomRight", + "middleCenter", + "middleLeft", + "middleRight", + "topCenter", + "topRight", + ]); + this.colSpan = getInteger({ + data: e.colSpan, + defaultValue: 1, + validate: (e) => e >= 1 || -1 === e, + }); + this.h = e.h ? getMeasurement(e.h) : ""; + this.hAlign = getStringOption(e.hAlign, [ + "left", + "center", + "justify", + "justifyAll", + "radix", + "right", + ]); + this.id = e.id || ""; + this.locale = e.locale || ""; + this.maxH = getMeasurement(e.maxH, "0pt"); + this.maxW = getMeasurement(e.maxW, "0pt"); + this.minH = getMeasurement(e.minH, "0pt"); + this.minW = getMeasurement(e.minW, "0pt"); + this.name = e.name || ""; + this.presence = getStringOption(e.presence, [ + "visible", + "hidden", + "inactive", + "invisible", + ]); + this.relevant = getRelevant(e.relevant); + this.rotate = getInteger({ + data: e.rotate, + defaultValue: 0, + validate: (e) => e % 90 == 0, + }); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.w = e.w ? getMeasurement(e.w) : ""; + this.x = getMeasurement(e.x, "0pt"); + this.y = getMeasurement(e.y, "0pt"); + this.assist = null; + this.bind = null; + this.border = null; + this.calculate = null; + this.caption = null; + this.desc = null; + this.extras = null; + this.font = null; + this.format = null; + this.items = new XFAObjectArray(2); + this.keep = null; + this.margin = null; + this.para = null; + this.traversal = null; + this.ui = null; + this.validate = null; + this.value = null; + this.bindItems = new XFAObjectArray(); + this.connect = new XFAObjectArray(); + this.event = new XFAObjectArray(); + this.setProperty = new XFAObjectArray(); + } + [kr]() { + return !0; + } + [$r](e) { + _setValue(this, e); + } + [an](e) { + setTabIndex(this); + if (!this.ui) { + this.ui = new Ui({}); + this.ui[yr] = this[yr]; + this[js](this.ui); + let e; + switch (this.items.children.length) { + case 0: + e = new TextEdit({}); + this.ui.textEdit = e; + break; + case 1: + e = new CheckButton({}); + this.ui.checkButton = e; + break; + case 2: + e = new ChoiceList({}); + this.ui.choiceList = e; + } + this.ui[js](e); + } + if ( + !this.ui || + "hidden" === this.presence || + "inactive" === this.presence || + 0 === this.h || + 0 === this.w + ) + return HTMLResult.EMPTY; + this.caption && delete this.caption[ar]; + this[Wr](); + const t = this.caption ? this.caption[an](e).html : null, + i = this.w, + a = this.h; + let s = 0, + r = 0; + if (this.margin) { + s = this.margin.leftInset + this.margin.rightInset; + r = this.margin.topInset + this.margin.bottomInset; + } + let n = null; + if ("" === this.w || "" === this.h) { + let t = null, + i = null, + a = 0, + o = 0; + if (this.ui.checkButton) a = o = this.ui.checkButton.size; + else { + const { w: t, h: i } = layoutNode(this, e); + if (null !== t) { + a = t; + o = i; + } else + o = (function fonts_getMetrics(e, t = !1) { + let i = null; + if (e) { + const t = stripQuotes(e.typeface), + a = e[yr].fontFinder.find(t); + i = selectFont(e, a); + } + if (!i) return { lineHeight: 12, lineGap: 2, lineNoGap: 10 }; + const a = e.size || 10, + s = i.lineHeight ? Math.max(t ? 0 : 1.2, i.lineHeight) : 1.2, + r = void 0 === i.lineGap ? 0.2 : i.lineGap; + return { + lineHeight: s * a, + lineGap: r * a, + lineNoGap: Math.max(1, s - r) * a, + }; + })(this.font, !0).lineNoGap; + } + n = getBorderDims(this.ui[Cr]()); + a += n.w; + o += n.h; + if (this.caption) { + const { w: s, h: r, isBroken: n } = this.caption[Cr](e); + if (n && this[fr]()[Mr]()) { + this[Pr](); + return HTMLResult.FAILURE; + } + t = s; + i = r; + switch (this.caption.placement) { + case "left": + case "right": + case "inline": + t += a; + break; + case "top": + case "bottom": + i += o; + } + } else { + t = a; + i = o; + } + if (t && "" === this.w) { + t += s; + this.w = Math.min( + this.maxW <= 0 ? 1 / 0 : this.maxW, + this.minW + 1 < t ? t : this.minW, + ); + } + if (i && "" === this.h) { + i += r; + this.h = Math.min( + this.maxH <= 0 ? 1 / 0 : this.maxH, + this.minH + 1 < i ? i : this.minH, + ); + } + } + this[Pr](); + fixDimensions(this); + setFirstUnsplittable(this); + if (!checkDimensions(this, e)) { + this.w = i; + this.h = a; + this[Pr](); + return HTMLResult.FAILURE; + } + unsetFirstUnsplittable(this); + const o = toStyle( + this, + "font", + "dimensions", + "position", + "rotate", + "anchorType", + "presence", + "margin", + "hAlign", + ); + setMinMaxDimensions(this, o); + const g = ["xfaField"]; + this.font && g.push("xfaFont"); + isPrintOnly(this) && g.push("xfaPrintOnly"); + const c = { style: o, id: this[nn], class: g }; + if (o.margin) { + o.padding = o.margin; + delete o.margin; + } + setAccess(this, g); + this.name && (c.xfaName = this.name); + const h = [], + l = { name: "div", attributes: c, children: h }; + applyAssist(this, c); + const C = this.border ? this.border[rn]() : null, + Q = computeBbox(this, l, e), + E = this.ui[an]().html; + if (!E) { + Object.assign(o, C); + return HTMLResult.success(createWrapper(this, l), Q); + } + this[An] && + (E.children?.[0] + ? (E.children[0].attributes.tabindex = this[An]) + : (E.attributes.tabindex = this[An])); + E.attributes.style || (E.attributes.style = Object.create(null)); + let u = null; + if (this.ui.button) { + 1 === E.children.length && ([u] = E.children.splice(0, 1)); + Object.assign(E.attributes.style, C); + } else Object.assign(o, C); + h.push(E); + if (this.value) + if (this.ui.imageEdit) E.children.push(this.value[an]().html); + else if (!this.ui.button) { + let e = ""; + if (this.value.exData) e = this.value.exData[en](); + else if (this.value.text) e = this.value.text[Cr](); + else { + const t = this.value[an]().html; + null !== t && (e = t.children[0].value); + } + this.ui.textEdit && + this.value.text?.maxChars && + (E.children[0].attributes.maxLength = this.value.text.maxChars); + if (e) { + if (this.ui.numericEdit) { + e = parseFloat(e); + e = isNaN(e) ? "" : e.toString(); + } + "textarea" === E.children[0].name + ? (E.children[0].attributes.textContent = e) + : (E.children[0].attributes.value = e); + } + } + if (!this.ui.imageEdit && E.children?.[0] && this.h) { + n = n || getBorderDims(this.ui[Cr]()); + let t = 0; + if (this.caption && ["top", "bottom"].includes(this.caption.placement)) { + t = this.caption.reserve; + t <= 0 && (t = this.caption[Cr](e).h); + const i = this.h - t - r - n.h; + E.children[0].attributes.style.height = measureToString(i); + } else E.children[0].attributes.style.height = "100%"; + } + u && E.children.push(u); + if (!t) { + E.attributes.class && E.attributes.class.push("xfaLeft"); + this.w = i; + this.h = a; + return HTMLResult.success(createWrapper(this, l), Q); + } + if (this.ui.button) { + o.padding && delete o.padding; + "div" === t.name && (t.name = "span"); + E.children.push(t); + return HTMLResult.success(l, Q); + } + this.ui.checkButton && (t.attributes.class[0] = "xfaCaptionForCheckButton"); + E.attributes.class || (E.attributes.class = []); + E.children.splice(0, 0, t); + switch (this.caption.placement) { + case "left": + case "inline": + E.attributes.class.push("xfaLeft"); + break; + case "right": + E.attributes.class.push("xfaRight"); + break; + case "top": + E.attributes.class.push("xfaTop"); + break; + case "bottom": + E.attributes.class.push("xfaBottom"); + } + this.w = i; + this.h = a; + return HTMLResult.success(createWrapper(this, l), Q); + } +} +class Fill extends XFAObject { + constructor(e) { + super(Jn, "fill", !0); + this.id = e.id || ""; + this.presence = getStringOption(e.presence, [ + "visible", + "hidden", + "inactive", + "invisible", + ]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.color = null; + this.extras = null; + this.linear = null; + this.pattern = null; + this.radial = null; + this.solid = null; + this.stipple = null; + } + [rn]() { + const e = this[pr](), + t = e[pr]()[pr](), + i = Object.create(null); + let a = "color", + s = a; + if (e instanceof Border) { + a = "background-color"; + s = "background"; + t instanceof Ui && (i.backgroundColor = "white"); + } + if (e instanceof Rectangle || e instanceof Arc) { + a = s = "fill"; + i.fill = "white"; + } + for (const e of Object.getOwnPropertyNames(this)) { + if ("extras" === e || "color" === e) continue; + const t = this[e]; + if (!(t instanceof XFAObject)) continue; + const r = t[rn](this.color); + r && (i[r.startsWith("#") ? a : s] = r); + return i; + } + if (this.color?.value) { + const e = this.color[rn](); + i[e.startsWith("#") ? a : s] = e; + } + return i; + } +} +class Filter extends XFAObject { + constructor(e) { + super(Jn, "filter", !0); + this.addRevocationInfo = getStringOption(e.addRevocationInfo, [ + "", + "required", + "optional", + "none", + ]); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.version = getInteger({ + data: this.version, + defaultValue: 5, + validate: (e) => e >= 1 && e <= 5, + }); + this.appearanceFilter = null; + this.certificates = null; + this.digestMethods = null; + this.encodings = null; + this.encryptionMethods = null; + this.handler = null; + this.lockDocument = null; + this.mdp = null; + this.reasons = null; + this.timeStamp = null; + } +} +class Float extends ContentObject { + constructor(e) { + super(Jn, "float"); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } + [sr]() { + const e = parseFloat(this[er].trim()); + this[er] = isNaN(e) ? null : e; + } + [an](e) { + return valueToHtml(null !== this[er] ? this[er].toString() : ""); + } +} +class template_Font extends XFAObject { + constructor(e) { + super(Jn, "font", !0); + this.baselineShift = getMeasurement(e.baselineShift); + this.fontHorizontalScale = getFloat({ + data: e.fontHorizontalScale, + defaultValue: 100, + validate: (e) => e >= 0, + }); + this.fontVerticalScale = getFloat({ + data: e.fontVerticalScale, + defaultValue: 100, + validate: (e) => e >= 0, + }); + this.id = e.id || ""; + this.kerningMode = getStringOption(e.kerningMode, ["none", "pair"]); + this.letterSpacing = getMeasurement(e.letterSpacing, "0"); + this.lineThrough = getInteger({ + data: e.lineThrough, + defaultValue: 0, + validate: (e) => 1 === e || 2 === e, + }); + this.lineThroughPeriod = getStringOption(e.lineThroughPeriod, [ + "all", + "word", + ]); + this.overline = getInteger({ + data: e.overline, + defaultValue: 0, + validate: (e) => 1 === e || 2 === e, + }); + this.overlinePeriod = getStringOption(e.overlinePeriod, ["all", "word"]); + this.posture = getStringOption(e.posture, ["normal", "italic"]); + this.size = getMeasurement(e.size, "10pt"); + this.typeface = e.typeface || "Courier"; + this.underline = getInteger({ + data: e.underline, + defaultValue: 0, + validate: (e) => 1 === e || 2 === e, + }); + this.underlinePeriod = getStringOption(e.underlinePeriod, ["all", "word"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.weight = getStringOption(e.weight, ["normal", "bold"]); + this.extras = null; + this.fill = null; + } + [Vs](e) { + super[Vs](e); + this[yr].usedTypefaces.add(this.typeface); + } + [rn]() { + const e = toStyle(this, "fill"), + t = e.color; + if (t) + if ("#000000" === t) delete e.color; + else if (!t.startsWith("#")) { + e.background = t; + e.backgroundClip = "text"; + e.color = "transparent"; + } + this.baselineShift && + (e.verticalAlign = measureToString(this.baselineShift)); + e.fontKerning = "none" === this.kerningMode ? "none" : "normal"; + e.letterSpacing = measureToString(this.letterSpacing); + if (0 !== this.lineThrough) { + e.textDecoration = "line-through"; + 2 === this.lineThrough && (e.textDecorationStyle = "double"); + } + if (0 !== this.overline) { + e.textDecoration = "overline"; + 2 === this.overline && (e.textDecorationStyle = "double"); + } + e.fontStyle = this.posture; + e.fontSize = measureToString(0.99 * this.size); + setFontFamily(this, this, this[yr].fontFinder, e); + if (0 !== this.underline) { + e.textDecoration = "underline"; + 2 === this.underline && (e.textDecorationStyle = "double"); + } + e.fontWeight = this.weight; + return e; + } +} +class Format extends XFAObject { + constructor(e) { + super(Jn, "format", !0); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + this.picture = null; + } +} +class Handler extends StringObject { + constructor(e) { + super(Jn, "handler"); + this.id = e.id || ""; + this.type = getStringOption(e.type, ["optional", "required"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class Hyphenation extends XFAObject { + constructor(e) { + super(Jn, "hyphenation"); + this.excludeAllCaps = getInteger({ + data: e.excludeAllCaps, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.excludeInitialCap = getInteger({ + data: e.excludeInitialCap, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.hyphenate = getInteger({ + data: e.hyphenate, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.id = e.id || ""; + this.pushCharacterCount = getInteger({ + data: e.pushCharacterCount, + defaultValue: 3, + validate: (e) => e >= 0, + }); + this.remainCharacterCount = getInteger({ + data: e.remainCharacterCount, + defaultValue: 3, + validate: (e) => e >= 0, + }); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.wordCharacterCount = getInteger({ + data: e.wordCharacterCount, + defaultValue: 7, + validate: (e) => e >= 0, + }); + } +} +class Image extends StringObject { + constructor(e) { + super(Jn, "image"); + this.aspect = getStringOption(e.aspect, [ + "fit", + "actual", + "height", + "none", + "width", + ]); + this.contentType = e.contentType || ""; + this.href = e.href || ""; + this.id = e.id || ""; + this.name = e.name || ""; + this.transferEncoding = getStringOption(e.transferEncoding, [ + "base64", + "none", + "package", + ]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } + [an]() { + if (this.contentType && !vn.has(this.contentType.toLowerCase())) + return HTMLResult.EMPTY; + let e = this[yr].images && this[yr].images.get(this.href); + if (!e && (this.href || !this[er])) return HTMLResult.EMPTY; + e || + "base64" !== this.transferEncoding || + (e = stringToBytes(atob(this[er]))); + if (!e) return HTMLResult.EMPTY; + if (!this.contentType) { + for (const [t, i] of Kn) + if (e.length > t.length && t.every((t, i) => t === e[i])) { + this.contentType = i; + break; + } + if (!this.contentType) return HTMLResult.EMPTY; + } + const t = new Blob([e], { type: this.contentType }); + let i; + switch (this.aspect) { + case "fit": + case "actual": + break; + case "height": + i = { height: "100%", objectFit: "fill" }; + break; + case "none": + i = { width: "100%", height: "100%", objectFit: "fill" }; + break; + case "width": + i = { width: "100%", objectFit: "fill" }; + } + const a = this[pr](); + return HTMLResult.success({ + name: "img", + attributes: { + class: ["xfaImage"], + style: i, + src: URL.createObjectURL(t), + alt: a ? ariaLabel(a[pr]()) : null, + }, + }); + } +} +class ImageEdit extends XFAObject { + constructor(e) { + super(Jn, "imageEdit", !0); + this.data = getStringOption(e.data, ["link", "embed"]); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.border = null; + this.extras = null; + this.margin = null; + } + [an](e) { + return "embed" === this.data + ? HTMLResult.success({ name: "div", children: [], attributes: {} }) + : HTMLResult.EMPTY; + } +} +class Integer extends ContentObject { + constructor(e) { + super(Jn, "integer"); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } + [sr]() { + const e = parseInt(this[er].trim(), 10); + this[er] = isNaN(e) ? null : e; + } + [an](e) { + return valueToHtml(null !== this[er] ? this[er].toString() : ""); + } +} +class Issuers extends XFAObject { + constructor(e) { + super(Jn, "issuers", !0); + this.id = e.id || ""; + this.type = getStringOption(e.type, ["optional", "required"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.certificate = new XFAObjectArray(); + } +} +class Items extends XFAObject { + constructor(e) { + super(Jn, "items", !0); + this.id = e.id || ""; + this.name = e.name || ""; + this.presence = getStringOption(e.presence, [ + "visible", + "hidden", + "inactive", + "invisible", + ]); + this.ref = e.ref || ""; + this.save = getInteger({ + data: e.save, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.boolean = new XFAObjectArray(); + this.date = new XFAObjectArray(); + this.dateTime = new XFAObjectArray(); + this.decimal = new XFAObjectArray(); + this.exData = new XFAObjectArray(); + this.float = new XFAObjectArray(); + this.image = new XFAObjectArray(); + this.integer = new XFAObjectArray(); + this.text = new XFAObjectArray(); + this.time = new XFAObjectArray(); + } + [an]() { + const e = []; + for (const t of this[Er]()) e.push(t[en]()); + return HTMLResult.success(e); + } +} +class Keep extends XFAObject { + constructor(e) { + super(Jn, "keep", !0); + this.id = e.id || ""; + const t = ["none", "contentArea", "pageArea"]; + this.intact = getStringOption(e.intact, t); + this.next = getStringOption(e.next, t); + this.previous = getStringOption(e.previous, t); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + } +} +class KeyUsage extends XFAObject { + constructor(e) { + super(Jn, "keyUsage"); + const t = ["", "yes", "no"]; + this.crlSign = getStringOption(e.crlSign, t); + this.dataEncipherment = getStringOption(e.dataEncipherment, t); + this.decipherOnly = getStringOption(e.decipherOnly, t); + this.digitalSignature = getStringOption(e.digitalSignature, t); + this.encipherOnly = getStringOption(e.encipherOnly, t); + this.id = e.id || ""; + this.keyAgreement = getStringOption(e.keyAgreement, t); + this.keyCertSign = getStringOption(e.keyCertSign, t); + this.keyEncipherment = getStringOption(e.keyEncipherment, t); + this.nonRepudiation = getStringOption(e.nonRepudiation, t); + this.type = getStringOption(e.type, ["optional", "required"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class Line extends XFAObject { + constructor(e) { + super(Jn, "line", !0); + this.hand = getStringOption(e.hand, ["even", "left", "right"]); + this.id = e.id || ""; + this.slope = getStringOption(e.slope, ["\\", "/"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.edge = null; + } + [an]() { + const e = this[pr]()[pr](), + t = this.edge || new Edge({}), + i = t[rn](), + a = Object.create(null), + s = "visible" === t.presence ? t.thickness : 0; + a.strokeWidth = measureToString(s); + a.stroke = i.color; + let r, + n, + o, + g, + c = "100%", + h = "100%"; + if (e.w <= s) { + [r, n, o, g] = ["50%", 0, "50%", "100%"]; + c = a.strokeWidth; + } else if (e.h <= s) { + [r, n, o, g] = [0, "50%", "100%", "50%"]; + h = a.strokeWidth; + } else + "\\" === this.slope + ? ([r, n, o, g] = [0, 0, "100%", "100%"]) + : ([r, n, o, g] = [0, "100%", "100%", 0]); + const l = { + name: "svg", + children: [ + { + name: "line", + attributes: { xmlns: Hn, x1: r, y1: n, x2: o, y2: g, style: a }, + }, + ], + attributes: { + xmlns: Hn, + width: c, + height: h, + style: { overflow: "visible" }, + }, + }; + if (hasMargin(e)) + return HTMLResult.success({ + name: "div", + attributes: { + style: { display: "inline", width: "100%", height: "100%" }, + }, + children: [l], + }); + l.attributes.style.position = "absolute"; + return HTMLResult.success(l); + } +} +class Linear extends XFAObject { + constructor(e) { + super(Jn, "linear", !0); + this.id = e.id || ""; + this.type = getStringOption(e.type, [ + "toRight", + "toBottom", + "toLeft", + "toTop", + ]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.color = null; + this.extras = null; + } + [rn](e) { + e = e ? e[rn]() : "#FFFFFF"; + return `linear-gradient(${this.type.replace(/([RBLT])/, " $1").toLowerCase()}, ${e}, ${this.color ? this.color[rn]() : "#000000"})`; + } +} +class LockDocument extends ContentObject { + constructor(e) { + super(Jn, "lockDocument"); + this.id = e.id || ""; + this.type = getStringOption(e.type, ["optional", "required"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } + [sr]() { + this[er] = getStringOption(this[er], ["auto", "0", "1"]); + } +} +class Manifest extends XFAObject { + constructor(e) { + super(Jn, "manifest", !0); + this.action = getStringOption(e.action, ["include", "all", "exclude"]); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + this.ref = new XFAObjectArray(); + } +} +class Margin extends XFAObject { + constructor(e) { + super(Jn, "margin", !0); + this.bottomInset = getMeasurement(e.bottomInset, "0"); + this.id = e.id || ""; + this.leftInset = getMeasurement(e.leftInset, "0"); + this.rightInset = getMeasurement(e.rightInset, "0"); + this.topInset = getMeasurement(e.topInset, "0"); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + } + [rn]() { + return { + margin: + measureToString(this.topInset) + + " " + + measureToString(this.rightInset) + + " " + + measureToString(this.bottomInset) + + " " + + measureToString(this.leftInset), + }; + } +} +class Mdp extends XFAObject { + constructor(e) { + super(Jn, "mdp"); + this.id = e.id || ""; + this.permissions = getInteger({ + data: e.permissions, + defaultValue: 2, + validate: (e) => 1 === e || 3 === e, + }); + this.signatureType = getStringOption(e.signatureType, ["filler", "author"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class Medium extends XFAObject { + constructor(e) { + super(Jn, "medium"); + this.id = e.id || ""; + this.imagingBBox = (function getBBox(e) { + const t = -1; + if (!e) return { x: t, y: t, width: t, height: t }; + const i = e + .trim() + .split(/\s*,\s*/) + .map((e) => getMeasurement(e, "-1")); + if (i.length < 4 || i[2] < 0 || i[3] < 0) + return { x: t, y: t, width: t, height: t }; + const [a, s, r, n] = i; + return { x: a, y: s, width: r, height: n }; + })(e.imagingBBox); + this.long = getMeasurement(e.long); + this.orientation = getStringOption(e.orientation, [ + "portrait", + "landscape", + ]); + this.short = getMeasurement(e.short); + this.stock = e.stock || ""; + this.trayIn = getStringOption(e.trayIn, ["auto", "delegate", "pageFront"]); + this.trayOut = getStringOption(e.trayOut, ["auto", "delegate"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class Message extends XFAObject { + constructor(e) { + super(Jn, "message", !0); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.text = new XFAObjectArray(); + } +} +class NumericEdit extends XFAObject { + constructor(e) { + super(Jn, "numericEdit", !0); + this.hScrollPolicy = getStringOption(e.hScrollPolicy, [ + "auto", + "off", + "on", + ]); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.border = null; + this.comb = null; + this.extras = null; + this.margin = null; + } + [an](e) { + const t = toStyle(this, "border", "font", "margin"), + i = this[pr]()[pr](), + a = { + name: "input", + attributes: { + type: "text", + fieldId: i[nn], + dataId: i[tr]?.[nn] || i[nn], + class: ["xfaTextfield"], + style: t, + "aria-label": ariaLabel(i), + "aria-required": !1, + }, + }; + if (isRequired(i)) { + a.attributes["aria-required"] = !0; + a.attributes.required = !0; + } + return HTMLResult.success({ + name: "label", + attributes: { class: ["xfaLabel"] }, + children: [a], + }); + } +} +class Occur extends XFAObject { + constructor(e) { + super(Jn, "occur", !0); + this.id = e.id || ""; + this.initial = + "" !== e.initial + ? getInteger({ data: e.initial, defaultValue: "", validate: (e) => !0 }) + : ""; + this.max = + "" !== e.max + ? getInteger({ data: e.max, defaultValue: 1, validate: (e) => !0 }) + : ""; + this.min = + "" !== e.min + ? getInteger({ data: e.min, defaultValue: 1, validate: (e) => !0 }) + : ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + } + [Vs]() { + const e = this[pr](), + t = this.min; + "" === this.min && + (this.min = e instanceof PageArea || e instanceof PageSet ? 0 : 1); + "" === this.max && + (this.max = + "" === t + ? e instanceof PageArea || e instanceof PageSet + ? -1 + : 1 + : this.min); + -1 !== this.max && this.max < this.min && (this.max = this.min); + "" === this.initial && + (this.initial = e instanceof Template ? 1 : this.min); + } +} +class Oid extends StringObject { + constructor(e) { + super(Jn, "oid"); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class Oids extends XFAObject { + constructor(e) { + super(Jn, "oids", !0); + this.id = e.id || ""; + this.type = getStringOption(e.type, ["optional", "required"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.oid = new XFAObjectArray(); + } +} +class Overflow extends XFAObject { + constructor(e) { + super(Jn, "overflow"); + this.id = e.id || ""; + this.leader = e.leader || ""; + this.target = e.target || ""; + this.trailer = e.trailer || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } + [Cr]() { + if (!this[ar]) { + const e = this[pr](), + t = this[mr](), + i = t[Vr](this.target, e), + a = t[Vr](this.leader, e), + s = t[Vr](this.trailer, e); + this[ar] = { + target: i?.[0] || null, + leader: a?.[0] || null, + trailer: s?.[0] || null, + addLeader: !1, + addTrailer: !1, + }; + } + return this[ar]; + } +} +class PageArea extends XFAObject { + constructor(e) { + super(Jn, "pageArea", !0); + this.blankOrNotBlank = getStringOption(e.blankOrNotBlank, [ + "any", + "blank", + "notBlank", + ]); + this.id = e.id || ""; + this.initialNumber = getInteger({ + data: e.initialNumber, + defaultValue: 1, + validate: (e) => !0, + }); + this.name = e.name || ""; + this.numbered = getInteger({ + data: e.numbered, + defaultValue: 1, + validate: (e) => !0, + }); + this.oddOrEven = getStringOption(e.oddOrEven, ["any", "even", "odd"]); + this.pagePosition = getStringOption(e.pagePosition, [ + "any", + "first", + "last", + "only", + "rest", + ]); + this.relevant = getRelevant(e.relevant); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.desc = null; + this.extras = null; + this.medium = null; + this.occur = null; + this.area = new XFAObjectArray(); + this.contentArea = new XFAObjectArray(); + this.draw = new XFAObjectArray(); + this.exclGroup = new XFAObjectArray(); + this.field = new XFAObjectArray(); + this.subform = new XFAObjectArray(); + } + [Lr]() { + if (!this[ar]) { + this[ar] = { numberOfUse: 0 }; + return !0; + } + return ( + !this.occur || + -1 === this.occur.max || + this[ar].numberOfUse < this.occur.max + ); + } + [zs]() { + delete this[ar]; + } + [dr]() { + this[ar] || (this[ar] = { numberOfUse: 0 }); + const e = this[pr](); + if ("orderedOccurrence" === e.relation && this[Lr]()) { + this[ar].numberOfUse += 1; + return this; + } + return e[dr](); + } + [gr]() { + return this[ar].space || { width: 0, height: 0 }; + } + [an]() { + this[ar] || (this[ar] = { numberOfUse: 1 }); + const e = []; + this[ar].children = e; + const t = Object.create(null); + if (this.medium && this.medium.short && this.medium.long) { + t.width = measureToString(this.medium.short); + t.height = measureToString(this.medium.long); + this[ar].space = { width: this.medium.short, height: this.medium.long }; + if ("landscape" === this.medium.orientation) { + const e = t.width; + t.width = t.height; + t.height = e; + this[ar].space = { width: this.medium.long, height: this.medium.short }; + } + } else warn("XFA - No medium specified in pageArea: please file a bug."); + this[Zs]({ + filter: new Set(["area", "draw", "field", "subform"]), + include: !0, + }); + this[Zs]({ filter: new Set(["contentArea"]), include: !0 }); + return HTMLResult.success({ + name: "div", + children: e, + attributes: { + class: ["xfaPage"], + id: this[nn], + style: t, + xfaName: this.name, + }, + }); + } +} +class PageSet extends XFAObject { + constructor(e) { + super(Jn, "pageSet", !0); + this.duplexImposition = getStringOption(e.duplexImposition, [ + "longEdge", + "shortEdge", + ]); + this.id = e.id || ""; + this.name = e.name || ""; + this.relation = getStringOption(e.relation, [ + "orderedOccurrence", + "duplexPaginated", + "simplexPaginated", + ]); + this.relevant = getRelevant(e.relevant); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + this.occur = null; + this.pageArea = new XFAObjectArray(); + this.pageSet = new XFAObjectArray(); + } + [zs]() { + for (const e of this.pageArea.children) e[zs](); + for (const e of this.pageSet.children) e[zs](); + } + [Lr]() { + return ( + !this.occur || + -1 === this.occur.max || + this[ar].numberOfUse < this.occur.max + ); + } + [dr]() { + this[ar] || + (this[ar] = { numberOfUse: 1, pageIndex: -1, pageSetIndex: -1 }); + if ("orderedOccurrence" === this.relation) { + if (this[ar].pageIndex + 1 < this.pageArea.children.length) { + this[ar].pageIndex += 1; + return this.pageArea.children[this[ar].pageIndex][dr](); + } + if (this[ar].pageSetIndex + 1 < this.pageSet.children.length) { + this[ar].pageSetIndex += 1; + return this.pageSet.children[this[ar].pageSetIndex][dr](); + } + if (this[Lr]()) { + this[ar].numberOfUse += 1; + this[ar].pageIndex = -1; + this[ar].pageSetIndex = -1; + return this[dr](); + } + const e = this[pr](); + if (e instanceof PageSet) return e[dr](); + this[zs](); + return this[dr](); + } + const e = this[mr]()[ar].pageNumber, + t = e % 2 == 0 ? "even" : "odd", + i = 0 === e ? "first" : "rest"; + let a = this.pageArea.children.find( + (e) => e.oddOrEven === t && e.pagePosition === i, + ); + if (a) return a; + a = this.pageArea.children.find( + (e) => "any" === e.oddOrEven && e.pagePosition === i, + ); + if (a) return a; + a = this.pageArea.children.find( + (e) => "any" === e.oddOrEven && "any" === e.pagePosition, + ); + return a || this.pageArea.children[0]; + } +} +class Para extends XFAObject { + constructor(e) { + super(Jn, "para", !0); + this.hAlign = getStringOption(e.hAlign, [ + "left", + "center", + "justify", + "justifyAll", + "radix", + "right", + ]); + this.id = e.id || ""; + this.lineHeight = e.lineHeight ? getMeasurement(e.lineHeight, "0pt") : ""; + this.marginLeft = e.marginLeft ? getMeasurement(e.marginLeft, "0pt") : ""; + this.marginRight = e.marginRight + ? getMeasurement(e.marginRight, "0pt") + : ""; + this.orphans = getInteger({ + data: e.orphans, + defaultValue: 0, + validate: (e) => e >= 0, + }); + this.preserve = e.preserve || ""; + this.radixOffset = e.radixOffset + ? getMeasurement(e.radixOffset, "0pt") + : ""; + this.spaceAbove = e.spaceAbove ? getMeasurement(e.spaceAbove, "0pt") : ""; + this.spaceBelow = e.spaceBelow ? getMeasurement(e.spaceBelow, "0pt") : ""; + this.tabDefault = e.tabDefault ? getMeasurement(this.tabDefault) : ""; + this.tabStops = (e.tabStops || "") + .trim() + .split(/\s+/) + .map((e, t) => (t % 2 == 1 ? getMeasurement(e) : e)); + this.textIndent = e.textIndent ? getMeasurement(e.textIndent, "0pt") : ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.vAlign = getStringOption(e.vAlign, ["top", "bottom", "middle"]); + this.widows = getInteger({ + data: e.widows, + defaultValue: 0, + validate: (e) => e >= 0, + }); + this.hyphenation = null; + } + [rn]() { + const e = toStyle(this, "hAlign"); + "" !== this.marginLeft && + (e.paddingLeft = measureToString(this.marginLeft)); + "" !== this.marginRight && + (e.paddingight = measureToString(this.marginRight)); + "" !== this.spaceAbove && (e.paddingTop = measureToString(this.spaceAbove)); + "" !== this.spaceBelow && + (e.paddingBottom = measureToString(this.spaceBelow)); + if ("" !== this.textIndent) { + e.textIndent = measureToString(this.textIndent); + fixTextIndent(e); + } + this.lineHeight > 0 && (e.lineHeight = measureToString(this.lineHeight)); + "" !== this.tabDefault && (e.tabSize = measureToString(this.tabDefault)); + this.tabStops.length; + this.hyphenatation && Object.assign(e, this.hyphenatation[rn]()); + return e; + } +} +class PasswordEdit extends XFAObject { + constructor(e) { + super(Jn, "passwordEdit", !0); + this.hScrollPolicy = getStringOption(e.hScrollPolicy, [ + "auto", + "off", + "on", + ]); + this.id = e.id || ""; + this.passwordChar = e.passwordChar || "*"; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.border = null; + this.extras = null; + this.margin = null; + } +} +class template_Pattern extends XFAObject { + constructor(e) { + super(Jn, "pattern", !0); + this.id = e.id || ""; + this.type = getStringOption(e.type, [ + "crossHatch", + "crossDiagonal", + "diagonalLeft", + "diagonalRight", + "horizontal", + "vertical", + ]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.color = null; + this.extras = null; + } + [rn](e) { + e = e ? e[rn]() : "#FFFFFF"; + const t = this.color ? this.color[rn]() : "#000000", + i = "repeating-linear-gradient", + a = `${e},${e} 5px,${t} 5px,${t} 10px`; + switch (this.type) { + case "crossHatch": + return `${i}(to top,${a}) ${i}(to right,${a})`; + case "crossDiagonal": + return `${i}(45deg,${a}) ${i}(-45deg,${a})`; + case "diagonalLeft": + return `${i}(45deg,${a})`; + case "diagonalRight": + return `${i}(-45deg,${a})`; + case "horizontal": + return `${i}(to top,${a})`; + case "vertical": + return `${i}(to right,${a})`; + } + return ""; + } +} +class Picture extends StringObject { + constructor(e) { + super(Jn, "picture"); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class Proto extends XFAObject { + constructor(e) { + super(Jn, "proto", !0); + this.appearanceFilter = new XFAObjectArray(); + this.arc = new XFAObjectArray(); + this.area = new XFAObjectArray(); + this.assist = new XFAObjectArray(); + this.barcode = new XFAObjectArray(); + this.bindItems = new XFAObjectArray(); + this.bookend = new XFAObjectArray(); + this.boolean = new XFAObjectArray(); + this.border = new XFAObjectArray(); + this.break = new XFAObjectArray(); + this.breakAfter = new XFAObjectArray(); + this.breakBefore = new XFAObjectArray(); + this.button = new XFAObjectArray(); + this.calculate = new XFAObjectArray(); + this.caption = new XFAObjectArray(); + this.certificate = new XFAObjectArray(); + this.certificates = new XFAObjectArray(); + this.checkButton = new XFAObjectArray(); + this.choiceList = new XFAObjectArray(); + this.color = new XFAObjectArray(); + this.comb = new XFAObjectArray(); + this.connect = new XFAObjectArray(); + this.contentArea = new XFAObjectArray(); + this.corner = new XFAObjectArray(); + this.date = new XFAObjectArray(); + this.dateTime = new XFAObjectArray(); + this.dateTimeEdit = new XFAObjectArray(); + this.decimal = new XFAObjectArray(); + this.defaultUi = new XFAObjectArray(); + this.desc = new XFAObjectArray(); + this.digestMethod = new XFAObjectArray(); + this.digestMethods = new XFAObjectArray(); + this.draw = new XFAObjectArray(); + this.edge = new XFAObjectArray(); + this.encoding = new XFAObjectArray(); + this.encodings = new XFAObjectArray(); + this.encrypt = new XFAObjectArray(); + this.encryptData = new XFAObjectArray(); + this.encryption = new XFAObjectArray(); + this.encryptionMethod = new XFAObjectArray(); + this.encryptionMethods = new XFAObjectArray(); + this.event = new XFAObjectArray(); + this.exData = new XFAObjectArray(); + this.exObject = new XFAObjectArray(); + this.exclGroup = new XFAObjectArray(); + this.execute = new XFAObjectArray(); + this.extras = new XFAObjectArray(); + this.field = new XFAObjectArray(); + this.fill = new XFAObjectArray(); + this.filter = new XFAObjectArray(); + this.float = new XFAObjectArray(); + this.font = new XFAObjectArray(); + this.format = new XFAObjectArray(); + this.handler = new XFAObjectArray(); + this.hyphenation = new XFAObjectArray(); + this.image = new XFAObjectArray(); + this.imageEdit = new XFAObjectArray(); + this.integer = new XFAObjectArray(); + this.issuers = new XFAObjectArray(); + this.items = new XFAObjectArray(); + this.keep = new XFAObjectArray(); + this.keyUsage = new XFAObjectArray(); + this.line = new XFAObjectArray(); + this.linear = new XFAObjectArray(); + this.lockDocument = new XFAObjectArray(); + this.manifest = new XFAObjectArray(); + this.margin = new XFAObjectArray(); + this.mdp = new XFAObjectArray(); + this.medium = new XFAObjectArray(); + this.message = new XFAObjectArray(); + this.numericEdit = new XFAObjectArray(); + this.occur = new XFAObjectArray(); + this.oid = new XFAObjectArray(); + this.oids = new XFAObjectArray(); + this.overflow = new XFAObjectArray(); + this.pageArea = new XFAObjectArray(); + this.pageSet = new XFAObjectArray(); + this.para = new XFAObjectArray(); + this.passwordEdit = new XFAObjectArray(); + this.pattern = new XFAObjectArray(); + this.picture = new XFAObjectArray(); + this.radial = new XFAObjectArray(); + this.reason = new XFAObjectArray(); + this.reasons = new XFAObjectArray(); + this.rectangle = new XFAObjectArray(); + this.ref = new XFAObjectArray(); + this.script = new XFAObjectArray(); + this.setProperty = new XFAObjectArray(); + this.signData = new XFAObjectArray(); + this.signature = new XFAObjectArray(); + this.signing = new XFAObjectArray(); + this.solid = new XFAObjectArray(); + this.speak = new XFAObjectArray(); + this.stipple = new XFAObjectArray(); + this.subform = new XFAObjectArray(); + this.subformSet = new XFAObjectArray(); + this.subjectDN = new XFAObjectArray(); + this.subjectDNs = new XFAObjectArray(); + this.submit = new XFAObjectArray(); + this.text = new XFAObjectArray(); + this.textEdit = new XFAObjectArray(); + this.time = new XFAObjectArray(); + this.timeStamp = new XFAObjectArray(); + this.toolTip = new XFAObjectArray(); + this.traversal = new XFAObjectArray(); + this.traverse = new XFAObjectArray(); + this.ui = new XFAObjectArray(); + this.validate = new XFAObjectArray(); + this.value = new XFAObjectArray(); + this.variables = new XFAObjectArray(); + } +} +class Radial extends XFAObject { + constructor(e) { + super(Jn, "radial", !0); + this.id = e.id || ""; + this.type = getStringOption(e.type, ["toEdge", "toCenter"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.color = null; + this.extras = null; + } + [rn](e) { + e = e ? e[rn]() : "#FFFFFF"; + const t = this.color ? this.color[rn]() : "#000000"; + return `radial-gradient(circle at center, ${"toEdge" === this.type ? `${e},${t}` : `${t},${e}`})`; + } +} +class Reason extends StringObject { + constructor(e) { + super(Jn, "reason"); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class Reasons extends XFAObject { + constructor(e) { + super(Jn, "reasons", !0); + this.id = e.id || ""; + this.type = getStringOption(e.type, ["optional", "required"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.reason = new XFAObjectArray(); + } +} +class Rectangle extends XFAObject { + constructor(e) { + super(Jn, "rectangle", !0); + this.hand = getStringOption(e.hand, ["even", "left", "right"]); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.corner = new XFAObjectArray(4); + this.edge = new XFAObjectArray(4); + this.fill = null; + } + [an]() { + const e = this.edge.children.length ? this.edge.children[0] : new Edge({}), + t = e[rn](), + i = Object.create(null); + "visible" === this.fill?.presence + ? Object.assign(i, this.fill[rn]()) + : (i.fill = "transparent"); + i.strokeWidth = measureToString("visible" === e.presence ? e.thickness : 0); + i.stroke = t.color; + const a = ( + this.corner.children.length ? this.corner.children[0] : new Corner({}) + )[rn](), + s = { + name: "svg", + children: [ + { + name: "rect", + attributes: { + xmlns: Hn, + width: "100%", + height: "100%", + x: 0, + y: 0, + rx: a.radius, + ry: a.radius, + style: i, + }, + }, + ], + attributes: { + xmlns: Hn, + style: { overflow: "visible" }, + width: "100%", + height: "100%", + }, + }; + if (hasMargin(this[pr]()[pr]())) + return HTMLResult.success({ + name: "div", + attributes: { + style: { display: "inline", width: "100%", height: "100%" }, + }, + children: [s], + }); + s.attributes.style.position = "absolute"; + return HTMLResult.success(s); + } +} +class RefElement extends StringObject { + constructor(e) { + super(Jn, "ref"); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class Script extends StringObject { + constructor(e) { + super(Jn, "script"); + this.binding = e.binding || ""; + this.contentType = e.contentType || ""; + this.id = e.id || ""; + this.name = e.name || ""; + this.runAt = getStringOption(e.runAt, ["client", "both", "server"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class SetProperty extends XFAObject { + constructor(e) { + super(Jn, "setProperty"); + this.connection = e.connection || ""; + this.ref = e.ref || ""; + this.target = e.target || ""; + } +} +class SignData extends XFAObject { + constructor(e) { + super(Jn, "signData", !0); + this.id = e.id || ""; + this.operation = getStringOption(e.operation, ["sign", "clear", "verify"]); + this.ref = e.ref || ""; + this.target = e.target || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.filter = null; + this.manifest = null; + } +} +class Signature extends XFAObject { + constructor(e) { + super(Jn, "signature", !0); + this.id = e.id || ""; + this.type = getStringOption(e.type, ["PDF1.3", "PDF1.6"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.border = null; + this.extras = null; + this.filter = null; + this.manifest = null; + this.margin = null; + } +} +class Signing extends XFAObject { + constructor(e) { + super(Jn, "signing", !0); + this.id = e.id || ""; + this.type = getStringOption(e.type, ["optional", "required"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.certificate = new XFAObjectArray(); + } +} +class Solid extends XFAObject { + constructor(e) { + super(Jn, "solid", !0); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + } + [rn](e) { + return e ? e[rn]() : "#FFFFFF"; + } +} +class Speak extends StringObject { + constructor(e) { + super(Jn, "speak"); + this.disable = getInteger({ + data: e.disable, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.id = e.id || ""; + this.priority = getStringOption(e.priority, [ + "custom", + "caption", + "name", + "toolTip", + ]); + this.rid = e.rid || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class Stipple extends XFAObject { + constructor(e) { + super(Jn, "stipple", !0); + this.id = e.id || ""; + this.rate = getInteger({ + data: e.rate, + defaultValue: 50, + validate: (e) => e >= 0 && e <= 100, + }); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.color = null; + this.extras = null; + } + [rn](e) { + const t = this.rate / 100; + return Util.makeHexColor( + Math.round(e.value.r * (1 - t) + this.value.r * t), + Math.round(e.value.g * (1 - t) + this.value.g * t), + Math.round(e.value.b * (1 - t) + this.value.b * t), + ); + } +} +class Subform extends XFAObject { + constructor(e) { + super(Jn, "subform", !0); + this.access = getStringOption(e.access, [ + "open", + "nonInteractive", + "protected", + "readOnly", + ]); + this.allowMacro = getInteger({ + data: e.allowMacro, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.anchorType = getStringOption(e.anchorType, [ + "topLeft", + "bottomCenter", + "bottomLeft", + "bottomRight", + "middleCenter", + "middleLeft", + "middleRight", + "topCenter", + "topRight", + ]); + this.colSpan = getInteger({ + data: e.colSpan, + defaultValue: 1, + validate: (e) => e >= 1 || -1 === e, + }); + this.columnWidths = (e.columnWidths || "") + .trim() + .split(/\s+/) + .map((e) => ("-1" === e ? -1 : getMeasurement(e))); + this.h = e.h ? getMeasurement(e.h) : ""; + this.hAlign = getStringOption(e.hAlign, [ + "left", + "center", + "justify", + "justifyAll", + "radix", + "right", + ]); + this.id = e.id || ""; + this.layout = getStringOption(e.layout, [ + "position", + "lr-tb", + "rl-row", + "rl-tb", + "row", + "table", + "tb", + ]); + this.locale = e.locale || ""; + this.maxH = getMeasurement(e.maxH, "0pt"); + this.maxW = getMeasurement(e.maxW, "0pt"); + this.mergeMode = getStringOption(e.mergeMode, [ + "consumeData", + "matchTemplate", + ]); + this.minH = getMeasurement(e.minH, "0pt"); + this.minW = getMeasurement(e.minW, "0pt"); + this.name = e.name || ""; + this.presence = getStringOption(e.presence, [ + "visible", + "hidden", + "inactive", + "invisible", + ]); + this.relevant = getRelevant(e.relevant); + this.restoreState = getStringOption(e.restoreState, ["manual", "auto"]); + this.scope = getStringOption(e.scope, ["name", "none"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.w = e.w ? getMeasurement(e.w) : ""; + this.x = getMeasurement(e.x, "0pt"); + this.y = getMeasurement(e.y, "0pt"); + this.assist = null; + this.bind = null; + this.bookend = null; + this.border = null; + this.break = null; + this.calculate = null; + this.desc = null; + this.extras = null; + this.keep = null; + this.margin = null; + this.occur = null; + this.overflow = null; + this.pageSet = null; + this.para = null; + this.traversal = null; + this.validate = null; + this.variables = null; + this.area = new XFAObjectArray(); + this.breakAfter = new XFAObjectArray(); + this.breakBefore = new XFAObjectArray(); + this.connect = new XFAObjectArray(); + this.draw = new XFAObjectArray(); + this.event = new XFAObjectArray(); + this.exObject = new XFAObjectArray(); + this.exclGroup = new XFAObjectArray(); + this.field = new XFAObjectArray(); + this.proto = new XFAObjectArray(); + this.setProperty = new XFAObjectArray(); + this.subform = new XFAObjectArray(); + this.subformSet = new XFAObjectArray(); + } + [fr]() { + const e = this[pr](); + return e instanceof SubformSet ? e[fr]() : e; + } + [kr]() { + return !0; + } + [Mr]() { + return ( + (this.layout.endsWith("-tb") && + 0 === this[ar].attempt && + this[ar].numberInLine > 0) || + this[pr]()[Mr]() + ); + } + *[ur]() { + yield* getContainedChildren(this); + } + [rr]() { + return flushHTML(this); + } + [Xs](e, t) { + addHTML(this, e, t); + } + [gr]() { + return getAvailableSpace(this); + } + [xr]() { + const e = this[fr](); + if (!e[xr]()) return !1; + if (void 0 !== this[ar]._isSplittable) return this[ar]._isSplittable; + if ("position" === this.layout || this.layout.includes("row")) { + this[ar]._isSplittable = !1; + return !1; + } + if (this.keep && "none" !== this.keep.intact) { + this[ar]._isSplittable = !1; + return !1; + } + if (e.layout?.endsWith("-tb") && 0 !== e[ar].numberInLine) return !1; + this[ar]._isSplittable = !0; + return !0; + } + [an](e) { + setTabIndex(this); + if (this.break) { + if ("auto" !== this.break.after || "" !== this.break.afterTarget) { + const e = new BreakAfter({ + targetType: this.break.after, + target: this.break.afterTarget, + startNew: this.break.startNew.toString(), + }); + e[yr] = this[yr]; + this[js](e); + this.breakAfter.push(e); + } + if ("auto" !== this.break.before || "" !== this.break.beforeTarget) { + const e = new BreakBefore({ + targetType: this.break.before, + target: this.break.beforeTarget, + startNew: this.break.startNew.toString(), + }); + e[yr] = this[yr]; + this[js](e); + this.breakBefore.push(e); + } + if ("" !== this.break.overflowTarget) { + const e = new Overflow({ + target: this.break.overflowTarget, + leader: this.break.overflowLeader, + trailer: this.break.overflowTrailer, + }); + e[yr] = this[yr]; + this[js](e); + this.overflow.push(e); + } + this[Xr](this.break); + this.break = null; + } + if ("hidden" === this.presence || "inactive" === this.presence) + return HTMLResult.EMPTY; + (this.breakBefore.children.length > 1 || + this.breakAfter.children.length > 1) && + warn( + "XFA - Several breakBefore or breakAfter in subforms: please file a bug.", + ); + if (this.breakBefore.children.length >= 1) { + const e = this.breakBefore.children[0]; + if (handleBreak(e)) return HTMLResult.breakNode(e); + } + if (this[ar]?.afterBreakAfter) return HTMLResult.EMPTY; + fixDimensions(this); + const t = [], + i = { id: this[nn], class: [] }; + setAccess(this, i.class); + this[ar] || (this[ar] = Object.create(null)); + Object.assign(this[ar], { + children: t, + line: null, + attributes: i, + attempt: 0, + numberInLine: 0, + availableSpace: { + width: Math.min(this.w || 1 / 0, e.width), + height: Math.min(this.h || 1 / 0, e.height), + }, + width: 0, + height: 0, + prevHeight: 0, + currentWidth: 0, + }); + const a = this[mr](), + s = a[ar].noLayoutFailure, + r = this[xr](); + r || setFirstUnsplittable(this); + if (!checkDimensions(this, e)) return HTMLResult.FAILURE; + const n = new Set([ + "area", + "draw", + "exclGroup", + "field", + "subform", + "subformSet", + ]); + if (this.layout.includes("row")) { + const e = this[fr]().columnWidths; + if (Array.isArray(e) && e.length > 0) { + this[ar].columnWidths = e; + this[ar].currentColumn = 0; + } + } + const o = toStyle( + this, + "anchorType", + "dimensions", + "position", + "presence", + "border", + "margin", + "hAlign", + ), + g = ["xfaSubform"], + c = layoutClass(this); + c && g.push(c); + i.style = o; + i.class = g; + this.name && (i.xfaName = this.name); + if (this.overflow) { + const t = this.overflow[Cr](); + if (t.addLeader) { + t.addLeader = !1; + handleOverflow(this, t.leader, e); + } + } + this[Wr](); + const h = "lr-tb" === this.layout || "rl-tb" === this.layout, + l = h ? 2 : 1; + for (; this[ar].attempt < l; this[ar].attempt++) { + h && 1 === this[ar].attempt && (this[ar].numberInLine = 0); + const e = this[Zs]({ filter: n, include: !0 }); + if (e.success) break; + if (e.isBreak()) { + this[Pr](); + return e; + } + if ( + h && + 0 === this[ar].attempt && + 0 === this[ar].numberInLine && + !a[ar].noLayoutFailure + ) { + this[ar].attempt = l; + break; + } + } + this[Pr](); + r || unsetFirstUnsplittable(this); + a[ar].noLayoutFailure = s; + if (this[ar].attempt === l) { + this.overflow && (this[mr]()[ar].overflowNode = this.overflow); + r || delete this[ar]; + return HTMLResult.FAILURE; + } + if (this.overflow) { + const t = this.overflow[Cr](); + if (t.addTrailer) { + t.addTrailer = !1; + handleOverflow(this, t.trailer, e); + } + } + let C = 0, + Q = 0; + if (this.margin) { + C = this.margin.leftInset + this.margin.rightInset; + Q = this.margin.topInset + this.margin.bottomInset; + } + const E = Math.max(this[ar].width + C, this.w || 0), + u = Math.max(this[ar].height + Q, this.h || 0), + d = [this.x, this.y, E, u]; + "" === this.w && (o.width = measureToString(E)); + "" === this.h && (o.height = measureToString(u)); + if (("0px" === o.width || "0px" === o.height) && 0 === t.length) + return HTMLResult.EMPTY; + const f = { name: "div", attributes: i, children: t }; + applyAssist(this, i); + const p = HTMLResult.success(createWrapper(this, f), d); + if (this.breakAfter.children.length >= 1) { + const e = this.breakAfter.children[0]; + if (handleBreak(e)) { + this[ar].afterBreakAfter = p; + return HTMLResult.breakNode(e); + } + } + delete this[ar]; + return p; + } +} +class SubformSet extends XFAObject { + constructor(e) { + super(Jn, "subformSet", !0); + this.id = e.id || ""; + this.name = e.name || ""; + this.relation = getStringOption(e.relation, [ + "ordered", + "choice", + "unordered", + ]); + this.relevant = getRelevant(e.relevant); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.bookend = null; + this.break = null; + this.desc = null; + this.extras = null; + this.occur = null; + this.overflow = null; + this.breakAfter = new XFAObjectArray(); + this.breakBefore = new XFAObjectArray(); + this.subform = new XFAObjectArray(); + this.subformSet = new XFAObjectArray(); + } + *[ur]() { + yield* getContainedChildren(this); + } + [fr]() { + let e = this[pr](); + for (; !(e instanceof Subform); ) e = e[pr](); + return e; + } + [kr]() { + return !0; + } +} +class SubjectDN extends ContentObject { + constructor(e) { + super(Jn, "subjectDN"); + this.delimiter = e.delimiter || ","; + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } + [sr]() { + this[er] = new Map( + this[er].split(this.delimiter).map((e) => { + (e = e.split("=", 2))[0] = e[0].trim(); + return e; + }), + ); + } +} +class SubjectDNs extends XFAObject { + constructor(e) { + super(Jn, "subjectDNs", !0); + this.id = e.id || ""; + this.type = getStringOption(e.type, ["optional", "required"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.subjectDN = new XFAObjectArray(); + } +} +class Submit extends XFAObject { + constructor(e) { + super(Jn, "submit", !0); + this.embedPDF = getInteger({ + data: e.embedPDF, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.format = getStringOption(e.format, [ + "xdp", + "formdata", + "pdf", + "urlencoded", + "xfd", + "xml", + ]); + this.id = e.id || ""; + this.target = e.target || ""; + this.textEncoding = getKeyword({ + data: e.textEncoding ? e.textEncoding.toLowerCase() : "", + defaultValue: "", + validate: (e) => + [ + "utf-8", + "big-five", + "fontspecific", + "gbk", + "gb-18030", + "gb-2312", + "ksc-5601", + "none", + "shift-jis", + "ucs-2", + "utf-16", + ].includes(e) || e.match(/iso-8859-\d{2}/), + }); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.xdpContent = e.xdpContent || ""; + this.encrypt = null; + this.encryptData = new XFAObjectArray(); + this.signData = new XFAObjectArray(); + } +} +class Template extends XFAObject { + constructor(e) { + super(Jn, "template", !0); + this.baseProfile = getStringOption(e.baseProfile, [ + "full", + "interactiveForms", + ]); + this.extras = null; + this.subform = new XFAObjectArray(); + } + [sr]() { + 0 === this.subform.children.length && + warn("XFA - No subforms in template node."); + this.subform.children.length >= 2 && + warn("XFA - Several subforms in template node: please file a bug."); + this[An] = 5e3; + } + [xr]() { + return !0; + } + [Vr](e, t) { + return e.startsWith("#") + ? [this[br].get(e.slice(1))] + : searchNode(this, t, e, !0, !0); + } + *[tn]() { + if (!this.subform.children.length) + return HTMLResult.success({ name: "div", children: [] }); + this[ar] = { + overflowNode: null, + firstUnsplittable: null, + currentContentArea: null, + currentPageArea: null, + noLayoutFailure: !1, + pageNumber: 1, + pagePosition: "first", + oddOrEven: "odd", + blankOrNotBlank: "nonBlank", + paraStack: [], + }; + const e = this.subform.children[0]; + e.pageSet[zs](); + const t = e.pageSet.pageArea.children, + i = { name: "div", children: [] }; + let a = null, + s = null, + r = null; + if (e.breakBefore.children.length >= 1) { + s = e.breakBefore.children[0]; + r = s.target; + } else if ( + e.subform.children.length >= 1 && + e.subform.children[0].breakBefore.children.length >= 1 + ) { + s = e.subform.children[0].breakBefore.children[0]; + r = s.target; + } else if (e.break?.beforeTarget) { + s = e.break; + r = s.beforeTarget; + } else if ( + e.subform.children.length >= 1 && + e.subform.children[0].break?.beforeTarget + ) { + s = e.subform.children[0].break; + r = s.beforeTarget; + } + if (s) { + const e = this[Vr](r, s[pr]()); + if (e instanceof PageArea) { + a = e; + s[ar] = {}; + } + } + a || (a = t[0]); + a[ar] = { numberOfUse: 1 }; + const n = a[pr](); + n[ar] = { + numberOfUse: 1, + pageIndex: n.pageArea.children.indexOf(a), + pageSetIndex: 0, + }; + let o, + g = null, + c = null, + h = !0, + l = 0, + C = 0; + for (;;) { + if (h) l = 0; + else { + i.children.pop(); + if (3 == ++l) { + warn("XFA - Something goes wrong: please file a bug."); + return i; + } + } + o = null; + this[ar].currentPageArea = a; + const t = a[an]().html; + i.children.push(t); + if (g) { + this[ar].noLayoutFailure = !0; + t.children.push(g[an](a[ar].space).html); + g = null; + } + if (c) { + this[ar].noLayoutFailure = !0; + t.children.push(c[an](a[ar].space).html); + c = null; + } + const s = a.contentArea.children, + r = t.children.filter((e) => + e.attributes.class.includes("xfaContentarea"), + ); + h = !1; + this[ar].firstUnsplittable = null; + this[ar].noLayoutFailure = !1; + const flush = (t) => { + const i = e[rr](); + if (i) { + h ||= i.children?.length > 0; + r[t].children.push(i); + } + }; + for (let t = C, a = s.length; t < a; t++) { + const a = (this[ar].currentContentArea = s[t]), + n = { width: a.w, height: a.h }; + C = 0; + if (g) { + r[t].children.push(g[an](n).html); + g = null; + } + if (c) { + r[t].children.push(c[an](n).html); + c = null; + } + const l = e[an](n); + if (l.success) { + if (l.html) { + h ||= l.html.children?.length > 0; + r[t].children.push(l.html); + } else !h && i.children.length > 1 && i.children.pop(); + return i; + } + if (l.isBreak()) { + const e = l.breakNode; + flush(t); + if ("auto" === e.targetType) continue; + if (e.leader) { + g = this[Vr](e.leader, e[pr]()); + g = g ? g[0] : null; + } + if (e.trailer) { + c = this[Vr](e.trailer, e[pr]()); + c = c ? c[0] : null; + } + if ("pageArea" === e.targetType) { + o = e[ar].target; + t = 1 / 0; + } else if (e[ar].target) { + o = e[ar].target; + C = e[ar].index + 1; + t = 1 / 0; + } else t = e[ar].index; + } else if (this[ar].overflowNode) { + const e = this[ar].overflowNode; + this[ar].overflowNode = null; + const i = e[Cr](), + a = i.target; + i.addLeader = null !== i.leader; + i.addTrailer = null !== i.trailer; + flush(t); + const r = t; + t = 1 / 0; + if (a instanceof PageArea) o = a; + else if (a instanceof ContentArea) { + const e = s.indexOf(a); + if (-1 !== e) e > r ? (t = e - 1) : (C = e); + else { + o = a[pr](); + C = o.contentArea.children.indexOf(a); + } + } + } else flush(t); + } + this[ar].pageNumber += 1; + o && (o[Lr]() ? (o[ar].numberOfUse += 1) : (o = null)); + a = o || a[dr](); + yield null; + } + } +} +class Text extends ContentObject { + constructor(e) { + super(Jn, "text"); + this.id = e.id || ""; + this.maxChars = getInteger({ + data: e.maxChars, + defaultValue: 0, + validate: (e) => e >= 0, + }); + this.name = e.name || ""; + this.rid = e.rid || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } + [Ws]() { + return !0; + } + [Kr](e) { + if (e[Hr] === gn.xhtml.id) { + this[er] = e; + return !0; + } + warn(`XFA - Invalid content in Text: ${e[Yr]}.`); + return !1; + } + [qr](e) { + this[er] instanceof XFAObject || super[qr](e); + } + [sr]() { + "string" == typeof this[er] && + (this[er] = this[er].replaceAll("\r\n", "\n")); + } + [Cr]() { + return "string" == typeof this[er] + ? this[er] + .split(/[\u2029\u2028\n]/) + .reduce((e, t) => { + t && e.push(t); + return e; + }, []) + .join("\n") + : this[er][en](); + } + [an](e) { + if ("string" == typeof this[er]) { + const e = valueToHtml(this[er]).html; + if (this[er].includes("\u2029")) { + e.name = "div"; + e.children = []; + this[er] + .split("\u2029") + .map((e) => + e.split(/[\u2028\n]/).reduce((e, t) => { + e.push({ name: "span", value: t }, { name: "br" }); + return e; + }, []), + ) + .forEach((t) => { + e.children.push({ name: "p", children: t }); + }); + } else if (/[\u2028\n]/.test(this[er])) { + e.name = "div"; + e.children = []; + this[er].split(/[\u2028\n]/).forEach((t) => { + e.children.push({ name: "span", value: t }, { name: "br" }); + }); + } + return HTMLResult.success(e); + } + return this[er][an](e); + } +} +class TextEdit extends XFAObject { + constructor(e) { + super(Jn, "textEdit", !0); + this.allowRichText = getInteger({ + data: e.allowRichText, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.hScrollPolicy = getStringOption(e.hScrollPolicy, [ + "auto", + "off", + "on", + ]); + this.id = e.id || ""; + this.multiLine = getInteger({ + data: e.multiLine, + defaultValue: "", + validate: (e) => 0 === e || 1 === e, + }); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.vScrollPolicy = getStringOption(e.vScrollPolicy, [ + "auto", + "off", + "on", + ]); + this.border = null; + this.comb = null; + this.extras = null; + this.margin = null; + } + [an](e) { + const t = toStyle(this, "border", "font", "margin"); + let i; + const a = this[pr]()[pr](); + "" === this.multiLine && (this.multiLine = a instanceof Draw ? 1 : 0); + i = + 1 === this.multiLine + ? { + name: "textarea", + attributes: { + dataId: a[tr]?.[nn] || a[nn], + fieldId: a[nn], + class: ["xfaTextfield"], + style: t, + "aria-label": ariaLabel(a), + "aria-required": !1, + }, + } + : { + name: "input", + attributes: { + type: "text", + dataId: a[tr]?.[nn] || a[nn], + fieldId: a[nn], + class: ["xfaTextfield"], + style: t, + "aria-label": ariaLabel(a), + "aria-required": !1, + }, + }; + if (isRequired(a)) { + i.attributes["aria-required"] = !0; + i.attributes.required = !0; + } + return HTMLResult.success({ + name: "label", + attributes: { class: ["xfaLabel"] }, + children: [i], + }); + } +} +class Time extends StringObject { + constructor(e) { + super(Jn, "time"); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } + [sr]() { + const e = this[er].trim(); + this[er] = e ? new Date(e) : null; + } + [an](e) { + return valueToHtml(this[er] ? this[er].toString() : ""); + } +} +class TimeStamp extends XFAObject { + constructor(e) { + super(Jn, "timeStamp"); + this.id = e.id || ""; + this.server = e.server || ""; + this.type = getStringOption(e.type, ["optional", "required"]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class ToolTip extends StringObject { + constructor(e) { + super(Jn, "toolTip"); + this.id = e.id || ""; + this.rid = e.rid || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class Traversal extends XFAObject { + constructor(e) { + super(Jn, "traversal", !0); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + this.traverse = new XFAObjectArray(); + } +} +class Traverse extends XFAObject { + constructor(e) { + super(Jn, "traverse", !0); + this.id = e.id || ""; + this.operation = getStringOption(e.operation, [ + "next", + "back", + "down", + "first", + "left", + "right", + "up", + ]); + this.ref = e.ref || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + this.script = null; + } + get name() { + return this.operation; + } + [Ur]() { + return !1; + } +} +class Ui extends XFAObject { + constructor(e) { + super(Jn, "ui", !0); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + this.picture = null; + this.barcode = null; + this.button = null; + this.checkButton = null; + this.choiceList = null; + this.dateTimeEdit = null; + this.defaultUi = null; + this.imageEdit = null; + this.numericEdit = null; + this.passwordEdit = null; + this.signature = null; + this.textEdit = null; + } + [Cr]() { + if (void 0 === this[ar]) { + for (const e of Object.getOwnPropertyNames(this)) { + if ("extras" === e || "picture" === e) continue; + const t = this[e]; + if (t instanceof XFAObject) { + this[ar] = t; + return t; + } + } + this[ar] = null; + } + return this[ar]; + } + [an](e) { + const t = this[Cr](); + return t ? t[an](e) : HTMLResult.EMPTY; + } +} +class Validate extends XFAObject { + constructor(e) { + super(Jn, "validate", !0); + this.formatTest = getStringOption(e.formatTest, [ + "warning", + "disabled", + "error", + ]); + this.id = e.id || ""; + this.nullTest = getStringOption(e.nullTest, [ + "disabled", + "error", + "warning", + ]); + this.scriptTest = getStringOption(e.scriptTest, [ + "error", + "disabled", + "warning", + ]); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.extras = null; + this.message = null; + this.picture = null; + this.script = null; + } +} +class Value extends XFAObject { + constructor(e) { + super(Jn, "value", !0); + this.id = e.id || ""; + this.override = getInteger({ + data: e.override, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.relevant = getRelevant(e.relevant); + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.arc = null; + this.boolean = null; + this.date = null; + this.dateTime = null; + this.decimal = null; + this.exData = null; + this.float = null; + this.image = null; + this.integer = null; + this.line = null; + this.rectangle = null; + this.text = null; + this.time = null; + } + [$r](e) { + const t = this[pr](); + if (t instanceof Field && t.ui?.imageEdit) { + if (!this.image) { + this.image = new Image({}); + this[js](this.image); + } + this.image[er] = e[er]; + return; + } + const i = e[Yr]; + if (null === this[i]) { + for (const e of Object.getOwnPropertyNames(this)) { + const t = this[e]; + if (t instanceof XFAObject) { + this[e] = null; + this[Xr](t); + } + } + this[e[Yr]] = e; + this[js](e); + } else this[i][er] = e[er]; + } + [en]() { + if (this.exData) + return "string" == typeof this.exData[er] + ? this.exData[er].trim() + : this.exData[er][en]().trim(); + for (const e of Object.getOwnPropertyNames(this)) { + if ("image" === e) continue; + const t = this[e]; + if (t instanceof XFAObject) return (t[er] || "").toString().trim(); + } + return null; + } + [an](e) { + for (const t of Object.getOwnPropertyNames(this)) { + const i = this[t]; + if (i instanceof XFAObject) return i[an](e); + } + return HTMLResult.EMPTY; + } +} +class Variables extends XFAObject { + constructor(e) { + super(Jn, "variables", !0); + this.id = e.id || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + this.boolean = new XFAObjectArray(); + this.date = new XFAObjectArray(); + this.dateTime = new XFAObjectArray(); + this.decimal = new XFAObjectArray(); + this.exData = new XFAObjectArray(); + this.float = new XFAObjectArray(); + this.image = new XFAObjectArray(); + this.integer = new XFAObjectArray(); + this.manifest = new XFAObjectArray(); + this.script = new XFAObjectArray(); + this.text = new XFAObjectArray(); + this.time = new XFAObjectArray(); + } + [Ur]() { + return !0; + } +} +class TemplateNamespace { + static [on](e, t) { + if (TemplateNamespace.hasOwnProperty(e)) { + const i = TemplateNamespace[e](t); + i[_r](t); + return i; + } + } + static appearanceFilter(e) { + return new AppearanceFilter(e); + } + static arc(e) { + return new Arc(e); + } + static area(e) { + return new Area(e); + } + static assist(e) { + return new Assist(e); + } + static barcode(e) { + return new Barcode(e); + } + static bind(e) { + return new Bind(e); + } + static bindItems(e) { + return new BindItems(e); + } + static bookend(e) { + return new Bookend(e); + } + static boolean(e) { + return new BooleanElement(e); + } + static border(e) { + return new Border(e); + } + static break(e) { + return new Break(e); + } + static breakAfter(e) { + return new BreakAfter(e); + } + static breakBefore(e) { + return new BreakBefore(e); + } + static button(e) { + return new Button(e); + } + static calculate(e) { + return new Calculate(e); + } + static caption(e) { + return new Caption(e); + } + static certificate(e) { + return new Certificate(e); + } + static certificates(e) { + return new Certificates(e); + } + static checkButton(e) { + return new CheckButton(e); + } + static choiceList(e) { + return new ChoiceList(e); + } + static color(e) { + return new Color(e); + } + static comb(e) { + return new Comb(e); + } + static connect(e) { + return new Connect(e); + } + static contentArea(e) { + return new ContentArea(e); + } + static corner(e) { + return new Corner(e); + } + static date(e) { + return new DateElement(e); + } + static dateTime(e) { + return new DateTime(e); + } + static dateTimeEdit(e) { + return new DateTimeEdit(e); + } + static decimal(e) { + return new Decimal(e); + } + static defaultUi(e) { + return new DefaultUi(e); + } + static desc(e) { + return new Desc(e); + } + static digestMethod(e) { + return new DigestMethod(e); + } + static digestMethods(e) { + return new DigestMethods(e); + } + static draw(e) { + return new Draw(e); + } + static edge(e) { + return new Edge(e); + } + static encoding(e) { + return new Encoding(e); + } + static encodings(e) { + return new Encodings(e); + } + static encrypt(e) { + return new Encrypt(e); + } + static encryptData(e) { + return new EncryptData(e); + } + static encryption(e) { + return new Encryption(e); + } + static encryptionMethod(e) { + return new EncryptionMethod(e); + } + static encryptionMethods(e) { + return new EncryptionMethods(e); + } + static event(e) { + return new Event(e); + } + static exData(e) { + return new ExData(e); + } + static exObject(e) { + return new ExObject(e); + } + static exclGroup(e) { + return new ExclGroup(e); + } + static execute(e) { + return new Execute(e); + } + static extras(e) { + return new Extras(e); + } + static field(e) { + return new Field(e); + } + static fill(e) { + return new Fill(e); + } + static filter(e) { + return new Filter(e); + } + static float(e) { + return new Float(e); + } + static font(e) { + return new template_Font(e); + } + static format(e) { + return new Format(e); + } + static handler(e) { + return new Handler(e); + } + static hyphenation(e) { + return new Hyphenation(e); + } + static image(e) { + return new Image(e); + } + static imageEdit(e) { + return new ImageEdit(e); + } + static integer(e) { + return new Integer(e); + } + static issuers(e) { + return new Issuers(e); + } + static items(e) { + return new Items(e); + } + static keep(e) { + return new Keep(e); + } + static keyUsage(e) { + return new KeyUsage(e); + } + static line(e) { + return new Line(e); + } + static linear(e) { + return new Linear(e); + } + static lockDocument(e) { + return new LockDocument(e); + } + static manifest(e) { + return new Manifest(e); + } + static margin(e) { + return new Margin(e); + } + static mdp(e) { + return new Mdp(e); + } + static medium(e) { + return new Medium(e); + } + static message(e) { + return new Message(e); + } + static numericEdit(e) { + return new NumericEdit(e); + } + static occur(e) { + return new Occur(e); + } + static oid(e) { + return new Oid(e); + } + static oids(e) { + return new Oids(e); + } + static overflow(e) { + return new Overflow(e); + } + static pageArea(e) { + return new PageArea(e); + } + static pageSet(e) { + return new PageSet(e); + } + static para(e) { + return new Para(e); + } + static passwordEdit(e) { + return new PasswordEdit(e); + } + static pattern(e) { + return new template_Pattern(e); + } + static picture(e) { + return new Picture(e); + } + static proto(e) { + return new Proto(e); + } + static radial(e) { + return new Radial(e); + } + static reason(e) { + return new Reason(e); + } + static reasons(e) { + return new Reasons(e); + } + static rectangle(e) { + return new Rectangle(e); + } + static ref(e) { + return new RefElement(e); + } + static script(e) { + return new Script(e); + } + static setProperty(e) { + return new SetProperty(e); + } + static signData(e) { + return new SignData(e); + } + static signature(e) { + return new Signature(e); + } + static signing(e) { + return new Signing(e); + } + static solid(e) { + return new Solid(e); + } + static speak(e) { + return new Speak(e); + } + static stipple(e) { + return new Stipple(e); + } + static subform(e) { + return new Subform(e); + } + static subformSet(e) { + return new SubformSet(e); + } + static subjectDN(e) { + return new SubjectDN(e); + } + static subjectDNs(e) { + return new SubjectDNs(e); + } + static submit(e) { + return new Submit(e); + } + static template(e) { + return new Template(e); + } + static text(e) { + return new Text(e); + } + static textEdit(e) { + return new TextEdit(e); + } + static time(e) { + return new Time(e); + } + static timeStamp(e) { + return new TimeStamp(e); + } + static toolTip(e) { + return new ToolTip(e); + } + static traversal(e) { + return new Traversal(e); + } + static traverse(e) { + return new Traverse(e); + } + static ui(e) { + return new Ui(e); + } + static validate(e) { + return new Validate(e); + } + static value(e) { + return new Value(e); + } + static variables(e) { + return new Variables(e); + } +} +const Tn = gn.datasets.id; +function createText(e) { + const t = new Text({}); + t[er] = e; + return t; +} +class Binder { + constructor(e) { + this.root = e; + this.datasets = e.datasets; + this.data = e.datasets?.data || new XmlObject(gn.datasets.id, "data"); + this.emptyMerge = 0 === this.data[Er]().length; + this.root.form = this.form = e.template[$s](); + } + _isConsumeData() { + return !this.emptyMerge && this._mergeMode; + } + _isMatchTemplate() { + return !this._isConsumeData(); + } + bind() { + this._bindElement(this.form, this.data); + return this.form; + } + getData() { + return this.data; + } + _bindValue(e, t, i) { + e[tr] = t; + if (e[wr]()) + if (t[Rr]()) { + const i = t[lr](); + e[$r](createText(i)); + } else if ( + e instanceof Field && + "multiSelect" === e.ui?.choiceList?.open + ) { + const i = t[Er]() + .map((e) => e[er].trim()) + .join("\n"); + e[$r](createText(i)); + } else + this._isConsumeData() && warn("XFA - Nodes haven't the same type."); + else + !t[Rr]() || this._isMatchTemplate() + ? this._bindElement(e, t) + : warn("XFA - Nodes haven't the same type."); + } + _findDataByNameToConsume(e, t, i, a) { + if (!e) return null; + let s, r; + for (let a = 0; a < 3; a++) { + s = i[Qr](e, !1, !0); + for (;;) { + r = s.next().value; + if (!r) break; + if (t === r[Rr]()) return r; + } + if (i[Hr] === gn.datasets.id && "data" === i[Yr]) break; + i = i[pr](); + } + if (!a) return null; + s = this.data[Qr](e, !0, !1); + r = s.next().value; + if (r) return r; + s = this.data[nr](e, !0); + r = s.next().value; + return r?.[Rr]() ? r : null; + } + _setProperties(e, t) { + if (e.hasOwnProperty("setProperty")) + for (const { ref: i, target: a, connection: s } of e.setProperty + .children) { + if (s) continue; + if (!i) continue; + const r = searchNode(this.root, t, i, !1, !1); + if (!r) { + warn(`XFA - Invalid reference: ${i}.`); + continue; + } + const [n] = r; + if (!n[Nr](this.data)) { + warn("XFA - Invalid node: must be a data node."); + continue; + } + const o = searchNode(this.root, e, a, !1, !1); + if (!o) { + warn(`XFA - Invalid target: ${a}.`); + continue; + } + const [g] = o; + if (!g[Nr](e)) { + warn("XFA - Invalid target: must be a property or subproperty."); + continue; + } + const c = g[pr](); + if (g instanceof SetProperty || c instanceof SetProperty) { + warn( + "XFA - Invalid target: cannot be a setProperty or one of its properties.", + ); + continue; + } + if (g instanceof BindItems || c instanceof BindItems) { + warn( + "XFA - Invalid target: cannot be a bindItems or one of its properties.", + ); + continue; + } + const h = n[en](), + l = g[Yr]; + if (g instanceof XFAAttribute) { + const e = Object.create(null); + e[l] = h; + const t = Reflect.construct(Object.getPrototypeOf(c).constructor, [ + e, + ]); + c[l] = t[l]; + } else if (g.hasOwnProperty(er)) { + g[tr] = n; + g[er] = h; + g[sr](); + } else warn("XFA - Invalid node to use in setProperty"); + } + } + _bindItems(e, t) { + if ( + !e.hasOwnProperty("items") || + !e.hasOwnProperty("bindItems") || + e.bindItems.isEmpty() + ) + return; + for (const t of e.items.children) e[Xr](t); + e.items.clear(); + const i = new Items({}), + a = new Items({}); + e[js](i); + e.items.push(i); + e[js](a); + e.items.push(a); + for (const { ref: s, labelRef: r, valueRef: n, connection: o } of e + .bindItems.children) { + if (o) continue; + if (!s) continue; + const e = searchNode(this.root, t, s, !1, !1); + if (e) + for (const t of e) { + if (!t[Nr](this.datasets)) { + warn(`XFA - Invalid ref (${s}): must be a datasets child.`); + continue; + } + const e = searchNode(this.root, t, r, !0, !1); + if (!e) { + warn(`XFA - Invalid label: ${r}.`); + continue; + } + const [o] = e; + if (!o[Nr](this.datasets)) { + warn("XFA - Invalid label: must be a datasets child."); + continue; + } + const g = searchNode(this.root, t, n, !0, !1); + if (!g) { + warn(`XFA - Invalid value: ${n}.`); + continue; + } + const [c] = g; + if (!c[Nr](this.datasets)) { + warn("XFA - Invalid value: must be a datasets child."); + continue; + } + const h = createText(o[en]()), + l = createText(c[en]()); + i[js](h); + i.text.push(h); + a[js](l); + a.text.push(l); + } + else warn(`XFA - Invalid reference: ${s}.`); + } + } + _bindOccurrences(e, t, i) { + let a; + if (t.length > 1) { + a = e[$s](); + a[Xr](a.occur); + a.occur = null; + } + this._bindValue(e, t[0], i); + this._setProperties(e, t[0]); + this._bindItems(e, t[0]); + if (1 === t.length) return; + const s = e[pr](), + r = e[Yr], + n = s[Dr](e); + for (let e = 1, o = t.length; e < o; e++) { + const o = t[e], + g = a[$s](); + s[r].push(g); + s[Fr](n + e, g); + this._bindValue(g, o, i); + this._setProperties(g, o); + this._bindItems(g, o); + } + } + _createOccurrences(e) { + if (!this.emptyMerge) return; + const { occur: t } = e; + if (!t || t.initial <= 1) return; + const i = e[pr](), + a = e[Yr]; + if (!(i[a] instanceof XFAObjectArray)) return; + let s; + s = e.name + ? i[a].children.filter((t) => t.name === e.name).length + : i[a].children.length; + const r = i[Dr](e) + 1, + n = t.initial - s; + if (n) { + const t = e[$s](); + t[Xr](t.occur); + t.occur = null; + i[a].push(t); + i[Fr](r, t); + for (let e = 1; e < n; e++) { + const s = t[$s](); + i[a].push(s); + i[Fr](r + e, s); + } + } + } + _getOccurInfo(e) { + const { name: t, occur: i } = e; + if (!i || !t) return [1, 1]; + const a = -1 === i.max ? 1 / 0 : i.max; + return [i.min, a]; + } + _setAndBind(e, t) { + this._setProperties(e, t); + this._bindItems(e, t); + this._bindElement(e, t); + } + _bindElement(e, t) { + const i = []; + this._createOccurrences(e); + for (const a of e[Er]()) { + if (a[tr]) continue; + if (void 0 === this._mergeMode && "subform" === a[Yr]) { + this._mergeMode = "consumeData" === a.mergeMode; + const e = t[Er](); + if (e.length > 0) this._bindOccurrences(a, [e[0]], null); + else if (this.emptyMerge) { + const e = t[Hr] === Tn ? -1 : t[Hr], + i = (a[tr] = new XmlObject(e, a.name || "root")); + t[js](i); + this._bindElement(a, i); + } + continue; + } + if (!a[kr]()) continue; + let e = !1, + s = null, + r = null, + n = null; + if (a.bind) { + switch (a.bind.match) { + case "none": + this._setAndBind(a, t); + continue; + case "global": + e = !0; + break; + case "dataRef": + if (!a.bind.ref) { + warn(`XFA - ref is empty in node ${a[Yr]}.`); + this._setAndBind(a, t); + continue; + } + r = a.bind.ref; + } + a.bind.picture && (s = a.bind.picture[er]); + } + const [o, g] = this._getOccurInfo(a); + if (r) { + n = searchNode(this.root, t, r, !0, !1); + if (null === n) { + n = createDataNode(this.data, t, r); + if (!n) continue; + this._isConsumeData() && (n[Ar] = !0); + this._setAndBind(a, n); + continue; + } + this._isConsumeData() && (n = n.filter((e) => !e[Ar])); + n.length > g ? (n = n.slice(0, g)) : 0 === n.length && (n = null); + n && + this._isConsumeData() && + n.forEach((e) => { + e[Ar] = !0; + }); + } else { + if (!a.name) { + this._setAndBind(a, t); + continue; + } + if (this._isConsumeData()) { + const i = []; + for (; i.length < g; ) { + const s = this._findDataByNameToConsume(a.name, a[wr](), t, e); + if (!s) break; + s[Ar] = !0; + i.push(s); + } + n = i.length > 0 ? i : null; + } else { + n = t[Qr](a.name, !1, this.emptyMerge).next().value; + if (!n) { + if (0 === o) { + i.push(a); + continue; + } + const e = t[Hr] === Tn ? -1 : t[Hr]; + n = a[tr] = new XmlObject(e, a.name); + this.emptyMerge && (n[Ar] = !0); + t[js](n); + this._setAndBind(a, n); + continue; + } + this.emptyMerge && (n[Ar] = !0); + n = [n]; + } + } + n + ? this._bindOccurrences(a, n, s) + : o > 0 + ? this._setAndBind(a, t) + : i.push(a); + } + i.forEach((e) => e[pr]()[Xr](e)); + } +} +class DataHandler { + constructor(e, t) { + this.data = t; + this.dataset = e.datasets || null; + } + serialize(e) { + const t = [[-1, this.data[Er]()]]; + for (; t.length > 0; ) { + const i = t.at(-1), + [a, s] = i; + if (a + 1 === s.length) { + t.pop(); + continue; + } + const r = s[++i[0]], + n = e.get(r[nn]); + if (n) r[$r](n); + else { + const t = r[or](); + for (const i of t.values()) { + const t = e.get(i[nn]); + if (t) { + i[$r](t); + break; + } + } + } + const o = r[Er](); + o.length > 0 && t.push([-1, o]); + } + const i = [ + '', + ]; + if (this.dataset) + for (const e of this.dataset[Er]()) "data" !== e[Yr] && e[sn](i); + this.data[sn](i); + i.push(""); + return i.join(""); + } +} +const qn = gn.config.id; +class Acrobat extends XFAObject { + constructor(e) { + super(qn, "acrobat", !0); + this.acrobat7 = null; + this.autoSave = null; + this.common = null; + this.validate = null; + this.validateApprovalSignatures = null; + this.submitUrl = new XFAObjectArray(); + } +} +class Acrobat7 extends XFAObject { + constructor(e) { + super(qn, "acrobat7", !0); + this.dynamicRender = null; + } +} +class ADBE_JSConsole extends OptionObject { + constructor(e) { + super(qn, "ADBE_JSConsole", ["delegate", "Enable", "Disable"]); + } +} +class ADBE_JSDebugger extends OptionObject { + constructor(e) { + super(qn, "ADBE_JSDebugger", ["delegate", "Enable", "Disable"]); + } +} +class AddSilentPrint extends Option01 { + constructor(e) { + super(qn, "addSilentPrint"); + } +} +class AddViewerPreferences extends Option01 { + constructor(e) { + super(qn, "addViewerPreferences"); + } +} +class AdjustData extends Option10 { + constructor(e) { + super(qn, "adjustData"); + } +} +class AdobeExtensionLevel extends IntegerObject { + constructor(e) { + super(qn, "adobeExtensionLevel", 0, (e) => e >= 1 && e <= 8); + } +} +class Agent extends XFAObject { + constructor(e) { + super(qn, "agent", !0); + this.name = e.name ? e.name.trim() : ""; + this.common = new XFAObjectArray(); + } +} +class AlwaysEmbed extends ContentObject { + constructor(e) { + super(qn, "alwaysEmbed"); + } +} +class Amd extends StringObject { + constructor(e) { + super(qn, "amd"); + } +} +class config_Area extends XFAObject { + constructor(e) { + super(qn, "area"); + this.level = getInteger({ + data: e.level, + defaultValue: 0, + validate: (e) => e >= 1 && e <= 3, + }); + this.name = getStringOption(e.name, [ + "", + "barcode", + "coreinit", + "deviceDriver", + "font", + "general", + "layout", + "merge", + "script", + "signature", + "sourceSet", + "templateCache", + ]); + } +} +class Attributes extends OptionObject { + constructor(e) { + super(qn, "attributes", ["preserve", "delegate", "ignore"]); + } +} +class AutoSave extends OptionObject { + constructor(e) { + super(qn, "autoSave", ["disabled", "enabled"]); + } +} +class Base extends StringObject { + constructor(e) { + super(qn, "base"); + } +} +class BatchOutput extends XFAObject { + constructor(e) { + super(qn, "batchOutput"); + this.format = getStringOption(e.format, [ + "none", + "concat", + "zip", + "zipCompress", + ]); + } +} +class BehaviorOverride extends ContentObject { + constructor(e) { + super(qn, "behaviorOverride"); + } + [sr]() { + this[er] = new Map( + this[er] + .trim() + .split(/\s+/) + .filter((e) => e.includes(":")) + .map((e) => e.split(":", 2)), + ); + } +} +class Cache extends XFAObject { + constructor(e) { + super(qn, "cache", !0); + this.templateCache = null; + } +} +class Change extends Option01 { + constructor(e) { + super(qn, "change"); + } +} +class Common extends XFAObject { + constructor(e) { + super(qn, "common", !0); + this.data = null; + this.locale = null; + this.localeSet = null; + this.messaging = null; + this.suppressBanner = null; + this.template = null; + this.validationMessaging = null; + this.versionControl = null; + this.log = new XFAObjectArray(); + } +} +class Compress extends XFAObject { + constructor(e) { + super(qn, "compress"); + this.scope = getStringOption(e.scope, ["imageOnly", "document"]); + } +} +class CompressLogicalStructure extends Option01 { + constructor(e) { + super(qn, "compressLogicalStructure"); + } +} +class CompressObjectStream extends Option10 { + constructor(e) { + super(qn, "compressObjectStream"); + } +} +class Compression extends XFAObject { + constructor(e) { + super(qn, "compression", !0); + this.compressLogicalStructure = null; + this.compressObjectStream = null; + this.level = null; + this.type = null; + } +} +class Config extends XFAObject { + constructor(e) { + super(qn, "config", !0); + this.acrobat = null; + this.present = null; + this.trace = null; + this.agent = new XFAObjectArray(); + } +} +class Conformance extends OptionObject { + constructor(e) { + super(qn, "conformance", ["A", "B"]); + } +} +class ContentCopy extends Option01 { + constructor(e) { + super(qn, "contentCopy"); + } +} +class Copies extends IntegerObject { + constructor(e) { + super(qn, "copies", 1, (e) => e >= 1); + } +} +class Creator extends StringObject { + constructor(e) { + super(qn, "creator"); + } +} +class CurrentPage extends IntegerObject { + constructor(e) { + super(qn, "currentPage", 0, (e) => e >= 0); + } +} +class Data extends XFAObject { + constructor(e) { + super(qn, "data", !0); + this.adjustData = null; + this.attributes = null; + this.incrementalLoad = null; + this.outputXSL = null; + this.range = null; + this.record = null; + this.startNode = null; + this.uri = null; + this.window = null; + this.xsl = null; + this.excludeNS = new XFAObjectArray(); + this.transform = new XFAObjectArray(); + } +} +class Debug extends XFAObject { + constructor(e) { + super(qn, "debug", !0); + this.uri = null; + } +} +class DefaultTypeface extends ContentObject { + constructor(e) { + super(qn, "defaultTypeface"); + this.writingScript = getStringOption(e.writingScript, [ + "*", + "Arabic", + "Cyrillic", + "EastEuropeanRoman", + "Greek", + "Hebrew", + "Japanese", + "Korean", + "Roman", + "SimplifiedChinese", + "Thai", + "TraditionalChinese", + "Vietnamese", + ]); + } +} +class Destination extends OptionObject { + constructor(e) { + super(qn, "destination", ["pdf", "pcl", "ps", "webClient", "zpl"]); + } +} +class DocumentAssembly extends Option01 { + constructor(e) { + super(qn, "documentAssembly"); + } +} +class Driver extends XFAObject { + constructor(e) { + super(qn, "driver", !0); + this.name = e.name ? e.name.trim() : ""; + this.fontInfo = null; + this.xdc = null; + } +} +class DuplexOption extends OptionObject { + constructor(e) { + super(qn, "duplexOption", [ + "simplex", + "duplexFlipLongEdge", + "duplexFlipShortEdge", + ]); + } +} +class DynamicRender extends OptionObject { + constructor(e) { + super(qn, "dynamicRender", ["forbidden", "required"]); + } +} +class Embed extends Option01 { + constructor(e) { + super(qn, "embed"); + } +} +class config_Encrypt extends Option01 { + constructor(e) { + super(qn, "encrypt"); + } +} +class config_Encryption extends XFAObject { + constructor(e) { + super(qn, "encryption", !0); + this.encrypt = null; + this.encryptionLevel = null; + this.permissions = null; + } +} +class EncryptionLevel extends OptionObject { + constructor(e) { + super(qn, "encryptionLevel", ["40bit", "128bit"]); + } +} +class Enforce extends StringObject { + constructor(e) { + super(qn, "enforce"); + } +} +class Equate extends XFAObject { + constructor(e) { + super(qn, "equate"); + this.force = getInteger({ + data: e.force, + defaultValue: 1, + validate: (e) => 0 === e, + }); + this.from = e.from || ""; + this.to = e.to || ""; + } +} +class EquateRange extends XFAObject { + constructor(e) { + super(qn, "equateRange"); + this.from = e.from || ""; + this.to = e.to || ""; + this._unicodeRange = e.unicodeRange || ""; + } + get unicodeRange() { + const e = [], + t = /U\+([0-9a-fA-F]+)/, + i = this._unicodeRange; + for (let a of i + .split(",") + .map((e) => e.trim()) + .filter((e) => !!e)) { + a = a.split("-", 2).map((e) => { + const i = e.match(t); + return i ? parseInt(i[1], 16) : 0; + }); + 1 === a.length && a.push(a[0]); + e.push(a); + } + return shadow(this, "unicodeRange", e); + } +} +class Exclude extends ContentObject { + constructor(e) { + super(qn, "exclude"); + } + [sr]() { + this[er] = this[er] + .trim() + .split(/\s+/) + .filter( + (e) => + e && + [ + "calculate", + "close", + "enter", + "exit", + "initialize", + "ready", + "validate", + ].includes(e), + ); + } +} +class ExcludeNS extends StringObject { + constructor(e) { + super(qn, "excludeNS"); + } +} +class FlipLabel extends OptionObject { + constructor(e) { + super(qn, "flipLabel", ["usePrinterSetting", "on", "off"]); + } +} +class config_FontInfo extends XFAObject { + constructor(e) { + super(qn, "fontInfo", !0); + this.embed = null; + this.map = null; + this.subsetBelow = null; + this.alwaysEmbed = new XFAObjectArray(); + this.defaultTypeface = new XFAObjectArray(); + this.neverEmbed = new XFAObjectArray(); + } +} +class FormFieldFilling extends Option01 { + constructor(e) { + super(qn, "formFieldFilling"); + } +} +class GroupParent extends StringObject { + constructor(e) { + super(qn, "groupParent"); + } +} +class IfEmpty extends OptionObject { + constructor(e) { + super(qn, "ifEmpty", ["dataValue", "dataGroup", "ignore", "remove"]); + } +} +class IncludeXDPContent extends StringObject { + constructor(e) { + super(qn, "includeXDPContent"); + } +} +class IncrementalLoad extends OptionObject { + constructor(e) { + super(qn, "incrementalLoad", ["none", "forwardOnly"]); + } +} +class IncrementalMerge extends Option01 { + constructor(e) { + super(qn, "incrementalMerge"); + } +} +class Interactive extends Option01 { + constructor(e) { + super(qn, "interactive"); + } +} +class Jog extends OptionObject { + constructor(e) { + super(qn, "jog", ["usePrinterSetting", "none", "pageSet"]); + } +} +class LabelPrinter extends XFAObject { + constructor(e) { + super(qn, "labelPrinter", !0); + this.name = getStringOption(e.name, ["zpl", "dpl", "ipl", "tcpl"]); + this.batchOutput = null; + this.flipLabel = null; + this.fontInfo = null; + this.xdc = null; + } +} +class Layout extends OptionObject { + constructor(e) { + super(qn, "layout", ["paginate", "panel"]); + } +} +class Level extends IntegerObject { + constructor(e) { + super(qn, "level", 0, (e) => e > 0); + } +} +class Linearized extends Option01 { + constructor(e) { + super(qn, "linearized"); + } +} +class Locale extends StringObject { + constructor(e) { + super(qn, "locale"); + } +} +class LocaleSet extends StringObject { + constructor(e) { + super(qn, "localeSet"); + } +} +class Log extends XFAObject { + constructor(e) { + super(qn, "log", !0); + this.mode = null; + this.threshold = null; + this.to = null; + this.uri = null; + } +} +class MapElement extends XFAObject { + constructor(e) { + super(qn, "map", !0); + this.equate = new XFAObjectArray(); + this.equateRange = new XFAObjectArray(); + } +} +class MediumInfo extends XFAObject { + constructor(e) { + super(qn, "mediumInfo", !0); + this.map = null; + } +} +class config_Message extends XFAObject { + constructor(e) { + super(qn, "message", !0); + this.msgId = null; + this.severity = null; + } +} +class Messaging extends XFAObject { + constructor(e) { + super(qn, "messaging", !0); + this.message = new XFAObjectArray(); + } +} +class Mode extends OptionObject { + constructor(e) { + super(qn, "mode", ["append", "overwrite"]); + } +} +class ModifyAnnots extends Option01 { + constructor(e) { + super(qn, "modifyAnnots"); + } +} +class MsgId extends IntegerObject { + constructor(e) { + super(qn, "msgId", 1, (e) => e >= 1); + } +} +class NameAttr extends StringObject { + constructor(e) { + super(qn, "nameAttr"); + } +} +class NeverEmbed extends ContentObject { + constructor(e) { + super(qn, "neverEmbed"); + } +} +class NumberOfCopies extends IntegerObject { + constructor(e) { + super(qn, "numberOfCopies", null, (e) => e >= 2 && e <= 5); + } +} +class OpenAction extends XFAObject { + constructor(e) { + super(qn, "openAction", !0); + this.destination = null; + } +} +class Output extends XFAObject { + constructor(e) { + super(qn, "output", !0); + this.to = null; + this.type = null; + this.uri = null; + } +} +class OutputBin extends StringObject { + constructor(e) { + super(qn, "outputBin"); + } +} +class OutputXSL extends XFAObject { + constructor(e) { + super(qn, "outputXSL", !0); + this.uri = null; + } +} +class Overprint extends OptionObject { + constructor(e) { + super(qn, "overprint", ["none", "both", "draw", "field"]); + } +} +class Packets extends StringObject { + constructor(e) { + super(qn, "packets"); + } + [sr]() { + "*" !== this[er] && + (this[er] = this[er] + .trim() + .split(/\s+/) + .filter((e) => + ["config", "datasets", "template", "xfdf", "xslt"].includes(e), + )); + } +} +class PageOffset extends XFAObject { + constructor(e) { + super(qn, "pageOffset"); + this.x = getInteger({ + data: e.x, + defaultValue: "useXDCSetting", + validate: (e) => !0, + }); + this.y = getInteger({ + data: e.y, + defaultValue: "useXDCSetting", + validate: (e) => !0, + }); + } +} +class PageRange extends StringObject { + constructor(e) { + super(qn, "pageRange"); + } + [sr]() { + const e = this[er] + .trim() + .split(/\s+/) + .map((e) => parseInt(e, 10)), + t = []; + for (let i = 0, a = e.length; i < a; i += 2) t.push(e.slice(i, i + 2)); + this[er] = t; + } +} +class Pagination extends OptionObject { + constructor(e) { + super(qn, "pagination", ["simplex", "duplexShortEdge", "duplexLongEdge"]); + } +} +class PaginationOverride extends OptionObject { + constructor(e) { + super(qn, "paginationOverride", [ + "none", + "forceDuplex", + "forceDuplexLongEdge", + "forceDuplexShortEdge", + "forceSimplex", + ]); + } +} +class Part extends IntegerObject { + constructor(e) { + super(qn, "part", 1, (e) => !1); + } +} +class Pcl extends XFAObject { + constructor(e) { + super(qn, "pcl", !0); + this.name = e.name || ""; + this.batchOutput = null; + this.fontInfo = null; + this.jog = null; + this.mediumInfo = null; + this.outputBin = null; + this.pageOffset = null; + this.staple = null; + this.xdc = null; + } +} +class Pdf extends XFAObject { + constructor(e) { + super(qn, "pdf", !0); + this.name = e.name || ""; + this.adobeExtensionLevel = null; + this.batchOutput = null; + this.compression = null; + this.creator = null; + this.encryption = null; + this.fontInfo = null; + this.interactive = null; + this.linearized = null; + this.openAction = null; + this.pdfa = null; + this.producer = null; + this.renderPolicy = null; + this.scriptModel = null; + this.silentPrint = null; + this.submitFormat = null; + this.tagged = null; + this.version = null; + this.viewerPreferences = null; + this.xdc = null; + } +} +class Pdfa extends XFAObject { + constructor(e) { + super(qn, "pdfa", !0); + this.amd = null; + this.conformance = null; + this.includeXDPContent = null; + this.part = null; + } +} +class Permissions extends XFAObject { + constructor(e) { + super(qn, "permissions", !0); + this.accessibleContent = null; + this.change = null; + this.contentCopy = null; + this.documentAssembly = null; + this.formFieldFilling = null; + this.modifyAnnots = null; + this.plaintextMetadata = null; + this.print = null; + this.printHighQuality = null; + } +} +class PickTrayByPDFSize extends Option01 { + constructor(e) { + super(qn, "pickTrayByPDFSize"); + } +} +class config_Picture extends StringObject { + constructor(e) { + super(qn, "picture"); + } +} +class PlaintextMetadata extends Option01 { + constructor(e) { + super(qn, "plaintextMetadata"); + } +} +class Presence extends OptionObject { + constructor(e) { + super(qn, "presence", [ + "preserve", + "dissolve", + "dissolveStructure", + "ignore", + "remove", + ]); + } +} +class Present extends XFAObject { + constructor(e) { + super(qn, "present", !0); + this.behaviorOverride = null; + this.cache = null; + this.common = null; + this.copies = null; + this.destination = null; + this.incrementalMerge = null; + this.layout = null; + this.output = null; + this.overprint = null; + this.pagination = null; + this.paginationOverride = null; + this.script = null; + this.validate = null; + this.xdp = null; + this.driver = new XFAObjectArray(); + this.labelPrinter = new XFAObjectArray(); + this.pcl = new XFAObjectArray(); + this.pdf = new XFAObjectArray(); + this.ps = new XFAObjectArray(); + this.submitUrl = new XFAObjectArray(); + this.webClient = new XFAObjectArray(); + this.zpl = new XFAObjectArray(); + } +} +class Print extends Option01 { + constructor(e) { + super(qn, "print"); + } +} +class PrintHighQuality extends Option01 { + constructor(e) { + super(qn, "printHighQuality"); + } +} +class PrintScaling extends OptionObject { + constructor(e) { + super(qn, "printScaling", ["appdefault", "noScaling"]); + } +} +class PrinterName extends StringObject { + constructor(e) { + super(qn, "printerName"); + } +} +class Producer extends StringObject { + constructor(e) { + super(qn, "producer"); + } +} +class Ps extends XFAObject { + constructor(e) { + super(qn, "ps", !0); + this.name = e.name || ""; + this.batchOutput = null; + this.fontInfo = null; + this.jog = null; + this.mediumInfo = null; + this.outputBin = null; + this.staple = null; + this.xdc = null; + } +} +class Range extends ContentObject { + constructor(e) { + super(qn, "range"); + } + [sr]() { + this[er] = this[er] + .trim() + .split(/\s*,\s*/, 2) + .map((e) => e.split("-").map((e) => parseInt(e.trim(), 10))) + .filter((e) => e.every((e) => !isNaN(e))) + .map((e) => { + 1 === e.length && e.push(e[0]); + return e; + }); + } +} +class Record extends ContentObject { + constructor(e) { + super(qn, "record"); + } + [sr]() { + this[er] = this[er].trim(); + const e = parseInt(this[er], 10); + !isNaN(e) && e >= 0 && (this[er] = e); + } +} +class Relevant extends ContentObject { + constructor(e) { + super(qn, "relevant"); + } + [sr]() { + this[er] = this[er].trim().split(/\s+/); + } +} +class Rename extends ContentObject { + constructor(e) { + super(qn, "rename"); + } + [sr]() { + this[er] = this[er].trim(); + (this[er].toLowerCase().startsWith("xml") || + new RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*", "u").test(this[er])) && + warn("XFA - Rename: invalid XFA name"); + } +} +class RenderPolicy extends OptionObject { + constructor(e) { + super(qn, "renderPolicy", ["server", "client"]); + } +} +class RunScripts extends OptionObject { + constructor(e) { + super(qn, "runScripts", ["both", "client", "none", "server"]); + } +} +class config_Script extends XFAObject { + constructor(e) { + super(qn, "script", !0); + this.currentPage = null; + this.exclude = null; + this.runScripts = null; + } +} +class ScriptModel extends OptionObject { + constructor(e) { + super(qn, "scriptModel", ["XFA", "none"]); + } +} +class Severity extends OptionObject { + constructor(e) { + super(qn, "severity", [ + "ignore", + "error", + "information", + "trace", + "warning", + ]); + } +} +class SilentPrint extends XFAObject { + constructor(e) { + super(qn, "silentPrint", !0); + this.addSilentPrint = null; + this.printerName = null; + } +} +class Staple extends XFAObject { + constructor(e) { + super(qn, "staple"); + this.mode = getStringOption(e.mode, ["usePrinterSetting", "on", "off"]); + } +} +class StartNode extends StringObject { + constructor(e) { + super(qn, "startNode"); + } +} +class StartPage extends IntegerObject { + constructor(e) { + super(qn, "startPage", 0, (e) => !0); + } +} +class SubmitFormat extends OptionObject { + constructor(e) { + super(qn, "submitFormat", ["html", "delegate", "fdf", "xml", "pdf"]); + } +} +class SubmitUrl extends StringObject { + constructor(e) { + super(qn, "submitUrl"); + } +} +class SubsetBelow extends IntegerObject { + constructor(e) { + super(qn, "subsetBelow", 100, (e) => e >= 0 && e <= 100); + } +} +class SuppressBanner extends Option01 { + constructor(e) { + super(qn, "suppressBanner"); + } +} +class Tagged extends Option01 { + constructor(e) { + super(qn, "tagged"); + } +} +class config_Template extends XFAObject { + constructor(e) { + super(qn, "template", !0); + this.base = null; + this.relevant = null; + this.startPage = null; + this.uri = null; + this.xsl = null; + } +} +class Threshold extends OptionObject { + constructor(e) { + super(qn, "threshold", ["trace", "error", "information", "warning"]); + } +} +class To extends OptionObject { + constructor(e) { + super(qn, "to", ["null", "memory", "stderr", "stdout", "system", "uri"]); + } +} +class TemplateCache extends XFAObject { + constructor(e) { + super(qn, "templateCache"); + this.maxEntries = getInteger({ + data: e.maxEntries, + defaultValue: 5, + validate: (e) => e >= 0, + }); + } +} +class Trace extends XFAObject { + constructor(e) { + super(qn, "trace", !0); + this.area = new XFAObjectArray(); + } +} +class Transform extends XFAObject { + constructor(e) { + super(qn, "transform", !0); + this.groupParent = null; + this.ifEmpty = null; + this.nameAttr = null; + this.picture = null; + this.presence = null; + this.rename = null; + this.whitespace = null; + } +} +class Type extends OptionObject { + constructor(e) { + super(qn, "type", [ + "none", + "ascii85", + "asciiHex", + "ccittfax", + "flate", + "lzw", + "runLength", + "native", + "xdp", + "mergedXDP", + ]); + } +} +class Uri extends StringObject { + constructor(e) { + super(qn, "uri"); + } +} +class config_Validate extends OptionObject { + constructor(e) { + super(qn, "validate", ["preSubmit", "prePrint", "preExecute", "preSave"]); + } +} +class ValidateApprovalSignatures extends ContentObject { + constructor(e) { + super(qn, "validateApprovalSignatures"); + } + [sr]() { + this[er] = this[er] + .trim() + .split(/\s+/) + .filter((e) => ["docReady", "postSign"].includes(e)); + } +} +class ValidationMessaging extends OptionObject { + constructor(e) { + super(qn, "validationMessaging", [ + "allMessagesIndividually", + "allMessagesTogether", + "firstMessageOnly", + "noMessages", + ]); + } +} +class Version extends OptionObject { + constructor(e) { + super(qn, "version", ["1.7", "1.6", "1.5", "1.4", "1.3", "1.2"]); + } +} +class VersionControl extends XFAObject { + constructor(e) { + super(qn, "VersionControl"); + this.outputBelow = getStringOption(e.outputBelow, [ + "warn", + "error", + "update", + ]); + this.sourceAbove = getStringOption(e.sourceAbove, ["warn", "error"]); + this.sourceBelow = getStringOption(e.sourceBelow, ["update", "maintain"]); + } +} +class ViewerPreferences extends XFAObject { + constructor(e) { + super(qn, "viewerPreferences", !0); + this.ADBE_JSConsole = null; + this.ADBE_JSDebugger = null; + this.addViewerPreferences = null; + this.duplexOption = null; + this.enforce = null; + this.numberOfCopies = null; + this.pageRange = null; + this.pickTrayByPDFSize = null; + this.printScaling = null; + } +} +class WebClient extends XFAObject { + constructor(e) { + super(qn, "webClient", !0); + this.name = e.name ? e.name.trim() : ""; + this.fontInfo = null; + this.xdc = null; + } +} +class Whitespace extends OptionObject { + constructor(e) { + super(qn, "whitespace", [ + "preserve", + "ltrim", + "normalize", + "rtrim", + "trim", + ]); + } +} +class Window extends ContentObject { + constructor(e) { + super(qn, "window"); + } + [sr]() { + const e = this[er] + .trim() + .split(/\s*,\s*/, 2) + .map((e) => parseInt(e, 10)); + if (e.some((e) => isNaN(e))) this[er] = [0, 0]; + else { + 1 === e.length && e.push(e[0]); + this[er] = e; + } + } +} +class Xdc extends XFAObject { + constructor(e) { + super(qn, "xdc", !0); + this.uri = new XFAObjectArray(); + this.xsl = new XFAObjectArray(); + } +} +class Xdp extends XFAObject { + constructor(e) { + super(qn, "xdp", !0); + this.packets = null; + } +} +class Xsl extends XFAObject { + constructor(e) { + super(qn, "xsl", !0); + this.debug = null; + this.uri = null; + } +} +class Zpl extends XFAObject { + constructor(e) { + super(qn, "zpl", !0); + this.name = e.name ? e.name.trim() : ""; + this.batchOutput = null; + this.flipLabel = null; + this.fontInfo = null; + this.xdc = null; + } +} +class ConfigNamespace { + static [on](e, t) { + if (ConfigNamespace.hasOwnProperty(e)) return ConfigNamespace[e](t); + } + static acrobat(e) { + return new Acrobat(e); + } + static acrobat7(e) { + return new Acrobat7(e); + } + static ADBE_JSConsole(e) { + return new ADBE_JSConsole(e); + } + static ADBE_JSDebugger(e) { + return new ADBE_JSDebugger(e); + } + static addSilentPrint(e) { + return new AddSilentPrint(e); + } + static addViewerPreferences(e) { + return new AddViewerPreferences(e); + } + static adjustData(e) { + return new AdjustData(e); + } + static adobeExtensionLevel(e) { + return new AdobeExtensionLevel(e); + } + static agent(e) { + return new Agent(e); + } + static alwaysEmbed(e) { + return new AlwaysEmbed(e); + } + static amd(e) { + return new Amd(e); + } + static area(e) { + return new config_Area(e); + } + static attributes(e) { + return new Attributes(e); + } + static autoSave(e) { + return new AutoSave(e); + } + static base(e) { + return new Base(e); + } + static batchOutput(e) { + return new BatchOutput(e); + } + static behaviorOverride(e) { + return new BehaviorOverride(e); + } + static cache(e) { + return new Cache(e); + } + static change(e) { + return new Change(e); + } + static common(e) { + return new Common(e); + } + static compress(e) { + return new Compress(e); + } + static compressLogicalStructure(e) { + return new CompressLogicalStructure(e); + } + static compressObjectStream(e) { + return new CompressObjectStream(e); + } + static compression(e) { + return new Compression(e); + } + static config(e) { + return new Config(e); + } + static conformance(e) { + return new Conformance(e); + } + static contentCopy(e) { + return new ContentCopy(e); + } + static copies(e) { + return new Copies(e); + } + static creator(e) { + return new Creator(e); + } + static currentPage(e) { + return new CurrentPage(e); + } + static data(e) { + return new Data(e); + } + static debug(e) { + return new Debug(e); + } + static defaultTypeface(e) { + return new DefaultTypeface(e); + } + static destination(e) { + return new Destination(e); + } + static documentAssembly(e) { + return new DocumentAssembly(e); + } + static driver(e) { + return new Driver(e); + } + static duplexOption(e) { + return new DuplexOption(e); + } + static dynamicRender(e) { + return new DynamicRender(e); + } + static embed(e) { + return new Embed(e); + } + static encrypt(e) { + return new config_Encrypt(e); + } + static encryption(e) { + return new config_Encryption(e); + } + static encryptionLevel(e) { + return new EncryptionLevel(e); + } + static enforce(e) { + return new Enforce(e); + } + static equate(e) { + return new Equate(e); + } + static equateRange(e) { + return new EquateRange(e); + } + static exclude(e) { + return new Exclude(e); + } + static excludeNS(e) { + return new ExcludeNS(e); + } + static flipLabel(e) { + return new FlipLabel(e); + } + static fontInfo(e) { + return new config_FontInfo(e); + } + static formFieldFilling(e) { + return new FormFieldFilling(e); + } + static groupParent(e) { + return new GroupParent(e); + } + static ifEmpty(e) { + return new IfEmpty(e); + } + static includeXDPContent(e) { + return new IncludeXDPContent(e); + } + static incrementalLoad(e) { + return new IncrementalLoad(e); + } + static incrementalMerge(e) { + return new IncrementalMerge(e); + } + static interactive(e) { + return new Interactive(e); + } + static jog(e) { + return new Jog(e); + } + static labelPrinter(e) { + return new LabelPrinter(e); + } + static layout(e) { + return new Layout(e); + } + static level(e) { + return new Level(e); + } + static linearized(e) { + return new Linearized(e); + } + static locale(e) { + return new Locale(e); + } + static localeSet(e) { + return new LocaleSet(e); + } + static log(e) { + return new Log(e); + } + static map(e) { + return new MapElement(e); + } + static mediumInfo(e) { + return new MediumInfo(e); + } + static message(e) { + return new config_Message(e); + } + static messaging(e) { + return new Messaging(e); + } + static mode(e) { + return new Mode(e); + } + static modifyAnnots(e) { + return new ModifyAnnots(e); + } + static msgId(e) { + return new MsgId(e); + } + static nameAttr(e) { + return new NameAttr(e); + } + static neverEmbed(e) { + return new NeverEmbed(e); + } + static numberOfCopies(e) { + return new NumberOfCopies(e); + } + static openAction(e) { + return new OpenAction(e); + } + static output(e) { + return new Output(e); + } + static outputBin(e) { + return new OutputBin(e); + } + static outputXSL(e) { + return new OutputXSL(e); + } + static overprint(e) { + return new Overprint(e); + } + static packets(e) { + return new Packets(e); + } + static pageOffset(e) { + return new PageOffset(e); + } + static pageRange(e) { + return new PageRange(e); + } + static pagination(e) { + return new Pagination(e); + } + static paginationOverride(e) { + return new PaginationOverride(e); + } + static part(e) { + return new Part(e); + } + static pcl(e) { + return new Pcl(e); + } + static pdf(e) { + return new Pdf(e); + } + static pdfa(e) { + return new Pdfa(e); + } + static permissions(e) { + return new Permissions(e); + } + static pickTrayByPDFSize(e) { + return new PickTrayByPDFSize(e); + } + static picture(e) { + return new config_Picture(e); + } + static plaintextMetadata(e) { + return new PlaintextMetadata(e); + } + static presence(e) { + return new Presence(e); + } + static present(e) { + return new Present(e); + } + static print(e) { + return new Print(e); + } + static printHighQuality(e) { + return new PrintHighQuality(e); + } + static printScaling(e) { + return new PrintScaling(e); + } + static printerName(e) { + return new PrinterName(e); + } + static producer(e) { + return new Producer(e); + } + static ps(e) { + return new Ps(e); + } + static range(e) { + return new Range(e); + } + static record(e) { + return new Record(e); + } + static relevant(e) { + return new Relevant(e); + } + static rename(e) { + return new Rename(e); + } + static renderPolicy(e) { + return new RenderPolicy(e); + } + static runScripts(e) { + return new RunScripts(e); + } + static script(e) { + return new config_Script(e); + } + static scriptModel(e) { + return new ScriptModel(e); + } + static severity(e) { + return new Severity(e); + } + static silentPrint(e) { + return new SilentPrint(e); + } + static staple(e) { + return new Staple(e); + } + static startNode(e) { + return new StartNode(e); + } + static startPage(e) { + return new StartPage(e); + } + static submitFormat(e) { + return new SubmitFormat(e); + } + static submitUrl(e) { + return new SubmitUrl(e); + } + static subsetBelow(e) { + return new SubsetBelow(e); + } + static suppressBanner(e) { + return new SuppressBanner(e); + } + static tagged(e) { + return new Tagged(e); + } + static template(e) { + return new config_Template(e); + } + static templateCache(e) { + return new TemplateCache(e); + } + static threshold(e) { + return new Threshold(e); + } + static to(e) { + return new To(e); + } + static trace(e) { + return new Trace(e); + } + static transform(e) { + return new Transform(e); + } + static type(e) { + return new Type(e); + } + static uri(e) { + return new Uri(e); + } + static validate(e) { + return new config_Validate(e); + } + static validateApprovalSignatures(e) { + return new ValidateApprovalSignatures(e); + } + static validationMessaging(e) { + return new ValidationMessaging(e); + } + static version(e) { + return new Version(e); + } + static versionControl(e) { + return new VersionControl(e); + } + static viewerPreferences(e) { + return new ViewerPreferences(e); + } + static webClient(e) { + return new WebClient(e); + } + static whitespace(e) { + return new Whitespace(e); + } + static window(e) { + return new Window(e); + } + static xdc(e) { + return new Xdc(e); + } + static xdp(e) { + return new Xdp(e); + } + static xsl(e) { + return new Xsl(e); + } + static zpl(e) { + return new Zpl(e); + } +} +const On = gn.connectionSet.id; +class ConnectionSet extends XFAObject { + constructor(e) { + super(On, "connectionSet", !0); + this.wsdlConnection = new XFAObjectArray(); + this.xmlConnection = new XFAObjectArray(); + this.xsdConnection = new XFAObjectArray(); + } +} +class EffectiveInputPolicy extends XFAObject { + constructor(e) { + super(On, "effectiveInputPolicy"); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class EffectiveOutputPolicy extends XFAObject { + constructor(e) { + super(On, "effectiveOutputPolicy"); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class Operation extends StringObject { + constructor(e) { + super(On, "operation"); + this.id = e.id || ""; + this.input = e.input || ""; + this.name = e.name || ""; + this.output = e.output || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class RootElement extends StringObject { + constructor(e) { + super(On, "rootElement"); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class SoapAction extends StringObject { + constructor(e) { + super(On, "soapAction"); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class SoapAddress extends StringObject { + constructor(e) { + super(On, "soapAddress"); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class connection_set_Uri extends StringObject { + constructor(e) { + super(On, "uri"); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class WsdlAddress extends StringObject { + constructor(e) { + super(On, "wsdlAddress"); + this.id = e.id || ""; + this.name = e.name || ""; + this.use = e.use || ""; + this.usehref = e.usehref || ""; + } +} +class WsdlConnection extends XFAObject { + constructor(e) { + super(On, "wsdlConnection", !0); + this.dataDescription = e.dataDescription || ""; + this.name = e.name || ""; + this.effectiveInputPolicy = null; + this.effectiveOutputPolicy = null; + this.operation = null; + this.soapAction = null; + this.soapAddress = null; + this.wsdlAddress = null; + } +} +class XmlConnection extends XFAObject { + constructor(e) { + super(On, "xmlConnection", !0); + this.dataDescription = e.dataDescription || ""; + this.name = e.name || ""; + this.uri = null; + } +} +class XsdConnection extends XFAObject { + constructor(e) { + super(On, "xsdConnection", !0); + this.dataDescription = e.dataDescription || ""; + this.name = e.name || ""; + this.rootElement = null; + this.uri = null; + } +} +class ConnectionSetNamespace { + static [on](e, t) { + if (ConnectionSetNamespace.hasOwnProperty(e)) + return ConnectionSetNamespace[e](t); + } + static connectionSet(e) { + return new ConnectionSet(e); + } + static effectiveInputPolicy(e) { + return new EffectiveInputPolicy(e); + } + static effectiveOutputPolicy(e) { + return new EffectiveOutputPolicy(e); + } + static operation(e) { + return new Operation(e); + } + static rootElement(e) { + return new RootElement(e); + } + static soapAction(e) { + return new SoapAction(e); + } + static soapAddress(e) { + return new SoapAddress(e); + } + static uri(e) { + return new connection_set_Uri(e); + } + static wsdlAddress(e) { + return new WsdlAddress(e); + } + static wsdlConnection(e) { + return new WsdlConnection(e); + } + static xmlConnection(e) { + return new XmlConnection(e); + } + static xsdConnection(e) { + return new XsdConnection(e); + } +} +const Pn = gn.datasets.id; +class datasets_Data extends XmlObject { + constructor(e) { + super(Pn, "data", e); + } + [Gr]() { + return !0; + } +} +class Datasets extends XFAObject { + constructor(e) { + super(Pn, "datasets", !0); + this.data = null; + this.Signature = null; + } + [Kr](e) { + const t = e[Yr]; + (("data" === t && e[Hr] === Pn) || + ("Signature" === t && e[Hr] === gn.signature.id)) && + (this[t] = e); + this[js](e); + } +} +class DatasetsNamespace { + static [on](e, t) { + if (DatasetsNamespace.hasOwnProperty(e)) return DatasetsNamespace[e](t); + } + static datasets(e) { + return new Datasets(e); + } + static data(e) { + return new datasets_Data(e); + } +} +const Wn = gn.localeSet.id; +class CalendarSymbols extends XFAObject { + constructor(e) { + super(Wn, "calendarSymbols", !0); + this.name = "gregorian"; + this.dayNames = new XFAObjectArray(2); + this.eraNames = null; + this.meridiemNames = null; + this.monthNames = new XFAObjectArray(2); + } +} +class CurrencySymbol extends StringObject { + constructor(e) { + super(Wn, "currencySymbol"); + this.name = getStringOption(e.name, ["symbol", "isoname", "decimal"]); + } +} +class CurrencySymbols extends XFAObject { + constructor(e) { + super(Wn, "currencySymbols", !0); + this.currencySymbol = new XFAObjectArray(3); + } +} +class DatePattern extends StringObject { + constructor(e) { + super(Wn, "datePattern"); + this.name = getStringOption(e.name, ["full", "long", "med", "short"]); + } +} +class DatePatterns extends XFAObject { + constructor(e) { + super(Wn, "datePatterns", !0); + this.datePattern = new XFAObjectArray(4); + } +} +class DateTimeSymbols extends ContentObject { + constructor(e) { + super(Wn, "dateTimeSymbols"); + } +} +class Day extends StringObject { + constructor(e) { + super(Wn, "day"); + } +} +class DayNames extends XFAObject { + constructor(e) { + super(Wn, "dayNames", !0); + this.abbr = getInteger({ + data: e.abbr, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.day = new XFAObjectArray(7); + } +} +class Era extends StringObject { + constructor(e) { + super(Wn, "era"); + } +} +class EraNames extends XFAObject { + constructor(e) { + super(Wn, "eraNames", !0); + this.era = new XFAObjectArray(2); + } +} +class locale_set_Locale extends XFAObject { + constructor(e) { + super(Wn, "locale", !0); + this.desc = e.desc || ""; + this.name = "isoname"; + this.calendarSymbols = null; + this.currencySymbols = null; + this.datePatterns = null; + this.dateTimeSymbols = null; + this.numberPatterns = null; + this.numberSymbols = null; + this.timePatterns = null; + this.typeFaces = null; + } +} +class locale_set_LocaleSet extends XFAObject { + constructor(e) { + super(Wn, "localeSet", !0); + this.locale = new XFAObjectArray(); + } +} +class Meridiem extends StringObject { + constructor(e) { + super(Wn, "meridiem"); + } +} +class MeridiemNames extends XFAObject { + constructor(e) { + super(Wn, "meridiemNames", !0); + this.meridiem = new XFAObjectArray(2); + } +} +class Month extends StringObject { + constructor(e) { + super(Wn, "month"); + } +} +class MonthNames extends XFAObject { + constructor(e) { + super(Wn, "monthNames", !0); + this.abbr = getInteger({ + data: e.abbr, + defaultValue: 0, + validate: (e) => 1 === e, + }); + this.month = new XFAObjectArray(12); + } +} +class NumberPattern extends StringObject { + constructor(e) { + super(Wn, "numberPattern"); + this.name = getStringOption(e.name, ["full", "long", "med", "short"]); + } +} +class NumberPatterns extends XFAObject { + constructor(e) { + super(Wn, "numberPatterns", !0); + this.numberPattern = new XFAObjectArray(4); + } +} +class NumberSymbol extends StringObject { + constructor(e) { + super(Wn, "numberSymbol"); + this.name = getStringOption(e.name, [ + "decimal", + "grouping", + "percent", + "minus", + "zero", + ]); + } +} +class NumberSymbols extends XFAObject { + constructor(e) { + super(Wn, "numberSymbols", !0); + this.numberSymbol = new XFAObjectArray(5); + } +} +class TimePattern extends StringObject { + constructor(e) { + super(Wn, "timePattern"); + this.name = getStringOption(e.name, ["full", "long", "med", "short"]); + } +} +class TimePatterns extends XFAObject { + constructor(e) { + super(Wn, "timePatterns", !0); + this.timePattern = new XFAObjectArray(4); + } +} +class TypeFace extends XFAObject { + constructor(e) { + super(Wn, "typeFace", !0); + this.name = "" | e.name; + } +} +class TypeFaces extends XFAObject { + constructor(e) { + super(Wn, "typeFaces", !0); + this.typeFace = new XFAObjectArray(); + } +} +class LocaleSetNamespace { + static [on](e, t) { + if (LocaleSetNamespace.hasOwnProperty(e)) return LocaleSetNamespace[e](t); + } + static calendarSymbols(e) { + return new CalendarSymbols(e); + } + static currencySymbol(e) { + return new CurrencySymbol(e); + } + static currencySymbols(e) { + return new CurrencySymbols(e); + } + static datePattern(e) { + return new DatePattern(e); + } + static datePatterns(e) { + return new DatePatterns(e); + } + static dateTimeSymbols(e) { + return new DateTimeSymbols(e); + } + static day(e) { + return new Day(e); + } + static dayNames(e) { + return new DayNames(e); + } + static era(e) { + return new Era(e); + } + static eraNames(e) { + return new EraNames(e); + } + static locale(e) { + return new locale_set_Locale(e); + } + static localeSet(e) { + return new locale_set_LocaleSet(e); + } + static meridiem(e) { + return new Meridiem(e); + } + static meridiemNames(e) { + return new MeridiemNames(e); + } + static month(e) { + return new Month(e); + } + static monthNames(e) { + return new MonthNames(e); + } + static numberPattern(e) { + return new NumberPattern(e); + } + static numberPatterns(e) { + return new NumberPatterns(e); + } + static numberSymbol(e) { + return new NumberSymbol(e); + } + static numberSymbols(e) { + return new NumberSymbols(e); + } + static timePattern(e) { + return new TimePattern(e); + } + static timePatterns(e) { + return new TimePatterns(e); + } + static typeFace(e) { + return new TypeFace(e); + } + static typeFaces(e) { + return new TypeFaces(e); + } +} +const Xn = gn.signature.id; +class signature_Signature extends XFAObject { + constructor(e) { + super(Xn, "signature", !0); + } +} +class SignatureNamespace { + static [on](e, t) { + if (SignatureNamespace.hasOwnProperty(e)) return SignatureNamespace[e](t); + } + static signature(e) { + return new signature_Signature(e); + } +} +const jn = gn.stylesheet.id; +class Stylesheet extends XFAObject { + constructor(e) { + super(jn, "stylesheet", !0); + } +} +class StylesheetNamespace { + static [on](e, t) { + if (StylesheetNamespace.hasOwnProperty(e)) return StylesheetNamespace[e](t); + } + static stylesheet(e) { + return new Stylesheet(e); + } +} +const Zn = gn.xdp.id; +class xdp_Xdp extends XFAObject { + constructor(e) { + super(Zn, "xdp", !0); + this.uuid = e.uuid || ""; + this.timeStamp = e.timeStamp || ""; + this.config = null; + this.connectionSet = null; + this.datasets = null; + this.localeSet = null; + this.stylesheet = new XFAObjectArray(); + this.template = null; + } + [Tr](e) { + const t = gn[e[Yr]]; + return t && e[Hr] === t.id; + } +} +class XdpNamespace { + static [on](e, t) { + if (XdpNamespace.hasOwnProperty(e)) return XdpNamespace[e](t); + } + static xdp(e) { + return new xdp_Xdp(e); + } +} +const Vn = gn.xhtml.id, + zn = Symbol(), + _n = new Set([ + "color", + "font", + "font-family", + "font-size", + "font-stretch", + "font-style", + "font-weight", + "margin", + "margin-bottom", + "margin-left", + "margin-right", + "margin-top", + "letter-spacing", + "line-height", + "orphans", + "page-break-after", + "page-break-before", + "page-break-inside", + "tab-interval", + "tab-stop", + "text-align", + "text-decoration", + "text-indent", + "vertical-align", + "widows", + "kerning-mode", + "xfa-font-horizontal-scale", + "xfa-font-vertical-scale", + "xfa-spacerun", + "xfa-tab-stops", + ]), + $n = new Map([ + ["page-break-after", "breakAfter"], + ["page-break-before", "breakBefore"], + ["page-break-inside", "breakInside"], + ["kerning-mode", (e) => ("none" === e ? "none" : "normal")], + [ + "xfa-font-horizontal-scale", + (e) => `scaleX(${Math.max(0, Math.min(parseInt(e) / 100)).toFixed(2)})`, + ], + [ + "xfa-font-vertical-scale", + (e) => `scaleY(${Math.max(0, Math.min(parseInt(e) / 100)).toFixed(2)})`, + ], + ["xfa-spacerun", ""], + ["xfa-tab-stops", ""], + [ + "font-size", + (e, t) => measureToString(0.99 * (e = t.fontSize = getMeasurement(e))), + ], + ["letter-spacing", (e) => measureToString(getMeasurement(e))], + ["line-height", (e) => measureToString(getMeasurement(e))], + ["margin", (e) => measureToString(getMeasurement(e))], + ["margin-bottom", (e) => measureToString(getMeasurement(e))], + ["margin-left", (e) => measureToString(getMeasurement(e))], + ["margin-right", (e) => measureToString(getMeasurement(e))], + ["margin-top", (e) => measureToString(getMeasurement(e))], + ["text-indent", (e) => measureToString(getMeasurement(e))], + ["font-family", (e) => e], + ["vertical-align", (e) => measureToString(getMeasurement(e))], + ]), + Ao = /\s+/g, + eo = /[\r\n]+/g, + to = /\r\n?/g; +function mapStyle(e, t, i) { + const a = Object.create(null); + if (!e) return a; + const s = Object.create(null); + for (const [t, i] of e.split(";").map((e) => e.split(":", 2))) { + const e = $n.get(t); + if ("" === e) continue; + let r = i; + e && (r = "string" == typeof e ? e : e(i, s)); + t.endsWith("scale") + ? (a.transform = a.transform ? `${a[t]} ${r}` : r) + : (a[t.replaceAll(/-([a-zA-Z])/g, (e, t) => t.toUpperCase())] = r); + } + a.fontFamily && + setFontFamily( + { + typeface: a.fontFamily, + weight: a.fontWeight || "normal", + posture: a.fontStyle || "normal", + size: s.fontSize || 0, + }, + t, + t[yr].fontFinder, + a, + ); + if (i && a.verticalAlign && "0px" !== a.verticalAlign && a.fontSize) { + const e = 0.583, + t = 0.333, + i = getMeasurement(a.fontSize); + a.fontSize = measureToString(i * e); + a.verticalAlign = measureToString( + Math.sign(getMeasurement(a.verticalAlign)) * i * t, + ); + } + i && a.fontSize && (a.fontSize = `calc(${a.fontSize} * var(--scale-factor))`); + fixTextIndent(a); + return a; +} +const io = new Set(["body", "html"]); +class XhtmlObject extends XmlObject { + constructor(e, t) { + super(Vn, t); + this[zn] = !1; + this.style = e.style || ""; + } + [Vs](e) { + super[Vs](e); + this.style = (function checkStyle(e) { + return e.style + ? e.style + .trim() + .split(/\s*;\s*/) + .filter((e) => !!e) + .map((e) => e.split(/\s*:\s*/, 2)) + .filter(([t, i]) => { + "font-family" === t && e[yr].usedTypefaces.add(i); + return _n.has(t); + }) + .map((e) => e.join(":")) + .join(";") + : ""; + })(this); + } + [Ws]() { + return !io.has(this[Yr]); + } + [qr](e, t = !1) { + if (t) this[zn] = !0; + else { + e = e.replaceAll(eo, ""); + this.style.includes("xfa-spacerun:yes") || (e = e.replaceAll(Ao, " ")); + } + e && (this[er] += e); + } + [Or](e, t = !0) { + const i = Object.create(null), + a = { top: NaN, bottom: NaN, left: NaN, right: NaN }; + let s = null; + for (const [e, t] of this.style.split(";").map((e) => e.split(":", 2))) + switch (e) { + case "font-family": + i.typeface = stripQuotes(t); + break; + case "font-size": + i.size = getMeasurement(t); + break; + case "font-weight": + i.weight = t; + break; + case "font-style": + i.posture = t; + break; + case "letter-spacing": + i.letterSpacing = getMeasurement(t); + break; + case "margin": + const e = t.split(/ \t/).map((e) => getMeasurement(e)); + switch (e.length) { + case 1: + a.top = a.bottom = a.left = a.right = e[0]; + break; + case 2: + a.top = a.bottom = e[0]; + a.left = a.right = e[1]; + break; + case 3: + a.top = e[0]; + a.bottom = e[2]; + a.left = a.right = e[1]; + break; + case 4: + a.top = e[0]; + a.left = e[1]; + a.bottom = e[2]; + a.right = e[3]; + } + break; + case "margin-top": + a.top = getMeasurement(t); + break; + case "margin-bottom": + a.bottom = getMeasurement(t); + break; + case "margin-left": + a.left = getMeasurement(t); + break; + case "margin-right": + a.right = getMeasurement(t); + break; + case "line-height": + s = getMeasurement(t); + } + e.pushData(i, a, s); + if (this[er]) e.addString(this[er]); + else + for (const t of this[Er]()) + "#text" !== t[Yr] ? t[Or](e) : e.addString(t[er]); + t && e.popFont(); + } + [an](e) { + const t = []; + this[ar] = { children: t }; + this[Zs]({}); + if (0 === t.length && !this[er]) return HTMLResult.EMPTY; + let i; + i = this[zn] + ? this[er] + ? this[er].replaceAll(to, "\n") + : void 0 + : this[er] || void 0; + return HTMLResult.success({ + name: this[Yr], + attributes: { + href: this.href, + style: mapStyle(this.style, this, this[zn]), + }, + children: t, + value: i, + }); + } +} +class A extends XhtmlObject { + constructor(e) { + super(e, "a"); + this.href = fixURL(e.href) || ""; + } +} +class B extends XhtmlObject { + constructor(e) { + super(e, "b"); + } + [Or](e) { + e.pushFont({ weight: "bold" }); + super[Or](e); + e.popFont(); + } +} +class Body extends XhtmlObject { + constructor(e) { + super(e, "body"); + } + [an](e) { + const t = super[an](e), + { html: i } = t; + if (!i) return HTMLResult.EMPTY; + i.name = "div"; + i.attributes.class = ["xfaRich"]; + return t; + } +} +class Br extends XhtmlObject { + constructor(e) { + super(e, "br"); + } + [en]() { + return "\n"; + } + [Or](e) { + e.addString("\n"); + } + [an](e) { + return HTMLResult.success({ name: "br" }); + } +} +class Html extends XhtmlObject { + constructor(e) { + super(e, "html"); + } + [an](e) { + const t = []; + this[ar] = { children: t }; + this[Zs]({}); + if (0 === t.length) + return HTMLResult.success({ + name: "div", + attributes: { class: ["xfaRich"], style: {} }, + value: this[er] || "", + }); + if (1 === t.length) { + const e = t[0]; + if (e.attributes?.class.includes("xfaRich")) return HTMLResult.success(e); + } + return HTMLResult.success({ + name: "div", + attributes: { class: ["xfaRich"], style: {} }, + children: t, + }); + } +} +class I extends XhtmlObject { + constructor(e) { + super(e, "i"); + } + [Or](e) { + e.pushFont({ posture: "italic" }); + super[Or](e); + e.popFont(); + } +} +class Li extends XhtmlObject { + constructor(e) { + super(e, "li"); + } +} +class Ol extends XhtmlObject { + constructor(e) { + super(e, "ol"); + } +} +class P extends XhtmlObject { + constructor(e) { + super(e, "p"); + } + [Or](e) { + super[Or](e, !1); + e.addString("\n"); + e.addPara(); + e.popFont(); + } + [en]() { + return this[pr]()[Er]().at(-1) === this ? super[en]() : super[en]() + "\n"; + } +} +class Span extends XhtmlObject { + constructor(e) { + super(e, "span"); + } +} +class Sub extends XhtmlObject { + constructor(e) { + super(e, "sub"); + } +} +class Sup extends XhtmlObject { + constructor(e) { + super(e, "sup"); + } +} +class Ul extends XhtmlObject { + constructor(e) { + super(e, "ul"); + } +} +class XhtmlNamespace { + static [on](e, t) { + if (XhtmlNamespace.hasOwnProperty(e)) return XhtmlNamespace[e](t); + } + static a(e) { + return new A(e); + } + static b(e) { + return new B(e); + } + static body(e) { + return new Body(e); + } + static br(e) { + return new Br(e); + } + static html(e) { + return new Html(e); + } + static i(e) { + return new I(e); + } + static li(e) { + return new Li(e); + } + static ol(e) { + return new Ol(e); + } + static p(e) { + return new P(e); + } + static span(e) { + return new Span(e); + } + static sub(e) { + return new Sub(e); + } + static sup(e) { + return new Sup(e); + } + static ul(e) { + return new Ul(e); + } +} +const ao = { + config: ConfigNamespace, + connection: ConnectionSetNamespace, + datasets: DatasetsNamespace, + localeSet: LocaleSetNamespace, + signature: SignatureNamespace, + stylesheet: StylesheetNamespace, + template: TemplateNamespace, + xdp: XdpNamespace, + xhtml: XhtmlNamespace, +}; +class UnknownNamespace { + constructor(e) { + this.namespaceId = e; + } + [on](e, t) { + return new XmlObject(this.namespaceId, e, t); + } +} +class Root extends XFAObject { + constructor(e) { + super(-1, "root", Object.create(null)); + this.element = null; + this[br] = e; + } + [Kr](e) { + this.element = e; + return !0; + } + [sr]() { + super[sr](); + if (this.element.template instanceof Template) { + this[br].set(jr, this.element); + this.element.template[Zr](this[br]); + this.element.template[br] = this[br]; + } + } +} +class Empty extends XFAObject { + constructor() { + super(-1, "", Object.create(null)); + } + [Kr](e) { + return !1; + } +} +class Builder { + constructor(e = null) { + this._namespaceStack = []; + this._nsAgnosticLevel = 0; + this._namespacePrefixes = new Map(); + this._namespaces = new Map(); + this._nextNsId = Math.max(...Object.values(gn).map(({ id: e }) => e)); + this._currentNamespace = e || new UnknownNamespace(++this._nextNsId); + } + buildRoot(e) { + return new Root(e); + } + build({ nsPrefix: e, name: t, attributes: i, namespace: a, prefixes: s }) { + const r = null !== a; + if (r) { + this._namespaceStack.push(this._currentNamespace); + this._currentNamespace = this._searchNamespace(a); + } + s && this._addNamespacePrefix(s); + if (i.hasOwnProperty(vr)) { + const e = ao.datasets, + t = i[vr]; + let a = null; + for (const [i, s] of Object.entries(t)) { + if (this._getNamespaceToUse(i) === e) { + a = { xfa: s }; + break; + } + } + a ? (i[vr] = a) : delete i[vr]; + } + const n = this._getNamespaceToUse(e), + o = n?.[on](t, i) || new Empty(); + o[Gr]() && this._nsAgnosticLevel++; + (r || s || o[Gr]()) && + (o[_s] = { hasNamespace: r, prefixes: s, nsAgnostic: o[Gr]() }); + return o; + } + isNsAgnostic() { + return this._nsAgnosticLevel > 0; + } + _searchNamespace(e) { + let t = this._namespaces.get(e); + if (t) return t; + for (const [i, { check: a }] of Object.entries(gn)) + if (a(e)) { + t = ao[i]; + if (t) { + this._namespaces.set(e, t); + return t; + } + break; + } + t = new UnknownNamespace(++this._nextNsId); + this._namespaces.set(e, t); + return t; + } + _addNamespacePrefix(e) { + for (const { prefix: t, value: i } of e) { + const e = this._searchNamespace(i); + let a = this._namespacePrefixes.get(t); + if (!a) { + a = []; + this._namespacePrefixes.set(t, a); + } + a.push(e); + } + } + _getNamespaceToUse(e) { + if (!e) return this._currentNamespace; + const t = this._namespacePrefixes.get(e); + if (t?.length > 0) return t.at(-1); + warn(`Unknown namespace prefix: ${e}.`); + return null; + } + clean(e) { + const { hasNamespace: t, prefixes: i, nsAgnostic: a } = e; + t && (this._currentNamespace = this._namespaceStack.pop()); + i && + i.forEach(({ prefix: e }) => { + this._namespacePrefixes.get(e).pop(); + }); + a && this._nsAgnosticLevel--; + } +} +class XFAParser extends XMLParserBase { + constructor(e = null, t = !1) { + super(); + this._builder = new Builder(e); + this._stack = []; + this._globalData = { usedTypefaces: new Set() }; + this._ids = new Map(); + this._current = this._builder.buildRoot(this._ids); + this._errorCode = Rs; + this._whiteRegex = /^\s+$/; + this._nbsps = /\xa0+/g; + this._richText = t; + } + parse(e) { + this.parseXml(e); + if (this._errorCode === Rs) { + this._current[sr](); + return this._current.element; + } + } + onText(e) { + e = e.replace(this._nbsps, (e) => e.slice(1) + " "); + this._richText || this._current[Ws]() + ? this._current[qr](e, this._richText) + : this._whiteRegex.test(e) || this._current[qr](e.trim()); + } + onCdata(e) { + this._current[qr](e); + } + _mkAttributes(e, t) { + let i = null, + a = null; + const s = Object.create({}); + for (const { name: r, value: n } of e) + if ("xmlns" === r) + i ? warn(`XFA - multiple namespace definition in <${t}>`) : (i = n); + else if (r.startsWith("xmlns:")) { + const e = r.substring(6); + a || (a = []); + a.push({ prefix: e, value: n }); + } else { + const e = r.indexOf(":"); + if (-1 === e) s[r] = n; + else { + let t = s[vr]; + t || (t = s[vr] = Object.create(null)); + const [i, a] = [r.slice(0, e), r.slice(e + 1)]; + (t[i] ||= Object.create(null))[a] = n; + } + } + return [i, a, s]; + } + _getNameAndPrefix(e, t) { + const i = e.indexOf(":"); + return -1 === i + ? [e, null] + : [e.substring(i + 1), t ? "" : e.substring(0, i)]; + } + onBeginElement(e, t, i) { + const [a, s, r] = this._mkAttributes(t, e), + [n, o] = this._getNameAndPrefix(e, this._builder.isNsAgnostic()), + g = this._builder.build({ + nsPrefix: o, + name: n, + attributes: r, + namespace: a, + prefixes: s, + }); + g[yr] = this._globalData; + if (i) { + g[sr](); + this._current[Kr](g) && g[zr](this._ids); + g[Vs](this._builder); + } else { + this._stack.push(this._current); + this._current = g; + } + } + onEndElement(e) { + const t = this._current; + if (t[Sr]() && "string" == typeof t[er]) { + const e = new XFAParser(); + e._globalData = this._globalData; + const i = e.parse(t[er]); + t[er] = null; + t[Kr](i); + } + t[sr](); + this._current = this._stack.pop(); + this._current[Kr](t) && t[zr](this._ids); + t[Vs](this._builder); + } + onError(e) { + this._errorCode = e; + } +} +class XFAFactory { + constructor(e) { + try { + this.root = new XFAParser().parse(XFAFactory._createDocument(e)); + const t = new Binder(this.root); + this.form = t.bind(); + this.dataHandler = new DataHandler(this.root, t.getData()); + this.form[yr].template = this.form; + } catch (e) { + warn(`XFA - an error occurred during parsing and binding: ${e}`); + } + } + isValid() { + return this.root && this.form; + } + _createPagesHelper() { + const e = this.form[tn](); + return new Promise((t, i) => { + const nextIteration = () => { + try { + const i = e.next(); + i.done ? t(i.value) : setTimeout(nextIteration, 0); + } catch (e) { + i(e); + } + }; + setTimeout(nextIteration, 0); + }); + } + async _createPages() { + try { + this.pages = await this._createPagesHelper(); + this.dims = this.pages.children.map((e) => { + const { width: t, height: i } = e.attributes.style; + return [0, 0, parseInt(t), parseInt(i)]; + }); + } catch (e) { + warn(`XFA - an error occurred during layout: ${e}`); + } + } + getBoundingBox(e) { + return this.dims[e]; + } + async getNumPages() { + this.pages || (await this._createPages()); + return this.dims.length; + } + setImages(e) { + this.form[yr].images = e; + } + setFonts(e) { + this.form[yr].fontFinder = new FontFinder(e); + const t = []; + for (let e of this.form[yr].usedTypefaces) { + e = stripQuotes(e); + this.form[yr].fontFinder.find(e) || t.push(e); + } + return t.length > 0 ? t : null; + } + appendFonts(e, t) { + this.form[yr].fontFinder.add(e, t); + } + async getPages() { + this.pages || (await this._createPages()); + const e = this.pages; + this.pages = null; + return e; + } + serializeData(e) { + return this.dataHandler.serialize(e); + } + static _createDocument(e) { + return e["/xdp:xdp"] ? Object.values(e).join("") : e["xdp:xdp"]; + } + static getRichTextAsHtml(e) { + if (!e || "string" != typeof e) return null; + try { + let t = new XFAParser(XhtmlNamespace, !0).parse(e); + if (!["body", "xhtml"].includes(t[Yr])) { + const e = XhtmlNamespace.body({}); + e[js](t); + t = e; + } + const i = t[an](); + if (!i.success) return null; + const { html: a } = i, + { attributes: s } = a; + if (s) { + s.class && (s.class = s.class.filter((e) => !e.startsWith("xfa"))); + s.dir = "auto"; + } + return { html: a, str: t[en]() }; + } catch (e) { + warn(`XFA - an error occurred during parsing of rich text: ${e}`); + } + return null; + } +} +class AnnotationFactory { + static createGlobals(e) { + return Promise.all([ + e.ensureCatalog("acroForm"), + e.ensureDoc("xfaDatasets"), + e.ensureCatalog("structTreeRoot"), + e.ensureCatalog("baseUrl"), + e.ensureCatalog("attachments"), + ]).then( + ([t, i, a, s, r]) => ({ + pdfManager: e, + acroForm: t instanceof Dict ? t : Dict.empty, + xfaDatasets: i, + structTreeRoot: a, + baseUrl: s, + attachments: r, + }), + (e) => { + warn(`createGlobals: "${e}".`); + return null; + }, + ); + } + static async create(e, t, i, a, s, r) { + const n = s ? await this._getPageIndex(e, t, i.pdfManager) : null; + return i.pdfManager.ensure(this, "_create", [e, t, i, a, s, n, r]); + } + static _create(e, t, i, a, s = !1, r = null, n = null) { + const o = e.fetchIfRef(t); + if (!(o instanceof Dict)) return; + const { acroForm: g, pdfManager: c } = i, + h = t instanceof Ref ? t.toString() : `annot_${a.createObjId()}`; + let l = o.get("Subtype"); + l = l instanceof Name ? l.name : null; + const C = { + xref: e, + ref: t, + dict: o, + subtype: l, + id: h, + annotationGlobals: i, + collectFields: s, + needAppearances: !s && !0 === g.get("NeedAppearances"), + pageIndex: r, + evaluatorOptions: c.evaluatorOptions, + pageRef: n, + }; + switch (l) { + case "Link": + return new LinkAnnotation(C); + case "Text": + return new TextAnnotation(C); + case "Widget": + let e = getInheritableProperty({ dict: o, key: "FT" }); + e = e instanceof Name ? e.name : null; + switch (e) { + case "Tx": + return new TextWidgetAnnotation(C); + case "Btn": + return new ButtonWidgetAnnotation(C); + case "Ch": + return new ChoiceWidgetAnnotation(C); + case "Sig": + return new SignatureWidgetAnnotation(C); + } + warn( + `Unimplemented widget field type "${e}", falling back to base field type.`, + ); + return new WidgetAnnotation(C); + case "Popup": + return new PopupAnnotation(C); + case "FreeText": + return new FreeTextAnnotation(C); + case "Line": + return new LineAnnotation(C); + case "Square": + return new SquareAnnotation(C); + case "Circle": + return new CircleAnnotation(C); + case "PolyLine": + return new PolylineAnnotation(C); + case "Polygon": + return new PolygonAnnotation(C); + case "Caret": + return new CaretAnnotation(C); + case "Ink": + return new InkAnnotation(C); + case "Highlight": + return new HighlightAnnotation(C); + case "Underline": + return new UnderlineAnnotation(C); + case "Squiggly": + return new SquigglyAnnotation(C); + case "StrikeOut": + return new StrikeOutAnnotation(C); + case "Stamp": + return new StampAnnotation(C); + case "FileAttachment": + return new FileAttachmentAnnotation(C); + default: + s || + warn( + l + ? `Unimplemented annotation type "${l}", falling back to base annotation.` + : "Annotation is missing the required /Subtype.", + ); + return new Annotation(C); + } + } + static async _getPageIndex(e, t, i) { + try { + const a = await e.fetchIfRefAsync(t); + if (!(a instanceof Dict)) return -1; + const s = a.getRaw("P"); + if (s instanceof Ref) + try { + return await i.ensureCatalog("getPageIndex", [s]); + } catch (e) { + info(`_getPageIndex -- not a valid page reference: "${e}".`); + } + if (a.has("Kids")) return -1; + const r = await i.ensureDoc("numPages"); + for (let e = 0; e < r; e++) { + const a = await i.getPage(e), + s = await i.ensure(a, "annotations"); + for (const i of s) if (i instanceof Ref && isRefsEqual(i, t)) return e; + } + } catch (e) { + warn(`_getPageIndex: "${e}".`); + } + return -1; + } + static generateImages(e, t, i) { + if (!i) { + warn( + "generateImages: OffscreenCanvas is not supported, cannot save or print some annotations with images.", + ); + return null; + } + let a; + for (const { bitmapId: i, bitmap: s } of e) + if (s) { + a ||= new Map(); + a.set(i, StampAnnotation.createImage(s, t)); + } + return a; + } + static async saveNewAnnotations(e, t, i, a) { + const s = e.xref; + let r; + const n = [], + o = [], + { isOffscreenCanvasSupported: g } = e.options; + for (const c of i) + if (!c.deleted) + switch (c.annotationType) { + case u: + if (!r) { + const e = new Dict(s); + e.set("BaseFont", Name.get("Helvetica")); + e.set("Type", Name.get("Font")); + e.set("Subtype", Name.get("Type1")); + e.set("Encoding", Name.get("WinAnsiEncoding")); + const t = []; + r = s.getNewTemporaryRef(); + await writeObject(r, e, t, s); + n.push({ ref: r, data: t.join("") }); + } + o.push( + FreeTextAnnotation.createNewAnnotation(s, c, n, { + evaluator: e, + task: t, + baseFontRef: r, + }), + ); + break; + case d: + c.quadPoints + ? o.push(HighlightAnnotation.createNewAnnotation(s, c, n)) + : o.push(InkAnnotation.createNewAnnotation(s, c, n)); + break; + case p: + o.push(InkAnnotation.createNewAnnotation(s, c, n)); + break; + case f: + if (!g) break; + const i = await a.get(c.bitmapId); + if (i.imageStream) { + const { imageStream: e, smaskStream: t } = i, + a = []; + if (t) { + const i = s.getNewTemporaryRef(); + await writeObject(i, t, a, s); + n.push({ ref: i, data: a.join("") }); + e.dict.set("SMask", i); + a.length = 0; + } + const r = (i.imageRef = s.getNewTemporaryRef()); + await writeObject(r, e, a, s); + n.push({ ref: r, data: a.join("") }); + i.imageStream = i.smaskStream = null; + } + o.push(StampAnnotation.createNewAnnotation(s, c, n, { image: i })); + } + return { annotations: await Promise.all(o), dependencies: n }; + } + static async printNewAnnotations(e, t, i, a, s) { + if (!a) return null; + const { options: r, xref: n } = t, + o = []; + for (const g of a) + if (!g.deleted) + switch (g.annotationType) { + case u: + o.push( + FreeTextAnnotation.createNewPrintAnnotation(e, n, g, { + evaluator: t, + task: i, + evaluatorOptions: r, + }), + ); + break; + case d: + g.quadPoints + ? o.push( + HighlightAnnotation.createNewPrintAnnotation(e, n, g, { + evaluatorOptions: r, + }), + ) + : o.push( + InkAnnotation.createNewPrintAnnotation(e, n, g, { + evaluatorOptions: r, + }), + ); + break; + case p: + o.push( + InkAnnotation.createNewPrintAnnotation(e, n, g, { + evaluatorOptions: r, + }), + ); + break; + case f: + if (!r.isOffscreenCanvasSupported) break; + const a = await s.get(g.bitmapId); + if (a.imageStream) { + const { imageStream: e, smaskStream: t } = a; + t && e.dict.set("SMask", t); + a.imageRef = new JpegStream(e, e.length); + a.imageStream = a.smaskStream = null; + } + o.push( + StampAnnotation.createNewPrintAnnotation(e, n, g, { + image: a, + evaluatorOptions: r, + }), + ); + } + return Promise.all(o); + } +} +function getRgbColor(e, t = new Uint8ClampedArray(3)) { + if (!Array.isArray(e)) return t; + const i = t || new Uint8ClampedArray(3); + switch (e.length) { + case 0: + return null; + case 1: + ColorSpace.singletons.gray.getRgbItem(e, 0, i, 0); + return i; + case 3: + ColorSpace.singletons.rgb.getRgbItem(e, 0, i, 0); + return i; + case 4: + ColorSpace.singletons.cmyk.getRgbItem(e, 0, i, 0); + return i; + default: + return t; + } +} +function getPdfColorArray(e) { + return Array.from(e, (e) => e / 255); +} +function getQuadPoints(e, t) { + const i = e.getArray("QuadPoints"); + if (!isNumberArray(i, null) || 0 === i.length || i.length % 8 > 0) + return null; + const a = []; + for (let e = 0, s = i.length / 8; e < s; e++) { + let s = 1 / 0, + r = -1 / 0, + n = 1 / 0, + o = -1 / 0; + for (let t = 8 * e, a = 8 * e + 8; t < a; t += 2) { + const e = i[t], + a = i[t + 1]; + s = Math.min(e, s); + r = Math.max(e, r); + n = Math.min(a, n); + o = Math.max(a, o); + } + if (null !== t && (s < t[0] || r > t[2] || n < t[1] || o > t[3])) + return null; + a.push([ + { x: s, y: o }, + { x: r, y: o }, + { x: s, y: n }, + { x: r, y: n }, + ]); + } + return a; +} +function getTransformMatrix(e, t, i) { + const [a, s, r, n] = Util.getAxialAlignedBoundingBox(t, i); + if (a === r || s === n) return [1, 0, 0, 1, e[0], e[1]]; + const o = (e[2] - e[0]) / (r - a), + g = (e[3] - e[1]) / (n - s); + return [o, 0, 0, g, e[0] - a * o, e[1] - s * g]; +} +class Annotation { + constructor(e) { + const { dict: t, xref: i, annotationGlobals: a } = e; + this.setTitle(t.get("T")); + this.setContents(t.get("Contents")); + this.setModificationDate(t.get("M")); + this.setFlags(t.get("F")); + this.setRectangle(t.getArray("Rect")); + this.setColor(t.getArray("C")); + this.setBorderStyle(t); + this.setAppearance(t); + this.setOptionalContent(t); + const s = t.get("MK"); + this.setBorderAndBackgroundColors(s); + this.setRotation(s, t); + this.ref = e.ref instanceof Ref ? e.ref : null; + this._streams = []; + this.appearance && this._streams.push(this.appearance); + const r = !!(this.flags & AA), + n = !!(this.flags & eA); + if (a.structTreeRoot) { + let i = t.get("StructParent"); + i = Number.isInteger(i) && i >= 0 ? i : -1; + a.structTreeRoot.addAnnotationIdToPage(e.pageRef, i); + } + this.data = { + annotationFlags: this.flags, + borderStyle: this.borderStyle, + color: this.color, + backgroundColor: this.backgroundColor, + borderColor: this.borderColor, + rotation: this.rotation, + contentsObj: this._contents, + hasAppearance: !!this.appearance, + id: e.id, + modificationDate: this.modificationDate, + rect: this.rectangle, + subtype: e.subtype, + hasOwnCanvas: !1, + noRotate: !!(this.flags & _), + noHTML: r && n, + }; + if (e.collectFields) { + const a = t.get("Kids"); + if (Array.isArray(a)) { + const e = []; + for (const t of a) t instanceof Ref && e.push(t.toString()); + 0 !== e.length && (this.data.kidIds = e); + } + this.data.actions = collectActions(i, t, uA); + this.data.fieldName = this._constructFieldName(t); + this.data.pageIndex = e.pageIndex; + } + this._isOffscreenCanvasSupported = + e.evaluatorOptions.isOffscreenCanvasSupported; + this._fallbackFontDict = null; + this._needAppearances = !1; + } + _hasFlag(e, t) { + return !!(e & t); + } + _isViewable(e) { + return !this._hasFlag(e, Z) && !this._hasFlag(e, $); + } + _isPrintable(e) { + return this._hasFlag(e, z) && !this._hasFlag(e, V) && !this._hasFlag(e, Z); + } + mustBeViewed(e, t) { + const i = e?.get(this.data.id)?.noView; + return void 0 !== i ? !i : this.viewable && !this._hasFlag(this.flags, V); + } + mustBePrinted(e) { + const t = e?.get(this.data.id)?.noPrint; + return void 0 !== t ? !t : this.printable; + } + get viewable() { + return ( + null !== this.data.quadPoints && + (0 === this.flags || this._isViewable(this.flags)) + ); + } + get printable() { + return ( + null !== this.data.quadPoints && + 0 !== this.flags && + this._isPrintable(this.flags) + ); + } + _parseStringHelper(e) { + const t = "string" == typeof e ? stringToPDFString(e) : ""; + return { str: t, dir: t && "rtl" === bidi(t).dir ? "rtl" : "ltr" }; + } + setDefaultAppearance(e) { + const { dict: t, annotationGlobals: i } = e, + a = + getInheritableProperty({ dict: t, key: "DA" }) || i.acroForm.get("DA"); + this._defaultAppearance = "string" == typeof a ? a : ""; + this.data.defaultAppearanceData = parseDefaultAppearance( + this._defaultAppearance, + ); + } + setTitle(e) { + this._title = this._parseStringHelper(e); + } + setContents(e) { + this._contents = this._parseStringHelper(e); + } + setModificationDate(e) { + this.modificationDate = "string" == typeof e ? e : null; + } + setFlags(e) { + this.flags = Number.isInteger(e) && e > 0 ? e : 0; + this.flags & Z && + "Annotation" !== this.constructor.name && + (this.flags ^= Z); + } + hasFlag(e) { + return this._hasFlag(this.flags, e); + } + setRectangle(e) { + this.rectangle = lookupNormalRect(e, [0, 0, 0, 0]); + } + setColor(e) { + this.color = getRgbColor(e); + } + setLineEndings(e) { + this.lineEndings = ["None", "None"]; + if (Array.isArray(e) && 2 === e.length) + for (let t = 0; t < 2; t++) { + const i = e[t]; + if (i instanceof Name) + switch (i.name) { + case "None": + continue; + case "Square": + case "Circle": + case "Diamond": + case "OpenArrow": + case "ClosedArrow": + case "Butt": + case "ROpenArrow": + case "RClosedArrow": + case "Slash": + this.lineEndings[t] = i.name; + continue; + } + warn(`Ignoring invalid lineEnding: ${i}`); + } + } + setRotation(e, t) { + this.rotation = 0; + let i = e instanceof Dict ? e.get("R") || 0 : t.get("Rotate") || 0; + if (Number.isInteger(i) && 0 !== i) { + i %= 360; + i < 0 && (i += 360); + i % 90 == 0 && (this.rotation = i); + } + } + setBorderAndBackgroundColors(e) { + if (e instanceof Dict) { + this.borderColor = getRgbColor(e.getArray("BC"), null); + this.backgroundColor = getRgbColor(e.getArray("BG"), null); + } else this.borderColor = this.backgroundColor = null; + } + setBorderStyle(e) { + this.borderStyle = new AnnotationBorderStyle(); + if (e instanceof Dict) + if (e.has("BS")) { + const t = e.get("BS"); + if (t instanceof Dict) { + const e = t.get("Type"); + if (!e || isName(e, "Border")) { + this.borderStyle.setWidth(t.get("W"), this.rectangle); + this.borderStyle.setStyle(t.get("S")); + this.borderStyle.setDashArray(t.getArray("D")); + } + } + } else if (e.has("Border")) { + const t = e.getArray("Border"); + if (Array.isArray(t) && t.length >= 3) { + this.borderStyle.setHorizontalCornerRadius(t[0]); + this.borderStyle.setVerticalCornerRadius(t[1]); + this.borderStyle.setWidth(t[2], this.rectangle); + 4 === t.length && this.borderStyle.setDashArray(t[3], !0); + } + } else this.borderStyle.setWidth(0); + } + setAppearance(e) { + this.appearance = null; + const t = e.get("AP"); + if (!(t instanceof Dict)) return; + const i = t.get("N"); + if (i instanceof BaseStream) { + this.appearance = i; + return; + } + if (!(i instanceof Dict)) return; + const a = e.get("AS"); + if (!(a instanceof Name && i.has(a.name))) return; + const s = i.get(a.name); + s instanceof BaseStream && (this.appearance = s); + } + setOptionalContent(e) { + this.oc = null; + const t = e.get("OC"); + t instanceof Name + ? warn("setOptionalContent: Support for /Name-entry is not implemented.") + : t instanceof Dict && (this.oc = t); + } + loadResources(e, t) { + return t.dict.getAsync("Resources").then((t) => { + if (!t) return; + return new ObjectLoader(t, e, t.xref).load().then(function () { + return t; + }); + }); + } + async getOperatorList(e, t, a, s, r) { + const { hasOwnCanvas: n, id: o, rect: c } = this.data; + let h = this.appearance; + const l = !!(n && a & g); + if (l && (c[0] === c[2] || c[1] === c[3])) { + this.data.hasOwnCanvas = !1; + return { + opList: new OperatorList(), + separateForm: !1, + separateCanvas: !1, + }; + } + if (!h) { + if (!l) + return { + opList: new OperatorList(), + separateForm: !1, + separateCanvas: !1, + }; + h = new StringStream(""); + h.dict = new Dict(); + } + const C = h.dict, + Q = await this.loadResources( + ["ExtGState", "ColorSpace", "Pattern", "Shading", "XObject", "Font"], + h, + ), + E = lookupRect(C.getArray("BBox"), [0, 0, 1, 1]), + u = lookupMatrix(C.getArray("Matrix"), i), + d = getTransformMatrix(c, E, u), + f = new OperatorList(); + let p; + this.oc && (p = await e.parseMarkedContentProps(this.oc, null)); + void 0 !== p && f.addOp(He, ["OC", p]); + f.addOp(We, [o, c, d, u, l]); + await e.getOperatorList({ + stream: h, + task: t, + resources: Q, + operatorList: f, + fallbackFontDict: this._fallbackFontDict, + }); + f.addOp(Xe, []); + void 0 !== p && f.addOp(Ye, []); + this.reset(); + return { opList: f, separateForm: !1, separateCanvas: l }; + } + async save(e, t, i) { + return null; + } + get hasTextContent() { + return !1; + } + async extractTextContent(e, t, i) { + if (!this.appearance) return; + const a = await this.loadResources( + ["ExtGState", "Font", "Properties", "XObject"], + this.appearance, + ), + s = [], + r = []; + let n = null; + const o = { + desiredSize: Math.Infinity, + ready: !0, + enqueue(e, t) { + for (const t of e.items) + if (void 0 !== t.str) { + n ||= t.transform.slice(-2); + r.push(t.str); + if (t.hasEOL) { + s.push(r.join("").trimEnd()); + r.length = 0; + } + } + }, + }; + await e.getTextContent({ + stream: this.appearance, + task: t, + resources: a, + includeMarkedContent: !0, + keepWhiteSpace: !0, + sink: o, + viewBox: i, + }); + this.reset(); + r.length && s.push(r.join("").trimEnd()); + if (s.length > 1 || s[0]) { + const e = this.appearance.dict, + t = lookupRect(e.getArray("BBox"), null), + i = lookupMatrix(e.getArray("Matrix"), null); + this.data.textPosition = this._transformPoint(n, t, i); + this.data.textContent = s; + } + } + _transformPoint(e, t, i) { + const { rect: a } = this.data; + t ||= [0, 0, 1, 1]; + i ||= [1, 0, 0, 1, 0, 0]; + const s = getTransformMatrix(a, t, i); + s[4] -= a[0]; + s[5] -= a[1]; + e = Util.applyTransform(e, s); + return Util.applyTransform(e, i); + } + getFieldObject() { + return this.data.kidIds + ? { + id: this.data.id, + actions: this.data.actions, + name: this.data.fieldName, + strokeColor: this.data.borderColor, + fillColor: this.data.backgroundColor, + type: "", + kidIds: this.data.kidIds, + page: this.data.pageIndex, + rotation: this.rotation, + } + : null; + } + reset() { + for (const e of this._streams) e.reset(); + } + _constructFieldName(e) { + if (!e.has("T") && !e.has("Parent")) { + warn("Unknown field name, falling back to empty field name."); + return ""; + } + if (!e.has("Parent")) return stringToPDFString(e.get("T")); + const t = []; + e.has("T") && t.unshift(stringToPDFString(e.get("T"))); + let i = e; + const a = new RefSet(); + e.objId && a.put(e.objId); + for (; i.has("Parent"); ) { + i = i.get("Parent"); + if (!(i instanceof Dict) || (i.objId && a.has(i.objId))) break; + i.objId && a.put(i.objId); + i.has("T") && t.unshift(stringToPDFString(i.get("T"))); + } + return t.join("."); + } +} +class AnnotationBorderStyle { + constructor() { + this.width = 1; + this.style = lA; + this.dashArray = [3]; + this.horizontalCornerRadius = 0; + this.verticalCornerRadius = 0; + } + setWidth(e, t = [0, 0, 0, 0]) { + if (e instanceof Name) this.width = 0; + else if ("number" == typeof e) { + if (e > 0) { + const i = (t[2] - t[0]) / 2, + a = (t[3] - t[1]) / 2; + if (i > 0 && a > 0 && (e > i || e > a)) { + warn(`AnnotationBorderStyle.setWidth - ignoring width: ${e}`); + e = 1; + } + } + this.width = e; + } + } + setStyle(e) { + if (e instanceof Name) + switch (e.name) { + case "S": + this.style = lA; + break; + case "D": + this.style = CA; + break; + case "B": + this.style = BA; + break; + case "I": + this.style = QA; + break; + case "U": + this.style = EA; + } + } + setDashArray(e, t = !1) { + if (Array.isArray(e)) { + let i = !0, + a = !0; + for (const t of e) { + if (!(+t >= 0)) { + i = !1; + break; + } + t > 0 && (a = !1); + } + if (0 === e.length || (i && !a)) { + this.dashArray = e; + t && this.setStyle(Name.get("D")); + } else this.width = 0; + } else e && (this.width = 0); + } + setHorizontalCornerRadius(e) { + Number.isInteger(e) && (this.horizontalCornerRadius = e); + } + setVerticalCornerRadius(e) { + Number.isInteger(e) && (this.verticalCornerRadius = e); + } +} +class MarkupAnnotation extends Annotation { + constructor(e) { + super(e); + const { dict: t } = e; + if (t.has("IRT")) { + const e = t.getRaw("IRT"); + this.data.inReplyTo = e instanceof Ref ? e.toString() : null; + const i = t.get("RT"); + this.data.replyType = i instanceof Name ? i.name : j; + } + let i = null; + if (this.data.replyType === X) { + const e = t.get("IRT"); + this.setTitle(e.get("T")); + this.data.titleObj = this._title; + this.setContents(e.get("Contents")); + this.data.contentsObj = this._contents; + if (e.has("CreationDate")) { + this.setCreationDate(e.get("CreationDate")); + this.data.creationDate = this.creationDate; + } else this.data.creationDate = null; + if (e.has("M")) { + this.setModificationDate(e.get("M")); + this.data.modificationDate = this.modificationDate; + } else this.data.modificationDate = null; + i = e.getRaw("Popup"); + if (e.has("C")) { + this.setColor(e.getArray("C")); + this.data.color = this.color; + } else this.data.color = null; + } else { + this.data.titleObj = this._title; + this.setCreationDate(t.get("CreationDate")); + this.data.creationDate = this.creationDate; + i = t.getRaw("Popup"); + t.has("C") || (this.data.color = null); + } + this.data.popupRef = i instanceof Ref ? i.toString() : null; + t.has("RC") && + (this.data.richText = XFAFactory.getRichTextAsHtml(t.get("RC"))); + } + setCreationDate(e) { + this.creationDate = "string" == typeof e ? e : null; + } + _setDefaultAppearance({ + xref: e, + extra: t, + strokeColor: i, + fillColor: a, + blendMode: s, + strokeAlpha: r, + fillAlpha: n, + pointsCallback: o, + }) { + let g = Number.MAX_VALUE, + c = Number.MAX_VALUE, + h = Number.MIN_VALUE, + l = Number.MIN_VALUE; + const C = ["q"]; + t && C.push(t); + i && C.push(`${i[0]} ${i[1]} ${i[2]} RG`); + a && C.push(`${a[0]} ${a[1]} ${a[2]} rg`); + let Q = this.data.quadPoints; + Q || + (Q = [ + [ + { x: this.rectangle[0], y: this.rectangle[3] }, + { x: this.rectangle[2], y: this.rectangle[3] }, + { x: this.rectangle[0], y: this.rectangle[1] }, + { x: this.rectangle[2], y: this.rectangle[1] }, + ], + ]); + for (const e of Q) { + const [t, i, a, s] = o(C, e); + g = Math.min(g, t); + h = Math.max(h, i); + c = Math.min(c, a); + l = Math.max(l, s); + } + C.push("Q"); + const E = new Dict(e), + u = new Dict(e); + u.set("Subtype", Name.get("Form")); + const d = new StringStream(C.join(" ")); + d.dict = u; + E.set("Fm0", d); + const f = new Dict(e); + s && f.set("BM", Name.get(s)); + "number" == typeof r && f.set("CA", r); + "number" == typeof n && f.set("ca", n); + const p = new Dict(e); + p.set("GS0", f); + const m = new Dict(e); + m.set("ExtGState", p); + m.set("XObject", E); + const y = new Dict(e); + y.set("Resources", m); + const w = (this.data.rect = [g, c, h, l]); + y.set("BBox", w); + this.appearance = new StringStream("/GS0 gs /Fm0 Do"); + this.appearance.dict = y; + this._streams.push(this.appearance, d); + } + static async createNewAnnotation(e, t, i, a) { + const s = (t.ref ||= e.getNewTemporaryRef()), + r = await this.createNewAppearanceStream(t, e, a), + n = []; + let o; + if (r) { + const a = e.getNewTemporaryRef(); + o = this.createNewDict(t, e, { apRef: a }); + await writeObject(a, r, n, e); + i.push({ ref: a, data: n.join("") }); + } else o = this.createNewDict(t, e, {}); + Number.isInteger(t.parentTreeId) && o.set("StructParent", t.parentTreeId); + n.length = 0; + await writeObject(s, o, n, e); + return { ref: s, data: n.join("") }; + } + static async createNewPrintAnnotation(e, t, i, a) { + const s = await this.createNewAppearanceStream(i, t, a), + r = this.createNewDict(i, t, { ap: s }), + n = new this.prototype.constructor({ + dict: r, + xref: t, + annotationGlobals: e, + evaluatorOptions: a.evaluatorOptions, + }); + i.ref && (n.ref = n.refToReplace = i.ref); + return n; + } +} +class WidgetAnnotation extends Annotation { + constructor(e) { + super(e); + const { dict: t, xref: i, annotationGlobals: a } = e, + s = this.data; + this._needAppearances = e.needAppearances; + s.annotationType = W; + void 0 === s.fieldName && (s.fieldName = this._constructFieldName(t)); + void 0 === s.actions && (s.actions = collectActions(i, t, uA)); + let r = getInheritableProperty({ dict: t, key: "V", getArray: !0 }); + s.fieldValue = this._decodeFormValue(r); + const n = getInheritableProperty({ dict: t, key: "DV", getArray: !0 }); + s.defaultFieldValue = this._decodeFormValue(n); + if (void 0 === r && a.xfaDatasets) { + const e = this._title.str; + if (e) { + this._hasValueFromXFA = !0; + s.fieldValue = r = a.xfaDatasets.getValue(e); + } + } + void 0 === r && + null !== s.defaultFieldValue && + (s.fieldValue = s.defaultFieldValue); + s.alternativeText = stringToPDFString(t.get("TU") || ""); + this.setDefaultAppearance(e); + s.hasAppearance ||= + this._needAppearances && void 0 !== s.fieldValue && null !== s.fieldValue; + const o = getInheritableProperty({ dict: t, key: "FT" }); + s.fieldType = o instanceof Name ? o.name : null; + const g = getInheritableProperty({ dict: t, key: "DR" }), + c = a.acroForm.get("DR"), + h = this.appearance?.dict.get("Resources"); + this._fieldResources = { + localResources: g, + acroFormResources: c, + appearanceResources: h, + mergedResources: Dict.merge({ + xref: i, + dictArray: [g, h, c], + mergeSubDicts: !0, + }), + }; + s.fieldFlags = getInheritableProperty({ dict: t, key: "Ff" }); + (!Number.isInteger(s.fieldFlags) || s.fieldFlags < 0) && (s.fieldFlags = 0); + s.readOnly = this.hasFieldFlag(tA); + s.required = this.hasFieldFlag(iA); + s.hidden = + this._hasFlag(s.annotationFlags, V) || + this._hasFlag(s.annotationFlags, $); + } + _decodeFormValue(e) { + return Array.isArray(e) + ? e.filter((e) => "string" == typeof e).map((e) => stringToPDFString(e)) + : e instanceof Name + ? stringToPDFString(e.name) + : "string" == typeof e + ? stringToPDFString(e) + : null; + } + hasFieldFlag(e) { + return !!(this.data.fieldFlags & e); + } + _isViewable(e) { + return !0; + } + mustBeViewed(e, t) { + return t + ? this.viewable + : super.mustBeViewed(e, t) && !this._hasFlag(this.flags, $); + } + getRotationMatrix(e) { + let t = e?.get(this.data.id)?.rotation; + void 0 === t && (t = this.rotation); + if (0 === t) return i; + return getRotationMatrix( + t, + this.data.rect[2] - this.data.rect[0], + this.data.rect[3] - this.data.rect[1], + ); + } + getBorderAndBackgroundAppearances(e) { + let t = e?.get(this.data.id)?.rotation; + void 0 === t && (t = this.rotation); + if (!this.backgroundColor && !this.borderColor) return ""; + const i = this.data.rect[2] - this.data.rect[0], + a = this.data.rect[3] - this.data.rect[1], + s = 0 === t || 180 === t ? `0 0 ${i} ${a} re` : `0 0 ${a} ${i} re`; + let r = ""; + this.backgroundColor && + (r = `${getPdfColor(this.backgroundColor, !0)} ${s} f `); + if (this.borderColor) { + r += `${this.borderStyle.width || 1} w ${getPdfColor(this.borderColor, !1)} ${s} S `; + } + return r; + } + async getOperatorList(e, t, i, a, s) { + if ( + a && + !(this instanceof SignatureWidgetAnnotation) && + !this.data.noHTML && + !this.data.hasOwnCanvas + ) + return { + opList: new OperatorList(), + separateForm: !0, + separateCanvas: !1, + }; + if (!this._hasText) return super.getOperatorList(e, t, i, a, s); + const r = await this._getAppearance(e, t, i, s); + if (this.appearance && null === r) + return super.getOperatorList(e, t, i, a, s); + const n = new OperatorList(); + if (!this._defaultAppearance || null === r) + return { opList: n, separateForm: !1, separateCanvas: !1 }; + const o = !!(this.data.hasOwnCanvas && i & g), + c = [ + 0, + 0, + this.data.rect[2] - this.data.rect[0], + this.data.rect[3] - this.data.rect[1], + ], + h = getTransformMatrix(this.data.rect, c, [1, 0, 0, 1, 0, 0]); + let l; + this.oc && (l = await e.parseMarkedContentProps(this.oc, null)); + void 0 !== l && n.addOp(He, ["OC", l]); + n.addOp(We, [ + this.data.id, + this.data.rect, + h, + this.getRotationMatrix(s), + o, + ]); + const C = new StringStream(r); + await e.getOperatorList({ + stream: C, + task: t, + resources: this._fieldResources.mergedResources, + operatorList: n, + }); + n.addOp(Xe, []); + void 0 !== l && n.addOp(Ye, []); + return { opList: n, separateForm: !1, separateCanvas: o }; + } + _getMKDict(e) { + const t = new Dict(null); + e && t.set("R", e); + this.borderColor && t.set("BC", getPdfColorArray(this.borderColor)); + this.backgroundColor && t.set("BG", getPdfColorArray(this.backgroundColor)); + return t.size > 0 ? t : null; + } + amendSavedDict(e, t) {} + async save(e, t, a) { + const s = a?.get(this.data.id); + let r = s?.value, + n = s?.rotation; + if (r === this.data.fieldValue || void 0 === r) { + if (!this._hasValueFromXFA && void 0 === n) return null; + r ||= this.data.fieldValue; + } + if ( + void 0 === n && + !this._hasValueFromXFA && + Array.isArray(r) && + Array.isArray(this.data.fieldValue) && + r.length === this.data.fieldValue.length && + r.every((e, t) => e === this.data.fieldValue[t]) + ) + return null; + void 0 === n && (n = this.rotation); + let o = null; + if (!this._needAppearances) { + o = await this._getAppearance(e, t, h, a); + if (null === o) return null; + } + let g = !1; + if (o?.needAppearances) { + g = !0; + o = null; + } + const { xref: c } = e, + l = c.fetchIfRef(this.ref); + if (!(l instanceof Dict)) return null; + const C = new Dict(c); + for (const e of l.getKeys()) "AP" !== e && C.set(e, l.getRaw(e)); + const Q = { path: this.data.fieldName, value: r }, + encoder = (e) => (isAscii(e) ? e : stringToUTF16String(e, !0)); + C.set("V", Array.isArray(r) ? r.map(encoder) : encoder(r)); + this.amendSavedDict(a, C); + const E = this._getMKDict(n); + E && C.set("MK", E); + const u = [], + d = [{ ref: this.ref, data: "", xfa: Q, needAppearances: g }]; + if (null !== o) { + const e = c.getNewTemporaryRef(), + t = new Dict(c); + C.set("AP", t); + t.set("N", e); + const s = this._getSaveFieldResources(c), + r = new StringStream(o), + n = (r.dict = new Dict(c)); + n.set("Subtype", Name.get("Form")); + n.set("Resources", s); + n.set("BBox", [ + 0, + 0, + this.data.rect[2] - this.data.rect[0], + this.data.rect[3] - this.data.rect[1], + ]); + const g = this.getRotationMatrix(a); + g !== i && n.set("Matrix", g); + await writeObject(e, r, u, c); + d.push({ ref: e, data: u.join(""), xfa: null, needAppearances: !1 }); + u.length = 0; + } + C.set("M", `D:${getModificationDate()}`); + await writeObject(this.ref, C, u, c); + d[0].data = u.join(""); + return d; + } + async _getAppearance(e, t, i, a) { + if (this.hasFieldFlag(sA)) return null; + const s = a?.get(this.data.id); + let r, o; + if (s) { + r = s.formattedValue || s.value; + o = s.rotation; + } + if ( + void 0 === o && + void 0 === r && + !this._needAppearances && + (!this._hasValueFromXFA || this.appearance) + ) + return null; + const g = this.getBorderAndBackgroundAppearances(a); + if (void 0 === r) { + r = this.data.fieldValue; + if (!r) return `/Tx BMC q ${g}Q EMC`; + } + Array.isArray(r) && 1 === r.length && (r = r[0]); + assert("string" == typeof r, "Expected `value` to be a string."); + r = r.trim(); + if (this.data.combo) { + const e = this.data.options.find(({ exportValue: e }) => r === e); + r = e?.displayValue || r; + } + if ("" === r) return `/Tx BMC q ${g}Q EMC`; + void 0 === o && (o = this.rotation); + let c, + l = -1; + if (this.data.multiLine) { + c = r.split(/\r\n?|\n/).map((e) => e.normalize("NFC")); + l = c.length; + } else c = [r.replace(/\r\n?|\n/, "").normalize("NFC")]; + let C = this.data.rect[3] - this.data.rect[1], + Q = this.data.rect[2] - this.data.rect[0]; + (90 !== o && 270 !== o) || ([Q, C] = [C, Q]); + this._defaultAppearance || + (this.data.defaultAppearanceData = parseDefaultAppearance( + (this._defaultAppearance = "/Helvetica 0 Tf 0 g"), + )); + let E, + u, + d, + f = await WidgetAnnotation._getFontData( + e, + t, + this.data.defaultAppearanceData, + this._fieldResources.mergedResources, + ); + const p = []; + let m = !1; + for (const e of c) { + const t = f.encodeString(e); + t.length > 1 && (m = !0); + p.push(t.join("")); + } + if (m && i & h) return { needAppearances: !0 }; + if (m && this._isOffscreenCanvasSupported) { + const i = this.data.comb ? "monospace" : "sans-serif", + a = new FakeUnicodeFont(e.xref, i), + s = a.createFontResources(c.join("")), + n = s.getRaw("Font"); + if (this._fieldResources.mergedResources.has("Font")) { + const e = this._fieldResources.mergedResources.get("Font"); + for (const t of n.getKeys()) e.set(t, n.getRaw(t)); + } else this._fieldResources.mergedResources.set("Font", n); + const o = a.fontName.name; + f = await WidgetAnnotation._getFontData( + e, + t, + { fontName: o, fontSize: 0 }, + s, + ); + for (let e = 0, t = p.length; e < t; e++) + p[e] = stringToUTF16String(c[e]); + const g = Object.assign( + Object.create(null), + this.data.defaultAppearanceData, + ); + this.data.defaultAppearanceData.fontSize = 0; + this.data.defaultAppearanceData.fontName = o; + [E, u, d] = this._computeFontSize(C - 2, Q - 4, r, f, l); + this.data.defaultAppearanceData = g; + } else { + this._isOffscreenCanvasSupported || + warn( + "_getAppearance: OffscreenCanvas is not supported, annotation may not render correctly.", + ); + [E, u, d] = this._computeFontSize(C - 2, Q - 4, r, f, l); + } + let y = f.descent; + y = isNaN(y) ? n * d : Math.max(n * d, Math.abs(y) * u); + const w = Math.min(Math.floor((C - u) / 2), 1), + b = this.data.textAlignment; + if (this.data.multiLine) + return this._getMultilineAppearance(E, p, f, u, Q, C, b, 2, w, y, d, a); + if (this.data.comb) + return this._getCombAppearance(E, f, p[0], u, Q, C, 2, w, y, d, a); + const D = w + y; + if (0 === b || b > 2) + return ( + `/Tx BMC q ${g}BT ` + + E + + ` 1 0 0 1 ${numberToString(2)} ${numberToString(D)} Tm (${escapeString(p[0])}) Tj ET Q EMC` + ); + return ( + `/Tx BMC q ${g}BT ` + + E + + ` 1 0 0 1 0 0 Tm ${this._renderText(p[0], f, u, Q, b, { shift: 0 }, 2, D)} ET Q EMC` + ); + } + static async _getFontData(e, t, i, a) { + const s = new OperatorList(), + r = { + font: null, + clone() { + return this; + }, + }, + { fontName: n, fontSize: o } = i; + await e.handleSetFont(a, [n && Name.get(n), o], null, s, t, r, null); + return r.font; + } + _getTextWidth(e, t) { + return t.charsToGlyphs(e).reduce((e, t) => e + t.width, 0) / 1e3; + } + _computeFontSize(e, t, i, a, r) { + let { fontSize: n } = this.data.defaultAppearanceData, + o = (n || 12) * s, + g = Math.round(e / o); + if (!n) { + const roundWithTwoDigits = (e) => Math.floor(100 * e) / 100; + if (-1 === r) { + const r = this._getTextWidth(i, a); + n = roundWithTwoDigits(Math.min(e / s, r > t ? t / r : 1 / 0)); + g = 1; + } else { + const c = i.split(/\r\n?|\n/), + h = []; + for (const e of c) { + const t = a.encodeString(e).join(""), + i = a.charsToGlyphs(t), + s = a.getCharPositions(t); + h.push({ line: t, glyphs: i, positions: s }); + } + const isTooBig = (i) => { + let s = 0; + for (const r of h) { + s += this._splitLine(null, a, i, t, r).length * i; + if (s > e) return !0; + } + return !1; + }; + g = Math.max(g, r); + for (;;) { + o = e / g; + n = roundWithTwoDigits(o / s); + if (!isTooBig(n)) break; + g++; + } + } + const { fontName: c, fontColor: h } = this.data.defaultAppearanceData; + this._defaultAppearance = (function createDefaultAppearance({ + fontSize: e, + fontName: t, + fontColor: i, + }) { + return `/${escapePDFName(t)} ${e} Tf ${getPdfColor(i, !0)}`; + })({ fontSize: n, fontName: c, fontColor: h }); + } + return [this._defaultAppearance, n, e / g]; + } + _renderText(e, t, i, a, s, r, n, o) { + let g; + if (1 === s) { + g = (a - this._getTextWidth(e, t) * i) / 2; + } else if (2 === s) { + g = a - this._getTextWidth(e, t) * i - n; + } else g = n; + const c = numberToString(g - r.shift); + r.shift = g; + return `${c} ${(o = numberToString(o))} Td (${escapeString(e)}) Tj`; + } + _getSaveFieldResources(e) { + const { + localResources: t, + appearanceResources: i, + acroFormResources: a, + } = this._fieldResources, + s = this.data.defaultAppearanceData?.fontName; + if (!s) return t || Dict.empty; + for (const e of [t, i]) + if (e instanceof Dict) { + const t = e.get("Font"); + if (t instanceof Dict && t.has(s)) return e; + } + if (a instanceof Dict) { + const i = a.get("Font"); + if (i instanceof Dict && i.has(s)) { + const a = new Dict(e); + a.set(s, i.getRaw(s)); + const r = new Dict(e); + r.set("Font", a); + return Dict.merge({ xref: e, dictArray: [r, t], mergeSubDicts: !0 }); + } + } + return t || Dict.empty; + } + getFieldObject() { + return null; + } +} +class TextWidgetAnnotation extends WidgetAnnotation { + constructor(e) { + super(e); + this.data.hasOwnCanvas = this.data.readOnly && !this.data.noHTML; + this._hasText = !0; + const t = e.dict; + "string" != typeof this.data.fieldValue && (this.data.fieldValue = ""); + let i = getInheritableProperty({ dict: t, key: "Q" }); + (!Number.isInteger(i) || i < 0 || i > 2) && (i = null); + this.data.textAlignment = i; + let a = getInheritableProperty({ dict: t, key: "MaxLen" }); + (!Number.isInteger(a) || a < 0) && (a = 0); + this.data.maxLen = a; + this.data.multiLine = this.hasFieldFlag(aA); + this.data.comb = + this.hasFieldFlag(hA) && + !this.hasFieldFlag(aA) && + !this.hasFieldFlag(sA) && + !this.hasFieldFlag(gA) && + 0 !== this.data.maxLen; + this.data.doNotScroll = this.hasFieldFlag(cA); + } + get hasTextContent() { + return !!this.appearance && !this._needAppearances; + } + _getCombAppearance(e, t, i, a, s, r, n, o, g, c, h) { + const l = s / this.data.maxLen, + C = this.getBorderAndBackgroundAppearances(h), + Q = [], + E = t.getCharPositions(i); + for (const [e, t] of E) Q.push(`(${escapeString(i.substring(e, t))}) Tj`); + const u = Q.join(` ${numberToString(l)} 0 Td `); + return ( + `/Tx BMC q ${C}BT ` + + e + + ` 1 0 0 1 ${numberToString(n)} ${numberToString(o + g)} Tm ${u} ET Q EMC` + ); + } + _getMultilineAppearance(e, t, i, a, s, r, n, o, g, c, h, l) { + const C = [], + Q = s - 2 * o, + E = { shift: 0 }; + for (let e = 0, r = t.length; e < r; e++) { + const r = t[e], + l = this._splitLine(r, i, a, Q); + for (let t = 0, r = l.length; t < r; t++) { + const r = l[t], + Q = 0 === e && 0 === t ? -g - (h - c) : -h; + C.push(this._renderText(r, i, a, s, n, E, o, Q)); + } + } + const u = this.getBorderAndBackgroundAppearances(l), + d = C.join("\n"); + return ( + `/Tx BMC q ${u}BT ` + + e + + ` 1 0 0 1 0 ${numberToString(r)} Tm ${d} ET Q EMC` + ); + } + _splitLine(e, t, i, a, s = {}) { + e = s.line || e; + const r = s.glyphs || t.charsToGlyphs(e); + if (r.length <= 1) return [e]; + const n = s.positions || t.getCharPositions(e), + o = i / 1e3, + g = []; + let c = -1, + h = -1, + l = -1, + C = 0, + Q = 0; + for (let t = 0, i = r.length; t < i; t++) { + const [i, s] = n[t], + E = r[t], + u = E.width * o; + if (" " === E.unicode) + if (Q + u > a) { + g.push(e.substring(C, i)); + C = i; + Q = u; + c = -1; + l = -1; + } else { + Q += u; + c = i; + h = s; + l = t; + } + else if (Q + u > a) + if (-1 !== c) { + g.push(e.substring(C, h)); + C = h; + t = l + 1; + c = -1; + Q = 0; + } else { + g.push(e.substring(C, i)); + C = i; + Q = u; + } + else Q += u; + } + C < e.length && g.push(e.substring(C, e.length)); + return g; + } + getFieldObject() { + return { + id: this.data.id, + value: this.data.fieldValue, + defaultValue: this.data.defaultFieldValue || "", + multiline: this.data.multiLine, + password: this.hasFieldFlag(sA), + charLimit: this.data.maxLen, + comb: this.data.comb, + editable: !this.data.readOnly, + hidden: this.data.hidden, + name: this.data.fieldName, + rect: this.data.rect, + actions: this.data.actions, + page: this.data.pageIndex, + strokeColor: this.data.borderColor, + fillColor: this.data.backgroundColor, + rotation: this.rotation, + type: "text", + }; + } +} +class ButtonWidgetAnnotation extends WidgetAnnotation { + constructor(e) { + super(e); + this.checkedAppearance = null; + this.uncheckedAppearance = null; + this.data.checkBox = !this.hasFieldFlag(rA) && !this.hasFieldFlag(nA); + this.data.radioButton = this.hasFieldFlag(rA) && !this.hasFieldFlag(nA); + this.data.pushButton = this.hasFieldFlag(nA); + this.data.isTooltipOnly = !1; + if (this.data.checkBox) this._processCheckBox(e); + else if (this.data.radioButton) this._processRadioButton(e); + else if (this.data.pushButton) { + this.data.hasOwnCanvas = !0; + this.data.noHTML = !1; + this._processPushButton(e); + } else warn("Invalid field flags for button widget annotation"); + } + async getOperatorList(e, t, a, s, r) { + if (this.data.pushButton) return super.getOperatorList(e, t, a, !1, r); + let n = null, + o = null; + if (r) { + const e = r.get(this.data.id); + n = e ? e.value : null; + o = e ? e.rotation : null; + } + if (null === n && this.appearance) + return super.getOperatorList(e, t, a, s, r); + null == n && + (n = this.data.checkBox + ? this.data.fieldValue === this.data.exportValue + : this.data.fieldValue === this.data.buttonValue); + const g = n ? this.checkedAppearance : this.uncheckedAppearance; + if (g) { + const n = this.appearance, + c = lookupMatrix(g.dict.getArray("Matrix"), i); + o && g.dict.set("Matrix", this.getRotationMatrix(r)); + this.appearance = g; + const h = super.getOperatorList(e, t, a, s, r); + this.appearance = n; + g.dict.set("Matrix", c); + return h; + } + return { opList: new OperatorList(), separateForm: !1, separateCanvas: !1 }; + } + async save(e, t, i) { + return this.data.checkBox + ? this._saveCheckbox(e, t, i) + : this.data.radioButton + ? this._saveRadioButton(e, t, i) + : null; + } + async _saveCheckbox(e, t, i) { + if (!i) return null; + const a = i.get(this.data.id); + let s = a?.rotation, + r = a?.value; + if (void 0 === s) { + if (void 0 === r) return null; + if ((this.data.fieldValue === this.data.exportValue) === r) return null; + } + const n = e.xref.fetchIfRef(this.ref); + if (!(n instanceof Dict)) return null; + void 0 === s && (s = this.rotation); + void 0 === r && (r = this.data.fieldValue === this.data.exportValue); + const o = { + path: this.data.fieldName, + value: r ? this.data.exportValue : "", + }, + g = Name.get(r ? this.data.exportValue : "Off"); + n.set("V", g); + n.set("AS", g); + n.set("M", `D:${getModificationDate()}`); + const c = this._getMKDict(s); + c && n.set("MK", c); + const h = []; + await writeObject(this.ref, n, h, e.xref); + return [{ ref: this.ref, data: h.join(""), xfa: o }]; + } + async _saveRadioButton(e, t, i) { + if (!i) return null; + const a = i.get(this.data.id); + let s = a?.rotation, + r = a?.value; + if (void 0 === s) { + if (void 0 === r) return null; + if ((this.data.fieldValue === this.data.buttonValue) === r) return null; + } + const n = e.xref.fetchIfRef(this.ref); + if (!(n instanceof Dict)) return null; + void 0 === r && (r = this.data.fieldValue === this.data.buttonValue); + void 0 === s && (s = this.rotation); + const o = { + path: this.data.fieldName, + value: r ? this.data.buttonValue : "", + }, + g = Name.get(r ? this.data.buttonValue : "Off"), + c = []; + let h = null; + if (r) + if (this.parent instanceof Ref) { + const t = e.xref.fetch(this.parent); + t.set("V", g); + await writeObject(this.parent, t, c, e.xref); + h = c.join(""); + c.length = 0; + } else this.parent instanceof Dict && this.parent.set("V", g); + n.set("AS", g); + n.set("M", `D:${getModificationDate()}`); + const l = this._getMKDict(s); + l && n.set("MK", l); + await writeObject(this.ref, n, c, e.xref); + const C = [{ ref: this.ref, data: c.join(""), xfa: o }]; + h && C.push({ ref: this.parent, data: h, xfa: null }); + return C; + } + _getDefaultCheckedAppearance(e, t) { + const i = this.data.rect[2] - this.data.rect[0], + a = this.data.rect[3] - this.data.rect[1], + s = [0, 0, i, a], + r = 0.8 * Math.min(i, a); + let n, o; + if ("check" === t) { + n = { width: 0.755 * r, height: 0.705 * r }; + o = "3"; + } else if ("disc" === t) { + n = { width: 0.791 * r, height: 0.705 * r }; + o = "l"; + } else unreachable(`_getDefaultCheckedAppearance - unsupported type: ${t}`); + const g = `q BT /PdfJsZaDb ${r} Tf 0 g ${numberToString((i - n.width) / 2)} ${numberToString((a - n.height) / 2)} Td (${o}) Tj ET Q`, + c = new Dict(e.xref); + c.set("FormType", 1); + c.set("Subtype", Name.get("Form")); + c.set("Type", Name.get("XObject")); + c.set("BBox", s); + c.set("Matrix", [1, 0, 0, 1, 0, 0]); + c.set("Length", g.length); + const h = new Dict(e.xref), + l = new Dict(e.xref); + l.set("PdfJsZaDb", this.fallbackFontDict); + h.set("Font", l); + c.set("Resources", h); + this.checkedAppearance = new StringStream(g); + this.checkedAppearance.dict = c; + this._streams.push(this.checkedAppearance); + } + _processCheckBox(e) { + const t = e.dict.get("AP"); + if (!(t instanceof Dict)) return; + const i = t.get("N"); + if (!(i instanceof Dict)) return; + const a = this._decodeFormValue(e.dict.get("AS")); + "string" == typeof a && (this.data.fieldValue = a); + const s = + null !== this.data.fieldValue && "Off" !== this.data.fieldValue + ? this.data.fieldValue + : "Yes", + r = i.getKeys(); + if (0 === r.length) r.push("Off", s); + else if (1 === r.length) "Off" === r[0] ? r.push(s) : r.unshift("Off"); + else if (r.includes(s)) { + r.length = 0; + r.push("Off", s); + } else { + const e = r.find((e) => "Off" !== e); + r.length = 0; + r.push("Off", e); + } + r.includes(this.data.fieldValue) || (this.data.fieldValue = "Off"); + this.data.exportValue = r[1]; + const n = i.get(this.data.exportValue); + this.checkedAppearance = n instanceof BaseStream ? n : null; + const o = i.get("Off"); + this.uncheckedAppearance = o instanceof BaseStream ? o : null; + this.checkedAppearance + ? this._streams.push(this.checkedAppearance) + : this._getDefaultCheckedAppearance(e, "check"); + this.uncheckedAppearance && this._streams.push(this.uncheckedAppearance); + this._fallbackFontDict = this.fallbackFontDict; + null === this.data.defaultFieldValue && + (this.data.defaultFieldValue = "Off"); + } + _processRadioButton(e) { + this.data.buttonValue = null; + const t = e.dict.get("Parent"); + if (t instanceof Dict) { + this.parent = e.dict.getRaw("Parent"); + const i = t.get("V"); + i instanceof Name && (this.data.fieldValue = this._decodeFormValue(i)); + } + const i = e.dict.get("AP"); + if (!(i instanceof Dict)) return; + const a = i.get("N"); + if (!(a instanceof Dict)) return; + for (const e of a.getKeys()) + if ("Off" !== e) { + this.data.buttonValue = this._decodeFormValue(e); + break; + } + const s = a.get(this.data.buttonValue); + this.checkedAppearance = s instanceof BaseStream ? s : null; + const r = a.get("Off"); + this.uncheckedAppearance = r instanceof BaseStream ? r : null; + this.checkedAppearance + ? this._streams.push(this.checkedAppearance) + : this._getDefaultCheckedAppearance(e, "disc"); + this.uncheckedAppearance && this._streams.push(this.uncheckedAppearance); + this._fallbackFontDict = this.fallbackFontDict; + null === this.data.defaultFieldValue && + (this.data.defaultFieldValue = "Off"); + } + _processPushButton(e) { + const { dict: t, annotationGlobals: i } = e; + if (t.has("A") || t.has("AA") || this.data.alternativeText) { + this.data.isTooltipOnly = !t.has("A") && !t.has("AA"); + Catalog.parseDestDictionary({ + destDict: t, + resultObj: this.data, + docBaseUrl: i.baseUrl, + docAttachments: i.attachments, + }); + } else warn("Push buttons without action dictionaries are not supported"); + } + getFieldObject() { + let e, + t = "button"; + if (this.data.checkBox) { + t = "checkbox"; + e = this.data.exportValue; + } else if (this.data.radioButton) { + t = "radiobutton"; + e = this.data.buttonValue; + } + return { + id: this.data.id, + value: this.data.fieldValue || "Off", + defaultValue: this.data.defaultFieldValue, + exportValues: e, + editable: !this.data.readOnly, + name: this.data.fieldName, + rect: this.data.rect, + hidden: this.data.hidden, + actions: this.data.actions, + page: this.data.pageIndex, + strokeColor: this.data.borderColor, + fillColor: this.data.backgroundColor, + rotation: this.rotation, + type: t, + }; + } + get fallbackFontDict() { + const e = new Dict(); + e.set("BaseFont", Name.get("ZapfDingbats")); + e.set("Type", Name.get("FallbackType")); + e.set("Subtype", Name.get("FallbackType")); + e.set("Encoding", Name.get("ZapfDingbatsEncoding")); + return shadow(this, "fallbackFontDict", e); + } +} +class ChoiceWidgetAnnotation extends WidgetAnnotation { + constructor(e) { + super(e); + const { dict: t, xref: i } = e; + this.indices = t.getArray("I"); + this.hasIndices = Array.isArray(this.indices) && this.indices.length > 0; + this.data.options = []; + const a = getInheritableProperty({ dict: t, key: "Opt" }); + if (Array.isArray(a)) + for (let e = 0, t = a.length; e < t; e++) { + const t = i.fetchIfRef(a[e]), + s = Array.isArray(t); + this.data.options[e] = { + exportValue: this._decodeFormValue(s ? i.fetchIfRef(t[0]) : t), + displayValue: this._decodeFormValue(s ? i.fetchIfRef(t[1]) : t), + }; + } + if (this.hasIndices) { + this.data.fieldValue = []; + const e = this.data.options.length; + for (const t of this.indices) + Number.isInteger(t) && + t >= 0 && + t < e && + this.data.fieldValue.push(this.data.options[t].exportValue); + } else + "string" == typeof this.data.fieldValue + ? (this.data.fieldValue = [this.data.fieldValue]) + : this.data.fieldValue || (this.data.fieldValue = []); + this.data.combo = this.hasFieldFlag(oA); + this.data.multiSelect = this.hasFieldFlag(IA); + this._hasText = !0; + } + getFieldObject() { + const e = this.data.combo ? "combobox" : "listbox", + t = this.data.fieldValue.length > 0 ? this.data.fieldValue[0] : null; + return { + id: this.data.id, + value: t, + defaultValue: this.data.defaultFieldValue, + editable: !this.data.readOnly, + name: this.data.fieldName, + rect: this.data.rect, + numItems: this.data.fieldValue.length, + multipleSelection: this.data.multiSelect, + hidden: this.data.hidden, + actions: this.data.actions, + items: this.data.options, + page: this.data.pageIndex, + strokeColor: this.data.borderColor, + fillColor: this.data.backgroundColor, + rotation: this.rotation, + type: e, + }; + } + amendSavedDict(e, t) { + if (!this.hasIndices) return; + let i = e?.get(this.data.id)?.value; + Array.isArray(i) || (i = [i]); + const a = [], + { options: s } = this.data; + for (let e = 0, t = 0, r = s.length; e < r; e++) + if (s[e].exportValue === i[t]) { + a.push(e); + t += 1; + } + t.set("I", a); + } + async _getAppearance(e, t, i, a) { + if (this.data.combo) return super._getAppearance(e, t, i, a); + let r, n; + const o = a?.get(this.data.id); + if (o) { + n = o.rotation; + r = o.value; + } + if (void 0 === n && void 0 === r && !this._needAppearances) return null; + void 0 === r ? (r = this.data.fieldValue) : Array.isArray(r) || (r = [r]); + let g = this.data.rect[3] - this.data.rect[1], + c = this.data.rect[2] - this.data.rect[0]; + (90 !== n && 270 !== n) || ([c, g] = [g, c]); + const h = this.data.options.length, + l = []; + for (let e = 0; e < h; e++) { + const { exportValue: t } = this.data.options[e]; + r.includes(t) && l.push(e); + } + this._defaultAppearance || + (this.data.defaultAppearanceData = parseDefaultAppearance( + (this._defaultAppearance = "/Helvetica 0 Tf 0 g"), + )); + const C = await WidgetAnnotation._getFontData( + e, + t, + this.data.defaultAppearanceData, + this._fieldResources.mergedResources, + ); + let Q, + { fontSize: E } = this.data.defaultAppearanceData; + if (E) Q = this._defaultAppearance; + else { + const e = (g - 1) / h; + let t, + i = -1; + for (const { displayValue: e } of this.data.options) { + const a = this._getTextWidth(e, C); + if (a > i) { + i = a; + t = e; + } + } + [Q, E] = this._computeFontSize(e, c - 4, t, C, -1); + } + const u = E * s, + d = (u - E) / 2, + f = Math.floor(g / u); + let p = 0; + if (l.length > 0) { + const e = Math.min(...l), + t = Math.max(...l); + p = Math.max(0, t - f + 1); + p > e && (p = e); + } + const m = Math.min(p + f + 1, h), + y = ["/Tx BMC q", `1 1 ${c} ${g} re W n`]; + if (l.length) { + y.push("0.600006 0.756866 0.854904 rg"); + for (const e of l) + p <= e && e < m && y.push(`1 ${g - (e - p + 1) * u} ${c} ${u} re f`); + } + y.push("BT", Q, `1 0 0 1 0 ${g} Tm`); + const w = { shift: 0 }; + for (let e = p; e < m; e++) { + const { displayValue: t } = this.data.options[e], + i = e === p ? d : 0; + y.push(this._renderText(t, C, E, c, 0, w, 2, -u + i)); + } + y.push("ET Q EMC"); + return y.join("\n"); + } +} +class SignatureWidgetAnnotation extends WidgetAnnotation { + constructor(e) { + super(e); + this.data.fieldValue = null; + this.data.hasOwnCanvas = this.data.noRotate; + this.data.noHTML = !this.data.hasOwnCanvas; + } + getFieldObject() { + return { + id: this.data.id, + value: null, + page: this.data.pageIndex, + type: "signature", + }; + } +} +class TextAnnotation extends MarkupAnnotation { + constructor(e) { + super(e); + this.data.noRotate = !0; + this.data.hasOwnCanvas = this.data.noRotate; + this.data.noHTML = !1; + const { dict: t } = e; + this.data.annotationType = S; + if (this.data.hasAppearance) this.data.name = "NoIcon"; + else { + this.data.rect[1] = this.data.rect[3] - 22; + this.data.rect[2] = this.data.rect[0] + 22; + this.data.name = t.has("Name") ? t.get("Name").name : "Note"; + } + if (t.has("State")) { + this.data.state = t.get("State") || null; + this.data.stateModel = t.get("StateModel") || null; + } else { + this.data.state = null; + this.data.stateModel = null; + } + } +} +class LinkAnnotation extends Annotation { + constructor(e) { + super(e); + const { dict: t, annotationGlobals: i } = e; + this.data.annotationType = k; + this.data.noHTML = !1; + const a = getQuadPoints(t, this.rectangle); + a && (this.data.quadPoints = a); + this.data.borderColor ||= this.data.color; + Catalog.parseDestDictionary({ + destDict: t, + resultObj: this.data, + docBaseUrl: i.baseUrl, + docAttachments: i.attachments, + }); + } +} +class PopupAnnotation extends Annotation { + constructor(e) { + super(e); + const { dict: t } = e; + this.data.annotationType = q; + this.data.noHTML = !1; + (this.data.rect[0] !== this.data.rect[2] && + this.data.rect[1] !== this.data.rect[3]) || + (this.data.rect = null); + let i = t.get("Parent"); + if (!i) { + warn("Popup annotation has a missing or invalid parent annotation."); + return; + } + this.data.parentRect = lookupNormalRect(i.getArray("Rect"), null); + isName(i.get("RT"), X) && (i = i.get("IRT")); + if (i.has("M")) { + this.setModificationDate(i.get("M")); + this.data.modificationDate = this.modificationDate; + } else this.data.modificationDate = null; + if (i.has("C")) { + this.setColor(i.getArray("C")); + this.data.color = this.color; + } else this.data.color = null; + if (!this.viewable) { + const e = i.get("F"); + this._isViewable(e) && this.setFlags(e); + } + this.setTitle(i.get("T")); + this.data.titleObj = this._title; + this.setContents(i.get("Contents")); + this.data.contentsObj = this._contents; + i.has("RC") && + (this.data.richText = XFAFactory.getRichTextAsHtml(i.get("RC"))); + this.data.open = !!t.get("Open"); + } +} +class FreeTextAnnotation extends MarkupAnnotation { + constructor(e) { + super(e); + this.data.hasOwnCanvas = !this.data.noHTML; + this.data.noHTML = !1; + const { evaluatorOptions: t, xref: i } = e; + this.data.annotationType = R; + this.setDefaultAppearance(e); + this._hasAppearance = !!this.appearance; + if (this._hasAppearance) { + const { fontColor: e, fontSize: a } = (function parseAppearanceStream( + e, + t, + i, + ) { + return new AppearanceStreamEvaluator(e, t, i).parse(); + })(this.appearance, t, i); + this.data.defaultAppearanceData.fontColor = e; + this.data.defaultAppearanceData.fontSize = a || 10; + } else { + this.data.defaultAppearanceData.fontSize ||= 10; + const { fontColor: t, fontSize: a } = this.data.defaultAppearanceData; + if (this._contents.str) { + this.data.textContent = this._contents.str + .split(/\r\n?|\n/) + .map((e) => e.trimEnd()); + const { + coords: e, + bbox: t, + matrix: i, + } = FakeUnicodeFont.getFirstPositionInfo( + this.rectangle, + this.rotation, + a, + ); + this.data.textPosition = this._transformPoint(e, t, i); + } + if (this._isOffscreenCanvasSupported) { + const s = e.dict.get("CA"), + r = new FakeUnicodeFont(i, "sans-serif"); + this.appearance = r.createAppearance( + this._contents.str, + this.rectangle, + this.rotation, + a, + t, + s, + ); + this._streams.push(this.appearance); + } else + warn( + "FreeTextAnnotation: OffscreenCanvas is not supported, annotation may not render correctly.", + ); + } + } + get hasTextContent() { + return this._hasAppearance; + } + static createNewDict(e, t, { apRef: i, ap: a }) { + const { + color: s, + fontSize: r, + rect: n, + rotation: o, + user: g, + value: c, + } = e, + h = new Dict(t); + h.set("Type", Name.get("Annot")); + h.set("Subtype", Name.get("FreeText")); + h.set("CreationDate", `D:${getModificationDate()}`); + h.set("Rect", n); + const l = `/Helv ${r} Tf ${getPdfColor(s, !0)}`; + h.set("DA", l); + h.set("Contents", isAscii(c) ? c : stringToUTF16String(c, !0)); + h.set("F", 4); + h.set("Border", [0, 0, 0]); + h.set("Rotate", o); + g && h.set("T", isAscii(g) ? g : stringToUTF16String(g, !0)); + if (i || a) { + const e = new Dict(t); + h.set("AP", e); + i ? e.set("N", i) : e.set("N", a); + } + return h; + } + static async createNewAppearanceStream(e, t, i) { + const { baseFontRef: a, evaluator: r, task: n } = i, + { color: o, fontSize: g, rect: c, rotation: h, value: l } = e, + C = new Dict(t), + Q = new Dict(t); + if (a) Q.set("Helv", a); + else { + const e = new Dict(t); + e.set("BaseFont", Name.get("Helvetica")); + e.set("Type", Name.get("Font")); + e.set("Subtype", Name.get("Type1")); + e.set("Encoding", Name.get("WinAnsiEncoding")); + Q.set("Helv", e); + } + C.set("Font", Q); + const E = await WidgetAnnotation._getFontData( + r, + n, + { fontName: "Helv", fontSize: g }, + C, + ), + [u, d, f, p] = c; + let m = f - u, + y = p - d; + h % 180 != 0 && ([m, y] = [y, m]); + const w = l.split("\n"), + b = g / 1e3; + let D = -1 / 0; + const F = []; + for (let e of w) { + const t = E.encodeString(e); + if (t.length > 1) return null; + e = t.join(""); + F.push(e); + let i = 0; + const a = E.charsToGlyphs(e); + for (const e of a) i += e.width * b; + D = Math.max(D, i); + } + let S = 1; + D > m && (S = m / D); + let k = 1; + const R = s * g, + N = 1 * g, + G = R * w.length; + G > y && (k = y / G); + const x = g * Math.min(S, k); + let M, U, L; + switch (h) { + case 0: + L = [1, 0, 0, 1]; + U = [c[0], c[1], m, y]; + M = [c[0], c[3] - N]; + break; + case 90: + L = [0, 1, -1, 0]; + U = [c[1], -c[2], m, y]; + M = [c[1], -c[0] - N]; + break; + case 180: + L = [-1, 0, 0, -1]; + U = [-c[2], -c[3], m, y]; + M = [-c[2], -c[1] - N]; + break; + case 270: + L = [0, -1, 1, 0]; + U = [-c[3], c[0], m, y]; + M = [-c[3], c[2] - N]; + } + const J = [ + "q", + `${L.join(" ")} 0 0 cm`, + `${U.join(" ")} re W n`, + "BT", + `${getPdfColor(o, !0)}`, + `0 Tc /Helv ${numberToString(x)} Tf`, + ]; + J.push(`${M.join(" ")} Td (${escapeString(F[0])}) Tj`); + const H = numberToString(R); + for (let e = 1, t = F.length; e < t; e++) { + const t = F[e]; + J.push(`0 -${H} Td (${escapeString(t)}) Tj`); + } + J.push("ET", "Q"); + const Y = J.join("\n"), + v = new Dict(t); + v.set("FormType", 1); + v.set("Subtype", Name.get("Form")); + v.set("Type", Name.get("XObject")); + v.set("BBox", c); + v.set("Resources", C); + v.set("Matrix", [1, 0, 0, 1, -c[0], -c[1]]); + const K = new StringStream(Y); + K.dict = v; + return K; + } +} +class LineAnnotation extends MarkupAnnotation { + constructor(e) { + super(e); + const { dict: t, xref: i } = e; + this.data.annotationType = N; + this.data.hasOwnCanvas = this.data.noRotate; + this.data.noHTML = !1; + const a = lookupRect(t.getArray("L"), [0, 0, 0, 0]); + this.data.lineCoordinates = Util.normalizeRect(a); + this.setLineEndings(t.getArray("LE")); + this.data.lineEndings = this.lineEndings; + if (!this.appearance) { + const e = this.color ? getPdfColorArray(this.color) : [0, 0, 0], + s = t.get("CA"), + r = getRgbColor(t.getArray("IC"), null), + n = r ? getPdfColorArray(r) : null, + o = n ? s : null, + g = this.borderStyle.width || 1, + c = 2 * g, + h = [ + this.data.lineCoordinates[0] - c, + this.data.lineCoordinates[1] - c, + this.data.lineCoordinates[2] + c, + this.data.lineCoordinates[3] + c, + ]; + Util.intersect(this.rectangle, h) || (this.rectangle = h); + this._setDefaultAppearance({ + xref: i, + extra: `${g} w`, + strokeColor: e, + fillColor: n, + strokeAlpha: s, + fillAlpha: o, + pointsCallback: (e, t) => { + e.push(`${a[0]} ${a[1]} m`, `${a[2]} ${a[3]} l`, "S"); + return [t[0].x - g, t[1].x + g, t[3].y - g, t[1].y + g]; + }, + }); + } + } +} +class SquareAnnotation extends MarkupAnnotation { + constructor(e) { + super(e); + const { dict: t, xref: i } = e; + this.data.annotationType = G; + this.data.hasOwnCanvas = this.data.noRotate; + this.data.noHTML = !1; + if (!this.appearance) { + const e = this.color ? getPdfColorArray(this.color) : [0, 0, 0], + a = t.get("CA"), + s = getRgbColor(t.getArray("IC"), null), + r = s ? getPdfColorArray(s) : null, + n = r ? a : null; + if (0 === this.borderStyle.width && !r) return; + this._setDefaultAppearance({ + xref: i, + extra: `${this.borderStyle.width} w`, + strokeColor: e, + fillColor: r, + strokeAlpha: a, + fillAlpha: n, + pointsCallback: (e, t) => { + const i = t[2].x + this.borderStyle.width / 2, + a = t[2].y + this.borderStyle.width / 2, + s = t[3].x - t[2].x - this.borderStyle.width, + n = t[1].y - t[3].y - this.borderStyle.width; + e.push(`${i} ${a} ${s} ${n} re`); + r ? e.push("B") : e.push("S"); + return [t[0].x, t[1].x, t[3].y, t[1].y]; + }, + }); + } + } +} +class CircleAnnotation extends MarkupAnnotation { + constructor(e) { + super(e); + const { dict: t, xref: i } = e; + this.data.annotationType = x; + if (!this.appearance) { + const e = this.color ? getPdfColorArray(this.color) : [0, 0, 0], + a = t.get("CA"), + s = getRgbColor(t.getArray("IC"), null), + r = s ? getPdfColorArray(s) : null, + n = r ? a : null; + if (0 === this.borderStyle.width && !r) return; + const o = (4 / 3) * Math.tan(Math.PI / 8); + this._setDefaultAppearance({ + xref: i, + extra: `${this.borderStyle.width} w`, + strokeColor: e, + fillColor: r, + strokeAlpha: a, + fillAlpha: n, + pointsCallback: (e, t) => { + const i = t[0].x + this.borderStyle.width / 2, + a = t[0].y - this.borderStyle.width / 2, + s = t[3].x - this.borderStyle.width / 2, + n = t[3].y + this.borderStyle.width / 2, + g = i + (s - i) / 2, + c = a + (n - a) / 2, + h = ((s - i) / 2) * o, + l = ((n - a) / 2) * o; + e.push( + `${g} ${n} m`, + `${g + h} ${n} ${s} ${c + l} ${s} ${c} c`, + `${s} ${c - l} ${g + h} ${a} ${g} ${a} c`, + `${g - h} ${a} ${i} ${c - l} ${i} ${c} c`, + `${i} ${c + l} ${g - h} ${n} ${g} ${n} c`, + "h", + ); + r ? e.push("B") : e.push("S"); + return [t[0].x, t[1].x, t[3].y, t[1].y]; + }, + }); + } + } +} +class PolylineAnnotation extends MarkupAnnotation { + constructor(e) { + super(e); + const { dict: t, xref: i } = e; + this.data.annotationType = U; + this.data.hasOwnCanvas = this.data.noRotate; + this.data.noHTML = !1; + this.data.vertices = []; + if (!(this instanceof PolygonAnnotation)) { + this.setLineEndings(t.getArray("LE")); + this.data.lineEndings = this.lineEndings; + } + const a = t.getArray("Vertices"); + if (isNumberArray(a, null)) { + for (let e = 0, t = a.length; e < t; e += 2) + this.data.vertices.push({ x: a[e], y: a[e + 1] }); + if (!this.appearance) { + const e = this.color ? getPdfColorArray(this.color) : [0, 0, 0], + a = t.get("CA"), + s = this.borderStyle.width || 1, + r = 2 * s, + n = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; + for (const e of this.data.vertices) { + n[0] = Math.min(n[0], e.x - r); + n[1] = Math.min(n[1], e.y - r); + n[2] = Math.max(n[2], e.x + r); + n[3] = Math.max(n[3], e.y + r); + } + Util.intersect(this.rectangle, n) || (this.rectangle = n); + this._setDefaultAppearance({ + xref: i, + extra: `${s} w`, + strokeColor: e, + strokeAlpha: a, + pointsCallback: (e, t) => { + const i = this.data.vertices; + for (let t = 0, a = i.length; t < a; t++) + e.push(`${i[t].x} ${i[t].y} ${0 === t ? "m" : "l"}`); + e.push("S"); + return [t[0].x, t[1].x, t[3].y, t[1].y]; + }, + }); + } + } + } +} +class PolygonAnnotation extends PolylineAnnotation { + constructor(e) { + super(e); + this.data.annotationType = M; + } +} +class CaretAnnotation extends MarkupAnnotation { + constructor(e) { + super(e); + this.data.annotationType = K; + } +} +class InkAnnotation extends MarkupAnnotation { + constructor(e) { + super(e); + this.data.hasOwnCanvas = this.data.noRotate; + this.data.noHTML = !1; + const { dict: t, xref: i } = e; + this.data.annotationType = T; + this.data.inkLists = []; + const a = t.getArray("InkList"); + if (Array.isArray(a)) { + for (let e = 0, t = a.length; e < t; ++e) { + this.data.inkLists.push([]); + if (Array.isArray(a[e])) + for (let t = 0, s = a[e].length; t < s; t += 2) { + const s = i.fetchIfRef(a[e][t]), + r = i.fetchIfRef(a[e][t + 1]); + "number" == typeof s && + "number" == typeof r && + this.data.inkLists[e].push({ x: s, y: r }); + } + } + if (!this.appearance) { + const e = this.color ? getPdfColorArray(this.color) : [0, 0, 0], + a = t.get("CA"), + s = this.borderStyle.width || 1, + r = 2 * s, + n = [1 / 0, 1 / 0, -1 / 0, -1 / 0]; + for (const e of this.data.inkLists) + for (const t of e) { + n[0] = Math.min(n[0], t.x - r); + n[1] = Math.min(n[1], t.y - r); + n[2] = Math.max(n[2], t.x + r); + n[3] = Math.max(n[3], t.y + r); + } + Util.intersect(this.rectangle, n) || (this.rectangle = n); + this._setDefaultAppearance({ + xref: i, + extra: `${s} w`, + strokeColor: e, + strokeAlpha: a, + pointsCallback: (e, t) => { + for (const t of this.data.inkLists) { + for (let i = 0, a = t.length; i < a; i++) + e.push(`${t[i].x} ${t[i].y} ${0 === i ? "m" : "l"}`); + e.push("S"); + } + return [t[0].x, t[1].x, t[3].y, t[1].y]; + }, + }); + } + } + } + static createNewDict(e, t, { apRef: i, ap: a }) { + const { + color: s, + opacity: r, + paths: n, + outlines: o, + rect: g, + rotation: c, + thickness: h, + } = e, + l = new Dict(t); + l.set("Type", Name.get("Annot")); + l.set("Subtype", Name.get("Ink")); + l.set("CreationDate", `D:${getModificationDate()}`); + l.set("Rect", g); + l.set("InkList", o?.points || n.map((e) => e.points)); + l.set("F", 4); + l.set("Rotate", c); + o && l.set("IT", Name.get("InkHighlight")); + const C = new Dict(t); + l.set("BS", C); + C.set("W", h); + l.set( + "C", + Array.from(s, (e) => e / 255), + ); + l.set("CA", r); + const Q = new Dict(t); + l.set("AP", Q); + i ? Q.set("N", i) : Q.set("N", a); + return l; + } + static async createNewAppearanceStream(e, t, i) { + if (e.outlines) return this.createNewAppearanceStreamForHighlight(e, t, i); + const { color: a, rect: s, paths: r, thickness: n, opacity: o } = e, + g = [`${n} w 1 J 1 j`, `${getPdfColor(a, !1)}`]; + 1 !== o && g.push("/R0 gs"); + const c = []; + for (const { bezier: e } of r) { + c.length = 0; + c.push(`${numberToString(e[0])} ${numberToString(e[1])} m`); + if (2 === e.length) + c.push(`${numberToString(e[0])} ${numberToString(e[1])} l S`); + else { + for (let t = 2, i = e.length; t < i; t += 6) { + const i = e + .slice(t, t + 6) + .map(numberToString) + .join(" "); + c.push(`${i} c`); + } + c.push("S"); + } + g.push(c.join("\n")); + } + const h = g.join("\n"), + l = new Dict(t); + l.set("FormType", 1); + l.set("Subtype", Name.get("Form")); + l.set("Type", Name.get("XObject")); + l.set("BBox", s); + l.set("Length", h.length); + if (1 !== o) { + const e = new Dict(t), + i = new Dict(t), + a = new Dict(t); + a.set("CA", o); + a.set("Type", Name.get("ExtGState")); + i.set("R0", a); + e.set("ExtGState", i); + l.set("Resources", e); + } + const C = new StringStream(h); + C.dict = l; + return C; + } + static async createNewAppearanceStreamForHighlight(e, t, i) { + const { + color: a, + rect: s, + outlines: { outline: r }, + opacity: n, + } = e, + o = [`${getPdfColor(a, !0)}`, "/R0 gs"]; + o.push(`${numberToString(r[4])} ${numberToString(r[5])} m`); + for (let e = 6, t = r.length; e < t; e += 6) + if (isNaN(r[e]) || null === r[e]) + o.push(`${numberToString(r[e + 4])} ${numberToString(r[e + 5])} l`); + else { + const t = r + .slice(e, e + 6) + .map(numberToString) + .join(" "); + o.push(`${t} c`); + } + o.push("h f"); + const g = o.join("\n"), + c = new Dict(t); + c.set("FormType", 1); + c.set("Subtype", Name.get("Form")); + c.set("Type", Name.get("XObject")); + c.set("BBox", s); + c.set("Length", g.length); + const h = new Dict(t), + l = new Dict(t); + h.set("ExtGState", l); + c.set("Resources", h); + const C = new Dict(t); + l.set("R0", C); + C.set("BM", Name.get("Multiply")); + if (1 !== n) { + C.set("ca", n); + C.set("Type", Name.get("ExtGState")); + } + const Q = new StringStream(g); + Q.dict = c; + return Q; + } +} +class HighlightAnnotation extends MarkupAnnotation { + constructor(e) { + super(e); + const { dict: t, xref: i } = e; + this.data.annotationType = L; + if ((this.data.quadPoints = getQuadPoints(t, null))) { + const e = this.appearance?.dict.get("Resources"); + if (!this.appearance || !e?.has("ExtGState")) { + this.appearance && + warn("HighlightAnnotation - ignoring built-in appearance stream."); + const e = this.color ? getPdfColorArray(this.color) : [1, 1, 0], + a = t.get("CA"); + this._setDefaultAppearance({ + xref: i, + fillColor: e, + blendMode: "Multiply", + fillAlpha: a, + pointsCallback: (e, t) => { + e.push( + `${t[0].x} ${t[0].y} m`, + `${t[1].x} ${t[1].y} l`, + `${t[3].x} ${t[3].y} l`, + `${t[2].x} ${t[2].y} l`, + "f", + ); + return [t[0].x, t[1].x, t[3].y, t[1].y]; + }, + }); + } + } else this.data.popupRef = null; + } + static createNewDict(e, t, { apRef: i, ap: a }) { + const { + color: s, + opacity: r, + rect: n, + rotation: o, + user: g, + quadPoints: c, + } = e, + h = new Dict(t); + h.set("Type", Name.get("Annot")); + h.set("Subtype", Name.get("Highlight")); + h.set("CreationDate", `D:${getModificationDate()}`); + h.set("Rect", n); + h.set("F", 4); + h.set("Border", [0, 0, 0]); + h.set("Rotate", o); + h.set("QuadPoints", c); + h.set( + "C", + Array.from(s, (e) => e / 255), + ); + h.set("CA", r); + g && h.set("T", isAscii(g) ? g : stringToUTF16String(g, !0)); + if (i || a) { + const e = new Dict(t); + h.set("AP", e); + e.set("N", i || a); + } + return h; + } + static async createNewAppearanceStream(e, t, i) { + const { color: a, rect: s, outlines: r, opacity: n } = e, + o = [`${getPdfColor(a, !0)}`, "/R0 gs"], + g = []; + for (const e of r) { + g.length = 0; + g.push(`${numberToString(e[0])} ${numberToString(e[1])} m`); + for (let t = 2, i = e.length; t < i; t += 2) + g.push(`${numberToString(e[t])} ${numberToString(e[t + 1])} l`); + g.push("h"); + o.push(g.join("\n")); + } + o.push("f*"); + const c = o.join("\n"), + h = new Dict(t); + h.set("FormType", 1); + h.set("Subtype", Name.get("Form")); + h.set("Type", Name.get("XObject")); + h.set("BBox", s); + h.set("Length", c.length); + const l = new Dict(t), + C = new Dict(t); + l.set("ExtGState", C); + h.set("Resources", l); + const Q = new Dict(t); + C.set("R0", Q); + Q.set("BM", Name.get("Multiply")); + if (1 !== n) { + Q.set("ca", n); + Q.set("Type", Name.get("ExtGState")); + } + const E = new StringStream(c); + E.dict = h; + return E; + } +} +class UnderlineAnnotation extends MarkupAnnotation { + constructor(e) { + super(e); + const { dict: t, xref: i } = e; + this.data.annotationType = J; + if ((this.data.quadPoints = getQuadPoints(t, null))) { + if (!this.appearance) { + const e = this.color ? getPdfColorArray(this.color) : [0, 0, 0], + a = t.get("CA"); + this._setDefaultAppearance({ + xref: i, + extra: "[] 0 d 0.571 w", + strokeColor: e, + strokeAlpha: a, + pointsCallback: (e, t) => { + e.push( + `${t[2].x} ${t[2].y + 1.3} m`, + `${t[3].x} ${t[3].y + 1.3} l`, + "S", + ); + return [t[0].x, t[1].x, t[3].y, t[1].y]; + }, + }); + } + } else this.data.popupRef = null; + } +} +class SquigglyAnnotation extends MarkupAnnotation { + constructor(e) { + super(e); + const { dict: t, xref: i } = e; + this.data.annotationType = H; + if ((this.data.quadPoints = getQuadPoints(t, null))) { + if (!this.appearance) { + const e = this.color ? getPdfColorArray(this.color) : [0, 0, 0], + a = t.get("CA"); + this._setDefaultAppearance({ + xref: i, + extra: "[] 0 d 1 w", + strokeColor: e, + strokeAlpha: a, + pointsCallback: (e, t) => { + const i = (t[0].y - t[2].y) / 6; + let a = i, + s = t[2].x; + const r = t[2].y, + n = t[3].x; + e.push(`${s} ${r + a} m`); + do { + s += 2; + a = 0 === a ? i : 0; + e.push(`${s} ${r + a} l`); + } while (s < n); + e.push("S"); + return [t[2].x, n, r - 2 * i, r + 2 * i]; + }, + }); + } + } else this.data.popupRef = null; + } +} +class StrikeOutAnnotation extends MarkupAnnotation { + constructor(e) { + super(e); + const { dict: t, xref: i } = e; + this.data.annotationType = Y; + if ((this.data.quadPoints = getQuadPoints(t, null))) { + if (!this.appearance) { + const e = this.color ? getPdfColorArray(this.color) : [0, 0, 0], + a = t.get("CA"); + this._setDefaultAppearance({ + xref: i, + extra: "[] 0 d 1 w", + strokeColor: e, + strokeAlpha: a, + pointsCallback: (e, t) => { + e.push( + (t[0].x + t[2].x) / 2 + " " + (t[0].y + t[2].y) / 2 + " m", + (t[1].x + t[3].x) / 2 + " " + (t[1].y + t[3].y) / 2 + " l", + "S", + ); + return [t[0].x, t[1].x, t[3].y, t[1].y]; + }, + }); + } + } else this.data.popupRef = null; + } +} +class StampAnnotation extends MarkupAnnotation { + constructor(e) { + super(e); + this.data.annotationType = v; + this.data.hasOwnCanvas = this.data.noRotate; + this.data.noHTML = !1; + } + static async createImage(e, t) { + const { width: i, height: a } = e, + s = new OffscreenCanvas(i, a), + r = s.getContext("2d", { alpha: !0 }); + r.drawImage(e, 0, 0); + const n = r.getImageData(0, 0, i, a).data, + o = new Uint32Array(n.buffer), + g = o.some( + FeatureTest.isLittleEndian + ? (e) => e >>> 24 != 255 + : (e) => 255 != (255 & e), + ); + if (g) { + r.fillStyle = "white"; + r.fillRect(0, 0, i, a); + r.drawImage(e, 0, 0); + } + const c = s + .convertToBlob({ type: "image/jpeg", quality: 1 }) + .then((e) => e.arrayBuffer()), + h = Name.get("XObject"), + l = Name.get("Image"), + C = new Dict(t); + C.set("Type", h); + C.set("Subtype", l); + C.set("BitsPerComponent", 8); + C.set("ColorSpace", Name.get("DeviceRGB")); + C.set("Filter", Name.get("DCTDecode")); + C.set("BBox", [0, 0, i, a]); + C.set("Width", i); + C.set("Height", a); + let Q = null; + if (g) { + const e = new Uint8Array(o.length); + if (FeatureTest.isLittleEndian) + for (let t = 0, i = o.length; t < i; t++) e[t] = o[t] >>> 24; + else for (let t = 0, i = o.length; t < i; t++) e[t] = 255 & o[t]; + const s = new Dict(t); + s.set("Type", h); + s.set("Subtype", l); + s.set("BitsPerComponent", 8); + s.set("ColorSpace", Name.get("DeviceGray")); + s.set("Width", i); + s.set("Height", a); + Q = new Stream(e, 0, 0, s); + } + return { + imageStream: new Stream(await c, 0, 0, C), + smaskStream: Q, + width: i, + height: a, + }; + } + static createNewDict(e, t, { apRef: i, ap: a }) { + const { rect: s, rotation: r, user: n } = e, + o = new Dict(t); + o.set("Type", Name.get("Annot")); + o.set("Subtype", Name.get("Stamp")); + o.set("CreationDate", `D:${getModificationDate()}`); + o.set("Rect", s); + o.set("F", 4); + o.set("Border", [0, 0, 0]); + o.set("Rotate", r); + n && o.set("T", isAscii(n) ? n : stringToUTF16String(n, !0)); + if (i || a) { + const e = new Dict(t); + o.set("AP", e); + i ? e.set("N", i) : e.set("N", a); + } + return o; + } + static async createNewAppearanceStream(e, t, i) { + const { rotation: a } = e, + { imageRef: s, width: r, height: n } = i.image, + o = new Dict(t), + g = new Dict(t); + o.set("XObject", g); + g.set("Im0", s); + const c = `q ${r} 0 0 ${n} 0 0 cm /Im0 Do Q`, + h = new Dict(t); + h.set("FormType", 1); + h.set("Subtype", Name.get("Form")); + h.set("Type", Name.get("XObject")); + h.set("BBox", [0, 0, r, n]); + h.set("Resources", o); + if (a) { + const e = getRotationMatrix(a, r, n); + h.set("Matrix", e); + } + const l = new StringStream(c); + l.dict = h; + return l; + } +} +class FileAttachmentAnnotation extends MarkupAnnotation { + constructor(e) { + super(e); + const { dict: t, xref: i } = e, + a = new FileSpec(t.get("FS"), i); + this.data.annotationType = O; + this.data.hasOwnCanvas = this.data.noRotate; + this.data.noHTML = !1; + this.data.file = a.serializable; + const s = t.get("Name"); + this.data.name = s instanceof Name ? stringToPDFString(s.name) : "PushPin"; + const r = t.get("ca"); + this.data.fillAlpha = "number" == typeof r && r >= 0 && r <= 1 ? r : null; + } +} +function decodeString(e) { + try { + return stringToUTF8String(e); + } catch (t) { + warn(`UTF-8 decoding failed: "${t}".`); + return e; + } +} +class DatasetXMLParser extends SimpleXMLParser { + constructor(e) { + super(e); + this.node = null; + } + onEndElement(e) { + const t = super.onEndElement(e); + if (t && "xfa:datasets" === e) { + this.node = t; + throw new Error("Aborting DatasetXMLParser."); + } + } +} +class DatasetReader { + constructor(e) { + if (e.datasets) + this.node = new SimpleXMLParser({ hasAttributes: !0 }).parseFromString( + e.datasets, + ).documentElement; + else { + const t = new DatasetXMLParser({ hasAttributes: !0 }); + try { + t.parseFromString(e["xdp:xdp"]); + } catch {} + this.node = t.node; + } + } + getValue(e) { + if (!this.node || !e) return ""; + const t = this.node.searchNode(parseXFAPath(e), 0); + if (!t) return ""; + const i = t.firstChild; + return "value" === i?.nodeName + ? t.children.map((e) => decodeString(e.textContent)) + : decodeString(t.textContent); + } +} +class XRef { + #K = null; + constructor(e, t) { + this.stream = e; + this.pdfManager = t; + this.entries = []; + this._xrefStms = new Set(); + this._cacheMap = new Map(); + this._pendingRefs = new RefSet(); + this._newPersistentRefNum = null; + this._newTemporaryRefNum = null; + this._persistentRefsCache = null; + } + getNewPersistentRef(e) { + null === this._newPersistentRefNum && + (this._newPersistentRefNum = this.entries.length || 1); + const t = this._newPersistentRefNum++; + this._cacheMap.set(t, e); + return Ref.get(t, 0); + } + getNewTemporaryRef() { + if (null === this._newTemporaryRefNum) { + this._newTemporaryRefNum = this.entries.length || 1; + if (this._newPersistentRefNum) { + this._persistentRefsCache = new Map(); + for ( + let e = this._newTemporaryRefNum; + e < this._newPersistentRefNum; + e++ + ) { + this._persistentRefsCache.set(e, this._cacheMap.get(e)); + this._cacheMap.delete(e); + } + } + } + return Ref.get(this._newTemporaryRefNum++, 0); + } + resetNewTemporaryRef() { + this._newTemporaryRefNum = null; + if (this._persistentRefsCache) + for (const [e, t] of this._persistentRefsCache) this._cacheMap.set(e, t); + this._persistentRefsCache = null; + } + setStartXRef(e) { + this.startXRefQueue = [e]; + } + parse(e = !1) { + let t, i, a; + if (e) { + warn("Indexing all PDF objects"); + t = this.indexObjects(); + } else t = this.readXRef(); + t.assignXref(this); + this.trailer = t; + try { + i = t.get("Encrypt"); + } catch (e) { + if (e instanceof MissingDataException) throw e; + warn(`XRef.parse - Invalid "Encrypt" reference: "${e}".`); + } + if (i instanceof Dict) { + const e = t.get("ID"), + a = e?.length ? e[0] : ""; + i.suppressEncryption = !0; + this.encrypt = new CipherTransformFactory(i, a, this.pdfManager.password); + } + try { + a = t.get("Root"); + } catch (e) { + if (e instanceof MissingDataException) throw e; + warn(`XRef.parse - Invalid "Root" reference: "${e}".`); + } + if (a instanceof Dict) + try { + if (a.get("Pages") instanceof Dict) { + this.root = a; + return; + } + } catch (e) { + if (e instanceof MissingDataException) throw e; + warn(`XRef.parse - Invalid "Pages" reference: "${e}".`); + } + if (!e) throw new XRefParseException(); + throw new InvalidPDFException("Invalid Root reference."); + } + processXRefTable(e) { + "tableState" in this || + (this.tableState = { + entryNum: 0, + streamPos: e.lexer.stream.pos, + parserBuf1: e.buf1, + parserBuf2: e.buf2, + }); + if (!isCmd(this.readXRefTable(e), "trailer")) + throw new FormatError( + "Invalid XRef table: could not find trailer dictionary", + ); + let t = e.getObj(); + t instanceof Dict || !t.dict || (t = t.dict); + if (!(t instanceof Dict)) + throw new FormatError( + "Invalid XRef table: could not parse trailer dictionary", + ); + delete this.tableState; + return t; + } + readXRefTable(e) { + const t = e.lexer.stream, + i = this.tableState; + t.pos = i.streamPos; + e.buf1 = i.parserBuf1; + e.buf2 = i.parserBuf2; + let a; + for (;;) { + if (!("firstEntryNum" in i) || !("entryCount" in i)) { + if (isCmd((a = e.getObj()), "trailer")) break; + i.firstEntryNum = a; + i.entryCount = e.getObj(); + } + let s = i.firstEntryNum; + const r = i.entryCount; + if (!Number.isInteger(s) || !Number.isInteger(r)) + throw new FormatError( + "Invalid XRef table: wrong types in subsection header", + ); + for (let a = i.entryNum; a < r; a++) { + i.streamPos = t.pos; + i.entryNum = a; + i.parserBuf1 = e.buf1; + i.parserBuf2 = e.buf2; + const n = {}; + n.offset = e.getObj(); + n.gen = e.getObj(); + const o = e.getObj(); + if (o instanceof Cmd) + switch (o.cmd) { + case "f": + n.free = !0; + break; + case "n": + n.uncompressed = !0; + } + if ( + !Number.isInteger(n.offset) || + !Number.isInteger(n.gen) || + (!n.free && !n.uncompressed) + ) + throw new FormatError(`Invalid entry in XRef subsection: ${s}, ${r}`); + 0 === a && n.free && 1 === s && (s = 0); + this.entries[a + s] || (this.entries[a + s] = n); + } + i.entryNum = 0; + i.streamPos = t.pos; + i.parserBuf1 = e.buf1; + i.parserBuf2 = e.buf2; + delete i.firstEntryNum; + delete i.entryCount; + } + if (this.entries[0] && !this.entries[0].free) + throw new FormatError("Invalid XRef table: unexpected first object"); + return a; + } + processXRefStream(e) { + if (!("streamState" in this)) { + const t = e.dict, + i = t.get("W"); + let a = t.get("Index"); + a || (a = [0, t.get("Size")]); + this.streamState = { + entryRanges: a, + byteWidths: i, + entryNum: 0, + streamPos: e.pos, + }; + } + this.readXRefStream(e); + delete this.streamState; + return e.dict; + } + readXRefStream(e) { + const t = this.streamState; + e.pos = t.streamPos; + const [i, a, s] = t.byteWidths, + r = t.entryRanges; + for (; r.length > 0; ) { + const [n, o] = r; + if (!Number.isInteger(n) || !Number.isInteger(o)) + throw new FormatError(`Invalid XRef range fields: ${n}, ${o}`); + if (!Number.isInteger(i) || !Number.isInteger(a) || !Number.isInteger(s)) + throw new FormatError(`Invalid XRef entry fields length: ${n}, ${o}`); + for (let r = t.entryNum; r < o; ++r) { + t.entryNum = r; + t.streamPos = e.pos; + let o = 0, + g = 0, + c = 0; + for (let t = 0; t < i; ++t) { + const t = e.getByte(); + if (-1 === t) + throw new FormatError("Invalid XRef byteWidths 'type'."); + o = (o << 8) | t; + } + 0 === i && (o = 1); + for (let t = 0; t < a; ++t) { + const t = e.getByte(); + if (-1 === t) + throw new FormatError("Invalid XRef byteWidths 'offset'."); + g = (g << 8) | t; + } + for (let t = 0; t < s; ++t) { + const t = e.getByte(); + if (-1 === t) + throw new FormatError("Invalid XRef byteWidths 'generation'."); + c = (c << 8) | t; + } + const h = {}; + h.offset = g; + h.gen = c; + switch (o) { + case 0: + h.free = !0; + break; + case 1: + h.uncompressed = !0; + break; + case 2: + break; + default: + throw new FormatError(`Invalid XRef entry type: ${o}`); + } + this.entries[n + r] || (this.entries[n + r] = h); + } + t.entryNum = 0; + t.streamPos = e.pos; + r.splice(0, 2); + } + } + indexObjects() { + function readToken(e, t) { + let i = "", + a = e[t]; + for (; 10 !== a && 13 !== a && 60 !== a && !(++t >= e.length); ) { + i += String.fromCharCode(a); + a = e[t]; + } + return i; + } + function skipUntil(e, t, i) { + const a = i.length, + s = e.length; + let r = 0; + for (; t < s; ) { + let s = 0; + for (; s < a && e[t + s] === i[s]; ) ++s; + if (s >= a) break; + t++; + r++; + } + return r; + } + const e = /\b(endobj|\d+\s+\d+\s+obj|xref|trailer\s*<<)\b/g, + t = /\b(startxref|\d+\s+\d+\s+obj)\b/g, + i = /^(\d+)\s+(\d+)\s+obj\b/, + a = new Uint8Array([116, 114, 97, 105, 108, 101, 114]), + s = new Uint8Array([115, 116, 97, 114, 116, 120, 114, 101, 102]), + r = new Uint8Array([47, 88, 82, 101, 102]); + this.entries.length = 0; + this._cacheMap.clear(); + const n = this.stream; + n.pos = 0; + const o = n.getBytes(), + g = bytesToString(o), + c = o.length; + let h = n.start; + const l = [], + C = []; + for (; h < c; ) { + let Q = o[h]; + if (9 === Q || 10 === Q || 13 === Q || 32 === Q) { + ++h; + continue; + } + if (37 === Q) { + do { + ++h; + if (h >= c) break; + Q = o[h]; + } while (10 !== Q && 13 !== Q); + continue; + } + const E = readToken(o, h); + let u; + if (E.startsWith("xref") && (4 === E.length || /\s/.test(E[4]))) { + h += skipUntil(o, h, a); + l.push(h); + h += skipUntil(o, h, s); + } else if ((u = i.exec(E))) { + const t = 0 | u[1], + i = 0 | u[2], + a = h + E.length; + let s, + l = !1; + if (this.entries[t]) { + if (this.entries[t].gen === i) + try { + new Parser({ lexer: new Lexer(n.makeSubStream(a)) }).getObj(); + l = !0; + } catch (e) { + e instanceof ParserEOFException + ? warn(`indexObjects -- checking object (${E}): "${e}".`) + : (l = !0); + } + } else l = !0; + l && + (this.entries[t] = { offset: h - n.start, gen: i, uncompressed: !0 }); + e.lastIndex = a; + const Q = e.exec(g); + if (Q) { + s = e.lastIndex + 1 - h; + if ("endobj" !== Q[1]) { + warn( + `indexObjects: Found "${Q[1]}" inside of another "obj", caused by missing "endobj" -- trying to recover.`, + ); + s -= Q[1].length + 1; + } + } else s = c - h; + const d = o.subarray(h, h + s), + f = skipUntil(d, 0, r); + if (f < s && d[f + 5] < 64) { + C.push(h - n.start); + this._xrefStms.add(h - n.start); + } + h += s; + } else if ( + E.startsWith("trailer") && + (7 === E.length || /\s/.test(E[7])) + ) { + l.push(h); + const e = h + E.length; + let i; + t.lastIndex = e; + const a = t.exec(g); + if (a) { + i = t.lastIndex + 1 - h; + if ("startxref" !== a[1]) { + warn( + `indexObjects: Found "${a[1]}" after "trailer", caused by missing "startxref" -- trying to recover.`, + ); + i -= a[1].length + 1; + } + } else i = c - h; + h += i; + } else h += E.length + 1; + } + for (const e of C) { + this.startXRefQueue.push(e); + this.readXRef(!0); + } + const Q = []; + let E, + u, + d = !1; + for (const e of l) { + n.pos = e; + const t = new Parser({ + lexer: new Lexer(n), + xref: this, + allowStreams: !0, + recoveryMode: !0, + }); + if (!isCmd(t.getObj(), "trailer")) continue; + const i = t.getObj(); + if (i instanceof Dict) { + Q.push(i); + i.has("Encrypt") && (d = !0); + } + } + for (const e of [...Q, "genFallback", ...Q]) { + if ("genFallback" === e) { + if (!u) break; + this._generationFallback = !0; + continue; + } + let t = !1; + try { + const i = e.get("Root"); + if (!(i instanceof Dict)) continue; + const a = i.get("Pages"); + if (!(a instanceof Dict)) continue; + const s = a.get("Count"); + Number.isInteger(s) && (t = !0); + } catch (e) { + u = e; + continue; + } + if (t && (!d || e.has("Encrypt")) && e.has("ID")) return e; + E = e; + } + if (E) return E; + if (this.topDict) return this.topDict; + throw new InvalidPDFException("Invalid PDF structure."); + } + readXRef(e = !1) { + const t = this.stream, + i = new Set(); + for (; this.startXRefQueue.length; ) { + try { + const e = this.startXRefQueue[0]; + if (i.has(e)) { + warn("readXRef - skipping XRef table since it was already parsed."); + this.startXRefQueue.shift(); + continue; + } + i.add(e); + t.pos = e + t.start; + const a = new Parser({ + lexer: new Lexer(t), + xref: this, + allowStreams: !0, + }); + let s, + r = a.getObj(); + if (isCmd(r, "xref")) { + s = this.processXRefTable(a); + this.topDict || (this.topDict = s); + r = s.get("XRefStm"); + if (Number.isInteger(r) && !this._xrefStms.has(r)) { + this._xrefStms.add(r); + this.startXRefQueue.push(r); + this.#K ??= r; + } + } else { + if (!Number.isInteger(r)) + throw new FormatError("Invalid XRef stream header"); + if ( + !( + Number.isInteger(a.getObj()) && + isCmd(a.getObj(), "obj") && + (r = a.getObj()) instanceof BaseStream + ) + ) + throw new FormatError("Invalid XRef stream"); + s = this.processXRefStream(r); + this.topDict || (this.topDict = s); + if (!s) throw new FormatError("Failed to read XRef stream"); + } + r = s.get("Prev"); + Number.isInteger(r) + ? this.startXRefQueue.push(r) + : r instanceof Ref && this.startXRefQueue.push(r.num); + } catch (e) { + if (e instanceof MissingDataException) throw e; + info("(while reading XRef): " + e); + } + this.startXRefQueue.shift(); + } + if (this.topDict) return this.topDict; + if (!e) throw new XRefParseException(); + } + get lastXRefStreamPos() { + return ( + this.#K ?? (this._xrefStms.size > 0 ? Math.max(...this._xrefStms) : null) + ); + } + getEntry(e) { + const t = this.entries[e]; + return t && !t.free && t.offset ? t : null; + } + fetchIfRef(e, t = !1) { + return e instanceof Ref ? this.fetch(e, t) : e; + } + fetch(e, t = !1) { + if (!(e instanceof Ref)) throw new Error("ref object is not a reference"); + const i = e.num, + a = this._cacheMap.get(i); + if (void 0 !== a) { + a instanceof Dict && !a.objId && (a.objId = e.toString()); + return a; + } + let s = this.getEntry(i); + if (null === s) { + this._cacheMap.set(i, s); + return s; + } + if (this._pendingRefs.has(e)) { + this._pendingRefs.remove(e); + warn(`Ignoring circular reference: ${e}.`); + return ft; + } + this._pendingRefs.put(e); + try { + s = s.uncompressed + ? this.fetchUncompressed(e, s, t) + : this.fetchCompressed(e, s, t); + this._pendingRefs.remove(e); + } catch (t) { + this._pendingRefs.remove(e); + throw t; + } + s instanceof Dict + ? (s.objId = e.toString()) + : s instanceof BaseStream && (s.dict.objId = e.toString()); + return s; + } + fetchUncompressed(e, t, i = !1) { + const a = e.gen; + let s = e.num; + if (t.gen !== a) { + const r = `Inconsistent generation in XRef: ${e}`; + if (this._generationFallback && t.gen < a) { + warn(r); + return this.fetchUncompressed(Ref.get(s, t.gen), t, i); + } + throw new XRefEntryException(r); + } + const r = this.stream.makeSubStream(t.offset + this.stream.start), + n = new Parser({ lexer: new Lexer(r), xref: this, allowStreams: !0 }), + o = n.getObj(), + g = n.getObj(), + c = n.getObj(); + if (o !== s || g !== a || !(c instanceof Cmd)) + throw new XRefEntryException(`Bad (uncompressed) XRef entry: ${e}`); + if ("obj" !== c.cmd) { + if (c.cmd.startsWith("obj")) { + s = parseInt(c.cmd.substring(3), 10); + if (!Number.isNaN(s)) return s; + } + throw new XRefEntryException(`Bad (uncompressed) XRef entry: ${e}`); + } + (t = + this.encrypt && !i + ? n.getObj(this.encrypt.createCipherTransform(s, a)) + : n.getObj()) instanceof BaseStream || this._cacheMap.set(s, t); + return t; + } + fetchCompressed(e, t, i = !1) { + const a = t.offset, + s = this.fetch(Ref.get(a, 0)); + if (!(s instanceof BaseStream)) throw new FormatError("bad ObjStm stream"); + const r = s.dict.get("First"), + n = s.dict.get("N"); + if (!Number.isInteger(r) || !Number.isInteger(n)) + throw new FormatError("invalid first and n parameters for ObjStm stream"); + let o = new Parser({ lexer: new Lexer(s), xref: this, allowStreams: !0 }); + const g = new Array(n), + c = new Array(n); + for (let e = 0; e < n; ++e) { + const t = o.getObj(); + if (!Number.isInteger(t)) + throw new FormatError( + `invalid object number in the ObjStm stream: ${t}`, + ); + const i = o.getObj(); + if (!Number.isInteger(i)) + throw new FormatError( + `invalid object offset in the ObjStm stream: ${i}`, + ); + g[e] = t; + c[e] = i; + } + const h = (s.start || 0) + r, + l = new Array(n); + for (let e = 0; e < n; ++e) { + const t = e < n - 1 ? c[e + 1] - c[e] : void 0; + if (t < 0) throw new FormatError("Invalid offset in the ObjStm stream."); + o = new Parser({ + lexer: new Lexer(s.makeSubStream(h + c[e], t, s.dict)), + xref: this, + allowStreams: !0, + }); + const i = o.getObj(); + l[e] = i; + if (i instanceof BaseStream) continue; + const r = g[e], + C = this.entries[r]; + C && C.offset === a && C.gen === e && this._cacheMap.set(r, i); + } + if (void 0 === (t = l[t.gen])) + throw new XRefEntryException(`Bad (compressed) XRef entry: ${e}`); + return t; + } + async fetchIfRefAsync(e, t) { + return e instanceof Ref ? this.fetchAsync(e, t) : e; + } + async fetchAsync(e, t) { + try { + return this.fetch(e, t); + } catch (i) { + if (!(i instanceof MissingDataException)) throw i; + await this.pdfManager.requestRange(i.begin, i.end); + return this.fetchAsync(e, t); + } + } + getCatalogObj() { + return this.root; + } +} +const so = [0, 0, 612, 792]; +class Page { + constructor({ + pdfManager: e, + xref: t, + pageIndex: i, + pageDict: a, + ref: s, + globalIdFactory: r, + fontCache: n, + builtInCMapCache: o, + standardFontDataCache: g, + globalImageCache: c, + systemFontCache: h, + nonBlendModesSet: l, + xfaFactory: C, + }) { + this.pdfManager = e; + this.pageIndex = i; + this.pageDict = a; + this.xref = t; + this.ref = s; + this.fontCache = n; + this.builtInCMapCache = o; + this.standardFontDataCache = g; + this.globalImageCache = c; + this.systemFontCache = h; + this.nonBlendModesSet = l; + this.evaluatorOptions = e.evaluatorOptions; + this.resourcesPromise = null; + this.xfaFactory = C; + const Q = { obj: 0 }; + this._localIdFactory = class extends r { + static createObjId() { + return `p${i}_${++Q.obj}`; + } + static getPageObjId() { + return `p${s.toString()}`; + } + }; + } + _getInheritableProperty(e, t = !1) { + const i = getInheritableProperty({ + dict: this.pageDict, + key: e, + getArray: t, + stopWhenFound: !1, + }); + return Array.isArray(i) + ? 1 !== i.length && i[0] instanceof Dict + ? Dict.merge({ xref: this.xref, dictArray: i }) + : i[0] + : i; + } + get content() { + return this.pageDict.getArray("Contents"); + } + get resources() { + const e = this._getInheritableProperty("Resources"); + return shadow(this, "resources", e instanceof Dict ? e : Dict.empty); + } + _getBoundingBox(e) { + if (this.xfaData) return this.xfaData.bbox; + const t = lookupNormalRect(this._getInheritableProperty(e, !0), null); + if (t) { + if (t[2] - t[0] > 0 && t[3] - t[1] > 0) return t; + warn(`Empty, or invalid, /${e} entry.`); + } + return null; + } + get mediaBox() { + return shadow(this, "mediaBox", this._getBoundingBox("MediaBox") || so); + } + get cropBox() { + return shadow( + this, + "cropBox", + this._getBoundingBox("CropBox") || this.mediaBox, + ); + } + get userUnit() { + let e = this.pageDict.get("UserUnit"); + ("number" != typeof e || e <= 0) && (e = 1); + return shadow(this, "userUnit", e); + } + get view() { + const { cropBox: e, mediaBox: t } = this; + if (e !== t && !isArrayEqual(e, t)) { + const i = Util.intersect(e, t); + if (i && i[2] - i[0] > 0 && i[3] - i[1] > 0) + return shadow(this, "view", i); + warn("Empty /CropBox and /MediaBox intersection."); + } + return shadow(this, "view", t); + } + get rotate() { + let e = this._getInheritableProperty("Rotate") || 0; + e % 90 != 0 + ? (e = 0) + : e >= 360 + ? (e %= 360) + : e < 0 && (e = ((e % 360) + 360) % 360); + return shadow(this, "rotate", e); + } + _onSubStreamError(e, t) { + if (!this.evaluatorOptions.ignoreErrors) throw e; + warn(`getContentStream - ignoring sub-stream (${t}): "${e}".`); + } + getContentStream() { + return this.pdfManager + .ensure(this, "content") + .then((e) => + e instanceof BaseStream + ? e + : Array.isArray(e) + ? new StreamsSequenceStream(e, this._onSubStreamError.bind(this)) + : new NullStream(), + ); + } + get xfaData() { + return shadow( + this, + "xfaData", + this.xfaFactory + ? { bbox: this.xfaFactory.getBoundingBox(this.pageIndex) } + : null, + ); + } + #T(e, t, i) { + for (const a of e) + if (a.id) { + const e = Ref.fromString(a.id); + if (!e) { + warn(`A non-linked annotation cannot be modified: ${a.id}`); + continue; + } + if (a.deleted) { + t.put(e, e); + continue; + } + i?.put(e); + a.ref = e; + delete a.id; + } + } + async saveNewAnnotations(e, t, i, a) { + if (this.xfaFactory) throw new Error("XFA: Cannot save new annotations."); + const s = new PartialEvaluator({ + xref: this.xref, + handler: e, + pageIndex: this.pageIndex, + idFactory: this._localIdFactory, + fontCache: this.fontCache, + builtInCMapCache: this.builtInCMapCache, + standardFontDataCache: this.standardFontDataCache, + globalImageCache: this.globalImageCache, + systemFontCache: this.systemFontCache, + options: this.evaluatorOptions, + }), + r = new RefSetCache(), + n = new RefSet(); + this.#T(i, r, n); + const o = this.pageDict, + g = this.annotations.filter((e) => !(e instanceof Ref && r.has(e))), + c = await AnnotationFactory.saveNewAnnotations(s, t, i, a); + for (const { ref: e } of c.annotations) + e instanceof Ref && !n.has(e) && g.push(e); + const h = o.get("Annots"); + o.set("Annots", g); + const l = []; + await writeObject(this.ref, o, l, this.xref); + h && o.set("Annots", h); + const C = c.dependencies; + C.push({ ref: this.ref, data: l.join("") }, ...c.annotations); + for (const e of r) C.push({ ref: e, data: null }); + return C; + } + save(e, t, i) { + const a = new PartialEvaluator({ + xref: this.xref, + handler: e, + pageIndex: this.pageIndex, + idFactory: this._localIdFactory, + fontCache: this.fontCache, + builtInCMapCache: this.builtInCMapCache, + standardFontDataCache: this.standardFontDataCache, + globalImageCache: this.globalImageCache, + systemFontCache: this.systemFontCache, + options: this.evaluatorOptions, + }); + return this._parsedAnnotations.then(function (e) { + const s = []; + for (const r of e) + r.mustBePrinted(i) && + s.push( + r.save(a, t, i).catch(function (e) { + warn( + `save - ignoring annotation data during "${t.name}" task: "${e}".`, + ); + return null; + }), + ); + return Promise.all(s).then(function (e) { + return e.filter((e) => !!e); + }); + }); + } + loadResources(e) { + this.resourcesPromise ||= this.pdfManager.ensure(this, "resources"); + return this.resourcesPromise.then(() => + new ObjectLoader(this.resources, e, this.xref).load(), + ); + } + getOperatorList({ + handler: e, + sink: t, + task: i, + intent: a, + cacheKey: s, + annotationStorage: r = null, + }) { + const n = this.getContentStream(), + h = this.loadResources([ + "ColorSpace", + "ExtGState", + "Font", + "Pattern", + "Properties", + "Shading", + "XObject", + ]), + Q = new PartialEvaluator({ + xref: this.xref, + handler: e, + pageIndex: this.pageIndex, + idFactory: this._localIdFactory, + fontCache: this.fontCache, + builtInCMapCache: this.builtInCMapCache, + standardFontDataCache: this.standardFontDataCache, + globalImageCache: this.globalImageCache, + systemFontCache: this.systemFontCache, + options: this.evaluatorOptions, + }), + u = this.xfaFactory ? null : getNewAnnotationsMap(r), + d = u?.get(this.pageIndex); + let f = Promise.resolve(null), + p = null; + if (d) { + const e = this.pdfManager.ensureDoc("annotationGlobals"); + let t; + const a = new Set(); + for (const { bitmapId: e, bitmap: t } of d) + !e || t || a.has(e) || a.add(e); + const { isOffscreenCanvasSupported: s } = this.evaluatorOptions; + if (a.size > 0) { + const e = d.slice(); + for (const [t, i] of r) + t.startsWith(E) && i.bitmap && a.has(i.bitmapId) && e.push(i); + t = AnnotationFactory.generateImages(e, this.xref, s); + } else t = AnnotationFactory.generateImages(d, this.xref, s); + p = new RefSet(); + this.#T(d, p, null); + f = e.then((e) => + e ? AnnotationFactory.printNewAnnotations(e, Q, i, d, t) : null, + ); + } + const m = Promise.all([n, h]).then(([r]) => { + const n = new OperatorList(a, t); + e.send("StartRenderPage", { + transparency: Q.hasBlendModes(this.resources, this.nonBlendModesSet), + pageIndex: this.pageIndex, + cacheKey: s, + }); + return Q.getOperatorList({ + stream: r, + task: i, + resources: this.resources, + operatorList: n, + }).then(function () { + return n; + }); + }); + return Promise.all([m, this._parsedAnnotations, f]).then(function ([ + e, + t, + s, + ]) { + if (s) { + t = t.filter((e) => !(e.ref && p.has(e.ref))); + for (let e = 0, i = s.length; e < i; e++) { + const a = s[e]; + if (a.refToReplace) { + const r = t.findIndex( + (e) => e.ref && isRefsEqual(e.ref, a.refToReplace), + ); + if (r >= 0) { + t.splice(r, 1, a); + s.splice(e--, 1); + i--; + } + } + } + t = t.concat(s); + } + if (0 === t.length || a & C) { + e.flush(!0); + return { length: e.totalLength }; + } + const n = !!(a & l), + h = !!(a & o), + E = !!(a & g), + u = !!(a & c), + d = []; + for (const e of t) + (h || (E && e.mustBeViewed(r, n)) || (u && e.mustBePrinted(r))) && + d.push( + e.getOperatorList(Q, i, a, n, r).catch(function (e) { + warn( + `getOperatorList - ignoring annotation data during "${i.name}" task: "${e}".`, + ); + return { opList: null, separateForm: !1, separateCanvas: !1 }; + }), + ); + return Promise.all(d).then(function (t) { + let i = !1, + a = !1; + for (const { opList: s, separateForm: r, separateCanvas: n } of t) { + e.addOpList(s); + i ||= r; + a ||= n; + } + e.flush(!0, { form: i, canvas: a }); + return { length: e.totalLength }; + }); + }); + } + async extractTextContent({ + handler: e, + task: t, + includeMarkedContent: i, + disableNormalization: a, + sink: s, + }) { + const r = this.getContentStream(), + n = this.loadResources(["ExtGState", "Font", "Properties", "XObject"]), + o = this.pdfManager.ensureCatalog("lang"), + [g, , c] = await Promise.all([r, n, o]); + return new PartialEvaluator({ + xref: this.xref, + handler: e, + pageIndex: this.pageIndex, + idFactory: this._localIdFactory, + fontCache: this.fontCache, + builtInCMapCache: this.builtInCMapCache, + standardFontDataCache: this.standardFontDataCache, + globalImageCache: this.globalImageCache, + systemFontCache: this.systemFontCache, + options: this.evaluatorOptions, + }).getTextContent({ + stream: g, + task: t, + resources: this.resources, + includeMarkedContent: i, + disableNormalization: a, + sink: s, + viewBox: this.view, + lang: c, + }); + } + async getStructTree() { + const e = await this.pdfManager.ensureCatalog("structTreeRoot"); + if (!e) return null; + await this._parsedAnnotations; + return (await this.pdfManager.ensure(this, "_parseStructTree", [e])) + .serializable; + } + _parseStructTree(e) { + const t = new StructTreePage(e, this.pageDict); + t.parse(this.ref); + return t; + } + async getAnnotationsData(e, t, i) { + const a = await this._parsedAnnotations; + if (0 === a.length) return a; + const s = [], + r = []; + let n; + const h = !!(i & o), + l = !!(i & g), + C = !!(i & c); + for (const i of a) { + const a = h || (l && i.viewable); + (a || (C && i.printable)) && s.push(i.data); + if (i.hasTextContent && a) { + n ||= new PartialEvaluator({ + xref: this.xref, + handler: e, + pageIndex: this.pageIndex, + idFactory: this._localIdFactory, + fontCache: this.fontCache, + builtInCMapCache: this.builtInCMapCache, + standardFontDataCache: this.standardFontDataCache, + globalImageCache: this.globalImageCache, + systemFontCache: this.systemFontCache, + options: this.evaluatorOptions, + }); + r.push( + i + .extractTextContent(n, t, [-1 / 0, -1 / 0, 1 / 0, 1 / 0]) + .catch(function (e) { + warn( + `getAnnotationsData - ignoring textContent during "${t.name}" task: "${e}".`, + ); + }), + ); + } + } + await Promise.all(r); + return s; + } + get annotations() { + const e = this._getInheritableProperty("Annots"); + return shadow(this, "annotations", Array.isArray(e) ? e : []); + } + get _parsedAnnotations() { + return shadow( + this, + "_parsedAnnotations", + this.pdfManager.ensure(this, "annotations").then(async (e) => { + if (0 === e.length) return e; + const t = await this.pdfManager.ensureDoc("annotationGlobals"); + if (!t) return []; + const i = []; + for (const a of e) + i.push( + AnnotationFactory.create( + this.xref, + a, + t, + this._localIdFactory, + !1, + this.ref, + ).catch(function (e) { + warn(`_parsedAnnotations: "${e}".`); + return null; + }), + ); + const a = []; + let s, r; + for (const e of await Promise.all(i)) + e && + (e instanceof WidgetAnnotation + ? (r ||= []).push(e) + : e instanceof PopupAnnotation + ? (s ||= []).push(e) + : a.push(e)); + r && a.push(...r); + s && a.push(...s); + return a; + }), + ); + } + get jsActions() { + return shadow( + this, + "jsActions", + collectActions(this.xref, this.pageDict, fA), + ); + } +} +const ro = new Uint8Array([37, 80, 68, 70, 45]), + no = new Uint8Array([115, 116, 97, 114, 116, 120, 114, 101, 102]), + oo = new Uint8Array([101, 110, 100, 111, 98, 106]); +function find(e, t, i = 1024, a = !1) { + const s = t.length, + r = e.peekBytes(i), + n = r.length - s; + if (n <= 0) return !1; + if (a) { + const i = s - 1; + let a = r.length - 1; + for (; a >= i; ) { + let n = 0; + for (; n < s && r[a - n] === t[i - n]; ) n++; + if (n >= s) { + e.pos += a - i; + return !0; + } + a--; + } + } else { + let i = 0; + for (; i <= n; ) { + let a = 0; + for (; a < s && r[i + a] === t[a]; ) a++; + if (a >= s) { + e.pos += i; + return !0; + } + i++; + } + } + return !1; +} +class PDFDocument { + constructor(e, t) { + if (t.length <= 0) + throw new InvalidPDFException( + "The PDF file is empty, i.e. its size is zero bytes.", + ); + this.pdfManager = e; + this.stream = t; + this.xref = new XRef(t, e); + this._pagePromises = new Map(); + this._version = null; + const i = { font: 0 }; + this._globalIdFactory = class { + static getDocId() { + return `g_${e.docId}`; + } + static createFontId() { + return "f" + ++i.font; + } + static createObjId() { + unreachable("Abstract method `createObjId` called."); + } + static getPageObjId() { + unreachable("Abstract method `getPageObjId` called."); + } + }; + } + parse(e) { + this.xref.parse(e); + this.catalog = new Catalog(this.pdfManager, this.xref); + } + get linearization() { + let e = null; + try { + e = Linearization.create(this.stream); + } catch (e) { + if (e instanceof MissingDataException) throw e; + info(e); + } + return shadow(this, "linearization", e); + } + get startXRef() { + const e = this.stream; + let t = 0; + if (this.linearization) { + e.reset(); + if (find(e, oo)) { + e.skip(6); + let i = e.peekByte(); + for (; isWhiteSpace(i); ) { + e.pos++; + i = e.peekByte(); + } + t = e.pos - e.start; + } + } else { + const i = 1024, + a = no.length; + let s = !1, + r = e.end; + for (; !s && r > 0; ) { + r -= i - a; + r < 0 && (r = 0); + e.pos = r; + s = find(e, no, i, !0); + } + if (s) { + e.skip(9); + let i; + do { + i = e.getByte(); + } while (isWhiteSpace(i)); + let a = ""; + for (; i >= 32 && i <= 57; ) { + a += String.fromCharCode(i); + i = e.getByte(); + } + t = parseInt(a, 10); + isNaN(t) && (t = 0); + } + } + return shadow(this, "startXRef", t); + } + checkHeader() { + const e = this.stream; + e.reset(); + if (!find(e, ro)) return; + e.moveStart(); + e.skip(ro.length); + let t, + i = ""; + for (; (t = e.getByte()) > 32 && i.length < 7; ) + i += String.fromCharCode(t); + Dt.test(i) ? (this._version = i) : warn(`Invalid PDF header version: ${i}`); + } + parseStartXRef() { + this.xref.setStartXRef(this.startXRef); + } + get numPages() { + let e = 0; + e = this.catalog.hasActualNumPages + ? this.catalog.numPages + : this.xfaFactory + ? this.xfaFactory.getNumPages() + : this.linearization + ? this.linearization.numPages + : this.catalog.numPages; + return shadow(this, "numPages", e); + } + _hasOnlyDocumentSignatures(e, t = 0) { + return ( + !!Array.isArray(e) && + e.every((e) => { + if (!((e = this.xref.fetchIfRef(e)) instanceof Dict)) return !1; + if (e.has("Kids")) { + if (++t > 10) { + warn("_hasOnlyDocumentSignatures: maximum recursion depth reached"); + return !1; + } + return this._hasOnlyDocumentSignatures(e.get("Kids"), t); + } + const i = isName(e.get("FT"), "Sig"), + a = e.get("Rect"), + s = Array.isArray(a) && a.every((e) => 0 === e); + return i && s; + }) + ); + } + get _xfaStreams() { + const e = this.catalog.acroForm; + if (!e) return null; + const t = e.get("XFA"), + i = { + "xdp:xdp": "", + template: "", + datasets: "", + config: "", + connectionSet: "", + localeSet: "", + stylesheet: "", + "/xdp:xdp": "", + }; + if (t instanceof BaseStream && !t.isEmpty) { + i["xdp:xdp"] = t; + return i; + } + if (!Array.isArray(t) || 0 === t.length) return null; + for (let e = 0, a = t.length; e < a; e += 2) { + let s; + s = 0 === e ? "xdp:xdp" : e === a - 2 ? "/xdp:xdp" : t[e]; + if (!i.hasOwnProperty(s)) continue; + const r = this.xref.fetchIfRef(t[e + 1]); + r instanceof BaseStream && !r.isEmpty && (i[s] = r); + } + return i; + } + get xfaDatasets() { + const e = this._xfaStreams; + if (!e) return shadow(this, "xfaDatasets", null); + for (const t of ["datasets", "xdp:xdp"]) { + const i = e[t]; + if (i) + try { + const e = stringToUTF8String(i.getString()); + return shadow(this, "xfaDatasets", new DatasetReader({ [t]: e })); + } catch { + warn("XFA - Invalid utf-8 string."); + break; + } + } + return shadow(this, "xfaDatasets", null); + } + get xfaData() { + const e = this._xfaStreams; + if (!e) return null; + const t = Object.create(null); + for (const [i, a] of Object.entries(e)) + if (a) + try { + t[i] = stringToUTF8String(a.getString()); + } catch { + warn("XFA - Invalid utf-8 string."); + return null; + } + return t; + } + get xfaFactory() { + let e; + this.pdfManager.enableXfa && + this.catalog.needsRendering && + this.formInfo.hasXfa && + !this.formInfo.hasAcroForm && + (e = this.xfaData); + return shadow(this, "xfaFactory", e ? new XFAFactory(e) : null); + } + get isPureXfa() { + return !!this.xfaFactory && this.xfaFactory.isValid(); + } + get htmlForXfa() { + return this.xfaFactory ? this.xfaFactory.getPages() : null; + } + async loadXfaImages() { + const e = await this.pdfManager.ensureCatalog("xfaImages"); + if (!e) return; + const t = e.getKeys(), + i = new ObjectLoader(e, t, this.xref); + await i.load(); + const a = new Map(); + for (const i of t) { + const t = e.get(i); + t instanceof BaseStream && a.set(i, t.getBytes()); + } + this.xfaFactory.setImages(a); + } + async loadXfaFonts(e, t) { + const i = await this.pdfManager.ensureCatalog("acroForm"); + if (!i) return; + const a = await i.getAsync("DR"); + if (!(a instanceof Dict)) return; + const s = new ObjectLoader(a, ["Font"], this.xref); + await s.load(); + const r = a.get("Font"); + if (!(r instanceof Dict)) return; + const n = Object.assign( + Object.create(null), + this.pdfManager.evaluatorOptions, + ); + n.useSystemFonts = !1; + const o = new PartialEvaluator({ + xref: this.xref, + handler: e, + pageIndex: -1, + idFactory: this._globalIdFactory, + fontCache: this.catalog.fontCache, + builtInCMapCache: this.catalog.builtInCMapCache, + standardFontDataCache: this.catalog.standardFontDataCache, + options: n, + }), + g = new OperatorList(), + c = [], + h = { + get font() { + return c.at(-1); + }, + set font(e) { + c.push(e); + }, + clone() { + return this; + }, + }, + l = new Map(); + r.forEach((e, t) => { + l.set(e, t); + }); + const C = []; + for (const [e, i] of l) { + const s = i.get("FontDescriptor"); + if (!(s instanceof Dict)) continue; + let r = s.get("FontFamily"); + r = r.replaceAll(/[ ]+(\d)/g, "$1"); + const n = { + fontFamily: r, + fontWeight: s.get("FontWeight"), + italicAngle: -s.get("ItalicAngle"), + }; + validateCSSFont(n) && + C.push( + o + .handleSetFont(a, [Name.get(e), 1], null, g, t, h, null, n) + .catch(function (e) { + warn(`loadXfaFonts: "${e}".`); + return null; + }), + ); + } + await Promise.all(C); + const Q = this.xfaFactory.setFonts(c); + if (!Q) return; + n.ignoreErrors = !0; + C.length = 0; + c.length = 0; + const E = new Set(); + for (const e of Q) getXfaFontName(`${e}-Regular`) || E.add(e); + E.size && Q.push("PdfJS-Fallback"); + for (const e of Q) + if (!E.has(e)) + for (const i of [ + { name: "Regular", fontWeight: 400, italicAngle: 0 }, + { name: "Bold", fontWeight: 700, italicAngle: 0 }, + { name: "Italic", fontWeight: 400, italicAngle: 12 }, + { name: "BoldItalic", fontWeight: 700, italicAngle: 12 }, + ]) { + const s = `${e}-${i.name}`, + r = getXfaFontDict(s); + C.push( + o + .handleSetFont(a, [Name.get(s), 1], null, g, t, h, r, { + fontFamily: e, + fontWeight: i.fontWeight, + italicAngle: i.italicAngle, + }) + .catch(function (e) { + warn(`loadXfaFonts: "${e}".`); + return null; + }), + ); + } + await Promise.all(C); + this.xfaFactory.appendFonts(c, E); + } + async serializeXfaData(e) { + return this.xfaFactory ? this.xfaFactory.serializeData(e) : null; + } + get version() { + return this.catalog.version || this._version; + } + get formInfo() { + const e = { hasFields: !1, hasAcroForm: !1, hasXfa: !1, hasSignatures: !1 }, + t = this.catalog.acroForm; + if (!t) return shadow(this, "formInfo", e); + try { + const i = t.get("Fields"), + a = Array.isArray(i) && i.length > 0; + e.hasFields = a; + const s = t.get("XFA"); + e.hasXfa = + (Array.isArray(s) && s.length > 0) || + (s instanceof BaseStream && !s.isEmpty); + const r = !!(1 & t.get("SigFlags")), + n = r && this._hasOnlyDocumentSignatures(i); + e.hasAcroForm = a && !n; + e.hasSignatures = r; + } catch (e) { + if (e instanceof MissingDataException) throw e; + warn(`Cannot fetch form information: "${e}".`); + } + return shadow(this, "formInfo", e); + } + get documentInfo() { + const e = { + PDFFormatVersion: this.version, + Language: this.catalog.lang, + EncryptFilterName: this.xref.encrypt + ? this.xref.encrypt.filterName + : null, + IsLinearized: !!this.linearization, + IsAcroFormPresent: this.formInfo.hasAcroForm, + IsXFAPresent: this.formInfo.hasXfa, + IsCollectionPresent: !!this.catalog.collection, + IsSignaturesPresent: this.formInfo.hasSignatures, + }; + let t; + try { + t = this.xref.trailer.get("Info"); + } catch (e) { + if (e instanceof MissingDataException) throw e; + info("The document information dictionary is invalid."); + } + if (!(t instanceof Dict)) return shadow(this, "documentInfo", e); + for (const i of t.getKeys()) { + const a = t.get(i); + switch (i) { + case "Title": + case "Author": + case "Subject": + case "Keywords": + case "Creator": + case "Producer": + case "CreationDate": + case "ModDate": + if ("string" == typeof a) { + e[i] = stringToPDFString(a); + continue; + } + break; + case "Trapped": + if (a instanceof Name) { + e[i] = a; + continue; + } + break; + default: + let t; + switch (typeof a) { + case "string": + t = stringToPDFString(a); + break; + case "number": + case "boolean": + t = a; + break; + default: + a instanceof Name && (t = a); + } + if (void 0 === t) { + warn(`Bad value, for custom key "${i}", in Info: ${a}.`); + continue; + } + e.Custom || (e.Custom = Object.create(null)); + e.Custom[i] = t; + continue; + } + warn(`Bad value, for key "${i}", in Info: ${a}.`); + } + return shadow(this, "documentInfo", e); + } + get fingerprints() { + function validate(e) { + return ( + "string" == typeof e && + e.length > 0 && + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" !== e + ); + } + function hexString(e) { + const t = []; + for (const i of e) { + const e = i.toString(16); + t.push(e.padStart(2, "0")); + } + return t.join(""); + } + const e = this.xref.trailer.get("ID"); + let t, i; + if (Array.isArray(e) && validate(e[0])) { + t = stringToBytes(e[0]); + e[1] !== e[0] && validate(e[1]) && (i = stringToBytes(e[1])); + } else t = Js(this.stream.getByteRange(0, 1024), 0, 1024); + return shadow(this, "fingerprints", [ + hexString(t), + i ? hexString(i) : null, + ]); + } + async _getLinearizationPage(e) { + const { catalog: t, linearization: i, xref: a } = this, + s = Ref.get(i.objectNumberFirst, 0); + try { + const e = await a.fetchAsync(s); + if (e instanceof Dict) { + let i = e.getRaw("Type"); + i instanceof Ref && (i = await a.fetchAsync(i)); + if ( + isName(i, "Page") || + (!e.has("Type") && !e.has("Kids") && e.has("Contents")) + ) { + t.pageKidsCountCache.has(s) || t.pageKidsCountCache.put(s, 1); + t.pageIndexCache.has(s) || t.pageIndexCache.put(s, 0); + return [e, s]; + } + } + throw new FormatError( + "The Linearization dictionary doesn't point to a valid Page dictionary.", + ); + } catch (i) { + warn(`_getLinearizationPage: "${i.message}".`); + return t.getPageDict(e); + } + } + getPage(e) { + const t = this._pagePromises.get(e); + if (t) return t; + const { catalog: i, linearization: a, xfaFactory: s } = this; + let r; + r = s + ? Promise.resolve([Dict.empty, null]) + : a?.pageFirst === e + ? this._getLinearizationPage(e) + : i.getPageDict(e); + r = r.then( + ([t, a]) => + new Page({ + pdfManager: this.pdfManager, + xref: this.xref, + pageIndex: e, + pageDict: t, + ref: a, + globalIdFactory: this._globalIdFactory, + fontCache: i.fontCache, + builtInCMapCache: i.builtInCMapCache, + standardFontDataCache: i.standardFontDataCache, + globalImageCache: i.globalImageCache, + systemFontCache: i.systemFontCache, + nonBlendModesSet: i.nonBlendModesSet, + xfaFactory: s, + }), + ); + this._pagePromises.set(e, r); + return r; + } + async checkFirstPage(e = !1) { + if (!e) + try { + await this.getPage(0); + } catch (e) { + if (e instanceof XRefEntryException) { + this._pagePromises.delete(0); + await this.cleanup(); + throw new XRefParseException(); + } + } + } + async checkLastPage(e = !1) { + const { catalog: t, pdfManager: i } = this; + t.setActualNumPages(); + let a; + try { + await Promise.all([ + i.ensureDoc("xfaFactory"), + i.ensureDoc("linearization"), + i.ensureCatalog("numPages"), + ]); + if (this.xfaFactory) return; + a = this.linearization ? this.linearization.numPages : t.numPages; + if (!Number.isInteger(a)) + throw new FormatError("Page count is not an integer."); + if (a <= 1) return; + await this.getPage(a - 1); + } catch (s) { + this._pagePromises.delete(a - 1); + await this.cleanup(); + if (s instanceof XRefEntryException && !e) throw new XRefParseException(); + warn(`checkLastPage - invalid /Pages tree /Count: ${a}.`); + let r; + try { + r = await t.getAllPageDicts(e); + } catch (i) { + if (i instanceof XRefEntryException && !e) + throw new XRefParseException(); + t.setActualNumPages(1); + return; + } + for (const [e, [a, s]] of r) { + let r; + if (a instanceof Error) { + r = Promise.reject(a); + r.catch(() => {}); + } else + r = Promise.resolve( + new Page({ + pdfManager: i, + xref: this.xref, + pageIndex: e, + pageDict: a, + ref: s, + globalIdFactory: this._globalIdFactory, + fontCache: t.fontCache, + builtInCMapCache: t.builtInCMapCache, + standardFontDataCache: t.standardFontDataCache, + globalImageCache: t.globalImageCache, + systemFontCache: t.systemFontCache, + nonBlendModesSet: t.nonBlendModesSet, + xfaFactory: null, + }), + ); + this._pagePromises.set(e, r); + } + t.setActualNumPages(r.size); + } + } + fontFallback(e, t) { + return this.catalog.fontFallback(e, t); + } + async cleanup(e = !1) { + return this.catalog ? this.catalog.cleanup(e) : clearGlobalCaches(); + } + async #q(e, t, i, a, s) { + const { xref: r } = this; + if (!(t instanceof Ref) || s.has(t)) return; + s.put(t); + const n = await r.fetchAsync(t); + if (!(n instanceof Dict)) return; + if (n.has("T")) { + const t = stringToPDFString(await n.getAsync("T")); + e = "" === e ? t : `${e}.${t}`; + } else { + let t = n; + for (;;) { + t = t.getRaw("Parent"); + if (t instanceof Ref) { + if (s.has(t)) break; + t = await r.fetchAsync(t); + } + if (!(t instanceof Dict)) break; + if (t.has("T")) { + const i = stringToPDFString(await t.getAsync("T")); + e = "" === e ? i : `${e}.${i}`; + break; + } + } + } + i.has(e) || i.set(e, []); + i.get(e).push( + AnnotationFactory.create(r, t, a, null, !0, null) + .then((e) => e?.getFieldObject()) + .catch(function (e) { + warn(`#collectFieldObjects: "${e}".`); + return null; + }), + ); + if (!n.has("Kids")) return; + const o = await n.getAsync("Kids"); + if (Array.isArray(o)) for (const t of o) await this.#q(e, t, i, a, s); + } + get fieldObjects() { + if (!this.formInfo.hasFields) + return shadow(this, "fieldObjects", Promise.resolve(null)); + return shadow( + this, + "fieldObjects", + Promise.all([ + this.pdfManager.ensureDoc("annotationGlobals"), + this.pdfManager.ensureCatalog("acroForm"), + ]).then(async ([e, t]) => { + if (!e) return null; + const i = new RefSet(), + a = Object.create(null), + s = new Map(); + for (const a of await t.getAsync("Fields")) + await this.#q("", a, s, e, i); + const r = []; + for (const [e, t] of s) + r.push( + Promise.all(t).then((t) => { + (t = t.filter((e) => !!e)).length > 0 && (a[e] = t); + }), + ); + await Promise.all(r); + return a; + }), + ); + } + get hasJSActions() { + return shadow( + this, + "hasJSActions", + this.pdfManager.ensureDoc("_parseHasJSActions"), + ); + } + async _parseHasJSActions() { + const [e, t] = await Promise.all([ + this.pdfManager.ensureCatalog("jsActions"), + this.pdfManager.ensureDoc("fieldObjects"), + ]); + return ( + !!e || + (!!t && Object.values(t).some((e) => e.some((e) => null !== e.actions))) + ); + } + get calculationOrderIds() { + const e = this.catalog.acroForm; + if (!e?.has("CO")) return shadow(this, "calculationOrderIds", null); + const t = e.get("CO"); + if (!Array.isArray(t) || 0 === t.length) + return shadow(this, "calculationOrderIds", null); + const i = []; + for (const e of t) e instanceof Ref && i.push(e.toString()); + return 0 === i.length + ? shadow(this, "calculationOrderIds", null) + : shadow(this, "calculationOrderIds", i); + } + get annotationGlobals() { + return shadow( + this, + "annotationGlobals", + AnnotationFactory.createGlobals(this.pdfManager), + ); + } +} +class BasePdfManager { + constructor(e) { + this.constructor === BasePdfManager && + unreachable("Cannot initialize BasePdfManager."); + this._docBaseUrl = (function parseDocBaseUrl(e) { + if (e) { + const t = createValidAbsoluteUrl(e); + if (t) return t.href; + warn(`Invalid absolute docBaseUrl: "${e}".`); + } + return null; + })(e.docBaseUrl); + this._docId = e.docId; + this._password = e.password; + this.enableXfa = e.enableXfa; + e.evaluatorOptions.isOffscreenCanvasSupported &&= + FeatureTest.isOffscreenCanvasSupported; + this.evaluatorOptions = Object.freeze(e.evaluatorOptions); + } + get docId() { + return this._docId; + } + get password() { + return this._password; + } + get docBaseUrl() { + return this._docBaseUrl; + } + get catalog() { + return this.pdfDocument.catalog; + } + ensureDoc(e, t) { + return this.ensure(this.pdfDocument, e, t); + } + ensureXRef(e, t) { + return this.ensure(this.pdfDocument.xref, e, t); + } + ensureCatalog(e, t) { + return this.ensure(this.pdfDocument.catalog, e, t); + } + getPage(e) { + return this.pdfDocument.getPage(e); + } + fontFallback(e, t) { + return this.pdfDocument.fontFallback(e, t); + } + loadXfaFonts(e, t) { + return this.pdfDocument.loadXfaFonts(e, t); + } + loadXfaImages() { + return this.pdfDocument.loadXfaImages(); + } + serializeXfaData(e) { + return this.pdfDocument.serializeXfaData(e); + } + cleanup(e = !1) { + return this.pdfDocument.cleanup(e); + } + async ensure(e, t, i) { + unreachable("Abstract method `ensure` called"); + } + requestRange(e, t) { + unreachable("Abstract method `requestRange` called"); + } + requestLoadedStream(e = !1) { + unreachable("Abstract method `requestLoadedStream` called"); + } + sendProgressiveData(e) { + unreachable("Abstract method `sendProgressiveData` called"); + } + updatePassword(e) { + this._password = e; + } + terminate(e) { + unreachable("Abstract method `terminate` called"); + } +} +class LocalPdfManager extends BasePdfManager { + constructor(e) { + super(e); + const t = new Stream(e.source); + this.pdfDocument = new PDFDocument(this, t); + this._loadedStreamPromise = Promise.resolve(t); + } + async ensure(e, t, i) { + const a = e[t]; + return "function" == typeof a ? a.apply(e, i) : a; + } + requestRange(e, t) { + return Promise.resolve(); + } + requestLoadedStream(e = !1) { + return this._loadedStreamPromise; + } + terminate(e) {} +} +class NetworkPdfManager extends BasePdfManager { + constructor(e) { + super(e); + this.streamManager = new ChunkedStreamManager(e.source, { + msgHandler: e.handler, + length: e.length, + disableAutoFetch: e.disableAutoFetch, + rangeChunkSize: e.rangeChunkSize, + }); + this.pdfDocument = new PDFDocument(this, this.streamManager.getStream()); + } + async ensure(e, t, i) { + try { + const a = e[t]; + return "function" == typeof a ? a.apply(e, i) : a; + } catch (a) { + if (!(a instanceof MissingDataException)) throw a; + await this.requestRange(a.begin, a.end); + return this.ensure(e, t, i); + } + } + requestRange(e, t) { + return this.streamManager.requestRange(e, t); + } + requestLoadedStream(e = !1) { + return this.streamManager.requestAllChunks(e); + } + sendProgressiveData(e) { + this.streamManager.onReceiveData({ chunk: e }); + } + terminate(e) { + this.streamManager.abort(e); + } +} +const go = 1, + Io = 2, + co = 1, + ho = 2, + lo = 3, + Co = 4, + Bo = 5, + Qo = 6, + Eo = 7, + uo = 8; +function wrapReason(e) { + e instanceof Error || + ("object" == typeof e && null !== e) || + unreachable( + 'wrapReason: Expected "reason" to be a (possibly cloned) Error.', + ); + switch (e.name) { + case "AbortException": + return new AbortException(e.message); + case "MissingPDFException": + return new MissingPDFException(e.message); + case "PasswordException": + return new PasswordException(e.message, e.code); + case "UnexpectedResponseException": + return new UnexpectedResponseException(e.message, e.status); + case "UnknownErrorException": + return new UnknownErrorException(e.message, e.details); + default: + return new UnknownErrorException(e.message, e.toString()); + } +} +class MessageHandler { + constructor(e, t, i) { + this.sourceName = e; + this.targetName = t; + this.comObj = i; + this.callbackId = 1; + this.streamId = 1; + this.streamSinks = Object.create(null); + this.streamControllers = Object.create(null); + this.callbackCapabilities = Object.create(null); + this.actionHandler = Object.create(null); + this._onComObjOnMessage = (e) => { + const t = e.data; + if (t.targetName !== this.sourceName) return; + if (t.stream) { + this.#O(t); + return; + } + if (t.callback) { + const e = t.callbackId, + i = this.callbackCapabilities[e]; + if (!i) throw new Error(`Cannot resolve callback ${e}`); + delete this.callbackCapabilities[e]; + if (t.callback === go) i.resolve(t.data); + else { + if (t.callback !== Io) throw new Error("Unexpected callback case"); + i.reject(wrapReason(t.reason)); + } + return; + } + const a = this.actionHandler[t.action]; + if (!a) throw new Error(`Unknown action from worker: ${t.action}`); + if (t.callbackId) { + const e = this.sourceName, + s = t.sourceName; + new Promise(function (e) { + e(a(t.data)); + }).then( + function (a) { + i.postMessage({ + sourceName: e, + targetName: s, + callback: go, + callbackId: t.callbackId, + data: a, + }); + }, + function (a) { + i.postMessage({ + sourceName: e, + targetName: s, + callback: Io, + callbackId: t.callbackId, + reason: wrapReason(a), + }); + }, + ); + } else t.streamId ? this.#P(t) : a(t.data); + }; + i.addEventListener("message", this._onComObjOnMessage); + } + on(e, t) { + const i = this.actionHandler; + if (i[e]) throw new Error(`There is already an actionName called "${e}"`); + i[e] = t; + } + send(e, t, i) { + this.comObj.postMessage( + { + sourceName: this.sourceName, + targetName: this.targetName, + action: e, + data: t, + }, + i, + ); + } + sendWithPromise(e, t, i) { + const a = this.callbackId++, + s = Promise.withResolvers(); + this.callbackCapabilities[a] = s; + try { + this.comObj.postMessage( + { + sourceName: this.sourceName, + targetName: this.targetName, + action: e, + callbackId: a, + data: t, + }, + i, + ); + } catch (e) { + s.reject(e); + } + return s.promise; + } + sendWithStream(e, t, i, a) { + const s = this.streamId++, + r = this.sourceName, + n = this.targetName, + o = this.comObj; + return new ReadableStream( + { + start: (i) => { + const g = Promise.withResolvers(); + this.streamControllers[s] = { + controller: i, + startCall: g, + pullCall: null, + cancelCall: null, + isClosed: !1, + }; + o.postMessage( + { + sourceName: r, + targetName: n, + action: e, + streamId: s, + data: t, + desiredSize: i.desiredSize, + }, + a, + ); + return g.promise; + }, + pull: (e) => { + const t = Promise.withResolvers(); + this.streamControllers[s].pullCall = t; + o.postMessage({ + sourceName: r, + targetName: n, + stream: Qo, + streamId: s, + desiredSize: e.desiredSize, + }); + return t.promise; + }, + cancel: (e) => { + assert(e instanceof Error, "cancel must have a valid reason"); + const t = Promise.withResolvers(); + this.streamControllers[s].cancelCall = t; + this.streamControllers[s].isClosed = !0; + o.postMessage({ + sourceName: r, + targetName: n, + stream: co, + streamId: s, + reason: wrapReason(e), + }); + return t.promise; + }, + }, + i, + ); + } + #P(e) { + const t = e.streamId, + i = this.sourceName, + a = e.sourceName, + s = this.comObj, + r = this, + n = this.actionHandler[e.action], + o = { + enqueue(e, r = 1, n) { + if (this.isCancelled) return; + const o = this.desiredSize; + this.desiredSize -= r; + if (o > 0 && this.desiredSize <= 0) { + this.sinkCapability = Promise.withResolvers(); + this.ready = this.sinkCapability.promise; + } + s.postMessage( + { sourceName: i, targetName: a, stream: Co, streamId: t, chunk: e }, + n, + ); + }, + close() { + if (!this.isCancelled) { + this.isCancelled = !0; + s.postMessage({ + sourceName: i, + targetName: a, + stream: lo, + streamId: t, + }); + delete r.streamSinks[t]; + } + }, + error(e) { + assert(e instanceof Error, "error must have a valid reason"); + if (!this.isCancelled) { + this.isCancelled = !0; + s.postMessage({ + sourceName: i, + targetName: a, + stream: Bo, + streamId: t, + reason: wrapReason(e), + }); + } + }, + sinkCapability: Promise.withResolvers(), + onPull: null, + onCancel: null, + isCancelled: !1, + desiredSize: e.desiredSize, + ready: null, + }; + o.sinkCapability.resolve(); + o.ready = o.sinkCapability.promise; + this.streamSinks[t] = o; + new Promise(function (t) { + t(n(e.data, o)); + }).then( + function () { + s.postMessage({ + sourceName: i, + targetName: a, + stream: uo, + streamId: t, + success: !0, + }); + }, + function (e) { + s.postMessage({ + sourceName: i, + targetName: a, + stream: uo, + streamId: t, + reason: wrapReason(e), + }); + }, + ); + } + #O(e) { + const t = e.streamId, + i = this.sourceName, + a = e.sourceName, + s = this.comObj, + r = this.streamControllers[t], + n = this.streamSinks[t]; + switch (e.stream) { + case uo: + e.success + ? r.startCall.resolve() + : r.startCall.reject(wrapReason(e.reason)); + break; + case Eo: + e.success + ? r.pullCall.resolve() + : r.pullCall.reject(wrapReason(e.reason)); + break; + case Qo: + if (!n) { + s.postMessage({ + sourceName: i, + targetName: a, + stream: Eo, + streamId: t, + success: !0, + }); + break; + } + n.desiredSize <= 0 && e.desiredSize > 0 && n.sinkCapability.resolve(); + n.desiredSize = e.desiredSize; + new Promise(function (e) { + e(n.onPull?.()); + }).then( + function () { + s.postMessage({ + sourceName: i, + targetName: a, + stream: Eo, + streamId: t, + success: !0, + }); + }, + function (e) { + s.postMessage({ + sourceName: i, + targetName: a, + stream: Eo, + streamId: t, + reason: wrapReason(e), + }); + }, + ); + break; + case Co: + assert(r, "enqueue should have stream controller"); + if (r.isClosed) break; + r.controller.enqueue(e.chunk); + break; + case lo: + assert(r, "close should have stream controller"); + if (r.isClosed) break; + r.isClosed = !0; + r.controller.close(); + this.#W(r, t); + break; + case Bo: + assert(r, "error should have stream controller"); + r.controller.error(wrapReason(e.reason)); + this.#W(r, t); + break; + case ho: + e.success + ? r.cancelCall.resolve() + : r.cancelCall.reject(wrapReason(e.reason)); + this.#W(r, t); + break; + case co: + if (!n) break; + new Promise(function (t) { + t(n.onCancel?.(wrapReason(e.reason))); + }).then( + function () { + s.postMessage({ + sourceName: i, + targetName: a, + stream: ho, + streamId: t, + success: !0, + }); + }, + function (e) { + s.postMessage({ + sourceName: i, + targetName: a, + stream: ho, + streamId: t, + reason: wrapReason(e), + }); + }, + ); + n.sinkCapability.reject(wrapReason(e.reason)); + n.isCancelled = !0; + delete this.streamSinks[t]; + break; + default: + throw new Error("Unexpected stream case"); + } + } + async #W(e, t) { + await Promise.allSettled([ + e.startCall?.promise, + e.pullCall?.promise, + e.cancelCall?.promise, + ]); + delete this.streamControllers[t]; + } + destroy() { + this.comObj.removeEventListener("message", this._onComObjOnMessage); + } +} +class PDFWorkerStream { + constructor(e) { + this._msgHandler = e; + this._contentLength = null; + this._fullRequestReader = null; + this._rangeRequestReaders = []; + } + getFullReader() { + assert( + !this._fullRequestReader, + "PDFWorkerStream.getFullReader can only be called once.", + ); + this._fullRequestReader = new PDFWorkerStreamReader(this._msgHandler); + return this._fullRequestReader; + } + getRangeReader(e, t) { + const i = new PDFWorkerStreamRangeReader(e, t, this._msgHandler); + this._rangeRequestReaders.push(i); + return i; + } + cancelAllRequests(e) { + this._fullRequestReader?.cancel(e); + for (const t of this._rangeRequestReaders.slice(0)) t.cancel(e); + } +} +class PDFWorkerStreamReader { + constructor(e) { + this._msgHandler = e; + this.onProgress = null; + this._contentLength = null; + this._isRangeSupported = !1; + this._isStreamingSupported = !1; + const t = this._msgHandler.sendWithStream("GetReader"); + this._reader = t.getReader(); + this._headersReady = this._msgHandler + .sendWithPromise("ReaderHeadersReady") + .then((e) => { + this._isStreamingSupported = e.isStreamingSupported; + this._isRangeSupported = e.isRangeSupported; + this._contentLength = e.contentLength; + }); + } + get headersReady() { + return this._headersReady; + } + get contentLength() { + return this._contentLength; + } + get isStreamingSupported() { + return this._isStreamingSupported; + } + get isRangeSupported() { + return this._isRangeSupported; + } + async read() { + const { value: e, done: t } = await this._reader.read(); + return t ? { value: void 0, done: !0 } : { value: e.buffer, done: !1 }; + } + cancel(e) { + this._reader.cancel(e); + } +} +class PDFWorkerStreamRangeReader { + constructor(e, t, i) { + this._msgHandler = i; + this.onProgress = null; + const a = this._msgHandler.sendWithStream("GetRangeReader", { + begin: e, + end: t, + }); + this._reader = a.getReader(); + } + get isStreamingSupported() { + return !1; + } + async read() { + const { value: e, done: t } = await this._reader.read(); + return t ? { value: void 0, done: !0 } : { value: e.buffer, done: !1 }; + } + cancel(e) { + this._reader.cancel(e); + } +} +class WorkerTask { + constructor(e) { + this.name = e; + this.terminated = !1; + this._capability = Promise.withResolvers(); + } + get finished() { + return this._capability.promise; + } + finish() { + this._capability.resolve(); + } + terminate() { + this.terminated = !0; + } + ensureNotTerminated() { + if (this.terminated) throw new Error("Worker task was terminated"); + } +} +class WorkerMessageHandler { + static setup(e, t) { + let i = !1; + e.on("test", function (t) { + if (!i) { + i = !0; + e.send("test", t instanceof Uint8Array); + } + }); + e.on("configure", function (e) { + !(function setVerbosityLevel(e) { + Number.isInteger(e) && (st = e); + })(e.verbosity); + }); + e.on("GetDocRequest", function (e) { + return WorkerMessageHandler.createDocumentHandler(e, t); + }); + } + static createDocumentHandler(e, t) { + let i, + a = !1, + s = null; + const r = new Set(), + n = getVerbosityLevel(), + { docId: o, apiVersion: g } = e, + c = "4.3.136"; + if (g !== c) + throw new Error( + `The API version "${g}" does not match the Worker version "${c}".`, + ); + const h = []; + for (const e in []) h.push(e); + if (h.length) + throw new Error( + "The `Array.prototype` contains unexpected enumerable properties: " + + h.join(", ") + + "; thus breaking e.g. `for...in` iteration of `Array`s.", + ); + const l = o + "_worker"; + let C = new MessageHandler(l, o, t); + function ensureNotTerminated() { + if (a) throw new Error("Worker was terminated"); + } + function startWorkerTask(e) { + r.add(e); + } + function finishWorkerTask(e) { + e.finish(); + r.delete(e); + } + async function loadDocument(e) { + await i.ensureDoc("checkHeader"); + await i.ensureDoc("parseStartXRef"); + await i.ensureDoc("parse", [e]); + await i.ensureDoc("checkFirstPage", [e]); + await i.ensureDoc("checkLastPage", [e]); + const t = await i.ensureDoc("isPureXfa"); + if (t) { + const e = new WorkerTask("loadXfaFonts"); + startWorkerTask(e); + await Promise.all([ + i + .loadXfaFonts(C, e) + .catch((e) => {}) + .then(() => finishWorkerTask(e)), + i.loadXfaImages(), + ]); + } + const [a, s] = await Promise.all([ + i.ensureDoc("numPages"), + i.ensureDoc("fingerprints"), + ]); + return { + numPages: a, + fingerprints: s, + htmlForXfa: t ? await i.ensureDoc("htmlForXfa") : null, + }; + } + function getPdfManager({ + data: e, + password: t, + disableAutoFetch: i, + rangeChunkSize: a, + length: r, + docBaseUrl: n, + enableXfa: g, + evaluatorOptions: c, + }) { + const h = { + source: null, + disableAutoFetch: i, + docBaseUrl: n, + docId: o, + enableXfa: g, + evaluatorOptions: c, + handler: C, + length: r, + password: t, + rangeChunkSize: a, + }, + l = Promise.withResolvers(); + let Q; + if (e) { + try { + h.source = e; + Q = new LocalPdfManager(h); + l.resolve(Q); + } catch (e) { + l.reject(e); + } + return l.promise; + } + let E, + u = []; + try { + E = new PDFWorkerStream(C); + } catch (e) { + l.reject(e); + return l.promise; + } + const d = E.getFullReader(); + d.headersReady + .then(function () { + if (d.isRangeSupported) { + h.source = E; + h.length = d.contentLength; + h.disableAutoFetch ||= d.isStreamingSupported; + Q = new NetworkPdfManager(h); + for (const e of u) Q.sendProgressiveData(e); + u = []; + l.resolve(Q); + s = null; + } + }) + .catch(function (e) { + l.reject(e); + s = null; + }); + let f = 0; + new Promise(function (e, t) { + const readChunk = function ({ value: e, done: i }) { + try { + ensureNotTerminated(); + if (i) { + Q || + (function () { + const e = arrayBuffersToBytes(u); + r && + e.length !== r && + warn("reported HTTP length is different from actual"); + try { + h.source = e; + Q = new LocalPdfManager(h); + l.resolve(Q); + } catch (e) { + l.reject(e); + } + u = []; + })(); + s = null; + return; + } + f += e.byteLength; + d.isStreamingSupported || + C.send("DocProgress", { + loaded: f, + total: Math.max(f, d.contentLength || 0), + }); + Q ? Q.sendProgressiveData(e) : u.push(e); + d.read().then(readChunk, t); + } catch (e) { + t(e); + } + }; + d.read().then(readChunk, t); + }).catch(function (e) { + l.reject(e); + s = null; + }); + s = function (e) { + E.cancelAllRequests(e); + }; + return l.promise; + } + C.on("GetPage", function (e) { + return i.getPage(e.pageIndex).then(function (e) { + return Promise.all([ + i.ensure(e, "rotate"), + i.ensure(e, "ref"), + i.ensure(e, "userUnit"), + i.ensure(e, "view"), + ]).then(function ([e, t, i, a]) { + return { + rotate: e, + ref: t, + refStr: t?.toString() ?? null, + userUnit: i, + view: a, + }; + }); + }); + }); + C.on("GetPageIndex", function (e) { + const t = Ref.get(e.num, e.gen); + return i.ensureCatalog("getPageIndex", [t]); + }); + C.on("GetDestinations", function (e) { + return i.ensureCatalog("destinations"); + }); + C.on("GetDestination", function (e) { + return i.ensureCatalog("getDestination", [e.id]); + }); + C.on("GetPageLabels", function (e) { + return i.ensureCatalog("pageLabels"); + }); + C.on("GetPageLayout", function (e) { + return i.ensureCatalog("pageLayout"); + }); + C.on("GetPageMode", function (e) { + return i.ensureCatalog("pageMode"); + }); + C.on("GetViewerPreferences", function (e) { + return i.ensureCatalog("viewerPreferences"); + }); + C.on("GetOpenAction", function (e) { + return i.ensureCatalog("openAction"); + }); + C.on("GetAttachments", function (e) { + return i.ensureCatalog("attachments"); + }); + C.on("GetDocJSActions", function (e) { + return i.ensureCatalog("jsActions"); + }); + C.on("GetPageJSActions", function ({ pageIndex: e }) { + return i.getPage(e).then(function (e) { + return i.ensure(e, "jsActions"); + }); + }); + C.on("GetOutline", function (e) { + return i.ensureCatalog("documentOutline"); + }); + C.on("GetOptionalContentConfig", function (e) { + return i.ensureCatalog("optionalContentConfig"); + }); + C.on("GetPermissions", function (e) { + return i.ensureCatalog("permissions"); + }); + C.on("GetMetadata", function (e) { + return Promise.all([ + i.ensureDoc("documentInfo"), + i.ensureCatalog("metadata"), + ]); + }); + C.on("GetMarkInfo", function (e) { + return i.ensureCatalog("markInfo"); + }); + C.on("GetData", function (e) { + return i.requestLoadedStream().then(function (e) { + return e.bytes; + }); + }); + C.on("GetAnnotations", function ({ pageIndex: e, intent: t }) { + return i.getPage(e).then(function (i) { + const a = new WorkerTask(`GetAnnotations: page ${e}`); + startWorkerTask(a); + return i.getAnnotationsData(C, a, t).then( + (e) => { + finishWorkerTask(a); + return e; + }, + (e) => { + finishWorkerTask(a); + throw e; + }, + ); + }); + }); + C.on("GetFieldObjects", function (e) { + return i.ensureDoc("fieldObjects"); + }); + C.on("HasJSActions", function (e) { + return i.ensureDoc("hasJSActions"); + }); + C.on("GetCalculationOrderIds", function (e) { + return i.ensureDoc("calculationOrderIds"); + }); + C.on( + "SaveDocument", + async function ({ + isPureXfa: e, + numPages: t, + annotationStorage: a, + filename: s, + }) { + const r = [ + i.requestLoadedStream(), + i.ensureCatalog("acroForm"), + i.ensureCatalog("acroFormRef"), + i.ensureDoc("startXRef"), + i.ensureDoc("xref"), + i.ensureDoc("linearization"), + i.ensureCatalog("structTreeRoot"), + ], + n = [], + o = e ? null : getNewAnnotationsMap(a), + [g, c, h, l, Q, E, u] = await Promise.all(r), + d = Q.trailer.getRaw("Root") || null; + let f; + if (o) { + u + ? (await u.canUpdateStructTree({ + pdfManager: i, + xref: Q, + newAnnotationsByPage: o, + })) && (f = u) + : (await StructTreeRoot.canCreateStructureTree({ + catalogRef: d, + pdfManager: i, + newAnnotationsByPage: o, + })) && (f = null); + const e = AnnotationFactory.generateImages( + a.values(), + Q, + i.evaluatorOptions.isOffscreenCanvasSupported, + ), + t = void 0 === f ? n : []; + for (const [a, s] of o) + t.push( + i.getPage(a).then((t) => { + const i = new WorkerTask(`Save (editor): page ${a}`); + return t.saveNewAnnotations(C, i, s, e).finally(function () { + finishWorkerTask(i); + }); + }), + ); + null === f + ? n.push( + Promise.all(t).then(async (e) => { + await StructTreeRoot.createStructureTree({ + newAnnotationsByPage: o, + xref: Q, + catalogRef: d, + pdfManager: i, + newRefs: e, + }); + return e; + }), + ) + : f && + n.push( + Promise.all(t).then(async (e) => { + await f.updateStructureTree({ + newAnnotationsByPage: o, + pdfManager: i, + newRefs: e, + }); + return e; + }), + ); + } + if (e) n.push(i.serializeXfaData(a)); + else + for (let e = 0; e < t; e++) + n.push( + i.getPage(e).then(function (t) { + const i = new WorkerTask(`Save: page ${e}`); + return t.save(C, i, a).finally(function () { + finishWorkerTask(i); + }); + }), + ); + const p = await Promise.all(n); + let m = [], + y = null; + if (e) { + y = p[0]; + if (!y) return g.bytes; + } else { + m = p.flat(2); + if (0 === m.length) return g.bytes; + } + const w = h && c instanceof Dict && m.some((e) => e.needAppearances), + b = (c instanceof Dict && c.get("XFA")) || null; + let D = null, + F = !1; + if (Array.isArray(b)) { + for (let e = 0, t = b.length; e < t; e += 2) + if ("datasets" === b[e]) { + D = b[e + 1]; + F = !0; + } + null === D && (D = Q.getNewTemporaryRef()); + } else b && warn("Unsupported XFA type."); + let S = Object.create(null); + if (Q.trailer) { + const e = Object.create(null), + t = Q.trailer.get("Info") || null; + t instanceof Dict && + t.forEach((t, i) => { + "string" == typeof i && (e[t] = stringToPDFString(i)); + }); + S = { + rootRef: d, + encryptRef: Q.trailer.getRaw("Encrypt") || null, + newRef: Q.getNewTemporaryRef(), + infoRef: Q.trailer.getRaw("Info") || null, + info: e, + fileIds: Q.trailer.get("ID") || null, + startXRef: E ? l : Q.lastXRefStreamPos ?? l, + filename: s, + }; + } + return incrementalUpdate({ + originalData: g.bytes, + xrefInfo: S, + newRefs: m, + xref: Q, + hasXfa: !!b, + xfaDatasetsRef: D, + hasXfaDatasetsEntry: F, + needAppearances: w, + acroFormRef: h, + acroForm: c, + xfaData: y, + useXrefStream: isDict(Q.topDict, "XRef"), + }).finally(() => { + Q.resetNewTemporaryRef(); + }); + }, + ); + C.on("GetOperatorList", function (e, t) { + const a = e.pageIndex; + i.getPage(a).then(function (i) { + const s = new WorkerTask(`GetOperatorList: page ${a}`); + startWorkerTask(s); + const r = n >= pA.INFOS ? Date.now() : 0; + i.getOperatorList({ + handler: C, + sink: t, + task: s, + intent: e.intent, + cacheKey: e.cacheKey, + annotationStorage: e.annotationStorage, + }).then( + function (e) { + finishWorkerTask(s); + r && + info( + `page=${a + 1} - getOperatorList: time=${Date.now() - r}ms, len=${e.length}`, + ); + t.close(); + }, + function (e) { + finishWorkerTask(s); + s.terminated || t.error(e); + }, + ); + }); + }); + C.on("GetTextContent", function (e, t) { + const { + pageIndex: a, + includeMarkedContent: s, + disableNormalization: r, + } = e; + i.getPage(a).then(function (e) { + const i = new WorkerTask("GetTextContent: page " + a); + startWorkerTask(i); + const o = n >= pA.INFOS ? Date.now() : 0; + e.extractTextContent({ + handler: C, + task: i, + sink: t, + includeMarkedContent: s, + disableNormalization: r, + }).then( + function () { + finishWorkerTask(i); + o && + info( + `page=${a + 1} - getTextContent: time=` + + (Date.now() - o) + + "ms", + ); + t.close(); + }, + function (e) { + finishWorkerTask(i); + i.terminated || t.error(e); + }, + ); + }); + }); + C.on("GetStructTree", function (e) { + return i.getPage(e.pageIndex).then(function (e) { + return i.ensure(e, "getStructTree"); + }); + }); + C.on("FontFallback", function (e) { + return i.fontFallback(e.id, C); + }); + C.on("Cleanup", function (e) { + return i.cleanup(!0); + }); + C.on("Terminate", function (e) { + a = !0; + const t = []; + if (i) { + i.terminate(new AbortException("Worker was terminated.")); + const e = i.cleanup(); + t.push(e); + i = null; + } else clearGlobalCaches(); + s && s(new AbortException("Worker was terminated.")); + for (const e of r) { + t.push(e.finished); + e.terminate(); + } + return Promise.all(t).then(function () { + C.destroy(); + C = null; + }); + }); + C.on("Ready", function (t) { + !(function setupDoc(e) { + function onSuccess(e) { + ensureNotTerminated(); + C.send("GetDoc", { pdfInfo: e }); + } + function onFailure(e) { + ensureNotTerminated(); + if (e instanceof PasswordException) { + const t = new WorkerTask(`PasswordException: response ${e.code}`); + startWorkerTask(t); + C.sendWithPromise("PasswordRequest", e) + .then(function ({ password: e }) { + finishWorkerTask(t); + i.updatePassword(e); + pdfManagerReady(); + }) + .catch(function () { + finishWorkerTask(t); + C.send("DocException", e); + }); + } else + e instanceof InvalidPDFException || + e instanceof MissingPDFException || + e instanceof UnexpectedResponseException || + e instanceof UnknownErrorException + ? C.send("DocException", e) + : C.send( + "DocException", + new UnknownErrorException(e.message, e.toString()), + ); + } + function pdfManagerReady() { + ensureNotTerminated(); + loadDocument(!1).then(onSuccess, function (e) { + ensureNotTerminated(); + e instanceof XRefParseException + ? i.requestLoadedStream().then(function () { + ensureNotTerminated(); + loadDocument(!0).then(onSuccess, onFailure); + }) + : onFailure(e); + }); + } + ensureNotTerminated(); + getPdfManager(e) + .then(function (e) { + if (a) { + e.terminate(new AbortException("Worker was terminated.")); + throw new Error("Worker was terminated"); + } + i = e; + i.requestLoadedStream(!0).then((e) => { + C.send("DataLoaded", { length: e.bytes.byteLength }); + }); + }) + .then(pdfManagerReady, onFailure); + })(e); + e = null; + }); + return l; + } + static initializeFromPort(e) { + const t = new MessageHandler("worker", "main", e); + WorkerMessageHandler.setup(t, e); + t.send("ready", null); + } +} +"undefined" == typeof window && + !t && + "undefined" != typeof self && + (function isMessagePort(e) { + return "function" == typeof e.postMessage && "onmessage" in e; + })(self) && + WorkerMessageHandler.initializeFromPort(self); +var fo = __webpack_exports__.WorkerMessageHandler; +export { fo as WorkerMessageHandler }; diff --git a/web-app/build/static/js/2346.02be873a.chunk.js b/web-app/build/static/js/2346.02be873a.chunk.js new file mode 100644 index 0000000000..dedcd0e229 --- /dev/null +++ b/web-app/build/static/js/2346.02be873a.chunk.js @@ -0,0 +1,2 @@ +(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[2346],{18628:(t,e)=>{"use strict";e.A=function(t,e){if(t&&e){var i=Array.isArray(e)?e:e.split(","),s=t.name||"",n=(t.type||"").toLowerCase(),a=n.replace(/\/.*$/,"");return i.some((function(t){var e=t.trim().toLowerCase();return"."===e.charAt(0)?s.toLowerCase().endsWith(e):e.endsWith("/*")?a===e.replace(/\/.*$/,""):n===e}))}return!0}},75270:(t,e,i)=>{"use strict";var s=i(40139),n={"text/plain":"Text","text/html":"Url",default:"Text"};t.exports=function(t,e){var i,a,r,o,l,h,c=!1;e||(e={}),i=e.debug||!1;try{if(r=s(),o=document.createRange(),l=document.getSelection(),(h=document.createElement("span")).textContent=t,h.ariaHidden="true",h.style.all="unset",h.style.position="fixed",h.style.top=0,h.style.clip="rect(0, 0, 0, 0)",h.style.whiteSpace="pre",h.style.webkitUserSelect="text",h.style.MozUserSelect="text",h.style.msUserSelect="text",h.style.userSelect="text",h.addEventListener("copy",(function(s){if(s.stopPropagation(),e.format)if(s.preventDefault(),"undefined"===typeof s.clipboardData){i&&console.warn("unable to use e.clipboardData"),i&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=n[e.format]||n.default;window.clipboardData.setData(a,t)}else s.clipboardData.clearData(),s.clipboardData.setData(e.format,t);e.onCopy&&(s.preventDefault(),e.onCopy(s.clipboardData))})),document.body.appendChild(h),o.selectNodeContents(h),l.addRange(o),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(d){i&&console.error("unable to copy using execCommand: ",d),i&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),c=!0}catch(d){i&&console.error("unable to copy using clipboardData: ",d),i&&console.error("falling back to prompt"),a=function(t){var e=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}("message"in e?e.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,t)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(o):l.removeAllRanges()),h&&document.body.removeChild(h),r()}return c}},24480:(t,e,i)=>{"use strict";function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.CopyToClipboard=void 0;var n=o(i(65043)),a=o(i(75270)),r=["text","onCopy","options","children"];function o(t){return t&&t.__esModule?t:{default:t}}function l(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,s)}return i}function h(t){for(var e=1;e=0||(n[i]=t[i]);return n}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function d(t,e){for(var i=0;i{"use strict";var s=i(24480).CopyToClipboard;s.CopyToClipboard=s,t.exports=s},94281:(t,e,i)=>{"use strict";i.d(e,{VB:()=>dt});var s=i(65043),n=i(65173),a=i.n(n);function r(t,e,i,s){return new(i||(i=Promise))((function(n,a){function r(t){try{l(s.next(t))}catch(e){a(e)}}function o(t){try{l(s.throw(t))}catch(e){a(e)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(r,o)}l((s=s.apply(t,e||[])).next())}))}function o(t,e){var i,s,n,a,r={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(l){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(r=0)),r;)try{if(i=1,s&&(n=2&o[0]?s.return:o[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,o[1])).done)return n;switch(s=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,s=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!(n=(n=r.trys).length>0&&n[n.length-1])&&(6===o[0]||2===o[0])){r=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]0)&&!(s=a.next()).done;)r.push(s.value)}catch(o){n={error:o}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return r}function h(t,e,i){if(i||2===arguments.length)for(var s,n=0,a=e.length;n0?s:t.name,writable:!1,configurable:!1,enumerable:!0})}return i}var u=[".DS_Store","Thumbs.db"];function p(t){return"object"===typeof t&&null!==t}function f(t){return b(t.target.files).map((function(t){return d(t)}))}function g(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,Promise.all(t.map((function(t){return t.getFile()})))];case 1:return[2,e.sent().map((function(t){return d(t)}))]}}))}))}function m(t,e){return r(this,void 0,void 0,(function(){var i;return o(this,(function(s){switch(s.label){case 0:return t.items?(i=b(t.items).filter((function(t){return"file"===t.kind})),"drop"!==e?[2,i]:[4,Promise.all(i.map(y))]):[3,2];case 1:return[2,v(A(s.sent()))];case 2:return[2,v(b(t.files).map((function(t){return d(t)})))]}}))}))}function v(t){return t.filter((function(t){return-1===u.indexOf(t.name)}))}function b(t){if(null===t)return[];for(var e=[],i=0;it.length)&&(e=t.length);for(var i=0,s=new Array(e);ii)return[!1,W(i)];if(t.sizei)return[!1,W(i)]}return[!0,null]}function V(t){return void 0!==t&&null!==t}function G(t){return"function"===typeof t.isPropagationStopped?t.isPropagationStopped():"undefined"!==typeof t.cancelBubble&&t.cancelBubble}function U(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,(function(t){return"Files"===t||"application/x-moz-file"===t})):!!t.target&&!!t.target.files}function q(t){t.preventDefault()}function X(){for(var t=arguments.length,e=new Array(t),i=0;i1?i-1:0),n=1;nt.length)&&(e=t.length);for(var i=0,s=new Array(e);i=0||(n[i]=t[i]);return n}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}var lt=(0,s.forwardRef)((function(t,e){var i=t.children,n=dt(ot(t,Q)),a=n.open,r=ot(n,J);return(0,s.useImperativeHandle)(e,(function(){return{open:a}}),[a]),s.createElement(s.Fragment,null,i(at(at({},r),{},{open:a})))}));lt.displayName="Dropzone";var ht={disabled:!1,getFilesFromEvent:function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return p(t)&&p(t.dataTransfer)?[2,m(t.dataTransfer,t.type)]:function(t){return p(t)&&p(t.target)}(t)?[2,f(t)]:Array.isArray(t)&&t.every((function(t){return"getFile"in t&&"function"===typeof t.getFile}))?[2,g(t)]:[2,[]]}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};lt.defaultProps=ht,lt.propTypes={children:a().func,accept:a().objectOf(a().arrayOf(a().string)),multiple:a().bool,preventDropOnDocument:a().bool,noClick:a().bool,noKeyboard:a().bool,noDrag:a().bool,noDragEventsBubbling:a().bool,minSize:a().number,maxSize:a().number,maxFiles:a().number,disabled:a().bool,getFilesFromEvent:a().func,onFileDialogCancel:a().func,onFileDialogOpen:a().func,useFsAccessApi:a().bool,autoFocus:a().bool,onDragEnter:a().func,onDragLeave:a().func,onDragOver:a().func,onDrop:a().func,onDropAccepted:a().func,onDropRejected:a().func,onError:a().func,validator:a().func};var ct={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function dt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=at(at({},ht),t),i=e.accept,n=e.disabled,a=e.getFilesFromEvent,r=e.maxSize,o=e.minSize,l=e.multiple,h=e.maxFiles,c=e.onDragEnter,d=e.onDragLeave,u=e.onDragOver,p=e.onDrop,f=e.onDropAccepted,g=e.onDropRejected,m=e.onFileDialogCancel,v=e.onFileDialogOpen,b=e.useFsAccessApi,y=e.autoFocus,A=e.preventDropOnDocument,w=e.noClick,_=e.noKeyboard,x=e.noDrag,E=e.noDragEventsBubbling,k=e.onError,M=e.validator,P=(0,s.useMemo)((function(){return function(t){if(V(t))return Object.entries(t).reduce((function(t,e){var i=T(e,2),s=i[0],n=i[1];return[].concat(S(t),[s],S(n))}),[]).filter((function(t){return K(t)||Y(t)})).join(",")}(i)}),[i]),L=(0,s.useMemo)((function(){return function(t){return V(t)?[{description:"Files",accept:Object.entries(t).filter((function(t){var e=T(t,2),i=e[0],s=e[1],n=!0;return K(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),n=!1),Array.isArray(s)&&s.every(Y)||(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),n=!1),n})).reduce((function(t,e){var i=T(e,2),s=i[0],n=i[1];return C(C({},t),{},R({},s,n))}),{})}]:t}(i)}),[i]),D=(0,s.useMemo)((function(){return"function"===typeof v?v:pt}),[v]),I=(0,s.useMemo)((function(){return"function"===typeof m?m:pt}),[m]),F=(0,s.useRef)(null),O=(0,s.useRef)(null),N=et((0,s.useReducer)(ut,ct),2),W=N[0],j=N[1],Q=W.isFocused,J=W.isFileDialogActive,it=(0,s.useRef)("undefined"!==typeof window&&window.isSecureContext&&b&&"showOpenFilePicker"in window),st=function(){!it.current&&J&&setTimeout((function(){O.current&&(O.current.files.length||(j({type:"closeDialog"}),I()))}),300)};(0,s.useEffect)((function(){return window.addEventListener("focus",st,!1),function(){window.removeEventListener("focus",st,!1)}}),[O,J,I,it]);var nt=(0,s.useRef)([]),lt=function(t){F.current&&F.current.contains(t.target)||(t.preventDefault(),nt.current=[])};(0,s.useEffect)((function(){return A&&(document.addEventListener("dragover",q,!1),document.addEventListener("drop",lt,!1)),function(){A&&(document.removeEventListener("dragover",q),document.removeEventListener("drop",lt))}}),[F,A]),(0,s.useEffect)((function(){return!n&&y&&F.current&&F.current.focus(),function(){}}),[F,y,n]);var dt=(0,s.useCallback)((function(t){k?k(t):console.error(t)}),[k]),ft=(0,s.useCallback)((function(t){t.preventDefault(),t.persist(),Mt(t),nt.current=[].concat(tt(nt.current),[t.target]),U(t)&&Promise.resolve(a(t)).then((function(e){if(!G(t)||E){var i=e.length,s=i>0&&function(t){var e=t.files,i=t.accept,s=t.minSize,n=t.maxSize,a=t.multiple,r=t.maxFiles,o=t.validator;return!(!a&&e.length>1||a&&r>=1&&e.length>r)&&e.every((function(t){var e=T(H(t,i),1)[0],a=T(z(t,s,n),1)[0],r=o?o(t):null;return e&&a&&!r}))}({files:e,accept:P,minSize:o,maxSize:r,multiple:l,maxFiles:h,validator:M});j({isDragAccept:s,isDragReject:i>0&&!s,isDragActive:!0,type:"setDraggedFiles"}),c&&c(t)}})).catch((function(t){return dt(t)}))}),[a,c,dt,E,P,o,r,l,h,M]),gt=(0,s.useCallback)((function(t){t.preventDefault(),t.persist(),Mt(t);var e=U(t);if(e&&t.dataTransfer)try{t.dataTransfer.dropEffect="copy"}catch(i){}return e&&u&&u(t),!1}),[u,E]),mt=(0,s.useCallback)((function(t){t.preventDefault(),t.persist(),Mt(t);var e=nt.current.filter((function(t){return F.current&&F.current.contains(t)})),i=e.indexOf(t.target);-1!==i&&e.splice(i,1),nt.current=e,e.length>0||(j({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),U(t)&&d&&d(t))}),[F,d,E]),vt=(0,s.useCallback)((function(t,e){var i=[],s=[];t.forEach((function(t){var e=et(H(t,P),2),n=e[0],a=e[1],l=et(z(t,o,r),2),h=l[0],c=l[1],d=M?M(t):null;if(n&&h&&!d)i.push(t);else{var u=[a,c];d&&(u=u.concat(d)),s.push({file:t,errors:u.filter((function(t){return t}))})}})),(!l&&i.length>1||l&&h>=1&&i.length>h)&&(i.forEach((function(t){s.push({file:t,errors:[B]})})),i.splice(0)),j({acceptedFiles:i,fileRejections:s,type:"setFiles"}),p&&p(i,s,e),s.length>0&&g&&g(s,e),i.length>0&&f&&f(i,e)}),[j,l,P,o,r,h,p,f,g,M]),bt=(0,s.useCallback)((function(t){t.preventDefault(),t.persist(),Mt(t),nt.current=[],U(t)&&Promise.resolve(a(t)).then((function(e){G(t)&&!E||vt(e,t)})).catch((function(t){return dt(t)})),j({type:"reset"})}),[a,vt,dt,E]),yt=(0,s.useCallback)((function(){if(it.current){j({type:"openDialog"}),D();var t={multiple:l,types:L};window.showOpenFilePicker(t).then((function(t){return a(t)})).then((function(t){vt(t,null),j({type:"closeDialog"})})).catch((function(t){var e;(e=t)instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)?(I(t),j({type:"closeDialog"})):!function(t){return t instanceof DOMException&&("SecurityError"===t.name||t.code===t.SECURITY_ERR)}(t)?dt(t):(it.current=!1,O.current?(O.current.value=null,O.current.click()):dt(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided.")))}))}else O.current&&(j({type:"openDialog"}),D(),O.current.value=null,O.current.click())}),[j,D,I,b,vt,dt,L,l]),At=(0,s.useCallback)((function(t){F.current&&F.current.isEqualNode(t.target)&&(" "!==t.key&&"Enter"!==t.key&&32!==t.keyCode&&13!==t.keyCode||(t.preventDefault(),yt()))}),[F,yt]),wt=(0,s.useCallback)((function(){j({type:"focus"})}),[]),_t=(0,s.useCallback)((function(){j({type:"blur"})}),[]),xt=(0,s.useCallback)((function(){w||(!function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(t){return-1!==t.indexOf("MSIE")||-1!==t.indexOf("Trident/")}(t)||function(t){return-1!==t.indexOf("Edge/")}(t)}()?yt():setTimeout(yt,0))}),[w,yt]),Et=function(t){return n?null:t},kt=function(t){return _?null:Et(t)},St=function(t){return x?null:Et(t)},Mt=function(t){E&&t.stopPropagation()},Ct=(0,s.useMemo)((function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.refKey,i=void 0===e?"ref":e,s=t.role,a=t.onKeyDown,r=t.onFocus,o=t.onBlur,l=t.onClick,h=t.onDragEnter,c=t.onDragOver,d=t.onDragLeave,u=t.onDrop,p=ot(t,Z);return at(at(rt({onKeyDown:kt(X(a,At)),onFocus:kt(X(r,wt)),onBlur:kt(X(o,_t)),onClick:Et(X(l,xt)),onDragEnter:St(X(h,ft)),onDragOver:St(X(c,gt)),onDragLeave:St(X(d,mt)),onDrop:St(X(u,bt)),role:"string"===typeof s&&""!==s?s:"presentation"},i,F),n||_?{}:{tabIndex:0}),p)}}),[F,At,wt,_t,xt,ft,gt,mt,bt,_,x,n]),Rt=(0,s.useCallback)((function(t){t.stopPropagation()}),[]),Tt=(0,s.useMemo)((function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.refKey,i=void 0===e?"ref":e,s=t.onChange,n=t.onClick,a=ot(t,$);return at(at({},rt({accept:P,multiple:l,type:"file",style:{display:"none"},onChange:Et(X(s,bt)),onClick:Et(X(n,Rt)),tabIndex:-1},i,O)),a)}}),[O,i,l,bt,n]);return at(at({},W),{},{isFocused:Q&&!n,getRootProps:Ct,getInputProps:Tt,rootRef:F,inputRef:O,open:Et(yt)})}function ut(t,e){switch(e.type){case"focus":return at(at({},t),{},{isFocused:!0});case"blur":return at(at({},t),{},{isFocused:!1});case"openDialog":return at(at({},ct),{},{isFileDialogActive:!0});case"closeDialog":return at(at({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return at(at({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return at(at({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return at({},ct);default:return t}}function pt(){}},40139:t=>{t.exports=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,i=[],s=0;s{"use strict";var e=function(){};t.exports=e},40645:(t,e,i)=>{"use strict";function s(t){var e=!1;return{promise:new Promise((function(i,s){t.then((function(t){return!e&&i(t)})).catch((function(t){return!e&&s(t)}))})),cancel:function(){e=!0}}}i.d(e,{A:()=>s})},77906:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>a});var s=function(t,e,i){if(i||2===arguments.length)for(var s,n=0,a=e.length;n{"use strict";function s(t,e,i){e||(e=[]);var s=e.length++;return Object.defineProperty({},"_",{set:function(n){e[s]=n,t.apply(i,e)}})}function n(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function a(t,e){n(t,e),e.add(t)}function r(t,e,i){n(t,e),e.set(t,i)}function o(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}function l(t,e,i){return i(o(t,e))}function h(t,e){return t.get(o(t,e))}function c(t,e,i){return t.set(o(t,e),i),i}i.d(e,{dU:()=>Qp,ng:()=>Jp,EA:()=>Zp,PDFDataRangeTransport:()=>$p,D6:()=>tf,YE:()=>ef});var d,u,p,f,g,m,v,b,y,A,w,_,x=i(64467),E={d:(t,e)=>{for(var i in e)E.o(e,i)&&!E.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},k=globalThis.pdfjsLib={};E.d(k,{AbortException:()=>Nt,AnnotationEditorLayer:()=>Ip,AnnotationEditorParamsType:()=>j,AnnotationEditorType:()=>W,AnnotationEditorUIManager:()=>Cs,AnnotationLayer:()=>qh,AnnotationMode:()=>N,CMapCompressionType:()=>bt,ColorPicker:()=>Ad,DOMSVGFactory:()=>De,DrawLayer:()=>qp,FeatureTest:()=>Ht,GlobalWorkerOptions:()=>Ba,ImageKind:()=>X,InvalidPDFException:()=>Dt,MissingPDFException:()=>It,OPS:()=>yt,Outliner:()=>wc,PDFDataRangeTransport:()=>Oo,PDFDateString:()=>Ue,PDFWorker:()=>Ko,PasswordResponses:()=>At,PermissionFlag:()=>B,PixelsPerInch:()=>de,RenderingCancelledException:()=>Fe,TextLayer:()=>go,UnexpectedResponseException:()=>Ft,Util:()=>Vt,VerbosityLevel:()=>vt,XfaLayer:()=>yl,build:()=>gl,createValidAbsoluteUrl:()=>Ct,fetchData:()=>Te,getDocument:()=>Lo,getFilenameFromUrl:()=>We,getPdfFilenameFromUrl:()=>je,getXfaPageViewport:()=>qe,isDataScheme:()=>Oe,isPdfFile:()=>Ne,noContextMenu:()=>ze,normalizeUnicode:()=>Kt,renderTextLayer:()=>Eo,setLayerDimensions:()=>Qe,shadow:()=>Rt,updateTextLayer:()=>ko,version:()=>fl});const S="object"===typeof process&&process+""==="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&"browser"!==process.type),M=[1,0,0,1,0,0],C=[.001,0,0,.001,0,0],R=1.35,T=1,P=2,L=4,D=16,I=32,F=64,O=256,N={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},W={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},j={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35},B={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},H=0,z=1,V=2,G=3,U=3,q=4,X={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},K=1,Y=2,Q=3,J=4,Z=5,$=6,tt=7,et=8,it=9,st=10,nt=11,at=12,rt=13,ot=14,lt=15,ht=16,ct=17,dt=20,ut=1,pt=2,ft=3,gt=4,mt=5,vt={ERRORS:0,WARNINGS:1,INFOS:5},bt={NONE:0,BINARY:1},yt={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},At={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let wt=vt.WARNINGS;function _t(t){Number.isInteger(t)&&(wt=t)}function xt(){return wt}function Et(t){wt>=vt.INFOS&&console.log("Info: ".concat(t))}function kt(t){wt>=vt.WARNINGS&&console.log("Warning: ".concat(t))}function St(t){throw new Error(t)}function Mt(t,e){t||St(e)}function Ct(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return null;try{if(i&&"string"===typeof t){if(i.addDefaultProtocol&&t.startsWith("www.")){const e=t.match(/\./g);(null===e||void 0===e?void 0:e.length)>=2&&(t="http://".concat(t))}if(i.tryConvertEncoding)try{t=decodeURIComponent(escape(t))}catch{}}const s=e?new URL(t,e):new URL(t);if(function(t){switch(null===t||void 0===t?void 0:t.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(s))return s}catch{}return null}function Rt(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Object.defineProperty(t,e,{value:i,enumerable:!s,configurable:!0,writable:!1}),i}const Tt=function(){function t(e,i){this.constructor===t&&St("Cannot initialize BaseException."),this.message=e,this.name=i}return t.prototype=new Error,t.constructor=t,t}();class Pt extends Tt{constructor(t,e){super(t,"PasswordException"),this.code=e}}class Lt extends Tt{constructor(t,e){super(t,"UnknownErrorException"),this.details=e}}class Dt extends Tt{constructor(t){super(t,"InvalidPDFException")}}class It extends Tt{constructor(t){super(t,"MissingPDFException")}}class Ft extends Tt{constructor(t,e){super(t,"UnexpectedResponseException"),this.status=e}}class Ot extends Tt{constructor(t){super(t,"FormatError")}}class Nt extends Tt{constructor(t){super(t,"AbortException")}}function Wt(t){"object"===typeof t&&void 0!==(null===t||void 0===t?void 0:t.length)||St("Invalid argument for bytesToString");const e=t.length,i=8192;if(et.toString(16).padStart(2,"0")));class Vt{static makeHexColor(t,e,i){return"#".concat(zt[t]).concat(zt[e]).concat(zt[i])}static scaleMinMax(t,e){let i;t[0]?(t[0]<0&&(i=e[0],e[0]=e[2],e[2]=i),e[0]*=t[0],e[2]*=t[0],t[3]<0&&(i=e[1],e[1]=e[3],e[3]=i),e[1]*=t[3],e[3]*=t[3]):(i=e[0],e[0]=e[1],e[1]=i,i=e[2],e[2]=e[3],e[3]=i,t[1]<0&&(i=e[1],e[1]=e[3],e[3]=i),e[1]*=t[1],e[3]*=t[1],t[2]<0&&(i=e[0],e[0]=e[2],e[2]=i),e[0]*=t[2],e[2]*=t[2]),e[0]+=t[4],e[1]+=t[5],e[2]+=t[4],e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static applyTransform(t,e){return[t[0]*e[0]+t[1]*e[2]+e[4],t[0]*e[1]+t[1]*e[3]+e[5]]}static applyInverseTransform(t,e){const i=e[0]*e[3]-e[1]*e[2];return[(t[0]*e[3]-t[1]*e[2]+e[2]*e[5]-e[4]*e[3])/i,(-t[0]*e[1]+t[1]*e[0]+e[4]*e[1]-e[5]*e[0])/i]}static getAxialAlignedBoundingBox(t,e){const i=this.applyTransform(t,e),s=this.applyTransform(t.slice(2,4),e),n=this.applyTransform([t[0],t[3]],e),a=this.applyTransform([t[2],t[1]],e);return[Math.min(i[0],s[0],n[0],a[0]),Math.min(i[1],s[1],n[1],a[1]),Math.max(i[0],s[0],n[0],a[0]),Math.max(i[1],s[1],n[1],a[1])]}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t){const e=[t[0],t[2],t[1],t[3]],i=t[0]*e[0]+t[1]*e[2],s=t[0]*e[1]+t[1]*e[3],n=t[2]*e[0]+t[3]*e[2],a=t[2]*e[1]+t[3]*e[3],r=(i+a)/2,o=Math.sqrt((i+a)**2-4*(i*a-n*s))/2,l=r+o||1,h=r-o||1;return[Math.sqrt(l),Math.sqrt(h)]}static normalizeRect(t){const e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){const i=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),s=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(i>s)return null;const n=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),a=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return n>a?null:[i,n,s,a]}static bezierBoundingBox(t,e,i,s,n,a,r,l,h){return h?(h[0]=Math.min(h[0],t,r),h[1]=Math.min(h[1],e,l),h[2]=Math.max(h[2],t,r),h[3]=Math.max(h[3],e,l)):h=[Math.min(t,r),Math.min(e,l),Math.max(t,r),Math.max(e,l)],o(Vt,this,Ut).call(this,t,i,n,r,e,s,a,l,3*(3*(i-n)-t+r),6*(t-2*i+n),3*(i-t),h),o(Vt,this,Ut).call(this,t,i,n,r,e,s,a,l,3*(3*(s-a)-e+l),6*(e-2*s+a),3*(s-e),h),h}}function Gt(t,e,i,s,n,a,r,o,l,h){if(l<=0||l>=1)return;const c=1-l,d=l*l,u=d*l,p=c*(c*(c*t+3*l*e)+3*d*i)+u*s,f=c*(c*(c*n+3*l*a)+3*d*r)+u*o;h[0]=Math.min(h[0],p),h[1]=Math.min(h[1],f),h[2]=Math.max(h[2],p),h[3]=Math.max(h[3],f)}function Ut(t,e,i,s,n,a,r,l,h,c,u,p){if(Math.abs(h)<1e-12)return void(Math.abs(c)>=1e-12&&o(d,this,Gt).call(this,t,e,i,s,n,a,r,l,-u/c,p));const f=c**2-4*u*h;if(f<0)return;const g=Math.sqrt(f),m=2*h;o(d,this,Gt).call(this,t,e,i,s,n,a,r,l,(-c+g)/m,p),o(d,this,Gt).call(this,t,e,i,s,n,a,r,l,(-c-g)/m,p)}d=Vt;let qt=null,Xt=null;function Kt(t){return qt||(qt=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,Xt=new Map([["\ufb05","\u017ft"]])),t.replaceAll(qt,((t,e,i)=>e?e.normalize("NFKC"):Xt.get(i)))}const Yt="pdfjs_internal_id_",Qt=0,Jt=1,Zt=2,$t=3,te=4,ee=5,ie=6,se=7,ne=8;class ae{constructor(){this.constructor===ae&&St("Cannot initialize BaseFilterFactory.")}addFilter(t){return"none"}addHCMFilter(t,e){return"none"}addAlphaFilter(t){return"none"}addLuminosityFilter(t){return"none"}addHighlightHCMFilter(t,e,i,s,n){return"none"}destroy(){}}class re{constructor(){this.constructor===re&&St("Cannot initialize BaseCanvasFactory.")}create(t,e){if(t<=0||e<=0)throw new Error("Invalid canvas size");const i=this._createCanvas(t,e);return{canvas:i,context:i.getContext("2d")}}reset(t,e,i){if(!t.canvas)throw new Error("Canvas is not specified");if(e<=0||i<=0)throw new Error("Invalid canvas size");t.canvas.width=e,t.canvas.height=i}destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0,t.canvas.height=0,t.canvas=null,t.context=null}_createCanvas(t,e){St("Abstract method `_createCanvas` called.")}}class oe{constructor(t){let{baseUrl:e=null,isCompressed:i=!0}=t;this.constructor===oe&&St("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=e,this.isCompressed=i}async fetch(t){let{name:e}=t;if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!e)throw new Error("CMap name must be specified.");const i=this.baseUrl+e+(this.isCompressed?".bcmap":""),s=this.isCompressed?bt.BINARY:bt.NONE;return this._fetchData(i,s).catch((t=>{throw new Error("Unable to load ".concat(this.isCompressed?"binary ":"","CMap at: ").concat(i))}))}_fetchData(t,e){St("Abstract method `_fetchData` called.")}}class le{constructor(t){let{baseUrl:e=null}=t;this.constructor===le&&St("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=e}async fetch(t){let{filename:e}=t;if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!e)throw new Error("Font filename must be specified.");const i="".concat(this.baseUrl).concat(e);return this._fetchData(i).catch((t=>{throw new Error("Unable to load font data at: ".concat(i))}))}_fetchData(t){St("Abstract method `_fetchData` called.")}}class he{constructor(){this.constructor===he&&St("Cannot initialize BaseSVGFactory.")}create(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t<=0||e<=0)throw new Error("Invalid SVG dimensions");const s=this._createSVG("svg:svg");return s.setAttribute("version","1.1"),i||(s.setAttribute("width","".concat(t,"px")),s.setAttribute("height","".concat(e,"px"))),s.setAttribute("preserveAspectRatio","none"),s.setAttribute("viewBox","0 0 ".concat(t," ").concat(e)),s}createElement(t){if("string"!==typeof t)throw new Error("Invalid SVG element type");return this._createSVG(t)}_createSVG(t){St("Abstract method `_createSVG` called.")}}const ce="http://www.w3.org/2000/svg";class de{}u=de,(0,x.A)(de,"CSS",96),(0,x.A)(de,"PDF",72),(0,x.A)(de,"PDF_TO_CSS_UNITS",u.CSS/u.PDF);var ue=new WeakMap,pe=new WeakMap,fe=new WeakMap,ge=new WeakMap,me=new WeakMap,ve=new WeakMap,be=new WeakSet;function ye(t){return h(ue,t)||c(ue,t,new Map)}function Ae(t){return h(me,t)||c(me,t,new Map)}function we(t){if(!h(pe,t)){const e=h(ge,t).createElement("div"),{style:i}=e;i.visibility="hidden",i.contain="strict",i.width=i.height=0,i.position="absolute",i.top=i.left=0,i.zIndex=-1;const s=h(ge,t).createElementNS(ce,"svg");s.setAttribute("width",0),s.setAttribute("height",0),c(pe,t,h(ge,t).createElementNS(ce,"defs")),e.append(s),s.append(h(pe,t)),h(ge,t).body.append(e)}return h(pe,t)}function _e(t){if(1===t.length){const e=t[0],i=new Array(256);for(let t=0;t<256;t++)i[t]=e[t]/255;const s=i.join(",");return[s,s,s]}const[e,i,s]=t,n=new Array(256),a=new Array(256),r=new Array(256);for(let o=0;o<256;o++)n[o]=e[o]/255,a[o]=i[o]/255,r[o]=s[o]/255;return[n.join(","),a.join(","),r.join(",")]}function xe(t){const e=h(ge,this).createElementNS(ce,"feColorMatrix");e.setAttribute("type","matrix"),e.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),t.append(e)}function Ee(t){const e=h(ge,this).createElementNS(ce,"feColorMatrix");e.setAttribute("type","matrix"),e.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),t.append(e)}function ke(t){const e=h(ge,this).createElementNS(ce,"filter");return e.setAttribute("color-interpolation-filters","sRGB"),e.setAttribute("id",t),l(be,this,we).append(e),e}function Se(t,e,i){const s=h(ge,this).createElementNS(ce,e);s.setAttribute("type","discrete"),s.setAttribute("tableValues",i),t.append(s)}function Me(t,e,i,s){const n=h(ge,this).createElementNS(ce,"feComponentTransfer");s.append(n),o(be,this,Se).call(this,n,"feFuncR",t),o(be,this,Se).call(this,n,"feFuncG",e),o(be,this,Se).call(this,n,"feFuncB",i)}function Ce(t,e){const i=h(ge,this).createElementNS(ce,"feComponentTransfer");e.append(i),o(be,this,Se).call(this,i,"feFuncA",t)}function Re(t){return l(be,this,we).style.color=t,Xe(getComputedStyle(l(be,this,we)).getPropertyValue("color"))}async function Te(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";if(He(t,document.baseURI)){const i=await fetch(t);if(!i.ok)throw new Error(i.statusText);switch(e){case"arraybuffer":return i.arrayBuffer();case"blob":return i.blob();case"json":return i.json()}return i.text()}return new Promise(((i,s)=>{const n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType=e,n.onreadystatechange=()=>{if(n.readyState===XMLHttpRequest.DONE)if(200!==n.status&&0!==n.status)s(new Error(n.statusText));else{switch(e){case"arraybuffer":case"blob":case"json":return void i(n.response)}i(n.responseText)}},n.send(null)}))}class Pe extends oe{_fetchData(t,e){return Te(t,this.isCompressed?"arraybuffer":"text").then((t=>({cMapData:t instanceof ArrayBuffer?new Uint8Array(t):jt(t),compressionType:e})))}}class Le extends le{_fetchData(t){return Te(t,"arraybuffer").then((t=>new Uint8Array(t)))}}class De extends he{_createSVG(t){return document.createElementNS(ce,t)}}class Ie{constructor(t){let{viewBox:e,scale:i,rotation:s,offsetX:n=0,offsetY:a=0,dontFlip:r=!1}=t;this.viewBox=e,this.scale=i,this.rotation=s,this.offsetX=n,this.offsetY=a;const o=(e[2]+e[0])/2,l=(e[3]+e[1])/2;let h,c,d,u,p,f,g,m;switch(s%=360,s<0&&(s+=360),s){case 180:h=-1,c=0,d=0,u=1;break;case 90:h=0,c=1,d=1,u=0;break;case 270:h=0,c=-1,d=-1,u=0;break;case 0:h=1,c=0,d=0,u=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}r&&(d=-d,u=-u),0===h?(p=Math.abs(l-e[1])*i+n,f=Math.abs(o-e[0])*i+a,g=(e[3]-e[1])*i,m=(e[2]-e[0])*i):(p=Math.abs(o-e[0])*i+n,f=Math.abs(l-e[1])*i+a,g=(e[2]-e[0])*i,m=(e[3]-e[1])*i),this.transform=[h*i,c*i,d*i,u*i,p-h*i*o-d*i*l,f-c*i*o-u*i*l],this.width=g,this.height=m}get rawDims(){const{viewBox:t}=this;return Rt(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone(){let{scale:t=this.scale,rotation:e=this.rotation,offsetX:i=this.offsetX,offsetY:s=this.offsetY,dontFlip:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ie({viewBox:this.viewBox.slice(),scale:t,rotation:e,offsetX:i,offsetY:s,dontFlip:n})}convertToViewportPoint(t,e){return Vt.applyTransform([t,e],this.transform)}convertToViewportRectangle(t){const e=Vt.applyTransform([t[0],t[1]],this.transform),i=Vt.applyTransform([t[2],t[3]],this.transform);return[e[0],e[1],i[0],i[1]]}convertToPdfPoint(t,e){return Vt.applyInverseTransform([t,e],this.transform)}}class Fe extends Tt{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;super(t,"RenderingCancelledException"),this.extraDelay=e}}function Oe(t){const e=t.length;let i=0;for(;i1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!==typeof t)return e;if(Oe(t))return kt('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),e;const i=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,s=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(t);let n=i.exec(s[1])||i.exec(s[2])||i.exec(s[3]);if(n&&(n=n[0],n.includes("%")))try{n=i.exec(decodeURIComponent(n))[0]}catch{}return n||e}class Be{constructor(){(0,x.A)(this,"started",Object.create(null)),(0,x.A)(this,"times",[])}time(t){t in this.started&&kt("Timer is already running for ".concat(t)),this.started[t]=Date.now()}timeEnd(t){t in this.started||kt("Timer has not been started for ".concat(t)),this.times.push({name:t,start:this.started[t],end:Date.now()}),delete this.started[t]}toString(){const t=[];let e=0;for(const{name:i}of this.times)e=Math.max(i.length,e);for(const{name:i,start:s,end:n}of this.times)t.push("".concat(i.padEnd(e)," ").concat(n-s,"ms\n"));return t.join("")}}function He(t,e){try{const{protocol:i}=e?new URL(t,e):new URL(t);return"http:"===i||"https:"===i}catch{return!1}}function ze(t){t.preventDefault()}function Ve(t){console.log("Deprecated API usage: "+t)}let Ge;class Ue{static toDateObject(t){if(!t||"string"!==typeof t)return null;Ge||(Ge=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const e=Ge.exec(t);if(!e)return null;const i=parseInt(e[1],10);let s=parseInt(e[2],10);s=s>=1&&s<=12?s-1:0;let n=parseInt(e[3],10);n=n>=1&&n<=31?n:1;let a=parseInt(e[4],10);a=a>=0&&a<=23?a:0;let r=parseInt(e[5],10);r=r>=0&&r<=59?r:0;let o=parseInt(e[6],10);o=o>=0&&o<=59?o:0;const l=e[7]||"Z";let h=parseInt(e[8],10);h=h>=0&&h<=23?h:0;let c=parseInt(e[9],10)||0;return c=c>=0&&c<=59?c:0,"-"===l?(a+=h,r+=c):"+"===l&&(a-=h,r-=c),new Date(Date.UTC(i,s,n,a,r,o))}}function qe(t,e){let{scale:i=1,rotation:s=0}=e;const{width:n,height:a}=t.attributes.style,r=[0,0,parseInt(n),parseInt(a)];return new Ie({viewBox:r,scale:i,rotation:s})}function Xe(t){if(t.startsWith("#")){const e=parseInt(t.slice(1),16);return[(16711680&e)>>16,(65280&e)>>8,255&e]}return t.startsWith("rgb(")?t.slice(4,-1).split(",").map((t=>parseInt(t))):t.startsWith("rgba(")?t.slice(5,-1).split(",").map((t=>parseInt(t))).slice(0,3):(kt('Not a valid color format: "'.concat(t,'"')),[0,0,0])}function Ke(t){const{a:e,b:i,c:s,d:n,e:a,f:r}=t.getTransform();return[e,i,s,n,a,r]}function Ye(t){const{a:e,b:i,c:s,d:n,e:a,f:r}=t.getTransform().invertSelf();return[e,i,s,n,a,r]}function Qe(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e instanceof Ie){const{pageWidth:s,pageHeight:n}=e.rawDims,{style:a}=t,r=Ht.isCSSRoundSupported,o="var(--scale-factor) * ".concat(s,"px"),l="var(--scale-factor) * ".concat(n,"px"),h=r?"round(".concat(o,", 1px)"):"calc(".concat(o,")"),c=r?"round(".concat(l,", 1px)"):"calc(".concat(l,")");i&&e.rotation%180!==0?(a.width=c,a.height=h):(a.width=h,a.height=c)}s&&t.setAttribute("data-main-rotation",e.rotation)}var Je=new WeakMap,Ze=new WeakMap,$e=new WeakMap,ti=new WeakMap,ei=new WeakSet;class ii{constructor(t){a(this,ei),r(this,Je,null),r(this,Ze,null),r(this,$e,void 0),r(this,ti,null),c($e,this,t)}render(){const t=c(Je,this,document.createElement("div"));t.className="editToolbar",t.setAttribute("role","toolbar"),t.addEventListener("contextmenu",ze),t.addEventListener("pointerdown",si);const e=c(ti,this,document.createElement("div"));e.className="buttons",t.append(e);const i=h($e,this).toolbarPosition;if(i){const{style:e}=t,s="ltr"===h($e,this)._uiManager.direction?1-i[0]:i[0];e.insetInlineEnd="".concat(100*s,"%"),e.top="calc(".concat(100*i[1],"% + var(--editor-toolbar-vert-offset))")}return o(ei,this,oi).call(this),t}hide(){var t;h(Je,this).classList.add("hidden"),null===(t=h(Ze,this))||void 0===t||t.hideDropdown()}show(){h(Je,this).classList.remove("hidden")}addAltTextButton(t){o(ei,this,ri).call(this,t),h(ti,this).prepend(t,l(ei,this,li))}addColorPicker(t){c(Ze,this,t);const e=t.renderButton();o(ei,this,ri).call(this,e),h(ti,this).prepend(e,l(ei,this,li))}remove(){var t;h(Je,this).remove(),null===(t=h(Ze,this))||void 0===t||t.destroy(),c(Ze,this,null)}}function si(t){t.stopPropagation()}function ni(t){h($e,this)._focusEventsAllowed=!1,t.preventDefault(),t.stopPropagation()}function ai(t){h($e,this)._focusEventsAllowed=!0,t.preventDefault(),t.stopPropagation()}function ri(t){t.addEventListener("focusin",o(ei,this,ni).bind(this),{capture:!0}),t.addEventListener("focusout",o(ei,this,ai).bind(this),{capture:!0}),t.addEventListener("contextmenu",ze)}function oi(){const t=document.createElement("button");t.className="delete",t.tabIndex=0,t.setAttribute("data-l10n-id","pdfjs-editor-remove-".concat(h($e,this).editorType,"-button")),o(ei,this,ri).call(this,t),t.addEventListener("click",(t=>{h($e,this)._uiManager.delete()})),h(ti,this).append(t)}function li(t){const e=document.createElement("div");return e.className="divider",e}var hi=new WeakMap,ci=new WeakMap,di=new WeakMap,ui=new WeakSet;class pi{constructor(t){a(this,ui),r(this,hi,null),r(this,ci,null),r(this,di,void 0),c(di,this,t)}show(t,e,i){const[s,n]=o(ui,this,gi).call(this,e,i),{style:a}=h(ci,this)||c(ci,this,o(ui,this,fi).call(this));t.append(h(ci,this)),a.insetInlineEnd="".concat(100*s,"%"),a.top="calc(".concat(100*n,"% + var(--editor-toolbar-vert-offset))")}hide(){h(ci,this).remove()}}function fi(){const t=c(ci,this,document.createElement("div"));t.className="editToolbar",t.setAttribute("role","toolbar"),t.addEventListener("contextmenu",ze);const e=c(hi,this,document.createElement("div"));return e.className="buttons",t.append(e),o(ui,this,mi).call(this),t}function gi(t,e){let i=0,s=0;for(const n of t){const t=n.y+n.height;if(ti?(s=a,i=t):e?a>s&&(s=a):a{h(di,this).highlightSelection("floating_button")})),h(hi,this).append(t)}function vi(t,e,i){for(const s of i)e.addEventListener(s,t[s].bind(t))}var bi=new WeakMap;class yi{constructor(){r(this,bi,0)}get id(){var t,e;return"".concat("pdfjs_internal_editor_").concat((c(bi,this,(t=h(bi,this),e=t++,t)),e))}}var Ai=new WeakMap,wi=new WeakMap,_i=new WeakMap,xi=new WeakSet;class Ei{constructor(){a(this,xi),r(this,Ai,function(){var t,e;if("undefined"!==typeof crypto&&"function"===typeof(null===(t=crypto)||void 0===t?void 0:t.randomUUID))return crypto.randomUUID();const i=new Uint8Array(32);if("undefined"!==typeof crypto&&"function"===typeof(null===(e=crypto)||void 0===e?void 0:e.getRandomValues))crypto.getRandomValues(i);else for(let s=0;s<32;s++)i[s]=Math.floor(255*Math.random());return Wt(i)}()),r(this,wi,0),r(this,_i,null)}static get _isSVGFittingCanvas(){const t=new OffscreenCanvas(1,3).getContext("2d"),e=new Image;e.src='data:image/svg+xml;charset=UTF-8,';return Rt(this,"_isSVGFittingCanvas",e.decode().then((()=>(t.drawImage(e,0,0,1,1,0,0,1,3),0===new Uint32Array(t.getImageData(0,0,1,1).data.buffer)[0]))))}async getFromFile(t){const{lastModified:e,name:i,size:s,type:n}=t;return o(xi,this,ki).call(this,"".concat(e,"_").concat(i,"_").concat(s,"_").concat(n),t)}async getFromUrl(t){return o(xi,this,ki).call(this,t,t)}async getFromId(t){h(_i,this)||c(_i,this,new Map);const e=h(_i,this).get(t);return e?e.bitmap?(e.refCounter+=1,e):e.file?this.getFromFile(e.file):this.getFromUrl(e.url):null}getSvgUrl(t){const e=h(_i,this).get(t);return null!==e&&void 0!==e&&e.isSvg?e.svgUrl:null}deleteId(t){h(_i,this)||c(_i,this,new Map);const e=h(_i,this).get(t);e&&(e.refCounter-=1,0===e.refCounter&&(e.bitmap=null))}isValidId(t){return t.startsWith("image_".concat(h(Ai,this),"_"))}}async function ki(t,e){var i;h(_i,this)||c(_i,this,new Map);let s=h(_i,this).get(t);if(null===s)return null;if(null!==(i=s)&&void 0!==i&&i.bitmap)return s.refCounter+=1,s;try{var n,a;let t;if(s||(s={bitmap:null,id:"image_".concat(h(Ai,this),"_").concat((c(wi,this,(n=h(wi,this),a=n++,n)),a)),refCounter:0,isSvg:!1}),"string"===typeof e?(s.url=e,t=await Te(e,"blob")):t=s.file=e,"image/svg+xml"===t.type){const e=p._isSVGFittingCanvas,i=new FileReader,n=new Image,a=new Promise(((t,a)=>{n.onload=()=>{s.bitmap=n,s.isSvg=!0,t()},i.onload=async()=>{const t=s.svgUrl=i.result;n.src=await e?"".concat(t,"#svgView(preserveAspectRatio(none))"):t},n.onerror=i.onerror=a}));i.readAsDataURL(t),await a}else s.bitmap=await createImageBitmap(t);s.refCounter=1}catch(r){console.error(r),s=null}return h(_i,this).set(t,s),s&&h(_i,this).set(s.id,s),s}p=Ei;var Si=new WeakMap,Mi=new WeakMap,Ci=new WeakMap,Ri=new WeakMap;class Ti{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128;r(this,Si,[]),r(this,Mi,!1),r(this,Ci,void 0),r(this,Ri,-1),c(Ci,this,t)}add(t){let{cmd:e,undo:i,post:s,mustExec:n,type:a=NaN,overwriteIfSameType:r=!1,keepUndo:o=!1}=t;if(n&&e(),h(Mi,this))return;const l={cmd:e,undo:i,post:s,type:a};if(-1===h(Ri,this))return h(Si,this).length>0&&(h(Si,this).length=0),c(Ri,this,0),void h(Si,this).push(l);if(r&&h(Si,this)[h(Ri,this)].type===a)return o&&(l.undo=h(Si,this)[h(Ri,this)].undo),void(h(Si,this)[h(Ri,this)]=l);const d=h(Ri,this)+1;d===h(Ci,this)?h(Si,this).splice(0,1):(c(Ri,this,d),dt===e[i])))return Ii._colorsMapping.get(i);return e}getHexCode(t){const e=this._colors.get(t);return e?Vt.makeHexColor(...e):t}}(0,x.A)(Ii,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));var Fi=new WeakMap,Oi=new WeakMap,Ni=new WeakMap,Wi=new WeakMap,ji=new WeakMap,Bi=new WeakMap,Hi=new WeakMap,zi=new WeakMap,Vi=new WeakMap,Gi=new WeakMap,Ui=new WeakMap,qi=new WeakMap,Xi=new WeakMap,Ki=new WeakMap,Yi=new WeakMap,Qi=new WeakMap,Ji=new WeakMap,Zi=new WeakMap,$i=new WeakMap,ts=new WeakMap,es=new WeakMap,is=new WeakMap,ss=new WeakMap,ns=new WeakMap,as=new WeakMap,rs=new WeakMap,os=new WeakMap,ls=new WeakMap,hs=new WeakMap,cs=new WeakMap,ds=new WeakMap,us=new WeakMap,ps=new WeakMap,fs=new WeakMap,gs=new WeakMap,ms=new WeakMap,vs=new WeakMap,bs=new WeakMap,ys=new WeakMap,As=new WeakMap,ws=new WeakMap,_s=new WeakMap,xs=new WeakMap,Es=new WeakMap,ks=new WeakMap,Ss=new WeakMap,Ms=new WeakSet;class Cs{static get _keyboardManager(){const t=Cs.prototype,e=t=>h(ks,t).contains(document.activeElement)&&"BUTTON"!==document.activeElement.tagName&&t.hasSomethingToControl(),i=(t,e)=>{let{target:i}=e;if(i instanceof HTMLInputElement){const{type:t}=i;return"text"!==t&&"number"!==t}return!0},s=this.TRANSLATE_SMALL,n=this.TRANSLATE_BIG;return Rt(this,"_keyboardManager",new Li([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:i}],[["ctrl+z","mac+meta+z"],t.undo,{checker:i}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:i}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:i}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:(t,e)=>{let{target:i}=e;return!(i instanceof HTMLButtonElement)&&h(ks,t).contains(i)&&!t.isEnterHandled}}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:(t,e)=>{let{target:i}=e;return!(i instanceof HTMLButtonElement)&&h(ks,t).contains(document.activeElement)}}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-s,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-n,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[s,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[n,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-s],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-n],checker:e}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,s],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,n],checker:e}]]))}constructor(t,e,i,s,n,l,d,u,p){a(this,Ms),r(this,Fi,null),r(this,Oi,new Map),r(this,Ni,new Map),r(this,Wi,null),r(this,ji,null),r(this,Bi,null),r(this,Hi,new Ti),r(this,zi,0),r(this,Vi,new Set),r(this,Gi,null),r(this,Ui,null),r(this,qi,new Set),r(this,Xi,!1),r(this,Ki,null),r(this,Yi,null),r(this,Qi,null),r(this,Ji,!1),r(this,Zi,null),r(this,$i,new yi),r(this,ts,!1),r(this,es,!1),r(this,is,null),r(this,ss,null),r(this,ns,null),r(this,as,W.NONE),r(this,rs,new Set),r(this,os,null),r(this,ls,null),r(this,hs,null),r(this,cs,this.blur.bind(this)),r(this,ds,this.focus.bind(this)),r(this,us,this.copy.bind(this)),r(this,ps,this.cut.bind(this)),r(this,fs,this.paste.bind(this)),r(this,gs,this.keydown.bind(this)),r(this,ms,this.keyup.bind(this)),r(this,vs,this.onEditingAction.bind(this)),r(this,bs,this.onPageChanging.bind(this)),r(this,ys,this.onScaleChanging.bind(this)),r(this,As,o(Ms,this,Ps).bind(this)),r(this,ws,this.onRotationChanging.bind(this)),r(this,_s,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1}),r(this,xs,[0,0]),r(this,Es,null),r(this,ks,null),r(this,Ss,null),c(ks,this,t),c(Ss,this,e),c(Wi,this,i),this._eventBus=s,this._eventBus._on("editingaction",h(vs,this)),this._eventBus._on("pagechanging",h(bs,this)),this._eventBus._on("scalechanging",h(ys,this)),this._eventBus._on("rotationchanging",h(ws,this)),o(Ms,this,Ds).call(this),o(Ms,this,Ns).call(this),c(ji,this,n.annotationStorage),c(Ki,this,n.filterFactory),c(ls,this,l),c(Qi,this,d||null),c(Xi,this,u),c(ns,this,p||null),this.viewParameters={realScale:de.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1}destroy(){var t,e;o(Ms,this,Ws).call(this),o(Ms,this,Os).call(this),this._eventBus._off("editingaction",h(vs,this)),this._eventBus._off("pagechanging",h(bs,this)),this._eventBus._off("scalechanging",h(ys,this)),this._eventBus._off("rotationchanging",h(ws,this));for(const i of h(Ni,this).values())i.destroy();h(Ni,this).clear(),h(Oi,this).clear(),h(qi,this).clear(),c(Fi,this,null),h(rs,this).clear(),h(Hi,this).destroy(),null===(t=h(Wi,this))||void 0===t||t.destroy(),null===(e=h(Zi,this))||void 0===e||e.hide(),c(Zi,this,null),h(Yi,this)&&(clearTimeout(h(Yi,this)),c(Yi,this,null)),h(Es,this)&&(clearTimeout(h(Es,this)),c(Es,this,null)),o(Ms,this,Is).call(this)}async mlGuess(t){var e;return(null===(e=h(ns,this))||void 0===e?void 0:e.guess(t))||null}get hasMLManager(){return!!h(ns,this)}get hcmFilter(){return Rt(this,"hcmFilter",h(ls,this)?h(Ki,this).addHCMFilter(h(ls,this).foreground,h(ls,this).background):"none")}get direction(){return Rt(this,"direction",getComputedStyle(h(ks,this)).direction)}get highlightColors(){return Rt(this,"highlightColors",h(Qi,this)?new Map(h(Qi,this).split(",").map((t=>t.split("=").map((t=>t.trim()))))):null)}get highlightColorNames(){return Rt(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,(t=>t.reverse()))):null)}setMainHighlightColorPicker(t){c(ss,this,t)}editAltText(t){var e;null===(e=h(Wi,this))||void 0===e||e.editAltText(this,t)}onPageChanging(t){let{pageNumber:e}=t;c(zi,this,e-1)}focusMainContainer(){h(ks,this).focus()}findParent(t,e){for(const i of h(Ni,this).values()){const{x:s,y:n,width:a,height:r}=i.div.getBoundingClientRect();if(t>=s&&t<=s+a&&e>=n&&e<=n+r)return i}return null}disableUserSelect(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];h(Ss,this).classList.toggle("noUserSelect",t)}addShouldRescale(t){h(qi,this).add(t)}removeShouldRescale(t){h(qi,this).delete(t)}onScaleChanging(t){let{scale:e}=t;this.commitOrRemove(),this.viewParameters.realScale=e*de.PDF_TO_CSS_UNITS;for(const i of h(qi,this))i.onScaleChanging()}onRotationChanging(t){let{pagesRotation:e}=t;this.commitOrRemove(),this.viewParameters.rotation=e}highlightSelection(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const e=document.getSelection();if(!e||e.isCollapsed)return;const{anchorNode:i,anchorOffset:s,focusNode:n,focusOffset:a}=e,r=e.toString(),l=o(Ms,this,Rs).call(this,e).closest(".textLayer"),c=this.getSelectionBoxes(l);if(c){e.empty(),h(as,this)===W.NONE&&(this._eventBus.dispatch("showannotationeditorui",{source:this,mode:W.HIGHLIGHT}),this.showAllEditors("highlight",!0,!0));for(const e of h(Ni,this).values())if(e.hasTextLayer(l)){e.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:t,boxes:c,anchorNode:i,anchorOffset:s,focusNode:n,focusOffset:a,text:r});break}}}addToAnnotationStorage(t){t.isEmpty()||!h(ji,this)||h(ji,this).has(t.id)||h(ji,this).setValue(t.id,t)}blur(){if(this.isShiftKeyDown=!1,h(Ji,this)&&(c(Ji,this,!1),o(Ms,this,Ls).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:t}=document;for(const e of h(rs,this))if(e.div.contains(t)){c(is,this,[e,t]),e._focusEventsAllowed=!1;break}}focus(){if(!h(is,this))return;const[t,e]=h(is,this);c(is,this,null),e.addEventListener("focusin",(()=>{t._focusEventsAllowed=!0}),{once:!0}),e.focus()}addEditListeners(){o(Ms,this,Ns).call(this),o(Ms,this,js).call(this)}removeEditListeners(){o(Ms,this,Ws).call(this),o(Ms,this,Bs).call(this)}copy(t){var e;if(t.preventDefault(),null===(e=h(Fi,this))||void 0===e||e.commitOrRemove(),!this.hasSelection)return;const i=[];for(const s of h(rs,this)){const t=s.serialize(!0);t&&i.push(t)}0!==i.length&&t.clipboardData.setData("application/pdfjs",JSON.stringify(i))}cut(t){this.copy(t),this.delete()}paste(t){t.preventDefault();const{clipboardData:e}=t;for(const a of e.items)for(const t of h(Ui,this))if(t.isHandlingMimeForPasting(a.type))return void t.paste(a,this.currentLayer);let i=e.getData("application/pdfjs");if(!i)return;try{i=JSON.parse(i)}catch(n){return void kt('paste: "'.concat(n.message,'".'))}if(!Array.isArray(i))return;this.unselectAll();const s=this.currentLayer;try{const t=[];for(const a of i){const e=s.deserialize(a);if(!e)return;t.push(e)}const e=()=>{for(const e of t)o(Ms,this,Us).call(this,e);o(Ms,this,Ks).call(this,t)},n=()=>{for(const e of t)e.remove()};this.addCommands({cmd:e,undo:n,mustExec:!0})}catch(n){kt('paste: "'.concat(n.message,'".'))}}keydown(t){this.isShiftKeyDown||"Shift"!==t.key||(this.isShiftKeyDown=!0),h(as,this)===W.NONE||this.isEditorHandlingKeyboard||Cs._keyboardManager.exec(this,t)}keyup(t){this.isShiftKeyDown&&"Shift"===t.key&&(this.isShiftKeyDown=!1,h(Ji,this)&&(c(Ji,this,!1),o(Ms,this,Ls).call(this,"main_toolbar")))}onEditingAction(t){let{name:e}=t;switch(e){case"undo":case"redo":case"delete":case"selectAll":this[e]();break;case"highlightSelection":this.highlightSelection("context_menu")}}setEditingState(t){t?(o(Ms,this,Fs).call(this),o(Ms,this,js).call(this),o(Ms,this,Hs).call(this,{isEditing:h(as,this)!==W.NONE,isEmpty:o(Ms,this,Xs).call(this),hasSomethingToUndo:h(Hi,this).hasSomethingToUndo(),hasSomethingToRedo:h(Hi,this).hasSomethingToRedo(),hasSelectedEditor:!1})):(o(Ms,this,Os).call(this),o(Ms,this,Bs).call(this),o(Ms,this,Hs).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(t){if(!h(Ui,this)){c(Ui,this,t);for(const t of h(Ui,this))o(Ms,this,zs).call(this,t.defaultPropertiesToUpdate)}}getId(){return h($i,this).id}get currentLayer(){return h(Ni,this).get(h(zi,this))}getLayer(t){return h(Ni,this).get(t)}get currentPageIndex(){return h(zi,this)}addLayer(t){h(Ni,this).set(t.pageIndex,t),h(ts,this)?t.enable():t.disable()}removeLayer(t){h(Ni,this).delete(t.pageIndex)}updateMode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(h(as,this)!==t){if(c(as,this,t),t===W.NONE)return this.setEditingState(!1),void o(Ms,this,Gs).call(this);this.setEditingState(!0),o(Ms,this,Vs).call(this),this.unselectAll();for(const e of h(Ni,this).values())e.updateMode(t);if(e||!i){if(e)for(const t of h(Oi,this).values())if(t.annotationElementId===e){this.setSelected(t),t.enterInEditMode();break}}else this.addNewEditorFromKeyboard()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(t){t!==h(as,this)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:t})}updateParams(t,e){var i;if(h(Ui,this)){switch(t){case j.CREATE:return void this.currentLayer.addNewEditor();case j.HIGHLIGHT_DEFAULT_COLOR:null===(i=h(ss,this))||void 0===i||i.updateColor(e);break;case j.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(h(hs,this)||c(hs,this,new Map)).set(t,e),this.showAllEditors("highlight",e)}for(const i of h(rs,this))i.updateParams(t,e);for(const i of h(Ui,this))i.updateDefaultParams(t,e)}}showAllEditors(t,e){var i,s;for(const n of h(Oi,this).values())n.editorType===t&&n.show(e);(null===(i=null===(s=h(hs,this))||void 0===s?void 0:s.get(j.HIGHLIGHT_SHOW_ALL))||void 0===i||i)!==e&&o(Ms,this,zs).call(this,[[j.HIGHLIGHT_SHOW_ALL,e]])}enableWaiting(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(h(es,this)!==t){c(es,this,t);for(const e of h(Ni,this).values())t?e.disableClick():e.enableClick(),e.div.classList.toggle("waiting",t)}}getEditors(t){const e=[];for(const i of h(Oi,this).values())i.pageIndex===t&&e.push(i);return e}getEditor(t){return h(Oi,this).get(t)}addEditor(t){h(Oi,this).set(t.id,t)}removeEditor(t){var e;(t.div.contains(document.activeElement)&&(h(Yi,this)&&clearTimeout(h(Yi,this)),c(Yi,this,setTimeout((()=>{this.focusMainContainer(),c(Yi,this,null)}),0))),h(Oi,this).delete(t.id),this.unselect(t),t.annotationElementId&&h(Vi,this).has(t.annotationElementId))||(null===(e=h(ji,this))||void 0===e||e.remove(t.id))}addDeletedAnnotationElement(t){h(Vi,this).add(t.annotationElementId),this.addChangedExistingAnnotation(t),t.deleted=!0}isDeletedAnnotationElement(t){return h(Vi,this).has(t)}removeDeletedAnnotationElement(t){h(Vi,this).delete(t.annotationElementId),this.removeChangedExistingAnnotation(t),t.deleted=!1}setActiveEditor(t){h(Fi,this)!==t&&(c(Fi,this,t),t&&o(Ms,this,zs).call(this,t.propertiesToUpdate))}updateUI(t){l(Ms,this,qs)===t&&o(Ms,this,zs).call(this,t.propertiesToUpdate)}toggleSelected(t){if(h(rs,this).has(t))return h(rs,this).delete(t),t.unselect(),void o(Ms,this,Hs).call(this,{hasSelectedEditor:this.hasSelection});h(rs,this).add(t),t.select(),o(Ms,this,zs).call(this,t.propertiesToUpdate),o(Ms,this,Hs).call(this,{hasSelectedEditor:!0})}setSelected(t){for(const e of h(rs,this))e!==t&&e.unselect();h(rs,this).clear(),h(rs,this).add(t),t.select(),o(Ms,this,zs).call(this,t.propertiesToUpdate),o(Ms,this,Hs).call(this,{hasSelectedEditor:!0})}isSelected(t){return h(rs,this).has(t)}get firstSelectedEditor(){return h(rs,this).values().next().value}unselect(t){t.unselect(),h(rs,this).delete(t),o(Ms,this,Hs).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==h(rs,this).size}get isEnterHandled(){return 1===h(rs,this).size&&this.firstSelectedEditor.isEnterHandled}undo(){h(Hi,this).undo(),o(Ms,this,Hs).call(this,{hasSomethingToUndo:h(Hi,this).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:o(Ms,this,Xs).call(this)})}redo(){h(Hi,this).redo(),o(Ms,this,Hs).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:h(Hi,this).hasSomethingToRedo(),isEmpty:o(Ms,this,Xs).call(this)})}addCommands(t){h(Hi,this).add(t),o(Ms,this,Hs).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:o(Ms,this,Xs).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const t=[...h(rs,this)];this.addCommands({cmd:()=>{for(const e of t)e.remove()},undo:()=>{for(const e of t)o(Ms,this,Us).call(this,e)},mustExec:!0})}commitOrRemove(){var t;null===(t=h(Fi,this))||void 0===t||t.commitOrRemove()}hasSomethingToControl(){return h(Fi,this)||this.hasSelection}selectAll(){for(const t of h(rs,this))t.commit();o(Ms,this,Ks).call(this,h(Oi,this).values())}unselectAll(){if((!h(Fi,this)||(h(Fi,this).commitOrRemove(),h(as,this)===W.NONE))&&this.hasSelection){for(const t of h(rs,this))t.unselect();h(rs,this).clear(),o(Ms,this,Hs).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(t,e){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]||this.commitOrRemove(),!this.hasSelection)return;h(xs,this)[0]+=t,h(xs,this)[1]+=e;const[i,s]=h(xs,this),n=[...h(rs,this)];h(Es,this)&&clearTimeout(h(Es,this)),c(Es,this,setTimeout((()=>{c(Es,this,null),h(xs,this)[0]=h(xs,this)[1]=0,this.addCommands({cmd:()=>{for(const t of n)h(Oi,this).has(t.id)&&t.translateInPage(i,s)},undo:()=>{for(const t of n)h(Oi,this).has(t.id)&&t.translateInPage(-i,-s)},mustExec:!1})}),1e3));for(const a of n)a.translateInPage(t,e)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),c(Gi,this,new Map);for(const t of h(rs,this))h(Gi,this).set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!h(Gi,this))return!1;this.disableUserSelect(!1);const t=h(Gi,this);c(Gi,this,null);let e=!1;for(const[{x:s,y:n,pageIndex:a},r]of t)r.newX=s,r.newY=n,r.newPageIndex=a,e||(e=s!==r.savedX||n!==r.savedY||a!==r.savedPageIndex);if(!e)return!1;const i=(t,e,i,s)=>{if(h(Oi,this).has(t.id)){const n=h(Ni,this).get(s);n?t._setParentAndPosition(n,e,i):(t.pageIndex=s,t.x=e,t.y=i)}};return this.addCommands({cmd:()=>{for(const[e,{newX:s,newY:n,newPageIndex:a}]of t)i(e,s,n,a)},undo:()=>{for(const[e,{savedX:s,savedY:n,savedPageIndex:a}]of t)i(e,s,n,a)},mustExec:!0}),!0}dragSelectedEditors(t,e){if(h(Gi,this))for(const i of h(Gi,this).keys())i.drag(t,e)}rebuild(t){if(null===t.parent){const e=this.getLayer(t.pageIndex);e?(e.changeParent(t),e.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}get isEditorHandlingKeyboard(){var t;return(null===(t=this.getActive())||void 0===t?void 0:t.shouldGetKeyboardEvents())||1===h(rs,this).size&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(t){return h(Fi,this)===t}getActive(){return h(Fi,this)}getMode(){return h(as,this)}get imageManager(){return Rt(this,"imageManager",new Ei)}getSelectionBoxes(t){if(!t)return null;const e=document.getSelection();for(let l=0,h=e.rangeCount;l({x:(e-s)/a,y:1-(t+r-i)/n,width:o/a,height:r/n});break;case"180":r=(t,e,r,o)=>({x:1-(t+r-i)/n,y:1-(e+o-s)/a,width:r/n,height:o/a});break;case"270":r=(t,e,r,o)=>({x:1-(e+o-s)/a,y:(t-i)/n,width:o/a,height:r/n});break;default:r=(t,e,r,o)=>({x:(t-i)/n,y:(e-s)/a,width:r/n,height:o/a})}const o=[];for(let l=0,h=e.rangeCount;l{"pointerup"===e.type&&0!==e.button||(window.removeEventListener("pointerup",t),window.removeEventListener("blur",t),"pointerup"===e.type&&o(Ms,this,Ls).call(this,"main_toolbar"))};window.addEventListener("pointerup",t),window.addEventListener("blur",t)}}else h(os,this)&&(null===(n=h(Zi,this))||void 0===n||n.hide(),c(os,this,null),o(Ms,this,Hs).call(this,{hasSelectedText:!1}))}function Ls(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";h(as,this)===W.HIGHLIGHT?this.highlightSelection(t):h(Xi,this)&&o(Ms,this,Ts).call(this)}function Ds(){document.addEventListener("selectionchange",h(As,this))}function Is(){document.removeEventListener("selectionchange",h(As,this))}function Fs(){window.addEventListener("focus",h(ds,this)),window.addEventListener("blur",h(cs,this))}function Os(){window.removeEventListener("focus",h(ds,this)),window.removeEventListener("blur",h(cs,this))}function Ns(){window.addEventListener("keydown",h(gs,this)),window.addEventListener("keyup",h(ms,this))}function Ws(){window.removeEventListener("keydown",h(gs,this)),window.removeEventListener("keyup",h(ms,this))}function js(){document.addEventListener("copy",h(us,this)),document.addEventListener("cut",h(ps,this)),document.addEventListener("paste",h(fs,this))}function Bs(){document.removeEventListener("copy",h(us,this)),document.removeEventListener("cut",h(ps,this)),document.removeEventListener("paste",h(fs,this))}function Hs(t){Object.entries(t).some((t=>{let[e,i]=t;return h(_s,this)[e]!==i}))&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(h(_s,this),t)}),h(as,this)===W.HIGHLIGHT&&!1===t.hasSelectedEditor&&o(Ms,this,zs).call(this,[[j.HIGHLIGHT_FREE,!0]]))}function zs(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})}function Vs(){if(!h(ts,this)){c(ts,this,!0);for(const t of h(Ni,this).values())t.enable();for(const t of h(Oi,this).values())t.enable()}}function Gs(){if(this.unselectAll(),h(ts,this)){c(ts,this,!1);for(const t of h(Ni,this).values())t.disable();for(const t of h(Oi,this).values())t.disable()}}function Us(t){const e=h(Ni,this).get(t.pageIndex);e?e.addOrRebuild(t):(this.addEditor(t),this.addToAnnotationStorage(t))}function qs(t){let e=null;for(e of h(rs,t));return e}function Xs(){if(0===h(Oi,this).size)return!0;if(1===h(Oi,this).size)for(const t of h(Oi,this).values())return t.isEmpty();return!1}function Ks(t){for(const e of h(rs,this))e.unselect();h(rs,this).clear();for(const e of t)e.isEmpty()||(h(rs,this).add(e),e.select());o(Ms,this,Hs).call(this,{hasSelectedEditor:this.hasSelection})}(0,x.A)(Cs,"TRANSLATE_SMALL",1),(0,x.A)(Cs,"TRANSLATE_BIG",10);var Ys=new WeakMap,Qs=new WeakMap,Js=new WeakMap,Zs=new WeakMap,$s=new WeakMap,tn=new WeakMap,en=new WeakMap,sn=new WeakSet;class nn{constructor(t){a(this,sn),r(this,Ys,""),r(this,Qs,!1),r(this,Js,null),r(this,Zs,null),r(this,$s,null),r(this,tn,!1),r(this,en,null),c(en,this,t)}static initialize(t){nn._l10nPromise||(nn._l10nPromise=t)}async render(){const t=c(Js,this,document.createElement("button"));t.className="altText";const e=await nn._l10nPromise.get("pdfjs-editor-alt-text-button-label");t.textContent=e,t.setAttribute("aria-label",e),t.tabIndex="0",t.addEventListener("contextmenu",ze),t.addEventListener("pointerdown",(t=>t.stopPropagation()));const i=t=>{t.preventDefault(),h(en,this)._uiManager.editAltText(h(en,this))};return t.addEventListener("click",i,{capture:!0}),t.addEventListener("keydown",(e=>{e.target===t&&"Enter"===e.key&&(c(tn,this,!0),i(e))})),await o(sn,this,an).call(this),t}finish(){h(Js,this)&&(h(Js,this).focus({focusVisible:h(tn,this)}),c(tn,this,!1))}isEmpty(){return!h(Ys,this)&&!h(Qs,this)}get data(){return{altText:h(Ys,this),decorative:h(Qs,this)}}set data(t){let{altText:e,decorative:i}=t;h(Ys,this)===e&&h(Qs,this)===i||(c(Ys,this,e),c(Qs,this,i),o(sn,this,an).call(this))}toggle(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];h(Js,this)&&(!t&&h($s,this)&&(clearTimeout(h($s,this)),c($s,this,null)),h(Js,this).disabled=!t)}destroy(){var t;null===(t=h(Js,this))||void 0===t||t.remove(),c(Js,this,null),c(Zs,this,null)}}async function an(){const t=h(Js,this);if(!t)return;var e;if(!h(Ys,this)&&!h(Qs,this))return t.classList.remove("done"),void(null===(e=h(Zs,this))||void 0===e||e.remove());t.classList.add("done"),f._l10nPromise.get("pdfjs-editor-alt-text-edit-button-label").then((e=>{t.setAttribute("aria-label",e)}));let i=h(Zs,this);if(!i){c(Zs,this,i=document.createElement("span")),i.className="tooltip",i.setAttribute("role","tooltip");const e=i.id="alt-text-tooltip-".concat(h(en,this).id);t.setAttribute("aria-describedby",e);const s=100;t.addEventListener("mouseenter",(()=>{c($s,this,setTimeout((()=>{c($s,this,null),h(Zs,this).classList.add("show"),h(en,this)._reportTelemetry({action:"alt_text_tooltip"})}),s))})),t.addEventListener("mouseleave",(()=>{var t;h($s,this)&&(clearTimeout(h($s,this)),c($s,this,null)),null===(t=h(Zs,this))||void 0===t||t.classList.remove("show")}))}i.innerText=h(Qs,this)?await f._l10nPromise.get("pdfjs-editor-alt-text-decorative-tooltip"):h(Ys,this),i.parentNode||t.append(i);const s=h(en,this).getImageForAltText();null===s||void 0===s||s.setAttribute("aria-describedby",i.id)}f=nn,(0,x.A)(nn,"_l10nPromise",null);var rn=new WeakMap,on=new WeakMap,ln=new WeakMap,hn=new WeakMap,cn=new WeakMap,dn=new WeakMap,un=new WeakMap,pn=new WeakMap,fn=new WeakMap,gn=new WeakMap,mn=new WeakMap,vn=new WeakMap,bn=new WeakMap,yn=new WeakMap,An=new WeakMap,wn=new WeakMap,_n=new WeakMap,xn=new WeakMap,En=new WeakMap,kn=new WeakMap,Sn=new WeakMap,Mn=new WeakSet;class Cn{static get _resizerKeyboardManager(){const t=Cn.prototype._resizeWithKeyboard,e=Cs.TRANSLATE_SMALL,i=Cs.TRANSLATE_BIG;return Rt(this,"_resizerKeyboardManager",new Li([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-e,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-i,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[e,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[i,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-e]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-i]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,e]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,i]}],[["Escape","mac+Escape"],Cn.prototype._stopResizingWithKeyboard]]))}constructor(t){a(this,Mn),r(this,rn,null),r(this,on,null),r(this,ln,!1),r(this,hn,!1),r(this,cn,null),r(this,dn,null),r(this,un,this.focusin.bind(this)),r(this,pn,this.focusout.bind(this)),r(this,fn,null),r(this,gn,""),r(this,mn,!1),r(this,vn,null),r(this,bn,!1),r(this,yn,!1),r(this,An,!1),r(this,wn,null),r(this,_n,0),r(this,xn,0),r(this,En,null),(0,x.A)(this,"_initialOptions",Object.create(null)),(0,x.A)(this,"_isVisible",!0),(0,x.A)(this,"_uiManager",null),(0,x.A)(this,"_focusEventsAllowed",!0),(0,x.A)(this,"_l10nPromise",null),r(this,kn,!1),r(this,Sn,Cn._zIndex++),this.constructor===Cn&&St("Cannot initialize AnnotationEditor."),this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null;const{rotation:e,rawDims:{pageWidth:i,pageHeight:s,pageX:n,pageY:o}}=this.parent.viewport;this.rotation=e,this.pageRotation=(360+e-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[i,s],this.pageTranslation=[n,o];const[l,h]=this.parentDimensions;this.x=t.x/l,this.y=t.y/h,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return Rt(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){const e=new Vn({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});e.annotationElementId=t.annotationElementId,e.deleted=!0,e._uiManager.addToAnnotationStorage(e)}static initialize(t,e,i){if(Cn._l10nPromise||(Cn._l10nPromise=new Map(["pdfjs-editor-alt-text-button-label","pdfjs-editor-alt-text-edit-button-label","pdfjs-editor-alt-text-decorative-tooltip","pdfjs-editor-resizer-label-topLeft","pdfjs-editor-resizer-label-topMiddle","pdfjs-editor-resizer-label-topRight","pdfjs-editor-resizer-label-middleRight","pdfjs-editor-resizer-label-bottomRight","pdfjs-editor-resizer-label-bottomMiddle","pdfjs-editor-resizer-label-bottomLeft","pdfjs-editor-resizer-label-middleLeft"].map((e=>[e,t.get(e.replaceAll(/([A-Z])/g,(t=>"-".concat(t.toLowerCase()))))])))),null!==i&&void 0!==i&&i.strings)for(const n of i.strings)Cn._l10nPromise.set(n,t.get(n));if(-1!==Cn._borderLineWidth)return;const s=getComputedStyle(document.documentElement);Cn._borderLineWidth=parseFloat(s.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,e){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,e){St("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return h(kn,this)}set _isDraggable(t){var e;c(kn,this,t),null===(e=this.div)||void 0===e||e.classList.toggle("draggable",t)}get isEnterHandled(){return!0}center(){const[t,e]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*e/(2*t),this.y+=this.width*t/(2*e);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*e/(2*t),this.y-=this.width*t/(2*e);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=h(Sn,this)}setParent(t){null!==t?(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions):o(Mn,this,zn).call(this),this.parent=t}focusin(t){this._focusEventsAllowed&&(h(mn,this)?c(mn,this,!1):this.parent.setSelected(this))}focusout(t){var e;if(!this._focusEventsAllowed)return;if(!this.isAttachedToDOM)return;const i=t.relatedTarget;null!==i&&void 0!==i&&i.closest("#".concat(this.id))||(t.preventDefault(),null!==(e=this.parent)&&void 0!==e&&e.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,e,i,s){const[n,a]=this.parentDimensions;[i,s]=this.screenToPageTranslation(i,s),this.x=(t+i)/n,this.y=(e+s)/a,this.fixAndSetPosition()}translate(t,e){o(Mn,this,Rn).call(this,this.parentDimensions,t,e)}translateInPage(t,e){h(vn,this)||c(vn,this,[this.x,this.y]),o(Mn,this,Rn).call(this,this.pageDimensions,t,e),this.div.scrollIntoView({block:"nearest"})}drag(t,e){h(vn,this)||c(vn,this,[this.x,this.y]);const[i,s]=this.parentDimensions;if(this.x+=t/i,this.y+=e/s,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:t,y:e}=this.div.getBoundingClientRect();this.parent.findNewParent(this,t,e)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:n,y:a}=this;const[r,o]=this.getBaseTranslation();n+=r,a+=o,this.div.style.left="".concat((100*n).toFixed(2),"%"),this.div.style.top="".concat((100*a).toFixed(2),"%"),this.div.scrollIntoView({block:"nearest"})}get _hasBeenMoved(){return!!h(vn,this)&&(h(vn,this)[0]!==this.x||h(vn,this)[1]!==this.y)}getBaseTranslation(){const[t,e]=this.parentDimensions,{_borderLineWidth:i}=Cn,s=i/t,n=i/e;switch(this.rotation){case 90:return[-s,n];case 180:return[s,n];case 270:return[s,-n];default:return[-s,-n]}}get _mustFixPosition(){return!0}fixAndSetPosition(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.rotation;const[e,i]=this.pageDimensions;let{x:s,y:n,width:a,height:r}=this;if(a*=e,r*=i,s*=e,n*=i,this._mustFixPosition)switch(t){case 0:s=Math.max(0,Math.min(e-a,s)),n=Math.max(0,Math.min(i-r,n));break;case 90:s=Math.max(0,Math.min(e-r,s)),n=Math.min(i,Math.max(a,n));break;case 180:s=Math.min(e,Math.max(a,s)),n=Math.min(i,Math.max(r,n));break;case 270:s=Math.min(e,Math.max(r,s)),n=Math.max(0,Math.min(i-a,n))}this.x=s/=e,this.y=n/=i;const[o,l]=this.getBaseTranslation();s+=o,n+=l;const{style:h}=this.div;h.left="".concat((100*s).toFixed(2),"%"),h.top="".concat((100*n).toFixed(2),"%"),this.moveInDOM()}screenToPageTranslation(t,e){return Tn.call(Cn,t,e,this.parentRotation)}pageTranslationToScreen(t,e){return Tn.call(Cn,t,e,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:t,pageDimensions:[e,i]}=this,s=e*t,n=i*t;return Ht.isCSSRoundSupported?[Math.round(s),Math.round(n)]:[s,n]}setDims(t,e){const[i,s]=this.parentDimensions;this.div.style.width="".concat((100*t/i).toFixed(2),"%"),h(hn,this)||(this.div.style.height="".concat((100*e/s).toFixed(2),"%"))}fixDims(){const{style:t}=this.div,{height:e,width:i}=t,s=i.endsWith("%"),n=!h(hn,this)&&e.endsWith("%");if(s&&n)return;const[a,r]=this.parentDimensions;s||(t.width="".concat((100*parseFloat(i)/a).toFixed(2),"%")),h(hn,this)||n||(t.height="".concat((100*parseFloat(e)/r).toFixed(2),"%"))}getInitialTranslation(){return[0,0]}altTextFinish(){var t;null===(t=h(on,this))||void 0===t||t.finish()}async addEditToolbar(){return h(fn,this)||h(yn,this)||(c(fn,this,new ii(this)),this.div.append(h(fn,this).render()),h(on,this)&&h(fn,this).addAltTextButton(await h(on,this).render())),h(fn,this)}removeEditToolbar(){var t;h(fn,this)&&(h(fn,this).remove(),c(fn,this,null),null===(t=h(on,this))||void 0===t||t.destroy())}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){h(on,this)||(nn.initialize(Cn._l10nPromise),c(on,this,new nn(this)),await this.addEditToolbar())}get altTextData(){var t;return null===(t=h(on,this))||void 0===t?void 0:t.data}set altTextData(t){h(on,this)&&(h(on,this).data=t)}hasAltText(){var t;return!(null!==(t=h(on,this))&&void 0!==t&&t.isEmpty())}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=h(ln,this)?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),this.div.addEventListener("focusin",h(un,this)),this.div.addEventListener("focusout",h(pn,this));const[t,e]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth="".concat((100*e/t).toFixed(2),"%"),this.div.style.maxHeight="".concat((100*t/e).toFixed(2),"%"));const[i,s]=this.getInitialTranslation();return this.translate(i,s),vi(this,this.div,["pointerdown"]),this.div}pointerdown(t){const{isMac:e}=Ht.platform;0!==t.button||t.ctrlKey&&e?t.preventDefault():(c(mn,this,!0),this._isDraggable?o(Mn,this,Nn).call(this,t):o(Mn,this,On).call(this,t))}moveInDOM(){h(wn,this)&&clearTimeout(h(wn,this)),c(wn,this,setTimeout((()=>{var t;c(wn,this,null),null===(t=this.parent)||void 0===t||t.moveEditorInDOM(this)}),0))}_setParentAndPosition(t,e,i){t.changeParent(this),this.x=e,this.y=i,this.fixAndSetPosition()}getRect(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.rotation;const s=this.parentScale,[n,a]=this.pageDimensions,[r,o]=this.pageTranslation,l=t/s,h=e/s,c=this.x*n,d=this.y*a,u=this.width*n,p=this.height*a;switch(i){case 0:return[c+l+r,a-d-h-p+o,c+l+u+r,a-d-h+o];case 90:return[c+h+r,a-d+l+o,c+h+p+r,a-d+l+u+o];case 180:return[c-l-u+r,a-d+h+o,c-l+r,a-d+h+p+o];case 270:return[c-h-p+r,a-d-l-u+o,c-h+r,a-d-l+o];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,e){const[i,s,n,a]=t,r=n-i,o=a-s;switch(this.rotation){case 0:return[i,e-a,r,o];case 90:return[i,e-s,o,r];case 180:return[n,e-s,r,o];case 270:return[n,e-a,o,r];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){c(yn,this,!0)}disableEditMode(){c(yn,this,!1)}isInEditMode(){return h(yn,this)}shouldGetKeyboardEvents(){return h(An,this)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){var t,e;null===(t=this.div)||void 0===t||t.addEventListener("focusin",h(un,this)),null===(e=this.div)||void 0===e||e.addEventListener("focusout",h(pn,this))}rotate(t){}serialize(){St("An editor must be serializable")}static deserialize(t,e,i){const s=new this.prototype.constructor({parent:e,id:e.getNextId(),uiManager:i});s.rotation=t.rotation;const[n,a]=s.pageDimensions,[r,o,l,h]=s.getRectInCurrentCoords(t.rect,a);return s.x=r/n,s.y=o/a,s.width=l/n,s.height=h/a,s}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||null!==this.serialize())}remove(){if(this.div.removeEventListener("focusin",h(un,this)),this.div.removeEventListener("focusout",h(pn,this)),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),h(wn,this)&&(clearTimeout(h(wn,this)),c(wn,this,null)),o(Mn,this,zn).call(this),this.removeEditToolbar(),h(En,this)){for(const t of h(En,this).values())clearTimeout(t);c(En,this,null)}this.parent=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(o(Mn,this,Ln).call(this),h(cn,this).classList.remove("hidden"),vi(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(t){if(!this.isResizable||t.target!==this.div||"Enter"!==t.key)return;this._uiManager.setSelected(this),c(dn,this,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const e=h(cn,this).children;if(!h(rn,this)){c(rn,this,Array.from(e));const t=o(Mn,this,Wn).bind(this),i=o(Mn,this,jn).bind(this);for(const e of h(rn,this)){const s=e.getAttribute("data-resizer-name");e.setAttribute("role","spinbutton"),e.addEventListener("keydown",t),e.addEventListener("blur",i),e.addEventListener("focus",o(Mn,this,Bn).bind(this,s)),Cn._l10nPromise.get("pdfjs-editor-resizer-label-".concat(s)).then((t=>e.setAttribute("aria-label",t)))}}const i=h(rn,this)[0];let s=0;for(const a of e){if(a===i)break;s++}const n=(360-this.rotation+this.parentRotation)%360/90*(h(rn,this).length/4);if(n!==s){if(ns)for(let e=0;ei.setAttribute("aria-label",t)))}}o(Mn,this,Hn).call(this,0),c(An,this,!0),h(cn,this).firstChild.focus({focusVisible:!0}),t.preventDefault(),t.stopImmediatePropagation()}_resizeWithKeyboard(t,e){h(An,this)&&o(Mn,this,Fn).call(this,h(gn,this),{movementX:t,movementY:e})}_stopResizingWithKeyboard(){o(Mn,this,zn).call(this),this.div.focus()}select(){var t,e;this.makeResizable(),null===(t=this.div)||void 0===t||t.classList.add("selectedEditor"),h(fn,this)?null===(e=h(fn,this))||void 0===e||e.show():this.addEditToolbar().then((()=>{var t,e;null!==(t=this.div)&&void 0!==t&&t.classList.contains("selectedEditor")&&(null===(e=h(fn,this))||void 0===e||e.show())}))}unselect(){var t,e,i,s;null===(t=h(cn,this))||void 0===t||t.classList.add("hidden"),null===(e=this.div)||void 0===e||e.classList.remove("selectedEditor"),null!==(i=this.div)&&void 0!==i&&i.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),null===(s=h(fn,this))||void 0===s||s.hide()}updateParams(t,e){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return h(bn,this)}set isEditing(t){c(bn,this,t),this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(t,e){c(hn,this,!0);const i=t/e,{style:s}=this.div;s.aspectRatio=i,s.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){h(En,this)||c(En,this,new Map);const{action:e}=t;let i=h(En,this).get(e);return i&&clearTimeout(i),i=setTimeout((()=>{this._reportTelemetry(t),h(En,this).delete(e),0===h(En,this).size&&c(En,this,null)}),Cn._telemetryTimeout),void h(En,this).set(e,i)}t.type||(t.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:t}})}show(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._isVisible;this.div.classList.toggle("hidden",!t),this._isVisible=t}enable(){this.div&&(this.div.tabIndex=0),c(ln,this,!1)}disable(){this.div&&(this.div.tabIndex=-1),c(ln,this,!0)}renderAnnotationElement(t){let e=t.container.querySelector(".annotationContent");if(e){if("CANVAS"===e.nodeName){const t=e;e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),t.before(e)}}else e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),t.container.prepend(e);return e}resetAnnotationElement(t){const{firstChild:e}=t.container;"DIV"===e.nodeName&&e.classList.contains("annotationContent")&&e.remove()}}function Rn(t,e,i){let[s,n]=t;[e,i]=this.screenToPageTranslation(e,i),this.x+=e/s,this.y+=i/n,this.fixAndSetPosition()}function Tn(t,e,i){switch(i){case 90:return[e,-t];case 180:return[-t,-e];case 270:return[-e,t];default:return[t,e]}}function Pn(t){switch(t){case 90:{const[t,e]=this.pageDimensions;return[0,-t/e,e/t,0]}case 180:return[-1,0,0,-1];case 270:{const[t,e]=this.pageDimensions;return[0,t/e,-e/t,0]}default:return[1,0,0,1]}}function Ln(){if(h(cn,this))return;c(cn,this,document.createElement("div")),h(cn,this).classList.add("resizers");const t=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"];for(const e of t){const t=document.createElement("div");h(cn,this).append(t),t.classList.add("resizer",e),t.setAttribute("data-resizer-name",e),t.addEventListener("pointerdown",o(Mn,this,Dn).bind(this,e)),t.addEventListener("contextmenu",ze),t.tabIndex=-1}this.div.prepend(h(cn,this))}function Dn(t,e){var i;e.preventDefault();const{isMac:s}=Ht.platform;if(0!==e.button||e.ctrlKey&&s)return;null===(i=h(on,this))||void 0===i||i.toggle(!1);const n=o(Mn,this,Fn).bind(this,t),a=this._isDraggable;this._isDraggable=!1;const r={passive:!0,capture:!0};this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",n,r),window.addEventListener("contextmenu",ze);const l=this.x,c=this.y,d=this.width,u=this.height,p=this.parent.div.style.cursor,f=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(e.target).cursor;const g=()=>{var t;this.parent.togglePointerEvents(!0),null===(t=h(on,this))||void 0===t||t.toggle(!0),this._isDraggable=a,window.removeEventListener("pointerup",g),window.removeEventListener("blur",g),window.removeEventListener("pointermove",n,r),window.removeEventListener("contextmenu",ze),this.parent.div.style.cursor=p,this.div.style.cursor=f,o(Mn,this,In).call(this,l,c,d,u)};window.addEventListener("pointerup",g),window.addEventListener("blur",g)}function In(t,e,i,s){const n=this.x,a=this.y,r=this.width,o=this.height;n===t&&a===e&&r===i&&o===s||this.addCommands({cmd:()=>{this.width=r,this.height=o,this.x=n,this.y=a;const[t,e]=this.parentDimensions;this.setDims(t*r,e*o),this.fixAndSetPosition()},undo:()=>{this.width=i,this.height=s,this.x=t,this.y=e;const[n,a]=this.parentDimensions;this.setDims(n*i,a*s),this.fixAndSetPosition()},mustExec:!0})}function Fn(t,e){const[i,s]=this.parentDimensions,n=this.x,a=this.y,r=this.width,l=this.height,h=g.MIN_SIZE/i,c=g.MIN_SIZE/s,d=t=>Math.round(1e4*t)/1e4,u=o(Mn,this,Pn).call(this,this.rotation),p=(t,e)=>[u[0]*t+u[2]*e,u[1]*t+u[3]*e],f=o(Mn,this,Pn).call(this,360-this.rotation);let m,v,b=!1,y=!1;switch(t){case"topLeft":b=!0,m=(t,e)=>[0,0],v=(t,e)=>[t,e];break;case"topMiddle":m=(t,e)=>[t/2,0],v=(t,e)=>[t/2,e];break;case"topRight":b=!0,m=(t,e)=>[t,0],v=(t,e)=>[0,e];break;case"middleRight":y=!0,m=(t,e)=>[t,e/2],v=(t,e)=>[0,e/2];break;case"bottomRight":b=!0,m=(t,e)=>[t,e],v=(t,e)=>[0,0];break;case"bottomMiddle":m=(t,e)=>[t/2,e],v=(t,e)=>[t/2,0];break;case"bottomLeft":b=!0,m=(t,e)=>[0,e],v=(t,e)=>[t,0];break;case"middleLeft":y=!0,m=(t,e)=>[0,e/2],v=(t,e)=>[t,e/2]}const A=m(r,l),w=v(r,l);let _=p(...w);const x=d(n+_[0]),E=d(a+_[1]);let k=1,S=1,[M,C]=this.screenToPageTranslation(e.movementX,e.movementY);var R,T;if([M,C]=(R=M/i,T=C/s,[f[0]*R+f[2]*T,f[1]*R+f[3]*T]),b){const t=Math.hypot(r,l);k=S=Math.max(Math.min(Math.hypot(w[0]-A[0]-M,w[1]-A[1]-C)/t,1/r,1/l),h/r,c/l)}else y?k=Math.max(h,Math.min(1,Math.abs(w[0]-A[0]-M)))/r:S=Math.max(c,Math.min(1,Math.abs(w[1]-A[1]-C)))/l;const P=d(r*k),L=d(l*S);_=p(...v(P,L));const D=x-_[0],I=E-_[1];this.width=P,this.height=L,this.x=D,this.y=I,this.setDims(i*P,s*L),this.fixAndSetPosition()}function On(t){const{isMac:e}=Ht.platform;t.ctrlKey&&!e||t.shiftKey||t.metaKey&&e?this.parent.toggleSelected(this):this.parent.setSelected(this)}function Nn(t){const e=this._uiManager.isSelected(this);let i,s;this._uiManager.setUpDragSession(),e&&(this.div.classList.add("moving"),i={passive:!0,capture:!0},c(_n,this,t.clientX),c(xn,this,t.clientY),s=t=>{const{clientX:e,clientY:i}=t,[s,n]=this.screenToPageTranslation(e-h(_n,this),i-h(xn,this));c(_n,this,e),c(xn,this,i),this._uiManager.dragSelectedEditors(s,n)},window.addEventListener("pointermove",s,i));const n=()=>{window.removeEventListener("pointerup",n),window.removeEventListener("blur",n),e&&(this.div.classList.remove("moving"),window.removeEventListener("pointermove",s,i)),c(mn,this,!1),this._uiManager.endDragSession()||o(Mn,this,On).call(this,t)};window.addEventListener("pointerup",n),window.addEventListener("blur",n)}function Wn(t){g._resizerKeyboardManager.exec(this,t)}function jn(t){var e;h(An,this)&&(null===(e=t.relatedTarget)||void 0===e?void 0:e.parentNode)!==h(cn,this)&&o(Mn,this,zn).call(this)}function Bn(t){c(gn,this,h(An,this)?t:"")}function Hn(t){if(h(rn,this))for(const e of h(rn,this))e.tabIndex=t}function zn(){if(c(An,this,!1),o(Mn,this,Hn).call(this,-1),h(dn,this)){const{savedX:t,savedY:e,savedWidth:i,savedHeight:s}=h(dn,this);o(Mn,this,In).call(this,t,e,i,s),c(dn,this,null)}}g=Cn,(0,x.A)(Cn,"_borderLineWidth",-1),(0,x.A)(Cn,"_colorManager",new Ii),(0,x.A)(Cn,"_zIndex",1),(0,x.A)(Cn,"_telemetryTimeout",1e3);class Vn extends Cn{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}const Gn=3285377520,Un=4294901760,qn=65535;class Xn{constructor(t){this.h1=t?4294967295&t:Gn,this.h2=t?4294967295&t:Gn}update(t){let e,i;if("string"===typeof t){e=new Uint8Array(2*t.length),i=0;for(let s=0,n=t.length;s>>8,e[i++]=255&n)}}else{if(!ArrayBuffer.isView(t))throw new Error("Invalid data format, must be a string or TypedArray.");e=t.slice(),i=e.byteLength}const s=i>>2,n=i-4*s,a=new Uint32Array(e.buffer,0,s);let r=0,o=0,l=this.h1,h=this.h2;const c=3432918353,d=461845907,u=11601,p=13715;for(let f=0;f>>17,r=r*d&Un|r*p&qn,l^=r,l=l<<13|l>>>19,l=5*l+3864292196):(o=a[f],o=o*c&Un|o*u&qn,o=o<<15|o>>>17,o=o*d&Un|o*p&qn,h^=o,h=h<<13|h>>>19,h=5*h+3864292196);switch(r=0,n){case 3:r^=e[4*s+2]<<16;case 2:r^=e[4*s+1]<<8;case 1:r^=e[4*s],r=r*c&Un|r*u&qn,r=r<<15|r>>>17,r=r*d&Un|r*p&qn,1&s?l^=r:h^=r}this.h1=l,this.h2=h}hexdigest(){let t=this.h1,e=this.h2;return t^=e>>>1,t=3981806797*t&Un|36045*t&qn,e=4283543511*e&Un|(2950163797*(e<<16|t>>>16)&Un)>>>16,t^=e>>>1,t=444984403*t&Un|60499*t&qn,e=3301882366*e&Un|(3120437893*(e<<16|t>>>16)&Un)>>>16,t^=e>>>1,(t>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}}const Kn=Object.freeze({map:null,hash:"",transfer:void 0});var Yn=new WeakMap,Qn=new WeakMap,Jn=new WeakSet;class Zn{constructor(){a(this,Jn),r(this,Yn,!1),r(this,Qn,new Map),this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(t,e){const i=h(Qn,this).get(t);return void 0===i?e:Object.assign(e,i)}getRawValue(t){return h(Qn,this).get(t)}remove(t){if(h(Qn,this).delete(t),0===h(Qn,this).size&&this.resetModified(),"function"===typeof this.onAnnotationEditor){for(const t of h(Qn,this).values())if(t instanceof Cn)return;this.onAnnotationEditor(null)}}setValue(t,e){const i=h(Qn,this).get(t);let s=!1;if(void 0!==i)for(const[n,a]of Object.entries(e))i[n]!==a&&(s=!0,i[n]=a);else s=!0,h(Qn,this).set(t,e);s&&o(Jn,this,$n).call(this),e instanceof Cn&&"function"===typeof this.onAnnotationEditor&&this.onAnnotationEditor(e.constructor._type)}has(t){return h(Qn,this).has(t)}getAll(){return h(Qn,this).size>0?Bt(h(Qn,this)):null}setAll(t){for(const[e,i]of Object.entries(t))this.setValue(e,i)}get size(){return h(Qn,this).size}resetModified(){h(Yn,this)&&(c(Yn,this,!1),"function"===typeof this.onResetModified&&this.onResetModified())}get print(){return new ea(this)}get serializable(){if(0===h(Qn,this).size)return Kn;const t=new Map,e=new Xn,i=[],s=Object.create(null);let n=!1;for(const[a,r]of h(Qn,this)){const i=r instanceof Cn?r.serialize(!1,s):r;i&&(t.set(a,i),e.update("".concat(a,":").concat(JSON.stringify(i))),n||(n=!!i.bitmap))}if(n)for(const a of t.values())a.bitmap&&i.push(a.bitmap);return t.size>0?{map:t,hash:e.hexdigest(),transfer:i}:Kn}get editorStats(){let t=null;const e=new Map;for(const n of h(Qn,this).values()){var i;if(!(n instanceof Cn))continue;const a=n.telemetryFinalData;if(!a)continue;const{type:r}=a;e.has(r)||e.set(r,Object.getPrototypeOf(n).constructor),t||(t=Object.create(null));const o=(i=t)[r]||(i[r]=new Map);for(const[t,e]of Object.entries(a)){var s;if("type"===t)continue;let i=o.get(t);i||(i=new Map,o.set(t,i));const n=null!==(s=i.get(e))&&void 0!==s?s:0;i.set(e,n+1)}}for(const[n,a]of e)t[n]=a.computeTelemetryFinalData(t[n]);return t}}function $n(){h(Yn,this)||(c(Yn,this,!0),"function"===typeof this.onSetModified&&this.onSetModified())}var ta=new WeakMap;class ea extends Zn{constructor(t){super(),r(this,ta,void 0);const{map:e,hash:i,transfer:s}=t.serializable,n=structuredClone(e,s?{transfer:s}:null);c(ta,this,{map:n,hash:i,transfer:s})}get print(){St("Should not call PrintAnnotationStorage.print")}get serializable(){return h(ta,this)}}var ia=new WeakMap;class sa{constructor(t){let{ownerDocument:e=globalThis.document,styleElement:i=null}=t;r(this,ia,new Set),this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const e=this.styleElement.sheet;e.insertRule(t,e.cssRules.length)}clear(){for(const t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),h(ia,this).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont(t){let{systemFontInfo:e,_inspectFont:i}=t;if(e&&!h(ia,this).has(e.loadedName))if(Mt(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:t,src:s,style:n}=e,a=new FontFace(t,s,n);this.addNativeFontFace(a);try{await a.load(),h(ia,this).add(t),null===i||void 0===i||i(e)}catch{kt("Cannot load system font: ".concat(e.baseFontName,", installing it could help to improve PDF rendering.")),this.removeNativeFontFace(a)}}else St("Not implemented: loadSystemFont without the Font Loading API.")}async bind(t){if(t.attached||t.missingFile&&!t.systemFontInfo)return;if(t.attached=!0,t.systemFontInfo)return void await this.loadSystemFont(t);if(this.isFontLoadingAPISupported){const e=t.createNativeFontFace();if(e){this.addNativeFontFace(e);try{await e.loaded}catch(i){throw kt("Failed to load font '".concat(e.family,"': '").concat(i,"'.")),t.disableFontFace=!0,i}}return}const e=t.createFontFaceRule();if(e){if(this.insertRule(e),this.isSyncFontLoadingSupported)return;await new Promise((e=>{const i=this._queueLoadingCallback(e);this._prepareFontLoadEvent(t,i)}))}}get isFontLoadingAPISupported(){var t;return Rt(this,"isFontLoadingAPISupported",!(null===(t=this._document)||void 0===t||!t.fonts))}get isSyncFontLoadingSupported(){var t;let e=!1;return(S||"undefined"!==typeof navigator&&"string"===typeof(null===(t=navigator)||void 0===t?void 0:t.userAgent)&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),Rt(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(t){const{loadingRequests:e}=this,i={done:!1,complete:function(){for(Mt(!i.done,"completeRequest() cannot be called twice."),i.done=!0;e.length>0&&e[0].done;){const t=e.shift();setTimeout(t.callback,0)}},callback:t};return e.push(i),i}get _loadTestFont(){return Rt(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(t,e){function i(t,e){return t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|255&t.charCodeAt(e+3)}function s(t,e,i,s){return t.substring(0,e)+s+t.substring(e+i)}let n,a;const r=this._document.createElement("canvas");r.width=1,r.height=1;const o=r.getContext("2d");let l=0;const h="lt".concat(Date.now()).concat(this.loadTestFontId++);let c=this._loadTestFont;c=s(c,976,h.length,h);const d=1482184792;let u=i(c,16);for(n=0,a=h.length-3;n>24&255,p>>16&255,p>>8&255,255&p)));const f="url(data:font/opentype;base64,".concat(btoa(c),");"),g='@font-face {font-family:"'.concat(h,'";src:').concat(f,"}");this.insertRule(g);const m=this._document.createElement("div");m.style.visibility="hidden",m.style.width=m.style.height="10px",m.style.position="absolute",m.style.top=m.style.left="0px";for(const v of[t.loadedName,h]){const t=this._document.createElement("span");t.textContent="Hi",t.style.fontFamily=v,m.append(t)}this._document.body.append(m),function t(e,i){if(++l>30)return kt("Load test font never loaded."),void i();o.font="30px "+e,o.fillText(".",0,20),o.getImageData(0,0,1,1).data[3]>0?i():setTimeout(t.bind(null,e,i))}(h,(()=>{m.remove(),e.complete()}))}}class na{constructor(t,e){let{disableFontFace:i=!1,inspectFont:s=null}=e;this.compiledGlyphs=Object.create(null);for(const n in t)this[n]=t[n];this.disableFontFace=!0===i,this._inspectFont=s}createNativeFontFace(){var t;if(!this.data||this.disableFontFace)return null;let e;if(this.cssFontInfo){const t={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(t.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg")),e=new FontFace(this.cssFontInfo.fontFamily,this.data,t)}else e=new FontFace(this.loadedName,this.data,{});return null===(t=this._inspectFont)||void 0===t||t.call(this,this),e}createFontFaceRule(){var t;if(!this.data||this.disableFontFace)return null;const e=Wt(this.data),i="url(data:".concat(this.mimetype,";base64,").concat(btoa(e),");");let s;if(this.cssFontInfo){let t="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(t+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;")),s='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(t,"src:").concat(i,"}")}else s='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(i,"}");return null===(t=this._inspectFont)||void 0===t||t.call(this,this,i),s}getPathGenerator(t,e){if(void 0!==this.compiledGlyphs[e])return this.compiledGlyphs[e];let i;try{i=t.get(this.loadedName+"_path_"+e)}catch(n){kt('getPathGenerator - ignoring character: "'.concat(n,'".'))}if(!Array.isArray(i)||0===i.length)return this.compiledGlyphs[e]=function(t,e){};const s=[];for(let a=0,r=i.length;ai.bezierCurveTo(t,e,n,r,o,l))),a+=6}break;case Jt:{const[t,e]=i.slice(a,a+2);s.push((i=>i.moveTo(t,e))),a+=2}break;case Zt:{const[t,e]=i.slice(a,a+2);s.push((i=>i.lineTo(t,e))),a+=2}break;case $t:{const[t,e,n,r]=i.slice(a,a+4);s.push((i=>i.quadraticCurveTo(t,e,n,r))),a+=4}break;case te:s.push((t=>t.restore()));break;case ee:s.push((t=>t.save()));break;case ie:Mt(2===s.length,"Scale command is only valid at the third position.");break;case se:{const[t,e,n,r,o,l]=i.slice(a,a+6);s.push((i=>i.transform(t,e,n,r,o,l))),a+=6}break;case ne:{const[t,e]=i.slice(a,a+2);s.push((i=>i.translate(t,e))),a+=2}}return this.compiledGlyphs[e]=function(t,e){s[0](t),s[1](t),t.scale(e,-e);for(let i=2,n=s.length;i{const t=await import("fs"),e=await import("http"),i=await import("https"),s=await import("url");return new Map(Object.entries({fs:t,http:e,https:i,url:s,canvas:undefined,path2d:undefined}))})().then((t=>{ra=t,aa.resolve()}),(t=>{kt("loadPackages: ".concat(t)),ra=new Map,aa.resolve()}))}class oa{static get promise(){return aa.promise}static get(t){var e;return null===(e=ra)||void 0===e?void 0:e.get(t)}}const la=function(t){return oa.get("fs").promises.readFile(t).then((t=>new Uint8Array(t)))};const ha="Fill",ca="Stroke",da="Shading";function ua(t,e){if(!e)return;const i=e[2]-e[0],s=e[3]-e[1],n=new Path2D;n.rect(e[0],e[1],i,s),t.clip(n)}class pa{constructor(){this.constructor===pa&&St("Cannot initialize BaseShadingPattern.")}getPattern(){St("Abstract method `getPattern` called.")}}class fa extends pa{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}_createGradient(t){let e;"axial"===this._type?e=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(e=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const i of this._colorStops)e.addColorStop(i[0],i[1]);return e}getPattern(t,e,i,s){let n;if(s===ca||s===ha){const a=e.current.getClippedPathBoundingBox(s,Ke(t))||[0,0,0,0],r=Math.ceil(a[2]-a[0])||1,o=Math.ceil(a[3]-a[1])||1,l=e.cachedCanvases.getCanvas("pattern",r,o,!0),h=l.context;h.clearRect(0,0,h.canvas.width,h.canvas.height),h.beginPath(),h.rect(0,0,h.canvas.width,h.canvas.height),h.translate(-a[0],-a[1]),i=Vt.transform(i,[1,0,0,1,a[0],a[1]]),h.transform(...e.baseTransform),this.matrix&&h.transform(...this.matrix),ua(h,this._bbox),h.fillStyle=this._createGradient(h),h.fill(),n=t.createPattern(l.canvas,"no-repeat");const c=new DOMMatrix(i);n.setTransform(c)}else ua(t,this._bbox),n=this._createGradient(t);return n}}function ga(t,e,i,s,n,a,r,o){const l=e.coords,h=e.colors,c=t.data,d=4*t.width;let u;l[i+1]>l[s+1]&&(u=i,i=s,s=u,u=a,a=r,r=u),l[s+1]>l[n+1]&&(u=s,s=n,n=u,u=r,r=o,o=u),l[i+1]>l[s+1]&&(u=i,i=s,s=u,u=a,a=r,r=u);const p=(l[i]+e.offsetX)*e.scaleX,f=(l[i+1]+e.offsetY)*e.scaleY,g=(l[s]+e.offsetX)*e.scaleX,m=(l[s+1]+e.offsetY)*e.scaleY,v=(l[n]+e.offsetX)*e.scaleX,b=(l[n+1]+e.offsetY)*e.scaleY;if(f>=b)return;const y=h[a],A=h[a+1],w=h[a+2],_=h[r],x=h[r+1],E=h[r+2],k=h[o],S=h[o+1],M=h[o+2],C=Math.round(f),R=Math.round(b);let T,P,L,D,I,F,O,N;for(let W=C;W<=R;W++){if(Wb?1:m===b?0:(m-W)/(m-b),T=g-(g-v)*t,P=_-(_-k)*t,L=x-(x-S)*t,D=E-(E-M)*t}let t;t=Wb?1:(f-W)/(f-b),I=p-(p-v)*t,F=y-(y-k)*t,O=A-(A-S)*t,N=w-(w-M)*t;const e=Math.round(Math.min(T,I)),i=Math.round(Math.max(T,I));let s=d*W+4*e;for(let n=e;n<=i;n++)t=(T-n)/(T-I),t<0?t=0:t>1&&(t=1),c[s++]=P-(P-F)*t|0,c[s++]=L-(L-O)*t|0,c[s++]=D-(D-N)*t|0,c[s++]=255}}function ma(t,e,i){const s=e.coords,n=e.colors;let a,r;switch(e.type){case"lattice":const o=e.verticesPerRow,l=Math.floor(s.length/o)-1,h=o-1;for(a=0;a=s?n=s:i=n/t,{scale:i,size:n}}clipBbox(t,e,i,s,n){const a=s-e,r=n-i;t.ctx.rect(e,i,a,r),t.current.updateRectMinMax(Ke(t.ctx),[e,i,s,n]),t.clip(),t.endPath()}setFillAndStrokeStyleToContext(t,e,i){const s=t.ctx,n=t.current;switch(e){case ya:const t=this.ctx;s.fillStyle=t.fillStyle,s.strokeStyle=t.strokeStyle,n.fillColor=t.fillStyle,n.strokeColor=t.strokeStyle;break;case Aa:const a=Vt.makeHexColor(i[0],i[1],i[2]);s.fillStyle=a,s.strokeStyle=a,n.fillColor=a,n.strokeColor=a;break;default:throw new Ot("Unsupported paint type: ".concat(e))}}getPattern(t,e,i,s){let n=i;s!==da&&(n=Vt.transform(n,e.baseTransform),this.matrix&&(n=Vt.transform(n,this.matrix)));const a=this.createPatternCanvas(e);let r=new DOMMatrix(n);r=r.translate(a.offsetX,a.offsetY),r=r.scale(1/a.scaleX,1/a.scaleY);const o=t.createPattern(a.canvas,"repeat");return o.setTransform(r),o}}function _a(t){let{src:e,srcPos:i=0,dest:s,width:n,height:a,nonBlackColor:r=4294967295,inverseDecode:o=!1}=t;const l=Ht.isLittleEndian?4278190080:255,[h,c]=o?[r,l]:[l,r],d=n>>3,u=7&n,p=e.length;s=new Uint32Array(s.buffer);let f=0;for(let g=0;g0&&void 0!==arguments[0]?arguments[0]:ha,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const i=[this.minX,this.minY,this.maxX,this.maxY];if(t===ca){e||St("Stroke bounding box must include transform.");const t=Vt.singularValueDecompose2dScale(e),s=t[0]*this.lineWidth/2,n=t[1]*this.lineWidth/2;i[0]-=s,i[1]-=n,i[2]+=s,i[3]+=n}return i}updateClipFromPath(){const t=Vt.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(t){this.clipBox=t,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ha,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Vt.intersect(this.clipBox,this.getPathBoundingBox(t,e))}}function Ma(t,e){if("undefined"!==typeof ImageData&&e instanceof ImageData)return void t.putImageData(e,0,0);const i=e.height,s=e.width,n=i%xa,a=(i-n)/xa,r=0===n?a:a+1,o=t.createImageData(s,xa);let l,h=0;const c=e.data,d=o.data;let u,p,f,g;if(e.kind===X.GRAYSCALE_1BPP){const e=c.byteLength,i=new Uint32Array(d.buffer,0,d.byteLength>>2),g=i.length,m=s+7>>3,v=4294967295,b=Ht.isLittleEndian?4278190080:255;for(u=0;um?s:8*t-7,r=-8&a;let o=0,d=0;for(;n>=1}for(;l=a&&(f=n,g=s*f),l=0,p=g;p--;)d[l++]=c[h++],d[l++]=c[h++],d[l++]=c[h++],d[l++]=255;t.putImageData(o,0,u*xa)}}}function Ca(t,e){if(e.bitmap)return void t.drawImage(e.bitmap,0,0);const i=e.height,s=e.width,n=i%xa,a=(i-n)/xa,r=0===n?a:a+1,o=t.createImageData(s,xa);let l=0;const h=e.data,c=o.data;for(let d=0;d1&&void 0!==arguments[1]?arguments[1]:null;return"string"===typeof t?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):e}beginDrawing(t){let{transform:e,viewport:i,transparency:s=!1,background:n=null}=t;const a=this.ctx.canvas.width,r=this.ctx.canvas.height,o=this.ctx.fillStyle;if(this.ctx.fillStyle=n||"#ffffff",this.ctx.fillRect(0,0,a,r),this.ctx.fillStyle=o,s){const t=this.cachedCanvases.getCanvas("transparent",a,r);this.compositeCtx=this.ctx,this.transparentCanvas=t.canvas,this.ctx=t.context,this.ctx.save(),this.ctx.transform(...Ke(this.compositeCtx))}this.ctx.save(),Ta(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...i.transform),this.viewportScale=i.scale,this.baseTransform=Ke(this.ctx)}executeOperatorList(t,e,i,s){const n=t.argsArray,a=t.fnArray;let r=e||0;const o=n.length;if(o===r)return r;const l=o-r>10&&"function"===typeof i,h=l?Date.now()+15:0;let c=0;const d=this.commonObjs,u=this.objs;let p;for(;;){if(void 0!==s&&r===s.nextBreakPoint)return s.breakIt(r,i),r;if(p=a[r],p!==yt.dependency)this[p].apply(this,n[r]);else for(const t of n[r]){const e=t.startsWith("g_")?d:u;if(!e.has(t))return e.get(t,i),r}if(r++,r===o)return r;if(l&&++c>10){if(Date.now()>h)return i(),r;c=0}}}endDrawing(){o(Oa,this,Wa).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const t of this._cachedBitmapsMap.values()){for(const e of t.values())"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement&&(e.width=e.height=0);t.clear()}this._cachedBitmapsMap.clear(),o(Oa,this,ja).call(this)}_scaleImage(t,e){const i=t.width,s=t.height;let n,a,r=Math.max(Math.hypot(e[0],e[1]),1),o=Math.max(Math.hypot(e[2],e[3]),1),l=i,h=s,c="prescale1";for(;r>2&&l>1||o>2&&h>1;){let e=l,i=h;r>2&&l>1&&(e=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l/2),r/=l/e),o>2&&h>1&&(i=h>=16384?Math.floor(h/2)-1||1:Math.ceil(h)/2,o/=h/i),n=this.cachedCanvases.getCanvas(c,e,i),a=n.context,a.clearRect(0,0,e,i),a.drawImage(t,0,0,l,h,0,0,e,i),t=n.canvas,l=e,h=i,c="prescale1"===c?"prescale2":"prescale1"}return{img:t,paintWidth:l,paintHeight:h}}_createMaskCanvas(t){const e=this.ctx,{width:i,height:s}=t,n=this.current.fillColor,a=this.current.patternFill,r=Ke(e);let o,l,h,c;if((t.bitmap||t.data)&&t.count>1){const e=t.bitmap||t.data.buffer;l=JSON.stringify(a?r:[r.slice(0,4),n]),o=this._cachedBitmapsMap.get(e),o||(o=new Map,this._cachedBitmapsMap.set(e,o));const i=o.get(l);if(i&&!a){return{canvas:i,offsetX:Math.round(Math.min(r[0],r[2])+r[4]),offsetY:Math.round(Math.min(r[1],r[3])+r[5])}}h=i}h||(c=this.cachedCanvases.getCanvas("maskCanvas",i,s),Ca(c.context,t));let d=Vt.transform(r,[1/i,0,0,-1/s,0,0]);d=Vt.transform(d,[1,0,0,1,0,-s]);const[u,p,f,g]=Vt.getAxialAlignedBoundingBox([0,0,i,s],d),m=Math.round(f-u)||1,v=Math.round(g-p)||1,b=this.cachedCanvases.getCanvas("fillCanvas",m,v),y=b.context,A=u,w=p;y.translate(-A,-w),y.transform(...d),h||(h=this._scaleImage(c.canvas,Ye(y)),h=h.img,o&&a&&o.set(l,h)),y.imageSmoothingEnabled=Pa(Ke(y),t.interpolate),ka(y,h,0,0,h.width,h.height,0,0,i,s),y.globalCompositeOperation="source-in";const _=Vt.transform(Ye(y),[1,0,0,1,-A,-w]);return y.fillStyle=a?n.getPattern(e,this,_,ha):n,y.fillRect(0,0,i,s),o&&!a&&(this.cachedCanvases.delete("fillCanvas"),o.set(l,b.canvas)),{canvas:b.canvas,offsetX:Math.round(A),offsetY:Math.round(w)}}setLineWidth(t){t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=t,this.ctx.lineWidth=t}setLineCap(t){this.ctx.lineCap=La[t]}setLineJoin(t){this.ctx.lineJoin=Da[t]}setMiterLimit(t){this.ctx.miterLimit=t}setDash(t,e){const i=this.ctx;void 0!==i.setLineDash&&(i.setLineDash(t),i.lineDashOffset=e)}setRenderingIntent(t){}setFlatness(t){}setGState(t){for(const[e,i]of t)switch(e){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i[0],i[1]);break;case"CA":this.current.strokeAlpha=i;break;case"ca":this.current.fillAlpha=i,this.ctx.globalAlpha=i;break;case"BM":this.ctx.globalCompositeOperation=i;break;case"SMask":this.current.activeSMask=i?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(i)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const t=this.ctx.canvas.width,e=this.ctx.canvas.height,i="smaskGroupAt"+this.groupLevel,s=this.cachedCanvases.getCanvas(i,t,e);this.suspendedCtx=this.ctx,this.ctx=s.context;const n=this.ctx;n.setTransform(...Ke(this.suspendedCtx)),Ra(this.suspendedCtx,n),function(t,e){if(t._removeMirroring)throw new Error("Context is already forwarding operations.");t.__originalSave=t.save,t.__originalRestore=t.restore,t.__originalRotate=t.rotate,t.__originalScale=t.scale,t.__originalTranslate=t.translate,t.__originalTransform=t.transform,t.__originalSetTransform=t.setTransform,t.__originalResetTransform=t.resetTransform,t.__originalClip=t.clip,t.__originalMoveTo=t.moveTo,t.__originalLineTo=t.lineTo,t.__originalBezierCurveTo=t.bezierCurveTo,t.__originalRect=t.rect,t.__originalClosePath=t.closePath,t.__originalBeginPath=t.beginPath,t._removeMirroring=()=>{t.save=t.__originalSave,t.restore=t.__originalRestore,t.rotate=t.__originalRotate,t.scale=t.__originalScale,t.translate=t.__originalTranslate,t.transform=t.__originalTransform,t.setTransform=t.__originalSetTransform,t.resetTransform=t.__originalResetTransform,t.clip=t.__originalClip,t.moveTo=t.__originalMoveTo,t.lineTo=t.__originalLineTo,t.bezierCurveTo=t.__originalBezierCurveTo,t.rect=t.__originalRect,t.closePath=t.__originalClosePath,t.beginPath=t.__originalBeginPath,delete t._removeMirroring},t.save=function(){e.save(),this.__originalSave()},t.restore=function(){e.restore(),this.__originalRestore()},t.translate=function(t,i){e.translate(t,i),this.__originalTranslate(t,i)},t.scale=function(t,i){e.scale(t,i),this.__originalScale(t,i)},t.transform=function(t,i,s,n,a,r){e.transform(t,i,s,n,a,r),this.__originalTransform(t,i,s,n,a,r)},t.setTransform=function(t,i,s,n,a,r){e.setTransform(t,i,s,n,a,r),this.__originalSetTransform(t,i,s,n,a,r)},t.resetTransform=function(){e.resetTransform(),this.__originalResetTransform()},t.rotate=function(t){e.rotate(t),this.__originalRotate(t)},t.clip=function(t){e.clip(t),this.__originalClip(t)},t.moveTo=function(t,i){e.moveTo(t,i),this.__originalMoveTo(t,i)},t.lineTo=function(t,i){e.lineTo(t,i),this.__originalLineTo(t,i)},t.bezierCurveTo=function(t,i,s,n,a,r){e.bezierCurveTo(t,i,s,n,a,r),this.__originalBezierCurveTo(t,i,s,n,a,r)},t.rect=function(t,i,s,n){e.rect(t,i,s,n),this.__originalRect(t,i,s,n)},t.closePath=function(){e.closePath(),this.__originalClosePath()},t.beginPath=function(){e.beginPath(),this.__originalBeginPath()}}(n,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),Ra(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(t){if(!this.current.activeSMask)return;t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const e=this.current.activeSMask,i=this.suspendedCtx;this.composeSMask(i,e,this.ctx,t),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(t,e,i,s){const n=s[0],a=s[1],r=s[2]-n,o=s[3]-a;0!==r&&0!==o&&(this.genericComposeSMask(e.context,i,r,o,e.subtype,e.backdrop,e.transferMap,n,a,e.offsetX,e.offsetY),t.save(),t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(i.canvas,0,0),t.restore())}genericComposeSMask(t,e,i,s,n,a,r,o,l,h,c){let d=t.canvas,u=o-h,p=l-c;if(a)if(u<0||p<0||u+i>d.width||p+s>d.height){const t=this.cachedCanvases.getCanvas("maskExtension",i,s),e=t.context;e.drawImage(d,-u,-p),a.some((t=>0!==t))&&(e.globalCompositeOperation="destination-atop",e.fillStyle=Vt.makeHexColor(...a),e.fillRect(0,0,i,s),e.globalCompositeOperation="source-over"),d=t.canvas,u=p=0}else if(a.some((t=>0!==t))){t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0);const e=new Path2D;e.rect(u,p,i,s),t.clip(e),t.globalCompositeOperation="destination-atop",t.fillStyle=Vt.makeHexColor(...a),t.fillRect(u,p,i,s),t.restore()}e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0),"Alpha"===n&&r?e.filter=this.filterFactory.addAlphaFilter(r):"Luminosity"===n&&(e.filter=this.filterFactory.addLuminosityFilter(r));const f=new Path2D;f.rect(o,l,i,s),e.clip(f),e.globalCompositeOperation="destination-in",e.drawImage(d,u,p,i,s,o,l,i,s),e.restore()}save(){this.inSMaskMode?(Ra(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const t=this.current;this.stateStack.push(t),this.current=t.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),Ra(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(t,e,i,s,n,a){this.ctx.transform(t,e,i,s,n,a),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(t,e,i){const s=this.ctx,n=this.current;let a,r,o=n.x,l=n.y;const h=Ke(s),c=0===h[0]&&0===h[3]||0===h[1]&&0===h[2],d=c?i.slice(0):null;for(let u=0,p=0,f=t.length;u0&&void 0!==arguments[0])||arguments[0];const e=this.ctx,i=this.current.strokeColor;e.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"===typeof i&&null!==i&&void 0!==i&&i.getPattern?(e.save(),e.strokeStyle=i.getPattern(e,this,Ye(e),ca),this.rescaleAndStroke(!1),e.restore()):this.rescaleAndStroke(!0)),t&&this.consumePath(this.current.getClippedPathBoundingBox()),e.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const e=this.ctx,i=this.current.fillColor;let s=!1;this.current.patternFill&&(e.save(),e.fillStyle=i.getPattern(e,this,Ye(e),ha),s=!0);const n=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==n&&(this.pendingEOFill?(e.fill("evenodd"),this.pendingEOFill=!1):e.fill()),s&&e.restore(),t&&this.consumePath(n)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=Ia}eoClip(){this.pendingClip=Fa}beginText(){this.current.textMatrix=M,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const t=this.pendingTextPaths,e=this.ctx;if(void 0!==t){e.save(),e.beginPath();for(const i of t)e.setTransform(...i.transform),e.translate(i.x,i.y),i.addToPath(e,i.fontSize);e.restore(),e.clip(),e.beginPath(),delete this.pendingTextPaths}else e.beginPath()}setCharSpacing(t){this.current.charSpacing=t}setWordSpacing(t){this.current.wordSpacing=t}setHScale(t){this.current.textHScale=t/100}setLeading(t){this.current.leading=-t}setFont(t,e){var i;const s=this.commonObjs.get(t),n=this.current;if(!s)throw new Error("Can't find font for ".concat(t));if(n.fontMatrix=s.fontMatrix||C,0!==n.fontMatrix[0]&&0!==n.fontMatrix[3]||kt("Invalid font matrix for font "+t),e<0?(e=-e,n.fontDirection=-1):n.fontDirection=1,this.current.font=s,this.current.fontSize=e,s.isType3Font)return;const a=s.loadedName||"sans-serif",r=(null===(i=s.systemFontInfo)||void 0===i?void 0:i.css)||'"'.concat(a,'", ').concat(s.fallbackName);let o="normal";s.black?o="900":s.bold&&(o="bold");const l=s.italic?"italic":"normal";let h=e;e<16?h=16:e>100&&(h=100),this.current.fontSizeScale=e/h,this.ctx.font="".concat(l," ").concat(o," ").concat(h,"px ").concat(r)}setTextRenderingMode(t){this.current.textRenderingMode=t}setTextRise(t){this.current.textRise=t}moveText(t,e){this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=e}setLeadingMoveText(t,e){this.setLeading(-e),this.moveText(t,e)}setTextMatrix(t,e,i,s,n,a){this.current.textMatrix=[t,e,i,s,n,a],this.current.textMatrixScale=Math.hypot(t,e),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(t,e,i,s){const n=this.ctx,a=this.current,r=a.font,o=a.textRenderingMode,l=a.fontSize/a.fontSizeScale,h=o&U,c=!!(o&q),d=a.patternFill&&!r.missingFile;let u;if((r.disableFontFace||c||d)&&(u=r.getPathGenerator(this.commonObjs,t)),r.disableFontFace||d?(n.save(),n.translate(e,i),n.beginPath(),u(n,l),s&&n.setTransform(...s),h!==H&&h!==V||n.fill(),h!==z&&h!==V||n.stroke(),n.restore()):(h!==H&&h!==V||n.fillText(t,e,i),h!==z&&h!==V||n.strokeText(t,e,i)),c){(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:Ke(n),x:e,y:i,fontSize:l,addToPath:u})}}get isFontSubpixelAAEnabled(){const{context:t}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);t.scale(1.5,1),t.fillText("I",0,10);const e=t.getImageData(0,0,10,10).data;let i=!1;for(let s=3;s0&&e[s]<255){i=!0;break}return Rt(this,"isFontSubpixelAAEnabled",i)}showText(t){const e=this.current,i=e.font;if(i.isType3Font)return this.showType3Text(t);const s=e.fontSize;if(0===s)return;const n=this.ctx,a=e.fontSizeScale,r=e.charSpacing,o=e.wordSpacing,l=e.fontDirection,h=e.textHScale*l,c=t.length,d=i.vertical,u=d?1:-1,p=i.defaultVMetrics,f=s*e.fontMatrix[0],g=e.textRenderingMode===H&&!i.disableFontFace&&!e.patternFill;let m;if(n.save(),n.transform(...e.textMatrix),n.translate(e.x,e.y+e.textRise),l>0?n.scale(h,-1):n.scale(h,1),e.patternFill){n.save();const t=e.fillColor.getPattern(n,this,Ye(n),ha);m=Ke(n),n.restore(),n.fillStyle=t}let v=e.lineWidth;const b=e.textMatrixScale;if(0===b||0===v){const t=e.textRenderingMode&U;t!==z&&t!==V||(v=this.getSinglePixelWidth())}else v/=b;if(1!==a&&(n.scale(a,a),v/=a),n.lineWidth=v,i.isInvalidPDFjsFont){const i=[];let s=0;for(const e of t)i.push(e.unicode),s+=e.width;return n.fillText(i.join(""),0,0),e.x+=s*f*h,n.restore(),void this.compose()}let y,A=0;for(y=0;y0){const t=1e3*n.measureText(v).width/s*a;if(xnew Na(t,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};e=new wa(t,i,this.ctx,n,s)}else e=this._getPattern(t[1],t[2]);return e}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(t,e,i){const s=Vt.makeHexColor(t,e,i);this.ctx.strokeStyle=s,this.current.strokeColor=s}setFillRGBColor(t,e,i){const s=Vt.makeHexColor(t,e,i);this.ctx.fillStyle=s,this.current.fillColor=s,this.current.patternFill=!1}_getPattern(t){let e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.cachedPatterns.has(t)?e=this.cachedPatterns.get(t):(e=function(t){switch(t[0]){case"RadialAxial":return new fa(t);case"Mesh":return new va(t);case"Dummy":return new ba}throw new Error("Unknown IR type: ".concat(t[0]))}(this.getObject(t)),this.cachedPatterns.set(t,e)),i&&(e.matrix=i),e}shadingFill(t){if(!this.contentVisible)return;const e=this.ctx;this.save();const i=this._getPattern(t);e.fillStyle=i.getPattern(e,this,Ye(e),da);const s=Ye(e);if(s){const{width:t,height:i}=e.canvas,[n,a,r,o]=Vt.getAxialAlignedBoundingBox([0,0,t,i],s);this.ctx.fillRect(n,a,r-n,o-a)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){St("Should not call beginInlineImage")}beginImageData(){St("Should not call beginImageData")}paintFormXObjectBegin(t,e){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),t&&this.transform(...t),this.baseTransform=Ke(this.ctx),e)){const t=e[2]-e[0],i=e[3]-e[1];this.ctx.rect(e[0],e[1],t,i),this.current.updateRectMinMax(Ke(this.ctx),e),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(t){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const e=this.ctx;t.isolated||Et("TODO: Support non-isolated groups."),t.knockout&&kt("Knockout groups not supported.");const i=Ke(e);if(t.matrix&&e.transform(...t.matrix),!t.bbox)throw new Error("Bounding box is required.");let s=Vt.getAxialAlignedBoundingBox(t.bbox,Ke(e));const n=[0,0,e.canvas.width,e.canvas.height];s=Vt.intersect(s,n)||[0,0,0,0];const a=Math.floor(s[0]),r=Math.floor(s[1]),o=Math.max(Math.ceil(s[2])-a,1),l=Math.max(Math.ceil(s[3])-r,1);this.current.startNewPathAndClipBox([0,0,o,l]);let h="groupAt"+this.groupLevel;t.smask&&(h+="_smask_"+this.smaskCounter++%2);const c=this.cachedCanvases.getCanvas(h,o,l),d=c.context;d.translate(-a,-r),d.transform(...i),t.smask?this.smaskStack.push({canvas:c.canvas,context:d,offsetX:a,offsetY:r,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null}):(e.setTransform(1,0,0,1,0,0),e.translate(a,r),e.save()),Ra(e,d),this.ctx=d,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(e),this.groupLevel++}endGroup(t){if(!this.contentVisible)return;this.groupLevel--;const e=this.ctx,i=this.groupStack.pop();if(this.ctx=i,this.ctx.imageSmoothingEnabled=!1,t.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const t=Ke(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...t);const i=Vt.getAxialAlignedBoundingBox([0,0,e.canvas.width,e.canvas.height],t);this.ctx.drawImage(e.canvas,0,0),this.ctx.restore(),this.compose(i)}}beginAnnotation(t,e,i,s,n){if(o(Oa,this,Wa).call(this),Ta(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),e){const s=e[2]-e[0],a=e[3]-e[1];if(n&&this.annotationCanvasMap){(i=i.slice())[4]-=e[0],i[5]-=e[1],(e=e.slice())[0]=e[1]=0,e[2]=s,e[3]=a;const[n,r]=Vt.singularValueDecompose2dScale(Ke(this.ctx)),{viewportScale:o}=this,l=Math.ceil(s*this.outputScaleX*o),h=Math.ceil(a*this.outputScaleY*o);this.annotationCanvas=this.canvasFactory.create(l,h);const{canvas:c,context:d}=this.annotationCanvas;this.annotationCanvasMap.set(t,c),this.annotationCanvas.savedCtx=this.ctx,this.ctx=d,this.ctx.save(),this.ctx.setTransform(n,0,0,-r,0,a*r),Ta(this.ctx)}else Ta(this.ctx),this.ctx.rect(e[0],e[1],s,a),this.ctx.clip(),this.endPath()}this.current=new Sa(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...i),this.transform(...s)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),o(Oa,this,ja).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(t){if(!this.contentVisible)return;const e=t.count;(t=this.getObject(t.data,t)).count=e;const i=this.ctx,s=this.processingType3;if(s&&(void 0===s.compiled&&(s.compiled=function(t){const{width:e,height:i}=t;if(e>1e3||i>1e3)return null;const s=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),n=e+1;let a,r,o,l=new Uint8Array(n*(i+1));const h=e+7&-8;let c=new Uint8Array(h*i),d=0;for(const g of t.data){let t=128;for(;t>0;)c[d++]=g&t?0:255,t>>=1}let u=0;for(d=0,0!==c[d]&&(l[0]=1,++u),r=1;r>2)+(c[d+1]?4:0)+(c[d-h+1]?8:0),s[t]&&(l[o+r]=s[t],++u),d++;if(c[d-h]!==c[d]&&(l[o+r]=c[d]?2:4,++u),u>1e3)return null}for(d=h*(i-1),o=a*n,0!==c[d]&&(l[o]=8,++u),r=1;r1e3)return null;const p=new Int32Array([0,n,-1,0,-n,0,0,0,1]),f=new Path2D;for(a=0;u&&a<=i;a++){let t=a*n;const i=t+e;for(;t>4,l[t]&=r>>2|r<<2),f.lineTo(t%n,t/n|0),l[t]||--u}while(s!==t);--a}return c=null,l=null,function(t){t.save(),t.scale(1/e,-1/i),t.translate(0,-i),t.fill(f),t.beginPath(),t.restore()}}(t)),s.compiled))return void s.compiled(i);const n=this._createMaskCanvas(t),a=n.canvas;i.save(),i.setTransform(1,0,0,1,0,0),i.drawImage(a,n.offsetX,n.offsetY),i.restore(),this.compose()}paintImageMaskXObjectRepeat(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;if(!this.contentVisible)return;t=this.getObject(t.data,t);const r=this.ctx;r.save();const o=Ke(r);r.transform(e,i,s,n,0,0);const l=this._createMaskCanvas(t);r.setTransform(1,0,0,1,l.offsetX-o[4],l.offsetY-o[5]);for(let h=0,c=a.length;he?h/e:1,r=l>e?l/e:1}}this._cachedScaleForStroking[0]=a,this._cachedScaleForStroking[1]=r}return this._cachedScaleForStroking}rescaleAndStroke(t){const{ctx:e}=this,{lineWidth:i}=this.current,[s,n]=this.getScaleForStroking();if(e.lineWidth=i||1,1===s&&1===n)return void e.stroke();const a=e.getLineDash();if(t&&e.save(),e.scale(s,n),a.length>0){const t=Math.max(s,n);e.setLineDash(a.map((e=>e/t))),e.lineDashOffset/=t}e.stroke(),t&&e.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}}function Wa(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}function ja(){if(this.pageColors){const t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==t){const e=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=e}}}for(const sf in yt)void 0!==Na.prototype[sf]&&(Na.prototype[yt[sf]]=Na.prototype[sf]);class Ba{static get workerPort(){return o(Ba,this,Ha)._}static set workerPort(t){if(!("undefined"!==typeof Worker&&t instanceof Worker)&&null!==t)throw new Error("Invalid `workerPort` type.");Ha._=o(Ba,this,t)}static get workerSrc(){return o(Ba,this,za)._}static set workerSrc(t){if("string"!==typeof t)throw new Error("Invalid `workerSrc` type.");za._=o(Ba,this,t)}}var Ha={_:null},za={_:""};const Va=1,Ga=2,Ua=1,qa=2,Xa=3,Ka=4,Ya=5,Qa=6,Ja=7,Za=8;function $a(t){switch(t instanceof Error||"object"===typeof t&&null!==t||St('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),t.name){case"AbortException":return new Nt(t.message);case"MissingPDFException":return new It(t.message);case"PasswordException":return new Pt(t.message,t.code);case"UnexpectedResponseException":return new Ft(t.message,t.status);case"UnknownErrorException":return new Lt(t.message,t.details);default:return new Lt(t.message,t.toString())}}var tr=new WeakSet;class er{constructor(t,e,i){a(this,tr),this.sourceName=t,this.targetName=e,this.comObj=i,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=t=>{const e=t.data;if(e.targetName!==this.sourceName)return;if(e.stream)return void o(tr,this,sr).call(this,e);if(e.callback){const t=e.callbackId,i=this.callbackCapabilities[t];if(!i)throw new Error("Cannot resolve callback ".concat(t));if(delete this.callbackCapabilities[t],e.callback===Va)i.resolve(e.data);else{if(e.callback!==Ga)throw new Error("Unexpected callback case");i.reject($a(e.reason))}return}const s=this.actionHandler[e.action];if(!s)throw new Error("Unknown action from worker: ".concat(e.action));if(e.callbackId){const t=this.sourceName,n=e.sourceName;new Promise((function(t){t(s(e.data))})).then((function(s){i.postMessage({sourceName:t,targetName:n,callback:Va,callbackId:e.callbackId,data:s})}),(function(s){i.postMessage({sourceName:t,targetName:n,callback:Ga,callbackId:e.callbackId,reason:$a(s)})}))}else e.streamId?o(tr,this,ir).call(this,e):s(e.data)},i.addEventListener("message",this._onComObjOnMessage)}on(t,e){const i=this.actionHandler;if(i[t])throw new Error('There is already an actionName called "'.concat(t,'"'));i[t]=e}send(t,e,i){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:e},i)}sendWithPromise(t,e,i){const s=this.callbackId++,n=Promise.withResolvers();this.callbackCapabilities[s]=n;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:s,data:e},i)}catch(a){n.reject(a)}return n.promise}sendWithStream(t,e,i,s){const n=this.streamId++,a=this.sourceName,r=this.targetName,o=this.comObj;return new ReadableStream({start:i=>{const l=Promise.withResolvers();return this.streamControllers[n]={controller:i,startCall:l,pullCall:null,cancelCall:null,isClosed:!1},o.postMessage({sourceName:a,targetName:r,action:t,streamId:n,data:e,desiredSize:i.desiredSize},s),l.promise},pull:t=>{const e=Promise.withResolvers();return this.streamControllers[n].pullCall=e,o.postMessage({sourceName:a,targetName:r,stream:Qa,streamId:n,desiredSize:t.desiredSize}),e.promise},cancel:t=>{Mt(t instanceof Error,"cancel must have a valid reason");const e=Promise.withResolvers();return this.streamControllers[n].cancelCall=e,this.streamControllers[n].isClosed=!0,o.postMessage({sourceName:a,targetName:r,stream:Ua,streamId:n,reason:$a(t)}),e.promise}},i)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}function ir(t){const e=t.streamId,i=this.sourceName,s=t.sourceName,n=this.comObj,a=this,r=this.actionHandler[t.action],o={enqueue(t){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0;if(this.isCancelled)return;const o=this.desiredSize;this.desiredSize-=a,o>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),n.postMessage({sourceName:i,targetName:s,stream:Ka,streamId:e,chunk:t},r)},close(){this.isCancelled||(this.isCancelled=!0,n.postMessage({sourceName:i,targetName:s,stream:Xa,streamId:e}),delete a.streamSinks[e])},error(t){Mt(t instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,n.postMessage({sourceName:i,targetName:s,stream:Ya,streamId:e,reason:$a(t)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};o.sinkCapability.resolve(),o.ready=o.sinkCapability.promise,this.streamSinks[e]=o,new Promise((function(e){e(r(t.data,o))})).then((function(){n.postMessage({sourceName:i,targetName:s,stream:Za,streamId:e,success:!0})}),(function(t){n.postMessage({sourceName:i,targetName:s,stream:Za,streamId:e,reason:$a(t)})}))}function sr(t){const e=t.streamId,i=this.sourceName,s=t.sourceName,n=this.comObj,a=this.streamControllers[e],r=this.streamSinks[e];switch(t.stream){case Za:t.success?a.startCall.resolve():a.startCall.reject($a(t.reason));break;case Ja:t.success?a.pullCall.resolve():a.pullCall.reject($a(t.reason));break;case Qa:if(!r){n.postMessage({sourceName:i,targetName:s,stream:Ja,streamId:e,success:!0});break}r.desiredSize<=0&&t.desiredSize>0&&r.sinkCapability.resolve(),r.desiredSize=t.desiredSize,new Promise((function(t){var e;t(null===(e=r.onPull)||void 0===e?void 0:e.call(r))})).then((function(){n.postMessage({sourceName:i,targetName:s,stream:Ja,streamId:e,success:!0})}),(function(t){n.postMessage({sourceName:i,targetName:s,stream:Ja,streamId:e,reason:$a(t)})}));break;case Ka:if(Mt(a,"enqueue should have stream controller"),a.isClosed)break;a.controller.enqueue(t.chunk);break;case Xa:if(Mt(a,"close should have stream controller"),a.isClosed)break;a.isClosed=!0,a.controller.close(),o(tr,this,nr).call(this,a,e);break;case Ya:Mt(a,"error should have stream controller"),a.controller.error($a(t.reason)),o(tr,this,nr).call(this,a,e);break;case qa:t.success?a.cancelCall.resolve():a.cancelCall.reject($a(t.reason)),o(tr,this,nr).call(this,a,e);break;case Ua:if(!r)break;new Promise((function(e){var i;e(null===(i=r.onCancel)||void 0===i?void 0:i.call(r,$a(t.reason)))})).then((function(){n.postMessage({sourceName:i,targetName:s,stream:qa,streamId:e,success:!0})}),(function(t){n.postMessage({sourceName:i,targetName:s,stream:qa,streamId:e,reason:$a(t)})})),r.sinkCapability.reject($a(t.reason)),r.isCancelled=!0,delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}}async function nr(t,e){var i,s,n;await Promise.allSettled([null===(i=t.startCall)||void 0===i?void 0:i.promise,null===(s=t.pullCall)||void 0===s?void 0:s.promise,null===(n=t.cancelCall)||void 0===n?void 0:n.promise]),delete this.streamControllers[e]}var ar=new WeakMap,rr=new WeakMap;class or{constructor(t){let{parsedData:e,rawData:i}=t;r(this,ar,void 0),r(this,rr,void 0),c(ar,this,e),c(rr,this,i)}getRaw(){return h(rr,this)}get(t){var e;return null!==(e=h(ar,this).get(t))&&void 0!==e?e:null}getAll(){return Bt(h(ar,this))}has(t){return h(ar,this).has(t)}}const lr=Symbol("INTERNAL");var hr=new WeakMap,cr=new WeakMap,dr=new WeakMap,ur=new WeakMap;class pr{constructor(t,e){let{name:i,intent:s,usage:n}=e;r(this,hr,!1),r(this,cr,!1),r(this,dr,!1),r(this,ur,!0),c(hr,this,!!(t&P)),c(cr,this,!!(t&L)),this.name=i,this.intent=s,this.usage=n}get visible(){if(h(dr,this))return h(ur,this);if(!h(ur,this))return!1;const{print:t,view:e}=this.usage;return h(hr,this)?"OFF"!==(null===e||void 0===e?void 0:e.viewState):!h(cr,this)||"OFF"!==(null===t||void 0===t?void 0:t.printState)}_setVisible(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t!==lr&&St("Internal method `_setVisible` called."),c(dr,this,i),c(ur,this,e)}}var fr=new WeakMap,gr=new WeakMap,mr=new WeakMap,vr=new WeakMap,br=new WeakSet;class yr{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:P;if(a(this,br),r(this,fr,null),r(this,gr,new Map),r(this,mr,null),r(this,vr,null),this.renderingIntent=e,this.name=null,this.creator=null,null!==t){this.name=t.name,this.creator=t.creator,c(vr,this,t.order);for(const i of t.groups)h(gr,this).set(i.id,new pr(e,i));if("OFF"===t.baseState)for(const t of h(gr,this).values())t._setVisible(lr,!1);for(const e of t.on)h(gr,this).get(e)._setVisible(lr,!0);for(const e of t.off)h(gr,this).get(e)._setVisible(lr,!1);c(mr,this,this.getHash())}}isVisible(t){if(0===h(gr,this).size)return!0;if(!t)return Et("Optional content group not defined."),!0;if("OCG"===t.type)return h(gr,this).has(t.id)?h(gr,this).get(t.id).visible:(kt("Optional content group not found: ".concat(t.id)),!0);if("OCMD"===t.type){if(t.expression)return o(br,this,Ar).call(this,t.expression);if(!t.policy||"AnyOn"===t.policy){for(const e of t.ids){if(!h(gr,this).has(e))return kt("Optional content group not found: ".concat(e)),!0;if(h(gr,this).get(e).visible)return!0}return!1}if("AllOn"===t.policy){for(const e of t.ids){if(!h(gr,this).has(e))return kt("Optional content group not found: ".concat(e)),!0;if(!h(gr,this).get(e).visible)return!1}return!0}if("AnyOff"===t.policy){for(const e of t.ids){if(!h(gr,this).has(e))return kt("Optional content group not found: ".concat(e)),!0;if(!h(gr,this).get(e).visible)return!0}return!1}if("AllOff"===t.policy){for(const e of t.ids){if(!h(gr,this).has(e))return kt("Optional content group not found: ".concat(e)),!0;if(h(gr,this).get(e).visible)return!1}return!0}return kt("Unknown optional content policy ".concat(t.policy,".")),!0}return kt("Unknown group type ".concat(t.type,".")),!0}setVisibility(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const i=h(gr,this).get(t);i?(i._setVisible(lr,!!e,!0),c(fr,this,null)):kt("Optional content group not found: ".concat(t))}setOCGState(t){let e,{state:i,preserveRB:s}=t;for(const n of i){switch(n){case"ON":case"OFF":case"Toggle":e=n;continue}const t=h(gr,this).get(n);if(t)switch(e){case"ON":t._setVisible(lr,!0);break;case"OFF":t._setVisible(lr,!1);break;case"Toggle":t._setVisible(lr,!t.visible)}}c(fr,this,null)}get hasInitialVisibility(){return null===h(mr,this)||this.getHash()===h(mr,this)}getOrder(){return h(gr,this).size?h(vr,this)?h(vr,this).slice():[...h(gr,this).keys()]:null}getGroups(){return h(gr,this).size>0?Bt(h(gr,this)):null}getGroup(t){return h(gr,this).get(t)||null}getHash(){if(null!==h(fr,this))return h(fr,this);const t=new Xn;for(const[e,i]of h(gr,this))t.update("".concat(e,":").concat(i.visible));return c(fr,this,t.hexdigest())}}function Ar(t){const e=t.length;if(e<2)return!0;const i=t[0];for(let s=1;s0){const t=a instanceof Uint8Array&&a.byteLength===a.buffer.byteLength?a.buffer:new Uint8Array(a).buffer;this._queuedChunks.push(t)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!s,this._isRangeSupported=!i,this._contentLength=n,this._fullRequestReader=null,this._rangeReaders=[],t.addRangeListener(((t,e)=>{this._onReceiveData({begin:t,chunk:e})})),t.addProgressListener(((t,e)=>{this._onProgress({loaded:t,total:e})})),t.addProgressiveReadListener((t=>{this._onReceiveData({chunk:t})})),t.addProgressiveDoneListener((()=>{this._onProgressiveDone()})),t.transportReady()}_onReceiveData(t){let{begin:e,chunk:i}=t;const s=i instanceof Uint8Array&&i.byteLength===i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer;if(void 0===e)this._fullRequestReader?this._fullRequestReader._enqueue(s):this._queuedChunks.push(s);else{Mt(this._rangeReaders.some((function(t){return t._begin===e&&(t._enqueue(s),!0)})),"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var t,e;return null!==(t=null===(e=this._fullRequestReader)||void 0===e?void 0:e._loaded)&&void 0!==t?t:0}_onProgress(t){var e,i,s,n;void 0===t.total?null===(e=this._rangeReaders[0])||void 0===e||null===(i=e.onProgress)||void 0===i||i.call(e,{loaded:t.loaded}):null===(s=this._fullRequestReader)||void 0===s||null===(n=s.onProgress)||void 0===n||n.call(s,{loaded:t.loaded,total:t.total})}_onProgressiveDone(){var t;null===(t=this._fullRequestReader)||void 0===t||t.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(t){const e=this._rangeReaders.indexOf(t);e>=0&&this._rangeReaders.splice(e,1)}getFullReader(){Mt(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const t=this._queuedChunks;return this._queuedChunks=null,new _r(this,t,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const i=new xr(this,t,e);return this._pdfDataRangeTransport.requestDataRange(t,e),this._rangeReaders.push(i),i}cancelAllRequests(t){var e;null===(e=this._fullRequestReader)||void 0===e||e.cancel(t);for(const i of this._rangeReaders.slice(0))i.cancel(t);this._pdfDataRangeTransport.abort()}}class _r{constructor(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this._stream=t,this._done=i||!1,this._filename=Ne(s)?s:null,this._queuedChunks=e||[],this._loaded=0;for(const n of this._queuedChunks)this._loaded+=n.byteLength;this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}_enqueue(t){if(!this._done){if(this._requests.length>0){this._requests.shift().resolve({value:t,done:!1})}else this._queuedChunks.push(t);this._loaded+=t.byteLength}}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0){return{value:this._queuedChunks.shift(),done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class xr{constructor(t,e,i){this._stream=t,this._begin=e,this._end=i,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(t){if(!this._done){if(0===this._requests.length)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function Er(t){let{getResponseHeader:e,isHttp:i,rangeChunkSize:s,disableRange:n}=t;const a={allowRangeRequests:!1,suggestedLength:void 0},r=parseInt(e("Content-Length"),10);if(!Number.isInteger(r))return a;if(a.suggestedLength=r,r<=2*s)return a;if(n||!i)return a;if("bytes"!==e("Accept-Ranges"))return a;return"identity"!==(e("Content-Encoding")||"identity")||(a.allowRangeRequests=!0),a}function kr(t){const e=t("Content-Disposition");if(e){let t=function(t){let e=!0,i=s("filename\\*","i").exec(t);if(i){i=i[1];let t=r(i);return t=unescape(t),t=o(t),t=l(t),a(t)}if(i=function(t){const e=[];let i;const n=s("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(i=n.exec(t));){let[,t,s,n]=i;if(t=parseInt(t,10),t in e){if(0===t)break}else e[t]=[s,n]}const a=[];for(let s=0;s{if(!Mr(t.status))throw Sr(t.status,i);this._reader=t.body.getReader(),this._headersCapability.resolve();const e=e=>t.headers.get(e),{allowRangeRequests:s,suggestedLength:n}=Er({getResponseHeader:e,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=n||this._contentLength,this._filename=kr(e),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new Nt("Streaming is disabled."))})).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var t;await this._headersCapability.promise;const{value:e,done:i}=await this._reader.read();return i?{value:e,done:i}:(this._loaded+=e.byteLength,null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded,total:this._contentLength}),{value:Tr(e),done:!1})}cancel(t){var e;null===(e=this._reader)||void 0===e||e.cancel(t),this._abortController.abort()}}class Dr{constructor(t,e,i){this._stream=t,this._reader=null,this._loaded=0;const s=t.source;this._withCredentials=s.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!s.disableStream,this._abortController=new AbortController,this._headers=Rr(this._stream.httpHeaders),this._headers.append("Range","bytes=".concat(e,"-").concat(i-1));const n=s.url;fetch(n,Cr(this._headers,this._withCredentials,this._abortController)).then((t=>{if(!Mr(t.status))throw Sr(t.status,n);this._readCapability.resolve(),this._reader=t.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var t;await this._readCapability.promise;const{value:e,done:i}=await this._reader.read();return i?{value:e,done:i}:(this._loaded+=e.byteLength,null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded}),{value:Tr(e),done:!1})}cancel(t){var e;null===(e=this._reader)||void 0===e||e.cancel(t),this._abortController.abort()}}class Ir{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.url=t,this.isHttp=/^https?:/i.test(t),this.httpHeaders=this.isHttp&&e.httpHeaders||Object.create(null),this.withCredentials=e.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(t,e,i){const s={begin:t,end:e};for(const n in i)s[n]=i[n];return this.request(s)}requestFull(t){return this.request(t)}request(t){const e=new XMLHttpRequest,i=this.currXhrId++,s=this.pendingRequests[i]={xhr:e};e.open("GET",this.url),e.withCredentials=this.withCredentials;for(const n in this.httpHeaders){const t=this.httpHeaders[n];void 0!==t&&e.setRequestHeader(n,t)}return this.isHttp&&"begin"in t&&"end"in t?(e.setRequestHeader("Range","bytes=".concat(t.begin,"-").concat(t.end-1)),s.expectedStatus=206):s.expectedStatus=200,e.responseType="arraybuffer",t.onError&&(e.onerror=function(i){t.onError(e.status)}),e.onreadystatechange=this.onStateChange.bind(this,i),e.onprogress=this.onProgress.bind(this,i),s.onHeadersReceived=t.onHeadersReceived,s.onDone=t.onDone,s.onError=t.onError,s.onProgress=t.onProgress,e.send(null),i}onProgress(t,e){var i;const s=this.pendingRequests[t];s&&(null===(i=s.onProgress)||void 0===i||i.call(s,e))}onStateChange(t,e){const i=this.pendingRequests[t];if(!i)return;const s=i.xhr;if(s.readyState>=2&&i.onHeadersReceived&&(i.onHeadersReceived(),delete i.onHeadersReceived),4!==s.readyState)return;if(!(t in this.pendingRequests))return;var n;if(delete this.pendingRequests[t],0===s.status&&this.isHttp)return void(null===(n=i.onError)||void 0===n||n.call(i,s.status));const a=s.status||200;var r;if(!(200===a&&206===i.expectedStatus)&&a!==i.expectedStatus)return void(null===(r=i.onError)||void 0===r||r.call(i,s.status));const o=function(t){const e=t.response;return"string"!==typeof e?e:jt(e).buffer}(s);if(206===a){const t=s.getResponseHeader("Content-Range"),e=/bytes (\d+)-(\d+)\/(\d+)/.exec(t);i.onDone({begin:parseInt(e[1],10),chunk:o})}else if(o)i.onDone({begin:0,chunk:o});else{var l;null===(l=i.onError)||void 0===l||l.call(i,s.status)}}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortRequest(t){const e=this.pendingRequests[t].xhr;delete this.pendingRequests[t],e.abort()}}class Fr{constructor(t){this._source=t,this._manager=new Ir(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){const e=this._rangeRequestReaders.indexOf(t);e>=0&&this._rangeRequestReaders.splice(e,1)}getFullReader(){return Mt(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new Or(this._manager,this._source),this._fullRequestReader}getRangeReader(t,e){const i=new Nr(this._manager,t,e);return i.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(i),i}cancelAllRequests(t){var e;null===(e=this._fullRequestReader)||void 0===e||e.cancel(t);for(const i of this._rangeRequestReaders.slice(0))i.cancel(t)}}class Or{constructor(t,e){this._manager=t;const i={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._fullRequestId=t.requestFull(i),this._headersReceivedCapability=Promise.withResolvers(),this._disableRange=e.disableRange||!1,this._contentLength=e.length,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const t=this._fullRequestId,e=this._manager.getRequestXhr(t),i=t=>e.getResponseHeader(t),{allowRangeRequests:s,suggestedLength:n}=Er({getResponseHeader:i,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});s&&(this._isRangeSupported=!0),this._contentLength=n||this._contentLength,this._filename=kr(i),this._isRangeSupported&&this._manager.abortRequest(t),this._headersReceivedCapability.resolve()}_onDone(t){if(t)if(this._requests.length>0){this._requests.shift().resolve({value:t.chunk,done:!1})}else this._cachedChunks.push(t.chunk);if(this._done=!0,!(this._cachedChunks.length>0)){for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(t){this._storedError=Sr(t,this._url),this._headersReceivedCapability.reject(this._storedError);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(t){var e;null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0){return{value:this._cachedChunks.shift(),done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._headersReceivedCapability.reject(t);for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class Nr{constructor(t,e,i){this._manager=t;const s={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._requestId=t.requestRange(e,i,s),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var t;null===(t=this.onClosed)||void 0===t||t.call(this,this)}_onDone(t){const e=t.chunk;if(this._requests.length>0){this._requests.shift().resolve({value:e,done:!1})}else this._queuedChunk=e;this._done=!0;for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(t){this._storedError=Sr(t,this._url);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(t){var e;this.isStreamingSupported||(null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:t.loaded}))}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(null!==this._queuedChunk){const t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const Wr=/^file:\/\/\/[a-zA-Z]:\//;class jr{constructor(t){this.source=t,this.url=function(t){const e=oa.get("url"),i=e.parse(t);return"file:"===i.protocol||i.host?i:/^[a-z]:[/\\]/i.test(t)?e.parse("file:///".concat(t)):(i.host||(i.protocol="file:"),i)}(t.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var t,e;return null!==(t=null===(e=this._fullRequestReader)||void 0===e?void 0:e._loaded)&&void 0!==t?t:0}getFullReader(){return Mt(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new Ur(this):new Vr(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const i=this.isFsUrl?new qr(this,t,e):new Gr(this,t,e);return this._rangeRequestReaders.push(i),i}cancelAllRequests(t){var e;null===(e=this._fullRequestReader)||void 0===e||e.cancel(t);for(const i of this._rangeRequestReaders.slice(0))i.cancel(t)}}class Br{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;const e=t.source;this._contentLength=e.length,this._loaded=0,this._filename=null,this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var t;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();if(null===e)return this._readCapability=Promise.withResolvers(),this.read();this._loaded+=e.length,null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded,total:this._contentLength});return{value:new Uint8Array(e).buffer,done:!1}}cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",(()=>{this._readCapability.resolve()})),t.on("end",(()=>{t.destroy(),this._done=!0,this._readCapability.resolve()})),t.on("error",(t=>{this._error(t)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new Nt("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class Hr{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const e=t.source;this._isStreamingSupported=!e.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var t;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();if(null===e)return this._readCapability=Promise.withResolvers(),this.read();this._loaded+=e.length,null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded});return{value:new Uint8Array(e).buffer,done:!1}}cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",(()=>{this._readCapability.resolve()})),t.on("end",(()=>{t.destroy(),this._done=!0,this._readCapability.resolve()})),t.on("error",(t=>{this._error(t)})),this._storedError&&this._readableStream.destroy(this._storedError)}}function zr(t,e){return{protocol:t.protocol,auth:t.auth,host:t.hostname,port:t.port,path:t.path,method:"GET",headers:e}}class Vr extends Br{constructor(t){super(t);const e=e=>{if(404===e.statusCode){const t=new It('Missing PDF "'.concat(this._url,'".'));return this._storedError=t,void this._headersCapability.reject(t)}this._headersCapability.resolve(),this._setReadableStream(e);const i=t=>this._readableStream.headers[t.toLowerCase()],{allowRangeRequests:s,suggestedLength:n}=Er({getResponseHeader:i,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=n||this._contentLength,this._filename=kr(i)};if(this._request=null,"http:"===this._url.protocol){const i=oa.get("http");this._request=i.request(zr(this._url,t.httpHeaders),e)}else{const i=oa.get("https");this._request=i.request(zr(this._url,t.httpHeaders),e)}this._request.on("error",(t=>{this._storedError=t,this._headersCapability.reject(t)})),this._request.end()}}class Gr extends Hr{constructor(t,e,i){super(t),this._httpHeaders={};for(const n in t.httpHeaders){const e=t.httpHeaders[n];void 0!==e&&(this._httpHeaders[n]=e)}this._httpHeaders.Range="bytes=".concat(e,"-").concat(i-1);const s=t=>{if(404!==t.statusCode)this._setReadableStream(t);else{const t=new It('Missing PDF "'.concat(this._url,'".'));this._storedError=t}};if(this._request=null,"http:"===this._url.protocol){const t=oa.get("http");this._request=t.request(zr(this._url,this._httpHeaders),s)}else{const t=oa.get("https");this._request=t.request(zr(this._url,this._httpHeaders),s)}this._request.on("error",(t=>{this._storedError=t})),this._request.end()}}class Ur extends Br{constructor(t){super(t);let e=decodeURIComponent(this._url.path);Wr.test(this._url.href)&&(e=e.replace(/^\//,""));const i=oa.get("fs");i.promises.lstat(e).then((t=>{this._contentLength=t.size,this._setReadableStream(i.createReadStream(e)),this._headersCapability.resolve()}),(t=>{"ENOENT"===t.code&&(t=new It('Missing PDF "'.concat(e,'".'))),this._storedError=t,this._headersCapability.reject(t)}))}}class qr extends Hr{constructor(t,e,i){super(t);let s=decodeURIComponent(this._url.path);Wr.test(this._url.href)&&(s=s.replace(/^\//,""));const n=oa.get("fs");this._setReadableStream(n.createReadStream(s,{start:e,end:i-1}))}}const Xr=30,Kr=.8;var Yr=new WeakMap,Qr=new WeakMap,Jr=new WeakMap,Zr=new WeakMap,$r=new WeakMap,to=new WeakMap,eo=new WeakMap,io=new WeakMap,so=new WeakMap,no=new WeakMap,ao=new WeakMap,ro=new WeakMap,oo=new WeakMap,lo=new WeakMap,ho=new WeakMap,co=new WeakMap,uo=new WeakMap,po=new WeakMap,fo=new WeakSet;class go{constructor(t){var e;let{textContentSource:i,container:s,viewport:n}=t;if(a(this,fo),r(this,Yr,Promise.withResolvers()),r(this,Qr,null),r(this,Jr,!1),r(this,Zr,!(null===(e=globalThis.FontInspector)||void 0===e||!e.enabled)),r(this,$r,null),r(this,to,null),r(this,eo,0),r(this,io,0),r(this,so,null),r(this,no,null),r(this,ao,0),r(this,ro,0),r(this,oo,Object.create(null)),r(this,lo,[]),r(this,ho,null),r(this,co,[]),r(this,uo,new WeakMap),r(this,po,null),i instanceof ReadableStream)c(ho,this,i);else{if("object"!==typeof i)throw new Error('No "textContentSource" parameter specified.');c(ho,this,new ReadableStream({start(t){t.enqueue(i),t.close()}}))}c(Qr,this,c(no,this,s)),c(ro,this,n.scale*(globalThis.devicePixelRatio||1)),c(ao,this,n.rotation),c(to,this,{prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:null});const{pageWidth:o,pageHeight:l,pageX:d,pageY:u}=n.rawDims;c(po,this,[1,0,0,-1,-d,u+l]),c(io,this,o),c(eo,this,l),Qe(s,n),h(Yr,this).promise.catch((()=>{})).then((()=>{xo._.delete(this),c(to,this,null),c(oo,this,null)}))}render(){const t=()=>{h(so,this).read().then((e=>{var i;let{value:s,done:n}=e;n?h(Yr,this).resolve():(null!==(i=h($r,this))&&void 0!==i||c($r,this,s.lang),Object.assign(h(oo,this),s.styles),o(fo,this,mo).call(this,s.items),t())}),h(Yr,this).reject)};return c(so,this,h(ho,this).getReader()),xo._.add(this),t(),h(Yr,this).promise}update(t){let{viewport:e,onBefore:i=null}=t;const s=e.scale*(globalThis.devicePixelRatio||1),n=e.rotation;if(n!==h(ao,this)&&(null===i||void 0===i||i(),c(ao,this,n),Qe(h(no,this),{rotation:n})),s!==h(ro,this)){null===i||void 0===i||i(),c(ro,this,s);const t={prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:yo.call(go,h($r,this))};for(const e of h(co,this))t.properties=h(uo,this).get(e),t.div=e,o(fo,this,bo).call(this,t)}}cancel(){var t;const e=new Nt("TextLayer task cancelled.");null===(t=h(so,this))||void 0===t||t.cancel(e).catch((()=>{})),c(so,this,null),h(Yr,this).reject(e)}get textDivs(){return h(co,this)}get textContentItemsStr(){return h(lo,this)}static cleanup(){if(!(o(go,this,xo)._.size>0)){o(go,this,wo)._.clear();for(const{canvas:t}of o(go,this,_o)._.values())t.remove();o(go,this,_o)._.clear()}}}function mo(t){var e;if(h(Jr,this))return;(e=h(to,this)).ctx||(e.ctx=yo.call(m,h($r,this)));const i=h(co,this),s=h(lo,this);for(const n of t){if(i.length>1e5)return kt("Ignoring additional textDivs for performance reasons."),void c(Jr,this,!0);if(void 0!==n.str)s.push(n.str),o(fo,this,vo).call(this,n);else if("beginMarkedContentProps"===n.type||"beginMarkedContent"===n.type){const t=h(Qr,this);c(Qr,this,document.createElement("span")),h(Qr,this).classList.add("markedContent"),null!==n.id&&h(Qr,this).setAttribute("id","".concat(n.id)),t.append(h(Qr,this))}else"endMarkedContent"===n.type&&c(Qr,this,h(Qr,this).parentNode)}}function vo(t){const e=document.createElement("span"),i={angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,fontSize:0};h(co,this).push(e);const s=Vt.transform(h(po,this),t.transform);let n=Math.atan2(s[1],s[0]);const a=h(oo,this)[t.fontName];a.vertical&&(n+=Math.PI/2);const r=h(Zr,this)&&a.fontSubstitution||a.fontFamily,l=Math.hypot(s[2],s[3]),c=l*Ao.call(m,r,h($r,this));let d,u;0===n?(d=s[4],u=s[5]-c):(d=s[4]+c*Math.sin(n),u=s[5]-c*Math.cos(n));const p="calc(var(--scale-factor)*",f=e.style;h(Qr,this)===h(no,this)?(f.left="".concat((100*d/h(io,this)).toFixed(2),"%"),f.top="".concat((100*u/h(eo,this)).toFixed(2),"%")):(f.left="".concat(p).concat(d.toFixed(2),"px)"),f.top="".concat(p).concat(u.toFixed(2),"px)")),f.fontSize="".concat(p).concat(l.toFixed(2),"px)"),f.fontFamily=r,i.fontSize=l,e.setAttribute("role","presentation"),e.textContent=t.str,e.dir=t.dir,h(Zr,this)&&(e.dataset.fontName=a.fontSubstitutionLoadedName||t.fontName),0!==n&&(i.angle=n*(180/Math.PI));let g=!1;if(t.str.length>1)g=!0;else if(" "!==t.str&&t.transform[0]!==t.transform[3]){const e=Math.abs(t.transform[0]),i=Math.abs(t.transform[3]);e!==i&&Math.max(e,i)/Math.min(e,i)>1.5&&(g=!0)}if(g&&(i.canvasWidth=a.vertical?t.height:t.width),h(uo,this).set(e,i),h(to,this).div=e,h(to,this).properties=i,o(fo,this,bo).call(this,h(to,this)),i.hasText&&h(Qr,this).append(e),i.hasEOL){const t=document.createElement("br");t.setAttribute("role","presentation"),h(Qr,this).append(t)}}function bo(t){const{div:e,properties:i,ctx:s,prevFontSize:n,prevFontFamily:a}=t,{style:r}=e;let o="";if(0!==i.canvasWidth&&i.hasText){const{fontFamily:l}=r,{canvasWidth:c,fontSize:d}=i;n===d&&a===l||(s.font="".concat(d*h(ro,this),"px ").concat(l),t.prevFontSize=d,t.prevFontFamily=l);const{width:u}=s.measureText(e.textContent);u>0&&(o="scaleX(".concat(c*h(ro,this)/u,")"))}0!==i.angle&&(o="rotate(".concat(i.angle,"deg) ").concat(o)),o.length>0&&(r.transform=o)}function yo(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=o(m,this,_o)._.get(t||(t=""));if(!e){const i=document.createElement("canvas");i.className="hiddenCanvasElement",i.lang=t,document.body.append(i),e=i.getContext("2d",{alpha:!1}),o(m,this,_o)._.set(t,e)}return e}function Ao(t,e){const i=o(m,this,wo)._.get(t);if(i)return i;const s=o(m,this,yo).call(this,e),n=s.font;s.canvas.width=s.canvas.height=Xr,s.font="".concat(Xr,"px ").concat(t);const a=s.measureText("");let r=a.fontBoundingBoxAscent,l=Math.abs(a.fontBoundingBoxDescent);if(r){const e=r/(r+l);return o(m,this,wo)._.set(t,e),s.canvas.width=s.canvas.height=0,s.font=n,e}s.strokeStyle="red",s.clearRect(0,0,Xr,Xr),s.strokeText("g",0,0);let h=s.getImageData(0,0,Xr,Xr).data;l=0;for(let o=h.length-1-3;o>=0;o-=4)if(h[o]>0){l=Math.ceil(o/4/Xr);break}s.clearRect(0,0,Xr,Xr),s.strokeText("A",0,Xr),h=s.getImageData(0,0,Xr,Xr).data,r=0;for(let o=0,d=h.length;o0){r=Xr-Math.floor(o/4/Xr);break}s.canvas.width=s.canvas.height=0,s.font=n;const c=r?r/(r+l):Kr;return o(m,this,wo)._.set(t,c),c}m=go;var wo={_:new Map},_o={_:new Map},xo={_:new Set};function Eo(){Ve("`renderTextLayer`, please use `TextLayer` instead.");const{textContentSource:t,container:e,viewport:i,...s}=arguments[0],n=Object.keys(s);n.length>0&&kt("Ignoring `renderTextLayer` parameters: "+n.join(", "));const a=new go({textContentSource:t,container:e,viewport:i}),{textDivs:r,textContentItemsStr:o}=a;return{promise:a.render(),textDivs:r,textContentItemsStr:o}}function ko(){Ve("`updateTextLayer`, please use `TextLayer` instead.")}class So{static textContent(t){const e=[],i={items:e,styles:Object.create(null)};return function t(i){var s;if(!i)return;let n=null;const a=i.name;if("#text"===a)n=i.value;else{if(!So.shouldBuildText(a))return;null!==i&&void 0!==i&&null!==(s=i.attributes)&&void 0!==s&&s.textContent?n=i.attributes.textContent:i.value&&(n=i.value)}if(null!==n&&e.push({str:n}),i.children)for(const e of i.children)t(e)}(t),i}static shouldBuildText(t){return!("textarea"===t||"input"===t||"option"===t||"select"===t)}}const Mo=65536,Co=S?class extends re{_createCanvas(t,e){return oa.get("canvas").createCanvas(t,e)}}:class extends re{constructor(){let{ownerDocument:t=globalThis.document}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this._document=t}_createCanvas(t,e){const i=this._document.createElement("canvas");return i.width=t,i.height=e,i}},Ro=S?class extends oe{_fetchData(t,e){return la(t).then((t=>({cMapData:t,compressionType:e})))}}:Pe,To=S?class extends ae{}:class extends ae{constructor(){let{docId:t,ownerDocument:e=globalThis.document}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),a(this,be),r(this,ue,void 0),r(this,pe,void 0),r(this,fe,void 0),r(this,ge,void 0),r(this,me,void 0),r(this,ve,0),c(fe,this,t),c(ge,this,e)}addFilter(t){var e,i;if(!t)return"none";let s=l(be,this,ye).get(t);if(s)return s;const[n,a,r]=o(be,this,_e).call(this,t),d=1===t.length?n:"".concat(n).concat(a).concat(r);if(s=l(be,this,ye).get(d),s)return l(be,this,ye).set(t,s),s;const u="g_".concat(h(fe,this),"_transfer_map_").concat((c(ve,this,(e=h(ve,this),i=e++,e)),i)),p="url(#".concat(u,")");l(be,this,ye).set(t,p),l(be,this,ye).set(d,p);const f=o(be,this,ke).call(this,u);return o(be,this,Me).call(this,n,a,r,f),p}addHCMFilter(t,e){var i;const s="".concat(t,"-").concat(e),n="base";let a=l(be,this,Ae).get(n);if((null===(i=a)||void 0===i?void 0:i.key)===s)return a.url;var r;a?(null===(r=a.filter)||void 0===r||r.remove(),a.key=s,a.url="none",a.filter=null):(a={key:s,url:"none",filter:null},l(be,this,Ae).set(n,a));if(!t||!e)return a.url;const c=o(be,this,Re).call(this,t);t=Vt.makeHexColor(...c);const d=o(be,this,Re).call(this,e);if(e=Vt.makeHexColor(...d),l(be,this,we).style.color="","#000000"===t&&"#ffffff"===e||t===e)return a.url;const u=new Array(256);for(let o=0;o<=255;o++){const t=o/255;u[o]=t<=.03928?t/12.92:((t+.055)/1.055)**2.4}const p=u.join(","),f="g_".concat(h(fe,this),"_hcm_filter"),g=a.filter=o(be,this,ke).call(this,f);o(be,this,Me).call(this,p,p,p,g),o(be,this,Ee).call(this,g);const m=(t,e)=>{const i=c[t]/255,s=d[t]/255,n=new Array(e+1);for(let a=0;a<=e;a++)n[a]=i+a/e*(s-i);return n.join(",")};return o(be,this,Me).call(this,m(0,5),m(1,5),m(2,5),g),a.url="url(#".concat(f,")"),a.url}addAlphaFilter(t){var e,i;let s=l(be,this,ye).get(t);if(s)return s;const[n]=o(be,this,_e).call(this,[t]),a="alpha_".concat(n);if(s=l(be,this,ye).get(a),s)return l(be,this,ye).set(t,s),s;const r="g_".concat(h(fe,this),"_alpha_map_").concat((c(ve,this,(e=h(ve,this),i=e++,e)),i)),d="url(#".concat(r,")");l(be,this,ye).set(t,d),l(be,this,ye).set(a,d);const u=o(be,this,ke).call(this,r);return o(be,this,Ce).call(this,n,u),d}addLuminosityFilter(t){var e,i;let s,n,a=l(be,this,ye).get(t||"luminosity");if(a)return a;if(t?([s]=o(be,this,_e).call(this,[t]),n="luminosity_".concat(s)):n="luminosity",a=l(be,this,ye).get(n),a)return l(be,this,ye).set(t,a),a;const r="g_".concat(h(fe,this),"_luminosity_map_").concat((c(ve,this,(e=h(ve,this),i=e++,e)),i)),d="url(#".concat(r,")");l(be,this,ye).set(t,d),l(be,this,ye).set(n,d);const u=o(be,this,ke).call(this,r);return o(be,this,xe).call(this,u),t&&o(be,this,Ce).call(this,s,u),d}addHighlightHCMFilter(t,e,i,s,n){var a;const r="".concat(e,"-").concat(i,"-").concat(s,"-").concat(n);let c=l(be,this,Ae).get(t);if((null===(a=c)||void 0===a?void 0:a.key)===r)return c.url;var d;c?(null===(d=c.filter)||void 0===d||d.remove(),c.key=r,c.url="none",c.filter=null):(c={key:r,url:"none",filter:null},l(be,this,Ae).set(t,c));if(!e||!i)return c.url;const[u,p]=[e,i].map(o(be,this,Re).bind(this));let f=Math.round(.2126*u[0]+.7152*u[1]+.0722*u[2]),g=Math.round(.2126*p[0]+.7152*p[1]+.0722*p[2]),[m,v]=[s,n].map(o(be,this,Re).bind(this));g{const s=new Array(256),n=(g-f)/i,a=t/255,r=(e-t)/(255*i);let o=0;for(let l=0;l<=i;l++){const t=Math.round(f+l*n),e=a+l*r;for(let i=o;i<=t;i++)s[i]=e;o=t+1}for(let l=o;l<256;l++)s[l]=s[o-1];return s.join(",")},y="g_".concat(h(fe,this),"_hcm_").concat(t,"_filter"),A=c.filter=o(be,this,ke).call(this,y);return o(be,this,Ee).call(this,A),o(be,this,Me).call(this,b(m[0],v[0],5),b(m[1],v[1],5),b(m[2],v[2],5),A),c.url="url(#".concat(y,")"),c.url}destroy(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&0!==l(be,this,Ae).size||(h(pe,this)&&(h(pe,this).parentNode.parentNode.remove(),c(pe,this,null)),h(ue,this)&&(h(ue,this).clear(),c(ue,this,null)),c(ve,this,0))}},Po=S?class extends le{_fetchData(t){return la(t)}}:Le;function Lo(t){var e,i;if("string"===typeof t||t instanceof URL?t={url:t}:(t instanceof ArrayBuffer||ArrayBuffer.isView(t))&&(t={data:t}),"object"!==typeof t)throw new Error("Invalid parameter in getDocument, need parameter object.");if(!t.url&&!t.data&&!t.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const s=new Io,{docId:n}=s,a=t.url?function(t){if(t instanceof URL)return t.href;try{return new URL(t,window.location).href}catch{if(S&&"string"===typeof t)return t}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}(t.url):null,r=t.data?function(t){if(S&&"undefined"!==typeof Buffer&&t instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength)return t;if("string"===typeof t)return jt(t);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)||"object"===typeof t&&!isNaN(null===t||void 0===t?void 0:t.length))return new Uint8Array(t);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}(t.data):null,o=t.httpHeaders||null,l=!0===t.withCredentials,h=null!==(e=t.password)&&void 0!==e?e:null,c=t.range instanceof Oo?t.range:null,d=Number.isInteger(t.rangeChunkSize)&&t.rangeChunkSize>0?t.rangeChunkSize:Mo;let u=t.worker instanceof Ko?t.worker:null;const p=t.verbosity,f="string"!==typeof t.docBaseUrl||Oe(t.docBaseUrl)?null:t.docBaseUrl,g="string"===typeof t.cMapUrl?t.cMapUrl:null,m=!1!==t.cMapPacked,v=t.CMapReaderFactory||Ro,b="string"===typeof t.standardFontDataUrl?t.standardFontDataUrl:null,y=t.StandardFontDataFactory||Po,A=!0!==t.stopAtErrors,w=Number.isInteger(t.maxImageSize)&&t.maxImageSize>-1?t.maxImageSize:-1,_=!1!==t.isEvalSupported,x="boolean"===typeof t.isOffscreenCanvasSupported?t.isOffscreenCanvasSupported:!S,E=Number.isInteger(t.canvasMaxAreaInBytes)?t.canvasMaxAreaInBytes:-1,k="boolean"===typeof t.disableFontFace?t.disableFontFace:S,M=!0===t.fontExtraProperties,C=!0===t.enableXfa,R=t.ownerDocument||globalThis.document,T=!0===t.disableRange,P=!0===t.disableStream,L=!0===t.disableAutoFetch,D=!0===t.pdfBug,I=c?c.length:null!==(i=t.length)&&void 0!==i?i:NaN,F="boolean"===typeof t.useSystemFonts?t.useSystemFonts:!S&&!k,O="boolean"===typeof t.useWorkerFetch?t.useWorkerFetch:v===Pe&&y===Le&&g&&b&&He(g,document.baseURI)&&He(b,document.baseURI),N=t.canvasFactory||new Co({ownerDocument:R}),W=t.filterFactory||new To({docId:n,ownerDocument:R});_t(p);const j={canvasFactory:N,filterFactory:W};if(O||(j.cMapReaderFactory=new v({baseUrl:g,isCompressed:m}),j.standardFontDataFactory=new y({baseUrl:b})),!u){const t={verbosity:p,port:Ba.workerPort};u=t.port?Ko.fromPort(t):new Ko(t),s._worker=u}const B={docId:n,apiVersion:"4.3.136",data:r,password:h,disableAutoFetch:L,rangeChunkSize:d,length:I,docBaseUrl:f,enableXfa:C,evaluatorOptions:{maxImageSize:w,disableFontFace:k,ignoreErrors:A,isEvalSupported:_,isOffscreenCanvasSupported:x,canvasMaxAreaInBytes:E,fontExtraProperties:M,useSystemFonts:F,cMapUrl:O?g:null,standardFontDataUrl:O?b:null}},H={disableFontFace:k,fontExtraProperties:M,ownerDocument:R,pdfBug:D,styleElement:null,loadingParams:{disableAutoFetch:L,enableXfa:C}};return u.promise.then((function(){if(s.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");const t=u.messageHandler.sendWithPromise("GetDocRequest",B,r?[r.buffer]:null);let e;if(c)e=new wr(c,{disableRange:T,disableStream:P});else if(!r){e=(t=>{if(S){return function(){return"undefined"!==typeof fetch&&"undefined"!==typeof Response&&"body"in Response.prototype}()&&He(t.url)?new Pr(t):new jr(t)}return He(t.url)?new Pr(t):new Fr(t)})({url:a,length:I,httpHeaders:o,withCredentials:l,rangeChunkSize:d,disableRange:T,disableStream:P})}return t.then((t=>{if(s.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");const i=new er(n,t,u.port),a=new sl(i,s,e,H,j);s._transport=a,i.send("Ready",null)}))})).catch(s._capability.reject),s}function Do(t){return"object"===typeof t&&Number.isInteger(null===t||void 0===t?void 0:t.num)&&t.num>=0&&Number.isInteger(null===t||void 0===t?void 0:t.gen)&&t.gen>=0}class Io{constructor(){var t,e;this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId="d".concat((Fo._=(t=Fo._,e=t++,t),e)),this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{var t,e;null!==(t=this._worker)&&void 0!==t&&t.port&&(this._worker._pendingDestroy=!0),await(null===(e=this._transport)||void 0===e?void 0:e.destroy())}catch(s){var i;throw null!==(i=this._worker)&&void 0!==i&&i.port&&delete this._worker._pendingDestroy,s}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}}var Fo={_:0};class Oo{constructor(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.length=t,this.initialData=e,this.progressiveDone=i,this.contentDispositionFilename=s,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(t){this._rangeListeners.push(t)}addProgressListener(t){this._progressListeners.push(t)}addProgressiveReadListener(t){this._progressiveReadListeners.push(t)}addProgressiveDoneListener(t){this._progressiveDoneListeners.push(t)}onDataRange(t,e){for(const i of this._rangeListeners)i(t,e)}onDataProgress(t,e){this._readyCapability.promise.then((()=>{for(const i of this._progressListeners)i(t,e)}))}onDataProgressiveRead(t){this._readyCapability.promise.then((()=>{for(const e of this._progressiveReadListeners)e(t)}))}onDataProgressiveDone(){this._readyCapability.promise.then((()=>{for(const t of this._progressiveDoneListeners)t()}))}transportReady(){this._readyCapability.resolve()}requestDataRange(t,e){St("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class No{constructor(t,e){this._pdfInfo=t,this._transport=e}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return Rt(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){let{intent:t="display"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getOptionalContentConfig(e)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(t||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(t){return this._transport.cachedPageNumber(t)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}var Wo=new WeakMap,jo=new WeakMap,Bo=new WeakSet;class Ho{constructor(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];a(this,Bo),r(this,Wo,null),r(this,jo,!1),this._pageIndex=t,this._pageInfo=e,this._transport=i,this._stats=s?new Be:null,this._pdfBug=s,this.commonObjs=i.commonObjs,this.objs=new ll,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport(){let{scale:t,rotation:e=this.rotate,offsetX:i=0,offsetY:s=0,dontFlip:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ie({viewBox:this.view,scale:t,rotation:e,offsetX:i,offsetY:s,dontFlip:n})}getAnnotations(){let{intent:t="display"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,e)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return Rt(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var t;return(null===(t=this._transport._htmlForXfa)||void 0===t?void 0:t.children[this._pageIndex])||null}render(t){var e,i;let{canvasContext:s,viewport:n,intent:a="display",annotationMode:r=N.ENABLE,transform:l=null,background:h=null,optionalContentConfigPromise:d=null,annotationCanvasMap:u=null,pageColors:p=null,printAnnotationStorage:f=null}=t;null===(e=this._stats)||void 0===e||e.time("Overall");const g=this._transport.getRenderingIntent(a,r,f),{renderingIntent:m,cacheKey:v}=g;c(jo,this,!1),o(Bo,this,Vo).call(this),d||(d=this._transport.getOptionalContentConfig(m));let b=this._intentStates.get(v);b||(b=Object.create(null),this._intentStates.set(v,b)),b.streamReaderCancelTimeout&&(clearTimeout(b.streamReaderCancelTimeout),b.streamReaderCancelTimeout=null);const y=!!(m&L);var A;b.displayReadyCapability||(b.displayReadyCapability=Promise.withResolvers(),b.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},null===(A=this._stats)||void 0===A||A.time("Page Request"),this._pumpOperatorList(g));const w=t=>{var e;(b.renderTasks.delete(_),(this._maybeCleanupAfterRender||y)&&c(jo,this,!0),o(Bo,this,zo).call(this,!y),t?(_.capability.reject(t),this._abortOperatorList({intentState:b,reason:t instanceof Error?t:new Error(t)})):_.capability.resolve(),this._stats)&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),null!==(e=globalThis.Stats)&&void 0!==e&&e.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},_=new ul({callback:w,params:{canvasContext:s,viewport:n,transform:l,background:h},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:u,operatorList:b.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!y,pdfBug:this._pdfBug,pageColors:p});((i=b).renderTasks||(i.renderTasks=new Set)).add(_);const x=_.task;return Promise.all([b.displayReadyCapability.promise,d]).then((t=>{var e;let[i,s]=t;if(this.destroyed)w();else{if(null===(e=this._stats)||void 0===e||e.time("Rendering"),!(s.renderingIntent&m))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");_.initializeGraphics({transparency:i,optionalContentConfig:s}),_.operatorListChanged()}})).catch(w),x}getOperatorList(){let{intent:t="display",annotationMode:e=N.ENABLE,printAnnotationStorage:i=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=this._transport.getRenderingIntent(t,e,i,!0);let n,a=this._intentStates.get(s.cacheKey);var r,o;(a||(a=Object.create(null),this._intentStates.set(s.cacheKey,a)),a.opListReadCapability)||(n=Object.create(null),n.operatorListChanged=function(){a.operatorList.lastChunk&&(a.opListReadCapability.resolve(a.operatorList),a.renderTasks.delete(n))},a.opListReadCapability=Promise.withResolvers(),((r=a).renderTasks||(r.renderTasks=new Set)).add(n),a.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},null===(o=this._stats)||void 0===o||o.time("Page Request"),this._pumpOperatorList(s));return a.opListReadCapability.promise}streamTextContent(){let{includeMarkedContent:t=!1,disableNormalization:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===t,disableNormalization:!0===e},{highWaterMark:100,size:t=>t.items.length})}getTextContent(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then((t=>So.textContent(t)));const e=this.streamTextContent(t);return new Promise((function(t,i){const s=e.getReader(),n={items:[],styles:Object.create(null),lang:null};!function e(){s.read().then((function(i){var s;let{value:a,done:r}=i;r?t(n):(null!==(s=n.lang)&&void 0!==s||(n.lang=a.lang),Object.assign(n.styles,a.styles),n.items.push(...a.items),e())}),i)}()}))}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const t=[];for(const e of this._intentStates.values())if(this._abortOperatorList({intentState:e,reason:new Error("Page was destroyed."),force:!0}),!e.opListReadCapability)for(const i of e.renderTasks)t.push(i.completed),i.cancel();return this.objs.clear(),c(jo,this,!1),o(Bo,this,Vo).call(this),Promise.all(t)}cleanup(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];c(jo,this,!0);const e=o(Bo,this,zo).call(this,!1);return t&&e&&this._stats&&(this._stats=new Be),e}_startRenderPage(t,e){var i,s;const n=this._intentStates.get(e);n&&(null===(i=this._stats)||void 0===i||i.timeEnd("Page Request"),null===(s=n.displayReadyCapability)||void 0===s||s.resolve(t))}_renderPageChunk(t,e){for(let i=0,s=t.length;i{r.read().then((t=>{let{value:e,done:i}=t;i?l.streamReader=null:this._transport.destroyed||(this._renderPageChunk(e,l),h())}),(t=>{if(l.streamReader=null,!this._transport.destroyed){if(l.operatorList){l.operatorList.lastChunk=!0;for(const t of l.renderTasks)t.operatorListChanged();o(Bo,this,zo).call(this,!0)}if(l.displayReadyCapability)l.displayReadyCapability.reject(t);else{if(!l.opListReadCapability)throw t;l.opListReadCapability.reject(t)}}}))};h()}_abortOperatorList(t){let{intentState:e,reason:i,force:s=!1}=t;if(e.streamReader){if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!s){if(e.renderTasks.size>0)return;if(i instanceof Fe){let t=100;return i.extraDelay>0&&i.extraDelay<1e3&&(t+=i.extraDelay),void(e.streamReaderCancelTimeout=setTimeout((()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:i,force:!0})}),t))}}if(e.streamReader.cancel(new Nt(i.message)).catch((()=>{})),e.streamReader=null,!this._transport.destroyed){for(const[t,i]of this._intentStates)if(i===e){this._intentStates.delete(t);break}this.cleanup()}}}get stats(){return this._stats}}function zo(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(o(Bo,this,Vo).call(this),!h(jo,this)||this.destroyed)return!1;if(t)return c(Wo,this,setTimeout((()=>{c(Wo,this,null),o(Bo,this,zo).call(this,!1)}),5e3)),!1;for(const{renderTasks:e,operatorList:i}of this._intentStates.values())if(e.size>0||!i.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),c(jo,this,!1),!0}function Vo(){h(Wo,this)&&(clearTimeout(h(Wo,this)),c(Wo,this,null))}var Go=new WeakMap,Uo=new WeakMap;class qo{constructor(){r(this,Go,new Set),r(this,Uo,Promise.resolve())}postMessage(t,e){const i={data:structuredClone(t,e?{transfer:e}:null)};h(Uo,this).then((()=>{for(const t of h(Go,this))t.call(this,i)}))}addEventListener(t,e){h(Go,this).add(e)}removeEventListener(t,e){h(Go,this).delete(e)}terminate(){h(Go,this).clear()}}const Xo={isWorkerDisabled:!1,fakeWorkerId:0};S&&(Xo.isWorkerDisabled=!0,Ba.workerSrc||(Ba.workerSrc="./pdf.worker.mjs")),Xo.isSameOrigin=function(t,e){let i;try{if(i=new URL(t),!i.origin||"null"===i.origin)return!1}catch{return!1}const s=new URL(e,i);return i.origin===s.origin},Xo.createCDNWrapper=function(t){const e='await import("'.concat(t,'");');return URL.createObjectURL(new Blob([e],{type:"text/javascript"}))};class Ko{constructor(){let{name:t=null,port:e=null,verbosity:i=xt()}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.name=t,this.destroyed=!1,this.verbosity=i,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,e){var s;if(null!==(s=Qo._)&&void 0!==s&&s.has(e))throw new Error("Cannot use more than one PDFWorker per port.");return(Qo._||(Qo._=new WeakMap)).set(e,this),void this._initializeFromPort(e)}this._initialize()}get promise(){return S?Promise.all([oa.promise,this._readyCapability.promise]):this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(t){this._port=t,this._messageHandler=new er("main","worker",t),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!Xo.isWorkerDisabled&&!Yo(Ko)){let{workerSrc:t}=Ko;try{Xo.isSameOrigin(window.location.href,t)||(t=Xo.createCDNWrapper(new URL(t,window.location).href));const e=new Worker(t,{type:"module"}),i=new er("main","worker",e),s=()=>{e.removeEventListener("error",n),i.destroy(),e.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},n=()=>{this._webWorker||s()};e.addEventListener("error",n),i.on("test",(t=>{e.removeEventListener("error",n),this.destroyed?s():t?(this._messageHandler=i,this._port=e,this._webWorker=e,this._readyCapability.resolve(),i.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),i.destroy(),e.terminate())})),i.on("ready",(t=>{if(e.removeEventListener("error",n),this.destroyed)s();else try{a()}catch{this._setupFakeWorker()}}));const a=()=>{const t=new Uint8Array;i.send("test",t,[t.buffer])};return void a()}catch{Et("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){Xo.isWorkerDisabled||(kt("Setting up fake worker."),Xo.isWorkerDisabled=!0),Ko._setupFakeWorkerGlobal.then((t=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const e=new qo;this._port=e;const i="fake".concat(Xo.fakeWorkerId++),s=new er(i+"_worker",i,e);t.setup(s,e);const n=new er(i,i+"_worker",e);this._messageHandler=n,this._readyCapability.resolve(),n.send("configure",{verbosity:this.verbosity})})).catch((t=>{this._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(t.message,'".')))}))}destroy(){var t;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),null===(t=Qo._)||void 0===t||t.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(t){var e;if(null===t||void 0===t||!t.port)throw new Error("PDFWorker.fromPort - invalid method signature.");const i=null===(e=o(Ko,this,Qo)._)||void 0===e?void 0:e.get(t.port);if(i){if(i._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return i}return new Ko(t)}static get workerSrc(){if(Ba.workerSrc)return Ba.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return Rt(this,"_setupFakeWorkerGlobal",(async()=>{if(l(Ko,this,Yo))return l(Ko,this,Yo);return(await import(this.workerSrc)).WorkerMessageHandler})())}}function Yo(t){try{var e;return(null===(e=globalThis.pdfjsWorker)||void 0===e?void 0:e.WorkerMessageHandler)||null}catch{return null}}var Qo={_:void 0},Jo=new WeakMap,Zo=new WeakMap,$o=new WeakMap,tl=new WeakMap,el=new WeakMap,il=new WeakSet;class sl{constructor(t,e,i,s,n){a(this,il),r(this,Jo,new Map),r(this,Zo,new Map),r(this,$o,new Map),r(this,tl,new Map),r(this,el,null),this.messageHandler=t,this.loadingTask=e,this.commonObjs=new ll,this.fontLoader=new sa({ownerDocument:s.ownerDocument,styleElement:s.styleElement}),this.loadingParams=s.loadingParams,this._params=s,this.canvasFactory=n.canvasFactory,this.filterFactory=n.filterFactory,this.cMapReaderFactory=n.cMapReaderFactory,this.standardFontDataFactory=n.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=i,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}get annotationStorage(){return Rt(this,"annotationStorage",new Zn)}getRenderingIntent(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N.ENABLE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=P,a=Kn;switch(t){case"any":n=T;break;case"display":break;case"print":n=L;break;default:kt("getRenderingIntent - invalid intent: ".concat(t))}switch(e){case N.DISABLE:n+=F;break;case N.ENABLE:break;case N.ENABLE_FORMS:n+=D;break;case N.ENABLE_STORAGE:n+=I;a=(n&L&&i instanceof ea?i:this.annotationStorage).serializable;break;default:kt("getRenderingIntent - invalid annotationMode: ".concat(e))}return s&&(n+=O),{renderingIntent:n,cacheKey:"".concat(n,"_").concat(a.hash),annotationStorageSerializable:a}}destroy(){var t;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),null===(t=h(el,this))||void 0===t||t.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];for(const s of h(Zo,this).values())e.push(s._destroy());h(Zo,this).clear(),h($o,this).clear(),h(tl,this).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const i=this.messageHandler.sendWithPromise("Terminate",null);return e.push(i),Promise.all(e).then((()=>{var t;this.commonObjs.clear(),this.fontLoader.clear(),h(Jo,this).clear(),this.filterFactory.destroy(),go.cleanup(),null===(t=this._networkStream)||void 0===t||t.cancelAllRequests(new Nt("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:e}=this;t.on("GetReader",((t,e)=>{Mt(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=t=>{this._lastProgress={loaded:t.loaded,total:t.total}},e.onPull=()=>{this._fullReader.read().then((function(t){let{value:i,done:s}=t;s?e.close():(Mt(i instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),e.enqueue(new Uint8Array(i),1,[i]))})).catch((t=>{e.error(t)}))},e.onCancel=t=>{this._fullReader.cancel(t),e.ready.catch((t=>{if(!this.destroyed)throw t}))}})),t.on("ReaderHeadersReady",(t=>{const i=Promise.withResolvers(),s=this._fullReader;return s.headersReady.then((()=>{if(!s.isStreamingSupported||!s.isRangeSupported){var t;if(this._lastProgress)null===(t=e.onProgress)||void 0===t||t.call(e,this._lastProgress);s.onProgress=t=>{var i;null===(i=e.onProgress)||void 0===i||i.call(e,{loaded:t.loaded,total:t.total})}}i.resolve({isStreamingSupported:s.isStreamingSupported,isRangeSupported:s.isRangeSupported,contentLength:s.contentLength})}),i.reject),i.promise})),t.on("GetRangeReader",((t,e)=>{Mt(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const i=this._networkStream.getRangeReader(t.begin,t.end);i?(e.onPull=()=>{i.read().then((function(t){let{value:i,done:s}=t;s?e.close():(Mt(i instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),e.enqueue(new Uint8Array(i),1,[i]))})).catch((t=>{e.error(t)}))},e.onCancel=t=>{i.cancel(t),e.ready.catch((t=>{if(!this.destroyed)throw t}))}):e.close()})),t.on("GetDoc",(t=>{let{pdfInfo:i}=t;this._numPages=i.numPages,this._htmlForXfa=i.htmlForXfa,delete i.htmlForXfa,e._capability.resolve(new No(i,this))})),t.on("DocException",(function(t){let i;switch(t.name){case"PasswordException":i=new Pt(t.message,t.code);break;case"InvalidPDFException":i=new Dt(t.message);break;case"MissingPDFException":i=new It(t.message);break;case"UnexpectedResponseException":i=new Ft(t.message,t.status);break;case"UnknownErrorException":i=new Lt(t.message,t.details);break;default:St("DocException - expected a valid Error.")}e._capability.reject(i)})),t.on("PasswordRequest",(t=>{if(c(el,this,Promise.withResolvers()),e.onPassword){const s=t=>{t instanceof Error?h(el,this).reject(t):h(el,this).resolve({password:t})};try{e.onPassword(s,t.code)}catch(i){h(el,this).reject(i)}}else h(el,this).reject(new Pt(t.message,t.code));return h(el,this).promise})),t.on("DataLoaded",(t=>{var i;null===(i=e.onProgress)||void 0===i||i.call(e,{loaded:t.length,total:t.length}),this.downloadInfoCapability.resolve(t)})),t.on("StartRenderPage",(t=>{if(this.destroyed)return;h(Zo,this).get(t.pageIndex)._startRenderPage(t.transparency,t.cacheKey)})),t.on("commonobj",(e=>{var i;let[s,n,a]=e;if(this.destroyed)return null;if(this.commonObjs.has(s))return null;switch(n){case"Font":const{disableFontFace:e,fontExtraProperties:r,pdfBug:o}=this._params;if("error"in a){const t=a.error;kt("Error during font loading: ".concat(t)),this.commonObjs.resolve(s,t);break}const l=o&&null!==(i=globalThis.FontInspector)&&void 0!==i&&i.enabled?(t,e)=>globalThis.FontInspector.fontAdded(t,e):null,c=new na(a,{disableFontFace:e,inspectFont:l});this.fontLoader.bind(c).catch((()=>t.sendWithPromise("FontFallback",{id:s}))).finally((()=>{!r&&c.data&&(c.data=null),this.commonObjs.resolve(s,c)}));break;case"CopyLocalImage":const{imageRef:d}=a;Mt(d,"The imageRef must be defined.");for(const t of h(Zo,this).values())for(const[,e]of t.objs)if((null===e||void 0===e?void 0:e.ref)===d)return e.dataLen?(this.commonObjs.resolve(s,structuredClone(e)),e.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(s,a);break;default:throw new Error("Got unknown common object type ".concat(n))}return null})),t.on("obj",(t=>{let[e,i,s,n]=t;if(this.destroyed)return;const a=h(Zo,this).get(i);var r;if(!a.objs.has(e))if(0!==a._intentStates.size)switch(s){case"Image":a.objs.resolve(e,n),(null===n||void 0===n?void 0:n.dataLen)>1e7&&(a._maybeCleanupAfterRender=!0);break;case"Pattern":a.objs.resolve(e,n);break;default:throw new Error("Got unknown object type ".concat(s))}else null===n||void 0===n||null===(r=n.bitmap)||void 0===r||r.close()})),t.on("DocProgress",(t=>{var i;this.destroyed||null===(i=e.onProgress)||void 0===i||i.call(e,{loaded:t.loaded,total:t.total})})),t.on("FetchBuiltInCMap",(t=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(t):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.")))),t.on("FetchStandardFontData",(t=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(t):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var t,e;this.annotationStorage.size<=0&&kt("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:i,transfer:s}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:i,filename:null!==(t=null===(e=this._fullReader)||void 0===e?void 0:e.filename)&&void 0!==t?t:null},s).finally((()=>{this.annotationStorage.resetModified()}))}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));const e=t-1,i=h($o,this).get(e);if(i)return i;const s=this.messageHandler.sendWithPromise("GetPage",{pageIndex:e}).then((i=>{if(this.destroyed)throw new Error("Transport destroyed");i.refStr&&h(tl,this).set(i.refStr,t);const s=new Ho(e,i,this,this._params.pdfBug);return h(Zo,this).set(e,s),s}));return h($o,this).set(e,s),s}getPageIndex(t){return Do(t)?this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:e})}getFieldObjects(){return o(il,this,nl).call(this,"GetFieldObjects")}hasJSActions(){return o(il,this,nl).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return"string"!==typeof t?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return o(il,this,nl).call(this,"GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(t){return o(il,this,nl).call(this,"GetOptionalContentConfig").then((e=>new yr(e,t)))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const t="GetMetadata",e=h(Jo,this).get(t);if(e)return e;const i=this.messageHandler.sendWithPromise(t,null).then((t=>{var e,i,s,n;return{info:t[0],metadata:t[1]?new or(t[1]):null,contentDispositionFilename:null!==(e=null===(i=this._fullReader)||void 0===i?void 0:i.filename)&&void 0!==e?e:null,contentLength:null!==(s=null===(n=this._fullReader)||void 0===n?void 0:n.contentLength)&&void 0!==s?s:null}}));return h(Jo,this).set(t,i),i}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const t of h(Zo,this).values()){if(!t.cleanup())throw new Error("startCleanup: Page ".concat(t.pageNumber," is currently rendering."))}this.commonObjs.clear(),t||this.fontLoader.clear(),h(Jo,this).clear(),this.filterFactory.destroy(!0),go.cleanup()}}cachedPageNumber(t){var e;if(!Do(t))return null;const i=0===t.gen?"".concat(t.num,"R"):"".concat(t.num,"R").concat(t.gen);return null!==(e=h(tl,this).get(i))&&void 0!==e?e:null}}function nl(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const i=h(Jo,this).get(t);if(i)return i;const s=this.messageHandler.sendWithPromise(t,e);return h(Jo,this).set(t,s),s}const al=Symbol("INITIAL_DATA");var rl=new WeakMap,ol=new WeakSet;class ll{constructor(){a(this,ol),r(this,rl,Object.create(null))}get(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){const i=o(ol,this,hl).call(this,t);return i.promise.then((()=>e(i.data))),null}const i=h(rl,this)[t];if(!i||i.data===al)throw new Error("Requesting object that isn't resolved yet ".concat(t,"."));return i.data}has(t){const e=h(rl,this)[t];return!!e&&e.data!==al}resolve(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const i=o(ol,this,hl).call(this,t);i.data=e,i.resolve()}clear(){for(const e in h(rl,this)){var t;const{data:i}=h(rl,this)[e];null===i||void 0===i||null===(t=i.bitmap)||void 0===t||t.close()}c(rl,this,Object.create(null))}*[Symbol.iterator](){for(const t in h(rl,this)){const{data:e}=h(rl,this)[t];e!==al&&(yield[t,e])}}}function hl(t){var e;return(e=h(rl,this))[t]||(e[t]={...Promise.withResolvers(),data:al})}var cl=new WeakMap;class dl{constructor(t){r(this,cl,null),c(cl,this,t),this.onContinue=null}get promise(){return h(cl,this).capability.promise}cancel(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;h(cl,this).cancel(null,t)}get separateAnnots(){const{separateAnnots:t}=h(cl,this).operatorList;if(!t)return!1;const{annotationCanvasMap:e}=h(cl,this);return t.form||t.canvas&&(null===e||void 0===e?void 0:e.size)>0}}class ul{constructor(t){let{callback:e,params:i,objs:s,commonObjs:n,annotationCanvasMap:a,operatorList:r,pageIndex:o,canvasFactory:l,filterFactory:h,useRequestAnimationFrame:c=!1,pdfBug:d=!1,pageColors:u=null}=t;this.callback=e,this.params=i,this.objs=s,this.commonObjs=n,this.annotationCanvasMap=a,this.operatorListIdx=null,this.operatorList=r,this._pageIndex=o,this.canvasFactory=l,this.filterFactory=h,this._pdfBug=d,this.pageColors=u,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===c&&"undefined"!==typeof window,this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new dl(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=i.canvasContext.canvas}get completed(){return this.capability.promise.catch((function(){}))}initializeGraphics(t){var e,i;let{transparency:s=!1,optionalContentConfig:n}=t;if(this.cancelled)return;if(this._canvas){if(pl._.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");pl._.add(this._canvas)}this._pdfBug&&null!==(e=globalThis.StepperManager)&&void 0!==e&&e.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:a,viewport:r,transform:o,background:l}=this.params;this.gfx=new Na(a,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:n},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:o,viewport:r,transparency:s,background:l}),this.operatorListIdx=0,this.graphicsReady=!0,null===(i=this.graphicsReadyCallback)||void 0===i||i.call(this)}cancel(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.running=!1,this.cancelled=!0,null===(t=this.gfx)||void 0===t||t.endDrawing(),pl._.delete(this._canvas),this.callback(e||new Fe("Rendering cancelled, page ".concat(this._pageIndex+1),i))}operatorListChanged(){var t;this.graphicsReady?(null===(t=this.stepper)||void 0===t||t.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame((()=>{this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),pl._.delete(this._canvas),this.callback())))}}var pl={_:new WeakSet};const fl="4.3.136",gl="0cec64437";function ml(t){return Math.floor(255*Math.max(0,Math.min(1,t))).toString(16).padStart(2,"0")}function vl(t){return Math.max(0,Math.min(255,255*t))}class bl{static CMYK_G(t){let[e,i,s,n]=t;return["G",1-Math.min(1,.3*e+.59*s+.11*i+n)]}static G_CMYK(t){let[e]=t;return["CMYK",0,0,0,1-e]}static G_RGB(t){let[e]=t;return["RGB",e,e,e]}static G_rgb(t){let[e]=t;return e=vl(e),[e,e,e]}static G_HTML(t){let[e]=t;const i=ml(e);return"#".concat(i).concat(i).concat(i)}static RGB_G(t){let[e,i,s]=t;return["G",.3*e+.59*i+.11*s]}static RGB_rgb(t){return t.map(vl)}static RGB_HTML(t){return"#".concat(t.map(ml).join(""))}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB(t){let[e,i,s,n]=t;return["RGB",1-Math.min(1,e+n),1-Math.min(1,s+n),1-Math.min(1,i+n)]}static CMYK_rgb(t){let[e,i,s,n]=t;return[vl(1-Math.min(1,e+n)),vl(1-Math.min(1,s+n)),vl(1-Math.min(1,i+n))]}static CMYK_HTML(t){const e=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(e)}static RGB_CMYK(t){let[e,i,s]=t;const n=1-e,a=1-i,r=1-s;return["CMYK",n,a,r,Math.min(n,a,r)]}}class yl{static setupStorage(t,e,i,s,n){const a=s.getValue(e,{value:null});switch(i.name){case"textarea":if(null!==a.value&&(t.textContent=a.value),"print"===n)break;t.addEventListener("input",(t=>{s.setValue(e,{value:t.target.value})}));break;case"input":if("radio"===i.attributes.type||"checkbox"===i.attributes.type){if(a.value===i.attributes.xfaOn?t.setAttribute("checked",!0):a.value===i.attributes.xfaOff&&t.removeAttribute("checked"),"print"===n)break;t.addEventListener("change",(t=>{s.setValue(e,{value:t.target.checked?t.target.getAttribute("xfaOn"):t.target.getAttribute("xfaOff")})}))}else{if(null!==a.value&&t.setAttribute("value",a.value),"print"===n)break;t.addEventListener("input",(t=>{s.setValue(e,{value:t.target.value})}))}break;case"select":if(null!==a.value){t.setAttribute("value",a.value);for(const t of i.children)t.attributes.value===a.value?t.attributes.selected=!0:t.attributes.hasOwnProperty("selected")&&delete t.attributes.selected}t.addEventListener("input",(t=>{const i=t.target.options,n=-1===i.selectedIndex?"":i[i.selectedIndex].value;s.setValue(e,{value:n})}))}}static setAttributes(t){let{html:e,element:i,storage:s=null,intent:n,linkService:a}=t;const{attributes:r}=i,o=e instanceof HTMLAnchorElement;"radio"===r.type&&(r.name="".concat(r.name,"-").concat(n));for(const[l,h]of Object.entries(r))if(null!==h&&void 0!==h)switch(l){case"class":h.length&&e.setAttribute(l,h.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",h);break;case"style":Object.assign(e.style,h);break;case"textContent":e.textContent=h;break;default:(!o||"href"!==l&&"newWindow"!==l)&&e.setAttribute(l,h)}o&&a.addLinkAttributes(e,r.href,r.newWindow),s&&r.dataId&&this.setupStorage(e,r.dataId,i,s)}static render(t){const e=t.annotationStorage,i=t.linkService,s=t.xfaHtml,n=t.intent||"display",a=document.createElement(s.name);s.attributes&&this.setAttributes({html:a,element:s,intent:n,linkService:i});const r="richText"!==n,o=t.div;if(o.append(a),t.viewport){const e="matrix(".concat(t.viewport.transform.join(","),")");o.style.transform=e}r&&o.setAttribute("class","xfaLayer xfaFont");const l=[];if(0===s.children.length){if(s.value){const t=document.createTextNode(s.value);a.append(t),r&&So.shouldBuildText(s.name)&&l.push(t)}return{textDivs:l}}const h=[[s,-1,a]];for(;h.length>0;){var c,d;const[t,s,a]=h.at(-1);if(s+1===t.children.length){h.pop();continue}const o=t.children[++h.at(-1)[1]];if(null===o)continue;const{name:u}=o;if("#text"===u){const t=document.createTextNode(o.value);l.push(t),a.append(t);continue}const p=null!==o&&void 0!==o&&null!==(c=o.attributes)&&void 0!==c&&c.xmlns?document.createElementNS(o.attributes.xmlns,u):document.createElement(u);if(a.append(p),o.attributes&&this.setAttributes({html:p,element:o,storage:e,intent:n,linkService:i}),(null===(d=o.children)||void 0===d?void 0:d.length)>0)h.push([o,-1,p]);else if(o.value){const t=document.createTextNode(o.value);r&&So.shouldBuildText(u)&&l.push(t),p.append(t)}}for(const u of o.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))u.setAttribute("readOnly",!0);return{textDivs:l}}static update(t){const e="matrix(".concat(t.viewport.transform.join(","),")");t.div.style.transform=e,t.div.hidden=!1}}const Al=1e3,wl=new WeakSet;function _l(t){return{width:t[2]-t[0],height:t[3]-t[1]}}class xl{static create(t){switch(t.data.annotationType){case Y:return new Pl(t);case K:return new Fl(t);case dt:switch(t.data.fieldType){case"Tx":return new Nl(t);case"Btn":return t.data.radioButton?new Bl(t):t.data.checkBox?new jl(t):new Hl(t);case"Ch":return new zl(t);case"Sig":return new Wl(t)}return new Ol(t);case ht:return new Vl(t);case Q:return new Ah(t);case J:return new _h(t);case Z:return new Eh(t);case $:return new Sh(t);case et:return new Ch(t);case ot:return new Th(t);case lt:return new Lh(t);case tt:return new Rh(t);case it:return new Dh(t);case st:return new Ih(t);case nt:return new Fh(t);case at:return new Oh(t);case rt:return new Nh(t);case ct:return new Bh(t);default:return new Cl(t)}}}var El=new WeakMap,kl=new WeakMap,Sl=new WeakMap,Ml=new WeakSet;class Cl{constructor(t){let{isRenderable:e=!1,ignoreBorder:i=!1,createQuadrilaterals:s=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,Ml),r(this,El,null),r(this,kl,!1),r(this,Sl,null),this.isRenderable=e,this.data=t.data,this.layer=t.layer,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this.parent=t.parent,e&&(this.container=this._createContainer(i)),s&&this._createQuadrilaterals()}static _hasPopupData(t){let{titleObj:e,contentsObj:i,richText:s}=t;return!!(null!==e&&void 0!==e&&e.str||null!==i&&void 0!==i&&i.str||null!==s&&void 0!==s&&s.str)}get hasPopupData(){return Cl._hasPopupData(this.data)}updateEdited(t){var e;if(!this.container)return;h(El,this)||c(El,this,{rect:this.data.rect.slice(0)});const{rect:i}=t;i&&o(Ml,this,Rl).call(this,i),null===(e=h(Sl,this))||void 0===e||e.popup.updateEdited(t)}resetEdited(){var t;h(El,this)&&(o(Ml,this,Rl).call(this,h(El,this).rect),null===(t=h(Sl,this))||void 0===t||t.popup.resetEdited(),c(El,this,null))}_createContainer(t){const{data:e,parent:{page:i,viewport:s}}=this,n=document.createElement("section");n.setAttribute("data-annotation-id",e.id),this instanceof Ol||(n.tabIndex=Al);const{style:a}=n;if(a.zIndex=this.parent.zIndex++,e.popupRef&&n.setAttribute("aria-haspopup","dialog"),e.alternativeText&&(n.title=e.alternativeText),e.noRotate&&n.classList.add("norotate"),!e.rect||this instanceof Vl){const{rotation:t}=e;return e.hasOwnCanvas||0===t||this.setRotation(t,n),n}const{width:r,height:o}=_l(e.rect);if(!t&&e.borderStyle.width>0){a.borderWidth="".concat(e.borderStyle.width,"px");const t=e.borderStyle.horizontalCornerRadius,i=e.borderStyle.verticalCornerRadius;if(t>0||i>0){const e="calc(".concat(t,"px * var(--scale-factor)) / calc(").concat(i,"px * var(--scale-factor))");a.borderRadius=e}else if(this instanceof Bl){const t="calc(".concat(r,"px * var(--scale-factor)) / calc(").concat(o,"px * var(--scale-factor))");a.borderRadius=t}switch(e.borderStyle.style){case ut:a.borderStyle="solid";break;case pt:a.borderStyle="dashed";break;case ft:kt("Unimplemented border style: beveled");break;case gt:kt("Unimplemented border style: inset");break;case mt:a.borderBottomStyle="solid"}const s=e.borderColor||null;s?(c(kl,this,!0),a.borderColor=Vt.makeHexColor(0|s[0],0|s[1],0|s[2])):a.borderWidth=0}const l=Vt.normalizeRect([e.rect[0],i.view[3]-e.rect[1]+i.view[1],e.rect[2],i.view[3]-e.rect[3]+i.view[1]]),{pageWidth:h,pageHeight:d,pageX:u,pageY:p}=s.rawDims;a.left="".concat(100*(l[0]-u)/h,"%"),a.top="".concat(100*(l[1]-p)/d,"%");const{rotation:f}=e;return e.hasOwnCanvas||0===f?(a.width="".concat(100*r/h,"%"),a.height="".concat(100*o/d,"%")):this.setRotation(f,n),n}setRotation(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.container;if(!this.data.rect)return;const{pageWidth:i,pageHeight:s}=this.parent.viewport.rawDims,{width:n,height:a}=_l(this.data.rect);let r,o;t%180===0?(r=100*n/i,o=100*a/s):(r=100*a/i,o=100*n/s),e.style.width="".concat(r,"%"),e.style.height="".concat(o,"%"),e.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){const t=(t,e,i)=>{const s=i.detail[t],n=s[0],a=s.slice(1);i.target.style[e]=bl["".concat(n,"_HTML")](a),this.annotationStorage.setValue(this.data.id,{[e]:bl["".concat(n,"_rgb")](a)})};return Rt(this,"_commonActions",{display:t=>{const{display:e}=t.detail,i=e%2===1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:1===e||2===e})},print:t=>{this.annotationStorage.setValue(this.data.id,{noPrint:!t.detail.print})},hidden:t=>{const{hidden:e}=t.detail;this.container.style.visibility=e?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:e,noView:e})},focus:t=>{setTimeout((()=>t.target.focus({preventScroll:!1})),0)},userName:t=>{t.target.title=t.detail.userName},readonly:t=>{t.target.disabled=t.detail.readonly},required:t=>{this._setRequired(t.target,t.detail.required)},bgColor:e=>{t("bgColor","backgroundColor",e)},fillColor:e=>{t("fillColor","backgroundColor",e)},fgColor:e=>{t("fgColor","color",e)},textColor:e=>{t("textColor","color",e)},borderColor:e=>{t("borderColor","borderColor",e)},strokeColor:e=>{t("strokeColor","borderColor",e)},rotation:t=>{const e=t.detail.rotation;this.setRotation(e),this.annotationStorage.setValue(this.data.id,{rotation:e})}})}_dispatchEventFromSandbox(t,e){const i=this._commonActions;for(const s of Object.keys(e.detail)){const n=t[s]||i[s];null===n||void 0===n||n(e)}}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;const e=this.annotationStorage.getRawValue(this.data.id);if(!e)return;const i=this._commonActions;for(const[s,n]of Object.entries(e)){const a=i[s];if(a){a({detail:{[s]:n},target:t}),delete e[s]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:t}=this.data;if(!t)return;const[e,i,s,n]=this.data.rect;if(1===t.length){const[,{x:a,y:r},{x:o,y:l}]=t[0];if(s===a&&n===r&&e===o&&i===l)return}const{style:a}=this.container;let r;if(h(kl,this)){const{borderColor:t,borderWidth:e}=a;a.borderWidth=0,r=["url('data:image/svg+xml;utf8,",'','')],this.container.classList.add("hasBorder")}const o=s-e,l=n-i,{svgFactory:c}=this,d=c.createElement("svg");d.classList.add("quadrilateralsContainer"),d.setAttribute("width",0),d.setAttribute("height",0);const u=c.createElement("defs");d.append(u);const p=c.createElement("clipPath"),f="clippath_".concat(this.data.id);p.setAttribute("id",f),p.setAttribute("clipPathUnits","objectBoundingBox"),u.append(p);for(const[,{x:h,y:m},{x:v,y:b}]of t){var g;const t=c.createElement("rect"),i=(v-e)/o,s=(n-m)/l,a=(h-v)/o,d=(m-b)/l;t.setAttribute("x",i),t.setAttribute("y",s),t.setAttribute("width",a),t.setAttribute("height",d),p.append(t),null===(g=r)||void 0===g||g.push(''))}h(kl,this)&&(r.push("')"),a.backgroundImage=r.join("")),this.container.append(d),this.container.style.clipPath="url(#".concat(f,")")}_createPopup(){const{container:t,data:e}=this;t.setAttribute("aria-haspopup","dialog");const i=c(Sl,this,new Vl({data:{color:e.color,titleObj:e.titleObj,modificationDate:e.modificationDate,contentsObj:e.contentsObj,richText:e.richText,parentRect:e.rect,borderStyle:0,id:"popup_".concat(e.id),rotation:e.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(i.render())}render(){St("Abstract method `AnnotationElement.render` called")}_getElementsByName(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const i=[];if(this._fieldObjects){const s=this._fieldObjects[t];if(s)for(const{page:t,id:n,exportValues:a}of s){if(-1===t)continue;if(n===e)continue;const s="string"===typeof a?a:null,r=document.querySelector('[data-element-id="'.concat(n,'"]'));!r||wl.has(r)?i.push({id:n,exportValue:s,domElement:r}):kt("_getElementsByName - element not allowed: ".concat(n))}return i}for(const s of document.getElementsByName(t)){const{exportValue:t}=s,n=s.getAttribute("data-element-id");n!==e&&(wl.has(s)&&i.push({id:n,exportValue:t,domElement:s}))}return i}show(){var t;this.container&&(this.container.hidden=!1),null===(t=this.popup)||void 0===t||t.maybeShow()}hide(){var t;this.container&&(this.container.hidden=!0),null===(t=this.popup)||void 0===t||t.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(const e of t)e.classList.add("highlightArea");else t.classList.add("highlightArea")}get _isEditable(){return!1}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:t,data:{id:e}}=this;this.container.addEventListener("dblclick",(()=>{var i;null===(i=this.linkService.eventBus)||void 0===i||i.dispatch("switchannotationeditormode",{source:this,mode:t,editId:e})}))}}function Rl(t){const{container:{style:e},data:{rect:i,rotation:s},parent:{viewport:{rawDims:{pageWidth:n,pageHeight:a,pageX:r,pageY:o}}}}=this;null===i||void 0===i||i.splice(0,4,...t);const{width:l,height:h}=_l(t);e.left="".concat(100*(t[0]-r)/n,"%"),e.top="".concat(100*(a-t[3]+o)/a,"%"),0===s?(e.width="".concat(100*l/n,"%"),e.height="".concat(100*h/a,"%")):this.setRotation(s)}var Tl=new WeakSet;class Pl extends Cl{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super(t,{isRenderable:!0,ignoreBorder:!(null===e||void 0===e||!e.ignoreBorder),createQuadrilaterals:!0}),a(this,Tl),this.isTooltipOnly=t.data.isTooltipOnly}render(){const{data:t,linkService:e}=this,i=document.createElement("a");i.setAttribute("data-element-id",t.id);let s=!1;return t.url?(e.addLinkAttributes(i,t.url,t.newWindow),s=!0):t.action?(this._bindNamedAction(i,t.action),s=!0):t.attachment?(o(Tl,this,Dl).call(this,i,t.attachment,t.attachmentDest),s=!0):t.setOCGState?(o(Tl,this,Il).call(this,i,t.setOCGState),s=!0):t.dest?(this._bindLink(i,t.dest),s=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(i,t),s=!0),t.resetForm?(this._bindResetFormAction(i,t.resetForm),s=!0):this.isTooltipOnly&&!s&&(this._bindLink(i,""),s=!0)),this.container.classList.add("linkAnnotation"),s&&this.container.append(i),this.container}_bindLink(t,e){t.href=this.linkService.getDestinationHash(e),t.onclick=()=>(e&&this.linkService.goToDestination(e),!1),(e||""===e)&&o(Tl,this,Ll).call(this)}_bindNamedAction(t,e){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(e),!1),o(Tl,this,Ll).call(this)}_bindJSAction(t,e){t.href=this.linkService.getAnchorUrl("");const i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const s of Object.keys(e.actions)){const n=i.get(s);n&&(t[n]=()=>{var t;return null===(t=this.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e.id,name:s}}),!1})}t.onclick||(t.onclick=()=>!1),o(Tl,this,Ll).call(this)}_bindResetFormAction(t,e){const i=t.onclick;if(i||(t.href=this.linkService.getAnchorUrl("")),o(Tl,this,Ll).call(this),!this._fieldObjects)return kt('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(i||(t.onclick=()=>!1));t.onclick=()=>{null===i||void 0===i||i();const{fields:t,refs:s,include:n}=e,a=[];if(0!==t.length||0!==s.length){const e=new Set(s);for(const i of t){const t=this._fieldObjects[i]||[];for(const{id:i}of t)e.add(i)}for(const t of Object.values(this._fieldObjects))for(const i of t)e.has(i.id)===n&&a.push(i)}else for(const e of Object.values(this._fieldObjects))a.push(...e);const r=this.annotationStorage,o=[];for(const e of a){const{id:t}=e;switch(o.push(t),e.type){case"text":{const i=e.defaultValue||"";r.setValue(t,{value:i});break}case"checkbox":case"radiobutton":{const i=e.defaultValue===e.exportValues;r.setValue(t,{value:i});break}case"combobox":case"listbox":{const i=e.defaultValue||"";r.setValue(t,{value:i});break}default:continue}const i=document.querySelector('[data-element-id="'.concat(t,'"]'));i&&(wl.has(i)?i.dispatchEvent(new Event("resetform")):kt("_bindResetFormAction - element not allowed: ".concat(t)))}var l;this.enableScripting&&(null===(l=this.linkService.eventBus)||void 0===l||l.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:o,name:"ResetForm"}}));return!1}}}function Ll(){this.container.setAttribute("data-internal-link","")}function Dl(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t.href=this.linkService.getAnchorUrl(""),e.description&&(t.title=e.description),t.onclick=()=>{var t;return null===(t=this.downloadManager)||void 0===t||t.openOrDownloadData(e.content,e.filename,i),!1},o(Tl,this,Ll).call(this)}function Il(t,e){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeSetOCGState(e),!1),o(Tl,this,Ll).call(this)}class Fl extends Cl{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(t),this.container}}class Ol extends Cl{render(){return this.container}showElementAndHideCanvas(t){var e;this.data.hasOwnCanvas&&("CANVAS"===(null===(e=t.previousSibling)||void 0===e?void 0:e.nodeName)&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){return Ht.platform.isMac?t.metaKey:t.ctrlKey}_setEventListener(t,e,i,s,n){i.includes("mouse")?t.addEventListener(i,(t=>{var e;null===(e=this.linkService.eventBus)||void 0===e||e.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:s,value:n(t),shift:t.shiftKey,modifier:this._getKeyModifier(t)}})})):t.addEventListener(i,(t=>{var a;if("blur"===i){if(!e.focused||!t.relatedTarget)return;e.focused=!1}else if("focus"===i){if(e.focused)return;e.focused=!0}n&&(null===(a=this.linkService.eventBus)||void 0===a||a.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:s,value:n(t)}}))}))}_setEventListeners(t,e,i,s){for(const[o,l]of i){var n,a,r;if("Action"===l||null!==(n=this.data.actions)&&void 0!==n&&n[l])"Focus"!==l&&"Blur"!==l||e||(e={focused:!1}),this._setEventListener(t,e,o,l,s),"Focus"!==l||null!==(a=this.data.actions)&&void 0!==a&&a.Blur?"Blur"!==l||null!==(r=this.data.actions)&&void 0!==r&&r.Focus||this._setEventListener(t,e,"focus","Focus",null):this._setEventListener(t,e,"blur","Blur",null)}}_setBackgroundColor(t){const e=this.data.backgroundColor||null;t.style.backgroundColor=null===e?"transparent":Vt.makeHexColor(e[0],e[1],e[2])}_setTextStyle(t){const e=["left","center","right"],{fontColor:i}=this.data.defaultAppearanceData,s=this.data.defaultAppearanceData.fontSize||9,n=t.style;let a;const r=t=>Math.round(10*t)/10;if(this.data.multiLine){const t=Math.abs(this.data.rect[3]-this.data.rect[1]-2),e=t/(Math.round(t/(R*s))||1);a=Math.min(s,r(e/R))}else{const t=Math.abs(this.data.rect[3]-this.data.rect[1]-2);a=Math.min(s,r(t/R))}n.fontSize="calc(".concat(a,"px * var(--scale-factor))"),n.color=Vt.makeHexColor(i[0],i[1],i[2]),null!==this.data.textAlignment&&(n.textAlign=e[this.data.textAlignment])}_setRequired(t,e){e?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",e)}}class Nl extends Ol{constructor(t){super(t,{isRenderable:t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue})}setPropertyOnSiblings(t,e,i,s){const n=this.annotationStorage;for(const a of this._getElementsByName(t.name,t.id))a.domElement&&(a.domElement[e]=i),n.setValue(a.id,{[s]:i})}render(){const t=this.annotationStorage,e=this.data.id;this.container.classList.add("textWidgetAnnotation");let i=null;if(this.renderForms){var s;const o=t.getValue(e,{value:this.data.fieldValue});let l=o.value||"";const h=t.getValue(e,{charLimit:this.data.maxLen}).charLimit;h&&l.length>h&&(l=l.slice(0,h));let c=o.formattedValue||(null===(s=this.data.textContent)||void 0===s?void 0:s.join("\n"))||null;c&&this.data.comb&&(c=c.replaceAll(/\s+/g,""));const d={userValue:l,formattedValue:c,lastCommittedValue:null,commitKey:1,focused:!1};var n,a;if(this.data.multiLine)i=document.createElement("textarea"),i.textContent=null!==(n=c)&&void 0!==n?n:l,this.data.doNotScroll&&(i.style.overflowY="hidden");else i=document.createElement("input"),i.type="text",i.setAttribute("value",null!==(a=c)&&void 0!==a?a:l),this.data.doNotScroll&&(i.style.overflowX="hidden");this.data.hasOwnCanvas&&(i.hidden=!0),wl.add(i),i.setAttribute("data-element-id",e),i.disabled=this.data.readOnly,i.name=this.data.fieldName,i.tabIndex=Al,this._setRequired(i,this.data.required),h&&(i.maxLength=h),i.addEventListener("input",(s=>{t.setValue(e,{value:s.target.value}),this.setPropertyOnSiblings(i,"value",s.target.value,"value"),d.formattedValue=null})),i.addEventListener("resetform",(t=>{var e;const s=null!==(e=this.data.defaultFieldValue)&&void 0!==e?e:"";i.value=d.userValue=s,d.formattedValue=null}));let u=t=>{const{formattedValue:e}=d;null!==e&&void 0!==e&&(t.target.value=e),t.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){var r;i.addEventListener("focus",(t=>{var e;if(d.focused)return;const{target:i}=t;d.userValue&&(i.value=d.userValue),d.lastCommittedValue=i.value,d.commitKey=1,null!==(e=this.data.actions)&&void 0!==e&&e.Focus||(d.focused=!0)})),i.addEventListener("updatefromsandbox",(i=>{this.showElementAndHideCanvas(i.target);const s={value(i){var s;d.userValue=null!==(s=i.detail.value)&&void 0!==s?s:"",t.setValue(e,{value:d.userValue.toString()}),i.target.value=d.userValue},formattedValue(i){const{formattedValue:s}=i.detail;d.formattedValue=s,null!==s&&void 0!==s&&i.target!==document.activeElement&&(i.target.value=s),t.setValue(e,{formattedValue:s})},selRange(t){t.target.setSelectionRange(...t.detail.selRange)},charLimit:i=>{var s;const{charLimit:n}=i.detail,{target:a}=i;if(0===n)return void a.removeAttribute("maxLength");a.setAttribute("maxLength",n);let r=d.userValue;!r||r.length<=n||(r=r.slice(0,n),a.value=d.userValue=r,t.setValue(e,{value:r}),null===(s=this.linkService.eventBus)||void 0===s||s.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:r,willCommit:!0,commitKey:1,selStart:a.selectionStart,selEnd:a.selectionEnd}}))}};this._dispatchEventFromSandbox(s,i)})),i.addEventListener("keydown",(t=>{var i;d.commitKey=1;let s=-1;if("Escape"===t.key?s=0:"Enter"!==t.key||this.data.multiLine?"Tab"===t.key&&(d.commitKey=3):s=2,-1===s)return;const{value:n}=t.target;d.lastCommittedValue!==n&&(d.lastCommittedValue=n,d.userValue=n,null===(i=this.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:n,willCommit:!0,commitKey:s,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}}))}));const s=u;u=null,i.addEventListener("blur",(t=>{var i;if(!d.focused||!t.relatedTarget)return;null!==(i=this.data.actions)&&void 0!==i&&i.Blur||(d.focused=!1);const{value:n}=t.target;var a;(d.userValue=n,d.lastCommittedValue!==n)&&(null===(a=this.linkService.eventBus)||void 0===a||a.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:n,willCommit:!0,commitKey:d.commitKey,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}}));s(t)})),null!==(r=this.data.actions)&&void 0!==r&&r.Keystroke&&i.addEventListener("beforeinput",(t=>{var i;d.lastCommittedValue=null;const{data:s,target:n}=t,{value:a,selectionStart:r,selectionEnd:o}=n;let l=r,h=o;switch(t.inputType){case"deleteWordBackward":{const t=a.substring(0,r).match(/\w*[^\w]*$/);t&&(l-=t[0].length);break}case"deleteWordForward":{const t=a.substring(r).match(/^[^\w]*\w*/);t&&(h+=t[0].length);break}case"deleteContentBackward":r===o&&(l-=1);break;case"deleteContentForward":r===o&&(h+=1)}t.preventDefault(),null===(i=this.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:a,change:s||"",willCommit:!1,selStart:l,selEnd:h}})})),this._setEventListeners(i,d,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(t=>t.target.value))}if(u&&i.addEventListener("blur",u),this.data.comb){const t=(this.data.rect[2]-this.data.rect[0])/h;i.classList.add("comb"),i.style.letterSpacing="calc(".concat(t,"px * var(--scale-factor) - 1ch)")}}else i=document.createElement("div"),i.textContent=this.data.fieldValue,i.style.verticalAlign="middle",i.style.display="table-cell",this.data.hasOwnCanvas&&(i.hidden=!0);return this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class Wl extends Ol{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class jl extends Ol{constructor(t){super(t,{isRenderable:t.renderForms})}render(){const t=this.annotationStorage,e=this.data,i=e.id;let s=t.getValue(i,{value:e.exportValue===e.fieldValue}).value;"string"===typeof s&&(s="Off"!==s,t.setValue(i,{value:s})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const n=document.createElement("input");return wl.add(n),n.setAttribute("data-element-id",i),n.disabled=e.readOnly,this._setRequired(n,this.data.required),n.type="checkbox",n.name=e.fieldName,s&&n.setAttribute("checked",!0),n.setAttribute("exportValue",e.exportValue),n.tabIndex=Al,n.addEventListener("change",(s=>{const{name:n,checked:a}=s.target;for(const r of this._getElementsByName(n,i)){const i=a&&r.exportValue===e.exportValue;r.domElement&&(r.domElement.checked=i),t.setValue(r.id,{value:i})}t.setValue(i,{value:a})})),n.addEventListener("resetform",(t=>{const i=e.defaultFieldValue||"Off";t.target.checked=i===e.exportValue})),this.enableScripting&&this.hasJSActions&&(n.addEventListener("updatefromsandbox",(e=>{const s={value(e){e.target.checked="Off"!==e.detail.value,t.setValue(i,{value:e.target.checked})}};this._dispatchEventFromSandbox(s,e)})),this._setEventListeners(n,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(t=>t.target.checked))),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class Bl extends Ol{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const t=this.annotationStorage,e=this.data,i=e.id;let s=t.getValue(i,{value:e.fieldValue===e.buttonValue}).value;if("string"===typeof s&&(s=s!==e.buttonValue,t.setValue(i,{value:s})),s)for(const a of this._getElementsByName(e.fieldName,i))t.setValue(a.id,{value:!1});const n=document.createElement("input");if(wl.add(n),n.setAttribute("data-element-id",i),n.disabled=e.readOnly,this._setRequired(n,this.data.required),n.type="radio",n.name=e.fieldName,s&&n.setAttribute("checked",!0),n.tabIndex=Al,n.addEventListener("change",(e=>{const{name:s,checked:n}=e.target;for(const a of this._getElementsByName(s,i))t.setValue(a.id,{value:!1});t.setValue(i,{value:n})})),n.addEventListener("resetform",(t=>{const i=e.defaultFieldValue;t.target.checked=null!==i&&void 0!==i&&i===e.buttonValue})),this.enableScripting&&this.hasJSActions){const s=e.buttonValue;n.addEventListener("updatefromsandbox",(e=>{const n={value:e=>{const n=s===e.detail.value;for(const s of this._getElementsByName(e.target.name)){const e=n&&s.id===i;s.domElement&&(s.domElement.checked=e),t.setValue(s.id,{value:e})}}};this._dispatchEventFromSandbox(n,e)})),this._setEventListeners(n,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(t=>t.target.checked))}return this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class Hl extends Pl{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){const t=super.render();t.classList.add("buttonWidgetAnnotation","pushButton");const e=t.lastChild;return this.enableScripting&&this.hasJSActions&&e&&(this._setDefaultPropertiesFromJS(e),e.addEventListener("updatefromsandbox",(t=>{this._dispatchEventFromSandbox({},t)}))),t}}class zl extends Ol{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const t=this.annotationStorage,e=this.data.id,i=t.getValue(e,{value:this.data.fieldValue}),s=document.createElement("select");wl.add(s),s.setAttribute("data-element-id",e),s.disabled=this.data.readOnly,this._setRequired(s,this.data.required),s.name=this.data.fieldName,s.tabIndex=Al;let n=this.data.combo&&this.data.options.length>0;this.data.combo||(s.size=this.data.options.length,this.data.multiSelect&&(s.multiple=!0)),s.addEventListener("resetform",(t=>{const e=this.data.defaultFieldValue;for(const i of s.options)i.selected=i.value===e}));for(const h of this.data.options){const t=document.createElement("option");t.textContent=h.displayValue,t.value=h.exportValue,i.value.includes(h.exportValue)&&(t.setAttribute("selected",!0),n=!1),s.append(t)}let a=null;if(n){const t=document.createElement("option");t.value=" ",t.setAttribute("hidden",!0),t.setAttribute("selected",!0),s.prepend(t),a=()=>{t.remove(),s.removeEventListener("input",a),a=null},s.addEventListener("input",a)}const r=t=>{const e=t?"value":"textContent",{options:i,multiple:n}=s;return n?Array.prototype.filter.call(i,(t=>t.selected)).map((t=>t[e])):-1===i.selectedIndex?null:i[i.selectedIndex][e]};let o=r(!1);const l=t=>{const e=t.target.options;return Array.prototype.map.call(e,(t=>({displayValue:t.textContent,exportValue:t.value})))};return this.enableScripting&&this.hasJSActions?(s.addEventListener("updatefromsandbox",(i=>{const n={value(i){var n;null===(n=a)||void 0===n||n();const l=i.detail.value,h=new Set(Array.isArray(l)?l:[l]);for(const t of s.options)t.selected=h.has(t.value);t.setValue(e,{value:r(!0)}),o=r(!1)},multipleSelection(t){s.multiple=!0},remove(i){const n=s.options,a=i.detail.remove;if(n[a].selected=!1,s.remove(a),n.length>0){-1===Array.prototype.findIndex.call(n,(t=>t.selected))&&(n[0].selected=!0)}t.setValue(e,{value:r(!0),items:l(i)}),o=r(!1)},clear(i){for(;0!==s.length;)s.remove(0);t.setValue(e,{value:null,items:[]}),o=r(!1)},insert(i){const{index:n,displayValue:a,exportValue:h}=i.detail.insert,c=s.children[n],d=document.createElement("option");d.textContent=a,d.value=h,c?c.before(d):s.append(d),t.setValue(e,{value:r(!0),items:l(i)}),o=r(!1)},items(i){const{items:n}=i.detail;for(;0!==s.length;)s.remove(0);for(const t of n){const{displayValue:e,exportValue:i}=t,n=document.createElement("option");n.textContent=e,n.value=i,s.append(n)}s.options.length>0&&(s.options[0].selected=!0),t.setValue(e,{value:r(!0),items:l(i)}),o=r(!1)},indices(i){const s=new Set(i.detail.indices);for(const t of i.target.options)t.selected=s.has(t.index);t.setValue(e,{value:r(!0)}),o=r(!1)},editable(t){t.target.disabled=!t.detail.editable}};this._dispatchEventFromSandbox(n,i)})),s.addEventListener("input",(i=>{var s;const n=r(!0),a=r(!1);t.setValue(e,{value:n}),i.preventDefault(),null===(s=this.linkService.eventBus)||void 0===s||s.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:o,change:a,changeEx:n,willCommit:!1,commitKey:1,keyDown:!1}})})),this._setEventListeners(s,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(t=>t.target.value))):s.addEventListener("input",(function(i){t.setValue(e,{value:r(!0)})})),this.data.combo&&this._setTextStyle(s),this._setBackgroundColor(s),this._setDefaultPropertiesFromJS(s),this.container.append(s),this.container}}class Vl extends Cl{constructor(t){const{data:e,elements:i}=t;super(t,{isRenderable:Cl._hasPopupData(e)}),this.elements=i,this.popup=null}render(){this.container.classList.add("popupAnnotation");const t=this.popup=new ch({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),e=[];for(const i of this.elements)i.popup=t,e.push(i.data.id),i.addHighlightArea();return this.container.setAttribute("aria-controls",e.map((t=>"".concat(Yt).concat(t))).join(",")),this.container}}var Gl=new WeakMap,Ul=new WeakMap,ql=new WeakMap,Xl=new WeakMap,Kl=new WeakMap,Yl=new WeakMap,Ql=new WeakMap,Jl=new WeakMap,Zl=new WeakMap,$l=new WeakMap,th=new WeakMap,eh=new WeakMap,ih=new WeakMap,sh=new WeakMap,nh=new WeakMap,ah=new WeakMap,rh=new WeakMap,oh=new WeakMap,lh=new WeakMap,hh=new WeakSet;class ch{constructor(t){let{container:e,color:i,elements:s,titleObj:n,modificationDate:l,contentsObj:d,richText:u,parent:p,rect:f,parentRect:g,open:m}=t;a(this,hh),r(this,Gl,o(hh,this,gh).bind(this)),r(this,Ul,o(hh,this,yh).bind(this)),r(this,ql,o(hh,this,bh).bind(this)),r(this,Xl,o(hh,this,vh).bind(this)),r(this,Kl,null),r(this,Yl,null),r(this,Ql,null),r(this,Jl,null),r(this,Zl,null),r(this,$l,null),r(this,th,null),r(this,eh,!1),r(this,ih,null),r(this,sh,null),r(this,nh,null),r(this,ah,null),r(this,rh,null),r(this,oh,null),r(this,lh,!1),c(Yl,this,e),c(rh,this,n),c(Ql,this,d),c(ah,this,u),c($l,this,p),c(Kl,this,i),c(nh,this,f),c(th,this,g),c(Zl,this,s),c(Jl,this,Ue.toDateObject(l)),this.trigger=s.flatMap((t=>t.getElementsToTriggerPopup()));for(const a of this.trigger)a.addEventListener("click",h(Xl,this)),a.addEventListener("mouseenter",h(ql,this)),a.addEventListener("mouseleave",h(Ul,this)),a.classList.add("popupTriggerArea");for(const a of s){var v;null===(v=a.container)||void 0===v||v.addEventListener("keydown",h(Gl,this))}h(Yl,this).hidden=!0,m&&o(hh,this,vh).call(this)}render(){if(h(ih,this))return;const t=c(ih,this,document.createElement("div"));if(t.className="popup",h(Kl,this)){const e=t.style.outlineColor=Vt.makeHexColor(...h(Kl,this));if(CSS.supports("background-color","color-mix(in srgb, red 30%, white)"))t.style.backgroundColor="color-mix(in srgb, ".concat(e," 30%, white)");else{const e=.7;t.style.backgroundColor=Vt.makeHexColor(...h(Kl,this).map((t=>Math.floor(e*(255-t)+t))))}}const e=document.createElement("span");e.className="header";const i=document.createElement("h1");if(e.append(i),({dir:i.dir,str:i.textContent}=h(rh,this)),t.append(e),h(Jl,this)){const t=document.createElement("span");t.classList.add("popupDate"),t.setAttribute("data-l10n-id","pdfjs-annotation-date-string"),t.setAttribute("data-l10n-args",JSON.stringify({date:h(Jl,this).toLocaleDateString(),time:h(Jl,this).toLocaleTimeString()})),e.append(t)}const s=l(hh,this,dh);if(s)yl.render({xfaHtml:s,intent:"richText",div:t}),t.lastChild.classList.add("richText","popupContent");else{const e=this._formatContents(h(Ql,this));t.append(e)}h(Yl,this).append(t)}_formatContents(t){let{str:e,dir:i}=t;const s=document.createElement("p");s.classList.add("popupContent"),s.dir=i;const n=e.split(/(?:\r\n?|\n)/);for(let a=0,r=n.length;a{"Enter"===t.key&&(s?t.metaKey:t.ctrlKey)&&o(jh,this,Hh).call(this)})),!e.popupRef&&this.hasPopupData?this._createPopup():i.classList.add("popupTriggerArea"),t.append(i),t}getElementsToTriggerPopup(){return h(Wh,this)}addHighlightArea(){this.container.classList.add("highlightArea")}}function Hh(){var t;null===(t=this.downloadManager)||void 0===t||t.openOrDownloadData(this.content,this.filename)}var zh=new WeakMap,Vh=new WeakMap,Gh=new WeakMap,Uh=new WeakSet;class qh{constructor(t){let{div:e,accessibilityManager:i,annotationCanvasMap:s,annotationEditorUIManager:n,page:o,viewport:l}=t;a(this,Uh),r(this,zh,null),r(this,Vh,null),r(this,Gh,new Map),this.div=e,c(zh,this,i),c(Vh,this,s),this.page=o,this.viewport=l,this.zIndex=0,this._annotationEditorUIManager=n}async render(t){const{annotations:e}=t,i=this.div;Qe(i,this.viewport);const s=new Map,n={data:null,layer:i,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:!1!==t.renderForms,svgFactory:new De,annotationStorage:t.annotationStorage||new Zn,enableScripting:!0===t.enableScripting,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(const r of e){if(r.noHTML)continue;const t=r.annotationType===ht;if(t){const t=s.get(r.id);if(!t)continue;n.elements=t}else{const{width:t,height:e}=_l(r.rect);if(t<=0||e<=0)continue}n.data=r;const e=xl.create(n);if(!e.isRenderable)continue;if(!t&&r.popupRef){const t=s.get(r.popupRef);t?t.push(e):s.set(r.popupRef,[e])}const i=e.render();var a;if(r.hidden&&(i.style.visibility="hidden"),o(Uh,this,Xh).call(this,i,r.id),e.annotationEditorType>0)h(Gh,this).set(e.data.id,e),null===(a=this._annotationEditorUIManager)||void 0===a||a.renderAnnotationElement(e)}o(Uh,this,Kh).call(this)}update(t){let{viewport:e}=t;const i=this.div;this.viewport=e,Qe(i,{rotation:e.rotation}),o(Uh,this,Kh).call(this),i.hidden=!1}getEditableAnnotations(){return Array.from(h(Gh,this).values())}getEditableAnnotation(t){return h(Gh,this).get(t)}}function Xh(t,e){var i;const s=t.firstChild||t;s.id="".concat(Yt).concat(e),this.div.append(t),null===(i=h(zh,this))||void 0===i||i.moveElementInDOM(this.div,t,s,!1)}function Kh(){if(!h(Vh,this))return;const t=this.div;for(const[e,i]of h(Vh,this)){const s=t.querySelector('[data-annotation-id="'.concat(e,'"]'));if(!s)continue;i.className="annotationContent";const{firstChild:n}=s;n?"CANVAS"===n.nodeName?n.replaceWith(i):n.classList.contains("annotationContent")?n.after(i):n.before(i):s.append(i)}h(Vh,this).clear()}const Yh=/\r\n?|\n/g;var Qh=new WeakMap,Jh=new WeakMap,Zh=new WeakMap,$h=new WeakMap,tc=new WeakMap,ec=new WeakMap,ic=new WeakMap,sc=new WeakMap,nc=new WeakMap,ac=new WeakMap,rc=new WeakSet;class oc extends Cn{static get _keyboardManager(){const t=oc.prototype,e=t=>t.isEmpty(),i=Cs.TRANSLATE_SMALL,s=Cs.TRANSLATE_BIG;return Rt(this,"_keyboardManager",new Li([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-i,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-s,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[i,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[s,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-i],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-s],checker:e}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,i],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,s],checker:e}]]))}constructor(t){super({...t,name:"freeTextEditor"}),a(this,rc),r(this,Qh,this.editorDivBlur.bind(this)),r(this,Jh,this.editorDivFocus.bind(this)),r(this,Zh,this.editorDivInput.bind(this)),r(this,$h,this.editorDivKeydown.bind(this)),r(this,tc,this.editorDivPaste.bind(this)),r(this,ec,void 0),r(this,ic,""),r(this,sc,"".concat(this.id,"-editor")),r(this,nc,void 0),r(this,ac,null),c(ec,this,t.color||oc._defaultColor||Cn._defaultLineColor),c(nc,this,t.fontSize||oc._defaultFontSize)}static initialize(t,e){Cn.initialize(t,e,{strings:["pdfjs-free-text-default-content"]});const i=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(i.getPropertyValue("--freetext-padding"))}static updateDefaultParams(t,e){switch(t){case j.FREETEXT_SIZE:oc._defaultFontSize=e;break;case j.FREETEXT_COLOR:oc._defaultColor=e}}updateParams(t,e){switch(t){case j.FREETEXT_SIZE:o(rc,this,lc).call(this,e);break;case j.FREETEXT_COLOR:o(rc,this,hc).call(this,e)}}static get defaultPropertiesToUpdate(){return[[j.FREETEXT_SIZE,oc._defaultFontSize],[j.FREETEXT_COLOR,oc._defaultColor||Cn._defaultLineColor]]}get propertiesToUpdate(){return[[j.FREETEXT_SIZE,h(nc,this)],[j.FREETEXT_COLOR,h(ec,this)]]}_translateEmpty(t,e){this._uiManager.translateSelectedEditors(t,e,!0)}getInitialTranslation(){const t=this.parentScale;return[-oc._internalPadding*t,-(oc._internalPadding+h(nc,this))*t]}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(W.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",h($h,this)),this.editorDiv.addEventListener("focus",h(Jh,this)),this.editorDiv.addEventListener("blur",h(Qh,this)),this.editorDiv.addEventListener("input",h(Zh,this)),this.editorDiv.addEventListener("paste",h(tc,this)))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",h(sc,this)),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",h($h,this)),this.editorDiv.removeEventListener("focus",h(Jh,this)),this.editorDiv.removeEventListener("blur",h(Qh,this)),this.editorDiv.removeEventListener("input",h(Zh,this)),this.editorDiv.removeEventListener("paste",h(tc,this)),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"))}focusin(t){this._focusEventsAllowed&&(super.focusin(t),t.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){var t;this.width||(this.enableEditMode(),this.editorDiv.focus(),null!==(t=this._initialOptions)&&void 0!==t&&t.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const t=h(ic,this),e=c(ic,this,o(rc,this,cc).call(this).trimEnd());if(t===e)return;const i=t=>{c(ic,this,t),t?(o(rc,this,pc).call(this),this._uiManager.rebuild(this),o(rc,this,dc).call(this)):this.remove()};this.addCommands({cmd:()=>{i(e)},undo:()=>{i(t)},mustExec:!1}),o(rc,this,dc).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(t){this.enterInEditMode()}keydown(t){t.target===this.div&&"Enter"===t.key&&(this.enterInEditMode(),t.preventDefault())}editorDivKeydown(t){oc._keyboardManager.exec(this,t)}editorDivFocus(t){this.isEditing=!0}editorDivBlur(t){this.isEditing=!1}editorDivInput(t){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let t,e;this.width&&(t=this.x,e=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",h(sc,this)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text"),this.enableEditing(),Cn._l10nPromise.get("pdfjs-free-text-default-content").then((t=>{var e;return null===(e=this.editorDiv)||void 0===e?void 0:e.setAttribute("default-content",t)})),this.editorDiv.contentEditable=!0;const{style:i}=this.editorDiv;if(i.fontSize="calc(".concat(h(nc,this),"px * var(--scale-factor))"),i.color=h(ec,this),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),vi(this,this.div,["dblclick","keydown"]),this.width){const[i,s]=this.parentDimensions;if(this.annotationElementId){const{position:n}=h(ac,this);let[a,r]=this.getInitialTranslation();[a,r]=this.pageTranslationToScreen(a,r);const[o,l]=this.pageDimensions,[c,d]=this.pageTranslation;let u,p;switch(this.rotation){case 0:u=t+(n[0]-c)/o,p=e+this.height-(n[1]-d)/l;break;case 90:u=t+(n[0]-c)/o,p=e-(n[1]-d)/l,[a,r]=[r,-a];break;case 180:u=t-this.width+(n[0]-c)/o,p=e-(n[1]-d)/l,[a,r]=[-a,-r];break;case 270:u=t+(n[0]-c-this.height*l)/o,p=e+(n[1]-d-this.width*o)/l,[a,r]=[-r,a]}this.setAt(u*i,p*s,a,r)}else this.setAt(t*i,e*s,this.width*i,this.height*s);o(rc,this,pc).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(t){const e=t.clipboardData||window.clipboardData,{types:i}=e;if(1===i.length&&"text/plain"===i[0])return;t.preventDefault();const s=gc.call(oc,e.getData("text")||"").replaceAll(Yh,"\n");if(!s)return;const n=window.getSelection();if(!n.rangeCount)return;this.editorDiv.normalize(),n.deleteFromDocument();const a=n.getRangeAt(0);if(!s.includes("\n"))return a.insertNode(document.createTextNode(s)),this.editorDiv.normalize(),void n.collapseToStart();const{startContainer:r,startOffset:l}=a,h=[],d=[];if(r.nodeType===Node.TEXT_NODE){const t=r.parentElement;if(d.push(r.nodeValue.slice(l).replaceAll(Yh,"")),t!==this.editorDiv){let e=h;for(const i of this.editorDiv.childNodes)i!==t?e.push(uc.call(oc,i)):e=d}h.push(r.nodeValue.slice(0,l).replaceAll(Yh,""))}else if(r===this.editorDiv){let t=h,e=0;for(const i of this.editorDiv.childNodes)e++===l&&(t=d),t.push(uc.call(oc,i))}c(ic,this,"".concat(h.join("\n")).concat(s).concat(d.join("\n"))),o(rc,this,pc).call(this);const u=new Range;let p=h.reduce(((t,e)=>t+e.length),0);for(const{firstChild:o}of this.editorDiv.childNodes)if(o.nodeType===Node.TEXT_NODE){const t=o.nodeValue.length;if(p<=t){u.setStart(o,p),u.setEnd(o,p);break}p-=t}n.removeAllRanges(),n.addRange(u)}get contentDiv(){return this.editorDiv}static deserialize(t,e,i){let s=null;if(t instanceof Ah){const{data:{defaultAppearanceData:{fontSize:e,fontColor:i},rect:n,rotation:a,id:r},textContent:o,textPosition:l,parent:{page:{pageNumber:h}}}=t;if(!o||0===o.length)return null;s=t={annotationType:W.FREETEXT,color:Array.from(i),fontSize:e,value:o.join("\n"),position:l,pageIndex:h-1,rect:n.slice(0),rotation:a,id:r,deleted:!1}}const n=super.deserialize(t,e,i);return c(nc,n,t.fontSize),c(ec,n,Vt.makeHexColor(...t.color)),c(ic,n,gc.call(oc,t.value)),n.annotationElementId=t.id||null,c(ac,n,s),n}serialize(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};const e=oc._internalPadding*this.parentScale,i=this.getRect(e,e),s=Cn._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:h(ec,this)),n={annotationType:W.FREETEXT,color:s,fontSize:h(nc,this),value:o(rc,this,fc).call(this),pageIndex:this.pageIndex,rect:i,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return t?n:this.annotationElementId&&!o(rc,this,mc).call(this,n)?null:(n.id=this.annotationElementId,n)}renderAnnotationElement(t){const e=super.renderAnnotationElement(t);if(this.deleted)return e;const{style:i}=e;i.fontSize="calc(".concat(h(nc,this),"px * var(--scale-factor))"),i.color=h(ec,this),e.replaceChildren();for(const n of h(ic,this).split("\n")){const t=document.createElement("div");t.append(n?document.createTextNode(n):document.createElement("br")),e.append(t)}const s=oc._internalPadding*this.parentScale;return t.updateEdited({rect:this.getRect(s,s),popupContent:h(ic,this)}),e}resetAnnotationElement(t){super.resetAnnotationElement(t),t.resetEdited()}}function lc(t){const e=t=>{this.editorDiv.style.fontSize="calc(".concat(t,"px * var(--scale-factor))"),this.translate(0,-(t-h(nc,this))*this.parentScale),c(nc,this,t),o(rc,this,dc).call(this)},i=h(nc,this);this.addCommands({cmd:e.bind(this,t),undo:e.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:j.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}function hc(t){const e=t=>{c(ec,this,this.editorDiv.style.color=t)},i=h(ec,this);this.addCommands({cmd:e.bind(this,t),undo:e.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:j.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function cc(){const t=[];this.editorDiv.normalize();for(const e of this.editorDiv.childNodes)t.push(uc.call(v,e));return t.join("\n")}function dc(){const[t,e]=this.parentDimensions;let i;if(this.isAttachedToDOM)i=this.div.getBoundingClientRect();else{const{currentLayer:t,div:e}=this,s=e.style.display,n=e.classList.contains("hidden");e.classList.remove("hidden"),e.style.display="hidden",t.div.append(this.div),i=e.getBoundingClientRect(),e.remove(),e.style.display=s,e.classList.toggle("hidden",n)}this.rotation%180===this.parentRotation%180?(this.width=i.width/t,this.height=i.height/e):(this.width=i.height/t,this.height=i.width/e),this.fixAndSetPosition()}function uc(t){return(t.nodeType===Node.TEXT_NODE?t.nodeValue:t.innerText).replaceAll(Yh,"")}function pc(){if(this.editorDiv.replaceChildren(),h(ic,this))for(const t of h(ic,this).split("\n")){const e=document.createElement("div");e.append(t?document.createTextNode(t):document.createElement("br")),this.editorDiv.append(e)}}function fc(){return h(ic,this).replaceAll("\xa0"," ")}function gc(t){return t.replaceAll(" ","\xa0")}function mc(t){const{value:e,fontSize:i,color:s,pageIndex:n}=h(ac,this);return this._hasBeenMoved||t.value!==e||t.fontSize!==i||t.color.some(((t,e)=>t!==s[e]))||t.pageIndex!==n}v=oc,(0,x.A)(oc,"_freeTextDefaultContent",""),(0,x.A)(oc,"_internalPadding",0),(0,x.A)(oc,"_defaultColor",null),(0,x.A)(oc,"_defaultFontSize",10),(0,x.A)(oc,"_type","freetext"),(0,x.A)(oc,"_editorType",W.FREETEXT);var vc=new WeakMap,bc=new WeakMap,yc=new WeakMap,Ac=new WeakSet;class wc{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];a(this,Ac),r(this,vc,void 0),r(this,bc,[]),r(this,yc,[]);let n=1/0,o=-1/0,l=1/0,d=-1/0;const u=10**-4;for(const{x:a,y:r,width:c,height:y}of t){const t=Math.floor((a-e)/u)*u,i=Math.ceil((a+c+e)/u)*u,s=Math.floor((r-e)/u)*u,p=Math.ceil((r+y+e)/u)*u,f=[t,s,p,!0],g=[i,s,p,!1];h(bc,this).push(f,g),n=Math.min(n,t),o=Math.max(o,i),l=Math.min(l,s),d=Math.max(d,p)}const p=o-n+2*i,f=d-l+2*i,g=n-i,m=l-i,v=h(bc,this).at(s?-1:-2),b=[v[0],v[2]];for(const a of h(bc,this)){const[t,e,i]=a;a[0]=(t-g)/p,a[1]=(e-m)/f,a[2]=(i-m)/f}c(vc,this,{x:g,y:m,width:p,height:f,lastPoint:b})}getOutlines(){h(bc,this).sort(((t,e)=>t[0]-e[0]||t[1]-e[1]||t[2]-e[2]));const t=[];for(const e of h(bc,this))e[3]?(t.push(...o(Ac,this,Sc).call(this,e)),o(Ac,this,Ec).call(this,e)):(o(Ac,this,kc).call(this,e),t.push(...o(Ac,this,Sc).call(this,e)));return o(Ac,this,_c).call(this,t)}}function _c(t){const e=[],i=new Set;for(const a of t){const[t,i,s]=a;e.push([t,i,a],[t,s,a])}e.sort(((t,e)=>t[1]-e[1]||t[0]-e[0]));for(let a=0,r=e.length;a0;){const t=i.values().next().value;let[e,a,r,o,l]=t;i.delete(t);let h=e,c=a;for(n=[e,r],s.push(n);;){let t;if(i.has(o))t=o;else{if(!i.has(l))break;t=l}i.delete(t),[e,a,r,o,l]=t,h!==e&&(n.push(h,c,e,c===a?a:r),h=e),c=c===a?r:a}n.push(h,c)}return new Tc(s,h(vc,this))}function xc(t){const e=h(yc,this);let i=0,s=e.length-1;for(;i<=s;){const n=i+s>>1,a=e[n][0];if(a===t)return n;a=0;n--){const[t,s]=h(yc,this)[n];if(t!==e)break;if(t===e&&s===i)return void h(yc,this).splice(n,1)}}function Sc(t){const[e,i,s]=t,n=[[e,i,s]],a=o(Ac,this,xc).call(this,s);for(let r=0;r=t)if(o>i)n[s][1]=i;else{if(1===a)return[];n.splice(s,1),s--,a--}else n[s][2]=t,o>i&&n.push([e,i,o])}}return n}class Mc{toSVGPath(){throw new Error("Abstract method `toSVGPath` must be implemented.")}get box(){throw new Error("Abstract getter `box` must be implemented.")}serialize(t,e){throw new Error("Abstract method `serialize` must be implemented.")}get free(){return this instanceof sd}}var Cc=new WeakMap,Rc=new WeakMap;class Tc extends Mc{constructor(t,e){super(),r(this,Cc,void 0),r(this,Rc,void 0),c(Rc,this,t),c(Cc,this,e)}toSVGPath(){const t=[];for(const e of h(Rc,this)){let[i,s]=e;t.push("M".concat(i," ").concat(s));for(let n=2;n5&&void 0!==arguments[5]?arguments[5]:0;a(this,Gc),r(this,Pc,void 0),r(this,Lc,[]),r(this,Dc,void 0),r(this,Ic,void 0),r(this,Fc,[]),r(this,Oc,new Float64Array(18)),r(this,Nc,void 0),r(this,Wc,void 0),r(this,jc,void 0),r(this,Bc,void 0),r(this,Hc,void 0),r(this,zc,void 0),r(this,Vc,[]),c(Pc,this,e),c(zc,this,s*i),c(Ic,this,n),h(Oc,this).set([NaN,NaN,NaN,NaN,o,l],6),c(Dc,this,d),c(Bc,this,Xc._*i),c(jc,this,Kc._*i),c(Hc,this,i),h(Vc,this).push(o,l)}get free(){return!0}isEmpty(){return isNaN(h(Oc,this)[8])}add(t){var e;let{x:i,y:s}=t;c(Nc,this,i),c(Wc,this,s);const[n,a,r,o]=h(Pc,this);let[l,d,u,p]=h(Oc,this).subarray(8,12);const f=i-u,g=s-p,m=Math.hypot(f,g);if(m=6;o-=6)isNaN(e[o])?f.push("L".concat(e[o+4]," ").concat(e[o+5])):f.push("C".concat(e[o]," ").concat(e[o+1]," ").concat(e[o+2]," ").concat(e[o+3]," ").concat(e[o+4]," ").concat(e[o+5]));return f.push("L".concat(e[4]," ").concat(e[5]," Z")),f.join(" ")}getOutlines(){var t,e;const i=h(Fc,this),s=h(Lc,this),n=h(Oc,this),a=n.subarray(4,6),r=n.subarray(16,18),[l,c,d,u]=h(Pc,this),p=new Float64Array((null!==(t=null===(e=h(Vc,this))||void 0===e?void 0:e.length)&&void 0!==t?t:0)+2);for(let o=0,A=p.length-2;o=6;o-=6)for(let t=0;t<6;t+=2)isNaN(s[o+t])?(b[y]=b[y+1]=NaN,y+=2):(b[y]=s[o+t],b[y+1]=s[o+t+1],y+=2);return b.set([NaN,NaN,NaN,NaN,s[4],s[5]],y),new sd(b,p,h(Pc,this),h(Hc,this),h(Dc,this),h(Ic,this))}}function qc(){const t=h(Oc,this).subarray(4,6),e=h(Oc,this).subarray(16,18),[i,s,n,a]=h(Pc,this);return[(h(Nc,this)+(t[0]-e[0])/2-i)/n,(h(Wc,this)+(t[1]-e[1])/2-s)/a,(h(Nc,this)+(e[0]-t[0])/2-i)/n,(h(Wc,this)+(e[1]-t[1])/2-s)/a]}var Xc={_:8},Kc={_:Xc._+2},Yc=new WeakMap,Qc=new WeakMap,Jc=new WeakMap,Zc=new WeakMap,$c=new WeakMap,td=new WeakMap,ed=new WeakMap,id=new WeakSet;class sd extends Mc{constructor(t,e,i,s,n,l){super(),a(this,id),r(this,Yc,void 0),r(this,Qc,null),r(this,Jc,void 0),r(this,Zc,void 0),r(this,$c,void 0),r(this,td,void 0),r(this,ed,void 0),c(ed,this,t),c($c,this,e),c(Yc,this,i),c(td,this,s),c(Jc,this,n),c(Zc,this,l),o(id,this,rd).call(this,l);const{x:d,y:u,width:p,height:f}=h(Qc,this);for(let a=0,r=t.length;a-1?(c(Wd,this,!0),o(qd,this,Yd).call(this,t),o(qd,this,tu).call(this)):(c(Md,this,t.anchorNode),c(Cd,this,t.anchorOffset),c(Dd,this,t.focusNode),c(Id,this,t.focusOffset),o(qd,this,Kd).call(this),o(qd,this,tu).call(this),this.rotate(this.rotation))}get telemetryInitialData(){return{action:"added",type:h(Wd,this)?"free_highlight":"highlight",color:this._uiManager.highlightColorNames.get(this.color),thickness:h(Gd,this),methodOfCreation:h(Ud,this)}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.highlightColorNames.get(this.color)}}static computeTelemetryFinalData(t){return{numberOfColors:t.get("color").size}}static initialize(t,e){var i;Cn.initialize(t,e),Xd._defaultColor||(Xd._defaultColor=(null===(i=e.highlightColors)||void 0===i?void 0:i.values().next().value)||"#fff066")}static updateDefaultParams(t,e){switch(t){case j.HIGHLIGHT_DEFAULT_COLOR:Xd._defaultColor=e;break;case j.HIGHLIGHT_THICKNESS:Xd._defaultThickness=e}}translateInPage(t,e){}get toolbarPosition(){return h(Bd,this)}updateParams(t,e){switch(t){case j.HIGHLIGHT_COLOR:o(qd,this,Qd).call(this,e);break;case j.HIGHLIGHT_THICKNESS:o(qd,this,Jd).call(this,e)}}static get defaultPropertiesToUpdate(){return[[j.HIGHLIGHT_DEFAULT_COLOR,Xd._defaultColor],[j.HIGHLIGHT_THICKNESS,Xd._defaultThickness]]}get propertiesToUpdate(){return[[j.HIGHLIGHT_COLOR,this.color||Xd._defaultColor],[j.HIGHLIGHT_THICKNESS,h(Gd,this)||Xd._defaultThickness],[j.HIGHLIGHT_FREE,h(Wd,this)]]}async addEditToolbar(){const t=await super.addEditToolbar();return t?(this._uiManager.highlightColors&&(c(Pd,this,new Ad({editor:this})),t.addColorPicker(h(Pd,this))),t):null}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(o(qd,this,nu).call(this))}getBaseTranslation(){return[0,0]}getRect(t,e){return super.getRect(t,e,o(qd,this,nu).call(this))}onceAdded(){this.parent.addUndoableEditor(this),this.div.focus()}remove(){o(qd,this,$d).call(this),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(o(qd,this,tu).call(this),this.isAttachedToDOM||this.parent.add(this)))}setParent(t){let e=!1;if(this.parent&&!t)o(qd,this,$d).call(this);else if(t){var i;o(qd,this,tu).call(this,t),e=!this.parent&&(null===(i=this.div)||void 0===i?void 0:i.classList.contains("selectedEditor"))}super.setParent(t),this.show(this._isVisible),e&&this.select()}rotate(t){const{drawLayer:e}=this.parent;let i;h(Wd,this)?(t=(t-this.rotation+360)%360,i=eu.call(Xd,h(Od,this).box,t)):i=eu.call(Xd,this,t),e.rotate(h(Nd,this),t),e.rotate(h(zd,this),t),e.updateBox(h(Nd,this),i),e.updateBox(h(zd,this),eu.call(Xd,h(Ld,this).box,t))}render(){if(this.div)return this.div;const t=super.render();h(Vd,this)&&(t.setAttribute("aria-label",h(Vd,this)),t.setAttribute("role","mark")),h(Wd,this)?t.classList.add("free"):this.div.addEventListener("keydown",h(jd,this));const e=c(Fd,this,document.createElement("div"));t.append(e),e.setAttribute("aria-hidden","true"),e.className="internal",e.style.clipPath=h(Td,this);const[i,s]=this.parentDimensions;return this.setDims(this.width*i,this.height*s),vi(this,h(Fd,this),["pointerover","pointerleave"]),this.enableEditing(),t}pointerover(){this.parent.drawLayer.addClass(h(zd,this),"hovered")}pointerleave(){this.parent.drawLayer.removeClass(h(zd,this),"hovered")}_moveCaret(t){switch(this.parent.unselect(this),t){case 0:case 2:o(qd,this,su).call(this,!0);break;case 1:case 3:o(qd,this,su).call(this,!1)}}select(){var t,e;super.select(),h(zd,this)&&(null===(t=this.parent)||void 0===t||t.drawLayer.removeClass(h(zd,this),"hovered"),null===(e=this.parent)||void 0===e||e.drawLayer.addClass(h(zd,this),"selected"))}unselect(){var t;super.unselect(),h(zd,this)&&(null===(t=this.parent)||void 0===t||t.drawLayer.removeClass(h(zd,this),"selected"),h(Wd,this)||o(qd,this,su).call(this,!1))}get _mustFixPosition(){return!h(Wd,this)}show(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._isVisible;super.show(t),this.parent&&(this.parent.drawLayer.show(h(Nd,this),t),this.parent.drawLayer.show(h(zd,this),t))}static startHighlighting(t,e,i){let{target:s,x:n,y:a}=i;const{x:r,y:l,width:h,height:c}=s.getBoundingClientRect(),d=e=>{o(Xd,this,ou).call(this,t,e)},u={capture:!0,passive:!1},p=t=>{t.preventDefault(),t.stopPropagation()},f=e=>{s.removeEventListener("pointermove",d),window.removeEventListener("blur",f),window.removeEventListener("pointerup",f),window.removeEventListener("pointerdown",p,u),window.removeEventListener("contextmenu",ze),o(Xd,this,lu).call(this,t,e)};window.addEventListener("blur",f),window.addEventListener("pointerup",f),window.addEventListener("pointerdown",p,u),window.addEventListener("contextmenu",ze),s.addEventListener("pointermove",d),this._freeHighlight=new Uc({x:n,y:a},[r,l,h,c],t.scale,this._defaultThickness/2,e,.001),({id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=t.drawLayer.highlight(this._freeHighlight,this._defaultColor,this._defaultOpacity,!0))}static deserialize(t,e,i){const s=super.deserialize(t,e,i),{rect:[n,a,r,l],color:h,quadPoints:d}=t;s.color=Vt.makeHexColor(...h),c(Hd,s,t.opacity);const[u,p]=s.pageDimensions;s.width=(r-n)/u,s.height=(l-a)/p;const f=c(Rd,s,[]);for(let o=0;o0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty()||t)return null;const e=this.getRect(0,0),i=Cn._colorManager.convert(this.color);return{annotationType:W.HIGHLIGHT,color:i,opacity:h(Hd,this),thickness:h(Gd,this),quadPoints:o(qd,this,au).call(this),outlines:o(qd,this,ru).call(this,e),pageIndex:this.pageIndex,rect:e,rotation:o(qd,this,nu).call(this),structTreeParentId:this._structTreeParentId}}static canCreateNewEmptyEditor(){return!1}}function Kd(){const t=new wc(h(Rd,this),.001);c(Od,this,t.getOutlines()),({x:this.x,y:this.y,width:this.width,height:this.height}=h(Od,this).box);const e=new wc(h(Rd,this),.0025,.001,"ltr"===this._uiManager.direction);c(Ld,this,e.getOutlines());const{lastPoint:i}=h(Ld,this).box;c(Bd,this,[(i[0]-this.x)/this.width,(i[1]-this.y)/this.height])}function Yd(t){let{highlightOutlines:e,highlightId:i,clipPathId:s}=t;c(Od,this,e);if(c(Ld,this,e.getNewOutline(h(Gd,this)/2+1.5,.0025)),i>=0)c(Nd,this,i),c(Td,this,s),this.parent.drawLayer.finalizeLine(i,e),c(zd,this,this.parent.drawLayer.highlightOutline(h(Ld,this)));else if(this.parent){const t=this.parent.viewport.rotation;this.parent.drawLayer.updateLine(h(Nd,this),e),this.parent.drawLayer.updateBox(h(Nd,this),eu.call(y,h(Od,this).box,(t-this.rotation+360)%360)),this.parent.drawLayer.updateLine(h(zd,this),h(Ld,this)),this.parent.drawLayer.updateBox(h(zd,this),eu.call(y,h(Ld,this).box,t))}const{x:n,y:a,width:r,height:o}=e.box;switch(this.rotation){case 0:this.x=n,this.y=a,this.width=r,this.height=o;break;case 90:{const[t,e]=this.parentDimensions;this.x=a,this.y=1-n,this.width=r*e/t,this.height=o*t/e;break}case 180:this.x=1-n,this.y=1-a,this.width=r,this.height=o;break;case 270:{const[t,e]=this.parentDimensions;this.x=1-a,this.y=n,this.width=r*e/t,this.height=o*t/e;break}}const{lastPoint:l}=h(Ld,this).box;c(Bd,this,[(l[0]-n)/r,(l[1]-a)/o])}function Qd(t){const e=t=>{var e,i;this.color=t,null===(e=this.parent)||void 0===e||e.drawLayer.changeColor(h(Nd,this),t),null===(i=h(Pd,this))||void 0===i||i.updateColor(t)},i=this.color;this.addCommands({cmd:e.bind(this,t),undo:e.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:j.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.highlightColorNames.get(t)},!0)}function Jd(t){const e=h(Gd,this),i=t=>{c(Gd,this,t),o(qd,this,Zd).call(this,t)};this.addCommands({cmd:i.bind(this,t),undo:i.bind(this,e),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:j.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:t},!0)}function Zd(t){if(!h(Wd,this))return;o(qd,this,Yd).call(this,{highlightOutlines:h(Od,this).getNewOutline(t/2)}),this.fixAndSetPosition();const[e,i]=this.parentDimensions;this.setDims(this.width*e,this.height*i)}function $d(){null!==h(Nd,this)&&this.parent&&(this.parent.drawLayer.remove(h(Nd,this)),c(Nd,this,null),this.parent.drawLayer.remove(h(zd,this)),c(zd,this,null))}function tu(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.parent;null===h(Nd,this)&&(({id:s(c,[Nd,this])._,clipPathId:s(c,[Td,this])._}=t.drawLayer.highlight(h(Od,this),this.color,h(Hd,this))),c(zd,this,t.drawLayer.highlightOutline(h(Ld,this))),h(Fd,this)&&(h(Fd,this).style.clipPath=h(Td,this)))}function eu(t,e){let{x:i,y:s,width:n,height:a}=t;switch(e){case 90:return{x:1-s-a,y:i,width:a,height:n};case 180:return{x:1-i-n,y:1-s-a,width:n,height:a};case 270:return{x:s,y:1-i-n,width:a,height:n}}return{x:i,y:s,width:n,height:a}}function iu(t){y._keyboardManager.exec(this,t)}function su(t){if(!h(Md,this))return;const e=window.getSelection();t?e.setPosition(h(Md,this),h(Cd,this)):e.setPosition(h(Dd,this),h(Id,this))}function nu(){return h(Wd,this)?this.rotation:0}function au(){if(h(Wd,this))return null;const[t,e]=this.pageDimensions,i=h(Rd,this),s=new Array(8*i.length);let n=0;for(const{x:a,y:r,width:o,height:l}of i){const i=a*t,h=(1-r-l)*e;s[n]=s[n+4]=i,s[n+1]=s[n+3]=h,s[n+2]=s[n+6]=i+o*t,s[n+5]=s[n+7]=h+l*e,n+=8}return s}function ru(t){return h(Od,this).serialize(t,o(qd,this,nu).call(this))}function ou(t,e){this._freeHighlight.add(e)&&t.drawLayer.updatePath(this._freeHighlightId,this._freeHighlight)}function lu(t,e){this._freeHighlight.isEmpty()?t.drawLayer.removeFreeHighlight(this._freeHighlightId):t.createAndAddNewEditor(e,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}y=Xd,(0,x.A)(Xd,"_defaultColor",null),(0,x.A)(Xd,"_defaultOpacity",1),(0,x.A)(Xd,"_defaultThickness",12),(0,x.A)(Xd,"_l10nPromise",void 0),(0,x.A)(Xd,"_type","highlight"),(0,x.A)(Xd,"_editorType",W.HIGHLIGHT),(0,x.A)(Xd,"_freeHighlightId",-1),(0,x.A)(Xd,"_freeHighlight",null),(0,x.A)(Xd,"_freeHighlightClipId","");var hu=new WeakMap,cu=new WeakMap,du=new WeakMap,uu=new WeakMap,pu=new WeakMap,fu=new WeakMap,gu=new WeakMap,mu=new WeakMap,vu=new WeakMap,bu=new WeakMap,yu=new WeakMap,Au=new WeakMap,wu=new WeakMap,_u=new WeakMap,xu=new WeakMap,Eu=new WeakSet;class ku extends Cn{constructor(t){super({...t,name:"inkEditor"}),a(this,Eu),r(this,hu,0),r(this,cu,0),r(this,du,this.canvasPointermove.bind(this)),r(this,uu,this.canvasPointerleave.bind(this)),r(this,pu,this.canvasPointerup.bind(this)),r(this,fu,this.canvasPointerdown.bind(this)),r(this,gu,null),r(this,mu,new Path2D),r(this,vu,!1),r(this,bu,!1),r(this,yu,!1),r(this,Au,null),r(this,wu,0),r(this,_u,0),r(this,xu,null),this.color=t.color||null,this.thickness=t.thickness||null,this.opacity=t.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(t,e){Cn.initialize(t,e)}static updateDefaultParams(t,e){switch(t){case j.INK_THICKNESS:ku._defaultThickness=e;break;case j.INK_COLOR:ku._defaultColor=e;break;case j.INK_OPACITY:ku._defaultOpacity=e/100}}updateParams(t,e){switch(t){case j.INK_THICKNESS:o(Eu,this,Su).call(this,e);break;case j.INK_COLOR:o(Eu,this,Mu).call(this,e);break;case j.INK_OPACITY:o(Eu,this,Cu).call(this,e)}}static get defaultPropertiesToUpdate(){return[[j.INK_THICKNESS,ku._defaultThickness],[j.INK_COLOR,ku._defaultColor||Cn._defaultLineColor],[j.INK_OPACITY,Math.round(100*ku._defaultOpacity)]]}get propertiesToUpdate(){var t;return[[j.INK_THICKNESS,this.thickness||ku._defaultThickness],[j.INK_COLOR,this.color||ku._defaultColor||Cn._defaultLineColor],[j.INK_OPACITY,Math.round(100*(null!==(t=this.opacity)&&void 0!==t?t:ku._defaultOpacity))]]}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.canvas||(o(Eu,this,Bu).call(this),o(Eu,this,Hu).call(this)),this.isAttachedToDOM||(this.parent.add(this),o(Eu,this,zu).call(this)),o(Eu,this,Ju).call(this)))}remove(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,h(gu,this)&&(clearTimeout(h(gu,this)),c(gu,this,null)),h(Au,this).disconnect(),c(Au,this,null),super.remove())}setParent(t){!this.parent&&t?this._uiManager.removeShouldRescale(this):this.parent&&null===t&&this._uiManager.addShouldRescale(this),super.setParent(t)}onScaleChanging(){const[t,e]=this.parentDimensions,i=this.width*t,s=this.height*e;this.setDimensions(i,s)}enableEditMode(){h(vu,this)||null===this.canvas||(super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",h(fu,this)))}disableEditMode(){this.isInEditMode()&&null!==this.canvas&&(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",h(fu,this)))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}commit(){h(vu,this)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),c(vu,this,!0),this.div.classList.add("disabled"),o(Eu,this,Ju).call(this,!0),this.select(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(t){this._focusEventsAllowed&&(super.focusin(t),this.enableEditMode())}canvasPointerdown(t){0===t.button&&this.isInEditMode()&&!h(vu,this)&&(this.setInForeground(),t.preventDefault(),this.div.contains(document.activeElement)||this.div.focus({preventScroll:!0}),o(Eu,this,Pu).call(this,t.offsetX,t.offsetY))}canvasPointermove(t){t.preventDefault(),o(Eu,this,Lu).call(this,t.offsetX,t.offsetY)}canvasPointerup(t){t.preventDefault(),o(Eu,this,ju).call(this,t)}canvasPointerleave(t){o(Eu,this,ju).call(this,t)}get isResizable(){return!this.isEmpty()&&h(vu,this)}render(){if(this.div)return this.div;let t,e;this.width&&(t=this.x,e=this.y),super.render(),this.div.setAttribute("data-l10n-id","pdfjs-ink");const[i,s,n,a]=o(Eu,this,Ru).call(this);if(this.setAt(i,s,0,0),this.setDims(n,a),o(Eu,this,Bu).call(this),this.width){const[i,s]=this.parentDimensions;this.setAspectRatio(this.width*i,this.height*s),this.setAt(t*i,e*s,this.width*i,this.height*s),c(yu,this,!0),o(Eu,this,zu).call(this),this.setDims(this.width*i,this.height*s),o(Eu,this,Wu).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return o(Eu,this,Hu).call(this),this.div}setDimensions(t,e){const i=Math.round(t),s=Math.round(e);if(h(wu,this)===i&&h(_u,this)===s)return;c(wu,this,i),c(_u,this,s),this.canvas.style.visibility="hidden";const[n,a]=this.parentDimensions;this.width=t/n,this.height=e/a,this.fixAndSetPosition(),h(vu,this)&&o(Eu,this,Vu).call(this,t,e),o(Eu,this,zu).call(this),o(Eu,this,Wu).call(this),this.canvas.style.visibility="visible",this.fixDims()}static deserialize(t,e,i){if(t instanceof Lh)return null;const s=super.deserialize(t,e,i);s.thickness=t.thickness,s.color=Vt.makeHexColor(...t.color),s.opacity=t.opacity;const[n,a]=s.pageDimensions,r=s.width*n,l=s.height*a,h=s.parentScale,d=t.thickness/2;c(vu,s,!0),c(wu,s,Math.round(r)),c(_u,s,Math.round(l));const{paths:u,rect:p,rotation:f}=t;for(let{bezier:c}of u){c=Xu.call(ku,c,p,f);const t=[];s.paths.push(t);let e=h*(c[0]-d),i=h*(c[1]-d);for(let s=2,a=c.length;s{this.thickness=t,o(Eu,this,Ju).call(this)},i=this.thickness;this.addCommands({cmd:e.bind(this,t),undo:e.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:j.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}function Mu(t){const e=t=>{this.color=t,o(Eu,this,Wu).call(this)},i=this.color;this.addCommands({cmd:e.bind(this,t),undo:e.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:j.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function Cu(t){const e=t=>{this.opacity=t,o(Eu,this,Wu).call(this)};t/=100;const i=this.opacity;this.addCommands({cmd:e.bind(this,t),undo:e.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:j.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}function Ru(){const{parentRotation:t,parentDimensions:[e,i]}=this;switch(t){case 90:return[0,i,i,e];case 180:return[e,i,e,i];case 270:return[e,0,i,e];default:return[0,0,e,i]}}function Tu(){const{ctx:t,color:e,opacity:i,thickness:s,parentScale:n,scaleFactor:a}=this;t.lineWidth=s*n/a,t.lineCap="round",t.lineJoin="round",t.miterLimit=10,t.strokeStyle="".concat(e).concat(function(t){return Math.round(Math.min(255,Math.max(1,255*t))).toString(16).padStart(2,"0")}(i))}function Pu(t,e){var i;(this.canvas.addEventListener("contextmenu",ze),this.canvas.addEventListener("pointerleave",h(uu,this)),this.canvas.addEventListener("pointermove",h(du,this)),this.canvas.addEventListener("pointerup",h(pu,this)),this.canvas.removeEventListener("pointerdown",h(fu,this)),this.isEditing=!0,h(yu,this))||(c(yu,this,!0),o(Eu,this,zu).call(this),this.thickness||(this.thickness=A._defaultThickness),this.color||(this.color=A._defaultColor||Cn._defaultLineColor),null!==(i=this.opacity)&&void 0!==i||(this.opacity=A._defaultOpacity));this.currentPath.push([t,e]),c(bu,this,!1),o(Eu,this,Tu).call(this),c(xu,this,(()=>{o(Eu,this,Fu).call(this),h(xu,this)&&window.requestAnimationFrame(h(xu,this))})),window.requestAnimationFrame(h(xu,this))}function Lu(t,e){const[i,s]=this.currentPath.at(-1);if(this.currentPath.length>1&&t===i&&e===s)return;const n=this.currentPath;let a=h(mu,this);if(n.push([t,e]),c(bu,this,!0),n.length<=2)return a.moveTo(...n[0]),void a.lineTo(t,e);3===n.length&&(c(mu,this,a=new Path2D),a.moveTo(...n[0])),o(Eu,this,Ou).call(this,a,...n.at(-3),...n.at(-2),t,e)}function Du(){if(0===this.currentPath.length)return;const t=this.currentPath.at(-1);h(mu,this).lineTo(...t)}function Iu(t,e){let i;if(c(xu,this,null),t=Math.min(Math.max(t,0),this.canvas.width),e=Math.min(Math.max(e,0),this.canvas.height),o(Eu,this,Lu).call(this,t,e),o(Eu,this,Du).call(this),1!==this.currentPath.length)i=o(Eu,this,Nu).call(this);else{const s=[t,e];i=[[s,s.slice(),s.slice(),s]]}const s=h(mu,this),n=this.currentPath;this.currentPath=[],c(mu,this,new Path2D);this.addCommands({cmd:()=>{this.allRawPaths.push(n),this.paths.push(i),this.bezierPath2D.push(s),this._uiManager.rebuild(this)},undo:()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(o(Eu,this,Bu).call(this),o(Eu,this,Hu).call(this)),o(Eu,this,Ju).call(this))},mustExec:!0})}function Fu(){if(!h(bu,this))return;c(bu,this,!1);const t=Math.ceil(this.thickness*this.parentScale),e=this.currentPath.slice(-3),i=e.map((t=>t[0])),s=e.map((t=>t[1])),{ctx:n}=(Math.min(...i),Math.max(...i),Math.min(...s),Math.max(...s),this);n.save(),n.clearRect(0,0,this.canvas.width,this.canvas.height);for(const a of this.bezierPath2D)n.stroke(a);n.stroke(h(mu,this)),n.restore()}function Ou(t,e,i,s,n,a,r){const o=(e+s)/2,l=(i+n)/2,h=(s+a)/2,c=(n+r)/2;t.bezierCurveTo(o+2*(s-o)/3,l+2*(n-l)/3,h+2*(s-h)/3,c+2*(n-c)/3,h,c)}function Nu(){const t=this.currentPath;if(t.length<=2)return[[t[0],t[0],t.at(-1),t.at(-1)]];const e=[];let i,[s,n]=t[0];for(i=1;i{c(gu,this,null),this.canvas.removeEventListener("contextmenu",ze)}),10)),o(Eu,this,Iu).call(this,t.offsetX,t.offsetY),this.addToAnnotationStorage(),this.setInBackground()}function Bu(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",this.canvas.setAttribute("data-l10n-id","pdfjs-ink-canvas"),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")}function Hu(){c(Au,this,new ResizeObserver((t=>{const e=t[0].contentRect;e.width&&e.height&&this.setDimensions(e.width,e.height)}))),h(Au,this).observe(this.div)}function zu(){if(!h(yu,this))return;const[t,e]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*t),this.canvas.height=Math.ceil(this.height*e),o(Eu,this,Gu).call(this)}function Vu(t,e){const i=o(Eu,this,Qu).call(this),s=(t-i)/h(cu,this),n=(e-i)/h(hu,this);this.scaleFactor=Math.min(s,n)}function Gu(){const t=o(Eu,this,Qu).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+t,this.translationY*this.scaleFactor+t)}function Uu(t){const e=new Path2D;for(let i=0,s=t.length;i0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return;if(!h(vu,this))return void o(Eu,this,Wu).call(this);const e=o(Eu,this,Yu).call(this),i=o(Eu,this,Qu).call(this);c(cu,this,Math.max(Cn.MIN_SIZE,e[2]-e[0])),c(hu,this,Math.max(Cn.MIN_SIZE,e[3]-e[1]));const s=Math.ceil(i+h(cu,this)*this.scaleFactor),n=Math.ceil(i+h(hu,this)*this.scaleFactor),[a,r]=this.parentDimensions;this.width=s/a,this.height=n/r,this.setAspectRatio(s,n);const l=this.translationX,d=this.translationY;this.translationX=-e[0],this.translationY=-e[1],o(Eu,this,zu).call(this),o(Eu,this,Wu).call(this),c(wu,this,s),c(_u,this,n),this.setDims(s,n);const u=t?i/this.scaleFactor/2:0;this.translate(l-this.translationX-u,d-this.translationY-u)}A=ku,(0,x.A)(ku,"_defaultColor",null),(0,x.A)(ku,"_defaultOpacity",1),(0,x.A)(ku,"_defaultThickness",1),(0,x.A)(ku,"_type","ink"),(0,x.A)(ku,"_editorType",W.INK);var Zu=new WeakMap,$u=new WeakMap,tp=new WeakMap,ep=new WeakMap,ip=new WeakMap,sp=new WeakMap,np=new WeakMap,ap=new WeakMap,rp=new WeakMap,op=new WeakMap,lp=new WeakMap,hp=new WeakSet;class cp extends Cn{constructor(t){super({...t,name:"stampEditor"}),a(this,hp),r(this,Zu,null),r(this,$u,null),r(this,tp,null),r(this,ep,null),r(this,ip,null),r(this,sp,""),r(this,np,null),r(this,ap,null),r(this,rp,null),r(this,op,!1),r(this,lp,!1),c(ep,this,t.bitmapUrl),c(ip,this,t.bitmapFile)}static initialize(t,e){Cn.initialize(t,e)}static get supportedTypes(){return Rt(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map((t=>"image/".concat(t))))}static get supportedTypesStr(){return Rt(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(t){return this.supportedTypes.includes(t)}static paste(t,e){e.pasteEditor(W.STAMP,{bitmapFile:t.getAsFile()})}remove(){var t,e;h($u,this)&&(c(Zu,this,null),this._uiManager.imageManager.deleteId(h($u,this)),null===(t=h(np,this))||void 0===t||t.remove(),c(np,this,null),null===(e=h(ap,this))||void 0===e||e.disconnect(),c(ap,this,null),h(rp,this)&&(clearTimeout(h(rp,this)),c(rp,this,null)));super.remove()}rebuild(){this.parent?(super.rebuild(),null!==this.div&&(h($u,this)&&null===h(np,this)&&o(hp,this,pp).call(this),this.isAttachedToDOM||this.parent.add(this))):h($u,this)&&o(hp,this,pp).call(this)}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(h(tp,this)||h(Zu,this)||h(ep,this)||h(ip,this)||h($u,this))}get isResizable(){return!0}render(){if(this.div)return this.div;let t,e;if(this.width&&(t=this.x,e=this.y),super.render(),this.div.hidden=!0,this.addAltTextButton(),h(Zu,this)?o(hp,this,fp).call(this):o(hp,this,pp).call(this),this.width){const[i,s]=this.parentDimensions;this.setAt(t*i,e*s,this.width*i,this.height*s)}return this.div}getImageForAltText(){return h(np,this)}static deserialize(t,e,i){if(t instanceof Nh)return null;const s=super.deserialize(t,e,i),{rect:n,bitmapUrl:a,bitmapId:r,isSvg:o,accessibilityData:l}=t;r&&i.imageManager.isValidId(r)?c($u,s,r):c(ep,s,a),c(op,s,o);const[h,d]=s.pageDimensions;return s.width=(n[2]-n[0])/h,s.height=(n[3]-n[1])/d,l&&(s.altTextData=l),s}serialize(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.isEmpty())return null;const i={annotationType:W.STAMP,bitmapId:h($u,this),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:h(op,this),structTreeParentId:this._structTreeParentId};if(t)return i.bitmapUrl=o(hp,this,bp).call(this,!0),i.accessibilityData=this.altTextData,i;const{decorative:s,altText:n}=this.altTextData;if(!s&&n&&(i.accessibilityData={type:"Figure",alt:n}),null===e)return i;e.stamps||(e.stamps=new Map);const a=h(op,this)?(i.rect[2]-i.rect[0])*(i.rect[3]-i.rect[1]):null;if(e.stamps.has(h($u,this))){if(h(op,this)){const t=e.stamps.get(h($u,this));a>t.area&&(t.area=a,t.serialized.bitmap.close(),t.serialized.bitmap=o(hp,this,bp).call(this,!1))}}else e.stamps.set(h($u,this),{area:a,serialized:i}),i.bitmap=o(hp,this,bp).call(this,!1);return i}}function dp(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t?(c(Zu,this,t.bitmap),e||(c($u,this,t.id),c(op,this,t.isSvg)),t.file&&c(sp,this,t.file.name),o(hp,this,fp).call(this)):this.remove()}function up(){c(tp,this,null),this._uiManager.enableWaiting(!1),h(np,this)&&this.div.focus()}function pp(){if(h($u,this))return this._uiManager.enableWaiting(!0),void this._uiManager.imageManager.getFromId(h($u,this)).then((t=>o(hp,this,dp).call(this,t,!0))).finally((()=>o(hp,this,up).call(this)));if(h(ep,this)){const t=h(ep,this);return c(ep,this,null),this._uiManager.enableWaiting(!0),void c(tp,this,this._uiManager.imageManager.getFromUrl(t).then((t=>o(hp,this,dp).call(this,t))).finally((()=>o(hp,this,up).call(this))))}if(h(ip,this)){const t=h(ip,this);return c(ip,this,null),this._uiManager.enableWaiting(!0),void c(tp,this,this._uiManager.imageManager.getFromFile(t).then((t=>o(hp,this,dp).call(this,t))).finally((()=>o(hp,this,up).call(this))))}const t=document.createElement("input");t.type="file",t.accept=w.supportedTypesStr,c(tp,this,new Promise((e=>{t.addEventListener("change",(async()=>{if(t.files&&0!==t.files.length){this._uiManager.enableWaiting(!0);const e=await this._uiManager.imageManager.getFromFile(t.files[0]);o(hp,this,dp).call(this,e)}else this.remove();e()})),t.addEventListener("cancel",(()=>{this.remove(),e()}))})).finally((()=>o(hp,this,up).call(this)))),t.click()}function fp(){const{div:t}=this;let{width:e,height:i}=h(Zu,this);const[s,n]=this.pageDimensions,a=.75;if(this.width)e=this.width*s,i=this.height*n;else if(e>a*s||i>a*n){const t=Math.min(a*s/e,a*n/i);e*=t,i*=t}const[r,l]=this.parentDimensions;this.setDims(e*r/s,i*l/n),this._uiManager.enableWaiting(!1);const d=c(np,this,document.createElement("canvas"));t.append(d),t.hidden=!1,o(hp,this,vp).call(this,e,i),o(hp,this,yp).call(this),h(lp,this)||(this.parent.addUndoableEditor(this),c(lp,this,!0)),this._reportTelemetry({action:"inserted_image"}),h(sp,this)&&d.setAttribute("aria-label",h(sp,this))}function gp(t,e){var i;const[s,n]=this.parentDimensions;this.width=t/s,this.height=e/n,this.setDims(t,e),null!==(i=this._initialOptions)&&void 0!==i&&i.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,null!==h(rp,this)&&clearTimeout(h(rp,this));c(rp,this,setTimeout((()=>{c(rp,this,null),o(hp,this,vp).call(this,t,e)}),200))}function mp(t,e){const{width:i,height:s}=h(Zu,this);let n=i,a=s,r=h(Zu,this);for(;n>2*t||a>2*e;){const i=n,s=a;n>2*t&&(n=n>=16384?Math.floor(n/2)-1:Math.ceil(n/2)),a>2*e&&(a=a>=16384?Math.floor(a/2)-1:Math.ceil(a/2));const o=new OffscreenCanvas(n,a);o.getContext("2d").drawImage(r,0,0,i,s,0,0,n,a),r=o.transferToImageBitmap()}return r}function vp(t,e){t=Math.ceil(t),e=Math.ceil(e);const i=h(np,this);if(!i||i.width===t&&i.height===e)return;i.width=t,i.height=e;const s=h(op,this)?h(Zu,this):o(hp,this,mp).call(this,t,e);if(this._uiManager.hasMLManager&&!this.hasAltText()){const i=new OffscreenCanvas(t,e).getContext("2d");i.drawImage(s,0,0,s.width,s.height,0,0,t,e),this._uiManager.mlGuess({service:"image-to-text",request:{data:i.getImageData(0,0,t,e).data,width:t,height:e,channels:4}}).then((t=>{const e=(null===t||void 0===t?void 0:t.output)||"";this.parent&&e&&!this.hasAltText()&&(this.altTextData={altText:e,decorative:!1})}))}const n=i.getContext("2d");n.filter=this._uiManager.hcmFilter,n.drawImage(s,0,0,s.width,s.height,0,0,t,e)}function bp(t){if(t){if(h(op,this)){const t=this._uiManager.imageManager.getSvgUrl(h($u,this));if(t)return t}const t=document.createElement("canvas");({width:t.width,height:t.height}=h(Zu,this));return t.getContext("2d").drawImage(h(Zu,this),0,0),t.toDataURL()}if(h(op,this)){const[t,e]=this.pageDimensions,i=Math.round(this.width*t*de.PDF_TO_CSS_UNITS),s=Math.round(this.height*e*de.PDF_TO_CSS_UNITS),n=new OffscreenCanvas(i,s);return n.getContext("2d").drawImage(h(Zu,this),0,0,h(Zu,this).width,h(Zu,this).height,0,0,i,s),n.transferToImageBitmap()}return structuredClone(h(Zu,this))}function yp(){c(ap,this,new ResizeObserver((t=>{const e=t[0].contentRect;e.width&&e.height&&o(hp,this,gp).call(this,e.width,e.height)}))),h(ap,this).observe(this.div)}w=cp,(0,x.A)(cp,"_type","stamp"),(0,x.A)(cp,"_editorType",W.STAMP);var Ap=new WeakMap,wp=new WeakMap,_p=new WeakMap,xp=new WeakMap,Ep=new WeakMap,kp=new WeakMap,Sp=new WeakMap,Mp=new WeakMap,Cp=new WeakMap,Rp=new WeakMap,Tp=new WeakMap,Pp=new WeakMap,Lp=new WeakMap,Dp=new WeakSet;class Ip{constructor(t){let{uiManager:e,pageIndex:i,div:s,accessibilityManager:n,annotationLayer:o,drawLayer:l,textLayer:d,viewport:u,l10n:p}=t;a(this,Dp),r(this,Ap,void 0),r(this,wp,!1),r(this,_p,null),r(this,xp,null),r(this,Ep,null),r(this,kp,null),r(this,Sp,null),r(this,Mp,new Map),r(this,Cp,!1),r(this,Rp,!1),r(this,Tp,!1),r(this,Pp,null),r(this,Lp,void 0);const f=[...Bp._.values()];if(!Ip._initialized){Ip._initialized=!0;for(const t of f)t.initialize(p,e)}e.registerEditorTypes(f),c(Lp,this,e),this.pageIndex=i,this.div=s,c(Ap,this,n),c(_p,this,o),this.viewport=u,c(Pp,this,d),this.drawLayer=l,h(Lp,this).addLayer(this)}get isEmpty(){return 0===h(Mp,this).size}get isInvisible(){return this.isEmpty&&h(Lp,this).getMode()===W.NONE}updateToolbar(t){h(Lp,this).updateToolbar(t)}updateMode(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h(Lp,this).getMode();switch(o(Dp,this,jp).call(this),t){case W.NONE:return this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),void this.disableClick();case W.INK:this.addInkEditorIfNeeded(!1),this.disableTextSelection(),this.togglePointerEvents(!0),this.disableClick();break;case W.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:e}=this.div;for(const i of Bp._.values())e.toggle("".concat(i._type,"Editing"),t===i._editorType);this.div.hidden=!1}hasTextLayer(t){var e;return t===(null===(e=h(Pp,this))||void 0===e?void 0:e.div)}addInkEditorIfNeeded(t){if(h(Lp,this).getMode()!==W.INK)return;if(!t)for(const e of h(Mp,this).values())if(e.isEmpty())return void e.setInBackground();this.createAndAddNewEditor({offsetX:0,offsetY:0},!1).setInBackground()}setEditingState(t){h(Lp,this).setEditingState(t)}addCommands(t){h(Lp,this).addCommands(t)}togglePointerEvents(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.div.classList.toggle("disabled",!t)}toggleAnnotationLayerPointerEvents(){var t;let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(t=h(_p,this))||void 0===t||t.div.classList.toggle("disabled",!e)}enable(){this.div.tabIndex=0,this.togglePointerEvents(!0);const t=new Set;for(const i of h(Mp,this).values())i.enableEditing(),i.show(!0),i.annotationElementId&&(h(Lp,this).removeChangedExistingAnnotation(i),t.add(i.annotationElementId));if(!h(_p,this))return;const e=h(_p,this).getEditableAnnotations();for(const i of e){if(i.hide(),h(Lp,this).isDeletedAnnotationElement(i.data.id))continue;if(t.has(i.data.id))continue;const e=this.deserialize(i);e&&(this.addOrRebuild(e),e.enableEditing())}}disable(){c(Tp,this,!0),this.div.tabIndex=-1,this.togglePointerEvents(!1);const t=new Map,e=new Map;for(const n of h(Mp,this).values()){var i;n.disableEditing(),n.annotationElementId&&(null===n.serialize()?(e.set(n.annotationElementId,n),null===(i=this.getEditableAnnotation(n.annotationElementId))||void 0===i||i.show(),n.remove()):t.set(n.annotationElementId,n))}if(h(_p,this)){const i=h(_p,this).getEditableAnnotations();for(const s of i){const{id:i}=s.data;if(h(Lp,this).isDeletedAnnotationElement(i))continue;let n=e.get(i);n?(n.resetAnnotationElement(s),n.show(!1),s.show()):(n=t.get(i),n&&(h(Lp,this).addChangedExistingAnnotation(n),n.renderAnnotationElement(s),n.show(!1)),s.show())}}o(Dp,this,jp).call(this),this.isEmpty&&(this.div.hidden=!0);const{classList:s}=this.div;for(const n of Bp._.values())s.remove("".concat(n._type,"Editing"));this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),c(Tp,this,!1)}getEditableAnnotation(t){var e;return(null===(e=h(_p,this))||void 0===e?void 0:e.getEditableAnnotation(t))||null}setActiveEditor(t){h(Lp,this).getActive()!==t&&h(Lp,this).setActiveEditor(t)}enableTextSelection(){var t;this.div.tabIndex=-1,null!==(t=h(Pp,this))&&void 0!==t&&t.div&&!h(kp,this)&&(c(kp,this,o(Dp,this,Fp).bind(this)),h(Pp,this).div.addEventListener("pointerdown",h(kp,this)),h(Pp,this).div.classList.add("highlighting"))}disableTextSelection(){var t;this.div.tabIndex=0,null!==(t=h(Pp,this))&&void 0!==t&&t.div&&h(kp,this)&&(h(Pp,this).div.removeEventListener("pointerdown",h(kp,this)),c(kp,this,null),h(Pp,this).div.classList.remove("highlighting"))}enableClick(){h(Ep,this)||(c(Ep,this,this.pointerdown.bind(this)),c(xp,this,this.pointerup.bind(this)),this.div.addEventListener("pointerdown",h(Ep,this)),this.div.addEventListener("pointerup",h(xp,this)))}disableClick(){h(Ep,this)&&(this.div.removeEventListener("pointerdown",h(Ep,this)),this.div.removeEventListener("pointerup",h(xp,this)),c(Ep,this,null),c(xp,this,null))}attach(t){h(Mp,this).set(t.id,t);const{annotationElementId:e}=t;e&&h(Lp,this).isDeletedAnnotationElement(e)&&h(Lp,this).removeDeletedAnnotationElement(t)}detach(t){var e;h(Mp,this).delete(t.id),null===(e=h(Ap,this))||void 0===e||e.removePointerInTextLayer(t.contentDiv),!h(Tp,this)&&t.annotationElementId&&h(Lp,this).addDeletedAnnotationElement(t)}remove(t){this.detach(t),h(Lp,this).removeEditor(t),t.div.remove(),t.isAttachedToDOM=!1,h(Rp,this)||this.addInkEditorIfNeeded(!1)}changeParent(t){var e;t.parent!==this&&(t.parent&&t.annotationElementId&&(h(Lp,this).addDeletedAnnotationElement(t.annotationElementId),Cn.deleteAnnotationElement(t),t.annotationElementId=null),this.attach(t),null===(e=t.parent)||void 0===e||e.detach(t),t.setParent(this),t.div&&t.isAttachedToDOM&&(t.div.remove(),this.div.append(t.div)))}add(t){if(t.parent!==this||!t.isAttachedToDOM){if(this.changeParent(t),h(Lp,this).addEditor(t),this.attach(t),!t.isAttachedToDOM){const e=t.render();this.div.append(e),t.isAttachedToDOM=!0}t.fixAndSetPosition(),t.onceAdded(),h(Lp,this).addToAnnotationStorage(t),t._reportTelemetry(t.telemetryInitialData)}}moveEditorInDOM(t){var e;if(!t.isAttachedToDOM)return;const{activeElement:i}=document;t.div.contains(i)&&!h(Sp,this)&&(t._focusEventsAllowed=!1,c(Sp,this,setTimeout((()=>{c(Sp,this,null),t.div.contains(document.activeElement)?t._focusEventsAllowed=!0:(t.div.addEventListener("focusin",(()=>{t._focusEventsAllowed=!0}),{once:!0}),i.focus())}),0))),t._structTreeParentId=null===(e=h(Ap,this))||void 0===e?void 0:e.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}addOrRebuild(t){t.needsToBeRebuilt()?(t.parent||(t.parent=this),t.rebuild(),t.show()):this.add(t)}addUndoableEditor(t){this.addCommands({cmd:()=>t._uiManager.rebuild(t),undo:()=>{t.remove()},mustExec:!1})}getNextId(){return h(Lp,this).getId()}canCreateNewEmptyEditor(){var t;return null===(t=l(Dp,this,Op))||void 0===t?void 0:t.canCreateNewEmptyEditor()}pasteEditor(t,e){h(Lp,this).updateToolbar(t),h(Lp,this).updateMode(t);const{offsetX:i,offsetY:s}=o(Dp,this,Wp).call(this),n=this.getNextId(),a=o(Dp,this,Np).call(this,{parent:this,id:n,x:i,y:s,uiManager:h(Lp,this),isCentered:!0,...e});a&&this.add(a)}deserialize(t){var e,i;return(null===(e=Bp._.get(null!==(i=t.annotationType)&&void 0!==i?i:t.annotationEditorType))||void 0===e?void 0:e.deserialize(t,this,h(Lp,this)))||null}createAndAddNewEditor(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=this.getNextId(),n=o(Dp,this,Np).call(this,{parent:this,id:s,x:t.offsetX,y:t.offsetY,uiManager:h(Lp,this),isCentered:e,...i});return n&&this.add(n),n}addNewEditor(){this.createAndAddNewEditor(o(Dp,this,Wp).call(this),!0)}setSelected(t){h(Lp,this).setSelected(t)}toggleSelected(t){h(Lp,this).toggleSelected(t)}isSelected(t){return h(Lp,this).isSelected(t)}unselect(t){h(Lp,this).unselect(t)}pointerup(t){const{isMac:e}=Ht.platform;0!==t.button||t.ctrlKey&&e||t.target===this.div&&h(Cp,this)&&(c(Cp,this,!1),h(wp,this)?h(Lp,this).getMode()!==W.STAMP?this.createAndAddNewEditor(t,!1):h(Lp,this).unselectAll():c(wp,this,!0))}pointerdown(t){if(h(Lp,this).getMode()===W.HIGHLIGHT&&this.enableTextSelection(),h(Cp,this))return void c(Cp,this,!1);const{isMac:e}=Ht.platform;if(0!==t.button||t.ctrlKey&&e)return;if(t.target!==this.div)return;c(Cp,this,!0);const i=h(Lp,this).getActive();c(wp,this,!i||i.isEmpty())}findNewParent(t,e,i){const s=h(Lp,this).findParent(e,i);return null!==s&&s!==this&&(s.changeParent(t),!0)}destroy(){var t;(null===(t=h(Lp,this).getActive())||void 0===t?void 0:t.parent)===this&&(h(Lp,this).commitOrRemove(),h(Lp,this).setActiveEditor(null)),h(Sp,this)&&(clearTimeout(h(Sp,this)),c(Sp,this,null));for(const i of h(Mp,this).values()){var e;null===(e=h(Ap,this))||void 0===e||e.removePointerInTextLayer(i.contentDiv),i.setParent(null),i.isAttachedToDOM=!1,i.div.remove()}this.div=null,h(Mp,this).clear(),h(Lp,this).removeLayer(this)}render(t){let{viewport:e}=t;this.viewport=e,Qe(this.div,e);for(const i of h(Lp,this).getEditors(this.pageIndex))this.add(i),i.rebuild();this.updateMode()}update(t){let{viewport:e}=t;h(Lp,this).commitOrRemove(),o(Dp,this,jp).call(this);const i=this.viewport.rotation,s=e.rotation;if(this.viewport=e,Qe(this.div,{rotation:s}),i!==s)for(const n of h(Mp,this).values())n.rotate(s);this.addInkEditorIfNeeded(!1)}get pageDimensions(){const{pageWidth:t,pageHeight:e}=this.viewport.rawDims;return[t,e]}get scale(){return h(Lp,this).viewParameters.realScale}}function Fp(t){if(h(Lp,this).unselectAll(),t.target===h(Pp,this).div){const{isMac:e}=Ht.platform;if(0!==t.button||t.ctrlKey&&e)return;h(Lp,this).showAllEditors("highlight",!0,!0),h(Pp,this).div.classList.add("free"),Xd.startHighlighting(this,"ltr"===h(Lp,this).direction,t),h(Pp,this).div.addEventListener("pointerup",(()=>{h(Pp,this).div.classList.remove("free")}),{once:!0}),t.preventDefault()}}function Op(t){return Bp._.get(h(Lp,t).getMode())}function Np(t){const e=l(Dp,this,Op);return e?new e.prototype.constructor(t):null}function Wp(){const{x:t,y:e,width:i,height:s}=this.div.getBoundingClientRect(),n=Math.max(0,t),a=Math.max(0,e),r=(n+Math.min(window.innerWidth,t+i))/2-t,o=(a+Math.min(window.innerHeight,e+s))/2-e,[l,h]=this.viewport.rotation%180===0?[r,o]:[o,r];return{offsetX:l,offsetY:h}}function jp(){c(Rp,this,!0);for(const t of h(Mp,this).values())t.isEmpty()&&t.remove();c(Rp,this,!1)}(0,x.A)(Ip,"_initialized",!1);var Bp={_:new Map([oc,ku,cp,Xd].map((t=>[t._editorType,t])))},Hp=new WeakMap,zp=new WeakMap,Vp=new WeakMap,Gp=new WeakMap,Up=new WeakSet;class qp{constructor(t){let{pageIndex:e}=t;a(this,Up),r(this,Hp,null),r(this,zp,0),r(this,Vp,new Map),r(this,Gp,new Map),this.pageIndex=e}setParent(t){if(h(Hp,this)){if(h(Hp,this)!==t){if(h(Vp,this).size>0)for(const e of h(Vp,this).values())e.remove(),t.append(e);c(Hp,this,t)}}else c(Hp,this,t)}static get _svgFactory(){return Rt(this,"_svgFactory",new De)}highlight(t,e,i){var s,n;let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=(c(zp,this,(s=h(zp,this),n=s++,s)),n),l=o(Up,this,Kp).call(this,t.box);l.classList.add("highlight"),t.free&&l.classList.add("free");const d=qp._svgFactory.createElement("defs");l.append(d);const u=qp._svgFactory.createElement("path");d.append(u);const p="path_p".concat(this.pageIndex,"_").concat(r);u.setAttribute("id",p),u.setAttribute("d",t.toSVGPath()),a&&h(Gp,this).set(r,u);const f=o(Up,this,Yp).call(this,d,p),g=qp._svgFactory.createElement("use");return l.append(g),l.setAttribute("fill",e),l.setAttribute("fill-opacity",i),g.setAttribute("href","#".concat(p)),h(Vp,this).set(r,l),{id:r,clipPathId:"url(#".concat(f,")")}}highlightOutline(t){var e,i;const s=(c(zp,this,(e=h(zp,this),i=e++,e)),i),n=o(Up,this,Kp).call(this,t.box);n.classList.add("highlightOutline");const a=qp._svgFactory.createElement("defs");n.append(a);const r=qp._svgFactory.createElement("path");a.append(r);const l="path_p".concat(this.pageIndex,"_").concat(s);let d;if(r.setAttribute("id",l),r.setAttribute("d",t.toSVGPath()),r.setAttribute("vector-effect","non-scaling-stroke"),t.free){n.classList.add("free");const t=qp._svgFactory.createElement("mask");a.append(t),d="mask_p".concat(this.pageIndex,"_").concat(s),t.setAttribute("id",d),t.setAttribute("maskUnits","objectBoundingBox");const e=qp._svgFactory.createElement("rect");t.append(e),e.setAttribute("width","1"),e.setAttribute("height","1"),e.setAttribute("fill","white");const i=qp._svgFactory.createElement("use");t.append(i),i.setAttribute("href","#".concat(l)),i.setAttribute("stroke","none"),i.setAttribute("fill","black"),i.setAttribute("fill-rule","nonzero"),i.classList.add("mask")}const u=qp._svgFactory.createElement("use");n.append(u),u.setAttribute("href","#".concat(l)),d&&u.setAttribute("mask","url(#".concat(d,")"));const p=u.cloneNode();return n.append(p),u.classList.add("mainOutline"),p.classList.add("secondaryOutline"),h(Vp,this).set(s,n),s}finalizeLine(t,e){const i=h(Gp,this).get(t);h(Gp,this).delete(t),this.updateBox(t,e.box),i.setAttribute("d",e.toSVGPath())}updateLine(t,e){h(Vp,this).get(t).firstChild.firstChild.setAttribute("d",e.toSVGPath())}removeFreeHighlight(t){this.remove(t),h(Gp,this).delete(t)}updatePath(t,e){h(Gp,this).get(t).setAttribute("d",e.toSVGPath())}updateBox(t,e){Xp.call(qp,h(Vp,this).get(t),e)}show(t,e){h(Vp,this).get(t).classList.toggle("hidden",!e)}rotate(t,e){h(Vp,this).get(t).setAttribute("data-main-rotation",e)}changeColor(t,e){h(Vp,this).get(t).setAttribute("fill",e)}changeOpacity(t,e){h(Vp,this).get(t).setAttribute("fill-opacity",e)}addClass(t,e){h(Vp,this).get(t).classList.add(e)}removeClass(t,e){h(Vp,this).get(t).classList.remove(e)}remove(t){null!==h(Hp,this)&&(h(Vp,this).get(t).remove(),h(Vp,this).delete(t))}destroy(){c(Hp,this,null);for(const t of h(Vp,this).values())t.remove();h(Vp,this).clear()}}function Xp(t){let{x:e=0,y:i=0,width:s=1,height:n=1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{style:a}=t;a.top="".concat(100*i,"%"),a.left="".concat(100*e,"%"),a.width="".concat(100*s,"%"),a.height="".concat(100*n,"%")}function Kp(t){const e=_._svgFactory.create(1,1,!0);return h(Hp,this).append(e),e.setAttribute("aria-hidden",!0),Xp.call(_,e,t),e}function Yp(t,e){const i=_._svgFactory.createElement("clipPath");t.append(i);const s="clip_".concat(e);i.setAttribute("id",s),i.setAttribute("clipPathUnits","objectBoundingBox");const n=_._svgFactory.createElement("use");return i.append(n),n.setAttribute("href","#".concat(e)),n.classList.add("clip"),s}_=qp;var Qp=k.AnnotationLayer,Jp=k.AnnotationMode,Zp=k.GlobalWorkerOptions,$p=k.PDFDataRangeTransport,tf=k.TextLayer,ef=k.getDocument},97806:(t,e,i)=>{"use strict";i.d(e,{A:()=>k});var s=i(70579),n=i(65043),a=i(77906),r=i(40645),o=i(58387),l=i(3404),h=i(96440),c=Object.prototype.hasOwnProperty;function d(t,e,i){for(i of t.keys())if(u(i,e))return i}function u(t,e){var i,s,n;if(t===e)return!0;if(t&&e&&(i=t.constructor)===e.constructor){if(i===Date)return t.getTime()===e.getTime();if(i===RegExp)return t.toString()===e.toString();if(i===Array){if((s=t.length)===e.length)for(;s--&&u(t[s],e[s]););return-1===s}if(i===Set){if(t.size!==e.size)return!1;for(s of t){if((n=s)&&"object"===typeof n&&!(n=d(e,n)))return!1;if(!e.has(n))return!1}return!0}if(i===Map){if(t.size!==e.size)return!1;for(s of t){if((n=s[0])&&"object"===typeof n&&!(n=d(e,n)))return!1;if(!u(s[1],e.get(n)))return!1}return!0}if(i===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(i===DataView){if((s=t.byteLength)===e.byteLength)for(;s--&&t.getInt8(s)===e.getInt8(s););return-1===s}if(ArrayBuffer.isView(t)){if((s=t.byteLength)===e.byteLength)for(;s--&&t[s]===e[s];);return-1===s}if(!i||"object"===typeof t){for(i in s=0,t){if(c.call(t,i)&&++s&&!c.call(e,i))return!1;if(!(i in e)||!u(t[i],e[i]))return!1}return Object.keys(e).length===s}}return t!==t&&e!==e}var p=i(77397),f=i(16512),g=i(48599);class m{constructor(){this.externalLinkEnabled=!0,this.externalLinkRel=void 0,this.externalLinkTarget=void 0,this.isInPresentationMode=!1,this.pdfDocument=void 0,this.pdfViewer=void 0}setDocument(t){this.pdfDocument=t}setViewer(t){this.pdfViewer=t}setExternalLinkRel(t){this.externalLinkRel=t}setExternalLinkTarget(t){this.externalLinkTarget=t}setHistory(){}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return(0,l.A)(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber||0}set page(t){(0,l.A)(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber=t}get rotation(){return 0}set rotation(t){}goToDestination(t){return new Promise((e=>{(0,l.A)(this.pdfDocument,"PDF document not loaded."),(0,l.A)(t,"Destination is not specified."),"string"===typeof t?this.pdfDocument.getDestination(t).then(e):Array.isArray(t)?e(t):t.then(e)})).then((t=>{(0,l.A)(Array.isArray(t),'"'.concat(t,'" is not a valid destination array.'));const e=t[0];new Promise((t=>{(0,l.A)(this.pdfDocument,"PDF document not loaded."),e instanceof Object?this.pdfDocument.getPageIndex(e).then((e=>{t(e)})).catch((()=>{(0,l.A)(!1,'"'.concat(e,'" is not a valid page reference.'))})):"number"===typeof e?t(e):(0,l.A)(!1,'"'.concat(e,'" is not a valid destination reference.'))})).then((e=>{const i=e+1;(0,l.A)(this.pdfViewer,"PDF viewer is not initialized."),(0,l.A)(i>=1&&i<=this.pagesCount,'"'.concat(i,'" is not a valid page number.')),this.pdfViewer.scrollPageIntoView({dest:t,pageIndex:e,pageNumber:i})}))}))}navigateTo(t){this.goToDestination(t)}goToPage(t){const e=t-1;(0,l.A)(this.pdfViewer,"PDF viewer is not initialized."),(0,l.A)(t>=1&&t<=this.pagesCount,'"'.concat(t,'" is not a valid page number.')),this.pdfViewer.scrollPageIntoView({pageIndex:e,pageNumber:t})}addLinkAttributes(t,e,i){t.href=e,t.rel=this.externalLinkRel||"noopener noreferrer nofollow",t.target=i?"_blank":this.externalLinkTarget||""}getDestinationHash(){return"#"}getAnchorUrl(){return"#"}setHash(){}executeNamedAction(){}cachePageRef(){}isPageVisible(){return!0}isPageCached(){return!0}executeSetOCGState(){}}const v={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var b=i(20665),y=i(28234),A=function(t,e,i,s){return new(i||(i=Promise))((function(n,a){function r(t){try{l(s.next(t))}catch(e){a(e)}}function o(t){try{l(s.throw(t))}catch(e){a(e)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(r,o)}l((s=s.apply(t,e||[])).next())}))},w=function(t,e){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(i[s]=t[s]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var n=0;for(s=Object.getOwnPropertySymbols(t);n{switch(e){case v.NEED_PASSWORD:t(prompt("Enter the password to open this PDF file."));break;case v.INCORRECT_PASSWORD:t(prompt("Invalid password. Please try again."));break}};function E(t){return"object"===typeof t&&null!==t&&("data"in t||"range"in t||"url"in t)}const k=(0,n.forwardRef)((function(t,e){var{children:i,className:c,error:d="Failed to load PDF file.",externalLinkRel:v,externalLinkTarget:k,file:S,inputRef:M,imageResourcesPath:C,loading:R="Loading PDF\u2026",noData:T="No PDF file specified.",onItemClick:P,onLoadError:L,onLoadProgress:D,onLoadSuccess:I,onPassword:F=x,onSourceError:O,onSourceSuccess:N,options:W,renderMode:j,rotate:B}=t,H=w(t,["children","className","error","externalLinkRel","externalLinkTarget","file","inputRef","imageResourcesPath","loading","noData","onItemClick","onLoadError","onLoadProgress","onLoadSuccess","onPassword","onSourceError","onSourceSuccess","options","renderMode","rotate"]);const[z,V]=(0,y.A)(),{value:G,error:U}=z,[q,X]=(0,y.A)(),{value:K,error:Y}=q,Q=(0,n.useRef)(new m),J=(0,n.useRef)([]),Z=(0,n.useRef)(void 0),$=(0,n.useRef)(void 0);S&&S!==Z.current&&E(S)&&(h(!u(S,Z.current),'File prop passed to changed, but it\'s equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "file" prop.'),Z.current=S),W&&W!==$.current&&(h(!u(W,$.current),'Options prop passed to changed, but it\'s equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "options" prop.'),$.current=W);const tt=(0,n.useRef)({scrollPageIntoView:t=>{const{dest:e,pageNumber:i,pageIndex:s=i-1}=t;if(P)return void P({dest:e,pageIndex:s,pageNumber:i});const n=J.current[s];n?n.scrollIntoView():h(!1,"An internal link leading to page ".concat(i," was clicked, but neither was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to and handle navigating by yourself or ensure that all pages are rendered within ."))}});(0,n.useImperativeHandle)(e,(()=>({linkService:Q,pages:J,viewer:tt})),[]),(0,n.useEffect)((function(){V({type:"RESET"})}),[S,V]);const et=(0,n.useCallback)((()=>A(this,void 0,void 0,(function*(){if(!S)return null;if("string"===typeof S){if((0,b.zL)(S)){return{data:(0,b.jA)(S)}}return(0,b.qC)(),{url:S}}if(S instanceof _)return{range:S};if((0,b.mw)(S))return{data:S};if(b.Bd&&(0,b.qf)(S)){return{data:yield(0,b.h1)(S)}}if((0,l.A)("object"===typeof S,"Invalid parameter in file, need either Uint8Array, string or a parameter object"),(0,l.A)(E(S),"Invalid parameter object: need either .data, .range or .url"),"url"in S&&"string"===typeof S.url){if((0,b.zL)(S.url)){const{url:t}=S,e=w(S,["url"]),i=(0,b.jA)(t);return Object.assign({data:i},e)}(0,b.qC)()}return S}))),[S]);function it(t,e){J.current[t]=e}function st(t){delete J.current[t]}(0,n.useEffect)((()=>{const t=(0,r.A)(et());return t.promise.then((t=>{V({type:"RESOLVE",value:t})})).catch((t=>{V({type:"REJECT",error:t})})),()=>{(0,b.xL)(t)}}),[et,V]),(0,n.useEffect)((()=>{"undefined"!==typeof G&&(!1!==G?N&&N():U&&(h(!1,U.toString()),O&&O(U)))}),[G]),(0,n.useEffect)((function(){X({type:"RESET"})}),[X,G]),(0,n.useEffect)((function(){if(!G)return;const t=Object.assign(Object.assign({},G),W),e=p.YE(t);D&&(e.onProgress=D),F&&(e.onPassword=F);const i=e;return i.promise.then((t=>{X({type:"RESOLVE",value:t})})).catch((t=>{i.destroyed||X({type:"REJECT",error:t})})),()=>{i.destroy()}}),[W,X,G]),(0,n.useEffect)((()=>{"undefined"!==typeof K&&(!1!==K?K&&(I&&I(K),J.current=new Array(K.numPages),Q.current.setDocument(K)):Y&&(h(!1,Y.toString()),L&&L(Y)))}),[K]),(0,n.useEffect)((function(){Q.current.setViewer(tt.current),Q.current.setExternalLinkRel(v),Q.current.setExternalLinkTarget(k)}),[v,k]);const nt=(0,n.useMemo)((()=>({imageResourcesPath:C,linkService:Q.current,onItemClick:P,pdf:K,registerPage:it,renderMode:j,rotate:B,unregisterPage:st})),[C,P,K,j,B]),at=(0,n.useMemo)((()=>(0,a.Ay)(H,(()=>K))),[H,K]);return(0,s.jsx)("div",Object.assign({className:(0,o.A)("react-pdf__Document",c),ref:M,style:{"--scale-factor":"1"}},at,{children:S?void 0===K||null===K?(0,s.jsx)(g.A,{type:"loading",children:"function"===typeof R?R():R}):!1===K?(0,s.jsx)(g.A,{type:"error",children:"function"===typeof d?d():d}):(0,s.jsx)(f.A.Provider,{value:nt,children:i}):(0,s.jsx)(g.A,{type:"no-data",children:"function"===typeof T?T():T})}))}))},16512:(t,e,i)=>{"use strict";i.d(e,{A:()=>s});const s=(0,i(65043).createContext)(null)},48599:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var s=i(70579);function n(t){let{children:e,type:i}=t;return(0,s.jsx)("div",{className:"react-pdf__message react-pdf__message--".concat(i),children:e})}},6584:(t,e,i)=>{"use strict";i.d(e,{A:()=>I});var s=i(70579),n=i(65043),a=i(40645),r=i(77906),o=i(58387);function l(){for(var t=[],e=0;eA(i)),[i]),r=(0,n.useMemo)((()=>m(i)?v(i)?null:i.children.map(((t,e)=>(0,s.jsx)(w,{node:t},e))):null),[i]);return(0,s.jsx)("span",Object.assign({className:e},a,{children:r}))}function _(){return(0,n.useContext)(d)}var x=i(28234),E=i(20665);function k(){const t=_();(0,h.A)(t,"Unable to find Page context.");const{onGetStructTreeError:e,onGetStructTreeSuccess:i}=t,[r,o]=(0,x.A)(),{value:l,error:d}=r,{customTextRenderer:u,page:p}=t;return(0,n.useEffect)((function(){o({type:"RESET"})}),[o,p]),(0,n.useEffect)((function(){if(u)return;if(!p)return;const t=(0,a.A)(p.getStructTree()),e=t;return t.promise.then((t=>{o({type:"RESOLVE",value:t})})).catch((t=>{o({type:"REJECT",error:t})})),()=>(0,E.xL)(e)}),[u,p,o]),(0,n.useEffect)((()=>{void 0!==l&&(!1!==l?l&&i&&i(l):d&&(c(!1,d.toString()),e&&e(d)))}),[l]),l?(0,s.jsx)(w,{className:"react-pdf__Page__structTree structTree",node:l}):null}const S=p.ng;function M(t){const e=_();(0,h.A)(e,"Unable to find Page context.");const i=Object.assign(Object.assign({},e),t),{_className:a,canvasBackground:r,devicePixelRatio:o=(0,E.mZ)(),onRenderError:d,onRenderSuccess:u,page:p,renderForms:f,renderTextLayer:g,rotate:m,scale:v}=i,{canvasRef:b}=t;(0,h.A)(p,"Attempted to render page canvas, but no page was specified.");const y=(0,n.useRef)(null);function A(t){(0,E.UT)(t)||(c(!1,t.toString()),d&&d(t))}const w=(0,n.useMemo)((()=>p.getViewport({scale:v*o,rotation:m})),[o,p,m,v]),x=(0,n.useMemo)((()=>p.getViewport({scale:v,rotation:m})),[p,m,v]);(0,n.useEffect)((function(){if(!p)return;p.cleanup();const{current:t}=y;if(!t)return;t.width=w.width,t.height=w.height,t.style.width="".concat(Math.floor(x.width),"px"),t.style.height="".concat(Math.floor(x.height),"px"),t.style.visibility="hidden";const e={annotationMode:f?S.ENABLE_FORMS:S.ENABLE,canvasContext:t.getContext("2d",{alpha:!1}),viewport:w};r&&(e.background=r);const i=p.render(e),s=i;return i.promise.then((()=>{t.style.visibility="",p&&u&&u((0,E.vS)(p,v))})).catch(A),()=>(0,E.xL)(s)}),[r,y,o,p,f,w,x]);const M=(0,n.useCallback)((()=>{const{current:t}=y;t&&(t.width=0,t.height=0)}),[y]);return(0,n.useEffect)((()=>M),[M]),(0,s.jsx)("canvas",{className:"".concat(a,"__canvas"),dir:"ltr",ref:l(b,y),style:{display:"block",userSelect:"none"},children:g?(0,s.jsx)(k,{}):null})}function C(){const t=_();(0,h.A)(t,"Unable to find Page context.");const{customTextRenderer:e,onGetTextError:i,onGetTextSuccess:r,onRenderTextLayerError:l,onRenderTextLayerSuccess:d,page:u,pageIndex:f,pageNumber:g,rotate:m,scale:v}=t;(0,h.A)(u,"Attempted to load page text content, but no page was specified.");const[b,y]=(0,x.A)(),{value:A,error:w}=b,k=(0,n.useRef)(null),S=(0,n.useRef)(void 0);c(1===parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-text-layer"),10),"TextLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-text-layer"),(0,n.useEffect)((function(){y({type:"RESET"})}),[u,y]),(0,n.useEffect)((function(){if(!u)return;const t=(0,a.A)(u.getTextContent()),e=t;return t.promise.then((t=>{y({type:"RESOLVE",value:t})})).catch((t=>{y({type:"REJECT",error:t})})),()=>(0,E.xL)(e)}),[u,y]),(0,n.useEffect)((()=>{void 0!==A&&(!1!==A?A&&r&&r(A):w&&(c(!1,w.toString()),i&&i(w)))}),[A]);const M=(0,n.useCallback)((()=>{d&&d()}),[d]),C=(0,n.useCallback)((t=>{c(!1,t.toString()),l&&l(t)}),[l]);const R=(0,n.useMemo)((()=>u.getViewport({scale:v,rotation:m})),[u,m,v]);return(0,n.useLayoutEffect)((function(){if(!u||!A)return;const{current:t}=k;if(!t)return;t.innerHTML="";const i=u.streamTextContent({includeMarkedContent:!0}),s={container:t,textContentSource:i,viewport:R},n=new p.D6(s),a=n;return n.render().then((()=>{const i=document.createElement("div");i.className="endOfContent",t.append(i),S.current=i;const s=t.querySelectorAll('[role="presentation"]');if(e){let t=0;A.items.forEach(((i,n)=>{if(!function(t){return"str"in t}(i))return;const a=s[t];if(!a)return;const r=e(Object.assign({pageIndex:f,pageNumber:g,itemIndex:n},i));a.innerHTML=r,t+=i.str&&i.hasEOL?2:1}))}M()})).catch(C),()=>(0,E.xL)(a)}),[e,C,M,u,f,g,A,R]),(0,s.jsx)("div",{className:(0,o.A)("react-pdf__Page__textContent","textLayer"),onMouseUp:function(){const t=S.current;t&&t.classList.remove("active")},onMouseDown:function(){const t=S.current;t&&t.classList.add("active")},ref:k})}var R=i(16512);function T(){return(0,n.useContext)(R.A)}function P(){const t=T(),e=_();(0,h.A)(e,"Unable to find Page context.");const i=Object.assign(Object.assign({},t),e),{imageResourcesPath:r,linkService:l,onGetAnnotationsError:d,onGetAnnotationsSuccess:u,onRenderAnnotationLayerError:f,onRenderAnnotationLayerSuccess:g,page:m,pdf:v,renderForms:b,rotate:y,scale:A=1}=i;(0,h.A)(v,"Attempted to load page annotations, but no document was specified. Wrap in a or pass explicit `pdf` prop."),(0,h.A)(m,"Attempted to load page annotations, but no page was specified."),(0,h.A)(l,"Attempted to load page annotations, but no linkService was specified.");const[w,k]=(0,x.A)(),{value:S,error:M}=w,C=(0,n.useRef)(null);c(1===parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-annotation-layer"),10),"AnnotationLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-annotations"),(0,n.useEffect)((function(){k({type:"RESET"})}),[k,m]),(0,n.useEffect)((function(){if(!m)return;const t=(0,a.A)(m.getAnnotations()),e=t;return t.promise.then((t=>{k({type:"RESOLVE",value:t})})).catch((t=>{k({type:"REJECT",error:t})})),()=>{(0,E.xL)(e)}}),[k,m,b]),(0,n.useEffect)((()=>{void 0!==S&&(!1!==S?S&&u&&u(S):M&&(c(!1,M.toString()),d&&d(M)))}),[S]);const R=(0,n.useMemo)((()=>m.getViewport({scale:A,rotation:y})),[m,y,A]);return(0,n.useEffect)((function(){if(!v||!m||!l||!S)return;const{current:t}=C;if(!t)return;const e=R.clone({dontFlip:!0}),i={accessibilityManager:null,annotationCanvasMap:null,annotationEditorUIManager:null,div:t,l10n:null,page:m,viewport:e},s={annotations:S,annotationStorage:v.annotationStorage,div:t,imageResourcesPath:r,linkService:l,page:m,renderForms:b,viewport:e};t.innerHTML="";try{new p.dU(i).render(s),g&&g()}catch(n){!function(t){c(!1,"".concat(t)),f&&f(t)}(n)}return()=>{}}),[S,r,l,m,b,R]),(0,s.jsx)("div",{className:(0,o.A)("react-pdf__Page__annotations","annotationLayer"),ref:C})}var L=function(t,e){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(i[s]=t[s]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var n=0;for(s=Object.getOwnPropertySymbols(t);n in a or pass explicit `pdf` prop.");const pt=(0,E.ci)(Q)?Q-1:null!==Y&&void 0!==Y?Y:null,ft=null!==Q&&void 0!==Q?Q:(0,E.ci)(Y)?Y+1:null,gt=null!==st&&void 0!==st?st:ct?ct.rotate:null,mt=(0,n.useMemo)((()=>{if(!ct)return null;let t=1;const e=null!==nt&&void 0!==nt?nt:D;if(rt||k){const e=ct.getViewport({scale:1,rotation:gt});rt?t=rt/e.width:k&&(t=k/e.height)}return e*t}),[k,ct,gt,nt,rt]);(0,n.useEffect)((function(){return()=>{(0,E.ci)(pt)&&f&&at&&at(pt)}}),[f,J,pt,at]),(0,n.useEffect)((function(){ht({type:"RESET"})}),[ht,J,pt]),(0,n.useEffect)((function(){if(!J||!ft)return;const t=(0,a.A)(J.getPage(ft)),e=t;return t.promise.then((t=>{ht({type:"RESOLVE",value:t})})).catch((t=>{ht({type:"REJECT",error:t})})),()=>(0,E.xL)(e)}),[ht,J,pt,ft,Z]),(0,n.useEffect)((()=>{void 0!==ct&&(!1!==ct?function(){if(z){if(!ct||!mt)return;z((0,E.vS)(ct,mt))}if(f&&Z){if(!(0,E.ci)(pt)||!ut.current)return;Z(pt,ut.current)}}():dt&&(c(!1,dt.toString()),H&&H(dt)))}),[ct,mt]);const vt=(0,n.useMemo)((()=>ct&&(0,E.ci)(pt)&&ft&&(0,E.ci)(gt)&&(0,E.ci)(mt)?{_className:p,canvasBackground:g,customTextRenderer:A,devicePixelRatio:w,onGetAnnotationsError:F,onGetAnnotationsSuccess:O,onGetStructTreeError:N,onGetStructTreeSuccess:W,onGetTextError:j,onGetTextSuccess:B,onRenderAnnotationLayerError:V,onRenderAnnotationLayerSuccess:G,onRenderError:U,onRenderSuccess:q,onRenderTextLayerError:X,onRenderTextLayerSuccess:K,page:ct,pageIndex:pt,pageNumber:ft,renderForms:tt,renderTextLayer:it,rotate:gt,scale:mt}:null),[p,g,A,w,F,O,N,W,j,B,V,G,U,q,X,K,ct,pt,ft,tt,it,gt,mt]),bt=(0,n.useMemo)((()=>(0,r.Ay)(ot,(()=>ct?mt?(0,E.vS)(ct,mt):void 0:ct))),[ot,ct,mt]),yt="".concat(pt,"@").concat(mt,"/").concat(gt);function At(){switch(et){case"custom":return(0,h.A)(y,'renderMode was set to "custom", but no customRenderer was passed.'),(0,s.jsx)(y,{},"".concat(yt,"_custom"));case"none":return null;default:return(0,s.jsx)(M,{canvasRef:m},"".concat(yt,"_canvas"))}}return(0,s.jsx)("div",Object.assign({className:(0,o.A)(p,b),"data-page-number":ft,ref:l(S,ut),style:{"--scale-factor":"".concat(mt),backgroundColor:g||"white",position:"relative",minWidth:"min-content",minHeight:"min-content"}},bt,{children:ft?null===J||void 0===ct||null===ct?(0,s.jsx)(u.A,{type:"loading",children:"function"===typeof R?R():R}):!1===J||!1===ct?(0,s.jsx)(u.A,{type:"error",children:"function"===typeof _?_():_}):(0,s.jsxs)(d.Provider,{value:vt,children:[At(),it?(0,s.jsx)(C,{},"".concat(yt,"_text")):null,$?(0,s.jsx)(P,{},"".concat(yt,"_annotations")):null,v]}):(0,s.jsx)(u.A,{type:"no-data",children:"function"===typeof I?I():I})}))}},28234:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var s=i(65043);function n(t,e){switch(e.type){case"RESOLVE":return{value:e.value,error:void 0};case"REJECT":return{value:!1,error:e.error};case"RESET":return{value:void 0,error:void 0};default:return t}}function a(){return(0,s.useReducer)(n,{value:void 0,error:void 0})}},20665:(t,e,i)=>{"use strict";i.d(e,{Bd:()=>a,UT:()=>v,ci:()=>o,h1:()=>b,jA:()=>d,mZ:()=>u,mw:()=>l,qC:()=>f,qf:()=>h,vS:()=>m,xL:()=>g,zL:()=>c});var s=i(3404),n=i(96440);const a="undefined"!==typeof document,r=a&&"file:"===window.location.protocol;function o(t){return function(t){return"undefined"!==typeof t}(t)&&null!==t}function l(t){return t instanceof ArrayBuffer}function h(t){return(0,s.A)(a,"isBlob can only be used in a browser environment"),t instanceof Blob}function c(t){return function(t){return"string"===typeof t}(t)&&/^data:/.test(t)}function d(t){(0,s.A)(c(t),"Invalid data URI.");const[e="",i=""]=t.split(",");return-1!==e.split(";").indexOf("base64")?atob(i):unescape(i)}function u(){return a&&window.devicePixelRatio||1}const p="On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.";function f(){n(!r,"Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ".concat(p))}function g(t){t&&t.cancel&&t.cancel()}function m(t,e){return Object.defineProperty(t,"width",{get(){return this.view[2]*e},configurable:!0}),Object.defineProperty(t,"height",{get(){return this.view[3]*e},configurable:!0}),Object.defineProperty(t,"originalWidth",{get(){return this.view[2]},configurable:!0}),Object.defineProperty(t,"originalHeight",{get(){return this.view[3]},configurable:!0}),t}function v(t){return"RenderingCancelledException"===t.name}function b(t){return new Promise(((e,i)=>{const s=new FileReader;s.onload=()=>{if(!s.result)return i(new Error("Error while reading a file."));e(s.result)},s.onerror=t=>{if(!t.target)return i(new Error("Error while reading a file."));const{error:e}=t.target;if(!e)return i(new Error("Error while reading a file."));switch(e.code){case e.NOT_FOUND_ERR:return i(new Error("Error while reading a file: File not found."));case e.SECURITY_ERR:return i(new Error("Error while reading a file: Security error."));case e.ABORT_ERR:return i(new Error("Error while reading a file: Aborted."));default:return i(new Error("Error while reading a file."))}},s.readAsArrayBuffer(t)}))}}}]); +//# sourceMappingURL=2346.02be873a.chunk.js.map \ No newline at end of file diff --git a/web-app/build/static/js/2346.02be873a.chunk.js.map b/web-app/build/static/js/2346.02be873a.chunk.js.map new file mode 100644 index 0000000000..5554aa9be3 --- /dev/null +++ b/web-app/build/static/js/2346.02be873a.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"static/js/2346.02be873a.chunk.js","mappings":"iGAIAA,EAAQ,EAAU,SAAUC,EAAMC,GAChC,GAAID,GAAQC,EAAe,CACzB,IAAIC,EAAqBC,MAAMC,QAAQH,GAAiBA,EAAgBA,EAAcI,MAAM,KACxFC,EAAWN,EAAKO,MAAQ,GACxBC,GAAYR,EAAKS,MAAQ,IAAIC,cAC7BC,EAAeH,EAASI,QAAQ,QAAS,IAC7C,OAAOV,EAAmBW,MAAK,SAAUJ,GACvC,IAAIK,EAAYL,EAAKM,OAAOL,cAE5B,MAA4B,MAAxBI,EAAUE,OAAO,GACZV,EAASI,cAAcO,SAASH,GAC9BA,EAAUG,SAAS,MAErBN,IAAiBG,EAAUF,QAAQ,QAAS,IAG9CJ,IAAaM,CACtB,GACF,CAEA,OAAO,CACT,C,+BCvBA,IAAII,EAAkBC,EAAQ,OAE1BC,EAA4B,CAC9B,aAAc,OACd,YAAa,MACb,QAAW,QA2GbC,EAAOtB,QAjGP,SAAcuB,EAAMC,GAClB,IAAIC,EACFC,EACAC,EACAC,EACAC,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AO6C,EAAO,IAAI1H,MAAM,gCAE5ByH,EAAQ0E,EAAOtH,OAAO,EAE1BsH,EAAOk0B,QAAW75B,IACd,IAAKA,EAAMjE,OACP,OAAOmF,EAAO,IAAI1H,MAAM,gCAE5B,MAAM,MAAEE,GAAUsG,EAAMjE,OACxB,IAAKrC,EACD,OAAOwH,EAAO,IAAI1H,MAAM,gCAE5B,OAAQE,EAAMsO,MACV,KAAKtO,EAAMopI,cACP,OAAO5hI,EAAO,IAAI1H,MAAM,gDAC5B,KAAKE,EAAMmX,aACP,OAAO3P,EAAO,IAAI1H,MAAM,gDAC5B,KAAKE,EAAMkX,UACP,OAAO1P,EAAO,IAAI1H,MAAM,yCAC5B,QACI,OAAO0H,EAAO,IAAI1H,MAAM,gCAChC,EAEJmM,EAAOo9H,kBAAkBvtI,EAAK,GAEtC,C","sources":["../node_modules/attr-accept/dist/es/index.js","../node_modules/copy-to-clipboard/index.js","../node_modules/react-copy-to-clipboard/lib/Component.js","../node_modules/react-copy-to-clipboard/lib/index.js","../node_modules/tslib/tslib.es6.mjs","../node_modules/file-selector/src/file.ts","../node_modules/file-selector/src/file-selector.ts","../node_modules/react-dropzone/dist/es/utils/index.js","../node_modules/react-dropzone/dist/es/index.js","../node_modules/toggle-selection/index.js","../node_modules/warning/warning.js","../node_modules/make-cancellable-promise/dist/esm/index.js","../node_modules/make-event-props/dist/esm/index.js","../node_modules/@babel/runtime/helpers/esm/toSetter.js","../node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js","../node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js","../node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js","../node_modules/@babel/runtime/helpers/esm/assertClassBrand.js","../node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js","../node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js","../node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js","../pdf.js/webpack/bootstrap","../pdf.js/webpack/runtime/define property getters","../pdf.js/webpack/runtime/hasOwnProperty shorthand","../pdf.js/src/shared/util.js","../pdf.js/src/display/base_factory.js","../pdf.js/src/display/display_utils.js","../pdf.js/src/display/editor/toolbar.js","../pdf.js/src/display/editor/tools.js","../pdf.js/src/display/editor/alt_text.js","../pdf.js/src/display/editor/editor.js","../pdf.js/src/shared/murmurhash3.js","../pdf.js/src/display/annotation_storage.js","../pdf.js/src/display/font_loader.js","../pdf.js/src/display/node_utils.js","../pdf.js/src/display/pattern_helper.js","../pdf.js/src/shared/image_utils.js","../pdf.js/src/display/canvas.js","../pdf.js/src/display/worker_options.js","../pdf.js/src/shared/message_handler.js","../pdf.js/src/display/metadata.js","../pdf.js/src/display/optional_content_config.js","../pdf.js/src/display/transport_stream.js","../pdf.js/src/display/network_utils.js","../pdf.js/src/display/content_disposition.js","../pdf.js/src/display/fetch_stream.js","../pdf.js/src/display/network.js","../pdf.js/src/display/node_stream.js","../pdf.js/src/display/text_layer.js","../pdf.js/src/display/xfa_text.js","../pdf.js/src/display/api.js","../pdf.js/src/shared/scripting_utils.js","../pdf.js/src/display/xfa_layer.js","../pdf.js/src/display/annotation_layer.js","../pdf.js/src/display/editor/freetext.js","../pdf.js/src/display/editor/outliner.js","../pdf.js/src/display/editor/color_picker.js","../pdf.js/src/display/editor/highlight.js","../pdf.js/src/display/editor/ink.js","../pdf.js/src/display/editor/stamp.js","../pdf.js/src/display/editor/annotation_editor_layer.js","../pdf.js/src/display/draw_layer.js","../node_modules/dequal/dist/index.mjs","../node_modules/react-pdf/dist/esm/LinkService.js","../node_modules/react-pdf/dist/esm/PasswordResponses.js","../node_modules/react-pdf/dist/esm/Document.js","../node_modules/react-pdf/dist/esm/DocumentContext.js","../node_modules/react-pdf/dist/esm/Message.js","../node_modules/merge-refs/dist/esm/index.js","../node_modules/react-pdf/dist/esm/PageContext.js","../node_modules/react-pdf/dist/esm/shared/constants.js","../node_modules/react-pdf/dist/esm/shared/structTreeUtils.js","../node_modules/react-pdf/dist/esm/StructTreeItem.js","../node_modules/react-pdf/dist/esm/shared/hooks/usePageContext.js","../node_modules/react-pdf/dist/esm/StructTree.js","../node_modules/react-pdf/dist/esm/Page/Canvas.js","../node_modules/react-pdf/dist/esm/Page/TextLayer.js","../node_modules/react-pdf/dist/esm/shared/hooks/useDocumentContext.js","../node_modules/react-pdf/dist/esm/Page/AnnotationLayer.js","../node_modules/react-pdf/dist/esm/Page.js","../node_modules/react-pdf/dist/esm/shared/hooks/useResolver.js","../node_modules/react-pdf/dist/esm/shared/utils.js"],"sourcesContent":["\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (file, acceptedFiles) {\n if (file && acceptedFiles) {\n var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(',');\n var fileName = file.name || '';\n var mimeType = (file.type || '').toLowerCase();\n var baseMimeType = mimeType.replace(/\\/.*$/, '');\n return acceptedFilesArray.some(function (type) {\n var validType = type.trim().toLowerCase();\n\n if (validType.charAt(0) === '.') {\n return fileName.toLowerCase().endsWith(validType);\n } else if (validType.endsWith('/*')) {\n // This is something like a image/* mime type\n return baseMimeType === validType.replace(/\\/.*$/, '');\n }\n\n return mimeType === validType;\n });\n }\n\n return true;\n};","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // avoid screen readers from reading out loud the text\n mark.ariaHidden = \"true\"\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CopyToClipboard = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _copyToClipboard = _interopRequireDefault(require(\"copy-to-clipboard\"));\n\nvar _excluded = [\"text\", \"onCopy\", \"options\", \"children\"];\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar CopyToClipboard = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(CopyToClipboard, _React$PureComponent);\n\n var _super = _createSuper(CopyToClipboard);\n\n function CopyToClipboard() {\n var _this;\n\n _classCallCheck(this, CopyToClipboard);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"onClick\", function (event) {\n var _this$props = _this.props,\n text = _this$props.text,\n onCopy = _this$props.onCopy,\n children = _this$props.children,\n options = _this$props.options;\n\n var elem = _react[\"default\"].Children.only(children);\n\n var result = (0, _copyToClipboard[\"default\"])(text, options);\n\n if (onCopy) {\n onCopy(text, result);\n } // Bypass onClick if it was present\n\n\n if (elem && elem.props && typeof elem.props.onClick === 'function') {\n elem.props.onClick(event);\n }\n });\n\n return _this;\n }\n\n _createClass(CopyToClipboard, [{\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n _text = _this$props2.text,\n _onCopy = _this$props2.onCopy,\n _options = _this$props2.options,\n children = _this$props2.children,\n props = _objectWithoutProperties(_this$props2, _excluded);\n\n var elem = _react[\"default\"].Children.only(children);\n\n return /*#__PURE__*/_react[\"default\"].cloneElement(elem, _objectSpread(_objectSpread({}, props), {}, {\n onClick: this.onClick\n }));\n }\n }]);\n\n return CopyToClipboard;\n}(_react[\"default\"].PureComponent);\n\nexports.CopyToClipboard = CopyToClipboard;\n\n_defineProperty(CopyToClipboard, \"defaultProps\", {\n onCopy: undefined,\n options: undefined\n});","\"use strict\";\n\nvar _require = require('./Component'),\n CopyToClipboard = _require.CopyToClipboard;\n\nCopyToClipboard.CopyToClipboard = CopyToClipboard;\nmodule.exports = CopyToClipboard;","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\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); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\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);\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); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\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\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\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\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","export const COMMON_MIME_TYPES = new Map([\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types\n ['aac', 'audio/aac'],\n ['abw', 'application/x-abiword'],\n ['arc', 'application/x-freearc'],\n ['avif', 'image/avif'],\n ['avi', 'video/x-msvideo'],\n ['azw', 'application/vnd.amazon.ebook'],\n ['bin', 'application/octet-stream'],\n ['bmp', 'image/bmp'],\n ['bz', 'application/x-bzip'],\n ['bz2', 'application/x-bzip2'],\n ['cda', 'application/x-cdf'],\n ['csh', 'application/x-csh'],\n ['css', 'text/css'],\n ['csv', 'text/csv'],\n ['doc', 'application/msword'],\n ['docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'],\n ['eot', 'application/vnd.ms-fontobject'],\n ['epub', 'application/epub+zip'],\n ['gz', 'application/gzip'],\n ['gif', 'image/gif'],\n ['heic', 'image/heic'],\n ['heif', 'image/heif'],\n ['htm', 'text/html'],\n ['html', 'text/html'],\n ['ico', 'image/vnd.microsoft.icon'],\n ['ics', 'text/calendar'],\n ['jar', 'application/java-archive'],\n ['jpeg', 'image/jpeg'],\n ['jpg', 'image/jpeg'],\n ['js', 'text/javascript'],\n ['json', 'application/json'],\n ['jsonld', 'application/ld+json'],\n ['mid', 'audio/midi'],\n ['midi', 'audio/midi'],\n ['mjs', 'text/javascript'],\n ['mp3', 'audio/mpeg'],\n ['mp4', 'video/mp4'],\n ['mpeg', 'video/mpeg'],\n ['mpkg', 'application/vnd.apple.installer+xml'],\n ['odp', 'application/vnd.oasis.opendocument.presentation'],\n ['ods', 'application/vnd.oasis.opendocument.spreadsheet'],\n ['odt', 'application/vnd.oasis.opendocument.text'],\n ['oga', 'audio/ogg'],\n ['ogv', 'video/ogg'],\n ['ogx', 'application/ogg'],\n ['opus', 'audio/opus'],\n ['otf', 'font/otf'],\n ['png', 'image/png'],\n ['pdf', 'application/pdf'],\n ['php', 'application/x-httpd-php'],\n ['ppt', 'application/vnd.ms-powerpoint'],\n ['pptx', 'application/vnd.openxmlformats-officedocument.presentationml.presentation'],\n ['rar', 'application/vnd.rar'],\n ['rtf', 'application/rtf'],\n ['sh', 'application/x-sh'],\n ['svg', 'image/svg+xml'],\n ['swf', 'application/x-shockwave-flash'],\n ['tar', 'application/x-tar'],\n ['tif', 'image/tiff'],\n ['tiff', 'image/tiff'],\n ['ts', 'video/mp2t'],\n ['ttf', 'font/ttf'],\n ['txt', 'text/plain'],\n ['vsd', 'application/vnd.visio'],\n ['wav', 'audio/wav'],\n ['weba', 'audio/webm'],\n ['webm', 'video/webm'],\n ['webp', 'image/webp'],\n ['woff', 'font/woff'],\n ['woff2', 'font/woff2'],\n ['xhtml', 'application/xhtml+xml'],\n ['xls', 'application/vnd.ms-excel'],\n ['xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],\n ['xml', 'application/xml'],\n ['xul', 'application/vnd.mozilla.xul+xml'],\n ['zip', 'application/zip'],\n ['7z', 'application/x-7z-compressed'],\n\n // Others\n ['mkv', 'video/x-matroska'],\n ['mov', 'video/quicktime'],\n ['msg', 'application/vnd.ms-outlook']\n]);\n\n\nexport function toFileWithPath(file: FileWithPath, path?: string): FileWithPath {\n const f = withMimeType(file);\n if (typeof f.path !== 'string') { // on electron, path is already set to the absolute path\n const {webkitRelativePath} = file;\n Object.defineProperty(f, 'path', {\n value: typeof path === 'string'\n ? path\n // If is set,\n // the File will have a {webkitRelativePath} property\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory\n : typeof webkitRelativePath === 'string' && webkitRelativePath.length > 0\n ? webkitRelativePath\n : file.name,\n writable: false,\n configurable: false,\n enumerable: true\n });\n }\n\n return f;\n}\n\nexport interface FileWithPath extends File {\n readonly path?: string;\n}\n\nfunction withMimeType(file: FileWithPath) {\n const {name} = file;\n const hasExtension = name && name.lastIndexOf('.') !== -1;\n\n if (hasExtension && !file.type) {\n const ext = name.split('.')\n .pop()!.toLowerCase();\n const type = COMMON_MIME_TYPES.get(ext);\n if (type) {\n Object.defineProperty(file, 'type', {\n value: type,\n writable: false,\n configurable: false,\n enumerable: true\n });\n }\n }\n\n return file;\n}\n","import {FileWithPath, toFileWithPath} from './file';\n\n\nconst FILES_TO_IGNORE = [\n // Thumbnail cache files for macOS and Windows\n '.DS_Store', // macOs\n 'Thumbs.db' // Windows\n];\n\n\n/**\n * Convert a DragEvent's DataTrasfer object to a list of File objects\n * NOTE: If some of the items are folders,\n * everything will be flattened and placed in the same list but the paths will be kept as a {path} property.\n *\n * EXPERIMENTAL: A list of https://developer.mozilla.org/en-US/docs/Web/API/FileSystemHandle objects can also be passed as an arg\n * and a list of File objects will be returned.\n *\n * @param evt\n */\nexport async function fromEvent(evt: Event | any): Promise<(FileWithPath | DataTransferItem)[]> {\n if (isObject(evt) && isDataTransfer(evt.dataTransfer)) {\n return getDataTransferFiles(evt.dataTransfer, evt.type);\n } else if (isChangeEvt(evt)) {\n return getInputFiles(evt);\n } else if (Array.isArray(evt) && evt.every(item => 'getFile' in item && typeof item.getFile === 'function')) {\n return getFsHandleFiles(evt)\n }\n return [];\n}\n\nfunction isDataTransfer(value: any): value is DataTransfer {\n return isObject(value);\n}\n\nfunction isChangeEvt(value: any): value is Event {\n return isObject(value) && isObject(value.target);\n}\n\nfunction isObject(v: any): v is T {\n return typeof v === 'object' && v !== null\n}\n\nfunction getInputFiles(evt: Event) {\n return fromList((evt.target as HTMLInputElement).files).map(file => toFileWithPath(file));\n}\n\n// Ee expect each handle to be https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle\nasync function getFsHandleFiles(handles: any[]) {\n const files = await Promise.all(handles.map(h => h.getFile()));\n return files.map(file => toFileWithPath(file));\n}\n\n\nasync function getDataTransferFiles(dt: DataTransfer, type: string) {\n // IE11 does not support dataTransfer.items\n // See https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/items#Browser_compatibility\n if (dt.items) {\n const items = fromList(dt.items)\n .filter(item => item.kind === 'file');\n // According to https://html.spec.whatwg.org/multipage/dnd.html#dndevents,\n // only 'dragstart' and 'drop' has access to the data (source node)\n if (type !== 'drop') {\n return items;\n }\n const files = await Promise.all(items.map(toFilePromises));\n return noIgnoredFiles(flatten(files));\n }\n\n return noIgnoredFiles(fromList(dt.files)\n .map(file => toFileWithPath(file)));\n}\n\nfunction noIgnoredFiles(files: FileWithPath[]) {\n return files.filter(file => FILES_TO_IGNORE.indexOf(file.name) === -1);\n}\n\n// IE11 does not support Array.from()\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Browser_compatibility\n// https://developer.mozilla.org/en-US/docs/Web/API/FileList\n// https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItemList\nfunction fromList(items: DataTransferItemList | FileList | null): T[] {\n if (items === null) {\n return [];\n }\n\n const files = [];\n\n // tslint:disable: prefer-for-of\n for (let i = 0; i < items.length; i++) {\n const file = items[i];\n files.push(file);\n }\n\n return files as any;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem\nfunction toFilePromises(item: DataTransferItem) {\n if (typeof item.webkitGetAsEntry !== 'function') {\n return fromDataTransferItem(item);\n }\n\n const entry = item.webkitGetAsEntry();\n\n // Safari supports dropping an image node from a different window and can be retrieved using\n // the DataTransferItem.getAsFile() API\n // NOTE: FileSystemEntry.file() throws if trying to get the file\n if (entry && entry.isDirectory) {\n return fromDirEntry(entry) as any;\n }\n\n return fromDataTransferItem(item);\n}\n\nfunction flatten(items: any[]): T[] {\n return items.reduce((acc, files) => [\n ...acc,\n ...(Array.isArray(files) ? flatten(files) : [files])\n ], []);\n}\n\nfunction fromDataTransferItem(item: DataTransferItem) {\n const file = item.getAsFile();\n if (!file) {\n return Promise.reject(`${item} is not a File`);\n }\n const fwp = toFileWithPath(file);\n return Promise.resolve(fwp);\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/API/FileSystemEntry\nasync function fromEntry(entry: any) {\n return entry.isDirectory ? fromDirEntry(entry) : fromFileEntry(entry);\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryEntry\nfunction fromDirEntry(entry: any) {\n const reader = entry.createReader();\n\n return new Promise((resolve, reject) => {\n const entries: Promise[] = [];\n\n function readEntries() {\n // https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryEntry/createReader\n // https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryReader/readEntries\n reader.readEntries(async (batch: any[]) => {\n if (!batch.length) {\n // Done reading directory\n try {\n const files = await Promise.all(entries);\n resolve(files);\n } catch (err) {\n reject(err);\n }\n } else {\n const items = Promise.all(batch.map(fromEntry));\n entries.push(items);\n\n // Continue reading\n readEntries();\n }\n }, (err: any) => {\n reject(err);\n });\n }\n\n readEntries();\n });\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileEntry\nasync function fromFileEntry(entry: any) {\n return new Promise((resolve, reject) => {\n entry.file((file: FileWithPath) => {\n const fwp = toFileWithPath(file, entry.fullPath);\n resolve(fwp);\n }, (err: any) => {\n reject(err);\n });\n });\n}\n\n// Infinite type recursion\n// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540\ninterface FileArray extends Array {}\ntype FileValue = FileWithPath\n | FileArray[];\n","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport accepts from \"attr-accept\"; // Error codes\n\nexport var FILE_INVALID_TYPE = \"file-invalid-type\";\nexport var FILE_TOO_LARGE = \"file-too-large\";\nexport var FILE_TOO_SMALL = \"file-too-small\";\nexport var TOO_MANY_FILES = \"too-many-files\";\nexport var ErrorCode = {\n FileInvalidType: FILE_INVALID_TYPE,\n FileTooLarge: FILE_TOO_LARGE,\n FileTooSmall: FILE_TOO_SMALL,\n TooManyFiles: TOO_MANY_FILES\n}; // File Errors\n\nexport var getInvalidTypeRejectionErr = function getInvalidTypeRejectionErr(accept) {\n accept = Array.isArray(accept) && accept.length === 1 ? accept[0] : accept;\n var messageSuffix = Array.isArray(accept) ? \"one of \".concat(accept.join(\", \")) : accept;\n return {\n code: FILE_INVALID_TYPE,\n message: \"File type must be \".concat(messageSuffix)\n };\n};\nexport var getTooLargeRejectionErr = function getTooLargeRejectionErr(maxSize) {\n return {\n code: FILE_TOO_LARGE,\n message: \"File is larger than \".concat(maxSize, \" \").concat(maxSize === 1 ? \"byte\" : \"bytes\")\n };\n};\nexport var getTooSmallRejectionErr = function getTooSmallRejectionErr(minSize) {\n return {\n code: FILE_TOO_SMALL,\n message: \"File is smaller than \".concat(minSize, \" \").concat(minSize === 1 ? \"byte\" : \"bytes\")\n };\n};\nexport var TOO_MANY_FILES_REJECTION = {\n code: TOO_MANY_FILES,\n message: \"Too many files\"\n}; // Firefox versions prior to 53 return a bogus MIME type for every file drag, so dragovers with\n// that MIME type will always be accepted\n\nexport function fileAccepted(file, accept) {\n var isAcceptable = file.type === \"application/x-moz-file\" || accepts(file, accept);\n return [isAcceptable, isAcceptable ? null : getInvalidTypeRejectionErr(accept)];\n}\nexport function fileMatchSize(file, minSize, maxSize) {\n if (isDefined(file.size)) {\n if (isDefined(minSize) && isDefined(maxSize)) {\n if (file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];\n if (file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];\n } else if (isDefined(minSize) && file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];else if (isDefined(maxSize) && file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];\n }\n\n return [true, null];\n}\n\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\n/**\n *\n * @param {object} options\n * @param {File[]} options.files\n * @param {string|string[]} [options.accept]\n * @param {number} [options.minSize]\n * @param {number} [options.maxSize]\n * @param {boolean} [options.multiple]\n * @param {number} [options.maxFiles]\n * @param {(f: File) => FileError|FileError[]|null} [options.validator]\n * @returns\n */\n\n\nexport function allFilesAccepted(_ref) {\n var files = _ref.files,\n accept = _ref.accept,\n minSize = _ref.minSize,\n maxSize = _ref.maxSize,\n multiple = _ref.multiple,\n maxFiles = _ref.maxFiles,\n validator = _ref.validator;\n\n if (!multiple && files.length > 1 || multiple && maxFiles >= 1 && files.length > maxFiles) {\n return false;\n }\n\n return files.every(function (file) {\n var _fileAccepted = fileAccepted(file, accept),\n _fileAccepted2 = _slicedToArray(_fileAccepted, 1),\n accepted = _fileAccepted2[0];\n\n var _fileMatchSize = fileMatchSize(file, minSize, maxSize),\n _fileMatchSize2 = _slicedToArray(_fileMatchSize, 1),\n sizeMatch = _fileMatchSize2[0];\n\n var customErrors = validator ? validator(file) : null;\n return accepted && sizeMatch && !customErrors;\n });\n} // React's synthetic events has event.isPropagationStopped,\n// but to remain compatibility with other libs (Preact) fall back\n// to check event.cancelBubble\n\nexport function isPropagationStopped(event) {\n if (typeof event.isPropagationStopped === \"function\") {\n return event.isPropagationStopped();\n } else if (typeof event.cancelBubble !== \"undefined\") {\n return event.cancelBubble;\n }\n\n return false;\n}\nexport function isEvtWithFiles(event) {\n if (!event.dataTransfer) {\n return !!event.target && !!event.target.files;\n } // https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/types\n // https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/Recommended_drag_types#file\n\n\n return Array.prototype.some.call(event.dataTransfer.types, function (type) {\n return type === \"Files\" || type === \"application/x-moz-file\";\n });\n}\nexport function isKindFile(item) {\n return _typeof(item) === \"object\" && item !== null && item.kind === \"file\";\n} // allow the entire document to be a drag target\n\nexport function onDocumentDragOver(event) {\n event.preventDefault();\n}\n\nfunction isIe(userAgent) {\n return userAgent.indexOf(\"MSIE\") !== -1 || userAgent.indexOf(\"Trident/\") !== -1;\n}\n\nfunction isEdge(userAgent) {\n return userAgent.indexOf(\"Edge/\") !== -1;\n}\n\nexport function isIeOrEdge() {\n var userAgent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.navigator.userAgent;\n return isIe(userAgent) || isEdge(userAgent);\n}\n/**\n * This is intended to be used to compose event handlers\n * They are executed in order until one of them calls `event.isPropagationStopped()`.\n * Note that the check is done on the first invoke too,\n * meaning that if propagation was stopped before invoking the fns,\n * no handlers will be executed.\n *\n * @param {Function} fns the event hanlder functions\n * @return {Function} the event handler to add to an element\n */\n\nexport function composeEventHandlers() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (event) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n return fns.some(function (fn) {\n if (!isPropagationStopped(event) && fn) {\n fn.apply(void 0, [event].concat(args));\n }\n\n return isPropagationStopped(event);\n });\n };\n}\n/**\n * canUseFileSystemAccessAPI checks if the [File System Access API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API)\n * is supported by the browser.\n * @returns {boolean}\n */\n\nexport function canUseFileSystemAccessAPI() {\n return \"showOpenFilePicker\" in window;\n}\n/**\n * Convert the `{accept}` dropzone prop to the\n * `{types}` option for https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker\n *\n * @param {AcceptProp} accept\n * @returns {{accept: string[]}[]}\n */\n\nexport function pickerOptionsFromAccept(accept) {\n if (isDefined(accept)) {\n var acceptForPicker = Object.entries(accept).filter(function (_ref2) {\n var _ref3 = _slicedToArray(_ref2, 2),\n mimeType = _ref3[0],\n ext = _ref3[1];\n\n var ok = true;\n\n if (!isMIMEType(mimeType)) {\n console.warn(\"Skipped \\\"\".concat(mimeType, \"\\\" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.\"));\n ok = false;\n }\n\n if (!Array.isArray(ext) || !ext.every(isExt)) {\n console.warn(\"Skipped \\\"\".concat(mimeType, \"\\\" because an invalid file extension was provided.\"));\n ok = false;\n }\n\n return ok;\n }).reduce(function (agg, _ref4) {\n var _ref5 = _slicedToArray(_ref4, 2),\n mimeType = _ref5[0],\n ext = _ref5[1];\n\n return _objectSpread(_objectSpread({}, agg), {}, _defineProperty({}, mimeType, ext));\n }, {});\n return [{\n // description is required due to https://crbug.com/1264708\n description: \"Files\",\n accept: acceptForPicker\n }];\n }\n\n return accept;\n}\n/**\n * Convert the `{accept}` dropzone prop to an array of MIME types/extensions.\n * @param {AcceptProp} accept\n * @returns {string}\n */\n\nexport function acceptPropAsAcceptAttr(accept) {\n if (isDefined(accept)) {\n return Object.entries(accept).reduce(function (a, _ref6) {\n var _ref7 = _slicedToArray(_ref6, 2),\n mimeType = _ref7[0],\n ext = _ref7[1];\n\n return [].concat(_toConsumableArray(a), [mimeType], _toConsumableArray(ext));\n }, []) // Silently discard invalid entries as pickerOptionsFromAccept warns about these\n .filter(function (v) {\n return isMIMEType(v) || isExt(v);\n }).join(\",\");\n }\n\n return undefined;\n}\n/**\n * Check if v is an exception caused by aborting a request (e.g window.showOpenFilePicker()).\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/DOMException.\n * @param {any} v\n * @returns {boolean} True if v is an abort exception.\n */\n\nexport function isAbort(v) {\n return v instanceof DOMException && (v.name === \"AbortError\" || v.code === v.ABORT_ERR);\n}\n/**\n * Check if v is a security error.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/DOMException.\n * @param {any} v\n * @returns {boolean} True if v is a security error.\n */\n\nexport function isSecurityError(v) {\n return v instanceof DOMException && (v.name === \"SecurityError\" || v.code === v.SECURITY_ERR);\n}\n/**\n * Check if v is a MIME type string.\n *\n * See accepted format: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers.\n *\n * @param {string} v\n */\n\nexport function isMIMEType(v) {\n return v === \"audio/*\" || v === \"video/*\" || v === \"image/*\" || v === \"text/*\" || /\\w+\\/[-+.\\w]+/g.test(v);\n}\n/**\n * Check if v is a file extension.\n * @param {string} v\n */\n\nexport function isExt(v) {\n return /^.*\\.[\\w]+$/.test(v);\n}\n/**\n * @typedef {Object.} AcceptProp\n */\n\n/**\n * @typedef {object} FileError\n * @property {string} message\n * @property {ErrorCode|string} code\n */\n\n/**\n * @typedef {\"file-invalid-type\"|\"file-too-large\"|\"file-too-small\"|\"too-many-files\"} ErrorCode\n */","var _excluded = [\"children\"],\n _excluded2 = [\"open\"],\n _excluded3 = [\"refKey\", \"role\", \"onKeyDown\", \"onFocus\", \"onBlur\", \"onClick\", \"onDragEnter\", \"onDragOver\", \"onDragLeave\", \"onDrop\"],\n _excluded4 = [\"refKey\", \"onChange\", \"onClick\"];\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* eslint prefer-template: 0 */\nimport React, { forwardRef, Fragment, useCallback, useEffect, useImperativeHandle, useMemo, useReducer, useRef } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { fromEvent } from \"file-selector\";\nimport { acceptPropAsAcceptAttr, allFilesAccepted, composeEventHandlers, fileAccepted, fileMatchSize, canUseFileSystemAccessAPI, isAbort, isEvtWithFiles, isIeOrEdge, isPropagationStopped, isSecurityError, onDocumentDragOver, pickerOptionsFromAccept, TOO_MANY_FILES_REJECTION } from \"./utils/index\";\n/**\n * Convenience wrapper component for the `useDropzone` hook\n *\n * ```jsx\n * \n * {({getRootProps, getInputProps}) => (\n *
\n * \n *

Drag 'n' drop some files here, or click to select files

\n *
\n * )}\n *
\n * ```\n */\n\nvar Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n params = _objectWithoutProperties(_ref, _excluded);\n\n var _useDropzone = useDropzone(params),\n open = _useDropzone.open,\n props = _objectWithoutProperties(_useDropzone, _excluded2);\n\n useImperativeHandle(ref, function () {\n return {\n open: open\n };\n }, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element\n\n return /*#__PURE__*/React.createElement(Fragment, null, children(_objectSpread(_objectSpread({}, props), {}, {\n open: open\n })));\n});\nDropzone.displayName = \"Dropzone\"; // Add default props for react-docgen\n\nvar defaultProps = {\n disabled: false,\n getFilesFromEvent: fromEvent,\n maxSize: Infinity,\n minSize: 0,\n multiple: true,\n maxFiles: 0,\n preventDropOnDocument: true,\n noClick: false,\n noKeyboard: false,\n noDrag: false,\n noDragEventsBubbling: false,\n validator: null,\n useFsAccessApi: true,\n autoFocus: false\n};\nDropzone.defaultProps = defaultProps;\nDropzone.propTypes = {\n /**\n * Render function that exposes the dropzone state and prop getter fns\n *\n * @param {object} params\n * @param {Function} params.getRootProps Returns the props you should apply to the root drop container you render\n * @param {Function} params.getInputProps Returns the props you should apply to hidden file input you render\n * @param {Function} params.open Open the native file selection dialog\n * @param {boolean} params.isFocused Dropzone area is in focus\n * @param {boolean} params.isFileDialogActive File dialog is opened\n * @param {boolean} params.isDragActive Active drag is in progress\n * @param {boolean} params.isDragAccept Dragged files are accepted\n * @param {boolean} params.isDragReject Some dragged files are rejected\n * @param {File[]} params.acceptedFiles Accepted files\n * @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected\n */\n children: PropTypes.func,\n\n /**\n * Set accepted file types.\n * Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.\n * Keep in mind that mime type determination is not reliable across platforms. CSV files,\n * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under\n * Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).\n */\n accept: PropTypes.objectOf(PropTypes.arrayOf(PropTypes.string)),\n\n /**\n * Allow drag 'n' drop (or selection from the file dialog) of multiple files\n */\n multiple: PropTypes.bool,\n\n /**\n * If false, allow dropped items to take over the current browser window\n */\n preventDropOnDocument: PropTypes.bool,\n\n /**\n * If true, disables click to open the native file selection dialog\n */\n noClick: PropTypes.bool,\n\n /**\n * If true, disables SPACE/ENTER to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n */\n noKeyboard: PropTypes.bool,\n\n /**\n * If true, disables drag 'n' drop\n */\n noDrag: PropTypes.bool,\n\n /**\n * If true, stops drag event propagation to parents\n */\n noDragEventsBubbling: PropTypes.bool,\n\n /**\n * Minimum file size (in bytes)\n */\n minSize: PropTypes.number,\n\n /**\n * Maximum file size (in bytes)\n */\n maxSize: PropTypes.number,\n\n /**\n * Maximum accepted number of files\n * The default value is 0 which means there is no limitation to how many files are accepted.\n */\n maxFiles: PropTypes.number,\n\n /**\n * Enable/disable the dropzone\n */\n disabled: PropTypes.bool,\n\n /**\n * Use this to provide a custom file aggregator\n *\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n getFilesFromEvent: PropTypes.func,\n\n /**\n * Cb for when closing the file dialog with no selection\n */\n onFileDialogCancel: PropTypes.func,\n\n /**\n * Cb for when opening the file dialog\n */\n onFileDialogOpen: PropTypes.func,\n\n /**\n * Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API\n * to open the file picker instead of using an `` click event.\n */\n useFsAccessApi: PropTypes.bool,\n\n /**\n * Set to true to focus the root element on render\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Cb for when the `dragenter` event occurs.\n *\n * @param {DragEvent} event\n */\n onDragEnter: PropTypes.func,\n\n /**\n * Cb for when the `dragleave` event occurs\n *\n * @param {DragEvent} event\n */\n onDragLeave: PropTypes.func,\n\n /**\n * Cb for when the `dragover` event occurs\n *\n * @param {DragEvent} event\n */\n onDragOver: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n *\n * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.\n * `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.\n * If `multiple` is set to false and additional files are dropped,\n * all files besides the first will be rejected.\n * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.\n *\n * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.\n * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.\n *\n * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.\n * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:\n *\n * ```js\n * function onDrop(acceptedFiles) {\n * const req = request.post('/upload')\n * acceptedFiles.forEach(file => {\n * req.attach(file.name, file)\n * })\n * req.end(callback)\n * }\n * ```\n *\n * @param {File[]} acceptedFiles\n * @param {FileRejection[]} fileRejections\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n onDrop: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that if no files are accepted, this callback is not invoked.\n *\n * @param {File[]} files\n * @param {(DragEvent|Event)} event\n */\n onDropAccepted: PropTypes.func,\n\n /**\n * Cb for when the `drop` event occurs.\n * Note that if no files are rejected, this callback is not invoked.\n *\n * @param {FileRejection[]} fileRejections\n * @param {(DragEvent|Event)} event\n */\n onDropRejected: PropTypes.func,\n\n /**\n * Cb for when there's some error from any of the promises.\n *\n * @param {Error} error\n */\n onError: PropTypes.func,\n\n /**\n * Custom validation function. It must return null if there's no errors.\n * @param {File} file\n * @returns {FileError|FileError[]|null}\n */\n validator: PropTypes.func\n};\nexport default Dropzone;\n/**\n * A function that is invoked for the `dragenter`,\n * `dragover` and `dragleave` events.\n * It is not invoked if the items are not files (such as link, text, etc.).\n *\n * @callback dragCb\n * @param {DragEvent} event\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n * It is not invoked if the items are not files (such as link, text, etc.).\n *\n * @callback dropCb\n * @param {File[]} acceptedFiles List of accepted files\n * @param {FileRejection[]} fileRejections List of rejected files and why they were rejected\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n * It is not invoked if the items are files (such as link, text, etc.).\n *\n * @callback dropAcceptedCb\n * @param {File[]} files List of accepted files that meet the given criteria\n * (`accept`, `multiple`, `minSize`, `maxSize`)\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is invoked for the `drop` or input change event.\n *\n * @callback dropRejectedCb\n * @param {File[]} files List of rejected files that do not meet the given criteria\n * (`accept`, `multiple`, `minSize`, `maxSize`)\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n */\n\n/**\n * A function that is used aggregate files,\n * in a asynchronous fashion, from drag or input change events.\n *\n * @callback getFilesFromEvent\n * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n * @returns {(File[]|Promise)}\n */\n\n/**\n * An object with the current dropzone state.\n *\n * @typedef {object} DropzoneState\n * @property {boolean} isFocused Dropzone area is in focus\n * @property {boolean} isFileDialogActive File dialog is opened\n * @property {boolean} isDragActive Active drag is in progress\n * @property {boolean} isDragAccept Dragged files are accepted\n * @property {boolean} isDragReject Some dragged files are rejected\n * @property {File[]} acceptedFiles Accepted files\n * @property {FileRejection[]} fileRejections Rejected files and why they were rejected\n */\n\n/**\n * An object with the dropzone methods.\n *\n * @typedef {object} DropzoneMethods\n * @property {Function} getRootProps Returns the props you should apply to the root drop container you render\n * @property {Function} getInputProps Returns the props you should apply to hidden file input you render\n * @property {Function} open Open the native file selection dialog\n */\n\nvar initialState = {\n isFocused: false,\n isFileDialogActive: false,\n isDragActive: false,\n isDragAccept: false,\n isDragReject: false,\n acceptedFiles: [],\n fileRejections: []\n};\n/**\n * A React hook that creates a drag 'n' drop area.\n *\n * ```jsx\n * function MyDropzone(props) {\n * const {getRootProps, getInputProps} = useDropzone({\n * onDrop: acceptedFiles => {\n * // do something with the File objects, e.g. upload to some server\n * }\n * });\n * return (\n *
\n * \n *

Drag and drop some files here, or click to select files

\n *
\n * )\n * }\n * ```\n *\n * @function useDropzone\n *\n * @param {object} props\n * @param {import(\"./utils\").AcceptProp} [props.accept] Set accepted file types.\n * Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.\n * Keep in mind that mime type determination is not reliable across platforms. CSV files,\n * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under\n * Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).\n * @param {boolean} [props.multiple=true] Allow drag 'n' drop (or selection from the file dialog) of multiple files\n * @param {boolean} [props.preventDropOnDocument=true] If false, allow dropped items to take over the current browser window\n * @param {boolean} [props.noClick=false] If true, disables click to open the native file selection dialog\n * @param {boolean} [props.noKeyboard=false] If true, disables SPACE/ENTER to open the native file selection dialog.\n * Note that it also stops tracking the focus state.\n * @param {boolean} [props.noDrag=false] If true, disables drag 'n' drop\n * @param {boolean} [props.noDragEventsBubbling=false] If true, stops drag event propagation to parents\n * @param {number} [props.minSize=0] Minimum file size (in bytes)\n * @param {number} [props.maxSize=Infinity] Maximum file size (in bytes)\n * @param {boolean} [props.disabled=false] Enable/disable the dropzone\n * @param {getFilesFromEvent} [props.getFilesFromEvent] Use this to provide a custom file aggregator\n * @param {Function} [props.onFileDialogCancel] Cb for when closing the file dialog with no selection\n * @param {boolean} [props.useFsAccessApi] Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API\n * to open the file picker instead of using an `` click event.\n * @param {boolean} autoFocus Set to true to auto focus the root element.\n * @param {Function} [props.onFileDialogOpen] Cb for when opening the file dialog\n * @param {dragCb} [props.onDragEnter] Cb for when the `dragenter` event occurs.\n * @param {dragCb} [props.onDragLeave] Cb for when the `dragleave` event occurs\n * @param {dragCb} [props.onDragOver] Cb for when the `dragover` event occurs\n * @param {dropCb} [props.onDrop] Cb for when the `drop` event occurs.\n * Note that this callback is invoked after the `getFilesFromEvent` callback is done.\n *\n * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.\n * `accept` must be an object with keys as a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) and the value an array of file extensions (optional).\n * If `multiple` is set to false and additional files are dropped,\n * all files besides the first will be rejected.\n * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.\n *\n * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.\n * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.\n *\n * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.\n * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:\n *\n * ```js\n * function onDrop(acceptedFiles) {\n * const req = request.post('/upload')\n * acceptedFiles.forEach(file => {\n * req.attach(file.name, file)\n * })\n * req.end(callback)\n * }\n * ```\n * @param {dropAcceptedCb} [props.onDropAccepted]\n * @param {dropRejectedCb} [props.onDropRejected]\n * @param {(error: Error) => void} [props.onError]\n *\n * @returns {DropzoneState & DropzoneMethods}\n */\n\nexport function useDropzone() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),\n accept = _defaultProps$props.accept,\n disabled = _defaultProps$props.disabled,\n getFilesFromEvent = _defaultProps$props.getFilesFromEvent,\n maxSize = _defaultProps$props.maxSize,\n minSize = _defaultProps$props.minSize,\n multiple = _defaultProps$props.multiple,\n maxFiles = _defaultProps$props.maxFiles,\n onDragEnter = _defaultProps$props.onDragEnter,\n onDragLeave = _defaultProps$props.onDragLeave,\n onDragOver = _defaultProps$props.onDragOver,\n onDrop = _defaultProps$props.onDrop,\n onDropAccepted = _defaultProps$props.onDropAccepted,\n onDropRejected = _defaultProps$props.onDropRejected,\n onFileDialogCancel = _defaultProps$props.onFileDialogCancel,\n onFileDialogOpen = _defaultProps$props.onFileDialogOpen,\n useFsAccessApi = _defaultProps$props.useFsAccessApi,\n autoFocus = _defaultProps$props.autoFocus,\n preventDropOnDocument = _defaultProps$props.preventDropOnDocument,\n noClick = _defaultProps$props.noClick,\n noKeyboard = _defaultProps$props.noKeyboard,\n noDrag = _defaultProps$props.noDrag,\n noDragEventsBubbling = _defaultProps$props.noDragEventsBubbling,\n onError = _defaultProps$props.onError,\n validator = _defaultProps$props.validator;\n\n var acceptAttr = useMemo(function () {\n return acceptPropAsAcceptAttr(accept);\n }, [accept]);\n var pickerTypes = useMemo(function () {\n return pickerOptionsFromAccept(accept);\n }, [accept]);\n var onFileDialogOpenCb = useMemo(function () {\n return typeof onFileDialogOpen === \"function\" ? onFileDialogOpen : noop;\n }, [onFileDialogOpen]);\n var onFileDialogCancelCb = useMemo(function () {\n return typeof onFileDialogCancel === \"function\" ? onFileDialogCancel : noop;\n }, [onFileDialogCancel]);\n /**\n * @constant\n * @type {React.MutableRefObject}\n */\n\n var rootRef = useRef(null);\n var inputRef = useRef(null);\n\n var _useReducer = useReducer(reducer, initialState),\n _useReducer2 = _slicedToArray(_useReducer, 2),\n state = _useReducer2[0],\n dispatch = _useReducer2[1];\n\n var isFocused = state.isFocused,\n isFileDialogActive = state.isFileDialogActive;\n var fsAccessApiWorksRef = useRef(typeof window !== \"undefined\" && window.isSecureContext && useFsAccessApi && canUseFileSystemAccessAPI()); // Update file dialog active state when the window is focused on\n\n var onWindowFocus = function onWindowFocus() {\n // Execute the timeout only if the file dialog is opened in the browser\n if (!fsAccessApiWorksRef.current && isFileDialogActive) {\n setTimeout(function () {\n if (inputRef.current) {\n var files = inputRef.current.files;\n\n if (!files.length) {\n dispatch({\n type: \"closeDialog\"\n });\n onFileDialogCancelCb();\n }\n }\n }, 300);\n }\n };\n\n useEffect(function () {\n window.addEventListener(\"focus\", onWindowFocus, false);\n return function () {\n window.removeEventListener(\"focus\", onWindowFocus, false);\n };\n }, [inputRef, isFileDialogActive, onFileDialogCancelCb, fsAccessApiWorksRef]);\n var dragTargetsRef = useRef([]);\n\n var onDocumentDrop = function onDocumentDrop(event) {\n if (rootRef.current && rootRef.current.contains(event.target)) {\n // If we intercepted an event for our instance, let it propagate down to the instance's onDrop handler\n return;\n }\n\n event.preventDefault();\n dragTargetsRef.current = [];\n };\n\n useEffect(function () {\n if (preventDropOnDocument) {\n document.addEventListener(\"dragover\", onDocumentDragOver, false);\n document.addEventListener(\"drop\", onDocumentDrop, false);\n }\n\n return function () {\n if (preventDropOnDocument) {\n document.removeEventListener(\"dragover\", onDocumentDragOver);\n document.removeEventListener(\"drop\", onDocumentDrop);\n }\n };\n }, [rootRef, preventDropOnDocument]); // Auto focus the root when autoFocus is true\n\n useEffect(function () {\n if (!disabled && autoFocus && rootRef.current) {\n rootRef.current.focus();\n }\n\n return function () {};\n }, [rootRef, autoFocus, disabled]);\n var onErrCb = useCallback(function (e) {\n if (onError) {\n onError(e);\n } else {\n // Let the user know something's gone wrong if they haven't provided the onError cb.\n console.error(e);\n }\n }, [onError]);\n var onDragEnterCb = useCallback(function (event) {\n event.preventDefault(); // Persist here because we need the event later after getFilesFromEvent() is done\n\n event.persist();\n stopPropagation(event);\n dragTargetsRef.current = [].concat(_toConsumableArray(dragTargetsRef.current), [event.target]);\n\n if (isEvtWithFiles(event)) {\n Promise.resolve(getFilesFromEvent(event)).then(function (files) {\n if (isPropagationStopped(event) && !noDragEventsBubbling) {\n return;\n }\n\n var fileCount = files.length;\n var isDragAccept = fileCount > 0 && allFilesAccepted({\n files: files,\n accept: acceptAttr,\n minSize: minSize,\n maxSize: maxSize,\n multiple: multiple,\n maxFiles: maxFiles,\n validator: validator\n });\n var isDragReject = fileCount > 0 && !isDragAccept;\n dispatch({\n isDragAccept: isDragAccept,\n isDragReject: isDragReject,\n isDragActive: true,\n type: \"setDraggedFiles\"\n });\n\n if (onDragEnter) {\n onDragEnter(event);\n }\n }).catch(function (e) {\n return onErrCb(e);\n });\n }\n }, [getFilesFromEvent, onDragEnter, onErrCb, noDragEventsBubbling, acceptAttr, minSize, maxSize, multiple, maxFiles, validator]);\n var onDragOverCb = useCallback(function (event) {\n event.preventDefault();\n event.persist();\n stopPropagation(event);\n var hasFiles = isEvtWithFiles(event);\n\n if (hasFiles && event.dataTransfer) {\n try {\n event.dataTransfer.dropEffect = \"copy\";\n } catch (_unused) {}\n /* eslint-disable-line no-empty */\n\n }\n\n if (hasFiles && onDragOver) {\n onDragOver(event);\n }\n\n return false;\n }, [onDragOver, noDragEventsBubbling]);\n var onDragLeaveCb = useCallback(function (event) {\n event.preventDefault();\n event.persist();\n stopPropagation(event); // Only deactivate once the dropzone and all children have been left\n\n var targets = dragTargetsRef.current.filter(function (target) {\n return rootRef.current && rootRef.current.contains(target);\n }); // Make sure to remove a target present multiple times only once\n // (Firefox may fire dragenter/dragleave multiple times on the same element)\n\n var targetIdx = targets.indexOf(event.target);\n\n if (targetIdx !== -1) {\n targets.splice(targetIdx, 1);\n }\n\n dragTargetsRef.current = targets;\n\n if (targets.length > 0) {\n return;\n }\n\n dispatch({\n type: \"setDraggedFiles\",\n isDragActive: false,\n isDragAccept: false,\n isDragReject: false\n });\n\n if (isEvtWithFiles(event) && onDragLeave) {\n onDragLeave(event);\n }\n }, [rootRef, onDragLeave, noDragEventsBubbling]);\n var setFiles = useCallback(function (files, event) {\n var acceptedFiles = [];\n var fileRejections = [];\n files.forEach(function (file) {\n var _fileAccepted = fileAccepted(file, acceptAttr),\n _fileAccepted2 = _slicedToArray(_fileAccepted, 2),\n accepted = _fileAccepted2[0],\n acceptError = _fileAccepted2[1];\n\n var _fileMatchSize = fileMatchSize(file, minSize, maxSize),\n _fileMatchSize2 = _slicedToArray(_fileMatchSize, 2),\n sizeMatch = _fileMatchSize2[0],\n sizeError = _fileMatchSize2[1];\n\n var customErrors = validator ? validator(file) : null;\n\n if (accepted && sizeMatch && !customErrors) {\n acceptedFiles.push(file);\n } else {\n var errors = [acceptError, sizeError];\n\n if (customErrors) {\n errors = errors.concat(customErrors);\n }\n\n fileRejections.push({\n file: file,\n errors: errors.filter(function (e) {\n return e;\n })\n });\n }\n });\n\n if (!multiple && acceptedFiles.length > 1 || multiple && maxFiles >= 1 && acceptedFiles.length > maxFiles) {\n // Reject everything and empty accepted files\n acceptedFiles.forEach(function (file) {\n fileRejections.push({\n file: file,\n errors: [TOO_MANY_FILES_REJECTION]\n });\n });\n acceptedFiles.splice(0);\n }\n\n dispatch({\n acceptedFiles: acceptedFiles,\n fileRejections: fileRejections,\n type: \"setFiles\"\n });\n\n if (onDrop) {\n onDrop(acceptedFiles, fileRejections, event);\n }\n\n if (fileRejections.length > 0 && onDropRejected) {\n onDropRejected(fileRejections, event);\n }\n\n if (acceptedFiles.length > 0 && onDropAccepted) {\n onDropAccepted(acceptedFiles, event);\n }\n }, [dispatch, multiple, acceptAttr, minSize, maxSize, maxFiles, onDrop, onDropAccepted, onDropRejected, validator]);\n var onDropCb = useCallback(function (event) {\n event.preventDefault(); // Persist here because we need the event later after getFilesFromEvent() is done\n\n event.persist();\n stopPropagation(event);\n dragTargetsRef.current = [];\n\n if (isEvtWithFiles(event)) {\n Promise.resolve(getFilesFromEvent(event)).then(function (files) {\n if (isPropagationStopped(event) && !noDragEventsBubbling) {\n return;\n }\n\n setFiles(files, event);\n }).catch(function (e) {\n return onErrCb(e);\n });\n }\n\n dispatch({\n type: \"reset\"\n });\n }, [getFilesFromEvent, setFiles, onErrCb, noDragEventsBubbling]); // Fn for opening the file dialog programmatically\n\n var openFileDialog = useCallback(function () {\n // No point to use FS access APIs if context is not secure\n // https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts#feature_detection\n if (fsAccessApiWorksRef.current) {\n dispatch({\n type: \"openDialog\"\n });\n onFileDialogOpenCb(); // https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker\n\n var opts = {\n multiple: multiple,\n types: pickerTypes\n };\n window.showOpenFilePicker(opts).then(function (handles) {\n return getFilesFromEvent(handles);\n }).then(function (files) {\n setFiles(files, null);\n dispatch({\n type: \"closeDialog\"\n });\n }).catch(function (e) {\n // AbortError means the user canceled\n if (isAbort(e)) {\n onFileDialogCancelCb(e);\n dispatch({\n type: \"closeDialog\"\n });\n } else if (isSecurityError(e)) {\n fsAccessApiWorksRef.current = false; // CORS, so cannot use this API\n // Try using the input\n\n if (inputRef.current) {\n inputRef.current.value = null;\n inputRef.current.click();\n } else {\n onErrCb(new Error(\"Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided.\"));\n }\n } else {\n onErrCb(e);\n }\n });\n return;\n }\n\n if (inputRef.current) {\n dispatch({\n type: \"openDialog\"\n });\n onFileDialogOpenCb();\n inputRef.current.value = null;\n inputRef.current.click();\n }\n }, [dispatch, onFileDialogOpenCb, onFileDialogCancelCb, useFsAccessApi, setFiles, onErrCb, pickerTypes, multiple]); // Cb to open the file dialog when SPACE/ENTER occurs on the dropzone\n\n var onKeyDownCb = useCallback(function (event) {\n // Ignore keyboard events bubbling up the DOM tree\n if (!rootRef.current || !rootRef.current.isEqualNode(event.target)) {\n return;\n }\n\n if (event.key === \" \" || event.key === \"Enter\" || event.keyCode === 32 || event.keyCode === 13) {\n event.preventDefault();\n openFileDialog();\n }\n }, [rootRef, openFileDialog]); // Update focus state for the dropzone\n\n var onFocusCb = useCallback(function () {\n dispatch({\n type: \"focus\"\n });\n }, []);\n var onBlurCb = useCallback(function () {\n dispatch({\n type: \"blur\"\n });\n }, []); // Cb to open the file dialog when click occurs on the dropzone\n\n var onClickCb = useCallback(function () {\n if (noClick) {\n return;\n } // In IE11/Edge the file-browser dialog is blocking, therefore, use setTimeout()\n // to ensure React can handle state changes\n // See: https://github.com/react-dropzone/react-dropzone/issues/450\n\n\n if (isIeOrEdge()) {\n setTimeout(openFileDialog, 0);\n } else {\n openFileDialog();\n }\n }, [noClick, openFileDialog]);\n\n var composeHandler = function composeHandler(fn) {\n return disabled ? null : fn;\n };\n\n var composeKeyboardHandler = function composeKeyboardHandler(fn) {\n return noKeyboard ? null : composeHandler(fn);\n };\n\n var composeDragHandler = function composeDragHandler(fn) {\n return noDrag ? null : composeHandler(fn);\n };\n\n var stopPropagation = function stopPropagation(event) {\n if (noDragEventsBubbling) {\n event.stopPropagation();\n }\n };\n\n var getRootProps = useMemo(function () {\n return function () {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref2$refKey = _ref2.refKey,\n refKey = _ref2$refKey === void 0 ? \"ref\" : _ref2$refKey,\n role = _ref2.role,\n onKeyDown = _ref2.onKeyDown,\n onFocus = _ref2.onFocus,\n onBlur = _ref2.onBlur,\n onClick = _ref2.onClick,\n onDragEnter = _ref2.onDragEnter,\n onDragOver = _ref2.onDragOver,\n onDragLeave = _ref2.onDragLeave,\n onDrop = _ref2.onDrop,\n rest = _objectWithoutProperties(_ref2, _excluded3);\n\n return _objectSpread(_objectSpread(_defineProperty({\n onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),\n onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),\n onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),\n onClick: composeHandler(composeEventHandlers(onClick, onClickCb)),\n onDragEnter: composeDragHandler(composeEventHandlers(onDragEnter, onDragEnterCb)),\n onDragOver: composeDragHandler(composeEventHandlers(onDragOver, onDragOverCb)),\n onDragLeave: composeDragHandler(composeEventHandlers(onDragLeave, onDragLeaveCb)),\n onDrop: composeDragHandler(composeEventHandlers(onDrop, onDropCb)),\n role: typeof role === \"string\" && role !== \"\" ? role : \"presentation\"\n }, refKey, rootRef), !disabled && !noKeyboard ? {\n tabIndex: 0\n } : {}), rest);\n };\n }, [rootRef, onKeyDownCb, onFocusCb, onBlurCb, onClickCb, onDragEnterCb, onDragOverCb, onDragLeaveCb, onDropCb, noKeyboard, noDrag, disabled]);\n var onInputElementClick = useCallback(function (event) {\n event.stopPropagation();\n }, []);\n var getInputProps = useMemo(function () {\n return function () {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref3$refKey = _ref3.refKey,\n refKey = _ref3$refKey === void 0 ? \"ref\" : _ref3$refKey,\n onChange = _ref3.onChange,\n onClick = _ref3.onClick,\n rest = _objectWithoutProperties(_ref3, _excluded4);\n\n var inputProps = _defineProperty({\n accept: acceptAttr,\n multiple: multiple,\n type: \"file\",\n style: {\n display: \"none\"\n },\n onChange: composeHandler(composeEventHandlers(onChange, onDropCb)),\n onClick: composeHandler(composeEventHandlers(onClick, onInputElementClick)),\n tabIndex: -1\n }, refKey, inputRef);\n\n return _objectSpread(_objectSpread({}, inputProps), rest);\n };\n }, [inputRef, accept, multiple, onDropCb, disabled]);\n return _objectSpread(_objectSpread({}, state), {}, {\n isFocused: isFocused && !disabled,\n getRootProps: getRootProps,\n getInputProps: getInputProps,\n rootRef: rootRef,\n inputRef: inputRef,\n open: composeHandler(openFileDialog)\n });\n}\n/**\n * @param {DropzoneState} state\n * @param {{type: string} & DropzoneState} action\n * @returns {DropzoneState}\n */\n\nfunction reducer(state, action) {\n /* istanbul ignore next */\n switch (action.type) {\n case \"focus\":\n return _objectSpread(_objectSpread({}, state), {}, {\n isFocused: true\n });\n\n case \"blur\":\n return _objectSpread(_objectSpread({}, state), {}, {\n isFocused: false\n });\n\n case \"openDialog\":\n return _objectSpread(_objectSpread({}, initialState), {}, {\n isFileDialogActive: true\n });\n\n case \"closeDialog\":\n return _objectSpread(_objectSpread({}, state), {}, {\n isFileDialogActive: false\n });\n\n case \"setDraggedFiles\":\n return _objectSpread(_objectSpread({}, state), {}, {\n isDragActive: action.isDragActive,\n isDragAccept: action.isDragAccept,\n isDragReject: action.isDragReject\n });\n\n case \"setFiles\":\n return _objectSpread(_objectSpread({}, state), {}, {\n acceptedFiles: action.acceptedFiles,\n fileRejections: action.fileRejections\n });\n\n case \"reset\":\n return _objectSpread({}, initialState);\n\n default:\n return state;\n }\n}\n\nfunction noop() {}\n\nexport { ErrorCode } from \"./utils\";","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","export default function makeCancellablePromise(promise) {\n var isCancelled = false;\n var wrappedPromise = new Promise(function (resolve, reject) {\n promise\n .then(function (value) { return !isCancelled && resolve(value); })\n .catch(function (error) { return !isCancelled && reject(error); });\n });\n return {\n promise: wrappedPromise,\n cancel: function () {\n isCancelled = true;\n },\n };\n}\n","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n// As defined on the list of supported events: https://reactjs.org/docs/events.html\nexport var clipboardEvents = ['onCopy', 'onCut', 'onPaste'];\nexport var compositionEvents = [\n 'onCompositionEnd',\n 'onCompositionStart',\n 'onCompositionUpdate',\n];\nexport var focusEvents = ['onFocus', 'onBlur'];\nexport var formEvents = ['onInput', 'onInvalid', 'onReset', 'onSubmit'];\nexport var imageEvents = ['onLoad', 'onError'];\nexport var keyboardEvents = ['onKeyDown', 'onKeyPress', 'onKeyUp'];\nexport var mediaEvents = [\n 'onAbort',\n 'onCanPlay',\n 'onCanPlayThrough',\n 'onDurationChange',\n 'onEmptied',\n 'onEncrypted',\n 'onEnded',\n 'onError',\n 'onLoadedData',\n 'onLoadedMetadata',\n 'onLoadStart',\n 'onPause',\n 'onPlay',\n 'onPlaying',\n 'onProgress',\n 'onRateChange',\n 'onSeeked',\n 'onSeeking',\n 'onStalled',\n 'onSuspend',\n 'onTimeUpdate',\n 'onVolumeChange',\n 'onWaiting',\n];\nexport var mouseEvents = [\n 'onClick',\n 'onContextMenu',\n 'onDoubleClick',\n 'onMouseDown',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n];\nexport var dragEvents = [\n 'onDrag',\n 'onDragEnd',\n 'onDragEnter',\n 'onDragExit',\n 'onDragLeave',\n 'onDragOver',\n 'onDragStart',\n 'onDrop',\n];\nexport var selectionEvents = ['onSelect'];\nexport var touchEvents = ['onTouchCancel', 'onTouchEnd', 'onTouchMove', 'onTouchStart'];\nexport var pointerEvents = [\n 'onPointerDown',\n 'onPointerMove',\n 'onPointerUp',\n 'onPointerCancel',\n 'onGotPointerCapture',\n 'onLostPointerCapture',\n 'onPointerEnter',\n 'onPointerLeave',\n 'onPointerOver',\n 'onPointerOut',\n];\nexport var uiEvents = ['onScroll'];\nexport var wheelEvents = ['onWheel'];\nexport var animationEvents = [\n 'onAnimationStart',\n 'onAnimationEnd',\n 'onAnimationIteration',\n];\nexport var transitionEvents = ['onTransitionEnd'];\nexport var otherEvents = ['onToggle'];\nexport var changeEvents = ['onChange'];\nexport var allEvents = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], clipboardEvents, true), compositionEvents, true), focusEvents, true), formEvents, true), imageEvents, true), keyboardEvents, true), mediaEvents, true), mouseEvents, true), dragEvents, true), selectionEvents, true), touchEvents, true), pointerEvents, true), uiEvents, true), wheelEvents, true), animationEvents, true), transitionEvents, true), changeEvents, true), otherEvents, true);\n/**\n * Returns an object with on-event callback props curried with provided args.\n * @param {Object} props Props passed to a component.\n * @param {Function=} getArgs A function that returns argument(s) on-event callbacks\n * shall be curried with.\n */\nexport default function makeEventProps(props, getArgs) {\n var eventProps = {};\n allEvents.forEach(function (eventName) {\n var eventHandler = props[eventName];\n if (!eventHandler) {\n return;\n }\n if (getArgs) {\n eventProps[eventName] = (function (event) {\n return eventHandler(event, getArgs(eventName));\n });\n }\n else {\n eventProps[eventName] = eventHandler;\n }\n });\n return eventProps;\n}\n","function _toSetter(t, e, n) {\n e || (e = []);\n var r = e.length++;\n return Object.defineProperty({}, \"_\", {\n set: function set(o) {\n e[r] = o, t.apply(n, e);\n }\n });\n}\nexport { _toSetter as default };","function _checkPrivateRedeclaration(e, t) {\n if (t.has(e)) throw new TypeError(\"Cannot initialize the same private elements twice on an object\");\n}\nexport { _checkPrivateRedeclaration as default };","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nfunction _classPrivateMethodInitSpec(e, a) {\n checkPrivateRedeclaration(e, a), a.add(e);\n}\nexport { _classPrivateMethodInitSpec as default };","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nfunction _classPrivateFieldInitSpec(e, t, a) {\n checkPrivateRedeclaration(e, t), t.set(e, a);\n}\nexport { _classPrivateFieldInitSpec as default };","function _assertClassBrand(e, t, n) {\n if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;\n throw new TypeError(\"Private element is not present on this object\");\n}\nexport { _assertClassBrand as default };","import assertClassBrand from \"./assertClassBrand.js\";\nfunction _classPrivateGetter(s, r, a) {\n return a(assertClassBrand(s, r));\n}\nexport { _classPrivateGetter as default };","import assertClassBrand from \"./assertClassBrand.js\";\nfunction _classPrivateFieldGet2(s, a) {\n return s.get(assertClassBrand(s, a));\n}\nexport { _classPrivateFieldGet2 as default };","import assertClassBrand from \"./assertClassBrand.js\";\nfunction _classPrivateFieldSet2(s, a, r) {\n return s.set(assertClassBrand(s, a), r), r;\n}\nexport { _classPrivateFieldSet2 as default };","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* globals process */\n\n// NW.js / Electron is a browser context, but copies some Node.js objects; see\n// http://docs.nwjs.io/en/latest/For%20Users/Advanced/JavaScript%20Contexts%20in%20NW.js/#access-nodejs-and-nwjs-api-in-browser-context\n// https://www.electronjs.org/docs/api/process#processversionselectron-readonly\n// https://www.electronjs.org/docs/api/process#processtype-readonly\nconst isNodeJS =\n (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) &&\n typeof process === \"object\" &&\n process + \"\" === \"[object process]\" &&\n !process.versions.nw &&\n !(process.versions.electron && process.type && process.type !== \"browser\");\n\nconst IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];\nconst FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];\n\nconst MAX_IMAGE_SIZE_TO_CACHE = 10e6; // Ten megabytes.\n\n// Represent the percentage of the height of a single-line field over\n// the font size. Acrobat seems to use this value.\nconst LINE_FACTOR = 1.35;\nconst LINE_DESCENT_FACTOR = 0.35;\nconst BASELINE_FACTOR = LINE_DESCENT_FACTOR / LINE_FACTOR;\n\n/**\n * Refer to the `WorkerTransport.getRenderingIntent`-method in the API, to see\n * how these flags are being used:\n * - ANY, DISPLAY, and PRINT are the normal rendering intents, note the\n * `PDFPageProxy.{render, getOperatorList, getAnnotations}`-methods.\n * - ANNOTATIONS_FORMS, ANNOTATIONS_STORAGE, ANNOTATIONS_DISABLE control which\n * annotations are rendered onto the canvas (i.e. by being included in the\n * operatorList), note the `PDFPageProxy.{render, getOperatorList}`-methods\n * and their `annotationMode`-option.\n * - OPLIST is used with the `PDFPageProxy.getOperatorList`-method, note the\n * `OperatorList`-constructor (on the worker-thread).\n */\nconst RenderingIntentFlag = {\n ANY: 0x01,\n DISPLAY: 0x02,\n PRINT: 0x04,\n SAVE: 0x08,\n ANNOTATIONS_FORMS: 0x10,\n ANNOTATIONS_STORAGE: 0x20,\n ANNOTATIONS_DISABLE: 0x40,\n OPLIST: 0x100,\n};\n\nconst AnnotationMode = {\n DISABLE: 0,\n ENABLE: 1,\n ENABLE_FORMS: 2,\n ENABLE_STORAGE: 3,\n};\n\nconst AnnotationEditorPrefix = \"pdfjs_internal_editor_\";\n\nconst AnnotationEditorType = {\n DISABLE: -1,\n NONE: 0,\n FREETEXT: 3,\n HIGHLIGHT: 9,\n STAMP: 13,\n INK: 15,\n};\n\nconst AnnotationEditorParamsType = {\n RESIZE: 1,\n CREATE: 2,\n FREETEXT_SIZE: 11,\n FREETEXT_COLOR: 12,\n FREETEXT_OPACITY: 13,\n INK_COLOR: 21,\n INK_THICKNESS: 22,\n INK_OPACITY: 23,\n HIGHLIGHT_COLOR: 31,\n HIGHLIGHT_DEFAULT_COLOR: 32,\n HIGHLIGHT_THICKNESS: 33,\n HIGHLIGHT_FREE: 34,\n HIGHLIGHT_SHOW_ALL: 35,\n};\n\n// Permission flags from Table 22, Section 7.6.3.2 of the PDF specification.\nconst PermissionFlag = {\n PRINT: 0x04,\n MODIFY_CONTENTS: 0x08,\n COPY: 0x10,\n MODIFY_ANNOTATIONS: 0x20,\n FILL_INTERACTIVE_FORMS: 0x100,\n COPY_FOR_ACCESSIBILITY: 0x200,\n ASSEMBLE: 0x400,\n PRINT_HIGH_QUALITY: 0x800,\n};\n\nconst TextRenderingMode = {\n FILL: 0,\n STROKE: 1,\n FILL_STROKE: 2,\n INVISIBLE: 3,\n FILL_ADD_TO_PATH: 4,\n STROKE_ADD_TO_PATH: 5,\n FILL_STROKE_ADD_TO_PATH: 6,\n ADD_TO_PATH: 7,\n FILL_STROKE_MASK: 3,\n ADD_TO_PATH_FLAG: 4,\n};\n\nconst ImageKind = {\n GRAYSCALE_1BPP: 1,\n RGB_24BPP: 2,\n RGBA_32BPP: 3,\n};\n\nconst AnnotationType = {\n TEXT: 1,\n LINK: 2,\n FREETEXT: 3,\n LINE: 4,\n SQUARE: 5,\n CIRCLE: 6,\n POLYGON: 7,\n POLYLINE: 8,\n HIGHLIGHT: 9,\n UNDERLINE: 10,\n SQUIGGLY: 11,\n STRIKEOUT: 12,\n STAMP: 13,\n CARET: 14,\n INK: 15,\n POPUP: 16,\n FILEATTACHMENT: 17,\n SOUND: 18,\n MOVIE: 19,\n WIDGET: 20,\n SCREEN: 21,\n PRINTERMARK: 22,\n TRAPNET: 23,\n WATERMARK: 24,\n THREED: 25,\n REDACT: 26,\n};\n\nconst AnnotationReplyType = {\n GROUP: \"Group\",\n REPLY: \"R\",\n};\n\nconst AnnotationFlag = {\n INVISIBLE: 0x01,\n HIDDEN: 0x02,\n PRINT: 0x04,\n NOZOOM: 0x08,\n NOROTATE: 0x10,\n NOVIEW: 0x20,\n READONLY: 0x40,\n LOCKED: 0x80,\n TOGGLENOVIEW: 0x100,\n LOCKEDCONTENTS: 0x200,\n};\n\nconst AnnotationFieldFlag = {\n READONLY: 0x0000001,\n REQUIRED: 0x0000002,\n NOEXPORT: 0x0000004,\n MULTILINE: 0x0001000,\n PASSWORD: 0x0002000,\n NOTOGGLETOOFF: 0x0004000,\n RADIO: 0x0008000,\n PUSHBUTTON: 0x0010000,\n COMBO: 0x0020000,\n EDIT: 0x0040000,\n SORT: 0x0080000,\n FILESELECT: 0x0100000,\n MULTISELECT: 0x0200000,\n DONOTSPELLCHECK: 0x0400000,\n DONOTSCROLL: 0x0800000,\n COMB: 0x1000000,\n RICHTEXT: 0x2000000,\n RADIOSINUNISON: 0x2000000,\n COMMITONSELCHANGE: 0x4000000,\n};\n\nconst AnnotationBorderStyleType = {\n SOLID: 1,\n DASHED: 2,\n BEVELED: 3,\n INSET: 4,\n UNDERLINE: 5,\n};\n\nconst AnnotationActionEventType = {\n E: \"Mouse Enter\",\n X: \"Mouse Exit\",\n D: \"Mouse Down\",\n U: \"Mouse Up\",\n Fo: \"Focus\",\n Bl: \"Blur\",\n PO: \"PageOpen\",\n PC: \"PageClose\",\n PV: \"PageVisible\",\n PI: \"PageInvisible\",\n K: \"Keystroke\",\n F: \"Format\",\n V: \"Validate\",\n C: \"Calculate\",\n};\n\nconst DocumentActionEventType = {\n WC: \"WillClose\",\n WS: \"WillSave\",\n DS: \"DidSave\",\n WP: \"WillPrint\",\n DP: \"DidPrint\",\n};\n\nconst PageActionEventType = {\n O: \"PageOpen\",\n C: \"PageClose\",\n};\n\nconst VerbosityLevel = {\n ERRORS: 0,\n WARNINGS: 1,\n INFOS: 5,\n};\n\nconst CMapCompressionType = {\n NONE: 0,\n BINARY: 1,\n};\n\n// All the possible operations for an operator list.\nconst OPS = {\n // Intentionally start from 1 so it is easy to spot bad operators that will be\n // 0's.\n // PLEASE NOTE: We purposely keep any removed operators commented out, since\n // re-numbering the list would risk breaking third-party users.\n dependency: 1,\n setLineWidth: 2,\n setLineCap: 3,\n setLineJoin: 4,\n setMiterLimit: 5,\n setDash: 6,\n setRenderingIntent: 7,\n setFlatness: 8,\n setGState: 9,\n save: 10,\n restore: 11,\n transform: 12,\n moveTo: 13,\n lineTo: 14,\n curveTo: 15,\n curveTo2: 16,\n curveTo3: 17,\n closePath: 18,\n rectangle: 19,\n stroke: 20,\n closeStroke: 21,\n fill: 22,\n eoFill: 23,\n fillStroke: 24,\n eoFillStroke: 25,\n closeFillStroke: 26,\n closeEOFillStroke: 27,\n endPath: 28,\n clip: 29,\n eoClip: 30,\n beginText: 31,\n endText: 32,\n setCharSpacing: 33,\n setWordSpacing: 34,\n setHScale: 35,\n setLeading: 36,\n setFont: 37,\n setTextRenderingMode: 38,\n setTextRise: 39,\n moveText: 40,\n setLeadingMoveText: 41,\n setTextMatrix: 42,\n nextLine: 43,\n showText: 44,\n showSpacedText: 45,\n nextLineShowText: 46,\n nextLineSetSpacingShowText: 47,\n setCharWidth: 48,\n setCharWidthAndBounds: 49,\n setStrokeColorSpace: 50,\n setFillColorSpace: 51,\n setStrokeColor: 52,\n setStrokeColorN: 53,\n setFillColor: 54,\n setFillColorN: 55,\n setStrokeGray: 56,\n setFillGray: 57,\n setStrokeRGBColor: 58,\n setFillRGBColor: 59,\n setStrokeCMYKColor: 60,\n setFillCMYKColor: 61,\n shadingFill: 62,\n beginInlineImage: 63,\n beginImageData: 64,\n endInlineImage: 65,\n paintXObject: 66,\n markPoint: 67,\n markPointProps: 68,\n beginMarkedContent: 69,\n beginMarkedContentProps: 70,\n endMarkedContent: 71,\n beginCompat: 72,\n endCompat: 73,\n paintFormXObjectBegin: 74,\n paintFormXObjectEnd: 75,\n beginGroup: 76,\n endGroup: 77,\n // beginAnnotations: 78,\n // endAnnotations: 79,\n beginAnnotation: 80,\n endAnnotation: 81,\n // paintJpegXObject: 82,\n paintImageMaskXObject: 83,\n paintImageMaskXObjectGroup: 84,\n paintImageXObject: 85,\n paintInlineImageXObject: 86,\n paintInlineImageXObjectGroup: 87,\n paintImageXObjectRepeat: 88,\n paintImageMaskXObjectRepeat: 89,\n paintSolidColorImageMask: 90,\n constructPath: 91,\n};\n\nconst PasswordResponses = {\n NEED_PASSWORD: 1,\n INCORRECT_PASSWORD: 2,\n};\n\nlet verbosity = VerbosityLevel.WARNINGS;\n\nfunction setVerbosityLevel(level) {\n if (Number.isInteger(level)) {\n verbosity = level;\n }\n}\n\nfunction getVerbosityLevel() {\n return verbosity;\n}\n\n// A notice for devs. These are good for things that are helpful to devs, such\n// as warning that Workers were disabled, which is important to devs but not\n// end users.\nfunction info(msg) {\n if (verbosity >= VerbosityLevel.INFOS) {\n console.log(`Info: ${msg}`);\n }\n}\n\n// Non-fatal warnings.\nfunction warn(msg) {\n if (verbosity >= VerbosityLevel.WARNINGS) {\n console.log(`Warning: ${msg}`);\n }\n}\n\nfunction unreachable(msg) {\n throw new Error(msg);\n}\n\nfunction assert(cond, msg) {\n if (!cond) {\n unreachable(msg);\n }\n}\n\n// Checks if URLs use one of the allowed protocols, e.g. to avoid XSS.\nfunction _isValidProtocol(url) {\n switch (url?.protocol) {\n case \"http:\":\n case \"https:\":\n case \"ftp:\":\n case \"mailto:\":\n case \"tel:\":\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Attempts to create a valid absolute URL.\n *\n * @param {URL|string} url - An absolute, or relative, URL.\n * @param {URL|string} [baseUrl] - An absolute URL.\n * @param {Object} [options]\n * @returns Either a valid {URL}, or `null` otherwise.\n */\nfunction createValidAbsoluteUrl(url, baseUrl = null, options = null) {\n if (!url) {\n return null;\n }\n try {\n if (options && typeof url === \"string\") {\n // Let URLs beginning with \"www.\" default to using the \"http://\" protocol.\n if (options.addDefaultProtocol && url.startsWith(\"www.\")) {\n const dots = url.match(/\\./g);\n // Avoid accidentally matching a *relative* URL pointing to a file named\n // e.g. \"www.pdf\" or similar.\n if (dots?.length >= 2) {\n url = `http://${url}`;\n }\n }\n\n // According to ISO 32000-1:2008, section 12.6.4.7, URIs should be encoded\n // in 7-bit ASCII. Some bad PDFs use UTF-8 encoding; see bug 1122280.\n if (options.tryConvertEncoding) {\n try {\n url = stringToUTF8String(url);\n } catch {}\n }\n }\n\n const absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url);\n if (_isValidProtocol(absoluteUrl)) {\n return absoluteUrl;\n }\n } catch {\n /* `new URL()` will throw on incorrect data. */\n }\n return null;\n}\n\nfunction shadow(obj, prop, value, nonSerializable = false) {\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n assert(\n prop in obj,\n `shadow: Property \"${prop && prop.toString()}\" not found in object.`\n );\n }\n Object.defineProperty(obj, prop, {\n value,\n enumerable: !nonSerializable,\n configurable: true,\n writable: false,\n });\n return value;\n}\n\n/**\n * @type {any}\n */\nconst BaseException = (function BaseExceptionClosure() {\n // eslint-disable-next-line no-shadow\n function BaseException(message, name) {\n if (this.constructor === BaseException) {\n unreachable(\"Cannot initialize BaseException.\");\n }\n this.message = message;\n this.name = name;\n }\n BaseException.prototype = new Error();\n BaseException.constructor = BaseException;\n\n return BaseException;\n})();\n\nclass PasswordException extends BaseException {\n constructor(msg, code) {\n super(msg, \"PasswordException\");\n this.code = code;\n }\n}\n\nclass UnknownErrorException extends BaseException {\n constructor(msg, details) {\n super(msg, \"UnknownErrorException\");\n this.details = details;\n }\n}\n\nclass InvalidPDFException extends BaseException {\n constructor(msg) {\n super(msg, \"InvalidPDFException\");\n }\n}\n\nclass MissingPDFException extends BaseException {\n constructor(msg) {\n super(msg, \"MissingPDFException\");\n }\n}\n\nclass UnexpectedResponseException extends BaseException {\n constructor(msg, status) {\n super(msg, \"UnexpectedResponseException\");\n this.status = status;\n }\n}\n\n/**\n * Error caused during parsing PDF data.\n */\nclass FormatError extends BaseException {\n constructor(msg) {\n super(msg, \"FormatError\");\n }\n}\n\n/**\n * Error used to indicate task cancellation.\n */\nclass AbortException extends BaseException {\n constructor(msg) {\n super(msg, \"AbortException\");\n }\n}\n\nfunction bytesToString(bytes) {\n if (typeof bytes !== \"object\" || bytes?.length === undefined) {\n unreachable(\"Invalid argument for bytesToString\");\n }\n const length = bytes.length;\n const MAX_ARGUMENT_COUNT = 8192;\n if (length < MAX_ARGUMENT_COUNT) {\n return String.fromCharCode.apply(null, bytes);\n }\n const strBuf = [];\n for (let i = 0; i < length; i += MAX_ARGUMENT_COUNT) {\n const chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length);\n const chunk = bytes.subarray(i, chunkEnd);\n strBuf.push(String.fromCharCode.apply(null, chunk));\n }\n return strBuf.join(\"\");\n}\n\nfunction stringToBytes(str) {\n if (typeof str !== \"string\") {\n unreachable(\"Invalid argument for stringToBytes\");\n }\n const length = str.length;\n const bytes = new Uint8Array(length);\n for (let i = 0; i < length; ++i) {\n bytes[i] = str.charCodeAt(i) & 0xff;\n }\n return bytes;\n}\n\nfunction string32(value) {\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n assert(\n typeof value === \"number\" && Math.abs(value) < 2 ** 32,\n `string32: Unexpected input \"${value}\".`\n );\n }\n return String.fromCharCode(\n (value >> 24) & 0xff,\n (value >> 16) & 0xff,\n (value >> 8) & 0xff,\n value & 0xff\n );\n}\n\nfunction objectSize(obj) {\n return Object.keys(obj).length;\n}\n\n// Ensure that the returned Object has a `null` prototype; hence why\n// `Object.fromEntries(...)` is not used.\nfunction objectFromMap(map) {\n const obj = Object.create(null);\n for (const [key, value] of map) {\n obj[key] = value;\n }\n return obj;\n}\n\n// Checks the endianness of the platform.\nfunction isLittleEndian() {\n const buffer8 = new Uint8Array(4);\n buffer8[0] = 1;\n const view32 = new Uint32Array(buffer8.buffer, 0, 1);\n return view32[0] === 1;\n}\n\n// Checks if it's possible to eval JS expressions.\nfunction isEvalSupported() {\n try {\n new Function(\"\"); // eslint-disable-line no-new, no-new-func\n return true;\n } catch {\n return false;\n }\n}\n\nclass FeatureTest {\n static get isLittleEndian() {\n return shadow(this, \"isLittleEndian\", isLittleEndian());\n }\n\n static get isEvalSupported() {\n return shadow(this, \"isEvalSupported\", isEvalSupported());\n }\n\n static get isOffscreenCanvasSupported() {\n return shadow(\n this,\n \"isOffscreenCanvasSupported\",\n typeof OffscreenCanvas !== \"undefined\"\n );\n }\n\n static get platform() {\n if (\n (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) ||\n (typeof navigator !== \"undefined\" &&\n typeof navigator?.platform === \"string\")\n ) {\n return shadow(this, \"platform\", {\n isMac: navigator.platform.includes(\"Mac\"),\n });\n }\n return shadow(this, \"platform\", { isMac: false });\n }\n\n static get isCSSRoundSupported() {\n return shadow(\n this,\n \"isCSSRoundSupported\",\n globalThis.CSS?.supports?.(\"width: round(1.5px, 1px)\")\n );\n }\n}\n\nconst hexNumbers = Array.from(Array(256).keys(), n =>\n n.toString(16).padStart(2, \"0\")\n);\n\nclass Util {\n static makeHexColor(r, g, b) {\n return `#${hexNumbers[r]}${hexNumbers[g]}${hexNumbers[b]}`;\n }\n\n // Apply a scaling matrix to some min/max values.\n // If a scaling factor is negative then min and max must be\n // swapped.\n static scaleMinMax(transform, minMax) {\n let temp;\n if (transform[0]) {\n if (transform[0] < 0) {\n temp = minMax[0];\n minMax[0] = minMax[2];\n minMax[2] = temp;\n }\n minMax[0] *= transform[0];\n minMax[2] *= transform[0];\n\n if (transform[3] < 0) {\n temp = minMax[1];\n minMax[1] = minMax[3];\n minMax[3] = temp;\n }\n minMax[1] *= transform[3];\n minMax[3] *= transform[3];\n } else {\n temp = minMax[0];\n minMax[0] = minMax[1];\n minMax[1] = temp;\n temp = minMax[2];\n minMax[2] = minMax[3];\n minMax[3] = temp;\n\n if (transform[1] < 0) {\n temp = minMax[1];\n minMax[1] = minMax[3];\n minMax[3] = temp;\n }\n minMax[1] *= transform[1];\n minMax[3] *= transform[1];\n\n if (transform[2] < 0) {\n temp = minMax[0];\n minMax[0] = minMax[2];\n minMax[2] = temp;\n }\n minMax[0] *= transform[2];\n minMax[2] *= transform[2];\n }\n minMax[0] += transform[4];\n minMax[1] += transform[5];\n minMax[2] += transform[4];\n minMax[3] += transform[5];\n }\n\n // Concatenates two transformation matrices together and returns the result.\n static transform(m1, m2) {\n return [\n m1[0] * m2[0] + m1[2] * m2[1],\n m1[1] * m2[0] + m1[3] * m2[1],\n m1[0] * m2[2] + m1[2] * m2[3],\n m1[1] * m2[2] + m1[3] * m2[3],\n m1[0] * m2[4] + m1[2] * m2[5] + m1[4],\n m1[1] * m2[4] + m1[3] * m2[5] + m1[5],\n ];\n }\n\n // For 2d affine transforms\n static applyTransform(p, m) {\n const xt = p[0] * m[0] + p[1] * m[2] + m[4];\n const yt = p[0] * m[1] + p[1] * m[3] + m[5];\n return [xt, yt];\n }\n\n static applyInverseTransform(p, m) {\n const d = m[0] * m[3] - m[1] * m[2];\n const xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d;\n const yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d;\n return [xt, yt];\n }\n\n // Applies the transform to the rectangle and finds the minimum axially\n // aligned bounding box.\n static getAxialAlignedBoundingBox(r, m) {\n const p1 = this.applyTransform(r, m);\n const p2 = this.applyTransform(r.slice(2, 4), m);\n const p3 = this.applyTransform([r[0], r[3]], m);\n const p4 = this.applyTransform([r[2], r[1]], m);\n return [\n Math.min(p1[0], p2[0], p3[0], p4[0]),\n Math.min(p1[1], p2[1], p3[1], p4[1]),\n Math.max(p1[0], p2[0], p3[0], p4[0]),\n Math.max(p1[1], p2[1], p3[1], p4[1]),\n ];\n }\n\n static inverseTransform(m) {\n const d = m[0] * m[3] - m[1] * m[2];\n return [\n m[3] / d,\n -m[1] / d,\n -m[2] / d,\n m[0] / d,\n (m[2] * m[5] - m[4] * m[3]) / d,\n (m[4] * m[1] - m[5] * m[0]) / d,\n ];\n }\n\n // This calculation uses Singular Value Decomposition.\n // The SVD can be represented with formula A = USV. We are interested in the\n // matrix S here because it represents the scale values.\n static singularValueDecompose2dScale(m) {\n const transpose = [m[0], m[2], m[1], m[3]];\n\n // Multiply matrix m with its transpose.\n const a = m[0] * transpose[0] + m[1] * transpose[2];\n const b = m[0] * transpose[1] + m[1] * transpose[3];\n const c = m[2] * transpose[0] + m[3] * transpose[2];\n const d = m[2] * transpose[1] + m[3] * transpose[3];\n\n // Solve the second degree polynomial to get roots.\n const first = (a + d) / 2;\n const second = Math.sqrt((a + d) ** 2 - 4 * (a * d - c * b)) / 2;\n const sx = first + second || 1;\n const sy = first - second || 1;\n\n // Scale values are the square roots of the eigenvalues.\n return [Math.sqrt(sx), Math.sqrt(sy)];\n }\n\n // Normalize rectangle rect=[x1, y1, x2, y2] so that (x1,y1) < (x2,y2)\n // For coordinate systems whose origin lies in the bottom-left, this\n // means normalization to (BL,TR) ordering. For systems with origin in the\n // top-left, this means (TL,BR) ordering.\n static normalizeRect(rect) {\n const r = rect.slice(0); // clone rect\n if (rect[0] > rect[2]) {\n r[0] = rect[2];\n r[2] = rect[0];\n }\n if (rect[1] > rect[3]) {\n r[1] = rect[3];\n r[3] = rect[1];\n }\n return r;\n }\n\n // Returns a rectangle [x1, y1, x2, y2] corresponding to the\n // intersection of rect1 and rect2. If no intersection, returns 'null'\n // The rectangle coordinates of rect1, rect2 should be [x1, y1, x2, y2]\n static intersect(rect1, rect2) {\n const xLow = Math.max(\n Math.min(rect1[0], rect1[2]),\n Math.min(rect2[0], rect2[2])\n );\n const xHigh = Math.min(\n Math.max(rect1[0], rect1[2]),\n Math.max(rect2[0], rect2[2])\n );\n if (xLow > xHigh) {\n return null;\n }\n const yLow = Math.max(\n Math.min(rect1[1], rect1[3]),\n Math.min(rect2[1], rect2[3])\n );\n const yHigh = Math.min(\n Math.max(rect1[1], rect1[3]),\n Math.max(rect2[1], rect2[3])\n );\n if (yLow > yHigh) {\n return null;\n }\n\n return [xLow, yLow, xHigh, yHigh];\n }\n\n static #getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, t, minMax) {\n if (t <= 0 || t >= 1) {\n return;\n }\n const mt = 1 - t;\n const tt = t * t;\n const ttt = tt * t;\n const x = mt * (mt * (mt * x0 + 3 * t * x1) + 3 * tt * x2) + ttt * x3;\n const y = mt * (mt * (mt * y0 + 3 * t * y1) + 3 * tt * y2) + ttt * y3;\n minMax[0] = Math.min(minMax[0], x);\n minMax[1] = Math.min(minMax[1], y);\n minMax[2] = Math.max(minMax[2], x);\n minMax[3] = Math.max(minMax[3], y);\n }\n\n static #getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, a, b, c, minMax) {\n if (Math.abs(a) < 1e-12) {\n if (Math.abs(b) >= 1e-12) {\n this.#getExtremumOnCurve(\n x0,\n x1,\n x2,\n x3,\n y0,\n y1,\n y2,\n y3,\n -c / b,\n minMax\n );\n }\n return;\n }\n\n const delta = b ** 2 - 4 * c * a;\n if (delta < 0) {\n return;\n }\n const sqrtDelta = Math.sqrt(delta);\n const a2 = 2 * a;\n this.#getExtremumOnCurve(\n x0,\n x1,\n x2,\n x3,\n y0,\n y1,\n y2,\n y3,\n (-b + sqrtDelta) / a2,\n minMax\n );\n this.#getExtremumOnCurve(\n x0,\n x1,\n x2,\n x3,\n y0,\n y1,\n y2,\n y3,\n (-b - sqrtDelta) / a2,\n minMax\n );\n }\n\n // From https://github.com/adobe-webplatform/Snap.svg/blob/b365287722a72526000ac4bfcf0ce4cac2faa015/src/path.js#L852\n static bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3, minMax) {\n if (minMax) {\n minMax[0] = Math.min(minMax[0], x0, x3);\n minMax[1] = Math.min(minMax[1], y0, y3);\n minMax[2] = Math.max(minMax[2], x0, x3);\n minMax[3] = Math.max(minMax[3], y0, y3);\n } else {\n minMax = [\n Math.min(x0, x3),\n Math.min(y0, y3),\n Math.max(x0, x3),\n Math.max(y0, y3),\n ];\n }\n this.#getExtremum(\n x0,\n x1,\n x2,\n x3,\n y0,\n y1,\n y2,\n y3,\n 3 * (-x0 + 3 * (x1 - x2) + x3),\n 6 * (x0 - 2 * x1 + x2),\n 3 * (x1 - x0),\n minMax\n );\n this.#getExtremum(\n x0,\n x1,\n x2,\n x3,\n y0,\n y1,\n y2,\n y3,\n 3 * (-y0 + 3 * (y1 - y2) + y3),\n 6 * (y0 - 2 * y1 + y2),\n 3 * (y1 - y0),\n minMax\n );\n return minMax;\n }\n}\n\nconst PDFStringTranslateTable = [\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2d8,\n 0x2c7, 0x2c6, 0x2d9, 0x2dd, 0x2db, 0x2da, 0x2dc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x192,\n 0x2044, 0x2039, 0x203a, 0x2212, 0x2030, 0x201e, 0x201c, 0x201d, 0x2018,\n 0x2019, 0x201a, 0x2122, 0xfb01, 0xfb02, 0x141, 0x152, 0x160, 0x178, 0x17d,\n 0x131, 0x142, 0x153, 0x161, 0x17e, 0, 0x20ac,\n];\n\nfunction stringToPDFString(str) {\n // See section 7.9.2.2 Text String Type.\n // The string can contain some language codes bracketed with 0x0b,\n // so we must remove them.\n if (str[0] >= \"\\xEF\") {\n let encoding;\n if (str[0] === \"\\xFE\" && str[1] === \"\\xFF\") {\n encoding = \"utf-16be\";\n if (str.length % 2 === 1) {\n str = str.slice(0, -1);\n }\n } else if (str[0] === \"\\xFF\" && str[1] === \"\\xFE\") {\n encoding = \"utf-16le\";\n if (str.length % 2 === 1) {\n str = str.slice(0, -1);\n }\n } else if (str[0] === \"\\xEF\" && str[1] === \"\\xBB\" && str[2] === \"\\xBF\") {\n encoding = \"utf-8\";\n }\n\n if (encoding) {\n try {\n const decoder = new TextDecoder(encoding, { fatal: true });\n const buffer = stringToBytes(str);\n const decoded = decoder.decode(buffer);\n if (!decoded.includes(\"\\x1b\")) {\n return decoded;\n }\n return decoded.replaceAll(/\\x1b[^\\x1b]*(?:\\x1b|$)/g, \"\");\n } catch (ex) {\n warn(`stringToPDFString: \"${ex}\".`);\n }\n }\n }\n // ISO Latin 1\n const strBuf = [];\n for (let i = 0, ii = str.length; i < ii; i++) {\n const charCode = str.charCodeAt(i);\n if (charCode === 0x1b) {\n // eslint-disable-next-line no-empty\n while (++i < ii && str.charCodeAt(i) !== 0x1b) {}\n continue;\n }\n const code = PDFStringTranslateTable[charCode];\n strBuf.push(code ? String.fromCharCode(code) : str.charAt(i));\n }\n return strBuf.join(\"\");\n}\n\nfunction stringToUTF8String(str) {\n return decodeURIComponent(escape(str));\n}\n\nfunction utf8StringToString(str) {\n return unescape(encodeURIComponent(str));\n}\n\nfunction isArrayEqual(arr1, arr2) {\n if (arr1.length !== arr2.length) {\n return false;\n }\n for (let i = 0, ii = arr1.length; i < ii; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n return true;\n}\n\nfunction getModificationDate(date = new Date()) {\n const buffer = [\n date.getUTCFullYear().toString(),\n (date.getUTCMonth() + 1).toString().padStart(2, \"0\"),\n date.getUTCDate().toString().padStart(2, \"0\"),\n date.getUTCHours().toString().padStart(2, \"0\"),\n date.getUTCMinutes().toString().padStart(2, \"0\"),\n date.getUTCSeconds().toString().padStart(2, \"0\"),\n ];\n\n return buffer.join(\"\");\n}\n\nlet NormalizeRegex = null;\nlet NormalizationMap = null;\nfunction normalizeUnicode(str) {\n if (!NormalizeRegex) {\n // In order to generate the following regex:\n // - create a PDF containing all the chars in the range 0000-FFFF with\n // a NFKC which is different of the char.\n // - copy and paste all those chars and get the ones where NFKC is\n // required.\n // It appears that most the chars here contain some ligatures.\n NormalizeRegex =\n /([\\u00a0\\u00b5\\u037e\\u0eb3\\u2000-\\u200a\\u202f\\u2126\\ufb00-\\ufb04\\ufb06\\ufb20-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40-\\ufb41\\ufb43-\\ufb44\\ufb46-\\ufba1\\ufba4-\\ufba9\\ufbae-\\ufbb1\\ufbd3-\\ufbdc\\ufbde-\\ufbe7\\ufbea-\\ufbf8\\ufbfc-\\ufbfd\\ufc00-\\ufc5d\\ufc64-\\ufcf1\\ufcf5-\\ufd3d\\ufd88\\ufdf4\\ufdfa-\\ufdfb\\ufe71\\ufe77\\ufe79\\ufe7b\\ufe7d]+)|(\\ufb05+)/gu;\n NormalizationMap = new Map([[\"ſt\", \"ſt\"]]);\n }\n return str.replaceAll(NormalizeRegex, (_, p1, p2) =>\n p1 ? p1.normalize(\"NFKC\") : NormalizationMap.get(p2)\n );\n}\n\nfunction getUuid() {\n if (\n (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) ||\n (typeof crypto !== \"undefined\" && typeof crypto?.randomUUID === \"function\")\n ) {\n return crypto.randomUUID();\n }\n const buf = new Uint8Array(32);\n if (\n typeof crypto !== \"undefined\" &&\n typeof crypto?.getRandomValues === \"function\"\n ) {\n crypto.getRandomValues(buf);\n } else {\n for (let i = 0; i < 32; i++) {\n buf[i] = Math.floor(Math.random() * 255);\n }\n }\n return bytesToString(buf);\n}\n\nconst AnnotationPrefix = \"pdfjs_internal_id_\";\n\nconst FontRenderOps = {\n BEZIER_CURVE_TO: 0,\n MOVE_TO: 1,\n LINE_TO: 2,\n QUADRATIC_CURVE_TO: 3,\n RESTORE: 4,\n SAVE: 5,\n SCALE: 6,\n TRANSFORM: 7,\n TRANSLATE: 8,\n};\n\nexport {\n AbortException,\n AnnotationActionEventType,\n AnnotationBorderStyleType,\n AnnotationEditorParamsType,\n AnnotationEditorPrefix,\n AnnotationEditorType,\n AnnotationFieldFlag,\n AnnotationFlag,\n AnnotationMode,\n AnnotationPrefix,\n AnnotationReplyType,\n AnnotationType,\n assert,\n BaseException,\n BASELINE_FACTOR,\n bytesToString,\n CMapCompressionType,\n createValidAbsoluteUrl,\n DocumentActionEventType,\n FeatureTest,\n FONT_IDENTITY_MATRIX,\n FontRenderOps,\n FormatError,\n getModificationDate,\n getUuid,\n getVerbosityLevel,\n IDENTITY_MATRIX,\n ImageKind,\n info,\n InvalidPDFException,\n isArrayEqual,\n isNodeJS,\n LINE_DESCENT_FACTOR,\n LINE_FACTOR,\n MAX_IMAGE_SIZE_TO_CACHE,\n MissingPDFException,\n normalizeUnicode,\n objectFromMap,\n objectSize,\n OPS,\n PageActionEventType,\n PasswordException,\n PasswordResponses,\n PermissionFlag,\n RenderingIntentFlag,\n setVerbosityLevel,\n shadow,\n string32,\n stringToBytes,\n stringToPDFString,\n stringToUTF8String,\n TextRenderingMode,\n UnexpectedResponseException,\n UnknownErrorException,\n unreachable,\n utf8StringToString,\n Util,\n VerbosityLevel,\n warn,\n};\n","/* Copyright 2015 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { CMapCompressionType, unreachable } from \"../shared/util.js\";\n\nclass BaseFilterFactory {\n constructor() {\n if (this.constructor === BaseFilterFactory) {\n unreachable(\"Cannot initialize BaseFilterFactory.\");\n }\n }\n\n addFilter(maps) {\n return \"none\";\n }\n\n addHCMFilter(fgColor, bgColor) {\n return \"none\";\n }\n\n addAlphaFilter(map) {\n return \"none\";\n }\n\n addLuminosityFilter(map) {\n return \"none\";\n }\n\n addHighlightHCMFilter(filterName, fgColor, bgColor, newFgColor, newBgColor) {\n return \"none\";\n }\n\n destroy(keepHCM = false) {}\n}\n\nclass BaseCanvasFactory {\n constructor() {\n if (this.constructor === BaseCanvasFactory) {\n unreachable(\"Cannot initialize BaseCanvasFactory.\");\n }\n }\n\n create(width, height) {\n if (width <= 0 || height <= 0) {\n throw new Error(\"Invalid canvas size\");\n }\n const canvas = this._createCanvas(width, height);\n return {\n canvas,\n context: canvas.getContext(\"2d\"),\n };\n }\n\n reset(canvasAndContext, width, height) {\n if (!canvasAndContext.canvas) {\n throw new Error(\"Canvas is not specified\");\n }\n if (width <= 0 || height <= 0) {\n throw new Error(\"Invalid canvas size\");\n }\n canvasAndContext.canvas.width = width;\n canvasAndContext.canvas.height = height;\n }\n\n destroy(canvasAndContext) {\n if (!canvasAndContext.canvas) {\n throw new Error(\"Canvas is not specified\");\n }\n // Zeroing the width and height cause Firefox to release graphics\n // resources immediately, which can greatly reduce memory consumption.\n canvasAndContext.canvas.width = 0;\n canvasAndContext.canvas.height = 0;\n canvasAndContext.canvas = null;\n canvasAndContext.context = null;\n }\n\n /**\n * @ignore\n */\n _createCanvas(width, height) {\n unreachable(\"Abstract method `_createCanvas` called.\");\n }\n}\n\nclass BaseCMapReaderFactory {\n constructor({ baseUrl = null, isCompressed = true }) {\n if (this.constructor === BaseCMapReaderFactory) {\n unreachable(\"Cannot initialize BaseCMapReaderFactory.\");\n }\n this.baseUrl = baseUrl;\n this.isCompressed = isCompressed;\n }\n\n async fetch({ name }) {\n if (!this.baseUrl) {\n throw new Error(\n 'The CMap \"baseUrl\" parameter must be specified, ensure that ' +\n 'the \"cMapUrl\" and \"cMapPacked\" API parameters are provided.'\n );\n }\n if (!name) {\n throw new Error(\"CMap name must be specified.\");\n }\n const url = this.baseUrl + name + (this.isCompressed ? \".bcmap\" : \"\");\n const compressionType = this.isCompressed\n ? CMapCompressionType.BINARY\n : CMapCompressionType.NONE;\n\n return this._fetchData(url, compressionType).catch(reason => {\n throw new Error(\n `Unable to load ${this.isCompressed ? \"binary \" : \"\"}CMap at: ${url}`\n );\n });\n }\n\n /**\n * @ignore\n */\n _fetchData(url, compressionType) {\n unreachable(\"Abstract method `_fetchData` called.\");\n }\n}\n\nclass BaseStandardFontDataFactory {\n constructor({ baseUrl = null }) {\n if (this.constructor === BaseStandardFontDataFactory) {\n unreachable(\"Cannot initialize BaseStandardFontDataFactory.\");\n }\n this.baseUrl = baseUrl;\n }\n\n async fetch({ filename }) {\n if (!this.baseUrl) {\n throw new Error(\n 'The standard font \"baseUrl\" parameter must be specified, ensure that ' +\n 'the \"standardFontDataUrl\" API parameter is provided.'\n );\n }\n if (!filename) {\n throw new Error(\"Font filename must be specified.\");\n }\n const url = `${this.baseUrl}${filename}`;\n\n return this._fetchData(url).catch(reason => {\n throw new Error(`Unable to load font data at: ${url}`);\n });\n }\n\n /**\n * @ignore\n */\n _fetchData(url) {\n unreachable(\"Abstract method `_fetchData` called.\");\n }\n}\n\nclass BaseSVGFactory {\n constructor() {\n if (this.constructor === BaseSVGFactory) {\n unreachable(\"Cannot initialize BaseSVGFactory.\");\n }\n }\n\n create(width, height, skipDimensions = false) {\n if (width <= 0 || height <= 0) {\n throw new Error(\"Invalid SVG dimensions\");\n }\n const svg = this._createSVG(\"svg:svg\");\n svg.setAttribute(\"version\", \"1.1\");\n\n if (!skipDimensions) {\n svg.setAttribute(\"width\", `${width}px`);\n svg.setAttribute(\"height\", `${height}px`);\n }\n\n svg.setAttribute(\"preserveAspectRatio\", \"none\");\n svg.setAttribute(\"viewBox\", `0 0 ${width} ${height}`);\n\n return svg;\n }\n\n createElement(type) {\n if (typeof type !== \"string\") {\n throw new Error(\"Invalid SVG element type\");\n }\n return this._createSVG(type);\n }\n\n /**\n * @ignore\n */\n _createSVG(type) {\n unreachable(\"Abstract method `_createSVG` called.\");\n }\n}\n\nexport {\n BaseCanvasFactory,\n BaseCMapReaderFactory,\n BaseFilterFactory,\n BaseStandardFontDataFactory,\n BaseSVGFactory,\n};\n","/* Copyright 2015 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n BaseCanvasFactory,\n BaseCMapReaderFactory,\n BaseFilterFactory,\n BaseStandardFontDataFactory,\n BaseSVGFactory,\n} from \"./base_factory.js\";\nimport {\n BaseException,\n FeatureTest,\n shadow,\n stringToBytes,\n Util,\n warn,\n} from \"../shared/util.js\";\n\nconst SVG_NS = \"http://www.w3.org/2000/svg\";\n\nclass PixelsPerInch {\n static CSS = 96.0;\n\n static PDF = 72.0;\n\n static PDF_TO_CSS_UNITS = this.CSS / this.PDF;\n}\n\n/**\n * FilterFactory aims to create some SVG filters we can use when drawing an\n * image (or whatever) on a canvas.\n * Filters aren't applied with ctx.putImageData because it just overwrites the\n * underlying pixels.\n * With these filters, it's possible for example to apply some transfer maps on\n * an image without the need to apply them on the pixel arrays: the renderer\n * does the magic for us.\n */\nclass DOMFilterFactory extends BaseFilterFactory {\n #_cache;\n\n #_defs;\n\n #docId;\n\n #document;\n\n #_hcmCache;\n\n #id = 0;\n\n constructor({ docId, ownerDocument = globalThis.document } = {}) {\n super();\n this.#docId = docId;\n this.#document = ownerDocument;\n }\n\n get #cache() {\n return (this.#_cache ||= new Map());\n }\n\n get #hcmCache() {\n return (this.#_hcmCache ||= new Map());\n }\n\n get #defs() {\n if (!this.#_defs) {\n const div = this.#document.createElement(\"div\");\n const { style } = div;\n style.visibility = \"hidden\";\n style.contain = \"strict\";\n style.width = style.height = 0;\n style.position = \"absolute\";\n style.top = style.left = 0;\n style.zIndex = -1;\n\n const svg = this.#document.createElementNS(SVG_NS, \"svg\");\n svg.setAttribute(\"width\", 0);\n svg.setAttribute(\"height\", 0);\n this.#_defs = this.#document.createElementNS(SVG_NS, \"defs\");\n div.append(svg);\n svg.append(this.#_defs);\n this.#document.body.append(div);\n }\n return this.#_defs;\n }\n\n #createTables(maps) {\n if (maps.length === 1) {\n const mapR = maps[0];\n const buffer = new Array(256);\n for (let i = 0; i < 256; i++) {\n buffer[i] = mapR[i] / 255;\n }\n\n const table = buffer.join(\",\");\n return [table, table, table];\n }\n\n const [mapR, mapG, mapB] = maps;\n const bufferR = new Array(256);\n const bufferG = new Array(256);\n const bufferB = new Array(256);\n for (let i = 0; i < 256; i++) {\n bufferR[i] = mapR[i] / 255;\n bufferG[i] = mapG[i] / 255;\n bufferB[i] = mapB[i] / 255;\n }\n return [bufferR.join(\",\"), bufferG.join(\",\"), bufferB.join(\",\")];\n }\n\n addFilter(maps) {\n if (!maps) {\n return \"none\";\n }\n\n // When a page is zoomed the page is re-drawn but the maps are likely\n // the same.\n let value = this.#cache.get(maps);\n if (value) {\n return value;\n }\n\n const [tableR, tableG, tableB] = this.#createTables(maps);\n const key = maps.length === 1 ? tableR : `${tableR}${tableG}${tableB}`;\n\n value = this.#cache.get(key);\n if (value) {\n this.#cache.set(maps, value);\n return value;\n }\n\n // We create a SVG filter: feComponentTransferElement\n // https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement\n\n const id = `g_${this.#docId}_transfer_map_${this.#id++}`;\n const url = `url(#${id})`;\n this.#cache.set(maps, url);\n this.#cache.set(key, url);\n\n const filter = this.#createFilter(id);\n this.#addTransferMapConversion(tableR, tableG, tableB, filter);\n\n return url;\n }\n\n addHCMFilter(fgColor, bgColor) {\n const key = `${fgColor}-${bgColor}`;\n const filterName = \"base\";\n let info = this.#hcmCache.get(filterName);\n if (info?.key === key) {\n return info.url;\n }\n\n if (info) {\n info.filter?.remove();\n info.key = key;\n info.url = \"none\";\n info.filter = null;\n } else {\n info = {\n key,\n url: \"none\",\n filter: null,\n };\n this.#hcmCache.set(filterName, info);\n }\n\n if (!fgColor || !bgColor) {\n return info.url;\n }\n\n const fgRGB = this.#getRGB(fgColor);\n fgColor = Util.makeHexColor(...fgRGB);\n const bgRGB = this.#getRGB(bgColor);\n bgColor = Util.makeHexColor(...bgRGB);\n this.#defs.style.color = \"\";\n\n if (\n (fgColor === \"#000000\" && bgColor === \"#ffffff\") ||\n fgColor === bgColor\n ) {\n return info.url;\n }\n\n // https://developer.mozilla.org/en-US/docs/Web/Accessibility/Understanding_Colors_and_Luminance\n //\n // Relative luminance:\n // https://www.w3.org/TR/WCAG20/#relativeluminancedef\n //\n // We compute the rounded luminance of the default background color.\n // Then for every color in the pdf, if its rounded luminance is the\n // same as the background one then it's replaced by the new\n // background color else by the foreground one.\n const map = new Array(256);\n for (let i = 0; i <= 255; i++) {\n const x = i / 255;\n map[i] = x <= 0.03928 ? x / 12.92 : ((x + 0.055) / 1.055) ** 2.4;\n }\n const table = map.join(\",\");\n\n const id = `g_${this.#docId}_hcm_filter`;\n const filter = (info.filter = this.#createFilter(id));\n this.#addTransferMapConversion(table, table, table, filter);\n this.#addGrayConversion(filter);\n\n const getSteps = (c, n) => {\n const start = fgRGB[c] / 255;\n const end = bgRGB[c] / 255;\n const arr = new Array(n + 1);\n for (let i = 0; i <= n; i++) {\n arr[i] = start + (i / n) * (end - start);\n }\n return arr.join(\",\");\n };\n this.#addTransferMapConversion(\n getSteps(0, 5),\n getSteps(1, 5),\n getSteps(2, 5),\n filter\n );\n\n info.url = `url(#${id})`;\n return info.url;\n }\n\n addAlphaFilter(map) {\n // When a page is zoomed the page is re-drawn but the maps are likely\n // the same.\n let value = this.#cache.get(map);\n if (value) {\n return value;\n }\n\n const [tableA] = this.#createTables([map]);\n const key = `alpha_${tableA}`;\n\n value = this.#cache.get(key);\n if (value) {\n this.#cache.set(map, value);\n return value;\n }\n\n const id = `g_${this.#docId}_alpha_map_${this.#id++}`;\n const url = `url(#${id})`;\n this.#cache.set(map, url);\n this.#cache.set(key, url);\n\n const filter = this.#createFilter(id);\n this.#addTransferMapAlphaConversion(tableA, filter);\n\n return url;\n }\n\n addLuminosityFilter(map) {\n // When a page is zoomed the page is re-drawn but the maps are likely\n // the same.\n let value = this.#cache.get(map || \"luminosity\");\n if (value) {\n return value;\n }\n\n let tableA, key;\n if (map) {\n [tableA] = this.#createTables([map]);\n key = `luminosity_${tableA}`;\n } else {\n key = \"luminosity\";\n }\n\n value = this.#cache.get(key);\n if (value) {\n this.#cache.set(map, value);\n return value;\n }\n\n const id = `g_${this.#docId}_luminosity_map_${this.#id++}`;\n const url = `url(#${id})`;\n this.#cache.set(map, url);\n this.#cache.set(key, url);\n\n const filter = this.#createFilter(id);\n this.#addLuminosityConversion(filter);\n if (map) {\n this.#addTransferMapAlphaConversion(tableA, filter);\n }\n\n return url;\n }\n\n addHighlightHCMFilter(filterName, fgColor, bgColor, newFgColor, newBgColor) {\n const key = `${fgColor}-${bgColor}-${newFgColor}-${newBgColor}`;\n let info = this.#hcmCache.get(filterName);\n if (info?.key === key) {\n return info.url;\n }\n\n if (info) {\n info.filter?.remove();\n info.key = key;\n info.url = \"none\";\n info.filter = null;\n } else {\n info = {\n key,\n url: \"none\",\n filter: null,\n };\n this.#hcmCache.set(filterName, info);\n }\n\n if (!fgColor || !bgColor) {\n return info.url;\n }\n\n const [fgRGB, bgRGB] = [fgColor, bgColor].map(this.#getRGB.bind(this));\n let fgGray = Math.round(\n 0.2126 * fgRGB[0] + 0.7152 * fgRGB[1] + 0.0722 * fgRGB[2]\n );\n let bgGray = Math.round(\n 0.2126 * bgRGB[0] + 0.7152 * bgRGB[1] + 0.0722 * bgRGB[2]\n );\n let [newFgRGB, newBgRGB] = [newFgColor, newBgColor].map(\n this.#getRGB.bind(this)\n );\n if (bgGray < fgGray) {\n [fgGray, bgGray, newFgRGB, newBgRGB] = [\n bgGray,\n fgGray,\n newBgRGB,\n newFgRGB,\n ];\n }\n this.#defs.style.color = \"\";\n\n // Now we can create the filters to highlight some canvas parts.\n // The colors in the pdf will almost be Canvas and CanvasText, hence we\n // want to filter them to finally get Highlight and HighlightText.\n // Since we're in HCM the background color and the foreground color should\n // be really different when converted to grayscale (if they're not then it\n // means that we've a poor contrast). Once the canvas colors are converted\n // to grayscale we can easily map them on their new colors.\n // The grayscale step is important because if we've something like:\n // fgColor = #FF....\n // bgColor = #FF....\n // then we are enable to map the red component on the new red components\n // which can be different.\n\n const getSteps = (fg, bg, n) => {\n const arr = new Array(256);\n const step = (bgGray - fgGray) / n;\n const newStart = fg / 255;\n const newStep = (bg - fg) / (255 * n);\n let prev = 0;\n for (let i = 0; i <= n; i++) {\n const k = Math.round(fgGray + i * step);\n const value = newStart + i * newStep;\n for (let j = prev; j <= k; j++) {\n arr[j] = value;\n }\n prev = k + 1;\n }\n for (let i = prev; i < 256; i++) {\n arr[i] = arr[prev - 1];\n }\n return arr.join(\",\");\n };\n\n const id = `g_${this.#docId}_hcm_${filterName}_filter`;\n const filter = (info.filter = this.#createFilter(id));\n\n this.#addGrayConversion(filter);\n this.#addTransferMapConversion(\n getSteps(newFgRGB[0], newBgRGB[0], 5),\n getSteps(newFgRGB[1], newBgRGB[1], 5),\n getSteps(newFgRGB[2], newBgRGB[2], 5),\n filter\n );\n\n info.url = `url(#${id})`;\n return info.url;\n }\n\n destroy(keepHCM = false) {\n if (keepHCM && this.#hcmCache.size !== 0) {\n return;\n }\n if (this.#_defs) {\n this.#_defs.parentNode.parentNode.remove();\n this.#_defs = null;\n }\n if (this.#_cache) {\n this.#_cache.clear();\n this.#_cache = null;\n }\n this.#id = 0;\n }\n\n #addLuminosityConversion(filter) {\n const feColorMatrix = this.#document.createElementNS(\n SVG_NS,\n \"feColorMatrix\"\n );\n feColorMatrix.setAttribute(\"type\", \"matrix\");\n feColorMatrix.setAttribute(\n \"values\",\n \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0\"\n );\n filter.append(feColorMatrix);\n }\n\n #addGrayConversion(filter) {\n const feColorMatrix = this.#document.createElementNS(\n SVG_NS,\n \"feColorMatrix\"\n );\n feColorMatrix.setAttribute(\"type\", \"matrix\");\n feColorMatrix.setAttribute(\n \"values\",\n \"0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0\"\n );\n filter.append(feColorMatrix);\n }\n\n #createFilter(id) {\n const filter = this.#document.createElementNS(SVG_NS, \"filter\");\n filter.setAttribute(\"color-interpolation-filters\", \"sRGB\");\n filter.setAttribute(\"id\", id);\n this.#defs.append(filter);\n\n return filter;\n }\n\n #appendFeFunc(feComponentTransfer, func, table) {\n const feFunc = this.#document.createElementNS(SVG_NS, func);\n feFunc.setAttribute(\"type\", \"discrete\");\n feFunc.setAttribute(\"tableValues\", table);\n feComponentTransfer.append(feFunc);\n }\n\n #addTransferMapConversion(rTable, gTable, bTable, filter) {\n const feComponentTransfer = this.#document.createElementNS(\n SVG_NS,\n \"feComponentTransfer\"\n );\n filter.append(feComponentTransfer);\n this.#appendFeFunc(feComponentTransfer, \"feFuncR\", rTable);\n this.#appendFeFunc(feComponentTransfer, \"feFuncG\", gTable);\n this.#appendFeFunc(feComponentTransfer, \"feFuncB\", bTable);\n }\n\n #addTransferMapAlphaConversion(aTable, filter) {\n const feComponentTransfer = this.#document.createElementNS(\n SVG_NS,\n \"feComponentTransfer\"\n );\n filter.append(feComponentTransfer);\n this.#appendFeFunc(feComponentTransfer, \"feFuncA\", aTable);\n }\n\n #getRGB(color) {\n this.#defs.style.color = color;\n return getRGB(getComputedStyle(this.#defs).getPropertyValue(\"color\"));\n }\n}\n\nclass DOMCanvasFactory extends BaseCanvasFactory {\n constructor({ ownerDocument = globalThis.document } = {}) {\n super();\n this._document = ownerDocument;\n }\n\n /**\n * @ignore\n */\n _createCanvas(width, height) {\n const canvas = this._document.createElement(\"canvas\");\n canvas.width = width;\n canvas.height = height;\n return canvas;\n }\n}\n\nasync function fetchData(url, type = \"text\") {\n if (\n (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) ||\n isValidFetchUrl(url, document.baseURI)\n ) {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(response.statusText);\n }\n switch (type) {\n case \"arraybuffer\":\n return response.arrayBuffer();\n case \"blob\":\n return response.blob();\n case \"json\":\n return response.json();\n }\n return response.text();\n }\n\n // The Fetch API is not supported.\n return new Promise((resolve, reject) => {\n const request = new XMLHttpRequest();\n request.open(\"GET\", url, /* async = */ true);\n request.responseType = type;\n\n request.onreadystatechange = () => {\n if (request.readyState !== XMLHttpRequest.DONE) {\n return;\n }\n if (request.status === 200 || request.status === 0) {\n switch (type) {\n case \"arraybuffer\":\n case \"blob\":\n case \"json\":\n resolve(request.response);\n return;\n }\n resolve(request.responseText);\n return;\n }\n reject(new Error(request.statusText));\n };\n\n request.send(null);\n });\n}\n\nclass DOMCMapReaderFactory extends BaseCMapReaderFactory {\n /**\n * @ignore\n */\n _fetchData(url, compressionType) {\n return fetchData(\n url,\n /* type = */ this.isCompressed ? \"arraybuffer\" : \"text\"\n ).then(data => ({\n cMapData:\n data instanceof ArrayBuffer\n ? new Uint8Array(data)\n : stringToBytes(data),\n compressionType,\n }));\n }\n}\n\nclass DOMStandardFontDataFactory extends BaseStandardFontDataFactory {\n /**\n * @ignore\n */\n _fetchData(url) {\n return fetchData(url, /* type = */ \"arraybuffer\").then(\n data => new Uint8Array(data)\n );\n }\n}\n\nclass DOMSVGFactory extends BaseSVGFactory {\n /**\n * @ignore\n */\n _createSVG(type) {\n return document.createElementNS(SVG_NS, type);\n }\n}\n\n/**\n * @typedef {Object} PageViewportParameters\n * @property {Array} viewBox - The xMin, yMin, xMax and\n * yMax coordinates.\n * @property {number} scale - The scale of the viewport.\n * @property {number} rotation - The rotation, in degrees, of the viewport.\n * @property {number} [offsetX] - The horizontal, i.e. x-axis, offset. The\n * default value is `0`.\n * @property {number} [offsetY] - The vertical, i.e. y-axis, offset. The\n * default value is `0`.\n * @property {boolean} [dontFlip] - If true, the y-axis will not be flipped.\n * The default value is `false`.\n */\n\n/**\n * @typedef {Object} PageViewportCloneParameters\n * @property {number} [scale] - The scale, overriding the one in the cloned\n * viewport. The default value is `this.scale`.\n * @property {number} [rotation] - The rotation, in degrees, overriding the one\n * in the cloned viewport. The default value is `this.rotation`.\n * @property {number} [offsetX] - The horizontal, i.e. x-axis, offset.\n * The default value is `this.offsetX`.\n * @property {number} [offsetY] - The vertical, i.e. y-axis, offset.\n * The default value is `this.offsetY`.\n * @property {boolean} [dontFlip] - If true, the x-axis will not be flipped.\n * The default value is `false`.\n */\n\n/**\n * PDF page viewport created based on scale, rotation and offset.\n */\nclass PageViewport {\n /**\n * @param {PageViewportParameters}\n */\n constructor({\n viewBox,\n scale,\n rotation,\n offsetX = 0,\n offsetY = 0,\n dontFlip = false,\n }) {\n this.viewBox = viewBox;\n this.scale = scale;\n this.rotation = rotation;\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n\n // creating transform to convert pdf coordinate system to the normal\n // canvas like coordinates taking in account scale and rotation\n const centerX = (viewBox[2] + viewBox[0]) / 2;\n const centerY = (viewBox[3] + viewBox[1]) / 2;\n let rotateA, rotateB, rotateC, rotateD;\n // Normalize the rotation, by clamping it to the [0, 360) range.\n rotation %= 360;\n if (rotation < 0) {\n rotation += 360;\n }\n switch (rotation) {\n case 180:\n rotateA = -1;\n rotateB = 0;\n rotateC = 0;\n rotateD = 1;\n break;\n case 90:\n rotateA = 0;\n rotateB = 1;\n rotateC = 1;\n rotateD = 0;\n break;\n case 270:\n rotateA = 0;\n rotateB = -1;\n rotateC = -1;\n rotateD = 0;\n break;\n case 0:\n rotateA = 1;\n rotateB = 0;\n rotateC = 0;\n rotateD = -1;\n break;\n default:\n throw new Error(\n \"PageViewport: Invalid rotation, must be a multiple of 90 degrees.\"\n );\n }\n\n if (dontFlip) {\n rotateC = -rotateC;\n rotateD = -rotateD;\n }\n\n let offsetCanvasX, offsetCanvasY;\n let width, height;\n if (rotateA === 0) {\n offsetCanvasX = Math.abs(centerY - viewBox[1]) * scale + offsetX;\n offsetCanvasY = Math.abs(centerX - viewBox[0]) * scale + offsetY;\n width = (viewBox[3] - viewBox[1]) * scale;\n height = (viewBox[2] - viewBox[0]) * scale;\n } else {\n offsetCanvasX = Math.abs(centerX - viewBox[0]) * scale + offsetX;\n offsetCanvasY = Math.abs(centerY - viewBox[1]) * scale + offsetY;\n width = (viewBox[2] - viewBox[0]) * scale;\n height = (viewBox[3] - viewBox[1]) * scale;\n }\n // creating transform for the following operations:\n // translate(-centerX, -centerY), rotate and flip vertically,\n // scale, and translate(offsetCanvasX, offsetCanvasY)\n this.transform = [\n rotateA * scale,\n rotateB * scale,\n rotateC * scale,\n rotateD * scale,\n offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY,\n offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY,\n ];\n\n this.width = width;\n this.height = height;\n }\n\n /**\n * The original, un-scaled, viewport dimensions.\n * @type {Object}\n */\n get rawDims() {\n const { viewBox } = this;\n return shadow(this, \"rawDims\", {\n pageWidth: viewBox[2] - viewBox[0],\n pageHeight: viewBox[3] - viewBox[1],\n pageX: viewBox[0],\n pageY: viewBox[1],\n });\n }\n\n /**\n * Clones viewport, with optional additional properties.\n * @param {PageViewportCloneParameters} [params]\n * @returns {PageViewport} Cloned viewport.\n */\n clone({\n scale = this.scale,\n rotation = this.rotation,\n offsetX = this.offsetX,\n offsetY = this.offsetY,\n dontFlip = false,\n } = {}) {\n return new PageViewport({\n viewBox: this.viewBox.slice(),\n scale,\n rotation,\n offsetX,\n offsetY,\n dontFlip,\n });\n }\n\n /**\n * Converts PDF point to the viewport coordinates. For examples, useful for\n * converting PDF location into canvas pixel coordinates.\n * @param {number} x - The x-coordinate.\n * @param {number} y - The y-coordinate.\n * @returns {Array} Array containing `x`- and `y`-coordinates of the\n * point in the viewport coordinate space.\n * @see {@link convertToPdfPoint}\n * @see {@link convertToViewportRectangle}\n */\n convertToViewportPoint(x, y) {\n return Util.applyTransform([x, y], this.transform);\n }\n\n /**\n * Converts PDF rectangle to the viewport coordinates.\n * @param {Array} rect - The xMin, yMin, xMax and yMax coordinates.\n * @returns {Array} Array containing corresponding coordinates of the\n * rectangle in the viewport coordinate space.\n * @see {@link convertToViewportPoint}\n */\n convertToViewportRectangle(rect) {\n const topLeft = Util.applyTransform([rect[0], rect[1]], this.transform);\n const bottomRight = Util.applyTransform([rect[2], rect[3]], this.transform);\n return [topLeft[0], topLeft[1], bottomRight[0], bottomRight[1]];\n }\n\n /**\n * Converts viewport coordinates to the PDF location. For examples, useful\n * for converting canvas pixel location into PDF one.\n * @param {number} x - The x-coordinate.\n * @param {number} y - The y-coordinate.\n * @returns {Array} Array containing `x`- and `y`-coordinates of the\n * point in the PDF coordinate space.\n * @see {@link convertToViewportPoint}\n */\n convertToPdfPoint(x, y) {\n return Util.applyInverseTransform([x, y], this.transform);\n }\n}\n\nclass RenderingCancelledException extends BaseException {\n constructor(msg, extraDelay = 0) {\n super(msg, \"RenderingCancelledException\");\n this.extraDelay = extraDelay;\n }\n}\n\nfunction isDataScheme(url) {\n const ii = url.length;\n let i = 0;\n while (i < ii && url[i].trim() === \"\") {\n i++;\n }\n return url.substring(i, i + 5).toLowerCase() === \"data:\";\n}\n\nfunction isPdfFile(filename) {\n return typeof filename === \"string\" && /\\.pdf$/i.test(filename);\n}\n\n/**\n * Gets the filename from a given URL.\n * @param {string} url\n * @returns {string}\n */\nfunction getFilenameFromUrl(url) {\n [url] = url.split(/[#?]/, 1);\n return url.substring(url.lastIndexOf(\"/\") + 1);\n}\n\n/**\n * Returns the filename or guessed filename from the url (see issue 3455).\n * @param {string} url - The original PDF location.\n * @param {string} defaultFilename - The value returned if the filename is\n * unknown, or the protocol is unsupported.\n * @returns {string} Guessed PDF filename.\n */\nfunction getPdfFilenameFromUrl(url, defaultFilename = \"document.pdf\") {\n if (typeof url !== \"string\") {\n return defaultFilename;\n }\n if (isDataScheme(url)) {\n warn('getPdfFilenameFromUrl: ignore \"data:\"-URL for performance reasons.');\n return defaultFilename;\n }\n const reURI = /^(?:(?:[^:]+:)?\\/\\/[^/]+)?([^?#]*)(\\?[^#]*)?(#.*)?$/;\n // SCHEME HOST 1.PATH 2.QUERY 3.REF\n // Pattern to get last matching NAME.pdf\n const reFilename = /[^/?#=]+\\.pdf\\b(?!.*\\.pdf\\b)/i;\n const splitURI = reURI.exec(url);\n let suggestedFilename =\n reFilename.exec(splitURI[1]) ||\n reFilename.exec(splitURI[2]) ||\n reFilename.exec(splitURI[3]);\n if (suggestedFilename) {\n suggestedFilename = suggestedFilename[0];\n if (suggestedFilename.includes(\"%\")) {\n // URL-encoded %2Fpath%2Fto%2Ffile.pdf should be file.pdf\n try {\n suggestedFilename = reFilename.exec(\n decodeURIComponent(suggestedFilename)\n )[0];\n } catch {\n // Possible (extremely rare) errors:\n // URIError \"Malformed URI\", e.g. for \"%AA.pdf\"\n // TypeError \"null has no properties\", e.g. for \"%2F.pdf\"\n }\n }\n }\n return suggestedFilename || defaultFilename;\n}\n\nclass StatTimer {\n started = Object.create(null);\n\n times = [];\n\n time(name) {\n if (name in this.started) {\n warn(`Timer is already running for ${name}`);\n }\n this.started[name] = Date.now();\n }\n\n timeEnd(name) {\n if (!(name in this.started)) {\n warn(`Timer has not been started for ${name}`);\n }\n this.times.push({\n name,\n start: this.started[name],\n end: Date.now(),\n });\n // Remove timer from started so it can be called again.\n delete this.started[name];\n }\n\n toString() {\n // Find the longest name for padding purposes.\n const outBuf = [];\n let longest = 0;\n for (const { name } of this.times) {\n longest = Math.max(name.length, longest);\n }\n for (const { name, start, end } of this.times) {\n outBuf.push(`${name.padEnd(longest)} ${end - start}ms\\n`);\n }\n return outBuf.join(\"\");\n }\n}\n\nfunction isValidFetchUrl(url, baseUrl) {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n throw new Error(\"Not implemented: isValidFetchUrl\");\n }\n try {\n const { protocol } = baseUrl ? new URL(url, baseUrl) : new URL(url);\n // The Fetch API only supports the http/https protocols, and not file/ftp.\n return protocol === \"http:\" || protocol === \"https:\";\n } catch {\n return false; // `new URL()` will throw on incorrect data.\n }\n}\n\n/**\n * Event handler to suppress context menu.\n */\nfunction noContextMenu(e) {\n e.preventDefault();\n}\n\n// Deprecated API function -- display regardless of the `verbosity` setting.\nfunction deprecated(details) {\n console.log(\"Deprecated API usage: \" + details);\n}\n\nlet pdfDateStringRegex;\n\nclass PDFDateString {\n /**\n * Convert a PDF date string to a JavaScript `Date` object.\n *\n * The PDF date string format is described in section 7.9.4 of the official\n * PDF 32000-1:2008 specification. However, in the PDF 1.7 reference (sixth\n * edition) Adobe describes the same format including a trailing apostrophe.\n * This syntax in incorrect, but Adobe Acrobat creates PDF files that contain\n * them. We ignore all apostrophes as they are not necessary for date parsing.\n *\n * Moreover, Adobe Acrobat doesn't handle changing the date to universal time\n * and doesn't use the user's time zone (effectively ignoring the HH' and mm'\n * parts of the date string).\n *\n * @param {string} input\n * @returns {Date|null}\n */\n static toDateObject(input) {\n if (!input || typeof input !== \"string\") {\n return null;\n }\n\n // Lazily initialize the regular expression.\n pdfDateStringRegex ||= new RegExp(\n \"^D:\" + // Prefix (required)\n \"(\\\\d{4})\" + // Year (required)\n \"(\\\\d{2})?\" + // Month (optional)\n \"(\\\\d{2})?\" + // Day (optional)\n \"(\\\\d{2})?\" + // Hour (optional)\n \"(\\\\d{2})?\" + // Minute (optional)\n \"(\\\\d{2})?\" + // Second (optional)\n \"([Z|+|-])?\" + // Universal time relation (optional)\n \"(\\\\d{2})?\" + // Offset hour (optional)\n \"'?\" + // Splitting apostrophe (optional)\n \"(\\\\d{2})?\" + // Offset minute (optional)\n \"'?\" // Trailing apostrophe (optional)\n );\n\n // Optional fields that don't satisfy the requirements from the regular\n // expression (such as incorrect digit counts or numbers that are out of\n // range) will fall back the defaults from the specification.\n const matches = pdfDateStringRegex.exec(input);\n if (!matches) {\n return null;\n }\n\n // JavaScript's `Date` object expects the month to be between 0 and 11\n // instead of 1 and 12, so we have to correct for that.\n const year = parseInt(matches[1], 10);\n let month = parseInt(matches[2], 10);\n month = month >= 1 && month <= 12 ? month - 1 : 0;\n let day = parseInt(matches[3], 10);\n day = day >= 1 && day <= 31 ? day : 1;\n let hour = parseInt(matches[4], 10);\n hour = hour >= 0 && hour <= 23 ? hour : 0;\n let minute = parseInt(matches[5], 10);\n minute = minute >= 0 && minute <= 59 ? minute : 0;\n let second = parseInt(matches[6], 10);\n second = second >= 0 && second <= 59 ? second : 0;\n const universalTimeRelation = matches[7] || \"Z\";\n let offsetHour = parseInt(matches[8], 10);\n offsetHour = offsetHour >= 0 && offsetHour <= 23 ? offsetHour : 0;\n let offsetMinute = parseInt(matches[9], 10) || 0;\n offsetMinute = offsetMinute >= 0 && offsetMinute <= 59 ? offsetMinute : 0;\n\n // Universal time relation 'Z' means that the local time is equal to the\n // universal time, whereas the relations '+'/'-' indicate that the local\n // time is later respectively earlier than the universal time. Every date\n // is normalized to universal time.\n if (universalTimeRelation === \"-\") {\n hour += offsetHour;\n minute += offsetMinute;\n } else if (universalTimeRelation === \"+\") {\n hour -= offsetHour;\n minute -= offsetMinute;\n }\n\n return new Date(Date.UTC(year, month, day, hour, minute, second));\n }\n}\n\n/**\n * NOTE: This is (mostly) intended to support printing of XFA forms.\n */\nfunction getXfaPageViewport(xfaPage, { scale = 1, rotation = 0 }) {\n const { width, height } = xfaPage.attributes.style;\n const viewBox = [0, 0, parseInt(width), parseInt(height)];\n\n return new PageViewport({\n viewBox,\n scale,\n rotation,\n });\n}\n\nfunction getRGB(color) {\n if (color.startsWith(\"#\")) {\n const colorRGB = parseInt(color.slice(1), 16);\n return [\n (colorRGB & 0xff0000) >> 16,\n (colorRGB & 0x00ff00) >> 8,\n colorRGB & 0x0000ff,\n ];\n }\n\n if (color.startsWith(\"rgb(\")) {\n // getComputedStyle(...).color returns a `rgb(R, G, B)` color.\n return color\n .slice(/* \"rgb(\".length */ 4, -1) // Strip out \"rgb(\" and \")\".\n .split(\",\")\n .map(x => parseInt(x));\n }\n\n if (color.startsWith(\"rgba(\")) {\n return color\n .slice(/* \"rgba(\".length */ 5, -1) // Strip out \"rgba(\" and \")\".\n .split(\",\")\n .map(x => parseInt(x))\n .slice(0, 3);\n }\n\n warn(`Not a valid color format: \"${color}\"`);\n return [0, 0, 0];\n}\n\nfunction getColorValues(colors) {\n const span = document.createElement(\"span\");\n span.style.visibility = \"hidden\";\n document.body.append(span);\n for (const name of colors.keys()) {\n span.style.color = name;\n const computedColor = window.getComputedStyle(span).color;\n colors.set(name, getRGB(computedColor));\n }\n span.remove();\n}\n\nfunction getCurrentTransform(ctx) {\n const { a, b, c, d, e, f } = ctx.getTransform();\n return [a, b, c, d, e, f];\n}\n\nfunction getCurrentTransformInverse(ctx) {\n const { a, b, c, d, e, f } = ctx.getTransform().invertSelf();\n return [a, b, c, d, e, f];\n}\n\n/**\n * @param {HTMLDivElement} div\n * @param {PageViewport} viewport\n * @param {boolean} mustFlip\n * @param {boolean} mustRotate\n */\nfunction setLayerDimensions(\n div,\n viewport,\n mustFlip = false,\n mustRotate = true\n) {\n if (viewport instanceof PageViewport) {\n const { pageWidth, pageHeight } = viewport.rawDims;\n const { style } = div;\n const useRound = FeatureTest.isCSSRoundSupported;\n\n const w = `var(--scale-factor) * ${pageWidth}px`,\n h = `var(--scale-factor) * ${pageHeight}px`;\n const widthStr = useRound ? `round(${w}, 1px)` : `calc(${w})`,\n heightStr = useRound ? `round(${h}, 1px)` : `calc(${h})`;\n\n if (!mustFlip || viewport.rotation % 180 === 0) {\n style.width = widthStr;\n style.height = heightStr;\n } else {\n style.width = heightStr;\n style.height = widthStr;\n }\n }\n\n if (mustRotate) {\n div.setAttribute(\"data-main-rotation\", viewport.rotation);\n }\n}\n\nexport {\n deprecated,\n DOMCanvasFactory,\n DOMCMapReaderFactory,\n DOMFilterFactory,\n DOMStandardFontDataFactory,\n DOMSVGFactory,\n fetchData,\n getColorValues,\n getCurrentTransform,\n getCurrentTransformInverse,\n getFilenameFromUrl,\n getPdfFilenameFromUrl,\n getRGB,\n getXfaPageViewport,\n isDataScheme,\n isPdfFile,\n isValidFetchUrl,\n noContextMenu,\n PageViewport,\n PDFDateString,\n PixelsPerInch,\n RenderingCancelledException,\n setLayerDimensions,\n StatTimer,\n};\n","/* Copyright 2023 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { noContextMenu } from \"../display_utils.js\";\n\nclass EditorToolbar {\n #toolbar = null;\n\n #colorPicker = null;\n\n #editor;\n\n #buttons = null;\n\n constructor(editor) {\n this.#editor = editor;\n }\n\n render() {\n const editToolbar = (this.#toolbar = document.createElement(\"div\"));\n editToolbar.className = \"editToolbar\";\n editToolbar.setAttribute(\"role\", \"toolbar\");\n editToolbar.addEventListener(\"contextmenu\", noContextMenu);\n editToolbar.addEventListener(\"pointerdown\", EditorToolbar.#pointerDown);\n\n const buttons = (this.#buttons = document.createElement(\"div\"));\n buttons.className = \"buttons\";\n editToolbar.append(buttons);\n\n const position = this.#editor.toolbarPosition;\n if (position) {\n const { style } = editToolbar;\n const x =\n this.#editor._uiManager.direction === \"ltr\"\n ? 1 - position[0]\n : position[0];\n style.insetInlineEnd = `${100 * x}%`;\n style.top = `calc(${\n 100 * position[1]\n }% + var(--editor-toolbar-vert-offset))`;\n }\n\n this.#addDeleteButton();\n\n return editToolbar;\n }\n\n static #pointerDown(e) {\n e.stopPropagation();\n }\n\n #focusIn(e) {\n this.#editor._focusEventsAllowed = false;\n e.preventDefault();\n e.stopPropagation();\n }\n\n #focusOut(e) {\n this.#editor._focusEventsAllowed = true;\n e.preventDefault();\n e.stopPropagation();\n }\n\n #addListenersToElement(element) {\n // If we're clicking on a button with the keyboard or with\n // the mouse, we don't want to trigger any focus events on\n // the editor.\n element.addEventListener(\"focusin\", this.#focusIn.bind(this), {\n capture: true,\n });\n element.addEventListener(\"focusout\", this.#focusOut.bind(this), {\n capture: true,\n });\n element.addEventListener(\"contextmenu\", noContextMenu);\n }\n\n hide() {\n this.#toolbar.classList.add(\"hidden\");\n this.#colorPicker?.hideDropdown();\n }\n\n show() {\n this.#toolbar.classList.remove(\"hidden\");\n }\n\n #addDeleteButton() {\n const button = document.createElement(\"button\");\n button.className = \"delete\";\n button.tabIndex = 0;\n button.setAttribute(\n \"data-l10n-id\",\n `pdfjs-editor-remove-${this.#editor.editorType}-button`\n );\n this.#addListenersToElement(button);\n button.addEventListener(\"click\", e => {\n this.#editor._uiManager.delete();\n });\n this.#buttons.append(button);\n }\n\n get #divider() {\n const divider = document.createElement(\"div\");\n divider.className = \"divider\";\n return divider;\n }\n\n addAltTextButton(button) {\n this.#addListenersToElement(button);\n this.#buttons.prepend(button, this.#divider);\n }\n\n addColorPicker(colorPicker) {\n this.#colorPicker = colorPicker;\n const button = colorPicker.renderButton();\n this.#addListenersToElement(button);\n this.#buttons.prepend(button, this.#divider);\n }\n\n remove() {\n this.#toolbar.remove();\n this.#colorPicker?.destroy();\n this.#colorPicker = null;\n }\n}\n\nclass HighlightToolbar {\n #buttons = null;\n\n #toolbar = null;\n\n #uiManager;\n\n constructor(uiManager) {\n this.#uiManager = uiManager;\n }\n\n #render() {\n const editToolbar = (this.#toolbar = document.createElement(\"div\"));\n editToolbar.className = \"editToolbar\";\n editToolbar.setAttribute(\"role\", \"toolbar\");\n editToolbar.addEventListener(\"contextmenu\", noContextMenu);\n\n const buttons = (this.#buttons = document.createElement(\"div\"));\n buttons.className = \"buttons\";\n editToolbar.append(buttons);\n\n this.#addHighlightButton();\n\n return editToolbar;\n }\n\n #getLastPoint(boxes, isLTR) {\n let lastY = 0;\n let lastX = 0;\n for (const box of boxes) {\n const y = box.y + box.height;\n if (y < lastY) {\n continue;\n }\n const x = box.x + (isLTR ? box.width : 0);\n if (y > lastY) {\n lastX = x;\n lastY = y;\n continue;\n }\n if (isLTR) {\n if (x > lastX) {\n lastX = x;\n }\n } else if (x < lastX) {\n lastX = x;\n }\n }\n return [isLTR ? 1 - lastX : lastX, lastY];\n }\n\n show(parent, boxes, isLTR) {\n const [x, y] = this.#getLastPoint(boxes, isLTR);\n const { style } = (this.#toolbar ||= this.#render());\n parent.append(this.#toolbar);\n style.insetInlineEnd = `${100 * x}%`;\n style.top = `calc(${100 * y}% + var(--editor-toolbar-vert-offset))`;\n }\n\n hide() {\n this.#toolbar.remove();\n }\n\n #addHighlightButton() {\n const button = document.createElement(\"button\");\n button.className = \"highlightButton\";\n button.tabIndex = 0;\n button.setAttribute(\"data-l10n-id\", `pdfjs-highlight-floating-button1`);\n const span = document.createElement(\"span\");\n button.append(span);\n span.className = \"visuallyHidden\";\n span.setAttribute(\"data-l10n-id\", \"pdfjs-highlight-floating-button-label\");\n button.addEventListener(\"contextmenu\", noContextMenu);\n button.addEventListener(\"click\", () => {\n this.#uiManager.highlightSelection(\"floating_button\");\n });\n this.#buttons.append(button);\n }\n}\n\nexport { EditorToolbar, HighlightToolbar };\n","/* Copyright 2022 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @typedef {import(\"./editor.js\").AnnotationEditor} AnnotationEditor */\n// eslint-disable-next-line max-len\n/** @typedef {import(\"./annotation_editor_layer.js\").AnnotationEditorLayer} AnnotationEditorLayer */\n\nimport {\n AnnotationEditorParamsType,\n AnnotationEditorPrefix,\n AnnotationEditorType,\n FeatureTest,\n getUuid,\n shadow,\n Util,\n warn,\n} from \"../../shared/util.js\";\nimport {\n fetchData,\n getColorValues,\n getRGB,\n PixelsPerInch,\n} from \"../display_utils.js\";\nimport { HighlightToolbar } from \"./toolbar.js\";\n\nfunction bindEvents(obj, element, names) {\n for (const name of names) {\n element.addEventListener(name, obj[name].bind(obj));\n }\n}\n\n/**\n * Convert a number between 0 and 100 into an hex number between 0 and 255.\n * @param {number} opacity\n * @return {string}\n */\nfunction opacityToHex(opacity) {\n return Math.round(Math.min(255, Math.max(1, 255 * opacity)))\n .toString(16)\n .padStart(2, \"0\");\n}\n\n/**\n * Class to create some unique ids for the different editors.\n */\nclass IdManager {\n #id = 0;\n\n constructor() {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"TESTING\")) {\n Object.defineProperty(this, \"reset\", {\n value: () => (this.#id = 0),\n });\n }\n }\n\n /**\n * Get a unique id.\n * @returns {string}\n */\n get id() {\n return `${AnnotationEditorPrefix}${this.#id++}`;\n }\n}\n\n/**\n * Class to manage the images used by the editors.\n * The main idea is to try to minimize the memory used by the images.\n * The images are cached and reused when possible\n * We use a refCounter to know when an image is not used anymore but we need to\n * be able to restore an image after a remove+undo, so we keep a file reference\n * or an url one.\n */\nclass ImageManager {\n #baseId = getUuid();\n\n #id = 0;\n\n #cache = null;\n\n static get _isSVGFittingCanvas() {\n // By default, Firefox doesn't rescale without preserving the aspect ratio\n // when drawing an SVG image on a canvas, see https://bugzilla.mozilla.org/1547776.\n // The \"workaround\" is to append \"svgView(preserveAspectRatio(none))\" to the\n // url, but according to comment #15, it seems that it leads to unexpected\n // behavior in Safari.\n const svg = `data:image/svg+xml;charset=UTF-8,`;\n const canvas = new OffscreenCanvas(1, 3);\n const ctx = canvas.getContext(\"2d\");\n const image = new Image();\n image.src = svg;\n const promise = image.decode().then(() => {\n ctx.drawImage(image, 0, 0, 1, 1, 0, 0, 1, 3);\n return new Uint32Array(ctx.getImageData(0, 0, 1, 1).data.buffer)[0] === 0;\n });\n\n return shadow(this, \"_isSVGFittingCanvas\", promise);\n }\n\n async #get(key, rawData) {\n this.#cache ||= new Map();\n let data = this.#cache.get(key);\n if (data === null) {\n // We already tried to load the image but it failed.\n return null;\n }\n if (data?.bitmap) {\n data.refCounter += 1;\n return data;\n }\n try {\n data ||= {\n bitmap: null,\n id: `image_${this.#baseId}_${this.#id++}`,\n refCounter: 0,\n isSvg: false,\n };\n let image;\n if (typeof rawData === \"string\") {\n data.url = rawData;\n image = await fetchData(rawData, \"blob\");\n } else {\n image = data.file = rawData;\n }\n\n if (image.type === \"image/svg+xml\") {\n // Unfortunately, createImageBitmap doesn't work with SVG images.\n // (see https://bugzilla.mozilla.org/1841972).\n const mustRemoveAspectRatioPromise = ImageManager._isSVGFittingCanvas;\n const fileReader = new FileReader();\n const imageElement = new Image();\n const imagePromise = new Promise((resolve, reject) => {\n imageElement.onload = () => {\n data.bitmap = imageElement;\n data.isSvg = true;\n resolve();\n };\n fileReader.onload = async () => {\n const url = (data.svgUrl = fileReader.result);\n // We need to set the preserveAspectRatio to none in order to let\n // the image fits the canvas when resizing.\n imageElement.src = (await mustRemoveAspectRatioPromise)\n ? `${url}#svgView(preserveAspectRatio(none))`\n : url;\n };\n imageElement.onerror = fileReader.onerror = reject;\n });\n fileReader.readAsDataURL(image);\n await imagePromise;\n } else {\n data.bitmap = await createImageBitmap(image);\n }\n data.refCounter = 1;\n } catch (e) {\n console.error(e);\n data = null;\n }\n this.#cache.set(key, data);\n if (data) {\n this.#cache.set(data.id, data);\n }\n return data;\n }\n\n async getFromFile(file) {\n const { lastModified, name, size, type } = file;\n return this.#get(`${lastModified}_${name}_${size}_${type}`, file);\n }\n\n async getFromUrl(url) {\n return this.#get(url, url);\n }\n\n async getFromId(id) {\n this.#cache ||= new Map();\n const data = this.#cache.get(id);\n if (!data) {\n return null;\n }\n if (data.bitmap) {\n data.refCounter += 1;\n return data;\n }\n\n if (data.file) {\n return this.getFromFile(data.file);\n }\n return this.getFromUrl(data.url);\n }\n\n getSvgUrl(id) {\n const data = this.#cache.get(id);\n if (!data?.isSvg) {\n return null;\n }\n return data.svgUrl;\n }\n\n deleteId(id) {\n this.#cache ||= new Map();\n const data = this.#cache.get(id);\n if (!data) {\n return;\n }\n data.refCounter -= 1;\n if (data.refCounter !== 0) {\n return;\n }\n data.bitmap = null;\n }\n\n // We can use the id only if it belongs this manager.\n // We must take care of having the right manager because we can copy/paste\n // some images from other documents, hence it'd be a pity to use an id from an\n // other manager.\n isValidId(id) {\n return id.startsWith(`image_${this.#baseId}_`);\n }\n}\n\n/**\n * Class to handle undo/redo.\n * Commands are just saved in a buffer.\n * If we hit some memory issues we could likely use a circular buffer.\n * It has to be used as a singleton.\n */\nclass CommandManager {\n #commands = [];\n\n #locked = false;\n\n #maxSize;\n\n #position = -1;\n\n constructor(maxSize = 128) {\n this.#maxSize = maxSize;\n }\n\n /**\n * @typedef {Object} addOptions\n * @property {function} cmd\n * @property {function} undo\n * @property {function} [post]\n * @property {boolean} mustExec\n * @property {number} type\n * @property {boolean} overwriteIfSameType\n * @property {boolean} keepUndo\n */\n\n /**\n * Add a new couple of commands to be used in case of redo/undo.\n * @param {addOptions} options\n */\n add({\n cmd,\n undo,\n post,\n mustExec,\n type = NaN,\n overwriteIfSameType = false,\n keepUndo = false,\n }) {\n if (mustExec) {\n cmd();\n }\n\n if (this.#locked) {\n return;\n }\n\n const save = { cmd, undo, post, type };\n if (this.#position === -1) {\n if (this.#commands.length > 0) {\n // All the commands have been undone and then a new one is added\n // hence we clear the queue.\n this.#commands.length = 0;\n }\n this.#position = 0;\n this.#commands.push(save);\n return;\n }\n\n if (overwriteIfSameType && this.#commands[this.#position].type === type) {\n // For example when we change a color we don't want to\n // be able to undo all the steps, hence we only want to\n // keep the last undoable action in this sequence of actions.\n if (keepUndo) {\n save.undo = this.#commands[this.#position].undo;\n }\n this.#commands[this.#position] = save;\n return;\n }\n\n const next = this.#position + 1;\n if (next === this.#maxSize) {\n this.#commands.splice(0, 1);\n } else {\n this.#position = next;\n if (next < this.#commands.length) {\n this.#commands.splice(next);\n }\n }\n\n this.#commands.push(save);\n }\n\n /**\n * Undo the last command.\n */\n undo() {\n if (this.#position === -1) {\n // Nothing to undo.\n return;\n }\n\n // Avoid to insert something during the undo execution.\n this.#locked = true;\n const { undo, post } = this.#commands[this.#position];\n undo();\n post?.();\n this.#locked = false;\n\n this.#position -= 1;\n }\n\n /**\n * Redo the last command.\n */\n redo() {\n if (this.#position < this.#commands.length - 1) {\n this.#position += 1;\n\n // Avoid to insert something during the redo execution.\n this.#locked = true;\n const { cmd, post } = this.#commands[this.#position];\n cmd();\n post?.();\n this.#locked = false;\n }\n }\n\n /**\n * Check if there is something to undo.\n * @returns {boolean}\n */\n hasSomethingToUndo() {\n return this.#position !== -1;\n }\n\n /**\n * Check if there is something to redo.\n * @returns {boolean}\n */\n hasSomethingToRedo() {\n return this.#position < this.#commands.length - 1;\n }\n\n destroy() {\n this.#commands = null;\n }\n}\n\n/**\n * Class to handle the different keyboards shortcuts we can have on mac or\n * non-mac OSes.\n */\nclass KeyboardManager {\n /**\n * Create a new keyboard manager class.\n * @param {Array} callbacks - an array containing an array of shortcuts\n * and a callback to call.\n * A shortcut is a string like `ctrl+c` or `mac+ctrl+c` for mac OS.\n */\n constructor(callbacks) {\n this.buffer = [];\n this.callbacks = new Map();\n this.allKeys = new Set();\n\n const { isMac } = FeatureTest.platform;\n for (const [keys, callback, options = {}] of callbacks) {\n for (const key of keys) {\n const isMacKey = key.startsWith(\"mac+\");\n if (isMac && isMacKey) {\n this.callbacks.set(key.slice(4), { callback, options });\n this.allKeys.add(key.split(\"+\").at(-1));\n } else if (!isMac && !isMacKey) {\n this.callbacks.set(key, { callback, options });\n this.allKeys.add(key.split(\"+\").at(-1));\n }\n }\n }\n }\n\n /**\n * Serialize an event into a string in order to match a\n * potential key for a callback.\n * @param {KeyboardEvent} event\n * @returns {string}\n */\n #serialize(event) {\n if (event.altKey) {\n this.buffer.push(\"alt\");\n }\n if (event.ctrlKey) {\n this.buffer.push(\"ctrl\");\n }\n if (event.metaKey) {\n this.buffer.push(\"meta\");\n }\n if (event.shiftKey) {\n this.buffer.push(\"shift\");\n }\n this.buffer.push(event.key);\n const str = this.buffer.join(\"+\");\n this.buffer.length = 0;\n\n return str;\n }\n\n /**\n * Execute a callback, if any, for a given keyboard event.\n * The self is used as `this` in the callback.\n * @param {Object} self\n * @param {KeyboardEvent} event\n * @returns\n */\n exec(self, event) {\n if (!this.allKeys.has(event.key)) {\n return;\n }\n const info = this.callbacks.get(this.#serialize(event));\n if (!info) {\n return;\n }\n const {\n callback,\n options: { bubbles = false, args = [], checker = null },\n } = info;\n\n if (checker && !checker(self, event)) {\n return;\n }\n callback.bind(self, ...args, event)();\n\n // For example, ctrl+s in a FreeText must be handled by the viewer, hence\n // the event must bubble.\n if (!bubbles) {\n event.stopPropagation();\n event.preventDefault();\n }\n }\n}\n\nclass ColorManager {\n static _colorsMapping = new Map([\n [\"CanvasText\", [0, 0, 0]],\n [\"Canvas\", [255, 255, 255]],\n ]);\n\n get _colors() {\n if (\n typeof PDFJSDev !== \"undefined\" &&\n PDFJSDev.test(\"LIB\") &&\n typeof document === \"undefined\"\n ) {\n return shadow(this, \"_colors\", ColorManager._colorsMapping);\n }\n\n const colors = new Map([\n [\"CanvasText\", null],\n [\"Canvas\", null],\n ]);\n getColorValues(colors);\n return shadow(this, \"_colors\", colors);\n }\n\n /**\n * In High Contrast Mode, the color on the screen is not always the\n * real color used in the pdf.\n * For example in some cases white can appear to be black but when saving\n * we want to have white.\n * @param {string} color\n * @returns {Array}\n */\n convert(color) {\n const rgb = getRGB(color);\n if (!window.matchMedia(\"(forced-colors: active)\").matches) {\n return rgb;\n }\n\n for (const [name, RGB] of this._colors) {\n if (RGB.every((x, i) => x === rgb[i])) {\n return ColorManager._colorsMapping.get(name);\n }\n }\n return rgb;\n }\n\n /**\n * An input element must have its color value as a hex string\n * and not as color name.\n * So this function converts a name into an hex string.\n * @param {string} name\n * @returns {string}\n */\n getHexCode(name) {\n const rgb = this._colors.get(name);\n if (!rgb) {\n return name;\n }\n return Util.makeHexColor(...rgb);\n }\n}\n\n/**\n * A pdf has several pages and each of them when it will rendered\n * will have an AnnotationEditorLayer which will contain the some\n * new Annotations associated to an editor in order to modify them.\n *\n * This class is used to manage all the different layers, editors and\n * some action like copy/paste, undo/redo, ...\n */\nclass AnnotationEditorUIManager {\n #activeEditor = null;\n\n #allEditors = new Map();\n\n #allLayers = new Map();\n\n #altTextManager = null;\n\n #annotationStorage = null;\n\n #changedExistingAnnotations = null;\n\n #commandManager = new CommandManager();\n\n #currentPageIndex = 0;\n\n #deletedAnnotationsElementIds = new Set();\n\n #draggingEditors = null;\n\n #editorTypes = null;\n\n #editorsToRescale = new Set();\n\n #enableHighlightFloatingButton = false;\n\n #filterFactory = null;\n\n #focusMainContainerTimeoutId = null;\n\n #highlightColors = null;\n\n #highlightWhenShiftUp = false;\n\n #highlightToolbar = null;\n\n #idManager = new IdManager();\n\n #isEnabled = false;\n\n #isWaiting = false;\n\n #lastActiveElement = null;\n\n #mainHighlightColorPicker = null;\n\n #mlManager = null;\n\n #mode = AnnotationEditorType.NONE;\n\n #selectedEditors = new Set();\n\n #selectedTextNode = null;\n\n #pageColors = null;\n\n #showAllStates = null;\n\n #boundBlur = this.blur.bind(this);\n\n #boundFocus = this.focus.bind(this);\n\n #boundCopy = this.copy.bind(this);\n\n #boundCut = this.cut.bind(this);\n\n #boundPaste = this.paste.bind(this);\n\n #boundKeydown = this.keydown.bind(this);\n\n #boundKeyup = this.keyup.bind(this);\n\n #boundOnEditingAction = this.onEditingAction.bind(this);\n\n #boundOnPageChanging = this.onPageChanging.bind(this);\n\n #boundOnScaleChanging = this.onScaleChanging.bind(this);\n\n #boundSelectionChange = this.#selectionChange.bind(this);\n\n #boundOnRotationChanging = this.onRotationChanging.bind(this);\n\n #previousStates = {\n isEditing: false,\n isEmpty: true,\n hasSomethingToUndo: false,\n hasSomethingToRedo: false,\n hasSelectedEditor: false,\n hasSelectedText: false,\n };\n\n #translation = [0, 0];\n\n #translationTimeoutId = null;\n\n #container = null;\n\n #viewer = null;\n\n static TRANSLATE_SMALL = 1; // page units.\n\n static TRANSLATE_BIG = 10; // page units.\n\n static get _keyboardManager() {\n const proto = AnnotationEditorUIManager.prototype;\n\n /**\n * If the focused element is an input, we don't want to handle the arrow.\n * For example, sliders can be controlled with the arrow keys.\n */\n const arrowChecker = self =>\n self.#container.contains(document.activeElement) &&\n document.activeElement.tagName !== \"BUTTON\" &&\n self.hasSomethingToControl();\n\n const textInputChecker = (_self, { target: el }) => {\n if (el instanceof HTMLInputElement) {\n const { type } = el;\n return type !== \"text\" && type !== \"number\";\n }\n return true;\n };\n\n const small = this.TRANSLATE_SMALL;\n const big = this.TRANSLATE_BIG;\n\n return shadow(\n this,\n \"_keyboardManager\",\n new KeyboardManager([\n [\n [\"ctrl+a\", \"mac+meta+a\"],\n proto.selectAll,\n { checker: textInputChecker },\n ],\n [[\"ctrl+z\", \"mac+meta+z\"], proto.undo, { checker: textInputChecker }],\n [\n // On mac, depending of the OS version, the event.key is either \"z\" or\n // \"Z\" when the user presses \"meta+shift+z\".\n [\n \"ctrl+y\",\n \"ctrl+shift+z\",\n \"mac+meta+shift+z\",\n \"ctrl+shift+Z\",\n \"mac+meta+shift+Z\",\n ],\n proto.redo,\n { checker: textInputChecker },\n ],\n [\n [\n \"Backspace\",\n \"alt+Backspace\",\n \"ctrl+Backspace\",\n \"shift+Backspace\",\n \"mac+Backspace\",\n \"mac+alt+Backspace\",\n \"mac+ctrl+Backspace\",\n \"Delete\",\n \"ctrl+Delete\",\n \"shift+Delete\",\n \"mac+Delete\",\n ],\n proto.delete,\n { checker: textInputChecker },\n ],\n [\n [\"Enter\", \"mac+Enter\"],\n proto.addNewEditorFromKeyboard,\n {\n // Those shortcuts can be used in the toolbar for some other actions\n // like zooming, hence we need to check if the container has the\n // focus.\n checker: (self, { target: el }) =>\n !(el instanceof HTMLButtonElement) &&\n self.#container.contains(el) &&\n !self.isEnterHandled,\n },\n ],\n [\n [\" \", \"mac+ \"],\n proto.addNewEditorFromKeyboard,\n {\n // Those shortcuts can be used in the toolbar for some other actions\n // like zooming, hence we need to check if the container has the\n // focus.\n checker: (self, { target: el }) =>\n !(el instanceof HTMLButtonElement) &&\n self.#container.contains(document.activeElement),\n },\n ],\n [[\"Escape\", \"mac+Escape\"], proto.unselectAll],\n [\n [\"ArrowLeft\", \"mac+ArrowLeft\"],\n proto.translateSelectedEditors,\n { args: [-small, 0], checker: arrowChecker },\n ],\n [\n [\"ctrl+ArrowLeft\", \"mac+shift+ArrowLeft\"],\n proto.translateSelectedEditors,\n { args: [-big, 0], checker: arrowChecker },\n ],\n [\n [\"ArrowRight\", \"mac+ArrowRight\"],\n proto.translateSelectedEditors,\n { args: [small, 0], checker: arrowChecker },\n ],\n [\n [\"ctrl+ArrowRight\", \"mac+shift+ArrowRight\"],\n proto.translateSelectedEditors,\n { args: [big, 0], checker: arrowChecker },\n ],\n [\n [\"ArrowUp\", \"mac+ArrowUp\"],\n proto.translateSelectedEditors,\n { args: [0, -small], checker: arrowChecker },\n ],\n [\n [\"ctrl+ArrowUp\", \"mac+shift+ArrowUp\"],\n proto.translateSelectedEditors,\n { args: [0, -big], checker: arrowChecker },\n ],\n [\n [\"ArrowDown\", \"mac+ArrowDown\"],\n proto.translateSelectedEditors,\n { args: [0, small], checker: arrowChecker },\n ],\n [\n [\"ctrl+ArrowDown\", \"mac+shift+ArrowDown\"],\n proto.translateSelectedEditors,\n { args: [0, big], checker: arrowChecker },\n ],\n ])\n );\n }\n\n constructor(\n container,\n viewer,\n altTextManager,\n eventBus,\n pdfDocument,\n pageColors,\n highlightColors,\n enableHighlightFloatingButton,\n mlManager\n ) {\n this.#container = container;\n this.#viewer = viewer;\n this.#altTextManager = altTextManager;\n this._eventBus = eventBus;\n this._eventBus._on(\"editingaction\", this.#boundOnEditingAction);\n this._eventBus._on(\"pagechanging\", this.#boundOnPageChanging);\n this._eventBus._on(\"scalechanging\", this.#boundOnScaleChanging);\n this._eventBus._on(\"rotationchanging\", this.#boundOnRotationChanging);\n this.#addSelectionListener();\n this.#addKeyboardManager();\n this.#annotationStorage = pdfDocument.annotationStorage;\n this.#filterFactory = pdfDocument.filterFactory;\n this.#pageColors = pageColors;\n this.#highlightColors = highlightColors || null;\n this.#enableHighlightFloatingButton = enableHighlightFloatingButton;\n this.#mlManager = mlManager || null;\n this.viewParameters = {\n realScale: PixelsPerInch.PDF_TO_CSS_UNITS,\n rotation: 0,\n };\n this.isShiftKeyDown = false;\n\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"TESTING\")) {\n Object.defineProperty(this, \"reset\", {\n value: () => {\n this.selectAll();\n this.delete();\n this.#idManager.reset();\n },\n });\n }\n }\n\n destroy() {\n this.#removeKeyboardManager();\n this.#removeFocusManager();\n this._eventBus._off(\"editingaction\", this.#boundOnEditingAction);\n this._eventBus._off(\"pagechanging\", this.#boundOnPageChanging);\n this._eventBus._off(\"scalechanging\", this.#boundOnScaleChanging);\n this._eventBus._off(\"rotationchanging\", this.#boundOnRotationChanging);\n for (const layer of this.#allLayers.values()) {\n layer.destroy();\n }\n this.#allLayers.clear();\n this.#allEditors.clear();\n this.#editorsToRescale.clear();\n this.#activeEditor = null;\n this.#selectedEditors.clear();\n this.#commandManager.destroy();\n this.#altTextManager?.destroy();\n this.#highlightToolbar?.hide();\n this.#highlightToolbar = null;\n if (this.#focusMainContainerTimeoutId) {\n clearTimeout(this.#focusMainContainerTimeoutId);\n this.#focusMainContainerTimeoutId = null;\n }\n if (this.#translationTimeoutId) {\n clearTimeout(this.#translationTimeoutId);\n this.#translationTimeoutId = null;\n }\n this.#removeSelectionListener();\n }\n\n async mlGuess(data) {\n return this.#mlManager?.guess(data) || null;\n }\n\n get hasMLManager() {\n return !!this.#mlManager;\n }\n\n get hcmFilter() {\n return shadow(\n this,\n \"hcmFilter\",\n this.#pageColors\n ? this.#filterFactory.addHCMFilter(\n this.#pageColors.foreground,\n this.#pageColors.background\n )\n : \"none\"\n );\n }\n\n get direction() {\n return shadow(\n this,\n \"direction\",\n getComputedStyle(this.#container).direction\n );\n }\n\n get highlightColors() {\n return shadow(\n this,\n \"highlightColors\",\n this.#highlightColors\n ? new Map(\n this.#highlightColors\n .split(\",\")\n .map(pair => pair.split(\"=\").map(x => x.trim()))\n )\n : null\n );\n }\n\n get highlightColorNames() {\n return shadow(\n this,\n \"highlightColorNames\",\n this.highlightColors\n ? new Map(Array.from(this.highlightColors, e => e.reverse()))\n : null\n );\n }\n\n setMainHighlightColorPicker(colorPicker) {\n this.#mainHighlightColorPicker = colorPicker;\n }\n\n editAltText(editor) {\n this.#altTextManager?.editAltText(this, editor);\n }\n\n onPageChanging({ pageNumber }) {\n this.#currentPageIndex = pageNumber - 1;\n }\n\n focusMainContainer() {\n this.#container.focus();\n }\n\n findParent(x, y) {\n for (const layer of this.#allLayers.values()) {\n const {\n x: layerX,\n y: layerY,\n width,\n height,\n } = layer.div.getBoundingClientRect();\n if (\n x >= layerX &&\n x <= layerX + width &&\n y >= layerY &&\n y <= layerY + height\n ) {\n return layer;\n }\n }\n return null;\n }\n\n disableUserSelect(value = false) {\n this.#viewer.classList.toggle(\"noUserSelect\", value);\n }\n\n addShouldRescale(editor) {\n this.#editorsToRescale.add(editor);\n }\n\n removeShouldRescale(editor) {\n this.#editorsToRescale.delete(editor);\n }\n\n onScaleChanging({ scale }) {\n this.commitOrRemove();\n this.viewParameters.realScale = scale * PixelsPerInch.PDF_TO_CSS_UNITS;\n for (const editor of this.#editorsToRescale) {\n editor.onScaleChanging();\n }\n }\n\n onRotationChanging({ pagesRotation }) {\n this.commitOrRemove();\n this.viewParameters.rotation = pagesRotation;\n }\n\n #getAnchorElementForSelection({ anchorNode }) {\n return anchorNode.nodeType === Node.TEXT_NODE\n ? anchorNode.parentElement\n : anchorNode;\n }\n\n highlightSelection(methodOfCreation = \"\") {\n const selection = document.getSelection();\n if (!selection || selection.isCollapsed) {\n return;\n }\n const { anchorNode, anchorOffset, focusNode, focusOffset } = selection;\n const text = selection.toString();\n const anchorElement = this.#getAnchorElementForSelection(selection);\n const textLayer = anchorElement.closest(\".textLayer\");\n const boxes = this.getSelectionBoxes(textLayer);\n if (!boxes) {\n return;\n }\n selection.empty();\n if (this.#mode === AnnotationEditorType.NONE) {\n this._eventBus.dispatch(\"showannotationeditorui\", {\n source: this,\n mode: AnnotationEditorType.HIGHLIGHT,\n });\n this.showAllEditors(\"highlight\", true, /* updateButton = */ true);\n }\n for (const layer of this.#allLayers.values()) {\n if (layer.hasTextLayer(textLayer)) {\n layer.createAndAddNewEditor({ x: 0, y: 0 }, false, {\n methodOfCreation,\n boxes,\n anchorNode,\n anchorOffset,\n focusNode,\n focusOffset,\n text,\n });\n break;\n }\n }\n }\n\n #displayHighlightToolbar() {\n const selection = document.getSelection();\n if (!selection || selection.isCollapsed) {\n return;\n }\n const anchorElement = this.#getAnchorElementForSelection(selection);\n const textLayer = anchorElement.closest(\".textLayer\");\n const boxes = this.getSelectionBoxes(textLayer);\n if (!boxes) {\n return;\n }\n this.#highlightToolbar ||= new HighlightToolbar(this);\n this.#highlightToolbar.show(textLayer, boxes, this.direction === \"ltr\");\n }\n\n /**\n * Add an editor in the annotation storage.\n * @param {AnnotationEditor} editor\n */\n addToAnnotationStorage(editor) {\n if (\n !editor.isEmpty() &&\n this.#annotationStorage &&\n !this.#annotationStorage.has(editor.id)\n ) {\n this.#annotationStorage.setValue(editor.id, editor);\n }\n }\n\n #selectionChange() {\n const selection = document.getSelection();\n if (!selection || selection.isCollapsed) {\n if (this.#selectedTextNode) {\n this.#highlightToolbar?.hide();\n this.#selectedTextNode = null;\n this.#dispatchUpdateStates({\n hasSelectedText: false,\n });\n }\n return;\n }\n const { anchorNode } = selection;\n if (anchorNode === this.#selectedTextNode) {\n return;\n }\n\n const anchorElement = this.#getAnchorElementForSelection(selection);\n const textLayer = anchorElement.closest(\".textLayer\");\n if (!textLayer) {\n if (this.#selectedTextNode) {\n this.#highlightToolbar?.hide();\n this.#selectedTextNode = null;\n this.#dispatchUpdateStates({\n hasSelectedText: false,\n });\n }\n return;\n }\n this.#highlightToolbar?.hide();\n this.#selectedTextNode = anchorNode;\n this.#dispatchUpdateStates({\n hasSelectedText: true,\n });\n\n if (\n this.#mode !== AnnotationEditorType.HIGHLIGHT &&\n this.#mode !== AnnotationEditorType.NONE\n ) {\n return;\n }\n\n if (this.#mode === AnnotationEditorType.HIGHLIGHT) {\n this.showAllEditors(\"highlight\", true, /* updateButton = */ true);\n }\n\n this.#highlightWhenShiftUp = this.isShiftKeyDown;\n if (!this.isShiftKeyDown) {\n const pointerup = e => {\n if (e.type === \"pointerup\" && e.button !== 0) {\n // Do nothing on right click.\n return;\n }\n window.removeEventListener(\"pointerup\", pointerup);\n window.removeEventListener(\"blur\", pointerup);\n if (e.type === \"pointerup\") {\n this.#onSelectEnd(\"main_toolbar\");\n }\n };\n window.addEventListener(\"pointerup\", pointerup);\n window.addEventListener(\"blur\", pointerup);\n }\n }\n\n #onSelectEnd(methodOfCreation = \"\") {\n if (this.#mode === AnnotationEditorType.HIGHLIGHT) {\n this.highlightSelection(methodOfCreation);\n } else if (this.#enableHighlightFloatingButton) {\n this.#displayHighlightToolbar();\n }\n }\n\n #addSelectionListener() {\n document.addEventListener(\"selectionchange\", this.#boundSelectionChange);\n }\n\n #removeSelectionListener() {\n document.removeEventListener(\"selectionchange\", this.#boundSelectionChange);\n }\n\n #addFocusManager() {\n window.addEventListener(\"focus\", this.#boundFocus);\n window.addEventListener(\"blur\", this.#boundBlur);\n }\n\n #removeFocusManager() {\n window.removeEventListener(\"focus\", this.#boundFocus);\n window.removeEventListener(\"blur\", this.#boundBlur);\n }\n\n blur() {\n this.isShiftKeyDown = false;\n if (this.#highlightWhenShiftUp) {\n this.#highlightWhenShiftUp = false;\n this.#onSelectEnd(\"main_toolbar\");\n }\n if (!this.hasSelection) {\n return;\n }\n // When several editors are selected and the window loses focus, we want to\n // keep the last active element in order to be able to focus it again when\n // the window gets the focus back but we don't want to trigger any focus\n // callbacks else only one editor will be selected.\n const { activeElement } = document;\n for (const editor of this.#selectedEditors) {\n if (editor.div.contains(activeElement)) {\n this.#lastActiveElement = [editor, activeElement];\n editor._focusEventsAllowed = false;\n break;\n }\n }\n }\n\n focus() {\n if (!this.#lastActiveElement) {\n return;\n }\n const [lastEditor, lastActiveElement] = this.#lastActiveElement;\n this.#lastActiveElement = null;\n lastActiveElement.addEventListener(\n \"focusin\",\n () => {\n lastEditor._focusEventsAllowed = true;\n },\n { once: true }\n );\n lastActiveElement.focus();\n }\n\n #addKeyboardManager() {\n // The keyboard events are caught at the container level in order to be able\n // to execute some callbacks even if the current page doesn't have focus.\n window.addEventListener(\"keydown\", this.#boundKeydown);\n window.addEventListener(\"keyup\", this.#boundKeyup);\n }\n\n #removeKeyboardManager() {\n window.removeEventListener(\"keydown\", this.#boundKeydown);\n window.removeEventListener(\"keyup\", this.#boundKeyup);\n }\n\n #addCopyPasteListeners() {\n document.addEventListener(\"copy\", this.#boundCopy);\n document.addEventListener(\"cut\", this.#boundCut);\n document.addEventListener(\"paste\", this.#boundPaste);\n }\n\n #removeCopyPasteListeners() {\n document.removeEventListener(\"copy\", this.#boundCopy);\n document.removeEventListener(\"cut\", this.#boundCut);\n document.removeEventListener(\"paste\", this.#boundPaste);\n }\n\n addEditListeners() {\n this.#addKeyboardManager();\n this.#addCopyPasteListeners();\n }\n\n removeEditListeners() {\n this.#removeKeyboardManager();\n this.#removeCopyPasteListeners();\n }\n\n /**\n * Copy callback.\n * @param {ClipboardEvent} event\n */\n copy(event) {\n event.preventDefault();\n\n // An editor is being edited so just commit it.\n this.#activeEditor?.commitOrRemove();\n\n if (!this.hasSelection) {\n return;\n }\n\n const editors = [];\n for (const editor of this.#selectedEditors) {\n const serialized = editor.serialize(/* isForCopying = */ true);\n if (serialized) {\n editors.push(serialized);\n }\n }\n if (editors.length === 0) {\n return;\n }\n\n event.clipboardData.setData(\"application/pdfjs\", JSON.stringify(editors));\n }\n\n /**\n * Cut callback.\n * @param {ClipboardEvent} event\n */\n cut(event) {\n this.copy(event);\n this.delete();\n }\n\n /**\n * Paste callback.\n * @param {ClipboardEvent} event\n */\n paste(event) {\n event.preventDefault();\n const { clipboardData } = event;\n for (const item of clipboardData.items) {\n for (const editorType of this.#editorTypes) {\n if (editorType.isHandlingMimeForPasting(item.type)) {\n editorType.paste(item, this.currentLayer);\n return;\n }\n }\n }\n\n let data = clipboardData.getData(\"application/pdfjs\");\n if (!data) {\n return;\n }\n\n try {\n data = JSON.parse(data);\n } catch (ex) {\n warn(`paste: \"${ex.message}\".`);\n return;\n }\n\n if (!Array.isArray(data)) {\n return;\n }\n\n this.unselectAll();\n const layer = this.currentLayer;\n\n try {\n const newEditors = [];\n for (const editor of data) {\n const deserializedEditor = layer.deserialize(editor);\n if (!deserializedEditor) {\n return;\n }\n newEditors.push(deserializedEditor);\n }\n\n const cmd = () => {\n for (const editor of newEditors) {\n this.#addEditorToLayer(editor);\n }\n this.#selectEditors(newEditors);\n };\n const undo = () => {\n for (const editor of newEditors) {\n editor.remove();\n }\n };\n this.addCommands({ cmd, undo, mustExec: true });\n } catch (ex) {\n warn(`paste: \"${ex.message}\".`);\n }\n }\n\n /**\n * Keydown callback.\n * @param {KeyboardEvent} event\n */\n keydown(event) {\n if (!this.isShiftKeyDown && event.key === \"Shift\") {\n this.isShiftKeyDown = true;\n }\n if (\n this.#mode !== AnnotationEditorType.NONE &&\n !this.isEditorHandlingKeyboard\n ) {\n AnnotationEditorUIManager._keyboardManager.exec(this, event);\n }\n }\n\n /**\n * Keyup callback.\n * @param {KeyboardEvent} event\n */\n keyup(event) {\n if (this.isShiftKeyDown && event.key === \"Shift\") {\n this.isShiftKeyDown = false;\n if (this.#highlightWhenShiftUp) {\n this.#highlightWhenShiftUp = false;\n this.#onSelectEnd(\"main_toolbar\");\n }\n }\n }\n\n /**\n * Execute an action for a given name.\n * For example, the user can click on the \"Undo\" entry in the context menu\n * and it'll trigger the undo action.\n */\n onEditingAction({ name }) {\n switch (name) {\n case \"undo\":\n case \"redo\":\n case \"delete\":\n case \"selectAll\":\n this[name]();\n break;\n case \"highlightSelection\":\n this.highlightSelection(\"context_menu\");\n break;\n }\n }\n\n /**\n * Update the different possible states of this manager, e.g. is there\n * something to undo, redo, ...\n * @param {Object} details\n */\n #dispatchUpdateStates(details) {\n const hasChanged = Object.entries(details).some(\n ([key, value]) => this.#previousStates[key] !== value\n );\n\n if (hasChanged) {\n this._eventBus.dispatch(\"annotationeditorstateschanged\", {\n source: this,\n details: Object.assign(this.#previousStates, details),\n });\n // We could listen on our own event but it sounds like a bit weird and\n // it's a way to simpler to handle that stuff here instead of having to\n // add something in every place where an editor can be unselected.\n if (\n this.#mode === AnnotationEditorType.HIGHLIGHT &&\n details.hasSelectedEditor === false\n ) {\n this.#dispatchUpdateUI([\n [AnnotationEditorParamsType.HIGHLIGHT_FREE, true],\n ]);\n }\n }\n }\n\n #dispatchUpdateUI(details) {\n this._eventBus.dispatch(\"annotationeditorparamschanged\", {\n source: this,\n details,\n });\n }\n\n /**\n * Set the editing state.\n * It can be useful to temporarily disable it when the user is editing a\n * FreeText annotation.\n * @param {boolean} isEditing\n */\n setEditingState(isEditing) {\n if (isEditing) {\n this.#addFocusManager();\n this.#addCopyPasteListeners();\n this.#dispatchUpdateStates({\n isEditing: this.#mode !== AnnotationEditorType.NONE,\n isEmpty: this.#isEmpty(),\n hasSomethingToUndo: this.#commandManager.hasSomethingToUndo(),\n hasSomethingToRedo: this.#commandManager.hasSomethingToRedo(),\n hasSelectedEditor: false,\n });\n } else {\n this.#removeFocusManager();\n this.#removeCopyPasteListeners();\n this.#dispatchUpdateStates({\n isEditing: false,\n });\n this.disableUserSelect(false);\n }\n }\n\n registerEditorTypes(types) {\n if (this.#editorTypes) {\n return;\n }\n this.#editorTypes = types;\n for (const editorType of this.#editorTypes) {\n this.#dispatchUpdateUI(editorType.defaultPropertiesToUpdate);\n }\n }\n\n /**\n * Get an id.\n * @returns {string}\n */\n getId() {\n return this.#idManager.id;\n }\n\n get currentLayer() {\n return this.#allLayers.get(this.#currentPageIndex);\n }\n\n getLayer(pageIndex) {\n return this.#allLayers.get(pageIndex);\n }\n\n get currentPageIndex() {\n return this.#currentPageIndex;\n }\n\n /**\n * Add a new layer for a page which will contains the editors.\n * @param {AnnotationEditorLayer} layer\n */\n addLayer(layer) {\n this.#allLayers.set(layer.pageIndex, layer);\n if (this.#isEnabled) {\n layer.enable();\n } else {\n layer.disable();\n }\n }\n\n /**\n * Remove a layer.\n * @param {AnnotationEditorLayer} layer\n */\n removeLayer(layer) {\n this.#allLayers.delete(layer.pageIndex);\n }\n\n /**\n * Change the editor mode (None, FreeText, Ink, ...)\n * @param {number} mode\n * @param {string|null} editId\n * @param {boolean} [isFromKeyboard] - true if the mode change is due to a\n * keyboard action.\n */\n updateMode(mode, editId = null, isFromKeyboard = false) {\n if (this.#mode === mode) {\n return;\n }\n this.#mode = mode;\n if (mode === AnnotationEditorType.NONE) {\n this.setEditingState(false);\n this.#disableAll();\n return;\n }\n this.setEditingState(true);\n this.#enableAll();\n this.unselectAll();\n for (const layer of this.#allLayers.values()) {\n layer.updateMode(mode);\n }\n if (!editId && isFromKeyboard) {\n this.addNewEditorFromKeyboard();\n return;\n }\n\n if (!editId) {\n return;\n }\n for (const editor of this.#allEditors.values()) {\n if (editor.annotationElementId === editId) {\n this.setSelected(editor);\n editor.enterInEditMode();\n break;\n }\n }\n }\n\n addNewEditorFromKeyboard() {\n if (this.currentLayer.canCreateNewEmptyEditor()) {\n this.currentLayer.addNewEditor();\n }\n }\n\n /**\n * Update the toolbar if it's required to reflect the tool currently used.\n * @param {number} mode\n * @returns {undefined}\n */\n updateToolbar(mode) {\n if (mode === this.#mode) {\n return;\n }\n this._eventBus.dispatch(\"switchannotationeditormode\", {\n source: this,\n mode,\n });\n }\n\n /**\n * Update a parameter in the current editor or globally.\n * @param {number} type\n * @param {*} value\n */\n updateParams(type, value) {\n if (!this.#editorTypes) {\n return;\n }\n\n switch (type) {\n case AnnotationEditorParamsType.CREATE:\n this.currentLayer.addNewEditor();\n return;\n case AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR:\n this.#mainHighlightColorPicker?.updateColor(value);\n break;\n case AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL:\n this._eventBus.dispatch(\"reporttelemetry\", {\n source: this,\n details: {\n type: \"editing\",\n data: {\n type: \"highlight\",\n action: \"toggle_visibility\",\n },\n },\n });\n (this.#showAllStates ||= new Map()).set(type, value);\n this.showAllEditors(\"highlight\", value);\n break;\n }\n\n for (const editor of this.#selectedEditors) {\n editor.updateParams(type, value);\n }\n\n for (const editorType of this.#editorTypes) {\n editorType.updateDefaultParams(type, value);\n }\n }\n\n showAllEditors(type, visible, updateButton = false) {\n for (const editor of this.#allEditors.values()) {\n if (editor.editorType === type) {\n editor.show(visible);\n }\n }\n const state =\n this.#showAllStates?.get(AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL) ??\n true;\n if (state !== visible) {\n this.#dispatchUpdateUI([\n [AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL, visible],\n ]);\n }\n }\n\n enableWaiting(mustWait = false) {\n if (this.#isWaiting === mustWait) {\n return;\n }\n this.#isWaiting = mustWait;\n for (const layer of this.#allLayers.values()) {\n if (mustWait) {\n layer.disableClick();\n } else {\n layer.enableClick();\n }\n layer.div.classList.toggle(\"waiting\", mustWait);\n }\n }\n\n /**\n * Enable all the layers.\n */\n #enableAll() {\n if (!this.#isEnabled) {\n this.#isEnabled = true;\n for (const layer of this.#allLayers.values()) {\n layer.enable();\n }\n for (const editor of this.#allEditors.values()) {\n editor.enable();\n }\n }\n }\n\n /**\n * Disable all the layers.\n */\n #disableAll() {\n this.unselectAll();\n if (this.#isEnabled) {\n this.#isEnabled = false;\n for (const layer of this.#allLayers.values()) {\n layer.disable();\n }\n for (const editor of this.#allEditors.values()) {\n editor.disable();\n }\n }\n }\n\n /**\n * Get all the editors belonging to a given page.\n * @param {number} pageIndex\n * @returns {Array}\n */\n getEditors(pageIndex) {\n const editors = [];\n for (const editor of this.#allEditors.values()) {\n if (editor.pageIndex === pageIndex) {\n editors.push(editor);\n }\n }\n return editors;\n }\n\n /**\n * Get an editor with the given id.\n * @param {string} id\n * @returns {AnnotationEditor}\n */\n getEditor(id) {\n return this.#allEditors.get(id);\n }\n\n /**\n * Add a new editor.\n * @param {AnnotationEditor} editor\n */\n addEditor(editor) {\n this.#allEditors.set(editor.id, editor);\n }\n\n /**\n * Remove an editor.\n * @param {AnnotationEditor} editor\n */\n removeEditor(editor) {\n if (editor.div.contains(document.activeElement)) {\n if (this.#focusMainContainerTimeoutId) {\n clearTimeout(this.#focusMainContainerTimeoutId);\n }\n this.#focusMainContainerTimeoutId = setTimeout(() => {\n // When the div is removed from DOM the focus can move on the\n // document.body, so we need to move it back to the main container.\n this.focusMainContainer();\n this.#focusMainContainerTimeoutId = null;\n }, 0);\n }\n this.#allEditors.delete(editor.id);\n this.unselect(editor);\n if (\n !editor.annotationElementId ||\n !this.#deletedAnnotationsElementIds.has(editor.annotationElementId)\n ) {\n this.#annotationStorage?.remove(editor.id);\n }\n }\n\n /**\n * The annotation element with the given id has been deleted.\n * @param {AnnotationEditor} editor\n */\n addDeletedAnnotationElement(editor) {\n this.#deletedAnnotationsElementIds.add(editor.annotationElementId);\n this.addChangedExistingAnnotation(editor);\n editor.deleted = true;\n }\n\n /**\n * Check if the annotation element with the given id has been deleted.\n * @param {string} annotationElementId\n * @returns {boolean}\n */\n isDeletedAnnotationElement(annotationElementId) {\n return this.#deletedAnnotationsElementIds.has(annotationElementId);\n }\n\n /**\n * The annotation element with the given id have been restored.\n * @param {AnnotationEditor} editor\n */\n removeDeletedAnnotationElement(editor) {\n this.#deletedAnnotationsElementIds.delete(editor.annotationElementId);\n this.removeChangedExistingAnnotation(editor);\n editor.deleted = false;\n }\n\n /**\n * Add an editor to the layer it belongs to or add it to the global map.\n * @param {AnnotationEditor} editor\n */\n #addEditorToLayer(editor) {\n const layer = this.#allLayers.get(editor.pageIndex);\n if (layer) {\n layer.addOrRebuild(editor);\n } else {\n this.addEditor(editor);\n this.addToAnnotationStorage(editor);\n }\n }\n\n /**\n * Set the given editor as the active one.\n * @param {AnnotationEditor} editor\n */\n setActiveEditor(editor) {\n if (this.#activeEditor === editor) {\n return;\n }\n\n this.#activeEditor = editor;\n if (editor) {\n this.#dispatchUpdateUI(editor.propertiesToUpdate);\n }\n }\n\n get #lastSelectedEditor() {\n let ed = null;\n for (ed of this.#selectedEditors) {\n // Iterate to get the last element.\n }\n return ed;\n }\n\n /**\n * Update the UI of the active editor.\n * @param {AnnotationEditor} editor\n */\n updateUI(editor) {\n if (this.#lastSelectedEditor === editor) {\n this.#dispatchUpdateUI(editor.propertiesToUpdate);\n }\n }\n\n /**\n * Add or remove an editor the current selection.\n * @param {AnnotationEditor} editor\n */\n toggleSelected(editor) {\n if (this.#selectedEditors.has(editor)) {\n this.#selectedEditors.delete(editor);\n editor.unselect();\n this.#dispatchUpdateStates({\n hasSelectedEditor: this.hasSelection,\n });\n return;\n }\n this.#selectedEditors.add(editor);\n editor.select();\n this.#dispatchUpdateUI(editor.propertiesToUpdate);\n this.#dispatchUpdateStates({\n hasSelectedEditor: true,\n });\n }\n\n /**\n * Set the last selected editor.\n * @param {AnnotationEditor} editor\n */\n setSelected(editor) {\n for (const ed of this.#selectedEditors) {\n if (ed !== editor) {\n ed.unselect();\n }\n }\n this.#selectedEditors.clear();\n\n this.#selectedEditors.add(editor);\n editor.select();\n this.#dispatchUpdateUI(editor.propertiesToUpdate);\n this.#dispatchUpdateStates({\n hasSelectedEditor: true,\n });\n }\n\n /**\n * Check if the editor is selected.\n * @param {AnnotationEditor} editor\n */\n isSelected(editor) {\n return this.#selectedEditors.has(editor);\n }\n\n get firstSelectedEditor() {\n return this.#selectedEditors.values().next().value;\n }\n\n /**\n * Unselect an editor.\n * @param {AnnotationEditor} editor\n */\n unselect(editor) {\n editor.unselect();\n this.#selectedEditors.delete(editor);\n this.#dispatchUpdateStates({\n hasSelectedEditor: this.hasSelection,\n });\n }\n\n get hasSelection() {\n return this.#selectedEditors.size !== 0;\n }\n\n get isEnterHandled() {\n return (\n this.#selectedEditors.size === 1 &&\n this.firstSelectedEditor.isEnterHandled\n );\n }\n\n /**\n * Undo the last command.\n */\n undo() {\n this.#commandManager.undo();\n this.#dispatchUpdateStates({\n hasSomethingToUndo: this.#commandManager.hasSomethingToUndo(),\n hasSomethingToRedo: true,\n isEmpty: this.#isEmpty(),\n });\n }\n\n /**\n * Redo the last undoed command.\n */\n redo() {\n this.#commandManager.redo();\n this.#dispatchUpdateStates({\n hasSomethingToUndo: true,\n hasSomethingToRedo: this.#commandManager.hasSomethingToRedo(),\n isEmpty: this.#isEmpty(),\n });\n }\n\n /**\n * Add a command to execute (cmd) and another one to undo it.\n * @param {Object} params\n */\n addCommands(params) {\n this.#commandManager.add(params);\n this.#dispatchUpdateStates({\n hasSomethingToUndo: true,\n hasSomethingToRedo: false,\n isEmpty: this.#isEmpty(),\n });\n }\n\n #isEmpty() {\n if (this.#allEditors.size === 0) {\n return true;\n }\n\n if (this.#allEditors.size === 1) {\n for (const editor of this.#allEditors.values()) {\n return editor.isEmpty();\n }\n }\n\n return false;\n }\n\n /**\n * Delete the current editor or all.\n */\n delete() {\n this.commitOrRemove();\n if (!this.hasSelection) {\n return;\n }\n\n const editors = [...this.#selectedEditors];\n const cmd = () => {\n for (const editor of editors) {\n editor.remove();\n }\n };\n const undo = () => {\n for (const editor of editors) {\n this.#addEditorToLayer(editor);\n }\n };\n\n this.addCommands({ cmd, undo, mustExec: true });\n }\n\n commitOrRemove() {\n // An editor is being edited so just commit it.\n this.#activeEditor?.commitOrRemove();\n }\n\n hasSomethingToControl() {\n return this.#activeEditor || this.hasSelection;\n }\n\n /**\n * Select the editors.\n * @param {Array} editors\n */\n #selectEditors(editors) {\n for (const editor of this.#selectedEditors) {\n editor.unselect();\n }\n this.#selectedEditors.clear();\n for (const editor of editors) {\n if (editor.isEmpty()) {\n continue;\n }\n this.#selectedEditors.add(editor);\n editor.select();\n }\n this.#dispatchUpdateStates({ hasSelectedEditor: this.hasSelection });\n }\n\n /**\n * Select all the editors.\n */\n selectAll() {\n for (const editor of this.#selectedEditors) {\n editor.commit();\n }\n this.#selectEditors(this.#allEditors.values());\n }\n\n /**\n * Unselect all the selected editors.\n */\n unselectAll() {\n if (this.#activeEditor) {\n // An editor is being edited so just commit it.\n this.#activeEditor.commitOrRemove();\n if (this.#mode !== AnnotationEditorType.NONE) {\n // If the mode is NONE, we want to really unselect the editor, hence we\n // mustn't return here.\n return;\n }\n }\n\n if (!this.hasSelection) {\n return;\n }\n for (const editor of this.#selectedEditors) {\n editor.unselect();\n }\n this.#selectedEditors.clear();\n this.#dispatchUpdateStates({\n hasSelectedEditor: false,\n });\n }\n\n translateSelectedEditors(x, y, noCommit = false) {\n if (!noCommit) {\n this.commitOrRemove();\n }\n if (!this.hasSelection) {\n return;\n }\n\n this.#translation[0] += x;\n this.#translation[1] += y;\n const [totalX, totalY] = this.#translation;\n const editors = [...this.#selectedEditors];\n\n // We don't want to have an undo/redo for each translation so we wait a bit\n // before adding the command to the command manager.\n const TIME_TO_WAIT = 1000;\n\n if (this.#translationTimeoutId) {\n clearTimeout(this.#translationTimeoutId);\n }\n\n this.#translationTimeoutId = setTimeout(() => {\n this.#translationTimeoutId = null;\n this.#translation[0] = this.#translation[1] = 0;\n\n this.addCommands({\n cmd: () => {\n for (const editor of editors) {\n if (this.#allEditors.has(editor.id)) {\n editor.translateInPage(totalX, totalY);\n }\n }\n },\n undo: () => {\n for (const editor of editors) {\n if (this.#allEditors.has(editor.id)) {\n editor.translateInPage(-totalX, -totalY);\n }\n }\n },\n mustExec: false,\n });\n }, TIME_TO_WAIT);\n\n for (const editor of editors) {\n editor.translateInPage(x, y);\n }\n }\n\n /**\n * Set up the drag session for moving the selected editors.\n */\n setUpDragSession() {\n // Note: don't use any references to the editor's parent which can be null\n // if the editor belongs to a destroyed page.\n if (!this.hasSelection) {\n return;\n }\n // Avoid to have spurious text selection in the text layer when dragging.\n this.disableUserSelect(true);\n this.#draggingEditors = new Map();\n for (const editor of this.#selectedEditors) {\n this.#draggingEditors.set(editor, {\n savedX: editor.x,\n savedY: editor.y,\n savedPageIndex: editor.pageIndex,\n newX: 0,\n newY: 0,\n newPageIndex: -1,\n });\n }\n }\n\n /**\n * Ends the drag session.\n * @returns {boolean} true if at least one editor has been moved.\n */\n endDragSession() {\n if (!this.#draggingEditors) {\n return false;\n }\n this.disableUserSelect(false);\n const map = this.#draggingEditors;\n this.#draggingEditors = null;\n let mustBeAddedInUndoStack = false;\n\n for (const [{ x, y, pageIndex }, value] of map) {\n value.newX = x;\n value.newY = y;\n value.newPageIndex = pageIndex;\n mustBeAddedInUndoStack ||=\n x !== value.savedX ||\n y !== value.savedY ||\n pageIndex !== value.savedPageIndex;\n }\n\n if (!mustBeAddedInUndoStack) {\n return false;\n }\n\n const move = (editor, x, y, pageIndex) => {\n if (this.#allEditors.has(editor.id)) {\n // The editor can be undone/redone on a page which is not visible (and\n // which potentially has no annotation editor layer), hence we need to\n // use the pageIndex instead of the parent.\n const parent = this.#allLayers.get(pageIndex);\n if (parent) {\n editor._setParentAndPosition(parent, x, y);\n } else {\n editor.pageIndex = pageIndex;\n editor.x = x;\n editor.y = y;\n }\n }\n };\n\n this.addCommands({\n cmd: () => {\n for (const [editor, { newX, newY, newPageIndex }] of map) {\n move(editor, newX, newY, newPageIndex);\n }\n },\n undo: () => {\n for (const [editor, { savedX, savedY, savedPageIndex }] of map) {\n move(editor, savedX, savedY, savedPageIndex);\n }\n },\n mustExec: true,\n });\n\n return true;\n }\n\n /**\n * Drag the set of selected editors.\n * @param {number} tx\n * @param {number} ty\n */\n dragSelectedEditors(tx, ty) {\n if (!this.#draggingEditors) {\n return;\n }\n for (const editor of this.#draggingEditors.keys()) {\n editor.drag(tx, ty);\n }\n }\n\n /**\n * Rebuild the editor (usually on undo/redo actions) on a potentially\n * non-rendered page.\n * @param {AnnotationEditor} editor\n */\n rebuild(editor) {\n if (editor.parent === null) {\n const parent = this.getLayer(editor.pageIndex);\n if (parent) {\n parent.changeParent(editor);\n parent.addOrRebuild(editor);\n } else {\n this.addEditor(editor);\n this.addToAnnotationStorage(editor);\n editor.rebuild();\n }\n } else {\n editor.parent.addOrRebuild(editor);\n }\n }\n\n get isEditorHandlingKeyboard() {\n return (\n this.getActive()?.shouldGetKeyboardEvents() ||\n (this.#selectedEditors.size === 1 &&\n this.firstSelectedEditor.shouldGetKeyboardEvents())\n );\n }\n\n /**\n * Is the current editor the one passed as argument?\n * @param {AnnotationEditor} editor\n * @returns\n */\n isActive(editor) {\n return this.#activeEditor === editor;\n }\n\n /**\n * Get the current active editor.\n * @returns {AnnotationEditor|null}\n */\n getActive() {\n return this.#activeEditor;\n }\n\n /**\n * Get the current editor mode.\n * @returns {number}\n */\n getMode() {\n return this.#mode;\n }\n\n get imageManager() {\n return shadow(this, \"imageManager\", new ImageManager());\n }\n\n getSelectionBoxes(textLayer) {\n if (!textLayer) {\n return null;\n }\n const selection = document.getSelection();\n for (let i = 0, ii = selection.rangeCount; i < ii; i++) {\n if (\n !textLayer.contains(selection.getRangeAt(i).commonAncestorContainer)\n ) {\n return null;\n }\n }\n\n const {\n x: layerX,\n y: layerY,\n width: parentWidth,\n height: parentHeight,\n } = textLayer.getBoundingClientRect();\n\n // We must rotate the boxes because we want to have them in the non-rotated\n // page coordinates.\n let rotator;\n switch (textLayer.getAttribute(\"data-main-rotation\")) {\n case \"90\":\n rotator = (x, y, w, h) => ({\n x: (y - layerY) / parentHeight,\n y: 1 - (x + w - layerX) / parentWidth,\n width: h / parentHeight,\n height: w / parentWidth,\n });\n break;\n case \"180\":\n rotator = (x, y, w, h) => ({\n x: 1 - (x + w - layerX) / parentWidth,\n y: 1 - (y + h - layerY) / parentHeight,\n width: w / parentWidth,\n height: h / parentHeight,\n });\n break;\n case \"270\":\n rotator = (x, y, w, h) => ({\n x: 1 - (y + h - layerY) / parentHeight,\n y: (x - layerX) / parentWidth,\n width: h / parentHeight,\n height: w / parentWidth,\n });\n break;\n default:\n rotator = (x, y, w, h) => ({\n x: (x - layerX) / parentWidth,\n y: (y - layerY) / parentHeight,\n width: w / parentWidth,\n height: h / parentHeight,\n });\n break;\n }\n\n const boxes = [];\n for (let i = 0, ii = selection.rangeCount; i < ii; i++) {\n const range = selection.getRangeAt(i);\n if (range.collapsed) {\n continue;\n }\n for (const { x, y, width, height } of range.getClientRects()) {\n if (width === 0 || height === 0) {\n continue;\n }\n boxes.push(rotator(x, y, width, height));\n }\n }\n return boxes.length === 0 ? null : boxes;\n }\n\n addChangedExistingAnnotation({ annotationElementId, id }) {\n (this.#changedExistingAnnotations ||= new Map()).set(\n annotationElementId,\n id\n );\n }\n\n removeChangedExistingAnnotation({ annotationElementId }) {\n this.#changedExistingAnnotations?.delete(annotationElementId);\n }\n\n renderAnnotationElement(annotation) {\n const editorId = this.#changedExistingAnnotations?.get(annotation.data.id);\n if (!editorId) {\n return;\n }\n const editor = this.#annotationStorage.getRawValue(editorId);\n if (!editor) {\n return;\n }\n if (this.#mode === AnnotationEditorType.NONE && !editor.hasBeenModified) {\n return;\n }\n editor.renderAnnotationElement(annotation);\n }\n}\n\nexport {\n AnnotationEditorUIManager,\n bindEvents,\n ColorManager,\n CommandManager,\n KeyboardManager,\n opacityToHex,\n};\n","/* Copyright 2023 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { noContextMenu } from \"../display_utils.js\";\n\nclass AltText {\n #altText = \"\";\n\n #altTextDecorative = false;\n\n #altTextButton = null;\n\n #altTextTooltip = null;\n\n #altTextTooltipTimeout = null;\n\n #altTextWasFromKeyBoard = false;\n\n #editor = null;\n\n static _l10nPromise = null;\n\n constructor(editor) {\n this.#editor = editor;\n }\n\n static initialize(l10nPromise) {\n AltText._l10nPromise ||= l10nPromise;\n }\n\n async render() {\n const altText = (this.#altTextButton = document.createElement(\"button\"));\n altText.className = \"altText\";\n const msg = await AltText._l10nPromise.get(\n \"pdfjs-editor-alt-text-button-label\"\n );\n altText.textContent = msg;\n altText.setAttribute(\"aria-label\", msg);\n altText.tabIndex = \"0\";\n altText.addEventListener(\"contextmenu\", noContextMenu);\n altText.addEventListener(\"pointerdown\", event => event.stopPropagation());\n\n const onClick = event => {\n event.preventDefault();\n this.#editor._uiManager.editAltText(this.#editor);\n };\n altText.addEventListener(\"click\", onClick, { capture: true });\n altText.addEventListener(\"keydown\", event => {\n if (event.target === altText && event.key === \"Enter\") {\n this.#altTextWasFromKeyBoard = true;\n onClick(event);\n }\n });\n await this.#setState();\n\n return altText;\n }\n\n finish() {\n if (!this.#altTextButton) {\n return;\n }\n this.#altTextButton.focus({ focusVisible: this.#altTextWasFromKeyBoard });\n this.#altTextWasFromKeyBoard = false;\n }\n\n isEmpty() {\n return !this.#altText && !this.#altTextDecorative;\n }\n\n get data() {\n return {\n altText: this.#altText,\n decorative: this.#altTextDecorative,\n };\n }\n\n /**\n * Set the alt text data.\n */\n set data({ altText, decorative }) {\n if (this.#altText === altText && this.#altTextDecorative === decorative) {\n return;\n }\n this.#altText = altText;\n this.#altTextDecorative = decorative;\n this.#setState();\n }\n\n toggle(enabled = false) {\n if (!this.#altTextButton) {\n return;\n }\n if (!enabled && this.#altTextTooltipTimeout) {\n clearTimeout(this.#altTextTooltipTimeout);\n this.#altTextTooltipTimeout = null;\n }\n this.#altTextButton.disabled = !enabled;\n }\n\n destroy() {\n this.#altTextButton?.remove();\n this.#altTextButton = null;\n this.#altTextTooltip = null;\n }\n\n async #setState() {\n const button = this.#altTextButton;\n if (!button) {\n return;\n }\n if (!this.#altText && !this.#altTextDecorative) {\n button.classList.remove(\"done\");\n this.#altTextTooltip?.remove();\n return;\n }\n button.classList.add(\"done\");\n\n AltText._l10nPromise\n .get(\"pdfjs-editor-alt-text-edit-button-label\")\n .then(msg => {\n button.setAttribute(\"aria-label\", msg);\n });\n let tooltip = this.#altTextTooltip;\n if (!tooltip) {\n this.#altTextTooltip = tooltip = document.createElement(\"span\");\n tooltip.className = \"tooltip\";\n tooltip.setAttribute(\"role\", \"tooltip\");\n const id = (tooltip.id = `alt-text-tooltip-${this.#editor.id}`);\n button.setAttribute(\"aria-describedby\", id);\n\n const DELAY_TO_SHOW_TOOLTIP = 100;\n button.addEventListener(\"mouseenter\", () => {\n this.#altTextTooltipTimeout = setTimeout(() => {\n this.#altTextTooltipTimeout = null;\n this.#altTextTooltip.classList.add(\"show\");\n this.#editor._reportTelemetry({\n action: \"alt_text_tooltip\",\n });\n }, DELAY_TO_SHOW_TOOLTIP);\n });\n button.addEventListener(\"mouseleave\", () => {\n if (this.#altTextTooltipTimeout) {\n clearTimeout(this.#altTextTooltipTimeout);\n this.#altTextTooltipTimeout = null;\n }\n this.#altTextTooltip?.classList.remove(\"show\");\n });\n }\n tooltip.innerText = this.#altTextDecorative\n ? await AltText._l10nPromise.get(\n \"pdfjs-editor-alt-text-decorative-tooltip\"\n )\n : this.#altText;\n\n if (!tooltip.parentNode) {\n button.append(tooltip);\n }\n\n const element = this.#editor.getImageForAltText();\n element?.setAttribute(\"aria-describedby\", tooltip.id);\n }\n}\n\nexport { AltText };\n","/* Copyright 2022 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line max-len\n/** @typedef {import(\"./annotation_editor_layer.js\").AnnotationEditorLayer} AnnotationEditorLayer */\n\nimport {\n AnnotationEditorUIManager,\n bindEvents,\n ColorManager,\n KeyboardManager,\n} from \"./tools.js\";\nimport { FeatureTest, shadow, unreachable } from \"../../shared/util.js\";\nimport { AltText } from \"./alt_text.js\";\nimport { EditorToolbar } from \"./toolbar.js\";\nimport { noContextMenu } from \"../display_utils.js\";\n\n/**\n * @typedef {Object} AnnotationEditorParameters\n * @property {AnnotationEditorUIManager} uiManager - the global manager\n * @property {AnnotationEditorLayer} parent - the layer containing this editor\n * @property {string} id - editor id\n * @property {number} x - x-coordinate\n * @property {number} y - y-coordinate\n */\n\n/**\n * Base class for editors.\n */\nclass AnnotationEditor {\n #allResizerDivs = null;\n\n #altText = null;\n\n #disabled = false;\n\n #keepAspectRatio = false;\n\n #resizersDiv = null;\n\n #savedDimensions = null;\n\n #boundFocusin = this.focusin.bind(this);\n\n #boundFocusout = this.focusout.bind(this);\n\n #editToolbar = null;\n\n #focusedResizerName = \"\";\n\n #hasBeenClicked = false;\n\n #initialPosition = null;\n\n #isEditing = false;\n\n #isInEditMode = false;\n\n #isResizerEnabledForKeyboard = false;\n\n #moveInDOMTimeout = null;\n\n #prevDragX = 0;\n\n #prevDragY = 0;\n\n #telemetryTimeouts = null;\n\n _initialOptions = Object.create(null);\n\n _isVisible = true;\n\n _uiManager = null;\n\n _focusEventsAllowed = true;\n\n _l10nPromise = null;\n\n #isDraggable = false;\n\n #zIndex = AnnotationEditor._zIndex++;\n\n static _borderLineWidth = -1;\n\n static _colorManager = new ColorManager();\n\n static _zIndex = 1;\n\n // Time to wait (in ms) before sending the telemetry data.\n // We wait a bit to avoid sending too many requests when changing something\n // like the thickness of a line.\n static _telemetryTimeout = 1000;\n\n static get _resizerKeyboardManager() {\n const resize = AnnotationEditor.prototype._resizeWithKeyboard;\n const small = AnnotationEditorUIManager.TRANSLATE_SMALL;\n const big = AnnotationEditorUIManager.TRANSLATE_BIG;\n\n return shadow(\n this,\n \"_resizerKeyboardManager\",\n new KeyboardManager([\n [[\"ArrowLeft\", \"mac+ArrowLeft\"], resize, { args: [-small, 0] }],\n [\n [\"ctrl+ArrowLeft\", \"mac+shift+ArrowLeft\"],\n resize,\n { args: [-big, 0] },\n ],\n [[\"ArrowRight\", \"mac+ArrowRight\"], resize, { args: [small, 0] }],\n [\n [\"ctrl+ArrowRight\", \"mac+shift+ArrowRight\"],\n resize,\n { args: [big, 0] },\n ],\n [[\"ArrowUp\", \"mac+ArrowUp\"], resize, { args: [0, -small] }],\n [[\"ctrl+ArrowUp\", \"mac+shift+ArrowUp\"], resize, { args: [0, -big] }],\n [[\"ArrowDown\", \"mac+ArrowDown\"], resize, { args: [0, small] }],\n [[\"ctrl+ArrowDown\", \"mac+shift+ArrowDown\"], resize, { args: [0, big] }],\n [\n [\"Escape\", \"mac+Escape\"],\n AnnotationEditor.prototype._stopResizingWithKeyboard,\n ],\n ])\n );\n }\n\n /**\n * @param {AnnotationEditorParameters} parameters\n */\n constructor(parameters) {\n if (this.constructor === AnnotationEditor) {\n unreachable(\"Cannot initialize AnnotationEditor.\");\n }\n\n this.parent = parameters.parent;\n this.id = parameters.id;\n this.width = this.height = null;\n this.pageIndex = parameters.parent.pageIndex;\n this.name = parameters.name;\n this.div = null;\n this._uiManager = parameters.uiManager;\n this.annotationElementId = null;\n this._willKeepAspectRatio = false;\n this._initialOptions.isCentered = parameters.isCentered;\n this._structTreeParentId = null;\n\n const {\n rotation,\n rawDims: { pageWidth, pageHeight, pageX, pageY },\n } = this.parent.viewport;\n\n this.rotation = rotation;\n this.pageRotation =\n (360 + rotation - this._uiManager.viewParameters.rotation) % 360;\n this.pageDimensions = [pageWidth, pageHeight];\n this.pageTranslation = [pageX, pageY];\n\n const [width, height] = this.parentDimensions;\n this.x = parameters.x / width;\n this.y = parameters.y / height;\n\n this.isAttachedToDOM = false;\n this.deleted = false;\n }\n\n get editorType() {\n return Object.getPrototypeOf(this).constructor._type;\n }\n\n static get _defaultLineColor() {\n return shadow(\n this,\n \"_defaultLineColor\",\n this._colorManager.getHexCode(\"CanvasText\")\n );\n }\n\n static deleteAnnotationElement(editor) {\n const fakeEditor = new FakeEditor({\n id: editor.parent.getNextId(),\n parent: editor.parent,\n uiManager: editor._uiManager,\n });\n fakeEditor.annotationElementId = editor.annotationElementId;\n fakeEditor.deleted = true;\n fakeEditor._uiManager.addToAnnotationStorage(fakeEditor);\n }\n\n /**\n * Initialize the l10n stuff for this type of editor.\n * @param {Object} l10n\n */\n static initialize(l10n, _uiManager, options) {\n AnnotationEditor._l10nPromise ||= new Map(\n [\n \"pdfjs-editor-alt-text-button-label\",\n \"pdfjs-editor-alt-text-edit-button-label\",\n \"pdfjs-editor-alt-text-decorative-tooltip\",\n \"pdfjs-editor-resizer-label-topLeft\",\n \"pdfjs-editor-resizer-label-topMiddle\",\n \"pdfjs-editor-resizer-label-topRight\",\n \"pdfjs-editor-resizer-label-middleRight\",\n \"pdfjs-editor-resizer-label-bottomRight\",\n \"pdfjs-editor-resizer-label-bottomMiddle\",\n \"pdfjs-editor-resizer-label-bottomLeft\",\n \"pdfjs-editor-resizer-label-middleLeft\",\n ].map(str => [\n str,\n l10n.get(str.replaceAll(/([A-Z])/g, c => `-${c.toLowerCase()}`)),\n ])\n );\n if (options?.strings) {\n for (const str of options.strings) {\n AnnotationEditor._l10nPromise.set(str, l10n.get(str));\n }\n }\n if (AnnotationEditor._borderLineWidth !== -1) {\n return;\n }\n const style = getComputedStyle(document.documentElement);\n AnnotationEditor._borderLineWidth =\n parseFloat(style.getPropertyValue(\"--outline-width\")) || 0;\n }\n\n /**\n * Update the default parameters for this type of editor.\n * @param {number} _type\n * @param {*} _value\n */\n static updateDefaultParams(_type, _value) {}\n\n /**\n * Get the default properties to set in the UI for this type of editor.\n * @returns {Array}\n */\n static get defaultPropertiesToUpdate() {\n return [];\n }\n\n /**\n * Check if this kind of editor is able to handle the given mime type for\n * pasting.\n * @param {string} mime\n * @returns {boolean}\n */\n static isHandlingMimeForPasting(mime) {\n return false;\n }\n\n /**\n * Extract the data from the clipboard item and delegate the creation of the\n * editor to the parent.\n * @param {DataTransferItem} item\n * @param {AnnotationEditorLayer} parent\n */\n static paste(item, parent) {\n unreachable(\"Not implemented\");\n }\n\n /**\n * Get the properties to update in the UI for this editor.\n * @returns {Array}\n */\n get propertiesToUpdate() {\n return [];\n }\n\n get _isDraggable() {\n return this.#isDraggable;\n }\n\n set _isDraggable(value) {\n this.#isDraggable = value;\n this.div?.classList.toggle(\"draggable\", value);\n }\n\n /**\n * @returns {boolean} true if the editor handles the Enter key itself.\n */\n get isEnterHandled() {\n return true;\n }\n\n center() {\n const [pageWidth, pageHeight] = this.pageDimensions;\n switch (this.parentRotation) {\n case 90:\n this.x -= (this.height * pageHeight) / (pageWidth * 2);\n this.y += (this.width * pageWidth) / (pageHeight * 2);\n break;\n case 180:\n this.x += this.width / 2;\n this.y += this.height / 2;\n break;\n case 270:\n this.x += (this.height * pageHeight) / (pageWidth * 2);\n this.y -= (this.width * pageWidth) / (pageHeight * 2);\n break;\n default:\n this.x -= this.width / 2;\n this.y -= this.height / 2;\n break;\n }\n this.fixAndSetPosition();\n }\n\n /**\n * Add some commands into the CommandManager (undo/redo stuff).\n * @param {Object} params\n */\n addCommands(params) {\n this._uiManager.addCommands(params);\n }\n\n get currentLayer() {\n return this._uiManager.currentLayer;\n }\n\n /**\n * This editor will be behind the others.\n */\n setInBackground() {\n this.div.style.zIndex = 0;\n }\n\n /**\n * This editor will be in the foreground.\n */\n setInForeground() {\n this.div.style.zIndex = this.#zIndex;\n }\n\n setParent(parent) {\n if (parent !== null) {\n this.pageIndex = parent.pageIndex;\n this.pageDimensions = parent.pageDimensions;\n } else {\n // The editor is being removed from the DOM, so we need to stop resizing.\n this.#stopResizing();\n }\n this.parent = parent;\n }\n\n /**\n * onfocus callback.\n */\n focusin(event) {\n if (!this._focusEventsAllowed) {\n return;\n }\n if (!this.#hasBeenClicked) {\n this.parent.setSelected(this);\n } else {\n this.#hasBeenClicked = false;\n }\n }\n\n /**\n * onblur callback.\n * @param {FocusEvent} event\n */\n focusout(event) {\n if (!this._focusEventsAllowed) {\n return;\n }\n\n if (!this.isAttachedToDOM) {\n return;\n }\n\n // In case of focusout, the relatedTarget is the element which\n // is grabbing the focus.\n // So if the related target is an element under the div for this\n // editor, then the editor isn't unactive.\n const target = event.relatedTarget;\n if (target?.closest(`#${this.id}`)) {\n return;\n }\n\n event.preventDefault();\n\n if (!this.parent?.isMultipleSelection) {\n this.commitOrRemove();\n }\n }\n\n commitOrRemove() {\n if (this.isEmpty()) {\n this.remove();\n } else {\n this.commit();\n }\n }\n\n /**\n * Commit the data contained in this editor.\n */\n commit() {\n this.addToAnnotationStorage();\n }\n\n addToAnnotationStorage() {\n this._uiManager.addToAnnotationStorage(this);\n }\n\n /**\n * Set the editor position within its parent.\n * @param {number} x\n * @param {number} y\n * @param {number} tx - x-translation in screen coordinates.\n * @param {number} ty - y-translation in screen coordinates.\n */\n setAt(x, y, tx, ty) {\n const [width, height] = this.parentDimensions;\n [tx, ty] = this.screenToPageTranslation(tx, ty);\n\n this.x = (x + tx) / width;\n this.y = (y + ty) / height;\n\n this.fixAndSetPosition();\n }\n\n #translate([width, height], x, y) {\n [x, y] = this.screenToPageTranslation(x, y);\n\n this.x += x / width;\n this.y += y / height;\n\n this.fixAndSetPosition();\n }\n\n /**\n * Translate the editor position within its parent.\n * @param {number} x - x-translation in screen coordinates.\n * @param {number} y - y-translation in screen coordinates.\n */\n translate(x, y) {\n // We don't change the initial position because the move here hasn't been\n // done by the user.\n this.#translate(this.parentDimensions, x, y);\n }\n\n /**\n * Translate the editor position within its page and adjust the scroll\n * in order to have the editor in the view.\n * @param {number} x - x-translation in page coordinates.\n * @param {number} y - y-translation in page coordinates.\n */\n translateInPage(x, y) {\n this.#initialPosition ||= [this.x, this.y];\n this.#translate(this.pageDimensions, x, y);\n this.div.scrollIntoView({ block: \"nearest\" });\n }\n\n drag(tx, ty) {\n this.#initialPosition ||= [this.x, this.y];\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.x += tx / parentWidth;\n this.y += ty / parentHeight;\n if (this.parent && (this.x < 0 || this.x > 1 || this.y < 0 || this.y > 1)) {\n // It's possible to not have a parent: for example, when the user is\n // dragging all the selected editors but this one on a page which has been\n // destroyed.\n // It's why we need to check for it. In such a situation, it isn't really\n // a problem to not find a new parent: it's something which is related to\n // what the user is seeing, hence it depends on how pages are layed out.\n\n // The element will be outside of its parent so change the parent.\n const { x, y } = this.div.getBoundingClientRect();\n if (this.parent.findNewParent(this, x, y)) {\n this.x -= Math.floor(this.x);\n this.y -= Math.floor(this.y);\n }\n }\n\n // The editor can be moved wherever the user wants, so we don't need to fix\n // the position: it'll be done when the user will release the mouse button.\n\n let { x, y } = this;\n const [bx, by] = this.getBaseTranslation();\n x += bx;\n y += by;\n\n this.div.style.left = `${(100 * x).toFixed(2)}%`;\n this.div.style.top = `${(100 * y).toFixed(2)}%`;\n this.div.scrollIntoView({ block: \"nearest\" });\n }\n\n get _hasBeenMoved() {\n return (\n !!this.#initialPosition &&\n (this.#initialPosition[0] !== this.x ||\n this.#initialPosition[1] !== this.y)\n );\n }\n\n /**\n * Get the translation to take into account the editor border.\n * The CSS engine positions the element by taking the border into account so\n * we must apply the opposite translation to have the editor in the right\n * position.\n * @returns {Array}\n */\n getBaseTranslation() {\n const [parentWidth, parentHeight] = this.parentDimensions;\n const { _borderLineWidth } = AnnotationEditor;\n const x = _borderLineWidth / parentWidth;\n const y = _borderLineWidth / parentHeight;\n switch (this.rotation) {\n case 90:\n return [-x, y];\n case 180:\n return [x, y];\n case 270:\n return [x, -y];\n default:\n return [-x, -y];\n }\n }\n\n /**\n * @returns {boolean} true if position must be fixed (i.e. make the x and y\n * living in the page).\n */\n get _mustFixPosition() {\n return true;\n }\n\n /**\n * Fix the position of the editor in order to keep it inside its parent page.\n * @param {number} [rotation] - the rotation of the page.\n */\n fixAndSetPosition(rotation = this.rotation) {\n const [pageWidth, pageHeight] = this.pageDimensions;\n let { x, y, width, height } = this;\n width *= pageWidth;\n height *= pageHeight;\n x *= pageWidth;\n y *= pageHeight;\n\n if (this._mustFixPosition) {\n switch (rotation) {\n case 0:\n x = Math.max(0, Math.min(pageWidth - width, x));\n y = Math.max(0, Math.min(pageHeight - height, y));\n break;\n case 90:\n x = Math.max(0, Math.min(pageWidth - height, x));\n y = Math.min(pageHeight, Math.max(width, y));\n break;\n case 180:\n x = Math.min(pageWidth, Math.max(width, x));\n y = Math.min(pageHeight, Math.max(height, y));\n break;\n case 270:\n x = Math.min(pageWidth, Math.max(height, x));\n y = Math.max(0, Math.min(pageHeight - width, y));\n break;\n }\n }\n\n this.x = x /= pageWidth;\n this.y = y /= pageHeight;\n\n const [bx, by] = this.getBaseTranslation();\n x += bx;\n y += by;\n\n const { style } = this.div;\n style.left = `${(100 * x).toFixed(2)}%`;\n style.top = `${(100 * y).toFixed(2)}%`;\n\n this.moveInDOM();\n }\n\n static #rotatePoint(x, y, angle) {\n switch (angle) {\n case 90:\n return [y, -x];\n case 180:\n return [-x, -y];\n case 270:\n return [-y, x];\n default:\n return [x, y];\n }\n }\n\n /**\n * Convert a screen translation into a page one.\n * @param {number} x\n * @param {number} y\n */\n screenToPageTranslation(x, y) {\n return AnnotationEditor.#rotatePoint(x, y, this.parentRotation);\n }\n\n /**\n * Convert a page translation into a screen one.\n * @param {number} x\n * @param {number} y\n */\n pageTranslationToScreen(x, y) {\n return AnnotationEditor.#rotatePoint(x, y, 360 - this.parentRotation);\n }\n\n #getRotationMatrix(rotation) {\n switch (rotation) {\n case 90: {\n const [pageWidth, pageHeight] = this.pageDimensions;\n return [0, -pageWidth / pageHeight, pageHeight / pageWidth, 0];\n }\n case 180:\n return [-1, 0, 0, -1];\n case 270: {\n const [pageWidth, pageHeight] = this.pageDimensions;\n return [0, pageWidth / pageHeight, -pageHeight / pageWidth, 0];\n }\n default:\n return [1, 0, 0, 1];\n }\n }\n\n get parentScale() {\n return this._uiManager.viewParameters.realScale;\n }\n\n get parentRotation() {\n return (this._uiManager.viewParameters.rotation + this.pageRotation) % 360;\n }\n\n get parentDimensions() {\n const {\n parentScale,\n pageDimensions: [pageWidth, pageHeight],\n } = this;\n const scaledWidth = pageWidth * parentScale;\n const scaledHeight = pageHeight * parentScale;\n return FeatureTest.isCSSRoundSupported\n ? [Math.round(scaledWidth), Math.round(scaledHeight)]\n : [scaledWidth, scaledHeight];\n }\n\n /**\n * Set the dimensions of this editor.\n * @param {number} width\n * @param {number} height\n */\n setDims(width, height) {\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.div.style.width = `${((100 * width) / parentWidth).toFixed(2)}%`;\n if (!this.#keepAspectRatio) {\n this.div.style.height = `${((100 * height) / parentHeight).toFixed(2)}%`;\n }\n }\n\n fixDims() {\n const { style } = this.div;\n const { height, width } = style;\n const widthPercent = width.endsWith(\"%\");\n const heightPercent = !this.#keepAspectRatio && height.endsWith(\"%\");\n if (widthPercent && heightPercent) {\n return;\n }\n\n const [parentWidth, parentHeight] = this.parentDimensions;\n if (!widthPercent) {\n style.width = `${((100 * parseFloat(width)) / parentWidth).toFixed(2)}%`;\n }\n if (!this.#keepAspectRatio && !heightPercent) {\n style.height = `${((100 * parseFloat(height)) / parentHeight).toFixed(\n 2\n )}%`;\n }\n }\n\n /**\n * Get the translation used to position this editor when it's created.\n * @returns {Array}\n */\n getInitialTranslation() {\n return [0, 0];\n }\n\n #createResizers() {\n if (this.#resizersDiv) {\n return;\n }\n this.#resizersDiv = document.createElement(\"div\");\n this.#resizersDiv.classList.add(\"resizers\");\n // When the resizers are used with the keyboard, they're focusable, hence\n // we want to have them in this order (top left, top middle, top right, ...)\n // in the DOM to have the focus order correct.\n const classes = this._willKeepAspectRatio\n ? [\"topLeft\", \"topRight\", \"bottomRight\", \"bottomLeft\"]\n : [\n \"topLeft\",\n \"topMiddle\",\n \"topRight\",\n \"middleRight\",\n \"bottomRight\",\n \"bottomMiddle\",\n \"bottomLeft\",\n \"middleLeft\",\n ];\n for (const name of classes) {\n const div = document.createElement(\"div\");\n this.#resizersDiv.append(div);\n div.classList.add(\"resizer\", name);\n div.setAttribute(\"data-resizer-name\", name);\n div.addEventListener(\n \"pointerdown\",\n this.#resizerPointerdown.bind(this, name)\n );\n div.addEventListener(\"contextmenu\", noContextMenu);\n div.tabIndex = -1;\n }\n this.div.prepend(this.#resizersDiv);\n }\n\n #resizerPointerdown(name, event) {\n event.preventDefault();\n const { isMac } = FeatureTest.platform;\n if (event.button !== 0 || (event.ctrlKey && isMac)) {\n return;\n }\n\n this.#altText?.toggle(false);\n\n const boundResizerPointermove = this.#resizerPointermove.bind(this, name);\n const savedDraggable = this._isDraggable;\n this._isDraggable = false;\n const pointerMoveOptions = { passive: true, capture: true };\n this.parent.togglePointerEvents(false);\n window.addEventListener(\n \"pointermove\",\n boundResizerPointermove,\n pointerMoveOptions\n );\n window.addEventListener(\"contextmenu\", noContextMenu);\n const savedX = this.x;\n const savedY = this.y;\n const savedWidth = this.width;\n const savedHeight = this.height;\n const savedParentCursor = this.parent.div.style.cursor;\n const savedCursor = this.div.style.cursor;\n this.div.style.cursor = this.parent.div.style.cursor =\n window.getComputedStyle(event.target).cursor;\n\n const pointerUpCallback = () => {\n this.parent.togglePointerEvents(true);\n this.#altText?.toggle(true);\n this._isDraggable = savedDraggable;\n window.removeEventListener(\"pointerup\", pointerUpCallback);\n window.removeEventListener(\"blur\", pointerUpCallback);\n window.removeEventListener(\n \"pointermove\",\n boundResizerPointermove,\n pointerMoveOptions\n );\n window.removeEventListener(\"contextmenu\", noContextMenu);\n this.parent.div.style.cursor = savedParentCursor;\n this.div.style.cursor = savedCursor;\n\n this.#addResizeToUndoStack(savedX, savedY, savedWidth, savedHeight);\n };\n window.addEventListener(\"pointerup\", pointerUpCallback);\n // If the user switches to another window (with alt+tab), then we end the\n // resize session.\n window.addEventListener(\"blur\", pointerUpCallback);\n }\n\n #addResizeToUndoStack(savedX, savedY, savedWidth, savedHeight) {\n const newX = this.x;\n const newY = this.y;\n const newWidth = this.width;\n const newHeight = this.height;\n if (\n newX === savedX &&\n newY === savedY &&\n newWidth === savedWidth &&\n newHeight === savedHeight\n ) {\n return;\n }\n\n this.addCommands({\n cmd: () => {\n this.width = newWidth;\n this.height = newHeight;\n this.x = newX;\n this.y = newY;\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.setDims(parentWidth * newWidth, parentHeight * newHeight);\n this.fixAndSetPosition();\n },\n undo: () => {\n this.width = savedWidth;\n this.height = savedHeight;\n this.x = savedX;\n this.y = savedY;\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.setDims(parentWidth * savedWidth, parentHeight * savedHeight);\n this.fixAndSetPosition();\n },\n mustExec: true,\n });\n }\n\n #resizerPointermove(name, event) {\n const [parentWidth, parentHeight] = this.parentDimensions;\n const savedX = this.x;\n const savedY = this.y;\n const savedWidth = this.width;\n const savedHeight = this.height;\n const minWidth = AnnotationEditor.MIN_SIZE / parentWidth;\n const minHeight = AnnotationEditor.MIN_SIZE / parentHeight;\n\n // 10000 because we multiply by 100 and use toFixed(2) in fixAndSetPosition.\n // Without rounding, the positions of the corners other than the top left\n // one can be slightly wrong.\n const round = x => Math.round(x * 10000) / 10000;\n const rotationMatrix = this.#getRotationMatrix(this.rotation);\n const transf = (x, y) => [\n rotationMatrix[0] * x + rotationMatrix[2] * y,\n rotationMatrix[1] * x + rotationMatrix[3] * y,\n ];\n const invRotationMatrix = this.#getRotationMatrix(360 - this.rotation);\n const invTransf = (x, y) => [\n invRotationMatrix[0] * x + invRotationMatrix[2] * y,\n invRotationMatrix[1] * x + invRotationMatrix[3] * y,\n ];\n let getPoint;\n let getOpposite;\n let isDiagonal = false;\n let isHorizontal = false;\n\n switch (name) {\n case \"topLeft\":\n isDiagonal = true;\n getPoint = (w, h) => [0, 0];\n getOpposite = (w, h) => [w, h];\n break;\n case \"topMiddle\":\n getPoint = (w, h) => [w / 2, 0];\n getOpposite = (w, h) => [w / 2, h];\n break;\n case \"topRight\":\n isDiagonal = true;\n getPoint = (w, h) => [w, 0];\n getOpposite = (w, h) => [0, h];\n break;\n case \"middleRight\":\n isHorizontal = true;\n getPoint = (w, h) => [w, h / 2];\n getOpposite = (w, h) => [0, h / 2];\n break;\n case \"bottomRight\":\n isDiagonal = true;\n getPoint = (w, h) => [w, h];\n getOpposite = (w, h) => [0, 0];\n break;\n case \"bottomMiddle\":\n getPoint = (w, h) => [w / 2, h];\n getOpposite = (w, h) => [w / 2, 0];\n break;\n case \"bottomLeft\":\n isDiagonal = true;\n getPoint = (w, h) => [0, h];\n getOpposite = (w, h) => [w, 0];\n break;\n case \"middleLeft\":\n isHorizontal = true;\n getPoint = (w, h) => [0, h / 2];\n getOpposite = (w, h) => [w, h / 2];\n break;\n }\n\n const point = getPoint(savedWidth, savedHeight);\n const oppositePoint = getOpposite(savedWidth, savedHeight);\n let transfOppositePoint = transf(...oppositePoint);\n const oppositeX = round(savedX + transfOppositePoint[0]);\n const oppositeY = round(savedY + transfOppositePoint[1]);\n let ratioX = 1;\n let ratioY = 1;\n\n let [deltaX, deltaY] = this.screenToPageTranslation(\n event.movementX,\n event.movementY\n );\n [deltaX, deltaY] = invTransf(deltaX / parentWidth, deltaY / parentHeight);\n\n if (isDiagonal) {\n const oldDiag = Math.hypot(savedWidth, savedHeight);\n ratioX = ratioY = Math.max(\n Math.min(\n Math.hypot(\n oppositePoint[0] - point[0] - deltaX,\n oppositePoint[1] - point[1] - deltaY\n ) / oldDiag,\n // Avoid the editor to be larger than the page.\n 1 / savedWidth,\n 1 / savedHeight\n ),\n // Avoid the editor to be smaller than the minimum size.\n minWidth / savedWidth,\n minHeight / savedHeight\n );\n } else if (isHorizontal) {\n ratioX =\n Math.max(\n minWidth,\n Math.min(1, Math.abs(oppositePoint[0] - point[0] - deltaX))\n ) / savedWidth;\n } else {\n ratioY =\n Math.max(\n minHeight,\n Math.min(1, Math.abs(oppositePoint[1] - point[1] - deltaY))\n ) / savedHeight;\n }\n\n const newWidth = round(savedWidth * ratioX);\n const newHeight = round(savedHeight * ratioY);\n transfOppositePoint = transf(...getOpposite(newWidth, newHeight));\n const newX = oppositeX - transfOppositePoint[0];\n const newY = oppositeY - transfOppositePoint[1];\n\n this.width = newWidth;\n this.height = newHeight;\n this.x = newX;\n this.y = newY;\n\n this.setDims(parentWidth * newWidth, parentHeight * newHeight);\n this.fixAndSetPosition();\n }\n\n altTextFinish() {\n this.#altText?.finish();\n }\n\n /**\n * Add a toolbar for this editor.\n * @returns {Promise}\n */\n async addEditToolbar() {\n if (this.#editToolbar || this.#isInEditMode) {\n return this.#editToolbar;\n }\n this.#editToolbar = new EditorToolbar(this);\n this.div.append(this.#editToolbar.render());\n if (this.#altText) {\n this.#editToolbar.addAltTextButton(await this.#altText.render());\n }\n\n return this.#editToolbar;\n }\n\n removeEditToolbar() {\n if (!this.#editToolbar) {\n return;\n }\n this.#editToolbar.remove();\n this.#editToolbar = null;\n\n // We destroy the alt text but we don't null it because we want to be able\n // to restore it in case the user undoes the deletion.\n this.#altText?.destroy();\n }\n\n getClientDimensions() {\n return this.div.getBoundingClientRect();\n }\n\n async addAltTextButton() {\n if (this.#altText) {\n return;\n }\n AltText.initialize(AnnotationEditor._l10nPromise);\n this.#altText = new AltText(this);\n await this.addEditToolbar();\n }\n\n get altTextData() {\n return this.#altText?.data;\n }\n\n /**\n * Set the alt text data.\n */\n set altTextData(data) {\n if (!this.#altText) {\n return;\n }\n this.#altText.data = data;\n }\n\n hasAltText() {\n return !this.#altText?.isEmpty();\n }\n\n /**\n * Render this editor in a div.\n * @returns {HTMLDivElement | null}\n */\n render() {\n this.div = document.createElement(\"div\");\n this.div.setAttribute(\"data-editor-rotation\", (360 - this.rotation) % 360);\n this.div.className = this.name;\n this.div.setAttribute(\"id\", this.id);\n this.div.tabIndex = this.#disabled ? -1 : 0;\n if (!this._isVisible) {\n this.div.classList.add(\"hidden\");\n }\n\n this.setInForeground();\n\n this.div.addEventListener(\"focusin\", this.#boundFocusin);\n this.div.addEventListener(\"focusout\", this.#boundFocusout);\n\n const [parentWidth, parentHeight] = this.parentDimensions;\n if (this.parentRotation % 180 !== 0) {\n this.div.style.maxWidth = `${((100 * parentHeight) / parentWidth).toFixed(\n 2\n )}%`;\n this.div.style.maxHeight = `${(\n (100 * parentWidth) /\n parentHeight\n ).toFixed(2)}%`;\n }\n\n const [tx, ty] = this.getInitialTranslation();\n this.translate(tx, ty);\n\n bindEvents(this, this.div, [\"pointerdown\"]);\n\n return this.div;\n }\n\n /**\n * Onpointerdown callback.\n * @param {PointerEvent} event\n */\n pointerdown(event) {\n const { isMac } = FeatureTest.platform;\n if (event.button !== 0 || (event.ctrlKey && isMac)) {\n // Avoid to focus this editor because of a non-left click.\n event.preventDefault();\n return;\n }\n\n this.#hasBeenClicked = true;\n\n if (this._isDraggable) {\n this.#setUpDragSession(event);\n return;\n }\n\n this.#selectOnPointerEvent(event);\n }\n\n #selectOnPointerEvent(event) {\n const { isMac } = FeatureTest.platform;\n if (\n (event.ctrlKey && !isMac) ||\n event.shiftKey ||\n (event.metaKey && isMac)\n ) {\n this.parent.toggleSelected(this);\n } else {\n this.parent.setSelected(this);\n }\n }\n\n #setUpDragSession(event) {\n const isSelected = this._uiManager.isSelected(this);\n this._uiManager.setUpDragSession();\n\n let pointerMoveOptions, pointerMoveCallback;\n if (isSelected) {\n this.div.classList.add(\"moving\");\n pointerMoveOptions = { passive: true, capture: true };\n this.#prevDragX = event.clientX;\n this.#prevDragY = event.clientY;\n pointerMoveCallback = e => {\n const { clientX: x, clientY: y } = e;\n const [tx, ty] = this.screenToPageTranslation(\n x - this.#prevDragX,\n y - this.#prevDragY\n );\n this.#prevDragX = x;\n this.#prevDragY = y;\n this._uiManager.dragSelectedEditors(tx, ty);\n };\n window.addEventListener(\n \"pointermove\",\n pointerMoveCallback,\n pointerMoveOptions\n );\n }\n\n const pointerUpCallback = () => {\n window.removeEventListener(\"pointerup\", pointerUpCallback);\n window.removeEventListener(\"blur\", pointerUpCallback);\n if (isSelected) {\n this.div.classList.remove(\"moving\");\n window.removeEventListener(\n \"pointermove\",\n pointerMoveCallback,\n pointerMoveOptions\n );\n }\n\n this.#hasBeenClicked = false;\n if (!this._uiManager.endDragSession()) {\n this.#selectOnPointerEvent(event);\n }\n };\n window.addEventListener(\"pointerup\", pointerUpCallback);\n // If the user is using alt+tab during the dragging session, the pointerup\n // event could be not fired, but a blur event is fired so we can use it in\n // order to interrupt the dragging session.\n window.addEventListener(\"blur\", pointerUpCallback);\n }\n\n moveInDOM() {\n // Moving the editor in the DOM can be expensive, so we wait a bit before.\n // It's important to not block the UI (for example when changing the font\n // size in a FreeText).\n if (this.#moveInDOMTimeout) {\n clearTimeout(this.#moveInDOMTimeout);\n }\n this.#moveInDOMTimeout = setTimeout(() => {\n this.#moveInDOMTimeout = null;\n this.parent?.moveEditorInDOM(this);\n }, 0);\n }\n\n _setParentAndPosition(parent, x, y) {\n parent.changeParent(this);\n this.x = x;\n this.y = y;\n this.fixAndSetPosition();\n }\n\n /**\n * Convert the current rect into a page one.\n * @param {number} tx - x-translation in screen coordinates.\n * @param {number} ty - y-translation in screen coordinates.\n * @param {number} [rotation] - the rotation of the page.\n */\n getRect(tx, ty, rotation = this.rotation) {\n const scale = this.parentScale;\n const [pageWidth, pageHeight] = this.pageDimensions;\n const [pageX, pageY] = this.pageTranslation;\n const shiftX = tx / scale;\n const shiftY = ty / scale;\n const x = this.x * pageWidth;\n const y = this.y * pageHeight;\n const width = this.width * pageWidth;\n const height = this.height * pageHeight;\n\n switch (rotation) {\n case 0:\n return [\n x + shiftX + pageX,\n pageHeight - y - shiftY - height + pageY,\n x + shiftX + width + pageX,\n pageHeight - y - shiftY + pageY,\n ];\n case 90:\n return [\n x + shiftY + pageX,\n pageHeight - y + shiftX + pageY,\n x + shiftY + height + pageX,\n pageHeight - y + shiftX + width + pageY,\n ];\n case 180:\n return [\n x - shiftX - width + pageX,\n pageHeight - y + shiftY + pageY,\n x - shiftX + pageX,\n pageHeight - y + shiftY + height + pageY,\n ];\n case 270:\n return [\n x - shiftY - height + pageX,\n pageHeight - y - shiftX - width + pageY,\n x - shiftY + pageX,\n pageHeight - y - shiftX + pageY,\n ];\n default:\n throw new Error(\"Invalid rotation\");\n }\n }\n\n getRectInCurrentCoords(rect, pageHeight) {\n const [x1, y1, x2, y2] = rect;\n\n const width = x2 - x1;\n const height = y2 - y1;\n\n switch (this.rotation) {\n case 0:\n return [x1, pageHeight - y2, width, height];\n case 90:\n return [x1, pageHeight - y1, height, width];\n case 180:\n return [x2, pageHeight - y1, width, height];\n case 270:\n return [x2, pageHeight - y2, height, width];\n default:\n throw new Error(\"Invalid rotation\");\n }\n }\n\n /**\n * Executed once this editor has been rendered.\n */\n onceAdded() {}\n\n /**\n * Check if the editor contains something.\n * @returns {boolean}\n */\n isEmpty() {\n return false;\n }\n\n /**\n * Enable edit mode.\n */\n enableEditMode() {\n this.#isInEditMode = true;\n }\n\n /**\n * Disable edit mode.\n */\n disableEditMode() {\n this.#isInEditMode = false;\n }\n\n /**\n * Check if the editor is edited.\n * @returns {boolean}\n */\n isInEditMode() {\n return this.#isInEditMode;\n }\n\n /**\n * If it returns true, then this editor handles the keyboard\n * events itself.\n * @returns {boolean}\n */\n shouldGetKeyboardEvents() {\n return this.#isResizerEnabledForKeyboard;\n }\n\n /**\n * Check if this editor needs to be rebuilt or not.\n * @returns {boolean}\n */\n needsToBeRebuilt() {\n return this.div && !this.isAttachedToDOM;\n }\n\n /**\n * Rebuild the editor in case it has been removed on undo.\n *\n * To implement in subclasses.\n */\n rebuild() {\n this.div?.addEventListener(\"focusin\", this.#boundFocusin);\n this.div?.addEventListener(\"focusout\", this.#boundFocusout);\n }\n\n /**\n * Rotate the editor.\n * @param {number} angle\n */\n rotate(_angle) {}\n\n /**\n * Serialize the editor.\n * The result of the serialization will be used to construct a\n * new annotation to add to the pdf document.\n *\n * To implement in subclasses.\n * @param {boolean} [isForCopying]\n * @param {Object | null} [context]\n * @returns {Object | null}\n */\n serialize(isForCopying = false, context = null) {\n unreachable(\"An editor must be serializable\");\n }\n\n /**\n * Deserialize the editor.\n * The result of the deserialization is a new editor.\n *\n * @param {Object} data\n * @param {AnnotationEditorLayer} parent\n * @param {AnnotationEditorUIManager} uiManager\n * @returns {AnnotationEditor | null}\n */\n static deserialize(data, parent, uiManager) {\n const editor = new this.prototype.constructor({\n parent,\n id: parent.getNextId(),\n uiManager,\n });\n editor.rotation = data.rotation;\n\n const [pageWidth, pageHeight] = editor.pageDimensions;\n const [x, y, width, height] = editor.getRectInCurrentCoords(\n data.rect,\n pageHeight\n );\n editor.x = x / pageWidth;\n editor.y = y / pageHeight;\n editor.width = width / pageWidth;\n editor.height = height / pageHeight;\n\n return editor;\n }\n\n /**\n * Check if an existing annotation associated with this editor has been\n * modified.\n * @returns {boolean}\n */\n get hasBeenModified() {\n return (\n !!this.annotationElementId && (this.deleted || this.serialize() !== null)\n );\n }\n\n /**\n * Remove this editor.\n * It's used on ctrl+backspace action.\n */\n remove() {\n this.div.removeEventListener(\"focusin\", this.#boundFocusin);\n this.div.removeEventListener(\"focusout\", this.#boundFocusout);\n\n if (!this.isEmpty()) {\n // The editor is removed but it can be back at some point thanks to\n // undo/redo so we must commit it before.\n this.commit();\n }\n if (this.parent) {\n this.parent.remove(this);\n } else {\n this._uiManager.removeEditor(this);\n }\n\n if (this.#moveInDOMTimeout) {\n clearTimeout(this.#moveInDOMTimeout);\n this.#moveInDOMTimeout = null;\n }\n this.#stopResizing();\n this.removeEditToolbar();\n if (this.#telemetryTimeouts) {\n for (const timeout of this.#telemetryTimeouts.values()) {\n clearTimeout(timeout);\n }\n this.#telemetryTimeouts = null;\n }\n this.parent = null;\n }\n\n /**\n * @returns {boolean} true if this editor can be resized.\n */\n get isResizable() {\n return false;\n }\n\n /**\n * Add the resizers to this editor.\n */\n makeResizable() {\n if (this.isResizable) {\n this.#createResizers();\n this.#resizersDiv.classList.remove(\"hidden\");\n bindEvents(this, this.div, [\"keydown\"]);\n }\n }\n\n get toolbarPosition() {\n return null;\n }\n\n /**\n * onkeydown callback.\n * @param {KeyboardEvent} event\n */\n keydown(event) {\n if (\n !this.isResizable ||\n event.target !== this.div ||\n event.key !== \"Enter\"\n ) {\n return;\n }\n this._uiManager.setSelected(this);\n this.#savedDimensions = {\n savedX: this.x,\n savedY: this.y,\n savedWidth: this.width,\n savedHeight: this.height,\n };\n const children = this.#resizersDiv.children;\n if (!this.#allResizerDivs) {\n this.#allResizerDivs = Array.from(children);\n const boundResizerKeydown = this.#resizerKeydown.bind(this);\n const boundResizerBlur = this.#resizerBlur.bind(this);\n for (const div of this.#allResizerDivs) {\n const name = div.getAttribute(\"data-resizer-name\");\n div.setAttribute(\"role\", \"spinbutton\");\n div.addEventListener(\"keydown\", boundResizerKeydown);\n div.addEventListener(\"blur\", boundResizerBlur);\n div.addEventListener(\"focus\", this.#resizerFocus.bind(this, name));\n AnnotationEditor._l10nPromise\n .get(`pdfjs-editor-resizer-label-${name}`)\n .then(msg => div.setAttribute(\"aria-label\", msg));\n }\n }\n\n // We want to have the resizers in the visual order, so we move the first\n // (top-left) to the right place.\n const first = this.#allResizerDivs[0];\n let firstPosition = 0;\n for (const div of children) {\n if (div === first) {\n break;\n }\n firstPosition++;\n }\n const nextFirstPosition =\n (((360 - this.rotation + this.parentRotation) % 360) / 90) *\n (this.#allResizerDivs.length / 4);\n\n if (nextFirstPosition !== firstPosition) {\n // We need to reorder the resizers in the DOM in order to have the focus\n // on the top-left one.\n if (nextFirstPosition < firstPosition) {\n for (let i = 0; i < firstPosition - nextFirstPosition; i++) {\n this.#resizersDiv.append(this.#resizersDiv.firstChild);\n }\n } else if (nextFirstPosition > firstPosition) {\n for (let i = 0; i < nextFirstPosition - firstPosition; i++) {\n this.#resizersDiv.firstChild.before(this.#resizersDiv.lastChild);\n }\n }\n\n let i = 0;\n for (const child of children) {\n const div = this.#allResizerDivs[i++];\n const name = div.getAttribute(\"data-resizer-name\");\n AnnotationEditor._l10nPromise\n .get(`pdfjs-editor-resizer-label-${name}`)\n .then(msg => child.setAttribute(\"aria-label\", msg));\n }\n }\n\n this.#setResizerTabIndex(0);\n this.#isResizerEnabledForKeyboard = true;\n this.#resizersDiv.firstChild.focus({ focusVisible: true });\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n\n #resizerKeydown(event) {\n AnnotationEditor._resizerKeyboardManager.exec(this, event);\n }\n\n #resizerBlur(event) {\n if (\n this.#isResizerEnabledForKeyboard &&\n event.relatedTarget?.parentNode !== this.#resizersDiv\n ) {\n this.#stopResizing();\n }\n }\n\n #resizerFocus(name) {\n this.#focusedResizerName = this.#isResizerEnabledForKeyboard ? name : \"\";\n }\n\n #setResizerTabIndex(value) {\n if (!this.#allResizerDivs) {\n return;\n }\n for (const div of this.#allResizerDivs) {\n div.tabIndex = value;\n }\n }\n\n _resizeWithKeyboard(x, y) {\n if (!this.#isResizerEnabledForKeyboard) {\n return;\n }\n this.#resizerPointermove(this.#focusedResizerName, {\n movementX: x,\n movementY: y,\n });\n }\n\n #stopResizing() {\n this.#isResizerEnabledForKeyboard = false;\n this.#setResizerTabIndex(-1);\n if (this.#savedDimensions) {\n const { savedX, savedY, savedWidth, savedHeight } = this.#savedDimensions;\n this.#addResizeToUndoStack(savedX, savedY, savedWidth, savedHeight);\n this.#savedDimensions = null;\n }\n }\n\n _stopResizingWithKeyboard() {\n this.#stopResizing();\n this.div.focus();\n }\n\n /**\n * Select this editor.\n */\n select() {\n this.makeResizable();\n this.div?.classList.add(\"selectedEditor\");\n if (!this.#editToolbar) {\n this.addEditToolbar().then(() => {\n if (this.div?.classList.contains(\"selectedEditor\")) {\n // The editor can have been unselected while we were waiting for the\n // edit toolbar to be created, hence we want to be sure that this\n // editor is still selected.\n this.#editToolbar?.show();\n }\n });\n return;\n }\n this.#editToolbar?.show();\n }\n\n /**\n * Unselect this editor.\n */\n unselect() {\n this.#resizersDiv?.classList.add(\"hidden\");\n this.div?.classList.remove(\"selectedEditor\");\n if (this.div?.contains(document.activeElement)) {\n // Don't use this.div.blur() because we don't know where the focus will\n // go.\n this._uiManager.currentLayer.div.focus({\n preventScroll: true,\n });\n }\n this.#editToolbar?.hide();\n }\n\n /**\n * Update some parameters which have been changed through the UI.\n * @param {number} type\n * @param {*} value\n */\n updateParams(type, value) {}\n\n /**\n * When the user disables the editing mode some editors can change some of\n * their properties.\n */\n disableEditing() {}\n\n /**\n * When the user enables the editing mode some editors can change some of\n * their properties.\n */\n enableEditing() {}\n\n /**\n * The editor is about to be edited.\n */\n enterInEditMode() {}\n\n /**\n * @returns {HTMLElement | null} the element requiring an alt text.\n */\n getImageForAltText() {\n return null;\n }\n\n /**\n * Get the div which really contains the displayed content.\n * @returns {HTMLDivElement | undefined}\n */\n get contentDiv() {\n return this.div;\n }\n\n /**\n * If true then the editor is currently edited.\n * @type {boolean}\n */\n get isEditing() {\n return this.#isEditing;\n }\n\n /**\n * When set to true, it means that this editor is currently edited.\n * @param {boolean} value\n */\n set isEditing(value) {\n this.#isEditing = value;\n if (!this.parent) {\n return;\n }\n if (value) {\n this.parent.setSelected(this);\n this.parent.setActiveEditor(this);\n } else {\n this.parent.setActiveEditor(null);\n }\n }\n\n /**\n * Set the aspect ratio to use when resizing.\n * @param {number} width\n * @param {number} height\n */\n setAspectRatio(width, height) {\n this.#keepAspectRatio = true;\n const aspectRatio = width / height;\n const { style } = this.div;\n style.aspectRatio = aspectRatio;\n style.height = \"auto\";\n }\n\n static get MIN_SIZE() {\n return 16;\n }\n\n static canCreateNewEmptyEditor() {\n return true;\n }\n\n /**\n * Get the data to report to the telemetry when the editor is added.\n * @returns {Object}\n */\n get telemetryInitialData() {\n return { action: \"added\" };\n }\n\n /**\n * The telemetry data to use when saving/printing.\n * @returns {Object|null}\n */\n get telemetryFinalData() {\n return null;\n }\n\n _reportTelemetry(data, mustWait = false) {\n if (mustWait) {\n this.#telemetryTimeouts ||= new Map();\n const { action } = data;\n let timeout = this.#telemetryTimeouts.get(action);\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(() => {\n this._reportTelemetry(data);\n this.#telemetryTimeouts.delete(action);\n if (this.#telemetryTimeouts.size === 0) {\n this.#telemetryTimeouts = null;\n }\n }, AnnotationEditor._telemetryTimeout);\n this.#telemetryTimeouts.set(action, timeout);\n return;\n }\n data.type ||= this.editorType;\n this._uiManager._eventBus.dispatch(\"reporttelemetry\", {\n source: this,\n details: {\n type: \"editing\",\n data,\n },\n });\n }\n\n /**\n * Show or hide this editor.\n * @param {boolean|undefined} visible\n */\n show(visible = this._isVisible) {\n this.div.classList.toggle(\"hidden\", !visible);\n this._isVisible = visible;\n }\n\n enable() {\n if (this.div) {\n this.div.tabIndex = 0;\n }\n this.#disabled = false;\n }\n\n disable() {\n if (this.div) {\n this.div.tabIndex = -1;\n }\n this.#disabled = true;\n }\n\n /**\n * Render an annotation in the annotation layer.\n * @param {Object} annotation\n * @returns {HTMLElement}\n */\n renderAnnotationElement(annotation) {\n let content = annotation.container.querySelector(\".annotationContent\");\n if (!content) {\n content = document.createElement(\"div\");\n content.classList.add(\"annotationContent\", this.editorType);\n annotation.container.prepend(content);\n } else if (content.nodeName === \"CANVAS\") {\n const canvas = content;\n content = document.createElement(\"div\");\n content.classList.add(\"annotationContent\", this.editorType);\n canvas.before(content);\n }\n\n return content;\n }\n\n resetAnnotationElement(annotation) {\n const { firstChild } = annotation.container;\n if (\n firstChild.nodeName === \"DIV\" &&\n firstChild.classList.contains(\"annotationContent\")\n ) {\n firstChild.remove();\n }\n }\n}\n\n// This class is used to fake an editor which has been deleted.\nclass FakeEditor extends AnnotationEditor {\n constructor(params) {\n super(params);\n this.annotationElementId = params.annotationElementId;\n this.deleted = true;\n }\n\n serialize() {\n return {\n id: this.annotationElementId,\n deleted: true,\n pageIndex: this.pageIndex,\n };\n }\n}\n\nexport { AnnotationEditor };\n","/* Copyright 2014 Opera Software ASA\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n *\n * Based on https://code.google.com/p/smhasher/wiki/MurmurHash3.\n * Hashes roughly 100 KB per millisecond on i7 3.4 GHz.\n */\n\nconst SEED = 0xc3d2e1f0;\n// Workaround for missing math precision in JS.\nconst MASK_HIGH = 0xffff0000;\nconst MASK_LOW = 0xffff;\n\nclass MurmurHash3_64 {\n constructor(seed) {\n this.h1 = seed ? seed & 0xffffffff : SEED;\n this.h2 = seed ? seed & 0xffffffff : SEED;\n }\n\n update(input) {\n let data, length;\n if (typeof input === \"string\") {\n data = new Uint8Array(input.length * 2);\n length = 0;\n for (let i = 0, ii = input.length; i < ii; i++) {\n const code = input.charCodeAt(i);\n if (code <= 0xff) {\n data[length++] = code;\n } else {\n data[length++] = code >>> 8;\n data[length++] = code & 0xff;\n }\n }\n } else if (ArrayBuffer.isView(input)) {\n data = input.slice();\n length = data.byteLength;\n } else {\n throw new Error(\"Invalid data format, must be a string or TypedArray.\");\n }\n\n const blockCounts = length >> 2;\n const tailLength = length - blockCounts * 4;\n // We don't care about endianness here.\n const dataUint32 = new Uint32Array(data.buffer, 0, blockCounts);\n let k1 = 0,\n k2 = 0;\n let h1 = this.h1,\n h2 = this.h2;\n const C1 = 0xcc9e2d51,\n C2 = 0x1b873593;\n const C1_LOW = C1 & MASK_LOW,\n C2_LOW = C2 & MASK_LOW;\n\n for (let i = 0; i < blockCounts; i++) {\n if (i & 1) {\n k1 = dataUint32[i];\n k1 = ((k1 * C1) & MASK_HIGH) | ((k1 * C1_LOW) & MASK_LOW);\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = ((k1 * C2) & MASK_HIGH) | ((k1 * C2_LOW) & MASK_LOW);\n h1 ^= k1;\n h1 = (h1 << 13) | (h1 >>> 19);\n h1 = h1 * 5 + 0xe6546b64;\n } else {\n k2 = dataUint32[i];\n k2 = ((k2 * C1) & MASK_HIGH) | ((k2 * C1_LOW) & MASK_LOW);\n k2 = (k2 << 15) | (k2 >>> 17);\n k2 = ((k2 * C2) & MASK_HIGH) | ((k2 * C2_LOW) & MASK_LOW);\n h2 ^= k2;\n h2 = (h2 << 13) | (h2 >>> 19);\n h2 = h2 * 5 + 0xe6546b64;\n }\n }\n\n k1 = 0;\n\n switch (tailLength) {\n case 3:\n k1 ^= data[blockCounts * 4 + 2] << 16;\n /* falls through */\n case 2:\n k1 ^= data[blockCounts * 4 + 1] << 8;\n /* falls through */\n case 1:\n k1 ^= data[blockCounts * 4];\n /* falls through */\n\n k1 = ((k1 * C1) & MASK_HIGH) | ((k1 * C1_LOW) & MASK_LOW);\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = ((k1 * C2) & MASK_HIGH) | ((k1 * C2_LOW) & MASK_LOW);\n if (blockCounts & 1) {\n h1 ^= k1;\n } else {\n h2 ^= k1;\n }\n }\n\n this.h1 = h1;\n this.h2 = h2;\n }\n\n hexdigest() {\n let h1 = this.h1,\n h2 = this.h2;\n\n h1 ^= h2 >>> 1;\n h1 = ((h1 * 0xed558ccd) & MASK_HIGH) | ((h1 * 0x8ccd) & MASK_LOW);\n h2 =\n ((h2 * 0xff51afd7) & MASK_HIGH) |\n (((((h2 << 16) | (h1 >>> 16)) * 0xafd7ed55) & MASK_HIGH) >>> 16);\n h1 ^= h2 >>> 1;\n h1 = ((h1 * 0x1a85ec53) & MASK_HIGH) | ((h1 * 0xec53) & MASK_LOW);\n h2 =\n ((h2 * 0xc4ceb9fe) & MASK_HIGH) |\n (((((h2 << 16) | (h1 >>> 16)) * 0xb9fe1a85) & MASK_HIGH) >>> 16);\n h1 ^= h2 >>> 1;\n\n return (\n (h1 >>> 0).toString(16).padStart(8, \"0\") +\n (h2 >>> 0).toString(16).padStart(8, \"0\")\n );\n }\n}\n\nexport { MurmurHash3_64 };\n","/* Copyright 2020 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { objectFromMap, unreachable } from \"../shared/util.js\";\nimport { AnnotationEditor } from \"./editor/editor.js\";\nimport { MurmurHash3_64 } from \"../shared/murmurhash3.js\";\n\nconst SerializableEmpty = Object.freeze({\n map: null,\n hash: \"\",\n transfer: undefined,\n});\n\n/**\n * Key/value storage for annotation data in forms.\n */\nclass AnnotationStorage {\n #modified = false;\n\n #storage = new Map();\n\n constructor() {\n // Callbacks to signal when the modification state is set or reset.\n // This is used by the viewer to only bind on `beforeunload` if forms\n // are actually edited to prevent doing so unconditionally since that\n // can have undesirable effects.\n this.onSetModified = null;\n this.onResetModified = null;\n this.onAnnotationEditor = null;\n }\n\n /**\n * Get the value for a given key if it exists, or return the default value.\n * @param {string} key\n * @param {Object} defaultValue\n * @returns {Object}\n */\n getValue(key, defaultValue) {\n const value = this.#storage.get(key);\n if (value === undefined) {\n return defaultValue;\n }\n\n return Object.assign(defaultValue, value);\n }\n\n /**\n * Get the value for a given key.\n * @param {string} key\n * @returns {Object}\n */\n getRawValue(key) {\n return this.#storage.get(key);\n }\n\n /**\n * Remove a value from the storage.\n * @param {string} key\n */\n remove(key) {\n this.#storage.delete(key);\n\n if (this.#storage.size === 0) {\n this.resetModified();\n }\n\n if (typeof this.onAnnotationEditor === \"function\") {\n for (const value of this.#storage.values()) {\n if (value instanceof AnnotationEditor) {\n return;\n }\n }\n this.onAnnotationEditor(null);\n }\n }\n\n /**\n * Set the value for a given key\n * @param {string} key\n * @param {Object} value\n */\n setValue(key, value) {\n const obj = this.#storage.get(key);\n let modified = false;\n if (obj !== undefined) {\n for (const [entry, val] of Object.entries(value)) {\n if (obj[entry] !== val) {\n modified = true;\n obj[entry] = val;\n }\n }\n } else {\n modified = true;\n this.#storage.set(key, value);\n }\n if (modified) {\n this.#setModified();\n }\n\n if (\n value instanceof AnnotationEditor &&\n typeof this.onAnnotationEditor === \"function\"\n ) {\n this.onAnnotationEditor(value.constructor._type);\n }\n }\n\n /**\n * Check if the storage contains the given key.\n * @param {string} key\n * @returns {boolean}\n */\n has(key) {\n return this.#storage.has(key);\n }\n\n /**\n * @returns {Object | null}\n */\n getAll() {\n return this.#storage.size > 0 ? objectFromMap(this.#storage) : null;\n }\n\n /**\n * @param {Object} obj\n */\n setAll(obj) {\n for (const [key, val] of Object.entries(obj)) {\n this.setValue(key, val);\n }\n }\n\n get size() {\n return this.#storage.size;\n }\n\n #setModified() {\n if (!this.#modified) {\n this.#modified = true;\n if (typeof this.onSetModified === \"function\") {\n this.onSetModified();\n }\n }\n }\n\n resetModified() {\n if (this.#modified) {\n this.#modified = false;\n if (typeof this.onResetModified === \"function\") {\n this.onResetModified();\n }\n }\n }\n\n /**\n * @returns {PrintAnnotationStorage}\n */\n get print() {\n return new PrintAnnotationStorage(this);\n }\n\n /**\n * PLEASE NOTE: Only intended for usage within the API itself.\n * @ignore\n */\n get serializable() {\n if (this.#storage.size === 0) {\n return SerializableEmpty;\n }\n const map = new Map(),\n hash = new MurmurHash3_64(),\n transfer = [];\n const context = Object.create(null);\n let hasBitmap = false;\n\n for (const [key, val] of this.#storage) {\n const serialized =\n val instanceof AnnotationEditor\n ? val.serialize(/* isForCopying = */ false, context)\n : val;\n if (serialized) {\n map.set(key, serialized);\n\n hash.update(`${key}:${JSON.stringify(serialized)}`);\n hasBitmap ||= !!serialized.bitmap;\n }\n }\n\n if (hasBitmap) {\n // We must transfer the bitmap data separately, since it can be changed\n // during serialization with SVG images.\n for (const value of map.values()) {\n if (value.bitmap) {\n transfer.push(value.bitmap);\n }\n }\n }\n\n return map.size > 0\n ? { map, hash: hash.hexdigest(), transfer }\n : SerializableEmpty;\n }\n\n get editorStats() {\n let stats = null;\n const typeToEditor = new Map();\n for (const value of this.#storage.values()) {\n if (!(value instanceof AnnotationEditor)) {\n continue;\n }\n const editorStats = value.telemetryFinalData;\n if (!editorStats) {\n continue;\n }\n const { type } = editorStats;\n if (!typeToEditor.has(type)) {\n typeToEditor.set(type, Object.getPrototypeOf(value).constructor);\n }\n stats ||= Object.create(null);\n const map = (stats[type] ||= new Map());\n for (const [key, val] of Object.entries(editorStats)) {\n if (key === \"type\") {\n continue;\n }\n let counters = map.get(key);\n if (!counters) {\n counters = new Map();\n map.set(key, counters);\n }\n const count = counters.get(val) ?? 0;\n counters.set(val, count + 1);\n }\n }\n for (const [type, editor] of typeToEditor) {\n stats[type] = editor.computeTelemetryFinalData(stats[type]);\n }\n return stats;\n }\n}\n\n/**\n * A special `AnnotationStorage` for use during printing, where the serializable\n * data is *frozen* upon initialization, to prevent scripting from modifying its\n * contents. (Necessary since printing is triggered synchronously in browsers.)\n */\nclass PrintAnnotationStorage extends AnnotationStorage {\n #serializable;\n\n constructor(parent) {\n super();\n const { map, hash, transfer } = parent.serializable;\n // Create a *copy* of the data, since Objects are passed by reference in JS.\n const clone = structuredClone(map, transfer ? { transfer } : null);\n\n this.#serializable = { map: clone, hash, transfer };\n }\n\n /**\n * @returns {PrintAnnotationStorage}\n */\n // eslint-disable-next-line getter-return\n get print() {\n unreachable(\"Should not call PrintAnnotationStorage.print\");\n }\n\n /**\n * PLEASE NOTE: Only intended for usage within the API itself.\n * @ignore\n */\n get serializable() {\n return this.#serializable;\n }\n}\n\nexport { AnnotationStorage, PrintAnnotationStorage, SerializableEmpty };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n assert,\n bytesToString,\n FontRenderOps,\n isNodeJS,\n shadow,\n string32,\n unreachable,\n warn,\n} from \"../shared/util.js\";\n\nclass FontLoader {\n #systemFonts = new Set();\n\n constructor({\n ownerDocument = globalThis.document,\n styleElement = null, // For testing only.\n }) {\n this._document = ownerDocument;\n\n this.nativeFontFaces = new Set();\n this.styleElement =\n typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")\n ? styleElement\n : null;\n\n if (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"MOZCENTRAL\")) {\n this.loadingRequests = [];\n this.loadTestFontId = 0;\n }\n }\n\n addNativeFontFace(nativeFontFace) {\n this.nativeFontFaces.add(nativeFontFace);\n this._document.fonts.add(nativeFontFace);\n }\n\n removeNativeFontFace(nativeFontFace) {\n this.nativeFontFaces.delete(nativeFontFace);\n this._document.fonts.delete(nativeFontFace);\n }\n\n insertRule(rule) {\n if (!this.styleElement) {\n this.styleElement = this._document.createElement(\"style\");\n this._document.documentElement\n .getElementsByTagName(\"head\")[0]\n .append(this.styleElement);\n }\n const styleSheet = this.styleElement.sheet;\n styleSheet.insertRule(rule, styleSheet.cssRules.length);\n }\n\n clear() {\n for (const nativeFontFace of this.nativeFontFaces) {\n this._document.fonts.delete(nativeFontFace);\n }\n this.nativeFontFaces.clear();\n this.#systemFonts.clear();\n\n if (this.styleElement) {\n // Note: ChildNode.remove doesn't throw if the parentNode is undefined.\n this.styleElement.remove();\n this.styleElement = null;\n }\n }\n\n async loadSystemFont({ systemFontInfo: info, _inspectFont }) {\n if (!info || this.#systemFonts.has(info.loadedName)) {\n return;\n }\n assert(\n !this.disableFontFace,\n \"loadSystemFont shouldn't be called when `disableFontFace` is set.\"\n );\n\n if (this.isFontLoadingAPISupported) {\n const { loadedName, src, style } = info;\n const fontFace = new FontFace(loadedName, src, style);\n this.addNativeFontFace(fontFace);\n try {\n await fontFace.load();\n this.#systemFonts.add(loadedName);\n _inspectFont?.(info);\n } catch {\n warn(\n `Cannot load system font: ${info.baseFontName}, installing it could help to improve PDF rendering.`\n );\n\n this.removeNativeFontFace(fontFace);\n }\n return;\n }\n\n unreachable(\n \"Not implemented: loadSystemFont without the Font Loading API.\"\n );\n }\n\n async bind(font) {\n // Add the font to the DOM only once; skip if the font is already loaded.\n if (font.attached || (font.missingFile && !font.systemFontInfo)) {\n return;\n }\n font.attached = true;\n\n if (font.systemFontInfo) {\n await this.loadSystemFont(font);\n return;\n }\n\n if (this.isFontLoadingAPISupported) {\n const nativeFontFace = font.createNativeFontFace();\n if (nativeFontFace) {\n this.addNativeFontFace(nativeFontFace);\n try {\n await nativeFontFace.loaded;\n } catch (ex) {\n warn(`Failed to load font '${nativeFontFace.family}': '${ex}'.`);\n\n // When font loading failed, fall back to the built-in font renderer.\n font.disableFontFace = true;\n throw ex;\n }\n }\n return; // The font was, asynchronously, loaded.\n }\n\n // !this.isFontLoadingAPISupported\n const rule = font.createFontFaceRule();\n if (rule) {\n this.insertRule(rule);\n\n if (this.isSyncFontLoadingSupported) {\n return; // The font was, synchronously, loaded.\n }\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n throw new Error(\"Not implemented: async font loading\");\n }\n await new Promise(resolve => {\n const request = this._queueLoadingCallback(resolve);\n this._prepareFontLoadEvent(font, request);\n });\n // The font was, asynchronously, loaded.\n }\n }\n\n get isFontLoadingAPISupported() {\n const hasFonts = !!this._document?.fonts;\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n return shadow(\n this,\n \"isFontLoadingAPISupported\",\n hasFonts && !this.styleElement\n );\n }\n return shadow(this, \"isFontLoadingAPISupported\", hasFonts);\n }\n\n get isSyncFontLoadingSupported() {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n return shadow(this, \"isSyncFontLoadingSupported\", true);\n }\n\n let supported = false;\n if (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"CHROME\")) {\n if (isNodeJS) {\n // Node.js - we can pretend that sync font loading is supported.\n supported = true;\n } else if (\n typeof navigator !== \"undefined\" &&\n typeof navigator?.userAgent === \"string\" &&\n // User agent string sniffing is bad, but there is no reliable way to\n // tell if the font is fully loaded and ready to be used with canvas.\n /Mozilla\\/5.0.*?rv:\\d+.*? Gecko/.test(navigator.userAgent)\n ) {\n // Firefox, from version 14, supports synchronous font loading.\n supported = true;\n }\n }\n return shadow(this, \"isSyncFontLoadingSupported\", supported);\n }\n\n _queueLoadingCallback(callback) {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n throw new Error(\"Not implemented: _queueLoadingCallback\");\n }\n\n function completeRequest() {\n assert(!request.done, \"completeRequest() cannot be called twice.\");\n request.done = true;\n\n // Sending all completed requests in order of how they were queued.\n while (loadingRequests.length > 0 && loadingRequests[0].done) {\n const otherRequest = loadingRequests.shift();\n setTimeout(otherRequest.callback, 0);\n }\n }\n\n const { loadingRequests } = this;\n const request = {\n done: false,\n complete: completeRequest,\n callback,\n };\n loadingRequests.push(request);\n return request;\n }\n\n get _loadTestFont() {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n throw new Error(\"Not implemented: _loadTestFont\");\n }\n\n // This is a CFF font with 1 glyph for '.' that fills its entire width\n // and height.\n const testFont = atob(\n \"T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQA\" +\n \"FQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAA\" +\n \"ALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgA\" +\n \"AAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1\" +\n \"AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD\" +\n \"6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACM\" +\n \"AooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4D\" +\n \"IP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAA\" +\n \"AAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUA\" +\n \"AQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgAB\" +\n \"AAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABY\" +\n \"AAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAA\" +\n \"AC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" +\n \"AAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" +\n \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" +\n \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" +\n \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" +\n \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAA\" +\n \"AAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQAC\" +\n \"AQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3\" +\n \"Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTj\" +\n \"FQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==\"\n );\n return shadow(this, \"_loadTestFont\", testFont);\n }\n\n _prepareFontLoadEvent(font, request) {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n throw new Error(\"Not implemented: _prepareFontLoadEvent\");\n }\n\n /** Hack begin */\n // There's currently no event when a font has finished downloading so the\n // following code is a dirty hack to 'guess' when a font is ready.\n // It's assumed fonts are loaded in order, so add a known test font after\n // the desired fonts and then test for the loading of that test font.\n\n function int32(data, offset) {\n return (\n (data.charCodeAt(offset) << 24) |\n (data.charCodeAt(offset + 1) << 16) |\n (data.charCodeAt(offset + 2) << 8) |\n (data.charCodeAt(offset + 3) & 0xff)\n );\n }\n function spliceString(s, offset, remove, insert) {\n const chunk1 = s.substring(0, offset);\n const chunk2 = s.substring(offset + remove);\n return chunk1 + insert + chunk2;\n }\n let i, ii;\n\n // The temporary canvas is used to determine if fonts are loaded.\n const canvas = this._document.createElement(\"canvas\");\n canvas.width = 1;\n canvas.height = 1;\n const ctx = canvas.getContext(\"2d\");\n\n let called = 0;\n function isFontReady(name, callback) {\n // With setTimeout clamping this gives the font ~100ms to load.\n if (++called > 30) {\n warn(\"Load test font never loaded.\");\n callback();\n return;\n }\n ctx.font = \"30px \" + name;\n ctx.fillText(\".\", 0, 20);\n const imageData = ctx.getImageData(0, 0, 1, 1);\n if (imageData.data[3] > 0) {\n callback();\n return;\n }\n setTimeout(isFontReady.bind(null, name, callback));\n }\n\n const loadTestFontId = `lt${Date.now()}${this.loadTestFontId++}`;\n // Chromium seems to cache fonts based on a hash of the actual font data,\n // so the font must be modified for each load test else it will appear to\n // be loaded already.\n // TODO: This could maybe be made faster by avoiding the btoa of the full\n // font by splitting it in chunks before hand and padding the font id.\n let data = this._loadTestFont;\n const COMMENT_OFFSET = 976; // has to be on 4 byte boundary (for checksum)\n data = spliceString(\n data,\n COMMENT_OFFSET,\n loadTestFontId.length,\n loadTestFontId\n );\n // CFF checksum is important for IE, adjusting it\n const CFF_CHECKSUM_OFFSET = 16;\n const XXXX_VALUE = 0x58585858; // the \"comment\" filled with 'X'\n let checksum = int32(data, CFF_CHECKSUM_OFFSET);\n for (i = 0, ii = loadTestFontId.length - 3; i < ii; i += 4) {\n checksum = (checksum - XXXX_VALUE + int32(loadTestFontId, i)) | 0;\n }\n if (i < loadTestFontId.length) {\n // align to 4 bytes boundary\n checksum = (checksum - XXXX_VALUE + int32(loadTestFontId + \"XXX\", i)) | 0;\n }\n data = spliceString(data, CFF_CHECKSUM_OFFSET, 4, string32(checksum));\n\n const url = `url(data:font/opentype;base64,${btoa(data)});`;\n const rule = `@font-face {font-family:\"${loadTestFontId}\";src:${url}}`;\n this.insertRule(rule);\n\n const div = this._document.createElement(\"div\");\n div.style.visibility = \"hidden\";\n div.style.width = div.style.height = \"10px\";\n div.style.position = \"absolute\";\n div.style.top = div.style.left = \"0px\";\n\n for (const name of [font.loadedName, loadTestFontId]) {\n const span = this._document.createElement(\"span\");\n span.textContent = \"Hi\";\n span.style.fontFamily = name;\n div.append(span);\n }\n this._document.body.append(div);\n\n isFontReady(loadTestFontId, () => {\n div.remove();\n request.complete();\n });\n /** Hack end */\n }\n}\n\nclass FontFaceObject {\n constructor(translatedData, { disableFontFace = false, inspectFont = null }) {\n this.compiledGlyphs = Object.create(null);\n // importing translated data\n for (const i in translatedData) {\n this[i] = translatedData[i];\n }\n this.disableFontFace = disableFontFace === true;\n this._inspectFont = inspectFont;\n }\n\n createNativeFontFace() {\n if (!this.data || this.disableFontFace) {\n return null;\n }\n let nativeFontFace;\n if (!this.cssFontInfo) {\n nativeFontFace = new FontFace(this.loadedName, this.data, {});\n } else {\n const css = {\n weight: this.cssFontInfo.fontWeight,\n };\n if (this.cssFontInfo.italicAngle) {\n css.style = `oblique ${this.cssFontInfo.italicAngle}deg`;\n }\n nativeFontFace = new FontFace(\n this.cssFontInfo.fontFamily,\n this.data,\n css\n );\n }\n\n this._inspectFont?.(this);\n return nativeFontFace;\n }\n\n createFontFaceRule() {\n if (!this.data || this.disableFontFace) {\n return null;\n }\n const data = bytesToString(this.data);\n // Add the @font-face rule to the document.\n const url = `url(data:${this.mimetype};base64,${btoa(data)});`;\n let rule;\n if (!this.cssFontInfo) {\n rule = `@font-face {font-family:\"${this.loadedName}\";src:${url}}`;\n } else {\n let css = `font-weight: ${this.cssFontInfo.fontWeight};`;\n if (this.cssFontInfo.italicAngle) {\n css += `font-style: oblique ${this.cssFontInfo.italicAngle}deg;`;\n }\n rule = `@font-face {font-family:\"${this.cssFontInfo.fontFamily}\";${css}src:${url}}`;\n }\n\n this._inspectFont?.(this, url);\n return rule;\n }\n\n getPathGenerator(objs, character) {\n if (this.compiledGlyphs[character] !== undefined) {\n return this.compiledGlyphs[character];\n }\n\n let cmds;\n try {\n cmds = objs.get(this.loadedName + \"_path_\" + character);\n } catch (ex) {\n warn(`getPathGenerator - ignoring character: \"${ex}\".`);\n }\n\n if (!Array.isArray(cmds) || cmds.length === 0) {\n return (this.compiledGlyphs[character] = function (c, size) {\n // No-op function, to allow rendering to continue.\n });\n }\n\n const commands = [];\n for (let i = 0, ii = cmds.length; i < ii; ) {\n switch (cmds[i++]) {\n case FontRenderOps.BEZIER_CURVE_TO:\n {\n const [a, b, c, d, e, f] = cmds.slice(i, i + 6);\n commands.push(ctx => ctx.bezierCurveTo(a, b, c, d, e, f));\n i += 6;\n }\n break;\n case FontRenderOps.MOVE_TO:\n {\n const [a, b] = cmds.slice(i, i + 2);\n commands.push(ctx => ctx.moveTo(a, b));\n i += 2;\n }\n break;\n case FontRenderOps.LINE_TO:\n {\n const [a, b] = cmds.slice(i, i + 2);\n commands.push(ctx => ctx.lineTo(a, b));\n i += 2;\n }\n break;\n case FontRenderOps.QUADRATIC_CURVE_TO:\n {\n const [a, b, c, d] = cmds.slice(i, i + 4);\n commands.push(ctx => ctx.quadraticCurveTo(a, b, c, d));\n i += 4;\n }\n break;\n case FontRenderOps.RESTORE:\n commands.push(ctx => ctx.restore());\n break;\n case FontRenderOps.SAVE:\n commands.push(ctx => ctx.save());\n break;\n case FontRenderOps.SCALE:\n // The scale command must be at the third position, after save and\n // transform (for the font matrix) commands (see also\n // font_renderer.js).\n // The goal is to just scale the canvas and then run the commands loop\n // without the need to pass the size parameter to each command.\n assert(\n commands.length === 2,\n \"Scale command is only valid at the third position.\"\n );\n break;\n case FontRenderOps.TRANSFORM:\n {\n const [a, b, c, d, e, f] = cmds.slice(i, i + 6);\n commands.push(ctx => ctx.transform(a, b, c, d, e, f));\n i += 6;\n }\n break;\n case FontRenderOps.TRANSLATE:\n {\n const [a, b] = cmds.slice(i, i + 2);\n commands.push(ctx => ctx.translate(a, b));\n i += 2;\n }\n break;\n }\n }\n\n return (this.compiledGlyphs[character] = function glyphDrawer(ctx, size) {\n commands[0](ctx);\n commands[1](ctx);\n ctx.scale(size, -size);\n for (let i = 2, ii = commands.length; i < ii; i++) {\n commands[i](ctx);\n }\n });\n }\n}\n\nexport { FontFaceObject, FontLoader };\n","/* Copyright 2020 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n BaseCanvasFactory,\n BaseCMapReaderFactory,\n BaseFilterFactory,\n BaseStandardFontDataFactory,\n} from \"./base_factory.js\";\nimport { isNodeJS, warn } from \"../shared/util.js\";\n\nif (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n throw new Error(\n 'Module \"./node_utils.js\" shall not be used with MOZCENTRAL builds.'\n );\n}\n\nif (isNodeJS) {\n // eslint-disable-next-line no-var\n var packageCapability = Promise.withResolvers();\n // eslint-disable-next-line no-var\n var packageMap = null;\n\n const loadPackages = async () => {\n // Native packages.\n const fs = await __non_webpack_import__(\"fs\"),\n http = await __non_webpack_import__(\"http\"),\n https = await __non_webpack_import__(\"https\"),\n url = await __non_webpack_import__(\"url\");\n\n // Optional, third-party, packages.\n let canvas, path2d;\n if (typeof PDFJSDev !== \"undefined\" && !PDFJSDev.test(\"SKIP_BABEL\")) {\n try {\n canvas = await __non_webpack_import__(\"canvas\");\n } catch {}\n try {\n path2d = await __non_webpack_import__(\"path2d\");\n } catch {}\n }\n\n return new Map(Object.entries({ fs, http, https, url, canvas, path2d }));\n };\n\n loadPackages().then(\n map => {\n packageMap = map;\n packageCapability.resolve();\n\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"SKIP_BABEL\")) {\n return;\n }\n if (!globalThis.DOMMatrix) {\n const DOMMatrix = map.get(\"canvas\")?.DOMMatrix;\n\n if (DOMMatrix) {\n globalThis.DOMMatrix = DOMMatrix;\n } else {\n warn(\"Cannot polyfill `DOMMatrix`, rendering may be broken.\");\n }\n }\n if (!globalThis.Path2D) {\n const CanvasRenderingContext2D =\n map.get(\"canvas\")?.CanvasRenderingContext2D;\n const applyPath2DToCanvasRenderingContext =\n map.get(\"path2d\")?.applyPath2DToCanvasRenderingContext;\n const Path2D = map.get(\"path2d\")?.Path2D;\n\n if (\n CanvasRenderingContext2D &&\n applyPath2DToCanvasRenderingContext &&\n Path2D\n ) {\n applyPath2DToCanvasRenderingContext(CanvasRenderingContext2D);\n globalThis.Path2D = Path2D;\n } else {\n warn(\"Cannot polyfill `Path2D`, rendering may be broken.\");\n }\n }\n },\n reason => {\n warn(`loadPackages: ${reason}`);\n\n packageMap = new Map();\n packageCapability.resolve();\n }\n );\n}\n\nclass NodePackages {\n static get promise() {\n return packageCapability.promise;\n }\n\n static get(name) {\n return packageMap?.get(name);\n }\n}\n\nconst fetchData = function (url) {\n const fs = NodePackages.get(\"fs\");\n return fs.promises.readFile(url).then(data => new Uint8Array(data));\n};\n\nclass NodeFilterFactory extends BaseFilterFactory {}\n\nclass NodeCanvasFactory extends BaseCanvasFactory {\n /**\n * @ignore\n */\n _createCanvas(width, height) {\n const canvas = NodePackages.get(\"canvas\");\n return canvas.createCanvas(width, height);\n }\n}\n\nclass NodeCMapReaderFactory extends BaseCMapReaderFactory {\n /**\n * @ignore\n */\n _fetchData(url, compressionType) {\n return fetchData(url).then(data => ({ cMapData: data, compressionType }));\n }\n}\n\nclass NodeStandardFontDataFactory extends BaseStandardFontDataFactory {\n /**\n * @ignore\n */\n _fetchData(url) {\n return fetchData(url);\n }\n}\n\nexport {\n NodeCanvasFactory,\n NodeCMapReaderFactory,\n NodeFilterFactory,\n NodePackages,\n NodeStandardFontDataFactory,\n};\n","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FormatError, info, unreachable, Util } from \"../shared/util.js\";\nimport { getCurrentTransform } from \"./display_utils.js\";\n\nconst PathType = {\n FILL: \"Fill\",\n STROKE: \"Stroke\",\n SHADING: \"Shading\",\n};\n\nfunction applyBoundingBox(ctx, bbox) {\n if (!bbox) {\n return;\n }\n const width = bbox[2] - bbox[0];\n const height = bbox[3] - bbox[1];\n const region = new Path2D();\n region.rect(bbox[0], bbox[1], width, height);\n ctx.clip(region);\n}\n\nclass BaseShadingPattern {\n constructor() {\n if (this.constructor === BaseShadingPattern) {\n unreachable(\"Cannot initialize BaseShadingPattern.\");\n }\n }\n\n getPattern() {\n unreachable(\"Abstract method `getPattern` called.\");\n }\n}\n\nclass RadialAxialShadingPattern extends BaseShadingPattern {\n constructor(IR) {\n super();\n this._type = IR[1];\n this._bbox = IR[2];\n this._colorStops = IR[3];\n this._p0 = IR[4];\n this._p1 = IR[5];\n this._r0 = IR[6];\n this._r1 = IR[7];\n this.matrix = null;\n }\n\n _createGradient(ctx) {\n let grad;\n if (this._type === \"axial\") {\n grad = ctx.createLinearGradient(\n this._p0[0],\n this._p0[1],\n this._p1[0],\n this._p1[1]\n );\n } else if (this._type === \"radial\") {\n grad = ctx.createRadialGradient(\n this._p0[0],\n this._p0[1],\n this._r0,\n this._p1[0],\n this._p1[1],\n this._r1\n );\n }\n\n for (const colorStop of this._colorStops) {\n grad.addColorStop(colorStop[0], colorStop[1]);\n }\n return grad;\n }\n\n getPattern(ctx, owner, inverse, pathType) {\n let pattern;\n if (pathType === PathType.STROKE || pathType === PathType.FILL) {\n const ownerBBox = owner.current.getClippedPathBoundingBox(\n pathType,\n getCurrentTransform(ctx)\n ) || [0, 0, 0, 0];\n // Create a canvas that is only as big as the current path. This doesn't\n // allow us to cache the pattern, but it generally creates much smaller\n // canvases and saves memory use. See bug 1722807 for an example.\n const width = Math.ceil(ownerBBox[2] - ownerBBox[0]) || 1;\n const height = Math.ceil(ownerBBox[3] - ownerBBox[1]) || 1;\n\n const tmpCanvas = owner.cachedCanvases.getCanvas(\n \"pattern\",\n width,\n height,\n true\n );\n\n const tmpCtx = tmpCanvas.context;\n tmpCtx.clearRect(0, 0, tmpCtx.canvas.width, tmpCtx.canvas.height);\n tmpCtx.beginPath();\n tmpCtx.rect(0, 0, tmpCtx.canvas.width, tmpCtx.canvas.height);\n // Non shading fill patterns are positioned relative to the base transform\n // (usually the page's initial transform), but we may have created a\n // smaller canvas based on the path, so we must account for the shift.\n tmpCtx.translate(-ownerBBox[0], -ownerBBox[1]);\n inverse = Util.transform(inverse, [\n 1,\n 0,\n 0,\n 1,\n ownerBBox[0],\n ownerBBox[1],\n ]);\n\n tmpCtx.transform(...owner.baseTransform);\n if (this.matrix) {\n tmpCtx.transform(...this.matrix);\n }\n applyBoundingBox(tmpCtx, this._bbox);\n\n tmpCtx.fillStyle = this._createGradient(tmpCtx);\n tmpCtx.fill();\n\n pattern = ctx.createPattern(tmpCanvas.canvas, \"no-repeat\");\n const domMatrix = new DOMMatrix(inverse);\n pattern.setTransform(domMatrix);\n } else {\n // Shading fills are applied relative to the current matrix which is also\n // how canvas gradients work, so there's no need to do anything special\n // here.\n applyBoundingBox(ctx, this._bbox);\n pattern = this._createGradient(ctx);\n }\n return pattern;\n }\n}\n\nfunction drawTriangle(data, context, p1, p2, p3, c1, c2, c3) {\n // Very basic Gouraud-shaded triangle rasterization algorithm.\n const coords = context.coords,\n colors = context.colors;\n const bytes = data.data,\n rowSize = data.width * 4;\n let tmp;\n if (coords[p1 + 1] > coords[p2 + 1]) {\n tmp = p1;\n p1 = p2;\n p2 = tmp;\n tmp = c1;\n c1 = c2;\n c2 = tmp;\n }\n if (coords[p2 + 1] > coords[p3 + 1]) {\n tmp = p2;\n p2 = p3;\n p3 = tmp;\n tmp = c2;\n c2 = c3;\n c3 = tmp;\n }\n if (coords[p1 + 1] > coords[p2 + 1]) {\n tmp = p1;\n p1 = p2;\n p2 = tmp;\n tmp = c1;\n c1 = c2;\n c2 = tmp;\n }\n const x1 = (coords[p1] + context.offsetX) * context.scaleX;\n const y1 = (coords[p1 + 1] + context.offsetY) * context.scaleY;\n const x2 = (coords[p2] + context.offsetX) * context.scaleX;\n const y2 = (coords[p2 + 1] + context.offsetY) * context.scaleY;\n const x3 = (coords[p3] + context.offsetX) * context.scaleX;\n const y3 = (coords[p3 + 1] + context.offsetY) * context.scaleY;\n if (y1 >= y3) {\n return;\n }\n const c1r = colors[c1],\n c1g = colors[c1 + 1],\n c1b = colors[c1 + 2];\n const c2r = colors[c2],\n c2g = colors[c2 + 1],\n c2b = colors[c2 + 2];\n const c3r = colors[c3],\n c3g = colors[c3 + 1],\n c3b = colors[c3 + 2];\n\n const minY = Math.round(y1),\n maxY = Math.round(y3);\n let xa, car, cag, cab;\n let xb, cbr, cbg, cbb;\n for (let y = minY; y <= maxY; y++) {\n if (y < y2) {\n const k = y < y1 ? 0 : (y1 - y) / (y1 - y2);\n xa = x1 - (x1 - x2) * k;\n car = c1r - (c1r - c2r) * k;\n cag = c1g - (c1g - c2g) * k;\n cab = c1b - (c1b - c2b) * k;\n } else {\n let k;\n if (y > y3) {\n k = 1;\n } else if (y2 === y3) {\n k = 0;\n } else {\n k = (y2 - y) / (y2 - y3);\n }\n xa = x2 - (x2 - x3) * k;\n car = c2r - (c2r - c3r) * k;\n cag = c2g - (c2g - c3g) * k;\n cab = c2b - (c2b - c3b) * k;\n }\n\n let k;\n if (y < y1) {\n k = 0;\n } else if (y > y3) {\n k = 1;\n } else {\n k = (y1 - y) / (y1 - y3);\n }\n xb = x1 - (x1 - x3) * k;\n cbr = c1r - (c1r - c3r) * k;\n cbg = c1g - (c1g - c3g) * k;\n cbb = c1b - (c1b - c3b) * k;\n const x1_ = Math.round(Math.min(xa, xb));\n const x2_ = Math.round(Math.max(xa, xb));\n let j = rowSize * y + x1_ * 4;\n for (let x = x1_; x <= x2_; x++) {\n k = (xa - x) / (xa - xb);\n if (k < 0) {\n k = 0;\n } else if (k > 1) {\n k = 1;\n }\n bytes[j++] = (car - (car - cbr) * k) | 0;\n bytes[j++] = (cag - (cag - cbg) * k) | 0;\n bytes[j++] = (cab - (cab - cbb) * k) | 0;\n bytes[j++] = 255;\n }\n }\n}\n\nfunction drawFigure(data, figure, context) {\n const ps = figure.coords;\n const cs = figure.colors;\n let i, ii;\n switch (figure.type) {\n case \"lattice\":\n const verticesPerRow = figure.verticesPerRow;\n const rows = Math.floor(ps.length / verticesPerRow) - 1;\n const cols = verticesPerRow - 1;\n for (i = 0; i < rows; i++) {\n let q = i * verticesPerRow;\n for (let j = 0; j < cols; j++, q++) {\n drawTriangle(\n data,\n context,\n ps[q],\n ps[q + 1],\n ps[q + verticesPerRow],\n cs[q],\n cs[q + 1],\n cs[q + verticesPerRow]\n );\n drawTriangle(\n data,\n context,\n ps[q + verticesPerRow + 1],\n ps[q + 1],\n ps[q + verticesPerRow],\n cs[q + verticesPerRow + 1],\n cs[q + 1],\n cs[q + verticesPerRow]\n );\n }\n }\n break;\n case \"triangles\":\n for (i = 0, ii = ps.length; i < ii; i += 3) {\n drawTriangle(\n data,\n context,\n ps[i],\n ps[i + 1],\n ps[i + 2],\n cs[i],\n cs[i + 1],\n cs[i + 2]\n );\n }\n break;\n default:\n throw new Error(\"illegal figure\");\n }\n}\n\nclass MeshShadingPattern extends BaseShadingPattern {\n constructor(IR) {\n super();\n this._coords = IR[2];\n this._colors = IR[3];\n this._figures = IR[4];\n this._bounds = IR[5];\n this._bbox = IR[7];\n this._background = IR[8];\n this.matrix = null;\n }\n\n _createMeshCanvas(combinedScale, backgroundColor, cachedCanvases) {\n // we will increase scale on some weird factor to let antialiasing take\n // care of \"rough\" edges\n const EXPECTED_SCALE = 1.1;\n // MAX_PATTERN_SIZE is used to avoid OOM situation.\n const MAX_PATTERN_SIZE = 3000; // 10in @ 300dpi shall be enough\n // We need to keep transparent border around our pattern for fill():\n // createPattern with 'no-repeat' will bleed edges across entire area.\n const BORDER_SIZE = 2;\n\n const offsetX = Math.floor(this._bounds[0]);\n const offsetY = Math.floor(this._bounds[1]);\n const boundsWidth = Math.ceil(this._bounds[2]) - offsetX;\n const boundsHeight = Math.ceil(this._bounds[3]) - offsetY;\n\n const width = Math.min(\n Math.ceil(Math.abs(boundsWidth * combinedScale[0] * EXPECTED_SCALE)),\n MAX_PATTERN_SIZE\n );\n const height = Math.min(\n Math.ceil(Math.abs(boundsHeight * combinedScale[1] * EXPECTED_SCALE)),\n MAX_PATTERN_SIZE\n );\n const scaleX = boundsWidth / width;\n const scaleY = boundsHeight / height;\n\n const context = {\n coords: this._coords,\n colors: this._colors,\n offsetX: -offsetX,\n offsetY: -offsetY,\n scaleX: 1 / scaleX,\n scaleY: 1 / scaleY,\n };\n\n const paddedWidth = width + BORDER_SIZE * 2;\n const paddedHeight = height + BORDER_SIZE * 2;\n\n const tmpCanvas = cachedCanvases.getCanvas(\n \"mesh\",\n paddedWidth,\n paddedHeight,\n false\n );\n const tmpCtx = tmpCanvas.context;\n\n const data = tmpCtx.createImageData(width, height);\n if (backgroundColor) {\n const bytes = data.data;\n for (let i = 0, ii = bytes.length; i < ii; i += 4) {\n bytes[i] = backgroundColor[0];\n bytes[i + 1] = backgroundColor[1];\n bytes[i + 2] = backgroundColor[2];\n bytes[i + 3] = 255;\n }\n }\n for (const figure of this._figures) {\n drawFigure(data, figure, context);\n }\n tmpCtx.putImageData(data, BORDER_SIZE, BORDER_SIZE);\n const canvas = tmpCanvas.canvas;\n\n return {\n canvas,\n offsetX: offsetX - BORDER_SIZE * scaleX,\n offsetY: offsetY - BORDER_SIZE * scaleY,\n scaleX,\n scaleY,\n };\n }\n\n getPattern(ctx, owner, inverse, pathType) {\n applyBoundingBox(ctx, this._bbox);\n let scale;\n if (pathType === PathType.SHADING) {\n scale = Util.singularValueDecompose2dScale(getCurrentTransform(ctx));\n } else {\n // Obtain scale from matrix and current transformation matrix.\n scale = Util.singularValueDecompose2dScale(owner.baseTransform);\n if (this.matrix) {\n const matrixScale = Util.singularValueDecompose2dScale(this.matrix);\n scale = [scale[0] * matrixScale[0], scale[1] * matrixScale[1]];\n }\n }\n\n // Rasterizing on the main thread since sending/queue large canvases\n // might cause OOM.\n const temporaryPatternCanvas = this._createMeshCanvas(\n scale,\n pathType === PathType.SHADING ? null : this._background,\n owner.cachedCanvases\n );\n\n if (pathType !== PathType.SHADING) {\n ctx.setTransform(...owner.baseTransform);\n if (this.matrix) {\n ctx.transform(...this.matrix);\n }\n }\n\n ctx.translate(\n temporaryPatternCanvas.offsetX,\n temporaryPatternCanvas.offsetY\n );\n ctx.scale(temporaryPatternCanvas.scaleX, temporaryPatternCanvas.scaleY);\n\n return ctx.createPattern(temporaryPatternCanvas.canvas, \"no-repeat\");\n }\n}\n\nclass DummyShadingPattern extends BaseShadingPattern {\n getPattern() {\n return \"hotpink\";\n }\n}\n\nfunction getShadingPattern(IR) {\n switch (IR[0]) {\n case \"RadialAxial\":\n return new RadialAxialShadingPattern(IR);\n case \"Mesh\":\n return new MeshShadingPattern(IR);\n case \"Dummy\":\n return new DummyShadingPattern();\n }\n throw new Error(`Unknown IR type: ${IR[0]}`);\n}\n\nconst PaintType = {\n COLORED: 1,\n UNCOLORED: 2,\n};\n\nclass TilingPattern {\n // 10in @ 300dpi shall be enough.\n static MAX_PATTERN_SIZE = 3000;\n\n constructor(IR, color, ctx, canvasGraphicsFactory, baseTransform) {\n this.operatorList = IR[2];\n this.matrix = IR[3];\n this.bbox = IR[4];\n this.xstep = IR[5];\n this.ystep = IR[6];\n this.paintType = IR[7];\n this.tilingType = IR[8];\n this.color = color;\n this.ctx = ctx;\n this.canvasGraphicsFactory = canvasGraphicsFactory;\n this.baseTransform = baseTransform;\n }\n\n createPatternCanvas(owner) {\n const operatorList = this.operatorList;\n const bbox = this.bbox;\n const xstep = this.xstep;\n const ystep = this.ystep;\n const paintType = this.paintType;\n const tilingType = this.tilingType;\n const color = this.color;\n const canvasGraphicsFactory = this.canvasGraphicsFactory;\n\n info(\"TilingType: \" + tilingType);\n\n // A tiling pattern as defined by PDF spec 8.7.2 is a cell whose size is\n // described by bbox, and may repeat regularly by shifting the cell by\n // xstep and ystep.\n // Because the HTML5 canvas API does not support pattern repetition with\n // gaps in between, we use the xstep/ystep instead of the bbox's size.\n //\n // This has the following consequences (similarly for ystep):\n //\n // - If xstep is the same as bbox, then there is no observable difference.\n //\n // - If xstep is larger than bbox, then the pattern canvas is partially\n // empty: the area bounded by bbox is painted, the outside area is void.\n //\n // - If xstep is smaller than bbox, then the pixels between xstep and the\n // bbox boundary will be missing. This is INCORRECT behavior.\n // \"Figures on adjacent tiles should not overlap\" (PDF spec 8.7.3.1),\n // but overlapping cells without common pixels are still valid.\n // TODO: Fix the implementation, to allow this scenario to be painted\n // correctly.\n\n const x0 = bbox[0],\n y0 = bbox[1],\n x1 = bbox[2],\n y1 = bbox[3];\n\n // Obtain scale from matrix and current transformation matrix.\n const matrixScale = Util.singularValueDecompose2dScale(this.matrix);\n const curMatrixScale = Util.singularValueDecompose2dScale(\n this.baseTransform\n );\n const combinedScale = [\n matrixScale[0] * curMatrixScale[0],\n matrixScale[1] * curMatrixScale[1],\n ];\n\n // Use width and height values that are as close as possible to the end\n // result when the pattern is used. Too low value makes the pattern look\n // blurry. Too large value makes it look too crispy.\n const dimx = this.getSizeAndScale(\n xstep,\n this.ctx.canvas.width,\n combinedScale[0]\n );\n const dimy = this.getSizeAndScale(\n ystep,\n this.ctx.canvas.height,\n combinedScale[1]\n );\n\n const tmpCanvas = owner.cachedCanvases.getCanvas(\n \"pattern\",\n dimx.size,\n dimy.size,\n true\n );\n const tmpCtx = tmpCanvas.context;\n const graphics = canvasGraphicsFactory.createCanvasGraphics(tmpCtx);\n graphics.groupLevel = owner.groupLevel;\n\n this.setFillAndStrokeStyleToContext(graphics, paintType, color);\n\n let adjustedX0 = x0;\n let adjustedY0 = y0;\n let adjustedX1 = x1;\n let adjustedY1 = y1;\n // Some bounding boxes have negative x0/y0 coordinates which will cause the\n // some of the drawing to be off of the canvas. To avoid this shift the\n // bounding box over.\n if (x0 < 0) {\n adjustedX0 = 0;\n adjustedX1 += Math.abs(x0);\n }\n if (y0 < 0) {\n adjustedY0 = 0;\n adjustedY1 += Math.abs(y0);\n }\n tmpCtx.translate(-(dimx.scale * adjustedX0), -(dimy.scale * adjustedY0));\n graphics.transform(dimx.scale, 0, 0, dimy.scale, 0, 0);\n\n // To match CanvasGraphics beginDrawing we must save the context here or\n // else we end up with unbalanced save/restores.\n tmpCtx.save();\n\n this.clipBbox(graphics, adjustedX0, adjustedY0, adjustedX1, adjustedY1);\n\n graphics.baseTransform = getCurrentTransform(graphics.ctx);\n\n graphics.executeOperatorList(operatorList);\n\n graphics.endDrawing();\n\n return {\n canvas: tmpCanvas.canvas,\n scaleX: dimx.scale,\n scaleY: dimy.scale,\n offsetX: adjustedX0,\n offsetY: adjustedY0,\n };\n }\n\n getSizeAndScale(step, realOutputSize, scale) {\n // xstep / ystep may be negative -- normalize.\n step = Math.abs(step);\n // MAX_PATTERN_SIZE is used to avoid OOM situation.\n // Use the destination canvas's size if it is bigger than the hard-coded\n // limit of MAX_PATTERN_SIZE to avoid clipping patterns that cover the\n // whole canvas.\n const maxSize = Math.max(TilingPattern.MAX_PATTERN_SIZE, realOutputSize);\n let size = Math.ceil(step * scale);\n if (size >= maxSize) {\n size = maxSize;\n } else {\n scale = size / step;\n }\n return { scale, size };\n }\n\n clipBbox(graphics, x0, y0, x1, y1) {\n const bboxWidth = x1 - x0;\n const bboxHeight = y1 - y0;\n graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight);\n graphics.current.updateRectMinMax(getCurrentTransform(graphics.ctx), [\n x0,\n y0,\n x1,\n y1,\n ]);\n graphics.clip();\n graphics.endPath();\n }\n\n setFillAndStrokeStyleToContext(graphics, paintType, color) {\n const context = graphics.ctx,\n current = graphics.current;\n switch (paintType) {\n case PaintType.COLORED:\n const ctx = this.ctx;\n context.fillStyle = ctx.fillStyle;\n context.strokeStyle = ctx.strokeStyle;\n current.fillColor = ctx.fillStyle;\n current.strokeColor = ctx.strokeStyle;\n break;\n case PaintType.UNCOLORED:\n const cssColor = Util.makeHexColor(color[0], color[1], color[2]);\n context.fillStyle = cssColor;\n context.strokeStyle = cssColor;\n // Set color needed by image masks (fixes issues 3226 and 8741).\n current.fillColor = cssColor;\n current.strokeColor = cssColor;\n break;\n default:\n throw new FormatError(`Unsupported paint type: ${paintType}`);\n }\n }\n\n getPattern(ctx, owner, inverse, pathType) {\n // PDF spec 8.7.2 NOTE 1: pattern's matrix is relative to initial matrix.\n let matrix = inverse;\n if (pathType !== PathType.SHADING) {\n matrix = Util.transform(matrix, owner.baseTransform);\n if (this.matrix) {\n matrix = Util.transform(matrix, this.matrix);\n }\n }\n\n const temporaryPatternCanvas = this.createPatternCanvas(owner);\n\n let domMatrix = new DOMMatrix(matrix);\n // Rescale and so that the ctx.createPattern call generates a pattern with\n // the desired size.\n domMatrix = domMatrix.translate(\n temporaryPatternCanvas.offsetX,\n temporaryPatternCanvas.offsetY\n );\n domMatrix = domMatrix.scale(\n 1 / temporaryPatternCanvas.scaleX,\n 1 / temporaryPatternCanvas.scaleY\n );\n\n const pattern = ctx.createPattern(temporaryPatternCanvas.canvas, \"repeat\");\n pattern.setTransform(domMatrix);\n\n return pattern;\n }\n}\n\nexport { getShadingPattern, PathType, TilingPattern };\n","/* Copyright 2022 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FeatureTest, ImageKind } from \"./util.js\";\n\nfunction convertToRGBA(params) {\n switch (params.kind) {\n case ImageKind.GRAYSCALE_1BPP:\n return convertBlackAndWhiteToRGBA(params);\n case ImageKind.RGB_24BPP:\n return convertRGBToRGBA(params);\n }\n\n return null;\n}\n\nfunction convertBlackAndWhiteToRGBA({\n src,\n srcPos = 0,\n dest,\n width,\n height,\n nonBlackColor = 0xffffffff,\n inverseDecode = false,\n}) {\n const black = FeatureTest.isLittleEndian ? 0xff000000 : 0x000000ff;\n const [zeroMapping, oneMapping] = inverseDecode\n ? [nonBlackColor, black]\n : [black, nonBlackColor];\n const widthInSource = width >> 3;\n const widthRemainder = width & 7;\n const srcLength = src.length;\n dest = new Uint32Array(dest.buffer);\n let destPos = 0;\n\n for (let i = 0; i < height; i++) {\n for (const max = srcPos + widthInSource; srcPos < max; srcPos++) {\n const elem = srcPos < srcLength ? src[srcPos] : 255;\n dest[destPos++] = elem & 0b10000000 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b1000000 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b100000 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b10000 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b1000 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b100 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b10 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b1 ? oneMapping : zeroMapping;\n }\n if (widthRemainder === 0) {\n continue;\n }\n const elem = srcPos < srcLength ? src[srcPos++] : 255;\n for (let j = 0; j < widthRemainder; j++) {\n dest[destPos++] = elem & (1 << (7 - j)) ? oneMapping : zeroMapping;\n }\n }\n return { srcPos, destPos };\n}\n\nfunction convertRGBToRGBA({\n src,\n srcPos = 0,\n dest,\n destPos = 0,\n width,\n height,\n}) {\n let i = 0;\n const len32 = src.length >> 2;\n const src32 = new Uint32Array(src.buffer, srcPos, len32);\n\n if (FeatureTest.isLittleEndian) {\n // It's a way faster to do the shuffle manually instead of working\n // component by component with some Uint8 arrays.\n for (; i < len32 - 2; i += 3, destPos += 4) {\n const s1 = src32[i]; // R2B1G1R1\n const s2 = src32[i + 1]; // G3R3B2G2\n const s3 = src32[i + 2]; // B4G4R4B3\n\n dest[destPos] = s1 | 0xff000000;\n dest[destPos + 1] = (s1 >>> 24) | (s2 << 8) | 0xff000000;\n dest[destPos + 2] = (s2 >>> 16) | (s3 << 16) | 0xff000000;\n dest[destPos + 3] = (s3 >>> 8) | 0xff000000;\n }\n\n for (let j = i * 4, jj = src.length; j < jj; j += 3) {\n dest[destPos++] =\n src[j] | (src[j + 1] << 8) | (src[j + 2] << 16) | 0xff000000;\n }\n } else {\n for (; i < len32 - 2; i += 3, destPos += 4) {\n const s1 = src32[i]; // R1G1B1R2\n const s2 = src32[i + 1]; // G2B2R3G3\n const s3 = src32[i + 2]; // B3R4G4B4\n\n dest[destPos] = s1 | 0xff;\n dest[destPos + 1] = (s1 << 24) | (s2 >>> 8) | 0xff;\n dest[destPos + 2] = (s2 << 16) | (s3 >>> 16) | 0xff;\n dest[destPos + 3] = (s3 << 8) | 0xff;\n }\n\n for (let j = i * 4, jj = src.length; j < jj; j += 3) {\n dest[destPos++] =\n (src[j] << 24) | (src[j + 1] << 16) | (src[j + 2] << 8) | 0xff;\n }\n }\n\n return { srcPos, destPos };\n}\n\nfunction grayToRGBA(src, dest) {\n if (FeatureTest.isLittleEndian) {\n for (let i = 0, ii = src.length; i < ii; i++) {\n dest[i] = (src[i] * 0x10101) | 0xff000000;\n }\n } else {\n for (let i = 0, ii = src.length; i < ii; i++) {\n dest[i] = (src[i] * 0x1010100) | 0x000000ff;\n }\n }\n}\n\nexport { convertBlackAndWhiteToRGBA, convertToRGBA, grayToRGBA };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n FeatureTest,\n FONT_IDENTITY_MATRIX,\n IDENTITY_MATRIX,\n ImageKind,\n info,\n isNodeJS,\n OPS,\n shadow,\n TextRenderingMode,\n unreachable,\n Util,\n warn,\n} from \"../shared/util.js\";\nimport {\n getCurrentTransform,\n getCurrentTransformInverse,\n PixelsPerInch,\n} from \"./display_utils.js\";\nimport {\n getShadingPattern,\n PathType,\n TilingPattern,\n} from \"./pattern_helper.js\";\nimport { convertBlackAndWhiteToRGBA } from \"../shared/image_utils.js\";\n\n// contexts store most of the state we need natively.\n// However, PDF needs a bit more state, which we store here.\n// Minimal font size that would be used during canvas fillText operations.\nconst MIN_FONT_SIZE = 16;\n// Maximum font size that would be used during canvas fillText operations.\nconst MAX_FONT_SIZE = 100;\n\n// Defines the time the `executeOperatorList`-method is going to be executing\n// before it stops and schedules a continue of execution.\nconst EXECUTION_TIME = 15; // ms\n// Defines the number of steps before checking the execution time.\nconst EXECUTION_STEPS = 10;\n\n// To disable Type3 compilation, set the value to `-1`.\nconst MAX_SIZE_TO_COMPILE = 1000;\n\nconst FULL_CHUNK_HEIGHT = 16;\n\n/**\n * Overrides certain methods on a 2d ctx so that when they are called they\n * will also call the same method on the destCtx. The methods that are\n * overridden are all the transformation state modifiers, path creation, and\n * save/restore. We only forward these specific methods because they are the\n * only state modifiers that we cannot copy over when we switch contexts.\n *\n * To remove mirroring call `ctx._removeMirroring()`.\n *\n * @param {Object} ctx - The 2d canvas context that will duplicate its calls on\n * the destCtx.\n * @param {Object} destCtx - The 2d canvas context that will receive the\n * forwarded calls.\n */\nfunction mirrorContextOperations(ctx, destCtx) {\n if (ctx._removeMirroring) {\n throw new Error(\"Context is already forwarding operations.\");\n }\n ctx.__originalSave = ctx.save;\n ctx.__originalRestore = ctx.restore;\n ctx.__originalRotate = ctx.rotate;\n ctx.__originalScale = ctx.scale;\n ctx.__originalTranslate = ctx.translate;\n ctx.__originalTransform = ctx.transform;\n ctx.__originalSetTransform = ctx.setTransform;\n ctx.__originalResetTransform = ctx.resetTransform;\n ctx.__originalClip = ctx.clip;\n ctx.__originalMoveTo = ctx.moveTo;\n ctx.__originalLineTo = ctx.lineTo;\n ctx.__originalBezierCurveTo = ctx.bezierCurveTo;\n ctx.__originalRect = ctx.rect;\n ctx.__originalClosePath = ctx.closePath;\n ctx.__originalBeginPath = ctx.beginPath;\n\n ctx._removeMirroring = () => {\n ctx.save = ctx.__originalSave;\n ctx.restore = ctx.__originalRestore;\n ctx.rotate = ctx.__originalRotate;\n ctx.scale = ctx.__originalScale;\n ctx.translate = ctx.__originalTranslate;\n ctx.transform = ctx.__originalTransform;\n ctx.setTransform = ctx.__originalSetTransform;\n ctx.resetTransform = ctx.__originalResetTransform;\n\n ctx.clip = ctx.__originalClip;\n ctx.moveTo = ctx.__originalMoveTo;\n ctx.lineTo = ctx.__originalLineTo;\n ctx.bezierCurveTo = ctx.__originalBezierCurveTo;\n ctx.rect = ctx.__originalRect;\n ctx.closePath = ctx.__originalClosePath;\n ctx.beginPath = ctx.__originalBeginPath;\n delete ctx._removeMirroring;\n };\n\n ctx.save = function ctxSave() {\n destCtx.save();\n this.__originalSave();\n };\n\n ctx.restore = function ctxRestore() {\n destCtx.restore();\n this.__originalRestore();\n };\n\n ctx.translate = function ctxTranslate(x, y) {\n destCtx.translate(x, y);\n this.__originalTranslate(x, y);\n };\n\n ctx.scale = function ctxScale(x, y) {\n destCtx.scale(x, y);\n this.__originalScale(x, y);\n };\n\n ctx.transform = function ctxTransform(a, b, c, d, e, f) {\n destCtx.transform(a, b, c, d, e, f);\n this.__originalTransform(a, b, c, d, e, f);\n };\n\n ctx.setTransform = function ctxSetTransform(a, b, c, d, e, f) {\n destCtx.setTransform(a, b, c, d, e, f);\n this.__originalSetTransform(a, b, c, d, e, f);\n };\n\n ctx.resetTransform = function ctxResetTransform() {\n destCtx.resetTransform();\n this.__originalResetTransform();\n };\n\n ctx.rotate = function ctxRotate(angle) {\n destCtx.rotate(angle);\n this.__originalRotate(angle);\n };\n\n ctx.clip = function ctxRotate(rule) {\n destCtx.clip(rule);\n this.__originalClip(rule);\n };\n\n ctx.moveTo = function (x, y) {\n destCtx.moveTo(x, y);\n this.__originalMoveTo(x, y);\n };\n\n ctx.lineTo = function (x, y) {\n destCtx.lineTo(x, y);\n this.__originalLineTo(x, y);\n };\n\n ctx.bezierCurveTo = function (cp1x, cp1y, cp2x, cp2y, x, y) {\n destCtx.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);\n this.__originalBezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);\n };\n\n ctx.rect = function (x, y, width, height) {\n destCtx.rect(x, y, width, height);\n this.__originalRect(x, y, width, height);\n };\n\n ctx.closePath = function () {\n destCtx.closePath();\n this.__originalClosePath();\n };\n\n ctx.beginPath = function () {\n destCtx.beginPath();\n this.__originalBeginPath();\n };\n}\n\nclass CachedCanvases {\n constructor(canvasFactory) {\n this.canvasFactory = canvasFactory;\n this.cache = Object.create(null);\n }\n\n getCanvas(id, width, height) {\n let canvasEntry;\n if (this.cache[id] !== undefined) {\n canvasEntry = this.cache[id];\n this.canvasFactory.reset(canvasEntry, width, height);\n } else {\n canvasEntry = this.canvasFactory.create(width, height);\n this.cache[id] = canvasEntry;\n }\n return canvasEntry;\n }\n\n delete(id) {\n delete this.cache[id];\n }\n\n clear() {\n for (const id in this.cache) {\n const canvasEntry = this.cache[id];\n this.canvasFactory.destroy(canvasEntry);\n delete this.cache[id];\n }\n }\n}\n\nfunction drawImageAtIntegerCoords(\n ctx,\n srcImg,\n srcX,\n srcY,\n srcW,\n srcH,\n destX,\n destY,\n destW,\n destH\n) {\n const [a, b, c, d, tx, ty] = getCurrentTransform(ctx);\n if (b === 0 && c === 0) {\n // top-left corner is at (X, Y) and\n // bottom-right one is at (X + width, Y + height).\n\n // If leftX is 4.321 then it's rounded to 4.\n // If width is 10.432 then it's rounded to 11 because\n // rightX = leftX + width = 14.753 which is rounded to 15\n // so after rounding the total width is 11 (15 - 4).\n // It's why we can't just floor/ceil uniformly, it just depends\n // on the values we've.\n\n const tlX = destX * a + tx;\n const rTlX = Math.round(tlX);\n const tlY = destY * d + ty;\n const rTlY = Math.round(tlY);\n const brX = (destX + destW) * a + tx;\n\n // Some pdf contains images with 1x1 images so in case of 0-width after\n // scaling we must fallback on 1 to be sure there is something.\n const rWidth = Math.abs(Math.round(brX) - rTlX) || 1;\n const brY = (destY + destH) * d + ty;\n const rHeight = Math.abs(Math.round(brY) - rTlY) || 1;\n\n // We must apply a transformation in order to apply it on the image itself.\n // For example if a == 1 && d == -1, it means that the image itself is\n // mirrored w.r.t. the x-axis.\n ctx.setTransform(Math.sign(a), 0, 0, Math.sign(d), rTlX, rTlY);\n ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, rWidth, rHeight);\n ctx.setTransform(a, b, c, d, tx, ty);\n\n return [rWidth, rHeight];\n }\n\n if (a === 0 && d === 0) {\n // This path is taken in issue9462.pdf (page 3).\n const tlX = destY * c + tx;\n const rTlX = Math.round(tlX);\n const tlY = destX * b + ty;\n const rTlY = Math.round(tlY);\n const brX = (destY + destH) * c + tx;\n const rWidth = Math.abs(Math.round(brX) - rTlX) || 1;\n const brY = (destX + destW) * b + ty;\n const rHeight = Math.abs(Math.round(brY) - rTlY) || 1;\n\n ctx.setTransform(0, Math.sign(b), Math.sign(c), 0, rTlX, rTlY);\n ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, rHeight, rWidth);\n ctx.setTransform(a, b, c, d, tx, ty);\n\n return [rHeight, rWidth];\n }\n\n // Not a scale matrix so let the render handle the case without rounding.\n ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, destX, destY, destW, destH);\n\n const scaleX = Math.hypot(a, b);\n const scaleY = Math.hypot(c, d);\n return [scaleX * destW, scaleY * destH];\n}\n\nfunction compileType3Glyph(imgData) {\n const { width, height } = imgData;\n if (width > MAX_SIZE_TO_COMPILE || height > MAX_SIZE_TO_COMPILE) {\n return null;\n }\n\n const POINT_TO_PROCESS_LIMIT = 1000;\n const POINT_TYPES = new Uint8Array([\n 0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0,\n ]);\n\n const width1 = width + 1;\n let points = new Uint8Array(width1 * (height + 1));\n let i, j, j0;\n\n // decodes bit-packed mask data\n const lineSize = (width + 7) & ~7;\n let data = new Uint8Array(lineSize * height),\n pos = 0;\n for (const elem of imgData.data) {\n let mask = 128;\n while (mask > 0) {\n data[pos++] = elem & mask ? 0 : 255;\n mask >>= 1;\n }\n }\n\n // finding interesting points: every point is located between mask pixels,\n // so there will be points of the (width + 1)x(height + 1) grid. Every point\n // will have flags assigned based on neighboring mask pixels:\n // 4 | 8\n // --P--\n // 2 | 1\n // We are interested only in points with the flags:\n // - outside corners: 1, 2, 4, 8;\n // - inside corners: 7, 11, 13, 14;\n // - and, intersections: 5, 10.\n let count = 0;\n pos = 0;\n if (data[pos] !== 0) {\n points[0] = 1;\n ++count;\n }\n for (j = 1; j < width; j++) {\n if (data[pos] !== data[pos + 1]) {\n points[j] = data[pos] ? 2 : 1;\n ++count;\n }\n pos++;\n }\n if (data[pos] !== 0) {\n points[j] = 2;\n ++count;\n }\n for (i = 1; i < height; i++) {\n pos = i * lineSize;\n j0 = i * width1;\n if (data[pos - lineSize] !== data[pos]) {\n points[j0] = data[pos] ? 1 : 8;\n ++count;\n }\n // 'sum' is the position of the current pixel configuration in the 'TYPES'\n // array (in order 8-1-2-4, so we can use '>>2' to shift the column).\n let sum = (data[pos] ? 4 : 0) + (data[pos - lineSize] ? 8 : 0);\n for (j = 1; j < width; j++) {\n sum =\n (sum >> 2) +\n (data[pos + 1] ? 4 : 0) +\n (data[pos - lineSize + 1] ? 8 : 0);\n if (POINT_TYPES[sum]) {\n points[j0 + j] = POINT_TYPES[sum];\n ++count;\n }\n pos++;\n }\n if (data[pos - lineSize] !== data[pos]) {\n points[j0 + j] = data[pos] ? 2 : 4;\n ++count;\n }\n\n if (count > POINT_TO_PROCESS_LIMIT) {\n return null;\n }\n }\n\n pos = lineSize * (height - 1);\n j0 = i * width1;\n if (data[pos] !== 0) {\n points[j0] = 8;\n ++count;\n }\n for (j = 1; j < width; j++) {\n if (data[pos] !== data[pos + 1]) {\n points[j0 + j] = data[pos] ? 4 : 8;\n ++count;\n }\n pos++;\n }\n if (data[pos] !== 0) {\n points[j0 + j] = 4;\n ++count;\n }\n if (count > POINT_TO_PROCESS_LIMIT) {\n return null;\n }\n\n // building outlines\n const steps = new Int32Array([0, width1, -1, 0, -width1, 0, 0, 0, 1]);\n const path = new Path2D();\n\n for (i = 0; count && i <= height; i++) {\n let p = i * width1;\n const end = p + width;\n while (p < end && !points[p]) {\n p++;\n }\n if (p === end) {\n continue;\n }\n path.moveTo(p % width1, i);\n\n const p0 = p;\n let type = points[p];\n do {\n const step = steps[type];\n do {\n p += step;\n } while (!points[p]);\n\n const pp = points[p];\n if (pp !== 5 && pp !== 10) {\n // set new direction\n type = pp;\n // delete mark\n points[p] = 0;\n } else {\n // type is 5 or 10, ie, a crossing\n // set new direction\n type = pp & ((0x33 * type) >> 4);\n // set new type for \"future hit\"\n points[p] &= (type >> 2) | (type << 2);\n }\n path.lineTo(p % width1, (p / width1) | 0);\n\n if (!points[p]) {\n --count;\n }\n } while (p0 !== p);\n --i;\n }\n\n // Immediately release the, potentially large, `Uint8Array`s after parsing.\n data = null;\n points = null;\n\n const drawOutline = function (c) {\n c.save();\n // the path shall be painted in [0..1]x[0..1] space\n c.scale(1 / width, -1 / height);\n c.translate(0, -height);\n c.fill(path);\n c.beginPath();\n c.restore();\n };\n\n return drawOutline;\n}\n\nclass CanvasExtraState {\n constructor(width, height) {\n // Are soft masks and alpha values shapes or opacities?\n this.alphaIsShape = false;\n this.fontSize = 0;\n this.fontSizeScale = 1;\n this.textMatrix = IDENTITY_MATRIX;\n this.textMatrixScale = 1;\n this.fontMatrix = FONT_IDENTITY_MATRIX;\n this.leading = 0;\n // Current point (in user coordinates)\n this.x = 0;\n this.y = 0;\n // Start of text line (in text coordinates)\n this.lineX = 0;\n this.lineY = 0;\n // Character and word spacing\n this.charSpacing = 0;\n this.wordSpacing = 0;\n this.textHScale = 1;\n this.textRenderingMode = TextRenderingMode.FILL;\n this.textRise = 0;\n // Default fore and background colors\n this.fillColor = \"#000000\";\n this.strokeColor = \"#000000\";\n this.patternFill = false;\n // Note: fill alpha applies to all non-stroking operations\n this.fillAlpha = 1;\n this.strokeAlpha = 1;\n this.lineWidth = 1;\n this.activeSMask = null;\n this.transferMaps = \"none\";\n\n this.startNewPathAndClipBox([0, 0, width, height]);\n }\n\n clone() {\n const clone = Object.create(this);\n clone.clipBox = this.clipBox.slice();\n return clone;\n }\n\n setCurrentPoint(x, y) {\n this.x = x;\n this.y = y;\n }\n\n updatePathMinMax(transform, x, y) {\n [x, y] = Util.applyTransform([x, y], transform);\n this.minX = Math.min(this.minX, x);\n this.minY = Math.min(this.minY, y);\n this.maxX = Math.max(this.maxX, x);\n this.maxY = Math.max(this.maxY, y);\n }\n\n updateRectMinMax(transform, rect) {\n const p1 = Util.applyTransform(rect, transform);\n const p2 = Util.applyTransform(rect.slice(2), transform);\n const p3 = Util.applyTransform([rect[0], rect[3]], transform);\n const p4 = Util.applyTransform([rect[2], rect[1]], transform);\n\n this.minX = Math.min(this.minX, p1[0], p2[0], p3[0], p4[0]);\n this.minY = Math.min(this.minY, p1[1], p2[1], p3[1], p4[1]);\n this.maxX = Math.max(this.maxX, p1[0], p2[0], p3[0], p4[0]);\n this.maxY = Math.max(this.maxY, p1[1], p2[1], p3[1], p4[1]);\n }\n\n updateScalingPathMinMax(transform, minMax) {\n Util.scaleMinMax(transform, minMax);\n this.minX = Math.min(this.minX, minMax[0]);\n this.minY = Math.min(this.minY, minMax[1]);\n this.maxX = Math.max(this.maxX, minMax[2]);\n this.maxY = Math.max(this.maxY, minMax[3]);\n }\n\n updateCurvePathMinMax(transform, x0, y0, x1, y1, x2, y2, x3, y3, minMax) {\n const box = Util.bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3, minMax);\n if (minMax) {\n return;\n }\n this.updateRectMinMax(transform, box);\n }\n\n getPathBoundingBox(pathType = PathType.FILL, transform = null) {\n const box = [this.minX, this.minY, this.maxX, this.maxY];\n if (pathType === PathType.STROKE) {\n if (!transform) {\n unreachable(\"Stroke bounding box must include transform.\");\n }\n // Stroked paths can be outside of the path bounding box by 1/2 the line\n // width.\n const scale = Util.singularValueDecompose2dScale(transform);\n const xStrokePad = (scale[0] * this.lineWidth) / 2;\n const yStrokePad = (scale[1] * this.lineWidth) / 2;\n box[0] -= xStrokePad;\n box[1] -= yStrokePad;\n box[2] += xStrokePad;\n box[3] += yStrokePad;\n }\n return box;\n }\n\n updateClipFromPath() {\n const intersect = Util.intersect(this.clipBox, this.getPathBoundingBox());\n this.startNewPathAndClipBox(intersect || [0, 0, 0, 0]);\n }\n\n isEmptyClip() {\n return this.minX === Infinity;\n }\n\n startNewPathAndClipBox(box) {\n this.clipBox = box;\n this.minX = Infinity;\n this.minY = Infinity;\n this.maxX = 0;\n this.maxY = 0;\n }\n\n getClippedPathBoundingBox(pathType = PathType.FILL, transform = null) {\n return Util.intersect(\n this.clipBox,\n this.getPathBoundingBox(pathType, transform)\n );\n }\n}\n\nfunction putBinaryImageData(ctx, imgData) {\n if (typeof ImageData !== \"undefined\" && imgData instanceof ImageData) {\n ctx.putImageData(imgData, 0, 0);\n return;\n }\n\n // Put the image data to the canvas in chunks, rather than putting the\n // whole image at once. This saves JS memory, because the ImageData object\n // is smaller. It also possibly saves C++ memory within the implementation\n // of putImageData(). (E.g. in Firefox we make two short-lived copies of\n // the data passed to putImageData()). |n| shouldn't be too small, however,\n // because too many putImageData() calls will slow things down.\n //\n // Note: as written, if the last chunk is partial, the putImageData() call\n // will (conceptually) put pixels past the bounds of the canvas. But\n // that's ok; any such pixels are ignored.\n\n const height = imgData.height,\n width = imgData.width;\n const partialChunkHeight = height % FULL_CHUNK_HEIGHT;\n const fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT;\n const totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1;\n\n const chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT);\n let srcPos = 0,\n destPos;\n const src = imgData.data;\n const dest = chunkImgData.data;\n let i, j, thisChunkHeight, elemsInThisChunk;\n\n // There are multiple forms in which the pixel data can be passed, and\n // imgData.kind tells us which one this is.\n if (imgData.kind === ImageKind.GRAYSCALE_1BPP) {\n // Grayscale, 1 bit per pixel (i.e. black-and-white).\n const srcLength = src.byteLength;\n const dest32 = new Uint32Array(dest.buffer, 0, dest.byteLength >> 2);\n const dest32DataLength = dest32.length;\n const fullSrcDiff = (width + 7) >> 3;\n const white = 0xffffffff;\n const black = FeatureTest.isLittleEndian ? 0xff000000 : 0x000000ff;\n\n for (i = 0; i < totalChunks; i++) {\n thisChunkHeight = i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight;\n destPos = 0;\n for (j = 0; j < thisChunkHeight; j++) {\n const srcDiff = srcLength - srcPos;\n let k = 0;\n const kEnd = srcDiff > fullSrcDiff ? width : srcDiff * 8 - 7;\n const kEndUnrolled = kEnd & ~7;\n let mask = 0;\n let srcByte = 0;\n for (; k < kEndUnrolled; k += 8) {\n srcByte = src[srcPos++];\n dest32[destPos++] = srcByte & 128 ? white : black;\n dest32[destPos++] = srcByte & 64 ? white : black;\n dest32[destPos++] = srcByte & 32 ? white : black;\n dest32[destPos++] = srcByte & 16 ? white : black;\n dest32[destPos++] = srcByte & 8 ? white : black;\n dest32[destPos++] = srcByte & 4 ? white : black;\n dest32[destPos++] = srcByte & 2 ? white : black;\n dest32[destPos++] = srcByte & 1 ? white : black;\n }\n for (; k < kEnd; k++) {\n if (mask === 0) {\n srcByte = src[srcPos++];\n mask = 128;\n }\n\n dest32[destPos++] = srcByte & mask ? white : black;\n mask >>= 1;\n }\n }\n // We ran out of input. Make all remaining pixels transparent.\n while (destPos < dest32DataLength) {\n dest32[destPos++] = 0;\n }\n\n ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n }\n } else if (imgData.kind === ImageKind.RGBA_32BPP) {\n // RGBA, 32-bits per pixel.\n j = 0;\n elemsInThisChunk = width * FULL_CHUNK_HEIGHT * 4;\n for (i = 0; i < fullChunks; i++) {\n dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));\n srcPos += elemsInThisChunk;\n\n ctx.putImageData(chunkImgData, 0, j);\n j += FULL_CHUNK_HEIGHT;\n }\n if (i < totalChunks) {\n elemsInThisChunk = width * partialChunkHeight * 4;\n dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));\n\n ctx.putImageData(chunkImgData, 0, j);\n }\n } else if (imgData.kind === ImageKind.RGB_24BPP) {\n // RGB, 24-bits per pixel.\n thisChunkHeight = FULL_CHUNK_HEIGHT;\n elemsInThisChunk = width * thisChunkHeight;\n for (i = 0; i < totalChunks; i++) {\n if (i >= fullChunks) {\n thisChunkHeight = partialChunkHeight;\n elemsInThisChunk = width * thisChunkHeight;\n }\n\n destPos = 0;\n for (j = elemsInThisChunk; j--; ) {\n dest[destPos++] = src[srcPos++];\n dest[destPos++] = src[srcPos++];\n dest[destPos++] = src[srcPos++];\n dest[destPos++] = 255;\n }\n\n ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n }\n } else {\n throw new Error(`bad image kind: ${imgData.kind}`);\n }\n}\n\nfunction putBinaryImageMask(ctx, imgData) {\n if (imgData.bitmap) {\n // The bitmap has been created in the worker.\n ctx.drawImage(imgData.bitmap, 0, 0);\n return;\n }\n\n // Slow path: OffscreenCanvas isn't available in the worker.\n const height = imgData.height,\n width = imgData.width;\n const partialChunkHeight = height % FULL_CHUNK_HEIGHT;\n const fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT;\n const totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1;\n\n const chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT);\n let srcPos = 0;\n const src = imgData.data;\n const dest = chunkImgData.data;\n\n for (let i = 0; i < totalChunks; i++) {\n const thisChunkHeight =\n i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight;\n\n // Expand the mask so it can be used by the canvas. Any required\n // inversion has already been handled.\n\n ({ srcPos } = convertBlackAndWhiteToRGBA({\n src,\n srcPos,\n dest,\n width,\n height: thisChunkHeight,\n nonBlackColor: 0,\n }));\n\n ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n }\n}\n\nfunction copyCtxState(sourceCtx, destCtx) {\n const properties = [\n \"strokeStyle\",\n \"fillStyle\",\n \"fillRule\",\n \"globalAlpha\",\n \"lineWidth\",\n \"lineCap\",\n \"lineJoin\",\n \"miterLimit\",\n \"globalCompositeOperation\",\n \"font\",\n \"filter\",\n ];\n for (const property of properties) {\n if (sourceCtx[property] !== undefined) {\n destCtx[property] = sourceCtx[property];\n }\n }\n if (sourceCtx.setLineDash !== undefined) {\n destCtx.setLineDash(sourceCtx.getLineDash());\n destCtx.lineDashOffset = sourceCtx.lineDashOffset;\n }\n}\n\nfunction resetCtxToDefault(ctx) {\n ctx.strokeStyle = ctx.fillStyle = \"#000000\";\n ctx.fillRule = \"nonzero\";\n ctx.globalAlpha = 1;\n ctx.lineWidth = 1;\n ctx.lineCap = \"butt\";\n ctx.lineJoin = \"miter\";\n ctx.miterLimit = 10;\n ctx.globalCompositeOperation = \"source-over\";\n ctx.font = \"10px sans-serif\";\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([]);\n ctx.lineDashOffset = 0;\n }\n if (\n (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) ||\n !isNodeJS\n ) {\n const { filter } = ctx;\n if (filter !== \"none\" && filter !== \"\") {\n ctx.filter = \"none\";\n }\n }\n}\n\nfunction getImageSmoothingEnabled(transform, interpolate) {\n // In section 8.9.5.3 of the PDF spec, it's mentioned that the interpolate\n // flag should be used when the image is upscaled.\n // In Firefox, smoothing is always used when downscaling images (bug 1360415).\n\n if (interpolate) {\n return true;\n }\n\n const scale = Util.singularValueDecompose2dScale(transform);\n // Round to a 32bit float so that `<=` check below will pass for numbers that\n // are very close, but not exactly the same 64bit floats.\n scale[0] = Math.fround(scale[0]);\n scale[1] = Math.fround(scale[1]);\n const actualScale = Math.fround(\n (globalThis.devicePixelRatio || 1) * PixelsPerInch.PDF_TO_CSS_UNITS\n );\n return scale[0] <= actualScale && scale[1] <= actualScale;\n}\n\nconst LINE_CAP_STYLES = [\"butt\", \"round\", \"square\"];\nconst LINE_JOIN_STYLES = [\"miter\", \"round\", \"bevel\"];\nconst NORMAL_CLIP = {};\nconst EO_CLIP = {};\n\nclass CanvasGraphics {\n constructor(\n canvasCtx,\n commonObjs,\n objs,\n canvasFactory,\n filterFactory,\n { optionalContentConfig, markedContentStack = null },\n annotationCanvasMap,\n pageColors\n ) {\n this.ctx = canvasCtx;\n this.current = new CanvasExtraState(\n this.ctx.canvas.width,\n this.ctx.canvas.height\n );\n this.stateStack = [];\n this.pendingClip = null;\n this.pendingEOFill = false;\n this.res = null;\n this.xobjs = null;\n this.commonObjs = commonObjs;\n this.objs = objs;\n this.canvasFactory = canvasFactory;\n this.filterFactory = filterFactory;\n this.groupStack = [];\n this.processingType3 = null;\n // Patterns are painted relative to the initial page/form transform, see\n // PDF spec 8.7.2 NOTE 1.\n this.baseTransform = null;\n this.baseTransformStack = [];\n this.groupLevel = 0;\n this.smaskStack = [];\n this.smaskCounter = 0;\n this.tempSMask = null;\n this.suspendedCtx = null;\n this.contentVisible = true;\n this.markedContentStack = markedContentStack || [];\n this.optionalContentConfig = optionalContentConfig;\n this.cachedCanvases = new CachedCanvases(this.canvasFactory);\n this.cachedPatterns = new Map();\n this.annotationCanvasMap = annotationCanvasMap;\n this.viewportScale = 1;\n this.outputScaleX = 1;\n this.outputScaleY = 1;\n this.pageColors = pageColors;\n\n this._cachedScaleForStroking = [-1, 0];\n this._cachedGetSinglePixelWidth = null;\n this._cachedBitmapsMap = new Map();\n }\n\n getObject(data, fallback = null) {\n if (typeof data === \"string\") {\n return data.startsWith(\"g_\")\n ? this.commonObjs.get(data)\n : this.objs.get(data);\n }\n return fallback;\n }\n\n beginDrawing({\n transform,\n viewport,\n transparency = false,\n background = null,\n }) {\n // For pdfs that use blend modes we have to clear the canvas else certain\n // blend modes can look wrong since we'd be blending with a white\n // backdrop. The problem with a transparent backdrop though is we then\n // don't get sub pixel anti aliasing on text, creating temporary\n // transparent canvas when we have blend modes.\n const width = this.ctx.canvas.width;\n const height = this.ctx.canvas.height;\n\n const savedFillStyle = this.ctx.fillStyle;\n this.ctx.fillStyle = background || \"#ffffff\";\n this.ctx.fillRect(0, 0, width, height);\n this.ctx.fillStyle = savedFillStyle;\n\n if (transparency) {\n const transparentCanvas = this.cachedCanvases.getCanvas(\n \"transparent\",\n width,\n height\n );\n this.compositeCtx = this.ctx;\n this.transparentCanvas = transparentCanvas.canvas;\n this.ctx = transparentCanvas.context;\n this.ctx.save();\n // The transform can be applied before rendering, transferring it to\n // the new canvas.\n this.ctx.transform(...getCurrentTransform(this.compositeCtx));\n }\n\n this.ctx.save();\n resetCtxToDefault(this.ctx);\n if (transform) {\n this.ctx.transform(...transform);\n this.outputScaleX = transform[0];\n this.outputScaleY = transform[0];\n }\n this.ctx.transform(...viewport.transform);\n this.viewportScale = viewport.scale;\n\n this.baseTransform = getCurrentTransform(this.ctx);\n }\n\n executeOperatorList(\n operatorList,\n executionStartIdx,\n continueCallback,\n stepper\n ) {\n const argsArray = operatorList.argsArray;\n const fnArray = operatorList.fnArray;\n let i = executionStartIdx || 0;\n const argsArrayLen = argsArray.length;\n\n // Sometimes the OperatorList to execute is empty.\n if (argsArrayLen === i) {\n return i;\n }\n\n const chunkOperations =\n argsArrayLen - i > EXECUTION_STEPS &&\n typeof continueCallback === \"function\";\n const endTime = chunkOperations ? Date.now() + EXECUTION_TIME : 0;\n let steps = 0;\n\n const commonObjs = this.commonObjs;\n const objs = this.objs;\n let fnId;\n\n while (true) {\n if (stepper !== undefined && i === stepper.nextBreakPoint) {\n stepper.breakIt(i, continueCallback);\n return i;\n }\n\n fnId = fnArray[i];\n\n if (fnId !== OPS.dependency) {\n // eslint-disable-next-line prefer-spread\n this[fnId].apply(this, argsArray[i]);\n } else {\n for (const depObjId of argsArray[i]) {\n const objsPool = depObjId.startsWith(\"g_\") ? commonObjs : objs;\n\n // If the promise isn't resolved yet, add the continueCallback\n // to the promise and bail out.\n if (!objsPool.has(depObjId)) {\n objsPool.get(depObjId, continueCallback);\n return i;\n }\n }\n }\n\n i++;\n\n // If the entire operatorList was executed, stop as were done.\n if (i === argsArrayLen) {\n return i;\n }\n\n // If the execution took longer then a certain amount of time and\n // `continueCallback` is specified, interrupt the execution.\n if (chunkOperations && ++steps > EXECUTION_STEPS) {\n if (Date.now() > endTime) {\n continueCallback();\n return i;\n }\n steps = 0;\n }\n\n // If the operatorList isn't executed completely yet OR the execution\n // time was short enough, do another execution round.\n }\n }\n\n #restoreInitialState() {\n // Finishing all opened operations such as SMask group painting.\n while (this.stateStack.length || this.inSMaskMode) {\n this.restore();\n }\n\n this.ctx.restore();\n\n if (this.transparentCanvas) {\n this.ctx = this.compositeCtx;\n this.ctx.save();\n this.ctx.setTransform(1, 0, 0, 1, 0, 0); // Avoid apply transform twice\n this.ctx.drawImage(this.transparentCanvas, 0, 0);\n this.ctx.restore();\n this.transparentCanvas = null;\n }\n }\n\n endDrawing() {\n this.#restoreInitialState();\n\n this.cachedCanvases.clear();\n this.cachedPatterns.clear();\n\n for (const cache of this._cachedBitmapsMap.values()) {\n for (const canvas of cache.values()) {\n if (\n typeof HTMLCanvasElement !== \"undefined\" &&\n canvas instanceof HTMLCanvasElement\n ) {\n canvas.width = canvas.height = 0;\n }\n }\n cache.clear();\n }\n this._cachedBitmapsMap.clear();\n this.#drawFilter();\n }\n\n #drawFilter() {\n if (this.pageColors) {\n const hcmFilterId = this.filterFactory.addHCMFilter(\n this.pageColors.foreground,\n this.pageColors.background\n );\n if (hcmFilterId !== \"none\") {\n const savedFilter = this.ctx.filter;\n this.ctx.filter = hcmFilterId;\n this.ctx.drawImage(this.ctx.canvas, 0, 0);\n this.ctx.filter = savedFilter;\n }\n }\n }\n\n _scaleImage(img, inverseTransform) {\n // Vertical or horizontal scaling shall not be more than 2 to not lose the\n // pixels during drawImage operation, painting on the temporary canvas(es)\n // that are twice smaller in size.\n const width = img.width;\n const height = img.height;\n let widthScale = Math.max(\n Math.hypot(inverseTransform[0], inverseTransform[1]),\n 1\n );\n let heightScale = Math.max(\n Math.hypot(inverseTransform[2], inverseTransform[3]),\n 1\n );\n\n let paintWidth = width,\n paintHeight = height;\n let tmpCanvasId = \"prescale1\";\n let tmpCanvas, tmpCtx;\n while (\n (widthScale > 2 && paintWidth > 1) ||\n (heightScale > 2 && paintHeight > 1)\n ) {\n let newWidth = paintWidth,\n newHeight = paintHeight;\n if (widthScale > 2 && paintWidth > 1) {\n // See bug 1820511 (Windows specific bug).\n // TODO: once the above bug is fixed we could revert to:\n // newWidth = Math.ceil(paintWidth / 2);\n newWidth =\n paintWidth >= 16384\n ? Math.floor(paintWidth / 2) - 1 || 1\n : Math.ceil(paintWidth / 2);\n widthScale /= paintWidth / newWidth;\n }\n if (heightScale > 2 && paintHeight > 1) {\n // TODO: see the comment above.\n newHeight =\n paintHeight >= 16384\n ? Math.floor(paintHeight / 2) - 1 || 1\n : Math.ceil(paintHeight) / 2;\n heightScale /= paintHeight / newHeight;\n }\n tmpCanvas = this.cachedCanvases.getCanvas(\n tmpCanvasId,\n newWidth,\n newHeight\n );\n tmpCtx = tmpCanvas.context;\n tmpCtx.clearRect(0, 0, newWidth, newHeight);\n tmpCtx.drawImage(\n img,\n 0,\n 0,\n paintWidth,\n paintHeight,\n 0,\n 0,\n newWidth,\n newHeight\n );\n img = tmpCanvas.canvas;\n paintWidth = newWidth;\n paintHeight = newHeight;\n tmpCanvasId = tmpCanvasId === \"prescale1\" ? \"prescale2\" : \"prescale1\";\n }\n return {\n img,\n paintWidth,\n paintHeight,\n };\n }\n\n _createMaskCanvas(img) {\n const ctx = this.ctx;\n const { width, height } = img;\n const fillColor = this.current.fillColor;\n const isPatternFill = this.current.patternFill;\n const currentTransform = getCurrentTransform(ctx);\n\n let cache, cacheKey, scaled, maskCanvas;\n if ((img.bitmap || img.data) && img.count > 1) {\n const mainKey = img.bitmap || img.data.buffer;\n // We're reusing the same image several times, so we can cache it.\n // In case we've a pattern fill we just keep the scaled version of\n // the image.\n // Only the scaling part matters, the translation part is just used\n // to compute offsets (but not when filling patterns see #15573).\n // TODO: handle the case of a pattern fill if it's possible.\n cacheKey = JSON.stringify(\n isPatternFill\n ? currentTransform\n : [currentTransform.slice(0, 4), fillColor]\n );\n\n cache = this._cachedBitmapsMap.get(mainKey);\n if (!cache) {\n cache = new Map();\n this._cachedBitmapsMap.set(mainKey, cache);\n }\n const cachedImage = cache.get(cacheKey);\n if (cachedImage && !isPatternFill) {\n const offsetX = Math.round(\n Math.min(currentTransform[0], currentTransform[2]) +\n currentTransform[4]\n );\n const offsetY = Math.round(\n Math.min(currentTransform[1], currentTransform[3]) +\n currentTransform[5]\n );\n return {\n canvas: cachedImage,\n offsetX,\n offsetY,\n };\n }\n scaled = cachedImage;\n }\n\n if (!scaled) {\n maskCanvas = this.cachedCanvases.getCanvas(\"maskCanvas\", width, height);\n putBinaryImageMask(maskCanvas.context, img);\n }\n\n // Create the mask canvas at the size it will be drawn at and also set\n // its transform to match the current transform so if there are any\n // patterns applied they will be applied relative to the correct\n // transform.\n\n let maskToCanvas = Util.transform(currentTransform, [\n 1 / width,\n 0,\n 0,\n -1 / height,\n 0,\n 0,\n ]);\n maskToCanvas = Util.transform(maskToCanvas, [1, 0, 0, 1, 0, -height]);\n const [minX, minY, maxX, maxY] = Util.getAxialAlignedBoundingBox(\n [0, 0, width, height],\n maskToCanvas\n );\n const drawnWidth = Math.round(maxX - minX) || 1;\n const drawnHeight = Math.round(maxY - minY) || 1;\n const fillCanvas = this.cachedCanvases.getCanvas(\n \"fillCanvas\",\n drawnWidth,\n drawnHeight\n );\n const fillCtx = fillCanvas.context;\n\n // The offset will be the top-left cordinate mask.\n // If objToCanvas is [a,b,c,d,e,f] then:\n // - offsetX = min(a, c) + e\n // - offsetY = min(b, d) + f\n const offsetX = minX;\n const offsetY = minY;\n fillCtx.translate(-offsetX, -offsetY);\n fillCtx.transform(...maskToCanvas);\n\n if (!scaled) {\n // Pre-scale if needed to improve image smoothing.\n scaled = this._scaleImage(\n maskCanvas.canvas,\n getCurrentTransformInverse(fillCtx)\n );\n scaled = scaled.img;\n if (cache && isPatternFill) {\n cache.set(cacheKey, scaled);\n }\n }\n\n fillCtx.imageSmoothingEnabled = getImageSmoothingEnabled(\n getCurrentTransform(fillCtx),\n img.interpolate\n );\n\n drawImageAtIntegerCoords(\n fillCtx,\n scaled,\n 0,\n 0,\n scaled.width,\n scaled.height,\n 0,\n 0,\n width,\n height\n );\n fillCtx.globalCompositeOperation = \"source-in\";\n\n const inverse = Util.transform(getCurrentTransformInverse(fillCtx), [\n 1,\n 0,\n 0,\n 1,\n -offsetX,\n -offsetY,\n ]);\n fillCtx.fillStyle = isPatternFill\n ? fillColor.getPattern(ctx, this, inverse, PathType.FILL)\n : fillColor;\n\n fillCtx.fillRect(0, 0, width, height);\n\n if (cache && !isPatternFill) {\n // The fill canvas is put in the cache associated to the mask image\n // so we must remove from the cached canvas: it mustn't be used again.\n this.cachedCanvases.delete(\"fillCanvas\");\n cache.set(cacheKey, fillCanvas.canvas);\n }\n\n // Round the offsets to avoid drawing fractional pixels.\n return {\n canvas: fillCanvas.canvas,\n offsetX: Math.round(offsetX),\n offsetY: Math.round(offsetY),\n };\n }\n\n // Graphics state\n setLineWidth(width) {\n if (width !== this.current.lineWidth) {\n this._cachedScaleForStroking[0] = -1;\n }\n this.current.lineWidth = width;\n this.ctx.lineWidth = width;\n }\n\n setLineCap(style) {\n this.ctx.lineCap = LINE_CAP_STYLES[style];\n }\n\n setLineJoin(style) {\n this.ctx.lineJoin = LINE_JOIN_STYLES[style];\n }\n\n setMiterLimit(limit) {\n this.ctx.miterLimit = limit;\n }\n\n setDash(dashArray, dashPhase) {\n const ctx = this.ctx;\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash(dashArray);\n ctx.lineDashOffset = dashPhase;\n }\n }\n\n setRenderingIntent(intent) {\n // This operation is ignored since we haven't found a use case for it yet.\n }\n\n setFlatness(flatness) {\n // This operation is ignored since we haven't found a use case for it yet.\n }\n\n setGState(states) {\n for (const [key, value] of states) {\n switch (key) {\n case \"LW\":\n this.setLineWidth(value);\n break;\n case \"LC\":\n this.setLineCap(value);\n break;\n case \"LJ\":\n this.setLineJoin(value);\n break;\n case \"ML\":\n this.setMiterLimit(value);\n break;\n case \"D\":\n this.setDash(value[0], value[1]);\n break;\n case \"RI\":\n this.setRenderingIntent(value);\n break;\n case \"FL\":\n this.setFlatness(value);\n break;\n case \"Font\":\n this.setFont(value[0], value[1]);\n break;\n case \"CA\":\n this.current.strokeAlpha = value;\n break;\n case \"ca\":\n this.current.fillAlpha = value;\n this.ctx.globalAlpha = value;\n break;\n case \"BM\":\n this.ctx.globalCompositeOperation = value;\n break;\n case \"SMask\":\n this.current.activeSMask = value ? this.tempSMask : null;\n this.tempSMask = null;\n this.checkSMaskState();\n break;\n case \"TR\":\n this.ctx.filter = this.current.transferMaps =\n this.filterFactory.addFilter(value);\n break;\n }\n }\n }\n\n get inSMaskMode() {\n return !!this.suspendedCtx;\n }\n\n checkSMaskState() {\n const inSMaskMode = this.inSMaskMode;\n if (this.current.activeSMask && !inSMaskMode) {\n this.beginSMaskMode();\n } else if (!this.current.activeSMask && inSMaskMode) {\n this.endSMaskMode();\n }\n // Else, the state is okay and nothing needs to be done.\n }\n\n /**\n * Soft mask mode takes the current main drawing canvas and replaces it with\n * a temporary canvas. Any drawing operations that happen on the temporary\n * canvas need to be composed with the main canvas that was suspended (see\n * `compose()`). The temporary canvas also duplicates many of its operations\n * on the suspended canvas to keep them in sync, so that when the soft mask\n * mode ends any clipping paths or transformations will still be active and in\n * the right order on the canvas' graphics state stack.\n */\n beginSMaskMode() {\n if (this.inSMaskMode) {\n throw new Error(\"beginSMaskMode called while already in smask mode\");\n }\n const drawnWidth = this.ctx.canvas.width;\n const drawnHeight = this.ctx.canvas.height;\n const cacheId = \"smaskGroupAt\" + this.groupLevel;\n const scratchCanvas = this.cachedCanvases.getCanvas(\n cacheId,\n drawnWidth,\n drawnHeight\n );\n this.suspendedCtx = this.ctx;\n this.ctx = scratchCanvas.context;\n const ctx = this.ctx;\n ctx.setTransform(...getCurrentTransform(this.suspendedCtx));\n copyCtxState(this.suspendedCtx, ctx);\n mirrorContextOperations(ctx, this.suspendedCtx);\n\n this.setGState([\n [\"BM\", \"source-over\"],\n [\"ca\", 1],\n [\"CA\", 1],\n ]);\n }\n\n endSMaskMode() {\n if (!this.inSMaskMode) {\n throw new Error(\"endSMaskMode called while not in smask mode\");\n }\n // The soft mask is done, now restore the suspended canvas as the main\n // drawing canvas.\n this.ctx._removeMirroring();\n copyCtxState(this.ctx, this.suspendedCtx);\n this.ctx = this.suspendedCtx;\n\n this.suspendedCtx = null;\n }\n\n compose(dirtyBox) {\n if (!this.current.activeSMask) {\n return;\n }\n\n if (!dirtyBox) {\n dirtyBox = [0, 0, this.ctx.canvas.width, this.ctx.canvas.height];\n } else {\n dirtyBox[0] = Math.floor(dirtyBox[0]);\n dirtyBox[1] = Math.floor(dirtyBox[1]);\n dirtyBox[2] = Math.ceil(dirtyBox[2]);\n dirtyBox[3] = Math.ceil(dirtyBox[3]);\n }\n const smask = this.current.activeSMask;\n const suspendedCtx = this.suspendedCtx;\n\n this.composeSMask(suspendedCtx, smask, this.ctx, dirtyBox);\n // Whatever was drawn has been moved to the suspended canvas, now clear it\n // out of the current canvas.\n this.ctx.save();\n this.ctx.setTransform(1, 0, 0, 1, 0, 0);\n this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height);\n this.ctx.restore();\n }\n\n composeSMask(ctx, smask, layerCtx, layerBox) {\n const layerOffsetX = layerBox[0];\n const layerOffsetY = layerBox[1];\n const layerWidth = layerBox[2] - layerOffsetX;\n const layerHeight = layerBox[3] - layerOffsetY;\n if (layerWidth === 0 || layerHeight === 0) {\n return;\n }\n this.genericComposeSMask(\n smask.context,\n layerCtx,\n layerWidth,\n layerHeight,\n smask.subtype,\n smask.backdrop,\n smask.transferMap,\n layerOffsetX,\n layerOffsetY,\n smask.offsetX,\n smask.offsetY\n );\n ctx.save();\n ctx.globalAlpha = 1;\n ctx.globalCompositeOperation = \"source-over\";\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(layerCtx.canvas, 0, 0);\n ctx.restore();\n }\n\n genericComposeSMask(\n maskCtx,\n layerCtx,\n width,\n height,\n subtype,\n backdrop,\n transferMap,\n layerOffsetX,\n layerOffsetY,\n maskOffsetX,\n maskOffsetY\n ) {\n let maskCanvas = maskCtx.canvas;\n let maskX = layerOffsetX - maskOffsetX;\n let maskY = layerOffsetY - maskOffsetY;\n\n if (backdrop) {\n if (\n maskX < 0 ||\n maskY < 0 ||\n maskX + width > maskCanvas.width ||\n maskY + height > maskCanvas.height\n ) {\n const canvas = this.cachedCanvases.getCanvas(\n \"maskExtension\",\n width,\n height\n );\n const ctx = canvas.context;\n ctx.drawImage(maskCanvas, -maskX, -maskY);\n if (backdrop.some(c => c !== 0)) {\n ctx.globalCompositeOperation = \"destination-atop\";\n ctx.fillStyle = Util.makeHexColor(...backdrop);\n ctx.fillRect(0, 0, width, height);\n ctx.globalCompositeOperation = \"source-over\";\n }\n\n maskCanvas = canvas.canvas;\n maskX = maskY = 0;\n } else if (backdrop.some(c => c !== 0)) {\n maskCtx.save();\n maskCtx.globalAlpha = 1;\n maskCtx.setTransform(1, 0, 0, 1, 0, 0);\n const clip = new Path2D();\n clip.rect(maskX, maskY, width, height);\n maskCtx.clip(clip);\n maskCtx.globalCompositeOperation = \"destination-atop\";\n maskCtx.fillStyle = Util.makeHexColor(...backdrop);\n maskCtx.fillRect(maskX, maskY, width, height);\n maskCtx.restore();\n }\n }\n\n layerCtx.save();\n layerCtx.globalAlpha = 1;\n layerCtx.setTransform(1, 0, 0, 1, 0, 0);\n\n if (subtype === \"Alpha\" && transferMap) {\n layerCtx.filter = this.filterFactory.addAlphaFilter(transferMap);\n } else if (subtype === \"Luminosity\") {\n layerCtx.filter = this.filterFactory.addLuminosityFilter(transferMap);\n }\n\n const clip = new Path2D();\n clip.rect(layerOffsetX, layerOffsetY, width, height);\n layerCtx.clip(clip);\n layerCtx.globalCompositeOperation = \"destination-in\";\n layerCtx.drawImage(\n maskCanvas,\n maskX,\n maskY,\n width,\n height,\n layerOffsetX,\n layerOffsetY,\n width,\n height\n );\n layerCtx.restore();\n }\n\n save() {\n if (this.inSMaskMode) {\n // SMask mode may be turned on/off causing us to lose graphics state.\n // Copy the temporary canvas state to the main(suspended) canvas to keep\n // it in sync.\n copyCtxState(this.ctx, this.suspendedCtx);\n // Don't bother calling save on the temporary canvas since state is not\n // saved there.\n this.suspendedCtx.save();\n } else {\n this.ctx.save();\n }\n const old = this.current;\n this.stateStack.push(old);\n this.current = old.clone();\n }\n\n restore() {\n if (this.stateStack.length === 0 && this.inSMaskMode) {\n this.endSMaskMode();\n }\n if (this.stateStack.length !== 0) {\n this.current = this.stateStack.pop();\n if (this.inSMaskMode) {\n // Graphics state is stored on the main(suspended) canvas. Restore its\n // state then copy it over to the temporary canvas.\n this.suspendedCtx.restore();\n copyCtxState(this.suspendedCtx, this.ctx);\n } else {\n this.ctx.restore();\n }\n this.checkSMaskState();\n\n // Ensure that the clipping path is reset (fixes issue6413.pdf).\n this.pendingClip = null;\n\n this._cachedScaleForStroking[0] = -1;\n this._cachedGetSinglePixelWidth = null;\n }\n }\n\n transform(a, b, c, d, e, f) {\n this.ctx.transform(a, b, c, d, e, f);\n\n this._cachedScaleForStroking[0] = -1;\n this._cachedGetSinglePixelWidth = null;\n }\n\n // Path\n constructPath(ops, args, minMax) {\n const ctx = this.ctx;\n const current = this.current;\n let x = current.x,\n y = current.y;\n let startX, startY;\n const currentTransform = getCurrentTransform(ctx);\n\n // Most of the time the current transform is a scaling matrix\n // so we don't need to transform points before computing min/max:\n // we can compute min/max first and then smartly \"apply\" the\n // transform (see Util.scaleMinMax).\n // For rectangle, moveTo and lineTo, min/max are computed in the\n // worker (see evaluator.js).\n const isScalingMatrix =\n (currentTransform[0] === 0 && currentTransform[3] === 0) ||\n (currentTransform[1] === 0 && currentTransform[2] === 0);\n const minMaxForBezier = isScalingMatrix ? minMax.slice(0) : null;\n\n for (let i = 0, j = 0, ii = ops.length; i < ii; i++) {\n switch (ops[i] | 0) {\n case OPS.rectangle:\n x = args[j++];\n y = args[j++];\n const width = args[j++];\n const height = args[j++];\n\n const xw = x + width;\n const yh = y + height;\n ctx.moveTo(x, y);\n if (width === 0 || height === 0) {\n ctx.lineTo(xw, yh);\n } else {\n ctx.lineTo(xw, y);\n ctx.lineTo(xw, yh);\n ctx.lineTo(x, yh);\n }\n if (!isScalingMatrix) {\n current.updateRectMinMax(currentTransform, [x, y, xw, yh]);\n }\n ctx.closePath();\n break;\n case OPS.moveTo:\n x = args[j++];\n y = args[j++];\n ctx.moveTo(x, y);\n if (!isScalingMatrix) {\n current.updatePathMinMax(currentTransform, x, y);\n }\n break;\n case OPS.lineTo:\n x = args[j++];\n y = args[j++];\n ctx.lineTo(x, y);\n if (!isScalingMatrix) {\n current.updatePathMinMax(currentTransform, x, y);\n }\n break;\n case OPS.curveTo:\n startX = x;\n startY = y;\n x = args[j + 4];\n y = args[j + 5];\n ctx.bezierCurveTo(\n args[j],\n args[j + 1],\n args[j + 2],\n args[j + 3],\n x,\n y\n );\n current.updateCurvePathMinMax(\n currentTransform,\n startX,\n startY,\n args[j],\n args[j + 1],\n args[j + 2],\n args[j + 3],\n x,\n y,\n minMaxForBezier\n );\n j += 6;\n break;\n case OPS.curveTo2:\n startX = x;\n startY = y;\n ctx.bezierCurveTo(\n x,\n y,\n args[j],\n args[j + 1],\n args[j + 2],\n args[j + 3]\n );\n current.updateCurvePathMinMax(\n currentTransform,\n startX,\n startY,\n x,\n y,\n args[j],\n args[j + 1],\n args[j + 2],\n args[j + 3],\n minMaxForBezier\n );\n x = args[j + 2];\n y = args[j + 3];\n j += 4;\n break;\n case OPS.curveTo3:\n startX = x;\n startY = y;\n x = args[j + 2];\n y = args[j + 3];\n ctx.bezierCurveTo(args[j], args[j + 1], x, y, x, y);\n current.updateCurvePathMinMax(\n currentTransform,\n startX,\n startY,\n args[j],\n args[j + 1],\n x,\n y,\n x,\n y,\n minMaxForBezier\n );\n j += 4;\n break;\n case OPS.closePath:\n ctx.closePath();\n break;\n }\n }\n\n if (isScalingMatrix) {\n current.updateScalingPathMinMax(currentTransform, minMaxForBezier);\n }\n\n current.setCurrentPoint(x, y);\n }\n\n closePath() {\n this.ctx.closePath();\n }\n\n stroke(consumePath = true) {\n const ctx = this.ctx;\n const strokeColor = this.current.strokeColor;\n // For stroke we want to temporarily change the global alpha to the\n // stroking alpha.\n ctx.globalAlpha = this.current.strokeAlpha;\n if (this.contentVisible) {\n if (typeof strokeColor === \"object\" && strokeColor?.getPattern) {\n ctx.save();\n ctx.strokeStyle = strokeColor.getPattern(\n ctx,\n this,\n getCurrentTransformInverse(ctx),\n PathType.STROKE\n );\n this.rescaleAndStroke(/* saveRestore */ false);\n ctx.restore();\n } else {\n this.rescaleAndStroke(/* saveRestore */ true);\n }\n }\n if (consumePath) {\n this.consumePath(this.current.getClippedPathBoundingBox());\n }\n // Restore the global alpha to the fill alpha\n ctx.globalAlpha = this.current.fillAlpha;\n }\n\n closeStroke() {\n this.closePath();\n this.stroke();\n }\n\n fill(consumePath = true) {\n const ctx = this.ctx;\n const fillColor = this.current.fillColor;\n const isPatternFill = this.current.patternFill;\n let needRestore = false;\n\n if (isPatternFill) {\n ctx.save();\n ctx.fillStyle = fillColor.getPattern(\n ctx,\n this,\n getCurrentTransformInverse(ctx),\n PathType.FILL\n );\n needRestore = true;\n }\n\n const intersect = this.current.getClippedPathBoundingBox();\n if (this.contentVisible && intersect !== null) {\n if (this.pendingEOFill) {\n ctx.fill(\"evenodd\");\n this.pendingEOFill = false;\n } else {\n ctx.fill();\n }\n }\n\n if (needRestore) {\n ctx.restore();\n }\n if (consumePath) {\n this.consumePath(intersect);\n }\n }\n\n eoFill() {\n this.pendingEOFill = true;\n this.fill();\n }\n\n fillStroke() {\n this.fill(false);\n this.stroke(false);\n\n this.consumePath();\n }\n\n eoFillStroke() {\n this.pendingEOFill = true;\n this.fillStroke();\n }\n\n closeFillStroke() {\n this.closePath();\n this.fillStroke();\n }\n\n closeEOFillStroke() {\n this.pendingEOFill = true;\n this.closePath();\n this.fillStroke();\n }\n\n endPath() {\n this.consumePath();\n }\n\n // Clipping\n clip() {\n this.pendingClip = NORMAL_CLIP;\n }\n\n eoClip() {\n this.pendingClip = EO_CLIP;\n }\n\n // Text\n beginText() {\n this.current.textMatrix = IDENTITY_MATRIX;\n this.current.textMatrixScale = 1;\n this.current.x = this.current.lineX = 0;\n this.current.y = this.current.lineY = 0;\n }\n\n endText() {\n const paths = this.pendingTextPaths;\n const ctx = this.ctx;\n if (paths === undefined) {\n ctx.beginPath();\n return;\n }\n\n ctx.save();\n ctx.beginPath();\n for (const path of paths) {\n ctx.setTransform(...path.transform);\n ctx.translate(path.x, path.y);\n path.addToPath(ctx, path.fontSize);\n }\n ctx.restore();\n ctx.clip();\n ctx.beginPath();\n delete this.pendingTextPaths;\n }\n\n setCharSpacing(spacing) {\n this.current.charSpacing = spacing;\n }\n\n setWordSpacing(spacing) {\n this.current.wordSpacing = spacing;\n }\n\n setHScale(scale) {\n this.current.textHScale = scale / 100;\n }\n\n setLeading(leading) {\n this.current.leading = -leading;\n }\n\n setFont(fontRefName, size) {\n const fontObj = this.commonObjs.get(fontRefName);\n const current = this.current;\n\n if (!fontObj) {\n throw new Error(`Can't find font for ${fontRefName}`);\n }\n current.fontMatrix = fontObj.fontMatrix || FONT_IDENTITY_MATRIX;\n\n // A valid matrix needs all main diagonal elements to be non-zero\n // This also ensures we bypass FF bugzilla bug #719844.\n if (current.fontMatrix[0] === 0 || current.fontMatrix[3] === 0) {\n warn(\"Invalid font matrix for font \" + fontRefName);\n }\n\n // The spec for Tf (setFont) says that 'size' specifies the font 'scale',\n // and in some docs this can be negative (inverted x-y axes).\n if (size < 0) {\n size = -size;\n current.fontDirection = -1;\n } else {\n current.fontDirection = 1;\n }\n\n this.current.font = fontObj;\n this.current.fontSize = size;\n\n if (fontObj.isType3Font) {\n return; // we don't need ctx.font for Type3 fonts\n }\n\n const name = fontObj.loadedName || \"sans-serif\";\n const typeface =\n fontObj.systemFontInfo?.css || `\"${name}\", ${fontObj.fallbackName}`;\n\n let bold = \"normal\";\n if (fontObj.black) {\n bold = \"900\";\n } else if (fontObj.bold) {\n bold = \"bold\";\n }\n const italic = fontObj.italic ? \"italic\" : \"normal\";\n\n // Some font backends cannot handle fonts below certain size.\n // Keeping the font at minimal size and using the fontSizeScale to change\n // the current transformation matrix before the fillText/strokeText.\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=726227\n let browserFontSize = size;\n if (size < MIN_FONT_SIZE) {\n browserFontSize = MIN_FONT_SIZE;\n } else if (size > MAX_FONT_SIZE) {\n browserFontSize = MAX_FONT_SIZE;\n }\n this.current.fontSizeScale = size / browserFontSize;\n\n this.ctx.font = `${italic} ${bold} ${browserFontSize}px ${typeface}`;\n }\n\n setTextRenderingMode(mode) {\n this.current.textRenderingMode = mode;\n }\n\n setTextRise(rise) {\n this.current.textRise = rise;\n }\n\n moveText(x, y) {\n this.current.x = this.current.lineX += x;\n this.current.y = this.current.lineY += y;\n }\n\n setLeadingMoveText(x, y) {\n this.setLeading(-y);\n this.moveText(x, y);\n }\n\n setTextMatrix(a, b, c, d, e, f) {\n this.current.textMatrix = [a, b, c, d, e, f];\n this.current.textMatrixScale = Math.hypot(a, b);\n\n this.current.x = this.current.lineX = 0;\n this.current.y = this.current.lineY = 0;\n }\n\n nextLine() {\n this.moveText(0, this.current.leading);\n }\n\n paintChar(character, x, y, patternTransform) {\n const ctx = this.ctx;\n const current = this.current;\n const font = current.font;\n const textRenderingMode = current.textRenderingMode;\n const fontSize = current.fontSize / current.fontSizeScale;\n const fillStrokeMode =\n textRenderingMode & TextRenderingMode.FILL_STROKE_MASK;\n const isAddToPathSet = !!(\n textRenderingMode & TextRenderingMode.ADD_TO_PATH_FLAG\n );\n const patternFill = current.patternFill && !font.missingFile;\n\n let addToPath;\n if (font.disableFontFace || isAddToPathSet || patternFill) {\n addToPath = font.getPathGenerator(this.commonObjs, character);\n }\n\n if (font.disableFontFace || patternFill) {\n ctx.save();\n ctx.translate(x, y);\n ctx.beginPath();\n addToPath(ctx, fontSize);\n if (patternTransform) {\n ctx.setTransform(...patternTransform);\n }\n if (\n fillStrokeMode === TextRenderingMode.FILL ||\n fillStrokeMode === TextRenderingMode.FILL_STROKE\n ) {\n ctx.fill();\n }\n if (\n fillStrokeMode === TextRenderingMode.STROKE ||\n fillStrokeMode === TextRenderingMode.FILL_STROKE\n ) {\n ctx.stroke();\n }\n ctx.restore();\n } else {\n if (\n fillStrokeMode === TextRenderingMode.FILL ||\n fillStrokeMode === TextRenderingMode.FILL_STROKE\n ) {\n ctx.fillText(character, x, y);\n }\n if (\n fillStrokeMode === TextRenderingMode.STROKE ||\n fillStrokeMode === TextRenderingMode.FILL_STROKE\n ) {\n ctx.strokeText(character, x, y);\n }\n }\n\n if (isAddToPathSet) {\n const paths = (this.pendingTextPaths ||= []);\n paths.push({\n transform: getCurrentTransform(ctx),\n x,\n y,\n fontSize,\n addToPath,\n });\n }\n }\n\n get isFontSubpixelAAEnabled() {\n // Checks if anti-aliasing is enabled when scaled text is painted.\n // On Windows GDI scaled fonts looks bad.\n const { context: ctx } = this.cachedCanvases.getCanvas(\n \"isFontSubpixelAAEnabled\",\n 10,\n 10\n );\n ctx.scale(1.5, 1);\n ctx.fillText(\"I\", 0, 10);\n const data = ctx.getImageData(0, 0, 10, 10).data;\n let enabled = false;\n for (let i = 3; i < data.length; i += 4) {\n if (data[i] > 0 && data[i] < 255) {\n enabled = true;\n break;\n }\n }\n return shadow(this, \"isFontSubpixelAAEnabled\", enabled);\n }\n\n showText(glyphs) {\n const current = this.current;\n const font = current.font;\n if (font.isType3Font) {\n return this.showType3Text(glyphs);\n }\n\n const fontSize = current.fontSize;\n if (fontSize === 0) {\n return undefined;\n }\n\n const ctx = this.ctx;\n const fontSizeScale = current.fontSizeScale;\n const charSpacing = current.charSpacing;\n const wordSpacing = current.wordSpacing;\n const fontDirection = current.fontDirection;\n const textHScale = current.textHScale * fontDirection;\n const glyphsLength = glyphs.length;\n const vertical = font.vertical;\n const spacingDir = vertical ? 1 : -1;\n const defaultVMetrics = font.defaultVMetrics;\n const widthAdvanceScale = fontSize * current.fontMatrix[0];\n\n const simpleFillText =\n current.textRenderingMode === TextRenderingMode.FILL &&\n !font.disableFontFace &&\n !current.patternFill;\n\n ctx.save();\n ctx.transform(...current.textMatrix);\n ctx.translate(current.x, current.y + current.textRise);\n\n if (fontDirection > 0) {\n ctx.scale(textHScale, -1);\n } else {\n ctx.scale(textHScale, 1);\n }\n\n let patternTransform;\n if (current.patternFill) {\n ctx.save();\n const pattern = current.fillColor.getPattern(\n ctx,\n this,\n getCurrentTransformInverse(ctx),\n PathType.FILL\n );\n patternTransform = getCurrentTransform(ctx);\n ctx.restore();\n ctx.fillStyle = pattern;\n }\n\n let lineWidth = current.lineWidth;\n const scale = current.textMatrixScale;\n if (scale === 0 || lineWidth === 0) {\n const fillStrokeMode =\n current.textRenderingMode & TextRenderingMode.FILL_STROKE_MASK;\n if (\n fillStrokeMode === TextRenderingMode.STROKE ||\n fillStrokeMode === TextRenderingMode.FILL_STROKE\n ) {\n lineWidth = this.getSinglePixelWidth();\n }\n } else {\n lineWidth /= scale;\n }\n\n if (fontSizeScale !== 1.0) {\n ctx.scale(fontSizeScale, fontSizeScale);\n lineWidth /= fontSizeScale;\n }\n\n ctx.lineWidth = lineWidth;\n\n if (font.isInvalidPDFjsFont) {\n const chars = [];\n let width = 0;\n for (const glyph of glyphs) {\n chars.push(glyph.unicode);\n width += glyph.width;\n }\n ctx.fillText(chars.join(\"\"), 0, 0);\n current.x += width * widthAdvanceScale * textHScale;\n ctx.restore();\n this.compose();\n\n return undefined;\n }\n\n let x = 0,\n i;\n for (i = 0; i < glyphsLength; ++i) {\n const glyph = glyphs[i];\n if (typeof glyph === \"number\") {\n x += (spacingDir * glyph * fontSize) / 1000;\n continue;\n }\n\n let restoreNeeded = false;\n const spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n const character = glyph.fontChar;\n const accent = glyph.accent;\n let scaledX, scaledY;\n let width = glyph.width;\n if (vertical) {\n const vmetric = glyph.vmetric || defaultVMetrics;\n const vx =\n -(glyph.vmetric ? vmetric[1] : width * 0.5) * widthAdvanceScale;\n const vy = vmetric[2] * widthAdvanceScale;\n\n width = vmetric ? -vmetric[0] : width;\n scaledX = vx / fontSizeScale;\n scaledY = (x + vy) / fontSizeScale;\n } else {\n scaledX = x / fontSizeScale;\n scaledY = 0;\n }\n\n if (font.remeasure && width > 0) {\n // Some standard fonts may not have the exact width: rescale per\n // character if measured width is greater than expected glyph width\n // and subpixel-aa is enabled, otherwise just center the glyph.\n const measuredWidth =\n ((ctx.measureText(character).width * 1000) / fontSize) *\n fontSizeScale;\n if (width < measuredWidth && this.isFontSubpixelAAEnabled) {\n const characterScaleX = width / measuredWidth;\n restoreNeeded = true;\n ctx.save();\n ctx.scale(characterScaleX, 1);\n scaledX /= characterScaleX;\n } else if (width !== measuredWidth) {\n scaledX +=\n (((width - measuredWidth) / 2000) * fontSize) / fontSizeScale;\n }\n }\n\n // Only attempt to draw the glyph if it is actually in the embedded font\n // file or if there isn't a font file so the fallback font is shown.\n if (this.contentVisible && (glyph.isInFont || font.missingFile)) {\n if (simpleFillText && !accent) {\n // common case\n ctx.fillText(character, scaledX, scaledY);\n } else {\n this.paintChar(character, scaledX, scaledY, patternTransform);\n if (accent) {\n const scaledAccentX =\n scaledX + (fontSize * accent.offset.x) / fontSizeScale;\n const scaledAccentY =\n scaledY - (fontSize * accent.offset.y) / fontSizeScale;\n this.paintChar(\n accent.fontChar,\n scaledAccentX,\n scaledAccentY,\n patternTransform\n );\n }\n }\n }\n\n const charWidth = vertical\n ? width * widthAdvanceScale - spacing * fontDirection\n : width * widthAdvanceScale + spacing * fontDirection;\n x += charWidth;\n\n if (restoreNeeded) {\n ctx.restore();\n }\n }\n if (vertical) {\n current.y -= x;\n } else {\n current.x += x * textHScale;\n }\n ctx.restore();\n this.compose();\n\n return undefined;\n }\n\n showType3Text(glyphs) {\n // Type3 fonts - each glyph is a \"mini-PDF\"\n const ctx = this.ctx;\n const current = this.current;\n const font = current.font;\n const fontSize = current.fontSize;\n const fontDirection = current.fontDirection;\n const spacingDir = font.vertical ? 1 : -1;\n const charSpacing = current.charSpacing;\n const wordSpacing = current.wordSpacing;\n const textHScale = current.textHScale * fontDirection;\n const fontMatrix = current.fontMatrix || FONT_IDENTITY_MATRIX;\n const glyphsLength = glyphs.length;\n const isTextInvisible =\n current.textRenderingMode === TextRenderingMode.INVISIBLE;\n let i, glyph, width, spacingLength;\n\n if (isTextInvisible || fontSize === 0) {\n return;\n }\n this._cachedScaleForStroking[0] = -1;\n this._cachedGetSinglePixelWidth = null;\n\n ctx.save();\n ctx.transform(...current.textMatrix);\n ctx.translate(current.x, current.y);\n\n ctx.scale(textHScale, fontDirection);\n\n for (i = 0; i < glyphsLength; ++i) {\n glyph = glyphs[i];\n if (typeof glyph === \"number\") {\n spacingLength = (spacingDir * glyph * fontSize) / 1000;\n this.ctx.translate(spacingLength, 0);\n current.x += spacingLength * textHScale;\n continue;\n }\n\n const spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n const operatorList = font.charProcOperatorList[glyph.operatorListId];\n if (!operatorList) {\n warn(`Type3 character \"${glyph.operatorListId}\" is not available.`);\n continue;\n }\n if (this.contentVisible) {\n this.processingType3 = glyph;\n this.save();\n ctx.scale(fontSize, fontSize);\n ctx.transform(...fontMatrix);\n this.executeOperatorList(operatorList);\n this.restore();\n }\n\n const transformed = Util.applyTransform([glyph.width, 0], fontMatrix);\n width = transformed[0] * fontSize + spacing;\n\n ctx.translate(width, 0);\n current.x += width * textHScale;\n }\n ctx.restore();\n this.processingType3 = null;\n }\n\n // Type3 fonts\n setCharWidth(xWidth, yWidth) {\n // We can safely ignore this since the width should be the same\n // as the width in the Widths array.\n }\n\n setCharWidthAndBounds(xWidth, yWidth, llx, lly, urx, ury) {\n this.ctx.rect(llx, lly, urx - llx, ury - lly);\n this.ctx.clip();\n this.endPath();\n }\n\n // Color\n getColorN_Pattern(IR) {\n let pattern;\n if (IR[0] === \"TilingPattern\") {\n const color = IR[1];\n const baseTransform = this.baseTransform || getCurrentTransform(this.ctx);\n const canvasGraphicsFactory = {\n createCanvasGraphics: ctx =>\n new CanvasGraphics(\n ctx,\n this.commonObjs,\n this.objs,\n this.canvasFactory,\n this.filterFactory,\n {\n optionalContentConfig: this.optionalContentConfig,\n markedContentStack: this.markedContentStack,\n }\n ),\n };\n pattern = new TilingPattern(\n IR,\n color,\n this.ctx,\n canvasGraphicsFactory,\n baseTransform\n );\n } else {\n pattern = this._getPattern(IR[1], IR[2]);\n }\n return pattern;\n }\n\n setStrokeColorN() {\n this.current.strokeColor = this.getColorN_Pattern(arguments);\n }\n\n setFillColorN() {\n this.current.fillColor = this.getColorN_Pattern(arguments);\n this.current.patternFill = true;\n }\n\n setStrokeRGBColor(r, g, b) {\n const color = Util.makeHexColor(r, g, b);\n this.ctx.strokeStyle = color;\n this.current.strokeColor = color;\n }\n\n setFillRGBColor(r, g, b) {\n const color = Util.makeHexColor(r, g, b);\n this.ctx.fillStyle = color;\n this.current.fillColor = color;\n this.current.patternFill = false;\n }\n\n _getPattern(objId, matrix = null) {\n let pattern;\n if (this.cachedPatterns.has(objId)) {\n pattern = this.cachedPatterns.get(objId);\n } else {\n pattern = getShadingPattern(this.getObject(objId));\n this.cachedPatterns.set(objId, pattern);\n }\n if (matrix) {\n pattern.matrix = matrix;\n }\n return pattern;\n }\n\n shadingFill(objId) {\n if (!this.contentVisible) {\n return;\n }\n const ctx = this.ctx;\n\n this.save();\n const pattern = this._getPattern(objId);\n ctx.fillStyle = pattern.getPattern(\n ctx,\n this,\n getCurrentTransformInverse(ctx),\n PathType.SHADING\n );\n\n const inv = getCurrentTransformInverse(ctx);\n if (inv) {\n const { width, height } = ctx.canvas;\n const [x0, y0, x1, y1] = Util.getAxialAlignedBoundingBox(\n [0, 0, width, height],\n inv\n );\n\n this.ctx.fillRect(x0, y0, x1 - x0, y1 - y0);\n } else {\n // HACK to draw the gradient onto an infinite rectangle.\n // PDF gradients are drawn across the entire image while\n // Canvas only allows gradients to be drawn in a rectangle\n // The following bug should allow us to remove this.\n // https://bugzilla.mozilla.org/show_bug.cgi?id=664884\n\n this.ctx.fillRect(-1e10, -1e10, 2e10, 2e10);\n }\n\n this.compose(this.current.getClippedPathBoundingBox());\n this.restore();\n }\n\n // Images\n beginInlineImage() {\n unreachable(\"Should not call beginInlineImage\");\n }\n\n beginImageData() {\n unreachable(\"Should not call beginImageData\");\n }\n\n paintFormXObjectBegin(matrix, bbox) {\n if (!this.contentVisible) {\n return;\n }\n this.save();\n this.baseTransformStack.push(this.baseTransform);\n\n if (matrix) {\n this.transform(...matrix);\n }\n this.baseTransform = getCurrentTransform(this.ctx);\n\n if (bbox) {\n const width = bbox[2] - bbox[0];\n const height = bbox[3] - bbox[1];\n this.ctx.rect(bbox[0], bbox[1], width, height);\n this.current.updateRectMinMax(getCurrentTransform(this.ctx), bbox);\n this.clip();\n this.endPath();\n }\n }\n\n paintFormXObjectEnd() {\n if (!this.contentVisible) {\n return;\n }\n this.restore();\n this.baseTransform = this.baseTransformStack.pop();\n }\n\n beginGroup(group) {\n if (!this.contentVisible) {\n return;\n }\n\n this.save();\n // If there's an active soft mask we don't want it enabled for the group, so\n // clear it out. The mask and suspended canvas will be restored in endGroup.\n if (this.inSMaskMode) {\n this.endSMaskMode();\n this.current.activeSMask = null;\n }\n\n const currentCtx = this.ctx;\n // TODO non-isolated groups - according to Rik at adobe non-isolated\n // group results aren't usually that different and they even have tools\n // that ignore this setting. Notes from Rik on implementing:\n // - When you encounter an transparency group, create a new canvas with\n // the dimensions of the bbox\n // - copy the content from the previous canvas to the new canvas\n // - draw as usual\n // - remove the backdrop alpha:\n // alphaNew = 1 - (1 - alpha)/(1 - alphaBackdrop) with 'alpha' the alpha\n // value of your transparency group and 'alphaBackdrop' the alpha of the\n // backdrop\n // - remove background color:\n // colorNew = color - alphaNew *colorBackdrop /(1 - alphaNew)\n if (!group.isolated) {\n info(\"TODO: Support non-isolated groups.\");\n }\n\n // TODO knockout - supposedly possible with the clever use of compositing\n // modes.\n if (group.knockout) {\n warn(\"Knockout groups not supported.\");\n }\n\n const currentTransform = getCurrentTransform(currentCtx);\n if (group.matrix) {\n currentCtx.transform(...group.matrix);\n }\n if (!group.bbox) {\n throw new Error(\"Bounding box is required.\");\n }\n\n // Based on the current transform figure out how big the bounding box\n // will actually be.\n let bounds = Util.getAxialAlignedBoundingBox(\n group.bbox,\n getCurrentTransform(currentCtx)\n );\n // Clip the bounding box to the current canvas.\n const canvasBounds = [\n 0,\n 0,\n currentCtx.canvas.width,\n currentCtx.canvas.height,\n ];\n bounds = Util.intersect(bounds, canvasBounds) || [0, 0, 0, 0];\n // Use ceil in case we're between sizes so we don't create canvas that is\n // too small and make the canvas at least 1x1 pixels.\n const offsetX = Math.floor(bounds[0]);\n const offsetY = Math.floor(bounds[1]);\n const drawnWidth = Math.max(Math.ceil(bounds[2]) - offsetX, 1);\n const drawnHeight = Math.max(Math.ceil(bounds[3]) - offsetY, 1);\n\n this.current.startNewPathAndClipBox([0, 0, drawnWidth, drawnHeight]);\n\n let cacheId = \"groupAt\" + this.groupLevel;\n if (group.smask) {\n // Using two cache entries is case if masks are used one after another.\n cacheId += \"_smask_\" + (this.smaskCounter++ % 2);\n }\n const scratchCanvas = this.cachedCanvases.getCanvas(\n cacheId,\n drawnWidth,\n drawnHeight\n );\n const groupCtx = scratchCanvas.context;\n\n // Since we created a new canvas that is just the size of the bounding box\n // we have to translate the group ctx.\n groupCtx.translate(-offsetX, -offsetY);\n groupCtx.transform(...currentTransform);\n\n if (group.smask) {\n // Saving state and cached mask to be used in setGState.\n this.smaskStack.push({\n canvas: scratchCanvas.canvas,\n context: groupCtx,\n offsetX,\n offsetY,\n subtype: group.smask.subtype,\n backdrop: group.smask.backdrop,\n transferMap: group.smask.transferMap || null,\n startTransformInverse: null, // used during suspend operation\n });\n } else {\n // Setup the current ctx so when the group is popped we draw it at the\n // right location.\n currentCtx.setTransform(1, 0, 0, 1, 0, 0);\n currentCtx.translate(offsetX, offsetY);\n currentCtx.save();\n }\n // The transparency group inherits all off the current graphics state\n // except the blend mode, soft mask, and alpha constants.\n copyCtxState(currentCtx, groupCtx);\n this.ctx = groupCtx;\n this.setGState([\n [\"BM\", \"source-over\"],\n [\"ca\", 1],\n [\"CA\", 1],\n ]);\n this.groupStack.push(currentCtx);\n this.groupLevel++;\n }\n\n endGroup(group) {\n if (!this.contentVisible) {\n return;\n }\n this.groupLevel--;\n const groupCtx = this.ctx;\n const ctx = this.groupStack.pop();\n this.ctx = ctx;\n // Turn off image smoothing to avoid sub pixel interpolation which can\n // look kind of blurry for some pdfs.\n this.ctx.imageSmoothingEnabled = false;\n\n if (group.smask) {\n this.tempSMask = this.smaskStack.pop();\n this.restore();\n } else {\n this.ctx.restore();\n const currentMtx = getCurrentTransform(this.ctx);\n this.restore();\n this.ctx.save();\n this.ctx.setTransform(...currentMtx);\n const dirtyBox = Util.getAxialAlignedBoundingBox(\n [0, 0, groupCtx.canvas.width, groupCtx.canvas.height],\n currentMtx\n );\n this.ctx.drawImage(groupCtx.canvas, 0, 0);\n this.ctx.restore();\n this.compose(dirtyBox);\n }\n }\n\n beginAnnotation(id, rect, transform, matrix, hasOwnCanvas) {\n // The annotations are drawn just after the page content.\n // The page content drawing can potentially have set a transform,\n // a clipping path, whatever...\n // So in order to have something clean, we restore the initial state.\n this.#restoreInitialState();\n resetCtxToDefault(this.ctx);\n\n this.ctx.save();\n this.save();\n\n if (this.baseTransform) {\n this.ctx.setTransform(...this.baseTransform);\n }\n\n if (rect) {\n const width = rect[2] - rect[0];\n const height = rect[3] - rect[1];\n\n if (hasOwnCanvas && this.annotationCanvasMap) {\n transform = transform.slice();\n transform[4] -= rect[0];\n transform[5] -= rect[1];\n\n rect = rect.slice();\n rect[0] = rect[1] = 0;\n rect[2] = width;\n rect[3] = height;\n\n const [scaleX, scaleY] = Util.singularValueDecompose2dScale(\n getCurrentTransform(this.ctx)\n );\n const { viewportScale } = this;\n const canvasWidth = Math.ceil(\n width * this.outputScaleX * viewportScale\n );\n const canvasHeight = Math.ceil(\n height * this.outputScaleY * viewportScale\n );\n\n this.annotationCanvas = this.canvasFactory.create(\n canvasWidth,\n canvasHeight\n );\n const { canvas, context } = this.annotationCanvas;\n this.annotationCanvasMap.set(id, canvas);\n this.annotationCanvas.savedCtx = this.ctx;\n this.ctx = context;\n this.ctx.save();\n this.ctx.setTransform(scaleX, 0, 0, -scaleY, 0, height * scaleY);\n\n resetCtxToDefault(this.ctx);\n } else {\n resetCtxToDefault(this.ctx);\n\n this.ctx.rect(rect[0], rect[1], width, height);\n this.ctx.clip();\n this.endPath();\n }\n }\n\n this.current = new CanvasExtraState(\n this.ctx.canvas.width,\n this.ctx.canvas.height\n );\n\n this.transform(...transform);\n this.transform(...matrix);\n }\n\n endAnnotation() {\n if (this.annotationCanvas) {\n this.ctx.restore();\n this.#drawFilter();\n\n this.ctx = this.annotationCanvas.savedCtx;\n delete this.annotationCanvas.savedCtx;\n delete this.annotationCanvas;\n }\n }\n\n paintImageMaskXObject(img) {\n if (!this.contentVisible) {\n return;\n }\n const count = img.count;\n img = this.getObject(img.data, img);\n img.count = count;\n\n const ctx = this.ctx;\n const glyph = this.processingType3;\n\n if (glyph) {\n if (glyph.compiled === undefined) {\n glyph.compiled = compileType3Glyph(img);\n }\n\n if (glyph.compiled) {\n glyph.compiled(ctx);\n return;\n }\n }\n const mask = this._createMaskCanvas(img);\n const maskCanvas = mask.canvas;\n\n ctx.save();\n // The mask is drawn with the transform applied. Reset the current\n // transform to draw to the identity.\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(maskCanvas, mask.offsetX, mask.offsetY);\n ctx.restore();\n this.compose();\n }\n\n paintImageMaskXObjectRepeat(\n img,\n scaleX,\n skewX = 0,\n skewY = 0,\n scaleY,\n positions\n ) {\n if (!this.contentVisible) {\n return;\n }\n\n img = this.getObject(img.data, img);\n\n const ctx = this.ctx;\n ctx.save();\n const currentTransform = getCurrentTransform(ctx);\n ctx.transform(scaleX, skewX, skewY, scaleY, 0, 0);\n const mask = this._createMaskCanvas(img);\n\n ctx.setTransform(\n 1,\n 0,\n 0,\n 1,\n mask.offsetX - currentTransform[4],\n mask.offsetY - currentTransform[5]\n );\n for (let i = 0, ii = positions.length; i < ii; i += 2) {\n const trans = Util.transform(currentTransform, [\n scaleX,\n skewX,\n skewY,\n scaleY,\n positions[i],\n positions[i + 1],\n ]);\n\n const [x, y] = Util.applyTransform([0, 0], trans);\n ctx.drawImage(mask.canvas, x, y);\n }\n ctx.restore();\n this.compose();\n }\n\n paintImageMaskXObjectGroup(images) {\n if (!this.contentVisible) {\n return;\n }\n const ctx = this.ctx;\n\n const fillColor = this.current.fillColor;\n const isPatternFill = this.current.patternFill;\n\n for (const image of images) {\n const { data, width, height, transform } = image;\n\n const maskCanvas = this.cachedCanvases.getCanvas(\n \"maskCanvas\",\n width,\n height\n );\n const maskCtx = maskCanvas.context;\n maskCtx.save();\n\n const img = this.getObject(data, image);\n putBinaryImageMask(maskCtx, img);\n\n maskCtx.globalCompositeOperation = \"source-in\";\n\n maskCtx.fillStyle = isPatternFill\n ? fillColor.getPattern(\n maskCtx,\n this,\n getCurrentTransformInverse(ctx),\n PathType.FILL\n )\n : fillColor;\n maskCtx.fillRect(0, 0, width, height);\n\n maskCtx.restore();\n\n ctx.save();\n ctx.transform(...transform);\n ctx.scale(1, -1);\n drawImageAtIntegerCoords(\n ctx,\n maskCanvas.canvas,\n 0,\n 0,\n width,\n height,\n 0,\n -1,\n 1,\n 1\n );\n ctx.restore();\n }\n this.compose();\n }\n\n paintImageXObject(objId) {\n if (!this.contentVisible) {\n return;\n }\n const imgData = this.getObject(objId);\n if (!imgData) {\n warn(\"Dependent image isn't ready yet\");\n return;\n }\n\n this.paintInlineImageXObject(imgData);\n }\n\n paintImageXObjectRepeat(objId, scaleX, scaleY, positions) {\n if (!this.contentVisible) {\n return;\n }\n const imgData = this.getObject(objId);\n if (!imgData) {\n warn(\"Dependent image isn't ready yet\");\n return;\n }\n\n const width = imgData.width;\n const height = imgData.height;\n const map = [];\n for (let i = 0, ii = positions.length; i < ii; i += 2) {\n map.push({\n transform: [scaleX, 0, 0, scaleY, positions[i], positions[i + 1]],\n x: 0,\n y: 0,\n w: width,\n h: height,\n });\n }\n this.paintInlineImageXObjectGroup(imgData, map);\n }\n\n applyTransferMapsToCanvas(ctx) {\n if (this.current.transferMaps !== \"none\") {\n ctx.filter = this.current.transferMaps;\n ctx.drawImage(ctx.canvas, 0, 0);\n ctx.filter = \"none\";\n }\n return ctx.canvas;\n }\n\n applyTransferMapsToBitmap(imgData) {\n if (this.current.transferMaps === \"none\") {\n return imgData.bitmap;\n }\n const { bitmap, width, height } = imgData;\n const tmpCanvas = this.cachedCanvases.getCanvas(\n \"inlineImage\",\n width,\n height\n );\n const tmpCtx = tmpCanvas.context;\n tmpCtx.filter = this.current.transferMaps;\n tmpCtx.drawImage(bitmap, 0, 0);\n tmpCtx.filter = \"none\";\n\n return tmpCanvas.canvas;\n }\n\n paintInlineImageXObject(imgData) {\n if (!this.contentVisible) {\n return;\n }\n const width = imgData.width;\n const height = imgData.height;\n const ctx = this.ctx;\n\n this.save();\n\n if (\n (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) ||\n !isNodeJS\n ) {\n // The filter, if any, will be applied in applyTransferMapsToBitmap.\n // It must be applied to the image before rescaling else some artifacts\n // could appear.\n // The final restore will reset it to its value.\n const { filter } = ctx;\n if (filter !== \"none\" && filter !== \"\") {\n ctx.filter = \"none\";\n }\n }\n\n // scale the image to the unit square\n ctx.scale(1 / width, -1 / height);\n\n let imgToPaint;\n if (imgData.bitmap) {\n imgToPaint = this.applyTransferMapsToBitmap(imgData);\n } else if (\n (typeof HTMLElement === \"function\" && imgData instanceof HTMLElement) ||\n !imgData.data\n ) {\n // typeof check is needed due to node.js support, see issue #8489\n imgToPaint = imgData;\n } else {\n const tmpCanvas = this.cachedCanvases.getCanvas(\n \"inlineImage\",\n width,\n height\n );\n const tmpCtx = tmpCanvas.context;\n putBinaryImageData(tmpCtx, imgData);\n imgToPaint = this.applyTransferMapsToCanvas(tmpCtx);\n }\n\n const scaled = this._scaleImage(\n imgToPaint,\n getCurrentTransformInverse(ctx)\n );\n ctx.imageSmoothingEnabled = getImageSmoothingEnabled(\n getCurrentTransform(ctx),\n imgData.interpolate\n );\n\n drawImageAtIntegerCoords(\n ctx,\n scaled.img,\n 0,\n 0,\n scaled.paintWidth,\n scaled.paintHeight,\n 0,\n -height,\n width,\n height\n );\n this.compose();\n this.restore();\n }\n\n paintInlineImageXObjectGroup(imgData, map) {\n if (!this.contentVisible) {\n return;\n }\n const ctx = this.ctx;\n let imgToPaint;\n if (imgData.bitmap) {\n imgToPaint = imgData.bitmap;\n } else {\n const w = imgData.width;\n const h = imgData.height;\n\n const tmpCanvas = this.cachedCanvases.getCanvas(\"inlineImage\", w, h);\n const tmpCtx = tmpCanvas.context;\n putBinaryImageData(tmpCtx, imgData);\n imgToPaint = this.applyTransferMapsToCanvas(tmpCtx);\n }\n\n for (const entry of map) {\n ctx.save();\n ctx.transform(...entry.transform);\n ctx.scale(1, -1);\n drawImageAtIntegerCoords(\n ctx,\n imgToPaint,\n entry.x,\n entry.y,\n entry.w,\n entry.h,\n 0,\n -1,\n 1,\n 1\n );\n ctx.restore();\n }\n this.compose();\n }\n\n paintSolidColorImageMask() {\n if (!this.contentVisible) {\n return;\n }\n this.ctx.fillRect(0, 0, 1, 1);\n this.compose();\n }\n\n // Marked content\n\n markPoint(tag) {\n // TODO Marked content.\n }\n\n markPointProps(tag, properties) {\n // TODO Marked content.\n }\n\n beginMarkedContent(tag) {\n this.markedContentStack.push({\n visible: true,\n });\n }\n\n beginMarkedContentProps(tag, properties) {\n if (tag === \"OC\") {\n this.markedContentStack.push({\n visible: this.optionalContentConfig.isVisible(properties),\n });\n } else {\n this.markedContentStack.push({\n visible: true,\n });\n }\n this.contentVisible = this.isContentVisible();\n }\n\n endMarkedContent() {\n this.markedContentStack.pop();\n this.contentVisible = this.isContentVisible();\n }\n\n // Compatibility\n\n beginCompat() {\n // TODO ignore undefined operators (should we do that anyway?)\n }\n\n endCompat() {\n // TODO stop ignoring undefined operators\n }\n\n // Helper functions\n\n consumePath(clipBox) {\n const isEmpty = this.current.isEmptyClip();\n if (this.pendingClip) {\n this.current.updateClipFromPath();\n }\n if (!this.pendingClip) {\n this.compose(clipBox);\n }\n const ctx = this.ctx;\n if (this.pendingClip) {\n if (!isEmpty) {\n if (this.pendingClip === EO_CLIP) {\n ctx.clip(\"evenodd\");\n } else {\n ctx.clip();\n }\n }\n this.pendingClip = null;\n }\n this.current.startNewPathAndClipBox(this.current.clipBox);\n ctx.beginPath();\n }\n\n getSinglePixelWidth() {\n if (!this._cachedGetSinglePixelWidth) {\n const m = getCurrentTransform(this.ctx);\n if (m[1] === 0 && m[2] === 0) {\n // Fast path\n this._cachedGetSinglePixelWidth =\n 1 / Math.min(Math.abs(m[0]), Math.abs(m[3]));\n } else {\n const absDet = Math.abs(m[0] * m[3] - m[2] * m[1]);\n const normX = Math.hypot(m[0], m[2]);\n const normY = Math.hypot(m[1], m[3]);\n this._cachedGetSinglePixelWidth = Math.max(normX, normY) / absDet;\n }\n }\n return this._cachedGetSinglePixelWidth;\n }\n\n getScaleForStroking() {\n // A pixel has thicknessX = thicknessY = 1;\n // A transformed pixel is a parallelogram and the thicknesses\n // corresponds to the heights.\n // The goal of this function is to rescale before setting the\n // lineWidth in order to have both thicknesses greater or equal\n // to 1 after transform.\n if (this._cachedScaleForStroking[0] === -1) {\n const { lineWidth } = this.current;\n const { a, b, c, d } = this.ctx.getTransform();\n let scaleX, scaleY;\n\n if (b === 0 && c === 0) {\n // Fast path\n const normX = Math.abs(a);\n const normY = Math.abs(d);\n if (normX === normY) {\n if (lineWidth === 0) {\n scaleX = scaleY = 1 / normX;\n } else {\n const scaledLineWidth = normX * lineWidth;\n scaleX = scaleY = scaledLineWidth < 1 ? 1 / scaledLineWidth : 1;\n }\n } else if (lineWidth === 0) {\n scaleX = 1 / normX;\n scaleY = 1 / normY;\n } else {\n const scaledXLineWidth = normX * lineWidth;\n const scaledYLineWidth = normY * lineWidth;\n scaleX = scaledXLineWidth < 1 ? 1 / scaledXLineWidth : 1;\n scaleY = scaledYLineWidth < 1 ? 1 / scaledYLineWidth : 1;\n }\n } else {\n // A pixel (base (x, y)) is transformed by M into a parallelogram:\n // - its area is |det(M)|;\n // - heightY (orthogonal to Mx) has a length: |det(M)| / norm(Mx);\n // - heightX (orthogonal to My) has a length: |det(M)| / norm(My).\n // heightX and heightY are the thicknesses of the transformed pixel\n // and they must be both greater or equal to 1.\n const absDet = Math.abs(a * d - b * c);\n const normX = Math.hypot(a, b);\n const normY = Math.hypot(c, d);\n if (lineWidth === 0) {\n scaleX = normY / absDet;\n scaleY = normX / absDet;\n } else {\n const baseArea = lineWidth * absDet;\n scaleX = normY > baseArea ? normY / baseArea : 1;\n scaleY = normX > baseArea ? normX / baseArea : 1;\n }\n }\n this._cachedScaleForStroking[0] = scaleX;\n this._cachedScaleForStroking[1] = scaleY;\n }\n return this._cachedScaleForStroking;\n }\n\n // Rescale before stroking in order to have a final lineWidth\n // with both thicknesses greater or equal to 1.\n rescaleAndStroke(saveRestore) {\n const { ctx } = this;\n const { lineWidth } = this.current;\n const [scaleX, scaleY] = this.getScaleForStroking();\n\n ctx.lineWidth = lineWidth || 1;\n\n if (scaleX === 1 && scaleY === 1) {\n ctx.stroke();\n return;\n }\n\n const dashes = ctx.getLineDash();\n if (saveRestore) {\n ctx.save();\n }\n\n ctx.scale(scaleX, scaleY);\n\n // How the dashed line is rendered depends on the current transform...\n // so we added a rescale to handle too thin lines and consequently\n // the way the line is dashed will be modified.\n // If scaleX === scaleY, the dashed lines will be rendered correctly\n // else we'll have some bugs (but only with too thin lines).\n // Here we take the max... why not taking the min... or something else.\n // Anyway, as said it's buggy when scaleX !== scaleY.\n if (dashes.length > 0) {\n const scale = Math.max(scaleX, scaleY);\n ctx.setLineDash(dashes.map(x => x / scale));\n ctx.lineDashOffset /= scale;\n }\n\n ctx.stroke();\n\n if (saveRestore) {\n ctx.restore();\n }\n }\n\n isContentVisible() {\n for (let i = this.markedContentStack.length - 1; i >= 0; i--) {\n if (!this.markedContentStack[i].visible) {\n return false;\n }\n }\n return true;\n }\n}\n\nfor (const op in OPS) {\n if (CanvasGraphics.prototype[op] !== undefined) {\n CanvasGraphics.prototype[OPS[op]] = CanvasGraphics.prototype[op];\n }\n}\n\nexport { CanvasGraphics };\n","/* Copyright 2018 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nclass GlobalWorkerOptions {\n static #port = null;\n\n static #src = \"\";\n\n /**\n * @type {Worker | null}\n */\n static get workerPort() {\n return this.#port;\n }\n\n /**\n * @param {Worker | null} workerPort - Defines global port for worker process.\n * Overrides the `workerSrc` option.\n */\n static set workerPort(val) {\n if (\n !(typeof Worker !== \"undefined\" && val instanceof Worker) &&\n val !== null\n ) {\n throw new Error(\"Invalid `workerPort` type.\");\n }\n this.#port = val;\n }\n\n /**\n * @type {string}\n */\n static get workerSrc() {\n return this.#src;\n }\n\n /**\n * @param {string} workerSrc - A string containing the path and filename of\n * the worker file.\n *\n * NOTE: The `workerSrc` option should always be set, in order to prevent\n * any issues when using the PDF.js library.\n */\n static set workerSrc(val) {\n if (typeof val !== \"string\") {\n throw new Error(\"Invalid `workerSrc` type.\");\n }\n this.#src = val;\n }\n}\n\nexport { GlobalWorkerOptions };\n","/* Copyright 2018 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AbortException,\n assert,\n MissingPDFException,\n PasswordException,\n UnexpectedResponseException,\n UnknownErrorException,\n unreachable,\n} from \"./util.js\";\n\nconst CallbackKind = {\n UNKNOWN: 0,\n DATA: 1,\n ERROR: 2,\n};\n\nconst StreamKind = {\n UNKNOWN: 0,\n CANCEL: 1,\n CANCEL_COMPLETE: 2,\n CLOSE: 3,\n ENQUEUE: 4,\n ERROR: 5,\n PULL: 6,\n PULL_COMPLETE: 7,\n START_COMPLETE: 8,\n};\n\nfunction wrapReason(reason) {\n if (\n !(\n reason instanceof Error ||\n (typeof reason === \"object\" && reason !== null)\n )\n ) {\n unreachable(\n 'wrapReason: Expected \"reason\" to be a (possibly cloned) Error.'\n );\n }\n switch (reason.name) {\n case \"AbortException\":\n return new AbortException(reason.message);\n case \"MissingPDFException\":\n return new MissingPDFException(reason.message);\n case \"PasswordException\":\n return new PasswordException(reason.message, reason.code);\n case \"UnexpectedResponseException\":\n return new UnexpectedResponseException(reason.message, reason.status);\n case \"UnknownErrorException\":\n return new UnknownErrorException(reason.message, reason.details);\n default:\n return new UnknownErrorException(reason.message, reason.toString());\n }\n}\n\nclass MessageHandler {\n constructor(sourceName, targetName, comObj) {\n this.sourceName = sourceName;\n this.targetName = targetName;\n this.comObj = comObj;\n this.callbackId = 1;\n this.streamId = 1;\n this.streamSinks = Object.create(null);\n this.streamControllers = Object.create(null);\n this.callbackCapabilities = Object.create(null);\n this.actionHandler = Object.create(null);\n\n this._onComObjOnMessage = event => {\n const data = event.data;\n if (data.targetName !== this.sourceName) {\n return;\n }\n if (data.stream) {\n this.#processStreamMessage(data);\n return;\n }\n if (data.callback) {\n const callbackId = data.callbackId;\n const capability = this.callbackCapabilities[callbackId];\n if (!capability) {\n throw new Error(`Cannot resolve callback ${callbackId}`);\n }\n delete this.callbackCapabilities[callbackId];\n\n if (data.callback === CallbackKind.DATA) {\n capability.resolve(data.data);\n } else if (data.callback === CallbackKind.ERROR) {\n capability.reject(wrapReason(data.reason));\n } else {\n throw new Error(\"Unexpected callback case\");\n }\n return;\n }\n const action = this.actionHandler[data.action];\n if (!action) {\n throw new Error(`Unknown action from worker: ${data.action}`);\n }\n if (data.callbackId) {\n const cbSourceName = this.sourceName;\n const cbTargetName = data.sourceName;\n\n new Promise(function (resolve) {\n resolve(action(data.data));\n }).then(\n function (result) {\n comObj.postMessage({\n sourceName: cbSourceName,\n targetName: cbTargetName,\n callback: CallbackKind.DATA,\n callbackId: data.callbackId,\n data: result,\n });\n },\n function (reason) {\n comObj.postMessage({\n sourceName: cbSourceName,\n targetName: cbTargetName,\n callback: CallbackKind.ERROR,\n callbackId: data.callbackId,\n reason: wrapReason(reason),\n });\n }\n );\n return;\n }\n if (data.streamId) {\n this.#createStreamSink(data);\n return;\n }\n action(data.data);\n };\n comObj.addEventListener(\"message\", this._onComObjOnMessage);\n }\n\n on(actionName, handler) {\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n assert(\n typeof handler === \"function\",\n 'MessageHandler.on: Expected \"handler\" to be a function.'\n );\n }\n const ah = this.actionHandler;\n if (ah[actionName]) {\n throw new Error(`There is already an actionName called \"${actionName}\"`);\n }\n ah[actionName] = handler;\n }\n\n /**\n * Sends a message to the comObj to invoke the action with the supplied data.\n * @param {string} actionName - Action to call.\n * @param {JSON} data - JSON data to send.\n * @param {Array} [transfers] - List of transfers/ArrayBuffers.\n */\n send(actionName, data, transfers) {\n this.comObj.postMessage(\n {\n sourceName: this.sourceName,\n targetName: this.targetName,\n action: actionName,\n data,\n },\n transfers\n );\n }\n\n /**\n * Sends a message to the comObj to invoke the action with the supplied data.\n * Expects that the other side will callback with the response.\n * @param {string} actionName - Action to call.\n * @param {JSON} data - JSON data to send.\n * @param {Array} [transfers] - List of transfers/ArrayBuffers.\n * @returns {Promise} Promise to be resolved with response data.\n */\n sendWithPromise(actionName, data, transfers) {\n const callbackId = this.callbackId++;\n const capability = Promise.withResolvers();\n this.callbackCapabilities[callbackId] = capability;\n try {\n this.comObj.postMessage(\n {\n sourceName: this.sourceName,\n targetName: this.targetName,\n action: actionName,\n callbackId,\n data,\n },\n transfers\n );\n } catch (ex) {\n capability.reject(ex);\n }\n return capability.promise;\n }\n\n /**\n * Sends a message to the comObj to invoke the action with the supplied data.\n * Expect that the other side will callback to signal 'start_complete'.\n * @param {string} actionName - Action to call.\n * @param {JSON} data - JSON data to send.\n * @param {Object} queueingStrategy - Strategy to signal backpressure based on\n * internal queue.\n * @param {Array} [transfers] - List of transfers/ArrayBuffers.\n * @returns {ReadableStream} ReadableStream to read data in chunks.\n */\n sendWithStream(actionName, data, queueingStrategy, transfers) {\n const streamId = this.streamId++,\n sourceName = this.sourceName,\n targetName = this.targetName,\n comObj = this.comObj;\n\n return new ReadableStream(\n {\n start: controller => {\n const startCapability = Promise.withResolvers();\n this.streamControllers[streamId] = {\n controller,\n startCall: startCapability,\n pullCall: null,\n cancelCall: null,\n isClosed: false,\n };\n comObj.postMessage(\n {\n sourceName,\n targetName,\n action: actionName,\n streamId,\n data,\n desiredSize: controller.desiredSize,\n },\n transfers\n );\n // Return Promise for Async process, to signal success/failure.\n return startCapability.promise;\n },\n\n pull: controller => {\n const pullCapability = Promise.withResolvers();\n this.streamControllers[streamId].pullCall = pullCapability;\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.PULL,\n streamId,\n desiredSize: controller.desiredSize,\n });\n // Returning Promise will not call \"pull\"\n // again until current pull is resolved.\n return pullCapability.promise;\n },\n\n cancel: reason => {\n assert(reason instanceof Error, \"cancel must have a valid reason\");\n const cancelCapability = Promise.withResolvers();\n this.streamControllers[streamId].cancelCall = cancelCapability;\n this.streamControllers[streamId].isClosed = true;\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.CANCEL,\n streamId,\n reason: wrapReason(reason),\n });\n // Return Promise to signal success or failure.\n return cancelCapability.promise;\n },\n },\n queueingStrategy\n );\n }\n\n #createStreamSink(data) {\n const streamId = data.streamId,\n sourceName = this.sourceName,\n targetName = data.sourceName,\n comObj = this.comObj;\n const self = this,\n action = this.actionHandler[data.action];\n\n const streamSink = {\n enqueue(chunk, size = 1, transfers) {\n if (this.isCancelled) {\n return;\n }\n const lastDesiredSize = this.desiredSize;\n this.desiredSize -= size;\n // Enqueue decreases the desiredSize property of sink,\n // so when it changes from positive to negative,\n // set ready as unresolved promise.\n if (lastDesiredSize > 0 && this.desiredSize <= 0) {\n this.sinkCapability = Promise.withResolvers();\n this.ready = this.sinkCapability.promise;\n }\n comObj.postMessage(\n {\n sourceName,\n targetName,\n stream: StreamKind.ENQUEUE,\n streamId,\n chunk,\n },\n transfers\n );\n },\n\n close() {\n if (this.isCancelled) {\n return;\n }\n this.isCancelled = true;\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.CLOSE,\n streamId,\n });\n delete self.streamSinks[streamId];\n },\n\n error(reason) {\n assert(reason instanceof Error, \"error must have a valid reason\");\n if (this.isCancelled) {\n return;\n }\n this.isCancelled = true;\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.ERROR,\n streamId,\n reason: wrapReason(reason),\n });\n },\n\n sinkCapability: Promise.withResolvers(),\n onPull: null,\n onCancel: null,\n isCancelled: false,\n desiredSize: data.desiredSize,\n ready: null,\n };\n\n streamSink.sinkCapability.resolve();\n streamSink.ready = streamSink.sinkCapability.promise;\n this.streamSinks[streamId] = streamSink;\n\n new Promise(function (resolve) {\n resolve(action(data.data, streamSink));\n }).then(\n function () {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.START_COMPLETE,\n streamId,\n success: true,\n });\n },\n function (reason) {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.START_COMPLETE,\n streamId,\n reason: wrapReason(reason),\n });\n }\n );\n }\n\n #processStreamMessage(data) {\n const streamId = data.streamId,\n sourceName = this.sourceName,\n targetName = data.sourceName,\n comObj = this.comObj;\n const streamController = this.streamControllers[streamId],\n streamSink = this.streamSinks[streamId];\n\n switch (data.stream) {\n case StreamKind.START_COMPLETE:\n if (data.success) {\n streamController.startCall.resolve();\n } else {\n streamController.startCall.reject(wrapReason(data.reason));\n }\n break;\n case StreamKind.PULL_COMPLETE:\n if (data.success) {\n streamController.pullCall.resolve();\n } else {\n streamController.pullCall.reject(wrapReason(data.reason));\n }\n break;\n case StreamKind.PULL:\n // Ignore any pull after close is called.\n if (!streamSink) {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.PULL_COMPLETE,\n streamId,\n success: true,\n });\n break;\n }\n // Pull increases the desiredSize property of sink, so when it changes\n // from negative to positive, set ready property as resolved promise.\n if (streamSink.desiredSize <= 0 && data.desiredSize > 0) {\n streamSink.sinkCapability.resolve();\n }\n // Reset desiredSize property of sink on every pull.\n streamSink.desiredSize = data.desiredSize;\n\n new Promise(function (resolve) {\n resolve(streamSink.onPull?.());\n }).then(\n function () {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.PULL_COMPLETE,\n streamId,\n success: true,\n });\n },\n function (reason) {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.PULL_COMPLETE,\n streamId,\n reason: wrapReason(reason),\n });\n }\n );\n break;\n case StreamKind.ENQUEUE:\n assert(streamController, \"enqueue should have stream controller\");\n if (streamController.isClosed) {\n break;\n }\n streamController.controller.enqueue(data.chunk);\n break;\n case StreamKind.CLOSE:\n assert(streamController, \"close should have stream controller\");\n if (streamController.isClosed) {\n break;\n }\n streamController.isClosed = true;\n streamController.controller.close();\n this.#deleteStreamController(streamController, streamId);\n break;\n case StreamKind.ERROR:\n assert(streamController, \"error should have stream controller\");\n streamController.controller.error(wrapReason(data.reason));\n this.#deleteStreamController(streamController, streamId);\n break;\n case StreamKind.CANCEL_COMPLETE:\n if (data.success) {\n streamController.cancelCall.resolve();\n } else {\n streamController.cancelCall.reject(wrapReason(data.reason));\n }\n this.#deleteStreamController(streamController, streamId);\n break;\n case StreamKind.CANCEL:\n if (!streamSink) {\n break;\n }\n\n new Promise(function (resolve) {\n resolve(streamSink.onCancel?.(wrapReason(data.reason)));\n }).then(\n function () {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.CANCEL_COMPLETE,\n streamId,\n success: true,\n });\n },\n function (reason) {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.CANCEL_COMPLETE,\n streamId,\n reason: wrapReason(reason),\n });\n }\n );\n streamSink.sinkCapability.reject(wrapReason(data.reason));\n streamSink.isCancelled = true;\n delete this.streamSinks[streamId];\n break;\n default:\n throw new Error(\"Unexpected stream case\");\n }\n }\n\n async #deleteStreamController(streamController, streamId) {\n // Delete the `streamController` only when the start, pull, and cancel\n // capabilities have settled, to prevent `TypeError`s.\n await Promise.allSettled([\n streamController.startCall?.promise,\n streamController.pullCall?.promise,\n streamController.cancelCall?.promise,\n ]);\n delete this.streamControllers[streamId];\n }\n\n destroy() {\n this.comObj.removeEventListener(\"message\", this._onComObjOnMessage);\n }\n}\n\nexport { MessageHandler };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { objectFromMap } from \"../shared/util.js\";\n\nclass Metadata {\n #metadataMap;\n\n #data;\n\n constructor({ parsedData, rawData }) {\n this.#metadataMap = parsedData;\n this.#data = rawData;\n }\n\n getRaw() {\n return this.#data;\n }\n\n get(name) {\n return this.#metadataMap.get(name) ?? null;\n }\n\n getAll() {\n return objectFromMap(this.#metadataMap);\n }\n\n has(name) {\n return this.#metadataMap.has(name);\n }\n}\n\nexport { Metadata };\n","/* Copyright 2020 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n info,\n objectFromMap,\n RenderingIntentFlag,\n unreachable,\n warn,\n} from \"../shared/util.js\";\nimport { MurmurHash3_64 } from \"../shared/murmurhash3.js\";\n\nconst INTERNAL = Symbol(\"INTERNAL\");\n\nclass OptionalContentGroup {\n #isDisplay = false;\n\n #isPrint = false;\n\n #userSet = false;\n\n #visible = true;\n\n constructor(renderingIntent, { name, intent, usage }) {\n this.#isDisplay = !!(renderingIntent & RenderingIntentFlag.DISPLAY);\n this.#isPrint = !!(renderingIntent & RenderingIntentFlag.PRINT);\n\n this.name = name;\n this.intent = intent;\n this.usage = usage;\n }\n\n /**\n * @type {boolean}\n */\n get visible() {\n if (this.#userSet) {\n return this.#visible;\n }\n if (!this.#visible) {\n return false;\n }\n const { print, view } = this.usage;\n\n if (this.#isDisplay) {\n return view?.viewState !== \"OFF\";\n } else if (this.#isPrint) {\n return print?.printState !== \"OFF\";\n }\n return true;\n }\n\n /**\n * @ignore\n */\n _setVisible(internal, visible, userSet = false) {\n if (internal !== INTERNAL) {\n unreachable(\"Internal method `_setVisible` called.\");\n }\n this.#userSet = userSet;\n this.#visible = visible;\n }\n}\n\nclass OptionalContentConfig {\n #cachedGetHash = null;\n\n #groups = new Map();\n\n #initialHash = null;\n\n #order = null;\n\n constructor(data, renderingIntent = RenderingIntentFlag.DISPLAY) {\n this.renderingIntent = renderingIntent;\n\n this.name = null;\n this.creator = null;\n\n if (data === null) {\n return;\n }\n this.name = data.name;\n this.creator = data.creator;\n this.#order = data.order;\n for (const group of data.groups) {\n this.#groups.set(\n group.id,\n new OptionalContentGroup(renderingIntent, group)\n );\n }\n\n if (data.baseState === \"OFF\") {\n for (const group of this.#groups.values()) {\n group._setVisible(INTERNAL, false);\n }\n }\n\n for (const on of data.on) {\n this.#groups.get(on)._setVisible(INTERNAL, true);\n }\n\n for (const off of data.off) {\n this.#groups.get(off)._setVisible(INTERNAL, false);\n }\n\n // The following code must always run *last* in the constructor.\n this.#initialHash = this.getHash();\n }\n\n #evaluateVisibilityExpression(array) {\n const length = array.length;\n if (length < 2) {\n return true;\n }\n const operator = array[0];\n for (let i = 1; i < length; i++) {\n const element = array[i];\n let state;\n if (Array.isArray(element)) {\n state = this.#evaluateVisibilityExpression(element);\n } else if (this.#groups.has(element)) {\n state = this.#groups.get(element).visible;\n } else {\n warn(`Optional content group not found: ${element}`);\n return true;\n }\n switch (operator) {\n case \"And\":\n if (!state) {\n return false;\n }\n break;\n case \"Or\":\n if (state) {\n return true;\n }\n break;\n case \"Not\":\n return !state;\n default:\n return true;\n }\n }\n return operator === \"And\";\n }\n\n isVisible(group) {\n if (this.#groups.size === 0) {\n return true;\n }\n if (!group) {\n info(\"Optional content group not defined.\");\n return true;\n }\n if (group.type === \"OCG\") {\n if (!this.#groups.has(group.id)) {\n warn(`Optional content group not found: ${group.id}`);\n return true;\n }\n return this.#groups.get(group.id).visible;\n } else if (group.type === \"OCMD\") {\n // Per the spec, the expression should be preferred if available.\n if (group.expression) {\n return this.#evaluateVisibilityExpression(group.expression);\n }\n if (!group.policy || group.policy === \"AnyOn\") {\n // Default\n for (const id of group.ids) {\n if (!this.#groups.has(id)) {\n warn(`Optional content group not found: ${id}`);\n return true;\n }\n if (this.#groups.get(id).visible) {\n return true;\n }\n }\n return false;\n } else if (group.policy === \"AllOn\") {\n for (const id of group.ids) {\n if (!this.#groups.has(id)) {\n warn(`Optional content group not found: ${id}`);\n return true;\n }\n if (!this.#groups.get(id).visible) {\n return false;\n }\n }\n return true;\n } else if (group.policy === \"AnyOff\") {\n for (const id of group.ids) {\n if (!this.#groups.has(id)) {\n warn(`Optional content group not found: ${id}`);\n return true;\n }\n if (!this.#groups.get(id).visible) {\n return true;\n }\n }\n return false;\n } else if (group.policy === \"AllOff\") {\n for (const id of group.ids) {\n if (!this.#groups.has(id)) {\n warn(`Optional content group not found: ${id}`);\n return true;\n }\n if (this.#groups.get(id).visible) {\n return false;\n }\n }\n return true;\n }\n warn(`Unknown optional content policy ${group.policy}.`);\n return true;\n }\n warn(`Unknown group type ${group.type}.`);\n return true;\n }\n\n setVisibility(id, visible = true) {\n const group = this.#groups.get(id);\n if (!group) {\n warn(`Optional content group not found: ${id}`);\n return;\n }\n group._setVisible(INTERNAL, !!visible, /* userSet = */ true);\n\n this.#cachedGetHash = null;\n }\n\n setOCGState({ state, preserveRB }) {\n let operator;\n\n for (const elem of state) {\n switch (elem) {\n case \"ON\":\n case \"OFF\":\n case \"Toggle\":\n operator = elem;\n continue;\n }\n\n const group = this.#groups.get(elem);\n if (!group) {\n continue;\n }\n switch (operator) {\n case \"ON\":\n group._setVisible(INTERNAL, true);\n break;\n case \"OFF\":\n group._setVisible(INTERNAL, false);\n break;\n case \"Toggle\":\n group._setVisible(INTERNAL, !group.visible);\n break;\n }\n }\n\n this.#cachedGetHash = null;\n }\n\n get hasInitialVisibility() {\n return this.#initialHash === null || this.getHash() === this.#initialHash;\n }\n\n getOrder() {\n if (!this.#groups.size) {\n return null;\n }\n if (this.#order) {\n return this.#order.slice();\n }\n return [...this.#groups.keys()];\n }\n\n getGroups() {\n return this.#groups.size > 0 ? objectFromMap(this.#groups) : null;\n }\n\n getGroup(id) {\n return this.#groups.get(id) || null;\n }\n\n getHash() {\n if (this.#cachedGetHash !== null) {\n return this.#cachedGetHash;\n }\n const hash = new MurmurHash3_64();\n\n for (const [id, group] of this.#groups) {\n hash.update(`${id}:${group.visible}`);\n }\n return (this.#cachedGetHash = hash.hexdigest());\n }\n}\n\nexport { OptionalContentConfig };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @typedef {import(\"../interfaces\").IPDFStream} IPDFStream */\n/** @typedef {import(\"../interfaces\").IPDFStreamReader} IPDFStreamReader */\n// eslint-disable-next-line max-len\n/** @typedef {import(\"../interfaces\").IPDFStreamRangeReader} IPDFStreamRangeReader */\n\nimport { assert } from \"../shared/util.js\";\nimport { isPdfFile } from \"./display_utils.js\";\n\n/** @implements {IPDFStream} */\nclass PDFDataTransportStream {\n constructor(\n pdfDataRangeTransport,\n { disableRange = false, disableStream = false }\n ) {\n assert(\n pdfDataRangeTransport,\n 'PDFDataTransportStream - missing required \"pdfDataRangeTransport\" argument.'\n );\n const { length, initialData, progressiveDone, contentDispositionFilename } =\n pdfDataRangeTransport;\n\n this._queuedChunks = [];\n this._progressiveDone = progressiveDone;\n this._contentDispositionFilename = contentDispositionFilename;\n\n if (initialData?.length > 0) {\n // Prevent any possible issues by only transferring a Uint8Array that\n // completely \"utilizes\" its underlying ArrayBuffer.\n const buffer =\n initialData instanceof Uint8Array &&\n initialData.byteLength === initialData.buffer.byteLength\n ? initialData.buffer\n : new Uint8Array(initialData).buffer;\n this._queuedChunks.push(buffer);\n }\n\n this._pdfDataRangeTransport = pdfDataRangeTransport;\n this._isStreamingSupported = !disableStream;\n this._isRangeSupported = !disableRange;\n this._contentLength = length;\n\n this._fullRequestReader = null;\n this._rangeReaders = [];\n\n pdfDataRangeTransport.addRangeListener((begin, chunk) => {\n this._onReceiveData({ begin, chunk });\n });\n\n pdfDataRangeTransport.addProgressListener((loaded, total) => {\n this._onProgress({ loaded, total });\n });\n\n pdfDataRangeTransport.addProgressiveReadListener(chunk => {\n this._onReceiveData({ chunk });\n });\n\n pdfDataRangeTransport.addProgressiveDoneListener(() => {\n this._onProgressiveDone();\n });\n\n pdfDataRangeTransport.transportReady();\n }\n\n _onReceiveData({ begin, chunk }) {\n // Prevent any possible issues by only transferring a Uint8Array that\n // completely \"utilizes\" its underlying ArrayBuffer.\n const buffer =\n chunk instanceof Uint8Array &&\n chunk.byteLength === chunk.buffer.byteLength\n ? chunk.buffer\n : new Uint8Array(chunk).buffer;\n\n if (begin === undefined) {\n if (this._fullRequestReader) {\n this._fullRequestReader._enqueue(buffer);\n } else {\n this._queuedChunks.push(buffer);\n }\n } else {\n const found = this._rangeReaders.some(function (rangeReader) {\n if (rangeReader._begin !== begin) {\n return false;\n }\n rangeReader._enqueue(buffer);\n return true;\n });\n assert(\n found,\n \"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.\"\n );\n }\n }\n\n get _progressiveDataLength() {\n return this._fullRequestReader?._loaded ?? 0;\n }\n\n _onProgress(evt) {\n if (evt.total === undefined) {\n // Reporting to first range reader, if it exists.\n this._rangeReaders[0]?.onProgress?.({ loaded: evt.loaded });\n } else {\n this._fullRequestReader?.onProgress?.({\n loaded: evt.loaded,\n total: evt.total,\n });\n }\n }\n\n _onProgressiveDone() {\n this._fullRequestReader?.progressiveDone();\n this._progressiveDone = true;\n }\n\n _removeRangeReader(reader) {\n const i = this._rangeReaders.indexOf(reader);\n if (i >= 0) {\n this._rangeReaders.splice(i, 1);\n }\n }\n\n getFullReader() {\n assert(\n !this._fullRequestReader,\n \"PDFDataTransportStream.getFullReader can only be called once.\"\n );\n const queuedChunks = this._queuedChunks;\n this._queuedChunks = null;\n return new PDFDataTransportStreamReader(\n this,\n queuedChunks,\n this._progressiveDone,\n this._contentDispositionFilename\n );\n }\n\n getRangeReader(begin, end) {\n if (end <= this._progressiveDataLength) {\n return null;\n }\n const reader = new PDFDataTransportStreamRangeReader(this, begin, end);\n this._pdfDataRangeTransport.requestDataRange(begin, end);\n this._rangeReaders.push(reader);\n return reader;\n }\n\n cancelAllRequests(reason) {\n this._fullRequestReader?.cancel(reason);\n\n for (const reader of this._rangeReaders.slice(0)) {\n reader.cancel(reason);\n }\n this._pdfDataRangeTransport.abort();\n }\n}\n\n/** @implements {IPDFStreamReader} */\nclass PDFDataTransportStreamReader {\n constructor(\n stream,\n queuedChunks,\n progressiveDone = false,\n contentDispositionFilename = null\n ) {\n this._stream = stream;\n this._done = progressiveDone || false;\n this._filename = isPdfFile(contentDispositionFilename)\n ? contentDispositionFilename\n : null;\n this._queuedChunks = queuedChunks || [];\n this._loaded = 0;\n for (const chunk of this._queuedChunks) {\n this._loaded += chunk.byteLength;\n }\n this._requests = [];\n this._headersReady = Promise.resolve();\n stream._fullRequestReader = this;\n\n this.onProgress = null;\n }\n\n _enqueue(chunk) {\n if (this._done) {\n return; // Ignore new data.\n }\n if (this._requests.length > 0) {\n const requestCapability = this._requests.shift();\n requestCapability.resolve({ value: chunk, done: false });\n } else {\n this._queuedChunks.push(chunk);\n }\n this._loaded += chunk.byteLength;\n }\n\n get headersReady() {\n return this._headersReady;\n }\n\n get filename() {\n return this._filename;\n }\n\n get isRangeSupported() {\n return this._stream._isRangeSupported;\n }\n\n get isStreamingSupported() {\n return this._stream._isStreamingSupported;\n }\n\n get contentLength() {\n return this._stream._contentLength;\n }\n\n async read() {\n if (this._queuedChunks.length > 0) {\n const chunk = this._queuedChunks.shift();\n return { value: chunk, done: false };\n }\n if (this._done) {\n return { value: undefined, done: true };\n }\n const requestCapability = Promise.withResolvers();\n this._requests.push(requestCapability);\n return requestCapability.promise;\n }\n\n cancel(reason) {\n this._done = true;\n for (const requestCapability of this._requests) {\n requestCapability.resolve({ value: undefined, done: true });\n }\n this._requests.length = 0;\n }\n\n progressiveDone() {\n if (this._done) {\n return;\n }\n this._done = true;\n }\n}\n\n/** @implements {IPDFStreamRangeReader} */\nclass PDFDataTransportStreamRangeReader {\n constructor(stream, begin, end) {\n this._stream = stream;\n this._begin = begin;\n this._end = end;\n this._queuedChunk = null;\n this._requests = [];\n this._done = false;\n\n this.onProgress = null;\n }\n\n _enqueue(chunk) {\n if (this._done) {\n return; // ignore new data\n }\n if (this._requests.length === 0) {\n this._queuedChunk = chunk;\n } else {\n const requestsCapability = this._requests.shift();\n requestsCapability.resolve({ value: chunk, done: false });\n for (const requestCapability of this._requests) {\n requestCapability.resolve({ value: undefined, done: true });\n }\n this._requests.length = 0;\n }\n this._done = true;\n this._stream._removeRangeReader(this);\n }\n\n get isStreamingSupported() {\n return false;\n }\n\n async read() {\n if (this._queuedChunk) {\n const chunk = this._queuedChunk;\n this._queuedChunk = null;\n return { value: chunk, done: false };\n }\n if (this._done) {\n return { value: undefined, done: true };\n }\n const requestCapability = Promise.withResolvers();\n this._requests.push(requestCapability);\n return requestCapability.promise;\n }\n\n cancel(reason) {\n this._done = true;\n for (const requestCapability of this._requests) {\n requestCapability.resolve({ value: undefined, done: true });\n }\n this._requests.length = 0;\n this._stream._removeRangeReader(this);\n }\n}\n\nexport { PDFDataTransportStream };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n assert,\n MissingPDFException,\n UnexpectedResponseException,\n} from \"../shared/util.js\";\nimport { getFilenameFromContentDispositionHeader } from \"./content_disposition.js\";\nimport { isPdfFile } from \"./display_utils.js\";\n\nfunction validateRangeRequestCapabilities({\n getResponseHeader,\n isHttp,\n rangeChunkSize,\n disableRange,\n}) {\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n assert(\n Number.isInteger(rangeChunkSize) && rangeChunkSize > 0,\n \"rangeChunkSize must be an integer larger than zero.\"\n );\n }\n const returnValues = {\n allowRangeRequests: false,\n suggestedLength: undefined,\n };\n\n const length = parseInt(getResponseHeader(\"Content-Length\"), 10);\n if (!Number.isInteger(length)) {\n return returnValues;\n }\n\n returnValues.suggestedLength = length;\n\n if (length <= 2 * rangeChunkSize) {\n // The file size is smaller than the size of two chunks, so it does not\n // make any sense to abort the request and retry with a range request.\n return returnValues;\n }\n\n if (disableRange || !isHttp) {\n return returnValues;\n }\n if (getResponseHeader(\"Accept-Ranges\") !== \"bytes\") {\n return returnValues;\n }\n\n const contentEncoding = getResponseHeader(\"Content-Encoding\") || \"identity\";\n if (contentEncoding !== \"identity\") {\n return returnValues;\n }\n\n returnValues.allowRangeRequests = true;\n return returnValues;\n}\n\nfunction extractFilenameFromHeader(getResponseHeader) {\n const contentDisposition = getResponseHeader(\"Content-Disposition\");\n if (contentDisposition) {\n let filename = getFilenameFromContentDispositionHeader(contentDisposition);\n if (filename.includes(\"%\")) {\n try {\n filename = decodeURIComponent(filename);\n } catch {}\n }\n if (isPdfFile(filename)) {\n return filename;\n }\n }\n return null;\n}\n\nfunction createResponseStatusError(status, url) {\n if (status === 404 || (status === 0 && url.startsWith(\"file:\"))) {\n return new MissingPDFException('Missing PDF \"' + url + '\".');\n }\n return new UnexpectedResponseException(\n `Unexpected server response (${status}) while retrieving PDF \"${url}\".`,\n status\n );\n}\n\nfunction validateResponseStatus(status) {\n return status === 200 || status === 206;\n}\n\nexport {\n createResponseStatusError,\n extractFilenameFromHeader,\n validateRangeRequestCapabilities,\n validateResponseStatus,\n};\n","/* Copyright 2017 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { stringToBytes } from \"../shared/util.js\";\n\n// This getFilenameFromContentDispositionHeader function is adapted from\n// https://github.com/Rob--W/open-in-browser/blob/7e2e35a38b8b4e981b11da7b2f01df0149049e92/extension/content-disposition.js\n// with the following changes:\n// - Modified to conform to PDF.js's coding style.\n// - Move return to the end of the function to prevent Babel from dropping the\n// function declarations.\n\n/**\n * Extract file name from the Content-Disposition HTTP response header.\n *\n * @param {string} contentDisposition\n * @returns {string} Filename, if found in the Content-Disposition header.\n */\nfunction getFilenameFromContentDispositionHeader(contentDisposition) {\n let needsEncodingFixup = true;\n\n // filename*=ext-value (\"ext-value\" from RFC 5987, referenced by RFC 6266).\n let tmp = toParamRegExp(\"filename\\\\*\", \"i\").exec(contentDisposition);\n if (tmp) {\n tmp = tmp[1];\n let filename = rfc2616unquote(tmp);\n filename = unescape(filename);\n filename = rfc5987decode(filename);\n filename = rfc2047decode(filename);\n return fixupEncoding(filename);\n }\n\n // Continuations (RFC 2231 section 3, referenced by RFC 5987 section 3.1).\n // filename*n*=part\n // filename*n=part\n tmp = rfc2231getparam(contentDisposition);\n if (tmp) {\n // RFC 2047, section\n const filename = rfc2047decode(tmp);\n return fixupEncoding(filename);\n }\n\n // filename=value (RFC 5987, section 4.1).\n tmp = toParamRegExp(\"filename\", \"i\").exec(contentDisposition);\n if (tmp) {\n tmp = tmp[1];\n let filename = rfc2616unquote(tmp);\n filename = rfc2047decode(filename);\n return fixupEncoding(filename);\n }\n\n // After this line there are only function declarations. We cannot put\n // \"return\" here for readability because babel would then drop the function\n // declarations...\n function toParamRegExp(attributePattern, flags) {\n return new RegExp(\n \"(?:^|;)\\\\s*\" +\n attributePattern +\n \"\\\\s*=\\\\s*\" +\n // Captures: value = token | quoted-string\n // (RFC 2616, section 3.6 and referenced by RFC 6266 4.1)\n \"(\" +\n '[^\";\\\\s][^;\\\\s]*' +\n \"|\" +\n '\"(?:[^\"\\\\\\\\]|\\\\\\\\\"?)+\"?' +\n \")\",\n flags\n );\n }\n function textdecode(encoding, value) {\n if (encoding) {\n if (!/^[\\x00-\\xFF]+$/.test(value)) {\n return value;\n }\n try {\n const decoder = new TextDecoder(encoding, { fatal: true });\n const buffer = stringToBytes(value);\n value = decoder.decode(buffer);\n needsEncodingFixup = false;\n } catch {\n // TextDecoder constructor threw - unrecognized encoding.\n }\n }\n return value;\n }\n function fixupEncoding(value) {\n if (needsEncodingFixup && /[\\x80-\\xff]/.test(value)) {\n // Maybe multi-byte UTF-8.\n value = textdecode(\"utf-8\", value);\n if (needsEncodingFixup) {\n // Try iso-8859-1 encoding.\n value = textdecode(\"iso-8859-1\", value);\n }\n }\n return value;\n }\n function rfc2231getparam(contentDispositionStr) {\n const matches = [];\n let match;\n // Iterate over all filename*n= and filename*n*= with n being an integer\n // of at least zero. Any non-zero number must not start with '0'.\n const iter = toParamRegExp(\"filename\\\\*((?!0\\\\d)\\\\d+)(\\\\*?)\", \"ig\");\n while ((match = iter.exec(contentDispositionStr)) !== null) {\n let [, n, quot, part] = match; // eslint-disable-line prefer-const\n n = parseInt(n, 10);\n if (n in matches) {\n // Ignore anything after the invalid second filename*0.\n if (n === 0) {\n break;\n }\n continue;\n }\n matches[n] = [quot, part];\n }\n const parts = [];\n for (let n = 0; n < matches.length; ++n) {\n if (!(n in matches)) {\n // Numbers must be consecutive. Truncate when there is a hole.\n break;\n }\n let [quot, part] = matches[n]; // eslint-disable-line prefer-const\n part = rfc2616unquote(part);\n if (quot) {\n part = unescape(part);\n if (n === 0) {\n part = rfc5987decode(part);\n }\n }\n parts.push(part);\n }\n return parts.join(\"\");\n }\n function rfc2616unquote(value) {\n if (value.startsWith('\"')) {\n const parts = value.slice(1).split('\\\\\"');\n // Find the first unescaped \" and terminate there.\n for (let i = 0; i < parts.length; ++i) {\n const quotindex = parts[i].indexOf('\"');\n if (quotindex !== -1) {\n parts[i] = parts[i].slice(0, quotindex);\n parts.length = i + 1; // Truncates and stop the iteration.\n }\n parts[i] = parts[i].replaceAll(/\\\\(.)/g, \"$1\");\n }\n value = parts.join('\"');\n }\n return value;\n }\n function rfc5987decode(extvalue) {\n // Decodes \"ext-value\" from RFC 5987.\n const encodingend = extvalue.indexOf(\"'\");\n if (encodingend === -1) {\n // Some servers send \"filename*=\" without encoding 'language' prefix,\n // e.g. in https://github.com/Rob--W/open-in-browser/issues/26\n // Let's accept the value like Firefox (57) (Chrome 62 rejects it).\n return extvalue;\n }\n const encoding = extvalue.slice(0, encodingend);\n const langvalue = extvalue.slice(encodingend + 1);\n // Ignore language (RFC 5987 section 3.2.1, and RFC 6266 section 4.1 ).\n const value = langvalue.replace(/^[^']*'/, \"\");\n return textdecode(encoding, value);\n }\n function rfc2047decode(value) {\n // RFC 2047-decode the result. Firefox tried to drop support for it, but\n // backed out because some servers use it - https://bugzil.la/875615\n // Firefox's condition for decoding is here: https://searchfox.org/mozilla-central/rev/4a590a5a15e35d88a3b23dd6ac3c471cf85b04a8/netwerk/mime/nsMIMEHeaderParamImpl.cpp#742-748\n\n // We are more strict and only recognize RFC 2047-encoding if the value\n // starts with \"=?\", since then it is likely that the full value is\n // RFC 2047-encoded.\n\n // Firefox also decodes words even where RFC 2047 section 5 states:\n // \"An 'encoded-word' MUST NOT appear within a 'quoted-string'.\"\n if (!value.startsWith(\"=?\") || /[\\x00-\\x19\\x80-\\xff]/.test(value)) {\n return value;\n }\n // RFC 2047, section 2.4\n // encoded-word = \"=?\" charset \"?\" encoding \"?\" encoded-text \"?=\"\n // charset = token (but let's restrict to characters that denote a\n // possibly valid encoding).\n // encoding = q or b\n // encoded-text = any printable ASCII character other than ? or space.\n // ... but Firefox permits ? and space.\n return value.replaceAll(\n /=\\?([\\w-]*)\\?([QqBb])\\?((?:[^?]|\\?(?!=))*)\\?=/g,\n function (matches, charset, encoding, text) {\n if (encoding === \"q\" || encoding === \"Q\") {\n // RFC 2047 section 4.2.\n text = text.replaceAll(\"_\", \" \");\n text = text.replaceAll(/=([0-9a-fA-F]{2})/g, function (match, hex) {\n return String.fromCharCode(parseInt(hex, 16));\n });\n return textdecode(charset, text);\n } // else encoding is b or B - base64 (RFC 2047 section 4.1)\n try {\n text = atob(text);\n } catch {}\n return textdecode(charset, text);\n }\n );\n }\n\n return \"\";\n}\n\nexport { getFilenameFromContentDispositionHeader };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AbortException, assert, warn } from \"../shared/util.js\";\nimport {\n createResponseStatusError,\n extractFilenameFromHeader,\n validateRangeRequestCapabilities,\n validateResponseStatus,\n} from \"./network_utils.js\";\n\nif (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n throw new Error(\n 'Module \"./fetch_stream.js\" shall not be used with MOZCENTRAL builds.'\n );\n}\n\nfunction createFetchOptions(headers, withCredentials, abortController) {\n return {\n method: \"GET\",\n headers,\n signal: abortController.signal,\n mode: \"cors\",\n credentials: withCredentials ? \"include\" : \"same-origin\",\n redirect: \"follow\",\n };\n}\n\nfunction createHeaders(httpHeaders) {\n const headers = new Headers();\n for (const property in httpHeaders) {\n const value = httpHeaders[property];\n if (value === undefined) {\n continue;\n }\n headers.append(property, value);\n }\n return headers;\n}\n\nfunction getArrayBuffer(val) {\n if (val instanceof Uint8Array) {\n return val.buffer;\n }\n if (val instanceof ArrayBuffer) {\n return val;\n }\n warn(`getArrayBuffer - unexpected data format: ${val}`);\n return new Uint8Array(val).buffer;\n}\n\n/** @implements {IPDFStream} */\nclass PDFFetchStream {\n constructor(source) {\n this.source = source;\n this.isHttp = /^https?:/i.test(source.url);\n this.httpHeaders = (this.isHttp && source.httpHeaders) || {};\n\n this._fullRequestReader = null;\n this._rangeRequestReaders = [];\n }\n\n get _progressiveDataLength() {\n return this._fullRequestReader?._loaded ?? 0;\n }\n\n getFullReader() {\n assert(\n !this._fullRequestReader,\n \"PDFFetchStream.getFullReader can only be called once.\"\n );\n this._fullRequestReader = new PDFFetchStreamReader(this);\n return this._fullRequestReader;\n }\n\n getRangeReader(begin, end) {\n if (end <= this._progressiveDataLength) {\n return null;\n }\n const reader = new PDFFetchStreamRangeReader(this, begin, end);\n this._rangeRequestReaders.push(reader);\n return reader;\n }\n\n cancelAllRequests(reason) {\n this._fullRequestReader?.cancel(reason);\n\n for (const reader of this._rangeRequestReaders.slice(0)) {\n reader.cancel(reason);\n }\n }\n}\n\n/** @implements {IPDFStreamReader} */\nclass PDFFetchStreamReader {\n constructor(stream) {\n this._stream = stream;\n this._reader = null;\n this._loaded = 0;\n this._filename = null;\n const source = stream.source;\n this._withCredentials = source.withCredentials || false;\n this._contentLength = source.length;\n this._headersCapability = Promise.withResolvers();\n this._disableRange = source.disableRange || false;\n this._rangeChunkSize = source.rangeChunkSize;\n if (!this._rangeChunkSize && !this._disableRange) {\n this._disableRange = true;\n }\n\n this._abortController = new AbortController();\n this._isStreamingSupported = !source.disableStream;\n this._isRangeSupported = !source.disableRange;\n\n this._headers = createHeaders(this._stream.httpHeaders);\n\n const url = source.url;\n fetch(\n url,\n createFetchOptions(\n this._headers,\n this._withCredentials,\n this._abortController\n )\n )\n .then(response => {\n if (!validateResponseStatus(response.status)) {\n throw createResponseStatusError(response.status, url);\n }\n this._reader = response.body.getReader();\n this._headersCapability.resolve();\n\n const getResponseHeader = name => response.headers.get(name);\n\n const { allowRangeRequests, suggestedLength } =\n validateRangeRequestCapabilities({\n getResponseHeader,\n isHttp: this._stream.isHttp,\n rangeChunkSize: this._rangeChunkSize,\n disableRange: this._disableRange,\n });\n\n this._isRangeSupported = allowRangeRequests;\n // Setting right content length.\n this._contentLength = suggestedLength || this._contentLength;\n\n this._filename = extractFilenameFromHeader(getResponseHeader);\n\n // We need to stop reading when range is supported and streaming is\n // disabled.\n if (!this._isStreamingSupported && this._isRangeSupported) {\n this.cancel(new AbortException(\"Streaming is disabled.\"));\n }\n })\n .catch(this._headersCapability.reject);\n\n this.onProgress = null;\n }\n\n get headersReady() {\n return this._headersCapability.promise;\n }\n\n get filename() {\n return this._filename;\n }\n\n get contentLength() {\n return this._contentLength;\n }\n\n get isRangeSupported() {\n return this._isRangeSupported;\n }\n\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n\n async read() {\n await this._headersCapability.promise;\n const { value, done } = await this._reader.read();\n if (done) {\n return { value, done };\n }\n this._loaded += value.byteLength;\n this.onProgress?.({\n loaded: this._loaded,\n total: this._contentLength,\n });\n\n return { value: getArrayBuffer(value), done: false };\n }\n\n cancel(reason) {\n this._reader?.cancel(reason);\n this._abortController.abort();\n }\n}\n\n/** @implements {IPDFStreamRangeReader} */\nclass PDFFetchStreamRangeReader {\n constructor(stream, begin, end) {\n this._stream = stream;\n this._reader = null;\n this._loaded = 0;\n const source = stream.source;\n this._withCredentials = source.withCredentials || false;\n this._readCapability = Promise.withResolvers();\n this._isStreamingSupported = !source.disableStream;\n\n this._abortController = new AbortController();\n this._headers = createHeaders(this._stream.httpHeaders);\n this._headers.append(\"Range\", `bytes=${begin}-${end - 1}`);\n\n const url = source.url;\n fetch(\n url,\n createFetchOptions(\n this._headers,\n this._withCredentials,\n this._abortController\n )\n )\n .then(response => {\n if (!validateResponseStatus(response.status)) {\n throw createResponseStatusError(response.status, url);\n }\n this._readCapability.resolve();\n this._reader = response.body.getReader();\n })\n .catch(this._readCapability.reject);\n\n this.onProgress = null;\n }\n\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n\n async read() {\n await this._readCapability.promise;\n const { value, done } = await this._reader.read();\n if (done) {\n return { value, done };\n }\n this._loaded += value.byteLength;\n this.onProgress?.({ loaded: this._loaded });\n\n return { value: getArrayBuffer(value), done: false };\n }\n\n cancel(reason) {\n this._reader?.cancel(reason);\n this._abortController.abort();\n }\n}\n\nexport { PDFFetchStream };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { assert, stringToBytes } from \"../shared/util.js\";\nimport {\n createResponseStatusError,\n extractFilenameFromHeader,\n validateRangeRequestCapabilities,\n} from \"./network_utils.js\";\n\nif (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n throw new Error(\n 'Module \"./network.js\" shall not be used with MOZCENTRAL builds.'\n );\n}\n\nconst OK_RESPONSE = 200;\nconst PARTIAL_CONTENT_RESPONSE = 206;\n\nfunction getArrayBuffer(xhr) {\n const data = xhr.response;\n if (typeof data !== \"string\") {\n return data;\n }\n return stringToBytes(data).buffer;\n}\n\nclass NetworkManager {\n constructor(url, args = {}) {\n this.url = url;\n this.isHttp = /^https?:/i.test(url);\n this.httpHeaders = (this.isHttp && args.httpHeaders) || Object.create(null);\n this.withCredentials = args.withCredentials || false;\n\n this.currXhrId = 0;\n this.pendingRequests = Object.create(null);\n }\n\n requestRange(begin, end, listeners) {\n const args = {\n begin,\n end,\n };\n for (const prop in listeners) {\n args[prop] = listeners[prop];\n }\n return this.request(args);\n }\n\n requestFull(listeners) {\n return this.request(listeners);\n }\n\n request(args) {\n const xhr = new XMLHttpRequest();\n const xhrId = this.currXhrId++;\n const pendingRequest = (this.pendingRequests[xhrId] = { xhr });\n\n xhr.open(\"GET\", this.url);\n xhr.withCredentials = this.withCredentials;\n for (const property in this.httpHeaders) {\n const value = this.httpHeaders[property];\n if (value === undefined) {\n continue;\n }\n xhr.setRequestHeader(property, value);\n }\n if (this.isHttp && \"begin\" in args && \"end\" in args) {\n xhr.setRequestHeader(\"Range\", `bytes=${args.begin}-${args.end - 1}`);\n pendingRequest.expectedStatus = PARTIAL_CONTENT_RESPONSE;\n } else {\n pendingRequest.expectedStatus = OK_RESPONSE;\n }\n xhr.responseType = \"arraybuffer\";\n\n if (args.onError) {\n xhr.onerror = function (evt) {\n args.onError(xhr.status);\n };\n }\n xhr.onreadystatechange = this.onStateChange.bind(this, xhrId);\n xhr.onprogress = this.onProgress.bind(this, xhrId);\n\n pendingRequest.onHeadersReceived = args.onHeadersReceived;\n pendingRequest.onDone = args.onDone;\n pendingRequest.onError = args.onError;\n pendingRequest.onProgress = args.onProgress;\n\n xhr.send(null);\n\n return xhrId;\n }\n\n onProgress(xhrId, evt) {\n const pendingRequest = this.pendingRequests[xhrId];\n if (!pendingRequest) {\n return; // Maybe abortRequest was called...\n }\n pendingRequest.onProgress?.(evt);\n }\n\n onStateChange(xhrId, evt) {\n const pendingRequest = this.pendingRequests[xhrId];\n if (!pendingRequest) {\n return; // Maybe abortRequest was called...\n }\n\n const xhr = pendingRequest.xhr;\n if (xhr.readyState >= 2 && pendingRequest.onHeadersReceived) {\n pendingRequest.onHeadersReceived();\n delete pendingRequest.onHeadersReceived;\n }\n\n if (xhr.readyState !== 4) {\n return;\n }\n\n if (!(xhrId in this.pendingRequests)) {\n // The XHR request might have been aborted in onHeadersReceived()\n // callback, in which case we should abort request.\n return;\n }\n\n delete this.pendingRequests[xhrId];\n\n // Success status == 0 can be on ftp, file and other protocols.\n if (xhr.status === 0 && this.isHttp) {\n pendingRequest.onError?.(xhr.status);\n return;\n }\n const xhrStatus = xhr.status || OK_RESPONSE;\n\n // From http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.2:\n // \"A server MAY ignore the Range header\". This means it's possible to\n // get a 200 rather than a 206 response from a range request.\n const ok_response_on_range_request =\n xhrStatus === OK_RESPONSE &&\n pendingRequest.expectedStatus === PARTIAL_CONTENT_RESPONSE;\n\n if (\n !ok_response_on_range_request &&\n xhrStatus !== pendingRequest.expectedStatus\n ) {\n pendingRequest.onError?.(xhr.status);\n return;\n }\n\n const chunk = getArrayBuffer(xhr);\n if (xhrStatus === PARTIAL_CONTENT_RESPONSE) {\n const rangeHeader = xhr.getResponseHeader(\"Content-Range\");\n const matches = /bytes (\\d+)-(\\d+)\\/(\\d+)/.exec(rangeHeader);\n pendingRequest.onDone({\n begin: parseInt(matches[1], 10),\n chunk,\n });\n } else if (chunk) {\n pendingRequest.onDone({\n begin: 0,\n chunk,\n });\n } else {\n pendingRequest.onError?.(xhr.status);\n }\n }\n\n getRequestXhr(xhrId) {\n return this.pendingRequests[xhrId].xhr;\n }\n\n isPendingRequest(xhrId) {\n return xhrId in this.pendingRequests;\n }\n\n abortRequest(xhrId) {\n const xhr = this.pendingRequests[xhrId].xhr;\n delete this.pendingRequests[xhrId];\n xhr.abort();\n }\n}\n\n/** @implements {IPDFStream} */\nclass PDFNetworkStream {\n constructor(source) {\n this._source = source;\n this._manager = new NetworkManager(source.url, {\n httpHeaders: source.httpHeaders,\n withCredentials: source.withCredentials,\n });\n this._rangeChunkSize = source.rangeChunkSize;\n this._fullRequestReader = null;\n this._rangeRequestReaders = [];\n }\n\n _onRangeRequestReaderClosed(reader) {\n const i = this._rangeRequestReaders.indexOf(reader);\n if (i >= 0) {\n this._rangeRequestReaders.splice(i, 1);\n }\n }\n\n getFullReader() {\n assert(\n !this._fullRequestReader,\n \"PDFNetworkStream.getFullReader can only be called once.\"\n );\n this._fullRequestReader = new PDFNetworkStreamFullRequestReader(\n this._manager,\n this._source\n );\n return this._fullRequestReader;\n }\n\n getRangeReader(begin, end) {\n const reader = new PDFNetworkStreamRangeRequestReader(\n this._manager,\n begin,\n end\n );\n reader.onClosed = this._onRangeRequestReaderClosed.bind(this);\n this._rangeRequestReaders.push(reader);\n return reader;\n }\n\n cancelAllRequests(reason) {\n this._fullRequestReader?.cancel(reason);\n\n for (const reader of this._rangeRequestReaders.slice(0)) {\n reader.cancel(reason);\n }\n }\n}\n\n/** @implements {IPDFStreamReader} */\nclass PDFNetworkStreamFullRequestReader {\n constructor(manager, source) {\n this._manager = manager;\n\n const args = {\n onHeadersReceived: this._onHeadersReceived.bind(this),\n onDone: this._onDone.bind(this),\n onError: this._onError.bind(this),\n onProgress: this._onProgress.bind(this),\n };\n this._url = source.url;\n this._fullRequestId = manager.requestFull(args);\n this._headersReceivedCapability = Promise.withResolvers();\n this._disableRange = source.disableRange || false;\n this._contentLength = source.length; // Optional\n this._rangeChunkSize = source.rangeChunkSize;\n if (!this._rangeChunkSize && !this._disableRange) {\n this._disableRange = true;\n }\n\n this._isStreamingSupported = false;\n this._isRangeSupported = false;\n\n this._cachedChunks = [];\n this._requests = [];\n this._done = false;\n this._storedError = undefined;\n this._filename = null;\n\n this.onProgress = null;\n }\n\n _onHeadersReceived() {\n const fullRequestXhrId = this._fullRequestId;\n const fullRequestXhr = this._manager.getRequestXhr(fullRequestXhrId);\n\n const getResponseHeader = name => fullRequestXhr.getResponseHeader(name);\n\n const { allowRangeRequests, suggestedLength } =\n validateRangeRequestCapabilities({\n getResponseHeader,\n isHttp: this._manager.isHttp,\n rangeChunkSize: this._rangeChunkSize,\n disableRange: this._disableRange,\n });\n\n if (allowRangeRequests) {\n this._isRangeSupported = true;\n }\n // Setting right content length.\n this._contentLength = suggestedLength || this._contentLength;\n\n this._filename = extractFilenameFromHeader(getResponseHeader);\n\n if (this._isRangeSupported) {\n // NOTE: by cancelling the full request, and then issuing range\n // requests, there will be an issue for sites where you can only\n // request the pdf once. However, if this is the case, then the\n // server should not be returning that it can support range requests.\n this._manager.abortRequest(fullRequestXhrId);\n }\n\n this._headersReceivedCapability.resolve();\n }\n\n _onDone(data) {\n if (data) {\n if (this._requests.length > 0) {\n const requestCapability = this._requests.shift();\n requestCapability.resolve({ value: data.chunk, done: false });\n } else {\n this._cachedChunks.push(data.chunk);\n }\n }\n this._done = true;\n if (this._cachedChunks.length > 0) {\n return;\n }\n for (const requestCapability of this._requests) {\n requestCapability.resolve({ value: undefined, done: true });\n }\n this._requests.length = 0;\n }\n\n _onError(status) {\n this._storedError = createResponseStatusError(status, this._url);\n this._headersReceivedCapability.reject(this._storedError);\n for (const requestCapability of this._requests) {\n requestCapability.reject(this._storedError);\n }\n this._requests.length = 0;\n this._cachedChunks.length = 0;\n }\n\n _onProgress(evt) {\n this.onProgress?.({\n loaded: evt.loaded,\n total: evt.lengthComputable ? evt.total : this._contentLength,\n });\n }\n\n get filename() {\n return this._filename;\n }\n\n get isRangeSupported() {\n return this._isRangeSupported;\n }\n\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n\n get contentLength() {\n return this._contentLength;\n }\n\n get headersReady() {\n return this._headersReceivedCapability.promise;\n }\n\n async read() {\n if (this._storedError) {\n throw this._storedError;\n }\n if (this._cachedChunks.length > 0) {\n const chunk = this._cachedChunks.shift();\n return { value: chunk, done: false };\n }\n if (this._done) {\n return { value: undefined, done: true };\n }\n const requestCapability = Promise.withResolvers();\n this._requests.push(requestCapability);\n return requestCapability.promise;\n }\n\n cancel(reason) {\n this._done = true;\n this._headersReceivedCapability.reject(reason);\n for (const requestCapability of this._requests) {\n requestCapability.resolve({ value: undefined, done: true });\n }\n this._requests.length = 0;\n if (this._manager.isPendingRequest(this._fullRequestId)) {\n this._manager.abortRequest(this._fullRequestId);\n }\n this._fullRequestReader = null;\n }\n}\n\n/** @implements {IPDFStreamRangeReader} */\nclass PDFNetworkStreamRangeRequestReader {\n constructor(manager, begin, end) {\n this._manager = manager;\n\n const args = {\n onDone: this._onDone.bind(this),\n onError: this._onError.bind(this),\n onProgress: this._onProgress.bind(this),\n };\n this._url = manager.url;\n this._requestId = manager.requestRange(begin, end, args);\n this._requests = [];\n this._queuedChunk = null;\n this._done = false;\n this._storedError = undefined;\n\n this.onProgress = null;\n this.onClosed = null;\n }\n\n _close() {\n this.onClosed?.(this);\n }\n\n _onDone(data) {\n const chunk = data.chunk;\n if (this._requests.length > 0) {\n const requestCapability = this._requests.shift();\n requestCapability.resolve({ value: chunk, done: false });\n } else {\n this._queuedChunk = chunk;\n }\n this._done = true;\n for (const requestCapability of this._requests) {\n requestCapability.resolve({ value: undefined, done: true });\n }\n this._requests.length = 0;\n this._close();\n }\n\n _onError(status) {\n this._storedError = createResponseStatusError(status, this._url);\n for (const requestCapability of this._requests) {\n requestCapability.reject(this._storedError);\n }\n this._requests.length = 0;\n this._queuedChunk = null;\n }\n\n _onProgress(evt) {\n if (!this.isStreamingSupported) {\n this.onProgress?.({ loaded: evt.loaded });\n }\n }\n\n get isStreamingSupported() {\n return false;\n }\n\n async read() {\n if (this._storedError) {\n throw this._storedError;\n }\n if (this._queuedChunk !== null) {\n const chunk = this._queuedChunk;\n this._queuedChunk = null;\n return { value: chunk, done: false };\n }\n if (this._done) {\n return { value: undefined, done: true };\n }\n const requestCapability = Promise.withResolvers();\n this._requests.push(requestCapability);\n return requestCapability.promise;\n }\n\n cancel(reason) {\n this._done = true;\n for (const requestCapability of this._requests) {\n requestCapability.resolve({ value: undefined, done: true });\n }\n this._requests.length = 0;\n if (this._manager.isPendingRequest(this._requestId)) {\n this._manager.abortRequest(this._requestId);\n }\n this._close();\n }\n}\n\nexport { PDFNetworkStream };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AbortException, assert, MissingPDFException } from \"../shared/util.js\";\nimport {\n extractFilenameFromHeader,\n validateRangeRequestCapabilities,\n} from \"./network_utils.js\";\nimport { NodePackages } from \"./node_utils.js\";\n\nif (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n throw new Error(\n 'Module \"./node_stream.js\" shall not be used with MOZCENTRAL builds.'\n );\n}\n\nconst fileUriRegex = /^file:\\/\\/\\/[a-zA-Z]:\\//;\n\nfunction parseUrl(sourceUrl) {\n const url = NodePackages.get(\"url\");\n const parsedUrl = url.parse(sourceUrl);\n if (parsedUrl.protocol === \"file:\" || parsedUrl.host) {\n return parsedUrl;\n }\n // Prepending 'file:///' to Windows absolute path.\n if (/^[a-z]:[/\\\\]/i.test(sourceUrl)) {\n return url.parse(`file:///${sourceUrl}`);\n }\n // Changes protocol to 'file:' if url refers to filesystem.\n if (!parsedUrl.host) {\n parsedUrl.protocol = \"file:\";\n }\n return parsedUrl;\n}\n\nclass PDFNodeStream {\n constructor(source) {\n this.source = source;\n this.url = parseUrl(source.url);\n this.isHttp =\n this.url.protocol === \"http:\" || this.url.protocol === \"https:\";\n // Check if url refers to filesystem.\n this.isFsUrl = this.url.protocol === \"file:\";\n this.httpHeaders = (this.isHttp && source.httpHeaders) || {};\n\n this._fullRequestReader = null;\n this._rangeRequestReaders = [];\n }\n\n get _progressiveDataLength() {\n return this._fullRequestReader?._loaded ?? 0;\n }\n\n getFullReader() {\n assert(\n !this._fullRequestReader,\n \"PDFNodeStream.getFullReader can only be called once.\"\n );\n this._fullRequestReader = this.isFsUrl\n ? new PDFNodeStreamFsFullReader(this)\n : new PDFNodeStreamFullReader(this);\n return this._fullRequestReader;\n }\n\n getRangeReader(start, end) {\n if (end <= this._progressiveDataLength) {\n return null;\n }\n const rangeReader = this.isFsUrl\n ? new PDFNodeStreamFsRangeReader(this, start, end)\n : new PDFNodeStreamRangeReader(this, start, end);\n this._rangeRequestReaders.push(rangeReader);\n return rangeReader;\n }\n\n cancelAllRequests(reason) {\n this._fullRequestReader?.cancel(reason);\n\n for (const reader of this._rangeRequestReaders.slice(0)) {\n reader.cancel(reason);\n }\n }\n}\n\nclass BaseFullReader {\n constructor(stream) {\n this._url = stream.url;\n this._done = false;\n this._storedError = null;\n this.onProgress = null;\n const source = stream.source;\n this._contentLength = source.length; // optional\n this._loaded = 0;\n this._filename = null;\n\n this._disableRange = source.disableRange || false;\n this._rangeChunkSize = source.rangeChunkSize;\n if (!this._rangeChunkSize && !this._disableRange) {\n this._disableRange = true;\n }\n\n this._isStreamingSupported = !source.disableStream;\n this._isRangeSupported = !source.disableRange;\n\n this._readableStream = null;\n this._readCapability = Promise.withResolvers();\n this._headersCapability = Promise.withResolvers();\n }\n\n get headersReady() {\n return this._headersCapability.promise;\n }\n\n get filename() {\n return this._filename;\n }\n\n get contentLength() {\n return this._contentLength;\n }\n\n get isRangeSupported() {\n return this._isRangeSupported;\n }\n\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n\n async read() {\n await this._readCapability.promise;\n if (this._done) {\n return { value: undefined, done: true };\n }\n if (this._storedError) {\n throw this._storedError;\n }\n\n const chunk = this._readableStream.read();\n if (chunk === null) {\n this._readCapability = Promise.withResolvers();\n return this.read();\n }\n this._loaded += chunk.length;\n this.onProgress?.({\n loaded: this._loaded,\n total: this._contentLength,\n });\n\n // Ensure that `read()` method returns ArrayBuffer.\n const buffer = new Uint8Array(chunk).buffer;\n return { value: buffer, done: false };\n }\n\n cancel(reason) {\n // Call `this._error()` method when cancel is called\n // before _readableStream is set.\n if (!this._readableStream) {\n this._error(reason);\n return;\n }\n this._readableStream.destroy(reason);\n }\n\n _error(reason) {\n this._storedError = reason;\n this._readCapability.resolve();\n }\n\n _setReadableStream(readableStream) {\n this._readableStream = readableStream;\n readableStream.on(\"readable\", () => {\n this._readCapability.resolve();\n });\n\n readableStream.on(\"end\", () => {\n // Destroy readable to minimize resource usage.\n readableStream.destroy();\n this._done = true;\n this._readCapability.resolve();\n });\n\n readableStream.on(\"error\", reason => {\n this._error(reason);\n });\n\n // We need to stop reading when range is supported and streaming is\n // disabled.\n if (!this._isStreamingSupported && this._isRangeSupported) {\n this._error(new AbortException(\"streaming is disabled\"));\n }\n\n // Destroy ReadableStream if already in errored state.\n if (this._storedError) {\n this._readableStream.destroy(this._storedError);\n }\n }\n}\n\nclass BaseRangeReader {\n constructor(stream) {\n this._url = stream.url;\n this._done = false;\n this._storedError = null;\n this.onProgress = null;\n this._loaded = 0;\n this._readableStream = null;\n this._readCapability = Promise.withResolvers();\n const source = stream.source;\n this._isStreamingSupported = !source.disableStream;\n }\n\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n\n async read() {\n await this._readCapability.promise;\n if (this._done) {\n return { value: undefined, done: true };\n }\n if (this._storedError) {\n throw this._storedError;\n }\n\n const chunk = this._readableStream.read();\n if (chunk === null) {\n this._readCapability = Promise.withResolvers();\n return this.read();\n }\n this._loaded += chunk.length;\n this.onProgress?.({ loaded: this._loaded });\n\n // Ensure that `read()` method returns ArrayBuffer.\n const buffer = new Uint8Array(chunk).buffer;\n return { value: buffer, done: false };\n }\n\n cancel(reason) {\n // Call `this._error()` method when cancel is called\n // before _readableStream is set.\n if (!this._readableStream) {\n this._error(reason);\n return;\n }\n this._readableStream.destroy(reason);\n }\n\n _error(reason) {\n this._storedError = reason;\n this._readCapability.resolve();\n }\n\n _setReadableStream(readableStream) {\n this._readableStream = readableStream;\n readableStream.on(\"readable\", () => {\n this._readCapability.resolve();\n });\n\n readableStream.on(\"end\", () => {\n // Destroy readableStream to minimize resource usage.\n readableStream.destroy();\n this._done = true;\n this._readCapability.resolve();\n });\n\n readableStream.on(\"error\", reason => {\n this._error(reason);\n });\n\n // Destroy readableStream if already in errored state.\n if (this._storedError) {\n this._readableStream.destroy(this._storedError);\n }\n }\n}\n\nfunction createRequestOptions(parsedUrl, headers) {\n return {\n protocol: parsedUrl.protocol,\n auth: parsedUrl.auth,\n host: parsedUrl.hostname,\n port: parsedUrl.port,\n path: parsedUrl.path,\n method: \"GET\",\n headers,\n };\n}\n\nclass PDFNodeStreamFullReader extends BaseFullReader {\n constructor(stream) {\n super(stream);\n\n const handleResponse = response => {\n if (response.statusCode === 404) {\n const error = new MissingPDFException(`Missing PDF \"${this._url}\".`);\n this._storedError = error;\n this._headersCapability.reject(error);\n return;\n }\n this._headersCapability.resolve();\n this._setReadableStream(response);\n\n // Make sure that headers name are in lower case, as mentioned\n // here: https://nodejs.org/api/http.html#http_message_headers.\n const getResponseHeader = name =>\n this._readableStream.headers[name.toLowerCase()];\n\n const { allowRangeRequests, suggestedLength } =\n validateRangeRequestCapabilities({\n getResponseHeader,\n isHttp: stream.isHttp,\n rangeChunkSize: this._rangeChunkSize,\n disableRange: this._disableRange,\n });\n\n this._isRangeSupported = allowRangeRequests;\n // Setting right content length.\n this._contentLength = suggestedLength || this._contentLength;\n\n this._filename = extractFilenameFromHeader(getResponseHeader);\n };\n\n this._request = null;\n if (this._url.protocol === \"http:\") {\n const http = NodePackages.get(\"http\");\n this._request = http.request(\n createRequestOptions(this._url, stream.httpHeaders),\n handleResponse\n );\n } else {\n const https = NodePackages.get(\"https\");\n this._request = https.request(\n createRequestOptions(this._url, stream.httpHeaders),\n handleResponse\n );\n }\n\n this._request.on(\"error\", reason => {\n this._storedError = reason;\n this._headersCapability.reject(reason);\n });\n // Note: `request.end(data)` is used to write `data` to request body\n // and notify end of request. But one should always call `request.end()`\n // even if there is no data to write -- (to notify the end of request).\n this._request.end();\n }\n}\n\nclass PDFNodeStreamRangeReader extends BaseRangeReader {\n constructor(stream, start, end) {\n super(stream);\n\n this._httpHeaders = {};\n for (const property in stream.httpHeaders) {\n const value = stream.httpHeaders[property];\n if (value === undefined) {\n continue;\n }\n this._httpHeaders[property] = value;\n }\n this._httpHeaders.Range = `bytes=${start}-${end - 1}`;\n\n const handleResponse = response => {\n if (response.statusCode === 404) {\n const error = new MissingPDFException(`Missing PDF \"${this._url}\".`);\n this._storedError = error;\n return;\n }\n this._setReadableStream(response);\n };\n\n this._request = null;\n if (this._url.protocol === \"http:\") {\n const http = NodePackages.get(\"http\");\n this._request = http.request(\n createRequestOptions(this._url, this._httpHeaders),\n handleResponse\n );\n } else {\n const https = NodePackages.get(\"https\");\n this._request = https.request(\n createRequestOptions(this._url, this._httpHeaders),\n handleResponse\n );\n }\n\n this._request.on(\"error\", reason => {\n this._storedError = reason;\n });\n this._request.end();\n }\n}\n\nclass PDFNodeStreamFsFullReader extends BaseFullReader {\n constructor(stream) {\n super(stream);\n\n let path = decodeURIComponent(this._url.path);\n\n // Remove the extra slash to get right path from url like `file:///C:/`\n if (fileUriRegex.test(this._url.href)) {\n path = path.replace(/^\\//, \"\");\n }\n\n const fs = NodePackages.get(\"fs\");\n fs.promises.lstat(path).then(\n stat => {\n // Setting right content length.\n this._contentLength = stat.size;\n\n this._setReadableStream(fs.createReadStream(path));\n this._headersCapability.resolve();\n },\n error => {\n if (error.code === \"ENOENT\") {\n error = new MissingPDFException(`Missing PDF \"${path}\".`);\n }\n this._storedError = error;\n this._headersCapability.reject(error);\n }\n );\n }\n}\n\nclass PDFNodeStreamFsRangeReader extends BaseRangeReader {\n constructor(stream, start, end) {\n super(stream);\n\n let path = decodeURIComponent(this._url.path);\n\n // Remove the extra slash to get right path from url like `file:///C:/`\n if (fileUriRegex.test(this._url.href)) {\n path = path.replace(/^\\//, \"\");\n }\n\n const fs = NodePackages.get(\"fs\");\n this._setReadableStream(fs.createReadStream(path, { start, end: end - 1 }));\n }\n}\n\nexport { PDFNodeStream };\n","/* Copyright 2015 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @typedef {import(\"./display_utils\").PageViewport} PageViewport */\n/** @typedef {import(\"./api\").TextContent} TextContent */\n\nimport { AbortException, Util, warn } from \"../shared/util.js\";\nimport { deprecated, setLayerDimensions } from \"./display_utils.js\";\n\n/**\n * @typedef {Object} TextLayerParameters\n * @property {ReadableStream | TextContent} textContentSource - Text content to\n * render, i.e. the value returned by the page's `streamTextContent` or\n * `getTextContent` method.\n * @property {HTMLElement} container - The DOM node that will contain the text\n * runs.\n * @property {PageViewport} viewport - The target viewport to properly layout\n * the text runs.\n */\n\n/**\n * @typedef {Object} TextLayerUpdateParameters\n * @property {PageViewport} viewport - The target viewport to properly layout\n * the text runs.\n * @property {function} [onBefore] - Callback invoked before the textLayer is\n * updated in the DOM.\n */\n\nconst MAX_TEXT_DIVS_TO_RENDER = 100000;\nconst DEFAULT_FONT_SIZE = 30;\nconst DEFAULT_FONT_ASCENT = 0.8;\n\nclass TextLayer {\n #capability = Promise.withResolvers();\n\n #container = null;\n\n #disableProcessItems = false;\n\n #fontInspectorEnabled = !!globalThis.FontInspector?.enabled;\n\n #lang = null;\n\n #layoutTextParams = null;\n\n #pageHeight = 0;\n\n #pageWidth = 0;\n\n #reader = null;\n\n #rootContainer = null;\n\n #rotation = 0;\n\n #scale = 0;\n\n #styleCache = Object.create(null);\n\n #textContentItemsStr = [];\n\n #textContentSource = null;\n\n #textDivs = [];\n\n #textDivProperties = new WeakMap();\n\n #transform = null;\n\n static #ascentCache = new Map();\n\n static #canvasContexts = new Map();\n\n static #pendingTextLayers = new Set();\n\n /**\n * @param {TextLayerParameters} options\n */\n constructor({ textContentSource, container, viewport }) {\n if (textContentSource instanceof ReadableStream) {\n this.#textContentSource = textContentSource;\n } else if (\n (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) &&\n typeof textContentSource === \"object\"\n ) {\n this.#textContentSource = new ReadableStream({\n start(controller) {\n controller.enqueue(textContentSource);\n controller.close();\n },\n });\n } else {\n throw new Error('No \"textContentSource\" parameter specified.');\n }\n this.#container = this.#rootContainer = container;\n\n this.#scale = viewport.scale * (globalThis.devicePixelRatio || 1);\n this.#rotation = viewport.rotation;\n this.#layoutTextParams = {\n prevFontSize: null,\n prevFontFamily: null,\n div: null,\n properties: null,\n ctx: null,\n };\n const { pageWidth, pageHeight, pageX, pageY } = viewport.rawDims;\n this.#transform = [1, 0, 0, -1, -pageX, pageY + pageHeight];\n this.#pageWidth = pageWidth;\n this.#pageHeight = pageHeight;\n\n setLayerDimensions(container, viewport);\n\n // Always clean-up the temporary canvas once rendering is no longer pending.\n this.#capability.promise\n .catch(() => {\n // Avoid \"Uncaught promise\" messages in the console.\n })\n .then(() => {\n TextLayer.#pendingTextLayers.delete(this);\n this.#layoutTextParams = null;\n this.#styleCache = null;\n });\n\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n // For testing purposes.\n Object.defineProperty(this, \"pageWidth\", {\n get() {\n return this.#pageWidth;\n },\n });\n Object.defineProperty(this, \"pageHeight\", {\n get() {\n return this.#pageHeight;\n },\n });\n }\n }\n\n /**\n * Render the textLayer.\n * @returns {Promise}\n */\n render() {\n const pump = () => {\n this.#reader.read().then(({ value, done }) => {\n if (done) {\n this.#capability.resolve();\n return;\n }\n this.#lang ??= value.lang;\n Object.assign(this.#styleCache, value.styles);\n this.#processItems(value.items);\n pump();\n }, this.#capability.reject);\n };\n this.#reader = this.#textContentSource.getReader();\n TextLayer.#pendingTextLayers.add(this);\n pump();\n\n return this.#capability.promise;\n }\n\n /**\n * Update a previously rendered textLayer, if necessary.\n * @param {TextLayerUpdateParameters} options\n * @returns {undefined}\n */\n update({ viewport, onBefore = null }) {\n const scale = viewport.scale * (globalThis.devicePixelRatio || 1);\n const rotation = viewport.rotation;\n\n if (rotation !== this.#rotation) {\n onBefore?.();\n this.#rotation = rotation;\n setLayerDimensions(this.#rootContainer, { rotation });\n }\n\n if (scale !== this.#scale) {\n onBefore?.();\n this.#scale = scale;\n const params = {\n prevFontSize: null,\n prevFontFamily: null,\n div: null,\n properties: null,\n ctx: TextLayer.#getCtx(this.#lang),\n };\n for (const div of this.#textDivs) {\n params.properties = this.#textDivProperties.get(div);\n params.div = div;\n this.#layout(params);\n }\n }\n }\n\n /**\n * Cancel rendering of the textLayer.\n * @returns {undefined}\n */\n cancel() {\n const abortEx = new AbortException(\"TextLayer task cancelled.\");\n\n this.#reader?.cancel(abortEx).catch(() => {\n // Avoid \"Uncaught promise\" messages in the console.\n });\n this.#reader = null;\n\n this.#capability.reject(abortEx);\n }\n\n /**\n * @type {Array} HTML elements that correspond to the text items\n * of the textContent input.\n * This is output and will initially be set to an empty array.\n */\n get textDivs() {\n return this.#textDivs;\n }\n\n /**\n * @type {Array} Strings that correspond to the `str` property of\n * the text items of the textContent input.\n * This is output and will initially be set to an empty array\n */\n get textContentItemsStr() {\n return this.#textContentItemsStr;\n }\n\n #processItems(items) {\n if (this.#disableProcessItems) {\n return;\n }\n this.#layoutTextParams.ctx ||= TextLayer.#getCtx(this.#lang);\n\n const textDivs = this.#textDivs,\n textContentItemsStr = this.#textContentItemsStr;\n\n for (const item of items) {\n // No point in rendering many divs as it would make the browser\n // unusable even after the divs are rendered.\n if (textDivs.length > MAX_TEXT_DIVS_TO_RENDER) {\n warn(\"Ignoring additional textDivs for performance reasons.\");\n\n this.#disableProcessItems = true; // Avoid multiple warnings for one page.\n return;\n }\n\n if (item.str === undefined) {\n if (\n item.type === \"beginMarkedContentProps\" ||\n item.type === \"beginMarkedContent\"\n ) {\n const parent = this.#container;\n this.#container = document.createElement(\"span\");\n this.#container.classList.add(\"markedContent\");\n if (item.id !== null) {\n this.#container.setAttribute(\"id\", `${item.id}`);\n }\n parent.append(this.#container);\n } else if (item.type === \"endMarkedContent\") {\n this.#container = this.#container.parentNode;\n }\n continue;\n }\n textContentItemsStr.push(item.str);\n this.#appendText(item);\n }\n }\n\n #appendText(geom) {\n // Initialize all used properties to keep the caches monomorphic.\n const textDiv = document.createElement(\"span\");\n const textDivProperties = {\n angle: 0,\n canvasWidth: 0,\n hasText: geom.str !== \"\",\n hasEOL: geom.hasEOL,\n fontSize: 0,\n };\n this.#textDivs.push(textDiv);\n\n const tx = Util.transform(this.#transform, geom.transform);\n let angle = Math.atan2(tx[1], tx[0]);\n const style = this.#styleCache[geom.fontName];\n if (style.vertical) {\n angle += Math.PI / 2;\n }\n\n const fontFamily =\n (this.#fontInspectorEnabled && style.fontSubstitution) ||\n style.fontFamily;\n const fontHeight = Math.hypot(tx[2], tx[3]);\n const fontAscent =\n fontHeight * TextLayer.#getAscent(fontFamily, this.#lang);\n\n let left, top;\n if (angle === 0) {\n left = tx[4];\n top = tx[5] - fontAscent;\n } else {\n left = tx[4] + fontAscent * Math.sin(angle);\n top = tx[5] - fontAscent * Math.cos(angle);\n }\n\n const scaleFactorStr = \"calc(var(--scale-factor)*\";\n const divStyle = textDiv.style;\n // Setting the style properties individually, rather than all at once,\n // should be OK since the `textDiv` isn't appended to the document yet.\n if (this.#container === this.#rootContainer) {\n divStyle.left = `${((100 * left) / this.#pageWidth).toFixed(2)}%`;\n divStyle.top = `${((100 * top) / this.#pageHeight).toFixed(2)}%`;\n } else {\n // We're in a marked content span, hence we can't use percents.\n divStyle.left = `${scaleFactorStr}${left.toFixed(2)}px)`;\n divStyle.top = `${scaleFactorStr}${top.toFixed(2)}px)`;\n }\n divStyle.fontSize = `${scaleFactorStr}${fontHeight.toFixed(2)}px)`;\n divStyle.fontFamily = fontFamily;\n\n textDivProperties.fontSize = fontHeight;\n\n // Keeps screen readers from pausing on every new text span.\n textDiv.setAttribute(\"role\", \"presentation\");\n\n textDiv.textContent = geom.str;\n // geom.dir may be 'ttb' for vertical texts.\n textDiv.dir = geom.dir;\n\n // `fontName` is only used by the FontInspector, and we only use `dataset`\n // here to make the font name available in the debugger.\n if (this.#fontInspectorEnabled) {\n textDiv.dataset.fontName =\n style.fontSubstitutionLoadedName || geom.fontName;\n }\n if (angle !== 0) {\n textDivProperties.angle = angle * (180 / Math.PI);\n }\n // We don't bother scaling single-char text divs, because it has very\n // little effect on text highlighting. This makes scrolling on docs with\n // lots of such divs a lot faster.\n let shouldScaleText = false;\n if (geom.str.length > 1) {\n shouldScaleText = true;\n } else if (geom.str !== \" \" && geom.transform[0] !== geom.transform[3]) {\n const absScaleX = Math.abs(geom.transform[0]),\n absScaleY = Math.abs(geom.transform[3]);\n // When the horizontal/vertical scaling differs significantly, also scale\n // even single-char text to improve highlighting (fixes issue11713.pdf).\n if (\n absScaleX !== absScaleY &&\n Math.max(absScaleX, absScaleY) / Math.min(absScaleX, absScaleY) > 1.5\n ) {\n shouldScaleText = true;\n }\n }\n if (shouldScaleText) {\n textDivProperties.canvasWidth = style.vertical ? geom.height : geom.width;\n }\n this.#textDivProperties.set(textDiv, textDivProperties);\n\n // Finally, layout and append the text to the DOM.\n this.#layoutTextParams.div = textDiv;\n this.#layoutTextParams.properties = textDivProperties;\n this.#layout(this.#layoutTextParams);\n\n if (textDivProperties.hasText) {\n this.#container.append(textDiv);\n }\n if (textDivProperties.hasEOL) {\n const br = document.createElement(\"br\");\n br.setAttribute(\"role\", \"presentation\");\n this.#container.append(br);\n }\n }\n\n #layout(params) {\n const { div, properties, ctx, prevFontSize, prevFontFamily } = params;\n const { style } = div;\n let transform = \"\";\n if (properties.canvasWidth !== 0 && properties.hasText) {\n const { fontFamily } = style;\n const { canvasWidth, fontSize } = properties;\n\n if (prevFontSize !== fontSize || prevFontFamily !== fontFamily) {\n ctx.font = `${fontSize * this.#scale}px ${fontFamily}`;\n params.prevFontSize = fontSize;\n params.prevFontFamily = fontFamily;\n }\n\n // Only measure the width for multi-char text divs, see `appendText`.\n const { width } = ctx.measureText(div.textContent);\n\n if (width > 0) {\n transform = `scaleX(${(canvasWidth * this.#scale) / width})`;\n }\n }\n if (properties.angle !== 0) {\n transform = `rotate(${properties.angle}deg) ${transform}`;\n }\n if (transform.length > 0) {\n style.transform = transform;\n }\n }\n\n /**\n * Clean-up global textLayer data.\n * @returns {undefined}\n */\n static cleanup() {\n if (this.#pendingTextLayers.size > 0) {\n return;\n }\n this.#ascentCache.clear();\n\n for (const { canvas } of this.#canvasContexts.values()) {\n canvas.remove();\n }\n this.#canvasContexts.clear();\n }\n\n static #getCtx(lang = null) {\n let canvasContext = this.#canvasContexts.get((lang ||= \"\"));\n if (!canvasContext) {\n // We don't use an OffscreenCanvas here because we use serif/sans serif\n // fonts with it and they depends on the locale.\n // In Firefox, the element get a lang attribute that depends on\n // what Fluent returns for the locale and the OffscreenCanvas uses\n // the OS locale.\n // Those two locales can be different and consequently the used fonts will\n // be different (see bug 1869001).\n // Ideally, we should use in the text layer the fonts we've in the pdf (or\n // their replacements when they aren't embedded) and then we can use an\n // OffscreenCanvas.\n const canvas = document.createElement(\"canvas\");\n canvas.className = \"hiddenCanvasElement\";\n canvas.lang = lang;\n document.body.append(canvas);\n canvasContext = canvas.getContext(\"2d\", { alpha: false });\n this.#canvasContexts.set(lang, canvasContext);\n }\n return canvasContext;\n }\n\n static #getAscent(fontFamily, lang) {\n const cachedAscent = this.#ascentCache.get(fontFamily);\n if (cachedAscent) {\n return cachedAscent;\n }\n const ctx = this.#getCtx(lang);\n\n const savedFont = ctx.font;\n ctx.canvas.width = ctx.canvas.height = DEFAULT_FONT_SIZE;\n ctx.font = `${DEFAULT_FONT_SIZE}px ${fontFamily}`;\n const metrics = ctx.measureText(\"\");\n\n // Both properties aren't available by default in Firefox.\n let ascent = metrics.fontBoundingBoxAscent;\n let descent = Math.abs(metrics.fontBoundingBoxDescent);\n if (ascent) {\n const ratio = ascent / (ascent + descent);\n this.#ascentCache.set(fontFamily, ratio);\n\n ctx.canvas.width = ctx.canvas.height = 0;\n ctx.font = savedFont;\n return ratio;\n }\n\n // Try basic heuristic to guess ascent/descent.\n // Draw a g with baseline at 0,0 and then get the line\n // number where a pixel has non-null red component (starting\n // from bottom).\n ctx.strokeStyle = \"red\";\n ctx.clearRect(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE);\n ctx.strokeText(\"g\", 0, 0);\n let pixels = ctx.getImageData(\n 0,\n 0,\n DEFAULT_FONT_SIZE,\n DEFAULT_FONT_SIZE\n ).data;\n descent = 0;\n for (let i = pixels.length - 1 - 3; i >= 0; i -= 4) {\n if (pixels[i] > 0) {\n descent = Math.ceil(i / 4 / DEFAULT_FONT_SIZE);\n break;\n }\n }\n\n // Draw an A with baseline at 0,DEFAULT_FONT_SIZE and then get the line\n // number where a pixel has non-null red component (starting\n // from top).\n ctx.clearRect(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE);\n ctx.strokeText(\"A\", 0, DEFAULT_FONT_SIZE);\n pixels = ctx.getImageData(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE).data;\n ascent = 0;\n for (let i = 0, ii = pixels.length; i < ii; i += 4) {\n if (pixels[i] > 0) {\n ascent = DEFAULT_FONT_SIZE - Math.floor(i / 4 / DEFAULT_FONT_SIZE);\n break;\n }\n }\n\n ctx.canvas.width = ctx.canvas.height = 0;\n ctx.font = savedFont;\n\n const ratio = ascent ? ascent / (ascent + descent) : DEFAULT_FONT_ASCENT;\n this.#ascentCache.set(fontFamily, ratio);\n return ratio;\n }\n}\n\nfunction renderTextLayer() {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n return;\n }\n deprecated(\"`renderTextLayer`, please use `TextLayer` instead.\");\n\n const { textContentSource, container, viewport, ...rest } = arguments[0];\n const restKeys = Object.keys(rest);\n if (restKeys.length > 0) {\n warn(\"Ignoring `renderTextLayer` parameters: \" + restKeys.join(\", \"));\n }\n\n const textLayer = new TextLayer({\n textContentSource,\n container,\n viewport,\n });\n\n const { textDivs, textContentItemsStr } = textLayer;\n const promise = textLayer.render();\n\n // eslint-disable-next-line consistent-return\n return {\n promise,\n textDivs,\n textContentItemsStr,\n };\n}\n\nfunction updateTextLayer() {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n return;\n }\n deprecated(\"`updateTextLayer`, please use `TextLayer` instead.\");\n}\n\nexport { renderTextLayer, TextLayer, updateTextLayer };\n","/* Copyright 2021 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @typedef {import(\"./api\").TextContent} TextContent */\n\nclass XfaText {\n /**\n * Walk an XFA tree and create an array of text nodes that is compatible\n * with a regular PDFs TextContent. Currently, only TextItem.str is supported,\n * all other fields and styles haven't been implemented.\n *\n * @param {Object} xfa - An XFA fake DOM object.\n *\n * @returns {TextContent}\n */\n static textContent(xfa) {\n const items = [];\n const output = {\n items,\n styles: Object.create(null),\n };\n function walk(node) {\n if (!node) {\n return;\n }\n let str = null;\n const name = node.name;\n if (name === \"#text\") {\n str = node.value;\n } else if (!XfaText.shouldBuildText(name)) {\n return;\n } else if (node?.attributes?.textContent) {\n str = node.attributes.textContent;\n } else if (node.value) {\n str = node.value;\n }\n if (str !== null) {\n items.push({\n str,\n });\n }\n if (!node.children) {\n return;\n }\n for (const child of node.children) {\n walk(child);\n }\n }\n walk(xfa);\n return output;\n }\n\n /**\n * @param {string} name - DOM node name. (lower case)\n *\n * @returns {boolean} true if the DOM node should have a corresponding text\n * node.\n */\n static shouldBuildText(name) {\n return !(\n name === \"textarea\" ||\n name === \"input\" ||\n name === \"option\" ||\n name === \"select\"\n );\n }\n}\n\nexport { XfaText };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module pdfjsLib\n */\n\nimport {\n AbortException,\n AnnotationMode,\n assert,\n getVerbosityLevel,\n info,\n InvalidPDFException,\n isNodeJS,\n MAX_IMAGE_SIZE_TO_CACHE,\n MissingPDFException,\n PasswordException,\n RenderingIntentFlag,\n setVerbosityLevel,\n shadow,\n stringToBytes,\n UnexpectedResponseException,\n UnknownErrorException,\n unreachable,\n warn,\n} from \"../shared/util.js\";\nimport {\n AnnotationStorage,\n PrintAnnotationStorage,\n SerializableEmpty,\n} from \"./annotation_storage.js\";\nimport {\n DOMCanvasFactory,\n DOMCMapReaderFactory,\n DOMFilterFactory,\n DOMStandardFontDataFactory,\n isDataScheme,\n isValidFetchUrl,\n PageViewport,\n RenderingCancelledException,\n StatTimer,\n} from \"./display_utils.js\";\nimport { FontFaceObject, FontLoader } from \"./font_loader.js\";\nimport {\n NodeCanvasFactory,\n NodeCMapReaderFactory,\n NodeFilterFactory,\n NodePackages,\n NodeStandardFontDataFactory,\n} from \"display-node_utils\";\nimport { CanvasGraphics } from \"./canvas.js\";\nimport { GlobalWorkerOptions } from \"./worker_options.js\";\nimport { MessageHandler } from \"../shared/message_handler.js\";\nimport { Metadata } from \"./metadata.js\";\nimport { OptionalContentConfig } from \"./optional_content_config.js\";\nimport { PDFDataTransportStream } from \"./transport_stream.js\";\nimport { PDFFetchStream } from \"display-fetch_stream\";\nimport { PDFNetworkStream } from \"display-network\";\nimport { PDFNodeStream } from \"display-node_stream\";\nimport { TextLayer } from \"./text_layer.js\";\nimport { XfaText } from \"./xfa_text.js\";\n\nconst DEFAULT_RANGE_CHUNK_SIZE = 65536; // 2^16 = 65536\nconst RENDERING_CANCELLED_TIMEOUT = 100; // ms\nconst DELAYED_CLEANUP_TIMEOUT = 5000; // ms\n\nconst DefaultCanvasFactory =\n typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"GENERIC\") && isNodeJS\n ? NodeCanvasFactory\n : DOMCanvasFactory;\nconst DefaultCMapReaderFactory =\n typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"GENERIC\") && isNodeJS\n ? NodeCMapReaderFactory\n : DOMCMapReaderFactory;\nconst DefaultFilterFactory =\n typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"GENERIC\") && isNodeJS\n ? NodeFilterFactory\n : DOMFilterFactory;\nconst DefaultStandardFontDataFactory =\n typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"GENERIC\") && isNodeJS\n ? NodeStandardFontDataFactory\n : DOMStandardFontDataFactory;\n\n/**\n * @typedef { Int8Array | Uint8Array | Uint8ClampedArray |\n * Int16Array | Uint16Array |\n * Int32Array | Uint32Array | Float32Array |\n * Float64Array\n * } TypedArray\n */\n\n/**\n * @typedef {Object} RefProxy\n * @property {number} num\n * @property {number} gen\n */\n\n/**\n * Document initialization / loading parameters object.\n *\n * @typedef {Object} DocumentInitParameters\n * @property {string | URL} [url] - The URL of the PDF.\n * @property {TypedArray | ArrayBuffer | Array | string} [data] -\n * Binary PDF data.\n * Use TypedArrays (Uint8Array) to improve the memory usage. If PDF data is\n * BASE64-encoded, use `atob()` to convert it to a binary string first.\n *\n * NOTE: If TypedArrays are used they will generally be transferred to the\n * worker-thread. This will help reduce main-thread memory usage, however\n * it will take ownership of the TypedArrays.\n * @property {Object} [httpHeaders] - Basic authentication headers.\n * @property {boolean} [withCredentials] - Indicates whether or not\n * cross-site Access-Control requests should be made using credentials such\n * as cookies or authorization headers. The default is `false`.\n * @property {string} [password] - For decrypting password-protected PDFs.\n * @property {number} [length] - The PDF file length. It's used for progress\n * reports and range requests operations.\n * @property {PDFDataRangeTransport} [range] - Allows for using a custom range\n * transport implementation.\n * @property {number} [rangeChunkSize] - Specify maximum number of bytes fetched\n * per range request. The default value is {@link DEFAULT_RANGE_CHUNK_SIZE}.\n * @property {PDFWorker} [worker] - The worker that will be used for loading and\n * parsing the PDF data.\n * @property {number} [verbosity] - Controls the logging level; the constants\n * from {@link VerbosityLevel} should be used.\n * @property {string} [docBaseUrl] - The base URL of the document, used when\n * attempting to recover valid absolute URLs for annotations, and outline\n * items, that (incorrectly) only specify relative URLs.\n * @property {string} [cMapUrl] - The URL where the predefined Adobe CMaps are\n * located. Include the trailing slash.\n * @property {boolean} [cMapPacked] - Specifies if the Adobe CMaps are binary\n * packed or not. The default value is `true`.\n * @property {Object} [CMapReaderFactory] - The factory that will be used when\n * reading built-in CMap files. Providing a custom factory is useful for\n * environments without Fetch API or `XMLHttpRequest` support, such as\n * Node.js. The default value is {DOMCMapReaderFactory}.\n * @property {boolean} [useSystemFonts] - When `true`, fonts that aren't\n * embedded in the PDF document will fallback to a system font.\n * The default value is `true` in web environments and `false` in Node.js;\n * unless `disableFontFace === true` in which case this defaults to `false`\n * regardless of the environment (to prevent completely broken fonts).\n * @property {string} [standardFontDataUrl] - The URL where the standard font\n * files are located. Include the trailing slash.\n * @property {Object} [StandardFontDataFactory] - The factory that will be used\n * when reading the standard font files. Providing a custom factory is useful\n * for environments without Fetch API or `XMLHttpRequest` support, such as\n * Node.js. The default value is {DOMStandardFontDataFactory}.\n * @property {boolean} [useWorkerFetch] - Enable using the Fetch API in the\n * worker-thread when reading CMap and standard font files. When `true`,\n * the `CMapReaderFactory` and `StandardFontDataFactory` options are ignored.\n * The default value is `true` in web environments and `false` in Node.js.\n * @property {boolean} [stopAtErrors] - Reject certain promises, e.g.\n * `getOperatorList`, `getTextContent`, and `RenderTask`, when the associated\n * PDF data cannot be successfully parsed, instead of attempting to recover\n * whatever possible of the data. The default value is `false`.\n * @property {number} [maxImageSize] - The maximum allowed image size in total\n * pixels, i.e. width * height. Images above this value will not be rendered.\n * Use -1 for no limit, which is also the default value.\n * @property {boolean} [isEvalSupported] - Determines if we can evaluate strings\n * as JavaScript. Primarily used to improve performance of PDF functions.\n * The default value is `true`.\n * @property {boolean} [isOffscreenCanvasSupported] - Determines if we can use\n * `OffscreenCanvas` in the worker. Primarily used to improve performance of\n * image conversion/rendering.\n * The default value is `true` in web environments and `false` in Node.js.\n * @property {number} [canvasMaxAreaInBytes] - The integer value is used to\n * know when an image must be resized (uses `OffscreenCanvas` in the worker).\n * If it's -1 then a possibly slow algorithm is used to guess the max value.\n * @property {boolean} [disableFontFace] - By default fonts are converted to\n * OpenType fonts and loaded via the Font Loading API or `@font-face` rules.\n * If disabled, fonts will be rendered using a built-in font renderer that\n * constructs the glyphs with primitive path commands.\n * The default value is `false` in web environments and `true` in Node.js.\n * @property {boolean} [fontExtraProperties] - Include additional properties,\n * which are unused during rendering of PDF documents, when exporting the\n * parsed font data from the worker-thread. This may be useful for debugging\n * purposes (and backwards compatibility), but note that it will lead to\n * increased memory usage. The default value is `false`.\n * @property {boolean} [enableXfa] - Render Xfa forms if any.\n * The default value is `false`.\n * @property {HTMLDocument} [ownerDocument] - Specify an explicit document\n * context to create elements with and to load resources, such as fonts,\n * into. Defaults to the current document.\n * @property {boolean} [disableRange] - Disable range request loading of PDF\n * files. When enabled, and if the server supports partial content requests,\n * then the PDF will be fetched in chunks. The default value is `false`.\n * @property {boolean} [disableStream] - Disable streaming of PDF file data.\n * By default PDF.js attempts to load PDF files in chunks. The default value\n * is `false`.\n * @property {boolean} [disableAutoFetch] - Disable pre-fetching of PDF file\n * data. When range requests are enabled PDF.js will automatically keep\n * fetching more data even if it isn't needed to display the current page.\n * The default value is `false`.\n *\n * NOTE: It is also necessary to disable streaming, see above, in order for\n * disabling of pre-fetching to work correctly.\n * @property {boolean} [pdfBug] - Enables special hooks for debugging PDF.js\n * (see `web/debugger.js`). The default value is `false`.\n * @property {Object} [canvasFactory] - The factory instance that will be used\n * when creating canvases. The default value is {new DOMCanvasFactory()}.\n * @property {Object} [filterFactory] - A factory instance that will be used\n * to create SVG filters when rendering some images on the main canvas.\n */\n\n/**\n * This is the main entry point for loading a PDF and interacting with it.\n *\n * NOTE: If a URL is used to fetch the PDF data a standard Fetch API call (or\n * XHR as fallback) is used, which means it must follow same origin rules,\n * e.g. no cross-domain requests without CORS.\n *\n * @param {string | URL | TypedArray | ArrayBuffer | DocumentInitParameters}\n * src - Can be a URL where a PDF file is located, a typed array (Uint8Array)\n * already populated with data, or a parameter object.\n * @returns {PDFDocumentLoadingTask}\n */\nfunction getDocument(src) {\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n if (typeof src === \"string\" || src instanceof URL) {\n src = { url: src };\n } else if (src instanceof ArrayBuffer || ArrayBuffer.isView(src)) {\n src = { data: src };\n }\n }\n if (typeof src !== \"object\") {\n throw new Error(\"Invalid parameter in getDocument, need parameter object.\");\n }\n if (!src.url && !src.data && !src.range) {\n throw new Error(\n \"Invalid parameter object: need either .data, .range or .url\"\n );\n }\n const task = new PDFDocumentLoadingTask();\n const { docId } = task;\n\n const url = src.url ? getUrlProp(src.url) : null;\n const data = src.data ? getDataProp(src.data) : null;\n const httpHeaders = src.httpHeaders || null;\n const withCredentials = src.withCredentials === true;\n const password = src.password ?? null;\n const rangeTransport =\n src.range instanceof PDFDataRangeTransport ? src.range : null;\n const rangeChunkSize =\n Number.isInteger(src.rangeChunkSize) && src.rangeChunkSize > 0\n ? src.rangeChunkSize\n : DEFAULT_RANGE_CHUNK_SIZE;\n let worker = src.worker instanceof PDFWorker ? src.worker : null;\n const verbosity = src.verbosity;\n // Ignore \"data:\"-URLs, since they can't be used to recover valid absolute\n // URLs anyway. We want to avoid sending them to the worker-thread, since\n // they contain the *entire* PDF document and can thus be arbitrarily long.\n const docBaseUrl =\n typeof src.docBaseUrl === \"string\" && !isDataScheme(src.docBaseUrl)\n ? src.docBaseUrl\n : null;\n const cMapUrl = typeof src.cMapUrl === \"string\" ? src.cMapUrl : null;\n const cMapPacked = src.cMapPacked !== false;\n const CMapReaderFactory = src.CMapReaderFactory || DefaultCMapReaderFactory;\n const standardFontDataUrl =\n typeof src.standardFontDataUrl === \"string\"\n ? src.standardFontDataUrl\n : null;\n const StandardFontDataFactory =\n src.StandardFontDataFactory || DefaultStandardFontDataFactory;\n const ignoreErrors = src.stopAtErrors !== true;\n const maxImageSize =\n Number.isInteger(src.maxImageSize) && src.maxImageSize > -1\n ? src.maxImageSize\n : -1;\n const isEvalSupported = src.isEvalSupported !== false;\n const isOffscreenCanvasSupported =\n typeof src.isOffscreenCanvasSupported === \"boolean\"\n ? src.isOffscreenCanvasSupported\n : !isNodeJS;\n const canvasMaxAreaInBytes = Number.isInteger(src.canvasMaxAreaInBytes)\n ? src.canvasMaxAreaInBytes\n : -1;\n const disableFontFace =\n typeof src.disableFontFace === \"boolean\" ? src.disableFontFace : isNodeJS;\n const fontExtraProperties = src.fontExtraProperties === true;\n const enableXfa = src.enableXfa === true;\n const ownerDocument = src.ownerDocument || globalThis.document;\n const disableRange = src.disableRange === true;\n const disableStream = src.disableStream === true;\n const disableAutoFetch = src.disableAutoFetch === true;\n const pdfBug = src.pdfBug === true;\n\n // Parameters whose default values depend on other parameters.\n const length = rangeTransport ? rangeTransport.length : src.length ?? NaN;\n const useSystemFonts =\n typeof src.useSystemFonts === \"boolean\"\n ? src.useSystemFonts\n : !isNodeJS && !disableFontFace;\n const useWorkerFetch =\n typeof src.useWorkerFetch === \"boolean\"\n ? src.useWorkerFetch\n : (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) ||\n (CMapReaderFactory === DOMCMapReaderFactory &&\n StandardFontDataFactory === DOMStandardFontDataFactory &&\n cMapUrl &&\n standardFontDataUrl &&\n isValidFetchUrl(cMapUrl, document.baseURI) &&\n isValidFetchUrl(standardFontDataUrl, document.baseURI));\n const canvasFactory =\n src.canvasFactory || new DefaultCanvasFactory({ ownerDocument });\n const filterFactory =\n src.filterFactory || new DefaultFilterFactory({ docId, ownerDocument });\n\n // Parameters only intended for development/testing purposes.\n const styleElement =\n typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")\n ? src.styleElement\n : null;\n\n // Set the main-thread verbosity level.\n setVerbosityLevel(verbosity);\n\n // Ensure that the various factories can be initialized, when necessary,\n // since the user may provide *custom* ones.\n const transportFactory = {\n canvasFactory,\n filterFactory,\n };\n if (!useWorkerFetch) {\n transportFactory.cMapReaderFactory = new CMapReaderFactory({\n baseUrl: cMapUrl,\n isCompressed: cMapPacked,\n });\n transportFactory.standardFontDataFactory = new StandardFontDataFactory({\n baseUrl: standardFontDataUrl,\n });\n }\n\n if (!worker) {\n const workerParams = {\n verbosity,\n port: GlobalWorkerOptions.workerPort,\n };\n // Worker was not provided -- creating and owning our own. If message port\n // is specified in global worker options, using it.\n worker = workerParams.port\n ? PDFWorker.fromPort(workerParams)\n : new PDFWorker(workerParams);\n task._worker = worker;\n }\n\n const docParams = {\n docId,\n apiVersion:\n typeof PDFJSDev !== \"undefined\" && !PDFJSDev.test(\"TESTING\")\n ? PDFJSDev.eval(\"BUNDLE_VERSION\")\n : null,\n data,\n password,\n disableAutoFetch,\n rangeChunkSize,\n length,\n docBaseUrl,\n enableXfa,\n evaluatorOptions: {\n maxImageSize,\n disableFontFace,\n ignoreErrors,\n isEvalSupported,\n isOffscreenCanvasSupported,\n canvasMaxAreaInBytes,\n fontExtraProperties,\n useSystemFonts,\n cMapUrl: useWorkerFetch ? cMapUrl : null,\n standardFontDataUrl: useWorkerFetch ? standardFontDataUrl : null,\n },\n };\n const transportParams = {\n disableFontFace,\n fontExtraProperties,\n ownerDocument,\n pdfBug,\n styleElement,\n loadingParams: {\n disableAutoFetch,\n enableXfa,\n },\n };\n\n worker.promise\n .then(function () {\n if (task.destroyed) {\n throw new Error(\"Loading aborted\");\n }\n if (worker.destroyed) {\n throw new Error(\"Worker was destroyed\");\n }\n\n const workerIdPromise = worker.messageHandler.sendWithPromise(\n \"GetDocRequest\",\n docParams,\n data ? [data.buffer] : null\n );\n\n let networkStream;\n if (rangeTransport) {\n networkStream = new PDFDataTransportStream(rangeTransport, {\n disableRange,\n disableStream,\n });\n } else if (!data) {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n throw new Error(\"Not implemented: createPDFNetworkStream\");\n }\n const createPDFNetworkStream = params => {\n if (\n typeof PDFJSDev !== \"undefined\" &&\n PDFJSDev.test(\"GENERIC\") &&\n isNodeJS\n ) {\n const isFetchSupported = function () {\n return (\n typeof fetch !== \"undefined\" &&\n typeof Response !== \"undefined\" &&\n \"body\" in Response.prototype\n );\n };\n return isFetchSupported() && isValidFetchUrl(params.url)\n ? new PDFFetchStream(params)\n : new PDFNodeStream(params);\n }\n return isValidFetchUrl(params.url)\n ? new PDFFetchStream(params)\n : new PDFNetworkStream(params);\n };\n\n networkStream = createPDFNetworkStream({\n url,\n length,\n httpHeaders,\n withCredentials,\n rangeChunkSize,\n disableRange,\n disableStream,\n });\n }\n\n return workerIdPromise.then(workerId => {\n if (task.destroyed) {\n throw new Error(\"Loading aborted\");\n }\n if (worker.destroyed) {\n throw new Error(\"Worker was destroyed\");\n }\n\n const messageHandler = new MessageHandler(docId, workerId, worker.port);\n const transport = new WorkerTransport(\n messageHandler,\n task,\n networkStream,\n transportParams,\n transportFactory\n );\n task._transport = transport;\n messageHandler.send(\"Ready\", null);\n });\n })\n .catch(task._capability.reject);\n\n return task;\n}\n\nfunction getUrlProp(val) {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n return null; // The 'url' is unused with `PDFDataRangeTransport`.\n }\n if (val instanceof URL) {\n return val.href;\n }\n try {\n // The full path is required in the 'url' field.\n return new URL(val, window.location).href;\n } catch {\n if (\n typeof PDFJSDev !== \"undefined\" &&\n PDFJSDev.test(\"GENERIC\") &&\n isNodeJS &&\n typeof val === \"string\"\n ) {\n return val; // Use the url as-is in Node.js environments.\n }\n }\n throw new Error(\n \"Invalid PDF url data: \" +\n \"either string or URL-object is expected in the url property.\"\n );\n}\n\nfunction getDataProp(val) {\n // Converting string or array-like data to Uint8Array.\n if (\n typeof PDFJSDev !== \"undefined\" &&\n PDFJSDev.test(\"GENERIC\") &&\n isNodeJS &&\n typeof Buffer !== \"undefined\" && // eslint-disable-line no-undef\n val instanceof Buffer // eslint-disable-line no-undef\n ) {\n throw new Error(\n \"Please provide binary data as `Uint8Array`, rather than `Buffer`.\"\n );\n }\n if (val instanceof Uint8Array && val.byteLength === val.buffer.byteLength) {\n // Use the data as-is when it's already a Uint8Array that completely\n // \"utilizes\" its underlying ArrayBuffer, to prevent any possible\n // issues when transferring it to the worker-thread.\n return val;\n }\n if (typeof val === \"string\") {\n return stringToBytes(val);\n }\n if (\n val instanceof ArrayBuffer ||\n ArrayBuffer.isView(val) ||\n (typeof val === \"object\" && !isNaN(val?.length))\n ) {\n return new Uint8Array(val);\n }\n throw new Error(\n \"Invalid PDF binary data: either TypedArray, \" +\n \"string, or array-like object is expected in the data property.\"\n );\n}\n\nfunction isRefProxy(ref) {\n return (\n typeof ref === \"object\" &&\n Number.isInteger(ref?.num) &&\n ref.num >= 0 &&\n Number.isInteger(ref?.gen) &&\n ref.gen >= 0\n );\n}\n\n/**\n * @typedef {Object} OnProgressParameters\n * @property {number} loaded - Currently loaded number of bytes.\n * @property {number} total - Total number of bytes in the PDF file.\n */\n\n/**\n * The loading task controls the operations required to load a PDF document\n * (such as network requests) and provides a way to listen for completion,\n * after which individual pages can be rendered.\n */\nclass PDFDocumentLoadingTask {\n static #docId = 0;\n\n constructor() {\n this._capability = Promise.withResolvers();\n this._transport = null;\n this._worker = null;\n\n /**\n * Unique identifier for the document loading task.\n * @type {string}\n */\n this.docId = `d${PDFDocumentLoadingTask.#docId++}`;\n\n /**\n * Whether the loading task is destroyed or not.\n * @type {boolean}\n */\n this.destroyed = false;\n\n /**\n * Callback to request a password if a wrong or no password was provided.\n * The callback receives two parameters: a function that should be called\n * with the new password, and a reason (see {@link PasswordResponses}).\n * @type {function}\n */\n this.onPassword = null;\n\n /**\n * Callback to be able to monitor the loading progress of the PDF file\n * (necessary to implement e.g. a loading bar).\n * The callback receives an {@link OnProgressParameters} argument.\n * @type {function}\n */\n this.onProgress = null;\n }\n\n /**\n * Promise for document loading task completion.\n * @type {Promise}\n */\n get promise() {\n return this._capability.promise;\n }\n\n /**\n * Abort all network requests and destroy the worker.\n * @returns {Promise} A promise that is resolved when destruction is\n * completed.\n */\n async destroy() {\n this.destroyed = true;\n try {\n if (this._worker?.port) {\n this._worker._pendingDestroy = true;\n }\n await this._transport?.destroy();\n } catch (ex) {\n if (this._worker?.port) {\n delete this._worker._pendingDestroy;\n }\n throw ex;\n }\n\n this._transport = null;\n if (this._worker) {\n this._worker.destroy();\n this._worker = null;\n }\n }\n}\n\n/**\n * Abstract class to support range requests file loading.\n *\n * NOTE: The TypedArrays passed to the constructor and relevant methods below\n * will generally be transferred to the worker-thread. This will help reduce\n * main-thread memory usage, however it will take ownership of the TypedArrays.\n */\nclass PDFDataRangeTransport {\n /**\n * @param {number} length\n * @param {Uint8Array|null} initialData\n * @param {boolean} [progressiveDone]\n * @param {string} [contentDispositionFilename]\n */\n constructor(\n length,\n initialData,\n progressiveDone = false,\n contentDispositionFilename = null\n ) {\n this.length = length;\n this.initialData = initialData;\n this.progressiveDone = progressiveDone;\n this.contentDispositionFilename = contentDispositionFilename;\n\n this._rangeListeners = [];\n this._progressListeners = [];\n this._progressiveReadListeners = [];\n this._progressiveDoneListeners = [];\n this._readyCapability = Promise.withResolvers();\n }\n\n /**\n * @param {function} listener\n */\n addRangeListener(listener) {\n this._rangeListeners.push(listener);\n }\n\n /**\n * @param {function} listener\n */\n addProgressListener(listener) {\n this._progressListeners.push(listener);\n }\n\n /**\n * @param {function} listener\n */\n addProgressiveReadListener(listener) {\n this._progressiveReadListeners.push(listener);\n }\n\n /**\n * @param {function} listener\n */\n addProgressiveDoneListener(listener) {\n this._progressiveDoneListeners.push(listener);\n }\n\n /**\n * @param {number} begin\n * @param {Uint8Array|null} chunk\n */\n onDataRange(begin, chunk) {\n for (const listener of this._rangeListeners) {\n listener(begin, chunk);\n }\n }\n\n /**\n * @param {number} loaded\n * @param {number|undefined} total\n */\n onDataProgress(loaded, total) {\n this._readyCapability.promise.then(() => {\n for (const listener of this._progressListeners) {\n listener(loaded, total);\n }\n });\n }\n\n /**\n * @param {Uint8Array|null} chunk\n */\n onDataProgressiveRead(chunk) {\n this._readyCapability.promise.then(() => {\n for (const listener of this._progressiveReadListeners) {\n listener(chunk);\n }\n });\n }\n\n onDataProgressiveDone() {\n this._readyCapability.promise.then(() => {\n for (const listener of this._progressiveDoneListeners) {\n listener();\n }\n });\n }\n\n transportReady() {\n this._readyCapability.resolve();\n }\n\n /**\n * @param {number} begin\n * @param {number} end\n */\n requestDataRange(begin, end) {\n unreachable(\"Abstract method PDFDataRangeTransport.requestDataRange\");\n }\n\n abort() {}\n}\n\n/**\n * Proxy to a `PDFDocument` in the worker thread.\n */\nclass PDFDocumentProxy {\n constructor(pdfInfo, transport) {\n this._pdfInfo = pdfInfo;\n this._transport = transport;\n\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n // For testing purposes.\n Object.defineProperty(this, \"getNetworkStreamName\", {\n value: () => this._transport.getNetworkStreamName(),\n });\n Object.defineProperty(this, \"getXFADatasets\", {\n value: () => this._transport.getXFADatasets(),\n });\n Object.defineProperty(this, \"getXRefPrevValue\", {\n value: () => this._transport.getXRefPrevValue(),\n });\n Object.defineProperty(this, \"getStartXRefPos\", {\n value: () => this._transport.getStartXRefPos(),\n });\n Object.defineProperty(this, \"getAnnotArray\", {\n value: pageIndex => this._transport.getAnnotArray(pageIndex),\n });\n }\n }\n\n /**\n * @type {AnnotationStorage} Storage for annotation data in forms.\n */\n get annotationStorage() {\n return this._transport.annotationStorage;\n }\n\n /**\n * @type {Object} The filter factory instance.\n */\n get filterFactory() {\n return this._transport.filterFactory;\n }\n\n /**\n * @type {number} Total number of pages in the PDF file.\n */\n get numPages() {\n return this._pdfInfo.numPages;\n }\n\n /**\n * @type {Array} A (not guaranteed to be) unique ID to\n * identify the PDF document.\n * NOTE: The first element will always be defined for all PDF documents,\n * whereas the second element is only defined for *modified* PDF documents.\n */\n get fingerprints() {\n return this._pdfInfo.fingerprints;\n }\n\n /**\n * @type {boolean} True if only XFA form.\n */\n get isPureXfa() {\n return shadow(this, \"isPureXfa\", !!this._transport._htmlForXfa);\n }\n\n /**\n * NOTE: This is (mostly) intended to support printing of XFA forms.\n *\n * @type {Object | null} An object representing a HTML tree structure\n * to render the XFA, or `null` when no XFA form exists.\n */\n get allXfaHtml() {\n return this._transport._htmlForXfa;\n }\n\n /**\n * @param {number} pageNumber - The page number to get. The first page is 1.\n * @returns {Promise} A promise that is resolved with\n * a {@link PDFPageProxy} object.\n */\n getPage(pageNumber) {\n return this._transport.getPage(pageNumber);\n }\n\n /**\n * @param {RefProxy} ref - The page reference.\n * @returns {Promise} A promise that is resolved with the page index,\n * starting from zero, that is associated with the reference.\n */\n getPageIndex(ref) {\n return this._transport.getPageIndex(ref);\n }\n\n /**\n * @returns {Promise>>} A promise that is resolved\n * with a mapping from named destinations to references.\n *\n * This can be slow for large documents. Use `getDestination` instead.\n */\n getDestinations() {\n return this._transport.getDestinations();\n }\n\n /**\n * @param {string} id - The named destination to get.\n * @returns {Promise | null>} A promise that is resolved with all\n * information of the given named destination, or `null` when the named\n * destination is not present in the PDF file.\n */\n getDestination(id) {\n return this._transport.getDestination(id);\n }\n\n /**\n * @returns {Promise | null>} A promise that is resolved with\n * an {Array} containing the page labels that correspond to the page\n * indexes, or `null` when no page labels are present in the PDF file.\n */\n getPageLabels() {\n return this._transport.getPageLabels();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with a {string}\n * containing the page layout name.\n */\n getPageLayout() {\n return this._transport.getPageLayout();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with a {string}\n * containing the page mode name.\n */\n getPageMode() {\n return this._transport.getPageMode();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with an\n * {Object} containing the viewer preferences, or `null` when no viewer\n * preferences are present in the PDF file.\n */\n getViewerPreferences() {\n return this._transport.getViewerPreferences();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with an {Array}\n * containing the destination, or `null` when no open action is present\n * in the PDF.\n */\n getOpenAction() {\n return this._transport.getOpenAction();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with a lookup table\n * for mapping named attachments to their content.\n */\n getAttachments() {\n return this._transport.getAttachments();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with\n * an {Object} with the JavaScript actions:\n * - from the name tree.\n * - from A or AA entries in the catalog dictionary.\n * , or `null` if no JavaScript exists.\n */\n getJSActions() {\n return this._transport.getDocJSActions();\n }\n\n /**\n * @typedef {Object} OutlineNode\n * @property {string} title\n * @property {boolean} bold\n * @property {boolean} italic\n * @property {Uint8ClampedArray} color - The color in RGB format to use for\n * display purposes.\n * @property {string | Array | null} dest\n * @property {string | null} url\n * @property {string | undefined} unsafeUrl\n * @property {boolean | undefined} newWindow\n * @property {number | undefined} count\n * @property {Array} items\n */\n\n /**\n * @returns {Promise>} A promise that is resolved with an\n * {Array} that is a tree outline (if it has one) of the PDF file.\n */\n getOutline() {\n return this._transport.getOutline();\n }\n\n /**\n * @typedef {Object} GetOptionalContentConfigParameters\n * @property {string} [intent] - Determines the optional content groups that\n * are visible by default; valid values are:\n * - 'display' (viewable groups).\n * - 'print' (printable groups).\n * - 'any' (all groups).\n * The default value is 'display'.\n */\n\n /**\n * @param {GetOptionalContentConfigParameters} [params] - Optional content\n * config parameters.\n * @returns {Promise} A promise that is resolved with\n * an {@link OptionalContentConfig} that contains all the optional content\n * groups (assuming that the document has any).\n */\n getOptionalContentConfig({ intent = \"display\" } = {}) {\n const { renderingIntent } = this._transport.getRenderingIntent(intent);\n\n return this._transport.getOptionalContentConfig(renderingIntent);\n }\n\n /**\n * @returns {Promise | null>} A promise that is resolved with\n * an {Array} that contains the permission flags for the PDF document, or\n * `null` when no permissions are present in the PDF file.\n */\n getPermissions() {\n return this._transport.getPermissions();\n }\n\n /**\n * @returns {Promise<{ info: Object, metadata: Metadata }>} A promise that is\n * resolved with an {Object} that has `info` and `metadata` properties.\n * `info` is an {Object} filled with anything available in the information\n * dictionary and similarly `metadata` is a {Metadata} object with\n * information from the metadata section of the PDF.\n */\n getMetadata() {\n return this._transport.getMetadata();\n }\n\n /**\n * @typedef {Object} MarkInfo\n * Properties correspond to Table 321 of the PDF 32000-1:2008 spec.\n * @property {boolean} Marked\n * @property {boolean} UserProperties\n * @property {boolean} Suspects\n */\n\n /**\n * @returns {Promise} A promise that is resolved with\n * a {MarkInfo} object that contains the MarkInfo flags for the PDF\n * document, or `null` when no MarkInfo values are present in the PDF file.\n */\n getMarkInfo() {\n return this._transport.getMarkInfo();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with a\n * {Uint8Array} containing the raw data of the PDF document.\n */\n getData() {\n return this._transport.getData();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with a\n * {Uint8Array} containing the full data of the saved document.\n */\n saveDocument() {\n return this._transport.saveDocument();\n }\n\n /**\n * @returns {Promise<{ length: number }>} A promise that is resolved when the\n * document's data is loaded. It is resolved with an {Object} that contains\n * the `length` property that indicates size of the PDF data in bytes.\n */\n getDownloadInfo() {\n return this._transport.downloadInfoCapability.promise;\n }\n\n /**\n * Cleans up resources allocated by the document on both the main and worker\n * threads.\n *\n * NOTE: Do not, under any circumstances, call this method when rendering is\n * currently ongoing since that may lead to rendering errors.\n *\n * @param {boolean} [keepLoadedFonts] - Let fonts remain attached to the DOM.\n * NOTE: This will increase persistent memory usage, hence don't use this\n * option unless absolutely necessary. The default value is `false`.\n * @returns {Promise} A promise that is resolved when clean-up has finished.\n */\n cleanup(keepLoadedFonts = false) {\n return this._transport.startCleanup(keepLoadedFonts || this.isPureXfa);\n }\n\n /**\n * Destroys the current document instance and terminates the worker.\n */\n destroy() {\n return this.loadingTask.destroy();\n }\n\n /**\n * @param {RefProxy} ref - The page reference.\n * @returns {number | null} The page number, if it's cached.\n */\n cachedPageNumber(ref) {\n return this._transport.cachedPageNumber(ref);\n }\n\n /**\n * @type {DocumentInitParameters} A subset of the current\n * {DocumentInitParameters}, which are needed in the viewer.\n */\n get loadingParams() {\n return this._transport.loadingParams;\n }\n\n /**\n * @type {PDFDocumentLoadingTask} The loadingTask for the current document.\n */\n get loadingTask() {\n return this._transport.loadingTask;\n }\n\n /**\n * @returns {Promise> | null>} A promise that is\n * resolved with an {Object} containing /AcroForm field data for the JS\n * sandbox, or `null` when no field data is present in the PDF file.\n */\n getFieldObjects() {\n return this._transport.getFieldObjects();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with `true`\n * if some /AcroForm fields have JavaScript actions.\n */\n hasJSActions() {\n return this._transport.hasJSActions();\n }\n\n /**\n * @returns {Promise | null>} A promise that is resolved with an\n * {Array} containing IDs of annotations that have a calculation\n * action, or `null` when no such annotations are present in the PDF file.\n */\n getCalculationOrderIds() {\n return this._transport.getCalculationOrderIds();\n }\n}\n\n/**\n * Page getViewport parameters.\n *\n * @typedef {Object} GetViewportParameters\n * @property {number} scale - The desired scale of the viewport.\n * @property {number} [rotation] - The desired rotation, in degrees, of\n * the viewport. If omitted it defaults to the page rotation.\n * @property {number} [offsetX] - The horizontal, i.e. x-axis, offset.\n * The default value is `0`.\n * @property {number} [offsetY] - The vertical, i.e. y-axis, offset.\n * The default value is `0`.\n * @property {boolean} [dontFlip] - If true, the y-axis will not be\n * flipped. The default value is `false`.\n */\n\n/**\n * Page getTextContent parameters.\n *\n * @typedef {Object} getTextContentParameters\n * @property {boolean} [includeMarkedContent] - When true include marked\n * content items in the items array of TextContent. The default is `false`.\n * @property {boolean} [disableNormalization] - When true the text is *not*\n * normalized in the worker-thread. The default is `false`.\n */\n\n/**\n * Page text content.\n *\n * @typedef {Object} TextContent\n * @property {Array} items - Array of\n * {@link TextItem} and {@link TextMarkedContent} objects. TextMarkedContent\n * items are included when includeMarkedContent is true.\n * @property {Object} styles - {@link TextStyle} objects,\n * indexed by font name.\n * @property {string | null} lang - The document /Lang attribute.\n */\n\n/**\n * Page text content part.\n *\n * @typedef {Object} TextItem\n * @property {string} str - Text content.\n * @property {string} dir - Text direction: 'ttb', 'ltr' or 'rtl'.\n * @property {Array} transform - Transformation matrix.\n * @property {number} width - Width in device space.\n * @property {number} height - Height in device space.\n * @property {string} fontName - Font name used by PDF.js for converted font.\n * @property {boolean} hasEOL - Indicating if the text content is followed by a\n * line-break.\n */\n\n/**\n * Page text marked content part.\n *\n * @typedef {Object} TextMarkedContent\n * @property {string} type - Either 'beginMarkedContent',\n * 'beginMarkedContentProps', or 'endMarkedContent'.\n * @property {string} id - The marked content identifier. Only used for type\n * 'beginMarkedContentProps'.\n */\n\n/**\n * Text style.\n *\n * @typedef {Object} TextStyle\n * @property {number} ascent - Font ascent.\n * @property {number} descent - Font descent.\n * @property {boolean} vertical - Whether or not the text is in vertical mode.\n * @property {string} fontFamily - The possible font family.\n */\n\n/**\n * Page annotation parameters.\n *\n * @typedef {Object} GetAnnotationsParameters\n * @property {string} [intent] - Determines the annotations that are fetched,\n * can be 'display' (viewable annotations), 'print' (printable annotations),\n * or 'any' (all annotations). The default value is 'display'.\n */\n\n/**\n * Page render parameters.\n *\n * @typedef {Object} RenderParameters\n * @property {CanvasRenderingContext2D} canvasContext - A 2D context of a DOM\n * Canvas object.\n * @property {PageViewport} viewport - Rendering viewport obtained by calling\n * the `PDFPageProxy.getViewport` method.\n * @property {string} [intent] - Rendering intent, can be 'display', 'print',\n * or 'any'. The default value is 'display'.\n * @property {number} [annotationMode] Controls which annotations are rendered\n * onto the canvas, for annotations with appearance-data; the values from\n * {@link AnnotationMode} should be used. The following values are supported:\n * - `AnnotationMode.DISABLE`, which disables all annotations.\n * - `AnnotationMode.ENABLE`, which includes all possible annotations (thus\n * it also depends on the `intent`-option, see above).\n * - `AnnotationMode.ENABLE_FORMS`, which excludes annotations that contain\n * interactive form elements (those will be rendered in the display layer).\n * - `AnnotationMode.ENABLE_STORAGE`, which includes all possible annotations\n * (as above) but where interactive form elements are updated with data\n * from the {@link AnnotationStorage}-instance; useful e.g. for printing.\n * The default value is `AnnotationMode.ENABLE`.\n * @property {Array} [transform] - Additional transform, applied just\n * before viewport transform.\n * @property {CanvasGradient | CanvasPattern | string} [background] - Background\n * to use for the canvas.\n * Any valid `canvas.fillStyle` can be used: a `DOMString` parsed as CSS\n * value, a `CanvasGradient` object (a linear or radial gradient) or\n * a `CanvasPattern` object (a repetitive image). The default value is\n * 'rgb(255,255,255)'.\n *\n * NOTE: This option may be partially, or completely, ignored when the\n * `pageColors`-option is used.\n * @property {Object} [pageColors] - Overwrites background and foreground colors\n * with user defined ones in order to improve readability in high contrast\n * mode.\n * @property {Promise} [optionalContentConfigPromise] -\n * A promise that should resolve with an {@link OptionalContentConfig}\n * created from `PDFDocumentProxy.getOptionalContentConfig`. If `null`,\n * the configuration will be fetched automatically with the default visibility\n * states set.\n * @property {Map} [annotationCanvasMap] - Map some\n * annotation ids with canvases used to render them.\n * @property {PrintAnnotationStorage} [printAnnotationStorage]\n */\n\n/**\n * Page getOperatorList parameters.\n *\n * @typedef {Object} GetOperatorListParameters\n * @property {string} [intent] - Rendering intent, can be 'display', 'print',\n * or 'any'. The default value is 'display'.\n * @property {number} [annotationMode] Controls which annotations are included\n * in the operatorList, for annotations with appearance-data; the values from\n * {@link AnnotationMode} should be used. The following values are supported:\n * - `AnnotationMode.DISABLE`, which disables all annotations.\n * - `AnnotationMode.ENABLE`, which includes all possible annotations (thus\n * it also depends on the `intent`-option, see above).\n * - `AnnotationMode.ENABLE_FORMS`, which excludes annotations that contain\n * interactive form elements (those will be rendered in the display layer).\n * - `AnnotationMode.ENABLE_STORAGE`, which includes all possible annotations\n * (as above) but where interactive form elements are updated with data\n * from the {@link AnnotationStorage}-instance; useful e.g. for printing.\n * The default value is `AnnotationMode.ENABLE`.\n * @property {PrintAnnotationStorage} [printAnnotationStorage]\n */\n\n/**\n * Structure tree node. The root node will have a role \"Root\".\n *\n * @typedef {Object} StructTreeNode\n * @property {Array} children - Array of\n * {@link StructTreeNode} and {@link StructTreeContent} objects.\n * @property {string} role - element's role, already mapped if a role map exists\n * in the PDF.\n */\n\n/**\n * Structure tree content.\n *\n * @typedef {Object} StructTreeContent\n * @property {string} type - either \"content\" for page and stream structure\n * elements or \"object\" for object references.\n * @property {string} id - unique id that will map to the text layer.\n */\n\n/**\n * PDF page operator list.\n *\n * @typedef {Object} PDFOperatorList\n * @property {Array} fnArray - Array containing the operator functions.\n * @property {Array} argsArray - Array containing the arguments of the\n * functions.\n */\n\n/**\n * Proxy to a `PDFPage` in the worker thread.\n */\nclass PDFPageProxy {\n #delayedCleanupTimeout = null;\n\n #pendingCleanup = false;\n\n constructor(pageIndex, pageInfo, transport, pdfBug = false) {\n this._pageIndex = pageIndex;\n this._pageInfo = pageInfo;\n this._transport = transport;\n this._stats = pdfBug ? new StatTimer() : null;\n this._pdfBug = pdfBug;\n /** @type {PDFObjects} */\n this.commonObjs = transport.commonObjs;\n this.objs = new PDFObjects();\n\n this._maybeCleanupAfterRender = false;\n this._intentStates = new Map();\n this.destroyed = false;\n }\n\n /**\n * @type {number} Page number of the page. First page is 1.\n */\n get pageNumber() {\n return this._pageIndex + 1;\n }\n\n /**\n * @type {number} The number of degrees the page is rotated clockwise.\n */\n get rotate() {\n return this._pageInfo.rotate;\n }\n\n /**\n * @type {RefProxy | null} The reference that points to this page.\n */\n get ref() {\n return this._pageInfo.ref;\n }\n\n /**\n * @type {number} The default size of units in 1/72nds of an inch.\n */\n get userUnit() {\n return this._pageInfo.userUnit;\n }\n\n /**\n * @type {Array} An array of the visible portion of the PDF page in\n * user space units [x1, y1, x2, y2].\n */\n get view() {\n return this._pageInfo.view;\n }\n\n /**\n * @param {GetViewportParameters} params - Viewport parameters.\n * @returns {PageViewport} Contains 'width' and 'height' properties\n * along with transforms required for rendering.\n */\n getViewport({\n scale,\n rotation = this.rotate,\n offsetX = 0,\n offsetY = 0,\n dontFlip = false,\n } = {}) {\n return new PageViewport({\n viewBox: this.view,\n scale,\n rotation,\n offsetX,\n offsetY,\n dontFlip,\n });\n }\n\n /**\n * @param {GetAnnotationsParameters} [params] - Annotation parameters.\n * @returns {Promise>} A promise that is resolved with an\n * {Array} of the annotation objects.\n */\n getAnnotations({ intent = \"display\" } = {}) {\n const { renderingIntent } = this._transport.getRenderingIntent(intent);\n\n return this._transport.getAnnotations(this._pageIndex, renderingIntent);\n }\n\n /**\n * @returns {Promise} A promise that is resolved with an\n * {Object} with JS actions.\n */\n getJSActions() {\n return this._transport.getPageJSActions(this._pageIndex);\n }\n\n /**\n * @type {Object} The filter factory instance.\n */\n get filterFactory() {\n return this._transport.filterFactory;\n }\n\n /**\n * @type {boolean} True if only XFA form.\n */\n get isPureXfa() {\n return shadow(this, \"isPureXfa\", !!this._transport._htmlForXfa);\n }\n\n /**\n * @returns {Promise} A promise that is resolved with\n * an {Object} with a fake DOM object (a tree structure where elements\n * are {Object} with a name, attributes (class, style, ...), value and\n * children, very similar to a HTML DOM tree), or `null` if no XFA exists.\n */\n async getXfa() {\n return this._transport._htmlForXfa?.children[this._pageIndex] || null;\n }\n\n /**\n * Begins the process of rendering a page to the desired context.\n *\n * @param {RenderParameters} params - Page render parameters.\n * @returns {RenderTask} An object that contains a promise that is\n * resolved when the page finishes rendering.\n */\n render({\n canvasContext,\n viewport,\n intent = \"display\",\n annotationMode = AnnotationMode.ENABLE,\n transform = null,\n background = null,\n optionalContentConfigPromise = null,\n annotationCanvasMap = null,\n pageColors = null,\n printAnnotationStorage = null,\n }) {\n this._stats?.time(\"Overall\");\n\n const intentArgs = this._transport.getRenderingIntent(\n intent,\n annotationMode,\n printAnnotationStorage\n );\n const { renderingIntent, cacheKey } = intentArgs;\n // If there was a pending destroy, cancel it so no cleanup happens during\n // this call to render...\n this.#pendingCleanup = false;\n // ... and ensure that a delayed cleanup is always aborted.\n this.#abortDelayedCleanup();\n\n optionalContentConfigPromise ||=\n this._transport.getOptionalContentConfig(renderingIntent);\n\n let intentState = this._intentStates.get(cacheKey);\n if (!intentState) {\n intentState = Object.create(null);\n this._intentStates.set(cacheKey, intentState);\n }\n\n // Ensure that a pending `streamReader` cancel timeout is always aborted.\n if (intentState.streamReaderCancelTimeout) {\n clearTimeout(intentState.streamReaderCancelTimeout);\n intentState.streamReaderCancelTimeout = null;\n }\n\n const intentPrint = !!(renderingIntent & RenderingIntentFlag.PRINT);\n\n // If there's no displayReadyCapability yet, then the operatorList\n // was never requested before. Make the request and create the promise.\n if (!intentState.displayReadyCapability) {\n intentState.displayReadyCapability = Promise.withResolvers();\n intentState.operatorList = {\n fnArray: [],\n argsArray: [],\n lastChunk: false,\n separateAnnots: null,\n };\n\n this._stats?.time(\"Page Request\");\n this._pumpOperatorList(intentArgs);\n }\n\n const complete = error => {\n intentState.renderTasks.delete(internalRenderTask);\n\n // Attempt to reduce memory usage during *printing*, by always running\n // cleanup immediately once rendering has finished.\n if (this._maybeCleanupAfterRender || intentPrint) {\n this.#pendingCleanup = true;\n }\n this.#tryCleanup(/* delayed = */ !intentPrint);\n\n if (error) {\n internalRenderTask.capability.reject(error);\n\n this._abortOperatorList({\n intentState,\n reason: error instanceof Error ? error : new Error(error),\n });\n } else {\n internalRenderTask.capability.resolve();\n }\n\n if (this._stats) {\n this._stats.timeEnd(\"Rendering\");\n this._stats.timeEnd(\"Overall\");\n\n if (globalThis.Stats?.enabled) {\n globalThis.Stats.add(this.pageNumber, this._stats);\n }\n }\n };\n\n const internalRenderTask = new InternalRenderTask({\n callback: complete,\n // Only include the required properties, and *not* the entire object.\n params: {\n canvasContext,\n viewport,\n transform,\n background,\n },\n objs: this.objs,\n commonObjs: this.commonObjs,\n annotationCanvasMap,\n operatorList: intentState.operatorList,\n pageIndex: this._pageIndex,\n canvasFactory: this._transport.canvasFactory,\n filterFactory: this._transport.filterFactory,\n useRequestAnimationFrame: !intentPrint,\n pdfBug: this._pdfBug,\n pageColors,\n });\n\n (intentState.renderTasks ||= new Set()).add(internalRenderTask);\n const renderTask = internalRenderTask.task;\n\n Promise.all([\n intentState.displayReadyCapability.promise,\n optionalContentConfigPromise,\n ])\n .then(([transparency, optionalContentConfig]) => {\n if (this.destroyed) {\n complete();\n return;\n }\n this._stats?.time(\"Rendering\");\n\n if (!(optionalContentConfig.renderingIntent & renderingIntent)) {\n throw new Error(\n \"Must use the same `intent`-argument when calling the `PDFPageProxy.render` \" +\n \"and `PDFDocumentProxy.getOptionalContentConfig` methods.\"\n );\n }\n internalRenderTask.initializeGraphics({\n transparency,\n optionalContentConfig,\n });\n internalRenderTask.operatorListChanged();\n })\n .catch(complete);\n\n return renderTask;\n }\n\n /**\n * @param {GetOperatorListParameters} params - Page getOperatorList\n * parameters.\n * @returns {Promise} A promise resolved with an\n * {@link PDFOperatorList} object that represents the page's operator list.\n */\n getOperatorList({\n intent = \"display\",\n annotationMode = AnnotationMode.ENABLE,\n printAnnotationStorage = null,\n } = {}) {\n if (typeof PDFJSDev !== \"undefined\" && !PDFJSDev.test(\"GENERIC\")) {\n throw new Error(\"Not implemented: getOperatorList\");\n }\n function operatorListChanged() {\n if (intentState.operatorList.lastChunk) {\n intentState.opListReadCapability.resolve(intentState.operatorList);\n\n intentState.renderTasks.delete(opListTask);\n }\n }\n\n const intentArgs = this._transport.getRenderingIntent(\n intent,\n annotationMode,\n printAnnotationStorage,\n /* isOpList = */ true\n );\n let intentState = this._intentStates.get(intentArgs.cacheKey);\n if (!intentState) {\n intentState = Object.create(null);\n this._intentStates.set(intentArgs.cacheKey, intentState);\n }\n let opListTask;\n\n if (!intentState.opListReadCapability) {\n opListTask = Object.create(null);\n opListTask.operatorListChanged = operatorListChanged;\n intentState.opListReadCapability = Promise.withResolvers();\n (intentState.renderTasks ||= new Set()).add(opListTask);\n intentState.operatorList = {\n fnArray: [],\n argsArray: [],\n lastChunk: false,\n separateAnnots: null,\n };\n\n this._stats?.time(\"Page Request\");\n this._pumpOperatorList(intentArgs);\n }\n return intentState.opListReadCapability.promise;\n }\n\n /**\n * NOTE: All occurrences of whitespace will be replaced by\n * standard spaces (0x20).\n *\n * @param {getTextContentParameters} params - getTextContent parameters.\n * @returns {ReadableStream} Stream for reading text content chunks.\n */\n streamTextContent({\n includeMarkedContent = false,\n disableNormalization = false,\n } = {}) {\n const TEXT_CONTENT_CHUNK_SIZE = 100;\n\n return this._transport.messageHandler.sendWithStream(\n \"GetTextContent\",\n {\n pageIndex: this._pageIndex,\n includeMarkedContent: includeMarkedContent === true,\n disableNormalization: disableNormalization === true,\n },\n {\n highWaterMark: TEXT_CONTENT_CHUNK_SIZE,\n size(textContent) {\n return textContent.items.length;\n },\n }\n );\n }\n\n /**\n * NOTE: All occurrences of whitespace will be replaced by\n * standard spaces (0x20).\n *\n * @param {getTextContentParameters} params - getTextContent parameters.\n * @returns {Promise} A promise that is resolved with a\n * {@link TextContent} object that represents the page's text content.\n */\n getTextContent(params = {}) {\n if (this._transport._htmlForXfa) {\n // TODO: We need to revisit this once the XFA foreground patch lands and\n // only do this for non-foreground XFA.\n return this.getXfa().then(xfa => XfaText.textContent(xfa));\n }\n const readableStream = this.streamTextContent(params);\n\n return new Promise(function (resolve, reject) {\n function pump() {\n reader.read().then(function ({ value, done }) {\n if (done) {\n resolve(textContent);\n return;\n }\n textContent.lang ??= value.lang;\n Object.assign(textContent.styles, value.styles);\n textContent.items.push(...value.items);\n pump();\n }, reject);\n }\n\n const reader = readableStream.getReader();\n const textContent = {\n items: [],\n styles: Object.create(null),\n lang: null,\n };\n pump();\n });\n }\n\n /**\n * @returns {Promise} A promise that is resolved with a\n * {@link StructTreeNode} object that represents the page's structure tree,\n * or `null` when no structure tree is present for the current page.\n */\n getStructTree() {\n return this._transport.getStructTree(this._pageIndex);\n }\n\n /**\n * Destroys the page object.\n * @private\n */\n _destroy() {\n this.destroyed = true;\n\n const waitOn = [];\n for (const intentState of this._intentStates.values()) {\n this._abortOperatorList({\n intentState,\n reason: new Error(\"Page was destroyed.\"),\n force: true,\n });\n\n if (intentState.opListReadCapability) {\n // Avoid errors below, since the renderTasks are just stubs.\n continue;\n }\n for (const internalRenderTask of intentState.renderTasks) {\n waitOn.push(internalRenderTask.completed);\n internalRenderTask.cancel();\n }\n }\n this.objs.clear();\n this.#pendingCleanup = false;\n this.#abortDelayedCleanup();\n\n return Promise.all(waitOn);\n }\n\n /**\n * Cleans up resources allocated by the page.\n *\n * @param {boolean} [resetStats] - Reset page stats, if enabled.\n * The default value is `false`.\n * @returns {boolean} Indicates if clean-up was successfully run.\n */\n cleanup(resetStats = false) {\n this.#pendingCleanup = true;\n const success = this.#tryCleanup(/* delayed = */ false);\n\n if (resetStats && success) {\n this._stats &&= new StatTimer();\n }\n return success;\n }\n\n /**\n * Attempts to clean up if rendering is in a state where that's possible.\n * @param {boolean} [delayed] - Delay the cleanup, to e.g. improve zooming\n * performance in documents with large images.\n * The default value is `false`.\n * @returns {boolean} Indicates if clean-up was successfully run.\n */\n #tryCleanup(delayed = false) {\n this.#abortDelayedCleanup();\n\n if (!this.#pendingCleanup || this.destroyed) {\n return false;\n }\n if (delayed) {\n this.#delayedCleanupTimeout = setTimeout(() => {\n this.#delayedCleanupTimeout = null;\n this.#tryCleanup(/* delayed = */ false);\n }, DELAYED_CLEANUP_TIMEOUT);\n\n return false;\n }\n for (const { renderTasks, operatorList } of this._intentStates.values()) {\n if (renderTasks.size > 0 || !operatorList.lastChunk) {\n return false;\n }\n }\n this._intentStates.clear();\n this.objs.clear();\n this.#pendingCleanup = false;\n return true;\n }\n\n #abortDelayedCleanup() {\n if (this.#delayedCleanupTimeout) {\n clearTimeout(this.#delayedCleanupTimeout);\n this.#delayedCleanupTimeout = null;\n }\n }\n\n /**\n * @private\n */\n _startRenderPage(transparency, cacheKey) {\n const intentState = this._intentStates.get(cacheKey);\n if (!intentState) {\n return; // Rendering was cancelled.\n }\n this._stats?.timeEnd(\"Page Request\");\n\n // TODO Refactor RenderPageRequest to separate rendering\n // and operator list logic\n intentState.displayReadyCapability?.resolve(transparency);\n }\n\n /**\n * @private\n */\n _renderPageChunk(operatorListChunk, intentState) {\n // Add the new chunk to the current operator list.\n for (let i = 0, ii = operatorListChunk.length; i < ii; i++) {\n intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i]);\n intentState.operatorList.argsArray.push(operatorListChunk.argsArray[i]);\n }\n intentState.operatorList.lastChunk = operatorListChunk.lastChunk;\n intentState.operatorList.separateAnnots = operatorListChunk.separateAnnots;\n\n // Notify all the rendering tasks there are more operators to be consumed.\n for (const internalRenderTask of intentState.renderTasks) {\n internalRenderTask.operatorListChanged();\n }\n\n if (operatorListChunk.lastChunk) {\n this.#tryCleanup(/* delayed = */ true);\n }\n }\n\n /**\n * @private\n */\n _pumpOperatorList({\n renderingIntent,\n cacheKey,\n annotationStorageSerializable,\n }) {\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n assert(\n Number.isInteger(renderingIntent) && renderingIntent > 0,\n '_pumpOperatorList: Expected valid \"renderingIntent\" argument.'\n );\n }\n const { map, transfer } = annotationStorageSerializable;\n\n const readableStream = this._transport.messageHandler.sendWithStream(\n \"GetOperatorList\",\n {\n pageIndex: this._pageIndex,\n intent: renderingIntent,\n cacheKey,\n annotationStorage: map,\n },\n transfer\n );\n const reader = readableStream.getReader();\n\n const intentState = this._intentStates.get(cacheKey);\n intentState.streamReader = reader;\n\n const pump = () => {\n reader.read().then(\n ({ value, done }) => {\n if (done) {\n intentState.streamReader = null;\n return;\n }\n if (this._transport.destroyed) {\n return; // Ignore any pending requests if the worker was terminated.\n }\n this._renderPageChunk(value, intentState);\n pump();\n },\n reason => {\n intentState.streamReader = null;\n\n if (this._transport.destroyed) {\n return; // Ignore any pending requests if the worker was terminated.\n }\n if (intentState.operatorList) {\n // Mark operator list as complete.\n intentState.operatorList.lastChunk = true;\n\n for (const internalRenderTask of intentState.renderTasks) {\n internalRenderTask.operatorListChanged();\n }\n this.#tryCleanup(/* delayed = */ true);\n }\n\n if (intentState.displayReadyCapability) {\n intentState.displayReadyCapability.reject(reason);\n } else if (intentState.opListReadCapability) {\n intentState.opListReadCapability.reject(reason);\n } else {\n throw reason;\n }\n }\n );\n };\n pump();\n }\n\n /**\n * @private\n */\n _abortOperatorList({ intentState, reason, force = false }) {\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n assert(\n reason instanceof Error,\n '_abortOperatorList: Expected valid \"reason\" argument.'\n );\n }\n\n if (!intentState.streamReader) {\n return;\n }\n // Ensure that a pending `streamReader` cancel timeout is always aborted.\n if (intentState.streamReaderCancelTimeout) {\n clearTimeout(intentState.streamReaderCancelTimeout);\n intentState.streamReaderCancelTimeout = null;\n }\n\n if (!force) {\n // Ensure that an Error occurring in *only* one `InternalRenderTask`, e.g.\n // multiple render() calls on the same canvas, won't break all rendering.\n if (intentState.renderTasks.size > 0) {\n return;\n }\n // Don't immediately abort parsing on the worker-thread when rendering is\n // cancelled, since that will unnecessarily delay re-rendering when (for\n // partially parsed pages) e.g. zooming/rotation occurs in the viewer.\n if (reason instanceof RenderingCancelledException) {\n let delay = RENDERING_CANCELLED_TIMEOUT;\n if (reason.extraDelay > 0 && reason.extraDelay < /* ms = */ 1000) {\n // Above, we prevent the total delay from becoming arbitrarily large.\n delay += reason.extraDelay;\n }\n\n intentState.streamReaderCancelTimeout = setTimeout(() => {\n intentState.streamReaderCancelTimeout = null;\n this._abortOperatorList({ intentState, reason, force: true });\n }, delay);\n return;\n }\n }\n intentState.streamReader\n .cancel(new AbortException(reason.message))\n .catch(() => {\n // Avoid \"Uncaught promise\" messages in the console.\n });\n intentState.streamReader = null;\n\n if (this._transport.destroyed) {\n return; // Ignore any pending requests if the worker was terminated.\n }\n // Remove the current `intentState`, since a cancelled `getOperatorList`\n // call on the worker-thread cannot be re-started...\n for (const [curCacheKey, curIntentState] of this._intentStates) {\n if (curIntentState === intentState) {\n this._intentStates.delete(curCacheKey);\n break;\n }\n }\n // ... and force clean-up to ensure that any old state is always removed.\n this.cleanup();\n }\n\n /**\n * @type {StatTimer | null} Returns page stats, if enabled; returns `null`\n * otherwise.\n */\n get stats() {\n return this._stats;\n }\n}\n\nclass LoopbackPort {\n #listeners = new Set();\n\n #deferred = Promise.resolve();\n\n postMessage(obj, transfer) {\n const event = {\n data: structuredClone(obj, transfer ? { transfer } : null),\n };\n\n this.#deferred.then(() => {\n for (const listener of this.#listeners) {\n listener.call(this, event);\n }\n });\n }\n\n addEventListener(name, listener) {\n this.#listeners.add(listener);\n }\n\n removeEventListener(name, listener) {\n this.#listeners.delete(listener);\n }\n\n terminate() {\n this.#listeners.clear();\n }\n}\n\n/**\n * @typedef {Object} PDFWorkerParameters\n * @property {string} [name] - The name of the worker.\n * @property {Worker} [port] - The `workerPort` object.\n * @property {number} [verbosity] - Controls the logging level;\n * the constants from {@link VerbosityLevel} should be used.\n */\n\nconst PDFWorkerUtil = {\n isWorkerDisabled: false,\n fakeWorkerId: 0,\n};\nif (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n if (isNodeJS) {\n // Workers aren't supported in Node.js, force-disabling them there.\n PDFWorkerUtil.isWorkerDisabled = true;\n\n GlobalWorkerOptions.workerSrc ||= PDFJSDev.test(\"LIB\")\n ? \"../pdf.worker.js\"\n : \"./pdf.worker.mjs\";\n }\n\n // Check if URLs have the same origin. For non-HTTP based URLs, returns false.\n PDFWorkerUtil.isSameOrigin = function (baseUrl, otherUrl) {\n let base;\n try {\n base = new URL(baseUrl);\n if (!base.origin || base.origin === \"null\") {\n return false; // non-HTTP url\n }\n } catch {\n return false;\n }\n\n const other = new URL(otherUrl, base);\n return base.origin === other.origin;\n };\n\n PDFWorkerUtil.createCDNWrapper = function (url) {\n // We will rely on blob URL's property to specify origin.\n // We want this function to fail in case if createObjectURL or Blob do not\n // exist or fail for some reason -- our Worker creation will fail anyway.\n const wrapper = `await import(\"${url}\");`;\n return URL.createObjectURL(\n new Blob([wrapper], { type: \"text/javascript\" })\n );\n };\n}\n\n/**\n * PDF.js web worker abstraction that controls the instantiation of PDF\n * documents. Message handlers are used to pass information from the main\n * thread to the worker thread and vice versa. If the creation of a web\n * worker is not possible, a \"fake\" worker will be used instead.\n *\n * @param {PDFWorkerParameters} params - The worker initialization parameters.\n */\nclass PDFWorker {\n static #workerPorts;\n\n constructor({\n name = null,\n port = null,\n verbosity = getVerbosityLevel(),\n } = {}) {\n this.name = name;\n this.destroyed = false;\n this.verbosity = verbosity;\n\n this._readyCapability = Promise.withResolvers();\n this._port = null;\n this._webWorker = null;\n this._messageHandler = null;\n\n if (\n (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"MOZCENTRAL\")) &&\n port\n ) {\n if (PDFWorker.#workerPorts?.has(port)) {\n throw new Error(\"Cannot use more than one PDFWorker per port.\");\n }\n (PDFWorker.#workerPorts ||= new WeakMap()).set(port, this);\n this._initializeFromPort(port);\n return;\n }\n this._initialize();\n }\n\n /**\n * Promise for worker initialization completion.\n * @type {Promise}\n */\n get promise() {\n if (\n typeof PDFJSDev !== \"undefined\" &&\n PDFJSDev.test(\"GENERIC\") &&\n isNodeJS\n ) {\n // Ensure that all Node.js packages/polyfills have loaded.\n return Promise.all([NodePackages.promise, this._readyCapability.promise]);\n }\n return this._readyCapability.promise;\n }\n\n /**\n * The current `workerPort`, when it exists.\n * @type {Worker}\n */\n get port() {\n return this._port;\n }\n\n /**\n * The current MessageHandler-instance.\n * @type {MessageHandler}\n */\n get messageHandler() {\n return this._messageHandler;\n }\n\n _initializeFromPort(port) {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n throw new Error(\"Not implemented: _initializeFromPort\");\n }\n this._port = port;\n this._messageHandler = new MessageHandler(\"main\", \"worker\", port);\n this._messageHandler.on(\"ready\", function () {\n // Ignoring \"ready\" event -- MessageHandler should already be initialized\n // and ready to accept messages.\n });\n this._readyCapability.resolve();\n // Send global setting, e.g. verbosity level.\n this._messageHandler.send(\"configure\", {\n verbosity: this.verbosity,\n });\n }\n\n _initialize() {\n // If worker support isn't disabled explicit and the browser has worker\n // support, create a new web worker and test if it/the browser fulfills\n // all requirements to run parts of pdf.js in a web worker.\n // Right now, the requirement is, that an Uint8Array is still an\n // Uint8Array as it arrives on the worker. (Chrome added this with v.15.)\n if (\n !PDFWorkerUtil.isWorkerDisabled &&\n !PDFWorker.#mainThreadWorkerMessageHandler\n ) {\n let { workerSrc } = PDFWorker;\n\n try {\n // Wraps workerSrc path into blob URL, if the former does not belong\n // to the same origin.\n if (\n typeof PDFJSDev !== \"undefined\" &&\n PDFJSDev.test(\"GENERIC\") &&\n !PDFWorkerUtil.isSameOrigin(window.location.href, workerSrc)\n ) {\n workerSrc = PDFWorkerUtil.createCDNWrapper(\n new URL(workerSrc, window.location).href\n );\n }\n\n const worker = new Worker(workerSrc, { type: \"module\" });\n const messageHandler = new MessageHandler(\"main\", \"worker\", worker);\n const terminateEarly = () => {\n worker.removeEventListener(\"error\", onWorkerError);\n messageHandler.destroy();\n worker.terminate();\n if (this.destroyed) {\n this._readyCapability.reject(new Error(\"Worker was destroyed\"));\n } else {\n // Fall back to fake worker if the termination is caused by an\n // error (e.g. NetworkError / SecurityError).\n this._setupFakeWorker();\n }\n };\n\n const onWorkerError = () => {\n if (!this._webWorker) {\n // Worker failed to initialize due to an error. Clean up and fall\n // back to the fake worker.\n terminateEarly();\n }\n };\n worker.addEventListener(\"error\", onWorkerError);\n\n messageHandler.on(\"test\", data => {\n worker.removeEventListener(\"error\", onWorkerError);\n if (this.destroyed) {\n terminateEarly();\n return; // worker was destroyed\n }\n if (data) {\n this._messageHandler = messageHandler;\n this._port = worker;\n this._webWorker = worker;\n\n this._readyCapability.resolve();\n // Send global setting, e.g. verbosity level.\n messageHandler.send(\"configure\", {\n verbosity: this.verbosity,\n });\n } else {\n this._setupFakeWorker();\n messageHandler.destroy();\n worker.terminate();\n }\n });\n\n messageHandler.on(\"ready\", data => {\n worker.removeEventListener(\"error\", onWorkerError);\n if (this.destroyed) {\n terminateEarly();\n return; // worker was destroyed\n }\n try {\n sendTest();\n } catch {\n // We need fallback to a faked worker.\n this._setupFakeWorker();\n }\n });\n\n const sendTest = () => {\n const testObj = new Uint8Array();\n // Ensure that we can use `postMessage` transfers.\n messageHandler.send(\"test\", testObj, [testObj.buffer]);\n };\n\n // It might take time for the worker to initialize. We will try to send\n // the \"test\" message immediately, and once the \"ready\" message arrives.\n // The worker shall process only the first received \"test\" message.\n sendTest();\n return;\n } catch {\n info(\"The worker has been disabled.\");\n }\n }\n // Either workers are disabled, not supported or have thrown an exception.\n // Thus, we fallback to a faked worker.\n this._setupFakeWorker();\n }\n\n _setupFakeWorker() {\n if (!PDFWorkerUtil.isWorkerDisabled) {\n warn(\"Setting up fake worker.\");\n PDFWorkerUtil.isWorkerDisabled = true;\n }\n\n PDFWorker._setupFakeWorkerGlobal\n .then(WorkerMessageHandler => {\n if (this.destroyed) {\n this._readyCapability.reject(new Error(\"Worker was destroyed\"));\n return;\n }\n const port = new LoopbackPort();\n this._port = port;\n\n // All fake workers use the same port, making id unique.\n const id = `fake${PDFWorkerUtil.fakeWorkerId++}`;\n\n // If the main thread is our worker, setup the handling for the\n // messages -- the main thread sends to it self.\n const workerHandler = new MessageHandler(id + \"_worker\", id, port);\n WorkerMessageHandler.setup(workerHandler, port);\n\n const messageHandler = new MessageHandler(id, id + \"_worker\", port);\n this._messageHandler = messageHandler;\n this._readyCapability.resolve();\n // Send global setting, e.g. verbosity level.\n messageHandler.send(\"configure\", {\n verbosity: this.verbosity,\n });\n })\n .catch(reason => {\n this._readyCapability.reject(\n new Error(`Setting up fake worker failed: \"${reason.message}\".`)\n );\n });\n }\n\n /**\n * Destroys the worker instance.\n */\n destroy() {\n this.destroyed = true;\n if (this._webWorker) {\n // We need to terminate only web worker created resource.\n this._webWorker.terminate();\n this._webWorker = null;\n }\n PDFWorker.#workerPorts?.delete(this._port);\n this._port = null;\n if (this._messageHandler) {\n this._messageHandler.destroy();\n this._messageHandler = null;\n }\n }\n\n /**\n * @param {PDFWorkerParameters} params - The worker initialization parameters.\n */\n static fromPort(params) {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n throw new Error(\"Not implemented: fromPort\");\n }\n if (!params?.port) {\n throw new Error(\"PDFWorker.fromPort - invalid method signature.\");\n }\n const cachedPort = this.#workerPorts?.get(params.port);\n if (cachedPort) {\n if (cachedPort._pendingDestroy) {\n throw new Error(\n \"PDFWorker.fromPort - the worker is being destroyed.\\n\" +\n \"Please remember to await `PDFDocumentLoadingTask.destroy()`-calls.\"\n );\n }\n return cachedPort;\n }\n return new PDFWorker(params);\n }\n\n /**\n * The current `workerSrc`, when it exists.\n * @type {string}\n */\n static get workerSrc() {\n if (GlobalWorkerOptions.workerSrc) {\n return GlobalWorkerOptions.workerSrc;\n }\n throw new Error('No \"GlobalWorkerOptions.workerSrc\" specified.');\n }\n\n static get #mainThreadWorkerMessageHandler() {\n try {\n return globalThis.pdfjsWorker?.WorkerMessageHandler || null;\n } catch {\n return null;\n }\n }\n\n // Loads worker code into the main-thread.\n static get _setupFakeWorkerGlobal() {\n const loader = async () => {\n if (this.#mainThreadWorkerMessageHandler) {\n // The worker was already loaded using e.g. a `\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationRawTagOpen(code) {\n if (code === 47) {\n effects.consume(code)\n buffer = ''\n return continuationRawEndTag\n }\n return continuation(code)\n }\n\n /**\n * In raw continuation, after ` | \n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function continuationRawEndTag(code) {\n if (code === 62) {\n const name = buffer.toLowerCase()\n if (htmlRawNames.includes(name)) {\n effects.consume(code)\n return continuationClose\n }\n return continuation(code)\n }\n if (asciiAlpha(code) && buffer.length < 8) {\n effects.consume(code)\n // @ts-expect-error: not null.\n buffer += String.fromCharCode(code)\n return continuationRawEndTag\n }\n return continuation(code)\n }\n\n /**\n * In cdata continuation, after `]`, expecting `]>`.\n *\n * ```markdown\n * > | &<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationCdataInside(code) {\n if (code === 93) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n return continuation(code)\n }\n\n /**\n * In declaration or instruction continuation, at `>`.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | &<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationDeclarationInside(code) {\n if (code === 62) {\n effects.consume(code)\n return continuationClose\n }\n\n // More dashes.\n if (code === 45 && marker === 2) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n return continuation(code)\n }\n\n /**\n * In closed continuation: everything we get until the eol/eof is part of it.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationClose(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('htmlFlowData')\n return continuationAfter(code)\n }\n effects.consume(code)\n return continuationClose\n }\n\n /**\n * Done.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationAfter(code) {\n effects.exit('htmlFlow')\n // // Feel free to interrupt.\n // tokenizer.interrupt = false\n // // No longer concrete.\n // tokenizer.concrete = false\n return ok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuationStart(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * At eol, before continuation.\n *\n * ```markdown\n * > | * ```js\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return after\n }\n return nok(code)\n }\n\n /**\n * A continuation.\n *\n * ```markdown\n * | * ```js\n * > | b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeBlankLineBefore(effects, ok, nok) {\n return start\n\n /**\n * Before eol, expecting blank line.\n *\n * ```markdown\n * > |
\n * ^\n * |\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return effects.attempt(blankLine, ok, nok)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\n/** @type {Construct} */\nconst nonLazyContinuation = {\n tokenize: tokenizeNonLazyContinuation,\n partial: true\n}\n\n/** @type {Construct} */\nexport const codeFenced = {\n name: 'codeFenced',\n tokenize: tokenizeCodeFenced,\n concrete: true\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCodeFenced(effects, ok, nok) {\n const self = this\n /** @type {Construct} */\n const closeStart = {\n tokenize: tokenizeCloseStart,\n partial: true\n }\n let initialPrefix = 0\n let sizeOpen = 0\n /** @type {NonNullable} */\n let marker\n return start\n\n /**\n * Start of code.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: parse whitespace like `markdown-rs`.\n return beforeSequenceOpen(code)\n }\n\n /**\n * In opening fence, after prefix, at sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeSequenceOpen(code) {\n const tail = self.events[self.events.length - 1]\n initialPrefix =\n tail && tail[1].type === 'linePrefix'\n ? tail[2].sliceSerialize(tail[1], true).length\n : 0\n marker = code\n effects.enter('codeFenced')\n effects.enter('codeFencedFence')\n effects.enter('codeFencedFenceSequence')\n return sequenceOpen(code)\n }\n\n /**\n * In opening fence sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === marker) {\n sizeOpen++\n effects.consume(code)\n return sequenceOpen\n }\n if (sizeOpen < 3) {\n return nok(code)\n }\n effects.exit('codeFencedFenceSequence')\n return markdownSpace(code)\n ? factorySpace(effects, infoBefore, 'whitespace')(code)\n : infoBefore(code)\n }\n\n /**\n * In opening fence, after the sequence (and optional whitespace), before info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function infoBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFencedFence')\n return self.interrupt\n ? ok(code)\n : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code)\n }\n effects.enter('codeFencedFenceInfo')\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return info(code)\n }\n\n /**\n * In info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function info(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceInfo')\n return infoBefore(code)\n }\n if (markdownSpace(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceInfo')\n return factorySpace(effects, metaBefore, 'whitespace')(code)\n }\n if (code === 96 && code === marker) {\n return nok(code)\n }\n effects.consume(code)\n return info\n }\n\n /**\n * In opening fence, after info and whitespace, before meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function metaBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n return infoBefore(code)\n }\n effects.enter('codeFencedFenceMeta')\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return meta(code)\n }\n\n /**\n * In meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function meta(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceMeta')\n return infoBefore(code)\n }\n if (code === 96 && code === marker) {\n return nok(code)\n }\n effects.consume(code)\n return meta\n }\n\n /**\n * At eol/eof in code, before a non-lazy closing fence or content.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function atNonLazyBreak(code) {\n return effects.attempt(closeStart, after, contentBefore)(code)\n }\n\n /**\n * Before code content, not a closing fence, at eol.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentBefore(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return contentStart\n }\n\n /**\n * Before code content, not a closing fence.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentStart(code) {\n return initialPrefix > 0 && markdownSpace(code)\n ? factorySpace(\n effects,\n beforeContentChunk,\n 'linePrefix',\n initialPrefix + 1\n )(code)\n : beforeContentChunk(code)\n }\n\n /**\n * Before code content, after optional prefix.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeContentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code)\n }\n effects.enter('codeFlowValue')\n return contentChunk(code)\n }\n\n /**\n * In code content.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^^^^^^^^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFlowValue')\n return beforeContentChunk(code)\n }\n effects.consume(code)\n return contentChunk\n }\n\n /**\n * After code.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n effects.exit('codeFenced')\n return ok(code)\n }\n\n /**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\n function tokenizeCloseStart(effects, ok, nok) {\n let size = 0\n return startBefore\n\n /**\n *\n *\n * @type {State}\n */\n function startBefore(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return start\n }\n\n /**\n * Before closing fence, at optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Always populated by defaults.\n\n // To do: `enter` here or in next state?\n effects.enter('codeFencedFence')\n return markdownSpace(code)\n ? factorySpace(\n effects,\n beforeSequenceClose,\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n : beforeSequenceClose(code)\n }\n\n /**\n * In closing fence, after optional whitespace, at sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function beforeSequenceClose(code) {\n if (code === marker) {\n effects.enter('codeFencedFenceSequence')\n return sequenceClose(code)\n }\n return nok(code)\n }\n\n /**\n * In closing fence sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n if (code === marker) {\n size++\n effects.consume(code)\n return sequenceClose\n }\n if (size >= sizeOpen) {\n effects.exit('codeFencedFenceSequence')\n return markdownSpace(code)\n ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code)\n : sequenceCloseAfter(code)\n }\n return nok(code)\n }\n\n /**\n * After closing fence sequence, after optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceCloseAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFencedFence')\n return ok(code)\n }\n return nok(code)\n }\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuation(effects, ok, nok) {\n const self = this\n return start\n\n /**\n *\n *\n * @type {State}\n */\n function start(code) {\n if (code === null) {\n return nok(code)\n }\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return lineStart\n }\n\n /**\n *\n *\n * @type {State}\n */\n function lineStart(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code)\n }\n}\n","/// \n\n/* eslint-env browser */\n\nconst element = document.createElement('i')\n\n/**\n * @param {string} value\n * @returns {string|false}\n */\nexport function decodeNamedCharacterReference(value) {\n const characterReference = '&' + value + ';'\n element.innerHTML = characterReference\n const char = element.textContent\n\n // Some named character references do not require the closing semicolon\n // (`¬`, for instance), which leads to situations where parsing the assumed\n // named reference of `¬it;` will result in the string `¬it;`.\n // When we encounter a trailing semicolon after parsing, and the character\n // reference to decode was not a semicolon (`;`), we can assume that the\n // matching was not complete.\n // @ts-expect-error: TypeScript is wrong that `textContent` on elements can\n // yield `null`.\n if (char.charCodeAt(char.length - 1) === 59 /* `;` */ && value !== 'semi') {\n return false\n }\n\n // If the decoded string is equal to the input, the character reference was\n // not valid.\n // @ts-expect-error: TypeScript is wrong that `textContent` on elements can\n // yield `null`.\n return char === characterReference ? false : char\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {\n asciiAlphanumeric,\n asciiDigit,\n asciiHexDigit\n} from 'micromark-util-character'\n/** @type {Construct} */\nexport const characterReference = {\n name: 'characterReference',\n tokenize: tokenizeCharacterReference\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterReference(effects, ok, nok) {\n const self = this\n let size = 0\n /** @type {number} */\n let max\n /** @type {(code: Code) => boolean} */\n let test\n return start\n\n /**\n * Start of character reference.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('characterReference')\n effects.enter('characterReferenceMarker')\n effects.consume(code)\n effects.exit('characterReferenceMarker')\n return open\n }\n\n /**\n * After `&`, at `#` for numeric references or alphanumeric for named\n * references.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 35) {\n effects.enter('characterReferenceMarkerNumeric')\n effects.consume(code)\n effects.exit('characterReferenceMarkerNumeric')\n return numeric\n }\n effects.enter('characterReferenceValue')\n max = 31\n test = asciiAlphanumeric\n return value(code)\n }\n\n /**\n * After `#`, at `x` for hexadecimals or digit for decimals.\n *\n * ```markdown\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function numeric(code) {\n if (code === 88 || code === 120) {\n effects.enter('characterReferenceMarkerHexadecimal')\n effects.consume(code)\n effects.exit('characterReferenceMarkerHexadecimal')\n effects.enter('characterReferenceValue')\n max = 6\n test = asciiHexDigit\n return value\n }\n effects.enter('characterReferenceValue')\n max = 7\n test = asciiDigit\n return value(code)\n }\n\n /**\n * After markers (`&#x`, `&#`, or `&`), in value, before `;`.\n *\n * The character reference kind defines what and how many characters are\n * allowed.\n *\n * ```markdown\n * > | a&b\n * ^^^\n * > | a{b\n * ^^^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function value(code) {\n if (code === 59 && size) {\n const token = effects.exit('characterReferenceValue')\n if (\n test === asciiAlphanumeric &&\n !decodeNamedCharacterReference(self.sliceSerialize(token))\n ) {\n return nok(code)\n }\n\n // To do: `markdown-rs` uses a different name:\n // `CharacterReferenceMarkerSemi`.\n effects.enter('characterReferenceMarker')\n effects.consume(code)\n effects.exit('characterReferenceMarker')\n effects.exit('characterReference')\n return ok\n }\n if (test(code) && size++ < max) {\n effects.consume(code)\n return value\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {asciiPunctuation} from 'micromark-util-character'\n/** @type {Construct} */\nexport const characterEscape = {\n name: 'characterEscape',\n tokenize: tokenizeCharacterEscape\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterEscape(effects, ok, nok) {\n return start\n\n /**\n * Start of character escape.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('characterEscape')\n effects.enter('escapeMarker')\n effects.consume(code)\n effects.exit('escapeMarker')\n return inside\n }\n\n /**\n * After `\\`, at punctuation.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n // ASCII punctuation.\n if (asciiPunctuation(code)) {\n effects.enter('characterEscapeValue')\n effects.consume(code)\n effects.exit('characterEscapeValue')\n effects.exit('characterEscape')\n return ok\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {Construct} */\nexport const lineEnding = {\n name: 'lineEnding',\n tokenize: tokenizeLineEnding\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLineEnding(effects, ok) {\n return start\n\n /** @type {State} */\n function start(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, ok, 'linePrefix')\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factoryDestination} from 'micromark-factory-destination'\nimport {factoryLabel} from 'micromark-factory-label'\nimport {factoryTitle} from 'micromark-factory-title'\nimport {factoryWhitespace} from 'micromark-factory-whitespace'\nimport {markdownLineEndingOrSpace} from 'micromark-util-character'\nimport {push, splice} from 'micromark-util-chunked'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {resolveAll} from 'micromark-util-resolve-all'\n/** @type {Construct} */\nexport const labelEnd = {\n name: 'labelEnd',\n tokenize: tokenizeLabelEnd,\n resolveTo: resolveToLabelEnd,\n resolveAll: resolveAllLabelEnd\n}\n\n/** @type {Construct} */\nconst resourceConstruct = {\n tokenize: tokenizeResource\n}\n/** @type {Construct} */\nconst referenceFullConstruct = {\n tokenize: tokenizeReferenceFull\n}\n/** @type {Construct} */\nconst referenceCollapsedConstruct = {\n tokenize: tokenizeReferenceCollapsed\n}\n\n/** @type {Resolver} */\nfunction resolveAllLabelEnd(events) {\n let index = -1\n while (++index < events.length) {\n const token = events[index][1]\n if (\n token.type === 'labelImage' ||\n token.type === 'labelLink' ||\n token.type === 'labelEnd'\n ) {\n // Remove the marker.\n events.splice(index + 1, token.type === 'labelImage' ? 4 : 2)\n token.type = 'data'\n index++\n }\n }\n return events\n}\n\n/** @type {Resolver} */\nfunction resolveToLabelEnd(events, context) {\n let index = events.length\n let offset = 0\n /** @type {Token} */\n let token\n /** @type {number | undefined} */\n let open\n /** @type {number | undefined} */\n let close\n /** @type {Array} */\n let media\n\n // Find an opening.\n while (index--) {\n token = events[index][1]\n if (open) {\n // If we see another link, or inactive link label, we’ve been here before.\n if (\n token.type === 'link' ||\n (token.type === 'labelLink' && token._inactive)\n ) {\n break\n }\n\n // Mark other link openings as inactive, as we can’t have links in\n // links.\n if (events[index][0] === 'enter' && token.type === 'labelLink') {\n token._inactive = true\n }\n } else if (close) {\n if (\n events[index][0] === 'enter' &&\n (token.type === 'labelImage' || token.type === 'labelLink') &&\n !token._balanced\n ) {\n open = index\n if (token.type !== 'labelLink') {\n offset = 2\n break\n }\n }\n } else if (token.type === 'labelEnd') {\n close = index\n }\n }\n const group = {\n type: events[open][1].type === 'labelLink' ? 'link' : 'image',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n }\n const label = {\n type: 'label',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[close][1].end)\n }\n const text = {\n type: 'labelText',\n start: Object.assign({}, events[open + offset + 2][1].end),\n end: Object.assign({}, events[close - 2][1].start)\n }\n media = [\n ['enter', group, context],\n ['enter', label, context]\n ]\n\n // Opening marker.\n media = push(media, events.slice(open + 1, open + offset + 3))\n\n // Text open.\n media = push(media, [['enter', text, context]])\n\n // Always populated by defaults.\n\n // Between.\n media = push(\n media,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + offset + 4, close - 3),\n context\n )\n )\n\n // Text close, marker close, label close.\n media = push(media, [\n ['exit', text, context],\n events[close - 2],\n events[close - 1],\n ['exit', label, context]\n ])\n\n // Reference, resource, or so.\n media = push(media, events.slice(close + 1))\n\n // Media close.\n media = push(media, [['exit', group, context]])\n splice(events, open, events.length, media)\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelEnd(effects, ok, nok) {\n const self = this\n let index = self.events.length\n /** @type {Token} */\n let labelStart\n /** @type {boolean} */\n let defined\n\n // Find an opening.\n while (index--) {\n if (\n (self.events[index][1].type === 'labelImage' ||\n self.events[index][1].type === 'labelLink') &&\n !self.events[index][1]._balanced\n ) {\n labelStart = self.events[index][1]\n break\n }\n }\n return start\n\n /**\n * Start of label end.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // If there is not an okay opening.\n if (!labelStart) {\n return nok(code)\n }\n\n // If the corresponding label (link) start is marked as inactive,\n // it means we’d be wrapping a link, like this:\n //\n // ```markdown\n // > | a [b [c](d) e](f) g.\n // ^\n // ```\n //\n // We can’t have that, so it’s just balanced brackets.\n if (labelStart._inactive) {\n return labelEndNok(code)\n }\n defined = self.parser.defined.includes(\n normalizeIdentifier(\n self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })\n )\n )\n effects.enter('labelEnd')\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelEnd')\n return after\n }\n\n /**\n * After `]`.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Note: `markdown-rs` also parses GFM footnotes here, which for us is in\n // an extension.\n\n // Resource (`[asd](fgh)`)?\n if (code === 40) {\n return effects.attempt(\n resourceConstruct,\n labelEndOk,\n defined ? labelEndOk : labelEndNok\n )(code)\n }\n\n // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference?\n if (code === 91) {\n return effects.attempt(\n referenceFullConstruct,\n labelEndOk,\n defined ? referenceNotFull : labelEndNok\n )(code)\n }\n\n // Shortcut (`[asd]`) reference?\n return defined ? labelEndOk(code) : labelEndNok(code)\n }\n\n /**\n * After `]`, at `[`, but not at a full reference.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceNotFull(code) {\n return effects.attempt(\n referenceCollapsedConstruct,\n labelEndOk,\n labelEndNok\n )(code)\n }\n\n /**\n * Done, we found something.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndOk(code) {\n // Note: `markdown-rs` does a bunch of stuff here.\n return ok(code)\n }\n\n /**\n * Done, it’s nothing.\n *\n * There was an okay opening, but we didn’t match anything.\n *\n * ```markdown\n * > | [a](b c\n * ^\n * > | [a][b c\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndNok(code) {\n labelStart._balanced = true\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeResource(effects, ok, nok) {\n return resourceStart\n\n /**\n * At a resource.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceStart(code) {\n effects.enter('resource')\n effects.enter('resourceMarker')\n effects.consume(code)\n effects.exit('resourceMarker')\n return resourceBefore\n }\n\n /**\n * In resource, after `(`, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBefore(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceOpen)(code)\n : resourceOpen(code)\n }\n\n /**\n * In resource, after optional whitespace, at `)` or a destination.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceOpen(code) {\n if (code === 41) {\n return resourceEnd(code)\n }\n return factoryDestination(\n effects,\n resourceDestinationAfter,\n resourceDestinationMissing,\n 'resourceDestination',\n 'resourceDestinationLiteral',\n 'resourceDestinationLiteralMarker',\n 'resourceDestinationRaw',\n 'resourceDestinationString',\n 32\n )(code)\n }\n\n /**\n * In resource, after destination, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationAfter(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceBetween)(code)\n : resourceEnd(code)\n }\n\n /**\n * At invalid destination.\n *\n * ```markdown\n * > | [a](<<) b\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationMissing(code) {\n return nok(code)\n }\n\n /**\n * In resource, after destination and whitespace, at `(` or title.\n *\n * ```markdown\n * > | [a](b ) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBetween(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(\n effects,\n resourceTitleAfter,\n nok,\n 'resourceTitle',\n 'resourceTitleMarker',\n 'resourceTitleString'\n )(code)\n }\n return resourceEnd(code)\n }\n\n /**\n * In resource, after title, at optional whitespace.\n *\n * ```markdown\n * > | [a](b \"c\") d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceTitleAfter(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceEnd)(code)\n : resourceEnd(code)\n }\n\n /**\n * In resource, at `)`.\n *\n * ```markdown\n * > | [a](b) d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceEnd(code) {\n if (code === 41) {\n effects.enter('resourceMarker')\n effects.consume(code)\n effects.exit('resourceMarker')\n effects.exit('resource')\n return ok\n }\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceFull(effects, ok, nok) {\n const self = this\n return referenceFull\n\n /**\n * In a reference (full), at the `[`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFull(code) {\n return factoryLabel.call(\n self,\n effects,\n referenceFullAfter,\n referenceFullMissing,\n 'reference',\n 'referenceMarker',\n 'referenceString'\n )(code)\n }\n\n /**\n * In a reference (full), after `]`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullAfter(code) {\n return self.parser.defined.includes(\n normalizeIdentifier(\n self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)\n )\n )\n ? ok(code)\n : nok(code)\n }\n\n /**\n * In reference (full) that was missing.\n *\n * ```markdown\n * > | [a][b d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullMissing(code) {\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceCollapsed(effects, ok, nok) {\n return referenceCollapsedStart\n\n /**\n * In reference (collapsed), at `[`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedStart(code) {\n // We only attempt a collapsed label if there’s a `[`.\n\n effects.enter('reference')\n effects.enter('referenceMarker')\n effects.consume(code)\n effects.exit('referenceMarker')\n return referenceCollapsedOpen\n }\n\n /**\n * In reference (collapsed), at `]`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedOpen(code) {\n if (code === 93) {\n effects.enter('referenceMarker')\n effects.consume(code)\n effects.exit('referenceMarker')\n effects.exit('reference')\n return ok\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {labelEnd} from './label-end.js'\n\n/** @type {Construct} */\nexport const labelStartImage = {\n name: 'labelStartImage',\n tokenize: tokenizeLabelStartImage,\n resolveAll: labelEnd.resolveAll\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartImage(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * Start of label (image) start.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('labelImage')\n effects.enter('labelImageMarker')\n effects.consume(code)\n effects.exit('labelImageMarker')\n return open\n }\n\n /**\n * After `!`, at `[`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 91) {\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelImage')\n return after\n }\n return nok(code)\n }\n\n /**\n * After `![`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * This is needed in because, when GFM footnotes are enabled, images never\n * form when started with a `^`.\n * Instead, links form:\n *\n * ```markdown\n * ![^a](b)\n *\n * ![^a][b]\n *\n * [b]: c\n * ```\n *\n * ```html\n *

!^a

\n *

!^a

\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // To do: use a new field to do this, this is still needed for\n // `micromark-extension-gfm-footnote`, but the `label-start-link`\n // behavior isn’t.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs\n ? nok(code)\n : ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n */\n\nimport {\n markdownLineEndingOrSpace,\n unicodePunctuation,\n unicodeWhitespace\n} from 'micromark-util-character'\n/**\n * Classify whether a code represents whitespace, punctuation, or something\n * else.\n *\n * Used for attention (emphasis, strong), whose sequences can open or close\n * based on the class of surrounding characters.\n *\n * > 👉 **Note**: eof (`null`) is seen as whitespace.\n *\n * @param {Code} code\n * Code.\n * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined}\n * Group.\n */\nexport function classifyCharacter(code) {\n if (\n code === null ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code)\n ) {\n return 1\n }\n if (unicodePunctuation(code)) {\n return 2\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Point} Point\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {push, splice} from 'micromark-util-chunked'\nimport {classifyCharacter} from 'micromark-util-classify-character'\nimport {resolveAll} from 'micromark-util-resolve-all'\n/** @type {Construct} */\nexport const attention = {\n name: 'attention',\n tokenize: tokenizeAttention,\n resolveAll: resolveAllAttention\n}\n\n/**\n * Take all events and resolve attention to emphasis or strong.\n *\n * @type {Resolver}\n */\nfunction resolveAllAttention(events, context) {\n let index = -1\n /** @type {number} */\n let open\n /** @type {Token} */\n let group\n /** @type {Token} */\n let text\n /** @type {Token} */\n let openingSequence\n /** @type {Token} */\n let closingSequence\n /** @type {number} */\n let use\n /** @type {Array} */\n let nextEvents\n /** @type {number} */\n let offset\n\n // Walk through all events.\n //\n // Note: performance of this is fine on an mb of normal markdown, but it’s\n // a bottleneck for malicious stuff.\n while (++index < events.length) {\n // Find a token that can close.\n if (\n events[index][0] === 'enter' &&\n events[index][1].type === 'attentionSequence' &&\n events[index][1]._close\n ) {\n open = index\n\n // Now walk back to find an opener.\n while (open--) {\n // Find a token that can open the closer.\n if (\n events[open][0] === 'exit' &&\n events[open][1].type === 'attentionSequence' &&\n events[open][1]._open &&\n // If the markers are the same:\n context.sliceSerialize(events[open][1]).charCodeAt(0) ===\n context.sliceSerialize(events[index][1]).charCodeAt(0)\n ) {\n // If the opening can close or the closing can open,\n // and the close size *is not* a multiple of three,\n // but the sum of the opening and closing size *is* multiple of three,\n // then don’t match.\n if (\n (events[open][1]._close || events[index][1]._open) &&\n (events[index][1].end.offset - events[index][1].start.offset) % 3 &&\n !(\n (events[open][1].end.offset -\n events[open][1].start.offset +\n events[index][1].end.offset -\n events[index][1].start.offset) %\n 3\n )\n ) {\n continue\n }\n\n // Number of markers to use from the sequence.\n use =\n events[open][1].end.offset - events[open][1].start.offset > 1 &&\n events[index][1].end.offset - events[index][1].start.offset > 1\n ? 2\n : 1\n const start = Object.assign({}, events[open][1].end)\n const end = Object.assign({}, events[index][1].start)\n movePoint(start, -use)\n movePoint(end, use)\n openingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start,\n end: Object.assign({}, events[open][1].end)\n }\n closingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start: Object.assign({}, events[index][1].start),\n end\n }\n text = {\n type: use > 1 ? 'strongText' : 'emphasisText',\n start: Object.assign({}, events[open][1].end),\n end: Object.assign({}, events[index][1].start)\n }\n group = {\n type: use > 1 ? 'strong' : 'emphasis',\n start: Object.assign({}, openingSequence.start),\n end: Object.assign({}, closingSequence.end)\n }\n events[open][1].end = Object.assign({}, openingSequence.start)\n events[index][1].start = Object.assign({}, closingSequence.end)\n nextEvents = []\n\n // If there are more markers in the opening, add them before.\n if (events[open][1].end.offset - events[open][1].start.offset) {\n nextEvents = push(nextEvents, [\n ['enter', events[open][1], context],\n ['exit', events[open][1], context]\n ])\n }\n\n // Opening.\n nextEvents = push(nextEvents, [\n ['enter', group, context],\n ['enter', openingSequence, context],\n ['exit', openingSequence, context],\n ['enter', text, context]\n ])\n\n // Always populated by defaults.\n\n // Between.\n nextEvents = push(\n nextEvents,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + 1, index),\n context\n )\n )\n\n // Closing.\n nextEvents = push(nextEvents, [\n ['exit', text, context],\n ['enter', closingSequence, context],\n ['exit', closingSequence, context],\n ['exit', group, context]\n ])\n\n // If there are more markers in the closing, add them after.\n if (events[index][1].end.offset - events[index][1].start.offset) {\n offset = 2\n nextEvents = push(nextEvents, [\n ['enter', events[index][1], context],\n ['exit', events[index][1], context]\n ])\n } else {\n offset = 0\n }\n splice(events, open - 1, index - open + 3, nextEvents)\n index = open + nextEvents.length - offset - 2\n break\n }\n }\n }\n }\n\n // Remove remaining sequences.\n index = -1\n while (++index < events.length) {\n if (events[index][1].type === 'attentionSequence') {\n events[index][1].type = 'data'\n }\n }\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeAttention(effects, ok) {\n const attentionMarkers = this.parser.constructs.attentionMarkers.null\n const previous = this.previous\n const before = classifyCharacter(previous)\n\n /** @type {NonNullable} */\n let marker\n return start\n\n /**\n * Before a sequence.\n *\n * ```markdown\n * > | **\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n marker = code\n effects.enter('attentionSequence')\n return inside(code)\n }\n\n /**\n * In a sequence.\n *\n * ```markdown\n * > | **\n * ^^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker) {\n effects.consume(code)\n return inside\n }\n const token = effects.exit('attentionSequence')\n\n // To do: next major: move this to resolver, just like `markdown-rs`.\n const after = classifyCharacter(code)\n\n // Always populated by defaults.\n\n const open =\n !after || (after === 2 && before) || attentionMarkers.includes(code)\n const close =\n !before || (before === 2 && after) || attentionMarkers.includes(previous)\n token._open = Boolean(marker === 42 ? open : open && (before || !close))\n token._close = Boolean(marker === 42 ? close : close && (after || !open))\n return ok(code)\n }\n}\n\n/**\n * Move a point a bit.\n *\n * Note: `move` only works inside lines! It’s not possible to move past other\n * chunks (replacement characters, tabs, or line endings).\n *\n * @param {Point} point\n * @param {number} offset\n * @returns {void}\n */\nfunction movePoint(point, offset) {\n point.column += offset\n point.offset += offset\n point._bufferIndex += offset\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n asciiAtext,\n asciiControl\n} from 'micromark-util-character'\n/** @type {Construct} */\nexport const autolink = {\n name: 'autolink',\n tokenize: tokenizeAutolink\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeAutolink(effects, ok, nok) {\n let size = 0\n return start\n\n /**\n * Start of an autolink.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('autolink')\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.enter('autolinkProtocol')\n return open\n }\n\n /**\n * After `<`, at protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n return schemeOrEmailAtext\n }\n return emailAtext(code)\n }\n\n /**\n * At second byte of protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeOrEmailAtext(code) {\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {\n // Count the previous alphabetical from `open` too.\n size = 1\n return schemeInsideOrEmailAtext(code)\n }\n return emailAtext(code)\n }\n\n /**\n * In ambiguous protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeInsideOrEmailAtext(code) {\n if (code === 58) {\n effects.consume(code)\n size = 0\n return urlInside\n }\n\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if (\n (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) &&\n size++ < 32\n ) {\n effects.consume(code)\n return schemeInsideOrEmailAtext\n }\n size = 0\n return emailAtext(code)\n }\n\n /**\n * After protocol, in URL.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function urlInside(code) {\n if (code === 62) {\n effects.exit('autolinkProtocol')\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.exit('autolink')\n return ok\n }\n\n // ASCII control, space, or `<`.\n if (code === null || code === 32 || code === 60 || asciiControl(code)) {\n return nok(code)\n }\n effects.consume(code)\n return urlInside\n }\n\n /**\n * In email atext.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailAtext(code) {\n if (code === 64) {\n effects.consume(code)\n return emailAtSignOrDot\n }\n if (asciiAtext(code)) {\n effects.consume(code)\n return emailAtext\n }\n return nok(code)\n }\n\n /**\n * In label, after at-sign or dot.\n *\n * ```markdown\n * > | ab\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function emailAtSignOrDot(code) {\n return asciiAlphanumeric(code) ? emailLabel(code) : nok(code)\n }\n\n /**\n * In label, where `.` and `>` are allowed.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailLabel(code) {\n if (code === 46) {\n effects.consume(code)\n size = 0\n return emailAtSignOrDot\n }\n if (code === 62) {\n // Exit, then change the token type.\n effects.exit('autolinkProtocol').type = 'autolinkEmail'\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.exit('autolink')\n return ok\n }\n return emailValue(code)\n }\n\n /**\n * In label, where `.` and `>` are *not* allowed.\n *\n * Though, this is also used in `emailLabel` to parse other values.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailValue(code) {\n // ASCII alphanumeric or `-`.\n if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {\n const next = code === 45 ? emailValue : emailLabel\n effects.consume(code)\n return next\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n markdownLineEnding,\n markdownLineEndingOrSpace,\n markdownSpace\n} from 'micromark-util-character'\n/** @type {Construct} */\nexport const htmlText = {\n name: 'htmlText',\n tokenize: tokenizeHtmlText\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeHtmlText(effects, ok, nok) {\n const self = this\n /** @type {NonNullable | undefined} */\n let marker\n /** @type {number} */\n let index\n /** @type {State} */\n let returnState\n return start\n\n /**\n * Start of HTML (text).\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('htmlText')\n effects.enter('htmlTextData')\n effects.consume(code)\n return open\n }\n\n /**\n * After `<`, at tag name or other stuff.\n *\n * ```markdown\n * > | a c\n * ^\n * > | a c\n * ^\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 33) {\n effects.consume(code)\n return declarationOpen\n }\n if (code === 47) {\n effects.consume(code)\n return tagCloseStart\n }\n if (code === 63) {\n effects.consume(code)\n return instruction\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagOpen\n }\n return nok(code)\n }\n\n /**\n * After ` | a c\n * ^\n * > | a c\n * ^\n * > | a &<]]> c\n * ^\n * ```\n *\n * @type {State}\n */\n function declarationOpen(code) {\n if (code === 45) {\n effects.consume(code)\n return commentOpenInside\n }\n if (code === 91) {\n effects.consume(code)\n index = 0\n return cdataOpenInside\n }\n if (asciiAlpha(code)) {\n effects.consume(code)\n return declaration\n }\n return nok(code)\n }\n\n /**\n * In a comment, after ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentOpenInside(code) {\n if (code === 45) {\n effects.consume(code)\n return commentEnd\n }\n return nok(code)\n }\n\n /**\n * In comment.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function comment(code) {\n if (code === null) {\n return nok(code)\n }\n if (code === 45) {\n effects.consume(code)\n return commentClose\n }\n if (markdownLineEnding(code)) {\n returnState = comment\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return comment\n }\n\n /**\n * In comment, after `-`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentClose(code) {\n if (code === 45) {\n effects.consume(code)\n return commentEnd\n }\n return comment(code)\n }\n\n /**\n * In comment, after `--`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentEnd(code) {\n return code === 62\n ? end(code)\n : code === 45\n ? commentClose(code)\n : comment(code)\n }\n\n /**\n * After ` | a &<]]> b\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function cdataOpenInside(code) {\n const value = 'CDATA['\n if (code === value.charCodeAt(index++)) {\n effects.consume(code)\n return index === value.length ? cdata : cdataOpenInside\n }\n return nok(code)\n }\n\n /**\n * In CDATA.\n *\n * ```markdown\n * > | a &<]]> b\n * ^^^\n * ```\n *\n * @type {State}\n */\n function cdata(code) {\n if (code === null) {\n return nok(code)\n }\n if (code === 93) {\n effects.consume(code)\n return cdataClose\n }\n if (markdownLineEnding(code)) {\n returnState = cdata\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return cdata\n }\n\n /**\n * In CDATA, after `]`, at another `]`.\n *\n * ```markdown\n * > | a &<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataClose(code) {\n if (code === 93) {\n effects.consume(code)\n return cdataEnd\n }\n return cdata(code)\n }\n\n /**\n * In CDATA, after `]]`, at `>`.\n *\n * ```markdown\n * > | a &<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataEnd(code) {\n if (code === 62) {\n return end(code)\n }\n if (code === 93) {\n effects.consume(code)\n return cdataEnd\n }\n return cdata(code)\n }\n\n /**\n * In declaration.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function declaration(code) {\n if (code === null || code === 62) {\n return end(code)\n }\n if (markdownLineEnding(code)) {\n returnState = declaration\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return declaration\n }\n\n /**\n * In instruction.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function instruction(code) {\n if (code === null) {\n return nok(code)\n }\n if (code === 63) {\n effects.consume(code)\n return instructionClose\n }\n if (markdownLineEnding(code)) {\n returnState = instruction\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return instruction\n }\n\n /**\n * In instruction, after `?`, at `>`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function instructionClose(code) {\n return code === 62 ? end(code) : instruction(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseStart(code) {\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagClose\n }\n return nok(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagClose(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagClose\n }\n return tagCloseBetween(code)\n }\n\n /**\n * In closing tag, after tag name.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseBetween(code) {\n if (markdownLineEnding(code)) {\n returnState = tagCloseBetween\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagCloseBetween\n }\n return end(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpen(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagOpen\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n return nok(code)\n }\n\n /**\n * In opening tag, after tag name.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenBetween(code) {\n if (code === 47) {\n effects.consume(code)\n return end\n }\n\n // ASCII alphabetical and `:` and `_`.\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenBetween\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenBetween\n }\n return end(code)\n }\n\n /**\n * In attribute name.\n *\n * ```markdown\n * > | a d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeName(code) {\n // ASCII alphabetical and `-`, `.`, `:`, and `_`.\n if (\n code === 45 ||\n code === 46 ||\n code === 58 ||\n code === 95 ||\n asciiAlphanumeric(code)\n ) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n return tagOpenAttributeNameAfter(code)\n }\n\n /**\n * After attribute name, before initializer, the end of the tag, or\n * whitespace.\n *\n * ```markdown\n * > | a d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeNameAfter\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeNameAfter\n }\n return tagOpenBetween(code)\n }\n\n /**\n * Before unquoted, double quoted, or single quoted attribute value, allowing\n * whitespace.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueBefore(code) {\n if (\n code === null ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96\n ) {\n return nok(code)\n }\n if (code === 34 || code === 39) {\n effects.consume(code)\n marker = code\n return tagOpenAttributeValueQuoted\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueBefore\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n effects.consume(code)\n return tagOpenAttributeValueUnquoted\n }\n\n /**\n * In double or single quoted attribute value.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuoted(code) {\n if (code === marker) {\n effects.consume(code)\n marker = undefined\n return tagOpenAttributeValueQuotedAfter\n }\n if (code === null) {\n return nok(code)\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueQuoted\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return tagOpenAttributeValueQuoted\n }\n\n /**\n * In unquoted attribute value.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueUnquoted(code) {\n if (\n code === null ||\n code === 34 ||\n code === 39 ||\n code === 60 ||\n code === 61 ||\n code === 96\n ) {\n return nok(code)\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n effects.consume(code)\n return tagOpenAttributeValueUnquoted\n }\n\n /**\n * After double or single quoted attribute value, before whitespace or the end\n * of the tag.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuotedAfter(code) {\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n return nok(code)\n }\n\n /**\n * In certain circumstances of a tag where only an `>` is allowed.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function end(code) {\n if (code === 62) {\n effects.consume(code)\n effects.exit('htmlTextData')\n effects.exit('htmlText')\n return ok\n }\n return nok(code)\n }\n\n /**\n * At eol.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * > | a \n * ```\n *\n * @type {State}\n */\n function lineEndingBefore(code) {\n effects.exit('htmlTextData')\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return lineEndingAfter\n }\n\n /**\n * After eol, at optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a \n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfter(code) {\n // Always populated by defaults.\n\n return markdownSpace(code)\n ? factorySpace(\n effects,\n lineEndingAfterPrefix,\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n : lineEndingAfterPrefix(code)\n }\n\n /**\n * After eol, after optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a \n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfterPrefix(code) {\n effects.enter('htmlTextData')\n return returnState(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {labelEnd} from './label-end.js'\n\n/** @type {Construct} */\nexport const labelStartLink = {\n name: 'labelStartLink',\n tokenize: tokenizeLabelStartLink,\n resolveAll: labelEnd.resolveAll\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartLink(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * Start of label (link) start.\n *\n * ```markdown\n * > | a [b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('labelLink')\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelLink')\n return after\n }\n\n /** @type {State} */\n function after(code) {\n // To do: this isn’t needed in `micromark-extension-gfm-footnote`,\n // remove.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs\n ? nok(code)\n : ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {Construct} */\nexport const hardBreakEscape = {\n name: 'hardBreakEscape',\n tokenize: tokenizeHardBreakEscape\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeHardBreakEscape(effects, ok, nok) {\n return start\n\n /**\n * Start of a hard break (escape).\n *\n * ```markdown\n * > | a\\\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('hardBreakEscape')\n effects.consume(code)\n return after\n }\n\n /**\n * After `\\`, at eol.\n *\n * ```markdown\n * > | a\\\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (markdownLineEnding(code)) {\n effects.exit('hardBreakEscape')\n return ok(code)\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Previous} Previous\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {Construct} */\nexport const codeText = {\n name: 'codeText',\n tokenize: tokenizeCodeText,\n resolve: resolveCodeText,\n previous\n}\n\n// To do: next major: don’t resolve, like `markdown-rs`.\n/** @type {Resolver} */\nfunction resolveCodeText(events) {\n let tailExitIndex = events.length - 4\n let headEnterIndex = 3\n /** @type {number} */\n let index\n /** @type {number | undefined} */\n let enter\n\n // If we start and end with an EOL or a space.\n if (\n (events[headEnterIndex][1].type === 'lineEnding' ||\n events[headEnterIndex][1].type === 'space') &&\n (events[tailExitIndex][1].type === 'lineEnding' ||\n events[tailExitIndex][1].type === 'space')\n ) {\n index = headEnterIndex\n\n // And we have data.\n while (++index < tailExitIndex) {\n if (events[index][1].type === 'codeTextData') {\n // Then we have padding.\n events[headEnterIndex][1].type = 'codeTextPadding'\n events[tailExitIndex][1].type = 'codeTextPadding'\n headEnterIndex += 2\n tailExitIndex -= 2\n break\n }\n }\n }\n\n // Merge adjacent spaces and data.\n index = headEnterIndex - 1\n tailExitIndex++\n while (++index <= tailExitIndex) {\n if (enter === undefined) {\n if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') {\n enter = index\n }\n } else if (\n index === tailExitIndex ||\n events[index][1].type === 'lineEnding'\n ) {\n events[enter][1].type = 'codeTextData'\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end\n events.splice(enter + 2, index - enter - 2)\n tailExitIndex -= index - enter - 2\n index = enter + 2\n }\n enter = undefined\n }\n }\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Previous}\n */\nfunction previous(code) {\n // If there is a previous code, there will always be a tail.\n return (\n code !== 96 ||\n this.events[this.events.length - 1][1].type === 'characterEscape'\n )\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCodeText(effects, ok, nok) {\n const self = this\n let sizeOpen = 0\n /** @type {number} */\n let size\n /** @type {Token} */\n let token\n return start\n\n /**\n * Start of code (text).\n *\n * ```markdown\n * > | `a`\n * ^\n * > | \\`a`\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('codeText')\n effects.enter('codeTextSequence')\n return sequenceOpen(code)\n }\n\n /**\n * In opening sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === 96) {\n effects.consume(code)\n sizeOpen++\n return sequenceOpen\n }\n effects.exit('codeTextSequence')\n return between(code)\n }\n\n /**\n * Between something and something else.\n *\n * ```markdown\n * > | `a`\n * ^^\n * ```\n *\n * @type {State}\n */\n function between(code) {\n // EOF.\n if (code === null) {\n return nok(code)\n }\n\n // To do: next major: don’t do spaces in resolve, but when compiling,\n // like `markdown-rs`.\n // Tabs don’t work, and virtual spaces don’t make sense.\n if (code === 32) {\n effects.enter('space')\n effects.consume(code)\n effects.exit('space')\n return between\n }\n\n // Closing fence? Could also be data.\n if (code === 96) {\n token = effects.enter('codeTextSequence')\n size = 0\n return sequenceClose(code)\n }\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return between\n }\n\n // Data.\n effects.enter('codeTextData')\n return data(code)\n }\n\n /**\n * In data.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function data(code) {\n if (\n code === null ||\n code === 32 ||\n code === 96 ||\n markdownLineEnding(code)\n ) {\n effects.exit('codeTextData')\n return between(code)\n }\n effects.consume(code)\n return data\n }\n\n /**\n * In closing sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n // More.\n if (code === 96) {\n effects.consume(code)\n size++\n return sequenceClose\n }\n\n // Done!\n if (size === sizeOpen) {\n effects.exit('codeTextSequence')\n effects.exit('codeText')\n return ok(code)\n }\n\n // More or less accents: mark as data.\n token.type = 'codeTextData'\n return data(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Extension} Extension\n */\n\nimport {\n attention,\n autolink,\n blockQuote,\n characterEscape,\n characterReference,\n codeFenced,\n codeIndented,\n codeText,\n definition,\n hardBreakEscape,\n headingAtx,\n htmlFlow,\n htmlText,\n labelEnd,\n labelStartImage,\n labelStartLink,\n lineEnding,\n list,\n setextUnderline,\n thematicBreak\n} from 'micromark-core-commonmark'\nimport {resolver as resolveText} from './initialize/text.js'\n\n/** @satisfies {Extension['document']} */\nexport const document = {\n [42]: list,\n [43]: list,\n [45]: list,\n [48]: list,\n [49]: list,\n [50]: list,\n [51]: list,\n [52]: list,\n [53]: list,\n [54]: list,\n [55]: list,\n [56]: list,\n [57]: list,\n [62]: blockQuote\n}\n\n/** @satisfies {Extension['contentInitial']} */\nexport const contentInitial = {\n [91]: definition\n}\n\n/** @satisfies {Extension['flowInitial']} */\nexport const flowInitial = {\n [-2]: codeIndented,\n [-1]: codeIndented,\n [32]: codeIndented\n}\n\n/** @satisfies {Extension['flow']} */\nexport const flow = {\n [35]: headingAtx,\n [42]: thematicBreak,\n [45]: [setextUnderline, thematicBreak],\n [60]: htmlFlow,\n [61]: setextUnderline,\n [95]: thematicBreak,\n [96]: codeFenced,\n [126]: codeFenced\n}\n\n/** @satisfies {Extension['string']} */\nexport const string = {\n [38]: characterReference,\n [92]: characterEscape\n}\n\n/** @satisfies {Extension['text']} */\nexport const text = {\n [-5]: lineEnding,\n [-4]: lineEnding,\n [-3]: lineEnding,\n [33]: labelStartImage,\n [38]: characterReference,\n [42]: attention,\n [60]: [autolink, htmlText],\n [91]: labelStartLink,\n [92]: [hardBreakEscape, characterEscape],\n [93]: labelEnd,\n [95]: attention,\n [96]: codeText\n}\n\n/** @satisfies {Extension['insideSpan']} */\nexport const insideSpan = {\n null: [attention, resolveText]\n}\n\n/** @satisfies {Extension['attentionMarkers']} */\nexport const attentionMarkers = {\n null: [42, 95]\n}\n\n/** @satisfies {Extension['disable']} */\nexport const disable = {\n null: []\n}\n","/**\n * @typedef {import('micromark-util-types').Create} Create\n * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').ParseContext} ParseContext\n * @typedef {import('micromark-util-types').ParseOptions} ParseOptions\n */\n\nimport {combineExtensions} from 'micromark-util-combine-extensions'\nimport {content} from './initialize/content.js'\nimport {document} from './initialize/document.js'\nimport {flow} from './initialize/flow.js'\nimport {text, string} from './initialize/text.js'\nimport {createTokenizer} from './create-tokenizer.js'\nimport * as defaultConstructs from './constructs.js'\n\n/**\n * @param {ParseOptions | null | undefined} [options]\n * @returns {ParseContext}\n */\nexport function parse(options) {\n const settings = options || {}\n const constructs =\n /** @type {FullNormalizedExtension} */\n combineExtensions([defaultConstructs, ...(settings.extensions || [])])\n\n /** @type {ParseContext} */\n const parser = {\n defined: [],\n lazy: {},\n constructs,\n content: create(content),\n document: create(document),\n flow: create(flow),\n string: create(string),\n text: create(text)\n }\n return parser\n\n /**\n * @param {InitialConstruct} initial\n */\n function create(initial) {\n return creator\n /** @type {Create} */\n function creator(from) {\n return createTokenizer(parser, initial, from)\n }\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Chunk} Chunk\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Encoding} Encoding\n * @typedef {import('micromark-util-types').Value} Value\n */\n\n/**\n * @callback Preprocessor\n * @param {Value} value\n * @param {Encoding | null | undefined} [encoding]\n * @param {boolean | null | undefined} [end=false]\n * @returns {Array}\n */\n\nconst search = /[\\0\\t\\n\\r]/g\n\n/**\n * @returns {Preprocessor}\n */\nexport function preprocess() {\n let column = 1\n let buffer = ''\n /** @type {boolean | undefined} */\n let start = true\n /** @type {boolean | undefined} */\n let atCarriageReturn\n return preprocessor\n\n /** @type {Preprocessor} */\n function preprocessor(value, encoding, end) {\n /** @type {Array} */\n const chunks = []\n /** @type {RegExpMatchArray | null} */\n let match\n /** @type {number} */\n let next\n /** @type {number} */\n let startPosition\n /** @type {number} */\n let endPosition\n /** @type {Code} */\n let code\n\n // @ts-expect-error `Buffer` does allow an encoding.\n value = buffer + value.toString(encoding)\n startPosition = 0\n buffer = ''\n if (start) {\n // To do: `markdown-rs` actually parses BOMs (byte order mark).\n if (value.charCodeAt(0) === 65279) {\n startPosition++\n }\n start = undefined\n }\n while (startPosition < value.length) {\n search.lastIndex = startPosition\n match = search.exec(value)\n endPosition =\n match && match.index !== undefined ? match.index : value.length\n code = value.charCodeAt(endPosition)\n if (!match) {\n buffer = value.slice(startPosition)\n break\n }\n if (code === 10 && startPosition === endPosition && atCarriageReturn) {\n chunks.push(-3)\n atCarriageReturn = undefined\n } else {\n if (atCarriageReturn) {\n chunks.push(-5)\n atCarriageReturn = undefined\n }\n if (startPosition < endPosition) {\n chunks.push(value.slice(startPosition, endPosition))\n column += endPosition - startPosition\n }\n switch (code) {\n case 0: {\n chunks.push(65533)\n column++\n break\n }\n case 9: {\n next = Math.ceil(column / 4) * 4\n chunks.push(-2)\n while (column++ < next) chunks.push(-1)\n break\n }\n case 10: {\n chunks.push(-4)\n column = 1\n break\n }\n default: {\n atCarriageReturn = true\n column = 1\n }\n }\n }\n startPosition = endPosition + 1\n }\n if (end) {\n if (atCarriageReturn) chunks.push(-5)\n if (buffer) chunks.push(buffer)\n chunks.push(null)\n }\n return chunks\n }\n}\n","/**\n * Turn the number (in string form as either hexa- or plain decimal) coming from\n * a numeric character reference into a character.\n *\n * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes\n * non-characters and control characters safe.\n *\n * @param {string} value\n * Value to decode.\n * @param {number} base\n * Numeric base.\n * @returns {string}\n * Character.\n */\nexport function decodeNumericCharacterReference(value, base) {\n const code = Number.parseInt(value, base)\n if (\n // C0 except for HT, LF, FF, CR, space.\n code < 9 ||\n code === 11 ||\n (code > 13 && code < 32) ||\n // Control character (DEL) of C0, and C1 controls.\n (code > 126 && code < 160) ||\n // Lone high surrogates and low surrogates.\n (code > 55295 && code < 57344) ||\n // Noncharacters.\n (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ ||\n (code & 65535) === 65535 ||\n (code & 65535) === 65534 /* eslint-enable no-bitwise */ ||\n // Out of range\n code > 1114111\n ) {\n return '\\uFFFD'\n }\n return String.fromCharCode(code)\n}\n","import {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {decodeNumericCharacterReference} from 'micromark-util-decode-numeric-character-reference'\nconst characterEscapeOrReference =\n /\\\\([!-/:-@[-`{-~])|&(#(?:\\d{1,7}|x[\\da-f]{1,6})|[\\da-z]{1,31});/gi\n\n/**\n * Decode markdown strings (which occur in places such as fenced code info\n * strings, destinations, labels, and titles).\n *\n * The “string” content type allows character escapes and -references.\n * This decodes those.\n *\n * @param {string} value\n * Value to decode.\n * @returns {string}\n * Decoded value.\n */\nexport function decodeString(value) {\n return value.replace(characterEscapeOrReference, decode)\n}\n\n/**\n * @param {string} $0\n * @param {string} $1\n * @param {string} $2\n * @returns {string}\n */\nfunction decode($0, $1, $2) {\n if ($1) {\n // Escape.\n return $1\n }\n\n // Reference.\n const head = $2.charCodeAt(0)\n if (head === 35) {\n const head = $2.charCodeAt(1)\n const hex = head === 120 || head === 88\n return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10)\n }\n return decodeNamedCharacterReference($2) || $0\n}\n","/**\n * @typedef {import('micromark-util-types').Encoding} Encoding\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').ParseOptions} ParseOptions\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Value} Value\n *\n * @typedef {import('unist').Parent} UnistParent\n * @typedef {import('unist').Point} Point\n *\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').Break} Break\n * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('mdast').Code} Code\n * @typedef {import('mdast').Definition} Definition\n * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('mdast').HTML} HTML\n * @typedef {import('mdast').Image} Image\n * @typedef {import('mdast').ImageReference} ImageReference\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('mdast').Link} Link\n * @typedef {import('mdast').LinkReference} LinkReference\n * @typedef {import('mdast').List} List\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('mdast').Text} Text\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n * @typedef {import('mdast').ReferenceType} ReferenceType\n * @typedef {import('../index.js').CompileData} CompileData\n */\n\n/**\n * @typedef {Root | Content} Node\n * @typedef {Extract} Parent\n *\n * @typedef {Omit & {type: 'fragment', children: Array}} Fragment\n */\n\n/**\n * @callback Transform\n * Extra transform, to change the AST afterwards.\n * @param {Root} tree\n * Tree to transform.\n * @returns {Root | undefined | null | void}\n * New tree or nothing (in which case the current tree is used).\n *\n * @callback Handle\n * Handle a token.\n * @param {CompileContext} this\n * Context.\n * @param {Token} token\n * Current token.\n * @returns {void}\n * Nothing.\n *\n * @typedef {Record} Handles\n * Token types mapping to handles\n *\n * @callback OnEnterError\n * Handle the case where the `right` token is open, but it is closed (by the\n * `left` token) or because we reached the end of the document.\n * @param {Omit} this\n * Context.\n * @param {Token | undefined} left\n * Left token.\n * @param {Token} right\n * Right token.\n * @returns {void}\n * Nothing.\n *\n * @callback OnExitError\n * Handle the case where the `right` token is open but it is closed by\n * exiting the `left` token.\n * @param {Omit} this\n * Context.\n * @param {Token} left\n * Left token.\n * @param {Token} right\n * Right token.\n * @returns {void}\n * Nothing.\n *\n * @typedef {[Token, OnEnterError | undefined]} TokenTuple\n * Open token on the stack, with an optional error handler for when\n * that token isn’t closed properly.\n */\n\n/**\n * @typedef Config\n * Configuration.\n *\n * We have our defaults, but extensions will add more.\n * @property {Array} canContainEols\n * Token types where line endings are used.\n * @property {Handles} enter\n * Opening handles.\n * @property {Handles} exit\n * Closing handles.\n * @property {Array} transforms\n * Tree transforms.\n *\n * @typedef {Partial} Extension\n * Change how markdown tokens from micromark are turned into mdast.\n *\n * @typedef CompileContext\n * mdast compiler context.\n * @property {Array} stack\n * Stack of nodes.\n * @property {Array} tokenStack\n * Stack of tokens.\n * @property {(key: Key) => CompileData[Key]} getData\n * Get data from the key/value store.\n * @property {(key: Key, value?: CompileData[Key]) => void} setData\n * Set data into the key/value store.\n * @property {(this: CompileContext) => void} buffer\n * Capture some of the output data.\n * @property {(this: CompileContext) => string} resume\n * Stop capturing and access the output data.\n * @property {(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter\n * Enter a token.\n * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit\n * Exit a token.\n * @property {TokenizeContext['sliceSerialize']} sliceSerialize\n * Get the string value of a token.\n * @property {Config} config\n * Configuration.\n *\n * @typedef FromMarkdownOptions\n * Configuration for how to build mdast.\n * @property {Array> | null | undefined} [mdastExtensions]\n * Extensions for this utility to change how tokens are turned into a tree.\n *\n * @typedef {ParseOptions & FromMarkdownOptions} Options\n * Configuration.\n */\n\n// To do: micromark: create a registry of tokens?\n// To do: next major: don’t return given `Node` from `enter`.\n// To do: next major: remove setter/getter.\n\nimport {toString} from 'mdast-util-to-string'\nimport {parse} from 'micromark/lib/parse.js'\nimport {preprocess} from 'micromark/lib/preprocess.js'\nimport {postprocess} from 'micromark/lib/postprocess.js'\nimport {decodeNumericCharacterReference} from 'micromark-util-decode-numeric-character-reference'\nimport {decodeString} from 'micromark-util-decode-string'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {stringifyPosition} from 'unist-util-stringify-position'\nconst own = {}.hasOwnProperty\n\n/**\n * @param value\n * Markdown to parse.\n * @param encoding\n * Character encoding for when `value` is `Buffer`.\n * @param options\n * Configuration.\n * @returns\n * mdast tree.\n */\nexport const fromMarkdown =\n /**\n * @type {(\n * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) &\n * ((value: Value, options?: Options | null | undefined) => Root)\n * )}\n */\n\n /**\n * @param {Value} value\n * @param {Encoding | Options | null | undefined} [encoding]\n * @param {Options | null | undefined} [options]\n * @returns {Root}\n */\n function (value, encoding, options) {\n if (typeof encoding !== 'string') {\n options = encoding\n encoding = undefined\n }\n return compiler(options)(\n postprocess(\n parse(options).document().write(preprocess()(value, encoding, true))\n )\n )\n }\n\n/**\n * Note this compiler only understand complete buffering, not streaming.\n *\n * @param {Options | null | undefined} [options]\n */\nfunction compiler(options) {\n /** @type {Config} */\n const config = {\n transforms: [],\n canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'],\n enter: {\n autolink: opener(link),\n autolinkProtocol: onenterdata,\n autolinkEmail: onenterdata,\n atxHeading: opener(heading),\n blockQuote: opener(blockQuote),\n characterEscape: onenterdata,\n characterReference: onenterdata,\n codeFenced: opener(codeFlow),\n codeFencedFenceInfo: buffer,\n codeFencedFenceMeta: buffer,\n codeIndented: opener(codeFlow, buffer),\n codeText: opener(codeText, buffer),\n codeTextData: onenterdata,\n data: onenterdata,\n codeFlowValue: onenterdata,\n definition: opener(definition),\n definitionDestinationString: buffer,\n definitionLabelString: buffer,\n definitionTitleString: buffer,\n emphasis: opener(emphasis),\n hardBreakEscape: opener(hardBreak),\n hardBreakTrailing: opener(hardBreak),\n htmlFlow: opener(html, buffer),\n htmlFlowData: onenterdata,\n htmlText: opener(html, buffer),\n htmlTextData: onenterdata,\n image: opener(image),\n label: buffer,\n link: opener(link),\n listItem: opener(listItem),\n listItemValue: onenterlistitemvalue,\n listOrdered: opener(list, onenterlistordered),\n listUnordered: opener(list),\n paragraph: opener(paragraph),\n reference: onenterreference,\n referenceString: buffer,\n resourceDestinationString: buffer,\n resourceTitleString: buffer,\n setextHeading: opener(heading),\n strong: opener(strong),\n thematicBreak: opener(thematicBreak)\n },\n exit: {\n atxHeading: closer(),\n atxHeadingSequence: onexitatxheadingsequence,\n autolink: closer(),\n autolinkEmail: onexitautolinkemail,\n autolinkProtocol: onexitautolinkprotocol,\n blockQuote: closer(),\n characterEscapeValue: onexitdata,\n characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,\n characterReferenceMarkerNumeric: onexitcharacterreferencemarker,\n characterReferenceValue: onexitcharacterreferencevalue,\n codeFenced: closer(onexitcodefenced),\n codeFencedFence: onexitcodefencedfence,\n codeFencedFenceInfo: onexitcodefencedfenceinfo,\n codeFencedFenceMeta: onexitcodefencedfencemeta,\n codeFlowValue: onexitdata,\n codeIndented: closer(onexitcodeindented),\n codeText: closer(onexitcodetext),\n codeTextData: onexitdata,\n data: onexitdata,\n definition: closer(),\n definitionDestinationString: onexitdefinitiondestinationstring,\n definitionLabelString: onexitdefinitionlabelstring,\n definitionTitleString: onexitdefinitiontitlestring,\n emphasis: closer(),\n hardBreakEscape: closer(onexithardbreak),\n hardBreakTrailing: closer(onexithardbreak),\n htmlFlow: closer(onexithtmlflow),\n htmlFlowData: onexitdata,\n htmlText: closer(onexithtmltext),\n htmlTextData: onexitdata,\n image: closer(onexitimage),\n label: onexitlabel,\n labelText: onexitlabeltext,\n lineEnding: onexitlineending,\n link: closer(onexitlink),\n listItem: closer(),\n listOrdered: closer(),\n listUnordered: closer(),\n paragraph: closer(),\n referenceString: onexitreferencestring,\n resourceDestinationString: onexitresourcedestinationstring,\n resourceTitleString: onexitresourcetitlestring,\n resource: onexitresource,\n setextHeading: closer(onexitsetextheading),\n setextHeadingLineSequence: onexitsetextheadinglinesequence,\n setextHeadingText: onexitsetextheadingtext,\n strong: closer(),\n thematicBreak: closer()\n }\n }\n configure(config, (options || {}).mdastExtensions || [])\n\n /** @type {CompileData} */\n const data = {}\n return compile\n\n /**\n * Turn micromark events into an mdast tree.\n *\n * @param {Array} events\n * Events.\n * @returns {Root}\n * mdast tree.\n */\n function compile(events) {\n /** @type {Root} */\n let tree = {\n type: 'root',\n children: []\n }\n /** @type {Omit} */\n const context = {\n stack: [tree],\n tokenStack: [],\n config,\n enter,\n exit,\n buffer,\n resume,\n setData,\n getData\n }\n /** @type {Array} */\n const listStack = []\n let index = -1\n while (++index < events.length) {\n // We preprocess lists to add `listItem` tokens, and to infer whether\n // items the list itself are spread out.\n if (\n events[index][1].type === 'listOrdered' ||\n events[index][1].type === 'listUnordered'\n ) {\n if (events[index][0] === 'enter') {\n listStack.push(index)\n } else {\n const tail = listStack.pop()\n index = prepareList(events, tail, index)\n }\n }\n }\n index = -1\n while (++index < events.length) {\n const handler = config[events[index][0]]\n if (own.call(handler, events[index][1].type)) {\n handler[events[index][1].type].call(\n Object.assign(\n {\n sliceSerialize: events[index][2].sliceSerialize\n },\n context\n ),\n events[index][1]\n )\n }\n }\n\n // Handle tokens still being open.\n if (context.tokenStack.length > 0) {\n const tail = context.tokenStack[context.tokenStack.length - 1]\n const handler = tail[1] || defaultOnError\n handler.call(context, undefined, tail[0])\n }\n\n // Figure out `root` position.\n tree.position = {\n start: point(\n events.length > 0\n ? events[0][1].start\n : {\n line: 1,\n column: 1,\n offset: 0\n }\n ),\n end: point(\n events.length > 0\n ? events[events.length - 2][1].end\n : {\n line: 1,\n column: 1,\n offset: 0\n }\n )\n }\n\n // Call transforms.\n index = -1\n while (++index < config.transforms.length) {\n tree = config.transforms[index](tree) || tree\n }\n return tree\n }\n\n /**\n * @param {Array} events\n * @param {number} start\n * @param {number} length\n * @returns {number}\n */\n function prepareList(events, start, length) {\n let index = start - 1\n let containerBalance = -1\n let listSpread = false\n /** @type {Token | undefined} */\n let listItem\n /** @type {number | undefined} */\n let lineIndex\n /** @type {number | undefined} */\n let firstBlankLineIndex\n /** @type {boolean | undefined} */\n let atMarker\n while (++index <= length) {\n const event = events[index]\n if (\n event[1].type === 'listUnordered' ||\n event[1].type === 'listOrdered' ||\n event[1].type === 'blockQuote'\n ) {\n if (event[0] === 'enter') {\n containerBalance++\n } else {\n containerBalance--\n }\n atMarker = undefined\n } else if (event[1].type === 'lineEndingBlank') {\n if (event[0] === 'enter') {\n if (\n listItem &&\n !atMarker &&\n !containerBalance &&\n !firstBlankLineIndex\n ) {\n firstBlankLineIndex = index\n }\n atMarker = undefined\n }\n } else if (\n event[1].type === 'linePrefix' ||\n event[1].type === 'listItemValue' ||\n event[1].type === 'listItemMarker' ||\n event[1].type === 'listItemPrefix' ||\n event[1].type === 'listItemPrefixWhitespace'\n ) {\n // Empty.\n } else {\n atMarker = undefined\n }\n if (\n (!containerBalance &&\n event[0] === 'enter' &&\n event[1].type === 'listItemPrefix') ||\n (containerBalance === -1 &&\n event[0] === 'exit' &&\n (event[1].type === 'listUnordered' ||\n event[1].type === 'listOrdered'))\n ) {\n if (listItem) {\n let tailIndex = index\n lineIndex = undefined\n while (tailIndex--) {\n const tailEvent = events[tailIndex]\n if (\n tailEvent[1].type === 'lineEnding' ||\n tailEvent[1].type === 'lineEndingBlank'\n ) {\n if (tailEvent[0] === 'exit') continue\n if (lineIndex) {\n events[lineIndex][1].type = 'lineEndingBlank'\n listSpread = true\n }\n tailEvent[1].type = 'lineEnding'\n lineIndex = tailIndex\n } else if (\n tailEvent[1].type === 'linePrefix' ||\n tailEvent[1].type === 'blockQuotePrefix' ||\n tailEvent[1].type === 'blockQuotePrefixWhitespace' ||\n tailEvent[1].type === 'blockQuoteMarker' ||\n tailEvent[1].type === 'listItemIndent'\n ) {\n // Empty\n } else {\n break\n }\n }\n if (\n firstBlankLineIndex &&\n (!lineIndex || firstBlankLineIndex < lineIndex)\n ) {\n listItem._spread = true\n }\n\n // Fix position.\n listItem.end = Object.assign(\n {},\n lineIndex ? events[lineIndex][1].start : event[1].end\n )\n events.splice(lineIndex || index, 0, ['exit', listItem, event[2]])\n index++\n length++\n }\n\n // Create a new list item.\n if (event[1].type === 'listItemPrefix') {\n listItem = {\n type: 'listItem',\n _spread: false,\n start: Object.assign({}, event[1].start),\n // @ts-expect-error: we’ll add `end` in a second.\n end: undefined\n }\n // @ts-expect-error: `listItem` is most definitely defined, TS...\n events.splice(index, 0, ['enter', listItem, event[2]])\n index++\n length++\n firstBlankLineIndex = undefined\n atMarker = true\n }\n }\n }\n events[start][1]._spread = listSpread\n return length\n }\n\n /**\n * Set data.\n *\n * @template {keyof CompileData} Key\n * Field type.\n * @param {Key} key\n * Key of field.\n * @param {CompileData[Key]} [value]\n * New value.\n * @returns {void}\n * Nothing.\n */\n function setData(key, value) {\n data[key] = value\n }\n\n /**\n * Get data.\n *\n * @template {keyof CompileData} Key\n * Field type.\n * @param {Key} key\n * Key of field.\n * @returns {CompileData[Key]}\n * Value.\n */\n function getData(key) {\n return data[key]\n }\n\n /**\n * Create an opener handle.\n *\n * @param {(token: Token) => Node} create\n * Create a node.\n * @param {Handle} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function opener(create, and) {\n return open\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {void}\n */\n function open(token) {\n enter.call(this, create(token), token)\n if (and) and.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * @returns {void}\n */\n function buffer() {\n this.stack.push({\n type: 'fragment',\n children: []\n })\n }\n\n /**\n * @template {Node} Kind\n * Node type.\n * @this {CompileContext}\n * Context.\n * @param {Kind} node\n * Node to enter.\n * @param {Token} token\n * Corresponding token.\n * @param {OnEnterError | undefined} [errorHandler]\n * Handle the case where this token is open, but it is closed by something else.\n * @returns {Kind}\n * The given node.\n */\n function enter(node, token, errorHandler) {\n const parent = this.stack[this.stack.length - 1]\n // @ts-expect-error: Assume `Node` can exist as a child of `parent`.\n parent.children.push(node)\n this.stack.push(node)\n this.tokenStack.push([token, errorHandler])\n // @ts-expect-error: `end` will be patched later.\n node.position = {\n start: point(token.start)\n }\n return node\n }\n\n /**\n * Create a closer handle.\n *\n * @param {Handle} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function closer(and) {\n return close\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {void}\n */\n function close(token) {\n if (and) and.call(this, token)\n exit.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * Context.\n * @param {Token} token\n * Corresponding token.\n * @param {OnExitError | undefined} [onExitError]\n * Handle the case where another token is open.\n * @returns {Node}\n * The closed node.\n */\n function exit(token, onExitError) {\n const node = this.stack.pop()\n const open = this.tokenStack.pop()\n if (!open) {\n throw new Error(\n 'Cannot close `' +\n token.type +\n '` (' +\n stringifyPosition({\n start: token.start,\n end: token.end\n }) +\n '): it’s not open'\n )\n } else if (open[0].type !== token.type) {\n if (onExitError) {\n onExitError.call(this, token, open[0])\n } else {\n const handler = open[1] || defaultOnError\n handler.call(this, token, open[0])\n }\n }\n node.position.end = point(token.end)\n return node\n }\n\n /**\n * @this {CompileContext}\n * @returns {string}\n */\n function resume() {\n return toString(this.stack.pop())\n }\n\n //\n // Handlers.\n //\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistordered() {\n setData('expectingFirstListItemValue', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistitemvalue(token) {\n if (getData('expectingFirstListItemValue')) {\n const ancestor = this.stack[this.stack.length - 2]\n ancestor.start = Number.parseInt(this.sliceSerialize(token), 10)\n setData('expectingFirstListItemValue')\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfenceinfo() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.lang = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfencemeta() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.meta = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfence() {\n // Exit if this is the closing fence.\n if (getData('flowCodeInside')) return\n this.buffer()\n setData('flowCodeInside', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefenced() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data.replace(/^(\\r?\\n|\\r)|(\\r?\\n|\\r)$/g, '')\n setData('flowCodeInside')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodeindented() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data.replace(/(\\r?\\n|\\r)$/g, '')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitionlabelstring(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiontitlestring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.title = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiondestinationstring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.url = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitatxheadingsequence(token) {\n const node = this.stack[this.stack.length - 1]\n if (!node.depth) {\n const depth = this.sliceSerialize(token).length\n node.depth = depth\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadingtext() {\n setData('setextHeadingSlurpLineEnding', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadinglinesequence(token) {\n const node = this.stack[this.stack.length - 1]\n node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheading() {\n setData('setextHeadingSlurpLineEnding')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterdata(token) {\n const node = this.stack[this.stack.length - 1]\n let tail = node.children[node.children.length - 1]\n if (!tail || tail.type !== 'text') {\n // Add a new text node.\n tail = text()\n // @ts-expect-error: we’ll add `end` later.\n tail.position = {\n start: point(token.start)\n }\n // @ts-expect-error: Assume `parent` accepts `text`.\n node.children.push(tail)\n }\n this.stack.push(tail)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitdata(token) {\n const tail = this.stack.pop()\n tail.value += this.sliceSerialize(token)\n tail.position.end = point(token.end)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlineending(token) {\n const context = this.stack[this.stack.length - 1]\n // If we’re at a hard break, include the line ending in there.\n if (getData('atHardBreak')) {\n const tail = context.children[context.children.length - 1]\n tail.position.end = point(token.end)\n setData('atHardBreak')\n return\n }\n if (\n !getData('setextHeadingSlurpLineEnding') &&\n config.canContainEols.includes(context.type)\n ) {\n onenterdata.call(this, token)\n onexitdata.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithardbreak() {\n setData('atHardBreak', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmlflow() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmltext() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcodetext() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlink() {\n const node = this.stack[this.stack.length - 1]\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n // To do: clean.\n if (getData('inReference')) {\n /** @type {ReferenceType} */\n const referenceType = getData('referenceType') || 'shortcut'\n node.type += 'Reference'\n // @ts-expect-error: mutate.\n node.referenceType = referenceType\n // @ts-expect-error: mutate.\n delete node.url\n delete node.title\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier\n // @ts-expect-error: mutate.\n delete node.label\n }\n setData('referenceType')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitimage() {\n const node = this.stack[this.stack.length - 1]\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n // To do: clean.\n if (getData('inReference')) {\n /** @type {ReferenceType} */\n const referenceType = getData('referenceType') || 'shortcut'\n node.type += 'Reference'\n // @ts-expect-error: mutate.\n node.referenceType = referenceType\n // @ts-expect-error: mutate.\n delete node.url\n delete node.title\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier\n // @ts-expect-error: mutate.\n delete node.label\n }\n setData('referenceType')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabeltext(token) {\n const string = this.sliceSerialize(token)\n const ancestor = this.stack[this.stack.length - 2]\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n ancestor.label = decodeString(string)\n // @ts-expect-error: same as above.\n ancestor.identifier = normalizeIdentifier(string).toLowerCase()\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabel() {\n const fragment = this.stack[this.stack.length - 1]\n const value = this.resume()\n const node = this.stack[this.stack.length - 1]\n // Assume a reference.\n setData('inReference', true)\n if (node.type === 'link') {\n /** @type {Array} */\n // @ts-expect-error: Assume static phrasing content.\n const children = fragment.children\n node.children = children\n } else {\n node.alt = value\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcedestinationstring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.url = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcetitlestring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.title = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresource() {\n setData('inReference')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterreference() {\n setData('referenceType', 'collapsed')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitreferencestring(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n node.label = label\n // @ts-expect-error: same as above.\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n setData('referenceType', 'full')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcharacterreferencemarker(token) {\n setData('characterReferenceType', token.type)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcharacterreferencevalue(token) {\n const data = this.sliceSerialize(token)\n const type = getData('characterReferenceType')\n /** @type {string} */\n let value\n if (type) {\n value = decodeNumericCharacterReference(\n data,\n type === 'characterReferenceMarkerNumeric' ? 10 : 16\n )\n setData('characterReferenceType')\n } else {\n const result = decodeNamedCharacterReference(data)\n value = result\n }\n const tail = this.stack.pop()\n tail.value += value\n tail.position.end = point(token.end)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkprotocol(token) {\n onexitdata.call(this, token)\n const node = this.stack[this.stack.length - 1]\n node.url = this.sliceSerialize(token)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkemail(token) {\n onexitdata.call(this, token)\n const node = this.stack[this.stack.length - 1]\n node.url = 'mailto:' + this.sliceSerialize(token)\n }\n\n //\n // Creaters.\n //\n\n /** @returns {Blockquote} */\n function blockQuote() {\n return {\n type: 'blockquote',\n children: []\n }\n }\n\n /** @returns {Code} */\n function codeFlow() {\n return {\n type: 'code',\n lang: null,\n meta: null,\n value: ''\n }\n }\n\n /** @returns {InlineCode} */\n function codeText() {\n return {\n type: 'inlineCode',\n value: ''\n }\n }\n\n /** @returns {Definition} */\n function definition() {\n return {\n type: 'definition',\n identifier: '',\n label: null,\n title: null,\n url: ''\n }\n }\n\n /** @returns {Emphasis} */\n function emphasis() {\n return {\n type: 'emphasis',\n children: []\n }\n }\n\n /** @returns {Heading} */\n function heading() {\n // @ts-expect-error `depth` will be set later.\n return {\n type: 'heading',\n depth: undefined,\n children: []\n }\n }\n\n /** @returns {Break} */\n function hardBreak() {\n return {\n type: 'break'\n }\n }\n\n /** @returns {HTML} */\n function html() {\n return {\n type: 'html',\n value: ''\n }\n }\n\n /** @returns {Image} */\n function image() {\n return {\n type: 'image',\n title: null,\n url: '',\n alt: null\n }\n }\n\n /** @returns {Link} */\n function link() {\n return {\n type: 'link',\n title: null,\n url: '',\n children: []\n }\n }\n\n /**\n * @param {Token} token\n * @returns {List}\n */\n function list(token) {\n return {\n type: 'list',\n ordered: token.type === 'listOrdered',\n start: null,\n spread: token._spread,\n children: []\n }\n }\n\n /**\n * @param {Token} token\n * @returns {ListItem}\n */\n function listItem(token) {\n return {\n type: 'listItem',\n spread: token._spread,\n checked: null,\n children: []\n }\n }\n\n /** @returns {Paragraph} */\n function paragraph() {\n return {\n type: 'paragraph',\n children: []\n }\n }\n\n /** @returns {Strong} */\n function strong() {\n return {\n type: 'strong',\n children: []\n }\n }\n\n /** @returns {Text} */\n function text() {\n return {\n type: 'text',\n value: ''\n }\n }\n\n /** @returns {ThematicBreak} */\n function thematicBreak() {\n return {\n type: 'thematicBreak'\n }\n }\n}\n\n/**\n * Copy a point-like value.\n *\n * @param {Point} d\n * Point-like value.\n * @returns {Point}\n * unist point.\n */\nfunction point(d) {\n return {\n line: d.line,\n column: d.column,\n offset: d.offset\n }\n}\n\n/**\n * @param {Config} combined\n * @param {Array>} extensions\n * @returns {void}\n */\nfunction configure(combined, extensions) {\n let index = -1\n while (++index < extensions.length) {\n const value = extensions[index]\n if (Array.isArray(value)) {\n configure(combined, value)\n } else {\n extension(combined, value)\n }\n }\n}\n\n/**\n * @param {Config} combined\n * @param {Extension} extension\n * @returns {void}\n */\nfunction extension(combined, extension) {\n /** @type {keyof Extension} */\n let key\n for (key in extension) {\n if (own.call(extension, key)) {\n if (key === 'canContainEols') {\n const right = extension[key]\n if (right) {\n combined[key].push(...right)\n }\n } else if (key === 'transforms') {\n const right = extension[key]\n if (right) {\n combined[key].push(...right)\n }\n } else if (key === 'enter' || key === 'exit') {\n const right = extension[key]\n if (right) {\n Object.assign(combined[key], right)\n }\n }\n }\n }\n}\n\n/** @type {OnEnterError} */\nfunction defaultOnError(left, right) {\n if (left) {\n throw new Error(\n 'Cannot close `' +\n left.type +\n '` (' +\n stringifyPosition({\n start: left.start,\n end: left.end\n }) +\n '): a different token (`' +\n right.type +\n '`, ' +\n stringifyPosition({\n start: right.start,\n end: right.end\n }) +\n ') is open'\n )\n } else {\n throw new Error(\n 'Cannot close document, a token (`' +\n right.type +\n '`, ' +\n stringifyPosition({\n start: right.start,\n end: right.end\n }) +\n ') is still open'\n )\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Event} Event\n */\n\nimport {subtokenize} from 'micromark-util-subtokenize'\n\n/**\n * @param {Array} events\n * @returns {Array}\n */\nexport function postprocess(events) {\n while (!subtokenize(events)) {\n // Empty\n }\n return events\n}\n","/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast-util-from-markdown').Options} Options\n */\n\nimport {fromMarkdown} from 'mdast-util-from-markdown'\n\n/**\n * @this {import('unified').Processor}\n * @type {import('unified').Plugin<[Options?] | void[], string, Root>}\n */\nexport default function remarkParse(options) {\n /** @type {import('unified').ParserFunction} */\n const parser = (doc) => {\n // Assume options.\n const settings = /** @type {Options} */ (this.data('settings'))\n\n return fromMarkdown(\n doc,\n Object.assign({}, settings, options, {\n // Note: these options are not in the readme.\n // The goal is for them to be set by plugins on `data` instead of being\n // passed by users.\n extensions: this.data('micromarkExtensions') || [],\n mdastExtensions: this.data('fromMarkdownExtensions') || []\n })\n )\n }\n\n Object.assign(this, {Parser: parser})\n}\n","import {asciiAlphanumeric} from 'micromark-util-character'\nimport {encode} from 'micromark-util-encode'\n/**\n * Make a value safe for injection as a URL.\n *\n * This encodes unsafe characters with percent-encoding and skips already\n * encoded sequences (see `normalizeUri`).\n * Further unsafe characters are encoded as character references (see\n * `micromark-util-encode`).\n *\n * A regex of allowed protocols can be given, in which case the URL is\n * sanitized.\n * For example, `/^(https?|ircs?|mailto|xmpp)$/i` can be used for `a[href]`, or\n * `/^https?$/i` for `img[src]` (this is what `github.com` allows).\n * If the URL includes an unknown protocol (one not matched by `protocol`, such\n * as a dangerous example, `javascript:`), the value is ignored.\n *\n * @param {string | undefined} url\n * URI to sanitize.\n * @param {RegExp | null | undefined} [protocol]\n * Allowed protocols.\n * @returns {string}\n * Sanitized URI.\n */\nexport function sanitizeUri(url, protocol) {\n const value = encode(normalizeUri(url || ''))\n if (!protocol) {\n return value\n }\n const colon = value.indexOf(':')\n const questionMark = value.indexOf('?')\n const numberSign = value.indexOf('#')\n const slash = value.indexOf('/')\n if (\n // If there is no protocol, it’s relative.\n colon < 0 ||\n // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.\n (slash > -1 && colon > slash) ||\n (questionMark > -1 && colon > questionMark) ||\n (numberSign > -1 && colon > numberSign) ||\n // It is a protocol, it should be allowed.\n protocol.test(value.slice(0, colon))\n ) {\n return value\n }\n return ''\n}\n\n/**\n * Normalize a URL.\n *\n * Encode unsafe characters with percent-encoding, skipping already encoded\n * sequences.\n *\n * @param {string} value\n * URI to normalize.\n * @returns {string}\n * Normalized URI.\n */\nexport function normalizeUri(value) {\n /** @type {Array} */\n const result = []\n let index = -1\n let start = 0\n let skip = 0\n while (++index < value.length) {\n const code = value.charCodeAt(index)\n /** @type {string} */\n let replace = ''\n\n // A correct percent encoded value.\n if (\n code === 37 &&\n asciiAlphanumeric(value.charCodeAt(index + 1)) &&\n asciiAlphanumeric(value.charCodeAt(index + 2))\n ) {\n skip = 2\n }\n // ASCII.\n else if (code < 128) {\n if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code))) {\n replace = String.fromCharCode(code)\n }\n }\n // Astral.\n else if (code > 55295 && code < 57344) {\n const next = value.charCodeAt(index + 1)\n\n // A correct surrogate pair.\n if (code < 56320 && next > 56319 && next < 57344) {\n replace = String.fromCharCode(code, next)\n skip = 1\n }\n // Lone surrogate.\n else {\n replace = '\\uFFFD'\n }\n }\n // Unicode.\n else {\n replace = String.fromCharCode(code)\n }\n if (replace) {\n result.push(value.slice(start, index), encodeURIComponent(replace))\n start = index + skip + 1\n replace = ''\n }\n if (skip) {\n index += skip\n skip = 0\n }\n }\n return result.join('') + value.slice(start)\n}\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Parent} Parent\n */\n\n/**\n * @typedef {Record} Props\n * @typedef {null | undefined | string | Props | TestFunctionAnything | Array} Test\n * Check for an arbitrary node, unaware of TypeScript inferral.\n *\n * @callback TestFunctionAnything\n * Check if a node passes a test, unaware of TypeScript inferral.\n * @param {unknown} this\n * The given context.\n * @param {Node} node\n * A node.\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {boolean | void}\n * Whether this node passes the test.\n */\n\n/**\n * @template {Node} Kind\n * Node type.\n * @typedef {Kind['type'] | Partial | TestFunctionPredicate | Array | TestFunctionPredicate>} PredicateTest\n * Check for a node that can be inferred by TypeScript.\n */\n\n/**\n * Check if a node passes a certain test.\n *\n * @template {Node} Kind\n * Node type.\n * @callback TestFunctionPredicate\n * Complex test function for a node that can be inferred by TypeScript.\n * @param {Node} node\n * A node.\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {node is Kind}\n * Whether this node passes the test.\n */\n\n/**\n * @callback AssertAnything\n * Check that an arbitrary value is a node, unaware of TypeScript inferral.\n * @param {unknown} [node]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {boolean}\n * Whether this is a node and passes a test.\n */\n\n/**\n * Check if a node is a node and passes a certain node test.\n *\n * @template {Node} Kind\n * Node type.\n * @callback AssertPredicate\n * Check that an arbitrary value is a specific node, aware of TypeScript.\n * @param {unknown} [node]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {node is Kind}\n * Whether this is a node and passes a test.\n */\n\n/**\n * Check if `node` is a `Node` and whether it passes the given test.\n *\n * @param node\n * Thing to check, typically `Node`.\n * @param test\n * A check for a specific node.\n * @param index\n * The node’s position in its parent.\n * @param parent\n * The node’s parent.\n * @returns\n * Whether `node` is a node and passes a test.\n */\nexport const is =\n /**\n * @type {(\n * (() => false) &\n * ((node: unknown, test: PredicateTest, index: number, parent: Parent, context?: unknown) => node is Kind) &\n * ((node: unknown, test: PredicateTest, index?: null | undefined, parent?: null | undefined, context?: unknown) => node is Kind) &\n * ((node: unknown, test: Test, index: number, parent: Parent, context?: unknown) => boolean) &\n * ((node: unknown, test?: Test, index?: null | undefined, parent?: null | undefined, context?: unknown) => boolean)\n * )}\n */\n (\n /**\n * @param {unknown} [node]\n * @param {Test} [test]\n * @param {number | null | undefined} [index]\n * @param {Parent | null | undefined} [parent]\n * @param {unknown} [context]\n * @returns {boolean}\n */\n // eslint-disable-next-line max-params\n function is(node, test, index, parent, context) {\n const check = convert(test)\n\n if (\n index !== undefined &&\n index !== null &&\n (typeof index !== 'number' ||\n index < 0 ||\n index === Number.POSITIVE_INFINITY)\n ) {\n throw new Error('Expected positive finite index')\n }\n\n if (\n parent !== undefined &&\n parent !== null &&\n (!is(parent) || !parent.children)\n ) {\n throw new Error('Expected parent node')\n }\n\n if (\n (parent === undefined || parent === null) !==\n (index === undefined || index === null)\n ) {\n throw new Error('Expected both parent and index')\n }\n\n // @ts-expect-error Looks like a node.\n return node && node.type && typeof node.type === 'string'\n ? Boolean(check.call(context, node, index, parent))\n : false\n }\n )\n\n/**\n * Generate an assertion from a test.\n *\n * Useful if you’re going to test many nodes, for example when creating a\n * utility where something else passes a compatible test.\n *\n * The created function is a bit faster because it expects valid input only:\n * a `node`, `index`, and `parent`.\n *\n * @param test\n * * when nullish, checks if `node` is a `Node`.\n * * when `string`, works like passing `(node) => node.type === test`.\n * * when `function` checks if function passed the node is true.\n * * when `object`, checks that all keys in test are in node, and that they have (strictly) equal values.\n * * when `array`, checks if any one of the subtests pass.\n * @returns\n * An assertion.\n */\nexport const convert =\n /**\n * @type {(\n * ((test: PredicateTest) => AssertPredicate) &\n * ((test?: Test) => AssertAnything)\n * )}\n */\n (\n /**\n * @param {Test} [test]\n * @returns {AssertAnything}\n */\n function (test) {\n if (test === undefined || test === null) {\n return ok\n }\n\n if (typeof test === 'string') {\n return typeFactory(test)\n }\n\n if (typeof test === 'object') {\n return Array.isArray(test) ? anyFactory(test) : propsFactory(test)\n }\n\n if (typeof test === 'function') {\n return castFactory(test)\n }\n\n throw new Error('Expected function, string, or object as test')\n }\n )\n\n/**\n * @param {Array} tests\n * @returns {AssertAnything}\n */\nfunction anyFactory(tests) {\n /** @type {Array} */\n const checks = []\n let index = -1\n\n while (++index < tests.length) {\n checks[index] = convert(tests[index])\n }\n\n return castFactory(any)\n\n /**\n * @this {unknown}\n * @param {Array} parameters\n * @returns {boolean}\n */\n function any(...parameters) {\n let index = -1\n\n while (++index < checks.length) {\n if (checks[index].call(this, ...parameters)) return true\n }\n\n return false\n }\n}\n\n/**\n * Turn an object into a test for a node with a certain fields.\n *\n * @param {Props} check\n * @returns {AssertAnything}\n */\nfunction propsFactory(check) {\n return castFactory(all)\n\n /**\n * @param {Node} node\n * @returns {boolean}\n */\n function all(node) {\n /** @type {string} */\n let key\n\n for (key in check) {\n // @ts-expect-error: hush, it sure works as an index.\n if (node[key] !== check[key]) return false\n }\n\n return true\n }\n}\n\n/**\n * Turn a string into a test for a node with a certain type.\n *\n * @param {string} check\n * @returns {AssertAnything}\n */\nfunction typeFactory(check) {\n return castFactory(type)\n\n /**\n * @param {Node} node\n */\n function type(node) {\n return node && node.type === check\n }\n}\n\n/**\n * Turn a custom test into a test for a node that passes that test.\n *\n * @param {TestFunctionAnything} check\n * @returns {AssertAnything}\n */\nfunction castFactory(check) {\n return assertion\n\n /**\n * @this {unknown}\n * @param {unknown} node\n * @param {Array} parameters\n * @returns {boolean}\n */\n function assertion(node, ...parameters) {\n return Boolean(\n node &&\n typeof node === 'object' &&\n 'type' in node &&\n // @ts-expect-error: fine.\n Boolean(check.call(this, node, ...parameters))\n )\n }\n}\n\nfunction ok() {\n return true\n}\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Parent} Parent\n * @typedef {import('unist-util-is').Test} Test\n */\n\n/**\n * @typedef {boolean | 'skip'} Action\n * Union of the action types.\n *\n * @typedef {number} Index\n * Move to the sibling at `index` next (after node itself is completely\n * traversed).\n *\n * Useful if mutating the tree, such as removing the node the visitor is\n * currently on, or any of its previous siblings.\n * Results less than 0 or greater than or equal to `children.length` stop\n * traversing the parent.\n *\n * @typedef {[(Action | null | undefined | void)?, (Index | null | undefined)?]} ActionTuple\n * List with one or two values, the first an action, the second an index.\n *\n * @typedef {Action | ActionTuple | Index | null | undefined | void} VisitorResult\n * Any value that can be returned from a visitor.\n */\n\n/**\n * @template {Node} [Visited=Node]\n * Visited node type.\n * @template {Parent} [Ancestor=Parent]\n * Ancestor type.\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform the parent of node (the last of `ancestors`).\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of an ancestor still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Array} ancestors\n * Ancestors of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n */\n\n/**\n * @template {Node} [Tree=Node]\n * Tree type.\n * @template {Test} [Check=string]\n * Test type.\n * @typedef {Visitor, Check>, Extract, Parent>>} BuildVisitor\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parents`.\n */\n\nimport {convert} from 'unist-util-is'\nimport {color} from './color.js'\n\n/**\n * Continue traversing as normal.\n */\nexport const CONTINUE = true\n\n/**\n * Stop traversing immediately.\n */\nexport const EXIT = false\n\n/**\n * Do not traverse this node’s children.\n */\nexport const SKIP = 'skip'\n\n/**\n * Visit nodes, with ancestral information.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @param tree\n * Tree to traverse.\n * @param test\n * `unist-util-is`-compatible test\n * @param visitor\n * Handle each node.\n * @param reverse\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns\n * Nothing.\n */\nexport const visitParents =\n /**\n * @type {(\n * ((tree: Tree, test: Check, visitor: BuildVisitor, reverse?: boolean | null | undefined) => void) &\n * ((tree: Tree, visitor: BuildVisitor, reverse?: boolean | null | undefined) => void)\n * )}\n */\n (\n /**\n * @param {Node} tree\n * @param {Test} test\n * @param {Visitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {void}\n */\n function (tree, test, visitor, reverse) {\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor\n // @ts-expect-error no visitor given, so `visitor` is test.\n visitor = test\n test = null\n }\n\n const is = convert(test)\n const step = reverse ? -1 : 1\n\n factory(tree, undefined, [])()\n\n /**\n * @param {Node} node\n * @param {number | undefined} index\n * @param {Array} parents\n */\n function factory(node, index, parents) {\n /** @type {Record} */\n // @ts-expect-error: hush\n const value = node && typeof node === 'object' ? node : {}\n\n if (typeof value.type === 'string') {\n const name =\n // `hast`\n typeof value.tagName === 'string'\n ? value.tagName\n : // `xast`\n typeof value.name === 'string'\n ? value.name\n : undefined\n\n Object.defineProperty(visit, 'name', {\n value:\n 'node (' + color(node.type + (name ? '<' + name + '>' : '')) + ')'\n })\n }\n\n return visit\n\n function visit() {\n /** @type {ActionTuple} */\n let result = []\n /** @type {ActionTuple} */\n let subresult\n /** @type {number} */\n let offset\n /** @type {Array} */\n let grandparents\n\n if (!test || is(node, index, parents[parents.length - 1] || null)) {\n result = toResult(visitor(node, parents))\n\n if (result[0] === EXIT) {\n return result\n }\n }\n\n // @ts-expect-error looks like a parent.\n if (node.children && result[0] !== SKIP) {\n // @ts-expect-error looks like a parent.\n offset = (reverse ? node.children.length : -1) + step\n // @ts-expect-error looks like a parent.\n grandparents = parents.concat(node)\n\n // @ts-expect-error looks like a parent.\n while (offset > -1 && offset < node.children.length) {\n // @ts-expect-error looks like a parent.\n subresult = factory(node.children[offset], offset, grandparents)()\n\n if (subresult[0] === EXIT) {\n return subresult\n }\n\n offset =\n typeof subresult[1] === 'number' ? subresult[1] : offset + step\n }\n }\n\n return result\n }\n }\n }\n )\n\n/**\n * Turn a return value into a clean result.\n *\n * @param {VisitorResult} value\n * Valid return values from visitors.\n * @returns {ActionTuple}\n * Clean result.\n */\nfunction toResult(value) {\n if (Array.isArray(value)) {\n return value\n }\n\n if (typeof value === 'number') {\n return [CONTINUE, value]\n }\n\n return [value]\n}\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Parent} Parent\n * @typedef {import('unist-util-is').Test} Test\n * @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult\n */\n\n/**\n * Check if `Child` can be a child of `Ancestor`.\n *\n * Returns the ancestor when `Child` can be a child of `Ancestor`, or returns\n * `never`.\n *\n * @template {Node} Ancestor\n * Node type.\n * @template {Node} Child\n * Node type.\n * @typedef {(\n * Ancestor extends Parent\n * ? Child extends Ancestor['children'][number]\n * ? Ancestor\n * : never\n * : never\n * )} ParentsOf\n */\n\n/**\n * @template {Node} [Visited=Node]\n * Visited node type.\n * @template {Parent} [Ancestor=Parent]\n * Ancestor type.\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform `parent`.\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of `parent` still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Visited extends Node ? number | null : never} index\n * Index of `node` in `parent`.\n * @param {Ancestor extends Node ? Ancestor | null : never} parent\n * Parent of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n */\n\n/**\n * Build a typed `Visitor` function from a node and all possible parents.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n *\n * @template {Node} Visited\n * Node type.\n * @template {Parent} Ancestor\n * Parent type.\n * @typedef {Visitor>} BuildVisitorFromMatch\n */\n\n/**\n * Build a typed `Visitor` function from a list of descendants and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n *\n * @template {Node} Descendant\n * Node type.\n * @template {Test} Check\n * Test type.\n * @typedef {(\n * BuildVisitorFromMatch<\n * import('unist-util-visit-parents/complex-types.js').Matches,\n * Extract\n * >\n * )} BuildVisitorFromDescendants\n */\n\n/**\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n *\n * @template {Node} [Tree=Node]\n * Node type.\n * @template {Test} [Check=string]\n * Test type.\n * @typedef {(\n * BuildVisitorFromDescendants<\n * import('unist-util-visit-parents/complex-types.js').InclusiveDescendant,\n * Check\n * >\n * )} BuildVisitor\n */\n\nimport {visitParents} from 'unist-util-visit-parents'\n\n/**\n * Visit nodes.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @param tree\n * Tree to traverse.\n * @param test\n * `unist-util-is`-compatible test\n * @param visitor\n * Handle each node.\n * @param reverse\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns\n * Nothing.\n */\nexport const visit =\n /**\n * @type {(\n * ((tree: Tree, test: Check, visitor: BuildVisitor, reverse?: boolean | null | undefined) => void) &\n * ((tree: Tree, visitor: BuildVisitor, reverse?: boolean | null | undefined) => void)\n * )}\n */\n (\n /**\n * @param {Node} tree\n * @param {Test} test\n * @param {Visitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {void}\n */\n function (tree, test, visitor, reverse) {\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor\n visitor = test\n test = null\n }\n\n visitParents(tree, test, overload, reverse)\n\n /**\n * @param {Node} node\n * @param {Array} parents\n */\n function overload(node, parents) {\n const parent = parents[parents.length - 1]\n return visitor(\n node,\n parent ? parent.children.indexOf(node) : null,\n parent\n )\n }\n }\n )\n\nexport {CONTINUE, EXIT, SKIP} from 'unist-util-visit-parents'\n","/**\n * @typedef {import('unist').Position} Position\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Point} Point\n */\n\n/**\n * @typedef NodeLike\n * @property {string} type\n * @property {PositionLike | null | undefined} [position]\n *\n * @typedef PositionLike\n * @property {PointLike | null | undefined} [start]\n * @property {PointLike | null | undefined} [end]\n *\n * @typedef PointLike\n * @property {number | null | undefined} [line]\n * @property {number | null | undefined} [column]\n * @property {number | null | undefined} [offset]\n */\n\n/**\n * Get the starting point of `node`.\n *\n * @param node\n * Node.\n * @returns\n * Point.\n */\nexport const pointStart = point('start')\n\n/**\n * Get the ending point of `node`.\n *\n * @param node\n * Node.\n * @returns\n * Point.\n */\nexport const pointEnd = point('end')\n\n/**\n * Get the positional info of `node`.\n *\n * @param {NodeLike | Node | null | undefined} [node]\n * Node.\n * @returns {Position}\n * Position.\n */\nexport function position(node) {\n return {start: pointStart(node), end: pointEnd(node)}\n}\n\n/**\n * Get the positional info of `node`.\n *\n * @param {'start' | 'end'} type\n * Side.\n * @returns\n * Getter.\n */\nfunction point(type) {\n return point\n\n /**\n * Get the point info of `node` at a bound side.\n *\n * @param {NodeLike | Node | null | undefined} [node]\n * @returns {Point}\n */\n function point(node) {\n const point = (node && node.position && node.position[type]) || {}\n\n // To do: next major: don’t return points when invalid.\n return {\n // @ts-expect-error: in practice, null is allowed.\n line: point.line || null,\n // @ts-expect-error: in practice, null is allowed.\n column: point.column || null,\n // @ts-expect-error: in practice, null is allowed.\n offset: point.offset > -1 ? point.offset : null\n }\n }\n}\n","/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').Definition} Definition\n */\n\n/**\n * @typedef {Root | Content} Node\n *\n * @callback GetDefinition\n * Get a definition by identifier.\n * @param {string | null | undefined} [identifier]\n * Identifier of definition.\n * @returns {Definition | null}\n * Definition corresponding to `identifier` or `null`.\n */\n\nimport {visit} from 'unist-util-visit'\n\nconst own = {}.hasOwnProperty\n\n/**\n * Find definitions in `tree`.\n *\n * Uses CommonMark precedence, which means that earlier definitions are\n * preferred over duplicate later definitions.\n *\n * @param {Node} tree\n * Tree to check.\n * @returns {GetDefinition}\n * Getter.\n */\nexport function definitions(tree) {\n /** @type {Record} */\n const cache = Object.create(null)\n\n if (!tree || !tree.type) {\n throw new Error('mdast-util-definitions expected node')\n }\n\n visit(tree, 'definition', (definition) => {\n const id = clean(definition.identifier)\n if (id && !own.call(cache, id)) {\n cache[id] = definition\n }\n })\n\n return definition\n\n /** @type {GetDefinition} */\n function definition(identifier) {\n const id = clean(identifier)\n // To do: next major: return `undefined` when not found.\n return id && own.call(cache, id) ? cache[id] : null\n }\n}\n\n/**\n * @param {string | null | undefined} [value]\n * @returns {string}\n */\nfunction clean(value) {\n return String(value || '').toUpperCase()\n}\n","/**\n * @typedef {import('mdast').FootnoteReference} FootnoteReference\n * @typedef {import('hast').Element} Element\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `footnoteReference` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {FootnoteReference} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function footnoteReference(state, node) {\n const id = String(node.identifier).toUpperCase()\n const safeId = normalizeUri(id.toLowerCase())\n const index = state.footnoteOrder.indexOf(id)\n /** @type {number} */\n let counter\n\n if (index === -1) {\n state.footnoteOrder.push(id)\n state.footnoteCounts[id] = 1\n counter = state.footnoteOrder.length\n } else {\n state.footnoteCounts[id]++\n counter = index + 1\n }\n\n const reuseCounter = state.footnoteCounts[id]\n\n /** @type {Element} */\n const link = {\n type: 'element',\n tagName: 'a',\n properties: {\n href: '#' + state.clobberPrefix + 'fn-' + safeId,\n id:\n state.clobberPrefix +\n 'fnref-' +\n safeId +\n (reuseCounter > 1 ? '-' + reuseCounter : ''),\n dataFootnoteRef: true,\n ariaDescribedBy: ['footnote-label']\n },\n children: [{type: 'text', value: String(counter)}]\n }\n state.patch(node, link)\n\n /** @type {Element} */\n const sup = {\n type: 'element',\n tagName: 'sup',\n properties: {},\n children: [link]\n }\n state.patch(node, sup)\n return state.applyData(node, sup)\n}\n","/**\n * @typedef {import('hast').ElementContent} ElementContent\n *\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').Reference} Reference\n * @typedef {import('mdast').Root} Root\n *\n * @typedef {import('./state.js').State} State\n */\n\n/**\n * @typedef {Root | Content} Nodes\n * @typedef {Extract} References\n */\n\n// To do: next major: always return array.\n\n/**\n * Return the content of a reference without definition as plain text.\n *\n * @param {State} state\n * Info passed around.\n * @param {References} node\n * Reference node (image, link).\n * @returns {ElementContent | Array}\n * hast content.\n */\nexport function revert(state, node) {\n const subtype = node.referenceType\n let suffix = ']'\n\n if (subtype === 'collapsed') {\n suffix += '[]'\n } else if (subtype === 'full') {\n suffix += '[' + (node.label || node.identifier) + ']'\n }\n\n if (node.type === 'imageReference') {\n return {type: 'text', value: '![' + node.alt + suffix}\n }\n\n const contents = state.all(node)\n const head = contents[0]\n\n if (head && head.type === 'text') {\n head.value = '[' + head.value\n } else {\n contents.unshift({type: 'text', value: '['})\n }\n\n const tail = contents[contents.length - 1]\n\n if (tail && tail.type === 'text') {\n tail.value += suffix\n } else {\n contents.push({type: 'text', value: suffix})\n }\n\n return contents\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Parent} Parent\n * @typedef {import('mdast').Root} Root\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * @typedef {Root | Content} Nodes\n * @typedef {Extract} Parents\n */\n\n/**\n * Turn an mdast `listItem` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {ListItem} node\n * mdast node.\n * @param {Parents | null | undefined} parent\n * Parent of `node`.\n * @returns {Element}\n * hast node.\n */\nexport function listItem(state, node, parent) {\n const results = state.all(node)\n const loose = parent ? listLoose(parent) : listItemLoose(node)\n /** @type {Properties} */\n const properties = {}\n /** @type {Array} */\n const children = []\n\n if (typeof node.checked === 'boolean') {\n const head = results[0]\n /** @type {Element} */\n let paragraph\n\n if (head && head.type === 'element' && head.tagName === 'p') {\n paragraph = head\n } else {\n paragraph = {type: 'element', tagName: 'p', properties: {}, children: []}\n results.unshift(paragraph)\n }\n\n if (paragraph.children.length > 0) {\n paragraph.children.unshift({type: 'text', value: ' '})\n }\n\n paragraph.children.unshift({\n type: 'element',\n tagName: 'input',\n properties: {type: 'checkbox', checked: node.checked, disabled: true},\n children: []\n })\n\n // According to github-markdown-css, this class hides bullet.\n // See: .\n properties.className = ['task-list-item']\n }\n\n let index = -1\n\n while (++index < results.length) {\n const child = results[index]\n\n // Add eols before nodes, except if this is a loose, first paragraph.\n if (\n loose ||\n index !== 0 ||\n child.type !== 'element' ||\n child.tagName !== 'p'\n ) {\n children.push({type: 'text', value: '\\n'})\n }\n\n if (child.type === 'element' && child.tagName === 'p' && !loose) {\n children.push(...child.children)\n } else {\n children.push(child)\n }\n }\n\n const tail = results[results.length - 1]\n\n // Add a final eol.\n if (tail && (loose || tail.type !== 'element' || tail.tagName !== 'p')) {\n children.push({type: 'text', value: '\\n'})\n }\n\n /** @type {Element} */\n const result = {type: 'element', tagName: 'li', properties, children}\n state.patch(node, result)\n return state.applyData(node, result)\n}\n\n/**\n * @param {Parents} node\n * @return {Boolean}\n */\nfunction listLoose(node) {\n let loose = false\n if (node.type === 'list') {\n loose = node.spread || false\n const children = node.children\n let index = -1\n\n while (!loose && ++index < children.length) {\n loose = listItemLoose(children[index])\n }\n }\n\n return loose\n}\n\n/**\n * @param {ListItem} node\n * @return {Boolean}\n */\nfunction listItemLoose(node) {\n const spread = node.spread\n\n return spread === undefined || spread === null\n ? node.children.length > 1\n : spread\n}\n","const tab = 9 /* `\\t` */\nconst space = 32 /* ` ` */\n\n/**\n * Remove initial and final spaces and tabs at the line breaks in `value`.\n * Does not trim initial and final spaces and tabs of the value itself.\n *\n * @param {string} value\n * Value to trim.\n * @returns {string}\n * Trimmed value.\n */\nexport function trimLines(value) {\n const source = String(value)\n const search = /\\r?\\n|\\r/g\n let match = search.exec(source)\n let last = 0\n /** @type {Array} */\n const lines = []\n\n while (match) {\n lines.push(\n trimLine(source.slice(last, match.index), last > 0, true),\n match[0]\n )\n\n last = match.index + match[0].length\n match = search.exec(source)\n }\n\n lines.push(trimLine(source.slice(last), last > 0, false))\n\n return lines.join('')\n}\n\n/**\n * @param {string} value\n * Line to trim.\n * @param {boolean} start\n * Whether to trim the start of the line.\n * @param {boolean} end\n * Whether to trim the end of the line.\n * @returns {string}\n * Trimmed line.\n */\nfunction trimLine(value, start, end) {\n let startIndex = 0\n let endIndex = value.length\n\n if (start) {\n let code = value.codePointAt(startIndex)\n\n while (code === tab || code === space) {\n startIndex++\n code = value.codePointAt(startIndex)\n }\n }\n\n if (end) {\n let code = value.codePointAt(endIndex - 1)\n\n while (code === tab || code === space) {\n endIndex--\n code = value.codePointAt(endIndex - 1)\n }\n }\n\n return endIndex > startIndex ? value.slice(startIndex, endIndex) : ''\n}\n","import {blockquote} from './blockquote.js'\nimport {hardBreak} from './break.js'\nimport {code} from './code.js'\nimport {strikethrough} from './delete.js'\nimport {emphasis} from './emphasis.js'\nimport {footnoteReference} from './footnote-reference.js'\nimport {footnote} from './footnote.js'\nimport {heading} from './heading.js'\nimport {html} from './html.js'\nimport {imageReference} from './image-reference.js'\nimport {image} from './image.js'\nimport {inlineCode} from './inline-code.js'\nimport {linkReference} from './link-reference.js'\nimport {link} from './link.js'\nimport {listItem} from './list-item.js'\nimport {list} from './list.js'\nimport {paragraph} from './paragraph.js'\nimport {root} from './root.js'\nimport {strong} from './strong.js'\nimport {table} from './table.js'\nimport {tableRow} from './table-row.js'\nimport {tableCell} from './table-cell.js'\nimport {text} from './text.js'\nimport {thematicBreak} from './thematic-break.js'\n\n/**\n * Default handlers for nodes.\n */\nexport const handlers = {\n blockquote,\n break: hardBreak,\n code,\n delete: strikethrough,\n emphasis,\n footnoteReference,\n footnote,\n heading,\n html,\n imageReference,\n image,\n inlineCode,\n linkReference,\n link,\n listItem,\n list,\n paragraph,\n root,\n strong,\n table,\n tableCell,\n tableRow,\n text,\n thematicBreak,\n toml: ignore,\n yaml: ignore,\n definition: ignore,\n footnoteDefinition: ignore\n}\n\n// Return nothing for nodes that are ignored.\nfunction ignore() {\n // To do: next major: return `undefined`.\n return null\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `blockquote` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Blockquote} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function blockquote(state, node) {\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'blockquote',\n properties: {},\n children: state.wrap(state.all(node), true)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('mdast').Break} Break\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `break` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Break} node\n * mdast node.\n * @returns {Array}\n * hast element content.\n */\nexport function hardBreak(state, node) {\n /** @type {Element} */\n const result = {type: 'element', tagName: 'br', properties: {}, children: []}\n state.patch(node, result)\n return [state.applyData(node, result), {type: 'text', value: '\\n'}]\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Code} Code\n * @typedef {import('../state.js').State} State\n\n */\n\n/**\n * Turn an mdast `code` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Code} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function code(state, node) {\n const value = node.value ? node.value + '\\n' : ''\n // To do: next major, use `node.lang` w/o regex, the splitting’s been going\n // on for years in remark now.\n const lang = node.lang ? node.lang.match(/^[^ \\t]+(?=[ \\t]|$)/) : null\n /** @type {Properties} */\n const properties = {}\n\n if (lang) {\n properties.className = ['language-' + lang]\n }\n\n // Create ``.\n /** @type {Element} */\n let result = {\n type: 'element',\n tagName: 'code',\n properties,\n children: [{type: 'text', value}]\n }\n\n if (node.meta) {\n result.data = {meta: node.meta}\n }\n\n state.patch(node, result)\n result = state.applyData(node, result)\n\n // Create `
`.\n  result = {type: 'element', tagName: 'pre', properties: {}, children: [result]}\n  state.patch(node, result)\n  return result\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Delete} Delete\n * @typedef {import('../state.js').State} State\n\n */\n\n/**\n * Turn an mdast `delete` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Delete} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function strikethrough(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'del',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `emphasis` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Emphasis} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function emphasis(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'em',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Footnote} Footnote\n * @typedef {import('../state.js').State} State\n */\n\nimport {footnoteReference} from './footnote-reference.js'\n\n// To do: when both:\n// * \n// * \n// …are archived, remove this (also from mdast).\n// These inline notes are not used in GFM.\n\n/**\n * Turn an mdast `footnote` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Footnote} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function footnote(state, node) {\n  const footnoteById = state.footnoteById\n  let no = 1\n\n  while (no in footnoteById) no++\n\n  const identifier = String(no)\n\n  footnoteById[identifier] = {\n    type: 'footnoteDefinition',\n    identifier,\n    children: [{type: 'paragraph', children: node.children}],\n    position: node.position\n  }\n\n  return footnoteReference(state, {\n    type: 'footnoteReference',\n    identifier,\n    position: node.position\n  })\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `heading` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Heading} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function heading(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'h' + node.depth,\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').HTML} Html\n * @typedef {import('../state.js').State} State\n * @typedef {import('../../index.js').Raw} Raw\n */\n\n/**\n * Turn an mdast `html` node into hast (`raw` node in dangerous mode, otherwise\n * nothing).\n *\n * @param {State} state\n *   Info passed around.\n * @param {Html} node\n *   mdast node.\n * @returns {Raw | Element | null}\n *   hast node.\n */\nexport function html(state, node) {\n  if (state.dangerous) {\n    /** @type {Raw} */\n    const result = {type: 'raw', value: node.value}\n    state.patch(node, result)\n    return state.applyData(node, result)\n  }\n\n  // To do: next major: return `undefined`.\n  return null\n}\n","/**\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').ImageReference} ImageReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `imageReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {ImageReference} node\n *   mdast node.\n * @returns {ElementContent | Array}\n *   hast node.\n */\nexport function imageReference(state, node) {\n  const def = state.definition(node.identifier)\n\n  if (!def) {\n    return revert(state, node)\n  }\n\n  /** @type {Properties} */\n  const properties = {src: normalizeUri(def.url || ''), alt: node.alt}\n\n  if (def.title !== null && def.title !== undefined) {\n    properties.title = def.title\n  }\n\n  /** @type {Element} */\n  const result = {type: 'element', tagName: 'img', properties, children: []}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Image} Image\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `image` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Image} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function image(state, node) {\n  /** @type {Properties} */\n  const properties = {src: normalizeUri(node.url)}\n\n  if (node.alt !== null && node.alt !== undefined) {\n    properties.alt = node.alt\n  }\n\n  if (node.title !== null && node.title !== undefined) {\n    properties.title = node.title\n  }\n\n  /** @type {Element} */\n  const result = {type: 'element', tagName: 'img', properties, children: []}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `inlineCode` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {InlineCode} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function inlineCode(state, node) {\n  /** @type {Text} */\n  const text = {type: 'text', value: node.value.replace(/\\r?\\n|\\r/g, ' ')}\n  state.patch(node, text)\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'code',\n    properties: {},\n    children: [text]\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').LinkReference} LinkReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `linkReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {LinkReference} node\n *   mdast node.\n * @returns {ElementContent | Array}\n *   hast node.\n */\nexport function linkReference(state, node) {\n  const def = state.definition(node.identifier)\n\n  if (!def) {\n    return revert(state, node)\n  }\n\n  /** @type {Properties} */\n  const properties = {href: normalizeUri(def.url || '')}\n\n  if (def.title !== null && def.title !== undefined) {\n    properties.title = def.title\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'a',\n    properties,\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Link} Link\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `link` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Link} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function link(state, node) {\n  /** @type {Properties} */\n  const properties = {href: normalizeUri(node.url)}\n\n  if (node.title !== null && node.title !== undefined) {\n    properties.title = node.title\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'a',\n    properties,\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').List} List\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `list` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {List} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function list(state, node) {\n  /** @type {Properties} */\n  const properties = {}\n  const results = state.all(node)\n  let index = -1\n\n  if (typeof node.start === 'number' && node.start !== 1) {\n    properties.start = node.start\n  }\n\n  // Like GitHub, add a class for custom styling.\n  while (++index < results.length) {\n    const child = results[index]\n\n    if (\n      child.type === 'element' &&\n      child.tagName === 'li' &&\n      child.properties &&\n      Array.isArray(child.properties.className) &&\n      child.properties.className.includes('task-list-item')\n    ) {\n      properties.className = ['contains-task-list']\n      break\n    }\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: node.ordered ? 'ol' : 'ul',\n    properties,\n    children: state.wrap(results, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `paragraph` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Paragraph} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function paragraph(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'p',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('mdast').Root} MdastRoot\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `root` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastRoot} node\n *   mdast node.\n * @returns {HastRoot | HastElement}\n *   hast node.\n */\nexport function root(state, node) {\n  /** @type {HastRoot} */\n  const result = {type: 'root', children: state.wrap(state.all(node))}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `strong` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Strong} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function strong(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'strong',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Table} Table\n * @typedef {import('../state.js').State} State\n */\n\nimport {pointStart, pointEnd} from 'unist-util-position'\n\n/**\n * Turn an mdast `table` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Table} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function table(state, node) {\n  const rows = state.all(node)\n  const firstRow = rows.shift()\n  /** @type {Array} */\n  const tableContent = []\n\n  if (firstRow) {\n    /** @type {Element} */\n    const head = {\n      type: 'element',\n      tagName: 'thead',\n      properties: {},\n      children: state.wrap([firstRow], true)\n    }\n    state.patch(node.children[0], head)\n    tableContent.push(head)\n  }\n\n  if (rows.length > 0) {\n    /** @type {Element} */\n    const body = {\n      type: 'element',\n      tagName: 'tbody',\n      properties: {},\n      children: state.wrap(rows, true)\n    }\n\n    const start = pointStart(node.children[1])\n    const end = pointEnd(node.children[node.children.length - 1])\n    if (start.line && end.line) body.position = {start, end}\n    tableContent.push(body)\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'table',\n    properties: {},\n    children: state.wrap(tableContent, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').TableCell} TableCell\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `tableCell` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {TableCell} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function tableCell(state, node) {\n  // Note: this function is normally not called: see `table-row` for how rows\n  // and their cells are compiled.\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'td', // Assume body cell.\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').Parent} Parent\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').TableRow} TableRow\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * @typedef {Root | Content} Nodes\n * @typedef {Extract} Parents\n */\n\n/**\n * Turn an mdast `tableRow` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {TableRow} node\n *   mdast node.\n * @param {Parents | null | undefined} parent\n *   Parent of `node`.\n * @returns {Element}\n *   hast node.\n */\nexport function tableRow(state, node, parent) {\n  const siblings = parent ? parent.children : undefined\n  // Generate a body row when without parent.\n  const rowIndex = siblings ? siblings.indexOf(node) : 1\n  const tagName = rowIndex === 0 ? 'th' : 'td'\n  const align = parent && parent.type === 'table' ? parent.align : undefined\n  const length = align ? align.length : node.children.length\n  let cellIndex = -1\n  /** @type {Array} */\n  const cells = []\n\n  while (++cellIndex < length) {\n    // Note: can also be undefined.\n    const cell = node.children[cellIndex]\n    /** @type {Properties} */\n    const properties = {}\n    const alignValue = align ? align[cellIndex] : undefined\n\n    if (alignValue) {\n      properties.align = alignValue\n    }\n\n    /** @type {Element} */\n    let result = {type: 'element', tagName, properties, children: []}\n\n    if (cell) {\n      result.children = state.all(cell)\n      state.patch(cell, result)\n      result = state.applyData(node, result)\n    }\n\n    cells.push(result)\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'tr',\n    properties: {},\n    children: state.wrap(cells, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('hast').Text} HastText\n * @typedef {import('mdast').Text} MdastText\n * @typedef {import('../state.js').State} State\n */\n\nimport {trimLines} from 'trim-lines'\n\n/**\n * Turn an mdast `text` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastText} node\n *   mdast node.\n * @returns {HastText | HastElement}\n *   hast node.\n */\nexport function text(state, node) {\n  /** @type {HastText} */\n  const result = {type: 'text', value: trimLines(String(node.value))}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `thematicBreak` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {ThematicBreak} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function thematicBreak(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'hr',\n    properties: {},\n    children: []\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Content} HastContent\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('hast').ElementContent} HastElementContent\n * @typedef {import('hast').Properties} HastProperties\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('hast').Text} HastText\n *\n * @typedef {import('mdast').Content} MdastContent\n * @typedef {import('mdast').Definition} MdastDefinition\n * @typedef {import('mdast').FootnoteDefinition} MdastFootnoteDefinition\n * @typedef {import('mdast').Parent} MdastParent\n * @typedef {import('mdast').Root} MdastRoot\n */\n\n/**\n * @typedef {HastRoot | HastContent} HastNodes\n * @typedef {MdastRoot | MdastContent} MdastNodes\n * @typedef {Extract} MdastParents\n *\n * @typedef EmbeddedHastFields\n *   hast fields.\n * @property {string | null | undefined} [hName]\n *   Generate a specific element with this tag name instead.\n * @property {HastProperties | null | undefined} [hProperties]\n *   Generate an element with these properties instead.\n * @property {Array | null | undefined} [hChildren]\n *   Generate an element with this content instead.\n *\n * @typedef {Record & EmbeddedHastFields} MdastData\n *   mdast data with embedded hast fields.\n *\n * @typedef {MdastNodes & {data?: MdastData | null | undefined}} MdastNodeWithData\n *   mdast node with embedded hast data.\n *\n * @typedef PointLike\n *   Point-like value.\n * @property {number | null | undefined} [line]\n *   Line.\n * @property {number | null | undefined} [column]\n *   Column.\n * @property {number | null | undefined} [offset]\n *   Offset.\n *\n * @typedef PositionLike\n *   Position-like value.\n * @property {PointLike | null | undefined} [start]\n *   Point-like value.\n * @property {PointLike | null | undefined} [end]\n *   Point-like value.\n *\n * @callback Handler\n *   Handle a node.\n * @param {State} state\n *   Info passed around.\n * @param {any} node\n *   mdast node to handle.\n * @param {MdastParents | null | undefined} parent\n *   Parent of `node`.\n * @returns {HastElementContent | Array | null | undefined}\n *   hast node.\n *\n * @callback HFunctionProps\n *   Signature of `state` for when props are passed.\n * @param {MdastNodes | PositionLike | null | undefined} node\n *   mdast node or unist position.\n * @param {string} tagName\n *   HTML tag name.\n * @param {HastProperties} props\n *   Properties.\n * @param {Array | null | undefined} [children]\n *   hast content.\n * @returns {HastElement}\n *   Compiled element.\n *\n * @callback HFunctionNoProps\n *   Signature of `state` for when no props are passed.\n * @param {MdastNodes | PositionLike | null | undefined} node\n *   mdast node or unist position.\n * @param {string} tagName\n *   HTML tag name.\n * @param {Array | null | undefined} [children]\n *   hast content.\n * @returns {HastElement}\n *   Compiled element.\n *\n * @typedef HFields\n *   Info on `state`.\n * @property {boolean} dangerous\n *   Whether HTML is allowed.\n * @property {string} clobberPrefix\n *   Prefix to use to prevent DOM clobbering.\n * @property {string} footnoteLabel\n *   Label to use to introduce the footnote section.\n * @property {string} footnoteLabelTagName\n *   HTML used for the footnote label.\n * @property {HastProperties} footnoteLabelProperties\n *   Properties on the HTML tag used for the footnote label.\n * @property {string} footnoteBackLabel\n *   Label to use from backreferences back to their footnote call.\n * @property {(identifier: string) => MdastDefinition | null} definition\n *   Definition cache.\n * @property {Record} footnoteById\n *   Footnote definitions by their identifier.\n * @property {Array} footnoteOrder\n *   Identifiers of order when footnote calls first appear in tree order.\n * @property {Record} footnoteCounts\n *   Counts for how often the same footnote was called.\n * @property {Handlers} handlers\n *   Applied handlers.\n * @property {Handler} unknownHandler\n *   Handler for any none not in `passThrough` or otherwise handled.\n * @property {(from: MdastNodes, node: HastNodes) => void} patch\n *   Copy a node’s positional info.\n * @property {(from: MdastNodes, to: Type) => Type | HastElement} applyData\n *   Honor the `data` of `from`, and generate an element instead of `node`.\n * @property {(node: MdastNodes, parent: MdastParents | null | undefined) => HastElementContent | Array | null | undefined} one\n *   Transform an mdast node to hast.\n * @property {(node: MdastNodes) => Array} all\n *   Transform the children of an mdast parent to hast.\n * @property {(nodes: Array, loose?: boolean | null | undefined) => Array} wrap\n *   Wrap `nodes` with line endings between each node, adds initial/final line endings when `loose`.\n * @property {(left: MdastNodeWithData | PositionLike | null | undefined, right: HastElementContent) => HastElementContent} augment\n *   Like `state` but lower-level and usable on non-elements.\n *   Deprecated: use `patch` and `applyData`.\n * @property {Array} passThrough\n *   List of node types to pass through untouched (except for their children).\n *\n * @typedef Options\n *   Configuration (optional).\n * @property {boolean | null | undefined} [allowDangerousHtml=false]\n *   Whether to persist raw HTML in markdown in the hast tree.\n * @property {string | null | undefined} [clobberPrefix='user-content-']\n *   Prefix to use before the `id` attribute on footnotes to prevent it from\n *   *clobbering*.\n * @property {string | null | undefined} [footnoteBackLabel='Back to content']\n *   Label to use from backreferences back to their footnote call (affects\n *   screen readers).\n * @property {string | null | undefined} [footnoteLabel='Footnotes']\n *   Label to use for the footnotes section (affects screen readers).\n * @property {HastProperties | null | undefined} [footnoteLabelProperties={className: ['sr-only']}]\n *   Properties to use on the footnote label (note that `id: 'footnote-label'`\n *   is always added as footnote calls use it with `aria-describedby` to\n *   provide an accessible label).\n * @property {string | null | undefined} [footnoteLabelTagName='h2']\n *   Tag name to use for the footnote label.\n * @property {Handlers | null | undefined} [handlers]\n *   Extra handlers for nodes.\n * @property {Array | null | undefined} [passThrough]\n *   List of custom mdast node types to pass through (keep) in hast (note that\n *   the node itself is passed, but eventual children are transformed).\n * @property {Handler | null | undefined} [unknownHandler]\n *   Handler for all unknown nodes.\n *\n * @typedef {Record} Handlers\n *   Handle nodes.\n *\n * @typedef {HFunctionProps & HFunctionNoProps & HFields} State\n *   Info passed around.\n */\n\nimport {visit} from 'unist-util-visit'\nimport {position, pointStart, pointEnd} from 'unist-util-position'\nimport {generated} from 'unist-util-generated'\nimport {definitions} from 'mdast-util-definitions'\nimport {handlers} from './handlers/index.js'\n\nconst own = {}.hasOwnProperty\n\n/**\n * Create `state` from an mdast tree.\n *\n * @param {MdastNodes} tree\n *   mdast node to transform.\n * @param {Options | null | undefined} [options]\n *   Configuration.\n * @returns {State}\n *   `state` function.\n */\nexport function createState(tree, options) {\n  const settings = options || {}\n  const dangerous = settings.allowDangerousHtml || false\n  /** @type {Record} */\n  const footnoteById = {}\n\n  // To do: next major: add `options` to state, remove:\n  // `dangerous`, `clobberPrefix`, `footnoteLabel`, `footnoteLabelTagName`,\n  // `footnoteLabelProperties`, `footnoteBackLabel`, `passThrough`,\n  // `unknownHandler`.\n\n  // To do: next major: move to `state.options.allowDangerousHtml`.\n  state.dangerous = dangerous\n  // To do: next major: move to `state.options`.\n  state.clobberPrefix =\n    settings.clobberPrefix === undefined || settings.clobberPrefix === null\n      ? 'user-content-'\n      : settings.clobberPrefix\n  // To do: next major: move to `state.options`.\n  state.footnoteLabel = settings.footnoteLabel || 'Footnotes'\n  // To do: next major: move to `state.options`.\n  state.footnoteLabelTagName = settings.footnoteLabelTagName || 'h2'\n  // To do: next major: move to `state.options`.\n  state.footnoteLabelProperties = settings.footnoteLabelProperties || {\n    className: ['sr-only']\n  }\n  // To do: next major: move to `state.options`.\n  state.footnoteBackLabel = settings.footnoteBackLabel || 'Back to content'\n  // To do: next major: move to `state.options`.\n  state.unknownHandler = settings.unknownHandler\n  // To do: next major: move to `state.options`.\n  state.passThrough = settings.passThrough\n\n  state.handlers = {...handlers, ...settings.handlers}\n\n  // To do: next major: replace utility with `definitionById` object, so we\n  // only walk once (as we need footnotes too).\n  state.definition = definitions(tree)\n  state.footnoteById = footnoteById\n  /** @type {Array} */\n  state.footnoteOrder = []\n  /** @type {Record} */\n  state.footnoteCounts = {}\n\n  state.patch = patch\n  state.applyData = applyData\n  state.one = oneBound\n  state.all = allBound\n  state.wrap = wrap\n  // To do: next major: remove `augment`.\n  state.augment = augment\n\n  visit(tree, 'footnoteDefinition', (definition) => {\n    const id = String(definition.identifier).toUpperCase()\n\n    // Mimick CM behavior of link definitions.\n    // See: .\n    if (!own.call(footnoteById, id)) {\n      footnoteById[id] = definition\n    }\n  })\n\n  // @ts-expect-error Hush, it’s fine!\n  return state\n\n  /**\n   * Finalise the created `right`, a hast node, from `left`, an mdast node.\n   *\n   * @param {MdastNodeWithData | PositionLike | null | undefined} left\n   * @param {HastElementContent} right\n   * @returns {HastElementContent}\n   */\n  /* c8 ignore start */\n  // To do: next major: remove.\n  function augment(left, right) {\n    // Handle `data.hName`, `data.hProperties, `data.hChildren`.\n    if (left && 'data' in left && left.data) {\n      /** @type {MdastData} */\n      const data = left.data\n\n      if (data.hName) {\n        if (right.type !== 'element') {\n          right = {\n            type: 'element',\n            tagName: '',\n            properties: {},\n            children: []\n          }\n        }\n\n        right.tagName = data.hName\n      }\n\n      if (right.type === 'element' && data.hProperties) {\n        right.properties = {...right.properties, ...data.hProperties}\n      }\n\n      if ('children' in right && right.children && data.hChildren) {\n        right.children = data.hChildren\n      }\n    }\n\n    if (left) {\n      const ctx = 'type' in left ? left : {position: left}\n\n      if (!generated(ctx)) {\n        // @ts-expect-error: fine.\n        right.position = {start: pointStart(ctx), end: pointEnd(ctx)}\n      }\n    }\n\n    return right\n  }\n  /* c8 ignore stop */\n\n  /**\n   * Create an element for `node`.\n   *\n   * @type {HFunctionProps}\n   */\n  /* c8 ignore start */\n  // To do: next major: remove.\n  function state(node, tagName, props, children) {\n    if (Array.isArray(props)) {\n      children = props\n      props = {}\n    }\n\n    // @ts-expect-error augmenting an element yields an element.\n    return augment(node, {\n      type: 'element',\n      tagName,\n      properties: props || {},\n      children: children || []\n    })\n  }\n  /* c8 ignore stop */\n\n  /**\n   * Transform an mdast node into a hast node.\n   *\n   * @param {MdastNodes} node\n   *   mdast node.\n   * @param {MdastParents | null | undefined} [parent]\n   *   Parent of `node`.\n   * @returns {HastElementContent | Array | null | undefined}\n   *   Resulting hast node.\n   */\n  function oneBound(node, parent) {\n    // @ts-expect-error: that’s a state :)\n    return one(state, node, parent)\n  }\n\n  /**\n   * Transform the children of an mdast node into hast nodes.\n   *\n   * @param {MdastNodes} parent\n   *   mdast node to compile\n   * @returns {Array}\n   *   Resulting hast nodes.\n   */\n  function allBound(parent) {\n    // @ts-expect-error: that’s a state :)\n    return all(state, parent)\n  }\n}\n\n/**\n * Copy a node’s positional info.\n *\n * @param {MdastNodes} from\n *   mdast node to copy from.\n * @param {HastNodes} to\n *   hast node to copy into.\n * @returns {void}\n *   Nothing.\n */\nfunction patch(from, to) {\n  if (from.position) to.position = position(from)\n}\n\n/**\n * Honor the `data` of `from` and maybe generate an element instead of `to`.\n *\n * @template {HastNodes} Type\n *   Node type.\n * @param {MdastNodes} from\n *   mdast node to use data from.\n * @param {Type} to\n *   hast node to change.\n * @returns {Type | HastElement}\n *   Nothing.\n */\nfunction applyData(from, to) {\n  /** @type {Type | HastElement} */\n  let result = to\n\n  // Handle `data.hName`, `data.hProperties, `data.hChildren`.\n  if (from && from.data) {\n    const hName = from.data.hName\n    const hChildren = from.data.hChildren\n    const hProperties = from.data.hProperties\n\n    if (typeof hName === 'string') {\n      // Transforming the node resulted in an element with a different name\n      // than wanted:\n      if (result.type === 'element') {\n        result.tagName = hName\n      }\n      // Transforming the node resulted in a non-element, which happens for\n      // raw, text, and root nodes (unless custom handlers are passed).\n      // The intent is likely to keep the content around (otherwise: pass\n      // `hChildren`).\n      else {\n        result = {\n          type: 'element',\n          tagName: hName,\n          properties: {},\n          children: []\n        }\n\n        // To do: next major: take the children from the `root`, or inject the\n        // raw/text/comment or so into the element?\n        // if ('children' in node) {\n        //   // @ts-expect-error: assume `children` are allowed in elements.\n        //   result.children = node.children\n        // } else {\n        //   // @ts-expect-error: assume `node` is allowed in elements.\n        //   result.children.push(node)\n        // }\n      }\n    }\n\n    if (result.type === 'element' && hProperties) {\n      result.properties = {...result.properties, ...hProperties}\n    }\n\n    if (\n      'children' in result &&\n      result.children &&\n      hChildren !== null &&\n      hChildren !== undefined\n    ) {\n      // @ts-expect-error: assume valid children are defined.\n      result.children = hChildren\n    }\n  }\n\n  return result\n}\n\n/**\n * Transform an mdast node into a hast node.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastNodes} node\n *   mdast node.\n * @param {MdastParents | null | undefined} [parent]\n *   Parent of `node`.\n * @returns {HastElementContent | Array | null | undefined}\n *   Resulting hast node.\n */\n// To do: next major: do not expose, keep bound.\nexport function one(state, node, parent) {\n  const type = node && node.type\n\n  // Fail on non-nodes.\n  if (!type) {\n    throw new Error('Expected node, got `' + node + '`')\n  }\n\n  if (own.call(state.handlers, type)) {\n    return state.handlers[type](state, node, parent)\n  }\n\n  if (state.passThrough && state.passThrough.includes(type)) {\n    // To do: next major: deep clone.\n    // @ts-expect-error: types of passed through nodes are expected to be added manually.\n    return 'children' in node ? {...node, children: all(state, node)} : node\n  }\n\n  if (state.unknownHandler) {\n    return state.unknownHandler(state, node, parent)\n  }\n\n  return defaultUnknownHandler(state, node)\n}\n\n/**\n * Transform the children of an mdast node into hast nodes.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastNodes} parent\n *   mdast node to compile\n * @returns {Array}\n *   Resulting hast nodes.\n */\n// To do: next major: do not expose, keep bound.\nexport function all(state, parent) {\n  /** @type {Array} */\n  const values = []\n\n  if ('children' in parent) {\n    const nodes = parent.children\n    let index = -1\n    while (++index < nodes.length) {\n      const result = one(state, nodes[index], parent)\n\n      // To do: see if we van clean this? Can we merge texts?\n      if (result) {\n        if (index && nodes[index - 1].type === 'break') {\n          if (!Array.isArray(result) && result.type === 'text') {\n            result.value = result.value.replace(/^\\s+/, '')\n          }\n\n          if (!Array.isArray(result) && result.type === 'element') {\n            const head = result.children[0]\n\n            if (head && head.type === 'text') {\n              head.value = head.value.replace(/^\\s+/, '')\n            }\n          }\n        }\n\n        if (Array.isArray(result)) {\n          values.push(...result)\n        } else {\n          values.push(result)\n        }\n      }\n    }\n  }\n\n  return values\n}\n\n/**\n * Transform an unknown node.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastNodes} node\n *   Unknown mdast node.\n * @returns {HastText | HastElement}\n *   Resulting hast node.\n */\nfunction defaultUnknownHandler(state, node) {\n  const data = node.data || {}\n  /** @type {HastText | HastElement} */\n  const result =\n    'value' in node &&\n    !(own.call(data, 'hProperties') || own.call(data, 'hChildren'))\n      ? {type: 'text', value: node.value}\n      : {\n          type: 'element',\n          tagName: 'div',\n          properties: {},\n          children: all(state, node)\n        }\n\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n\n/**\n * Wrap `nodes` with line endings between each node.\n *\n * @template {HastContent} Type\n *   Node type.\n * @param {Array} nodes\n *   List of nodes to wrap.\n * @param {boolean | null | undefined} [loose=false]\n *   Whether to add line endings at start and end.\n * @returns {Array}\n *   Wrapped nodes.\n */\nexport function wrap(nodes, loose) {\n  /** @type {Array} */\n  const result = []\n  let index = -1\n\n  if (loose) {\n    result.push({type: 'text', value: '\\n'})\n  }\n\n  while (++index < nodes.length) {\n    if (index) result.push({type: 'text', value: '\\n'})\n    result.push(nodes[index])\n  }\n\n  if (loose && nodes.length > 0) {\n    result.push({type: 'text', value: '\\n'})\n  }\n\n  return result\n}\n","/**\n * @typedef PointLike\n * @property {number | null | undefined} [line]\n * @property {number | null | undefined} [column]\n * @property {number | null | undefined} [offset]\n *\n * @typedef PositionLike\n * @property {PointLike | null | undefined} [start]\n * @property {PointLike | null | undefined} [end]\n *\n * @typedef NodeLike\n * @property {PositionLike | null | undefined} [position]\n */\n\n/**\n * Check if `node` is generated.\n *\n * @param {NodeLike | null | undefined} [node]\n *   Node to check.\n * @returns {boolean}\n *   Whether `node` is generated (does not have positional info).\n */\nexport function generated(node) {\n  return (\n    !node ||\n    !node.position ||\n    !node.position.start ||\n    !node.position.start.line ||\n    !node.position.start.column ||\n    !node.position.end ||\n    !node.position.end.line ||\n    !node.position.end.column\n  )\n}\n","/**\n * @typedef {import('hast').Content} HastContent\n * @typedef {import('hast').Root} HastRoot\n *\n * @typedef {import('mdast').Content} MdastContent\n * @typedef {import('mdast').Root} MdastRoot\n *\n * @typedef {import('./state.js').Options} Options\n */\n\n/**\n * @typedef {HastRoot | HastContent} HastNodes\n * @typedef {MdastRoot | MdastContent} MdastNodes\n */\n\nimport {footer} from './footer.js'\nimport {createState} from './state.js'\n\n/**\n * Transform mdast to hast.\n *\n * ##### Notes\n *\n * ###### HTML\n *\n * Raw HTML is available in mdast as `html` nodes and can be embedded in hast\n * as semistandard `raw` nodes.\n * Most utilities ignore `raw` nodes but two notable ones don’t:\n *\n * *   `hast-util-to-html` also has an option `allowDangerousHtml` which will\n *     output the raw HTML.\n *     This is typically discouraged as noted by the option name but is useful\n *     if you completely trust authors\n * *   `hast-util-raw` can handle the raw embedded HTML strings by parsing them\n *     into standard hast nodes (`element`, `text`, etc).\n *     This is a heavy task as it needs a full HTML parser, but it is the only\n *     way to support untrusted content\n *\n * ###### Footnotes\n *\n * Many options supported here relate to footnotes.\n * Footnotes are not specified by CommonMark, which we follow by default.\n * They are supported by GitHub, so footnotes can be enabled in markdown with\n * `mdast-util-gfm`.\n *\n * The options `footnoteBackLabel` and `footnoteLabel` define natural language\n * that explains footnotes, which is hidden for sighted users but shown to\n * assistive technology.\n * When your page is not in English, you must define translated values.\n *\n * Back references use ARIA attributes, but the section label itself uses a\n * heading that is hidden with an `sr-only` class.\n * To show it to sighted users, define different attributes in\n * `footnoteLabelProperties`.\n *\n * ###### Clobbering\n *\n * Footnotes introduces a problem, as it links footnote calls to footnote\n * definitions on the page through `id` attributes generated from user content,\n * which results in DOM clobbering.\n *\n * DOM clobbering is this:\n *\n * ```html\n * 

\n * \n * ```\n *\n * Elements by their ID are made available by browsers on the `window` object,\n * which is a security risk.\n * Using a prefix solves this problem.\n *\n * More information on how to handle clobbering and the prefix is explained in\n * Example: headings (DOM clobbering) in `rehype-sanitize`.\n *\n * ###### Unknown nodes\n *\n * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.\n * The default behavior for unknown nodes is:\n *\n * * when the node has a `value` (and doesn’t have `data.hName`,\n * `data.hProperties`, or `data.hChildren`, see later), create a hast `text`\n * node\n * * otherwise, create a `
` element (which could be changed with\n * `data.hName`), with its children mapped from mdast to hast as well\n *\n * This behavior can be changed by passing an `unknownHandler`.\n *\n * @param {MdastNodes} tree\n * mdast tree.\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {HastNodes | null | undefined}\n * hast tree.\n */\n// To do: next major: always return a single `root`.\nexport function toHast(tree, options) {\n const state = createState(tree, options)\n const node = state.one(tree, null)\n const foot = footer(state)\n\n if (foot) {\n // @ts-expect-error If there’s a footer, there were definitions, meaning block\n // content.\n // So assume `node` is a parent node.\n node.children.push({type: 'text', value: '\\n'}, foot)\n }\n\n // To do: next major: always return root?\n return Array.isArray(node) ? {type: 'root', children: node} : node\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n *\n * @typedef {import('./state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Generate a hast footer for called footnote definitions.\n *\n * @param {State} state\n * Info passed around.\n * @returns {Element | undefined}\n * `section` element or `undefined`.\n */\nexport function footer(state) {\n /** @type {Array} */\n const listItems = []\n let index = -1\n\n while (++index < state.footnoteOrder.length) {\n const def = state.footnoteById[state.footnoteOrder[index]]\n\n if (!def) {\n continue\n }\n\n const content = state.all(def)\n const id = String(def.identifier).toUpperCase()\n const safeId = normalizeUri(id.toLowerCase())\n let referenceIndex = 0\n /** @type {Array} */\n const backReferences = []\n\n while (++referenceIndex <= state.footnoteCounts[id]) {\n /** @type {Element} */\n const backReference = {\n type: 'element',\n tagName: 'a',\n properties: {\n href:\n '#' +\n state.clobberPrefix +\n 'fnref-' +\n safeId +\n (referenceIndex > 1 ? '-' + referenceIndex : ''),\n dataFootnoteBackref: true,\n className: ['data-footnote-backref'],\n ariaLabel: state.footnoteBackLabel\n },\n children: [{type: 'text', value: '↩'}]\n }\n\n if (referenceIndex > 1) {\n backReference.children.push({\n type: 'element',\n tagName: 'sup',\n children: [{type: 'text', value: String(referenceIndex)}]\n })\n }\n\n if (backReferences.length > 0) {\n backReferences.push({type: 'text', value: ' '})\n }\n\n backReferences.push(backReference)\n }\n\n const tail = content[content.length - 1]\n\n if (tail && tail.type === 'element' && tail.tagName === 'p') {\n const tailTail = tail.children[tail.children.length - 1]\n if (tailTail && tailTail.type === 'text') {\n tailTail.value += ' '\n } else {\n tail.children.push({type: 'text', value: ' '})\n }\n\n tail.children.push(...backReferences)\n } else {\n content.push(...backReferences)\n }\n\n /** @type {Element} */\n const listItem = {\n type: 'element',\n tagName: 'li',\n properties: {id: state.clobberPrefix + 'fn-' + safeId},\n children: state.wrap(content, true)\n }\n\n state.patch(def, listItem)\n\n listItems.push(listItem)\n }\n\n if (listItems.length === 0) {\n return\n }\n\n return {\n type: 'element',\n tagName: 'section',\n properties: {dataFootnotes: true, className: ['footnotes']},\n children: [\n {\n type: 'element',\n tagName: state.footnoteLabelTagName,\n properties: {\n // To do: use structured clone.\n ...JSON.parse(JSON.stringify(state.footnoteLabelProperties)),\n id: 'footnote-label'\n },\n children: [{type: 'text', value: state.footnoteLabel}]\n },\n {type: 'text', value: '\\n'},\n {\n type: 'element',\n tagName: 'ol',\n properties: {},\n children: state.wrap(listItems, true)\n },\n {type: 'text', value: '\\n'}\n ]\n }\n}\n","/**\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('mdast').Root} MdastRoot\n * @typedef {import('mdast-util-to-hast').Options} Options\n * @typedef {import('unified').Processor} Processor\n *\n * @typedef {import('mdast-util-to-hast')} DoNotTouchAsThisImportIncludesRawInTree\n */\n\nimport {toHast} from 'mdast-util-to-hast'\n\n// Note: the `` overload doesn’t seem to work :'(\n\n/**\n * Plugin that turns markdown into HTML to support rehype.\n *\n * * If a destination processor is given, that processor runs with a new HTML\n * (hast) tree (bridge-mode).\n * As the given processor runs with a hast tree, and rehype plugins support\n * hast, that means rehype plugins can be used with the given processor.\n * The hast tree is discarded in the end.\n * It’s highly unlikely that you want to do this.\n * * The common case is to not pass a destination processor, in which case the\n * current processor continues running with a new HTML (hast) tree\n * (mutate-mode).\n * As the current processor continues with a hast tree, and rehype plugins\n * support hast, that means rehype plugins can be used after\n * `remark-rehype`.\n * It’s likely that this is what you want to do.\n *\n * @param destination\n * Optional unified processor.\n * @param options\n * Options passed to `mdast-util-to-hast`.\n */\nconst remarkRehype =\n /** @type {(import('unified').Plugin<[Processor, Options?]|[null|undefined, Options?]|[Options]|[], MdastRoot>)} */\n (\n function (destination, options) {\n return destination && 'run' in destination\n ? bridge(destination, options)\n : mutate(destination || options)\n }\n )\n\nexport default remarkRehype\n\n/**\n * Bridge-mode.\n * Runs the destination with the new hast tree.\n *\n * @type {import('unified').Plugin<[Processor, Options?], MdastRoot>}\n */\nfunction bridge(destination, options) {\n return (node, file, next) => {\n destination.run(toHast(node, options), file, (error) => {\n next(error)\n })\n }\n}\n\n/**\n * Mutate-mode.\n * Further plugins run on the hast tree.\n *\n * @type {import('unified').Plugin<[Options?]|void[], MdastRoot, HastRoot>}\n */\nfunction mutate(options) {\n // @ts-expect-error: assume a corresponding node is returned by `toHast`.\n return (node) => toHast(node, options)\n}\n","/**\n * @typedef {import('./info.js').Info} Info\n * @typedef {Record} Properties\n * @typedef {Record} Normal\n */\n\nexport class Schema {\n /**\n * @constructor\n * @param {Properties} property\n * @param {Normal} normal\n * @param {string} [space]\n */\n constructor(property, normal, space) {\n this.property = property\n this.normal = normal\n if (space) {\n this.space = space\n }\n }\n}\n\n/** @type {Properties} */\nSchema.prototype.property = {}\n/** @type {Normal} */\nSchema.prototype.normal = {}\n/** @type {string|null} */\nSchema.prototype.space = null\n","/**\n * @typedef {import('./schema.js').Properties} Properties\n * @typedef {import('./schema.js').Normal} Normal\n */\n\nimport {Schema} from './schema.js'\n\n/**\n * @param {Schema[]} definitions\n * @param {string} [space]\n * @returns {Schema}\n */\nexport function merge(definitions, space) {\n /** @type {Properties} */\n const property = {}\n /** @type {Normal} */\n const normal = {}\n let index = -1\n\n while (++index < definitions.length) {\n Object.assign(property, definitions[index].property)\n Object.assign(normal, definitions[index].normal)\n }\n\n return new Schema(property, normal, space)\n}\n","/**\n * @param {string} value\n * @returns {string}\n */\nexport function normalize(value) {\n return value.toLowerCase()\n}\n","export class Info {\n /**\n * @constructor\n * @param {string} property\n * @param {string} attribute\n */\n constructor(property, attribute) {\n /** @type {string} */\n this.property = property\n /** @type {string} */\n this.attribute = attribute\n }\n}\n\n/** @type {string|null} */\nInfo.prototype.space = null\nInfo.prototype.boolean = false\nInfo.prototype.booleanish = false\nInfo.prototype.overloadedBoolean = false\nInfo.prototype.number = false\nInfo.prototype.commaSeparated = false\nInfo.prototype.spaceSeparated = false\nInfo.prototype.commaOrSpaceSeparated = false\nInfo.prototype.mustUseProperty = false\nInfo.prototype.defined = false\n","let powers = 0\n\nexport const boolean = increment()\nexport const booleanish = increment()\nexport const overloadedBoolean = increment()\nexport const number = increment()\nexport const spaceSeparated = increment()\nexport const commaSeparated = increment()\nexport const commaOrSpaceSeparated = increment()\n\nfunction increment() {\n return 2 ** ++powers\n}\n","import {Info} from './info.js'\nimport * as types from './types.js'\n\n/** @type {Array} */\n// @ts-expect-error: hush.\nconst checks = Object.keys(types)\n\nexport class DefinedInfo extends Info {\n /**\n * @constructor\n * @param {string} property\n * @param {string} attribute\n * @param {number|null} [mask]\n * @param {string} [space]\n */\n constructor(property, attribute, mask, space) {\n let index = -1\n\n super(property, attribute)\n\n mark(this, 'space', space)\n\n if (typeof mask === 'number') {\n while (++index < checks.length) {\n const check = checks[index]\n mark(this, checks[index], (mask & types[check]) === types[check])\n }\n }\n }\n}\n\nDefinedInfo.prototype.defined = true\n\n/**\n * @param {DefinedInfo} values\n * @param {string} key\n * @param {unknown} value\n */\nfunction mark(values, key, value) {\n if (value) {\n // @ts-expect-error: assume `value` matches the expected value of `key`.\n values[key] = value\n }\n}\n","/**\n * @typedef {import('./schema.js').Properties} Properties\n * @typedef {import('./schema.js').Normal} Normal\n *\n * @typedef {Record} Attributes\n *\n * @typedef {Object} Definition\n * @property {Record} properties\n * @property {(attributes: Attributes, property: string) => string} transform\n * @property {string} [space]\n * @property {Attributes} [attributes]\n * @property {Array} [mustUseProperty]\n */\n\nimport {normalize} from '../normalize.js'\nimport {Schema} from './schema.js'\nimport {DefinedInfo} from './defined-info.js'\n\nconst own = {}.hasOwnProperty\n\n/**\n * @param {Definition} definition\n * @returns {Schema}\n */\nexport function create(definition) {\n /** @type {Properties} */\n const property = {}\n /** @type {Normal} */\n const normal = {}\n /** @type {string} */\n let prop\n\n for (prop in definition.properties) {\n if (own.call(definition.properties, prop)) {\n const value = definition.properties[prop]\n const info = new DefinedInfo(\n prop,\n definition.transform(definition.attributes || {}, prop),\n value,\n definition.space\n )\n\n if (\n definition.mustUseProperty &&\n definition.mustUseProperty.includes(prop)\n ) {\n info.mustUseProperty = true\n }\n\n property[prop] = info\n\n normal[normalize(prop)] = prop\n normal[normalize(info.attribute)] = prop\n }\n }\n\n return new Schema(property, normal, definition.space)\n}\n","import {create} from './util/create.js'\n\nexport const xlink = create({\n space: 'xlink',\n transform(_, prop) {\n return 'xlink:' + prop.slice(5).toLowerCase()\n },\n properties: {\n xLinkActuate: null,\n xLinkArcRole: null,\n xLinkHref: null,\n xLinkRole: null,\n xLinkShow: null,\n xLinkTitle: null,\n xLinkType: null\n }\n})\n","import {create} from './util/create.js'\n\nexport const xml = create({\n space: 'xml',\n transform(_, prop) {\n return 'xml:' + prop.slice(3).toLowerCase()\n },\n properties: {xmlLang: null, xmlBase: null, xmlSpace: null}\n})\n","/**\n * @param {Record} attributes\n * @param {string} attribute\n * @returns {string}\n */\nexport function caseSensitiveTransform(attributes, attribute) {\n return attribute in attributes ? attributes[attribute] : attribute\n}\n","import {caseSensitiveTransform} from './case-sensitive-transform.js'\n\n/**\n * @param {Record} attributes\n * @param {string} property\n * @returns {string}\n */\nexport function caseInsensitiveTransform(attributes, property) {\n return caseSensitiveTransform(attributes, property.toLowerCase())\n}\n","import {create} from './util/create.js'\nimport {caseInsensitiveTransform} from './util/case-insensitive-transform.js'\n\nexport const xmlns = create({\n space: 'xmlns',\n attributes: {xmlnsxlink: 'xmlns:xlink'},\n transform: caseInsensitiveTransform,\n properties: {xmlns: null, xmlnsXLink: null}\n})\n","import {booleanish, number, spaceSeparated} from './util/types.js'\nimport {create} from './util/create.js'\n\nexport const aria = create({\n transform(_, prop) {\n return prop === 'role' ? prop : 'aria-' + prop.slice(4).toLowerCase()\n },\n properties: {\n ariaActiveDescendant: null,\n ariaAtomic: booleanish,\n ariaAutoComplete: null,\n ariaBusy: booleanish,\n ariaChecked: booleanish,\n ariaColCount: number,\n ariaColIndex: number,\n ariaColSpan: number,\n ariaControls: spaceSeparated,\n ariaCurrent: null,\n ariaDescribedBy: spaceSeparated,\n ariaDetails: null,\n ariaDisabled: booleanish,\n ariaDropEffect: spaceSeparated,\n ariaErrorMessage: null,\n ariaExpanded: booleanish,\n ariaFlowTo: spaceSeparated,\n ariaGrabbed: booleanish,\n ariaHasPopup: null,\n ariaHidden: booleanish,\n ariaInvalid: null,\n ariaKeyShortcuts: null,\n ariaLabel: null,\n ariaLabelledBy: spaceSeparated,\n ariaLevel: number,\n ariaLive: null,\n ariaModal: booleanish,\n ariaMultiLine: booleanish,\n ariaMultiSelectable: booleanish,\n ariaOrientation: null,\n ariaOwns: spaceSeparated,\n ariaPlaceholder: null,\n ariaPosInSet: number,\n ariaPressed: booleanish,\n ariaReadOnly: booleanish,\n ariaRelevant: null,\n ariaRequired: booleanish,\n ariaRoleDescription: spaceSeparated,\n ariaRowCount: number,\n ariaRowIndex: number,\n ariaRowSpan: number,\n ariaSelected: booleanish,\n ariaSetSize: number,\n ariaSort: null,\n ariaValueMax: number,\n ariaValueMin: number,\n ariaValueNow: number,\n ariaValueText: null,\n role: null\n }\n})\n","import {\n boolean,\n overloadedBoolean,\n booleanish,\n number,\n spaceSeparated,\n commaSeparated\n} from './util/types.js'\nimport {create} from './util/create.js'\nimport {caseInsensitiveTransform} from './util/case-insensitive-transform.js'\n\nexport const html = create({\n space: 'html',\n attributes: {\n acceptcharset: 'accept-charset',\n classname: 'class',\n htmlfor: 'for',\n httpequiv: 'http-equiv'\n },\n transform: caseInsensitiveTransform,\n mustUseProperty: ['checked', 'multiple', 'muted', 'selected'],\n properties: {\n // Standard Properties.\n abbr: null,\n accept: commaSeparated,\n acceptCharset: spaceSeparated,\n accessKey: spaceSeparated,\n action: null,\n allow: null,\n allowFullScreen: boolean,\n allowPaymentRequest: boolean,\n allowUserMedia: boolean,\n alt: null,\n as: null,\n async: boolean,\n autoCapitalize: null,\n autoComplete: spaceSeparated,\n autoFocus: boolean,\n autoPlay: boolean,\n blocking: spaceSeparated,\n capture: null,\n charSet: null,\n checked: boolean,\n cite: null,\n className: spaceSeparated,\n cols: number,\n colSpan: null,\n content: null,\n contentEditable: booleanish,\n controls: boolean,\n controlsList: spaceSeparated,\n coords: number | commaSeparated,\n crossOrigin: null,\n data: null,\n dateTime: null,\n decoding: null,\n default: boolean,\n defer: boolean,\n dir: null,\n dirName: null,\n disabled: boolean,\n download: overloadedBoolean,\n draggable: booleanish,\n encType: null,\n enterKeyHint: null,\n fetchPriority: null,\n form: null,\n formAction: null,\n formEncType: null,\n formMethod: null,\n formNoValidate: boolean,\n formTarget: null,\n headers: spaceSeparated,\n height: number,\n hidden: boolean,\n high: number,\n href: null,\n hrefLang: null,\n htmlFor: spaceSeparated,\n httpEquiv: spaceSeparated,\n id: null,\n imageSizes: null,\n imageSrcSet: null,\n inert: boolean,\n inputMode: null,\n integrity: null,\n is: null,\n isMap: boolean,\n itemId: null,\n itemProp: spaceSeparated,\n itemRef: spaceSeparated,\n itemScope: boolean,\n itemType: spaceSeparated,\n kind: null,\n label: null,\n lang: null,\n language: null,\n list: null,\n loading: null,\n loop: boolean,\n low: number,\n manifest: null,\n max: null,\n maxLength: number,\n media: null,\n method: null,\n min: null,\n minLength: number,\n multiple: boolean,\n muted: boolean,\n name: null,\n nonce: null,\n noModule: boolean,\n noValidate: boolean,\n onAbort: null,\n onAfterPrint: null,\n onAuxClick: null,\n onBeforeMatch: null,\n onBeforePrint: null,\n onBeforeToggle: null,\n onBeforeUnload: null,\n onBlur: null,\n onCancel: null,\n onCanPlay: null,\n onCanPlayThrough: null,\n onChange: null,\n onClick: null,\n onClose: null,\n onContextLost: null,\n onContextMenu: null,\n onContextRestored: null,\n onCopy: null,\n onCueChange: null,\n onCut: null,\n onDblClick: null,\n onDrag: null,\n onDragEnd: null,\n onDragEnter: null,\n onDragExit: null,\n onDragLeave: null,\n onDragOver: null,\n onDragStart: null,\n onDrop: null,\n onDurationChange: null,\n onEmptied: null,\n onEnded: null,\n onError: null,\n onFocus: null,\n onFormData: null,\n onHashChange: null,\n onInput: null,\n onInvalid: null,\n onKeyDown: null,\n onKeyPress: null,\n onKeyUp: null,\n onLanguageChange: null,\n onLoad: null,\n onLoadedData: null,\n onLoadedMetadata: null,\n onLoadEnd: null,\n onLoadStart: null,\n onMessage: null,\n onMessageError: null,\n onMouseDown: null,\n onMouseEnter: null,\n onMouseLeave: null,\n onMouseMove: null,\n onMouseOut: null,\n onMouseOver: null,\n onMouseUp: null,\n onOffline: null,\n onOnline: null,\n onPageHide: null,\n onPageShow: null,\n onPaste: null,\n onPause: null,\n onPlay: null,\n onPlaying: null,\n onPopState: null,\n onProgress: null,\n onRateChange: null,\n onRejectionHandled: null,\n onReset: null,\n onResize: null,\n onScroll: null,\n onScrollEnd: null,\n onSecurityPolicyViolation: null,\n onSeeked: null,\n onSeeking: null,\n onSelect: null,\n onSlotChange: null,\n onStalled: null,\n onStorage: null,\n onSubmit: null,\n onSuspend: null,\n onTimeUpdate: null,\n onToggle: null,\n onUnhandledRejection: null,\n onUnload: null,\n onVolumeChange: null,\n onWaiting: null,\n onWheel: null,\n open: boolean,\n optimum: number,\n pattern: null,\n ping: spaceSeparated,\n placeholder: null,\n playsInline: boolean,\n popover: null,\n popoverTarget: null,\n popoverTargetAction: null,\n poster: null,\n preload: null,\n readOnly: boolean,\n referrerPolicy: null,\n rel: spaceSeparated,\n required: boolean,\n reversed: boolean,\n rows: number,\n rowSpan: number,\n sandbox: spaceSeparated,\n scope: null,\n scoped: boolean,\n seamless: boolean,\n selected: boolean,\n shadowRootClonable: boolean,\n shadowRootDelegatesFocus: boolean,\n shadowRootMode: null,\n shape: null,\n size: number,\n sizes: null,\n slot: null,\n span: number,\n spellCheck: booleanish,\n src: null,\n srcDoc: null,\n srcLang: null,\n srcSet: null,\n start: number,\n step: null,\n style: null,\n tabIndex: number,\n target: null,\n title: null,\n translate: null,\n type: null,\n typeMustMatch: boolean,\n useMap: null,\n value: booleanish,\n width: number,\n wrap: null,\n writingSuggestions: null,\n\n // Legacy.\n // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis\n align: null, // Several. Use CSS `text-align` instead,\n aLink: null, // ``. Use CSS `a:active {color}` instead\n archive: spaceSeparated, // ``. List of URIs to archives\n axis: null, // `` and ``. Use `scope` on ``\n background: null, // ``. Use CSS `background-image` instead\n bgColor: null, // `` and table elements. Use CSS `background-color` instead\n border: number, // ``. Use CSS `border-width` instead,\n borderColor: null, // `
`. Use CSS `border-color` instead,\n bottomMargin: number, // ``\n cellPadding: null, // `
`\n cellSpacing: null, // `
`\n char: null, // Several table elements. When `align=char`, sets the character to align on\n charOff: null, // Several table elements. When `char`, offsets the alignment\n classId: null, // ``\n clear: null, // `
`. Use CSS `clear` instead\n code: null, // ``\n codeBase: null, // ``\n codeType: null, // ``\n color: null, // `` and `
`. Use CSS instead\n compact: boolean, // Lists. Use CSS to reduce space between items instead\n declare: boolean, // ``\n event: null, // `\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationRawTagOpen(code) {\n if (code === 47) {\n effects.consume(code)\n buffer = ''\n return continuationRawEndTag\n }\n return continuation(code)\n }\n\n /**\n * In raw continuation, after ` | \n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function continuationRawEndTag(code) {\n if (code === 62) {\n const name = buffer.toLowerCase()\n if (htmlRawNames.includes(name)) {\n effects.consume(code)\n return continuationClose\n }\n return continuation(code)\n }\n if (asciiAlpha(code) && buffer.length < 8) {\n effects.consume(code)\n // @ts-expect-error: not null.\n buffer += String.fromCharCode(code)\n return continuationRawEndTag\n }\n return continuation(code)\n }\n\n /**\n * In cdata continuation, after `]`, expecting `]>`.\n *\n * ```markdown\n * > | &<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationCdataInside(code) {\n if (code === 93) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n return continuation(code)\n }\n\n /**\n * In declaration or instruction continuation, at `>`.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | &<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationDeclarationInside(code) {\n if (code === 62) {\n effects.consume(code)\n return continuationClose\n }\n\n // More dashes.\n if (code === 45 && marker === 2) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n return continuation(code)\n }\n\n /**\n * In closed continuation: everything we get until the eol/eof is part of it.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationClose(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('htmlFlowData')\n return continuationAfter(code)\n }\n effects.consume(code)\n return continuationClose\n }\n\n /**\n * Done.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationAfter(code) {\n effects.exit('htmlFlow')\n // // Feel free to interrupt.\n // tokenizer.interrupt = false\n // // No longer concrete.\n // tokenizer.concrete = false\n return ok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuationStart(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * At eol, before continuation.\n *\n * ```markdown\n * > | * ```js\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return after\n }\n return nok(code)\n }\n\n /**\n * A continuation.\n *\n * ```markdown\n * | * ```js\n * > | b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeBlankLineBefore(effects, ok, nok) {\n return start\n\n /**\n * Before eol, expecting blank line.\n *\n * ```markdown\n * > |
\n * ^\n * |\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return effects.attempt(blankLine, ok, nok)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\n/** @type {Construct} */\nconst nonLazyContinuation = {\n tokenize: tokenizeNonLazyContinuation,\n partial: true\n}\n\n/** @type {Construct} */\nexport const codeFenced = {\n name: 'codeFenced',\n tokenize: tokenizeCodeFenced,\n concrete: true\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCodeFenced(effects, ok, nok) {\n const self = this\n /** @type {Construct} */\n const closeStart = {\n tokenize: tokenizeCloseStart,\n partial: true\n }\n let initialPrefix = 0\n let sizeOpen = 0\n /** @type {NonNullable} */\n let marker\n return start\n\n /**\n * Start of code.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: parse whitespace like `markdown-rs`.\n return beforeSequenceOpen(code)\n }\n\n /**\n * In opening fence, after prefix, at sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeSequenceOpen(code) {\n const tail = self.events[self.events.length - 1]\n initialPrefix =\n tail && tail[1].type === 'linePrefix'\n ? tail[2].sliceSerialize(tail[1], true).length\n : 0\n marker = code\n effects.enter('codeFenced')\n effects.enter('codeFencedFence')\n effects.enter('codeFencedFenceSequence')\n return sequenceOpen(code)\n }\n\n /**\n * In opening fence sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === marker) {\n sizeOpen++\n effects.consume(code)\n return sequenceOpen\n }\n if (sizeOpen < 3) {\n return nok(code)\n }\n effects.exit('codeFencedFenceSequence')\n return markdownSpace(code)\n ? factorySpace(effects, infoBefore, 'whitespace')(code)\n : infoBefore(code)\n }\n\n /**\n * In opening fence, after the sequence (and optional whitespace), before info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function infoBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFencedFence')\n return self.interrupt\n ? ok(code)\n : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code)\n }\n effects.enter('codeFencedFenceInfo')\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return info(code)\n }\n\n /**\n * In info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function info(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceInfo')\n return infoBefore(code)\n }\n if (markdownSpace(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceInfo')\n return factorySpace(effects, metaBefore, 'whitespace')(code)\n }\n if (code === 96 && code === marker) {\n return nok(code)\n }\n effects.consume(code)\n return info\n }\n\n /**\n * In opening fence, after info and whitespace, before meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function metaBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n return infoBefore(code)\n }\n effects.enter('codeFencedFenceMeta')\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return meta(code)\n }\n\n /**\n * In meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function meta(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceMeta')\n return infoBefore(code)\n }\n if (code === 96 && code === marker) {\n return nok(code)\n }\n effects.consume(code)\n return meta\n }\n\n /**\n * At eol/eof in code, before a non-lazy closing fence or content.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function atNonLazyBreak(code) {\n return effects.attempt(closeStart, after, contentBefore)(code)\n }\n\n /**\n * Before code content, not a closing fence, at eol.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentBefore(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return contentStart\n }\n\n /**\n * Before code content, not a closing fence.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentStart(code) {\n return initialPrefix > 0 && markdownSpace(code)\n ? factorySpace(\n effects,\n beforeContentChunk,\n 'linePrefix',\n initialPrefix + 1\n )(code)\n : beforeContentChunk(code)\n }\n\n /**\n * Before code content, after optional prefix.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeContentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code)\n }\n effects.enter('codeFlowValue')\n return contentChunk(code)\n }\n\n /**\n * In code content.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^^^^^^^^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFlowValue')\n return beforeContentChunk(code)\n }\n effects.consume(code)\n return contentChunk\n }\n\n /**\n * After code.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n effects.exit('codeFenced')\n return ok(code)\n }\n\n /**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\n function tokenizeCloseStart(effects, ok, nok) {\n let size = 0\n return startBefore\n\n /**\n *\n *\n * @type {State}\n */\n function startBefore(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return start\n }\n\n /**\n * Before closing fence, at optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Always populated by defaults.\n\n // To do: `enter` here or in next state?\n effects.enter('codeFencedFence')\n return markdownSpace(code)\n ? factorySpace(\n effects,\n beforeSequenceClose,\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n : beforeSequenceClose(code)\n }\n\n /**\n * In closing fence, after optional whitespace, at sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function beforeSequenceClose(code) {\n if (code === marker) {\n effects.enter('codeFencedFenceSequence')\n return sequenceClose(code)\n }\n return nok(code)\n }\n\n /**\n * In closing fence sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n if (code === marker) {\n size++\n effects.consume(code)\n return sequenceClose\n }\n if (size >= sizeOpen) {\n effects.exit('codeFencedFenceSequence')\n return markdownSpace(code)\n ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code)\n : sequenceCloseAfter(code)\n }\n return nok(code)\n }\n\n /**\n * After closing fence sequence, after optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceCloseAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFencedFence')\n return ok(code)\n }\n return nok(code)\n }\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuation(effects, ok, nok) {\n const self = this\n return start\n\n /**\n *\n *\n * @type {State}\n */\n function start(code) {\n if (code === null) {\n return nok(code)\n }\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return lineStart\n }\n\n /**\n *\n *\n * @type {State}\n */\n function lineStart(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code)\n }\n}\n","/// \n\n/* eslint-env browser */\n\nconst element = document.createElement('i')\n\n/**\n * @param {string} value\n * @returns {string|false}\n */\nexport function decodeNamedCharacterReference(value) {\n const characterReference = '&' + value + ';'\n element.innerHTML = characterReference\n const char = element.textContent\n\n // Some named character references do not require the closing semicolon\n // (`¬`, for instance), which leads to situations where parsing the assumed\n // named reference of `¬it;` will result in the string `¬it;`.\n // When we encounter a trailing semicolon after parsing, and the character\n // reference to decode was not a semicolon (`;`), we can assume that the\n // matching was not complete.\n // @ts-expect-error: TypeScript is wrong that `textContent` on elements can\n // yield `null`.\n if (char.charCodeAt(char.length - 1) === 59 /* `;` */ && value !== 'semi') {\n return false\n }\n\n // If the decoded string is equal to the input, the character reference was\n // not valid.\n // @ts-expect-error: TypeScript is wrong that `textContent` on elements can\n // yield `null`.\n return char === characterReference ? false : char\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {\n asciiAlphanumeric,\n asciiDigit,\n asciiHexDigit\n} from 'micromark-util-character'\n/** @type {Construct} */\nexport const characterReference = {\n name: 'characterReference',\n tokenize: tokenizeCharacterReference\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterReference(effects, ok, nok) {\n const self = this\n let size = 0\n /** @type {number} */\n let max\n /** @type {(code: Code) => boolean} */\n let test\n return start\n\n /**\n * Start of character reference.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('characterReference')\n effects.enter('characterReferenceMarker')\n effects.consume(code)\n effects.exit('characterReferenceMarker')\n return open\n }\n\n /**\n * After `&`, at `#` for numeric references or alphanumeric for named\n * references.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 35) {\n effects.enter('characterReferenceMarkerNumeric')\n effects.consume(code)\n effects.exit('characterReferenceMarkerNumeric')\n return numeric\n }\n effects.enter('characterReferenceValue')\n max = 31\n test = asciiAlphanumeric\n return value(code)\n }\n\n /**\n * After `#`, at `x` for hexadecimals or digit for decimals.\n *\n * ```markdown\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function numeric(code) {\n if (code === 88 || code === 120) {\n effects.enter('characterReferenceMarkerHexadecimal')\n effects.consume(code)\n effects.exit('characterReferenceMarkerHexadecimal')\n effects.enter('characterReferenceValue')\n max = 6\n test = asciiHexDigit\n return value\n }\n effects.enter('characterReferenceValue')\n max = 7\n test = asciiDigit\n return value(code)\n }\n\n /**\n * After markers (`&#x`, `&#`, or `&`), in value, before `;`.\n *\n * The character reference kind defines what and how many characters are\n * allowed.\n *\n * ```markdown\n * > | a&b\n * ^^^\n * > | a{b\n * ^^^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function value(code) {\n if (code === 59 && size) {\n const token = effects.exit('characterReferenceValue')\n if (\n test === asciiAlphanumeric &&\n !decodeNamedCharacterReference(self.sliceSerialize(token))\n ) {\n return nok(code)\n }\n\n // To do: `markdown-rs` uses a different name:\n // `CharacterReferenceMarkerSemi`.\n effects.enter('characterReferenceMarker')\n effects.consume(code)\n effects.exit('characterReferenceMarker')\n effects.exit('characterReference')\n return ok\n }\n if (test(code) && size++ < max) {\n effects.consume(code)\n return value\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {asciiPunctuation} from 'micromark-util-character'\n/** @type {Construct} */\nexport const characterEscape = {\n name: 'characterEscape',\n tokenize: tokenizeCharacterEscape\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterEscape(effects, ok, nok) {\n return start\n\n /**\n * Start of character escape.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('characterEscape')\n effects.enter('escapeMarker')\n effects.consume(code)\n effects.exit('escapeMarker')\n return inside\n }\n\n /**\n * After `\\`, at punctuation.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n // ASCII punctuation.\n if (asciiPunctuation(code)) {\n effects.enter('characterEscapeValue')\n effects.consume(code)\n effects.exit('characterEscapeValue')\n effects.exit('characterEscape')\n return ok\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {Construct} */\nexport const lineEnding = {\n name: 'lineEnding',\n tokenize: tokenizeLineEnding\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLineEnding(effects, ok) {\n return start\n\n /** @type {State} */\n function start(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, ok, 'linePrefix')\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factoryDestination} from 'micromark-factory-destination'\nimport {factoryLabel} from 'micromark-factory-label'\nimport {factoryTitle} from 'micromark-factory-title'\nimport {factoryWhitespace} from 'micromark-factory-whitespace'\nimport {markdownLineEndingOrSpace} from 'micromark-util-character'\nimport {push, splice} from 'micromark-util-chunked'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {resolveAll} from 'micromark-util-resolve-all'\n/** @type {Construct} */\nexport const labelEnd = {\n name: 'labelEnd',\n tokenize: tokenizeLabelEnd,\n resolveTo: resolveToLabelEnd,\n resolveAll: resolveAllLabelEnd\n}\n\n/** @type {Construct} */\nconst resourceConstruct = {\n tokenize: tokenizeResource\n}\n/** @type {Construct} */\nconst referenceFullConstruct = {\n tokenize: tokenizeReferenceFull\n}\n/** @type {Construct} */\nconst referenceCollapsedConstruct = {\n tokenize: tokenizeReferenceCollapsed\n}\n\n/** @type {Resolver} */\nfunction resolveAllLabelEnd(events) {\n let index = -1\n while (++index < events.length) {\n const token = events[index][1]\n if (\n token.type === 'labelImage' ||\n token.type === 'labelLink' ||\n token.type === 'labelEnd'\n ) {\n // Remove the marker.\n events.splice(index + 1, token.type === 'labelImage' ? 4 : 2)\n token.type = 'data'\n index++\n }\n }\n return events\n}\n\n/** @type {Resolver} */\nfunction resolveToLabelEnd(events, context) {\n let index = events.length\n let offset = 0\n /** @type {Token} */\n let token\n /** @type {number | undefined} */\n let open\n /** @type {number | undefined} */\n let close\n /** @type {Array} */\n let media\n\n // Find an opening.\n while (index--) {\n token = events[index][1]\n if (open) {\n // If we see another link, or inactive link label, we’ve been here before.\n if (\n token.type === 'link' ||\n (token.type === 'labelLink' && token._inactive)\n ) {\n break\n }\n\n // Mark other link openings as inactive, as we can’t have links in\n // links.\n if (events[index][0] === 'enter' && token.type === 'labelLink') {\n token._inactive = true\n }\n } else if (close) {\n if (\n events[index][0] === 'enter' &&\n (token.type === 'labelImage' || token.type === 'labelLink') &&\n !token._balanced\n ) {\n open = index\n if (token.type !== 'labelLink') {\n offset = 2\n break\n }\n }\n } else if (token.type === 'labelEnd') {\n close = index\n }\n }\n const group = {\n type: events[open][1].type === 'labelLink' ? 'link' : 'image',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n }\n const label = {\n type: 'label',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[close][1].end)\n }\n const text = {\n type: 'labelText',\n start: Object.assign({}, events[open + offset + 2][1].end),\n end: Object.assign({}, events[close - 2][1].start)\n }\n media = [\n ['enter', group, context],\n ['enter', label, context]\n ]\n\n // Opening marker.\n media = push(media, events.slice(open + 1, open + offset + 3))\n\n // Text open.\n media = push(media, [['enter', text, context]])\n\n // Always populated by defaults.\n\n // Between.\n media = push(\n media,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + offset + 4, close - 3),\n context\n )\n )\n\n // Text close, marker close, label close.\n media = push(media, [\n ['exit', text, context],\n events[close - 2],\n events[close - 1],\n ['exit', label, context]\n ])\n\n // Reference, resource, or so.\n media = push(media, events.slice(close + 1))\n\n // Media close.\n media = push(media, [['exit', group, context]])\n splice(events, open, events.length, media)\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelEnd(effects, ok, nok) {\n const self = this\n let index = self.events.length\n /** @type {Token} */\n let labelStart\n /** @type {boolean} */\n let defined\n\n // Find an opening.\n while (index--) {\n if (\n (self.events[index][1].type === 'labelImage' ||\n self.events[index][1].type === 'labelLink') &&\n !self.events[index][1]._balanced\n ) {\n labelStart = self.events[index][1]\n break\n }\n }\n return start\n\n /**\n * Start of label end.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // If there is not an okay opening.\n if (!labelStart) {\n return nok(code)\n }\n\n // If the corresponding label (link) start is marked as inactive,\n // it means we’d be wrapping a link, like this:\n //\n // ```markdown\n // > | a [b [c](d) e](f) g.\n // ^\n // ```\n //\n // We can’t have that, so it’s just balanced brackets.\n if (labelStart._inactive) {\n return labelEndNok(code)\n }\n defined = self.parser.defined.includes(\n normalizeIdentifier(\n self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })\n )\n )\n effects.enter('labelEnd')\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelEnd')\n return after\n }\n\n /**\n * After `]`.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Note: `markdown-rs` also parses GFM footnotes here, which for us is in\n // an extension.\n\n // Resource (`[asd](fgh)`)?\n if (code === 40) {\n return effects.attempt(\n resourceConstruct,\n labelEndOk,\n defined ? labelEndOk : labelEndNok\n )(code)\n }\n\n // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference?\n if (code === 91) {\n return effects.attempt(\n referenceFullConstruct,\n labelEndOk,\n defined ? referenceNotFull : labelEndNok\n )(code)\n }\n\n // Shortcut (`[asd]`) reference?\n return defined ? labelEndOk(code) : labelEndNok(code)\n }\n\n /**\n * After `]`, at `[`, but not at a full reference.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceNotFull(code) {\n return effects.attempt(\n referenceCollapsedConstruct,\n labelEndOk,\n labelEndNok\n )(code)\n }\n\n /**\n * Done, we found something.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndOk(code) {\n // Note: `markdown-rs` does a bunch of stuff here.\n return ok(code)\n }\n\n /**\n * Done, it’s nothing.\n *\n * There was an okay opening, but we didn’t match anything.\n *\n * ```markdown\n * > | [a](b c\n * ^\n * > | [a][b c\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndNok(code) {\n labelStart._balanced = true\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeResource(effects, ok, nok) {\n return resourceStart\n\n /**\n * At a resource.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceStart(code) {\n effects.enter('resource')\n effects.enter('resourceMarker')\n effects.consume(code)\n effects.exit('resourceMarker')\n return resourceBefore\n }\n\n /**\n * In resource, after `(`, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBefore(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceOpen)(code)\n : resourceOpen(code)\n }\n\n /**\n * In resource, after optional whitespace, at `)` or a destination.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceOpen(code) {\n if (code === 41) {\n return resourceEnd(code)\n }\n return factoryDestination(\n effects,\n resourceDestinationAfter,\n resourceDestinationMissing,\n 'resourceDestination',\n 'resourceDestinationLiteral',\n 'resourceDestinationLiteralMarker',\n 'resourceDestinationRaw',\n 'resourceDestinationString',\n 32\n )(code)\n }\n\n /**\n * In resource, after destination, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationAfter(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceBetween)(code)\n : resourceEnd(code)\n }\n\n /**\n * At invalid destination.\n *\n * ```markdown\n * > | [a](<<) b\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationMissing(code) {\n return nok(code)\n }\n\n /**\n * In resource, after destination and whitespace, at `(` or title.\n *\n * ```markdown\n * > | [a](b ) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBetween(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(\n effects,\n resourceTitleAfter,\n nok,\n 'resourceTitle',\n 'resourceTitleMarker',\n 'resourceTitleString'\n )(code)\n }\n return resourceEnd(code)\n }\n\n /**\n * In resource, after title, at optional whitespace.\n *\n * ```markdown\n * > | [a](b \"c\") d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceTitleAfter(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceEnd)(code)\n : resourceEnd(code)\n }\n\n /**\n * In resource, at `)`.\n *\n * ```markdown\n * > | [a](b) d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceEnd(code) {\n if (code === 41) {\n effects.enter('resourceMarker')\n effects.consume(code)\n effects.exit('resourceMarker')\n effects.exit('resource')\n return ok\n }\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceFull(effects, ok, nok) {\n const self = this\n return referenceFull\n\n /**\n * In a reference (full), at the `[`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFull(code) {\n return factoryLabel.call(\n self,\n effects,\n referenceFullAfter,\n referenceFullMissing,\n 'reference',\n 'referenceMarker',\n 'referenceString'\n )(code)\n }\n\n /**\n * In a reference (full), after `]`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullAfter(code) {\n return self.parser.defined.includes(\n normalizeIdentifier(\n self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)\n )\n )\n ? ok(code)\n : nok(code)\n }\n\n /**\n * In reference (full) that was missing.\n *\n * ```markdown\n * > | [a][b d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullMissing(code) {\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceCollapsed(effects, ok, nok) {\n return referenceCollapsedStart\n\n /**\n * In reference (collapsed), at `[`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedStart(code) {\n // We only attempt a collapsed label if there’s a `[`.\n\n effects.enter('reference')\n effects.enter('referenceMarker')\n effects.consume(code)\n effects.exit('referenceMarker')\n return referenceCollapsedOpen\n }\n\n /**\n * In reference (collapsed), at `]`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedOpen(code) {\n if (code === 93) {\n effects.enter('referenceMarker')\n effects.consume(code)\n effects.exit('referenceMarker')\n effects.exit('reference')\n return ok\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {labelEnd} from './label-end.js'\n\n/** @type {Construct} */\nexport const labelStartImage = {\n name: 'labelStartImage',\n tokenize: tokenizeLabelStartImage,\n resolveAll: labelEnd.resolveAll\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartImage(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * Start of label (image) start.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('labelImage')\n effects.enter('labelImageMarker')\n effects.consume(code)\n effects.exit('labelImageMarker')\n return open\n }\n\n /**\n * After `!`, at `[`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 91) {\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelImage')\n return after\n }\n return nok(code)\n }\n\n /**\n * After `![`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * This is needed in because, when GFM footnotes are enabled, images never\n * form when started with a `^`.\n * Instead, links form:\n *\n * ```markdown\n * ![^a](b)\n *\n * ![^a][b]\n *\n * [b]: c\n * ```\n *\n * ```html\n *

!^a

\n *

!^a

\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // To do: use a new field to do this, this is still needed for\n // `micromark-extension-gfm-footnote`, but the `label-start-link`\n // behavior isn’t.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs\n ? nok(code)\n : ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n */\n\nimport {\n markdownLineEndingOrSpace,\n unicodePunctuation,\n unicodeWhitespace\n} from 'micromark-util-character'\n/**\n * Classify whether a code represents whitespace, punctuation, or something\n * else.\n *\n * Used for attention (emphasis, strong), whose sequences can open or close\n * based on the class of surrounding characters.\n *\n * > 👉 **Note**: eof (`null`) is seen as whitespace.\n *\n * @param {Code} code\n * Code.\n * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined}\n * Group.\n */\nexport function classifyCharacter(code) {\n if (\n code === null ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code)\n ) {\n return 1\n }\n if (unicodePunctuation(code)) {\n return 2\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Point} Point\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {push, splice} from 'micromark-util-chunked'\nimport {classifyCharacter} from 'micromark-util-classify-character'\nimport {resolveAll} from 'micromark-util-resolve-all'\n/** @type {Construct} */\nexport const attention = {\n name: 'attention',\n tokenize: tokenizeAttention,\n resolveAll: resolveAllAttention\n}\n\n/**\n * Take all events and resolve attention to emphasis or strong.\n *\n * @type {Resolver}\n */\nfunction resolveAllAttention(events, context) {\n let index = -1\n /** @type {number} */\n let open\n /** @type {Token} */\n let group\n /** @type {Token} */\n let text\n /** @type {Token} */\n let openingSequence\n /** @type {Token} */\n let closingSequence\n /** @type {number} */\n let use\n /** @type {Array} */\n let nextEvents\n /** @type {number} */\n let offset\n\n // Walk through all events.\n //\n // Note: performance of this is fine on an mb of normal markdown, but it’s\n // a bottleneck for malicious stuff.\n while (++index < events.length) {\n // Find a token that can close.\n if (\n events[index][0] === 'enter' &&\n events[index][1].type === 'attentionSequence' &&\n events[index][1]._close\n ) {\n open = index\n\n // Now walk back to find an opener.\n while (open--) {\n // Find a token that can open the closer.\n if (\n events[open][0] === 'exit' &&\n events[open][1].type === 'attentionSequence' &&\n events[open][1]._open &&\n // If the markers are the same:\n context.sliceSerialize(events[open][1]).charCodeAt(0) ===\n context.sliceSerialize(events[index][1]).charCodeAt(0)\n ) {\n // If the opening can close or the closing can open,\n // and the close size *is not* a multiple of three,\n // but the sum of the opening and closing size *is* multiple of three,\n // then don’t match.\n if (\n (events[open][1]._close || events[index][1]._open) &&\n (events[index][1].end.offset - events[index][1].start.offset) % 3 &&\n !(\n (events[open][1].end.offset -\n events[open][1].start.offset +\n events[index][1].end.offset -\n events[index][1].start.offset) %\n 3\n )\n ) {\n continue\n }\n\n // Number of markers to use from the sequence.\n use =\n events[open][1].end.offset - events[open][1].start.offset > 1 &&\n events[index][1].end.offset - events[index][1].start.offset > 1\n ? 2\n : 1\n const start = Object.assign({}, events[open][1].end)\n const end = Object.assign({}, events[index][1].start)\n movePoint(start, -use)\n movePoint(end, use)\n openingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start,\n end: Object.assign({}, events[open][1].end)\n }\n closingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start: Object.assign({}, events[index][1].start),\n end\n }\n text = {\n type: use > 1 ? 'strongText' : 'emphasisText',\n start: Object.assign({}, events[open][1].end),\n end: Object.assign({}, events[index][1].start)\n }\n group = {\n type: use > 1 ? 'strong' : 'emphasis',\n start: Object.assign({}, openingSequence.start),\n end: Object.assign({}, closingSequence.end)\n }\n events[open][1].end = Object.assign({}, openingSequence.start)\n events[index][1].start = Object.assign({}, closingSequence.end)\n nextEvents = []\n\n // If there are more markers in the opening, add them before.\n if (events[open][1].end.offset - events[open][1].start.offset) {\n nextEvents = push(nextEvents, [\n ['enter', events[open][1], context],\n ['exit', events[open][1], context]\n ])\n }\n\n // Opening.\n nextEvents = push(nextEvents, [\n ['enter', group, context],\n ['enter', openingSequence, context],\n ['exit', openingSequence, context],\n ['enter', text, context]\n ])\n\n // Always populated by defaults.\n\n // Between.\n nextEvents = push(\n nextEvents,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + 1, index),\n context\n )\n )\n\n // Closing.\n nextEvents = push(nextEvents, [\n ['exit', text, context],\n ['enter', closingSequence, context],\n ['exit', closingSequence, context],\n ['exit', group, context]\n ])\n\n // If there are more markers in the closing, add them after.\n if (events[index][1].end.offset - events[index][1].start.offset) {\n offset = 2\n nextEvents = push(nextEvents, [\n ['enter', events[index][1], context],\n ['exit', events[index][1], context]\n ])\n } else {\n offset = 0\n }\n splice(events, open - 1, index - open + 3, nextEvents)\n index = open + nextEvents.length - offset - 2\n break\n }\n }\n }\n }\n\n // Remove remaining sequences.\n index = -1\n while (++index < events.length) {\n if (events[index][1].type === 'attentionSequence') {\n events[index][1].type = 'data'\n }\n }\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeAttention(effects, ok) {\n const attentionMarkers = this.parser.constructs.attentionMarkers.null\n const previous = this.previous\n const before = classifyCharacter(previous)\n\n /** @type {NonNullable} */\n let marker\n return start\n\n /**\n * Before a sequence.\n *\n * ```markdown\n * > | **\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n marker = code\n effects.enter('attentionSequence')\n return inside(code)\n }\n\n /**\n * In a sequence.\n *\n * ```markdown\n * > | **\n * ^^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker) {\n effects.consume(code)\n return inside\n }\n const token = effects.exit('attentionSequence')\n\n // To do: next major: move this to resolver, just like `markdown-rs`.\n const after = classifyCharacter(code)\n\n // Always populated by defaults.\n\n const open =\n !after || (after === 2 && before) || attentionMarkers.includes(code)\n const close =\n !before || (before === 2 && after) || attentionMarkers.includes(previous)\n token._open = Boolean(marker === 42 ? open : open && (before || !close))\n token._close = Boolean(marker === 42 ? close : close && (after || !open))\n return ok(code)\n }\n}\n\n/**\n * Move a point a bit.\n *\n * Note: `move` only works inside lines! It’s not possible to move past other\n * chunks (replacement characters, tabs, or line endings).\n *\n * @param {Point} point\n * @param {number} offset\n * @returns {void}\n */\nfunction movePoint(point, offset) {\n point.column += offset\n point.offset += offset\n point._bufferIndex += offset\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n asciiAtext,\n asciiControl\n} from 'micromark-util-character'\n/** @type {Construct} */\nexport const autolink = {\n name: 'autolink',\n tokenize: tokenizeAutolink\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeAutolink(effects, ok, nok) {\n let size = 0\n return start\n\n /**\n * Start of an autolink.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('autolink')\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.enter('autolinkProtocol')\n return open\n }\n\n /**\n * After `<`, at protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n return schemeOrEmailAtext\n }\n return emailAtext(code)\n }\n\n /**\n * At second byte of protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeOrEmailAtext(code) {\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {\n // Count the previous alphabetical from `open` too.\n size = 1\n return schemeInsideOrEmailAtext(code)\n }\n return emailAtext(code)\n }\n\n /**\n * In ambiguous protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeInsideOrEmailAtext(code) {\n if (code === 58) {\n effects.consume(code)\n size = 0\n return urlInside\n }\n\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if (\n (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) &&\n size++ < 32\n ) {\n effects.consume(code)\n return schemeInsideOrEmailAtext\n }\n size = 0\n return emailAtext(code)\n }\n\n /**\n * After protocol, in URL.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function urlInside(code) {\n if (code === 62) {\n effects.exit('autolinkProtocol')\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.exit('autolink')\n return ok\n }\n\n // ASCII control, space, or `<`.\n if (code === null || code === 32 || code === 60 || asciiControl(code)) {\n return nok(code)\n }\n effects.consume(code)\n return urlInside\n }\n\n /**\n * In email atext.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailAtext(code) {\n if (code === 64) {\n effects.consume(code)\n return emailAtSignOrDot\n }\n if (asciiAtext(code)) {\n effects.consume(code)\n return emailAtext\n }\n return nok(code)\n }\n\n /**\n * In label, after at-sign or dot.\n *\n * ```markdown\n * > | ab\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function emailAtSignOrDot(code) {\n return asciiAlphanumeric(code) ? emailLabel(code) : nok(code)\n }\n\n /**\n * In label, where `.` and `>` are allowed.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailLabel(code) {\n if (code === 46) {\n effects.consume(code)\n size = 0\n return emailAtSignOrDot\n }\n if (code === 62) {\n // Exit, then change the token type.\n effects.exit('autolinkProtocol').type = 'autolinkEmail'\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.exit('autolink')\n return ok\n }\n return emailValue(code)\n }\n\n /**\n * In label, where `.` and `>` are *not* allowed.\n *\n * Though, this is also used in `emailLabel` to parse other values.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailValue(code) {\n // ASCII alphanumeric or `-`.\n if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {\n const next = code === 45 ? emailValue : emailLabel\n effects.consume(code)\n return next\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n markdownLineEnding,\n markdownLineEndingOrSpace,\n markdownSpace\n} from 'micromark-util-character'\n/** @type {Construct} */\nexport const htmlText = {\n name: 'htmlText',\n tokenize: tokenizeHtmlText\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeHtmlText(effects, ok, nok) {\n const self = this\n /** @type {NonNullable | undefined} */\n let marker\n /** @type {number} */\n let index\n /** @type {State} */\n let returnState\n return start\n\n /**\n * Start of HTML (text).\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('htmlText')\n effects.enter('htmlTextData')\n effects.consume(code)\n return open\n }\n\n /**\n * After `<`, at tag name or other stuff.\n *\n * ```markdown\n * > | a c\n * ^\n * > | a c\n * ^\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 33) {\n effects.consume(code)\n return declarationOpen\n }\n if (code === 47) {\n effects.consume(code)\n return tagCloseStart\n }\n if (code === 63) {\n effects.consume(code)\n return instruction\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagOpen\n }\n return nok(code)\n }\n\n /**\n * After ` | a c\n * ^\n * > | a c\n * ^\n * > | a &<]]> c\n * ^\n * ```\n *\n * @type {State}\n */\n function declarationOpen(code) {\n if (code === 45) {\n effects.consume(code)\n return commentOpenInside\n }\n if (code === 91) {\n effects.consume(code)\n index = 0\n return cdataOpenInside\n }\n if (asciiAlpha(code)) {\n effects.consume(code)\n return declaration\n }\n return nok(code)\n }\n\n /**\n * In a comment, after ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentOpenInside(code) {\n if (code === 45) {\n effects.consume(code)\n return commentEnd\n }\n return nok(code)\n }\n\n /**\n * In comment.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function comment(code) {\n if (code === null) {\n return nok(code)\n }\n if (code === 45) {\n effects.consume(code)\n return commentClose\n }\n if (markdownLineEnding(code)) {\n returnState = comment\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return comment\n }\n\n /**\n * In comment, after `-`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentClose(code) {\n if (code === 45) {\n effects.consume(code)\n return commentEnd\n }\n return comment(code)\n }\n\n /**\n * In comment, after `--`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentEnd(code) {\n return code === 62\n ? end(code)\n : code === 45\n ? commentClose(code)\n : comment(code)\n }\n\n /**\n * After ` | a &<]]> b\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function cdataOpenInside(code) {\n const value = 'CDATA['\n if (code === value.charCodeAt(index++)) {\n effects.consume(code)\n return index === value.length ? cdata : cdataOpenInside\n }\n return nok(code)\n }\n\n /**\n * In CDATA.\n *\n * ```markdown\n * > | a &<]]> b\n * ^^^\n * ```\n *\n * @type {State}\n */\n function cdata(code) {\n if (code === null) {\n return nok(code)\n }\n if (code === 93) {\n effects.consume(code)\n return cdataClose\n }\n if (markdownLineEnding(code)) {\n returnState = cdata\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return cdata\n }\n\n /**\n * In CDATA, after `]`, at another `]`.\n *\n * ```markdown\n * > | a &<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataClose(code) {\n if (code === 93) {\n effects.consume(code)\n return cdataEnd\n }\n return cdata(code)\n }\n\n /**\n * In CDATA, after `]]`, at `>`.\n *\n * ```markdown\n * > | a &<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataEnd(code) {\n if (code === 62) {\n return end(code)\n }\n if (code === 93) {\n effects.consume(code)\n return cdataEnd\n }\n return cdata(code)\n }\n\n /**\n * In declaration.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function declaration(code) {\n if (code === null || code === 62) {\n return end(code)\n }\n if (markdownLineEnding(code)) {\n returnState = declaration\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return declaration\n }\n\n /**\n * In instruction.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function instruction(code) {\n if (code === null) {\n return nok(code)\n }\n if (code === 63) {\n effects.consume(code)\n return instructionClose\n }\n if (markdownLineEnding(code)) {\n returnState = instruction\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return instruction\n }\n\n /**\n * In instruction, after `?`, at `>`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function instructionClose(code) {\n return code === 62 ? end(code) : instruction(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseStart(code) {\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagClose\n }\n return nok(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagClose(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagClose\n }\n return tagCloseBetween(code)\n }\n\n /**\n * In closing tag, after tag name.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseBetween(code) {\n if (markdownLineEnding(code)) {\n returnState = tagCloseBetween\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagCloseBetween\n }\n return end(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpen(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagOpen\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n return nok(code)\n }\n\n /**\n * In opening tag, after tag name.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenBetween(code) {\n if (code === 47) {\n effects.consume(code)\n return end\n }\n\n // ASCII alphabetical and `:` and `_`.\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenBetween\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenBetween\n }\n return end(code)\n }\n\n /**\n * In attribute name.\n *\n * ```markdown\n * > | a d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeName(code) {\n // ASCII alphabetical and `-`, `.`, `:`, and `_`.\n if (\n code === 45 ||\n code === 46 ||\n code === 58 ||\n code === 95 ||\n asciiAlphanumeric(code)\n ) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n return tagOpenAttributeNameAfter(code)\n }\n\n /**\n * After attribute name, before initializer, the end of the tag, or\n * whitespace.\n *\n * ```markdown\n * > | a d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeNameAfter\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeNameAfter\n }\n return tagOpenBetween(code)\n }\n\n /**\n * Before unquoted, double quoted, or single quoted attribute value, allowing\n * whitespace.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueBefore(code) {\n if (\n code === null ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96\n ) {\n return nok(code)\n }\n if (code === 34 || code === 39) {\n effects.consume(code)\n marker = code\n return tagOpenAttributeValueQuoted\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueBefore\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n effects.consume(code)\n return tagOpenAttributeValueUnquoted\n }\n\n /**\n * In double or single quoted attribute value.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuoted(code) {\n if (code === marker) {\n effects.consume(code)\n marker = undefined\n return tagOpenAttributeValueQuotedAfter\n }\n if (code === null) {\n return nok(code)\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueQuoted\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return tagOpenAttributeValueQuoted\n }\n\n /**\n * In unquoted attribute value.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueUnquoted(code) {\n if (\n code === null ||\n code === 34 ||\n code === 39 ||\n code === 60 ||\n code === 61 ||\n code === 96\n ) {\n return nok(code)\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n effects.consume(code)\n return tagOpenAttributeValueUnquoted\n }\n\n /**\n * After double or single quoted attribute value, before whitespace or the end\n * of the tag.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuotedAfter(code) {\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n return nok(code)\n }\n\n /**\n * In certain circumstances of a tag where only an `>` is allowed.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function end(code) {\n if (code === 62) {\n effects.consume(code)\n effects.exit('htmlTextData')\n effects.exit('htmlText')\n return ok\n }\n return nok(code)\n }\n\n /**\n * At eol.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * > | a \n * ```\n *\n * @type {State}\n */\n function lineEndingBefore(code) {\n effects.exit('htmlTextData')\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return lineEndingAfter\n }\n\n /**\n * After eol, at optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a \n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfter(code) {\n // Always populated by defaults.\n\n return markdownSpace(code)\n ? factorySpace(\n effects,\n lineEndingAfterPrefix,\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n : lineEndingAfterPrefix(code)\n }\n\n /**\n * After eol, after optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a \n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfterPrefix(code) {\n effects.enter('htmlTextData')\n return returnState(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {labelEnd} from './label-end.js'\n\n/** @type {Construct} */\nexport const labelStartLink = {\n name: 'labelStartLink',\n tokenize: tokenizeLabelStartLink,\n resolveAll: labelEnd.resolveAll\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartLink(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * Start of label (link) start.\n *\n * ```markdown\n * > | a [b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('labelLink')\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelLink')\n return after\n }\n\n /** @type {State} */\n function after(code) {\n // To do: this isn’t needed in `micromark-extension-gfm-footnote`,\n // remove.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs\n ? nok(code)\n : ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {Construct} */\nexport const hardBreakEscape = {\n name: 'hardBreakEscape',\n tokenize: tokenizeHardBreakEscape\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeHardBreakEscape(effects, ok, nok) {\n return start\n\n /**\n * Start of a hard break (escape).\n *\n * ```markdown\n * > | a\\\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('hardBreakEscape')\n effects.consume(code)\n return after\n }\n\n /**\n * After `\\`, at eol.\n *\n * ```markdown\n * > | a\\\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (markdownLineEnding(code)) {\n effects.exit('hardBreakEscape')\n return ok(code)\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Previous} Previous\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {Construct} */\nexport const codeText = {\n name: 'codeText',\n tokenize: tokenizeCodeText,\n resolve: resolveCodeText,\n previous\n}\n\n// To do: next major: don’t resolve, like `markdown-rs`.\n/** @type {Resolver} */\nfunction resolveCodeText(events) {\n let tailExitIndex = events.length - 4\n let headEnterIndex = 3\n /** @type {number} */\n let index\n /** @type {number | undefined} */\n let enter\n\n // If we start and end with an EOL or a space.\n if (\n (events[headEnterIndex][1].type === 'lineEnding' ||\n events[headEnterIndex][1].type === 'space') &&\n (events[tailExitIndex][1].type === 'lineEnding' ||\n events[tailExitIndex][1].type === 'space')\n ) {\n index = headEnterIndex\n\n // And we have data.\n while (++index < tailExitIndex) {\n if (events[index][1].type === 'codeTextData') {\n // Then we have padding.\n events[headEnterIndex][1].type = 'codeTextPadding'\n events[tailExitIndex][1].type = 'codeTextPadding'\n headEnterIndex += 2\n tailExitIndex -= 2\n break\n }\n }\n }\n\n // Merge adjacent spaces and data.\n index = headEnterIndex - 1\n tailExitIndex++\n while (++index <= tailExitIndex) {\n if (enter === undefined) {\n if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') {\n enter = index\n }\n } else if (\n index === tailExitIndex ||\n events[index][1].type === 'lineEnding'\n ) {\n events[enter][1].type = 'codeTextData'\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end\n events.splice(enter + 2, index - enter - 2)\n tailExitIndex -= index - enter - 2\n index = enter + 2\n }\n enter = undefined\n }\n }\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Previous}\n */\nfunction previous(code) {\n // If there is a previous code, there will always be a tail.\n return (\n code !== 96 ||\n this.events[this.events.length - 1][1].type === 'characterEscape'\n )\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCodeText(effects, ok, nok) {\n const self = this\n let sizeOpen = 0\n /** @type {number} */\n let size\n /** @type {Token} */\n let token\n return start\n\n /**\n * Start of code (text).\n *\n * ```markdown\n * > | `a`\n * ^\n * > | \\`a`\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('codeText')\n effects.enter('codeTextSequence')\n return sequenceOpen(code)\n }\n\n /**\n * In opening sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === 96) {\n effects.consume(code)\n sizeOpen++\n return sequenceOpen\n }\n effects.exit('codeTextSequence')\n return between(code)\n }\n\n /**\n * Between something and something else.\n *\n * ```markdown\n * > | `a`\n * ^^\n * ```\n *\n * @type {State}\n */\n function between(code) {\n // EOF.\n if (code === null) {\n return nok(code)\n }\n\n // To do: next major: don’t do spaces in resolve, but when compiling,\n // like `markdown-rs`.\n // Tabs don’t work, and virtual spaces don’t make sense.\n if (code === 32) {\n effects.enter('space')\n effects.consume(code)\n effects.exit('space')\n return between\n }\n\n // Closing fence? Could also be data.\n if (code === 96) {\n token = effects.enter('codeTextSequence')\n size = 0\n return sequenceClose(code)\n }\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return between\n }\n\n // Data.\n effects.enter('codeTextData')\n return data(code)\n }\n\n /**\n * In data.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function data(code) {\n if (\n code === null ||\n code === 32 ||\n code === 96 ||\n markdownLineEnding(code)\n ) {\n effects.exit('codeTextData')\n return between(code)\n }\n effects.consume(code)\n return data\n }\n\n /**\n * In closing sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n // More.\n if (code === 96) {\n effects.consume(code)\n size++\n return sequenceClose\n }\n\n // Done!\n if (size === sizeOpen) {\n effects.exit('codeTextSequence')\n effects.exit('codeText')\n return ok(code)\n }\n\n // More or less accents: mark as data.\n token.type = 'codeTextData'\n return data(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Extension} Extension\n */\n\nimport {\n attention,\n autolink,\n blockQuote,\n characterEscape,\n characterReference,\n codeFenced,\n codeIndented,\n codeText,\n definition,\n hardBreakEscape,\n headingAtx,\n htmlFlow,\n htmlText,\n labelEnd,\n labelStartImage,\n labelStartLink,\n lineEnding,\n list,\n setextUnderline,\n thematicBreak\n} from 'micromark-core-commonmark'\nimport {resolver as resolveText} from './initialize/text.js'\n\n/** @satisfies {Extension['document']} */\nexport const document = {\n [42]: list,\n [43]: list,\n [45]: list,\n [48]: list,\n [49]: list,\n [50]: list,\n [51]: list,\n [52]: list,\n [53]: list,\n [54]: list,\n [55]: list,\n [56]: list,\n [57]: list,\n [62]: blockQuote\n}\n\n/** @satisfies {Extension['contentInitial']} */\nexport const contentInitial = {\n [91]: definition\n}\n\n/** @satisfies {Extension['flowInitial']} */\nexport const flowInitial = {\n [-2]: codeIndented,\n [-1]: codeIndented,\n [32]: codeIndented\n}\n\n/** @satisfies {Extension['flow']} */\nexport const flow = {\n [35]: headingAtx,\n [42]: thematicBreak,\n [45]: [setextUnderline, thematicBreak],\n [60]: htmlFlow,\n [61]: setextUnderline,\n [95]: thematicBreak,\n [96]: codeFenced,\n [126]: codeFenced\n}\n\n/** @satisfies {Extension['string']} */\nexport const string = {\n [38]: characterReference,\n [92]: characterEscape\n}\n\n/** @satisfies {Extension['text']} */\nexport const text = {\n [-5]: lineEnding,\n [-4]: lineEnding,\n [-3]: lineEnding,\n [33]: labelStartImage,\n [38]: characterReference,\n [42]: attention,\n [60]: [autolink, htmlText],\n [91]: labelStartLink,\n [92]: [hardBreakEscape, characterEscape],\n [93]: labelEnd,\n [95]: attention,\n [96]: codeText\n}\n\n/** @satisfies {Extension['insideSpan']} */\nexport const insideSpan = {\n null: [attention, resolveText]\n}\n\n/** @satisfies {Extension['attentionMarkers']} */\nexport const attentionMarkers = {\n null: [42, 95]\n}\n\n/** @satisfies {Extension['disable']} */\nexport const disable = {\n null: []\n}\n","/**\n * @typedef {import('micromark-util-types').Create} Create\n * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').ParseContext} ParseContext\n * @typedef {import('micromark-util-types').ParseOptions} ParseOptions\n */\n\nimport {combineExtensions} from 'micromark-util-combine-extensions'\nimport {content} from './initialize/content.js'\nimport {document} from './initialize/document.js'\nimport {flow} from './initialize/flow.js'\nimport {text, string} from './initialize/text.js'\nimport {createTokenizer} from './create-tokenizer.js'\nimport * as defaultConstructs from './constructs.js'\n\n/**\n * @param {ParseOptions | null | undefined} [options]\n * @returns {ParseContext}\n */\nexport function parse(options) {\n const settings = options || {}\n const constructs =\n /** @type {FullNormalizedExtension} */\n combineExtensions([defaultConstructs, ...(settings.extensions || [])])\n\n /** @type {ParseContext} */\n const parser = {\n defined: [],\n lazy: {},\n constructs,\n content: create(content),\n document: create(document),\n flow: create(flow),\n string: create(string),\n text: create(text)\n }\n return parser\n\n /**\n * @param {InitialConstruct} initial\n */\n function create(initial) {\n return creator\n /** @type {Create} */\n function creator(from) {\n return createTokenizer(parser, initial, from)\n }\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Chunk} Chunk\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Encoding} Encoding\n * @typedef {import('micromark-util-types').Value} Value\n */\n\n/**\n * @callback Preprocessor\n * @param {Value} value\n * @param {Encoding | null | undefined} [encoding]\n * @param {boolean | null | undefined} [end=false]\n * @returns {Array}\n */\n\nconst search = /[\\0\\t\\n\\r]/g\n\n/**\n * @returns {Preprocessor}\n */\nexport function preprocess() {\n let column = 1\n let buffer = ''\n /** @type {boolean | undefined} */\n let start = true\n /** @type {boolean | undefined} */\n let atCarriageReturn\n return preprocessor\n\n /** @type {Preprocessor} */\n function preprocessor(value, encoding, end) {\n /** @type {Array} */\n const chunks = []\n /** @type {RegExpMatchArray | null} */\n let match\n /** @type {number} */\n let next\n /** @type {number} */\n let startPosition\n /** @type {number} */\n let endPosition\n /** @type {Code} */\n let code\n\n // @ts-expect-error `Buffer` does allow an encoding.\n value = buffer + value.toString(encoding)\n startPosition = 0\n buffer = ''\n if (start) {\n // To do: `markdown-rs` actually parses BOMs (byte order mark).\n if (value.charCodeAt(0) === 65279) {\n startPosition++\n }\n start = undefined\n }\n while (startPosition < value.length) {\n search.lastIndex = startPosition\n match = search.exec(value)\n endPosition =\n match && match.index !== undefined ? match.index : value.length\n code = value.charCodeAt(endPosition)\n if (!match) {\n buffer = value.slice(startPosition)\n break\n }\n if (code === 10 && startPosition === endPosition && atCarriageReturn) {\n chunks.push(-3)\n atCarriageReturn = undefined\n } else {\n if (atCarriageReturn) {\n chunks.push(-5)\n atCarriageReturn = undefined\n }\n if (startPosition < endPosition) {\n chunks.push(value.slice(startPosition, endPosition))\n column += endPosition - startPosition\n }\n switch (code) {\n case 0: {\n chunks.push(65533)\n column++\n break\n }\n case 9: {\n next = Math.ceil(column / 4) * 4\n chunks.push(-2)\n while (column++ < next) chunks.push(-1)\n break\n }\n case 10: {\n chunks.push(-4)\n column = 1\n break\n }\n default: {\n atCarriageReturn = true\n column = 1\n }\n }\n }\n startPosition = endPosition + 1\n }\n if (end) {\n if (atCarriageReturn) chunks.push(-5)\n if (buffer) chunks.push(buffer)\n chunks.push(null)\n }\n return chunks\n }\n}\n","/**\n * Turn the number (in string form as either hexa- or plain decimal) coming from\n * a numeric character reference into a character.\n *\n * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes\n * non-characters and control characters safe.\n *\n * @param {string} value\n * Value to decode.\n * @param {number} base\n * Numeric base.\n * @returns {string}\n * Character.\n */\nexport function decodeNumericCharacterReference(value, base) {\n const code = Number.parseInt(value, base)\n if (\n // C0 except for HT, LF, FF, CR, space.\n code < 9 ||\n code === 11 ||\n (code > 13 && code < 32) ||\n // Control character (DEL) of C0, and C1 controls.\n (code > 126 && code < 160) ||\n // Lone high surrogates and low surrogates.\n (code > 55295 && code < 57344) ||\n // Noncharacters.\n (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ ||\n (code & 65535) === 65535 ||\n (code & 65535) === 65534 /* eslint-enable no-bitwise */ ||\n // Out of range\n code > 1114111\n ) {\n return '\\uFFFD'\n }\n return String.fromCharCode(code)\n}\n","import {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {decodeNumericCharacterReference} from 'micromark-util-decode-numeric-character-reference'\nconst characterEscapeOrReference =\n /\\\\([!-/:-@[-`{-~])|&(#(?:\\d{1,7}|x[\\da-f]{1,6})|[\\da-z]{1,31});/gi\n\n/**\n * Decode markdown strings (which occur in places such as fenced code info\n * strings, destinations, labels, and titles).\n *\n * The “string” content type allows character escapes and -references.\n * This decodes those.\n *\n * @param {string} value\n * Value to decode.\n * @returns {string}\n * Decoded value.\n */\nexport function decodeString(value) {\n return value.replace(characterEscapeOrReference, decode)\n}\n\n/**\n * @param {string} $0\n * @param {string} $1\n * @param {string} $2\n * @returns {string}\n */\nfunction decode($0, $1, $2) {\n if ($1) {\n // Escape.\n return $1\n }\n\n // Reference.\n const head = $2.charCodeAt(0)\n if (head === 35) {\n const head = $2.charCodeAt(1)\n const hex = head === 120 || head === 88\n return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10)\n }\n return decodeNamedCharacterReference($2) || $0\n}\n","/**\n * @typedef {import('micromark-util-types').Encoding} Encoding\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').ParseOptions} ParseOptions\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Value} Value\n *\n * @typedef {import('unist').Parent} UnistParent\n * @typedef {import('unist').Point} Point\n *\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').Break} Break\n * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('mdast').Code} Code\n * @typedef {import('mdast').Definition} Definition\n * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('mdast').HTML} HTML\n * @typedef {import('mdast').Image} Image\n * @typedef {import('mdast').ImageReference} ImageReference\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('mdast').Link} Link\n * @typedef {import('mdast').LinkReference} LinkReference\n * @typedef {import('mdast').List} List\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('mdast').Text} Text\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n * @typedef {import('mdast').ReferenceType} ReferenceType\n * @typedef {import('../index.js').CompileData} CompileData\n */\n\n/**\n * @typedef {Root | Content} Node\n * @typedef {Extract} Parent\n *\n * @typedef {Omit & {type: 'fragment', children: Array}} Fragment\n */\n\n/**\n * @callback Transform\n * Extra transform, to change the AST afterwards.\n * @param {Root} tree\n * Tree to transform.\n * @returns {Root | undefined | null | void}\n * New tree or nothing (in which case the current tree is used).\n *\n * @callback Handle\n * Handle a token.\n * @param {CompileContext} this\n * Context.\n * @param {Token} token\n * Current token.\n * @returns {void}\n * Nothing.\n *\n * @typedef {Record} Handles\n * Token types mapping to handles\n *\n * @callback OnEnterError\n * Handle the case where the `right` token is open, but it is closed (by the\n * `left` token) or because we reached the end of the document.\n * @param {Omit} this\n * Context.\n * @param {Token | undefined} left\n * Left token.\n * @param {Token} right\n * Right token.\n * @returns {void}\n * Nothing.\n *\n * @callback OnExitError\n * Handle the case where the `right` token is open but it is closed by\n * exiting the `left` token.\n * @param {Omit} this\n * Context.\n * @param {Token} left\n * Left token.\n * @param {Token} right\n * Right token.\n * @returns {void}\n * Nothing.\n *\n * @typedef {[Token, OnEnterError | undefined]} TokenTuple\n * Open token on the stack, with an optional error handler for when\n * that token isn’t closed properly.\n */\n\n/**\n * @typedef Config\n * Configuration.\n *\n * We have our defaults, but extensions will add more.\n * @property {Array} canContainEols\n * Token types where line endings are used.\n * @property {Handles} enter\n * Opening handles.\n * @property {Handles} exit\n * Closing handles.\n * @property {Array} transforms\n * Tree transforms.\n *\n * @typedef {Partial} Extension\n * Change how markdown tokens from micromark are turned into mdast.\n *\n * @typedef CompileContext\n * mdast compiler context.\n * @property {Array} stack\n * Stack of nodes.\n * @property {Array} tokenStack\n * Stack of tokens.\n * @property {(key: Key) => CompileData[Key]} getData\n * Get data from the key/value store.\n * @property {(key: Key, value?: CompileData[Key]) => void} setData\n * Set data into the key/value store.\n * @property {(this: CompileContext) => void} buffer\n * Capture some of the output data.\n * @property {(this: CompileContext) => string} resume\n * Stop capturing and access the output data.\n * @property {(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter\n * Enter a token.\n * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit\n * Exit a token.\n * @property {TokenizeContext['sliceSerialize']} sliceSerialize\n * Get the string value of a token.\n * @property {Config} config\n * Configuration.\n *\n * @typedef FromMarkdownOptions\n * Configuration for how to build mdast.\n * @property {Array> | null | undefined} [mdastExtensions]\n * Extensions for this utility to change how tokens are turned into a tree.\n *\n * @typedef {ParseOptions & FromMarkdownOptions} Options\n * Configuration.\n */\n\n// To do: micromark: create a registry of tokens?\n// To do: next major: don’t return given `Node` from `enter`.\n// To do: next major: remove setter/getter.\n\nimport {toString} from 'mdast-util-to-string'\nimport {parse} from 'micromark/lib/parse.js'\nimport {preprocess} from 'micromark/lib/preprocess.js'\nimport {postprocess} from 'micromark/lib/postprocess.js'\nimport {decodeNumericCharacterReference} from 'micromark-util-decode-numeric-character-reference'\nimport {decodeString} from 'micromark-util-decode-string'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {stringifyPosition} from 'unist-util-stringify-position'\nconst own = {}.hasOwnProperty\n\n/**\n * @param value\n * Markdown to parse.\n * @param encoding\n * Character encoding for when `value` is `Buffer`.\n * @param options\n * Configuration.\n * @returns\n * mdast tree.\n */\nexport const fromMarkdown =\n /**\n * @type {(\n * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) &\n * ((value: Value, options?: Options | null | undefined) => Root)\n * )}\n */\n\n /**\n * @param {Value} value\n * @param {Encoding | Options | null | undefined} [encoding]\n * @param {Options | null | undefined} [options]\n * @returns {Root}\n */\n function (value, encoding, options) {\n if (typeof encoding !== 'string') {\n options = encoding\n encoding = undefined\n }\n return compiler(options)(\n postprocess(\n parse(options).document().write(preprocess()(value, encoding, true))\n )\n )\n }\n\n/**\n * Note this compiler only understand complete buffering, not streaming.\n *\n * @param {Options | null | undefined} [options]\n */\nfunction compiler(options) {\n /** @type {Config} */\n const config = {\n transforms: [],\n canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'],\n enter: {\n autolink: opener(link),\n autolinkProtocol: onenterdata,\n autolinkEmail: onenterdata,\n atxHeading: opener(heading),\n blockQuote: opener(blockQuote),\n characterEscape: onenterdata,\n characterReference: onenterdata,\n codeFenced: opener(codeFlow),\n codeFencedFenceInfo: buffer,\n codeFencedFenceMeta: buffer,\n codeIndented: opener(codeFlow, buffer),\n codeText: opener(codeText, buffer),\n codeTextData: onenterdata,\n data: onenterdata,\n codeFlowValue: onenterdata,\n definition: opener(definition),\n definitionDestinationString: buffer,\n definitionLabelString: buffer,\n definitionTitleString: buffer,\n emphasis: opener(emphasis),\n hardBreakEscape: opener(hardBreak),\n hardBreakTrailing: opener(hardBreak),\n htmlFlow: opener(html, buffer),\n htmlFlowData: onenterdata,\n htmlText: opener(html, buffer),\n htmlTextData: onenterdata,\n image: opener(image),\n label: buffer,\n link: opener(link),\n listItem: opener(listItem),\n listItemValue: onenterlistitemvalue,\n listOrdered: opener(list, onenterlistordered),\n listUnordered: opener(list),\n paragraph: opener(paragraph),\n reference: onenterreference,\n referenceString: buffer,\n resourceDestinationString: buffer,\n resourceTitleString: buffer,\n setextHeading: opener(heading),\n strong: opener(strong),\n thematicBreak: opener(thematicBreak)\n },\n exit: {\n atxHeading: closer(),\n atxHeadingSequence: onexitatxheadingsequence,\n autolink: closer(),\n autolinkEmail: onexitautolinkemail,\n autolinkProtocol: onexitautolinkprotocol,\n blockQuote: closer(),\n characterEscapeValue: onexitdata,\n characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,\n characterReferenceMarkerNumeric: onexitcharacterreferencemarker,\n characterReferenceValue: onexitcharacterreferencevalue,\n codeFenced: closer(onexitcodefenced),\n codeFencedFence: onexitcodefencedfence,\n codeFencedFenceInfo: onexitcodefencedfenceinfo,\n codeFencedFenceMeta: onexitcodefencedfencemeta,\n codeFlowValue: onexitdata,\n codeIndented: closer(onexitcodeindented),\n codeText: closer(onexitcodetext),\n codeTextData: onexitdata,\n data: onexitdata,\n definition: closer(),\n definitionDestinationString: onexitdefinitiondestinationstring,\n definitionLabelString: onexitdefinitionlabelstring,\n definitionTitleString: onexitdefinitiontitlestring,\n emphasis: closer(),\n hardBreakEscape: closer(onexithardbreak),\n hardBreakTrailing: closer(onexithardbreak),\n htmlFlow: closer(onexithtmlflow),\n htmlFlowData: onexitdata,\n htmlText: closer(onexithtmltext),\n htmlTextData: onexitdata,\n image: closer(onexitimage),\n label: onexitlabel,\n labelText: onexitlabeltext,\n lineEnding: onexitlineending,\n link: closer(onexitlink),\n listItem: closer(),\n listOrdered: closer(),\n listUnordered: closer(),\n paragraph: closer(),\n referenceString: onexitreferencestring,\n resourceDestinationString: onexitresourcedestinationstring,\n resourceTitleString: onexitresourcetitlestring,\n resource: onexitresource,\n setextHeading: closer(onexitsetextheading),\n setextHeadingLineSequence: onexitsetextheadinglinesequence,\n setextHeadingText: onexitsetextheadingtext,\n strong: closer(),\n thematicBreak: closer()\n }\n }\n configure(config, (options || {}).mdastExtensions || [])\n\n /** @type {CompileData} */\n const data = {}\n return compile\n\n /**\n * Turn micromark events into an mdast tree.\n *\n * @param {Array} events\n * Events.\n * @returns {Root}\n * mdast tree.\n */\n function compile(events) {\n /** @type {Root} */\n let tree = {\n type: 'root',\n children: []\n }\n /** @type {Omit} */\n const context = {\n stack: [tree],\n tokenStack: [],\n config,\n enter,\n exit,\n buffer,\n resume,\n setData,\n getData\n }\n /** @type {Array} */\n const listStack = []\n let index = -1\n while (++index < events.length) {\n // We preprocess lists to add `listItem` tokens, and to infer whether\n // items the list itself are spread out.\n if (\n events[index][1].type === 'listOrdered' ||\n events[index][1].type === 'listUnordered'\n ) {\n if (events[index][0] === 'enter') {\n listStack.push(index)\n } else {\n const tail = listStack.pop()\n index = prepareList(events, tail, index)\n }\n }\n }\n index = -1\n while (++index < events.length) {\n const handler = config[events[index][0]]\n if (own.call(handler, events[index][1].type)) {\n handler[events[index][1].type].call(\n Object.assign(\n {\n sliceSerialize: events[index][2].sliceSerialize\n },\n context\n ),\n events[index][1]\n )\n }\n }\n\n // Handle tokens still being open.\n if (context.tokenStack.length > 0) {\n const tail = context.tokenStack[context.tokenStack.length - 1]\n const handler = tail[1] || defaultOnError\n handler.call(context, undefined, tail[0])\n }\n\n // Figure out `root` position.\n tree.position = {\n start: point(\n events.length > 0\n ? events[0][1].start\n : {\n line: 1,\n column: 1,\n offset: 0\n }\n ),\n end: point(\n events.length > 0\n ? events[events.length - 2][1].end\n : {\n line: 1,\n column: 1,\n offset: 0\n }\n )\n }\n\n // Call transforms.\n index = -1\n while (++index < config.transforms.length) {\n tree = config.transforms[index](tree) || tree\n }\n return tree\n }\n\n /**\n * @param {Array} events\n * @param {number} start\n * @param {number} length\n * @returns {number}\n */\n function prepareList(events, start, length) {\n let index = start - 1\n let containerBalance = -1\n let listSpread = false\n /** @type {Token | undefined} */\n let listItem\n /** @type {number | undefined} */\n let lineIndex\n /** @type {number | undefined} */\n let firstBlankLineIndex\n /** @type {boolean | undefined} */\n let atMarker\n while (++index <= length) {\n const event = events[index]\n if (\n event[1].type === 'listUnordered' ||\n event[1].type === 'listOrdered' ||\n event[1].type === 'blockQuote'\n ) {\n if (event[0] === 'enter') {\n containerBalance++\n } else {\n containerBalance--\n }\n atMarker = undefined\n } else if (event[1].type === 'lineEndingBlank') {\n if (event[0] === 'enter') {\n if (\n listItem &&\n !atMarker &&\n !containerBalance &&\n !firstBlankLineIndex\n ) {\n firstBlankLineIndex = index\n }\n atMarker = undefined\n }\n } else if (\n event[1].type === 'linePrefix' ||\n event[1].type === 'listItemValue' ||\n event[1].type === 'listItemMarker' ||\n event[1].type === 'listItemPrefix' ||\n event[1].type === 'listItemPrefixWhitespace'\n ) {\n // Empty.\n } else {\n atMarker = undefined\n }\n if (\n (!containerBalance &&\n event[0] === 'enter' &&\n event[1].type === 'listItemPrefix') ||\n (containerBalance === -1 &&\n event[0] === 'exit' &&\n (event[1].type === 'listUnordered' ||\n event[1].type === 'listOrdered'))\n ) {\n if (listItem) {\n let tailIndex = index\n lineIndex = undefined\n while (tailIndex--) {\n const tailEvent = events[tailIndex]\n if (\n tailEvent[1].type === 'lineEnding' ||\n tailEvent[1].type === 'lineEndingBlank'\n ) {\n if (tailEvent[0] === 'exit') continue\n if (lineIndex) {\n events[lineIndex][1].type = 'lineEndingBlank'\n listSpread = true\n }\n tailEvent[1].type = 'lineEnding'\n lineIndex = tailIndex\n } else if (\n tailEvent[1].type === 'linePrefix' ||\n tailEvent[1].type === 'blockQuotePrefix' ||\n tailEvent[1].type === 'blockQuotePrefixWhitespace' ||\n tailEvent[1].type === 'blockQuoteMarker' ||\n tailEvent[1].type === 'listItemIndent'\n ) {\n // Empty\n } else {\n break\n }\n }\n if (\n firstBlankLineIndex &&\n (!lineIndex || firstBlankLineIndex < lineIndex)\n ) {\n listItem._spread = true\n }\n\n // Fix position.\n listItem.end = Object.assign(\n {},\n lineIndex ? events[lineIndex][1].start : event[1].end\n )\n events.splice(lineIndex || index, 0, ['exit', listItem, event[2]])\n index++\n length++\n }\n\n // Create a new list item.\n if (event[1].type === 'listItemPrefix') {\n listItem = {\n type: 'listItem',\n _spread: false,\n start: Object.assign({}, event[1].start),\n // @ts-expect-error: we’ll add `end` in a second.\n end: undefined\n }\n // @ts-expect-error: `listItem` is most definitely defined, TS...\n events.splice(index, 0, ['enter', listItem, event[2]])\n index++\n length++\n firstBlankLineIndex = undefined\n atMarker = true\n }\n }\n }\n events[start][1]._spread = listSpread\n return length\n }\n\n /**\n * Set data.\n *\n * @template {keyof CompileData} Key\n * Field type.\n * @param {Key} key\n * Key of field.\n * @param {CompileData[Key]} [value]\n * New value.\n * @returns {void}\n * Nothing.\n */\n function setData(key, value) {\n data[key] = value\n }\n\n /**\n * Get data.\n *\n * @template {keyof CompileData} Key\n * Field type.\n * @param {Key} key\n * Key of field.\n * @returns {CompileData[Key]}\n * Value.\n */\n function getData(key) {\n return data[key]\n }\n\n /**\n * Create an opener handle.\n *\n * @param {(token: Token) => Node} create\n * Create a node.\n * @param {Handle} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function opener(create, and) {\n return open\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {void}\n */\n function open(token) {\n enter.call(this, create(token), token)\n if (and) and.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * @returns {void}\n */\n function buffer() {\n this.stack.push({\n type: 'fragment',\n children: []\n })\n }\n\n /**\n * @template {Node} Kind\n * Node type.\n * @this {CompileContext}\n * Context.\n * @param {Kind} node\n * Node to enter.\n * @param {Token} token\n * Corresponding token.\n * @param {OnEnterError | undefined} [errorHandler]\n * Handle the case where this token is open, but it is closed by something else.\n * @returns {Kind}\n * The given node.\n */\n function enter(node, token, errorHandler) {\n const parent = this.stack[this.stack.length - 1]\n // @ts-expect-error: Assume `Node` can exist as a child of `parent`.\n parent.children.push(node)\n this.stack.push(node)\n this.tokenStack.push([token, errorHandler])\n // @ts-expect-error: `end` will be patched later.\n node.position = {\n start: point(token.start)\n }\n return node\n }\n\n /**\n * Create a closer handle.\n *\n * @param {Handle} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function closer(and) {\n return close\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {void}\n */\n function close(token) {\n if (and) and.call(this, token)\n exit.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * Context.\n * @param {Token} token\n * Corresponding token.\n * @param {OnExitError | undefined} [onExitError]\n * Handle the case where another token is open.\n * @returns {Node}\n * The closed node.\n */\n function exit(token, onExitError) {\n const node = this.stack.pop()\n const open = this.tokenStack.pop()\n if (!open) {\n throw new Error(\n 'Cannot close `' +\n token.type +\n '` (' +\n stringifyPosition({\n start: token.start,\n end: token.end\n }) +\n '): it’s not open'\n )\n } else if (open[0].type !== token.type) {\n if (onExitError) {\n onExitError.call(this, token, open[0])\n } else {\n const handler = open[1] || defaultOnError\n handler.call(this, token, open[0])\n }\n }\n node.position.end = point(token.end)\n return node\n }\n\n /**\n * @this {CompileContext}\n * @returns {string}\n */\n function resume() {\n return toString(this.stack.pop())\n }\n\n //\n // Handlers.\n //\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistordered() {\n setData('expectingFirstListItemValue', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistitemvalue(token) {\n if (getData('expectingFirstListItemValue')) {\n const ancestor = this.stack[this.stack.length - 2]\n ancestor.start = Number.parseInt(this.sliceSerialize(token), 10)\n setData('expectingFirstListItemValue')\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfenceinfo() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.lang = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfencemeta() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.meta = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfence() {\n // Exit if this is the closing fence.\n if (getData('flowCodeInside')) return\n this.buffer()\n setData('flowCodeInside', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefenced() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data.replace(/^(\\r?\\n|\\r)|(\\r?\\n|\\r)$/g, '')\n setData('flowCodeInside')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodeindented() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data.replace(/(\\r?\\n|\\r)$/g, '')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitionlabelstring(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiontitlestring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.title = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiondestinationstring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.url = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitatxheadingsequence(token) {\n const node = this.stack[this.stack.length - 1]\n if (!node.depth) {\n const depth = this.sliceSerialize(token).length\n node.depth = depth\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadingtext() {\n setData('setextHeadingSlurpLineEnding', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadinglinesequence(token) {\n const node = this.stack[this.stack.length - 1]\n node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheading() {\n setData('setextHeadingSlurpLineEnding')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterdata(token) {\n const node = this.stack[this.stack.length - 1]\n let tail = node.children[node.children.length - 1]\n if (!tail || tail.type !== 'text') {\n // Add a new text node.\n tail = text()\n // @ts-expect-error: we’ll add `end` later.\n tail.position = {\n start: point(token.start)\n }\n // @ts-expect-error: Assume `parent` accepts `text`.\n node.children.push(tail)\n }\n this.stack.push(tail)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitdata(token) {\n const tail = this.stack.pop()\n tail.value += this.sliceSerialize(token)\n tail.position.end = point(token.end)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlineending(token) {\n const context = this.stack[this.stack.length - 1]\n // If we’re at a hard break, include the line ending in there.\n if (getData('atHardBreak')) {\n const tail = context.children[context.children.length - 1]\n tail.position.end = point(token.end)\n setData('atHardBreak')\n return\n }\n if (\n !getData('setextHeadingSlurpLineEnding') &&\n config.canContainEols.includes(context.type)\n ) {\n onenterdata.call(this, token)\n onexitdata.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithardbreak() {\n setData('atHardBreak', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmlflow() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmltext() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcodetext() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlink() {\n const node = this.stack[this.stack.length - 1]\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n // To do: clean.\n if (getData('inReference')) {\n /** @type {ReferenceType} */\n const referenceType = getData('referenceType') || 'shortcut'\n node.type += 'Reference'\n // @ts-expect-error: mutate.\n node.referenceType = referenceType\n // @ts-expect-error: mutate.\n delete node.url\n delete node.title\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier\n // @ts-expect-error: mutate.\n delete node.label\n }\n setData('referenceType')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitimage() {\n const node = this.stack[this.stack.length - 1]\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n // To do: clean.\n if (getData('inReference')) {\n /** @type {ReferenceType} */\n const referenceType = getData('referenceType') || 'shortcut'\n node.type += 'Reference'\n // @ts-expect-error: mutate.\n node.referenceType = referenceType\n // @ts-expect-error: mutate.\n delete node.url\n delete node.title\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier\n // @ts-expect-error: mutate.\n delete node.label\n }\n setData('referenceType')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabeltext(token) {\n const string = this.sliceSerialize(token)\n const ancestor = this.stack[this.stack.length - 2]\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n ancestor.label = decodeString(string)\n // @ts-expect-error: same as above.\n ancestor.identifier = normalizeIdentifier(string).toLowerCase()\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabel() {\n const fragment = this.stack[this.stack.length - 1]\n const value = this.resume()\n const node = this.stack[this.stack.length - 1]\n // Assume a reference.\n setData('inReference', true)\n if (node.type === 'link') {\n /** @type {Array} */\n // @ts-expect-error: Assume static phrasing content.\n const children = fragment.children\n node.children = children\n } else {\n node.alt = value\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcedestinationstring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.url = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcetitlestring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.title = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresource() {\n setData('inReference')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterreference() {\n setData('referenceType', 'collapsed')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitreferencestring(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n node.label = label\n // @ts-expect-error: same as above.\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n setData('referenceType', 'full')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcharacterreferencemarker(token) {\n setData('characterReferenceType', token.type)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcharacterreferencevalue(token) {\n const data = this.sliceSerialize(token)\n const type = getData('characterReferenceType')\n /** @type {string} */\n let value\n if (type) {\n value = decodeNumericCharacterReference(\n data,\n type === 'characterReferenceMarkerNumeric' ? 10 : 16\n )\n setData('characterReferenceType')\n } else {\n const result = decodeNamedCharacterReference(data)\n value = result\n }\n const tail = this.stack.pop()\n tail.value += value\n tail.position.end = point(token.end)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkprotocol(token) {\n onexitdata.call(this, token)\n const node = this.stack[this.stack.length - 1]\n node.url = this.sliceSerialize(token)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkemail(token) {\n onexitdata.call(this, token)\n const node = this.stack[this.stack.length - 1]\n node.url = 'mailto:' + this.sliceSerialize(token)\n }\n\n //\n // Creaters.\n //\n\n /** @returns {Blockquote} */\n function blockQuote() {\n return {\n type: 'blockquote',\n children: []\n }\n }\n\n /** @returns {Code} */\n function codeFlow() {\n return {\n type: 'code',\n lang: null,\n meta: null,\n value: ''\n }\n }\n\n /** @returns {InlineCode} */\n function codeText() {\n return {\n type: 'inlineCode',\n value: ''\n }\n }\n\n /** @returns {Definition} */\n function definition() {\n return {\n type: 'definition',\n identifier: '',\n label: null,\n title: null,\n url: ''\n }\n }\n\n /** @returns {Emphasis} */\n function emphasis() {\n return {\n type: 'emphasis',\n children: []\n }\n }\n\n /** @returns {Heading} */\n function heading() {\n // @ts-expect-error `depth` will be set later.\n return {\n type: 'heading',\n depth: undefined,\n children: []\n }\n }\n\n /** @returns {Break} */\n function hardBreak() {\n return {\n type: 'break'\n }\n }\n\n /** @returns {HTML} */\n function html() {\n return {\n type: 'html',\n value: ''\n }\n }\n\n /** @returns {Image} */\n function image() {\n return {\n type: 'image',\n title: null,\n url: '',\n alt: null\n }\n }\n\n /** @returns {Link} */\n function link() {\n return {\n type: 'link',\n title: null,\n url: '',\n children: []\n }\n }\n\n /**\n * @param {Token} token\n * @returns {List}\n */\n function list(token) {\n return {\n type: 'list',\n ordered: token.type === 'listOrdered',\n start: null,\n spread: token._spread,\n children: []\n }\n }\n\n /**\n * @param {Token} token\n * @returns {ListItem}\n */\n function listItem(token) {\n return {\n type: 'listItem',\n spread: token._spread,\n checked: null,\n children: []\n }\n }\n\n /** @returns {Paragraph} */\n function paragraph() {\n return {\n type: 'paragraph',\n children: []\n }\n }\n\n /** @returns {Strong} */\n function strong() {\n return {\n type: 'strong',\n children: []\n }\n }\n\n /** @returns {Text} */\n function text() {\n return {\n type: 'text',\n value: ''\n }\n }\n\n /** @returns {ThematicBreak} */\n function thematicBreak() {\n return {\n type: 'thematicBreak'\n }\n }\n}\n\n/**\n * Copy a point-like value.\n *\n * @param {Point} d\n * Point-like value.\n * @returns {Point}\n * unist point.\n */\nfunction point(d) {\n return {\n line: d.line,\n column: d.column,\n offset: d.offset\n }\n}\n\n/**\n * @param {Config} combined\n * @param {Array>} extensions\n * @returns {void}\n */\nfunction configure(combined, extensions) {\n let index = -1\n while (++index < extensions.length) {\n const value = extensions[index]\n if (Array.isArray(value)) {\n configure(combined, value)\n } else {\n extension(combined, value)\n }\n }\n}\n\n/**\n * @param {Config} combined\n * @param {Extension} extension\n * @returns {void}\n */\nfunction extension(combined, extension) {\n /** @type {keyof Extension} */\n let key\n for (key in extension) {\n if (own.call(extension, key)) {\n if (key === 'canContainEols') {\n const right = extension[key]\n if (right) {\n combined[key].push(...right)\n }\n } else if (key === 'transforms') {\n const right = extension[key]\n if (right) {\n combined[key].push(...right)\n }\n } else if (key === 'enter' || key === 'exit') {\n const right = extension[key]\n if (right) {\n Object.assign(combined[key], right)\n }\n }\n }\n }\n}\n\n/** @type {OnEnterError} */\nfunction defaultOnError(left, right) {\n if (left) {\n throw new Error(\n 'Cannot close `' +\n left.type +\n '` (' +\n stringifyPosition({\n start: left.start,\n end: left.end\n }) +\n '): a different token (`' +\n right.type +\n '`, ' +\n stringifyPosition({\n start: right.start,\n end: right.end\n }) +\n ') is open'\n )\n } else {\n throw new Error(\n 'Cannot close document, a token (`' +\n right.type +\n '`, ' +\n stringifyPosition({\n start: right.start,\n end: right.end\n }) +\n ') is still open'\n )\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Event} Event\n */\n\nimport {subtokenize} from 'micromark-util-subtokenize'\n\n/**\n * @param {Array} events\n * @returns {Array}\n */\nexport function postprocess(events) {\n while (!subtokenize(events)) {\n // Empty\n }\n return events\n}\n","/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast-util-from-markdown').Options} Options\n */\n\nimport {fromMarkdown} from 'mdast-util-from-markdown'\n\n/**\n * @this {import('unified').Processor}\n * @type {import('unified').Plugin<[Options?] | void[], string, Root>}\n */\nexport default function remarkParse(options) {\n /** @type {import('unified').ParserFunction} */\n const parser = (doc) => {\n // Assume options.\n const settings = /** @type {Options} */ (this.data('settings'))\n\n return fromMarkdown(\n doc,\n Object.assign({}, settings, options, {\n // Note: these options are not in the readme.\n // The goal is for them to be set by plugins on `data` instead of being\n // passed by users.\n extensions: this.data('micromarkExtensions') || [],\n mdastExtensions: this.data('fromMarkdownExtensions') || []\n })\n )\n }\n\n Object.assign(this, {Parser: parser})\n}\n","import {asciiAlphanumeric} from 'micromark-util-character'\nimport {encode} from 'micromark-util-encode'\n/**\n * Make a value safe for injection as a URL.\n *\n * This encodes unsafe characters with percent-encoding and skips already\n * encoded sequences (see `normalizeUri`).\n * Further unsafe characters are encoded as character references (see\n * `micromark-util-encode`).\n *\n * A regex of allowed protocols can be given, in which case the URL is\n * sanitized.\n * For example, `/^(https?|ircs?|mailto|xmpp)$/i` can be used for `a[href]`, or\n * `/^https?$/i` for `img[src]` (this is what `github.com` allows).\n * If the URL includes an unknown protocol (one not matched by `protocol`, such\n * as a dangerous example, `javascript:`), the value is ignored.\n *\n * @param {string | undefined} url\n * URI to sanitize.\n * @param {RegExp | null | undefined} [protocol]\n * Allowed protocols.\n * @returns {string}\n * Sanitized URI.\n */\nexport function sanitizeUri(url, protocol) {\n const value = encode(normalizeUri(url || ''))\n if (!protocol) {\n return value\n }\n const colon = value.indexOf(':')\n const questionMark = value.indexOf('?')\n const numberSign = value.indexOf('#')\n const slash = value.indexOf('/')\n if (\n // If there is no protocol, it’s relative.\n colon < 0 ||\n // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.\n (slash > -1 && colon > slash) ||\n (questionMark > -1 && colon > questionMark) ||\n (numberSign > -1 && colon > numberSign) ||\n // It is a protocol, it should be allowed.\n protocol.test(value.slice(0, colon))\n ) {\n return value\n }\n return ''\n}\n\n/**\n * Normalize a URL.\n *\n * Encode unsafe characters with percent-encoding, skipping already encoded\n * sequences.\n *\n * @param {string} value\n * URI to normalize.\n * @returns {string}\n * Normalized URI.\n */\nexport function normalizeUri(value) {\n /** @type {Array} */\n const result = []\n let index = -1\n let start = 0\n let skip = 0\n while (++index < value.length) {\n const code = value.charCodeAt(index)\n /** @type {string} */\n let replace = ''\n\n // A correct percent encoded value.\n if (\n code === 37 &&\n asciiAlphanumeric(value.charCodeAt(index + 1)) &&\n asciiAlphanumeric(value.charCodeAt(index + 2))\n ) {\n skip = 2\n }\n // ASCII.\n else if (code < 128) {\n if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code))) {\n replace = String.fromCharCode(code)\n }\n }\n // Astral.\n else if (code > 55295 && code < 57344) {\n const next = value.charCodeAt(index + 1)\n\n // A correct surrogate pair.\n if (code < 56320 && next > 56319 && next < 57344) {\n replace = String.fromCharCode(code, next)\n skip = 1\n }\n // Lone surrogate.\n else {\n replace = '\\uFFFD'\n }\n }\n // Unicode.\n else {\n replace = String.fromCharCode(code)\n }\n if (replace) {\n result.push(value.slice(start, index), encodeURIComponent(replace))\n start = index + skip + 1\n replace = ''\n }\n if (skip) {\n index += skip\n skip = 0\n }\n }\n return result.join('') + value.slice(start)\n}\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Parent} Parent\n */\n\n/**\n * @typedef {Record} Props\n * @typedef {null | undefined | string | Props | TestFunctionAnything | Array} Test\n * Check for an arbitrary node, unaware of TypeScript inferral.\n *\n * @callback TestFunctionAnything\n * Check if a node passes a test, unaware of TypeScript inferral.\n * @param {unknown} this\n * The given context.\n * @param {Node} node\n * A node.\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {boolean | void}\n * Whether this node passes the test.\n */\n\n/**\n * @template {Node} Kind\n * Node type.\n * @typedef {Kind['type'] | Partial | TestFunctionPredicate | Array | TestFunctionPredicate>} PredicateTest\n * Check for a node that can be inferred by TypeScript.\n */\n\n/**\n * Check if a node passes a certain test.\n *\n * @template {Node} Kind\n * Node type.\n * @callback TestFunctionPredicate\n * Complex test function for a node that can be inferred by TypeScript.\n * @param {Node} node\n * A node.\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {node is Kind}\n * Whether this node passes the test.\n */\n\n/**\n * @callback AssertAnything\n * Check that an arbitrary value is a node, unaware of TypeScript inferral.\n * @param {unknown} [node]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {boolean}\n * Whether this is a node and passes a test.\n */\n\n/**\n * Check if a node is a node and passes a certain node test.\n *\n * @template {Node} Kind\n * Node type.\n * @callback AssertPredicate\n * Check that an arbitrary value is a specific node, aware of TypeScript.\n * @param {unknown} [node]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {node is Kind}\n * Whether this is a node and passes a test.\n */\n\n/**\n * Check if `node` is a `Node` and whether it passes the given test.\n *\n * @param node\n * Thing to check, typically `Node`.\n * @param test\n * A check for a specific node.\n * @param index\n * The node’s position in its parent.\n * @param parent\n * The node’s parent.\n * @returns\n * Whether `node` is a node and passes a test.\n */\nexport const is =\n /**\n * @type {(\n * (() => false) &\n * ((node: unknown, test: PredicateTest, index: number, parent: Parent, context?: unknown) => node is Kind) &\n * ((node: unknown, test: PredicateTest, index?: null | undefined, parent?: null | undefined, context?: unknown) => node is Kind) &\n * ((node: unknown, test: Test, index: number, parent: Parent, context?: unknown) => boolean) &\n * ((node: unknown, test?: Test, index?: null | undefined, parent?: null | undefined, context?: unknown) => boolean)\n * )}\n */\n (\n /**\n * @param {unknown} [node]\n * @param {Test} [test]\n * @param {number | null | undefined} [index]\n * @param {Parent | null | undefined} [parent]\n * @param {unknown} [context]\n * @returns {boolean}\n */\n // eslint-disable-next-line max-params\n function is(node, test, index, parent, context) {\n const check = convert(test)\n\n if (\n index !== undefined &&\n index !== null &&\n (typeof index !== 'number' ||\n index < 0 ||\n index === Number.POSITIVE_INFINITY)\n ) {\n throw new Error('Expected positive finite index')\n }\n\n if (\n parent !== undefined &&\n parent !== null &&\n (!is(parent) || !parent.children)\n ) {\n throw new Error('Expected parent node')\n }\n\n if (\n (parent === undefined || parent === null) !==\n (index === undefined || index === null)\n ) {\n throw new Error('Expected both parent and index')\n }\n\n // @ts-expect-error Looks like a node.\n return node && node.type && typeof node.type === 'string'\n ? Boolean(check.call(context, node, index, parent))\n : false\n }\n )\n\n/**\n * Generate an assertion from a test.\n *\n * Useful if you’re going to test many nodes, for example when creating a\n * utility where something else passes a compatible test.\n *\n * The created function is a bit faster because it expects valid input only:\n * a `node`, `index`, and `parent`.\n *\n * @param test\n * * when nullish, checks if `node` is a `Node`.\n * * when `string`, works like passing `(node) => node.type === test`.\n * * when `function` checks if function passed the node is true.\n * * when `object`, checks that all keys in test are in node, and that they have (strictly) equal values.\n * * when `array`, checks if any one of the subtests pass.\n * @returns\n * An assertion.\n */\nexport const convert =\n /**\n * @type {(\n * ((test: PredicateTest) => AssertPredicate) &\n * ((test?: Test) => AssertAnything)\n * )}\n */\n (\n /**\n * @param {Test} [test]\n * @returns {AssertAnything}\n */\n function (test) {\n if (test === undefined || test === null) {\n return ok\n }\n\n if (typeof test === 'string') {\n return typeFactory(test)\n }\n\n if (typeof test === 'object') {\n return Array.isArray(test) ? anyFactory(test) : propsFactory(test)\n }\n\n if (typeof test === 'function') {\n return castFactory(test)\n }\n\n throw new Error('Expected function, string, or object as test')\n }\n )\n\n/**\n * @param {Array} tests\n * @returns {AssertAnything}\n */\nfunction anyFactory(tests) {\n /** @type {Array} */\n const checks = []\n let index = -1\n\n while (++index < tests.length) {\n checks[index] = convert(tests[index])\n }\n\n return castFactory(any)\n\n /**\n * @this {unknown}\n * @param {Array} parameters\n * @returns {boolean}\n */\n function any(...parameters) {\n let index = -1\n\n while (++index < checks.length) {\n if (checks[index].call(this, ...parameters)) return true\n }\n\n return false\n }\n}\n\n/**\n * Turn an object into a test for a node with a certain fields.\n *\n * @param {Props} check\n * @returns {AssertAnything}\n */\nfunction propsFactory(check) {\n return castFactory(all)\n\n /**\n * @param {Node} node\n * @returns {boolean}\n */\n function all(node) {\n /** @type {string} */\n let key\n\n for (key in check) {\n // @ts-expect-error: hush, it sure works as an index.\n if (node[key] !== check[key]) return false\n }\n\n return true\n }\n}\n\n/**\n * Turn a string into a test for a node with a certain type.\n *\n * @param {string} check\n * @returns {AssertAnything}\n */\nfunction typeFactory(check) {\n return castFactory(type)\n\n /**\n * @param {Node} node\n */\n function type(node) {\n return node && node.type === check\n }\n}\n\n/**\n * Turn a custom test into a test for a node that passes that test.\n *\n * @param {TestFunctionAnything} check\n * @returns {AssertAnything}\n */\nfunction castFactory(check) {\n return assertion\n\n /**\n * @this {unknown}\n * @param {unknown} node\n * @param {Array} parameters\n * @returns {boolean}\n */\n function assertion(node, ...parameters) {\n return Boolean(\n node &&\n typeof node === 'object' &&\n 'type' in node &&\n // @ts-expect-error: fine.\n Boolean(check.call(this, node, ...parameters))\n )\n }\n}\n\nfunction ok() {\n return true\n}\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Parent} Parent\n * @typedef {import('unist-util-is').Test} Test\n */\n\n/**\n * @typedef {boolean | 'skip'} Action\n * Union of the action types.\n *\n * @typedef {number} Index\n * Move to the sibling at `index` next (after node itself is completely\n * traversed).\n *\n * Useful if mutating the tree, such as removing the node the visitor is\n * currently on, or any of its previous siblings.\n * Results less than 0 or greater than or equal to `children.length` stop\n * traversing the parent.\n *\n * @typedef {[(Action | null | undefined | void)?, (Index | null | undefined)?]} ActionTuple\n * List with one or two values, the first an action, the second an index.\n *\n * @typedef {Action | ActionTuple | Index | null | undefined | void} VisitorResult\n * Any value that can be returned from a visitor.\n */\n\n/**\n * @template {Node} [Visited=Node]\n * Visited node type.\n * @template {Parent} [Ancestor=Parent]\n * Ancestor type.\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform the parent of node (the last of `ancestors`).\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of an ancestor still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Array} ancestors\n * Ancestors of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n */\n\n/**\n * @template {Node} [Tree=Node]\n * Tree type.\n * @template {Test} [Check=string]\n * Test type.\n * @typedef {Visitor, Check>, Extract, Parent>>} BuildVisitor\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parents`.\n */\n\nimport {convert} from 'unist-util-is'\nimport {color} from './color.js'\n\n/**\n * Continue traversing as normal.\n */\nexport const CONTINUE = true\n\n/**\n * Stop traversing immediately.\n */\nexport const EXIT = false\n\n/**\n * Do not traverse this node’s children.\n */\nexport const SKIP = 'skip'\n\n/**\n * Visit nodes, with ancestral information.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @param tree\n * Tree to traverse.\n * @param test\n * `unist-util-is`-compatible test\n * @param visitor\n * Handle each node.\n * @param reverse\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns\n * Nothing.\n */\nexport const visitParents =\n /**\n * @type {(\n * ((tree: Tree, test: Check, visitor: BuildVisitor, reverse?: boolean | null | undefined) => void) &\n * ((tree: Tree, visitor: BuildVisitor, reverse?: boolean | null | undefined) => void)\n * )}\n */\n (\n /**\n * @param {Node} tree\n * @param {Test} test\n * @param {Visitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {void}\n */\n function (tree, test, visitor, reverse) {\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor\n // @ts-expect-error no visitor given, so `visitor` is test.\n visitor = test\n test = null\n }\n\n const is = convert(test)\n const step = reverse ? -1 : 1\n\n factory(tree, undefined, [])()\n\n /**\n * @param {Node} node\n * @param {number | undefined} index\n * @param {Array} parents\n */\n function factory(node, index, parents) {\n /** @type {Record} */\n // @ts-expect-error: hush\n const value = node && typeof node === 'object' ? node : {}\n\n if (typeof value.type === 'string') {\n const name =\n // `hast`\n typeof value.tagName === 'string'\n ? value.tagName\n : // `xast`\n typeof value.name === 'string'\n ? value.name\n : undefined\n\n Object.defineProperty(visit, 'name', {\n value:\n 'node (' + color(node.type + (name ? '<' + name + '>' : '')) + ')'\n })\n }\n\n return visit\n\n function visit() {\n /** @type {ActionTuple} */\n let result = []\n /** @type {ActionTuple} */\n let subresult\n /** @type {number} */\n let offset\n /** @type {Array} */\n let grandparents\n\n if (!test || is(node, index, parents[parents.length - 1] || null)) {\n result = toResult(visitor(node, parents))\n\n if (result[0] === EXIT) {\n return result\n }\n }\n\n // @ts-expect-error looks like a parent.\n if (node.children && result[0] !== SKIP) {\n // @ts-expect-error looks like a parent.\n offset = (reverse ? node.children.length : -1) + step\n // @ts-expect-error looks like a parent.\n grandparents = parents.concat(node)\n\n // @ts-expect-error looks like a parent.\n while (offset > -1 && offset < node.children.length) {\n // @ts-expect-error looks like a parent.\n subresult = factory(node.children[offset], offset, grandparents)()\n\n if (subresult[0] === EXIT) {\n return subresult\n }\n\n offset =\n typeof subresult[1] === 'number' ? subresult[1] : offset + step\n }\n }\n\n return result\n }\n }\n }\n )\n\n/**\n * Turn a return value into a clean result.\n *\n * @param {VisitorResult} value\n * Valid return values from visitors.\n * @returns {ActionTuple}\n * Clean result.\n */\nfunction toResult(value) {\n if (Array.isArray(value)) {\n return value\n }\n\n if (typeof value === 'number') {\n return [CONTINUE, value]\n }\n\n return [value]\n}\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Parent} Parent\n * @typedef {import('unist-util-is').Test} Test\n * @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult\n */\n\n/**\n * Check if `Child` can be a child of `Ancestor`.\n *\n * Returns the ancestor when `Child` can be a child of `Ancestor`, or returns\n * `never`.\n *\n * @template {Node} Ancestor\n * Node type.\n * @template {Node} Child\n * Node type.\n * @typedef {(\n * Ancestor extends Parent\n * ? Child extends Ancestor['children'][number]\n * ? Ancestor\n * : never\n * : never\n * )} ParentsOf\n */\n\n/**\n * @template {Node} [Visited=Node]\n * Visited node type.\n * @template {Parent} [Ancestor=Parent]\n * Ancestor type.\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform `parent`.\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of `parent` still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Visited extends Node ? number | null : never} index\n * Index of `node` in `parent`.\n * @param {Ancestor extends Node ? Ancestor | null : never} parent\n * Parent of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n */\n\n/**\n * Build a typed `Visitor` function from a node and all possible parents.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n *\n * @template {Node} Visited\n * Node type.\n * @template {Parent} Ancestor\n * Parent type.\n * @typedef {Visitor>} BuildVisitorFromMatch\n */\n\n/**\n * Build a typed `Visitor` function from a list of descendants and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n *\n * @template {Node} Descendant\n * Node type.\n * @template {Test} Check\n * Test type.\n * @typedef {(\n * BuildVisitorFromMatch<\n * import('unist-util-visit-parents/complex-types.js').Matches,\n * Extract\n * >\n * )} BuildVisitorFromDescendants\n */\n\n/**\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n *\n * @template {Node} [Tree=Node]\n * Node type.\n * @template {Test} [Check=string]\n * Test type.\n * @typedef {(\n * BuildVisitorFromDescendants<\n * import('unist-util-visit-parents/complex-types.js').InclusiveDescendant,\n * Check\n * >\n * )} BuildVisitor\n */\n\nimport {visitParents} from 'unist-util-visit-parents'\n\n/**\n * Visit nodes.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @param tree\n * Tree to traverse.\n * @param test\n * `unist-util-is`-compatible test\n * @param visitor\n * Handle each node.\n * @param reverse\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns\n * Nothing.\n */\nexport const visit =\n /**\n * @type {(\n * ((tree: Tree, test: Check, visitor: BuildVisitor, reverse?: boolean | null | undefined) => void) &\n * ((tree: Tree, visitor: BuildVisitor, reverse?: boolean | null | undefined) => void)\n * )}\n */\n (\n /**\n * @param {Node} tree\n * @param {Test} test\n * @param {Visitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {void}\n */\n function (tree, test, visitor, reverse) {\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor\n visitor = test\n test = null\n }\n\n visitParents(tree, test, overload, reverse)\n\n /**\n * @param {Node} node\n * @param {Array} parents\n */\n function overload(node, parents) {\n const parent = parents[parents.length - 1]\n return visitor(\n node,\n parent ? parent.children.indexOf(node) : null,\n parent\n )\n }\n }\n )\n\nexport {CONTINUE, EXIT, SKIP} from 'unist-util-visit-parents'\n","/**\n * @typedef {import('unist').Position} Position\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Point} Point\n */\n\n/**\n * @typedef NodeLike\n * @property {string} type\n * @property {PositionLike | null | undefined} [position]\n *\n * @typedef PositionLike\n * @property {PointLike | null | undefined} [start]\n * @property {PointLike | null | undefined} [end]\n *\n * @typedef PointLike\n * @property {number | null | undefined} [line]\n * @property {number | null | undefined} [column]\n * @property {number | null | undefined} [offset]\n */\n\n/**\n * Get the starting point of `node`.\n *\n * @param node\n * Node.\n * @returns\n * Point.\n */\nexport const pointStart = point('start')\n\n/**\n * Get the ending point of `node`.\n *\n * @param node\n * Node.\n * @returns\n * Point.\n */\nexport const pointEnd = point('end')\n\n/**\n * Get the positional info of `node`.\n *\n * @param {NodeLike | Node | null | undefined} [node]\n * Node.\n * @returns {Position}\n * Position.\n */\nexport function position(node) {\n return {start: pointStart(node), end: pointEnd(node)}\n}\n\n/**\n * Get the positional info of `node`.\n *\n * @param {'start' | 'end'} type\n * Side.\n * @returns\n * Getter.\n */\nfunction point(type) {\n return point\n\n /**\n * Get the point info of `node` at a bound side.\n *\n * @param {NodeLike | Node | null | undefined} [node]\n * @returns {Point}\n */\n function point(node) {\n const point = (node && node.position && node.position[type]) || {}\n\n // To do: next major: don’t return points when invalid.\n return {\n // @ts-expect-error: in practice, null is allowed.\n line: point.line || null,\n // @ts-expect-error: in practice, null is allowed.\n column: point.column || null,\n // @ts-expect-error: in practice, null is allowed.\n offset: point.offset > -1 ? point.offset : null\n }\n }\n}\n","/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').Definition} Definition\n */\n\n/**\n * @typedef {Root | Content} Node\n *\n * @callback GetDefinition\n * Get a definition by identifier.\n * @param {string | null | undefined} [identifier]\n * Identifier of definition.\n * @returns {Definition | null}\n * Definition corresponding to `identifier` or `null`.\n */\n\nimport {visit} from 'unist-util-visit'\n\nconst own = {}.hasOwnProperty\n\n/**\n * Find definitions in `tree`.\n *\n * Uses CommonMark precedence, which means that earlier definitions are\n * preferred over duplicate later definitions.\n *\n * @param {Node} tree\n * Tree to check.\n * @returns {GetDefinition}\n * Getter.\n */\nexport function definitions(tree) {\n /** @type {Record} */\n const cache = Object.create(null)\n\n if (!tree || !tree.type) {\n throw new Error('mdast-util-definitions expected node')\n }\n\n visit(tree, 'definition', (definition) => {\n const id = clean(definition.identifier)\n if (id && !own.call(cache, id)) {\n cache[id] = definition\n }\n })\n\n return definition\n\n /** @type {GetDefinition} */\n function definition(identifier) {\n const id = clean(identifier)\n // To do: next major: return `undefined` when not found.\n return id && own.call(cache, id) ? cache[id] : null\n }\n}\n\n/**\n * @param {string | null | undefined} [value]\n * @returns {string}\n */\nfunction clean(value) {\n return String(value || '').toUpperCase()\n}\n","/**\n * @typedef {import('mdast').FootnoteReference} FootnoteReference\n * @typedef {import('hast').Element} Element\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `footnoteReference` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {FootnoteReference} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function footnoteReference(state, node) {\n const id = String(node.identifier).toUpperCase()\n const safeId = normalizeUri(id.toLowerCase())\n const index = state.footnoteOrder.indexOf(id)\n /** @type {number} */\n let counter\n\n if (index === -1) {\n state.footnoteOrder.push(id)\n state.footnoteCounts[id] = 1\n counter = state.footnoteOrder.length\n } else {\n state.footnoteCounts[id]++\n counter = index + 1\n }\n\n const reuseCounter = state.footnoteCounts[id]\n\n /** @type {Element} */\n const link = {\n type: 'element',\n tagName: 'a',\n properties: {\n href: '#' + state.clobberPrefix + 'fn-' + safeId,\n id:\n state.clobberPrefix +\n 'fnref-' +\n safeId +\n (reuseCounter > 1 ? '-' + reuseCounter : ''),\n dataFootnoteRef: true,\n ariaDescribedBy: ['footnote-label']\n },\n children: [{type: 'text', value: String(counter)}]\n }\n state.patch(node, link)\n\n /** @type {Element} */\n const sup = {\n type: 'element',\n tagName: 'sup',\n properties: {},\n children: [link]\n }\n state.patch(node, sup)\n return state.applyData(node, sup)\n}\n","/**\n * @typedef {import('hast').ElementContent} ElementContent\n *\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').Reference} Reference\n * @typedef {import('mdast').Root} Root\n *\n * @typedef {import('./state.js').State} State\n */\n\n/**\n * @typedef {Root | Content} Nodes\n * @typedef {Extract} References\n */\n\n// To do: next major: always return array.\n\n/**\n * Return the content of a reference without definition as plain text.\n *\n * @param {State} state\n * Info passed around.\n * @param {References} node\n * Reference node (image, link).\n * @returns {ElementContent | Array}\n * hast content.\n */\nexport function revert(state, node) {\n const subtype = node.referenceType\n let suffix = ']'\n\n if (subtype === 'collapsed') {\n suffix += '[]'\n } else if (subtype === 'full') {\n suffix += '[' + (node.label || node.identifier) + ']'\n }\n\n if (node.type === 'imageReference') {\n return {type: 'text', value: '![' + node.alt + suffix}\n }\n\n const contents = state.all(node)\n const head = contents[0]\n\n if (head && head.type === 'text') {\n head.value = '[' + head.value\n } else {\n contents.unshift({type: 'text', value: '['})\n }\n\n const tail = contents[contents.length - 1]\n\n if (tail && tail.type === 'text') {\n tail.value += suffix\n } else {\n contents.push({type: 'text', value: suffix})\n }\n\n return contents\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Parent} Parent\n * @typedef {import('mdast').Root} Root\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * @typedef {Root | Content} Nodes\n * @typedef {Extract} Parents\n */\n\n/**\n * Turn an mdast `listItem` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {ListItem} node\n * mdast node.\n * @param {Parents | null | undefined} parent\n * Parent of `node`.\n * @returns {Element}\n * hast node.\n */\nexport function listItem(state, node, parent) {\n const results = state.all(node)\n const loose = parent ? listLoose(parent) : listItemLoose(node)\n /** @type {Properties} */\n const properties = {}\n /** @type {Array} */\n const children = []\n\n if (typeof node.checked === 'boolean') {\n const head = results[0]\n /** @type {Element} */\n let paragraph\n\n if (head && head.type === 'element' && head.tagName === 'p') {\n paragraph = head\n } else {\n paragraph = {type: 'element', tagName: 'p', properties: {}, children: []}\n results.unshift(paragraph)\n }\n\n if (paragraph.children.length > 0) {\n paragraph.children.unshift({type: 'text', value: ' '})\n }\n\n paragraph.children.unshift({\n type: 'element',\n tagName: 'input',\n properties: {type: 'checkbox', checked: node.checked, disabled: true},\n children: []\n })\n\n // According to github-markdown-css, this class hides bullet.\n // See: .\n properties.className = ['task-list-item']\n }\n\n let index = -1\n\n while (++index < results.length) {\n const child = results[index]\n\n // Add eols before nodes, except if this is a loose, first paragraph.\n if (\n loose ||\n index !== 0 ||\n child.type !== 'element' ||\n child.tagName !== 'p'\n ) {\n children.push({type: 'text', value: '\\n'})\n }\n\n if (child.type === 'element' && child.tagName === 'p' && !loose) {\n children.push(...child.children)\n } else {\n children.push(child)\n }\n }\n\n const tail = results[results.length - 1]\n\n // Add a final eol.\n if (tail && (loose || tail.type !== 'element' || tail.tagName !== 'p')) {\n children.push({type: 'text', value: '\\n'})\n }\n\n /** @type {Element} */\n const result = {type: 'element', tagName: 'li', properties, children}\n state.patch(node, result)\n return state.applyData(node, result)\n}\n\n/**\n * @param {Parents} node\n * @return {Boolean}\n */\nfunction listLoose(node) {\n let loose = false\n if (node.type === 'list') {\n loose = node.spread || false\n const children = node.children\n let index = -1\n\n while (!loose && ++index < children.length) {\n loose = listItemLoose(children[index])\n }\n }\n\n return loose\n}\n\n/**\n * @param {ListItem} node\n * @return {Boolean}\n */\nfunction listItemLoose(node) {\n const spread = node.spread\n\n return spread === undefined || spread === null\n ? node.children.length > 1\n : spread\n}\n","const tab = 9 /* `\\t` */\nconst space = 32 /* ` ` */\n\n/**\n * Remove initial and final spaces and tabs at the line breaks in `value`.\n * Does not trim initial and final spaces and tabs of the value itself.\n *\n * @param {string} value\n * Value to trim.\n * @returns {string}\n * Trimmed value.\n */\nexport function trimLines(value) {\n const source = String(value)\n const search = /\\r?\\n|\\r/g\n let match = search.exec(source)\n let last = 0\n /** @type {Array} */\n const lines = []\n\n while (match) {\n lines.push(\n trimLine(source.slice(last, match.index), last > 0, true),\n match[0]\n )\n\n last = match.index + match[0].length\n match = search.exec(source)\n }\n\n lines.push(trimLine(source.slice(last), last > 0, false))\n\n return lines.join('')\n}\n\n/**\n * @param {string} value\n * Line to trim.\n * @param {boolean} start\n * Whether to trim the start of the line.\n * @param {boolean} end\n * Whether to trim the end of the line.\n * @returns {string}\n * Trimmed line.\n */\nfunction trimLine(value, start, end) {\n let startIndex = 0\n let endIndex = value.length\n\n if (start) {\n let code = value.codePointAt(startIndex)\n\n while (code === tab || code === space) {\n startIndex++\n code = value.codePointAt(startIndex)\n }\n }\n\n if (end) {\n let code = value.codePointAt(endIndex - 1)\n\n while (code === tab || code === space) {\n endIndex--\n code = value.codePointAt(endIndex - 1)\n }\n }\n\n return endIndex > startIndex ? value.slice(startIndex, endIndex) : ''\n}\n","import {blockquote} from './blockquote.js'\nimport {hardBreak} from './break.js'\nimport {code} from './code.js'\nimport {strikethrough} from './delete.js'\nimport {emphasis} from './emphasis.js'\nimport {footnoteReference} from './footnote-reference.js'\nimport {footnote} from './footnote.js'\nimport {heading} from './heading.js'\nimport {html} from './html.js'\nimport {imageReference} from './image-reference.js'\nimport {image} from './image.js'\nimport {inlineCode} from './inline-code.js'\nimport {linkReference} from './link-reference.js'\nimport {link} from './link.js'\nimport {listItem} from './list-item.js'\nimport {list} from './list.js'\nimport {paragraph} from './paragraph.js'\nimport {root} from './root.js'\nimport {strong} from './strong.js'\nimport {table} from './table.js'\nimport {tableRow} from './table-row.js'\nimport {tableCell} from './table-cell.js'\nimport {text} from './text.js'\nimport {thematicBreak} from './thematic-break.js'\n\n/**\n * Default handlers for nodes.\n */\nexport const handlers = {\n blockquote,\n break: hardBreak,\n code,\n delete: strikethrough,\n emphasis,\n footnoteReference,\n footnote,\n heading,\n html,\n imageReference,\n image,\n inlineCode,\n linkReference,\n link,\n listItem,\n list,\n paragraph,\n root,\n strong,\n table,\n tableCell,\n tableRow,\n text,\n thematicBreak,\n toml: ignore,\n yaml: ignore,\n definition: ignore,\n footnoteDefinition: ignore\n}\n\n// Return nothing for nodes that are ignored.\nfunction ignore() {\n // To do: next major: return `undefined`.\n return null\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `blockquote` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Blockquote} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function blockquote(state, node) {\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'blockquote',\n properties: {},\n children: state.wrap(state.all(node), true)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('mdast').Break} Break\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `break` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Break} node\n * mdast node.\n * @returns {Array}\n * hast element content.\n */\nexport function hardBreak(state, node) {\n /** @type {Element} */\n const result = {type: 'element', tagName: 'br', properties: {}, children: []}\n state.patch(node, result)\n return [state.applyData(node, result), {type: 'text', value: '\\n'}]\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Code} Code\n * @typedef {import('../state.js').State} State\n\n */\n\n/**\n * Turn an mdast `code` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Code} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function code(state, node) {\n const value = node.value ? node.value + '\\n' : ''\n // To do: next major, use `node.lang` w/o regex, the splitting’s been going\n // on for years in remark now.\n const lang = node.lang ? node.lang.match(/^[^ \\t]+(?=[ \\t]|$)/) : null\n /** @type {Properties} */\n const properties = {}\n\n if (lang) {\n properties.className = ['language-' + lang]\n }\n\n // Create ``.\n /** @type {Element} */\n let result = {\n type: 'element',\n tagName: 'code',\n properties,\n children: [{type: 'text', value}]\n }\n\n if (node.meta) {\n result.data = {meta: node.meta}\n }\n\n state.patch(node, result)\n result = state.applyData(node, result)\n\n // Create `
`.\n  result = {type: 'element', tagName: 'pre', properties: {}, children: [result]}\n  state.patch(node, result)\n  return result\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Delete} Delete\n * @typedef {import('../state.js').State} State\n\n */\n\n/**\n * Turn an mdast `delete` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Delete} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function strikethrough(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'del',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `emphasis` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Emphasis} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function emphasis(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'em',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Footnote} Footnote\n * @typedef {import('../state.js').State} State\n */\n\nimport {footnoteReference} from './footnote-reference.js'\n\n// To do: when both:\n// * \n// * \n// …are archived, remove this (also from mdast).\n// These inline notes are not used in GFM.\n\n/**\n * Turn an mdast `footnote` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Footnote} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function footnote(state, node) {\n  const footnoteById = state.footnoteById\n  let no = 1\n\n  while (no in footnoteById) no++\n\n  const identifier = String(no)\n\n  footnoteById[identifier] = {\n    type: 'footnoteDefinition',\n    identifier,\n    children: [{type: 'paragraph', children: node.children}],\n    position: node.position\n  }\n\n  return footnoteReference(state, {\n    type: 'footnoteReference',\n    identifier,\n    position: node.position\n  })\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `heading` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Heading} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function heading(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'h' + node.depth,\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').HTML} Html\n * @typedef {import('../state.js').State} State\n * @typedef {import('../../index.js').Raw} Raw\n */\n\n/**\n * Turn an mdast `html` node into hast (`raw` node in dangerous mode, otherwise\n * nothing).\n *\n * @param {State} state\n *   Info passed around.\n * @param {Html} node\n *   mdast node.\n * @returns {Raw | Element | null}\n *   hast node.\n */\nexport function html(state, node) {\n  if (state.dangerous) {\n    /** @type {Raw} */\n    const result = {type: 'raw', value: node.value}\n    state.patch(node, result)\n    return state.applyData(node, result)\n  }\n\n  // To do: next major: return `undefined`.\n  return null\n}\n","/**\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').ImageReference} ImageReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `imageReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {ImageReference} node\n *   mdast node.\n * @returns {ElementContent | Array}\n *   hast node.\n */\nexport function imageReference(state, node) {\n  const def = state.definition(node.identifier)\n\n  if (!def) {\n    return revert(state, node)\n  }\n\n  /** @type {Properties} */\n  const properties = {src: normalizeUri(def.url || ''), alt: node.alt}\n\n  if (def.title !== null && def.title !== undefined) {\n    properties.title = def.title\n  }\n\n  /** @type {Element} */\n  const result = {type: 'element', tagName: 'img', properties, children: []}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Image} Image\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `image` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Image} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function image(state, node) {\n  /** @type {Properties} */\n  const properties = {src: normalizeUri(node.url)}\n\n  if (node.alt !== null && node.alt !== undefined) {\n    properties.alt = node.alt\n  }\n\n  if (node.title !== null && node.title !== undefined) {\n    properties.title = node.title\n  }\n\n  /** @type {Element} */\n  const result = {type: 'element', tagName: 'img', properties, children: []}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `inlineCode` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {InlineCode} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function inlineCode(state, node) {\n  /** @type {Text} */\n  const text = {type: 'text', value: node.value.replace(/\\r?\\n|\\r/g, ' ')}\n  state.patch(node, text)\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'code',\n    properties: {},\n    children: [text]\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').LinkReference} LinkReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `linkReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {LinkReference} node\n *   mdast node.\n * @returns {ElementContent | Array}\n *   hast node.\n */\nexport function linkReference(state, node) {\n  const def = state.definition(node.identifier)\n\n  if (!def) {\n    return revert(state, node)\n  }\n\n  /** @type {Properties} */\n  const properties = {href: normalizeUri(def.url || '')}\n\n  if (def.title !== null && def.title !== undefined) {\n    properties.title = def.title\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'a',\n    properties,\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Link} Link\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `link` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Link} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function link(state, node) {\n  /** @type {Properties} */\n  const properties = {href: normalizeUri(node.url)}\n\n  if (node.title !== null && node.title !== undefined) {\n    properties.title = node.title\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'a',\n    properties,\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').List} List\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `list` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {List} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function list(state, node) {\n  /** @type {Properties} */\n  const properties = {}\n  const results = state.all(node)\n  let index = -1\n\n  if (typeof node.start === 'number' && node.start !== 1) {\n    properties.start = node.start\n  }\n\n  // Like GitHub, add a class for custom styling.\n  while (++index < results.length) {\n    const child = results[index]\n\n    if (\n      child.type === 'element' &&\n      child.tagName === 'li' &&\n      child.properties &&\n      Array.isArray(child.properties.className) &&\n      child.properties.className.includes('task-list-item')\n    ) {\n      properties.className = ['contains-task-list']\n      break\n    }\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: node.ordered ? 'ol' : 'ul',\n    properties,\n    children: state.wrap(results, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `paragraph` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Paragraph} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function paragraph(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'p',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('mdast').Root} MdastRoot\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `root` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastRoot} node\n *   mdast node.\n * @returns {HastRoot | HastElement}\n *   hast node.\n */\nexport function root(state, node) {\n  /** @type {HastRoot} */\n  const result = {type: 'root', children: state.wrap(state.all(node))}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `strong` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Strong} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function strong(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'strong',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Table} Table\n * @typedef {import('../state.js').State} State\n */\n\nimport {pointStart, pointEnd} from 'unist-util-position'\n\n/**\n * Turn an mdast `table` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Table} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function table(state, node) {\n  const rows = state.all(node)\n  const firstRow = rows.shift()\n  /** @type {Array} */\n  const tableContent = []\n\n  if (firstRow) {\n    /** @type {Element} */\n    const head = {\n      type: 'element',\n      tagName: 'thead',\n      properties: {},\n      children: state.wrap([firstRow], true)\n    }\n    state.patch(node.children[0], head)\n    tableContent.push(head)\n  }\n\n  if (rows.length > 0) {\n    /** @type {Element} */\n    const body = {\n      type: 'element',\n      tagName: 'tbody',\n      properties: {},\n      children: state.wrap(rows, true)\n    }\n\n    const start = pointStart(node.children[1])\n    const end = pointEnd(node.children[node.children.length - 1])\n    if (start.line && end.line) body.position = {start, end}\n    tableContent.push(body)\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'table',\n    properties: {},\n    children: state.wrap(tableContent, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').TableCell} TableCell\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `tableCell` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {TableCell} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function tableCell(state, node) {\n  // Note: this function is normally not called: see `table-row` for how rows\n  // and their cells are compiled.\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'td', // Assume body cell.\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').Parent} Parent\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').TableRow} TableRow\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * @typedef {Root | Content} Nodes\n * @typedef {Extract} Parents\n */\n\n/**\n * Turn an mdast `tableRow` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {TableRow} node\n *   mdast node.\n * @param {Parents | null | undefined} parent\n *   Parent of `node`.\n * @returns {Element}\n *   hast node.\n */\nexport function tableRow(state, node, parent) {\n  const siblings = parent ? parent.children : undefined\n  // Generate a body row when without parent.\n  const rowIndex = siblings ? siblings.indexOf(node) : 1\n  const tagName = rowIndex === 0 ? 'th' : 'td'\n  const align = parent && parent.type === 'table' ? parent.align : undefined\n  const length = align ? align.length : node.children.length\n  let cellIndex = -1\n  /** @type {Array} */\n  const cells = []\n\n  while (++cellIndex < length) {\n    // Note: can also be undefined.\n    const cell = node.children[cellIndex]\n    /** @type {Properties} */\n    const properties = {}\n    const alignValue = align ? align[cellIndex] : undefined\n\n    if (alignValue) {\n      properties.align = alignValue\n    }\n\n    /** @type {Element} */\n    let result = {type: 'element', tagName, properties, children: []}\n\n    if (cell) {\n      result.children = state.all(cell)\n      state.patch(cell, result)\n      result = state.applyData(node, result)\n    }\n\n    cells.push(result)\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'tr',\n    properties: {},\n    children: state.wrap(cells, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('hast').Text} HastText\n * @typedef {import('mdast').Text} MdastText\n * @typedef {import('../state.js').State} State\n */\n\nimport {trimLines} from 'trim-lines'\n\n/**\n * Turn an mdast `text` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastText} node\n *   mdast node.\n * @returns {HastText | HastElement}\n *   hast node.\n */\nexport function text(state, node) {\n  /** @type {HastText} */\n  const result = {type: 'text', value: trimLines(String(node.value))}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `thematicBreak` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {ThematicBreak} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function thematicBreak(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'hr',\n    properties: {},\n    children: []\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Content} HastContent\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('hast').ElementContent} HastElementContent\n * @typedef {import('hast').Properties} HastProperties\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('hast').Text} HastText\n *\n * @typedef {import('mdast').Content} MdastContent\n * @typedef {import('mdast').Definition} MdastDefinition\n * @typedef {import('mdast').FootnoteDefinition} MdastFootnoteDefinition\n * @typedef {import('mdast').Parent} MdastParent\n * @typedef {import('mdast').Root} MdastRoot\n */\n\n/**\n * @typedef {HastRoot | HastContent} HastNodes\n * @typedef {MdastRoot | MdastContent} MdastNodes\n * @typedef {Extract} MdastParents\n *\n * @typedef EmbeddedHastFields\n *   hast fields.\n * @property {string | null | undefined} [hName]\n *   Generate a specific element with this tag name instead.\n * @property {HastProperties | null | undefined} [hProperties]\n *   Generate an element with these properties instead.\n * @property {Array | null | undefined} [hChildren]\n *   Generate an element with this content instead.\n *\n * @typedef {Record & EmbeddedHastFields} MdastData\n *   mdast data with embedded hast fields.\n *\n * @typedef {MdastNodes & {data?: MdastData | null | undefined}} MdastNodeWithData\n *   mdast node with embedded hast data.\n *\n * @typedef PointLike\n *   Point-like value.\n * @property {number | null | undefined} [line]\n *   Line.\n * @property {number | null | undefined} [column]\n *   Column.\n * @property {number | null | undefined} [offset]\n *   Offset.\n *\n * @typedef PositionLike\n *   Position-like value.\n * @property {PointLike | null | undefined} [start]\n *   Point-like value.\n * @property {PointLike | null | undefined} [end]\n *   Point-like value.\n *\n * @callback Handler\n *   Handle a node.\n * @param {State} state\n *   Info passed around.\n * @param {any} node\n *   mdast node to handle.\n * @param {MdastParents | null | undefined} parent\n *   Parent of `node`.\n * @returns {HastElementContent | Array | null | undefined}\n *   hast node.\n *\n * @callback HFunctionProps\n *   Signature of `state` for when props are passed.\n * @param {MdastNodes | PositionLike | null | undefined} node\n *   mdast node or unist position.\n * @param {string} tagName\n *   HTML tag name.\n * @param {HastProperties} props\n *   Properties.\n * @param {Array | null | undefined} [children]\n *   hast content.\n * @returns {HastElement}\n *   Compiled element.\n *\n * @callback HFunctionNoProps\n *   Signature of `state` for when no props are passed.\n * @param {MdastNodes | PositionLike | null | undefined} node\n *   mdast node or unist position.\n * @param {string} tagName\n *   HTML tag name.\n * @param {Array | null | undefined} [children]\n *   hast content.\n * @returns {HastElement}\n *   Compiled element.\n *\n * @typedef HFields\n *   Info on `state`.\n * @property {boolean} dangerous\n *   Whether HTML is allowed.\n * @property {string} clobberPrefix\n *   Prefix to use to prevent DOM clobbering.\n * @property {string} footnoteLabel\n *   Label to use to introduce the footnote section.\n * @property {string} footnoteLabelTagName\n *   HTML used for the footnote label.\n * @property {HastProperties} footnoteLabelProperties\n *   Properties on the HTML tag used for the footnote label.\n * @property {string} footnoteBackLabel\n *   Label to use from backreferences back to their footnote call.\n * @property {(identifier: string) => MdastDefinition | null} definition\n *   Definition cache.\n * @property {Record} footnoteById\n *   Footnote definitions by their identifier.\n * @property {Array} footnoteOrder\n *   Identifiers of order when footnote calls first appear in tree order.\n * @property {Record} footnoteCounts\n *   Counts for how often the same footnote was called.\n * @property {Handlers} handlers\n *   Applied handlers.\n * @property {Handler} unknownHandler\n *   Handler for any none not in `passThrough` or otherwise handled.\n * @property {(from: MdastNodes, node: HastNodes) => void} patch\n *   Copy a node’s positional info.\n * @property {(from: MdastNodes, to: Type) => Type | HastElement} applyData\n *   Honor the `data` of `from`, and generate an element instead of `node`.\n * @property {(node: MdastNodes, parent: MdastParents | null | undefined) => HastElementContent | Array | null | undefined} one\n *   Transform an mdast node to hast.\n * @property {(node: MdastNodes) => Array} all\n *   Transform the children of an mdast parent to hast.\n * @property {(nodes: Array, loose?: boolean | null | undefined) => Array} wrap\n *   Wrap `nodes` with line endings between each node, adds initial/final line endings when `loose`.\n * @property {(left: MdastNodeWithData | PositionLike | null | undefined, right: HastElementContent) => HastElementContent} augment\n *   Like `state` but lower-level and usable on non-elements.\n *   Deprecated: use `patch` and `applyData`.\n * @property {Array} passThrough\n *   List of node types to pass through untouched (except for their children).\n *\n * @typedef Options\n *   Configuration (optional).\n * @property {boolean | null | undefined} [allowDangerousHtml=false]\n *   Whether to persist raw HTML in markdown in the hast tree.\n * @property {string | null | undefined} [clobberPrefix='user-content-']\n *   Prefix to use before the `id` attribute on footnotes to prevent it from\n *   *clobbering*.\n * @property {string | null | undefined} [footnoteBackLabel='Back to content']\n *   Label to use from backreferences back to their footnote call (affects\n *   screen readers).\n * @property {string | null | undefined} [footnoteLabel='Footnotes']\n *   Label to use for the footnotes section (affects screen readers).\n * @property {HastProperties | null | undefined} [footnoteLabelProperties={className: ['sr-only']}]\n *   Properties to use on the footnote label (note that `id: 'footnote-label'`\n *   is always added as footnote calls use it with `aria-describedby` to\n *   provide an accessible label).\n * @property {string | null | undefined} [footnoteLabelTagName='h2']\n *   Tag name to use for the footnote label.\n * @property {Handlers | null | undefined} [handlers]\n *   Extra handlers for nodes.\n * @property {Array | null | undefined} [passThrough]\n *   List of custom mdast node types to pass through (keep) in hast (note that\n *   the node itself is passed, but eventual children are transformed).\n * @property {Handler | null | undefined} [unknownHandler]\n *   Handler for all unknown nodes.\n *\n * @typedef {Record} Handlers\n *   Handle nodes.\n *\n * @typedef {HFunctionProps & HFunctionNoProps & HFields} State\n *   Info passed around.\n */\n\nimport {visit} from 'unist-util-visit'\nimport {position, pointStart, pointEnd} from 'unist-util-position'\nimport {generated} from 'unist-util-generated'\nimport {definitions} from 'mdast-util-definitions'\nimport {handlers} from './handlers/index.js'\n\nconst own = {}.hasOwnProperty\n\n/**\n * Create `state` from an mdast tree.\n *\n * @param {MdastNodes} tree\n *   mdast node to transform.\n * @param {Options | null | undefined} [options]\n *   Configuration.\n * @returns {State}\n *   `state` function.\n */\nexport function createState(tree, options) {\n  const settings = options || {}\n  const dangerous = settings.allowDangerousHtml || false\n  /** @type {Record} */\n  const footnoteById = {}\n\n  // To do: next major: add `options` to state, remove:\n  // `dangerous`, `clobberPrefix`, `footnoteLabel`, `footnoteLabelTagName`,\n  // `footnoteLabelProperties`, `footnoteBackLabel`, `passThrough`,\n  // `unknownHandler`.\n\n  // To do: next major: move to `state.options.allowDangerousHtml`.\n  state.dangerous = dangerous\n  // To do: next major: move to `state.options`.\n  state.clobberPrefix =\n    settings.clobberPrefix === undefined || settings.clobberPrefix === null\n      ? 'user-content-'\n      : settings.clobberPrefix\n  // To do: next major: move to `state.options`.\n  state.footnoteLabel = settings.footnoteLabel || 'Footnotes'\n  // To do: next major: move to `state.options`.\n  state.footnoteLabelTagName = settings.footnoteLabelTagName || 'h2'\n  // To do: next major: move to `state.options`.\n  state.footnoteLabelProperties = settings.footnoteLabelProperties || {\n    className: ['sr-only']\n  }\n  // To do: next major: move to `state.options`.\n  state.footnoteBackLabel = settings.footnoteBackLabel || 'Back to content'\n  // To do: next major: move to `state.options`.\n  state.unknownHandler = settings.unknownHandler\n  // To do: next major: move to `state.options`.\n  state.passThrough = settings.passThrough\n\n  state.handlers = {...handlers, ...settings.handlers}\n\n  // To do: next major: replace utility with `definitionById` object, so we\n  // only walk once (as we need footnotes too).\n  state.definition = definitions(tree)\n  state.footnoteById = footnoteById\n  /** @type {Array} */\n  state.footnoteOrder = []\n  /** @type {Record} */\n  state.footnoteCounts = {}\n\n  state.patch = patch\n  state.applyData = applyData\n  state.one = oneBound\n  state.all = allBound\n  state.wrap = wrap\n  // To do: next major: remove `augment`.\n  state.augment = augment\n\n  visit(tree, 'footnoteDefinition', (definition) => {\n    const id = String(definition.identifier).toUpperCase()\n\n    // Mimick CM behavior of link definitions.\n    // See: .\n    if (!own.call(footnoteById, id)) {\n      footnoteById[id] = definition\n    }\n  })\n\n  // @ts-expect-error Hush, it’s fine!\n  return state\n\n  /**\n   * Finalise the created `right`, a hast node, from `left`, an mdast node.\n   *\n   * @param {MdastNodeWithData | PositionLike | null | undefined} left\n   * @param {HastElementContent} right\n   * @returns {HastElementContent}\n   */\n  /* c8 ignore start */\n  // To do: next major: remove.\n  function augment(left, right) {\n    // Handle `data.hName`, `data.hProperties, `data.hChildren`.\n    if (left && 'data' in left && left.data) {\n      /** @type {MdastData} */\n      const data = left.data\n\n      if (data.hName) {\n        if (right.type !== 'element') {\n          right = {\n            type: 'element',\n            tagName: '',\n            properties: {},\n            children: []\n          }\n        }\n\n        right.tagName = data.hName\n      }\n\n      if (right.type === 'element' && data.hProperties) {\n        right.properties = {...right.properties, ...data.hProperties}\n      }\n\n      if ('children' in right && right.children && data.hChildren) {\n        right.children = data.hChildren\n      }\n    }\n\n    if (left) {\n      const ctx = 'type' in left ? left : {position: left}\n\n      if (!generated(ctx)) {\n        // @ts-expect-error: fine.\n        right.position = {start: pointStart(ctx), end: pointEnd(ctx)}\n      }\n    }\n\n    return right\n  }\n  /* c8 ignore stop */\n\n  /**\n   * Create an element for `node`.\n   *\n   * @type {HFunctionProps}\n   */\n  /* c8 ignore start */\n  // To do: next major: remove.\n  function state(node, tagName, props, children) {\n    if (Array.isArray(props)) {\n      children = props\n      props = {}\n    }\n\n    // @ts-expect-error augmenting an element yields an element.\n    return augment(node, {\n      type: 'element',\n      tagName,\n      properties: props || {},\n      children: children || []\n    })\n  }\n  /* c8 ignore stop */\n\n  /**\n   * Transform an mdast node into a hast node.\n   *\n   * @param {MdastNodes} node\n   *   mdast node.\n   * @param {MdastParents | null | undefined} [parent]\n   *   Parent of `node`.\n   * @returns {HastElementContent | Array | null | undefined}\n   *   Resulting hast node.\n   */\n  function oneBound(node, parent) {\n    // @ts-expect-error: that’s a state :)\n    return one(state, node, parent)\n  }\n\n  /**\n   * Transform the children of an mdast node into hast nodes.\n   *\n   * @param {MdastNodes} parent\n   *   mdast node to compile\n   * @returns {Array}\n   *   Resulting hast nodes.\n   */\n  function allBound(parent) {\n    // @ts-expect-error: that’s a state :)\n    return all(state, parent)\n  }\n}\n\n/**\n * Copy a node’s positional info.\n *\n * @param {MdastNodes} from\n *   mdast node to copy from.\n * @param {HastNodes} to\n *   hast node to copy into.\n * @returns {void}\n *   Nothing.\n */\nfunction patch(from, to) {\n  if (from.position) to.position = position(from)\n}\n\n/**\n * Honor the `data` of `from` and maybe generate an element instead of `to`.\n *\n * @template {HastNodes} Type\n *   Node type.\n * @param {MdastNodes} from\n *   mdast node to use data from.\n * @param {Type} to\n *   hast node to change.\n * @returns {Type | HastElement}\n *   Nothing.\n */\nfunction applyData(from, to) {\n  /** @type {Type | HastElement} */\n  let result = to\n\n  // Handle `data.hName`, `data.hProperties, `data.hChildren`.\n  if (from && from.data) {\n    const hName = from.data.hName\n    const hChildren = from.data.hChildren\n    const hProperties = from.data.hProperties\n\n    if (typeof hName === 'string') {\n      // Transforming the node resulted in an element with a different name\n      // than wanted:\n      if (result.type === 'element') {\n        result.tagName = hName\n      }\n      // Transforming the node resulted in a non-element, which happens for\n      // raw, text, and root nodes (unless custom handlers are passed).\n      // The intent is likely to keep the content around (otherwise: pass\n      // `hChildren`).\n      else {\n        result = {\n          type: 'element',\n          tagName: hName,\n          properties: {},\n          children: []\n        }\n\n        // To do: next major: take the children from the `root`, or inject the\n        // raw/text/comment or so into the element?\n        // if ('children' in node) {\n        //   // @ts-expect-error: assume `children` are allowed in elements.\n        //   result.children = node.children\n        // } else {\n        //   // @ts-expect-error: assume `node` is allowed in elements.\n        //   result.children.push(node)\n        // }\n      }\n    }\n\n    if (result.type === 'element' && hProperties) {\n      result.properties = {...result.properties, ...hProperties}\n    }\n\n    if (\n      'children' in result &&\n      result.children &&\n      hChildren !== null &&\n      hChildren !== undefined\n    ) {\n      // @ts-expect-error: assume valid children are defined.\n      result.children = hChildren\n    }\n  }\n\n  return result\n}\n\n/**\n * Transform an mdast node into a hast node.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastNodes} node\n *   mdast node.\n * @param {MdastParents | null | undefined} [parent]\n *   Parent of `node`.\n * @returns {HastElementContent | Array | null | undefined}\n *   Resulting hast node.\n */\n// To do: next major: do not expose, keep bound.\nexport function one(state, node, parent) {\n  const type = node && node.type\n\n  // Fail on non-nodes.\n  if (!type) {\n    throw new Error('Expected node, got `' + node + '`')\n  }\n\n  if (own.call(state.handlers, type)) {\n    return state.handlers[type](state, node, parent)\n  }\n\n  if (state.passThrough && state.passThrough.includes(type)) {\n    // To do: next major: deep clone.\n    // @ts-expect-error: types of passed through nodes are expected to be added manually.\n    return 'children' in node ? {...node, children: all(state, node)} : node\n  }\n\n  if (state.unknownHandler) {\n    return state.unknownHandler(state, node, parent)\n  }\n\n  return defaultUnknownHandler(state, node)\n}\n\n/**\n * Transform the children of an mdast node into hast nodes.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastNodes} parent\n *   mdast node to compile\n * @returns {Array}\n *   Resulting hast nodes.\n */\n// To do: next major: do not expose, keep bound.\nexport function all(state, parent) {\n  /** @type {Array} */\n  const values = []\n\n  if ('children' in parent) {\n    const nodes = parent.children\n    let index = -1\n    while (++index < nodes.length) {\n      const result = one(state, nodes[index], parent)\n\n      // To do: see if we van clean this? Can we merge texts?\n      if (result) {\n        if (index && nodes[index - 1].type === 'break') {\n          if (!Array.isArray(result) && result.type === 'text') {\n            result.value = result.value.replace(/^\\s+/, '')\n          }\n\n          if (!Array.isArray(result) && result.type === 'element') {\n            const head = result.children[0]\n\n            if (head && head.type === 'text') {\n              head.value = head.value.replace(/^\\s+/, '')\n            }\n          }\n        }\n\n        if (Array.isArray(result)) {\n          values.push(...result)\n        } else {\n          values.push(result)\n        }\n      }\n    }\n  }\n\n  return values\n}\n\n/**\n * Transform an unknown node.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastNodes} node\n *   Unknown mdast node.\n * @returns {HastText | HastElement}\n *   Resulting hast node.\n */\nfunction defaultUnknownHandler(state, node) {\n  const data = node.data || {}\n  /** @type {HastText | HastElement} */\n  const result =\n    'value' in node &&\n    !(own.call(data, 'hProperties') || own.call(data, 'hChildren'))\n      ? {type: 'text', value: node.value}\n      : {\n          type: 'element',\n          tagName: 'div',\n          properties: {},\n          children: all(state, node)\n        }\n\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n\n/**\n * Wrap `nodes` with line endings between each node.\n *\n * @template {HastContent} Type\n *   Node type.\n * @param {Array} nodes\n *   List of nodes to wrap.\n * @param {boolean | null | undefined} [loose=false]\n *   Whether to add line endings at start and end.\n * @returns {Array}\n *   Wrapped nodes.\n */\nexport function wrap(nodes, loose) {\n  /** @type {Array} */\n  const result = []\n  let index = -1\n\n  if (loose) {\n    result.push({type: 'text', value: '\\n'})\n  }\n\n  while (++index < nodes.length) {\n    if (index) result.push({type: 'text', value: '\\n'})\n    result.push(nodes[index])\n  }\n\n  if (loose && nodes.length > 0) {\n    result.push({type: 'text', value: '\\n'})\n  }\n\n  return result\n}\n","/**\n * @typedef PointLike\n * @property {number | null | undefined} [line]\n * @property {number | null | undefined} [column]\n * @property {number | null | undefined} [offset]\n *\n * @typedef PositionLike\n * @property {PointLike | null | undefined} [start]\n * @property {PointLike | null | undefined} [end]\n *\n * @typedef NodeLike\n * @property {PositionLike | null | undefined} [position]\n */\n\n/**\n * Check if `node` is generated.\n *\n * @param {NodeLike | null | undefined} [node]\n *   Node to check.\n * @returns {boolean}\n *   Whether `node` is generated (does not have positional info).\n */\nexport function generated(node) {\n  return (\n    !node ||\n    !node.position ||\n    !node.position.start ||\n    !node.position.start.line ||\n    !node.position.start.column ||\n    !node.position.end ||\n    !node.position.end.line ||\n    !node.position.end.column\n  )\n}\n","/**\n * @typedef {import('hast').Content} HastContent\n * @typedef {import('hast').Root} HastRoot\n *\n * @typedef {import('mdast').Content} MdastContent\n * @typedef {import('mdast').Root} MdastRoot\n *\n * @typedef {import('./state.js').Options} Options\n */\n\n/**\n * @typedef {HastRoot | HastContent} HastNodes\n * @typedef {MdastRoot | MdastContent} MdastNodes\n */\n\nimport {footer} from './footer.js'\nimport {createState} from './state.js'\n\n/**\n * Transform mdast to hast.\n *\n * ##### Notes\n *\n * ###### HTML\n *\n * Raw HTML is available in mdast as `html` nodes and can be embedded in hast\n * as semistandard `raw` nodes.\n * Most utilities ignore `raw` nodes but two notable ones don’t:\n *\n * *   `hast-util-to-html` also has an option `allowDangerousHtml` which will\n *     output the raw HTML.\n *     This is typically discouraged as noted by the option name but is useful\n *     if you completely trust authors\n * *   `hast-util-raw` can handle the raw embedded HTML strings by parsing them\n *     into standard hast nodes (`element`, `text`, etc).\n *     This is a heavy task as it needs a full HTML parser, but it is the only\n *     way to support untrusted content\n *\n * ###### Footnotes\n *\n * Many options supported here relate to footnotes.\n * Footnotes are not specified by CommonMark, which we follow by default.\n * They are supported by GitHub, so footnotes can be enabled in markdown with\n * `mdast-util-gfm`.\n *\n * The options `footnoteBackLabel` and `footnoteLabel` define natural language\n * that explains footnotes, which is hidden for sighted users but shown to\n * assistive technology.\n * When your page is not in English, you must define translated values.\n *\n * Back references use ARIA attributes, but the section label itself uses a\n * heading that is hidden with an `sr-only` class.\n * To show it to sighted users, define different attributes in\n * `footnoteLabelProperties`.\n *\n * ###### Clobbering\n *\n * Footnotes introduces a problem, as it links footnote calls to footnote\n * definitions on the page through `id` attributes generated from user content,\n * which results in DOM clobbering.\n *\n * DOM clobbering is this:\n *\n * ```html\n * 

\n * \n * ```\n *\n * Elements by their ID are made available by browsers on the `window` object,\n * which is a security risk.\n * Using a prefix solves this problem.\n *\n * More information on how to handle clobbering and the prefix is explained in\n * Example: headings (DOM clobbering) in `rehype-sanitize`.\n *\n * ###### Unknown nodes\n *\n * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.\n * The default behavior for unknown nodes is:\n *\n * * when the node has a `value` (and doesn’t have `data.hName`,\n * `data.hProperties`, or `data.hChildren`, see later), create a hast `text`\n * node\n * * otherwise, create a `
` element (which could be changed with\n * `data.hName`), with its children mapped from mdast to hast as well\n *\n * This behavior can be changed by passing an `unknownHandler`.\n *\n * @param {MdastNodes} tree\n * mdast tree.\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {HastNodes | null | undefined}\n * hast tree.\n */\n// To do: next major: always return a single `root`.\nexport function toHast(tree, options) {\n const state = createState(tree, options)\n const node = state.one(tree, null)\n const foot = footer(state)\n\n if (foot) {\n // @ts-expect-error If there’s a footer, there were definitions, meaning block\n // content.\n // So assume `node` is a parent node.\n node.children.push({type: 'text', value: '\\n'}, foot)\n }\n\n // To do: next major: always return root?\n return Array.isArray(node) ? {type: 'root', children: node} : node\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n *\n * @typedef {import('./state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Generate a hast footer for called footnote definitions.\n *\n * @param {State} state\n * Info passed around.\n * @returns {Element | undefined}\n * `section` element or `undefined`.\n */\nexport function footer(state) {\n /** @type {Array} */\n const listItems = []\n let index = -1\n\n while (++index < state.footnoteOrder.length) {\n const def = state.footnoteById[state.footnoteOrder[index]]\n\n if (!def) {\n continue\n }\n\n const content = state.all(def)\n const id = String(def.identifier).toUpperCase()\n const safeId = normalizeUri(id.toLowerCase())\n let referenceIndex = 0\n /** @type {Array} */\n const backReferences = []\n\n while (++referenceIndex <= state.footnoteCounts[id]) {\n /** @type {Element} */\n const backReference = {\n type: 'element',\n tagName: 'a',\n properties: {\n href:\n '#' +\n state.clobberPrefix +\n 'fnref-' +\n safeId +\n (referenceIndex > 1 ? '-' + referenceIndex : ''),\n dataFootnoteBackref: true,\n className: ['data-footnote-backref'],\n ariaLabel: state.footnoteBackLabel\n },\n children: [{type: 'text', value: '↩'}]\n }\n\n if (referenceIndex > 1) {\n backReference.children.push({\n type: 'element',\n tagName: 'sup',\n children: [{type: 'text', value: String(referenceIndex)}]\n })\n }\n\n if (backReferences.length > 0) {\n backReferences.push({type: 'text', value: ' '})\n }\n\n backReferences.push(backReference)\n }\n\n const tail = content[content.length - 1]\n\n if (tail && tail.type === 'element' && tail.tagName === 'p') {\n const tailTail = tail.children[tail.children.length - 1]\n if (tailTail && tailTail.type === 'text') {\n tailTail.value += ' '\n } else {\n tail.children.push({type: 'text', value: ' '})\n }\n\n tail.children.push(...backReferences)\n } else {\n content.push(...backReferences)\n }\n\n /** @type {Element} */\n const listItem = {\n type: 'element',\n tagName: 'li',\n properties: {id: state.clobberPrefix + 'fn-' + safeId},\n children: state.wrap(content, true)\n }\n\n state.patch(def, listItem)\n\n listItems.push(listItem)\n }\n\n if (listItems.length === 0) {\n return\n }\n\n return {\n type: 'element',\n tagName: 'section',\n properties: {dataFootnotes: true, className: ['footnotes']},\n children: [\n {\n type: 'element',\n tagName: state.footnoteLabelTagName,\n properties: {\n // To do: use structured clone.\n ...JSON.parse(JSON.stringify(state.footnoteLabelProperties)),\n id: 'footnote-label'\n },\n children: [{type: 'text', value: state.footnoteLabel}]\n },\n {type: 'text', value: '\\n'},\n {\n type: 'element',\n tagName: 'ol',\n properties: {},\n children: state.wrap(listItems, true)\n },\n {type: 'text', value: '\\n'}\n ]\n }\n}\n","/**\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('mdast').Root} MdastRoot\n * @typedef {import('mdast-util-to-hast').Options} Options\n * @typedef {import('unified').Processor} Processor\n *\n * @typedef {import('mdast-util-to-hast')} DoNotTouchAsThisImportIncludesRawInTree\n */\n\nimport {toHast} from 'mdast-util-to-hast'\n\n// Note: the `` overload doesn’t seem to work :'(\n\n/**\n * Plugin that turns markdown into HTML to support rehype.\n *\n * * If a destination processor is given, that processor runs with a new HTML\n * (hast) tree (bridge-mode).\n * As the given processor runs with a hast tree, and rehype plugins support\n * hast, that means rehype plugins can be used with the given processor.\n * The hast tree is discarded in the end.\n * It’s highly unlikely that you want to do this.\n * * The common case is to not pass a destination processor, in which case the\n * current processor continues running with a new HTML (hast) tree\n * (mutate-mode).\n * As the current processor continues with a hast tree, and rehype plugins\n * support hast, that means rehype plugins can be used after\n * `remark-rehype`.\n * It’s likely that this is what you want to do.\n *\n * @param destination\n * Optional unified processor.\n * @param options\n * Options passed to `mdast-util-to-hast`.\n */\nconst remarkRehype =\n /** @type {(import('unified').Plugin<[Processor, Options?]|[null|undefined, Options?]|[Options]|[], MdastRoot>)} */\n (\n function (destination, options) {\n return destination && 'run' in destination\n ? bridge(destination, options)\n : mutate(destination || options)\n }\n )\n\nexport default remarkRehype\n\n/**\n * Bridge-mode.\n * Runs the destination with the new hast tree.\n *\n * @type {import('unified').Plugin<[Processor, Options?], MdastRoot>}\n */\nfunction bridge(destination, options) {\n return (node, file, next) => {\n destination.run(toHast(node, options), file, (error) => {\n next(error)\n })\n }\n}\n\n/**\n * Mutate-mode.\n * Further plugins run on the hast tree.\n *\n * @type {import('unified').Plugin<[Options?]|void[], MdastRoot, HastRoot>}\n */\nfunction mutate(options) {\n // @ts-expect-error: assume a corresponding node is returned by `toHast`.\n return (node) => toHast(node, options)\n}\n","/**\n * @typedef {import('./info.js').Info} Info\n * @typedef {Record} Properties\n * @typedef {Record} Normal\n */\n\nexport class Schema {\n /**\n * @constructor\n * @param {Properties} property\n * @param {Normal} normal\n * @param {string} [space]\n */\n constructor(property, normal, space) {\n this.property = property\n this.normal = normal\n if (space) {\n this.space = space\n }\n }\n}\n\n/** @type {Properties} */\nSchema.prototype.property = {}\n/** @type {Normal} */\nSchema.prototype.normal = {}\n/** @type {string|null} */\nSchema.prototype.space = null\n","/**\n * @typedef {import('./schema.js').Properties} Properties\n * @typedef {import('./schema.js').Normal} Normal\n */\n\nimport {Schema} from './schema.js'\n\n/**\n * @param {Schema[]} definitions\n * @param {string} [space]\n * @returns {Schema}\n */\nexport function merge(definitions, space) {\n /** @type {Properties} */\n const property = {}\n /** @type {Normal} */\n const normal = {}\n let index = -1\n\n while (++index < definitions.length) {\n Object.assign(property, definitions[index].property)\n Object.assign(normal, definitions[index].normal)\n }\n\n return new Schema(property, normal, space)\n}\n","/**\n * @param {string} value\n * @returns {string}\n */\nexport function normalize(value) {\n return value.toLowerCase()\n}\n","export class Info {\n /**\n * @constructor\n * @param {string} property\n * @param {string} attribute\n */\n constructor(property, attribute) {\n /** @type {string} */\n this.property = property\n /** @type {string} */\n this.attribute = attribute\n }\n}\n\n/** @type {string|null} */\nInfo.prototype.space = null\nInfo.prototype.boolean = false\nInfo.prototype.booleanish = false\nInfo.prototype.overloadedBoolean = false\nInfo.prototype.number = false\nInfo.prototype.commaSeparated = false\nInfo.prototype.spaceSeparated = false\nInfo.prototype.commaOrSpaceSeparated = false\nInfo.prototype.mustUseProperty = false\nInfo.prototype.defined = false\n","let powers = 0\n\nexport const boolean = increment()\nexport const booleanish = increment()\nexport const overloadedBoolean = increment()\nexport const number = increment()\nexport const spaceSeparated = increment()\nexport const commaSeparated = increment()\nexport const commaOrSpaceSeparated = increment()\n\nfunction increment() {\n return 2 ** ++powers\n}\n","import {Info} from './info.js'\nimport * as types from './types.js'\n\n/** @type {Array} */\n// @ts-expect-error: hush.\nconst checks = Object.keys(types)\n\nexport class DefinedInfo extends Info {\n /**\n * @constructor\n * @param {string} property\n * @param {string} attribute\n * @param {number|null} [mask]\n * @param {string} [space]\n */\n constructor(property, attribute, mask, space) {\n let index = -1\n\n super(property, attribute)\n\n mark(this, 'space', space)\n\n if (typeof mask === 'number') {\n while (++index < checks.length) {\n const check = checks[index]\n mark(this, checks[index], (mask & types[check]) === types[check])\n }\n }\n }\n}\n\nDefinedInfo.prototype.defined = true\n\n/**\n * @param {DefinedInfo} values\n * @param {string} key\n * @param {unknown} value\n */\nfunction mark(values, key, value) {\n if (value) {\n // @ts-expect-error: assume `value` matches the expected value of `key`.\n values[key] = value\n }\n}\n","/**\n * @typedef {import('./schema.js').Properties} Properties\n * @typedef {import('./schema.js').Normal} Normal\n *\n * @typedef {Record} Attributes\n *\n * @typedef {Object} Definition\n * @property {Record} properties\n * @property {(attributes: Attributes, property: string) => string} transform\n * @property {string} [space]\n * @property {Attributes} [attributes]\n * @property {Array} [mustUseProperty]\n */\n\nimport {normalize} from '../normalize.js'\nimport {Schema} from './schema.js'\nimport {DefinedInfo} from './defined-info.js'\n\nconst own = {}.hasOwnProperty\n\n/**\n * @param {Definition} definition\n * @returns {Schema}\n */\nexport function create(definition) {\n /** @type {Properties} */\n const property = {}\n /** @type {Normal} */\n const normal = {}\n /** @type {string} */\n let prop\n\n for (prop in definition.properties) {\n if (own.call(definition.properties, prop)) {\n const value = definition.properties[prop]\n const info = new DefinedInfo(\n prop,\n definition.transform(definition.attributes || {}, prop),\n value,\n definition.space\n )\n\n if (\n definition.mustUseProperty &&\n definition.mustUseProperty.includes(prop)\n ) {\n info.mustUseProperty = true\n }\n\n property[prop] = info\n\n normal[normalize(prop)] = prop\n normal[normalize(info.attribute)] = prop\n }\n }\n\n return new Schema(property, normal, definition.space)\n}\n","import {create} from './util/create.js'\n\nexport const xlink = create({\n space: 'xlink',\n transform(_, prop) {\n return 'xlink:' + prop.slice(5).toLowerCase()\n },\n properties: {\n xLinkActuate: null,\n xLinkArcRole: null,\n xLinkHref: null,\n xLinkRole: null,\n xLinkShow: null,\n xLinkTitle: null,\n xLinkType: null\n }\n})\n","import {create} from './util/create.js'\n\nexport const xml = create({\n space: 'xml',\n transform(_, prop) {\n return 'xml:' + prop.slice(3).toLowerCase()\n },\n properties: {xmlLang: null, xmlBase: null, xmlSpace: null}\n})\n","/**\n * @param {Record} attributes\n * @param {string} attribute\n * @returns {string}\n */\nexport function caseSensitiveTransform(attributes, attribute) {\n return attribute in attributes ? attributes[attribute] : attribute\n}\n","import {caseSensitiveTransform} from './case-sensitive-transform.js'\n\n/**\n * @param {Record} attributes\n * @param {string} property\n * @returns {string}\n */\nexport function caseInsensitiveTransform(attributes, property) {\n return caseSensitiveTransform(attributes, property.toLowerCase())\n}\n","import {create} from './util/create.js'\nimport {caseInsensitiveTransform} from './util/case-insensitive-transform.js'\n\nexport const xmlns = create({\n space: 'xmlns',\n attributes: {xmlnsxlink: 'xmlns:xlink'},\n transform: caseInsensitiveTransform,\n properties: {xmlns: null, xmlnsXLink: null}\n})\n","import {booleanish, number, spaceSeparated} from './util/types.js'\nimport {create} from './util/create.js'\n\nexport const aria = create({\n transform(_, prop) {\n return prop === 'role' ? prop : 'aria-' + prop.slice(4).toLowerCase()\n },\n properties: {\n ariaActiveDescendant: null,\n ariaAtomic: booleanish,\n ariaAutoComplete: null,\n ariaBusy: booleanish,\n ariaChecked: booleanish,\n ariaColCount: number,\n ariaColIndex: number,\n ariaColSpan: number,\n ariaControls: spaceSeparated,\n ariaCurrent: null,\n ariaDescribedBy: spaceSeparated,\n ariaDetails: null,\n ariaDisabled: booleanish,\n ariaDropEffect: spaceSeparated,\n ariaErrorMessage: null,\n ariaExpanded: booleanish,\n ariaFlowTo: spaceSeparated,\n ariaGrabbed: booleanish,\n ariaHasPopup: null,\n ariaHidden: booleanish,\n ariaInvalid: null,\n ariaKeyShortcuts: null,\n ariaLabel: null,\n ariaLabelledBy: spaceSeparated,\n ariaLevel: number,\n ariaLive: null,\n ariaModal: booleanish,\n ariaMultiLine: booleanish,\n ariaMultiSelectable: booleanish,\n ariaOrientation: null,\n ariaOwns: spaceSeparated,\n ariaPlaceholder: null,\n ariaPosInSet: number,\n ariaPressed: booleanish,\n ariaReadOnly: booleanish,\n ariaRelevant: null,\n ariaRequired: booleanish,\n ariaRoleDescription: spaceSeparated,\n ariaRowCount: number,\n ariaRowIndex: number,\n ariaRowSpan: number,\n ariaSelected: booleanish,\n ariaSetSize: number,\n ariaSort: null,\n ariaValueMax: number,\n ariaValueMin: number,\n ariaValueNow: number,\n ariaValueText: null,\n role: null\n }\n})\n","import {\n boolean,\n overloadedBoolean,\n booleanish,\n number,\n spaceSeparated,\n commaSeparated\n} from './util/types.js'\nimport {create} from './util/create.js'\nimport {caseInsensitiveTransform} from './util/case-insensitive-transform.js'\n\nexport const html = create({\n space: 'html',\n attributes: {\n acceptcharset: 'accept-charset',\n classname: 'class',\n htmlfor: 'for',\n httpequiv: 'http-equiv'\n },\n transform: caseInsensitiveTransform,\n mustUseProperty: ['checked', 'multiple', 'muted', 'selected'],\n properties: {\n // Standard Properties.\n abbr: null,\n accept: commaSeparated,\n acceptCharset: spaceSeparated,\n accessKey: spaceSeparated,\n action: null,\n allow: null,\n allowFullScreen: boolean,\n allowPaymentRequest: boolean,\n allowUserMedia: boolean,\n alt: null,\n as: null,\n async: boolean,\n autoCapitalize: null,\n autoComplete: spaceSeparated,\n autoFocus: boolean,\n autoPlay: boolean,\n blocking: spaceSeparated,\n capture: null,\n charSet: null,\n checked: boolean,\n cite: null,\n className: spaceSeparated,\n cols: number,\n colSpan: null,\n content: null,\n contentEditable: booleanish,\n controls: boolean,\n controlsList: spaceSeparated,\n coords: number | commaSeparated,\n crossOrigin: null,\n data: null,\n dateTime: null,\n decoding: null,\n default: boolean,\n defer: boolean,\n dir: null,\n dirName: null,\n disabled: boolean,\n download: overloadedBoolean,\n draggable: booleanish,\n encType: null,\n enterKeyHint: null,\n fetchPriority: null,\n form: null,\n formAction: null,\n formEncType: null,\n formMethod: null,\n formNoValidate: boolean,\n formTarget: null,\n headers: spaceSeparated,\n height: number,\n hidden: boolean,\n high: number,\n href: null,\n hrefLang: null,\n htmlFor: spaceSeparated,\n httpEquiv: spaceSeparated,\n id: null,\n imageSizes: null,\n imageSrcSet: null,\n inert: boolean,\n inputMode: null,\n integrity: null,\n is: null,\n isMap: boolean,\n itemId: null,\n itemProp: spaceSeparated,\n itemRef: spaceSeparated,\n itemScope: boolean,\n itemType: spaceSeparated,\n kind: null,\n label: null,\n lang: null,\n language: null,\n list: null,\n loading: null,\n loop: boolean,\n low: number,\n manifest: null,\n max: null,\n maxLength: number,\n media: null,\n method: null,\n min: null,\n minLength: number,\n multiple: boolean,\n muted: boolean,\n name: null,\n nonce: null,\n noModule: boolean,\n noValidate: boolean,\n onAbort: null,\n onAfterPrint: null,\n onAuxClick: null,\n onBeforeMatch: null,\n onBeforePrint: null,\n onBeforeToggle: null,\n onBeforeUnload: null,\n onBlur: null,\n onCancel: null,\n onCanPlay: null,\n onCanPlayThrough: null,\n onChange: null,\n onClick: null,\n onClose: null,\n onContextLost: null,\n onContextMenu: null,\n onContextRestored: null,\n onCopy: null,\n onCueChange: null,\n onCut: null,\n onDblClick: null,\n onDrag: null,\n onDragEnd: null,\n onDragEnter: null,\n onDragExit: null,\n onDragLeave: null,\n onDragOver: null,\n onDragStart: null,\n onDrop: null,\n onDurationChange: null,\n onEmptied: null,\n onEnded: null,\n onError: null,\n onFocus: null,\n onFormData: null,\n onHashChange: null,\n onInput: null,\n onInvalid: null,\n onKeyDown: null,\n onKeyPress: null,\n onKeyUp: null,\n onLanguageChange: null,\n onLoad: null,\n onLoadedData: null,\n onLoadedMetadata: null,\n onLoadEnd: null,\n onLoadStart: null,\n onMessage: null,\n onMessageError: null,\n onMouseDown: null,\n onMouseEnter: null,\n onMouseLeave: null,\n onMouseMove: null,\n onMouseOut: null,\n onMouseOver: null,\n onMouseUp: null,\n onOffline: null,\n onOnline: null,\n onPageHide: null,\n onPageShow: null,\n onPaste: null,\n onPause: null,\n onPlay: null,\n onPlaying: null,\n onPopState: null,\n onProgress: null,\n onRateChange: null,\n onRejectionHandled: null,\n onReset: null,\n onResize: null,\n onScroll: null,\n onScrollEnd: null,\n onSecurityPolicyViolation: null,\n onSeeked: null,\n onSeeking: null,\n onSelect: null,\n onSlotChange: null,\n onStalled: null,\n onStorage: null,\n onSubmit: null,\n onSuspend: null,\n onTimeUpdate: null,\n onToggle: null,\n onUnhandledRejection: null,\n onUnload: null,\n onVolumeChange: null,\n onWaiting: null,\n onWheel: null,\n open: boolean,\n optimum: number,\n pattern: null,\n ping: spaceSeparated,\n placeholder: null,\n playsInline: boolean,\n popover: null,\n popoverTarget: null,\n popoverTargetAction: null,\n poster: null,\n preload: null,\n readOnly: boolean,\n referrerPolicy: null,\n rel: spaceSeparated,\n required: boolean,\n reversed: boolean,\n rows: number,\n rowSpan: number,\n sandbox: spaceSeparated,\n scope: null,\n scoped: boolean,\n seamless: boolean,\n selected: boolean,\n shadowRootClonable: boolean,\n shadowRootDelegatesFocus: boolean,\n shadowRootMode: null,\n shape: null,\n size: number,\n sizes: null,\n slot: null,\n span: number,\n spellCheck: booleanish,\n src: null,\n srcDoc: null,\n srcLang: null,\n srcSet: null,\n start: number,\n step: null,\n style: null,\n tabIndex: number,\n target: null,\n title: null,\n translate: null,\n type: null,\n typeMustMatch: boolean,\n useMap: null,\n value: booleanish,\n width: number,\n wrap: null,\n writingSuggestions: null,\n\n // Legacy.\n // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis\n align: null, // Several. Use CSS `text-align` instead,\n aLink: null, // ``. Use CSS `a:active {color}` instead\n archive: spaceSeparated, // ``. List of URIs to archives\n axis: null, // `
` and ``. Use `scope` on ``\n background: null, // ``. Use CSS `background-image` instead\n bgColor: null, // `` and table elements. Use CSS `background-color` instead\n border: number, // ``. Use CSS `border-width` instead,\n borderColor: null, // `
`. Use CSS `border-color` instead,\n bottomMargin: number, // ``\n cellPadding: null, // `
`\n cellSpacing: null, // `
`\n char: null, // Several table elements. When `align=char`, sets the character to align on\n charOff: null, // Several table elements. When `char`, offsets the alignment\n classId: null, // ``\n clear: null, // `
`. Use CSS `clear` instead\n code: null, // ``\n codeBase: null, // ``\n codeType: null, // ``\n color: null, // `` and `
`. Use CSS instead\n compact: boolean, // Lists. Use CSS to reduce space between items instead\n declare: boolean, // ``\n event: null, // `