github.com/minio/console@v1.3.0/web-app/public/scripts/pdf.worker.min.js (about)

     1  /**
     2   * @licstart The following is the entire license notice for the
     3   * JavaScript code in this page
     4   *
     5   * Copyright 2023 Mozilla Foundation
     6   *
     7   * Licensed under the Apache License, Version 2.0 (the "License");
     8   * you may not use this file except in compliance with the License.
     9   * You may obtain a copy of the License at
    10   *
    11   *     http://www.apache.org/licenses/LICENSE-2.0
    12   *
    13   * Unless required by applicable law or agreed to in writing, software
    14   * distributed under the License is distributed on an "AS IS" BASIS,
    15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    16   * See the License for the specific language governing permissions and
    17   * limitations under the License.
    18   *
    19   * @licend The above is the entire license notice for the
    20   * JavaScript code in this page
    21   */
    22  !(function webpackUniversalModuleDefinition(e, t) {
    23    "object" == typeof exports && "object" == typeof module
    24      ? (module.exports = e.pdfjsWorker = t())
    25      : "function" == typeof define && define.amd
    26        ? define("pdfjs-dist/build/pdf.worker", [], () => (e.pdfjsWorker = t()))
    27        : "object" == typeof exports
    28          ? (exports["pdfjs-dist/build/pdf.worker"] = e.pdfjsWorker = t())
    29          : (e["pdfjs-dist/build/pdf.worker"] = e.pdfjsWorker = t());
    30  })(globalThis, () =>
    31    (() => {
    32      "use strict";
    33      var e = [
    34          ,
    35          (e, t, a) => {
    36            Object.defineProperty(t, "__esModule", { value: !0 });
    37            t.WorkerTask = t.WorkerMessageHandler = void 0;
    38            var r = a(2),
    39              n = a(3),
    40              i = a(4),
    41              s = a(6),
    42              o = a(10),
    43              c = a(68),
    44              l = a(73),
    45              h = a(104),
    46              u = a(105),
    47              d = a(72);
    48            class WorkerTask {
    49              constructor(e) {
    50                this.name = e;
    51                this.terminated = !1;
    52                this._capability = new r.PromiseCapability();
    53              }
    54              get finished() {
    55                return this._capability.promise;
    56              }
    57              finish() {
    58                this._capability.resolve();
    59              }
    60              terminate() {
    61                this.terminated = !0;
    62              }
    63              ensureNotTerminated() {
    64                if (this.terminated)
    65                  throw new Error("Worker task was terminated");
    66              }
    67            }
    68            t.WorkerTask = WorkerTask;
    69            class WorkerMessageHandler {
    70              static setup(e, t) {
    71                let a = !1;
    72                e.on("test", function (t) {
    73                  if (!a) {
    74                    a = !0;
    75                    e.send("test", t instanceof Uint8Array);
    76                  }
    77                });
    78                e.on("configure", function (e) {
    79                  (0, r.setVerbosityLevel)(e.verbosity);
    80                });
    81                e.on("GetDocRequest", function (e) {
    82                  return WorkerMessageHandler.createDocumentHandler(e, t);
    83                });
    84              }
    85              static createDocumentHandler(e, t) {
    86                let a,
    87                  f = !1,
    88                  g = null;
    89                const p = new Set(),
    90                  m = (0, r.getVerbosityLevel)(),
    91                  { docId: b, apiVersion: y } = e,
    92                  w = "3.11.174";
    93                if (y !== w)
    94                  throw new Error(
    95                    `The API version "${y}" does not match the Worker version "${w}".`,
    96                  );
    97                const S = [];
    98                for (const e in []) S.push(e);
    99                if (S.length)
   100                  throw new Error(
   101                    "The `Array.prototype` contains unexpected enumerable properties: " +
   102                      S.join(", ") +
   103                      "; thus breaking e.g. `for...in` iteration of `Array`s.",
   104                  );
   105                const x = b + "_worker";
   106                let C = new h.MessageHandler(x, b, t);
   107                function ensureNotTerminated() {
   108                  if (f) throw new Error("Worker was terminated");
   109                }
   110                function startWorkerTask(e) {
   111                  p.add(e);
   112                }
   113                function finishWorkerTask(e) {
   114                  e.finish();
   115                  p.delete(e);
   116                }
   117                async function loadDocument(e) {
   118                  await a.ensureDoc("checkHeader");
   119                  await a.ensureDoc("parseStartXRef");
   120                  await a.ensureDoc("parse", [e]);
   121                  await a.ensureDoc("checkFirstPage", [e]);
   122                  await a.ensureDoc("checkLastPage", [e]);
   123                  const t = await a.ensureDoc("isPureXfa");
   124                  if (t) {
   125                    const e = new WorkerTask("loadXfaFonts");
   126                    startWorkerTask(e);
   127                    await Promise.all([
   128                      a
   129                        .loadXfaFonts(C, e)
   130                        .catch((e) => {})
   131                        .then(() => finishWorkerTask(e)),
   132                      a.loadXfaImages(),
   133                    ]);
   134                  }
   135                  const [r, n] = await Promise.all([
   136                    a.ensureDoc("numPages"),
   137                    a.ensureDoc("fingerprints"),
   138                  ]);
   139                  return {
   140                    numPages: r,
   141                    fingerprints: n,
   142                    htmlForXfa: t ? await a.ensureDoc("htmlForXfa") : null,
   143                  };
   144                }
   145                function getPdfManager({
   146                  data: e,
   147                  password: t,
   148                  disableAutoFetch: a,
   149                  rangeChunkSize: i,
   150                  length: o,
   151                  docBaseUrl: c,
   152                  enableXfa: l,
   153                  evaluatorOptions: h,
   154                }) {
   155                  const d = {
   156                      source: null,
   157                      disableAutoFetch: a,
   158                      docBaseUrl: c,
   159                      docId: b,
   160                      enableXfa: l,
   161                      evaluatorOptions: h,
   162                      handler: C,
   163                      length: o,
   164                      password: t,
   165                      rangeChunkSize: i,
   166                    },
   167                    f = new r.PromiseCapability();
   168                  let p;
   169                  if (e) {
   170                    try {
   171                      d.source = e;
   172                      p = new s.LocalPdfManager(d);
   173                      f.resolve(p);
   174                    } catch (e) {
   175                      f.reject(e);
   176                    }
   177                    return f.promise;
   178                  }
   179                  let m,
   180                    y = [];
   181                  try {
   182                    m = new u.PDFWorkerStream(C);
   183                  } catch (e) {
   184                    f.reject(e);
   185                    return f.promise;
   186                  }
   187                  const w = m.getFullReader();
   188                  w.headersReady
   189                    .then(function () {
   190                      if (w.isRangeSupported) {
   191                        d.source = m;
   192                        d.length = w.contentLength;
   193                        d.disableAutoFetch ||= w.isStreamingSupported;
   194                        p = new s.NetworkPdfManager(d);
   195                        for (const e of y) p.sendProgressiveData(e);
   196                        y = [];
   197                        f.resolve(p);
   198                        g = null;
   199                      }
   200                    })
   201                    .catch(function (e) {
   202                      f.reject(e);
   203                      g = null;
   204                    });
   205                  let S = 0;
   206                  new Promise(function (e, t) {
   207                    const readChunk = function ({ value: e, done: a }) {
   208                      try {
   209                        ensureNotTerminated();
   210                        if (a) {
   211                          p ||
   212                            (function () {
   213                              const e = (0, n.arrayBuffersToBytes)(y);
   214                              o &&
   215                                e.length !== o &&
   216                                (0, r.warn)(
   217                                  "reported HTTP length is different from actual",
   218                                );
   219                              try {
   220                                d.source = e;
   221                                p = new s.LocalPdfManager(d);
   222                                f.resolve(p);
   223                              } catch (e) {
   224                                f.reject(e);
   225                              }
   226                              y = [];
   227                            })();
   228                          g = null;
   229                          return;
   230                        }
   231                        S += e.byteLength;
   232                        w.isStreamingSupported ||
   233                          C.send("DocProgress", {
   234                            loaded: S,
   235                            total: Math.max(S, w.contentLength || 0),
   236                          });
   237                        p ? p.sendProgressiveData(e) : y.push(e);
   238                        w.read().then(readChunk, t);
   239                      } catch (e) {
   240                        t(e);
   241                      }
   242                    };
   243                    w.read().then(readChunk, t);
   244                  }).catch(function (e) {
   245                    f.reject(e);
   246                    g = null;
   247                  });
   248                  g = function (e) {
   249                    m.cancelAllRequests(e);
   250                  };
   251                  return f.promise;
   252                }
   253                C.on("GetPage", function (e) {
   254                  return a.getPage(e.pageIndex).then(function (e) {
   255                    return Promise.all([
   256                      a.ensure(e, "rotate"),
   257                      a.ensure(e, "ref"),
   258                      a.ensure(e, "userUnit"),
   259                      a.ensure(e, "view"),
   260                    ]).then(function ([e, t, a, r]) {
   261                      return { rotate: e, ref: t, userUnit: a, view: r };
   262                    });
   263                  });
   264                });
   265                C.on("GetPageIndex", function (e) {
   266                  const t = i.Ref.get(e.num, e.gen);
   267                  return a.ensureCatalog("getPageIndex", [t]);
   268                });
   269                C.on("GetDestinations", function (e) {
   270                  return a.ensureCatalog("destinations");
   271                });
   272                C.on("GetDestination", function (e) {
   273                  return a.ensureCatalog("getDestination", [e.id]);
   274                });
   275                C.on("GetPageLabels", function (e) {
   276                  return a.ensureCatalog("pageLabels");
   277                });
   278                C.on("GetPageLayout", function (e) {
   279                  return a.ensureCatalog("pageLayout");
   280                });
   281                C.on("GetPageMode", function (e) {
   282                  return a.ensureCatalog("pageMode");
   283                });
   284                C.on("GetViewerPreferences", function (e) {
   285                  return a.ensureCatalog("viewerPreferences");
   286                });
   287                C.on("GetOpenAction", function (e) {
   288                  return a.ensureCatalog("openAction");
   289                });
   290                C.on("GetAttachments", function (e) {
   291                  return a.ensureCatalog("attachments");
   292                });
   293                C.on("GetDocJSActions", function (e) {
   294                  return a.ensureCatalog("jsActions");
   295                });
   296                C.on("GetPageJSActions", function ({ pageIndex: e }) {
   297                  return a.getPage(e).then(function (e) {
   298                    return a.ensure(e, "jsActions");
   299                  });
   300                });
   301                C.on("GetOutline", function (e) {
   302                  return a.ensureCatalog("documentOutline");
   303                });
   304                C.on("GetOptionalContentConfig", function (e) {
   305                  return a.ensureCatalog("optionalContentConfig");
   306                });
   307                C.on("GetPermissions", function (e) {
   308                  return a.ensureCatalog("permissions");
   309                });
   310                C.on("GetMetadata", function (e) {
   311                  return Promise.all([
   312                    a.ensureDoc("documentInfo"),
   313                    a.ensureCatalog("metadata"),
   314                  ]);
   315                });
   316                C.on("GetMarkInfo", function (e) {
   317                  return a.ensureCatalog("markInfo");
   318                });
   319                C.on("GetData", function (e) {
   320                  return a.requestLoadedStream().then(function (e) {
   321                    return e.bytes;
   322                  });
   323                });
   324                C.on("GetAnnotations", function ({ pageIndex: e, intent: t }) {
   325                  return a.getPage(e).then(function (a) {
   326                    const r = new WorkerTask(`GetAnnotations: page ${e}`);
   327                    startWorkerTask(r);
   328                    return a.getAnnotationsData(C, r, t).then(
   329                      (e) => {
   330                        finishWorkerTask(r);
   331                        return e;
   332                      },
   333                      (e) => {
   334                        finishWorkerTask(r);
   335                        throw e;
   336                      },
   337                    );
   338                  });
   339                });
   340                C.on("GetFieldObjects", function (e) {
   341                  return a.ensureDoc("fieldObjects");
   342                });
   343                C.on("HasJSActions", function (e) {
   344                  return a.ensureDoc("hasJSActions");
   345                });
   346                C.on("GetCalculationOrderIds", function (e) {
   347                  return a.ensureDoc("calculationOrderIds");
   348                });
   349                C.on(
   350                  "SaveDocument",
   351                  async function ({
   352                    isPureXfa: e,
   353                    numPages: t,
   354                    annotationStorage: s,
   355                    filename: c,
   356                  }) {
   357                    const h = [
   358                        a.requestLoadedStream(),
   359                        a.ensureCatalog("acroForm"),
   360                        a.ensureCatalog("acroFormRef"),
   361                        a.ensureDoc("startXRef"),
   362                        a.ensureDoc("xref"),
   363                        a.ensureDoc("linearization"),
   364                        a.ensureCatalog("structTreeRoot"),
   365                      ],
   366                      u = [],
   367                      f = e ? null : (0, n.getNewAnnotationsMap)(s),
   368                      [g, p, m, b, y, w, S] = await Promise.all(h),
   369                      x = y.trailer.getRaw("Root") || null;
   370                    let k;
   371                    if (f) {
   372                      S
   373                        ? (await S.canUpdateStructTree({
   374                            pdfManager: a,
   375                            newAnnotationsByPage: f,
   376                          })) && (k = S)
   377                        : (await d.StructTreeRoot.canCreateStructureTree({
   378                            catalogRef: x,
   379                            pdfManager: a,
   380                            newAnnotationsByPage: f,
   381                          })) && (k = null);
   382                      const e = o.AnnotationFactory.generateImages(
   383                          s.values(),
   384                          y,
   385                          a.evaluatorOptions.isOffscreenCanvasSupported,
   386                        ),
   387                        t = void 0 === k ? u : [];
   388                      for (const [r, n] of f)
   389                        t.push(
   390                          a.getPage(r).then((t) => {
   391                            const a = new WorkerTask(`Save (editor): page ${r}`);
   392                            return t
   393                              .saveNewAnnotations(C, a, n, e)
   394                              .finally(function () {
   395                                finishWorkerTask(a);
   396                              });
   397                          }),
   398                        );
   399                      null === k
   400                        ? u.push(
   401                            Promise.all(t).then(async (e) => {
   402                              await d.StructTreeRoot.createStructureTree({
   403                                newAnnotationsByPage: f,
   404                                xref: y,
   405                                catalogRef: x,
   406                                pdfManager: a,
   407                                newRefs: e,
   408                              });
   409                              return e;
   410                            }),
   411                          )
   412                        : k &&
   413                          u.push(
   414                            Promise.all(t).then(async (e) => {
   415                              await k.updateStructureTree({
   416                                newAnnotationsByPage: f,
   417                                pdfManager: a,
   418                                newRefs: e,
   419                              });
   420                              return e;
   421                            }),
   422                          );
   423                    }
   424                    if (e) u.push(a.serializeXfaData(s));
   425                    else
   426                      for (let e = 0; e < t; e++)
   427                        u.push(
   428                          a.getPage(e).then(function (t) {
   429                            const a = new WorkerTask(`Save: page ${e}`);
   430                            return t.save(C, a, s).finally(function () {
   431                              finishWorkerTask(a);
   432                            });
   433                          }),
   434                        );
   435                    const v = await Promise.all(u);
   436                    let F = [],
   437                      O = null;
   438                    if (e) {
   439                      O = v[0];
   440                      if (!O) return g.bytes;
   441                    } else {
   442                      F = v.flat(2);
   443                      if (0 === F.length) return g.bytes;
   444                    }
   445                    const T =
   446                        m &&
   447                        p instanceof i.Dict &&
   448                        F.some((e) => e.needAppearances),
   449                      M = (p instanceof i.Dict && p.get("XFA")) || null;
   450                    let D = null,
   451                      E = !1;
   452                    if (Array.isArray(M)) {
   453                      for (let e = 0, t = M.length; e < t; e += 2)
   454                        if ("datasets" === M[e]) {
   455                          D = M[e + 1];
   456                          E = !0;
   457                        }
   458                      null === D && (D = y.getNewTemporaryRef());
   459                    } else M && (0, r.warn)("Unsupported XFA type.");
   460                    let N = Object.create(null);
   461                    if (y.trailer) {
   462                      const e = Object.create(null),
   463                        t = y.trailer.get("Info") || null;
   464                      t instanceof i.Dict &&
   465                        t.forEach((t, a) => {
   466                          "string" == typeof a &&
   467                            (e[t] = (0, r.stringToPDFString)(a));
   468                        });
   469                      N = {
   470                        rootRef: x,
   471                        encryptRef: y.trailer.getRaw("Encrypt") || null,
   472                        newRef: y.getNewTemporaryRef(),
   473                        infoRef: y.trailer.getRaw("Info") || null,
   474                        info: e,
   475                        fileIds: y.trailer.get("ID") || null,
   476                        startXRef: w ? b : y.lastXRefStreamPos ?? b,
   477                        filename: c,
   478                      };
   479                    }
   480                    return (0, l.incrementalUpdate)({
   481                      originalData: g.bytes,
   482                      xrefInfo: N,
   483                      newRefs: F,
   484                      xref: y,
   485                      hasXfa: !!M,
   486                      xfaDatasetsRef: D,
   487                      hasXfaDatasetsEntry: E,
   488                      needAppearances: T,
   489                      acroFormRef: m,
   490                      acroForm: p,
   491                      xfaData: O,
   492                    }).finally(() => {
   493                      y.resetNewTemporaryRef();
   494                    });
   495                  },
   496                );
   497                C.on("GetOperatorList", function (e, t) {
   498                  const n = e.pageIndex;
   499                  a.getPage(n).then(function (a) {
   500                    const i = new WorkerTask(`GetOperatorList: page ${n}`);
   501                    startWorkerTask(i);
   502                    const s = m >= r.VerbosityLevel.INFOS ? Date.now() : 0;
   503                    a.getOperatorList({
   504                      handler: C,
   505                      sink: t,
   506                      task: i,
   507                      intent: e.intent,
   508                      cacheKey: e.cacheKey,
   509                      annotationStorage: e.annotationStorage,
   510                    }).then(
   511                      function (e) {
   512                        finishWorkerTask(i);
   513                        s &&
   514                          (0, r.info)(
   515                            `page=${n + 1} - getOperatorList: time=${
   516                              Date.now() - s
   517                            }ms, len=${e.length}`,
   518                          );
   519                        t.close();
   520                      },
   521                      function (e) {
   522                        finishWorkerTask(i);
   523                        i.terminated || t.error(e);
   524                      },
   525                    );
   526                  });
   527                });
   528                C.on("GetTextContent", function (e, t) {
   529                  const {
   530                    pageIndex: n,
   531                    includeMarkedContent: i,
   532                    disableNormalization: s,
   533                  } = e;
   534                  a.getPage(n).then(function (e) {
   535                    const a = new WorkerTask("GetTextContent: page " + n);
   536                    startWorkerTask(a);
   537                    const o = m >= r.VerbosityLevel.INFOS ? Date.now() : 0;
   538                    e.extractTextContent({
   539                      handler: C,
   540                      task: a,
   541                      sink: t,
   542                      includeMarkedContent: i,
   543                      disableNormalization: s,
   544                    }).then(
   545                      function () {
   546                        finishWorkerTask(a);
   547                        o &&
   548                          (0, r.info)(
   549                            `page=${n + 1} - getTextContent: time=` +
   550                              (Date.now() - o) +
   551                              "ms",
   552                          );
   553                        t.close();
   554                      },
   555                      function (e) {
   556                        finishWorkerTask(a);
   557                        a.terminated || t.error(e);
   558                      },
   559                    );
   560                  });
   561                });
   562                C.on("GetStructTree", function (e) {
   563                  return a.getPage(e.pageIndex).then(function (e) {
   564                    return a.ensure(e, "getStructTree");
   565                  });
   566                });
   567                C.on("FontFallback", function (e) {
   568                  return a.fontFallback(e.id, C);
   569                });
   570                C.on("Cleanup", function (e) {
   571                  return a.cleanup(!0);
   572                });
   573                C.on("Terminate", function (e) {
   574                  f = !0;
   575                  const t = [];
   576                  if (a) {
   577                    a.terminate(new r.AbortException("Worker was terminated."));
   578                    const e = a.cleanup();
   579                    t.push(e);
   580                    a = null;
   581                  } else (0, c.clearGlobalCaches)();
   582                  g && g(new r.AbortException("Worker was terminated."));
   583                  for (const e of p) {
   584                    t.push(e.finished);
   585                    e.terminate();
   586                  }
   587                  return Promise.all(t).then(function () {
   588                    C.destroy();
   589                    C = null;
   590                  });
   591                });
   592                C.on("Ready", function (t) {
   593                  !(function setupDoc(e) {
   594                    function onSuccess(e) {
   595                      ensureNotTerminated();
   596                      C.send("GetDoc", { pdfInfo: e });
   597                    }
   598                    function onFailure(e) {
   599                      ensureNotTerminated();
   600                      if (e instanceof r.PasswordException) {
   601                        const t = new WorkerTask(
   602                          `PasswordException: response ${e.code}`,
   603                        );
   604                        startWorkerTask(t);
   605                        C.sendWithPromise("PasswordRequest", e)
   606                          .then(function ({ password: e }) {
   607                            finishWorkerTask(t);
   608                            a.updatePassword(e);
   609                            pdfManagerReady();
   610                          })
   611                          .catch(function () {
   612                            finishWorkerTask(t);
   613                            C.send("DocException", e);
   614                          });
   615                      } else
   616                        e instanceof r.InvalidPDFException ||
   617                        e instanceof r.MissingPDFException ||
   618                        e instanceof r.UnexpectedResponseException ||
   619                        e instanceof r.UnknownErrorException
   620                          ? C.send("DocException", e)
   621                          : C.send(
   622                              "DocException",
   623                              new r.UnknownErrorException(
   624                                e.message,
   625                                e.toString(),
   626                              ),
   627                            );
   628                    }
   629                    function pdfManagerReady() {
   630                      ensureNotTerminated();
   631                      loadDocument(!1).then(onSuccess, function (e) {
   632                        ensureNotTerminated();
   633                        e instanceof n.XRefParseException
   634                          ? a.requestLoadedStream().then(function () {
   635                              ensureNotTerminated();
   636                              loadDocument(!0).then(onSuccess, onFailure);
   637                            })
   638                          : onFailure(e);
   639                      });
   640                    }
   641                    ensureNotTerminated();
   642                    getPdfManager(e)
   643                      .then(function (e) {
   644                        if (f) {
   645                          e.terminate(
   646                            new r.AbortException("Worker was terminated."),
   647                          );
   648                          throw new Error("Worker was terminated");
   649                        }
   650                        a = e;
   651                        a.requestLoadedStream(!0).then((e) => {
   652                          C.send("DataLoaded", { length: e.bytes.byteLength });
   653                        });
   654                      })
   655                      .then(pdfManagerReady, onFailure);
   656                  })(e);
   657                  e = null;
   658                });
   659                return x;
   660              }
   661              static initializeFromPort(e) {
   662                const t = new h.MessageHandler("worker", "main", e);
   663                WorkerMessageHandler.setup(t, e);
   664                t.send("ready", null);
   665              }
   666            }
   667            t.WorkerMessageHandler = WorkerMessageHandler;
   668            "undefined" == typeof window &&
   669              !r.isNodeJS &&
   670              "undefined" != typeof self &&
   671              (function isMessagePort(e) {
   672                return "function" == typeof e.postMessage && "onmessage" in e;
   673              })(self) &&
   674              WorkerMessageHandler.initializeFromPort(self);
   675          },
   676          (e, t) => {
   677            Object.defineProperty(t, "__esModule", { value: !0 });
   678            t.VerbosityLevel =
   679              t.Util =
   680              t.UnknownErrorException =
   681              t.UnexpectedResponseException =
   682              t.TextRenderingMode =
   683              t.RenderingIntentFlag =
   684              t.PromiseCapability =
   685              t.PermissionFlag =
   686              t.PasswordResponses =
   687              t.PasswordException =
   688              t.PageActionEventType =
   689              t.OPS =
   690              t.MissingPDFException =
   691              t.MAX_IMAGE_SIZE_TO_CACHE =
   692              t.LINE_FACTOR =
   693              t.LINE_DESCENT_FACTOR =
   694              t.InvalidPDFException =
   695              t.ImageKind =
   696              t.IDENTITY_MATRIX =
   697              t.FormatError =
   698              t.FeatureTest =
   699              t.FONT_IDENTITY_MATRIX =
   700              t.DocumentActionEventType =
   701              t.CMapCompressionType =
   702              t.BaseException =
   703              t.BASELINE_FACTOR =
   704              t.AnnotationType =
   705              t.AnnotationReplyType =
   706              t.AnnotationPrefix =
   707              t.AnnotationMode =
   708              t.AnnotationFlag =
   709              t.AnnotationFieldFlag =
   710              t.AnnotationEditorType =
   711              t.AnnotationEditorPrefix =
   712              t.AnnotationEditorParamsType =
   713              t.AnnotationBorderStyleType =
   714              t.AnnotationActionEventType =
   715              t.AbortException =
   716                void 0;
   717            t.assert = function assert(e, t) {
   718              e || unreachable(t);
   719            };
   720            t.bytesToString = bytesToString;
   721            t.createValidAbsoluteUrl = function createValidAbsoluteUrl(
   722              e,
   723              t = null,
   724              a = null,
   725            ) {
   726              if (!e) return null;
   727              try {
   728                if (a && "string" == typeof e) {
   729                  if (a.addDefaultProtocol && e.startsWith("www.")) {
   730                    const t = e.match(/\./g);
   731                    t?.length >= 2 && (e = `http://${e}`);
   732                  }
   733                  if (a.tryConvertEncoding)
   734                    try {
   735                      e = stringToUTF8String(e);
   736                    } catch {}
   737                }
   738                const r = t ? new URL(e, t) : new URL(e);
   739                if (
   740                  (function _isValidProtocol(e) {
   741                    switch (e?.protocol) {
   742                      case "http:":
   743                      case "https:":
   744                      case "ftp:":
   745                      case "mailto:":
   746                      case "tel:":
   747                        return !0;
   748                      default:
   749                        return !1;
   750                    }
   751                  })(r)
   752                )
   753                  return r;
   754              } catch {}
   755              return null;
   756            };
   757            t.getModificationDate = function getModificationDate(e = new Date()) {
   758              return [
   759                e.getUTCFullYear().toString(),
   760                (e.getUTCMonth() + 1).toString().padStart(2, "0"),
   761                e.getUTCDate().toString().padStart(2, "0"),
   762                e.getUTCHours().toString().padStart(2, "0"),
   763                e.getUTCMinutes().toString().padStart(2, "0"),
   764                e.getUTCSeconds().toString().padStart(2, "0"),
   765              ].join("");
   766            };
   767            t.getUuid = function getUuid() {
   768              if (
   769                "undefined" != typeof crypto &&
   770                "function" == typeof crypto?.randomUUID
   771              )
   772                return crypto.randomUUID();
   773              const e = new Uint8Array(32);
   774              if (
   775                "undefined" != typeof crypto &&
   776                "function" == typeof crypto?.getRandomValues
   777              )
   778                crypto.getRandomValues(e);
   779              else
   780                for (let t = 0; t < 32; t++)
   781                  e[t] = Math.floor(255 * Math.random());
   782              return bytesToString(e);
   783            };
   784            t.getVerbosityLevel = function getVerbosityLevel() {
   785              return n;
   786            };
   787            t.info = function info(e) {
   788              n >= r.INFOS && console.log(`Info: ${e}`);
   789            };
   790            t.isArrayBuffer = function isArrayBuffer(e) {
   791              return "object" == typeof e && void 0 !== e?.byteLength;
   792            };
   793            t.isArrayEqual = function isArrayEqual(e, t) {
   794              if (e.length !== t.length) return !1;
   795              for (let a = 0, r = e.length; a < r; a++)
   796                if (e[a] !== t[a]) return !1;
   797              return !0;
   798            };
   799            t.isNodeJS = void 0;
   800            t.normalizeUnicode = function normalizeUnicode(e) {
   801              if (!c) {
   802                c =
   803                  /([\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;
   804                l = new Map([["ſt", "ſt"]]);
   805              }
   806              return e.replaceAll(c, (e, t, a) =>
   807                t ? t.normalize("NFKC") : l.get(a),
   808              );
   809            };
   810            t.objectFromMap = function objectFromMap(e) {
   811              const t = Object.create(null);
   812              for (const [a, r] of e) t[a] = r;
   813              return t;
   814            };
   815            t.objectSize = function objectSize(e) {
   816              return Object.keys(e).length;
   817            };
   818            t.setVerbosityLevel = function setVerbosityLevel(e) {
   819              Number.isInteger(e) && (n = e);
   820            };
   821            t.shadow = shadow;
   822            t.string32 = function string32(e) {
   823              return String.fromCharCode(
   824                (e >> 24) & 255,
   825                (e >> 16) & 255,
   826                (e >> 8) & 255,
   827                255 & e,
   828              );
   829            };
   830            t.stringToBytes = stringToBytes;
   831            t.stringToPDFString = function stringToPDFString(e) {
   832              if (e[0] >= "ï") {
   833                let t;
   834                "þ" === e[0] && "ÿ" === e[1]
   835                  ? (t = "utf-16be")
   836                  : "ÿ" === e[0] && "þ" === e[1]
   837                    ? (t = "utf-16le")
   838                    : "ï" === e[0] &&
   839                      "»" === e[1] &&
   840                      "¿" === e[2] &&
   841                      (t = "utf-8");
   842                if (t)
   843                  try {
   844                    const a = new TextDecoder(t, { fatal: !0 }),
   845                      r = stringToBytes(e);
   846                    return a.decode(r);
   847                  } catch (e) {
   848                    warn(`stringToPDFString: "${e}".`);
   849                  }
   850              }
   851              const t = [];
   852              for (let a = 0, r = e.length; a < r; a++) {
   853                const r = o[e.charCodeAt(a)];
   854                t.push(r ? String.fromCharCode(r) : e.charAt(a));
   855              }
   856              return t.join("");
   857            };
   858            t.stringToUTF8String = stringToUTF8String;
   859            t.unreachable = unreachable;
   860            t.utf8StringToString = function utf8StringToString(e) {
   861              return unescape(encodeURIComponent(e));
   862            };
   863            t.warn = warn;
   864            const a = !(
   865              "object" != typeof process ||
   866              process + "" != "[object process]" ||
   867              process.versions.nw ||
   868              (process.versions.electron &&
   869                process.type &&
   870                "browser" !== process.type)
   871            );
   872            t.isNodeJS = a;
   873            t.IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];
   874            t.FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];
   875            t.MAX_IMAGE_SIZE_TO_CACHE = 1e7;
   876            t.LINE_FACTOR = 1.35;
   877            t.LINE_DESCENT_FACTOR = 0.35;
   878            t.BASELINE_FACTOR = 0.25925925925925924;
   879            t.RenderingIntentFlag = {
   880              ANY: 1,
   881              DISPLAY: 2,
   882              PRINT: 4,
   883              SAVE: 8,
   884              ANNOTATIONS_FORMS: 16,
   885              ANNOTATIONS_STORAGE: 32,
   886              ANNOTATIONS_DISABLE: 64,
   887              OPLIST: 256,
   888            };
   889            t.AnnotationMode = {
   890              DISABLE: 0,
   891              ENABLE: 1,
   892              ENABLE_FORMS: 2,
   893              ENABLE_STORAGE: 3,
   894            };
   895            t.AnnotationEditorPrefix = "pdfjs_internal_editor_";
   896            t.AnnotationEditorType = {
   897              DISABLE: -1,
   898              NONE: 0,
   899              FREETEXT: 3,
   900              STAMP: 13,
   901              INK: 15,
   902            };
   903            t.AnnotationEditorParamsType = {
   904              RESIZE: 1,
   905              CREATE: 2,
   906              FREETEXT_SIZE: 11,
   907              FREETEXT_COLOR: 12,
   908              FREETEXT_OPACITY: 13,
   909              INK_COLOR: 21,
   910              INK_THICKNESS: 22,
   911              INK_OPACITY: 23,
   912            };
   913            t.PermissionFlag = {
   914              PRINT: 4,
   915              MODIFY_CONTENTS: 8,
   916              COPY: 16,
   917              MODIFY_ANNOTATIONS: 32,
   918              FILL_INTERACTIVE_FORMS: 256,
   919              COPY_FOR_ACCESSIBILITY: 512,
   920              ASSEMBLE: 1024,
   921              PRINT_HIGH_QUALITY: 2048,
   922            };
   923            t.TextRenderingMode = {
   924              FILL: 0,
   925              STROKE: 1,
   926              FILL_STROKE: 2,
   927              INVISIBLE: 3,
   928              FILL_ADD_TO_PATH: 4,
   929              STROKE_ADD_TO_PATH: 5,
   930              FILL_STROKE_ADD_TO_PATH: 6,
   931              ADD_TO_PATH: 7,
   932              FILL_STROKE_MASK: 3,
   933              ADD_TO_PATH_FLAG: 4,
   934            };
   935            t.ImageKind = { GRAYSCALE_1BPP: 1, RGB_24BPP: 2, RGBA_32BPP: 3 };
   936            t.AnnotationType = {
   937              TEXT: 1,
   938              LINK: 2,
   939              FREETEXT: 3,
   940              LINE: 4,
   941              SQUARE: 5,
   942              CIRCLE: 6,
   943              POLYGON: 7,
   944              POLYLINE: 8,
   945              HIGHLIGHT: 9,
   946              UNDERLINE: 10,
   947              SQUIGGLY: 11,
   948              STRIKEOUT: 12,
   949              STAMP: 13,
   950              CARET: 14,
   951              INK: 15,
   952              POPUP: 16,
   953              FILEATTACHMENT: 17,
   954              SOUND: 18,
   955              MOVIE: 19,
   956              WIDGET: 20,
   957              SCREEN: 21,
   958              PRINTERMARK: 22,
   959              TRAPNET: 23,
   960              WATERMARK: 24,
   961              THREED: 25,
   962              REDACT: 26,
   963            };
   964            t.AnnotationReplyType = { GROUP: "Group", REPLY: "R" };
   965            t.AnnotationFlag = {
   966              INVISIBLE: 1,
   967              HIDDEN: 2,
   968              PRINT: 4,
   969              NOZOOM: 8,
   970              NOROTATE: 16,
   971              NOVIEW: 32,
   972              READONLY: 64,
   973              LOCKED: 128,
   974              TOGGLENOVIEW: 256,
   975              LOCKEDCONTENTS: 512,
   976            };
   977            t.AnnotationFieldFlag = {
   978              READONLY: 1,
   979              REQUIRED: 2,
   980              NOEXPORT: 4,
   981              MULTILINE: 4096,
   982              PASSWORD: 8192,
   983              NOTOGGLETOOFF: 16384,
   984              RADIO: 32768,
   985              PUSHBUTTON: 65536,
   986              COMBO: 131072,
   987              EDIT: 262144,
   988              SORT: 524288,
   989              FILESELECT: 1048576,
   990              MULTISELECT: 2097152,
   991              DONOTSPELLCHECK: 4194304,
   992              DONOTSCROLL: 8388608,
   993              COMB: 16777216,
   994              RICHTEXT: 33554432,
   995              RADIOSINUNISON: 33554432,
   996              COMMITONSELCHANGE: 67108864,
   997            };
   998            t.AnnotationBorderStyleType = {
   999              SOLID: 1,
  1000              DASHED: 2,
  1001              BEVELED: 3,
  1002              INSET: 4,
  1003              UNDERLINE: 5,
  1004            };
  1005            t.AnnotationActionEventType = {
  1006              E: "Mouse Enter",
  1007              X: "Mouse Exit",
  1008              D: "Mouse Down",
  1009              U: "Mouse Up",
  1010              Fo: "Focus",
  1011              Bl: "Blur",
  1012              PO: "PageOpen",
  1013              PC: "PageClose",
  1014              PV: "PageVisible",
  1015              PI: "PageInvisible",
  1016              K: "Keystroke",
  1017              F: "Format",
  1018              V: "Validate",
  1019              C: "Calculate",
  1020            };
  1021            t.DocumentActionEventType = {
  1022              WC: "WillClose",
  1023              WS: "WillSave",
  1024              DS: "DidSave",
  1025              WP: "WillPrint",
  1026              DP: "DidPrint",
  1027            };
  1028            t.PageActionEventType = { O: "PageOpen", C: "PageClose" };
  1029            const r = { ERRORS: 0, WARNINGS: 1, INFOS: 5 };
  1030            t.VerbosityLevel = r;
  1031            t.CMapCompressionType = { NONE: 0, BINARY: 1 };
  1032            t.OPS = {
  1033              dependency: 1,
  1034              setLineWidth: 2,
  1035              setLineCap: 3,
  1036              setLineJoin: 4,
  1037              setMiterLimit: 5,
  1038              setDash: 6,
  1039              setRenderingIntent: 7,
  1040              setFlatness: 8,
  1041              setGState: 9,
  1042              save: 10,
  1043              restore: 11,
  1044              transform: 12,
  1045              moveTo: 13,
  1046              lineTo: 14,
  1047              curveTo: 15,
  1048              curveTo2: 16,
  1049              curveTo3: 17,
  1050              closePath: 18,
  1051              rectangle: 19,
  1052              stroke: 20,
  1053              closeStroke: 21,
  1054              fill: 22,
  1055              eoFill: 23,
  1056              fillStroke: 24,
  1057              eoFillStroke: 25,
  1058              closeFillStroke: 26,
  1059              closeEOFillStroke: 27,
  1060              endPath: 28,
  1061              clip: 29,
  1062              eoClip: 30,
  1063              beginText: 31,
  1064              endText: 32,
  1065              setCharSpacing: 33,
  1066              setWordSpacing: 34,
  1067              setHScale: 35,
  1068              setLeading: 36,
  1069              setFont: 37,
  1070              setTextRenderingMode: 38,
  1071              setTextRise: 39,
  1072              moveText: 40,
  1073              setLeadingMoveText: 41,
  1074              setTextMatrix: 42,
  1075              nextLine: 43,
  1076              showText: 44,
  1077              showSpacedText: 45,
  1078              nextLineShowText: 46,
  1079              nextLineSetSpacingShowText: 47,
  1080              setCharWidth: 48,
  1081              setCharWidthAndBounds: 49,
  1082              setStrokeColorSpace: 50,
  1083              setFillColorSpace: 51,
  1084              setStrokeColor: 52,
  1085              setStrokeColorN: 53,
  1086              setFillColor: 54,
  1087              setFillColorN: 55,
  1088              setStrokeGray: 56,
  1089              setFillGray: 57,
  1090              setStrokeRGBColor: 58,
  1091              setFillRGBColor: 59,
  1092              setStrokeCMYKColor: 60,
  1093              setFillCMYKColor: 61,
  1094              shadingFill: 62,
  1095              beginInlineImage: 63,
  1096              beginImageData: 64,
  1097              endInlineImage: 65,
  1098              paintXObject: 66,
  1099              markPoint: 67,
  1100              markPointProps: 68,
  1101              beginMarkedContent: 69,
  1102              beginMarkedContentProps: 70,
  1103              endMarkedContent: 71,
  1104              beginCompat: 72,
  1105              endCompat: 73,
  1106              paintFormXObjectBegin: 74,
  1107              paintFormXObjectEnd: 75,
  1108              beginGroup: 76,
  1109              endGroup: 77,
  1110              beginAnnotation: 80,
  1111              endAnnotation: 81,
  1112              paintImageMaskXObject: 83,
  1113              paintImageMaskXObjectGroup: 84,
  1114              paintImageXObject: 85,
  1115              paintInlineImageXObject: 86,
  1116              paintInlineImageXObjectGroup: 87,
  1117              paintImageXObjectRepeat: 88,
  1118              paintImageMaskXObjectRepeat: 89,
  1119              paintSolidColorImageMask: 90,
  1120              constructPath: 91,
  1121            };
  1122            t.PasswordResponses = { NEED_PASSWORD: 1, INCORRECT_PASSWORD: 2 };
  1123            let n = r.WARNINGS;
  1124            function warn(e) {
  1125              n >= r.WARNINGS && console.log(`Warning: ${e}`);
  1126            }
  1127            function unreachable(e) {
  1128              throw new Error(e);
  1129            }
  1130            function shadow(e, t, a, r = !1) {
  1131              Object.defineProperty(e, t, {
  1132                value: a,
  1133                enumerable: !r,
  1134                configurable: !0,
  1135                writable: !1,
  1136              });
  1137              return a;
  1138            }
  1139            const i = (function BaseExceptionClosure() {
  1140              function BaseException(e, t) {
  1141                this.constructor === BaseException &&
  1142                  unreachable("Cannot initialize BaseException.");
  1143                this.message = e;
  1144                this.name = t;
  1145              }
  1146              BaseException.prototype = new Error();
  1147              BaseException.constructor = BaseException;
  1148              return BaseException;
  1149            })();
  1150            t.BaseException = i;
  1151            t.PasswordException = class PasswordException extends i {
  1152              constructor(e, t) {
  1153                super(e, "PasswordException");
  1154                this.code = t;
  1155              }
  1156            };
  1157            t.UnknownErrorException = class UnknownErrorException extends i {
  1158              constructor(e, t) {
  1159                super(e, "UnknownErrorException");
  1160                this.details = t;
  1161              }
  1162            };
  1163            t.InvalidPDFException = class InvalidPDFException extends i {
  1164              constructor(e) {
  1165                super(e, "InvalidPDFException");
  1166              }
  1167            };
  1168            t.MissingPDFException = class MissingPDFException extends i {
  1169              constructor(e) {
  1170                super(e, "MissingPDFException");
  1171              }
  1172            };
  1173            t.UnexpectedResponseException = class UnexpectedResponseException extends (
  1174              i
  1175            ) {
  1176              constructor(e, t) {
  1177                super(e, "UnexpectedResponseException");
  1178                this.status = t;
  1179              }
  1180            };
  1181            t.FormatError = class FormatError extends i {
  1182              constructor(e) {
  1183                super(e, "FormatError");
  1184              }
  1185            };
  1186            t.AbortException = class AbortException extends i {
  1187              constructor(e) {
  1188                super(e, "AbortException");
  1189              }
  1190            };
  1191            function bytesToString(e) {
  1192              ("object" == typeof e && void 0 !== e?.length) ||
  1193                unreachable("Invalid argument for bytesToString");
  1194              const t = e.length,
  1195                a = 8192;
  1196              if (t < a) return String.fromCharCode.apply(null, e);
  1197              const r = [];
  1198              for (let n = 0; n < t; n += a) {
  1199                const i = Math.min(n + a, t),
  1200                  s = e.subarray(n, i);
  1201                r.push(String.fromCharCode.apply(null, s));
  1202              }
  1203              return r.join("");
  1204            }
  1205            function stringToBytes(e) {
  1206              "string" != typeof e &&
  1207                unreachable("Invalid argument for stringToBytes");
  1208              const t = e.length,
  1209                a = new Uint8Array(t);
  1210              for (let r = 0; r < t; ++r) a[r] = 255 & e.charCodeAt(r);
  1211              return a;
  1212            }
  1213            t.FeatureTest = class FeatureTest {
  1214              static get isLittleEndian() {
  1215                return shadow(
  1216                  this,
  1217                  "isLittleEndian",
  1218                  (function isLittleEndian() {
  1219                    const e = new Uint8Array(4);
  1220                    e[0] = 1;
  1221                    return 1 === new Uint32Array(e.buffer, 0, 1)[0];
  1222                  })(),
  1223                );
  1224              }
  1225              static get isEvalSupported() {
  1226                return shadow(
  1227                  this,
  1228                  "isEvalSupported",
  1229                  (function isEvalSupported() {
  1230                    try {
  1231                      new Function("");
  1232                      return !0;
  1233                    } catch {
  1234                      return !1;
  1235                    }
  1236                  })(),
  1237                );
  1238              }
  1239              static get isOffscreenCanvasSupported() {
  1240                return shadow(
  1241                  this,
  1242                  "isOffscreenCanvasSupported",
  1243                  "undefined" != typeof OffscreenCanvas,
  1244                );
  1245              }
  1246              static get platform() {
  1247                return "undefined" == typeof navigator
  1248                  ? shadow(this, "platform", { isWin: !1, isMac: !1 })
  1249                  : shadow(this, "platform", {
  1250                      isWin: navigator.platform.includes("Win"),
  1251                      isMac: navigator.platform.includes("Mac"),
  1252                    });
  1253              }
  1254              static get isCSSRoundSupported() {
  1255                return shadow(
  1256                  this,
  1257                  "isCSSRoundSupported",
  1258                  globalThis.CSS?.supports?.("width: round(1.5px, 1px)"),
  1259                );
  1260              }
  1261            };
  1262            const s = [...Array(256).keys()].map((e) =>
  1263              e.toString(16).padStart(2, "0"),
  1264            );
  1265            t.Util = class Util {
  1266              static makeHexColor(e, t, a) {
  1267                return `#${s[e]}${s[t]}${s[a]}`;
  1268              }
  1269              static scaleMinMax(e, t) {
  1270                let a;
  1271                if (e[0]) {
  1272                  if (e[0] < 0) {
  1273                    a = t[0];
  1274                    t[0] = t[1];
  1275                    t[1] = a;
  1276                  }
  1277                  t[0] *= e[0];
  1278                  t[1] *= e[0];
  1279                  if (e[3] < 0) {
  1280                    a = t[2];
  1281                    t[2] = t[3];
  1282                    t[3] = a;
  1283                  }
  1284                  t[2] *= e[3];
  1285                  t[3] *= e[3];
  1286                } else {
  1287                  a = t[0];
  1288                  t[0] = t[2];
  1289                  t[2] = a;
  1290                  a = t[1];
  1291                  t[1] = t[3];
  1292                  t[3] = a;
  1293                  if (e[1] < 0) {
  1294                    a = t[2];
  1295                    t[2] = t[3];
  1296                    t[3] = a;
  1297                  }
  1298                  t[2] *= e[1];
  1299                  t[3] *= e[1];
  1300                  if (e[2] < 0) {
  1301                    a = t[0];
  1302                    t[0] = t[1];
  1303                    t[1] = a;
  1304                  }
  1305                  t[0] *= e[2];
  1306                  t[1] *= e[2];
  1307                }
  1308                t[0] += e[4];
  1309                t[1] += e[4];
  1310                t[2] += e[5];
  1311                t[3] += e[5];
  1312              }
  1313              static transform(e, t) {
  1314                return [
  1315                  e[0] * t[0] + e[2] * t[1],
  1316                  e[1] * t[0] + e[3] * t[1],
  1317                  e[0] * t[2] + e[2] * t[3],
  1318                  e[1] * t[2] + e[3] * t[3],
  1319                  e[0] * t[4] + e[2] * t[5] + e[4],
  1320                  e[1] * t[4] + e[3] * t[5] + e[5],
  1321                ];
  1322              }
  1323              static applyTransform(e, t) {
  1324                return [
  1325                  e[0] * t[0] + e[1] * t[2] + t[4],
  1326                  e[0] * t[1] + e[1] * t[3] + t[5],
  1327                ];
  1328              }
  1329              static applyInverseTransform(e, t) {
  1330                const a = t[0] * t[3] - t[1] * t[2];
  1331                return [
  1332                  (e[0] * t[3] - e[1] * t[2] + t[2] * t[5] - t[4] * t[3]) / a,
  1333                  (-e[0] * t[1] + e[1] * t[0] + t[4] * t[1] - t[5] * t[0]) / a,
  1334                ];
  1335              }
  1336              static getAxialAlignedBoundingBox(e, t) {
  1337                const a = this.applyTransform(e, t),
  1338                  r = this.applyTransform(e.slice(2, 4), t),
  1339                  n = this.applyTransform([e[0], e[3]], t),
  1340                  i = this.applyTransform([e[2], e[1]], t);
  1341                return [
  1342                  Math.min(a[0], r[0], n[0], i[0]),
  1343                  Math.min(a[1], r[1], n[1], i[1]),
  1344                  Math.max(a[0], r[0], n[0], i[0]),
  1345                  Math.max(a[1], r[1], n[1], i[1]),
  1346                ];
  1347              }
  1348              static inverseTransform(e) {
  1349                const t = e[0] * e[3] - e[1] * e[2];
  1350                return [
  1351                  e[3] / t,
  1352                  -e[1] / t,
  1353                  -e[2] / t,
  1354                  e[0] / t,
  1355                  (e[2] * e[5] - e[4] * e[3]) / t,
  1356                  (e[4] * e[1] - e[5] * e[0]) / t,
  1357                ];
  1358              }
  1359              static singularValueDecompose2dScale(e) {
  1360                const t = [e[0], e[2], e[1], e[3]],
  1361                  a = e[0] * t[0] + e[1] * t[2],
  1362                  r = e[0] * t[1] + e[1] * t[3],
  1363                  n = e[2] * t[0] + e[3] * t[2],
  1364                  i = e[2] * t[1] + e[3] * t[3],
  1365                  s = (a + i) / 2,
  1366                  o = Math.sqrt((a + i) ** 2 - 4 * (a * i - n * r)) / 2,
  1367                  c = s + o || 1,
  1368                  l = s - o || 1;
  1369                return [Math.sqrt(c), Math.sqrt(l)];
  1370              }
  1371              static normalizeRect(e) {
  1372                const t = e.slice(0);
  1373                if (e[0] > e[2]) {
  1374                  t[0] = e[2];
  1375                  t[2] = e[0];
  1376                }
  1377                if (e[1] > e[3]) {
  1378                  t[1] = e[3];
  1379                  t[3] = e[1];
  1380                }
  1381                return t;
  1382              }
  1383              static intersect(e, t) {
  1384                const a = Math.max(Math.min(e[0], e[2]), Math.min(t[0], t[2])),
  1385                  r = Math.min(Math.max(e[0], e[2]), Math.max(t[0], t[2]));
  1386                if (a > r) return null;
  1387                const n = Math.max(Math.min(e[1], e[3]), Math.min(t[1], t[3])),
  1388                  i = Math.min(Math.max(e[1], e[3]), Math.max(t[1], t[3]));
  1389                return n > i ? null : [a, n, r, i];
  1390              }
  1391              static bezierBoundingBox(e, t, a, r, n, i, s, o) {
  1392                const c = [],
  1393                  l = [[], []];
  1394                let h, u, d, f, g, p, m, b;
  1395                for (let l = 0; l < 2; ++l) {
  1396                  if (0 === l) {
  1397                    u = 6 * e - 12 * a + 6 * n;
  1398                    h = -3 * e + 9 * a - 9 * n + 3 * s;
  1399                    d = 3 * a - 3 * e;
  1400                  } else {
  1401                    u = 6 * t - 12 * r + 6 * i;
  1402                    h = -3 * t + 9 * r - 9 * i + 3 * o;
  1403                    d = 3 * r - 3 * t;
  1404                  }
  1405                  if (Math.abs(h) < 1e-12) {
  1406                    if (Math.abs(u) < 1e-12) continue;
  1407                    f = -d / u;
  1408                    0 < f && f < 1 && c.push(f);
  1409                  } else {
  1410                    m = u * u - 4 * d * h;
  1411                    b = Math.sqrt(m);
  1412                    if (!(m < 0)) {
  1413                      g = (-u + b) / (2 * h);
  1414                      0 < g && g < 1 && c.push(g);
  1415                      p = (-u - b) / (2 * h);
  1416                      0 < p && p < 1 && c.push(p);
  1417                    }
  1418                  }
  1419                }
  1420                let y,
  1421                  w = c.length;
  1422                const S = w;
  1423                for (; w--; ) {
  1424                  f = c[w];
  1425                  y = 1 - f;
  1426                  l[0][w] =
  1427                    y * y * y * e +
  1428                    3 * y * y * f * a +
  1429                    3 * y * f * f * n +
  1430                    f * f * f * s;
  1431                  l[1][w] =
  1432                    y * y * y * t +
  1433                    3 * y * y * f * r +
  1434                    3 * y * f * f * i +
  1435                    f * f * f * o;
  1436                }
  1437                l[0][S] = e;
  1438                l[1][S] = t;
  1439                l[0][S + 1] = s;
  1440                l[1][S + 1] = o;
  1441                l[0].length = l[1].length = S + 2;
  1442                return [
  1443                  Math.min(...l[0]),
  1444                  Math.min(...l[1]),
  1445                  Math.max(...l[0]),
  1446                  Math.max(...l[1]),
  1447                ];
  1448              }
  1449            };
  1450            const o = [
  1451              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1452              0, 728, 711, 710, 729, 733, 731, 730, 732, 0, 0, 0, 0, 0, 0, 0, 0,
  1453              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1454              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1455              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1456              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8226, 8224,
  1457              8225, 8230, 8212, 8211, 402, 8260, 8249, 8250, 8722, 8240, 8222,
  1458              8220, 8221, 8216, 8217, 8218, 8482, 64257, 64258, 321, 338, 352,
  1459              376, 381, 305, 322, 339, 353, 382, 0, 8364,
  1460            ];
  1461            function stringToUTF8String(e) {
  1462              return decodeURIComponent(escape(e));
  1463            }
  1464            t.PromiseCapability = class PromiseCapability {
  1465              #e = !1;
  1466              constructor() {
  1467                this.promise = new Promise((e, t) => {
  1468                  this.resolve = (t) => {
  1469                    this.#e = !0;
  1470                    e(t);
  1471                  };
  1472                  this.reject = (e) => {
  1473                    this.#e = !0;
  1474                    t(e);
  1475                  };
  1476                });
  1477              }
  1478              get settled() {
  1479                return this.#e;
  1480              }
  1481            };
  1482            let c = null,
  1483              l = null;
  1484            t.AnnotationPrefix = "pdfjs_internal_id_";
  1485          },
  1486          (e, t, a) => {
  1487            Object.defineProperty(t, "__esModule", { value: !0 });
  1488            t.XRefParseException =
  1489              t.XRefEntryException =
  1490              t.ParserEOFException =
  1491              t.PDF_VERSION_REGEXP =
  1492              t.MissingDataException =
  1493                void 0;
  1494            t.arrayBuffersToBytes = function arrayBuffersToBytes(e) {
  1495              const t = e.length;
  1496              if (0 === t) return new Uint8Array(0);
  1497              if (1 === t) return new Uint8Array(e[0]);
  1498              let a = 0;
  1499              for (let r = 0; r < t; r++) a += e[r].byteLength;
  1500              const r = new Uint8Array(a);
  1501              let n = 0;
  1502              for (let a = 0; a < t; a++) {
  1503                const t = new Uint8Array(e[a]);
  1504                r.set(t, n);
  1505                n += t.byteLength;
  1506              }
  1507              return r;
  1508            };
  1509            t.collectActions = function collectActions(e, t, a) {
  1510              const i = Object.create(null),
  1511                s = getInheritableProperty({
  1512                  dict: t,
  1513                  key: "AA",
  1514                  stopWhenFound: !1,
  1515                });
  1516              if (s)
  1517                for (let t = s.length - 1; t >= 0; t--) {
  1518                  const r = s[t];
  1519                  if (r instanceof n.Dict)
  1520                    for (const t of r.getKeys()) {
  1521                      const s = a[t];
  1522                      if (!s) continue;
  1523                      const o = [];
  1524                      _collectJS(r.getRaw(t), e, o, new n.RefSet());
  1525                      o.length > 0 && (i[s] = o);
  1526                    }
  1527                }
  1528              if (t.has("A")) {
  1529                const a = [];
  1530                _collectJS(t.get("A"), e, a, new n.RefSet());
  1531                a.length > 0 && (i.Action = a);
  1532              }
  1533              return (0, r.objectSize)(i) > 0 ? i : null;
  1534            };
  1535            t.encodeToXmlString = function encodeToXmlString(e) {
  1536              const t = [];
  1537              let a = 0;
  1538              for (let r = 0, n = e.length; r < n; r++) {
  1539                const n = e.codePointAt(r);
  1540                if (32 <= n && n <= 126) {
  1541                  const i = o[n];
  1542                  if (i) {
  1543                    a < r && t.push(e.substring(a, r));
  1544                    t.push(i);
  1545                    a = r + 1;
  1546                  }
  1547                } else {
  1548                  a < r && t.push(e.substring(a, r));
  1549                  t.push(`&#x${n.toString(16).toUpperCase()};`);
  1550                  n > 55295 && (n < 57344 || n > 65533) && r++;
  1551                  a = r + 1;
  1552                }
  1553              }
  1554              if (0 === t.length) return e;
  1555              a < e.length && t.push(e.substring(a, e.length));
  1556              return t.join("");
  1557            };
  1558            t.escapePDFName = function escapePDFName(e) {
  1559              const t = [];
  1560              let a = 0;
  1561              for (let r = 0, n = e.length; r < n; r++) {
  1562                const n = e.charCodeAt(r);
  1563                if (
  1564                  n < 33 ||
  1565                  n > 126 ||
  1566                  35 === n ||
  1567                  40 === n ||
  1568                  41 === n ||
  1569                  60 === n ||
  1570                  62 === n ||
  1571                  91 === n ||
  1572                  93 === n ||
  1573                  123 === n ||
  1574                  125 === n ||
  1575                  47 === n ||
  1576                  37 === n
  1577                ) {
  1578                  a < r && t.push(e.substring(a, r));
  1579                  t.push(`#${n.toString(16)}`);
  1580                  a = r + 1;
  1581                }
  1582              }
  1583              if (0 === t.length) return e;
  1584              a < e.length && t.push(e.substring(a, e.length));
  1585              return t.join("");
  1586            };
  1587            t.escapeString = function escapeString(e) {
  1588              return e.replaceAll(/([()\\\n\r])/g, (e) =>
  1589                "\n" === e ? "\\n" : "\r" === e ? "\\r" : `\\${e}`,
  1590              );
  1591            };
  1592            t.getInheritableProperty = getInheritableProperty;
  1593            t.getLookupTableFactory = function getLookupTableFactory(e) {
  1594              let t;
  1595              return function () {
  1596                if (e) {
  1597                  t = Object.create(null);
  1598                  e(t);
  1599                  e = null;
  1600                }
  1601                return t;
  1602              };
  1603            };
  1604            t.getNewAnnotationsMap = function getNewAnnotationsMap(e) {
  1605              if (!e) return null;
  1606              const t = new Map();
  1607              for (const [a, n] of e) {
  1608                if (!a.startsWith(r.AnnotationEditorPrefix)) continue;
  1609                let e = t.get(n.pageIndex);
  1610                if (!e) {
  1611                  e = [];
  1612                  t.set(n.pageIndex, e);
  1613                }
  1614                e.push(n);
  1615              }
  1616              return t.size > 0 ? t : null;
  1617            };
  1618            t.getRotationMatrix = function getRotationMatrix(e, t, a) {
  1619              switch (e) {
  1620                case 90:
  1621                  return [0, 1, -1, 0, t, 0];
  1622                case 180:
  1623                  return [-1, 0, 0, -1, t, a];
  1624                case 270:
  1625                  return [0, -1, 1, 0, 0, a];
  1626                default:
  1627                  throw new Error("Invalid rotation");
  1628              }
  1629            };
  1630            t.isAscii = function isAscii(e) {
  1631              return /^[\x00-\x7F]*$/.test(e);
  1632            };
  1633            t.isWhiteSpace = function isWhiteSpace(e) {
  1634              return 32 === e || 9 === e || 13 === e || 10 === e;
  1635            };
  1636            t.log2 = function log2(e) {
  1637              if (e <= 0) return 0;
  1638              return Math.ceil(Math.log2(e));
  1639            };
  1640            t.numberToString = function numberToString(e) {
  1641              if (Number.isInteger(e)) return e.toString();
  1642              const t = Math.round(100 * e);
  1643              if (t % 100 == 0) return (t / 100).toString();
  1644              if (t % 10 == 0) return e.toFixed(1);
  1645              return e.toFixed(2);
  1646            };
  1647            t.parseXFAPath = function parseXFAPath(e) {
  1648              const t = /(.+)\[(\d+)\]$/;
  1649              return e.split(".").map((e) => {
  1650                const a = e.match(t);
  1651                return a
  1652                  ? { name: a[1], pos: parseInt(a[2], 10) }
  1653                  : { name: e, pos: 0 };
  1654              });
  1655            };
  1656            t.readInt8 = function readInt8(e, t) {
  1657              return (e[t] << 24) >> 24;
  1658            };
  1659            t.readUint16 = function readUint16(e, t) {
  1660              return (e[t] << 8) | e[t + 1];
  1661            };
  1662            t.readUint32 = function readUint32(e, t) {
  1663              return (
  1664                ((e[t] << 24) | (e[t + 1] << 16) | (e[t + 2] << 8) | e[t + 3]) >>>
  1665                0
  1666              );
  1667            };
  1668            t.recoverJsURL = function recoverJsURL(e) {
  1669              const t = new RegExp(
  1670                "^\\s*(" +
  1671                  ["app.launchURL", "window.open", "xfa.host.gotoURL"]
  1672                    .join("|")
  1673                    .replaceAll(".", "\\.") +
  1674                  ")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))",
  1675                "i",
  1676              ).exec(e);
  1677              if (t?.[2]) {
  1678                const e = t[2];
  1679                let a = !1;
  1680                "true" === t[3] && "app.launchURL" === t[1] && (a = !0);
  1681                return { url: e, newWindow: a };
  1682              }
  1683              return null;
  1684            };
  1685            t.stringToUTF16HexString = function stringToUTF16HexString(e) {
  1686              const t = [];
  1687              for (let a = 0, r = e.length; a < r; a++) {
  1688                const r = e.charCodeAt(a);
  1689                t.push(
  1690                  ((r >> 8) & 255).toString(16).padStart(2, "0"),
  1691                  (255 & r).toString(16).padStart(2, "0"),
  1692                );
  1693              }
  1694              return t.join("");
  1695            };
  1696            t.stringToUTF16String = function stringToUTF16String(e, t = !1) {
  1697              const a = [];
  1698              t && a.push("þÿ");
  1699              for (let t = 0, r = e.length; t < r; t++) {
  1700                const r = e.charCodeAt(t);
  1701                a.push(
  1702                  String.fromCharCode((r >> 8) & 255),
  1703                  String.fromCharCode(255 & r),
  1704                );
  1705              }
  1706              return a.join("");
  1707            };
  1708            t.toRomanNumerals = function toRomanNumerals(e, t = !1) {
  1709              (0, r.assert)(
  1710                Number.isInteger(e) && e > 0,
  1711                "The number should be a positive integer.",
  1712              );
  1713              const a = [];
  1714              let n;
  1715              for (; e >= 1e3; ) {
  1716                e -= 1e3;
  1717                a.push("M");
  1718              }
  1719              n = (e / 100) | 0;
  1720              e %= 100;
  1721              a.push(s[n]);
  1722              n = (e / 10) | 0;
  1723              e %= 10;
  1724              a.push(s[10 + n]);
  1725              a.push(s[20 + e]);
  1726              const i = a.join("");
  1727              return t ? i.toLowerCase() : i;
  1728            };
  1729            t.validateCSSFont = function validateCSSFont(e) {
  1730              const t = new Set([
  1731                  "100",
  1732                  "200",
  1733                  "300",
  1734                  "400",
  1735                  "500",
  1736                  "600",
  1737                  "700",
  1738                  "800",
  1739                  "900",
  1740                  "1000",
  1741                  "normal",
  1742                  "bold",
  1743                  "bolder",
  1744                  "lighter",
  1745                ]),
  1746                { fontFamily: a, fontWeight: r, italicAngle: n } = e;
  1747              if (!validateFontName(a, !0)) return !1;
  1748              const i = r ? r.toString() : "";
  1749              e.fontWeight = t.has(i) ? i : "400";
  1750              const s = parseFloat(n);
  1751              e.italicAngle = isNaN(s) || s < -90 || s > 90 ? "14" : n.toString();
  1752              return !0;
  1753            };
  1754            t.validateFontName = validateFontName;
  1755            var r = a(2),
  1756              n = a(4),
  1757              i = a(5);
  1758            t.PDF_VERSION_REGEXP = /^[1-9]\.\d$/;
  1759            class MissingDataException extends r.BaseException {
  1760              constructor(e, t) {
  1761                super(`Missing data [${e}, ${t})`, "MissingDataException");
  1762                this.begin = e;
  1763                this.end = t;
  1764              }
  1765            }
  1766            t.MissingDataException = MissingDataException;
  1767            class ParserEOFException extends r.BaseException {
  1768              constructor(e) {
  1769                super(e, "ParserEOFException");
  1770              }
  1771            }
  1772            t.ParserEOFException = ParserEOFException;
  1773            class XRefEntryException extends r.BaseException {
  1774              constructor(e) {
  1775                super(e, "XRefEntryException");
  1776              }
  1777            }
  1778            t.XRefEntryException = XRefEntryException;
  1779            class XRefParseException extends r.BaseException {
  1780              constructor(e) {
  1781                super(e, "XRefParseException");
  1782              }
  1783            }
  1784            t.XRefParseException = XRefParseException;
  1785            function getInheritableProperty({
  1786              dict: e,
  1787              key: t,
  1788              getArray: a = !1,
  1789              stopWhenFound: r = !0,
  1790            }) {
  1791              let i;
  1792              const s = new n.RefSet();
  1793              for (; e instanceof n.Dict && (!e.objId || !s.has(e.objId)); ) {
  1794                e.objId && s.put(e.objId);
  1795                const n = a ? e.getArray(t) : e.get(t);
  1796                if (void 0 !== n) {
  1797                  if (r) return n;
  1798                  (i ||= []).push(n);
  1799                }
  1800                e = e.get("Parent");
  1801              }
  1802              return i;
  1803            }
  1804            const s = [
  1805              "",
  1806              "C",
  1807              "CC",
  1808              "CCC",
  1809              "CD",
  1810              "D",
  1811              "DC",
  1812              "DCC",
  1813              "DCCC",
  1814              "CM",
  1815              "",
  1816              "X",
  1817              "XX",
  1818              "XXX",
  1819              "XL",
  1820              "L",
  1821              "LX",
  1822              "LXX",
  1823              "LXXX",
  1824              "XC",
  1825              "",
  1826              "I",
  1827              "II",
  1828              "III",
  1829              "IV",
  1830              "V",
  1831              "VI",
  1832              "VII",
  1833              "VIII",
  1834              "IX",
  1835            ];
  1836            function _collectJS(e, t, a, s) {
  1837              if (!e) return;
  1838              let o = null;
  1839              if (e instanceof n.Ref) {
  1840                if (s.has(e)) return;
  1841                o = e;
  1842                s.put(o);
  1843                e = t.fetch(e);
  1844              }
  1845              if (Array.isArray(e)) for (const r of e) _collectJS(r, t, a, s);
  1846              else if (e instanceof n.Dict) {
  1847                if ((0, n.isName)(e.get("S"), "JavaScript")) {
  1848                  const t = e.get("JS");
  1849                  let n;
  1850                  t instanceof i.BaseStream
  1851                    ? (n = t.getString())
  1852                    : "string" == typeof t && (n = t);
  1853                  n &&= (0, r.stringToPDFString)(n).replaceAll("\0", "");
  1854                  n && a.push(n);
  1855                }
  1856                _collectJS(e.getRaw("Next"), t, a, s);
  1857              }
  1858              o && s.remove(o);
  1859            }
  1860            const o = {
  1861              60: "&lt;",
  1862              62: "&gt;",
  1863              38: "&amp;",
  1864              34: "&quot;",
  1865              39: "&apos;",
  1866            };
  1867            function validateFontName(e, t = !1) {
  1868              const a = /^("|').*("|')$/.exec(e);
  1869              if (a && a[1] === a[2]) {
  1870                if (new RegExp(`[^\\\\]${a[1]}`).test(e.slice(1, -1))) {
  1871                  t &&
  1872                    (0, r.warn)(`FontFamily contains unescaped ${a[1]}: ${e}.`);
  1873                  return !1;
  1874                }
  1875              } else
  1876                for (const a of e.split(/[ \t]+/))
  1877                  if (/^(\d|(-(\d|-)))/.test(a) || !/^[\w-\\]+$/.test(a)) {
  1878                    t &&
  1879                      (0, r.warn)(
  1880                        `FontFamily contains invalid <custom-ident>: ${e}.`,
  1881                      );
  1882                    return !1;
  1883                  }
  1884              return !0;
  1885            }
  1886          },
  1887          (e, t, a) => {
  1888            Object.defineProperty(t, "__esModule", { value: !0 });
  1889            t.RefSetCache =
  1890              t.RefSet =
  1891              t.Ref =
  1892              t.Name =
  1893              t.EOF =
  1894              t.Dict =
  1895              t.Cmd =
  1896              t.CIRCULAR_REF =
  1897                void 0;
  1898            t.clearPrimitiveCaches = function clearPrimitiveCaches() {
  1899              s = Object.create(null);
  1900              o = Object.create(null);
  1901              c = Object.create(null);
  1902            };
  1903            t.isCmd = function isCmd(e, t) {
  1904              return e instanceof Cmd && (void 0 === t || e.cmd === t);
  1905            };
  1906            t.isDict = function isDict(e, t) {
  1907              return (
  1908                e instanceof Dict && (void 0 === t || isName(e.get("Type"), t))
  1909              );
  1910            };
  1911            t.isName = isName;
  1912            t.isRefsEqual = function isRefsEqual(e, t) {
  1913              return e.num === t.num && e.gen === t.gen;
  1914            };
  1915            var r = a(2);
  1916            const n = Symbol("CIRCULAR_REF");
  1917            t.CIRCULAR_REF = n;
  1918            const i = Symbol("EOF");
  1919            t.EOF = i;
  1920            let s = Object.create(null),
  1921              o = Object.create(null),
  1922              c = Object.create(null);
  1923            class Name {
  1924              constructor(e) {
  1925                this.name = e;
  1926              }
  1927              static get(e) {
  1928                return (o[e] ||= new Name(e));
  1929              }
  1930            }
  1931            t.Name = Name;
  1932            class Cmd {
  1933              constructor(e) {
  1934                this.cmd = e;
  1935              }
  1936              static get(e) {
  1937                return (s[e] ||= new Cmd(e));
  1938              }
  1939            }
  1940            t.Cmd = Cmd;
  1941            const l = function nonSerializableClosure() {
  1942              return l;
  1943            };
  1944            class Dict {
  1945              constructor(e = null) {
  1946                this._map = Object.create(null);
  1947                this.xref = e;
  1948                this.objId = null;
  1949                this.suppressEncryption = !1;
  1950                this.__nonSerializable__ = l;
  1951              }
  1952              assignXref(e) {
  1953                this.xref = e;
  1954              }
  1955              get size() {
  1956                return Object.keys(this._map).length;
  1957              }
  1958              get(e, t, a) {
  1959                let r = this._map[e];
  1960                if (void 0 === r && void 0 !== t) {
  1961                  r = this._map[t];
  1962                  void 0 === r && void 0 !== a && (r = this._map[a]);
  1963                }
  1964                return r instanceof Ref && this.xref
  1965                  ? this.xref.fetch(r, this.suppressEncryption)
  1966                  : r;
  1967              }
  1968              async getAsync(e, t, a) {
  1969                let r = this._map[e];
  1970                if (void 0 === r && void 0 !== t) {
  1971                  r = this._map[t];
  1972                  void 0 === r && void 0 !== a && (r = this._map[a]);
  1973                }
  1974                return r instanceof Ref && this.xref
  1975                  ? this.xref.fetchAsync(r, this.suppressEncryption)
  1976                  : r;
  1977              }
  1978              getArray(e, t, a) {
  1979                let r = this._map[e];
  1980                if (void 0 === r && void 0 !== t) {
  1981                  r = this._map[t];
  1982                  void 0 === r && void 0 !== a && (r = this._map[a]);
  1983                }
  1984                r instanceof Ref &&
  1985                  this.xref &&
  1986                  (r = this.xref.fetch(r, this.suppressEncryption));
  1987                if (Array.isArray(r)) {
  1988                  r = r.slice();
  1989                  for (let e = 0, t = r.length; e < t; e++)
  1990                    r[e] instanceof Ref &&
  1991                      this.xref &&
  1992                      (r[e] = this.xref.fetch(r[e], this.suppressEncryption));
  1993                }
  1994                return r;
  1995              }
  1996              getRaw(e) {
  1997                return this._map[e];
  1998              }
  1999              getKeys() {
  2000                return Object.keys(this._map);
  2001              }
  2002              getRawValues() {
  2003                return Object.values(this._map);
  2004              }
  2005              set(e, t) {
  2006                this._map[e] = t;
  2007              }
  2008              has(e) {
  2009                return void 0 !== this._map[e];
  2010              }
  2011              forEach(e) {
  2012                for (const t in this._map) e(t, this.get(t));
  2013              }
  2014              static get empty() {
  2015                const e = new Dict(null);
  2016                e.set = (e, t) => {
  2017                  (0, r.unreachable)(
  2018                    "Should not call `set` on the empty dictionary.",
  2019                  );
  2020                };
  2021                return (0, r.shadow)(this, "empty", e);
  2022              }
  2023              static merge({ xref: e, dictArray: t, mergeSubDicts: a = !1 }) {
  2024                const r = new Dict(e),
  2025                  n = new Map();
  2026                for (const e of t)
  2027                  if (e instanceof Dict)
  2028                    for (const [t, r] of Object.entries(e._map)) {
  2029                      let e = n.get(t);
  2030                      if (void 0 === e) {
  2031                        e = [];
  2032                        n.set(t, e);
  2033                      } else if (!(a && r instanceof Dict)) continue;
  2034                      e.push(r);
  2035                    }
  2036                for (const [t, a] of n) {
  2037                  if (1 === a.length || !(a[0] instanceof Dict)) {
  2038                    r._map[t] = a[0];
  2039                    continue;
  2040                  }
  2041                  const n = new Dict(e);
  2042                  for (const e of a)
  2043                    for (const [t, a] of Object.entries(e._map))
  2044                      void 0 === n._map[t] && (n._map[t] = a);
  2045                  n.size > 0 && (r._map[t] = n);
  2046                }
  2047                n.clear();
  2048                return r.size > 0 ? r : Dict.empty;
  2049              }
  2050              clone() {
  2051                const e = new Dict(this.xref);
  2052                for (const t of this.getKeys()) e.set(t, this.getRaw(t));
  2053                return e;
  2054              }
  2055            }
  2056            t.Dict = Dict;
  2057            class Ref {
  2058              constructor(e, t) {
  2059                this.num = e;
  2060                this.gen = t;
  2061              }
  2062              toString() {
  2063                return 0 === this.gen
  2064                  ? `${this.num}R`
  2065                  : `${this.num}R${this.gen}`;
  2066              }
  2067              static fromString(e) {
  2068                const t = c[e];
  2069                if (t) return t;
  2070                const a = /^(\d+)R(\d*)$/.exec(e);
  2071                return a && "0" !== a[1]
  2072                  ? (c[e] = new Ref(parseInt(a[1]), a[2] ? parseInt(a[2]) : 0))
  2073                  : null;
  2074              }
  2075              static get(e, t) {
  2076                const a = 0 === t ? `${e}R` : `${e}R${t}`;
  2077                return (c[a] ||= new Ref(e, t));
  2078              }
  2079            }
  2080            t.Ref = Ref;
  2081            class RefSet {
  2082              constructor(e = null) {
  2083                this._set = new Set(e?._set);
  2084              }
  2085              has(e) {
  2086                return this._set.has(e.toString());
  2087              }
  2088              put(e) {
  2089                this._set.add(e.toString());
  2090              }
  2091              remove(e) {
  2092                this._set.delete(e.toString());
  2093              }
  2094              [Symbol.iterator]() {
  2095                return this._set.values();
  2096              }
  2097              clear() {
  2098                this._set.clear();
  2099              }
  2100            }
  2101            t.RefSet = RefSet;
  2102            class RefSetCache {
  2103              constructor() {
  2104                this._map = new Map();
  2105              }
  2106              get size() {
  2107                return this._map.size;
  2108              }
  2109              get(e) {
  2110                return this._map.get(e.toString());
  2111              }
  2112              has(e) {
  2113                return this._map.has(e.toString());
  2114              }
  2115              put(e, t) {
  2116                this._map.set(e.toString(), t);
  2117              }
  2118              putAlias(e, t) {
  2119                this._map.set(e.toString(), this.get(t));
  2120              }
  2121              [Symbol.iterator]() {
  2122                return this._map.values();
  2123              }
  2124              clear() {
  2125                this._map.clear();
  2126              }
  2127            }
  2128            t.RefSetCache = RefSetCache;
  2129            function isName(e, t) {
  2130              return e instanceof Name && (void 0 === t || e.name === t);
  2131            }
  2132          },
  2133          (e, t, a) => {
  2134            Object.defineProperty(t, "__esModule", { value: !0 });
  2135            t.BaseStream = void 0;
  2136            var r = a(2);
  2137            class BaseStream {
  2138              constructor() {
  2139                this.constructor === BaseStream &&
  2140                  (0, r.unreachable)("Cannot initialize BaseStream.");
  2141              }
  2142              get length() {
  2143                (0, r.unreachable)("Abstract getter `length` accessed");
  2144              }
  2145              get isEmpty() {
  2146                (0, r.unreachable)("Abstract getter `isEmpty` accessed");
  2147              }
  2148              get isDataLoaded() {
  2149                return (0, r.shadow)(this, "isDataLoaded", !0);
  2150              }
  2151              getByte() {
  2152                (0, r.unreachable)("Abstract method `getByte` called");
  2153              }
  2154              getBytes(e) {
  2155                (0, r.unreachable)("Abstract method `getBytes` called");
  2156              }
  2157              peekByte() {
  2158                const e = this.getByte();
  2159                -1 !== e && this.pos--;
  2160                return e;
  2161              }
  2162              peekBytes(e) {
  2163                const t = this.getBytes(e);
  2164                this.pos -= t.length;
  2165                return t;
  2166              }
  2167              getUint16() {
  2168                const e = this.getByte(),
  2169                  t = this.getByte();
  2170                return -1 === e || -1 === t ? -1 : (e << 8) + t;
  2171              }
  2172              getInt32() {
  2173                return (
  2174                  (this.getByte() << 24) +
  2175                  (this.getByte() << 16) +
  2176                  (this.getByte() << 8) +
  2177                  this.getByte()
  2178                );
  2179              }
  2180              getByteRange(e, t) {
  2181                (0, r.unreachable)("Abstract method `getByteRange` called");
  2182              }
  2183              getString(e) {
  2184                return (0, r.bytesToString)(this.getBytes(e));
  2185              }
  2186              skip(e) {
  2187                this.pos += e || 1;
  2188              }
  2189              reset() {
  2190                (0, r.unreachable)("Abstract method `reset` called");
  2191              }
  2192              moveStart() {
  2193                (0, r.unreachable)("Abstract method `moveStart` called");
  2194              }
  2195              makeSubStream(e, t, a = null) {
  2196                (0, r.unreachable)("Abstract method `makeSubStream` called");
  2197              }
  2198              getBaseStreams() {
  2199                return null;
  2200              }
  2201            }
  2202            t.BaseStream = BaseStream;
  2203          },
  2204          (e, t, a) => {
  2205            Object.defineProperty(t, "__esModule", { value: !0 });
  2206            t.NetworkPdfManager = t.LocalPdfManager = void 0;
  2207            var r = a(2),
  2208              n = a(7),
  2209              i = a(3),
  2210              s = a(9),
  2211              o = a(8);
  2212            class BasePdfManager {
  2213              constructor(e) {
  2214                this.constructor === BasePdfManager &&
  2215                  (0, r.unreachable)("Cannot initialize BasePdfManager.");
  2216                this._docBaseUrl = (function parseDocBaseUrl(e) {
  2217                  if (e) {
  2218                    const t = (0, r.createValidAbsoluteUrl)(e);
  2219                    if (t) return t.href;
  2220                    (0, r.warn)(`Invalid absolute docBaseUrl: "${e}".`);
  2221                  }
  2222                  return null;
  2223                })(e.docBaseUrl);
  2224                this._docId = e.docId;
  2225                this._password = e.password;
  2226                this.enableXfa = e.enableXfa;
  2227                e.evaluatorOptions.isOffscreenCanvasSupported &&=
  2228                  r.FeatureTest.isOffscreenCanvasSupported;
  2229                this.evaluatorOptions = e.evaluatorOptions;
  2230              }
  2231              get docId() {
  2232                return this._docId;
  2233              }
  2234              get password() {
  2235                return this._password;
  2236              }
  2237              get docBaseUrl() {
  2238                return this._docBaseUrl;
  2239              }
  2240              get catalog() {
  2241                return this.pdfDocument.catalog;
  2242              }
  2243              ensureDoc(e, t) {
  2244                return this.ensure(this.pdfDocument, e, t);
  2245              }
  2246              ensureXRef(e, t) {
  2247                return this.ensure(this.pdfDocument.xref, e, t);
  2248              }
  2249              ensureCatalog(e, t) {
  2250                return this.ensure(this.pdfDocument.catalog, e, t);
  2251              }
  2252              getPage(e) {
  2253                return this.pdfDocument.getPage(e);
  2254              }
  2255              fontFallback(e, t) {
  2256                return this.pdfDocument.fontFallback(e, t);
  2257              }
  2258              loadXfaFonts(e, t) {
  2259                return this.pdfDocument.loadXfaFonts(e, t);
  2260              }
  2261              loadXfaImages() {
  2262                return this.pdfDocument.loadXfaImages();
  2263              }
  2264              serializeXfaData(e) {
  2265                return this.pdfDocument.serializeXfaData(e);
  2266              }
  2267              cleanup(e = !1) {
  2268                return this.pdfDocument.cleanup(e);
  2269              }
  2270              async ensure(e, t, a) {
  2271                (0, r.unreachable)("Abstract method `ensure` called");
  2272              }
  2273              requestRange(e, t) {
  2274                (0, r.unreachable)("Abstract method `requestRange` called");
  2275              }
  2276              requestLoadedStream(e = !1) {
  2277                (0, r.unreachable)(
  2278                  "Abstract method `requestLoadedStream` called",
  2279                );
  2280              }
  2281              sendProgressiveData(e) {
  2282                (0, r.unreachable)(
  2283                  "Abstract method `sendProgressiveData` called",
  2284                );
  2285              }
  2286              updatePassword(e) {
  2287                this._password = e;
  2288              }
  2289              terminate(e) {
  2290                (0, r.unreachable)("Abstract method `terminate` called");
  2291              }
  2292            }
  2293            t.LocalPdfManager = class LocalPdfManager extends BasePdfManager {
  2294              constructor(e) {
  2295                super(e);
  2296                const t = new o.Stream(e.source);
  2297                this.pdfDocument = new s.PDFDocument(this, t);
  2298                this._loadedStreamPromise = Promise.resolve(t);
  2299              }
  2300              async ensure(e, t, a) {
  2301                const r = e[t];
  2302                return "function" == typeof r ? r.apply(e, a) : r;
  2303              }
  2304              requestRange(e, t) {
  2305                return Promise.resolve();
  2306              }
  2307              requestLoadedStream(e = !1) {
  2308                return this._loadedStreamPromise;
  2309              }
  2310              terminate(e) {}
  2311            };
  2312            t.NetworkPdfManager = class NetworkPdfManager extends BasePdfManager {
  2313              constructor(e) {
  2314                super(e);
  2315                this.streamManager = new n.ChunkedStreamManager(e.source, {
  2316                  msgHandler: e.handler,
  2317                  length: e.length,
  2318                  disableAutoFetch: e.disableAutoFetch,
  2319                  rangeChunkSize: e.rangeChunkSize,
  2320                });
  2321                this.pdfDocument = new s.PDFDocument(
  2322                  this,
  2323                  this.streamManager.getStream(),
  2324                );
  2325              }
  2326              async ensure(e, t, a) {
  2327                try {
  2328                  const r = e[t];
  2329                  return "function" == typeof r ? r.apply(e, a) : r;
  2330                } catch (r) {
  2331                  if (!(r instanceof i.MissingDataException)) throw r;
  2332                  await this.requestRange(r.begin, r.end);
  2333                  return this.ensure(e, t, a);
  2334                }
  2335              }
  2336              requestRange(e, t) {
  2337                return this.streamManager.requestRange(e, t);
  2338              }
  2339              requestLoadedStream(e = !1) {
  2340                return this.streamManager.requestAllChunks(e);
  2341              }
  2342              sendProgressiveData(e) {
  2343                this.streamManager.onReceiveData({ chunk: e });
  2344              }
  2345              terminate(e) {
  2346                this.streamManager.abort(e);
  2347              }
  2348            };
  2349          },
  2350          (e, t, a) => {
  2351            Object.defineProperty(t, "__esModule", { value: !0 });
  2352            t.ChunkedStreamManager = t.ChunkedStream = void 0;
  2353            var r = a(3),
  2354              n = a(2),
  2355              i = a(8);
  2356            class ChunkedStream extends i.Stream {
  2357              constructor(e, t, a) {
  2358                super(new Uint8Array(e), 0, e, null);
  2359                this.chunkSize = t;
  2360                this._loadedChunks = new Set();
  2361                this.numChunks = Math.ceil(e / t);
  2362                this.manager = a;
  2363                this.progressiveDataLength = 0;
  2364                this.lastSuccessfulEnsureByteChunk = -1;
  2365              }
  2366              getMissingChunks() {
  2367                const e = [];
  2368                for (let t = 0, a = this.numChunks; t < a; ++t)
  2369                  this._loadedChunks.has(t) || e.push(t);
  2370                return e;
  2371              }
  2372              get numChunksLoaded() {
  2373                return this._loadedChunks.size;
  2374              }
  2375              get isDataLoaded() {
  2376                return this.numChunksLoaded === this.numChunks;
  2377              }
  2378              onReceiveData(e, t) {
  2379                const a = this.chunkSize;
  2380                if (e % a != 0) throw new Error(`Bad begin offset: ${e}`);
  2381                const r = e + t.byteLength;
  2382                if (r % a != 0 && r !== this.bytes.length)
  2383                  throw new Error(`Bad end offset: ${r}`);
  2384                this.bytes.set(new Uint8Array(t), e);
  2385                const n = Math.floor(e / a),
  2386                  i = Math.floor((r - 1) / a) + 1;
  2387                for (let e = n; e < i; ++e) this._loadedChunks.add(e);
  2388              }
  2389              onReceiveProgressiveData(e) {
  2390                let t = this.progressiveDataLength;
  2391                const a = Math.floor(t / this.chunkSize);
  2392                this.bytes.set(new Uint8Array(e), t);
  2393                t += e.byteLength;
  2394                this.progressiveDataLength = t;
  2395                const r =
  2396                  t >= this.end ? this.numChunks : Math.floor(t / this.chunkSize);
  2397                for (let e = a; e < r; ++e) this._loadedChunks.add(e);
  2398              }
  2399              ensureByte(e) {
  2400                if (e < this.progressiveDataLength) return;
  2401                const t = Math.floor(e / this.chunkSize);
  2402                if (
  2403                  !(t > this.numChunks) &&
  2404                  t !== this.lastSuccessfulEnsureByteChunk
  2405                ) {
  2406                  if (!this._loadedChunks.has(t))
  2407                    throw new r.MissingDataException(e, e + 1);
  2408                  this.lastSuccessfulEnsureByteChunk = t;
  2409                }
  2410              }
  2411              ensureRange(e, t) {
  2412                if (e >= t) return;
  2413                if (t <= this.progressiveDataLength) return;
  2414                const a = Math.floor(e / this.chunkSize);
  2415                if (a > this.numChunks) return;
  2416                const n = Math.min(
  2417                  Math.floor((t - 1) / this.chunkSize) + 1,
  2418                  this.numChunks,
  2419                );
  2420                for (let i = a; i < n; ++i)
  2421                  if (!this._loadedChunks.has(i))
  2422                    throw new r.MissingDataException(e, t);
  2423              }
  2424              nextEmptyChunk(e) {
  2425                const t = this.numChunks;
  2426                for (let a = 0; a < t; ++a) {
  2427                  const r = (e + a) % t;
  2428                  if (!this._loadedChunks.has(r)) return r;
  2429                }
  2430                return null;
  2431              }
  2432              hasChunk(e) {
  2433                return this._loadedChunks.has(e);
  2434              }
  2435              getByte() {
  2436                const e = this.pos;
  2437                if (e >= this.end) return -1;
  2438                e >= this.progressiveDataLength && this.ensureByte(e);
  2439                return this.bytes[this.pos++];
  2440              }
  2441              getBytes(e) {
  2442                const t = this.bytes,
  2443                  a = this.pos,
  2444                  r = this.end;
  2445                if (!e) {
  2446                  r > this.progressiveDataLength && this.ensureRange(a, r);
  2447                  return t.subarray(a, r);
  2448                }
  2449                let n = a + e;
  2450                n > r && (n = r);
  2451                n > this.progressiveDataLength && this.ensureRange(a, n);
  2452                this.pos = n;
  2453                return t.subarray(a, n);
  2454              }
  2455              getByteRange(e, t) {
  2456                e < 0 && (e = 0);
  2457                t > this.end && (t = this.end);
  2458                t > this.progressiveDataLength && this.ensureRange(e, t);
  2459                return this.bytes.subarray(e, t);
  2460              }
  2461              makeSubStream(e, t, a = null) {
  2462                t
  2463                  ? e + t > this.progressiveDataLength &&
  2464                    this.ensureRange(e, e + t)
  2465                  : e >= this.progressiveDataLength && this.ensureByte(e);
  2466                function ChunkedStreamSubstream() {}
  2467                ChunkedStreamSubstream.prototype = Object.create(this);
  2468                ChunkedStreamSubstream.prototype.getMissingChunks = function () {
  2469                  const e = this.chunkSize,
  2470                    t = Math.floor(this.start / e),
  2471                    a = Math.floor((this.end - 1) / e) + 1,
  2472                    r = [];
  2473                  for (let e = t; e < a; ++e)
  2474                    this._loadedChunks.has(e) || r.push(e);
  2475                  return r;
  2476                };
  2477                Object.defineProperty(
  2478                  ChunkedStreamSubstream.prototype,
  2479                  "isDataLoaded",
  2480                  {
  2481                    get() {
  2482                      return (
  2483                        this.numChunksLoaded === this.numChunks ||
  2484                        0 === this.getMissingChunks().length
  2485                      );
  2486                    },
  2487                    configurable: !0,
  2488                  },
  2489                );
  2490                const r = new ChunkedStreamSubstream();
  2491                r.pos = r.start = e;
  2492                r.end = e + t || this.end;
  2493                r.dict = a;
  2494                return r;
  2495              }
  2496              getBaseStreams() {
  2497                return [this];
  2498              }
  2499            }
  2500            t.ChunkedStream = ChunkedStream;
  2501            t.ChunkedStreamManager = class ChunkedStreamManager {
  2502              constructor(e, t) {
  2503                this.length = t.length;
  2504                this.chunkSize = t.rangeChunkSize;
  2505                this.stream = new ChunkedStream(
  2506                  this.length,
  2507                  this.chunkSize,
  2508                  this,
  2509                );
  2510                this.pdfNetworkStream = e;
  2511                this.disableAutoFetch = t.disableAutoFetch;
  2512                this.msgHandler = t.msgHandler;
  2513                this.currRequestId = 0;
  2514                this._chunksNeededByRequest = new Map();
  2515                this._requestsByChunk = new Map();
  2516                this._promisesByRequest = new Map();
  2517                this.progressiveDataLength = 0;
  2518                this.aborted = !1;
  2519                this._loadedStreamCapability = new n.PromiseCapability();
  2520              }
  2521              sendRequest(e, t) {
  2522                const a = this.pdfNetworkStream.getRangeReader(e, t);
  2523                a.isStreamingSupported ||
  2524                  (a.onProgress = this.onProgress.bind(this));
  2525                let n = [],
  2526                  i = 0;
  2527                return new Promise((e, t) => {
  2528                  const readChunk = ({ value: s, done: o }) => {
  2529                    try {
  2530                      if (o) {
  2531                        const t = (0, r.arrayBuffersToBytes)(n);
  2532                        n = null;
  2533                        e(t);
  2534                        return;
  2535                      }
  2536                      i += s.byteLength;
  2537                      a.isStreamingSupported && this.onProgress({ loaded: i });
  2538                      n.push(s);
  2539                      a.read().then(readChunk, t);
  2540                    } catch (e) {
  2541                      t(e);
  2542                    }
  2543                  };
  2544                  a.read().then(readChunk, t);
  2545                }).then((t) => {
  2546                  this.aborted || this.onReceiveData({ chunk: t, begin: e });
  2547                });
  2548              }
  2549              requestAllChunks(e = !1) {
  2550                if (!e) {
  2551                  const e = this.stream.getMissingChunks();
  2552                  this._requestChunks(e);
  2553                }
  2554                return this._loadedStreamCapability.promise;
  2555              }
  2556              _requestChunks(e) {
  2557                const t = this.currRequestId++,
  2558                  a = new Set();
  2559                this._chunksNeededByRequest.set(t, a);
  2560                for (const t of e) this.stream.hasChunk(t) || a.add(t);
  2561                if (0 === a.size) return Promise.resolve();
  2562                const r = new n.PromiseCapability();
  2563                this._promisesByRequest.set(t, r);
  2564                const i = [];
  2565                for (const e of a) {
  2566                  let a = this._requestsByChunk.get(e);
  2567                  if (!a) {
  2568                    a = [];
  2569                    this._requestsByChunk.set(e, a);
  2570                    i.push(e);
  2571                  }
  2572                  a.push(t);
  2573                }
  2574                if (i.length > 0) {
  2575                  const e = this.groupChunks(i);
  2576                  for (const t of e) {
  2577                    const e = t.beginChunk * this.chunkSize,
  2578                      a = Math.min(t.endChunk * this.chunkSize, this.length);
  2579                    this.sendRequest(e, a).catch(r.reject);
  2580                  }
  2581                }
  2582                return r.promise.catch((e) => {
  2583                  if (!this.aborted) throw e;
  2584                });
  2585              }
  2586              getStream() {
  2587                return this.stream;
  2588              }
  2589              requestRange(e, t) {
  2590                t = Math.min(t, this.length);
  2591                const a = this.getBeginChunk(e),
  2592                  r = this.getEndChunk(t),
  2593                  n = [];
  2594                for (let e = a; e < r; ++e) n.push(e);
  2595                return this._requestChunks(n);
  2596              }
  2597              requestRanges(e = []) {
  2598                const t = [];
  2599                for (const a of e) {
  2600                  const e = this.getBeginChunk(a.begin),
  2601                    r = this.getEndChunk(a.end);
  2602                  for (let a = e; a < r; ++a) t.includes(a) || t.push(a);
  2603                }
  2604                t.sort(function (e, t) {
  2605                  return e - t;
  2606                });
  2607                return this._requestChunks(t);
  2608              }
  2609              groupChunks(e) {
  2610                const t = [];
  2611                let a = -1,
  2612                  r = -1;
  2613                for (let n = 0, i = e.length; n < i; ++n) {
  2614                  const i = e[n];
  2615                  a < 0 && (a = i);
  2616                  if (r >= 0 && r + 1 !== i) {
  2617                    t.push({ beginChunk: a, endChunk: r + 1 });
  2618                    a = i;
  2619                  }
  2620                  n + 1 === e.length &&
  2621                    t.push({ beginChunk: a, endChunk: i + 1 });
  2622                  r = i;
  2623                }
  2624                return t;
  2625              }
  2626              onProgress(e) {
  2627                this.msgHandler.send("DocProgress", {
  2628                  loaded: this.stream.numChunksLoaded * this.chunkSize + e.loaded,
  2629                  total: this.length,
  2630                });
  2631              }
  2632              onReceiveData(e) {
  2633                const t = e.chunk,
  2634                  a = void 0 === e.begin,
  2635                  r = a ? this.progressiveDataLength : e.begin,
  2636                  n = r + t.byteLength,
  2637                  i = Math.floor(r / this.chunkSize),
  2638                  s =
  2639                    n < this.length
  2640                      ? Math.floor(n / this.chunkSize)
  2641                      : Math.ceil(n / this.chunkSize);
  2642                if (a) {
  2643                  this.stream.onReceiveProgressiveData(t);
  2644                  this.progressiveDataLength = n;
  2645                } else this.stream.onReceiveData(r, t);
  2646                this.stream.isDataLoaded &&
  2647                  this._loadedStreamCapability.resolve(this.stream);
  2648                const o = [];
  2649                for (let e = i; e < s; ++e) {
  2650                  const t = this._requestsByChunk.get(e);
  2651                  if (t) {
  2652                    this._requestsByChunk.delete(e);
  2653                    for (const a of t) {
  2654                      const t = this._chunksNeededByRequest.get(a);
  2655                      t.has(e) && t.delete(e);
  2656                      t.size > 0 || o.push(a);
  2657                    }
  2658                  }
  2659                }
  2660                if (!this.disableAutoFetch && 0 === this._requestsByChunk.size) {
  2661                  let e;
  2662                  if (1 === this.stream.numChunksLoaded) {
  2663                    const t = this.stream.numChunks - 1;
  2664                    this.stream.hasChunk(t) || (e = t);
  2665                  } else e = this.stream.nextEmptyChunk(s);
  2666                  Number.isInteger(e) && this._requestChunks([e]);
  2667                }
  2668                for (const e of o) {
  2669                  const t = this._promisesByRequest.get(e);
  2670                  this._promisesByRequest.delete(e);
  2671                  t.resolve();
  2672                }
  2673                this.msgHandler.send("DocProgress", {
  2674                  loaded: this.stream.numChunksLoaded * this.chunkSize,
  2675                  total: this.length,
  2676                });
  2677              }
  2678              onError(e) {
  2679                this._loadedStreamCapability.reject(e);
  2680              }
  2681              getBeginChunk(e) {
  2682                return Math.floor(e / this.chunkSize);
  2683              }
  2684              getEndChunk(e) {
  2685                return Math.floor((e - 1) / this.chunkSize) + 1;
  2686              }
  2687              abort(e) {
  2688                this.aborted = !0;
  2689                this.pdfNetworkStream?.cancelAllRequests(e);
  2690                for (const t of this._promisesByRequest.values()) t.reject(e);
  2691              }
  2692            };
  2693          },
  2694          (e, t, a) => {
  2695            Object.defineProperty(t, "__esModule", { value: !0 });
  2696            t.StringStream = t.Stream = t.NullStream = void 0;
  2697            var r = a(5),
  2698              n = a(2);
  2699            class Stream extends r.BaseStream {
  2700              constructor(e, t, a, r) {
  2701                super();
  2702                this.bytes = e instanceof Uint8Array ? e : new Uint8Array(e);
  2703                this.start = t || 0;
  2704                this.pos = this.start;
  2705                this.end = t + a || this.bytes.length;
  2706                this.dict = r;
  2707              }
  2708              get length() {
  2709                return this.end - this.start;
  2710              }
  2711              get isEmpty() {
  2712                return 0 === this.length;
  2713              }
  2714              getByte() {
  2715                return this.pos >= this.end ? -1 : this.bytes[this.pos++];
  2716              }
  2717              getBytes(e) {
  2718                const t = this.bytes,
  2719                  a = this.pos,
  2720                  r = this.end;
  2721                if (!e) return t.subarray(a, r);
  2722                let n = a + e;
  2723                n > r && (n = r);
  2724                this.pos = n;
  2725                return t.subarray(a, n);
  2726              }
  2727              getByteRange(e, t) {
  2728                e < 0 && (e = 0);
  2729                t > this.end && (t = this.end);
  2730                return this.bytes.subarray(e, t);
  2731              }
  2732              reset() {
  2733                this.pos = this.start;
  2734              }
  2735              moveStart() {
  2736                this.start = this.pos;
  2737              }
  2738              makeSubStream(e, t, a = null) {
  2739                return new Stream(this.bytes.buffer, e, t, a);
  2740              }
  2741            }
  2742            t.Stream = Stream;
  2743            t.StringStream = class StringStream extends Stream {
  2744              constructor(e) {
  2745                super((0, n.stringToBytes)(e));
  2746              }
  2747            };
  2748            t.NullStream = class NullStream extends Stream {
  2749              constructor() {
  2750                super(new Uint8Array(0));
  2751              }
  2752            };
  2753          },
  2754          (e, t, a) => {
  2755            Object.defineProperty(t, "__esModule", { value: !0 });
  2756            t.Page = t.PDFDocument = void 0;
  2757            var r = a(2),
  2758              n = a(10),
  2759              i = a(3),
  2760              s = a(4),
  2761              o = a(51),
  2762              c = a(5),
  2763              l = a(74),
  2764              h = a(66),
  2765              u = a(68),
  2766              d = a(102),
  2767              f = a(16),
  2768              g = a(8),
  2769              p = a(76),
  2770              m = a(64),
  2771              b = a(13),
  2772              y = a(18),
  2773              w = a(72),
  2774              S = a(73),
  2775              x = a(77),
  2776              C = a(103);
  2777            const k = [0, 0, 612, 792];
  2778            class Page {
  2779              constructor({
  2780                pdfManager: e,
  2781                xref: t,
  2782                pageIndex: a,
  2783                pageDict: r,
  2784                ref: n,
  2785                globalIdFactory: i,
  2786                fontCache: s,
  2787                builtInCMapCache: o,
  2788                standardFontDataCache: c,
  2789                globalImageCache: l,
  2790                systemFontCache: h,
  2791                nonBlendModesSet: u,
  2792                xfaFactory: d,
  2793              }) {
  2794                this.pdfManager = e;
  2795                this.pageIndex = a;
  2796                this.pageDict = r;
  2797                this.xref = t;
  2798                this.ref = n;
  2799                this.fontCache = s;
  2800                this.builtInCMapCache = o;
  2801                this.standardFontDataCache = c;
  2802                this.globalImageCache = l;
  2803                this.systemFontCache = h;
  2804                this.nonBlendModesSet = u;
  2805                this.evaluatorOptions = e.evaluatorOptions;
  2806                this.resourcesPromise = null;
  2807                this.xfaFactory = d;
  2808                const f = { obj: 0 };
  2809                this._localIdFactory = class extends i {
  2810                  static createObjId() {
  2811                    return `p${a}_${++f.obj}`;
  2812                  }
  2813                  static getPageObjId() {
  2814                    return `p${n.toString()}`;
  2815                  }
  2816                };
  2817              }
  2818              _getInheritableProperty(e, t = !1) {
  2819                const a = (0, i.getInheritableProperty)({
  2820                  dict: this.pageDict,
  2821                  key: e,
  2822                  getArray: t,
  2823                  stopWhenFound: !1,
  2824                });
  2825                return Array.isArray(a)
  2826                  ? 1 !== a.length && a[0] instanceof s.Dict
  2827                    ? s.Dict.merge({ xref: this.xref, dictArray: a })
  2828                    : a[0]
  2829                  : a;
  2830              }
  2831              get content() {
  2832                return this.pageDict.getArray("Contents");
  2833              }
  2834              get resources() {
  2835                const e = this._getInheritableProperty("Resources");
  2836                return (0, r.shadow)(
  2837                  this,
  2838                  "resources",
  2839                  e instanceof s.Dict ? e : s.Dict.empty,
  2840                );
  2841              }
  2842              _getBoundingBox(e) {
  2843                if (this.xfaData) return this.xfaData.bbox;
  2844                let t = this._getInheritableProperty(e, !0);
  2845                if (Array.isArray(t) && 4 === t.length) {
  2846                  t = r.Util.normalizeRect(t);
  2847                  if (t[2] - t[0] > 0 && t[3] - t[1] > 0) return t;
  2848                  (0, r.warn)(`Empty, or invalid, /${e} entry.`);
  2849                }
  2850                return null;
  2851              }
  2852              get mediaBox() {
  2853                return (0, r.shadow)(
  2854                  this,
  2855                  "mediaBox",
  2856                  this._getBoundingBox("MediaBox") || k,
  2857                );
  2858              }
  2859              get cropBox() {
  2860                return (0, r.shadow)(
  2861                  this,
  2862                  "cropBox",
  2863                  this._getBoundingBox("CropBox") || this.mediaBox,
  2864                );
  2865              }
  2866              get userUnit() {
  2867                let e = this.pageDict.get("UserUnit");
  2868                ("number" != typeof e || e <= 0) && (e = 1);
  2869                return (0, r.shadow)(this, "userUnit", e);
  2870              }
  2871              get view() {
  2872                const { cropBox: e, mediaBox: t } = this;
  2873                if (e !== t && !(0, r.isArrayEqual)(e, t)) {
  2874                  const a = r.Util.intersect(e, t);
  2875                  if (a && a[2] - a[0] > 0 && a[3] - a[1] > 0)
  2876                    return (0, r.shadow)(this, "view", a);
  2877                  (0, r.warn)("Empty /CropBox and /MediaBox intersection.");
  2878                }
  2879                return (0, r.shadow)(this, "view", t);
  2880              }
  2881              get rotate() {
  2882                let e = this._getInheritableProperty("Rotate") || 0;
  2883                e % 90 != 0
  2884                  ? (e = 0)
  2885                  : e >= 360
  2886                    ? (e %= 360)
  2887                    : e < 0 && (e = ((e % 360) + 360) % 360);
  2888                return (0, r.shadow)(this, "rotate", e);
  2889              }
  2890              _onSubStreamError(e, t) {
  2891                if (!this.evaluatorOptions.ignoreErrors) throw e;
  2892                (0, r.warn)(
  2893                  `getContentStream - ignoring sub-stream (${t}): "${e}".`,
  2894                );
  2895              }
  2896              getContentStream() {
  2897                return this.pdfManager
  2898                  .ensure(this, "content")
  2899                  .then((e) =>
  2900                    e instanceof c.BaseStream
  2901                      ? e
  2902                      : Array.isArray(e)
  2903                        ? new y.StreamsSequenceStream(
  2904                            e,
  2905                            this._onSubStreamError.bind(this),
  2906                          )
  2907                        : new g.NullStream(),
  2908                  );
  2909              }
  2910              get xfaData() {
  2911                return (0, r.shadow)(
  2912                  this,
  2913                  "xfaData",
  2914                  this.xfaFactory
  2915                    ? { bbox: this.xfaFactory.getBoundingBox(this.pageIndex) }
  2916                    : null,
  2917                );
  2918              }
  2919              #t(e, t, a) {
  2920                for (const n of e)
  2921                  if (n.id) {
  2922                    const e = s.Ref.fromString(n.id);
  2923                    if (!e) {
  2924                      (0, r.warn)(
  2925                        `A non-linked annotation cannot be modified: ${n.id}`,
  2926                      );
  2927                      continue;
  2928                    }
  2929                    if (n.deleted) {
  2930                      t.put(e);
  2931                      continue;
  2932                    }
  2933                    a?.put(e);
  2934                    n.ref = e;
  2935                    delete n.id;
  2936                  }
  2937              }
  2938              async saveNewAnnotations(e, t, a, r) {
  2939                if (this.xfaFactory)
  2940                  throw new Error("XFA: Cannot save new annotations.");
  2941                const i = new b.PartialEvaluator({
  2942                    xref: this.xref,
  2943                    handler: e,
  2944                    pageIndex: this.pageIndex,
  2945                    idFactory: this._localIdFactory,
  2946                    fontCache: this.fontCache,
  2947                    builtInCMapCache: this.builtInCMapCache,
  2948                    standardFontDataCache: this.standardFontDataCache,
  2949                    globalImageCache: this.globalImageCache,
  2950                    systemFontCache: this.systemFontCache,
  2951                    options: this.evaluatorOptions,
  2952                  }),
  2953                  o = new s.RefSet(),
  2954                  c = new s.RefSet();
  2955                this.#t(a, o, c);
  2956                const l = this.pageDict,
  2957                  h = this.annotations.filter(
  2958                    (e) => !(e instanceof s.Ref && o.has(e)),
  2959                  ),
  2960                  u = await n.AnnotationFactory.saveNewAnnotations(i, t, a, r);
  2961                for (const { ref: e } of u.annotations)
  2962                  e instanceof s.Ref && !c.has(e) && h.push(e);
  2963                const d = l.get("Annots");
  2964                l.set("Annots", h);
  2965                const f = [];
  2966                await (0, S.writeObject)(this.ref, l, f, this.xref);
  2967                d && l.set("Annots", d);
  2968                const g = u.dependencies;
  2969                g.push({ ref: this.ref, data: f.join("") }, ...u.annotations);
  2970                return g;
  2971              }
  2972              save(e, t, a) {
  2973                const n = new b.PartialEvaluator({
  2974                  xref: this.xref,
  2975                  handler: e,
  2976                  pageIndex: this.pageIndex,
  2977                  idFactory: this._localIdFactory,
  2978                  fontCache: this.fontCache,
  2979                  builtInCMapCache: this.builtInCMapCache,
  2980                  standardFontDataCache: this.standardFontDataCache,
  2981                  globalImageCache: this.globalImageCache,
  2982                  systemFontCache: this.systemFontCache,
  2983                  options: this.evaluatorOptions,
  2984                });
  2985                return this._parsedAnnotations.then(function (e) {
  2986                  const i = [];
  2987                  for (const s of e)
  2988                    s.mustBePrinted(a) &&
  2989                      i.push(
  2990                        s.save(n, t, a).catch(function (e) {
  2991                          (0, r.warn)(
  2992                            `save - ignoring annotation data during "${t.name}" task: "${e}".`,
  2993                          );
  2994                          return null;
  2995                        }),
  2996                      );
  2997                  return Promise.all(i).then(function (e) {
  2998                    return e.filter((e) => !!e);
  2999                  });
  3000                });
  3001              }
  3002              loadResources(e) {
  3003                this.resourcesPromise ||
  3004                  (this.resourcesPromise = this.pdfManager.ensure(
  3005                    this,
  3006                    "resources",
  3007                  ));
  3008                return this.resourcesPromise.then(() =>
  3009                  new p.ObjectLoader(this.resources, e, this.xref).load(),
  3010                );
  3011              }
  3012              getOperatorList({
  3013                handler: e,
  3014                sink: t,
  3015                task: a,
  3016                intent: o,
  3017                cacheKey: c,
  3018                annotationStorage: l = null,
  3019              }) {
  3020                const h = this.getContentStream(),
  3021                  u = this.loadResources([
  3022                    "ColorSpace",
  3023                    "ExtGState",
  3024                    "Font",
  3025                    "Pattern",
  3026                    "Properties",
  3027                    "Shading",
  3028                    "XObject",
  3029                  ]),
  3030                  d = new b.PartialEvaluator({
  3031                    xref: this.xref,
  3032                    handler: e,
  3033                    pageIndex: this.pageIndex,
  3034                    idFactory: this._localIdFactory,
  3035                    fontCache: this.fontCache,
  3036                    builtInCMapCache: this.builtInCMapCache,
  3037                    standardFontDataCache: this.standardFontDataCache,
  3038                    globalImageCache: this.globalImageCache,
  3039                    systemFontCache: this.systemFontCache,
  3040                    options: this.evaluatorOptions,
  3041                  }),
  3042                  f = this.xfaFactory ? null : (0, i.getNewAnnotationsMap)(l);
  3043                let g = null,
  3044                  p = Promise.resolve(null);
  3045                if (f) {
  3046                  const e = f.get(this.pageIndex);
  3047                  if (e) {
  3048                    const t = this.pdfManager.ensureDoc("annotationGlobals");
  3049                    let i;
  3050                    const o = new Set();
  3051                    for (const { bitmapId: t, bitmap: a } of e)
  3052                      !t || a || o.has(t) || o.add(t);
  3053                    const { isOffscreenCanvasSupported: c } =
  3054                      this.evaluatorOptions;
  3055                    if (o.size > 0) {
  3056                      const t = e.slice();
  3057                      for (const [e, a] of l)
  3058                        e.startsWith(r.AnnotationEditorPrefix) &&
  3059                          a.bitmap &&
  3060                          o.has(a.bitmapId) &&
  3061                          t.push(a);
  3062                      i = n.AnnotationFactory.generateImages(t, this.xref, c);
  3063                    } else
  3064                      i = n.AnnotationFactory.generateImages(e, this.xref, c);
  3065                    g = new s.RefSet();
  3066                    this.#t(e, g, null);
  3067                    p = t.then((t) =>
  3068                      t
  3069                        ? n.AnnotationFactory.printNewAnnotations(t, d, a, e, i)
  3070                        : null,
  3071                    );
  3072                  }
  3073                }
  3074                const y = Promise.all([h, u]).then(([r]) => {
  3075                  const n = new m.OperatorList(o, t);
  3076                  e.send("StartRenderPage", {
  3077                    transparency: d.hasBlendModes(
  3078                      this.resources,
  3079                      this.nonBlendModesSet,
  3080                    ),
  3081                    pageIndex: this.pageIndex,
  3082                    cacheKey: c,
  3083                  });
  3084                  return d
  3085                    .getOperatorList({
  3086                      stream: r,
  3087                      task: a,
  3088                      resources: this.resources,
  3089                      operatorList: n,
  3090                    })
  3091                    .then(function () {
  3092                      return n;
  3093                    });
  3094                });
  3095                return Promise.all([y, this._parsedAnnotations, p]).then(
  3096                  function ([e, t, n]) {
  3097                    if (n) {
  3098                      t = t.filter((e) => !(e.ref && g.has(e.ref)));
  3099                      for (let e = 0, a = n.length; e < a; e++) {
  3100                        const r = n[e];
  3101                        if (r.refToReplace) {
  3102                          const i = t.findIndex(
  3103                            (e) =>
  3104                              e.ref && (0, s.isRefsEqual)(e.ref, r.refToReplace),
  3105                          );
  3106                          if (i >= 0) {
  3107                            t.splice(i, 1, r);
  3108                            n.splice(e--, 1);
  3109                            a--;
  3110                          }
  3111                        }
  3112                      }
  3113                      t = t.concat(n);
  3114                    }
  3115                    if (
  3116                      0 === t.length ||
  3117                      o & r.RenderingIntentFlag.ANNOTATIONS_DISABLE
  3118                    ) {
  3119                      e.flush(!0);
  3120                      return { length: e.totalLength };
  3121                    }
  3122                    const i = !!(o & r.RenderingIntentFlag.ANNOTATIONS_FORMS),
  3123                      c = !!(o & r.RenderingIntentFlag.ANY),
  3124                      h = !!(o & r.RenderingIntentFlag.DISPLAY),
  3125                      u = !!(o & r.RenderingIntentFlag.PRINT),
  3126                      f = [];
  3127                    for (const e of t)
  3128                      (c ||
  3129                        (h && e.mustBeViewed(l, i)) ||
  3130                        (u && e.mustBePrinted(l))) &&
  3131                        f.push(
  3132                          e.getOperatorList(d, a, o, i, l).catch(function (e) {
  3133                            (0, r.warn)(
  3134                              `getOperatorList - ignoring annotation data during "${a.name}" task: "${e}".`,
  3135                            );
  3136                            return {
  3137                              opList: null,
  3138                              separateForm: !1,
  3139                              separateCanvas: !1,
  3140                            };
  3141                          }),
  3142                        );
  3143                    return Promise.all(f).then(function (t) {
  3144                      let a = !1,
  3145                        r = !1;
  3146                      for (const {
  3147                        opList: n,
  3148                        separateForm: i,
  3149                        separateCanvas: s,
  3150                      } of t) {
  3151                        e.addOpList(n);
  3152                        a ||= i;
  3153                        r ||= s;
  3154                      }
  3155                      e.flush(!0, { form: a, canvas: r });
  3156                      return { length: e.totalLength };
  3157                    });
  3158                  },
  3159                );
  3160              }
  3161              extractTextContent({
  3162                handler: e,
  3163                task: t,
  3164                includeMarkedContent: a,
  3165                disableNormalization: r,
  3166                sink: n,
  3167              }) {
  3168                const i = this.getContentStream(),
  3169                  s = this.loadResources([
  3170                    "ExtGState",
  3171                    "Font",
  3172                    "Properties",
  3173                    "XObject",
  3174                  ]);
  3175                return Promise.all([i, s]).then(([i]) =>
  3176                  new b.PartialEvaluator({
  3177                    xref: this.xref,
  3178                    handler: e,
  3179                    pageIndex: this.pageIndex,
  3180                    idFactory: this._localIdFactory,
  3181                    fontCache: this.fontCache,
  3182                    builtInCMapCache: this.builtInCMapCache,
  3183                    standardFontDataCache: this.standardFontDataCache,
  3184                    globalImageCache: this.globalImageCache,
  3185                    systemFontCache: this.systemFontCache,
  3186                    options: this.evaluatorOptions,
  3187                  }).getTextContent({
  3188                    stream: i,
  3189                    task: t,
  3190                    resources: this.resources,
  3191                    includeMarkedContent: a,
  3192                    disableNormalization: r,
  3193                    sink: n,
  3194                    viewBox: this.view,
  3195                  }),
  3196                );
  3197              }
  3198              async getStructTree() {
  3199                const e = await this.pdfManager.ensureCatalog("structTreeRoot");
  3200                if (!e) return null;
  3201                await this._parsedAnnotations;
  3202                return (
  3203                  await this.pdfManager.ensure(this, "_parseStructTree", [e])
  3204                ).serializable;
  3205              }
  3206              _parseStructTree(e) {
  3207                const t = new w.StructTreePage(e, this.pageDict);
  3208                t.parse(this.ref);
  3209                return t;
  3210              }
  3211              async getAnnotationsData(e, t, a) {
  3212                const n = await this._parsedAnnotations;
  3213                if (0 === n.length) return n;
  3214                const i = [],
  3215                  s = [];
  3216                let o;
  3217                const c = !!(a & r.RenderingIntentFlag.ANY),
  3218                  l = !!(a & r.RenderingIntentFlag.DISPLAY),
  3219                  h = !!(a & r.RenderingIntentFlag.PRINT);
  3220                for (const a of n) {
  3221                  const n = c || (l && a.viewable);
  3222                  (n || (h && a.printable)) && i.push(a.data);
  3223                  if (a.hasTextContent && n) {
  3224                    o ||= new b.PartialEvaluator({
  3225                      xref: this.xref,
  3226                      handler: e,
  3227                      pageIndex: this.pageIndex,
  3228                      idFactory: this._localIdFactory,
  3229                      fontCache: this.fontCache,
  3230                      builtInCMapCache: this.builtInCMapCache,
  3231                      standardFontDataCache: this.standardFontDataCache,
  3232                      globalImageCache: this.globalImageCache,
  3233                      systemFontCache: this.systemFontCache,
  3234                      options: this.evaluatorOptions,
  3235                    });
  3236                    s.push(
  3237                      a
  3238                        .extractTextContent(o, t, [-1 / 0, -1 / 0, 1 / 0, 1 / 0])
  3239                        .catch(function (e) {
  3240                          (0, r.warn)(
  3241                            `getAnnotationsData - ignoring textContent during "${t.name}" task: "${e}".`,
  3242                          );
  3243                        }),
  3244                    );
  3245                  }
  3246                }
  3247                await Promise.all(s);
  3248                return i;
  3249              }
  3250              get annotations() {
  3251                const e = this._getInheritableProperty("Annots");
  3252                return (0, r.shadow)(
  3253                  this,
  3254                  "annotations",
  3255                  Array.isArray(e) ? e : [],
  3256                );
  3257              }
  3258              get _parsedAnnotations() {
  3259                const e = this.pdfManager
  3260                  .ensure(this, "annotations")
  3261                  .then(async (e) => {
  3262                    if (0 === e.length) return e;
  3263                    const t =
  3264                      await this.pdfManager.ensureDoc("annotationGlobals");
  3265                    if (!t) return [];
  3266                    const a = [];
  3267                    for (const i of e)
  3268                      a.push(
  3269                        n.AnnotationFactory.create(
  3270                          this.xref,
  3271                          i,
  3272                          t,
  3273                          this._localIdFactory,
  3274                          !1,
  3275                          this.ref,
  3276                        ).catch(function (e) {
  3277                          (0, r.warn)(`_parsedAnnotations: "${e}".`);
  3278                          return null;
  3279                        }),
  3280                      );
  3281                    const i = [];
  3282                    let s;
  3283                    for (const e of await Promise.all(a))
  3284                      e &&
  3285                        (e instanceof n.PopupAnnotation
  3286                          ? (s ||= []).push(e)
  3287                          : i.push(e));
  3288                    s && i.push(...s);
  3289                    return i;
  3290                  });
  3291                return (0, r.shadow)(this, "_parsedAnnotations", e);
  3292              }
  3293              get jsActions() {
  3294                const e = (0, i.collectActions)(
  3295                  this.xref,
  3296                  this.pageDict,
  3297                  r.PageActionEventType,
  3298                );
  3299                return (0, r.shadow)(this, "jsActions", e);
  3300              }
  3301            }
  3302            t.Page = Page;
  3303            const v = new Uint8Array([37, 80, 68, 70, 45]),
  3304              F = new Uint8Array([115, 116, 97, 114, 116, 120, 114, 101, 102]),
  3305              O = new Uint8Array([101, 110, 100, 111, 98, 106]);
  3306            function find(e, t, a = 1024, r = !1) {
  3307              const n = t.length,
  3308                i = e.peekBytes(a),
  3309                s = i.length - n;
  3310              if (s <= 0) return !1;
  3311              if (r) {
  3312                const a = n - 1;
  3313                let r = i.length - 1;
  3314                for (; r >= a; ) {
  3315                  let s = 0;
  3316                  for (; s < n && i[r - s] === t[a - s]; ) s++;
  3317                  if (s >= n) {
  3318                    e.pos += r - a;
  3319                    return !0;
  3320                  }
  3321                  r--;
  3322                }
  3323              } else {
  3324                let a = 0;
  3325                for (; a <= s; ) {
  3326                  let r = 0;
  3327                  for (; r < n && i[a + r] === t[r]; ) r++;
  3328                  if (r >= n) {
  3329                    e.pos += a;
  3330                    return !0;
  3331                  }
  3332                  a++;
  3333                }
  3334              }
  3335              return !1;
  3336            }
  3337            t.PDFDocument = class PDFDocument {
  3338              constructor(e, t) {
  3339                if (t.length <= 0)
  3340                  throw new r.InvalidPDFException(
  3341                    "The PDF file is empty, i.e. its size is zero bytes.",
  3342                  );
  3343                this.pdfManager = e;
  3344                this.stream = t;
  3345                this.xref = new C.XRef(t, e);
  3346                this._pagePromises = new Map();
  3347                this._version = null;
  3348                const a = { font: 0 };
  3349                this._globalIdFactory = class {
  3350                  static getDocId() {
  3351                    return `g_${e.docId}`;
  3352                  }
  3353                  static createFontId() {
  3354                    return "f" + ++a.font;
  3355                  }
  3356                  static createObjId() {
  3357                    (0, r.unreachable)("Abstract method `createObjId` called.");
  3358                  }
  3359                  static getPageObjId() {
  3360                    (0, r.unreachable)("Abstract method `getPageObjId` called.");
  3361                  }
  3362                };
  3363              }
  3364              parse(e) {
  3365                this.xref.parse(e);
  3366                this.catalog = new h.Catalog(this.pdfManager, this.xref);
  3367              }
  3368              get linearization() {
  3369                let e = null;
  3370                try {
  3371                  e = f.Linearization.create(this.stream);
  3372                } catch (e) {
  3373                  if (e instanceof i.MissingDataException) throw e;
  3374                  (0, r.info)(e);
  3375                }
  3376                return (0, r.shadow)(this, "linearization", e);
  3377              }
  3378              get startXRef() {
  3379                const e = this.stream;
  3380                let t = 0;
  3381                if (this.linearization) {
  3382                  e.reset();
  3383                  find(e, O) && (t = e.pos + 6 - e.start);
  3384                } else {
  3385                  const a = 1024,
  3386                    r = F.length;
  3387                  let n = !1,
  3388                    s = e.end;
  3389                  for (; !n && s > 0; ) {
  3390                    s -= a - r;
  3391                    s < 0 && (s = 0);
  3392                    e.pos = s;
  3393                    n = find(e, F, a, !0);
  3394                  }
  3395                  if (n) {
  3396                    e.skip(9);
  3397                    let a;
  3398                    do {
  3399                      a = e.getByte();
  3400                    } while ((0, i.isWhiteSpace)(a));
  3401                    let r = "";
  3402                    for (; a >= 32 && a <= 57; ) {
  3403                      r += String.fromCharCode(a);
  3404                      a = e.getByte();
  3405                    }
  3406                    t = parseInt(r, 10);
  3407                    isNaN(t) && (t = 0);
  3408                  }
  3409                }
  3410                return (0, r.shadow)(this, "startXRef", t);
  3411              }
  3412              checkHeader() {
  3413                const e = this.stream;
  3414                e.reset();
  3415                if (!find(e, v)) return;
  3416                e.moveStart();
  3417                e.skip(v.length);
  3418                let t,
  3419                  a = "";
  3420                for (; (t = e.getByte()) > 32 && a.length < 7; )
  3421                  a += String.fromCharCode(t);
  3422                i.PDF_VERSION_REGEXP.test(a)
  3423                  ? (this._version = a)
  3424                  : (0, r.warn)(`Invalid PDF header version: ${a}`);
  3425              }
  3426              parseStartXRef() {
  3427                this.xref.setStartXRef(this.startXRef);
  3428              }
  3429              get numPages() {
  3430                let e = 0;
  3431                e = this.catalog.hasActualNumPages
  3432                  ? this.catalog.numPages
  3433                  : this.xfaFactory
  3434                    ? this.xfaFactory.getNumPages()
  3435                    : this.linearization
  3436                      ? this.linearization.numPages
  3437                      : this.catalog.numPages;
  3438                return (0, r.shadow)(this, "numPages", e);
  3439              }
  3440              _hasOnlyDocumentSignatures(e, t = 0) {
  3441                return (
  3442                  !!Array.isArray(e) &&
  3443                  e.every((e) => {
  3444                    if (!((e = this.xref.fetchIfRef(e)) instanceof s.Dict))
  3445                      return !1;
  3446                    if (e.has("Kids")) {
  3447                      if (++t > 10) {
  3448                        (0, r.warn)(
  3449                          "_hasOnlyDocumentSignatures: maximum recursion depth reached",
  3450                        );
  3451                        return !1;
  3452                      }
  3453                      return this._hasOnlyDocumentSignatures(e.get("Kids"), t);
  3454                    }
  3455                    const a = (0, s.isName)(e.get("FT"), "Sig"),
  3456                      n = e.get("Rect"),
  3457                      i = Array.isArray(n) && n.every((e) => 0 === e);
  3458                    return a && i;
  3459                  })
  3460                );
  3461              }
  3462              get _xfaStreams() {
  3463                const e = this.catalog.acroForm;
  3464                if (!e) return null;
  3465                const t = e.get("XFA"),
  3466                  a = {
  3467                    "xdp:xdp": "",
  3468                    template: "",
  3469                    datasets: "",
  3470                    config: "",
  3471                    connectionSet: "",
  3472                    localeSet: "",
  3473                    stylesheet: "",
  3474                    "/xdp:xdp": "",
  3475                  };
  3476                if (t instanceof c.BaseStream && !t.isEmpty) {
  3477                  a["xdp:xdp"] = t;
  3478                  return a;
  3479                }
  3480                if (!Array.isArray(t) || 0 === t.length) return null;
  3481                for (let e = 0, r = t.length; e < r; e += 2) {
  3482                  let n;
  3483                  n = 0 === e ? "xdp:xdp" : e === r - 2 ? "/xdp:xdp" : t[e];
  3484                  if (!a.hasOwnProperty(n)) continue;
  3485                  const i = this.xref.fetchIfRef(t[e + 1]);
  3486                  i instanceof c.BaseStream && !i.isEmpty && (a[n] = i);
  3487                }
  3488                return a;
  3489              }
  3490              get xfaDatasets() {
  3491                const e = this._xfaStreams;
  3492                if (!e) return (0, r.shadow)(this, "xfaDatasets", null);
  3493                for (const t of ["datasets", "xdp:xdp"]) {
  3494                  const a = e[t];
  3495                  if (a)
  3496                    try {
  3497                      const e = { [t]: (0, r.stringToUTF8String)(a.getString()) };
  3498                      return (0, r.shadow)(
  3499                        this,
  3500                        "xfaDatasets",
  3501                        new d.DatasetReader(e),
  3502                      );
  3503                    } catch {
  3504                      (0, r.warn)("XFA - Invalid utf-8 string.");
  3505                      break;
  3506                    }
  3507                }
  3508                return (0, r.shadow)(this, "xfaDatasets", null);
  3509              }
  3510              get xfaData() {
  3511                const e = this._xfaStreams;
  3512                if (!e) return null;
  3513                const t = Object.create(null);
  3514                for (const [a, n] of Object.entries(e))
  3515                  if (n)
  3516                    try {
  3517                      t[a] = (0, r.stringToUTF8String)(n.getString());
  3518                    } catch {
  3519                      (0, r.warn)("XFA - Invalid utf-8 string.");
  3520                      return null;
  3521                    }
  3522                return t;
  3523              }
  3524              get xfaFactory() {
  3525                let e;
  3526                this.pdfManager.enableXfa &&
  3527                  this.catalog.needsRendering &&
  3528                  this.formInfo.hasXfa &&
  3529                  !this.formInfo.hasAcroForm &&
  3530                  (e = this.xfaData);
  3531                return (0, r.shadow)(
  3532                  this,
  3533                  "xfaFactory",
  3534                  e ? new x.XFAFactory(e) : null,
  3535                );
  3536              }
  3537              get isPureXfa() {
  3538                return !!this.xfaFactory && this.xfaFactory.isValid();
  3539              }
  3540              get htmlForXfa() {
  3541                return this.xfaFactory ? this.xfaFactory.getPages() : null;
  3542              }
  3543              async loadXfaImages() {
  3544                const e = await this.pdfManager.ensureCatalog("xfaImages");
  3545                if (!e) return;
  3546                const t = e.getKeys(),
  3547                  a = new p.ObjectLoader(e, t, this.xref);
  3548                await a.load();
  3549                const r = new Map();
  3550                for (const a of t) {
  3551                  const t = e.get(a);
  3552                  t instanceof c.BaseStream && r.set(a, t.getBytes());
  3553                }
  3554                this.xfaFactory.setImages(r);
  3555              }
  3556              async loadXfaFonts(e, t) {
  3557                const a = await this.pdfManager.ensureCatalog("acroForm");
  3558                if (!a) return;
  3559                const n = await a.getAsync("DR");
  3560                if (!(n instanceof s.Dict)) return;
  3561                const c = new p.ObjectLoader(n, ["Font"], this.xref);
  3562                await c.load();
  3563                const l = n.get("Font");
  3564                if (!(l instanceof s.Dict)) return;
  3565                const h = Object.assign(
  3566                  Object.create(null),
  3567                  this.pdfManager.evaluatorOptions,
  3568                );
  3569                h.useSystemFonts = !1;
  3570                const u = new b.PartialEvaluator({
  3571                    xref: this.xref,
  3572                    handler: e,
  3573                    pageIndex: -1,
  3574                    idFactory: this._globalIdFactory,
  3575                    fontCache: this.catalog.fontCache,
  3576                    builtInCMapCache: this.catalog.builtInCMapCache,
  3577                    standardFontDataCache: this.catalog.standardFontDataCache,
  3578                    options: h,
  3579                  }),
  3580                  d = new m.OperatorList(),
  3581                  f = [],
  3582                  g = {
  3583                    get font() {
  3584                      return f.at(-1);
  3585                    },
  3586                    set font(e) {
  3587                      f.push(e);
  3588                    },
  3589                    clone() {
  3590                      return this;
  3591                    },
  3592                  },
  3593                  y = new Map();
  3594                l.forEach((e, t) => {
  3595                  y.set(e, t);
  3596                });
  3597                const w = [];
  3598                for (const [e, a] of y) {
  3599                  const o = a.get("FontDescriptor");
  3600                  if (!(o instanceof s.Dict)) continue;
  3601                  let c = o.get("FontFamily");
  3602                  c = c.replaceAll(/[ ]+(\d)/g, "$1");
  3603                  const l = {
  3604                    fontFamily: c,
  3605                    fontWeight: o.get("FontWeight"),
  3606                    italicAngle: -o.get("ItalicAngle"),
  3607                  };
  3608                  (0, i.validateCSSFont)(l) &&
  3609                    w.push(
  3610                      u
  3611                        .handleSetFont(
  3612                          n,
  3613                          [s.Name.get(e), 1],
  3614                          null,
  3615                          d,
  3616                          t,
  3617                          g,
  3618                          null,
  3619                          l,
  3620                        )
  3621                        .catch(function (e) {
  3622                          (0, r.warn)(`loadXfaFonts: "${e}".`);
  3623                          return null;
  3624                        }),
  3625                    );
  3626                }
  3627                await Promise.all(w);
  3628                const S = this.xfaFactory.setFonts(f);
  3629                if (!S) return;
  3630                h.ignoreErrors = !0;
  3631                w.length = 0;
  3632                f.length = 0;
  3633                const x = new Set();
  3634                for (const e of S)
  3635                  (0, o.getXfaFontName)(`${e}-Regular`) || x.add(e);
  3636                x.size && S.push("PdfJS-Fallback");
  3637                for (const e of S)
  3638                  if (!x.has(e))
  3639                    for (const a of [
  3640                      { name: "Regular", fontWeight: 400, italicAngle: 0 },
  3641                      { name: "Bold", fontWeight: 700, italicAngle: 0 },
  3642                      { name: "Italic", fontWeight: 400, italicAngle: 12 },
  3643                      { name: "BoldItalic", fontWeight: 700, italicAngle: 12 },
  3644                    ]) {
  3645                      const i = `${e}-${a.name}`,
  3646                        c = (0, o.getXfaFontDict)(i);
  3647                      w.push(
  3648                        u
  3649                          .handleSetFont(
  3650                            n,
  3651                            [s.Name.get(i), 1],
  3652                            null,
  3653                            d,
  3654                            t,
  3655                            g,
  3656                            c,
  3657                            {
  3658                              fontFamily: e,
  3659                              fontWeight: a.fontWeight,
  3660                              italicAngle: a.italicAngle,
  3661                            },
  3662                          )
  3663                          .catch(function (e) {
  3664                            (0, r.warn)(`loadXfaFonts: "${e}".`);
  3665                            return null;
  3666                          }),
  3667                      );
  3668                    }
  3669                await Promise.all(w);
  3670                this.xfaFactory.appendFonts(f, x);
  3671              }
  3672              async serializeXfaData(e) {
  3673                return this.xfaFactory ? this.xfaFactory.serializeData(e) : null;
  3674              }
  3675              get version() {
  3676                return this.catalog.version || this._version;
  3677              }
  3678              get formInfo() {
  3679                const e = {
  3680                    hasFields: !1,
  3681                    hasAcroForm: !1,
  3682                    hasXfa: !1,
  3683                    hasSignatures: !1,
  3684                  },
  3685                  t = this.catalog.acroForm;
  3686                if (!t) return (0, r.shadow)(this, "formInfo", e);
  3687                try {
  3688                  const a = t.get("Fields"),
  3689                    r = Array.isArray(a) && a.length > 0;
  3690                  e.hasFields = r;
  3691                  const n = t.get("XFA");
  3692                  e.hasXfa =
  3693                    (Array.isArray(n) && n.length > 0) ||
  3694                    (n instanceof c.BaseStream && !n.isEmpty);
  3695                  const i = !!(1 & t.get("SigFlags")),
  3696                    s = i && this._hasOnlyDocumentSignatures(a);
  3697                  e.hasAcroForm = r && !s;
  3698                  e.hasSignatures = i;
  3699                } catch (e) {
  3700                  if (e instanceof i.MissingDataException) throw e;
  3701                  (0, r.warn)(`Cannot fetch form information: "${e}".`);
  3702                }
  3703                return (0, r.shadow)(this, "formInfo", e);
  3704              }
  3705              get documentInfo() {
  3706                const e = {
  3707                  PDFFormatVersion: this.version,
  3708                  Language: this.catalog.lang,
  3709                  EncryptFilterName: this.xref.encrypt
  3710                    ? this.xref.encrypt.filterName
  3711                    : null,
  3712                  IsLinearized: !!this.linearization,
  3713                  IsAcroFormPresent: this.formInfo.hasAcroForm,
  3714                  IsXFAPresent: this.formInfo.hasXfa,
  3715                  IsCollectionPresent: !!this.catalog.collection,
  3716                  IsSignaturesPresent: this.formInfo.hasSignatures,
  3717                };
  3718                let t;
  3719                try {
  3720                  t = this.xref.trailer.get("Info");
  3721                } catch (e) {
  3722                  if (e instanceof i.MissingDataException) throw e;
  3723                  (0, r.info)("The document information dictionary is invalid.");
  3724                }
  3725                if (!(t instanceof s.Dict))
  3726                  return (0, r.shadow)(this, "documentInfo", e);
  3727                for (const a of t.getKeys()) {
  3728                  const n = t.get(a);
  3729                  switch (a) {
  3730                    case "Title":
  3731                    case "Author":
  3732                    case "Subject":
  3733                    case "Keywords":
  3734                    case "Creator":
  3735                    case "Producer":
  3736                    case "CreationDate":
  3737                    case "ModDate":
  3738                      if ("string" == typeof n) {
  3739                        e[a] = (0, r.stringToPDFString)(n);
  3740                        continue;
  3741                      }
  3742                      break;
  3743                    case "Trapped":
  3744                      if (n instanceof s.Name) {
  3745                        e[a] = n;
  3746                        continue;
  3747                      }
  3748                      break;
  3749                    default:
  3750                      let t;
  3751                      switch (typeof n) {
  3752                        case "string":
  3753                          t = (0, r.stringToPDFString)(n);
  3754                          break;
  3755                        case "number":
  3756                        case "boolean":
  3757                          t = n;
  3758                          break;
  3759                        default:
  3760                          n instanceof s.Name && (t = n);
  3761                      }
  3762                      if (void 0 === t) {
  3763                        (0, r.warn)(
  3764                          `Bad value, for custom key "${a}", in Info: ${n}.`,
  3765                        );
  3766                        continue;
  3767                      }
  3768                      e.Custom || (e.Custom = Object.create(null));
  3769                      e.Custom[a] = t;
  3770                      continue;
  3771                  }
  3772                  (0, r.warn)(`Bad value, for key "${a}", in Info: ${n}.`);
  3773                }
  3774                return (0, r.shadow)(this, "documentInfo", e);
  3775              }
  3776              get fingerprints() {
  3777                function validate(e) {
  3778                  return (
  3779                    "string" == typeof e &&
  3780                    e.length > 0 &&
  3781                    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" !== e
  3782                  );
  3783                }
  3784                function hexString(e) {
  3785                  const t = [];
  3786                  for (const a of e) {
  3787                    const e = a.toString(16);
  3788                    t.push(e.padStart(2, "0"));
  3789                  }
  3790                  return t.join("");
  3791                }
  3792                const e = this.xref.trailer.get("ID");
  3793                let t, a;
  3794                if (Array.isArray(e) && validate(e[0])) {
  3795                  t = (0, r.stringToBytes)(e[0]);
  3796                  e[1] !== e[0] &&
  3797                    validate(e[1]) &&
  3798                    (a = (0, r.stringToBytes)(e[1]));
  3799                } else
  3800                  t = (0, l.calculateMD5)(
  3801                    this.stream.getByteRange(0, 1024),
  3802                    0,
  3803                    1024,
  3804                  );
  3805                return (0, r.shadow)(this, "fingerprints", [
  3806                  hexString(t),
  3807                  a ? hexString(a) : null,
  3808                ]);
  3809              }
  3810              async _getLinearizationPage(e) {
  3811                const { catalog: t, linearization: a, xref: n } = this,
  3812                  i = s.Ref.get(a.objectNumberFirst, 0);
  3813                try {
  3814                  const e = await n.fetchAsync(i);
  3815                  if (e instanceof s.Dict) {
  3816                    let a = e.getRaw("Type");
  3817                    a instanceof s.Ref && (a = await n.fetchAsync(a));
  3818                    if (
  3819                      (0, s.isName)(a, "Page") ||
  3820                      (!e.has("Type") && !e.has("Kids"))
  3821                    ) {
  3822                      t.pageKidsCountCache.has(i) ||
  3823                        t.pageKidsCountCache.put(i, 1);
  3824                      t.pageIndexCache.has(i) || t.pageIndexCache.put(i, 0);
  3825                      return [e, i];
  3826                    }
  3827                  }
  3828                  throw new r.FormatError(
  3829                    "The Linearization dictionary doesn't point to a valid Page dictionary.",
  3830                  );
  3831                } catch (a) {
  3832                  (0, r.warn)(`_getLinearizationPage: "${a.message}".`);
  3833                  return t.getPageDict(e);
  3834                }
  3835              }
  3836              getPage(e) {
  3837                const t = this._pagePromises.get(e);
  3838                if (t) return t;
  3839                const { catalog: a, linearization: r, xfaFactory: n } = this;
  3840                let i;
  3841                i = n
  3842                  ? Promise.resolve([s.Dict.empty, null])
  3843                  : r?.pageFirst === e
  3844                    ? this._getLinearizationPage(e)
  3845                    : a.getPageDict(e);
  3846                i = i.then(
  3847                  ([t, r]) =>
  3848                    new Page({
  3849                      pdfManager: this.pdfManager,
  3850                      xref: this.xref,
  3851                      pageIndex: e,
  3852                      pageDict: t,
  3853                      ref: r,
  3854                      globalIdFactory: this._globalIdFactory,
  3855                      fontCache: a.fontCache,
  3856                      builtInCMapCache: a.builtInCMapCache,
  3857                      standardFontDataCache: a.standardFontDataCache,
  3858                      globalImageCache: a.globalImageCache,
  3859                      systemFontCache: a.systemFontCache,
  3860                      nonBlendModesSet: a.nonBlendModesSet,
  3861                      xfaFactory: n,
  3862                    }),
  3863                );
  3864                this._pagePromises.set(e, i);
  3865                return i;
  3866              }
  3867              async checkFirstPage(e = !1) {
  3868                if (!e)
  3869                  try {
  3870                    await this.getPage(0);
  3871                  } catch (e) {
  3872                    if (e instanceof i.XRefEntryException) {
  3873                      this._pagePromises.delete(0);
  3874                      await this.cleanup();
  3875                      throw new i.XRefParseException();
  3876                    }
  3877                  }
  3878              }
  3879              async checkLastPage(e = !1) {
  3880                const { catalog: t, pdfManager: a } = this;
  3881                t.setActualNumPages();
  3882                let n;
  3883                try {
  3884                  await Promise.all([
  3885                    a.ensureDoc("xfaFactory"),
  3886                    a.ensureDoc("linearization"),
  3887                    a.ensureCatalog("numPages"),
  3888                  ]);
  3889                  if (this.xfaFactory) return;
  3890                  n = this.linearization
  3891                    ? this.linearization.numPages
  3892                    : t.numPages;
  3893                  if (!Number.isInteger(n))
  3894                    throw new r.FormatError("Page count is not an integer.");
  3895                  if (n <= 1) return;
  3896                  await this.getPage(n - 1);
  3897                } catch (s) {
  3898                  this._pagePromises.delete(n - 1);
  3899                  await this.cleanup();
  3900                  if (s instanceof i.XRefEntryException && !e)
  3901                    throw new i.XRefParseException();
  3902                  (0, r.warn)(
  3903                    `checkLastPage - invalid /Pages tree /Count: ${n}.`,
  3904                  );
  3905                  let o;
  3906                  try {
  3907                    o = await t.getAllPageDicts(e);
  3908                  } catch (a) {
  3909                    if (a instanceof i.XRefEntryException && !e)
  3910                      throw new i.XRefParseException();
  3911                    t.setActualNumPages(1);
  3912                    return;
  3913                  }
  3914                  for (const [e, [r, n]] of o) {
  3915                    let i;
  3916                    if (r instanceof Error) {
  3917                      i = Promise.reject(r);
  3918                      i.catch(() => {});
  3919                    } else
  3920                      i = Promise.resolve(
  3921                        new Page({
  3922                          pdfManager: a,
  3923                          xref: this.xref,
  3924                          pageIndex: e,
  3925                          pageDict: r,
  3926                          ref: n,
  3927                          globalIdFactory: this._globalIdFactory,
  3928                          fontCache: t.fontCache,
  3929                          builtInCMapCache: t.builtInCMapCache,
  3930                          standardFontDataCache: t.standardFontDataCache,
  3931                          globalImageCache: t.globalImageCache,
  3932                          systemFontCache: t.systemFontCache,
  3933                          nonBlendModesSet: t.nonBlendModesSet,
  3934                          xfaFactory: null,
  3935                        }),
  3936                      );
  3937                    this._pagePromises.set(e, i);
  3938                  }
  3939                  t.setActualNumPages(o.size);
  3940                }
  3941              }
  3942              fontFallback(e, t) {
  3943                return this.catalog.fontFallback(e, t);
  3944              }
  3945              async cleanup(e = !1) {
  3946                return this.catalog
  3947                  ? this.catalog.cleanup(e)
  3948                  : (0, u.clearGlobalCaches)();
  3949              }
  3950              #a(e, t, a, i) {
  3951                const s = this.xref.fetchIfRef(t);
  3952                if (s.has("T")) {
  3953                  const t = (0, r.stringToPDFString)(s.get("T"));
  3954                  e = "" === e ? t : `${e}.${t}`;
  3955                }
  3956                a.has(e) || a.set(e, []);
  3957                a.get(e).push(
  3958                  n.AnnotationFactory.create(
  3959                    this.xref,
  3960                    t,
  3961                    i,
  3962                    this._localIdFactory,
  3963                    !0,
  3964                    null,
  3965                  )
  3966                    .then((e) => e?.getFieldObject())
  3967                    .catch(function (e) {
  3968                      (0, r.warn)(`#collectFieldObjects: "${e}".`);
  3969                      return null;
  3970                    }),
  3971                );
  3972                if (s.has("Kids"))
  3973                  for (const t of s.get("Kids")) this.#a(e, t, a, i);
  3974              }
  3975              get fieldObjects() {
  3976                if (!this.formInfo.hasFields)
  3977                  return (0, r.shadow)(
  3978                    this,
  3979                    "fieldObjects",
  3980                    Promise.resolve(null),
  3981                  );
  3982                const e = this.pdfManager
  3983                  .ensureDoc("annotationGlobals")
  3984                  .then(async (e) => {
  3985                    if (!e) return null;
  3986                    const t = Object.create(null),
  3987                      a = new Map();
  3988                    for (const t of this.catalog.acroForm.get("Fields"))
  3989                      this.#a("", t, a, e);
  3990                    const r = [];
  3991                    for (const [e, n] of a)
  3992                      r.push(
  3993                        Promise.all(n).then((a) => {
  3994                          (a = a.filter((e) => !!e)).length > 0 && (t[e] = a);
  3995                        }),
  3996                      );
  3997                    await Promise.all(r);
  3998                    return t;
  3999                  });
  4000                return (0, r.shadow)(this, "fieldObjects", e);
  4001              }
  4002              get hasJSActions() {
  4003                const e = this.pdfManager.ensureDoc("_parseHasJSActions");
  4004                return (0, r.shadow)(this, "hasJSActions", e);
  4005              }
  4006              async _parseHasJSActions() {
  4007                const [e, t] = await Promise.all([
  4008                  this.pdfManager.ensureCatalog("jsActions"),
  4009                  this.pdfManager.ensureDoc("fieldObjects"),
  4010                ]);
  4011                return (
  4012                  !!e ||
  4013                  (!!t &&
  4014                    Object.values(t).some((e) =>
  4015                      e.some((e) => null !== e.actions),
  4016                    ))
  4017                );
  4018              }
  4019              get calculationOrderIds() {
  4020                const e = this.catalog.acroForm;
  4021                if (!e?.has("CO"))
  4022                  return (0, r.shadow)(this, "calculationOrderIds", null);
  4023                const t = e.get("CO");
  4024                if (!Array.isArray(t) || 0 === t.length)
  4025                  return (0, r.shadow)(this, "calculationOrderIds", null);
  4026                const a = [];
  4027                for (const e of t) e instanceof s.Ref && a.push(e.toString());
  4028                return 0 === a.length
  4029                  ? (0, r.shadow)(this, "calculationOrderIds", null)
  4030                  : (0, r.shadow)(this, "calculationOrderIds", a);
  4031              }
  4032              get annotationGlobals() {
  4033                return (0, r.shadow)(
  4034                  this,
  4035                  "annotationGlobals",
  4036                  n.AnnotationFactory.createGlobals(this.pdfManager),
  4037                );
  4038              }
  4039            };
  4040          },
  4041          (e, t, a) => {
  4042            Object.defineProperty(t, "__esModule", { value: !0 });
  4043            t.PopupAnnotation =
  4044              t.MarkupAnnotation =
  4045              t.AnnotationFactory =
  4046              t.AnnotationBorderStyle =
  4047              t.Annotation =
  4048                void 0;
  4049            t.getQuadPoints = getQuadPoints;
  4050            var r = a(2),
  4051              n = a(3),
  4052              i = a(11),
  4053              s = a(4),
  4054              o = a(8),
  4055              c = a(5),
  4056              l = a(60),
  4057              h = a(66),
  4058              u = a(12),
  4059              d = a(69),
  4060              f = a(26),
  4061              g = a(76),
  4062              p = a(64),
  4063              m = a(73),
  4064              b = a(77);
  4065            t.AnnotationFactory = class AnnotationFactory {
  4066              static createGlobals(e) {
  4067                return Promise.all([
  4068                  e.ensureCatalog("acroForm"),
  4069                  e.ensureDoc("xfaDatasets"),
  4070                  e.ensureCatalog("structTreeRoot"),
  4071                  e.ensureCatalog("baseUrl"),
  4072                  e.ensureCatalog("attachments"),
  4073                ]).then(
  4074                  ([t, a, r, n, i]) => ({
  4075                    pdfManager: e,
  4076                    acroForm: t instanceof s.Dict ? t : s.Dict.empty,
  4077                    xfaDatasets: a,
  4078                    structTreeRoot: r,
  4079                    baseUrl: n,
  4080                    attachments: i,
  4081                  }),
  4082                  (e) => {
  4083                    (0, r.warn)(`createGlobals: "${e}".`);
  4084                    return null;
  4085                  },
  4086                );
  4087              }
  4088              static async create(e, t, a, r, n, i) {
  4089                const s = n ? await this._getPageIndex(e, t, a.pdfManager) : null;
  4090                return a.pdfManager.ensure(this, "_create", [
  4091                  e,
  4092                  t,
  4093                  a,
  4094                  r,
  4095                  n,
  4096                  s,
  4097                  i,
  4098                ]);
  4099              }
  4100              static _create(e, t, a, i, o = !1, c = null, l = null) {
  4101                const h = e.fetchIfRef(t);
  4102                if (!(h instanceof s.Dict)) return;
  4103                const { acroForm: u, pdfManager: d } = a,
  4104                  f =
  4105                    t instanceof s.Ref
  4106                      ? t.toString()
  4107                      : `annot_${i.createObjId()}`;
  4108                let g = h.get("Subtype");
  4109                g = g instanceof s.Name ? g.name : null;
  4110                const p = {
  4111                  xref: e,
  4112                  ref: t,
  4113                  dict: h,
  4114                  subtype: g,
  4115                  id: f,
  4116                  annotationGlobals: a,
  4117                  collectFields: o,
  4118                  needAppearances: !o && !0 === u.get("NeedAppearances"),
  4119                  pageIndex: c,
  4120                  evaluatorOptions: d.evaluatorOptions,
  4121                  pageRef: l,
  4122                };
  4123                switch (g) {
  4124                  case "Link":
  4125                    return new LinkAnnotation(p);
  4126                  case "Text":
  4127                    return new TextAnnotation(p);
  4128                  case "Widget":
  4129                    let e = (0, n.getInheritableProperty)({ dict: h, key: "FT" });
  4130                    e = e instanceof s.Name ? e.name : null;
  4131                    switch (e) {
  4132                      case "Tx":
  4133                        return new TextWidgetAnnotation(p);
  4134                      case "Btn":
  4135                        return new ButtonWidgetAnnotation(p);
  4136                      case "Ch":
  4137                        return new ChoiceWidgetAnnotation(p);
  4138                      case "Sig":
  4139                        return new SignatureWidgetAnnotation(p);
  4140                    }
  4141                    (0, r.warn)(
  4142                      `Unimplemented widget field type "${e}", falling back to base field type.`,
  4143                    );
  4144                    return new WidgetAnnotation(p);
  4145                  case "Popup":
  4146                    return new PopupAnnotation(p);
  4147                  case "FreeText":
  4148                    return new FreeTextAnnotation(p);
  4149                  case "Line":
  4150                    return new LineAnnotation(p);
  4151                  case "Square":
  4152                    return new SquareAnnotation(p);
  4153                  case "Circle":
  4154                    return new CircleAnnotation(p);
  4155                  case "PolyLine":
  4156                    return new PolylineAnnotation(p);
  4157                  case "Polygon":
  4158                    return new PolygonAnnotation(p);
  4159                  case "Caret":
  4160                    return new CaretAnnotation(p);
  4161                  case "Ink":
  4162                    return new InkAnnotation(p);
  4163                  case "Highlight":
  4164                    return new HighlightAnnotation(p);
  4165                  case "Underline":
  4166                    return new UnderlineAnnotation(p);
  4167                  case "Squiggly":
  4168                    return new SquigglyAnnotation(p);
  4169                  case "StrikeOut":
  4170                    return new StrikeOutAnnotation(p);
  4171                  case "Stamp":
  4172                    return new StampAnnotation(p);
  4173                  case "FileAttachment":
  4174                    return new FileAttachmentAnnotation(p);
  4175                  default:
  4176                    o ||
  4177                      (g
  4178                        ? (0, r.warn)(
  4179                            `Unimplemented annotation type "${g}", falling back to base annotation.`,
  4180                          )
  4181                        : (0, r.warn)(
  4182                            "Annotation is missing the required /Subtype.",
  4183                          ));
  4184                    return new Annotation(p);
  4185                }
  4186              }
  4187              static async _getPageIndex(e, t, a) {
  4188                try {
  4189                  const n = await e.fetchIfRefAsync(t);
  4190                  if (!(n instanceof s.Dict)) return -1;
  4191                  const i = n.getRaw("P");
  4192                  if (i instanceof s.Ref)
  4193                    try {
  4194                      return await a.ensureCatalog("getPageIndex", [i]);
  4195                    } catch (e) {
  4196                      (0, r.info)(
  4197                        `_getPageIndex -- not a valid page reference: "${e}".`,
  4198                      );
  4199                    }
  4200                  if (n.has("Kids")) return -1;
  4201                  const o = await a.ensureDoc("numPages");
  4202                  for (let e = 0; e < o; e++) {
  4203                    const r = await a.getPage(e),
  4204                      n = await a.ensure(r, "annotations");
  4205                    for (const a of n)
  4206                      if (a instanceof s.Ref && (0, s.isRefsEqual)(a, t))
  4207                        return e;
  4208                  }
  4209                } catch (e) {
  4210                  (0, r.warn)(`_getPageIndex: "${e}".`);
  4211                }
  4212                return -1;
  4213              }
  4214              static generateImages(e, t, a) {
  4215                if (!a) {
  4216                  (0, r.warn)(
  4217                    "generateImages: OffscreenCanvas is not supported, cannot save or print some annotations with images.",
  4218                  );
  4219                  return null;
  4220                }
  4221                let n;
  4222                for (const { bitmapId: a, bitmap: r } of e)
  4223                  if (r) {
  4224                    n ||= new Map();
  4225                    n.set(a, StampAnnotation.createImage(r, t));
  4226                  }
  4227                return n;
  4228              }
  4229              static async saveNewAnnotations(e, t, a, n) {
  4230                const i = e.xref;
  4231                let o;
  4232                const c = [],
  4233                  l = [],
  4234                  { isOffscreenCanvasSupported: h } = e.options;
  4235                for (const u of a)
  4236                  if (!u.deleted)
  4237                    switch (u.annotationType) {
  4238                      case r.AnnotationEditorType.FREETEXT:
  4239                        if (!o) {
  4240                          const e = new s.Dict(i);
  4241                          e.set("BaseFont", s.Name.get("Helvetica"));
  4242                          e.set("Type", s.Name.get("Font"));
  4243                          e.set("Subtype", s.Name.get("Type1"));
  4244                          e.set("Encoding", s.Name.get("WinAnsiEncoding"));
  4245                          const t = [];
  4246                          o = i.getNewTemporaryRef();
  4247                          await (0, m.writeObject)(o, e, t, i);
  4248                          c.push({ ref: o, data: t.join("") });
  4249                        }
  4250                        l.push(
  4251                          FreeTextAnnotation.createNewAnnotation(i, u, c, {
  4252                            evaluator: e,
  4253                            task: t,
  4254                            baseFontRef: o,
  4255                          }),
  4256                        );
  4257                        break;
  4258                      case r.AnnotationEditorType.INK:
  4259                        l.push(InkAnnotation.createNewAnnotation(i, u, c));
  4260                        break;
  4261                      case r.AnnotationEditorType.STAMP:
  4262                        if (!h) break;
  4263                        const a = await n.get(u.bitmapId);
  4264                        if (a.imageStream) {
  4265                          const { imageStream: e, smaskStream: t } = a,
  4266                            r = [];
  4267                          if (t) {
  4268                            const a = i.getNewTemporaryRef();
  4269                            await (0, m.writeObject)(a, t, r, i);
  4270                            c.push({ ref: a, data: r.join("") });
  4271                            e.dict.set("SMask", a);
  4272                            r.length = 0;
  4273                          }
  4274                          const n = (a.imageRef = i.getNewTemporaryRef());
  4275                          await (0, m.writeObject)(n, e, r, i);
  4276                          c.push({ ref: n, data: r.join("") });
  4277                          a.imageStream = a.smaskStream = null;
  4278                        }
  4279                        l.push(
  4280                          StampAnnotation.createNewAnnotation(i, u, c, {
  4281                            image: a,
  4282                          }),
  4283                        );
  4284                    }
  4285                return { annotations: await Promise.all(l), dependencies: c };
  4286              }
  4287              static async printNewAnnotations(e, t, a, n, i) {
  4288                if (!n) return null;
  4289                const { options: s, xref: o } = t,
  4290                  c = [];
  4291                for (const l of n)
  4292                  if (!l.deleted)
  4293                    switch (l.annotationType) {
  4294                      case r.AnnotationEditorType.FREETEXT:
  4295                        c.push(
  4296                          FreeTextAnnotation.createNewPrintAnnotation(e, o, l, {
  4297                            evaluator: t,
  4298                            task: a,
  4299                            evaluatorOptions: s,
  4300                          }),
  4301                        );
  4302                        break;
  4303                      case r.AnnotationEditorType.INK:
  4304                        c.push(
  4305                          InkAnnotation.createNewPrintAnnotation(e, o, l, {
  4306                            evaluatorOptions: s,
  4307                          }),
  4308                        );
  4309                        break;
  4310                      case r.AnnotationEditorType.STAMP:
  4311                        if (!s.isOffscreenCanvasSupported) break;
  4312                        const n = await i.get(l.bitmapId);
  4313                        if (n.imageStream) {
  4314                          const { imageStream: e, smaskStream: t } = n;
  4315                          t && e.dict.set("SMask", t);
  4316                          n.imageRef = new f.JpegStream(e, e.length);
  4317                          n.imageStream = n.smaskStream = null;
  4318                        }
  4319                        c.push(
  4320                          StampAnnotation.createNewPrintAnnotation(e, o, l, {
  4321                            image: n,
  4322                            evaluatorOptions: s,
  4323                          }),
  4324                        );
  4325                    }
  4326                return Promise.all(c);
  4327              }
  4328            };
  4329            function getRgbColor(e, t = new Uint8ClampedArray(3)) {
  4330              if (!Array.isArray(e)) return t;
  4331              const a = t || new Uint8ClampedArray(3);
  4332              switch (e.length) {
  4333                case 0:
  4334                  return null;
  4335                case 1:
  4336                  u.ColorSpace.singletons.gray.getRgbItem(e, 0, a, 0);
  4337                  return a;
  4338                case 3:
  4339                  u.ColorSpace.singletons.rgb.getRgbItem(e, 0, a, 0);
  4340                  return a;
  4341                case 4:
  4342                  u.ColorSpace.singletons.cmyk.getRgbItem(e, 0, a, 0);
  4343                  return a;
  4344                default:
  4345                  return t;
  4346              }
  4347            }
  4348            function getPdfColorArray(e) {
  4349              return Array.from(e, (e) => e / 255);
  4350            }
  4351            function getQuadPoints(e, t) {
  4352              const a = e.getArray("QuadPoints");
  4353              if (!Array.isArray(a) || 0 === a.length || a.length % 8 > 0)
  4354                return null;
  4355              const r = [];
  4356              for (let e = 0, n = a.length / 8; e < n; e++) {
  4357                let n = 1 / 0,
  4358                  i = -1 / 0,
  4359                  s = 1 / 0,
  4360                  o = -1 / 0;
  4361                for (let t = 8 * e, r = 8 * e + 8; t < r; t += 2) {
  4362                  const e = a[t],
  4363                    r = a[t + 1];
  4364                  n = Math.min(e, n);
  4365                  i = Math.max(e, i);
  4366                  s = Math.min(r, s);
  4367                  o = Math.max(r, o);
  4368                }
  4369                if (null !== t && (n < t[0] || i > t[2] || s < t[1] || o > t[3]))
  4370                  return null;
  4371                r.push([
  4372                  { x: n, y: o },
  4373                  { x: i, y: o },
  4374                  { x: n, y: s },
  4375                  { x: i, y: s },
  4376                ]);
  4377              }
  4378              return r;
  4379            }
  4380            function getTransformMatrix(e, t, a) {
  4381              const [n, i, s, o] = r.Util.getAxialAlignedBoundingBox(t, a);
  4382              if (n === s || i === o) return [1, 0, 0, 1, e[0], e[1]];
  4383              const c = (e[2] - e[0]) / (s - n),
  4384                l = (e[3] - e[1]) / (o - i);
  4385              return [c, 0, 0, l, e[0] - n * c, e[1] - i * l];
  4386            }
  4387            class Annotation {
  4388              constructor(e) {
  4389                const { dict: t, xref: a, annotationGlobals: i } = e;
  4390                this.setTitle(t.get("T"));
  4391                this.setContents(t.get("Contents"));
  4392                this.setModificationDate(t.get("M"));
  4393                this.setFlags(t.get("F"));
  4394                this.setRectangle(t.getArray("Rect"));
  4395                this.setColor(t.getArray("C"));
  4396                this.setBorderStyle(t);
  4397                this.setAppearance(t);
  4398                this.setOptionalContent(t);
  4399                const o = t.get("MK");
  4400                this.setBorderAndBackgroundColors(o);
  4401                this.setRotation(o, t);
  4402                this.ref = e.ref instanceof s.Ref ? e.ref : null;
  4403                this._streams = [];
  4404                this.appearance && this._streams.push(this.appearance);
  4405                const c = !!(this.flags & r.AnnotationFlag.LOCKED),
  4406                  l = !!(this.flags & r.AnnotationFlag.LOCKEDCONTENTS);
  4407                if (i.structTreeRoot) {
  4408                  let a = t.get("StructParent");
  4409                  a = Number.isInteger(a) && a >= 0 ? a : -1;
  4410                  i.structTreeRoot.addAnnotationIdToPage(e.pageRef, a);
  4411                }
  4412                this.data = {
  4413                  annotationFlags: this.flags,
  4414                  borderStyle: this.borderStyle,
  4415                  color: this.color,
  4416                  backgroundColor: this.backgroundColor,
  4417                  borderColor: this.borderColor,
  4418                  rotation: this.rotation,
  4419                  contentsObj: this._contents,
  4420                  hasAppearance: !!this.appearance,
  4421                  id: e.id,
  4422                  modificationDate: this.modificationDate,
  4423                  rect: this.rectangle,
  4424                  subtype: e.subtype,
  4425                  hasOwnCanvas: !1,
  4426                  noRotate: !!(this.flags & r.AnnotationFlag.NOROTATE),
  4427                  noHTML: c && l,
  4428                };
  4429                if (e.collectFields) {
  4430                  const i = t.get("Kids");
  4431                  if (Array.isArray(i)) {
  4432                    const e = [];
  4433                    for (const t of i) t instanceof s.Ref && e.push(t.toString());
  4434                    0 !== e.length && (this.data.kidIds = e);
  4435                  }
  4436                  this.data.actions = (0, n.collectActions)(
  4437                    a,
  4438                    t,
  4439                    r.AnnotationActionEventType,
  4440                  );
  4441                  this.data.fieldName = this._constructFieldName(t);
  4442                  this.data.pageIndex = e.pageIndex;
  4443                }
  4444                this._isOffscreenCanvasSupported =
  4445                  e.evaluatorOptions.isOffscreenCanvasSupported;
  4446                this._fallbackFontDict = null;
  4447                this._needAppearances = !1;
  4448              }
  4449              _hasFlag(e, t) {
  4450                return !!(e & t);
  4451              }
  4452              _isViewable(e) {
  4453                return (
  4454                  !this._hasFlag(e, r.AnnotationFlag.INVISIBLE) &&
  4455                  !this._hasFlag(e, r.AnnotationFlag.NOVIEW)
  4456                );
  4457              }
  4458              _isPrintable(e) {
  4459                return (
  4460                  this._hasFlag(e, r.AnnotationFlag.PRINT) &&
  4461                  !this._hasFlag(e, r.AnnotationFlag.HIDDEN) &&
  4462                  !this._hasFlag(e, r.AnnotationFlag.INVISIBLE)
  4463                );
  4464              }
  4465              mustBeViewed(e, t) {
  4466                const a = e?.get(this.data.id)?.noView;
  4467                return void 0 !== a
  4468                  ? !a
  4469                  : this.viewable &&
  4470                      !this._hasFlag(this.flags, r.AnnotationFlag.HIDDEN);
  4471              }
  4472              mustBePrinted(e) {
  4473                const t = e?.get(this.data.id)?.noPrint;
  4474                return void 0 !== t ? !t : this.printable;
  4475              }
  4476              get viewable() {
  4477                return (
  4478                  null !== this.data.quadPoints &&
  4479                  (0 === this.flags || this._isViewable(this.flags))
  4480                );
  4481              }
  4482              get printable() {
  4483                return (
  4484                  null !== this.data.quadPoints &&
  4485                  0 !== this.flags &&
  4486                  this._isPrintable(this.flags)
  4487                );
  4488              }
  4489              _parseStringHelper(e) {
  4490                const t = "string" == typeof e ? (0, r.stringToPDFString)(e) : "";
  4491                return {
  4492                  str: t,
  4493                  dir: t && "rtl" === (0, l.bidi)(t).dir ? "rtl" : "ltr",
  4494                };
  4495              }
  4496              setDefaultAppearance(e) {
  4497                const { dict: t, annotationGlobals: a } = e,
  4498                  r =
  4499                    (0, n.getInheritableProperty)({ dict: t, key: "DA" }) ||
  4500                    a.acroForm.get("DA");
  4501                this._defaultAppearance = "string" == typeof r ? r : "";
  4502                this.data.defaultAppearanceData = (0, i.parseDefaultAppearance)(
  4503                  this._defaultAppearance,
  4504                );
  4505              }
  4506              setTitle(e) {
  4507                this._title = this._parseStringHelper(e);
  4508              }
  4509              setContents(e) {
  4510                this._contents = this._parseStringHelper(e);
  4511              }
  4512              setModificationDate(e) {
  4513                this.modificationDate = "string" == typeof e ? e : null;
  4514              }
  4515              setFlags(e) {
  4516                this.flags = Number.isInteger(e) && e > 0 ? e : 0;
  4517              }
  4518              hasFlag(e) {
  4519                return this._hasFlag(this.flags, e);
  4520              }
  4521              setRectangle(e) {
  4522                this.rectangle =
  4523                  Array.isArray(e) && 4 === e.length
  4524                    ? r.Util.normalizeRect(e)
  4525                    : [0, 0, 0, 0];
  4526              }
  4527              setColor(e) {
  4528                this.color = getRgbColor(e);
  4529              }
  4530              setLineEndings(e) {
  4531                this.lineEndings = ["None", "None"];
  4532                if (Array.isArray(e) && 2 === e.length)
  4533                  for (let t = 0; t < 2; t++) {
  4534                    const a = e[t];
  4535                    if (a instanceof s.Name)
  4536                      switch (a.name) {
  4537                        case "None":
  4538                          continue;
  4539                        case "Square":
  4540                        case "Circle":
  4541                        case "Diamond":
  4542                        case "OpenArrow":
  4543                        case "ClosedArrow":
  4544                        case "Butt":
  4545                        case "ROpenArrow":
  4546                        case "RClosedArrow":
  4547                        case "Slash":
  4548                          this.lineEndings[t] = a.name;
  4549                          continue;
  4550                      }
  4551                    (0, r.warn)(`Ignoring invalid lineEnding: ${a}`);
  4552                  }
  4553              }
  4554              setRotation(e, t) {
  4555                this.rotation = 0;
  4556                let a =
  4557                  e instanceof s.Dict ? e.get("R") || 0 : t.get("Rotate") || 0;
  4558                if (Number.isInteger(a) && 0 !== a) {
  4559                  a %= 360;
  4560                  a < 0 && (a += 360);
  4561                  a % 90 == 0 && (this.rotation = a);
  4562                }
  4563              }
  4564              setBorderAndBackgroundColors(e) {
  4565                if (e instanceof s.Dict) {
  4566                  this.borderColor = getRgbColor(e.getArray("BC"), null);
  4567                  this.backgroundColor = getRgbColor(e.getArray("BG"), null);
  4568                } else this.borderColor = this.backgroundColor = null;
  4569              }
  4570              setBorderStyle(e) {
  4571                this.borderStyle = new AnnotationBorderStyle();
  4572                if (e instanceof s.Dict)
  4573                  if (e.has("BS")) {
  4574                    const t = e.get("BS"),
  4575                      a = t.get("Type");
  4576                    if (!a || (0, s.isName)(a, "Border")) {
  4577                      this.borderStyle.setWidth(t.get("W"), this.rectangle);
  4578                      this.borderStyle.setStyle(t.get("S"));
  4579                      this.borderStyle.setDashArray(t.getArray("D"));
  4580                    }
  4581                  } else if (e.has("Border")) {
  4582                    const t = e.getArray("Border");
  4583                    if (Array.isArray(t) && t.length >= 3) {
  4584                      this.borderStyle.setHorizontalCornerRadius(t[0]);
  4585                      this.borderStyle.setVerticalCornerRadius(t[1]);
  4586                      this.borderStyle.setWidth(t[2], this.rectangle);
  4587                      4 === t.length && this.borderStyle.setDashArray(t[3], !0);
  4588                    }
  4589                  } else this.borderStyle.setWidth(0);
  4590              }
  4591              setAppearance(e) {
  4592                this.appearance = null;
  4593                const t = e.get("AP");
  4594                if (!(t instanceof s.Dict)) return;
  4595                const a = t.get("N");
  4596                if (a instanceof c.BaseStream) {
  4597                  this.appearance = a;
  4598                  return;
  4599                }
  4600                if (!(a instanceof s.Dict)) return;
  4601                const r = e.get("AS");
  4602                if (!(r instanceof s.Name && a.has(r.name))) return;
  4603                const n = a.get(r.name);
  4604                n instanceof c.BaseStream && (this.appearance = n);
  4605              }
  4606              setOptionalContent(e) {
  4607                this.oc = null;
  4608                const t = e.get("OC");
  4609                t instanceof s.Name
  4610                  ? (0, r.warn)(
  4611                      "setOptionalContent: Support for /Name-entry is not implemented.",
  4612                    )
  4613                  : t instanceof s.Dict && (this.oc = t);
  4614              }
  4615              loadResources(e, t) {
  4616                return t.dict.getAsync("Resources").then((t) => {
  4617                  if (!t) return;
  4618                  return new g.ObjectLoader(t, e, t.xref)
  4619                    .load()
  4620                    .then(function () {
  4621                      return t;
  4622                    });
  4623                });
  4624              }
  4625              async getOperatorList(e, t, a, n, i) {
  4626                const c = this.data;
  4627                let l = this.appearance;
  4628                const h = !!(
  4629                  this.data.hasOwnCanvas && a & r.RenderingIntentFlag.DISPLAY
  4630                );
  4631                if (!l) {
  4632                  if (!h)
  4633                    return {
  4634                      opList: new p.OperatorList(),
  4635                      separateForm: !1,
  4636                      separateCanvas: !1,
  4637                    };
  4638                  l = new o.StringStream("");
  4639                  l.dict = new s.Dict();
  4640                }
  4641                const u = l.dict,
  4642                  d = await this.loadResources(
  4643                    [
  4644                      "ExtGState",
  4645                      "ColorSpace",
  4646                      "Pattern",
  4647                      "Shading",
  4648                      "XObject",
  4649                      "Font",
  4650                    ],
  4651                    l,
  4652                  ),
  4653                  f = u.getArray("BBox") || [0, 0, 1, 1],
  4654                  g = u.getArray("Matrix") || [1, 0, 0, 1, 0, 0],
  4655                  m = getTransformMatrix(c.rect, f, g),
  4656                  b = new p.OperatorList();
  4657                let y;
  4658                this.oc && (y = await e.parseMarkedContentProps(this.oc, null));
  4659                void 0 !== y && b.addOp(r.OPS.beginMarkedContentProps, ["OC", y]);
  4660                b.addOp(r.OPS.beginAnnotation, [c.id, c.rect, m, g, h]);
  4661                await e.getOperatorList({
  4662                  stream: l,
  4663                  task: t,
  4664                  resources: d,
  4665                  operatorList: b,
  4666                  fallbackFontDict: this._fallbackFontDict,
  4667                });
  4668                b.addOp(r.OPS.endAnnotation, []);
  4669                void 0 !== y && b.addOp(r.OPS.endMarkedContent, []);
  4670                this.reset();
  4671                return { opList: b, separateForm: !1, separateCanvas: h };
  4672              }
  4673              async save(e, t, a) {
  4674                return null;
  4675              }
  4676              get hasTextContent() {
  4677                return !1;
  4678              }
  4679              async extractTextContent(e, t, a) {
  4680                if (!this.appearance) return;
  4681                const n = await this.loadResources(
  4682                    ["ExtGState", "Font", "Properties", "XObject"],
  4683                    this.appearance,
  4684                  ),
  4685                  i = [],
  4686                  s = [];
  4687                let o = null;
  4688                const c = {
  4689                  desiredSize: Math.Infinity,
  4690                  ready: !0,
  4691                  enqueue(e, t) {
  4692                    for (const t of e.items)
  4693                      if (void 0 !== t.str) {
  4694                        o ||= t.transform.slice(-2);
  4695                        s.push(t.str);
  4696                        if (t.hasEOL) {
  4697                          i.push(s.join(""));
  4698                          s.length = 0;
  4699                        }
  4700                      }
  4701                  },
  4702                };
  4703                await e.getTextContent({
  4704                  stream: this.appearance,
  4705                  task: t,
  4706                  resources: n,
  4707                  includeMarkedContent: !0,
  4708                  sink: c,
  4709                  viewBox: a,
  4710                });
  4711                this.reset();
  4712                s.length && i.push(s.join(""));
  4713                if (i.length > 1 || i[0]) {
  4714                  const e = this.appearance.dict,
  4715                    t = e.getArray("BBox") || [0, 0, 1, 1],
  4716                    a = e.getArray("Matrix") || [1, 0, 0, 1, 0, 0],
  4717                    n = this.data.rect,
  4718                    s = getTransformMatrix(n, t, a);
  4719                  s[4] -= n[0];
  4720                  s[5] -= n[1];
  4721                  o = r.Util.applyTransform(o, s);
  4722                  o = r.Util.applyTransform(o, a);
  4723                  this.data.textPosition = o;
  4724                  this.data.textContent = i;
  4725                }
  4726              }
  4727              getFieldObject() {
  4728                return this.data.kidIds
  4729                  ? {
  4730                      id: this.data.id,
  4731                      actions: this.data.actions,
  4732                      name: this.data.fieldName,
  4733                      strokeColor: this.data.borderColor,
  4734                      fillColor: this.data.backgroundColor,
  4735                      type: "",
  4736                      kidIds: this.data.kidIds,
  4737                      page: this.data.pageIndex,
  4738                      rotation: this.rotation,
  4739                    }
  4740                  : null;
  4741              }
  4742              reset() {
  4743                for (const e of this._streams) e.reset();
  4744              }
  4745              _constructFieldName(e) {
  4746                if (!e.has("T") && !e.has("Parent")) {
  4747                  (0, r.warn)(
  4748                    "Unknown field name, falling back to empty field name.",
  4749                  );
  4750                  return "";
  4751                }
  4752                if (!e.has("Parent")) return (0, r.stringToPDFString)(e.get("T"));
  4753                const t = [];
  4754                e.has("T") && t.unshift((0, r.stringToPDFString)(e.get("T")));
  4755                let a = e;
  4756                const n = new s.RefSet();
  4757                e.objId && n.put(e.objId);
  4758                for (; a.has("Parent"); ) {
  4759                  a = a.get("Parent");
  4760                  if (!(a instanceof s.Dict) || (a.objId && n.has(a.objId)))
  4761                    break;
  4762                  a.objId && n.put(a.objId);
  4763                  a.has("T") && t.unshift((0, r.stringToPDFString)(a.get("T")));
  4764                }
  4765                return t.join(".");
  4766              }
  4767            }
  4768            t.Annotation = Annotation;
  4769            class AnnotationBorderStyle {
  4770              constructor() {
  4771                this.width = 1;
  4772                this.style = r.AnnotationBorderStyleType.SOLID;
  4773                this.dashArray = [3];
  4774                this.horizontalCornerRadius = 0;
  4775                this.verticalCornerRadius = 0;
  4776              }
  4777              setWidth(e, t = [0, 0, 0, 0]) {
  4778                if (e instanceof s.Name) this.width = 0;
  4779                else if ("number" == typeof e) {
  4780                  if (e > 0) {
  4781                    const a = (t[2] - t[0]) / 2,
  4782                      n = (t[3] - t[1]) / 2;
  4783                    if (a > 0 && n > 0 && (e > a || e > n)) {
  4784                      (0, r.warn)(
  4785                        `AnnotationBorderStyle.setWidth - ignoring width: ${e}`,
  4786                      );
  4787                      e = 1;
  4788                    }
  4789                  }
  4790                  this.width = e;
  4791                }
  4792              }
  4793              setStyle(e) {
  4794                if (e instanceof s.Name)
  4795                  switch (e.name) {
  4796                    case "S":
  4797                      this.style = r.AnnotationBorderStyleType.SOLID;
  4798                      break;
  4799                    case "D":
  4800                      this.style = r.AnnotationBorderStyleType.DASHED;
  4801                      break;
  4802                    case "B":
  4803                      this.style = r.AnnotationBorderStyleType.BEVELED;
  4804                      break;
  4805                    case "I":
  4806                      this.style = r.AnnotationBorderStyleType.INSET;
  4807                      break;
  4808                    case "U":
  4809                      this.style = r.AnnotationBorderStyleType.UNDERLINE;
  4810                  }
  4811              }
  4812              setDashArray(e, t = !1) {
  4813                if (Array.isArray(e) && e.length > 0) {
  4814                  let a = !0,
  4815                    r = !0;
  4816                  for (const t of e) {
  4817                    if (!(+t >= 0)) {
  4818                      a = !1;
  4819                      break;
  4820                    }
  4821                    t > 0 && (r = !1);
  4822                  }
  4823                  if (a && !r) {
  4824                    this.dashArray = e;
  4825                    t && this.setStyle(s.Name.get("D"));
  4826                  } else this.width = 0;
  4827                } else e && (this.width = 0);
  4828              }
  4829              setHorizontalCornerRadius(e) {
  4830                Number.isInteger(e) && (this.horizontalCornerRadius = e);
  4831              }
  4832              setVerticalCornerRadius(e) {
  4833                Number.isInteger(e) && (this.verticalCornerRadius = e);
  4834              }
  4835            }
  4836            t.AnnotationBorderStyle = AnnotationBorderStyle;
  4837            class MarkupAnnotation extends Annotation {
  4838              constructor(e) {
  4839                super(e);
  4840                const { dict: t } = e;
  4841                if (t.has("IRT")) {
  4842                  const e = t.getRaw("IRT");
  4843                  this.data.inReplyTo = e instanceof s.Ref ? e.toString() : null;
  4844                  const a = t.get("RT");
  4845                  this.data.replyType =
  4846                    a instanceof s.Name ? a.name : r.AnnotationReplyType.REPLY;
  4847                }
  4848                let a = null;
  4849                if (this.data.replyType === r.AnnotationReplyType.GROUP) {
  4850                  const e = t.get("IRT");
  4851                  this.setTitle(e.get("T"));
  4852                  this.data.titleObj = this._title;
  4853                  this.setContents(e.get("Contents"));
  4854                  this.data.contentsObj = this._contents;
  4855                  if (e.has("CreationDate")) {
  4856                    this.setCreationDate(e.get("CreationDate"));
  4857                    this.data.creationDate = this.creationDate;
  4858                  } else this.data.creationDate = null;
  4859                  if (e.has("M")) {
  4860                    this.setModificationDate(e.get("M"));
  4861                    this.data.modificationDate = this.modificationDate;
  4862                  } else this.data.modificationDate = null;
  4863                  a = e.getRaw("Popup");
  4864                  if (e.has("C")) {
  4865                    this.setColor(e.getArray("C"));
  4866                    this.data.color = this.color;
  4867                  } else this.data.color = null;
  4868                } else {
  4869                  this.data.titleObj = this._title;
  4870                  this.setCreationDate(t.get("CreationDate"));
  4871                  this.data.creationDate = this.creationDate;
  4872                  a = t.getRaw("Popup");
  4873                  t.has("C") || (this.data.color = null);
  4874                }
  4875                this.data.popupRef = a instanceof s.Ref ? a.toString() : null;
  4876                t.has("RC") &&
  4877                  (this.data.richText = b.XFAFactory.getRichTextAsHtml(
  4878                    t.get("RC"),
  4879                  ));
  4880              }
  4881              setCreationDate(e) {
  4882                this.creationDate = "string" == typeof e ? e : null;
  4883              }
  4884              _setDefaultAppearance({
  4885                xref: e,
  4886                extra: t,
  4887                strokeColor: a,
  4888                fillColor: r,
  4889                blendMode: n,
  4890                strokeAlpha: i,
  4891                fillAlpha: c,
  4892                pointsCallback: l,
  4893              }) {
  4894                let h = Number.MAX_VALUE,
  4895                  u = Number.MAX_VALUE,
  4896                  d = Number.MIN_VALUE,
  4897                  f = Number.MIN_VALUE;
  4898                const g = ["q"];
  4899                t && g.push(t);
  4900                a && g.push(`${a[0]} ${a[1]} ${a[2]} RG`);
  4901                r && g.push(`${r[0]} ${r[1]} ${r[2]} rg`);
  4902                let p = this.data.quadPoints;
  4903                p ||
  4904                  (p = [
  4905                    [
  4906                      { x: this.rectangle[0], y: this.rectangle[3] },
  4907                      { x: this.rectangle[2], y: this.rectangle[3] },
  4908                      { x: this.rectangle[0], y: this.rectangle[1] },
  4909                      { x: this.rectangle[2], y: this.rectangle[1] },
  4910                    ],
  4911                  ]);
  4912                for (const e of p) {
  4913                  const [t, a, r, n] = l(g, e);
  4914                  h = Math.min(h, t);
  4915                  d = Math.max(d, a);
  4916                  u = Math.min(u, r);
  4917                  f = Math.max(f, n);
  4918                }
  4919                g.push("Q");
  4920                const m = new s.Dict(e),
  4921                  b = new s.Dict(e);
  4922                b.set("Subtype", s.Name.get("Form"));
  4923                const y = new o.StringStream(g.join(" "));
  4924                y.dict = b;
  4925                m.set("Fm0", y);
  4926                const w = new s.Dict(e);
  4927                n && w.set("BM", s.Name.get(n));
  4928                "number" == typeof i && w.set("CA", i);
  4929                "number" == typeof c && w.set("ca", c);
  4930                const S = new s.Dict(e);
  4931                S.set("GS0", w);
  4932                const x = new s.Dict(e);
  4933                x.set("ExtGState", S);
  4934                x.set("XObject", m);
  4935                const C = new s.Dict(e);
  4936                C.set("Resources", x);
  4937                const k = (this.data.rect = [h, u, d, f]);
  4938                C.set("BBox", k);
  4939                this.appearance = new o.StringStream("/GS0 gs /Fm0 Do");
  4940                this.appearance.dict = C;
  4941                this._streams.push(this.appearance, y);
  4942              }
  4943              static async createNewAnnotation(e, t, a, r) {
  4944                const n = (t.ref ||= e.getNewTemporaryRef()),
  4945                  i = await this.createNewAppearanceStream(t, e, r),
  4946                  s = [];
  4947                let o;
  4948                if (i) {
  4949                  const r = e.getNewTemporaryRef();
  4950                  o = this.createNewDict(t, e, { apRef: r });
  4951                  await (0, m.writeObject)(r, i, s, e);
  4952                  a.push({ ref: r, data: s.join("") });
  4953                } else o = this.createNewDict(t, e, {});
  4954                Number.isInteger(t.parentTreeId) &&
  4955                  o.set("StructParent", t.parentTreeId);
  4956                s.length = 0;
  4957                await (0, m.writeObject)(n, o, s, e);
  4958                return { ref: n, data: s.join("") };
  4959              }
  4960              static async createNewPrintAnnotation(e, t, a, r) {
  4961                const n = await this.createNewAppearanceStream(a, t, r),
  4962                  i = this.createNewDict(a, t, { ap: n }),
  4963                  s = new this.prototype.constructor({
  4964                    dict: i,
  4965                    xref: t,
  4966                    annotationGlobals: e,
  4967                    evaluatorOptions: r.evaluatorOptions,
  4968                  });
  4969                a.ref && (s.ref = s.refToReplace = a.ref);
  4970                return s;
  4971              }
  4972            }
  4973            t.MarkupAnnotation = MarkupAnnotation;
  4974            class WidgetAnnotation extends Annotation {
  4975              constructor(e) {
  4976                super(e);
  4977                const { dict: t, xref: a, annotationGlobals: i } = e,
  4978                  o = this.data;
  4979                this._needAppearances = e.needAppearances;
  4980                o.annotationType = r.AnnotationType.WIDGET;
  4981                void 0 === o.fieldName &&
  4982                  (o.fieldName = this._constructFieldName(t));
  4983                void 0 === o.actions &&
  4984                  (o.actions = (0, n.collectActions)(
  4985                    a,
  4986                    t,
  4987                    r.AnnotationActionEventType,
  4988                  ));
  4989                let c = (0, n.getInheritableProperty)({
  4990                  dict: t,
  4991                  key: "V",
  4992                  getArray: !0,
  4993                });
  4994                o.fieldValue = this._decodeFormValue(c);
  4995                const l = (0, n.getInheritableProperty)({
  4996                  dict: t,
  4997                  key: "DV",
  4998                  getArray: !0,
  4999                });
  5000                o.defaultFieldValue = this._decodeFormValue(l);
  5001                if (void 0 === c && i.xfaDatasets) {
  5002                  const e = this._title.str;
  5003                  if (e) {
  5004                    this._hasValueFromXFA = !0;
  5005                    o.fieldValue = c = i.xfaDatasets.getValue(e);
  5006                  }
  5007                }
  5008                void 0 === c &&
  5009                  null !== o.defaultFieldValue &&
  5010                  (o.fieldValue = o.defaultFieldValue);
  5011                o.alternativeText = (0, r.stringToPDFString)(t.get("TU") || "");
  5012                this.setDefaultAppearance(e);
  5013                o.hasAppearance ||=
  5014                  this._needAppearances &&
  5015                  void 0 !== o.fieldValue &&
  5016                  null !== o.fieldValue;
  5017                const h = (0, n.getInheritableProperty)({ dict: t, key: "FT" });
  5018                o.fieldType = h instanceof s.Name ? h.name : null;
  5019                const u = (0, n.getInheritableProperty)({ dict: t, key: "DR" }),
  5020                  d = i.acroForm.get("DR"),
  5021                  f = this.appearance?.dict.get("Resources");
  5022                this._fieldResources = {
  5023                  localResources: u,
  5024                  acroFormResources: d,
  5025                  appearanceResources: f,
  5026                  mergedResources: s.Dict.merge({
  5027                    xref: a,
  5028                    dictArray: [u, f, d],
  5029                    mergeSubDicts: !0,
  5030                  }),
  5031                };
  5032                o.fieldFlags = (0, n.getInheritableProperty)({
  5033                  dict: t,
  5034                  key: "Ff",
  5035                });
  5036                (!Number.isInteger(o.fieldFlags) || o.fieldFlags < 0) &&
  5037                  (o.fieldFlags = 0);
  5038                o.readOnly = this.hasFieldFlag(r.AnnotationFieldFlag.READONLY);
  5039                o.required = this.hasFieldFlag(r.AnnotationFieldFlag.REQUIRED);
  5040                o.hidden =
  5041                  this._hasFlag(o.annotationFlags, r.AnnotationFlag.HIDDEN) ||
  5042                  this._hasFlag(o.annotationFlags, r.AnnotationFlag.NOVIEW);
  5043              }
  5044              _decodeFormValue(e) {
  5045                return Array.isArray(e)
  5046                  ? e
  5047                      .filter((e) => "string" == typeof e)
  5048                      .map((e) => (0, r.stringToPDFString)(e))
  5049                  : e instanceof s.Name
  5050                    ? (0, r.stringToPDFString)(e.name)
  5051                    : "string" == typeof e
  5052                      ? (0, r.stringToPDFString)(e)
  5053                      : null;
  5054              }
  5055              hasFieldFlag(e) {
  5056                return !!(this.data.fieldFlags & e);
  5057              }
  5058              _isViewable(e) {
  5059                return !this._hasFlag(e, r.AnnotationFlag.INVISIBLE);
  5060              }
  5061              mustBeViewed(e, t) {
  5062                return t
  5063                  ? this.viewable
  5064                  : super.mustBeViewed(e, t) &&
  5065                      !this._hasFlag(this.flags, r.AnnotationFlag.NOVIEW);
  5066              }
  5067              getRotationMatrix(e) {
  5068                let t = e?.get(this.data.id)?.rotation;
  5069                void 0 === t && (t = this.rotation);
  5070                if (0 === t) return r.IDENTITY_MATRIX;
  5071                const a = this.data.rect[2] - this.data.rect[0],
  5072                  i = this.data.rect[3] - this.data.rect[1];
  5073                return (0, n.getRotationMatrix)(t, a, i);
  5074              }
  5075              getBorderAndBackgroundAppearances(e) {
  5076                let t = e?.get(this.data.id)?.rotation;
  5077                void 0 === t && (t = this.rotation);
  5078                if (!this.backgroundColor && !this.borderColor) return "";
  5079                const a = this.data.rect[2] - this.data.rect[0],
  5080                  r = this.data.rect[3] - this.data.rect[1],
  5081                  n =
  5082                    0 === t || 180 === t
  5083                      ? `0 0 ${a} ${r} re`
  5084                      : `0 0 ${r} ${a} re`;
  5085                let s = "";
  5086                this.backgroundColor &&
  5087                  (s = `${(0, i.getPdfColor)(this.backgroundColor, !0)} ${n} f `);
  5088                if (this.borderColor) {
  5089                  s += `${this.borderStyle.width || 1} w ${(0, i.getPdfColor)(
  5090                    this.borderColor,
  5091                    !1,
  5092                  )} ${n} S `;
  5093                }
  5094                return s;
  5095              }
  5096              async getOperatorList(e, t, a, n, i) {
  5097                if (
  5098                  n &&
  5099                  !(this instanceof SignatureWidgetAnnotation) &&
  5100                  !this.data.noHTML &&
  5101                  !this.data.hasOwnCanvas
  5102                )
  5103                  return {
  5104                    opList: new p.OperatorList(),
  5105                    separateForm: !0,
  5106                    separateCanvas: !1,
  5107                  };
  5108                if (!this._hasText) return super.getOperatorList(e, t, a, n, i);
  5109                const s = await this._getAppearance(e, t, a, i);
  5110                if (this.appearance && null === s)
  5111                  return super.getOperatorList(e, t, a, n, i);
  5112                const c = new p.OperatorList();
  5113                if (!this._defaultAppearance || null === s)
  5114                  return { opList: c, separateForm: !1, separateCanvas: !1 };
  5115                const l = !!(
  5116                    this.data.hasOwnCanvas && a & r.RenderingIntentFlag.DISPLAY
  5117                  ),
  5118                  h = [
  5119                    0,
  5120                    0,
  5121                    this.data.rect[2] - this.data.rect[0],
  5122                    this.data.rect[3] - this.data.rect[1],
  5123                  ],
  5124                  u = getTransformMatrix(this.data.rect, h, [1, 0, 0, 1, 0, 0]);
  5125                let d;
  5126                this.oc && (d = await e.parseMarkedContentProps(this.oc, null));
  5127                void 0 !== d && c.addOp(r.OPS.beginMarkedContentProps, ["OC", d]);
  5128                c.addOp(r.OPS.beginAnnotation, [
  5129                  this.data.id,
  5130                  this.data.rect,
  5131                  u,
  5132                  this.getRotationMatrix(i),
  5133                  l,
  5134                ]);
  5135                const f = new o.StringStream(s);
  5136                await e.getOperatorList({
  5137                  stream: f,
  5138                  task: t,
  5139                  resources: this._fieldResources.mergedResources,
  5140                  operatorList: c,
  5141                });
  5142                c.addOp(r.OPS.endAnnotation, []);
  5143                void 0 !== d && c.addOp(r.OPS.endMarkedContent, []);
  5144                return { opList: c, separateForm: !1, separateCanvas: l };
  5145              }
  5146              _getMKDict(e) {
  5147                const t = new s.Dict(null);
  5148                e && t.set("R", e);
  5149                this.borderColor &&
  5150                  t.set("BC", getPdfColorArray(this.borderColor));
  5151                this.backgroundColor &&
  5152                  t.set("BG", getPdfColorArray(this.backgroundColor));
  5153                return t.size > 0 ? t : null;
  5154              }
  5155              amendSavedDict(e, t) {}
  5156              async save(e, t, a) {
  5157                const i = a?.get(this.data.id);
  5158                let c = i?.value,
  5159                  l = i?.rotation;
  5160                if (c === this.data.fieldValue || void 0 === c) {
  5161                  if (!this._hasValueFromXFA && void 0 === l) return null;
  5162                  c ||= this.data.fieldValue;
  5163                }
  5164                if (
  5165                  void 0 === l &&
  5166                  !this._hasValueFromXFA &&
  5167                  Array.isArray(c) &&
  5168                  Array.isArray(this.data.fieldValue) &&
  5169                  c.length === this.data.fieldValue.length &&
  5170                  c.every((e, t) => e === this.data.fieldValue[t])
  5171                )
  5172                  return null;
  5173                void 0 === l && (l = this.rotation);
  5174                let h = null;
  5175                if (!this._needAppearances) {
  5176                  h = await this._getAppearance(
  5177                    e,
  5178                    t,
  5179                    r.RenderingIntentFlag.SAVE,
  5180                    a,
  5181                  );
  5182                  if (null === h) return null;
  5183                }
  5184                let u = !1;
  5185                if (h?.needAppearances) {
  5186                  u = !0;
  5187                  h = null;
  5188                }
  5189                const { xref: d } = e,
  5190                  f = d.fetchIfRef(this.ref);
  5191                if (!(f instanceof s.Dict)) return null;
  5192                const g = new s.Dict(d);
  5193                for (const e of f.getKeys()) "AP" !== e && g.set(e, f.getRaw(e));
  5194                const p = { path: this.data.fieldName, value: c },
  5195                  encoder = (e) =>
  5196                    (0, n.isAscii)(e) ? e : (0, n.stringToUTF16String)(e, !0);
  5197                g.set("V", Array.isArray(c) ? c.map(encoder) : encoder(c));
  5198                this.amendSavedDict(a, g);
  5199                const b = this._getMKDict(l);
  5200                b && g.set("MK", b);
  5201                const y = [],
  5202                  w = [{ ref: this.ref, data: "", xfa: p, needAppearances: u }];
  5203                if (null !== h) {
  5204                  const e = d.getNewTemporaryRef(),
  5205                    t = new s.Dict(d);
  5206                  g.set("AP", t);
  5207                  t.set("N", e);
  5208                  const n = this._getSaveFieldResources(d),
  5209                    i = new o.StringStream(h),
  5210                    c = (i.dict = new s.Dict(d));
  5211                  c.set("Subtype", s.Name.get("Form"));
  5212                  c.set("Resources", n);
  5213                  c.set("BBox", [
  5214                    0,
  5215                    0,
  5216                    this.data.rect[2] - this.data.rect[0],
  5217                    this.data.rect[3] - this.data.rect[1],
  5218                  ]);
  5219                  const l = this.getRotationMatrix(a);
  5220                  l !== r.IDENTITY_MATRIX && c.set("Matrix", l);
  5221                  await (0, m.writeObject)(e, i, y, d);
  5222                  w.push({
  5223                    ref: e,
  5224                    data: y.join(""),
  5225                    xfa: null,
  5226                    needAppearances: !1,
  5227                  });
  5228                  y.length = 0;
  5229                }
  5230                g.set("M", `D:${(0, r.getModificationDate)()}`);
  5231                await (0, m.writeObject)(this.ref, g, y, d);
  5232                w[0].data = y.join("");
  5233                return w;
  5234              }
  5235              async _getAppearance(e, t, a, s) {
  5236                if (this.hasFieldFlag(r.AnnotationFieldFlag.PASSWORD))
  5237                  return null;
  5238                const o = s?.get(this.data.id);
  5239                let c, l;
  5240                if (o) {
  5241                  c = o.formattedValue || o.value;
  5242                  l = o.rotation;
  5243                }
  5244                if (
  5245                  void 0 === l &&
  5246                  void 0 === c &&
  5247                  !this._needAppearances &&
  5248                  (!this._hasValueFromXFA || this.appearance)
  5249                )
  5250                  return null;
  5251                const h = this.getBorderAndBackgroundAppearances(s);
  5252                if (void 0 === c) {
  5253                  c = this.data.fieldValue;
  5254                  if (!c) return `/Tx BMC q ${h}Q EMC`;
  5255                }
  5256                Array.isArray(c) && 1 === c.length && (c = c[0]);
  5257                (0, r.assert)(
  5258                  "string" == typeof c,
  5259                  "Expected `value` to be a string.",
  5260                );
  5261                c = c.trim();
  5262                if (this.data.combo) {
  5263                  const e = this.data.options.find(
  5264                    ({ exportValue: e }) => c === e,
  5265                  );
  5266                  c = e?.displayValue || c;
  5267                }
  5268                if ("" === c) return `/Tx BMC q ${h}Q EMC`;
  5269                void 0 === l && (l = this.rotation);
  5270                let u,
  5271                  d = -1;
  5272                if (this.data.multiLine) {
  5273                  u = c.split(/\r\n?|\n/).map((e) => e.normalize("NFC"));
  5274                  d = u.length;
  5275                } else u = [c.replace(/\r\n?|\n/, "").normalize("NFC")];
  5276                let f = this.data.rect[3] - this.data.rect[1],
  5277                  g = this.data.rect[2] - this.data.rect[0];
  5278                (90 !== l && 270 !== l) || ([g, f] = [f, g]);
  5279                this._defaultAppearance ||
  5280                  (this.data.defaultAppearanceData = (0,
  5281                  i.parseDefaultAppearance)(
  5282                    (this._defaultAppearance = "/Helvetica 0 Tf 0 g"),
  5283                  ));
  5284                let p,
  5285                  m,
  5286                  b,
  5287                  y = await WidgetAnnotation._getFontData(
  5288                    e,
  5289                    t,
  5290                    this.data.defaultAppearanceData,
  5291                    this._fieldResources.mergedResources,
  5292                  );
  5293                const w = [];
  5294                let S = !1;
  5295                for (const e of u) {
  5296                  const t = y.encodeString(e);
  5297                  t.length > 1 && (S = !0);
  5298                  w.push(t.join(""));
  5299                }
  5300                if (S && a & r.RenderingIntentFlag.SAVE)
  5301                  return { needAppearances: !0 };
  5302                if (S && this._isOffscreenCanvasSupported) {
  5303                  const a = this.data.comb ? "monospace" : "sans-serif",
  5304                    r = new i.FakeUnicodeFont(e.xref, a),
  5305                    s = r.createFontResources(u.join("")),
  5306                    o = s.getRaw("Font");
  5307                  if (this._fieldResources.mergedResources.has("Font")) {
  5308                    const e = this._fieldResources.mergedResources.get("Font");
  5309                    for (const t of o.getKeys()) e.set(t, o.getRaw(t));
  5310                  } else this._fieldResources.mergedResources.set("Font", o);
  5311                  const l = r.fontName.name;
  5312                  y = await WidgetAnnotation._getFontData(
  5313                    e,
  5314                    t,
  5315                    { fontName: l, fontSize: 0 },
  5316                    s,
  5317                  );
  5318                  for (let e = 0, t = w.length; e < t; e++)
  5319                    w[e] = (0, n.stringToUTF16String)(u[e]);
  5320                  const h = Object.assign(
  5321                    Object.create(null),
  5322                    this.data.defaultAppearanceData,
  5323                  );
  5324                  this.data.defaultAppearanceData.fontSize = 0;
  5325                  this.data.defaultAppearanceData.fontName = l;
  5326                  [p, m, b] = this._computeFontSize(f - 2, g - 4, c, y, d);
  5327                  this.data.defaultAppearanceData = h;
  5328                } else {
  5329                  this._isOffscreenCanvasSupported ||
  5330                    (0, r.warn)(
  5331                      "_getAppearance: OffscreenCanvas is not supported, annotation may not render correctly.",
  5332                    );
  5333                  [p, m, b] = this._computeFontSize(f - 2, g - 4, c, y, d);
  5334                }
  5335                let x = y.descent;
  5336                x = isNaN(x)
  5337                  ? r.BASELINE_FACTOR * b
  5338                  : Math.max(r.BASELINE_FACTOR * b, Math.abs(x) * m);
  5339                const C = Math.min(Math.floor((f - m) / 2), 1),
  5340                  k = this.data.textAlignment;
  5341                if (this.data.multiLine)
  5342                  return this._getMultilineAppearance(
  5343                    p,
  5344                    w,
  5345                    y,
  5346                    m,
  5347                    g,
  5348                    f,
  5349                    k,
  5350                    2,
  5351                    C,
  5352                    x,
  5353                    b,
  5354                    s,
  5355                  );
  5356                if (this.data.comb)
  5357                  return this._getCombAppearance(
  5358                    p,
  5359                    y,
  5360                    w[0],
  5361                    m,
  5362                    g,
  5363                    f,
  5364                    2,
  5365                    C,
  5366                    x,
  5367                    b,
  5368                    s,
  5369                  );
  5370                const v = C + x;
  5371                if (0 === k || k > 2)
  5372                  return (
  5373                    `/Tx BMC q ${h}BT ` +
  5374                    p +
  5375                    ` 1 0 0 1 ${(0, n.numberToString)(2)} ${(0, n.numberToString)(
  5376                      v,
  5377                    )} Tm (${(0, n.escapeString)(w[0])}) Tj ET Q EMC`
  5378                  );
  5379                return (
  5380                  `/Tx BMC q ${h}BT ` +
  5381                  p +
  5382                  ` 1 0 0 1 0 0 Tm ${this._renderText(
  5383                    w[0],
  5384                    y,
  5385                    m,
  5386                    g,
  5387                    k,
  5388                    { shift: 0 },
  5389                    2,
  5390                    v,
  5391                  )} ET Q EMC`
  5392                );
  5393              }
  5394              static async _getFontData(e, t, a, r) {
  5395                const n = new p.OperatorList(),
  5396                  i = {
  5397                    font: null,
  5398                    clone() {
  5399                      return this;
  5400                    },
  5401                  },
  5402                  { fontName: o, fontSize: c } = a;
  5403                await e.handleSetFont(
  5404                  r,
  5405                  [o && s.Name.get(o), c],
  5406                  null,
  5407                  n,
  5408                  t,
  5409                  i,
  5410                  null,
  5411                );
  5412                return i.font;
  5413              }
  5414              _getTextWidth(e, t) {
  5415                return t.charsToGlyphs(e).reduce((e, t) => e + t.width, 0) / 1e3;
  5416              }
  5417              _computeFontSize(e, t, a, n, s) {
  5418                let { fontSize: o } = this.data.defaultAppearanceData,
  5419                  c = (o || 12) * r.LINE_FACTOR,
  5420                  l = Math.round(e / c);
  5421                if (!o) {
  5422                  const roundWithTwoDigits = (e) => Math.floor(100 * e) / 100;
  5423                  if (-1 === s) {
  5424                    const i = this._getTextWidth(a, n);
  5425                    o = roundWithTwoDigits(
  5426                      Math.min(e / r.LINE_FACTOR, i > t ? t / i : 1 / 0),
  5427                    );
  5428                    l = 1;
  5429                  } else {
  5430                    const i = a.split(/\r\n?|\n/),
  5431                      h = [];
  5432                    for (const e of i) {
  5433                      const t = n.encodeString(e).join(""),
  5434                        a = n.charsToGlyphs(t),
  5435                        r = n.getCharPositions(t);
  5436                      h.push({ line: t, glyphs: a, positions: r });
  5437                    }
  5438                    const isTooBig = (a) => {
  5439                      let r = 0;
  5440                      for (const i of h) {
  5441                        r += this._splitLine(null, n, a, t, i).length * a;
  5442                        if (r > e) return !0;
  5443                      }
  5444                      return !1;
  5445                    };
  5446                    l = Math.max(l, s);
  5447                    for (;;) {
  5448                      c = e / l;
  5449                      o = roundWithTwoDigits(c / r.LINE_FACTOR);
  5450                      if (!isTooBig(o)) break;
  5451                      l++;
  5452                    }
  5453                  }
  5454                  const { fontName: h, fontColor: u } =
  5455                    this.data.defaultAppearanceData;
  5456                  this._defaultAppearance = (0, i.createDefaultAppearance)({
  5457                    fontSize: o,
  5458                    fontName: h,
  5459                    fontColor: u,
  5460                  });
  5461                }
  5462                return [this._defaultAppearance, o, e / l];
  5463              }
  5464              _renderText(e, t, a, r, i, s, o, c) {
  5465                let l;
  5466                if (1 === i) {
  5467                  l = (r - this._getTextWidth(e, t) * a) / 2;
  5468                } else if (2 === i) {
  5469                  l = r - this._getTextWidth(e, t) * a - o;
  5470                } else l = o;
  5471                const h = (0, n.numberToString)(l - s.shift);
  5472                s.shift = l;
  5473                return `${h} ${(c = (0, n.numberToString)(c))} Td (${(0,
  5474                n.escapeString)(e)}) Tj`;
  5475              }
  5476              _getSaveFieldResources(e) {
  5477                const {
  5478                    localResources: t,
  5479                    appearanceResources: a,
  5480                    acroFormResources: r,
  5481                  } = this._fieldResources,
  5482                  n = this.data.defaultAppearanceData?.fontName;
  5483                if (!n) return t || s.Dict.empty;
  5484                for (const e of [t, a])
  5485                  if (e instanceof s.Dict) {
  5486                    const t = e.get("Font");
  5487                    if (t instanceof s.Dict && t.has(n)) return e;
  5488                  }
  5489                if (r instanceof s.Dict) {
  5490                  const a = r.get("Font");
  5491                  if (a instanceof s.Dict && a.has(n)) {
  5492                    const r = new s.Dict(e);
  5493                    r.set(n, a.getRaw(n));
  5494                    const i = new s.Dict(e);
  5495                    i.set("Font", r);
  5496                    return s.Dict.merge({
  5497                      xref: e,
  5498                      dictArray: [i, t],
  5499                      mergeSubDicts: !0,
  5500                    });
  5501                  }
  5502                }
  5503                return t || s.Dict.empty;
  5504              }
  5505              getFieldObject() {
  5506                return null;
  5507              }
  5508            }
  5509            class TextWidgetAnnotation extends WidgetAnnotation {
  5510              constructor(e) {
  5511                super(e);
  5512                this.data.hasOwnCanvas = this.data.readOnly && !this.data.noHTML;
  5513                this._hasText = !0;
  5514                const t = e.dict;
  5515                "string" != typeof this.data.fieldValue &&
  5516                  (this.data.fieldValue = "");
  5517                let a = (0, n.getInheritableProperty)({ dict: t, key: "Q" });
  5518                (!Number.isInteger(a) || a < 0 || a > 2) && (a = null);
  5519                this.data.textAlignment = a;
  5520                let i = (0, n.getInheritableProperty)({ dict: t, key: "MaxLen" });
  5521                (!Number.isInteger(i) || i < 0) && (i = 0);
  5522                this.data.maxLen = i;
  5523                this.data.multiLine = this.hasFieldFlag(
  5524                  r.AnnotationFieldFlag.MULTILINE,
  5525                );
  5526                this.data.comb =
  5527                  this.hasFieldFlag(r.AnnotationFieldFlag.COMB) &&
  5528                  !this.hasFieldFlag(r.AnnotationFieldFlag.MULTILINE) &&
  5529                  !this.hasFieldFlag(r.AnnotationFieldFlag.PASSWORD) &&
  5530                  !this.hasFieldFlag(r.AnnotationFieldFlag.FILESELECT) &&
  5531                  0 !== this.data.maxLen;
  5532                this.data.doNotScroll = this.hasFieldFlag(
  5533                  r.AnnotationFieldFlag.DONOTSCROLL,
  5534                );
  5535              }
  5536              get hasTextContent() {
  5537                return !!this.appearance && !this._needAppearances;
  5538              }
  5539              _getCombAppearance(e, t, a, r, i, s, o, c, l, h, u) {
  5540                const d = i / this.data.maxLen,
  5541                  f = this.getBorderAndBackgroundAppearances(u),
  5542                  g = [],
  5543                  p = t.getCharPositions(a);
  5544                for (const [e, t] of p)
  5545                  g.push(`(${(0, n.escapeString)(a.substring(e, t))}) Tj`);
  5546                const m = g.join(` ${(0, n.numberToString)(d)} 0 Td `);
  5547                return (
  5548                  `/Tx BMC q ${f}BT ` +
  5549                  e +
  5550                  ` 1 0 0 1 ${(0, n.numberToString)(o)} ${(0, n.numberToString)(
  5551                    c + l,
  5552                  )} Tm ${m} ET Q EMC`
  5553                );
  5554              }
  5555              _getMultilineAppearance(e, t, a, r, i, s, o, c, l, h, u, d) {
  5556                const f = [],
  5557                  g = i - 2 * c,
  5558                  p = { shift: 0 };
  5559                for (let e = 0, n = t.length; e < n; e++) {
  5560                  const n = t[e],
  5561                    s = this._splitLine(n, a, r, g);
  5562                  for (let t = 0, n = s.length; t < n; t++) {
  5563                    const n = s[t],
  5564                      d = 0 === e && 0 === t ? -l - (u - h) : -u;
  5565                    f.push(this._renderText(n, a, r, i, o, p, c, d));
  5566                  }
  5567                }
  5568                const m = this.getBorderAndBackgroundAppearances(d),
  5569                  b = f.join("\n");
  5570                return (
  5571                  `/Tx BMC q ${m}BT ` +
  5572                  e +
  5573                  ` 1 0 0 1 0 ${(0, n.numberToString)(s)} Tm ${b} ET Q EMC`
  5574                );
  5575              }
  5576              _splitLine(e, t, a, r, n = {}) {
  5577                e = n.line || e;
  5578                const i = n.glyphs || t.charsToGlyphs(e);
  5579                if (i.length <= 1) return [e];
  5580                const s = n.positions || t.getCharPositions(e),
  5581                  o = a / 1e3,
  5582                  c = [];
  5583                let l = -1,
  5584                  h = -1,
  5585                  u = -1,
  5586                  d = 0,
  5587                  f = 0;
  5588                for (let t = 0, a = i.length; t < a; t++) {
  5589                  const [a, n] = s[t],
  5590                    g = i[t],
  5591                    p = g.width * o;
  5592                  if (" " === g.unicode)
  5593                    if (f + p > r) {
  5594                      c.push(e.substring(d, a));
  5595                      d = a;
  5596                      f = p;
  5597                      l = -1;
  5598                      u = -1;
  5599                    } else {
  5600                      f += p;
  5601                      l = a;
  5602                      h = n;
  5603                      u = t;
  5604                    }
  5605                  else if (f + p > r)
  5606                    if (-1 !== l) {
  5607                      c.push(e.substring(d, h));
  5608                      d = h;
  5609                      t = u + 1;
  5610                      l = -1;
  5611                      f = 0;
  5612                    } else {
  5613                      c.push(e.substring(d, a));
  5614                      d = a;
  5615                      f = p;
  5616                    }
  5617                  else f += p;
  5618                }
  5619                d < e.length && c.push(e.substring(d, e.length));
  5620                return c;
  5621              }
  5622              getFieldObject() {
  5623                return {
  5624                  id: this.data.id,
  5625                  value: this.data.fieldValue,
  5626                  defaultValue: this.data.defaultFieldValue || "",
  5627                  multiline: this.data.multiLine,
  5628                  password: this.hasFieldFlag(r.AnnotationFieldFlag.PASSWORD),
  5629                  charLimit: this.data.maxLen,
  5630                  comb: this.data.comb,
  5631                  editable: !this.data.readOnly,
  5632                  hidden: this.data.hidden,
  5633                  name: this.data.fieldName,
  5634                  rect: this.data.rect,
  5635                  actions: this.data.actions,
  5636                  page: this.data.pageIndex,
  5637                  strokeColor: this.data.borderColor,
  5638                  fillColor: this.data.backgroundColor,
  5639                  rotation: this.rotation,
  5640                  type: "text",
  5641                };
  5642              }
  5643            }
  5644            class ButtonWidgetAnnotation extends WidgetAnnotation {
  5645              constructor(e) {
  5646                super(e);
  5647                this.checkedAppearance = null;
  5648                this.uncheckedAppearance = null;
  5649                this.data.checkBox =
  5650                  !this.hasFieldFlag(r.AnnotationFieldFlag.RADIO) &&
  5651                  !this.hasFieldFlag(r.AnnotationFieldFlag.PUSHBUTTON);
  5652                this.data.radioButton =
  5653                  this.hasFieldFlag(r.AnnotationFieldFlag.RADIO) &&
  5654                  !this.hasFieldFlag(r.AnnotationFieldFlag.PUSHBUTTON);
  5655                this.data.pushButton = this.hasFieldFlag(
  5656                  r.AnnotationFieldFlag.PUSHBUTTON,
  5657                );
  5658                this.data.isTooltipOnly = !1;
  5659                if (this.data.checkBox) this._processCheckBox(e);
  5660                else if (this.data.radioButton) this._processRadioButton(e);
  5661                else if (this.data.pushButton) {
  5662                  this.data.hasOwnCanvas = !0;
  5663                  this._processPushButton(e);
  5664                } else
  5665                  (0, r.warn)("Invalid field flags for button widget annotation");
  5666              }
  5667              async getOperatorList(e, t, a, n, i) {
  5668                if (this.data.pushButton)
  5669                  return super.getOperatorList(e, t, a, !1, i);
  5670                let s = null,
  5671                  o = null;
  5672                if (i) {
  5673                  const e = i.get(this.data.id);
  5674                  s = e ? e.value : null;
  5675                  o = e ? e.rotation : null;
  5676                }
  5677                if (null === s && this.appearance)
  5678                  return super.getOperatorList(e, t, a, n, i);
  5679                null == s &&
  5680                  (s = this.data.checkBox
  5681                    ? this.data.fieldValue === this.data.exportValue
  5682                    : this.data.fieldValue === this.data.buttonValue);
  5683                const c = s ? this.checkedAppearance : this.uncheckedAppearance;
  5684                if (c) {
  5685                  const s = this.appearance,
  5686                    l = c.dict.getArray("Matrix") || r.IDENTITY_MATRIX;
  5687                  o && c.dict.set("Matrix", this.getRotationMatrix(i));
  5688                  this.appearance = c;
  5689                  const h = super.getOperatorList(e, t, a, n, i);
  5690                  this.appearance = s;
  5691                  c.dict.set("Matrix", l);
  5692                  return h;
  5693                }
  5694                return {
  5695                  opList: new p.OperatorList(),
  5696                  separateForm: !1,
  5697                  separateCanvas: !1,
  5698                };
  5699              }
  5700              async save(e, t, a) {
  5701                return this.data.checkBox
  5702                  ? this._saveCheckbox(e, t, a)
  5703                  : this.data.radioButton
  5704                    ? this._saveRadioButton(e, t, a)
  5705                    : null;
  5706              }
  5707              async _saveCheckbox(e, t, a) {
  5708                if (!a) return null;
  5709                const n = a.get(this.data.id);
  5710                let i = n?.rotation,
  5711                  o = n?.value;
  5712                if (void 0 === i) {
  5713                  if (void 0 === o) return null;
  5714                  if ((this.data.fieldValue === this.data.exportValue) === o)
  5715                    return null;
  5716                }
  5717                const c = e.xref.fetchIfRef(this.ref);
  5718                if (!(c instanceof s.Dict)) return null;
  5719                void 0 === i && (i = this.rotation);
  5720                void 0 === o &&
  5721                  (o = this.data.fieldValue === this.data.exportValue);
  5722                const l = {
  5723                    path: this.data.fieldName,
  5724                    value: o ? this.data.exportValue : "",
  5725                  },
  5726                  h = s.Name.get(o ? this.data.exportValue : "Off");
  5727                c.set("V", h);
  5728                c.set("AS", h);
  5729                c.set("M", `D:${(0, r.getModificationDate)()}`);
  5730                const u = this._getMKDict(i);
  5731                u && c.set("MK", u);
  5732                const d = [];
  5733                await (0, m.writeObject)(this.ref, c, d, e.xref);
  5734                return [{ ref: this.ref, data: d.join(""), xfa: l }];
  5735              }
  5736              async _saveRadioButton(e, t, a) {
  5737                if (!a) return null;
  5738                const n = a.get(this.data.id);
  5739                let i = n?.rotation,
  5740                  o = n?.value;
  5741                if (void 0 === i) {
  5742                  if (void 0 === o) return null;
  5743                  if ((this.data.fieldValue === this.data.buttonValue) === o)
  5744                    return null;
  5745                }
  5746                const c = e.xref.fetchIfRef(this.ref);
  5747                if (!(c instanceof s.Dict)) return null;
  5748                void 0 === o &&
  5749                  (o = this.data.fieldValue === this.data.buttonValue);
  5750                void 0 === i && (i = this.rotation);
  5751                const l = {
  5752                    path: this.data.fieldName,
  5753                    value: o ? this.data.buttonValue : "",
  5754                  },
  5755                  h = s.Name.get(o ? this.data.buttonValue : "Off"),
  5756                  u = [];
  5757                let d = null;
  5758                if (o)
  5759                  if (this.parent instanceof s.Ref) {
  5760                    const t = e.xref.fetch(this.parent);
  5761                    t.set("V", h);
  5762                    await (0, m.writeObject)(this.parent, t, u, e.xref);
  5763                    d = u.join("");
  5764                    u.length = 0;
  5765                  } else this.parent instanceof s.Dict && this.parent.set("V", h);
  5766                c.set("AS", h);
  5767                c.set("M", `D:${(0, r.getModificationDate)()}`);
  5768                const f = this._getMKDict(i);
  5769                f && c.set("MK", f);
  5770                await (0, m.writeObject)(this.ref, c, u, e.xref);
  5771                const g = [{ ref: this.ref, data: u.join(""), xfa: l }];
  5772                d && g.push({ ref: this.parent, data: d, xfa: null });
  5773                return g;
  5774              }
  5775              _getDefaultCheckedAppearance(e, t) {
  5776                const a = this.data.rect[2] - this.data.rect[0],
  5777                  i = this.data.rect[3] - this.data.rect[1],
  5778                  c = [0, 0, a, i],
  5779                  l = 0.8 * Math.min(a, i);
  5780                let h, u;
  5781                if ("check" === t) {
  5782                  h = { width: 0.755 * l, height: 0.705 * l };
  5783                  u = "3";
  5784                } else if ("disc" === t) {
  5785                  h = { width: 0.791 * l, height: 0.705 * l };
  5786                  u = "l";
  5787                } else
  5788                  (0, r.unreachable)(
  5789                    `_getDefaultCheckedAppearance - unsupported type: ${t}`,
  5790                  );
  5791                const d = `q BT /PdfJsZaDb ${l} Tf 0 g ${(0, n.numberToString)(
  5792                    (a - h.width) / 2,
  5793                  )} ${(0, n.numberToString)(
  5794                    (i - h.height) / 2,
  5795                  )} Td (${u}) Tj ET Q`,
  5796                  f = new s.Dict(e.xref);
  5797                f.set("FormType", 1);
  5798                f.set("Subtype", s.Name.get("Form"));
  5799                f.set("Type", s.Name.get("XObject"));
  5800                f.set("BBox", c);
  5801                f.set("Matrix", [1, 0, 0, 1, 0, 0]);
  5802                f.set("Length", d.length);
  5803                const g = new s.Dict(e.xref),
  5804                  p = new s.Dict(e.xref);
  5805                p.set("PdfJsZaDb", this.fallbackFontDict);
  5806                g.set("Font", p);
  5807                f.set("Resources", g);
  5808                this.checkedAppearance = new o.StringStream(d);
  5809                this.checkedAppearance.dict = f;
  5810                this._streams.push(this.checkedAppearance);
  5811              }
  5812              _processCheckBox(e) {
  5813                const t = e.dict.get("AP");
  5814                if (!(t instanceof s.Dict)) return;
  5815                const a = t.get("N");
  5816                if (!(a instanceof s.Dict)) return;
  5817                const r = this._decodeFormValue(e.dict.get("AS"));
  5818                "string" == typeof r && (this.data.fieldValue = r);
  5819                const n =
  5820                    null !== this.data.fieldValue &&
  5821                    "Off" !== this.data.fieldValue
  5822                      ? this.data.fieldValue
  5823                      : "Yes",
  5824                  i = a.getKeys();
  5825                if (0 === i.length) i.push("Off", n);
  5826                else if (1 === i.length)
  5827                  "Off" === i[0] ? i.push(n) : i.unshift("Off");
  5828                else if (i.includes(n)) {
  5829                  i.length = 0;
  5830                  i.push("Off", n);
  5831                } else {
  5832                  const e = i.find((e) => "Off" !== e);
  5833                  i.length = 0;
  5834                  i.push("Off", e);
  5835                }
  5836                i.includes(this.data.fieldValue) ||
  5837                  (this.data.fieldValue = "Off");
  5838                this.data.exportValue = i[1];
  5839                const o = a.get(this.data.exportValue);
  5840                this.checkedAppearance = o instanceof c.BaseStream ? o : null;
  5841                const l = a.get("Off");
  5842                this.uncheckedAppearance = l instanceof c.BaseStream ? l : null;
  5843                this.checkedAppearance
  5844                  ? this._streams.push(this.checkedAppearance)
  5845                  : this._getDefaultCheckedAppearance(e, "check");
  5846                this.uncheckedAppearance &&
  5847                  this._streams.push(this.uncheckedAppearance);
  5848                this._fallbackFontDict = this.fallbackFontDict;
  5849                null === this.data.defaultFieldValue &&
  5850                  (this.data.defaultFieldValue = "Off");
  5851              }
  5852              _processRadioButton(e) {
  5853                this.data.fieldValue = this.data.buttonValue = null;
  5854                const t = e.dict.get("Parent");
  5855                if (t instanceof s.Dict) {
  5856                  this.parent = e.dict.getRaw("Parent");
  5857                  const a = t.get("V");
  5858                  a instanceof s.Name &&
  5859                    (this.data.fieldValue = this._decodeFormValue(a));
  5860                }
  5861                const a = e.dict.get("AP");
  5862                if (!(a instanceof s.Dict)) return;
  5863                const r = a.get("N");
  5864                if (!(r instanceof s.Dict)) return;
  5865                for (const e of r.getKeys())
  5866                  if ("Off" !== e) {
  5867                    this.data.buttonValue = this._decodeFormValue(e);
  5868                    break;
  5869                  }
  5870                const n = r.get(this.data.buttonValue);
  5871                this.checkedAppearance = n instanceof c.BaseStream ? n : null;
  5872                const i = r.get("Off");
  5873                this.uncheckedAppearance = i instanceof c.BaseStream ? i : null;
  5874                this.checkedAppearance
  5875                  ? this._streams.push(this.checkedAppearance)
  5876                  : this._getDefaultCheckedAppearance(e, "disc");
  5877                this.uncheckedAppearance &&
  5878                  this._streams.push(this.uncheckedAppearance);
  5879                this._fallbackFontDict = this.fallbackFontDict;
  5880                null === this.data.defaultFieldValue &&
  5881                  (this.data.defaultFieldValue = "Off");
  5882              }
  5883              _processPushButton(e) {
  5884                const { dict: t, annotationGlobals: a } = e;
  5885                if (t.has("A") || t.has("AA") || this.data.alternativeText) {
  5886                  this.data.isTooltipOnly = !t.has("A") && !t.has("AA");
  5887                  h.Catalog.parseDestDictionary({
  5888                    destDict: t,
  5889                    resultObj: this.data,
  5890                    docBaseUrl: a.baseUrl,
  5891                    docAttachments: a.attachments,
  5892                  });
  5893                } else
  5894                  (0, r.warn)(
  5895                    "Push buttons without action dictionaries are not supported",
  5896                  );
  5897              }
  5898              getFieldObject() {
  5899                let e,
  5900                  t = "button";
  5901                if (this.data.checkBox) {
  5902                  t = "checkbox";
  5903                  e = this.data.exportValue;
  5904                } else if (this.data.radioButton) {
  5905                  t = "radiobutton";
  5906                  e = this.data.buttonValue;
  5907                }
  5908                return {
  5909                  id: this.data.id,
  5910                  value: this.data.fieldValue || "Off",
  5911                  defaultValue: this.data.defaultFieldValue,
  5912                  exportValues: e,
  5913                  editable: !this.data.readOnly,
  5914                  name: this.data.fieldName,
  5915                  rect: this.data.rect,
  5916                  hidden: this.data.hidden,
  5917                  actions: this.data.actions,
  5918                  page: this.data.pageIndex,
  5919                  strokeColor: this.data.borderColor,
  5920                  fillColor: this.data.backgroundColor,
  5921                  rotation: this.rotation,
  5922                  type: t,
  5923                };
  5924              }
  5925              get fallbackFontDict() {
  5926                const e = new s.Dict();
  5927                e.set("BaseFont", s.Name.get("ZapfDingbats"));
  5928                e.set("Type", s.Name.get("FallbackType"));
  5929                e.set("Subtype", s.Name.get("FallbackType"));
  5930                e.set("Encoding", s.Name.get("ZapfDingbatsEncoding"));
  5931                return (0, r.shadow)(this, "fallbackFontDict", e);
  5932              }
  5933            }
  5934            class ChoiceWidgetAnnotation extends WidgetAnnotation {
  5935              constructor(e) {
  5936                super(e);
  5937                const { dict: t, xref: a } = e;
  5938                this.indices = t.getArray("I");
  5939                this.hasIndices =
  5940                  Array.isArray(this.indices) && this.indices.length > 0;
  5941                this.data.options = [];
  5942                const i = (0, n.getInheritableProperty)({ dict: t, key: "Opt" });
  5943                if (Array.isArray(i))
  5944                  for (let e = 0, t = i.length; e < t; e++) {
  5945                    const t = a.fetchIfRef(i[e]),
  5946                      r = Array.isArray(t);
  5947                    this.data.options[e] = {
  5948                      exportValue: this._decodeFormValue(
  5949                        r ? a.fetchIfRef(t[0]) : t,
  5950                      ),
  5951                      displayValue: this._decodeFormValue(
  5952                        r ? a.fetchIfRef(t[1]) : t,
  5953                      ),
  5954                    };
  5955                  }
  5956                if (this.hasIndices) {
  5957                  this.data.fieldValue = [];
  5958                  const e = this.data.options.length;
  5959                  for (const t of this.indices)
  5960                    Number.isInteger(t) &&
  5961                      t >= 0 &&
  5962                      t < e &&
  5963                      this.data.fieldValue.push(this.data.options[t].exportValue);
  5964                } else
  5965                  "string" == typeof this.data.fieldValue
  5966                    ? (this.data.fieldValue = [this.data.fieldValue])
  5967                    : this.data.fieldValue || (this.data.fieldValue = []);
  5968                this.data.combo = this.hasFieldFlag(r.AnnotationFieldFlag.COMBO);
  5969                this.data.multiSelect = this.hasFieldFlag(
  5970                  r.AnnotationFieldFlag.MULTISELECT,
  5971                );
  5972                this._hasText = !0;
  5973              }
  5974              getFieldObject() {
  5975                const e = this.data.combo ? "combobox" : "listbox",
  5976                  t =
  5977                    this.data.fieldValue.length > 0
  5978                      ? this.data.fieldValue[0]
  5979                      : null;
  5980                return {
  5981                  id: this.data.id,
  5982                  value: t,
  5983                  defaultValue: this.data.defaultFieldValue,
  5984                  editable: !this.data.readOnly,
  5985                  name: this.data.fieldName,
  5986                  rect: this.data.rect,
  5987                  numItems: this.data.fieldValue.length,
  5988                  multipleSelection: this.data.multiSelect,
  5989                  hidden: this.data.hidden,
  5990                  actions: this.data.actions,
  5991                  items: this.data.options,
  5992                  page: this.data.pageIndex,
  5993                  strokeColor: this.data.borderColor,
  5994                  fillColor: this.data.backgroundColor,
  5995                  rotation: this.rotation,
  5996                  type: e,
  5997                };
  5998              }
  5999              amendSavedDict(e, t) {
  6000                if (!this.hasIndices) return;
  6001                let a = e?.get(this.data.id)?.value;
  6002                Array.isArray(a) || (a = [a]);
  6003                const r = [],
  6004                  { options: n } = this.data;
  6005                for (let e = 0, t = 0, i = n.length; e < i; e++)
  6006                  if (n[e].exportValue === a[t]) {
  6007                    r.push(e);
  6008                    t += 1;
  6009                  }
  6010                t.set("I", r);
  6011              }
  6012              async _getAppearance(e, t, a, n) {
  6013                if (this.data.combo) return super._getAppearance(e, t, a, n);
  6014                let s, o;
  6015                const c = n?.get(this.data.id);
  6016                if (c) {
  6017                  o = c.rotation;
  6018                  s = c.value;
  6019                }
  6020                if (void 0 === o && void 0 === s && !this._needAppearances)
  6021                  return null;
  6022                void 0 === s
  6023                  ? (s = this.data.fieldValue)
  6024                  : Array.isArray(s) || (s = [s]);
  6025                let l = this.data.rect[3] - this.data.rect[1],
  6026                  h = this.data.rect[2] - this.data.rect[0];
  6027                (90 !== o && 270 !== o) || ([h, l] = [l, h]);
  6028                const u = this.data.options.length,
  6029                  d = [];
  6030                for (let e = 0; e < u; e++) {
  6031                  const { exportValue: t } = this.data.options[e];
  6032                  s.includes(t) && d.push(e);
  6033                }
  6034                this._defaultAppearance ||
  6035                  (this.data.defaultAppearanceData = (0,
  6036                  i.parseDefaultAppearance)(
  6037                    (this._defaultAppearance = "/Helvetica 0 Tf 0 g"),
  6038                  ));
  6039                const f = await WidgetAnnotation._getFontData(
  6040                  e,
  6041                  t,
  6042                  this.data.defaultAppearanceData,
  6043                  this._fieldResources.mergedResources,
  6044                );
  6045                let g,
  6046                  { fontSize: p } = this.data.defaultAppearanceData;
  6047                if (p) g = this._defaultAppearance;
  6048                else {
  6049                  const e = (l - 1) / u;
  6050                  let t,
  6051                    a = -1;
  6052                  for (const { displayValue: e } of this.data.options) {
  6053                    const r = this._getTextWidth(e, f);
  6054                    if (r > a) {
  6055                      a = r;
  6056                      t = e;
  6057                    }
  6058                  }
  6059                  [g, p] = this._computeFontSize(e, h - 4, t, f, -1);
  6060                }
  6061                const m = p * r.LINE_FACTOR,
  6062                  b = (m - p) / 2,
  6063                  y = Math.floor(l / m);
  6064                let w = 0;
  6065                if (d.length > 0) {
  6066                  const e = Math.min(...d),
  6067                    t = Math.max(...d);
  6068                  w = Math.max(0, t - y + 1);
  6069                  w > e && (w = e);
  6070                }
  6071                const S = Math.min(w + y + 1, u),
  6072                  x = ["/Tx BMC q", `1 1 ${h} ${l} re W n`];
  6073                if (d.length) {
  6074                  x.push("0.600006 0.756866 0.854904 rg");
  6075                  for (const e of d)
  6076                    w <= e &&
  6077                      e < S &&
  6078                      x.push(`1 ${l - (e - w + 1) * m} ${h} ${m} re f`);
  6079                }
  6080                x.push("BT", g, `1 0 0 1 0 ${l} Tm`);
  6081                const C = { shift: 0 };
  6082                for (let e = w; e < S; e++) {
  6083                  const { displayValue: t } = this.data.options[e],
  6084                    a = e === w ? b : 0;
  6085                  x.push(this._renderText(t, f, p, h, 0, C, 2, -m + a));
  6086                }
  6087                x.push("ET Q EMC");
  6088                return x.join("\n");
  6089              }
  6090            }
  6091            class SignatureWidgetAnnotation extends WidgetAnnotation {
  6092              constructor(e) {
  6093                super(e);
  6094                this.data.fieldValue = null;
  6095                this.data.hasOwnCanvas = this.data.noRotate;
  6096              }
  6097              getFieldObject() {
  6098                return {
  6099                  id: this.data.id,
  6100                  value: null,
  6101                  page: this.data.pageIndex,
  6102                  type: "signature",
  6103                };
  6104              }
  6105            }
  6106            class TextAnnotation extends MarkupAnnotation {
  6107              constructor(e) {
  6108                super(e);
  6109                this.data.noRotate = !0;
  6110                this.data.hasOwnCanvas = this.data.noRotate;
  6111                const { dict: t } = e;
  6112                this.data.annotationType = r.AnnotationType.TEXT;
  6113                if (this.data.hasAppearance) this.data.name = "NoIcon";
  6114                else {
  6115                  this.data.rect[1] = this.data.rect[3] - 22;
  6116                  this.data.rect[2] = this.data.rect[0] + 22;
  6117                  this.data.name = t.has("Name") ? t.get("Name").name : "Note";
  6118                }
  6119                if (t.has("State")) {
  6120                  this.data.state = t.get("State") || null;
  6121                  this.data.stateModel = t.get("StateModel") || null;
  6122                } else {
  6123                  this.data.state = null;
  6124                  this.data.stateModel = null;
  6125                }
  6126              }
  6127            }
  6128            class LinkAnnotation extends Annotation {
  6129              constructor(e) {
  6130                super(e);
  6131                const { dict: t, annotationGlobals: a } = e;
  6132                this.data.annotationType = r.AnnotationType.LINK;
  6133                const n = getQuadPoints(t, this.rectangle);
  6134                n && (this.data.quadPoints = n);
  6135                this.data.borderColor ||= this.data.color;
  6136                h.Catalog.parseDestDictionary({
  6137                  destDict: t,
  6138                  resultObj: this.data,
  6139                  docBaseUrl: a.baseUrl,
  6140                  docAttachments: a.attachments,
  6141                });
  6142              }
  6143            }
  6144            class PopupAnnotation extends Annotation {
  6145              constructor(e) {
  6146                super(e);
  6147                const { dict: t } = e;
  6148                this.data.annotationType = r.AnnotationType.POPUP;
  6149                (this.data.rect[0] !== this.data.rect[2] &&
  6150                  this.data.rect[1] !== this.data.rect[3]) ||
  6151                  (this.data.rect = null);
  6152                let a = t.get("Parent");
  6153                if (!a) {
  6154                  (0, r.warn)(
  6155                    "Popup annotation has a missing or invalid parent annotation.",
  6156                  );
  6157                  return;
  6158                }
  6159                const n = a.getArray("Rect");
  6160                this.data.parentRect =
  6161                  Array.isArray(n) && 4 === n.length
  6162                    ? r.Util.normalizeRect(n)
  6163                    : null;
  6164                const i = a.get("RT");
  6165                (0, s.isName)(i, r.AnnotationReplyType.GROUP) &&
  6166                  (a = a.get("IRT"));
  6167                if (a.has("M")) {
  6168                  this.setModificationDate(a.get("M"));
  6169                  this.data.modificationDate = this.modificationDate;
  6170                } else this.data.modificationDate = null;
  6171                if (a.has("C")) {
  6172                  this.setColor(a.getArray("C"));
  6173                  this.data.color = this.color;
  6174                } else this.data.color = null;
  6175                if (!this.viewable) {
  6176                  const e = a.get("F");
  6177                  this._isViewable(e) && this.setFlags(e);
  6178                }
  6179                this.setTitle(a.get("T"));
  6180                this.data.titleObj = this._title;
  6181                this.setContents(a.get("Contents"));
  6182                this.data.contentsObj = this._contents;
  6183                a.has("RC") &&
  6184                  (this.data.richText = b.XFAFactory.getRichTextAsHtml(
  6185                    a.get("RC"),
  6186                  ));
  6187                this.data.open = !!t.get("Open");
  6188              }
  6189            }
  6190            t.PopupAnnotation = PopupAnnotation;
  6191            class FreeTextAnnotation extends MarkupAnnotation {
  6192              constructor(e) {
  6193                super(e);
  6194                this.data.hasOwnCanvas = !0;
  6195                const { evaluatorOptions: t, xref: a } = e;
  6196                this.data.annotationType = r.AnnotationType.FREETEXT;
  6197                this.setDefaultAppearance(e);
  6198                if (this.appearance) {
  6199                  const { fontColor: e, fontSize: r } = (0,
  6200                  i.parseAppearanceStream)(this.appearance, t, a);
  6201                  this.data.defaultAppearanceData.fontColor = e;
  6202                  this.data.defaultAppearanceData.fontSize = r || 10;
  6203                } else if (this._isOffscreenCanvasSupported) {
  6204                  const t = e.dict.get("CA"),
  6205                    r = new i.FakeUnicodeFont(a, "sans-serif");
  6206                  this.data.defaultAppearanceData.fontSize ||= 10;
  6207                  const { fontColor: n, fontSize: s } =
  6208                    this.data.defaultAppearanceData;
  6209                  this.appearance = r.createAppearance(
  6210                    this._contents.str,
  6211                    this.rectangle,
  6212                    this.rotation,
  6213                    s,
  6214                    n,
  6215                    t,
  6216                  );
  6217                  this._streams.push(
  6218                    this.appearance,
  6219                    i.FakeUnicodeFont.toUnicodeStream,
  6220                  );
  6221                } else
  6222                  (0, r.warn)(
  6223                    "FreeTextAnnotation: OffscreenCanvas is not supported, annotation may not render correctly.",
  6224                  );
  6225              }
  6226              get hasTextContent() {
  6227                return !!this.appearance;
  6228              }
  6229              static createNewDict(e, t, { apRef: a, ap: o }) {
  6230                const {
  6231                    color: c,
  6232                    fontSize: l,
  6233                    rect: h,
  6234                    rotation: u,
  6235                    user: d,
  6236                    value: f,
  6237                  } = e,
  6238                  g = new s.Dict(t);
  6239                g.set("Type", s.Name.get("Annot"));
  6240                g.set("Subtype", s.Name.get("FreeText"));
  6241                g.set("CreationDate", `D:${(0, r.getModificationDate)()}`);
  6242                g.set("Rect", h);
  6243                const p = `/Helv ${l} Tf ${(0, i.getPdfColor)(c, !0)}`;
  6244                g.set("DA", p);
  6245                g.set(
  6246                  "Contents",
  6247                  (0, n.isAscii)(f) ? f : (0, n.stringToUTF16String)(f, !0),
  6248                );
  6249                g.set("F", 4);
  6250                g.set("Border", [0, 0, 0]);
  6251                g.set("Rotate", u);
  6252                d &&
  6253                  g.set(
  6254                    "T",
  6255                    (0, n.isAscii)(d) ? d : (0, n.stringToUTF16String)(d, !0),
  6256                  );
  6257                if (a || o) {
  6258                  const e = new s.Dict(t);
  6259                  g.set("AP", e);
  6260                  a ? e.set("N", a) : e.set("N", o);
  6261                }
  6262                return g;
  6263              }
  6264              static async createNewAppearanceStream(e, t, a) {
  6265                const { baseFontRef: c, evaluator: l, task: h } = a,
  6266                  { color: u, fontSize: d, rect: f, rotation: g, value: p } = e,
  6267                  m = new s.Dict(t),
  6268                  b = new s.Dict(t);
  6269                if (c) b.set("Helv", c);
  6270                else {
  6271                  const e = new s.Dict(t);
  6272                  e.set("BaseFont", s.Name.get("Helvetica"));
  6273                  e.set("Type", s.Name.get("Font"));
  6274                  e.set("Subtype", s.Name.get("Type1"));
  6275                  e.set("Encoding", s.Name.get("WinAnsiEncoding"));
  6276                  b.set("Helv", e);
  6277                }
  6278                m.set("Font", b);
  6279                const y = await WidgetAnnotation._getFontData(
  6280                    l,
  6281                    h,
  6282                    { fontName: "Helv", fontSize: d },
  6283                    m,
  6284                  ),
  6285                  [w, S, x, C] = f;
  6286                let k = x - w,
  6287                  v = C - S;
  6288                g % 180 != 0 && ([k, v] = [v, k]);
  6289                const F = p.split("\n"),
  6290                  O = d / 1e3;
  6291                let T = -1 / 0;
  6292                const M = [];
  6293                for (let e of F) {
  6294                  const t = y.encodeString(e);
  6295                  if (t.length > 1) return null;
  6296                  e = t.join("");
  6297                  M.push(e);
  6298                  let a = 0;
  6299                  const r = y.charsToGlyphs(e);
  6300                  for (const e of r) a += e.width * O;
  6301                  T = Math.max(T, a);
  6302                }
  6303                let D = 1;
  6304                T > k && (D = k / T);
  6305                let E = 1;
  6306                const N = r.LINE_FACTOR * d,
  6307                  R = (r.LINE_FACTOR - r.LINE_DESCENT_FACTOR) * d,
  6308                  L = N * F.length;
  6309                L > v && (E = v / L);
  6310                const $ = d * Math.min(D, E);
  6311                let _, j, U;
  6312                switch (g) {
  6313                  case 0:
  6314                    U = [1, 0, 0, 1];
  6315                    j = [f[0], f[1], k, v];
  6316                    _ = [f[0], f[3] - R];
  6317                    break;
  6318                  case 90:
  6319                    U = [0, 1, -1, 0];
  6320                    j = [f[1], -f[2], k, v];
  6321                    _ = [f[1], -f[0] - R];
  6322                    break;
  6323                  case 180:
  6324                    U = [-1, 0, 0, -1];
  6325                    j = [-f[2], -f[3], k, v];
  6326                    _ = [-f[2], -f[1] - R];
  6327                    break;
  6328                  case 270:
  6329                    U = [0, -1, 1, 0];
  6330                    j = [-f[3], f[0], k, v];
  6331                    _ = [-f[3], f[2] - R];
  6332                }
  6333                const X = [
  6334                  "q",
  6335                  `${U.join(" ")} 0 0 cm`,
  6336                  `${j.join(" ")} re W n`,
  6337                  "BT",
  6338                  `${(0, i.getPdfColor)(u, !0)}`,
  6339                  `0 Tc /Helv ${(0, n.numberToString)($)} Tf`,
  6340                ];
  6341                X.push(`${_.join(" ")} Td (${(0, n.escapeString)(M[0])}) Tj`);
  6342                const H = (0, n.numberToString)(N);
  6343                for (let e = 1, t = M.length; e < t; e++) {
  6344                  const t = M[e];
  6345                  X.push(`0 -${H} Td (${(0, n.escapeString)(t)}) Tj`);
  6346                }
  6347                X.push("ET", "Q");
  6348                const q = X.join("\n"),
  6349                  z = new s.Dict(t);
  6350                z.set("FormType", 1);
  6351                z.set("Subtype", s.Name.get("Form"));
  6352                z.set("Type", s.Name.get("XObject"));
  6353                z.set("BBox", f);
  6354                z.set("Resources", m);
  6355                z.set("Matrix", [1, 0, 0, 1, -f[0], -f[1]]);
  6356                const W = new o.StringStream(q);
  6357                W.dict = z;
  6358                return W;
  6359              }
  6360            }
  6361            class LineAnnotation extends MarkupAnnotation {
  6362              constructor(e) {
  6363                super(e);
  6364                const { dict: t, xref: a } = e;
  6365                this.data.annotationType = r.AnnotationType.LINE;
  6366                this.data.hasOwnCanvas = this.data.noRotate;
  6367                const n = t.getArray("L");
  6368                this.data.lineCoordinates = r.Util.normalizeRect(n);
  6369                this.setLineEndings(t.getArray("LE"));
  6370                this.data.lineEndings = this.lineEndings;
  6371                if (!this.appearance) {
  6372                  const e = this.color ? getPdfColorArray(this.color) : [0, 0, 0],
  6373                    i = t.get("CA"),
  6374                    s = getRgbColor(t.getArray("IC"), null),
  6375                    o = s ? getPdfColorArray(s) : null,
  6376                    c = o ? i : null,
  6377                    l = this.borderStyle.width || 1,
  6378                    h = 2 * l,
  6379                    u = [
  6380                      this.data.lineCoordinates[0] - h,
  6381                      this.data.lineCoordinates[1] - h,
  6382                      this.data.lineCoordinates[2] + h,
  6383                      this.data.lineCoordinates[3] + h,
  6384                    ];
  6385                  r.Util.intersect(this.rectangle, u) || (this.rectangle = u);
  6386                  this._setDefaultAppearance({
  6387                    xref: a,
  6388                    extra: `${l} w`,
  6389                    strokeColor: e,
  6390                    fillColor: o,
  6391                    strokeAlpha: i,
  6392                    fillAlpha: c,
  6393                    pointsCallback: (e, t) => {
  6394                      e.push(`${n[0]} ${n[1]} m`, `${n[2]} ${n[3]} l`, "S");
  6395                      return [t[0].x - l, t[1].x + l, t[3].y - l, t[1].y + l];
  6396                    },
  6397                  });
  6398                }
  6399              }
  6400            }
  6401            class SquareAnnotation extends MarkupAnnotation {
  6402              constructor(e) {
  6403                super(e);
  6404                const { dict: t, xref: a } = e;
  6405                this.data.annotationType = r.AnnotationType.SQUARE;
  6406                this.data.hasOwnCanvas = this.data.noRotate;
  6407                if (!this.appearance) {
  6408                  const e = this.color ? getPdfColorArray(this.color) : [0, 0, 0],
  6409                    r = t.get("CA"),
  6410                    n = getRgbColor(t.getArray("IC"), null),
  6411                    i = n ? getPdfColorArray(n) : null,
  6412                    s = i ? r : null;
  6413                  if (0 === this.borderStyle.width && !i) return;
  6414                  this._setDefaultAppearance({
  6415                    xref: a,
  6416                    extra: `${this.borderStyle.width} w`,
  6417                    strokeColor: e,
  6418                    fillColor: i,
  6419                    strokeAlpha: r,
  6420                    fillAlpha: s,
  6421                    pointsCallback: (e, t) => {
  6422                      const a = t[2].x + this.borderStyle.width / 2,
  6423                        r = t[2].y + this.borderStyle.width / 2,
  6424                        n = t[3].x - t[2].x - this.borderStyle.width,
  6425                        s = t[1].y - t[3].y - this.borderStyle.width;
  6426                      e.push(`${a} ${r} ${n} ${s} re`);
  6427                      i ? e.push("B") : e.push("S");
  6428                      return [t[0].x, t[1].x, t[3].y, t[1].y];
  6429                    },
  6430                  });
  6431                }
  6432              }
  6433            }
  6434            class CircleAnnotation extends MarkupAnnotation {
  6435              constructor(e) {
  6436                super(e);
  6437                const { dict: t, xref: a } = e;
  6438                this.data.annotationType = r.AnnotationType.CIRCLE;
  6439                if (!this.appearance) {
  6440                  const e = this.color ? getPdfColorArray(this.color) : [0, 0, 0],
  6441                    r = t.get("CA"),
  6442                    n = getRgbColor(t.getArray("IC"), null),
  6443                    i = n ? getPdfColorArray(n) : null,
  6444                    s = i ? r : null;
  6445                  if (0 === this.borderStyle.width && !i) return;
  6446                  const o = (4 / 3) * Math.tan(Math.PI / 8);
  6447                  this._setDefaultAppearance({
  6448                    xref: a,
  6449                    extra: `${this.borderStyle.width} w`,
  6450                    strokeColor: e,
  6451                    fillColor: i,
  6452                    strokeAlpha: r,
  6453                    fillAlpha: s,
  6454                    pointsCallback: (e, t) => {
  6455                      const a = t[0].x + this.borderStyle.width / 2,
  6456                        r = t[0].y - this.borderStyle.width / 2,
  6457                        n = t[3].x - this.borderStyle.width / 2,
  6458                        s = t[3].y + this.borderStyle.width / 2,
  6459                        c = a + (n - a) / 2,
  6460                        l = r + (s - r) / 2,
  6461                        h = ((n - a) / 2) * o,
  6462                        u = ((s - r) / 2) * o;
  6463                      e.push(
  6464                        `${c} ${s} m`,
  6465                        `${c + h} ${s} ${n} ${l + u} ${n} ${l} c`,
  6466                        `${n} ${l - u} ${c + h} ${r} ${c} ${r} c`,
  6467                        `${c - h} ${r} ${a} ${l - u} ${a} ${l} c`,
  6468                        `${a} ${l + u} ${c - h} ${s} ${c} ${s} c`,
  6469                        "h",
  6470                      );
  6471                      i ? e.push("B") : e.push("S");
  6472                      return [t[0].x, t[1].x, t[3].y, t[1].y];
  6473                    },
  6474                  });
  6475                }
  6476              }
  6477            }
  6478            class PolylineAnnotation extends MarkupAnnotation {
  6479              constructor(e) {
  6480                super(e);
  6481                const { dict: t, xref: a } = e;
  6482                this.data.annotationType = r.AnnotationType.POLYLINE;
  6483                this.data.hasOwnCanvas = this.data.noRotate;
  6484                this.data.vertices = [];
  6485                if (!(this instanceof PolygonAnnotation)) {
  6486                  this.setLineEndings(t.getArray("LE"));
  6487                  this.data.lineEndings = this.lineEndings;
  6488                }
  6489                const n = t.getArray("Vertices");
  6490                if (Array.isArray(n)) {
  6491                  for (let e = 0, t = n.length; e < t; e += 2)
  6492                    this.data.vertices.push({ x: n[e], y: n[e + 1] });
  6493                  if (!this.appearance) {
  6494                    const e = this.color
  6495                        ? getPdfColorArray(this.color)
  6496                        : [0, 0, 0],
  6497                      n = t.get("CA"),
  6498                      i = this.borderStyle.width || 1,
  6499                      s = 2 * i,
  6500                      o = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
  6501                    for (const e of this.data.vertices) {
  6502                      o[0] = Math.min(o[0], e.x - s);
  6503                      o[1] = Math.min(o[1], e.y - s);
  6504                      o[2] = Math.max(o[2], e.x + s);
  6505                      o[3] = Math.max(o[3], e.y + s);
  6506                    }
  6507                    r.Util.intersect(this.rectangle, o) || (this.rectangle = o);
  6508                    this._setDefaultAppearance({
  6509                      xref: a,
  6510                      extra: `${i} w`,
  6511                      strokeColor: e,
  6512                      strokeAlpha: n,
  6513                      pointsCallback: (e, t) => {
  6514                        const a = this.data.vertices;
  6515                        for (let t = 0, r = a.length; t < r; t++)
  6516                          e.push(`${a[t].x} ${a[t].y} ${0 === t ? "m" : "l"}`);
  6517                        e.push("S");
  6518                        return [t[0].x, t[1].x, t[3].y, t[1].y];
  6519                      },
  6520                    });
  6521                  }
  6522                }
  6523              }
  6524            }
  6525            class PolygonAnnotation extends PolylineAnnotation {
  6526              constructor(e) {
  6527                super(e);
  6528                this.data.annotationType = r.AnnotationType.POLYGON;
  6529              }
  6530            }
  6531            class CaretAnnotation extends MarkupAnnotation {
  6532              constructor(e) {
  6533                super(e);
  6534                this.data.annotationType = r.AnnotationType.CARET;
  6535              }
  6536            }
  6537            class InkAnnotation extends MarkupAnnotation {
  6538              constructor(e) {
  6539                super(e);
  6540                this.data.hasOwnCanvas = this.data.noRotate;
  6541                const { dict: t, xref: a } = e;
  6542                this.data.annotationType = r.AnnotationType.INK;
  6543                this.data.inkLists = [];
  6544                const n = t.getArray("InkList");
  6545                if (Array.isArray(n)) {
  6546                  for (let e = 0, t = n.length; e < t; ++e) {
  6547                    this.data.inkLists.push([]);
  6548                    for (let t = 0, r = n[e].length; t < r; t += 2)
  6549                      this.data.inkLists[e].push({
  6550                        x: a.fetchIfRef(n[e][t]),
  6551                        y: a.fetchIfRef(n[e][t + 1]),
  6552                      });
  6553                  }
  6554                  if (!this.appearance) {
  6555                    const e = this.color
  6556                        ? getPdfColorArray(this.color)
  6557                        : [0, 0, 0],
  6558                      n = t.get("CA"),
  6559                      i = this.borderStyle.width || 1,
  6560                      s = 2 * i,
  6561                      o = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
  6562                    for (const e of this.data.inkLists)
  6563                      for (const t of e) {
  6564                        o[0] = Math.min(o[0], t.x - s);
  6565                        o[1] = Math.min(o[1], t.y - s);
  6566                        o[2] = Math.max(o[2], t.x + s);
  6567                        o[3] = Math.max(o[3], t.y + s);
  6568                      }
  6569                    r.Util.intersect(this.rectangle, o) || (this.rectangle = o);
  6570                    this._setDefaultAppearance({
  6571                      xref: a,
  6572                      extra: `${i} w`,
  6573                      strokeColor: e,
  6574                      strokeAlpha: n,
  6575                      pointsCallback: (e, t) => {
  6576                        for (const t of this.data.inkLists) {
  6577                          for (let a = 0, r = t.length; a < r; a++)
  6578                            e.push(`${t[a].x} ${t[a].y} ${0 === a ? "m" : "l"}`);
  6579                          e.push("S");
  6580                        }
  6581                        return [t[0].x, t[1].x, t[3].y, t[1].y];
  6582                      },
  6583                    });
  6584                  }
  6585                }
  6586              }
  6587              static createNewDict(e, t, { apRef: a, ap: n }) {
  6588                const {
  6589                    color: i,
  6590                    opacity: o,
  6591                    paths: c,
  6592                    rect: l,
  6593                    rotation: h,
  6594                    thickness: u,
  6595                  } = e,
  6596                  d = new s.Dict(t);
  6597                d.set("Type", s.Name.get("Annot"));
  6598                d.set("Subtype", s.Name.get("Ink"));
  6599                d.set("CreationDate", `D:${(0, r.getModificationDate)()}`);
  6600                d.set("Rect", l);
  6601                d.set(
  6602                  "InkList",
  6603                  c.map((e) => e.points),
  6604                );
  6605                d.set("F", 4);
  6606                d.set("Rotate", h);
  6607                const f = new s.Dict(t);
  6608                d.set("BS", f);
  6609                f.set("W", u);
  6610                d.set(
  6611                  "C",
  6612                  Array.from(i, (e) => e / 255),
  6613                );
  6614                d.set("CA", o);
  6615                const g = new s.Dict(t);
  6616                d.set("AP", g);
  6617                a ? g.set("N", a) : g.set("N", n);
  6618                return d;
  6619              }
  6620              static async createNewAppearanceStream(e, t, a) {
  6621                const {
  6622                    color: r,
  6623                    rect: c,
  6624                    paths: l,
  6625                    thickness: h,
  6626                    opacity: u,
  6627                  } = e,
  6628                  d = [`${h} w 1 J 1 j`, `${(0, i.getPdfColor)(r, !1)}`];
  6629                1 !== u && d.push("/R0 gs");
  6630                const f = [];
  6631                for (const { bezier: e } of l) {
  6632                  f.length = 0;
  6633                  f.push(
  6634                    `${(0, n.numberToString)(e[0])} ${(0, n.numberToString)(
  6635                      e[1],
  6636                    )} m`,
  6637                  );
  6638                  for (let t = 2, a = e.length; t < a; t += 6) {
  6639                    const a = e
  6640                      .slice(t, t + 6)
  6641                      .map(n.numberToString)
  6642                      .join(" ");
  6643                    f.push(`${a} c`);
  6644                  }
  6645                  f.push("S");
  6646                  d.push(f.join("\n"));
  6647                }
  6648                const g = d.join("\n"),
  6649                  p = new s.Dict(t);
  6650                p.set("FormType", 1);
  6651                p.set("Subtype", s.Name.get("Form"));
  6652                p.set("Type", s.Name.get("XObject"));
  6653                p.set("BBox", c);
  6654                p.set("Length", g.length);
  6655                if (1 !== u) {
  6656                  const e = new s.Dict(t),
  6657                    a = new s.Dict(t),
  6658                    r = new s.Dict(t);
  6659                  r.set("CA", u);
  6660                  r.set("Type", s.Name.get("ExtGState"));
  6661                  a.set("R0", r);
  6662                  e.set("ExtGState", a);
  6663                  p.set("Resources", e);
  6664                }
  6665                const m = new o.StringStream(g);
  6666                m.dict = p;
  6667                return m;
  6668              }
  6669            }
  6670            class HighlightAnnotation extends MarkupAnnotation {
  6671              constructor(e) {
  6672                super(e);
  6673                const { dict: t, xref: a } = e;
  6674                this.data.annotationType = r.AnnotationType.HIGHLIGHT;
  6675                if ((this.data.quadPoints = getQuadPoints(t, null))) {
  6676                  const e = this.appearance?.dict.get("Resources");
  6677                  if (!this.appearance || !e?.has("ExtGState")) {
  6678                    this.appearance &&
  6679                      (0, r.warn)(
  6680                        "HighlightAnnotation - ignoring built-in appearance stream.",
  6681                      );
  6682                    const e = this.color
  6683                        ? getPdfColorArray(this.color)
  6684                        : [1, 1, 0],
  6685                      n = t.get("CA");
  6686                    this._setDefaultAppearance({
  6687                      xref: a,
  6688                      fillColor: e,
  6689                      blendMode: "Multiply",
  6690                      fillAlpha: n,
  6691                      pointsCallback: (e, t) => {
  6692                        e.push(
  6693                          `${t[0].x} ${t[0].y} m`,
  6694                          `${t[1].x} ${t[1].y} l`,
  6695                          `${t[3].x} ${t[3].y} l`,
  6696                          `${t[2].x} ${t[2].y} l`,
  6697                          "f",
  6698                        );
  6699                        return [t[0].x, t[1].x, t[3].y, t[1].y];
  6700                      },
  6701                    });
  6702                  }
  6703                } else this.data.popupRef = null;
  6704              }
  6705            }
  6706            class UnderlineAnnotation extends MarkupAnnotation {
  6707              constructor(e) {
  6708                super(e);
  6709                const { dict: t, xref: a } = e;
  6710                this.data.annotationType = r.AnnotationType.UNDERLINE;
  6711                if ((this.data.quadPoints = getQuadPoints(t, null))) {
  6712                  if (!this.appearance) {
  6713                    const e = this.color
  6714                        ? getPdfColorArray(this.color)
  6715                        : [0, 0, 0],
  6716                      r = t.get("CA");
  6717                    this._setDefaultAppearance({
  6718                      xref: a,
  6719                      extra: "[] 0 d 0.571 w",
  6720                      strokeColor: e,
  6721                      strokeAlpha: r,
  6722                      pointsCallback: (e, t) => {
  6723                        e.push(
  6724                          `${t[2].x} ${t[2].y + 1.3} m`,
  6725                          `${t[3].x} ${t[3].y + 1.3} l`,
  6726                          "S",
  6727                        );
  6728                        return [t[0].x, t[1].x, t[3].y, t[1].y];
  6729                      },
  6730                    });
  6731                  }
  6732                } else this.data.popupRef = null;
  6733              }
  6734            }
  6735            class SquigglyAnnotation extends MarkupAnnotation {
  6736              constructor(e) {
  6737                super(e);
  6738                const { dict: t, xref: a } = e;
  6739                this.data.annotationType = r.AnnotationType.SQUIGGLY;
  6740                if ((this.data.quadPoints = getQuadPoints(t, null))) {
  6741                  if (!this.appearance) {
  6742                    const e = this.color
  6743                        ? getPdfColorArray(this.color)
  6744                        : [0, 0, 0],
  6745                      r = t.get("CA");
  6746                    this._setDefaultAppearance({
  6747                      xref: a,
  6748                      extra: "[] 0 d 1 w",
  6749                      strokeColor: e,
  6750                      strokeAlpha: r,
  6751                      pointsCallback: (e, t) => {
  6752                        const a = (t[0].y - t[2].y) / 6;
  6753                        let r = a,
  6754                          n = t[2].x;
  6755                        const i = t[2].y,
  6756                          s = t[3].x;
  6757                        e.push(`${n} ${i + r} m`);
  6758                        do {
  6759                          n += 2;
  6760                          r = 0 === r ? a : 0;
  6761                          e.push(`${n} ${i + r} l`);
  6762                        } while (n < s);
  6763                        e.push("S");
  6764                        return [t[2].x, s, i - 2 * a, i + 2 * a];
  6765                      },
  6766                    });
  6767                  }
  6768                } else this.data.popupRef = null;
  6769              }
  6770            }
  6771            class StrikeOutAnnotation extends MarkupAnnotation {
  6772              constructor(e) {
  6773                super(e);
  6774                const { dict: t, xref: a } = e;
  6775                this.data.annotationType = r.AnnotationType.STRIKEOUT;
  6776                if ((this.data.quadPoints = getQuadPoints(t, null))) {
  6777                  if (!this.appearance) {
  6778                    const e = this.color
  6779                        ? getPdfColorArray(this.color)
  6780                        : [0, 0, 0],
  6781                      r = t.get("CA");
  6782                    this._setDefaultAppearance({
  6783                      xref: a,
  6784                      extra: "[] 0 d 1 w",
  6785                      strokeColor: e,
  6786                      strokeAlpha: r,
  6787                      pointsCallback: (e, t) => {
  6788                        e.push(
  6789                          (t[0].x + t[2].x) / 2 +
  6790                            " " +
  6791                            (t[0].y + t[2].y) / 2 +
  6792                            " m",
  6793                          (t[1].x + t[3].x) / 2 +
  6794                            " " +
  6795                            (t[1].y + t[3].y) / 2 +
  6796                            " l",
  6797                          "S",
  6798                        );
  6799                        return [t[0].x, t[1].x, t[3].y, t[1].y];
  6800                      },
  6801                    });
  6802                  }
  6803                } else this.data.popupRef = null;
  6804              }
  6805            }
  6806            class StampAnnotation extends MarkupAnnotation {
  6807              constructor(e) {
  6808                super(e);
  6809                this.data.annotationType = r.AnnotationType.STAMP;
  6810                this.data.hasOwnCanvas = this.data.noRotate;
  6811              }
  6812              static async createImage(e, t) {
  6813                const { width: a, height: n } = e,
  6814                  i = new OffscreenCanvas(a, n),
  6815                  c = i.getContext("2d", { alpha: !0 });
  6816                c.drawImage(e, 0, 0);
  6817                const l = c.getImageData(0, 0, a, n).data,
  6818                  h = new Uint32Array(l.buffer),
  6819                  u = h.some(
  6820                    r.FeatureTest.isLittleEndian
  6821                      ? (e) => e >>> 24 != 255
  6822                      : (e) => 255 != (255 & e),
  6823                  );
  6824                if (u) {
  6825                  c.fillStyle = "white";
  6826                  c.fillRect(0, 0, a, n);
  6827                  c.drawImage(e, 0, 0);
  6828                }
  6829                const d = i
  6830                    .convertToBlob({ type: "image/jpeg", quality: 1 })
  6831                    .then((e) => e.arrayBuffer()),
  6832                  f = s.Name.get("XObject"),
  6833                  g = s.Name.get("Image"),
  6834                  p = new s.Dict(t);
  6835                p.set("Type", f);
  6836                p.set("Subtype", g);
  6837                p.set("BitsPerComponent", 8);
  6838                p.set("ColorSpace", s.Name.get("DeviceRGB"));
  6839                p.set("Filter", s.Name.get("DCTDecode"));
  6840                p.set("BBox", [0, 0, a, n]);
  6841                p.set("Width", a);
  6842                p.set("Height", n);
  6843                let m = null;
  6844                if (u) {
  6845                  const e = new Uint8Array(h.length);
  6846                  if (r.FeatureTest.isLittleEndian)
  6847                    for (let t = 0, a = h.length; t < a; t++) e[t] = h[t] >>> 24;
  6848                  else
  6849                    for (let t = 0, a = h.length; t < a; t++) e[t] = 255 & h[t];
  6850                  const i = new s.Dict(t);
  6851                  i.set("Type", f);
  6852                  i.set("Subtype", g);
  6853                  i.set("BitsPerComponent", 8);
  6854                  i.set("ColorSpace", s.Name.get("DeviceGray"));
  6855                  i.set("Width", a);
  6856                  i.set("Height", n);
  6857                  m = new o.Stream(e, 0, 0, i);
  6858                }
  6859                return {
  6860                  imageStream: new o.Stream(await d, 0, 0, p),
  6861                  smaskStream: m,
  6862                  width: a,
  6863                  height: n,
  6864                };
  6865              }
  6866              static createNewDict(e, t, { apRef: a, ap: i }) {
  6867                const { rect: o, rotation: c, user: l } = e,
  6868                  h = new s.Dict(t);
  6869                h.set("Type", s.Name.get("Annot"));
  6870                h.set("Subtype", s.Name.get("Stamp"));
  6871                h.set("CreationDate", `D:${(0, r.getModificationDate)()}`);
  6872                h.set("Rect", o);
  6873                h.set("F", 4);
  6874                h.set("Border", [0, 0, 0]);
  6875                h.set("Rotate", c);
  6876                l &&
  6877                  h.set(
  6878                    "T",
  6879                    (0, n.isAscii)(l) ? l : (0, n.stringToUTF16String)(l, !0),
  6880                  );
  6881                if (a || i) {
  6882                  const e = new s.Dict(t);
  6883                  h.set("AP", e);
  6884                  a ? e.set("N", a) : e.set("N", i);
  6885                }
  6886                return h;
  6887              }
  6888              static async createNewAppearanceStream(e, t, a) {
  6889                const { rotation: r } = e,
  6890                  { imageRef: i, width: c, height: l } = a.image,
  6891                  h = new s.Dict(t),
  6892                  u = new s.Dict(t);
  6893                h.set("XObject", u);
  6894                u.set("Im0", i);
  6895                const d = `q ${c} 0 0 ${l} 0 0 cm /Im0 Do Q`,
  6896                  f = new s.Dict(t);
  6897                f.set("FormType", 1);
  6898                f.set("Subtype", s.Name.get("Form"));
  6899                f.set("Type", s.Name.get("XObject"));
  6900                f.set("BBox", [0, 0, c, l]);
  6901                f.set("Resources", h);
  6902                if (r) {
  6903                  const e = (0, n.getRotationMatrix)(r, c, l);
  6904                  f.set("Matrix", e);
  6905                }
  6906                const g = new o.StringStream(d);
  6907                g.dict = f;
  6908                return g;
  6909              }
  6910            }
  6911            class FileAttachmentAnnotation extends MarkupAnnotation {
  6912              constructor(e) {
  6913                super(e);
  6914                const { dict: t, xref: a } = e,
  6915                  n = new d.FileSpec(t.get("FS"), a);
  6916                this.data.annotationType = r.AnnotationType.FILEATTACHMENT;
  6917                this.data.hasOwnCanvas = this.data.noRotate;
  6918                this.data.file = n.serializable;
  6919                const i = t.get("Name");
  6920                this.data.name =
  6921                  i instanceof s.Name
  6922                    ? (0, r.stringToPDFString)(i.name)
  6923                    : "PushPin";
  6924                const o = t.get("ca");
  6925                this.data.fillAlpha =
  6926                  "number" == typeof o && o >= 0 && o <= 1 ? o : null;
  6927              }
  6928            }
  6929          },
  6930          (e, t, a) => {
  6931            Object.defineProperty(t, "__esModule", { value: !0 });
  6932            t.FakeUnicodeFont = void 0;
  6933            t.createDefaultAppearance = function createDefaultAppearance({
  6934              fontSize: e,
  6935              fontName: t,
  6936              fontColor: a,
  6937            }) {
  6938              return `/${(0, n.escapePDFName)(t)} ${e} Tf ${getPdfColor(a, !0)}`;
  6939            };
  6940            t.getPdfColor = getPdfColor;
  6941            t.parseAppearanceStream = function parseAppearanceStream(e, t, a) {
  6942              return new AppearanceStreamEvaluator(e, t, a).parse();
  6943            };
  6944            t.parseDefaultAppearance = function parseDefaultAppearance(e) {
  6945              return new DefaultAppearanceEvaluator(e).parse();
  6946            };
  6947            var r = a(4),
  6948              n = a(3),
  6949              i = a(2),
  6950              s = a(12),
  6951              o = a(13),
  6952              c = a(59),
  6953              l = a(57),
  6954              h = a(8);
  6955            class DefaultAppearanceEvaluator extends o.EvaluatorPreprocessor {
  6956              constructor(e) {
  6957                super(new h.StringStream(e));
  6958              }
  6959              parse() {
  6960                const e = { fn: 0, args: [] },
  6961                  t = {
  6962                    fontSize: 0,
  6963                    fontName: "",
  6964                    fontColor: new Uint8ClampedArray(3),
  6965                  };
  6966                try {
  6967                  for (;;) {
  6968                    e.args.length = 0;
  6969                    if (!this.read(e)) break;
  6970                    if (0 !== this.savedStatesDepth) continue;
  6971                    const { fn: a, args: n } = e;
  6972                    switch (0 | a) {
  6973                      case i.OPS.setFont:
  6974                        const [e, a] = n;
  6975                        e instanceof r.Name && (t.fontName = e.name);
  6976                        "number" == typeof a && a > 0 && (t.fontSize = a);
  6977                        break;
  6978                      case i.OPS.setFillRGBColor:
  6979                        s.ColorSpace.singletons.rgb.getRgbItem(
  6980                          n,
  6981                          0,
  6982                          t.fontColor,
  6983                          0,
  6984                        );
  6985                        break;
  6986                      case i.OPS.setFillGray:
  6987                        s.ColorSpace.singletons.gray.getRgbItem(
  6988                          n,
  6989                          0,
  6990                          t.fontColor,
  6991                          0,
  6992                        );
  6993                        break;
  6994                      case i.OPS.setFillCMYKColor:
  6995                        s.ColorSpace.singletons.cmyk.getRgbItem(
  6996                          n,
  6997                          0,
  6998                          t.fontColor,
  6999                          0,
  7000                        );
  7001                    }
  7002                  }
  7003                } catch (e) {
  7004                  (0, i.warn)(
  7005                    `parseDefaultAppearance - ignoring errors: "${e}".`,
  7006                  );
  7007                }
  7008                return t;
  7009              }
  7010            }
  7011            class AppearanceStreamEvaluator extends o.EvaluatorPreprocessor {
  7012              constructor(e, t, a) {
  7013                super(e);
  7014                this.stream = e;
  7015                this.evaluatorOptions = t;
  7016                this.xref = a;
  7017                this.resources = e.dict?.get("Resources");
  7018              }
  7019              parse() {
  7020                const e = { fn: 0, args: [] };
  7021                let t = {
  7022                    scaleFactor: 1,
  7023                    fontSize: 0,
  7024                    fontName: "",
  7025                    fontColor: new Uint8ClampedArray(3),
  7026                    fillColorSpace: s.ColorSpace.singletons.gray,
  7027                  },
  7028                  a = !1;
  7029                const n = [];
  7030                try {
  7031                  for (;;) {
  7032                    e.args.length = 0;
  7033                    if (a || !this.read(e)) break;
  7034                    const { fn: o, args: c } = e;
  7035                    switch (0 | o) {
  7036                      case i.OPS.save:
  7037                        n.push({
  7038                          scaleFactor: t.scaleFactor,
  7039                          fontSize: t.fontSize,
  7040                          fontName: t.fontName,
  7041                          fontColor: t.fontColor.slice(),
  7042                          fillColorSpace: t.fillColorSpace,
  7043                        });
  7044                        break;
  7045                      case i.OPS.restore:
  7046                        t = n.pop() || t;
  7047                        break;
  7048                      case i.OPS.setTextMatrix:
  7049                        t.scaleFactor *= Math.hypot(c[0], c[1]);
  7050                        break;
  7051                      case i.OPS.setFont:
  7052                        const [e, o] = c;
  7053                        e instanceof r.Name && (t.fontName = e.name);
  7054                        "number" == typeof o &&
  7055                          o > 0 &&
  7056                          (t.fontSize = o * t.scaleFactor);
  7057                        break;
  7058                      case i.OPS.setFillColorSpace:
  7059                        t.fillColorSpace = s.ColorSpace.parse({
  7060                          cs: c[0],
  7061                          xref: this.xref,
  7062                          resources: this.resources,
  7063                          pdfFunctionFactory: this._pdfFunctionFactory,
  7064                          localColorSpaceCache: this._localColorSpaceCache,
  7065                        });
  7066                        break;
  7067                      case i.OPS.setFillColor:
  7068                        t.fillColorSpace.getRgbItem(c, 0, t.fontColor, 0);
  7069                        break;
  7070                      case i.OPS.setFillRGBColor:
  7071                        s.ColorSpace.singletons.rgb.getRgbItem(
  7072                          c,
  7073                          0,
  7074                          t.fontColor,
  7075                          0,
  7076                        );
  7077                        break;
  7078                      case i.OPS.setFillGray:
  7079                        s.ColorSpace.singletons.gray.getRgbItem(
  7080                          c,
  7081                          0,
  7082                          t.fontColor,
  7083                          0,
  7084                        );
  7085                        break;
  7086                      case i.OPS.setFillCMYKColor:
  7087                        s.ColorSpace.singletons.cmyk.getRgbItem(
  7088                          c,
  7089                          0,
  7090                          t.fontColor,
  7091                          0,
  7092                        );
  7093                        break;
  7094                      case i.OPS.showText:
  7095                      case i.OPS.showSpacedText:
  7096                      case i.OPS.nextLineShowText:
  7097                      case i.OPS.nextLineSetSpacingShowText:
  7098                        a = !0;
  7099                    }
  7100                  }
  7101                } catch (e) {
  7102                  (0, i.warn)(`parseAppearanceStream - ignoring errors: "${e}".`);
  7103                }
  7104                this.stream.reset();
  7105                delete t.scaleFactor;
  7106                delete t.fillColorSpace;
  7107                return t;
  7108              }
  7109              get _localColorSpaceCache() {
  7110                return (0, i.shadow)(
  7111                  this,
  7112                  "_localColorSpaceCache",
  7113                  new c.LocalColorSpaceCache(),
  7114                );
  7115              }
  7116              get _pdfFunctionFactory() {
  7117                const e = new l.PDFFunctionFactory({
  7118                  xref: this.xref,
  7119                  isEvalSupported: this.evaluatorOptions.isEvalSupported,
  7120                });
  7121                return (0, i.shadow)(this, "_pdfFunctionFactory", e);
  7122              }
  7123            }
  7124            function getPdfColor(e, t) {
  7125              if (e[0] === e[1] && e[1] === e[2]) {
  7126                const a = e[0] / 255;
  7127                return `${(0, n.numberToString)(a)} ${t ? "g" : "G"}`;
  7128              }
  7129              return (
  7130                Array.from(e, (e) => (0, n.numberToString)(e / 255)).join(" ") +
  7131                " " +
  7132                (t ? "rg" : "RG")
  7133              );
  7134            }
  7135            class FakeUnicodeFont {
  7136              constructor(e, t) {
  7137                this.xref = e;
  7138                this.widths = null;
  7139                this.firstChar = 1 / 0;
  7140                this.lastChar = -1 / 0;
  7141                this.fontFamily = t;
  7142                const a = new OffscreenCanvas(1, 1);
  7143                this.ctxMeasure = a.getContext("2d");
  7144                FakeUnicodeFont._fontNameId || (FakeUnicodeFont._fontNameId = 1);
  7145                this.fontName = r.Name.get(
  7146                  `InvalidPDFjsFont_${t}_${FakeUnicodeFont._fontNameId++}`,
  7147                );
  7148              }
  7149              get toUnicodeRef() {
  7150                if (!FakeUnicodeFont._toUnicodeRef) {
  7151                  const e =
  7152                      "/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> <FFFF>\nendcodespacerange\n1 beginbfrange\n<0000> <FFFF> <0000>\nendbfrange\nendcmap CMapName currentdict /CMap defineresource pop end end",
  7153                    t = (FakeUnicodeFont.toUnicodeStream = new h.StringStream(e)),
  7154                    a = new r.Dict(this.xref);
  7155                  t.dict = a;
  7156                  a.set("Length", e.length);
  7157                  FakeUnicodeFont._toUnicodeRef =
  7158                    this.xref.getNewPersistentRef(t);
  7159                }
  7160                return FakeUnicodeFont._toUnicodeRef;
  7161              }
  7162              get fontDescriptorRef() {
  7163                if (!FakeUnicodeFont._fontDescriptorRef) {
  7164                  const e = new r.Dict(this.xref);
  7165                  e.set("Type", r.Name.get("FontDescriptor"));
  7166                  e.set("FontName", this.fontName);
  7167                  e.set("FontFamily", "MyriadPro Regular");
  7168                  e.set("FontBBox", [0, 0, 0, 0]);
  7169                  e.set("FontStretch", r.Name.get("Normal"));
  7170                  e.set("FontWeight", 400);
  7171                  e.set("ItalicAngle", 0);
  7172                  FakeUnicodeFont._fontDescriptorRef =
  7173                    this.xref.getNewPersistentRef(e);
  7174                }
  7175                return FakeUnicodeFont._fontDescriptorRef;
  7176              }
  7177              get descendantFontRef() {
  7178                const e = new r.Dict(this.xref);
  7179                e.set("BaseFont", this.fontName);
  7180                e.set("Type", r.Name.get("Font"));
  7181                e.set("Subtype", r.Name.get("CIDFontType0"));
  7182                e.set("CIDToGIDMap", r.Name.get("Identity"));
  7183                e.set("FirstChar", this.firstChar);
  7184                e.set("LastChar", this.lastChar);
  7185                e.set("FontDescriptor", this.fontDescriptorRef);
  7186                e.set("DW", 1e3);
  7187                const t = [],
  7188                  a = [...this.widths.entries()].sort();
  7189                let n = null,
  7190                  i = null;
  7191                for (const [e, r] of a)
  7192                  if (n)
  7193                    if (e === n + i.length) i.push(r);
  7194                    else {
  7195                      t.push(n, i);
  7196                      n = e;
  7197                      i = [r];
  7198                    }
  7199                  else {
  7200                    n = e;
  7201                    i = [r];
  7202                  }
  7203                n && t.push(n, i);
  7204                e.set("W", t);
  7205                const s = new r.Dict(this.xref);
  7206                s.set("Ordering", "Identity");
  7207                s.set("Registry", "Adobe");
  7208                s.set("Supplement", 0);
  7209                e.set("CIDSystemInfo", s);
  7210                return this.xref.getNewPersistentRef(e);
  7211              }
  7212              get baseFontRef() {
  7213                const e = new r.Dict(this.xref);
  7214                e.set("BaseFont", this.fontName);
  7215                e.set("Type", r.Name.get("Font"));
  7216                e.set("Subtype", r.Name.get("Type0"));
  7217                e.set("Encoding", r.Name.get("Identity-H"));
  7218                e.set("DescendantFonts", [this.descendantFontRef]);
  7219                e.set("ToUnicode", this.toUnicodeRef);
  7220                return this.xref.getNewPersistentRef(e);
  7221              }
  7222              get resources() {
  7223                const e = new r.Dict(this.xref),
  7224                  t = new r.Dict(this.xref);
  7225                t.set(this.fontName.name, this.baseFontRef);
  7226                e.set("Font", t);
  7227                return e;
  7228              }
  7229              _createContext() {
  7230                this.widths = new Map();
  7231                this.ctxMeasure.font = `1000px ${this.fontFamily}`;
  7232                return this.ctxMeasure;
  7233              }
  7234              createFontResources(e) {
  7235                const t = this._createContext();
  7236                for (const a of e.split(/\r\n?|\n/))
  7237                  for (const e of a.split("")) {
  7238                    const a = e.charCodeAt(0);
  7239                    if (this.widths.has(a)) continue;
  7240                    const r = t.measureText(e),
  7241                      n = Math.ceil(r.width);
  7242                    this.widths.set(a, n);
  7243                    this.firstChar = Math.min(a, this.firstChar);
  7244                    this.lastChar = Math.max(a, this.lastChar);
  7245                  }
  7246                return this.resources;
  7247              }
  7248              createAppearance(e, t, a, s, o, c) {
  7249                const l = this._createContext(),
  7250                  u = [];
  7251                let d = -1 / 0;
  7252                for (const t of e.split(/\r\n?|\n/)) {
  7253                  u.push(t);
  7254                  const e = l.measureText(t).width;
  7255                  d = Math.max(d, e);
  7256                  for (const e of t.split("")) {
  7257                    const t = e.charCodeAt(0);
  7258                    let a = this.widths.get(t);
  7259                    if (void 0 === a) {
  7260                      const r = l.measureText(e);
  7261                      a = Math.ceil(r.width);
  7262                      this.widths.set(t, a);
  7263                      this.firstChar = Math.min(t, this.firstChar);
  7264                      this.lastChar = Math.max(t, this.lastChar);
  7265                    }
  7266                  }
  7267                }
  7268                d *= s / 1e3;
  7269                const [f, g, p, m] = t;
  7270                let b = p - f,
  7271                  y = m - g;
  7272                a % 180 != 0 && ([b, y] = [y, b]);
  7273                let w = 1;
  7274                d > b && (w = b / d);
  7275                let S = 1;
  7276                const x = i.LINE_FACTOR * s,
  7277                  C = i.LINE_DESCENT_FACTOR * s,
  7278                  k = x * u.length;
  7279                k > y && (S = y / k);
  7280                const v = s * Math.min(w, S),
  7281                  F = [
  7282                    "q",
  7283                    `0 0 ${(0, n.numberToString)(b)} ${(0, n.numberToString)(
  7284                      y,
  7285                    )} re W n`,
  7286                    "BT",
  7287                    `1 0 0 1 0 ${(0, n.numberToString)(
  7288                      y + C,
  7289                    )} Tm 0 Tc ${getPdfColor(o, !0)}`,
  7290                    `/${this.fontName.name} ${(0, n.numberToString)(v)} Tf`,
  7291                  ],
  7292                  { resources: O } = this;
  7293                if (
  7294                  1 !== (c = "number" == typeof c && c >= 0 && c <= 1 ? c : 1)
  7295                ) {
  7296                  F.push("/R0 gs");
  7297                  const e = new r.Dict(this.xref),
  7298                    t = new r.Dict(this.xref);
  7299                  t.set("ca", c);
  7300                  t.set("CA", c);
  7301                  t.set("Type", r.Name.get("ExtGState"));
  7302                  e.set("R0", t);
  7303                  O.set("ExtGState", e);
  7304                }
  7305                const T = (0, n.numberToString)(x);
  7306                for (const e of u)
  7307                  F.push(`0 -${T} Td <${(0, n.stringToUTF16HexString)(e)}> Tj`);
  7308                F.push("ET", "Q");
  7309                const M = F.join("\n"),
  7310                  D = new r.Dict(this.xref);
  7311                D.set("Subtype", r.Name.get("Form"));
  7312                D.set("Type", r.Name.get("XObject"));
  7313                D.set("BBox", [0, 0, b, y]);
  7314                D.set("Length", M.length);
  7315                D.set("Resources", O);
  7316                if (a) {
  7317                  const e = (0, n.getRotationMatrix)(a, b, y);
  7318                  D.set("Matrix", e);
  7319                }
  7320                const E = new h.StringStream(M);
  7321                E.dict = D;
  7322                return E;
  7323              }
  7324            }
  7325            t.FakeUnicodeFont = FakeUnicodeFont;
  7326          },
  7327          (e, t, a) => {
  7328            Object.defineProperty(t, "__esModule", { value: !0 });
  7329            t.ColorSpace = void 0;
  7330            var r = a(2),
  7331              n = a(4),
  7332              i = a(5),
  7333              s = a(3);
  7334            class ColorSpace {
  7335              constructor(e, t) {
  7336                this.constructor === ColorSpace &&
  7337                  (0, r.unreachable)("Cannot initialize ColorSpace.");
  7338                this.name = e;
  7339                this.numComps = t;
  7340              }
  7341              getRgb(e, t) {
  7342                const a = new Uint8ClampedArray(3);
  7343                this.getRgbItem(e, t, a, 0);
  7344                return a;
  7345              }
  7346              getRgbItem(e, t, a, n) {
  7347                (0, r.unreachable)("Should not call ColorSpace.getRgbItem");
  7348              }
  7349              getRgbBuffer(e, t, a, n, i, s, o) {
  7350                (0, r.unreachable)("Should not call ColorSpace.getRgbBuffer");
  7351              }
  7352              getOutputLength(e, t) {
  7353                (0, r.unreachable)("Should not call ColorSpace.getOutputLength");
  7354              }
  7355              isPassthrough(e) {
  7356                return !1;
  7357              }
  7358              isDefaultDecode(e, t) {
  7359                return ColorSpace.isDefaultDecode(e, this.numComps);
  7360              }
  7361              fillRgb(e, t, a, r, n, i, s, o, c) {
  7362                const l = t * a;
  7363                let h = null;
  7364                const u = 1 << s,
  7365                  d = a !== n || t !== r;
  7366                if (this.isPassthrough(s)) h = o;
  7367                else if (
  7368                  1 === this.numComps &&
  7369                  l > u &&
  7370                  "DeviceGray" !== this.name &&
  7371                  "DeviceRGB" !== this.name
  7372                ) {
  7373                  const t = s <= 8 ? new Uint8Array(u) : new Uint16Array(u);
  7374                  for (let e = 0; e < u; e++) t[e] = e;
  7375                  const a = new Uint8ClampedArray(3 * u);
  7376                  this.getRgbBuffer(t, 0, u, a, 0, s, 0);
  7377                  if (d) {
  7378                    h = new Uint8Array(3 * l);
  7379                    let e = 0;
  7380                    for (let t = 0; t < l; ++t) {
  7381                      const r = 3 * o[t];
  7382                      h[e++] = a[r];
  7383                      h[e++] = a[r + 1];
  7384                      h[e++] = a[r + 2];
  7385                    }
  7386                  } else {
  7387                    let t = 0;
  7388                    for (let r = 0; r < l; ++r) {
  7389                      const n = 3 * o[r];
  7390                      e[t++] = a[n];
  7391                      e[t++] = a[n + 1];
  7392                      e[t++] = a[n + 2];
  7393                      t += c;
  7394                    }
  7395                  }
  7396                } else if (d) {
  7397                  h = new Uint8ClampedArray(3 * l);
  7398                  this.getRgbBuffer(o, 0, l, h, 0, s, 0);
  7399                } else this.getRgbBuffer(o, 0, r * i, e, 0, s, c);
  7400                if (h)
  7401                  if (d)
  7402                    !(function resizeRgbImage(e, t, a, r, n, i, s) {
  7403                      s = 1 !== s ? 0 : s;
  7404                      const o = a / n,
  7405                        c = r / i;
  7406                      let l,
  7407                        h = 0;
  7408                      const u = new Uint16Array(n),
  7409                        d = 3 * a;
  7410                      for (let e = 0; e < n; e++) u[e] = 3 * Math.floor(e * o);
  7411                      for (let a = 0; a < i; a++) {
  7412                        const r = Math.floor(a * c) * d;
  7413                        for (let a = 0; a < n; a++) {
  7414                          l = r + u[a];
  7415                          t[h++] = e[l++];
  7416                          t[h++] = e[l++];
  7417                          t[h++] = e[l++];
  7418                          h += s;
  7419                        }
  7420                      }
  7421                    })(h, e, t, a, r, n, c);
  7422                  else {
  7423                    let t = 0,
  7424                      a = 0;
  7425                    for (let n = 0, s = r * i; n < s; n++) {
  7426                      e[t++] = h[a++];
  7427                      e[t++] = h[a++];
  7428                      e[t++] = h[a++];
  7429                      t += c;
  7430                    }
  7431                  }
  7432              }
  7433              get usesZeroToOneRange() {
  7434                return (0, r.shadow)(this, "usesZeroToOneRange", !0);
  7435              }
  7436              static _cache(e, t, a, r) {
  7437                if (!a)
  7438                  throw new Error(
  7439                    'ColorSpace._cache - expected "localColorSpaceCache" argument.',
  7440                  );
  7441                if (!r)
  7442                  throw new Error(
  7443                    'ColorSpace._cache - expected "parsedColorSpace" argument.',
  7444                  );
  7445                let i, s;
  7446                if (e instanceof n.Ref) {
  7447                  s = e;
  7448                  e = t.fetch(e);
  7449                }
  7450                e instanceof n.Name && (i = e.name);
  7451                (i || s) && a.set(i, s, r);
  7452              }
  7453              static getCached(e, t, a) {
  7454                if (!a)
  7455                  throw new Error(
  7456                    'ColorSpace.getCached - expected "localColorSpaceCache" argument.',
  7457                  );
  7458                if (e instanceof n.Ref) {
  7459                  const r = a.getByRef(e);
  7460                  if (r) return r;
  7461                  try {
  7462                    e = t.fetch(e);
  7463                  } catch (e) {
  7464                    if (e instanceof s.MissingDataException) throw e;
  7465                  }
  7466                }
  7467                if (e instanceof n.Name) {
  7468                  const t = a.getByName(e.name);
  7469                  if (t) return t;
  7470                }
  7471                return null;
  7472              }
  7473              static async parseAsync({
  7474                cs: e,
  7475                xref: t,
  7476                resources: a = null,
  7477                pdfFunctionFactory: r,
  7478                localColorSpaceCache: n,
  7479              }) {
  7480                const i = this._parse(e, t, a, r);
  7481                this._cache(e, t, n, i);
  7482                return i;
  7483              }
  7484              static parse({
  7485                cs: e,
  7486                xref: t,
  7487                resources: a = null,
  7488                pdfFunctionFactory: r,
  7489                localColorSpaceCache: n,
  7490              }) {
  7491                const i = this.getCached(e, t, n);
  7492                if (i) return i;
  7493                const s = this._parse(e, t, a, r);
  7494                this._cache(e, t, n, s);
  7495                return s;
  7496              }
  7497              static _parse(e, t, a = null, i) {
  7498                if ((e = t.fetchIfRef(e)) instanceof n.Name)
  7499                  switch (e.name) {
  7500                    case "G":
  7501                    case "DeviceGray":
  7502                      return this.singletons.gray;
  7503                    case "RGB":
  7504                    case "DeviceRGB":
  7505                      return this.singletons.rgb;
  7506                    case "CMYK":
  7507                    case "DeviceCMYK":
  7508                      return this.singletons.cmyk;
  7509                    case "Pattern":
  7510                      return new PatternCS(null);
  7511                    default:
  7512                      if (a instanceof n.Dict) {
  7513                        const r = a.get("ColorSpace");
  7514                        if (r instanceof n.Dict) {
  7515                          const s = r.get(e.name);
  7516                          if (s) {
  7517                            if (s instanceof n.Name)
  7518                              return this._parse(s, t, a, i);
  7519                            e = s;
  7520                            break;
  7521                          }
  7522                        }
  7523                      }
  7524                      throw new r.FormatError(
  7525                        `Unrecognized ColorSpace: ${e.name}`,
  7526                      );
  7527                  }
  7528                if (Array.isArray(e)) {
  7529                  const n = t.fetchIfRef(e[0]).name;
  7530                  let s, o, c, l, h, u;
  7531                  switch (n) {
  7532                    case "G":
  7533                    case "DeviceGray":
  7534                      return this.singletons.gray;
  7535                    case "RGB":
  7536                    case "DeviceRGB":
  7537                      return this.singletons.rgb;
  7538                    case "CMYK":
  7539                    case "DeviceCMYK":
  7540                      return this.singletons.cmyk;
  7541                    case "CalGray":
  7542                      s = t.fetchIfRef(e[1]);
  7543                      l = s.getArray("WhitePoint");
  7544                      h = s.getArray("BlackPoint");
  7545                      u = s.get("Gamma");
  7546                      return new CalGrayCS(l, h, u);
  7547                    case "CalRGB":
  7548                      s = t.fetchIfRef(e[1]);
  7549                      l = s.getArray("WhitePoint");
  7550                      h = s.getArray("BlackPoint");
  7551                      u = s.getArray("Gamma");
  7552                      const d = s.getArray("Matrix");
  7553                      return new CalRGBCS(l, h, u, d);
  7554                    case "ICCBased":
  7555                      const f = t.fetchIfRef(e[1]).dict;
  7556                      o = f.get("N");
  7557                      const g = f.get("Alternate");
  7558                      if (g) {
  7559                        const e = this._parse(g, t, a, i);
  7560                        if (e.numComps === o) return e;
  7561                        (0, r.warn)(
  7562                          "ICCBased color space: Ignoring incorrect /Alternate entry.",
  7563                        );
  7564                      }
  7565                      if (1 === o) return this.singletons.gray;
  7566                      if (3 === o) return this.singletons.rgb;
  7567                      if (4 === o) return this.singletons.cmyk;
  7568                      break;
  7569                    case "Pattern":
  7570                      c = e[1] || null;
  7571                      c && (c = this._parse(c, t, a, i));
  7572                      return new PatternCS(c);
  7573                    case "I":
  7574                    case "Indexed":
  7575                      c = this._parse(e[1], t, a, i);
  7576                      const p = t.fetchIfRef(e[2]) + 1,
  7577                        m = t.fetchIfRef(e[3]);
  7578                      return new IndexedCS(c, p, m);
  7579                    case "Separation":
  7580                    case "DeviceN":
  7581                      const b = t.fetchIfRef(e[1]);
  7582                      o = Array.isArray(b) ? b.length : 1;
  7583                      c = this._parse(e[2], t, a, i);
  7584                      const y = i.create(e[3]);
  7585                      return new AlternateCS(o, c, y);
  7586                    case "Lab":
  7587                      s = t.fetchIfRef(e[1]);
  7588                      l = s.getArray("WhitePoint");
  7589                      h = s.getArray("BlackPoint");
  7590                      const w = s.getArray("Range");
  7591                      return new LabCS(l, h, w);
  7592                    default:
  7593                      throw new r.FormatError(
  7594                        `Unimplemented ColorSpace object: ${n}`,
  7595                      );
  7596                  }
  7597                }
  7598                throw new r.FormatError(`Unrecognized ColorSpace object: ${e}`);
  7599              }
  7600              static isDefaultDecode(e, t) {
  7601                if (!Array.isArray(e)) return !0;
  7602                if (2 * t !== e.length) {
  7603                  (0, r.warn)("The decode map is not the correct length");
  7604                  return !0;
  7605                }
  7606                for (let t = 0, a = e.length; t < a; t += 2)
  7607                  if (0 !== e[t] || 1 !== e[t + 1]) return !1;
  7608                return !0;
  7609              }
  7610              static get singletons() {
  7611                return (0, r.shadow)(this, "singletons", {
  7612                  get gray() {
  7613                    return (0, r.shadow)(this, "gray", new DeviceGrayCS());
  7614                  },
  7615                  get rgb() {
  7616                    return (0, r.shadow)(this, "rgb", new DeviceRgbCS());
  7617                  },
  7618                  get cmyk() {
  7619                    return (0, r.shadow)(this, "cmyk", new DeviceCmykCS());
  7620                  },
  7621                });
  7622              }
  7623            }
  7624            t.ColorSpace = ColorSpace;
  7625            class AlternateCS extends ColorSpace {
  7626              constructor(e, t, a) {
  7627                super("Alternate", e);
  7628                this.base = t;
  7629                this.tintFn = a;
  7630                this.tmpBuf = new Float32Array(t.numComps);
  7631              }
  7632              getRgbItem(e, t, a, r) {
  7633                const n = this.tmpBuf;
  7634                this.tintFn(e, t, n, 0);
  7635                this.base.getRgbItem(n, 0, a, r);
  7636              }
  7637              getRgbBuffer(e, t, a, r, n, i, s) {
  7638                const o = this.tintFn,
  7639                  c = this.base,
  7640                  l = 1 / ((1 << i) - 1),
  7641                  h = c.numComps,
  7642                  u = c.usesZeroToOneRange,
  7643                  d = (c.isPassthrough(8) || !u) && 0 === s;
  7644                let f = d ? n : 0;
  7645                const g = d ? r : new Uint8ClampedArray(h * a),
  7646                  p = this.numComps,
  7647                  m = new Float32Array(p),
  7648                  b = new Float32Array(h);
  7649                let y, w;
  7650                for (y = 0; y < a; y++) {
  7651                  for (w = 0; w < p; w++) m[w] = e[t++] * l;
  7652                  o(m, 0, b, 0);
  7653                  if (u) for (w = 0; w < h; w++) g[f++] = 255 * b[w];
  7654                  else {
  7655                    c.getRgbItem(b, 0, g, f);
  7656                    f += h;
  7657                  }
  7658                }
  7659                d || c.getRgbBuffer(g, 0, a, r, n, 8, s);
  7660              }
  7661              getOutputLength(e, t) {
  7662                return this.base.getOutputLength(
  7663                  (e * this.base.numComps) / this.numComps,
  7664                  t,
  7665                );
  7666              }
  7667            }
  7668            class PatternCS extends ColorSpace {
  7669              constructor(e) {
  7670                super("Pattern", null);
  7671                this.base = e;
  7672              }
  7673              isDefaultDecode(e, t) {
  7674                (0, r.unreachable)("Should not call PatternCS.isDefaultDecode");
  7675              }
  7676            }
  7677            class IndexedCS extends ColorSpace {
  7678              constructor(e, t, a) {
  7679                super("Indexed", 1);
  7680                this.base = e;
  7681                this.highVal = t;
  7682                const n = e.numComps * t;
  7683                this.lookup = new Uint8Array(n);
  7684                if (a instanceof i.BaseStream) {
  7685                  const e = a.getBytes(n);
  7686                  this.lookup.set(e);
  7687                } else {
  7688                  if ("string" != typeof a)
  7689                    throw new r.FormatError(
  7690                      `IndexedCS - unrecognized lookup table: ${a}`,
  7691                    );
  7692                  for (let e = 0; e < n; ++e)
  7693                    this.lookup[e] = 255 & a.charCodeAt(e);
  7694                }
  7695              }
  7696              getRgbItem(e, t, a, r) {
  7697                const n = this.base.numComps,
  7698                  i = e[t] * n;
  7699                this.base.getRgbBuffer(this.lookup, i, 1, a, r, 8, 0);
  7700              }
  7701              getRgbBuffer(e, t, a, r, n, i, s) {
  7702                const o = this.base,
  7703                  c = o.numComps,
  7704                  l = o.getOutputLength(c, s),
  7705                  h = this.lookup;
  7706                for (let i = 0; i < a; ++i) {
  7707                  const a = e[t++] * c;
  7708                  o.getRgbBuffer(h, a, 1, r, n, 8, s);
  7709                  n += l;
  7710                }
  7711              }
  7712              getOutputLength(e, t) {
  7713                return this.base.getOutputLength(e * this.base.numComps, t);
  7714              }
  7715              isDefaultDecode(e, t) {
  7716                if (!Array.isArray(e)) return !0;
  7717                if (2 !== e.length) {
  7718                  (0, r.warn)("Decode map length is not correct");
  7719                  return !0;
  7720                }
  7721                if (!Number.isInteger(t) || t < 1) {
  7722                  (0, r.warn)("Bits per component is not correct");
  7723                  return !0;
  7724                }
  7725                return 0 === e[0] && e[1] === (1 << t) - 1;
  7726              }
  7727            }
  7728            class DeviceGrayCS extends ColorSpace {
  7729              constructor() {
  7730                super("DeviceGray", 1);
  7731              }
  7732              getRgbItem(e, t, a, r) {
  7733                const n = 255 * e[t];
  7734                a[r] = a[r + 1] = a[r + 2] = n;
  7735              }
  7736              getRgbBuffer(e, t, a, r, n, i, s) {
  7737                const o = 255 / ((1 << i) - 1);
  7738                let c = t,
  7739                  l = n;
  7740                for (let t = 0; t < a; ++t) {
  7741                  const t = o * e[c++];
  7742                  r[l++] = t;
  7743                  r[l++] = t;
  7744                  r[l++] = t;
  7745                  l += s;
  7746                }
  7747              }
  7748              getOutputLength(e, t) {
  7749                return e * (3 + t);
  7750              }
  7751            }
  7752            class DeviceRgbCS extends ColorSpace {
  7753              constructor() {
  7754                super("DeviceRGB", 3);
  7755              }
  7756              getRgbItem(e, t, a, r) {
  7757                a[r] = 255 * e[t];
  7758                a[r + 1] = 255 * e[t + 1];
  7759                a[r + 2] = 255 * e[t + 2];
  7760              }
  7761              getRgbBuffer(e, t, a, r, n, i, s) {
  7762                if (8 === i && 0 === s) {
  7763                  r.set(e.subarray(t, t + 3 * a), n);
  7764                  return;
  7765                }
  7766                const o = 255 / ((1 << i) - 1);
  7767                let c = t,
  7768                  l = n;
  7769                for (let t = 0; t < a; ++t) {
  7770                  r[l++] = o * e[c++];
  7771                  r[l++] = o * e[c++];
  7772                  r[l++] = o * e[c++];
  7773                  l += s;
  7774                }
  7775              }
  7776              getOutputLength(e, t) {
  7777                return ((e * (3 + t)) / 3) | 0;
  7778              }
  7779              isPassthrough(e) {
  7780                return 8 === e;
  7781              }
  7782            }
  7783            class DeviceCmykCS extends ColorSpace {
  7784              constructor() {
  7785                super("DeviceCMYK", 4);
  7786              }
  7787              #r(e, t, a, r, n) {
  7788                const i = e[t] * a,
  7789                  s = e[t + 1] * a,
  7790                  o = e[t + 2] * a,
  7791                  c = e[t + 3] * a;
  7792                r[n] =
  7793                  255 +
  7794                  i *
  7795                    (-4.387332384609988 * i +
  7796                      54.48615194189176 * s +
  7797                      18.82290502165302 * o +
  7798                      212.25662451639585 * c -
  7799                      285.2331026137004) +
  7800                  s *
  7801                    (1.7149763477362134 * s -
  7802                      5.6096736904047315 * o +
  7803                      -17.873870861415444 * c -
  7804                      5.497006427196366) +
  7805                  o *
  7806                    (-2.5217340131683033 * o -
  7807                      21.248923337353073 * c +
  7808                      17.5119270841813) +
  7809                  c * (-21.86122147463605 * c - 189.48180835922747);
  7810                r[n + 1] =
  7811                  255 +
  7812                  i *
  7813                    (8.841041422036149 * i +
  7814                      60.118027045597366 * s +
  7815                      6.871425592049007 * o +
  7816                      31.159100130055922 * c -
  7817                      79.2970844816548) +
  7818                  s *
  7819                    (-15.310361306967817 * s +
  7820                      17.575251261109482 * o +
  7821                      131.35250912493976 * c -
  7822                      190.9453302588951) +
  7823                  o *
  7824                    (4.444339102852739 * o +
  7825                      9.8632861493405 * c -
  7826                      24.86741582555878) +
  7827                  c * (-20.737325471181034 * c - 187.80453709719578);
  7828                r[n + 2] =
  7829                  255 +
  7830                  i *
  7831                    (0.8842522430003296 * i +
  7832                      8.078677503112928 * s +
  7833                      30.89978309703729 * o -
  7834                      0.23883238689178934 * c -
  7835                      14.183576799673286) +
  7836                  s *
  7837                    (10.49593273432072 * s +
  7838                      63.02378494754052 * o +
  7839                      50.606957656360734 * c -
  7840                      112.23884253719248) +
  7841                  o *
  7842                    (0.03296041114873217 * o +
  7843                      115.60384449646641 * c -
  7844                      193.58209356861505) +
  7845                  c * (-22.33816807309886 * c - 180.12613974708367);
  7846              }
  7847              getRgbItem(e, t, a, r) {
  7848                this.#r(e, t, 1, a, r);
  7849              }
  7850              getRgbBuffer(e, t, a, r, n, i, s) {
  7851                const o = 1 / ((1 << i) - 1);
  7852                for (let i = 0; i < a; i++) {
  7853                  this.#r(e, t, o, r, n);
  7854                  t += 4;
  7855                  n += 3 + s;
  7856                }
  7857              }
  7858              getOutputLength(e, t) {
  7859                return ((e / 4) * (3 + t)) | 0;
  7860              }
  7861            }
  7862            class CalGrayCS extends ColorSpace {
  7863              constructor(e, t, a) {
  7864                super("CalGray", 1);
  7865                if (!e)
  7866                  throw new r.FormatError(
  7867                    "WhitePoint missing - required for color space CalGray",
  7868                  );
  7869                [this.XW, this.YW, this.ZW] = e;
  7870                [this.XB, this.YB, this.ZB] = t || [0, 0, 0];
  7871                this.G = a || 1;
  7872                if (this.XW < 0 || this.ZW < 0 || 1 !== this.YW)
  7873                  throw new r.FormatError(
  7874                    `Invalid WhitePoint components for ${this.name}, no fallback available`,
  7875                  );
  7876                if (this.XB < 0 || this.YB < 0 || this.ZB < 0) {
  7877                  (0, r.info)(
  7878                    `Invalid BlackPoint for ${this.name}, falling back to default.`,
  7879                  );
  7880                  this.XB = this.YB = this.ZB = 0;
  7881                }
  7882                (0 === this.XB && 0 === this.YB && 0 === this.ZB) ||
  7883                  (0, r.warn)(
  7884                    `${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ZB: ${this.ZB}, only default values are supported.`,
  7885                  );
  7886                if (this.G < 1) {
  7887                  (0, r.info)(
  7888                    `Invalid Gamma: ${this.G} for ${this.name}, falling back to default.`,
  7889                  );
  7890                  this.G = 1;
  7891                }
  7892              }
  7893              #r(e, t, a, r, n) {
  7894                const i = (e[t] * n) ** this.G,
  7895                  s = this.YW * i,
  7896                  o = Math.max(295.8 * s ** 0.3333333333333333 - 40.8, 0);
  7897                a[r] = o;
  7898                a[r + 1] = o;
  7899                a[r + 2] = o;
  7900              }
  7901              getRgbItem(e, t, a, r) {
  7902                this.#r(e, t, a, r, 1);
  7903              }
  7904              getRgbBuffer(e, t, a, r, n, i, s) {
  7905                const o = 1 / ((1 << i) - 1);
  7906                for (let i = 0; i < a; ++i) {
  7907                  this.#r(e, t, r, n, o);
  7908                  t += 1;
  7909                  n += 3 + s;
  7910                }
  7911              }
  7912              getOutputLength(e, t) {
  7913                return e * (3 + t);
  7914              }
  7915            }
  7916            class CalRGBCS extends ColorSpace {
  7917              static #n = new Float32Array([
  7918                0.8951, 0.2664, -0.1614, -0.7502, 1.7135, 0.0367, 0.0389, -0.0685,
  7919                1.0296,
  7920              ]);
  7921              static #i = new Float32Array([
  7922                0.9869929, -0.1470543, 0.1599627, 0.4323053, 0.5183603, 0.0492912,
  7923                -0.0085287, 0.0400428, 0.9684867,
  7924              ]);
  7925              static #s = new Float32Array([
  7926                3.2404542, -1.5371385, -0.4985314, -0.969266, 1.8760108, 0.041556,
  7927                0.0556434, -0.2040259, 1.0572252,
  7928              ]);
  7929              static #o = new Float32Array([1, 1, 1]);
  7930              static #c = new Float32Array(3);
  7931              static #l = new Float32Array(3);
  7932              static #h = new Float32Array(3);
  7933              static #u = (24 / 116) ** 3 / 8;
  7934              constructor(e, t, a, n) {
  7935                super("CalRGB", 3);
  7936                if (!e)
  7937                  throw new r.FormatError(
  7938                    "WhitePoint missing - required for color space CalRGB",
  7939                  );
  7940                const [i, s, o] = (this.whitePoint = e),
  7941                  [c, l, h] = (this.blackPoint = t || new Float32Array(3));
  7942                [this.GR, this.GG, this.GB] = a || new Float32Array([1, 1, 1]);
  7943                [
  7944                  this.MXA,
  7945                  this.MYA,
  7946                  this.MZA,
  7947                  this.MXB,
  7948                  this.MYB,
  7949                  this.MZB,
  7950                  this.MXC,
  7951                  this.MYC,
  7952                  this.MZC,
  7953                ] = n || new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]);
  7954                if (i < 0 || o < 0 || 1 !== s)
  7955                  throw new r.FormatError(
  7956                    `Invalid WhitePoint components for ${this.name}, no fallback available`,
  7957                  );
  7958                if (c < 0 || l < 0 || h < 0) {
  7959                  (0, r.info)(
  7960                    `Invalid BlackPoint for ${this.name} [${c}, ${l}, ${h}], falling back to default.`,
  7961                  );
  7962                  this.blackPoint = new Float32Array(3);
  7963                }
  7964                if (this.GR < 0 || this.GG < 0 || this.GB < 0) {
  7965                  (0, r.info)(
  7966                    `Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ${this.name}, falling back to default.`,
  7967                  );
  7968                  this.GR = this.GG = this.GB = 1;
  7969                }
  7970              }
  7971              #d(e, t, a) {
  7972                a[0] = e[0] * t[0] + e[1] * t[1] + e[2] * t[2];
  7973                a[1] = e[3] * t[0] + e[4] * t[1] + e[5] * t[2];
  7974                a[2] = e[6] * t[0] + e[7] * t[1] + e[8] * t[2];
  7975              }
  7976              #f(e, t, a) {
  7977                a[0] = (1 * t[0]) / e[0];
  7978                a[1] = (1 * t[1]) / e[1];
  7979                a[2] = (1 * t[2]) / e[2];
  7980              }
  7981              #g(e, t, a) {
  7982                a[0] = (0.95047 * t[0]) / e[0];
  7983                a[1] = (1 * t[1]) / e[1];
  7984                a[2] = (1.08883 * t[2]) / e[2];
  7985              }
  7986              #p(e) {
  7987                return e <= 0.0031308
  7988                  ? this.#m(0, 1, 12.92 * e)
  7989                  : e >= 0.99554525
  7990                    ? 1
  7991                    : this.#m(0, 1, 1.055 * e ** (1 / 2.4) - 0.055);
  7992              }
  7993              #m(e, t, a) {
  7994                return Math.max(e, Math.min(t, a));
  7995              }
  7996              #b(e) {
  7997                return e < 0
  7998                  ? -this.#b(-e)
  7999                  : e > 8
  8000                    ? ((e + 16) / 116) ** 3
  8001                    : e * CalRGBCS.#u;
  8002              }
  8003              #y(e, t, a) {
  8004                if (0 === e[0] && 0 === e[1] && 0 === e[2]) {
  8005                  a[0] = t[0];
  8006                  a[1] = t[1];
  8007                  a[2] = t[2];
  8008                  return;
  8009                }
  8010                const r = this.#b(0),
  8011                  n = (1 - r) / (1 - this.#b(e[0])),
  8012                  i = 1 - n,
  8013                  s = (1 - r) / (1 - this.#b(e[1])),
  8014                  o = 1 - s,
  8015                  c = (1 - r) / (1 - this.#b(e[2])),
  8016                  l = 1 - c;
  8017                a[0] = t[0] * n + i;
  8018                a[1] = t[1] * s + o;
  8019                a[2] = t[2] * c + l;
  8020              }
  8021              #w(e, t, a) {
  8022                if (1 === e[0] && 1 === e[2]) {
  8023                  a[0] = t[0];
  8024                  a[1] = t[1];
  8025                  a[2] = t[2];
  8026                  return;
  8027                }
  8028                const r = a;
  8029                this.#d(CalRGBCS.#n, t, r);
  8030                const n = CalRGBCS.#c;
  8031                this.#f(e, r, n);
  8032                this.#d(CalRGBCS.#i, n, a);
  8033              }
  8034              #S(e, t, a) {
  8035                const r = a;
  8036                this.#d(CalRGBCS.#n, t, r);
  8037                const n = CalRGBCS.#c;
  8038                this.#g(e, r, n);
  8039                this.#d(CalRGBCS.#i, n, a);
  8040              }
  8041              #r(e, t, a, r, n) {
  8042                const i = this.#m(0, 1, e[t] * n),
  8043                  s = this.#m(0, 1, e[t + 1] * n),
  8044                  o = this.#m(0, 1, e[t + 2] * n),
  8045                  c = 1 === i ? 1 : i ** this.GR,
  8046                  l = 1 === s ? 1 : s ** this.GG,
  8047                  h = 1 === o ? 1 : o ** this.GB,
  8048                  u = this.MXA * c + this.MXB * l + this.MXC * h,
  8049                  d = this.MYA * c + this.MYB * l + this.MYC * h,
  8050                  f = this.MZA * c + this.MZB * l + this.MZC * h,
  8051                  g = CalRGBCS.#l;
  8052                g[0] = u;
  8053                g[1] = d;
  8054                g[2] = f;
  8055                const p = CalRGBCS.#h;
  8056                this.#w(this.whitePoint, g, p);
  8057                const m = CalRGBCS.#l;
  8058                this.#y(this.blackPoint, p, m);
  8059                const b = CalRGBCS.#h;
  8060                this.#S(CalRGBCS.#o, m, b);
  8061                const y = CalRGBCS.#l;
  8062                this.#d(CalRGBCS.#s, b, y);
  8063                a[r] = 255 * this.#p(y[0]);
  8064                a[r + 1] = 255 * this.#p(y[1]);
  8065                a[r + 2] = 255 * this.#p(y[2]);
  8066              }
  8067              getRgbItem(e, t, a, r) {
  8068                this.#r(e, t, a, r, 1);
  8069              }
  8070              getRgbBuffer(e, t, a, r, n, i, s) {
  8071                const o = 1 / ((1 << i) - 1);
  8072                for (let i = 0; i < a; ++i) {
  8073                  this.#r(e, t, r, n, o);
  8074                  t += 3;
  8075                  n += 3 + s;
  8076                }
  8077              }
  8078              getOutputLength(e, t) {
  8079                return ((e * (3 + t)) / 3) | 0;
  8080              }
  8081            }
  8082            class LabCS extends ColorSpace {
  8083              constructor(e, t, a) {
  8084                super("Lab", 3);
  8085                if (!e)
  8086                  throw new r.FormatError(
  8087                    "WhitePoint missing - required for color space Lab",
  8088                  );
  8089                [this.XW, this.YW, this.ZW] = e;
  8090                [this.amin, this.amax, this.bmin, this.bmax] = a || [
  8091                  -100, 100, -100, 100,
  8092                ];
  8093                [this.XB, this.YB, this.ZB] = t || [0, 0, 0];
  8094                if (this.XW < 0 || this.ZW < 0 || 1 !== this.YW)
  8095                  throw new r.FormatError(
  8096                    "Invalid WhitePoint components, no fallback available",
  8097                  );
  8098                if (this.XB < 0 || this.YB < 0 || this.ZB < 0) {
  8099                  (0, r.info)("Invalid BlackPoint, falling back to default");
  8100                  this.XB = this.YB = this.ZB = 0;
  8101                }
  8102                if (this.amin > this.amax || this.bmin > this.bmax) {
  8103                  (0, r.info)("Invalid Range, falling back to defaults");
  8104                  this.amin = -100;
  8105                  this.amax = 100;
  8106                  this.bmin = -100;
  8107                  this.bmax = 100;
  8108                }
  8109              }
  8110              #x(e) {
  8111                return e >= 6 / 29 ? e ** 3 : (108 / 841) * (e - 4 / 29);
  8112              }
  8113              #A(e, t, a, r) {
  8114                return a + (e * (r - a)) / t;
  8115              }
  8116              #r(e, t, a, r, n) {
  8117                let i = e[t],
  8118                  s = e[t + 1],
  8119                  o = e[t + 2];
  8120                if (!1 !== a) {
  8121                  i = this.#A(i, a, 0, 100);
  8122                  s = this.#A(s, a, this.amin, this.amax);
  8123                  o = this.#A(o, a, this.bmin, this.bmax);
  8124                }
  8125                s > this.amax
  8126                  ? (s = this.amax)
  8127                  : s < this.amin && (s = this.amin);
  8128                o > this.bmax
  8129                  ? (o = this.bmax)
  8130                  : o < this.bmin && (o = this.bmin);
  8131                const c = (i + 16) / 116,
  8132                  l = c + s / 500,
  8133                  h = c - o / 200,
  8134                  u = this.XW * this.#x(l),
  8135                  d = this.YW * this.#x(c),
  8136                  f = this.ZW * this.#x(h);
  8137                let g, p, m;
  8138                if (this.ZW < 1) {
  8139                  g = 3.1339 * u + -1.617 * d + -0.4906 * f;
  8140                  p = -0.9785 * u + 1.916 * d + 0.0333 * f;
  8141                  m = 0.072 * u + -0.229 * d + 1.4057 * f;
  8142                } else {
  8143                  g = 3.2406 * u + -1.5372 * d + -0.4986 * f;
  8144                  p = -0.9689 * u + 1.8758 * d + 0.0415 * f;
  8145                  m = 0.0557 * u + -0.204 * d + 1.057 * f;
  8146                }
  8147                r[n] = 255 * Math.sqrt(g);
  8148                r[n + 1] = 255 * Math.sqrt(p);
  8149                r[n + 2] = 255 * Math.sqrt(m);
  8150              }
  8151              getRgbItem(e, t, a, r) {
  8152                this.#r(e, t, !1, a, r);
  8153              }
  8154              getRgbBuffer(e, t, a, r, n, i, s) {
  8155                const o = (1 << i) - 1;
  8156                for (let i = 0; i < a; i++) {
  8157                  this.#r(e, t, o, r, n);
  8158                  t += 3;
  8159                  n += 3 + s;
  8160                }
  8161              }
  8162              getOutputLength(e, t) {
  8163                return ((e * (3 + t)) / 3) | 0;
  8164              }
  8165              isDefaultDecode(e, t) {
  8166                return !0;
  8167              }
  8168              get usesZeroToOneRange() {
  8169                return (0, r.shadow)(this, "usesZeroToOneRange", !1);
  8170              }
  8171            }
  8172          },
  8173          (e, t, a) => {
  8174            Object.defineProperty(t, "__esModule", { value: !0 });
  8175            t.PartialEvaluator = t.EvaluatorPreprocessor = void 0;
  8176            var r = a(2),
  8177              n = a(14),
  8178              i = a(4),
  8179              s = a(34),
  8180              o = a(37),
  8181              c = a(41),
  8182              l = a(50),
  8183              h = a(51),
  8184              u = a(42),
  8185              d = a(57),
  8186              f = a(16),
  8187              g = a(59),
  8188              p = a(8),
  8189              m = a(5),
  8190              b = a(60),
  8191              y = a(12),
  8192              w = a(18),
  8193              S = a(38),
  8194              x = a(61),
  8195              C = a(39),
  8196              k = a(45),
  8197              v = a(40),
  8198              F = a(62),
  8199              O = a(63),
  8200              T = a(64),
  8201              M = a(65);
  8202            const D = Object.freeze({
  8203                maxImageSize: -1,
  8204                disableFontFace: !1,
  8205                ignoreErrors: !1,
  8206                isEvalSupported: !0,
  8207                isOffscreenCanvasSupported: !1,
  8208                canvasMaxAreaInBytes: -1,
  8209                fontExtraProperties: !1,
  8210                useSystemFonts: !0,
  8211                cMapUrl: null,
  8212                standardFontDataUrl: null,
  8213              }),
  8214              E = 1,
  8215              N = 2,
  8216              R = Promise.resolve();
  8217            function normalizeBlendMode(e, t = !1) {
  8218              if (Array.isArray(e)) {
  8219                for (const t of e) {
  8220                  const e = normalizeBlendMode(t, !0);
  8221                  if (e) return e;
  8222                }
  8223                (0, r.warn)(`Unsupported blend mode Array: ${e}`);
  8224                return "source-over";
  8225              }
  8226              if (!(e instanceof i.Name)) return t ? null : "source-over";
  8227              switch (e.name) {
  8228                case "Normal":
  8229                case "Compatible":
  8230                  return "source-over";
  8231                case "Multiply":
  8232                  return "multiply";
  8233                case "Screen":
  8234                  return "screen";
  8235                case "Overlay":
  8236                  return "overlay";
  8237                case "Darken":
  8238                  return "darken";
  8239                case "Lighten":
  8240                  return "lighten";
  8241                case "ColorDodge":
  8242                  return "color-dodge";
  8243                case "ColorBurn":
  8244                  return "color-burn";
  8245                case "HardLight":
  8246                  return "hard-light";
  8247                case "SoftLight":
  8248                  return "soft-light";
  8249                case "Difference":
  8250                  return "difference";
  8251                case "Exclusion":
  8252                  return "exclusion";
  8253                case "Hue":
  8254                  return "hue";
  8255                case "Saturation":
  8256                  return "saturation";
  8257                case "Color":
  8258                  return "color";
  8259                case "Luminosity":
  8260                  return "luminosity";
  8261              }
  8262              if (t) return null;
  8263              (0, r.warn)(`Unsupported blend mode: ${e.name}`);
  8264              return "source-over";
  8265            }
  8266            function incrementCachedImageMaskCount(e) {
  8267              e.fn === r.OPS.paintImageMaskXObject &&
  8268                e.args[0]?.count > 0 &&
  8269                e.args[0].count++;
  8270            }
  8271            class TimeSlotManager {
  8272              static TIME_SLOT_DURATION_MS = 20;
  8273              static CHECK_TIME_EVERY = 100;
  8274              constructor() {
  8275                this.reset();
  8276              }
  8277              check() {
  8278                if (++this.checked < TimeSlotManager.CHECK_TIME_EVERY) return !1;
  8279                this.checked = 0;
  8280                return this.endTime <= Date.now();
  8281              }
  8282              reset() {
  8283                this.endTime = Date.now() + TimeSlotManager.TIME_SLOT_DURATION_MS;
  8284                this.checked = 0;
  8285              }
  8286            }
  8287            class PartialEvaluator {
  8288              constructor({
  8289                xref: e,
  8290                handler: t,
  8291                pageIndex: a,
  8292                idFactory: r,
  8293                fontCache: n,
  8294                builtInCMapCache: i,
  8295                standardFontDataCache: s,
  8296                globalImageCache: o,
  8297                systemFontCache: c,
  8298                options: l = null,
  8299              }) {
  8300                this.xref = e;
  8301                this.handler = t;
  8302                this.pageIndex = a;
  8303                this.idFactory = r;
  8304                this.fontCache = n;
  8305                this.builtInCMapCache = i;
  8306                this.standardFontDataCache = s;
  8307                this.globalImageCache = o;
  8308                this.systemFontCache = c;
  8309                this.options = l || D;
  8310                this.parsingType3Font = !1;
  8311                this._regionalImageCache = new g.RegionalImageCache();
  8312                this._fetchBuiltInCMapBound = this.fetchBuiltInCMap.bind(this);
  8313                F.ImageResizer.setMaxArea(this.options.canvasMaxAreaInBytes);
  8314              }
  8315              get _pdfFunctionFactory() {
  8316                const e = new d.PDFFunctionFactory({
  8317                  xref: this.xref,
  8318                  isEvalSupported: this.options.isEvalSupported,
  8319                });
  8320                return (0, r.shadow)(this, "_pdfFunctionFactory", e);
  8321              }
  8322              clone(e = null) {
  8323                const t = Object.create(this);
  8324                t.options = Object.assign(Object.create(null), this.options, e);
  8325                return t;
  8326              }
  8327              hasBlendModes(e, t) {
  8328                if (!(e instanceof i.Dict)) return !1;
  8329                if (e.objId && t.has(e.objId)) return !1;
  8330                const a = new i.RefSet(t);
  8331                e.objId && a.put(e.objId);
  8332                const n = [e],
  8333                  s = this.xref;
  8334                for (; n.length; ) {
  8335                  const e = n.shift(),
  8336                    t = e.get("ExtGState");
  8337                  if (t instanceof i.Dict)
  8338                    for (let e of t.getRawValues()) {
  8339                      if (e instanceof i.Ref) {
  8340                        if (a.has(e)) continue;
  8341                        try {
  8342                          e = s.fetch(e);
  8343                        } catch (t) {
  8344                          a.put(e);
  8345                          (0, r.info)(
  8346                            `hasBlendModes - ignoring ExtGState: "${t}".`,
  8347                          );
  8348                          continue;
  8349                        }
  8350                      }
  8351                      if (!(e instanceof i.Dict)) continue;
  8352                      e.objId && a.put(e.objId);
  8353                      const t = e.get("BM");
  8354                      if (t instanceof i.Name) {
  8355                        if ("Normal" !== t.name) return !0;
  8356                      } else if (void 0 !== t && Array.isArray(t))
  8357                        for (const e of t)
  8358                          if (e instanceof i.Name && "Normal" !== e.name)
  8359                            return !0;
  8360                    }
  8361                  const o = e.get("XObject");
  8362                  if (o instanceof i.Dict)
  8363                    for (let e of o.getRawValues()) {
  8364                      if (e instanceof i.Ref) {
  8365                        if (a.has(e)) continue;
  8366                        try {
  8367                          e = s.fetch(e);
  8368                        } catch (t) {
  8369                          a.put(e);
  8370                          (0, r.info)(
  8371                            `hasBlendModes - ignoring XObject: "${t}".`,
  8372                          );
  8373                          continue;
  8374                        }
  8375                      }
  8376                      if (!(e instanceof m.BaseStream)) continue;
  8377                      e.dict.objId && a.put(e.dict.objId);
  8378                      const t = e.dict.get("Resources");
  8379                      if (t instanceof i.Dict && (!t.objId || !a.has(t.objId))) {
  8380                        n.push(t);
  8381                        t.objId && a.put(t.objId);
  8382                      }
  8383                    }
  8384                }
  8385                for (const e of a) t.put(e);
  8386                return !1;
  8387              }
  8388              async fetchBuiltInCMap(e) {
  8389                const t = this.builtInCMapCache.get(e);
  8390                if (t) return t;
  8391                let a;
  8392                if (null !== this.options.cMapUrl) {
  8393                  const t = `${this.options.cMapUrl}${e}.bcmap`,
  8394                    n = await fetch(t);
  8395                  if (!n.ok)
  8396                    throw new Error(
  8397                      `fetchBuiltInCMap: failed to fetch file "${t}" with "${n.statusText}".`,
  8398                    );
  8399                  a = {
  8400                    cMapData: new Uint8Array(await n.arrayBuffer()),
  8401                    compressionType: r.CMapCompressionType.BINARY,
  8402                  };
  8403                } else
  8404                  a = await this.handler.sendWithPromise("FetchBuiltInCMap", {
  8405                    name: e,
  8406                  });
  8407                a.compressionType !== r.CMapCompressionType.NONE &&
  8408                  this.builtInCMapCache.set(e, a);
  8409                return a;
  8410              }
  8411              async fetchStandardFontData(e) {
  8412                const t = this.standardFontDataCache.get(e);
  8413                if (t) return new p.Stream(t);
  8414                if (
  8415                  this.options.useSystemFonts &&
  8416                  "Symbol" !== e &&
  8417                  "ZapfDingbats" !== e
  8418                )
  8419                  return null;
  8420                const a = (0, c.getFontNameToFileMap)()[e];
  8421                let n;
  8422                if (null !== this.options.standardFontDataUrl) {
  8423                  const e = `${this.options.standardFontDataUrl}${a}`,
  8424                    t = await fetch(e);
  8425                  t.ok
  8426                    ? (n = await t.arrayBuffer())
  8427                    : (0, r.warn)(
  8428                        `fetchStandardFontData: failed to fetch file "${e}" with "${t.statusText}".`,
  8429                      );
  8430                } else
  8431                  try {
  8432                    n = await this.handler.sendWithPromise(
  8433                      "FetchStandardFontData",
  8434                      { filename: a },
  8435                    );
  8436                  } catch (e) {
  8437                    (0, r.warn)(
  8438                      `fetchStandardFontData: failed to fetch file "${a}" with "${e}".`,
  8439                    );
  8440                  }
  8441                if (!n) return null;
  8442                this.standardFontDataCache.set(e, n);
  8443                return new p.Stream(n);
  8444              }
  8445              async buildFormXObject(e, t, a, n, s, o, c) {
  8446                const l = t.dict,
  8447                  h = l.getArray("Matrix");
  8448                let u,
  8449                  d,
  8450                  f = l.getArray("BBox");
  8451                f =
  8452                  Array.isArray(f) && 4 === f.length
  8453                    ? r.Util.normalizeRect(f)
  8454                    : null;
  8455                l.has("OC") &&
  8456                  (u = await this.parseMarkedContentProps(l.get("OC"), e));
  8457                void 0 !== u && n.addOp(r.OPS.beginMarkedContentProps, ["OC", u]);
  8458                const g = l.get("Group");
  8459                if (g) {
  8460                  d = {
  8461                    matrix: h,
  8462                    bbox: f,
  8463                    smask: a,
  8464                    isolated: !1,
  8465                    knockout: !1,
  8466                  };
  8467                  const t = g.get("S");
  8468                  let s = null;
  8469                  if ((0, i.isName)(t, "Transparency")) {
  8470                    d.isolated = g.get("I") || !1;
  8471                    d.knockout = g.get("K") || !1;
  8472                    if (g.has("CS")) {
  8473                      const t = g.getRaw("CS"),
  8474                        a = y.ColorSpace.getCached(t, this.xref, c);
  8475                      s =
  8476                        a ||
  8477                        (await this.parseColorSpace({
  8478                          cs: t,
  8479                          resources: e,
  8480                          localColorSpaceCache: c,
  8481                        }));
  8482                    }
  8483                  }
  8484                  if (a?.backdrop) {
  8485                    s ||= y.ColorSpace.singletons.rgb;
  8486                    a.backdrop = s.getRgb(a.backdrop, 0);
  8487                  }
  8488                  n.addOp(r.OPS.beginGroup, [d]);
  8489                }
  8490                const p = g ? [h, null] : [h, f];
  8491                n.addOp(r.OPS.paintFormXObjectBegin, p);
  8492                return this.getOperatorList({
  8493                  stream: t,
  8494                  task: s,
  8495                  resources: l.get("Resources") || e,
  8496                  operatorList: n,
  8497                  initialState: o,
  8498                }).then(function () {
  8499                  n.addOp(r.OPS.paintFormXObjectEnd, []);
  8500                  g && n.addOp(r.OPS.endGroup, [d]);
  8501                  void 0 !== u && n.addOp(r.OPS.endMarkedContent, []);
  8502                });
  8503              }
  8504              _sendImgData(e, t, a = !1) {
  8505                const r = t ? [t.bitmap || t.data.buffer] : null;
  8506                return this.parsingType3Font || a
  8507                  ? this.handler.send("commonobj", [e, "Image", t], r)
  8508                  : this.handler.send("obj", [e, this.pageIndex, "Image", t], r);
  8509              }
  8510              async buildPaintImageXObject({
  8511                resources: e,
  8512                image: t,
  8513                isInline: a = !1,
  8514                operatorList: n,
  8515                cacheKey: i,
  8516                localImageCache: s,
  8517                localColorSpaceCache: o,
  8518              }) {
  8519                const c = t.dict,
  8520                  l = c.objId,
  8521                  h = c.get("W", "Width"),
  8522                  u = c.get("H", "Height");
  8523                if (!h || "number" != typeof h || !u || "number" != typeof u) {
  8524                  (0, r.warn)("Image dimensions are missing, or not numbers.");
  8525                  return;
  8526                }
  8527                const d = this.options.maxImageSize;
  8528                if (-1 !== d && h * u > d) {
  8529                  const e =
  8530                    "Image exceeded maximum allowed size and was removed.";
  8531                  if (this.options.ignoreErrors) {
  8532                    (0, r.warn)(e);
  8533                    return;
  8534                  }
  8535                  throw new Error(e);
  8536                }
  8537                let f;
  8538                c.has("OC") &&
  8539                  (f = await this.parseMarkedContentProps(c.get("OC"), e));
  8540                let g, p;
  8541                if (c.get("IM", "ImageMask") || !1) {
  8542                  const e = c.get("I", "Interpolate"),
  8543                    a = (h + 7) >> 3,
  8544                    o = t.getBytes(a * u),
  8545                    d = c.getArray("D", "Decode");
  8546                  if (this.parsingType3Font) {
  8547                    g = M.PDFImage.createRawMask({
  8548                      imgArray: o,
  8549                      width: h,
  8550                      height: u,
  8551                      imageIsFromDecodeStream: t instanceof w.DecodeStream,
  8552                      inverseDecode: d?.[0] > 0,
  8553                      interpolate: e,
  8554                    });
  8555                    g.cached = !!i;
  8556                    p = [g];
  8557                    n.addImageOps(r.OPS.paintImageMaskXObject, p, f);
  8558                    if (i) {
  8559                      const e = {
  8560                        fn: r.OPS.paintImageMaskXObject,
  8561                        args: p,
  8562                        optionalContent: f,
  8563                      };
  8564                      s.set(i, l, e);
  8565                      l && this._regionalImageCache.set(null, l, e);
  8566                    }
  8567                    return;
  8568                  }
  8569                  g = await M.PDFImage.createMask({
  8570                    imgArray: o,
  8571                    width: h,
  8572                    height: u,
  8573                    imageIsFromDecodeStream: t instanceof w.DecodeStream,
  8574                    inverseDecode: d?.[0] > 0,
  8575                    interpolate: e,
  8576                    isOffscreenCanvasSupported:
  8577                      this.options.isOffscreenCanvasSupported,
  8578                  });
  8579                  if (g.isSingleOpaquePixel) {
  8580                    n.addImageOps(r.OPS.paintSolidColorImageMask, [], f);
  8581                    if (i) {
  8582                      const e = {
  8583                        fn: r.OPS.paintSolidColorImageMask,
  8584                        args: [],
  8585                        optionalContent: f,
  8586                      };
  8587                      s.set(i, l, e);
  8588                      l && this._regionalImageCache.set(null, l, e);
  8589                    }
  8590                    return;
  8591                  }
  8592                  const m = `mask_${this.idFactory.createObjId()}`;
  8593                  n.addDependency(m);
  8594                  this._sendImgData(m, g);
  8595                  p = [
  8596                    {
  8597                      data: m,
  8598                      width: g.width,
  8599                      height: g.height,
  8600                      interpolate: g.interpolate,
  8601                      count: 1,
  8602                    },
  8603                  ];
  8604                  n.addImageOps(r.OPS.paintImageMaskXObject, p, f);
  8605                  if (i) {
  8606                    const e = {
  8607                      fn: r.OPS.paintImageMaskXObject,
  8608                      args: p,
  8609                      optionalContent: f,
  8610                    };
  8611                    s.set(i, l, e);
  8612                    l && this._regionalImageCache.set(null, l, e);
  8613                  }
  8614                  return;
  8615                }
  8616                if (a && !c.has("SMask") && !c.has("Mask") && h + u < 200) {
  8617                  const i = new M.PDFImage({
  8618                    xref: this.xref,
  8619                    res: e,
  8620                    image: t,
  8621                    isInline: a,
  8622                    pdfFunctionFactory: this._pdfFunctionFactory,
  8623                    localColorSpaceCache: o,
  8624                  });
  8625                  g = await i.createImageData(!0, !1);
  8626                  n.isOffscreenCanvasSupported =
  8627                    this.options.isOffscreenCanvasSupported;
  8628                  n.addImageOps(r.OPS.paintInlineImageXObject, [g], f);
  8629                  return;
  8630                }
  8631                let m = `img_${this.idFactory.createObjId()}`,
  8632                  b = !1;
  8633                if (this.parsingType3Font)
  8634                  m = `${this.idFactory.getDocId()}_type3_${m}`;
  8635                else if (l) {
  8636                  b = this.globalImageCache.shouldCache(l, this.pageIndex);
  8637                  b && (m = `${this.idFactory.getDocId()}_${m}`);
  8638                }
  8639                n.addDependency(m);
  8640                p = [m, h, u];
  8641                M.PDFImage.buildImage({
  8642                  xref: this.xref,
  8643                  res: e,
  8644                  image: t,
  8645                  isInline: a,
  8646                  pdfFunctionFactory: this._pdfFunctionFactory,
  8647                  localColorSpaceCache: o,
  8648                })
  8649                  .then(async (e) => {
  8650                    g = await e.createImageData(
  8651                      !1,
  8652                      this.options.isOffscreenCanvasSupported,
  8653                    );
  8654                    if (i && l && b) {
  8655                      const e = g.bitmap ? g.width * g.height * 4 : g.data.length;
  8656                      this.globalImageCache.addByteSize(l, e);
  8657                    }
  8658                    return this._sendImgData(m, g, b);
  8659                  })
  8660                  .catch((e) => {
  8661                    (0, r.warn)(`Unable to decode image "${m}": "${e}".`);
  8662                    return this._sendImgData(m, null, b);
  8663                  });
  8664                n.addImageOps(r.OPS.paintImageXObject, p, f);
  8665                if (i) {
  8666                  const e = {
  8667                    fn: r.OPS.paintImageXObject,
  8668                    args: p,
  8669                    optionalContent: f,
  8670                  };
  8671                  s.set(i, l, e);
  8672                  if (l) {
  8673                    this._regionalImageCache.set(null, l, e);
  8674                    if (b) {
  8675                      (0, r.assert)(!a, "Cannot cache an inline image globally.");
  8676                      this.globalImageCache.setData(l, {
  8677                        objId: m,
  8678                        fn: r.OPS.paintImageXObject,
  8679                        args: p,
  8680                        optionalContent: f,
  8681                        byteSize: 0,
  8682                      });
  8683                    }
  8684                  }
  8685                }
  8686              }
  8687              handleSMask(e, t, a, r, n, i) {
  8688                const s = e.get("G"),
  8689                  o = { subtype: e.get("S").name, backdrop: e.get("BC") },
  8690                  c = e.get("TR");
  8691                if ((0, d.isPDFFunction)(c)) {
  8692                  const e = this._pdfFunctionFactory.create(c),
  8693                    t = new Uint8Array(256),
  8694                    a = new Float32Array(1);
  8695                  for (let r = 0; r < 256; r++) {
  8696                    a[0] = r / 255;
  8697                    e(a, 0, a, 0);
  8698                    t[r] = (255 * a[0]) | 0;
  8699                  }
  8700                  o.transferMap = t;
  8701                }
  8702                return this.buildFormXObject(t, s, o, a, r, n.state.clone(), i);
  8703              }
  8704              handleTransferFunction(e) {
  8705                let t;
  8706                if (Array.isArray(e)) t = e;
  8707                else {
  8708                  if (!(0, d.isPDFFunction)(e)) return null;
  8709                  t = [e];
  8710                }
  8711                const a = [];
  8712                let r = 0,
  8713                  n = 0;
  8714                for (const e of t) {
  8715                  const t = this.xref.fetchIfRef(e);
  8716                  r++;
  8717                  if ((0, i.isName)(t, "Identity")) {
  8718                    a.push(null);
  8719                    continue;
  8720                  }
  8721                  if (!(0, d.isPDFFunction)(t)) return null;
  8722                  const s = this._pdfFunctionFactory.create(t),
  8723                    o = new Uint8Array(256),
  8724                    c = new Float32Array(1);
  8725                  for (let e = 0; e < 256; e++) {
  8726                    c[0] = e / 255;
  8727                    s(c, 0, c, 0);
  8728                    o[e] = (255 * c[0]) | 0;
  8729                  }
  8730                  a.push(o);
  8731                  n++;
  8732                }
  8733                return (1 !== r && 4 !== r) || 0 === n ? null : a;
  8734              }
  8735              handleTilingType(e, t, a, n, s, o, c, h) {
  8736                const u = new T.OperatorList(),
  8737                  d = i.Dict.merge({
  8738                    xref: this.xref,
  8739                    dictArray: [s.get("Resources"), a],
  8740                  });
  8741                return this.getOperatorList({
  8742                  stream: n,
  8743                  task: c,
  8744                  resources: d,
  8745                  operatorList: u,
  8746                })
  8747                  .then(function () {
  8748                    const a = u.getIR(),
  8749                      r = (0, l.getTilingPatternIR)(a, s, t);
  8750                    o.addDependencies(u.dependencies);
  8751                    o.addOp(e, r);
  8752                    s.objId &&
  8753                      h.set(null, s.objId, { operatorListIR: a, dict: s });
  8754                  })
  8755                  .catch((e) => {
  8756                    if (!(e instanceof r.AbortException)) {
  8757                      if (!this.options.ignoreErrors) throw e;
  8758                      (0, r.warn)(`handleTilingType - ignoring pattern: "${e}".`);
  8759                    }
  8760                  });
  8761              }
  8762              handleSetFont(e, t, a, r, n, o, c = null, l = null) {
  8763                const h = t?.[0] instanceof i.Name ? t[0].name : null;
  8764                return this.loadFont(h, a, e, c, l)
  8765                  .then((t) =>
  8766                    t.font.isType3Font
  8767                      ? t
  8768                          .loadType3Data(this, e, n)
  8769                          .then(function () {
  8770                            r.addDependencies(t.type3Dependencies);
  8771                            return t;
  8772                          })
  8773                          .catch(
  8774                            (e) =>
  8775                              new TranslatedFont({
  8776                                loadedName: "g_font_error",
  8777                                font: new s.ErrorFont(
  8778                                  `Type3 font load error: ${e}`,
  8779                                ),
  8780                                dict: t.font,
  8781                                evaluatorOptions: this.options,
  8782                              }),
  8783                          )
  8784                      : t,
  8785                  )
  8786                  .then((e) => {
  8787                    o.font = e.font;
  8788                    e.send(this.handler);
  8789                    return e.loadedName;
  8790                  });
  8791              }
  8792              handleText(e, t) {
  8793                const a = t.font,
  8794                  n = a.charsToGlyphs(e);
  8795                if (a.data) {
  8796                  (!!(
  8797                    t.textRenderingMode & r.TextRenderingMode.ADD_TO_PATH_FLAG
  8798                  ) ||
  8799                    "Pattern" === t.fillColorSpace.name ||
  8800                    a.disableFontFace ||
  8801                    this.options.disableFontFace) &&
  8802                    PartialEvaluator.buildFontPaths(
  8803                      a,
  8804                      n,
  8805                      this.handler,
  8806                      this.options,
  8807                    );
  8808                }
  8809                return n;
  8810              }
  8811              ensureStateFont(e) {
  8812                if (e.font) return;
  8813                const t = new r.FormatError(
  8814                  "Missing setFont (Tf) operator before text rendering operator.",
  8815                );
  8816                if (!this.options.ignoreErrors) throw t;
  8817                (0, r.warn)(`ensureStateFont: "${t}".`);
  8818              }
  8819              async setGState({
  8820                resources: e,
  8821                gState: t,
  8822                operatorList: a,
  8823                cacheKey: n,
  8824                task: s,
  8825                stateManager: o,
  8826                localGStateCache: c,
  8827                localColorSpaceCache: l,
  8828              }) {
  8829                const h = t.objId;
  8830                let u = !0;
  8831                const d = [];
  8832                let f = Promise.resolve();
  8833                for (const n of t.getKeys()) {
  8834                  const c = t.get(n);
  8835                  switch (n) {
  8836                    case "Type":
  8837                      break;
  8838                    case "LW":
  8839                    case "LC":
  8840                    case "LJ":
  8841                    case "ML":
  8842                    case "D":
  8843                    case "RI":
  8844                    case "FL":
  8845                    case "CA":
  8846                    case "ca":
  8847                      d.push([n, c]);
  8848                      break;
  8849                    case "Font":
  8850                      u = !1;
  8851                      f = f.then(() =>
  8852                        this.handleSetFont(e, null, c[0], a, s, o.state).then(
  8853                          function (e) {
  8854                            a.addDependency(e);
  8855                            d.push([n, [e, c[1]]]);
  8856                          },
  8857                        ),
  8858                      );
  8859                      break;
  8860                    case "BM":
  8861                      d.push([n, normalizeBlendMode(c)]);
  8862                      break;
  8863                    case "SMask":
  8864                      if ((0, i.isName)(c, "None")) {
  8865                        d.push([n, !1]);
  8866                        break;
  8867                      }
  8868                      if (c instanceof i.Dict) {
  8869                        u = !1;
  8870                        f = f.then(() => this.handleSMask(c, e, a, s, o, l));
  8871                        d.push([n, !0]);
  8872                      } else (0, r.warn)("Unsupported SMask type");
  8873                      break;
  8874                    case "TR":
  8875                      const t = this.handleTransferFunction(c);
  8876                      d.push([n, t]);
  8877                      break;
  8878                    case "OP":
  8879                    case "op":
  8880                    case "OPM":
  8881                    case "BG":
  8882                    case "BG2":
  8883                    case "UCR":
  8884                    case "UCR2":
  8885                    case "TR2":
  8886                    case "HT":
  8887                    case "SM":
  8888                    case "SA":
  8889                    case "AIS":
  8890                    case "TK":
  8891                      (0, r.info)("graphic state operator " + n);
  8892                      break;
  8893                    default:
  8894                      (0, r.info)("Unknown graphic state operator " + n);
  8895                  }
  8896                }
  8897                return f.then(function () {
  8898                  d.length > 0 && a.addOp(r.OPS.setGState, [d]);
  8899                  u && c.set(n, h, d);
  8900                });
  8901              }
  8902              loadFont(e, t, a, n = null, o = null) {
  8903                const errorFont = async () =>
  8904                  new TranslatedFont({
  8905                    loadedName: "g_font_error",
  8906                    font: new s.ErrorFont(`Font "${e}" is not available.`),
  8907                    dict: t,
  8908                    evaluatorOptions: this.options,
  8909                  });
  8910                let c;
  8911                if (t) t instanceof i.Ref && (c = t);
  8912                else {
  8913                  const t = a.get("Font");
  8914                  t && (c = t.getRaw(e));
  8915                }
  8916                if (c) {
  8917                  if (this.parsingType3Font && this.type3FontRefs.has(c))
  8918                    return errorFont();
  8919                  if (this.fontCache.has(c)) return this.fontCache.get(c);
  8920                  t = this.xref.fetchIfRef(c);
  8921                }
  8922                if (!(t instanceof i.Dict)) {
  8923                  if (!this.options.ignoreErrors && !this.parsingType3Font) {
  8924                    (0, r.warn)(`Font "${e}" is not available.`);
  8925                    return errorFont();
  8926                  }
  8927                  (0, r.warn)(
  8928                    `Font "${e}" is not available -- attempting to fallback to a default font.`,
  8929                  );
  8930                  t = n || PartialEvaluator.fallbackFontDict;
  8931                }
  8932                if (t.cacheKey && this.fontCache.has(t.cacheKey))
  8933                  return this.fontCache.get(t.cacheKey);
  8934                const l = new r.PromiseCapability();
  8935                let h;
  8936                try {
  8937                  h = this.preEvaluateFont(t);
  8938                  h.cssFontInfo = o;
  8939                } catch (e) {
  8940                  (0, r.warn)(`loadFont - preEvaluateFont failed: "${e}".`);
  8941                  return errorFont();
  8942                }
  8943                const { descriptor: u, hash: d } = h,
  8944                  f = c instanceof i.Ref;
  8945                let g;
  8946                if (d && u instanceof i.Dict) {
  8947                  const e = (u.fontAliases ||= Object.create(null));
  8948                  if (e[d]) {
  8949                    const t = e[d].aliasRef;
  8950                    if (f && t && this.fontCache.has(t)) {
  8951                      this.fontCache.putAlias(c, t);
  8952                      return this.fontCache.get(c);
  8953                    }
  8954                  } else e[d] = { fontID: this.idFactory.createFontId() };
  8955                  f && (e[d].aliasRef = c);
  8956                  g = e[d].fontID;
  8957                } else g = this.idFactory.createFontId();
  8958                (0, r.assert)(
  8959                  g?.startsWith("f"),
  8960                  'The "fontID" must be (correctly) defined.',
  8961                );
  8962                if (f) this.fontCache.put(c, l.promise);
  8963                else {
  8964                  t.cacheKey = `cacheKey_${g}`;
  8965                  this.fontCache.put(t.cacheKey, l.promise);
  8966                }
  8967                t.loadedName = `${this.idFactory.getDocId()}_${g}`;
  8968                this.translateFont(h)
  8969                  .then((e) => {
  8970                    l.resolve(
  8971                      new TranslatedFont({
  8972                        loadedName: t.loadedName,
  8973                        font: e,
  8974                        dict: t,
  8975                        evaluatorOptions: this.options,
  8976                      }),
  8977                    );
  8978                  })
  8979                  .catch((e) => {
  8980                    (0, r.warn)(`loadFont - translateFont failed: "${e}".`);
  8981                    l.resolve(
  8982                      new TranslatedFont({
  8983                        loadedName: t.loadedName,
  8984                        font: new s.ErrorFont(e instanceof Error ? e.message : e),
  8985                        dict: t,
  8986                        evaluatorOptions: this.options,
  8987                      }),
  8988                    );
  8989                  });
  8990                return l.promise;
  8991              }
  8992              buildPath(e, t, a, n = !1) {
  8993                const i = e.length - 1;
  8994                a || (a = []);
  8995                if (i < 0 || e.fnArray[i] !== r.OPS.constructPath) {
  8996                  if (n) {
  8997                    (0, r.warn)(
  8998                      `Encountered path operator "${t}" inside of a text object.`,
  8999                    );
  9000                    e.addOp(r.OPS.save, null);
  9001                  }
  9002                  let i;
  9003                  switch (t) {
  9004                    case r.OPS.rectangle:
  9005                      const e = a[0] + a[2],
  9006                        t = a[1] + a[3];
  9007                      i = [
  9008                        Math.min(a[0], e),
  9009                        Math.max(a[0], e),
  9010                        Math.min(a[1], t),
  9011                        Math.max(a[1], t),
  9012                      ];
  9013                      break;
  9014                    case r.OPS.moveTo:
  9015                    case r.OPS.lineTo:
  9016                      i = [a[0], a[0], a[1], a[1]];
  9017                      break;
  9018                    default:
  9019                      i = [1 / 0, -1 / 0, 1 / 0, -1 / 0];
  9020                  }
  9021                  e.addOp(r.OPS.constructPath, [[t], a, i]);
  9022                  n && e.addOp(r.OPS.restore, null);
  9023                } else {
  9024                  const n = e.argsArray[i];
  9025                  n[0].push(t);
  9026                  n[1].push(...a);
  9027                  const s = n[2];
  9028                  switch (t) {
  9029                    case r.OPS.rectangle:
  9030                      const e = a[0] + a[2],
  9031                        t = a[1] + a[3];
  9032                      s[0] = Math.min(s[0], a[0], e);
  9033                      s[1] = Math.max(s[1], a[0], e);
  9034                      s[2] = Math.min(s[2], a[1], t);
  9035                      s[3] = Math.max(s[3], a[1], t);
  9036                      break;
  9037                    case r.OPS.moveTo:
  9038                    case r.OPS.lineTo:
  9039                      s[0] = Math.min(s[0], a[0]);
  9040                      s[1] = Math.max(s[1], a[0]);
  9041                      s[2] = Math.min(s[2], a[1]);
  9042                      s[3] = Math.max(s[3], a[1]);
  9043                  }
  9044                }
  9045              }
  9046              parseColorSpace({ cs: e, resources: t, localColorSpaceCache: a }) {
  9047                return y.ColorSpace.parseAsync({
  9048                  cs: e,
  9049                  xref: this.xref,
  9050                  resources: t,
  9051                  pdfFunctionFactory: this._pdfFunctionFactory,
  9052                  localColorSpaceCache: a,
  9053                }).catch((e) => {
  9054                  if (e instanceof r.AbortException) return null;
  9055                  if (this.options.ignoreErrors) {
  9056                    (0, r.warn)(`parseColorSpace - ignoring ColorSpace: "${e}".`);
  9057                    return null;
  9058                  }
  9059                  throw e;
  9060                });
  9061              }
  9062              parseShading({
  9063                shading: e,
  9064                resources: t,
  9065                localColorSpaceCache: a,
  9066                localShadingPatternCache: r,
  9067              }) {
  9068                let n = r.get(e);
  9069                if (!n) {
  9070                  const i = l.Pattern.parseShading(
  9071                    e,
  9072                    this.xref,
  9073                    t,
  9074                    this._pdfFunctionFactory,
  9075                    a,
  9076                  ).getIR();
  9077                  n = `pattern_${this.idFactory.createObjId()}`;
  9078                  this.parsingType3Font &&
  9079                    (n = `${this.idFactory.getDocId()}_type3_${n}`);
  9080                  r.set(e, n);
  9081                  this.parsingType3Font
  9082                    ? this.handler.send("commonobj", [n, "Pattern", i])
  9083                    : this.handler.send("obj", [n, this.pageIndex, "Pattern", i]);
  9084                }
  9085                return n;
  9086              }
  9087              handleColorN(e, t, a, n, s, o, c, h, u, d) {
  9088                const f = a.pop();
  9089                if (f instanceof i.Name) {
  9090                  const g = s.getRaw(f.name),
  9091                    p = g instanceof i.Ref && u.getByRef(g);
  9092                  if (p)
  9093                    try {
  9094                      const r = n.base ? n.base.getRgb(a, 0) : null,
  9095                        i = (0, l.getTilingPatternIR)(
  9096                          p.operatorListIR,
  9097                          p.dict,
  9098                          r,
  9099                        );
  9100                      e.addOp(t, i);
  9101                      return;
  9102                    } catch {}
  9103                  const b = this.xref.fetchIfRef(g);
  9104                  if (b) {
  9105                    const i = b instanceof m.BaseStream ? b.dict : b,
  9106                      s = i.get("PatternType");
  9107                    if (s === E) {
  9108                      const r = n.base ? n.base.getRgb(a, 0) : null;
  9109                      return this.handleTilingType(t, r, o, b, i, e, c, u);
  9110                    }
  9111                    if (s === N) {
  9112                      const a = i.get("Shading"),
  9113                        r = i.getArray("Matrix"),
  9114                        n = this.parseShading({
  9115                          shading: a,
  9116                          resources: o,
  9117                          localColorSpaceCache: h,
  9118                          localShadingPatternCache: d,
  9119                        });
  9120                      e.addOp(t, ["Shading", n, r]);
  9121                      return;
  9122                    }
  9123                    throw new r.FormatError(`Unknown PatternType: ${s}`);
  9124                  }
  9125                }
  9126                throw new r.FormatError(`Unknown PatternName: ${f}`);
  9127              }
  9128              _parseVisibilityExpression(e, t, a) {
  9129                if (++t > 10) {
  9130                  (0, r.warn)("Visibility expression is too deeply nested");
  9131                  return;
  9132                }
  9133                const n = e.length,
  9134                  s = this.xref.fetchIfRef(e[0]);
  9135                if (!(n < 2) && s instanceof i.Name) {
  9136                  switch (s.name) {
  9137                    case "And":
  9138                    case "Or":
  9139                    case "Not":
  9140                      a.push(s.name);
  9141                      break;
  9142                    default:
  9143                      (0, r.warn)(
  9144                        `Invalid operator ${s.name} in visibility expression`,
  9145                      );
  9146                      return;
  9147                  }
  9148                  for (let r = 1; r < n; r++) {
  9149                    const n = e[r],
  9150                      s = this.xref.fetchIfRef(n);
  9151                    if (Array.isArray(s)) {
  9152                      const e = [];
  9153                      a.push(e);
  9154                      this._parseVisibilityExpression(s, t, e);
  9155                    } else n instanceof i.Ref && a.push(n.toString());
  9156                  }
  9157                } else (0, r.warn)("Invalid visibility expression");
  9158              }
  9159              async parseMarkedContentProps(e, t) {
  9160                let a;
  9161                if (e instanceof i.Name) {
  9162                  a = t.get("Properties").get(e.name);
  9163                } else {
  9164                  if (!(e instanceof i.Dict))
  9165                    throw new r.FormatError(
  9166                      "Optional content properties malformed.",
  9167                    );
  9168                  a = e;
  9169                }
  9170                const n = a.get("Type")?.name;
  9171                if ("OCG" === n) return { type: n, id: a.objId };
  9172                if ("OCMD" === n) {
  9173                  const e = a.get("VE");
  9174                  if (Array.isArray(e)) {
  9175                    const t = [];
  9176                    this._parseVisibilityExpression(e, 0, t);
  9177                    if (t.length > 0) return { type: "OCMD", expression: t };
  9178                  }
  9179                  const t = a.get("OCGs");
  9180                  if (Array.isArray(t) || t instanceof i.Dict) {
  9181                    const e = [];
  9182                    if (Array.isArray(t)) for (const a of t) e.push(a.toString());
  9183                    else e.push(t.objId);
  9184                    return {
  9185                      type: n,
  9186                      ids: e,
  9187                      policy:
  9188                        a.get("P") instanceof i.Name ? a.get("P").name : null,
  9189                      expression: null,
  9190                    };
  9191                  }
  9192                  if (t instanceof i.Ref) return { type: n, id: t.toString() };
  9193                }
  9194                return null;
  9195              }
  9196              getOperatorList({
  9197                stream: e,
  9198                task: t,
  9199                resources: a,
  9200                operatorList: n,
  9201                initialState: s = null,
  9202                fallbackFontDict: o = null,
  9203              }) {
  9204                a ||= i.Dict.empty;
  9205                s ||= new EvalState();
  9206                if (!n)
  9207                  throw new Error(
  9208                    'getOperatorList: missing "operatorList" parameter',
  9209                  );
  9210                const c = this,
  9211                  l = this.xref;
  9212                let h = !1;
  9213                const u = new g.LocalImageCache(),
  9214                  d = new g.LocalColorSpaceCache(),
  9215                  f = new g.LocalGStateCache(),
  9216                  p = new g.LocalTilingPatternCache(),
  9217                  b = new Map(),
  9218                  w = a.get("XObject") || i.Dict.empty,
  9219                  S = a.get("Pattern") || i.Dict.empty,
  9220                  x = new StateManager(s),
  9221                  C = new EvaluatorPreprocessor(e, l, x),
  9222                  k = new TimeSlotManager();
  9223                function closePendingRestoreOPS(e) {
  9224                  for (let e = 0, t = C.savedStatesDepth; e < t; e++)
  9225                    n.addOp(r.OPS.restore, []);
  9226                }
  9227                return new Promise(function promiseBody(e, s) {
  9228                  const next = function (t) {
  9229                    Promise.all([t, n.ready]).then(function () {
  9230                      try {
  9231                        promiseBody(e, s);
  9232                      } catch (e) {
  9233                        s(e);
  9234                      }
  9235                    }, s);
  9236                  };
  9237                  t.ensureNotTerminated();
  9238                  k.reset();
  9239                  const g = {};
  9240                  let v, F, O, T, M, D;
  9241                  for (; !(v = k.check()); ) {
  9242                    g.args = null;
  9243                    if (!C.read(g)) break;
  9244                    let e = g.args,
  9245                      s = g.fn;
  9246                    switch (0 | s) {
  9247                      case r.OPS.paintXObject:
  9248                        D = e[0] instanceof i.Name;
  9249                        M = e[0].name;
  9250                        if (D) {
  9251                          const t = u.getByName(M);
  9252                          if (t) {
  9253                            n.addImageOps(t.fn, t.args, t.optionalContent);
  9254                            incrementCachedImageMaskCount(t);
  9255                            e = null;
  9256                            continue;
  9257                          }
  9258                        }
  9259                        next(
  9260                          new Promise(function (e, s) {
  9261                            if (!D)
  9262                              throw new r.FormatError(
  9263                                "XObject must be referred to by name.",
  9264                              );
  9265                            let o = w.getRaw(M);
  9266                            if (o instanceof i.Ref) {
  9267                              const t =
  9268                                u.getByRef(o) ||
  9269                                c._regionalImageCache.getByRef(o);
  9270                              if (t) {
  9271                                n.addImageOps(t.fn, t.args, t.optionalContent);
  9272                                incrementCachedImageMaskCount(t);
  9273                                e();
  9274                                return;
  9275                              }
  9276                              const a = c.globalImageCache.getData(
  9277                                o,
  9278                                c.pageIndex,
  9279                              );
  9280                              if (a) {
  9281                                n.addDependency(a.objId);
  9282                                n.addImageOps(a.fn, a.args, a.optionalContent);
  9283                                e();
  9284                                return;
  9285                              }
  9286                              o = l.fetch(o);
  9287                            }
  9288                            if (!(o instanceof m.BaseStream))
  9289                              throw new r.FormatError(
  9290                                "XObject should be a stream",
  9291                              );
  9292                            const h = o.dict.get("Subtype");
  9293                            if (!(h instanceof i.Name))
  9294                              throw new r.FormatError(
  9295                                "XObject should have a Name subtype",
  9296                              );
  9297                            if ("Form" !== h.name)
  9298                              if ("Image" !== h.name) {
  9299                                if ("PS" !== h.name)
  9300                                  throw new r.FormatError(
  9301                                    `Unhandled XObject subtype ${h.name}`,
  9302                                  );
  9303                                (0, r.info)("Ignored XObject subtype PS");
  9304                                e();
  9305                              } else
  9306                                c.buildPaintImageXObject({
  9307                                  resources: a,
  9308                                  image: o,
  9309                                  operatorList: n,
  9310                                  cacheKey: M,
  9311                                  localImageCache: u,
  9312                                  localColorSpaceCache: d,
  9313                                }).then(e, s);
  9314                            else {
  9315                              x.save();
  9316                              c.buildFormXObject(
  9317                                a,
  9318                                o,
  9319                                null,
  9320                                n,
  9321                                t,
  9322                                x.state.clone(),
  9323                                d,
  9324                              ).then(function () {
  9325                                x.restore();
  9326                                e();
  9327                              }, s);
  9328                            }
  9329                          }).catch(function (e) {
  9330                            if (!(e instanceof r.AbortException)) {
  9331                              if (!c.options.ignoreErrors) throw e;
  9332                              (0, r.warn)(
  9333                                `getOperatorList - ignoring XObject: "${e}".`,
  9334                              );
  9335                            }
  9336                          }),
  9337                        );
  9338                        return;
  9339                      case r.OPS.setFont:
  9340                        var E = e[1];
  9341                        next(
  9342                          c
  9343                            .handleSetFont(a, e, null, n, t, x.state, o)
  9344                            .then(function (e) {
  9345                              n.addDependency(e);
  9346                              n.addOp(r.OPS.setFont, [e, E]);
  9347                            }),
  9348                        );
  9349                        return;
  9350                      case r.OPS.beginText:
  9351                        h = !0;
  9352                        break;
  9353                      case r.OPS.endText:
  9354                        h = !1;
  9355                        break;
  9356                      case r.OPS.endInlineImage:
  9357                        var N = e[0].cacheKey;
  9358                        if (N) {
  9359                          const t = u.getByName(N);
  9360                          if (t) {
  9361                            n.addImageOps(t.fn, t.args, t.optionalContent);
  9362                            incrementCachedImageMaskCount(t);
  9363                            e = null;
  9364                            continue;
  9365                          }
  9366                        }
  9367                        next(
  9368                          c.buildPaintImageXObject({
  9369                            resources: a,
  9370                            image: e[0],
  9371                            isInline: !0,
  9372                            operatorList: n,
  9373                            cacheKey: N,
  9374                            localImageCache: u,
  9375                            localColorSpaceCache: d,
  9376                          }),
  9377                        );
  9378                        return;
  9379                      case r.OPS.showText:
  9380                        if (!x.state.font) {
  9381                          c.ensureStateFont(x.state);
  9382                          continue;
  9383                        }
  9384                        e[0] = c.handleText(e[0], x.state);
  9385                        break;
  9386                      case r.OPS.showSpacedText:
  9387                        if (!x.state.font) {
  9388                          c.ensureStateFont(x.state);
  9389                          continue;
  9390                        }
  9391                        var L = [],
  9392                          $ = x.state;
  9393                        for (const t of e[0])
  9394                          "string" == typeof t
  9395                            ? L.push(...c.handleText(t, $))
  9396                            : "number" == typeof t && L.push(t);
  9397                        e[0] = L;
  9398                        s = r.OPS.showText;
  9399                        break;
  9400                      case r.OPS.nextLineShowText:
  9401                        if (!x.state.font) {
  9402                          c.ensureStateFont(x.state);
  9403                          continue;
  9404                        }
  9405                        n.addOp(r.OPS.nextLine);
  9406                        e[0] = c.handleText(e[0], x.state);
  9407                        s = r.OPS.showText;
  9408                        break;
  9409                      case r.OPS.nextLineSetSpacingShowText:
  9410                        if (!x.state.font) {
  9411                          c.ensureStateFont(x.state);
  9412                          continue;
  9413                        }
  9414                        n.addOp(r.OPS.nextLine);
  9415                        n.addOp(r.OPS.setWordSpacing, [e.shift()]);
  9416                        n.addOp(r.OPS.setCharSpacing, [e.shift()]);
  9417                        e[0] = c.handleText(e[0], x.state);
  9418                        s = r.OPS.showText;
  9419                        break;
  9420                      case r.OPS.setTextRenderingMode:
  9421                        x.state.textRenderingMode = e[0];
  9422                        break;
  9423                      case r.OPS.setFillColorSpace: {
  9424                        const t = y.ColorSpace.getCached(e[0], l, d);
  9425                        if (t) {
  9426                          x.state.fillColorSpace = t;
  9427                          continue;
  9428                        }
  9429                        next(
  9430                          c
  9431                            .parseColorSpace({
  9432                              cs: e[0],
  9433                              resources: a,
  9434                              localColorSpaceCache: d,
  9435                            })
  9436                            .then(function (e) {
  9437                              e && (x.state.fillColorSpace = e);
  9438                            }),
  9439                        );
  9440                        return;
  9441                      }
  9442                      case r.OPS.setStrokeColorSpace: {
  9443                        const t = y.ColorSpace.getCached(e[0], l, d);
  9444                        if (t) {
  9445                          x.state.strokeColorSpace = t;
  9446                          continue;
  9447                        }
  9448                        next(
  9449                          c
  9450                            .parseColorSpace({
  9451                              cs: e[0],
  9452                              resources: a,
  9453                              localColorSpaceCache: d,
  9454                            })
  9455                            .then(function (e) {
  9456                              e && (x.state.strokeColorSpace = e);
  9457                            }),
  9458                        );
  9459                        return;
  9460                      }
  9461                      case r.OPS.setFillColor:
  9462                        T = x.state.fillColorSpace;
  9463                        e = T.getRgb(e, 0);
  9464                        s = r.OPS.setFillRGBColor;
  9465                        break;
  9466                      case r.OPS.setStrokeColor:
  9467                        T = x.state.strokeColorSpace;
  9468                        e = T.getRgb(e, 0);
  9469                        s = r.OPS.setStrokeRGBColor;
  9470                        break;
  9471                      case r.OPS.setFillGray:
  9472                        x.state.fillColorSpace = y.ColorSpace.singletons.gray;
  9473                        e = y.ColorSpace.singletons.gray.getRgb(e, 0);
  9474                        s = r.OPS.setFillRGBColor;
  9475                        break;
  9476                      case r.OPS.setStrokeGray:
  9477                        x.state.strokeColorSpace = y.ColorSpace.singletons.gray;
  9478                        e = y.ColorSpace.singletons.gray.getRgb(e, 0);
  9479                        s = r.OPS.setStrokeRGBColor;
  9480                        break;
  9481                      case r.OPS.setFillCMYKColor:
  9482                        x.state.fillColorSpace = y.ColorSpace.singletons.cmyk;
  9483                        e = y.ColorSpace.singletons.cmyk.getRgb(e, 0);
  9484                        s = r.OPS.setFillRGBColor;
  9485                        break;
  9486                      case r.OPS.setStrokeCMYKColor:
  9487                        x.state.strokeColorSpace = y.ColorSpace.singletons.cmyk;
  9488                        e = y.ColorSpace.singletons.cmyk.getRgb(e, 0);
  9489                        s = r.OPS.setStrokeRGBColor;
  9490                        break;
  9491                      case r.OPS.setFillRGBColor:
  9492                        x.state.fillColorSpace = y.ColorSpace.singletons.rgb;
  9493                        e = y.ColorSpace.singletons.rgb.getRgb(e, 0);
  9494                        break;
  9495                      case r.OPS.setStrokeRGBColor:
  9496                        x.state.strokeColorSpace = y.ColorSpace.singletons.rgb;
  9497                        e = y.ColorSpace.singletons.rgb.getRgb(e, 0);
  9498                        break;
  9499                      case r.OPS.setFillColorN:
  9500                        T = x.state.fillColorSpace;
  9501                        if ("Pattern" === T.name) {
  9502                          next(
  9503                            c.handleColorN(
  9504                              n,
  9505                              r.OPS.setFillColorN,
  9506                              e,
  9507                              T,
  9508                              S,
  9509                              a,
  9510                              t,
  9511                              d,
  9512                              p,
  9513                              b,
  9514                            ),
  9515                          );
  9516                          return;
  9517                        }
  9518                        e = T.getRgb(e, 0);
  9519                        s = r.OPS.setFillRGBColor;
  9520                        break;
  9521                      case r.OPS.setStrokeColorN:
  9522                        T = x.state.strokeColorSpace;
  9523                        if ("Pattern" === T.name) {
  9524                          next(
  9525                            c.handleColorN(
  9526                              n,
  9527                              r.OPS.setStrokeColorN,
  9528                              e,
  9529                              T,
  9530                              S,
  9531                              a,
  9532                              t,
  9533                              d,
  9534                              p,
  9535                              b,
  9536                            ),
  9537                          );
  9538                          return;
  9539                        }
  9540                        e = T.getRgb(e, 0);
  9541                        s = r.OPS.setStrokeRGBColor;
  9542                        break;
  9543                      case r.OPS.shadingFill:
  9544                        var _ = a.get("Shading");
  9545                        if (!_)
  9546                          throw new r.FormatError("No shading resource found");
  9547                        var j = _.get(e[0].name);
  9548                        if (!j)
  9549                          throw new r.FormatError("No shading object found");
  9550                        e = [
  9551                          c.parseShading({
  9552                            shading: j,
  9553                            resources: a,
  9554                            localColorSpaceCache: d,
  9555                            localShadingPatternCache: b,
  9556                          }),
  9557                        ];
  9558                        s = r.OPS.shadingFill;
  9559                        break;
  9560                      case r.OPS.setGState:
  9561                        D = e[0] instanceof i.Name;
  9562                        M = e[0].name;
  9563                        if (D) {
  9564                          const t = f.getByName(M);
  9565                          if (t) {
  9566                            t.length > 0 && n.addOp(r.OPS.setGState, [t]);
  9567                            e = null;
  9568                            continue;
  9569                          }
  9570                        }
  9571                        next(
  9572                          new Promise(function (e, s) {
  9573                            if (!D)
  9574                              throw new r.FormatError(
  9575                                "GState must be referred to by name.",
  9576                              );
  9577                            const o = a.get("ExtGState");
  9578                            if (!(o instanceof i.Dict))
  9579                              throw new r.FormatError(
  9580                                "ExtGState should be a dictionary.",
  9581                              );
  9582                            const l = o.get(M);
  9583                            if (!(l instanceof i.Dict))
  9584                              throw new r.FormatError(
  9585                                "GState should be a dictionary.",
  9586                              );
  9587                            c.setGState({
  9588                              resources: a,
  9589                              gState: l,
  9590                              operatorList: n,
  9591                              cacheKey: M,
  9592                              task: t,
  9593                              stateManager: x,
  9594                              localGStateCache: f,
  9595                              localColorSpaceCache: d,
  9596                            }).then(e, s);
  9597                          }).catch(function (e) {
  9598                            if (!(e instanceof r.AbortException)) {
  9599                              if (!c.options.ignoreErrors) throw e;
  9600                              (0, r.warn)(
  9601                                `getOperatorList - ignoring ExtGState: "${e}".`,
  9602                              );
  9603                            }
  9604                          }),
  9605                        );
  9606                        return;
  9607                      case r.OPS.moveTo:
  9608                      case r.OPS.lineTo:
  9609                      case r.OPS.curveTo:
  9610                      case r.OPS.curveTo2:
  9611                      case r.OPS.curveTo3:
  9612                      case r.OPS.closePath:
  9613                      case r.OPS.rectangle:
  9614                        c.buildPath(n, s, e, h);
  9615                        continue;
  9616                      case r.OPS.markPoint:
  9617                      case r.OPS.markPointProps:
  9618                      case r.OPS.beginCompat:
  9619                      case r.OPS.endCompat:
  9620                        continue;
  9621                      case r.OPS.beginMarkedContentProps:
  9622                        if (!(e[0] instanceof i.Name)) {
  9623                          (0, r.warn)(
  9624                            `Expected name for beginMarkedContentProps arg0=${e[0]}`,
  9625                          );
  9626                          continue;
  9627                        }
  9628                        if ("OC" === e[0].name) {
  9629                          next(
  9630                            c
  9631                              .parseMarkedContentProps(e[1], a)
  9632                              .then((e) => {
  9633                                n.addOp(r.OPS.beginMarkedContentProps, ["OC", e]);
  9634                              })
  9635                              .catch((e) => {
  9636                                if (!(e instanceof r.AbortException)) {
  9637                                  if (!c.options.ignoreErrors) throw e;
  9638                                  (0, r.warn)(
  9639                                    `getOperatorList - ignoring beginMarkedContentProps: "${e}".`,
  9640                                  );
  9641                                }
  9642                              }),
  9643                          );
  9644                          return;
  9645                        }
  9646                        e = [
  9647                          e[0].name,
  9648                          e[1] instanceof i.Dict ? e[1].get("MCID") : null,
  9649                        ];
  9650                        break;
  9651                      case r.OPS.beginMarkedContent:
  9652                      case r.OPS.endMarkedContent:
  9653                      default:
  9654                        if (null !== e) {
  9655                          for (
  9656                            F = 0, O = e.length;
  9657                            F < O && !(e[F] instanceof i.Dict);
  9658                            F++
  9659                          );
  9660                          if (F < O) {
  9661                            (0, r.warn)(
  9662                              "getOperatorList - ignoring operator: " + s,
  9663                            );
  9664                            continue;
  9665                          }
  9666                        }
  9667                    }
  9668                    n.addOp(s, e);
  9669                  }
  9670                  if (v) next(R);
  9671                  else {
  9672                    closePendingRestoreOPS();
  9673                    e();
  9674                  }
  9675                }).catch((e) => {
  9676                  if (!(e instanceof r.AbortException)) {
  9677                    if (!this.options.ignoreErrors) throw e;
  9678                    (0, r.warn)(
  9679                      `getOperatorList - ignoring errors during "${t.name}" task: "${e}".`,
  9680                    );
  9681                    closePendingRestoreOPS();
  9682                  }
  9683                });
  9684              }
  9685              getTextContent({
  9686                stream: e,
  9687                task: t,
  9688                resources: a,
  9689                stateManager: n = null,
  9690                includeMarkedContent: s = !1,
  9691                sink: o,
  9692                seenStyles: c = new Set(),
  9693                viewBox: l,
  9694                markedContentData: h = null,
  9695                disableNormalization: u = !1,
  9696              }) {
  9697                a ||= i.Dict.empty;
  9698                n ||= new StateManager(new TextState());
  9699                s && (h ||= { level: 0 });
  9700                const d = { items: [], styles: Object.create(null) },
  9701                  f = {
  9702                    initialized: !1,
  9703                    str: [],
  9704                    totalWidth: 0,
  9705                    totalHeight: 0,
  9706                    width: 0,
  9707                    height: 0,
  9708                    vertical: !1,
  9709                    prevTransform: null,
  9710                    textAdvanceScale: 0,
  9711                    spaceInFlowMin: 0,
  9712                    spaceInFlowMax: 0,
  9713                    trackingSpaceMin: 1 / 0,
  9714                    negativeSpaceMax: -1 / 0,
  9715                    notASpace: -1 / 0,
  9716                    transform: null,
  9717                    fontName: null,
  9718                    hasEOL: !1,
  9719                  },
  9720                  p = [" ", " "];
  9721                let y = 0;
  9722                function saveLastChar(e) {
  9723                  const t = (y + 1) % 2,
  9724                    a = " " !== p[y] && " " === p[t];
  9725                  p[y] = e;
  9726                  y = t;
  9727                  return a;
  9728                }
  9729                function shouldAddWhitepsace() {
  9730                  return " " !== p[y] && " " === p[(y + 1) % 2];
  9731                }
  9732                function resetLastChars() {
  9733                  p[0] = p[1] = " ";
  9734                  y = 0;
  9735                }
  9736                const w = this,
  9737                  S = this.xref,
  9738                  x = [];
  9739                let C = null;
  9740                const k = new g.LocalImageCache(),
  9741                  v = new g.LocalGStateCache(),
  9742                  F = new EvaluatorPreprocessor(e, S, n);
  9743                let O;
  9744                function pushWhitespace({
  9745                  width: e = 0,
  9746                  height: t = 0,
  9747                  transform: a = f.prevTransform,
  9748                  fontName: r = f.fontName,
  9749                }) {
  9750                  d.items.push({
  9751                    str: " ",
  9752                    dir: "ltr",
  9753                    width: e,
  9754                    height: t,
  9755                    transform: a,
  9756                    fontName: r,
  9757                    hasEOL: !1,
  9758                  });
  9759                }
  9760                function getCurrentTextTransform() {
  9761                  const e = O.font,
  9762                    t = [
  9763                      O.fontSize * O.textHScale,
  9764                      0,
  9765                      0,
  9766                      O.fontSize,
  9767                      0,
  9768                      O.textRise,
  9769                    ];
  9770                  if (
  9771                    e.isType3Font &&
  9772                    (O.fontSize <= 1 || e.isCharBBox) &&
  9773                    !(0, r.isArrayEqual)(O.fontMatrix, r.FONT_IDENTITY_MATRIX)
  9774                  ) {
  9775                    const a = e.bbox[3] - e.bbox[1];
  9776                    a > 0 && (t[3] *= a * O.fontMatrix[3]);
  9777                  }
  9778                  return r.Util.transform(
  9779                    O.ctm,
  9780                    r.Util.transform(O.textMatrix, t),
  9781                  );
  9782                }
  9783                function ensureTextContentItem() {
  9784                  if (f.initialized) return f;
  9785                  const { font: e, loadedName: t } = O;
  9786                  if (!c.has(t)) {
  9787                    c.add(t);
  9788                    d.styles[t] = {
  9789                      fontFamily: e.fallbackName,
  9790                      ascent: e.ascent,
  9791                      descent: e.descent,
  9792                      vertical: e.vertical,
  9793                    };
  9794                  }
  9795                  f.fontName = t;
  9796                  const a = (f.transform = getCurrentTextTransform());
  9797                  if (e.vertical) {
  9798                    f.width = f.totalWidth = Math.hypot(a[0], a[1]);
  9799                    f.height = f.totalHeight = 0;
  9800                    f.vertical = !0;
  9801                  } else {
  9802                    f.width = f.totalWidth = 0;
  9803                    f.height = f.totalHeight = Math.hypot(a[2], a[3]);
  9804                    f.vertical = !1;
  9805                  }
  9806                  const r = Math.hypot(O.textLineMatrix[0], O.textLineMatrix[1]),
  9807                    n = Math.hypot(O.ctm[0], O.ctm[1]);
  9808                  f.textAdvanceScale = n * r;
  9809                  const { fontSize: i } = O;
  9810                  f.trackingSpaceMin = 0.102 * i;
  9811                  f.notASpace = 0.03 * i;
  9812                  f.negativeSpaceMax = -0.2 * i;
  9813                  f.spaceInFlowMin = 0.102 * i;
  9814                  f.spaceInFlowMax = 0.6 * i;
  9815                  f.hasEOL = !1;
  9816                  f.initialized = !0;
  9817                  return f;
  9818                }
  9819                function updateAdvanceScale() {
  9820                  if (!f.initialized) return;
  9821                  const e = Math.hypot(O.textLineMatrix[0], O.textLineMatrix[1]),
  9822                    t = Math.hypot(O.ctm[0], O.ctm[1]) * e;
  9823                  if (t !== f.textAdvanceScale) {
  9824                    if (f.vertical) {
  9825                      f.totalHeight += f.height * f.textAdvanceScale;
  9826                      f.height = 0;
  9827                    } else {
  9828                      f.totalWidth += f.width * f.textAdvanceScale;
  9829                      f.width = 0;
  9830                    }
  9831                    f.textAdvanceScale = t;
  9832                  }
  9833                }
  9834                function handleSetFont(e, n) {
  9835                  return w
  9836                    .loadFont(e, n, a)
  9837                    .then(function (e) {
  9838                      return e.font.isType3Font
  9839                        ? e
  9840                            .loadType3Data(w, a, t)
  9841                            .catch(function () {})
  9842                            .then(function () {
  9843                              return e;
  9844                            })
  9845                        : e;
  9846                    })
  9847                    .then(function (e) {
  9848                      O.loadedName = e.loadedName;
  9849                      O.font = e.font;
  9850                      O.fontMatrix = e.font.fontMatrix || r.FONT_IDENTITY_MATRIX;
  9851                    });
  9852                }
  9853                function applyInverseRotation(e, t, a) {
  9854                  const r = Math.hypot(a[0], a[1]);
  9855                  return [(a[0] * e + a[1] * t) / r, (a[2] * e + a[3] * t) / r];
  9856                }
  9857                function compareWithLastPosition(e) {
  9858                  const t = getCurrentTextTransform();
  9859                  let a = t[4],
  9860                    r = t[5];
  9861                  if (O.font?.vertical) {
  9862                    if (a < l[0] || a > l[2] || r + e < l[1] || r > l[3])
  9863                      return !1;
  9864                  } else if (a + e < l[0] || a > l[2] || r < l[1] || r > l[3])
  9865                    return !1;
  9866                  if (!O.font || !f.prevTransform) return !0;
  9867                  let n = f.prevTransform[4],
  9868                    i = f.prevTransform[5];
  9869                  if (n === a && i === r) return !0;
  9870                  let s = -1;
  9871                  t[0] && 0 === t[1] && 0 === t[2]
  9872                    ? (s = t[0] > 0 ? 0 : 180)
  9873                    : t[1] &&
  9874                      0 === t[0] &&
  9875                      0 === t[3] &&
  9876                      (s = t[1] > 0 ? 90 : 270);
  9877                  switch (s) {
  9878                    case 0:
  9879                      break;
  9880                    case 90:
  9881                      [a, r] = [r, a];
  9882                      [n, i] = [i, n];
  9883                      break;
  9884                    case 180:
  9885                      [a, r, n, i] = [-a, -r, -n, -i];
  9886                      break;
  9887                    case 270:
  9888                      [a, r] = [-r, -a];
  9889                      [n, i] = [-i, -n];
  9890                      break;
  9891                    default:
  9892                      [a, r] = applyInverseRotation(a, r, t);
  9893                      [n, i] = applyInverseRotation(n, i, f.prevTransform);
  9894                  }
  9895                  if (O.font.vertical) {
  9896                    const e = (i - r) / f.textAdvanceScale,
  9897                      t = a - n,
  9898                      s = Math.sign(f.height);
  9899                    if (e < s * f.negativeSpaceMax) {
  9900                      if (Math.abs(t) > 0.5 * f.width) {
  9901                        appendEOL();
  9902                        return !0;
  9903                      }
  9904                      resetLastChars();
  9905                      flushTextContentItem();
  9906                      return !0;
  9907                    }
  9908                    if (Math.abs(t) > f.width) {
  9909                      appendEOL();
  9910                      return !0;
  9911                    }
  9912                    e <= s * f.notASpace && resetLastChars();
  9913                    if (e <= s * f.trackingSpaceMin)
  9914                      if (shouldAddWhitepsace()) {
  9915                        resetLastChars();
  9916                        flushTextContentItem();
  9917                        pushWhitespace({ height: Math.abs(e) });
  9918                      } else f.height += e;
  9919                    else if (!addFakeSpaces(e, f.prevTransform, s))
  9920                      if (0 === f.str.length) {
  9921                        resetLastChars();
  9922                        pushWhitespace({ height: Math.abs(e) });
  9923                      } else f.height += e;
  9924                    Math.abs(t) > 0.25 * f.width && flushTextContentItem();
  9925                    return !0;
  9926                  }
  9927                  const o = (a - n) / f.textAdvanceScale,
  9928                    c = r - i,
  9929                    h = Math.sign(f.width);
  9930                  if (o < h * f.negativeSpaceMax) {
  9931                    if (Math.abs(c) > 0.5 * f.height) {
  9932                      appendEOL();
  9933                      return !0;
  9934                    }
  9935                    resetLastChars();
  9936                    flushTextContentItem();
  9937                    return !0;
  9938                  }
  9939                  if (Math.abs(c) > f.height) {
  9940                    appendEOL();
  9941                    return !0;
  9942                  }
  9943                  o <= h * f.notASpace && resetLastChars();
  9944                  if (o <= h * f.trackingSpaceMin)
  9945                    if (shouldAddWhitepsace()) {
  9946                      resetLastChars();
  9947                      flushTextContentItem();
  9948                      pushWhitespace({ width: Math.abs(o) });
  9949                    } else f.width += o;
  9950                  else if (!addFakeSpaces(o, f.prevTransform, h))
  9951                    if (0 === f.str.length) {
  9952                      resetLastChars();
  9953                      pushWhitespace({ width: Math.abs(o) });
  9954                    } else f.width += o;
  9955                  Math.abs(c) > 0.25 * f.height && flushTextContentItem();
  9956                  return !0;
  9957                }
  9958                function buildTextContentItem({ chars: e, extraSpacing: t }) {
  9959                  const a = O.font;
  9960                  if (!e) {
  9961                    const e = O.charSpacing + t;
  9962                    e &&
  9963                      (a.vertical
  9964                        ? O.translateTextMatrix(0, -e)
  9965                        : O.translateTextMatrix(e * O.textHScale, 0));
  9966                    return;
  9967                  }
  9968                  const r = a.charsToGlyphs(e),
  9969                    n = O.fontMatrix[0] * O.fontSize;
  9970                  for (let e = 0, i = r.length; e < i; e++) {
  9971                    const s = r[e],
  9972                      { category: o } = s;
  9973                    if (o.isInvisibleFormatMark) continue;
  9974                    let c = O.charSpacing + (e + 1 === i ? t : 0),
  9975                      l = s.width;
  9976                    a.vertical && (l = s.vmetric ? s.vmetric[0] : -l);
  9977                    let h = l * n;
  9978                    if (o.isWhitespace) {
  9979                      if (a.vertical) {
  9980                        c += -h + O.wordSpacing;
  9981                        O.translateTextMatrix(0, -c);
  9982                      } else {
  9983                        c += h + O.wordSpacing;
  9984                        O.translateTextMatrix(c * O.textHScale, 0);
  9985                      }
  9986                      saveLastChar(" ");
  9987                      continue;
  9988                    }
  9989                    if (!o.isZeroWidthDiacritic && !compareWithLastPosition(h)) {
  9990                      a.vertical
  9991                        ? O.translateTextMatrix(0, h)
  9992                        : O.translateTextMatrix(h * O.textHScale, 0);
  9993                      continue;
  9994                    }
  9995                    const u = ensureTextContentItem();
  9996                    o.isZeroWidthDiacritic && (h = 0);
  9997                    if (a.vertical) {
  9998                      O.translateTextMatrix(0, h);
  9999                      h = Math.abs(h);
 10000                      u.height += h;
 10001                    } else {
 10002                      h *= O.textHScale;
 10003                      O.translateTextMatrix(h, 0);
 10004                      u.width += h;
 10005                    }
 10006                    h && (u.prevTransform = getCurrentTextTransform());
 10007                    const d = s.unicode;
 10008                    saveLastChar(d) && u.str.push(" ");
 10009                    u.str.push(d);
 10010                    c &&
 10011                      (a.vertical
 10012                        ? O.translateTextMatrix(0, -c)
 10013                        : O.translateTextMatrix(c * O.textHScale, 0));
 10014                  }
 10015                }
 10016                function appendEOL() {
 10017                  resetLastChars();
 10018                  if (f.initialized) {
 10019                    f.hasEOL = !0;
 10020                    flushTextContentItem();
 10021                  } else
 10022                    d.items.push({
 10023                      str: "",
 10024                      dir: "ltr",
 10025                      width: 0,
 10026                      height: 0,
 10027                      transform: getCurrentTextTransform(),
 10028                      fontName: O.loadedName,
 10029                      hasEOL: !0,
 10030                    });
 10031                }
 10032                function addFakeSpaces(e, t, a) {
 10033                  if (a * f.spaceInFlowMin <= e && e <= a * f.spaceInFlowMax) {
 10034                    if (f.initialized) {
 10035                      resetLastChars();
 10036                      f.str.push(" ");
 10037                    }
 10038                    return !1;
 10039                  }
 10040                  const r = f.fontName;
 10041                  let n = 0;
 10042                  if (f.vertical) {
 10043                    n = e;
 10044                    e = 0;
 10045                  }
 10046                  flushTextContentItem();
 10047                  resetLastChars();
 10048                  pushWhitespace({
 10049                    width: Math.abs(e),
 10050                    height: Math.abs(n),
 10051                    transform: t || getCurrentTextTransform(),
 10052                    fontName: r,
 10053                  });
 10054                  return !0;
 10055                }
 10056                function flushTextContentItem() {
 10057                  if (f.initialized && f.str) {
 10058                    f.vertical
 10059                      ? (f.totalHeight += f.height * f.textAdvanceScale)
 10060                      : (f.totalWidth += f.width * f.textAdvanceScale);
 10061                    d.items.push(
 10062                      (function runBidiTransform(e) {
 10063                        let t = e.str.join("");
 10064                        u || (t = (0, r.normalizeUnicode)(t));
 10065                        const a = (0, b.bidi)(t, -1, e.vertical);
 10066                        return {
 10067                          str: a.str,
 10068                          dir: a.dir,
 10069                          width: Math.abs(e.totalWidth),
 10070                          height: Math.abs(e.totalHeight),
 10071                          transform: e.transform,
 10072                          fontName: e.fontName,
 10073                          hasEOL: e.hasEOL,
 10074                        };
 10075                      })(f),
 10076                    );
 10077                    f.initialized = !1;
 10078                    f.str.length = 0;
 10079                  }
 10080                }
 10081                function enqueueChunk(e = !1) {
 10082                  const t = d.items.length;
 10083                  if (0 !== t && !(e && t < 10)) {
 10084                    o.enqueue(d, t);
 10085                    d.items = [];
 10086                    d.styles = Object.create(null);
 10087                  }
 10088                }
 10089                const T = new TimeSlotManager();
 10090                return new Promise(function promiseBody(e, f) {
 10091                  const next = function (t) {
 10092                    enqueueChunk(!0);
 10093                    Promise.all([t, o.ready]).then(function () {
 10094                      try {
 10095                        promiseBody(e, f);
 10096                      } catch (e) {
 10097                        f(e);
 10098                      }
 10099                    }, f);
 10100                  };
 10101                  t.ensureNotTerminated();
 10102                  T.reset();
 10103                  const g = {};
 10104                  let p,
 10105                    b = [];
 10106                  for (; !(p = T.check()); ) {
 10107                    b.length = 0;
 10108                    g.args = b;
 10109                    if (!F.read(g)) break;
 10110                    const e = O;
 10111                    O = n.state;
 10112                    const f = g.fn;
 10113                    b = g.args;
 10114                    switch (0 | f) {
 10115                      case r.OPS.setFont:
 10116                        var y = b[0].name,
 10117                          M = b[1];
 10118                        if (O.font && y === O.fontName && M === O.fontSize) break;
 10119                        flushTextContentItem();
 10120                        O.fontName = y;
 10121                        O.fontSize = M;
 10122                        next(handleSetFont(y, null));
 10123                        return;
 10124                      case r.OPS.setTextRise:
 10125                        O.textRise = b[0];
 10126                        break;
 10127                      case r.OPS.setHScale:
 10128                        O.textHScale = b[0] / 100;
 10129                        break;
 10130                      case r.OPS.setLeading:
 10131                        O.leading = b[0];
 10132                        break;
 10133                      case r.OPS.moveText:
 10134                        O.translateTextLineMatrix(b[0], b[1]);
 10135                        O.textMatrix = O.textLineMatrix.slice();
 10136                        break;
 10137                      case r.OPS.setLeadingMoveText:
 10138                        O.leading = -b[1];
 10139                        O.translateTextLineMatrix(b[0], b[1]);
 10140                        O.textMatrix = O.textLineMatrix.slice();
 10141                        break;
 10142                      case r.OPS.nextLine:
 10143                        O.carriageReturn();
 10144                        break;
 10145                      case r.OPS.setTextMatrix:
 10146                        O.setTextMatrix(b[0], b[1], b[2], b[3], b[4], b[5]);
 10147                        O.setTextLineMatrix(b[0], b[1], b[2], b[3], b[4], b[5]);
 10148                        updateAdvanceScale();
 10149                        break;
 10150                      case r.OPS.setCharSpacing:
 10151                        O.charSpacing = b[0];
 10152                        break;
 10153                      case r.OPS.setWordSpacing:
 10154                        O.wordSpacing = b[0];
 10155                        break;
 10156                      case r.OPS.beginText:
 10157                        O.textMatrix = r.IDENTITY_MATRIX.slice();
 10158                        O.textLineMatrix = r.IDENTITY_MATRIX.slice();
 10159                        break;
 10160                      case r.OPS.showSpacedText:
 10161                        if (!n.state.font) {
 10162                          w.ensureStateFont(n.state);
 10163                          continue;
 10164                        }
 10165                        const f = ((O.font.vertical ? 1 : -1) * O.fontSize) / 1e3,
 10166                          g = b[0];
 10167                        for (let e = 0, t = g.length; e < t; e++) {
 10168                          const t = g[e];
 10169                          if ("string" == typeof t) x.push(t);
 10170                          else if ("number" == typeof t && 0 !== t) {
 10171                            const e = x.join("");
 10172                            x.length = 0;
 10173                            buildTextContentItem({
 10174                              chars: e,
 10175                              extraSpacing: t * f,
 10176                            });
 10177                          }
 10178                        }
 10179                        if (x.length > 0) {
 10180                          const e = x.join("");
 10181                          x.length = 0;
 10182                          buildTextContentItem({ chars: e, extraSpacing: 0 });
 10183                        }
 10184                        break;
 10185                      case r.OPS.showText:
 10186                        if (!n.state.font) {
 10187                          w.ensureStateFont(n.state);
 10188                          continue;
 10189                        }
 10190                        buildTextContentItem({ chars: b[0], extraSpacing: 0 });
 10191                        break;
 10192                      case r.OPS.nextLineShowText:
 10193                        if (!n.state.font) {
 10194                          w.ensureStateFont(n.state);
 10195                          continue;
 10196                        }
 10197                        O.carriageReturn();
 10198                        buildTextContentItem({ chars: b[0], extraSpacing: 0 });
 10199                        break;
 10200                      case r.OPS.nextLineSetSpacingShowText:
 10201                        if (!n.state.font) {
 10202                          w.ensureStateFont(n.state);
 10203                          continue;
 10204                        }
 10205                        O.wordSpacing = b[0];
 10206                        O.charSpacing = b[1];
 10207                        O.carriageReturn();
 10208                        buildTextContentItem({ chars: b[2], extraSpacing: 0 });
 10209                        break;
 10210                      case r.OPS.paintXObject:
 10211                        flushTextContentItem();
 10212                        C || (C = a.get("XObject") || i.Dict.empty);
 10213                        var D = b[0] instanceof i.Name,
 10214                          E = b[0].name;
 10215                        if (D && k.getByName(E)) break;
 10216                        next(
 10217                          new Promise(function (e, d) {
 10218                            if (!D)
 10219                              throw new r.FormatError(
 10220                                "XObject must be referred to by name.",
 10221                              );
 10222                            let f = C.getRaw(E);
 10223                            if (f instanceof i.Ref) {
 10224                              if (k.getByRef(f)) {
 10225                                e();
 10226                                return;
 10227                              }
 10228                              if (w.globalImageCache.getData(f, w.pageIndex)) {
 10229                                e();
 10230                                return;
 10231                              }
 10232                              f = S.fetch(f);
 10233                            }
 10234                            if (!(f instanceof m.BaseStream))
 10235                              throw new r.FormatError(
 10236                                "XObject should be a stream",
 10237                              );
 10238                            const g = f.dict.get("Subtype");
 10239                            if (!(g instanceof i.Name))
 10240                              throw new r.FormatError(
 10241                                "XObject should have a Name subtype",
 10242                              );
 10243                            if ("Form" !== g.name) {
 10244                              k.set(E, f.dict.objId, !0);
 10245                              e();
 10246                              return;
 10247                            }
 10248                            const p = n.state.clone(),
 10249                              b = new StateManager(p),
 10250                              y = f.dict.getArray("Matrix");
 10251                            Array.isArray(y) && 6 === y.length && b.transform(y);
 10252                            enqueueChunk();
 10253                            const x = {
 10254                              enqueueInvoked: !1,
 10255                              enqueue(e, t) {
 10256                                this.enqueueInvoked = !0;
 10257                                o.enqueue(e, t);
 10258                              },
 10259                              get desiredSize() {
 10260                                return o.desiredSize;
 10261                              },
 10262                              get ready() {
 10263                                return o.ready;
 10264                              },
 10265                            };
 10266                            w.getTextContent({
 10267                              stream: f,
 10268                              task: t,
 10269                              resources: f.dict.get("Resources") || a,
 10270                              stateManager: b,
 10271                              includeMarkedContent: s,
 10272                              sink: x,
 10273                              seenStyles: c,
 10274                              viewBox: l,
 10275                              markedContentData: h,
 10276                              disableNormalization: u,
 10277                            }).then(function () {
 10278                              x.enqueueInvoked || k.set(E, f.dict.objId, !0);
 10279                              e();
 10280                            }, d);
 10281                          }).catch(function (e) {
 10282                            if (!(e instanceof r.AbortException)) {
 10283                              if (!w.options.ignoreErrors) throw e;
 10284                              (0, r.warn)(
 10285                                `getTextContent - ignoring XObject: "${e}".`,
 10286                              );
 10287                            }
 10288                          }),
 10289                        );
 10290                        return;
 10291                      case r.OPS.setGState:
 10292                        D = b[0] instanceof i.Name;
 10293                        E = b[0].name;
 10294                        if (D && v.getByName(E)) break;
 10295                        next(
 10296                          new Promise(function (e, t) {
 10297                            if (!D)
 10298                              throw new r.FormatError(
 10299                                "GState must be referred to by name.",
 10300                              );
 10301                            const n = a.get("ExtGState");
 10302                            if (!(n instanceof i.Dict))
 10303                              throw new r.FormatError(
 10304                                "ExtGState should be a dictionary.",
 10305                              );
 10306                            const s = n.get(E);
 10307                            if (!(s instanceof i.Dict))
 10308                              throw new r.FormatError(
 10309                                "GState should be a dictionary.",
 10310                              );
 10311                            const o = s.get("Font");
 10312                            if (o) {
 10313                              flushTextContentItem();
 10314                              O.fontName = null;
 10315                              O.fontSize = o[1];
 10316                              handleSetFont(null, o[0]).then(e, t);
 10317                            } else {
 10318                              v.set(E, s.objId, !0);
 10319                              e();
 10320                            }
 10321                          }).catch(function (e) {
 10322                            if (!(e instanceof r.AbortException)) {
 10323                              if (!w.options.ignoreErrors) throw e;
 10324                              (0, r.warn)(
 10325                                `getTextContent - ignoring ExtGState: "${e}".`,
 10326                              );
 10327                            }
 10328                          }),
 10329                        );
 10330                        return;
 10331                      case r.OPS.beginMarkedContent:
 10332                        flushTextContentItem();
 10333                        if (s) {
 10334                          h.level++;
 10335                          d.items.push({
 10336                            type: "beginMarkedContent",
 10337                            tag: b[0] instanceof i.Name ? b[0].name : null,
 10338                          });
 10339                        }
 10340                        break;
 10341                      case r.OPS.beginMarkedContentProps:
 10342                        flushTextContentItem();
 10343                        if (s) {
 10344                          h.level++;
 10345                          let e = null;
 10346                          b[1] instanceof i.Dict && (e = b[1].get("MCID"));
 10347                          d.items.push({
 10348                            type: "beginMarkedContentProps",
 10349                            id: Number.isInteger(e)
 10350                              ? `${w.idFactory.getPageObjId()}_mc${e}`
 10351                              : null,
 10352                            tag: b[0] instanceof i.Name ? b[0].name : null,
 10353                          });
 10354                        }
 10355                        break;
 10356                      case r.OPS.endMarkedContent:
 10357                        flushTextContentItem();
 10358                        if (s) {
 10359                          if (0 === h.level) break;
 10360                          h.level--;
 10361                          d.items.push({ type: "endMarkedContent" });
 10362                        }
 10363                        break;
 10364                      case r.OPS.restore:
 10365                        !e ||
 10366                          (e.font === O.font &&
 10367                            e.fontSize === O.fontSize &&
 10368                            e.fontName === O.fontName) ||
 10369                          flushTextContentItem();
 10370                    }
 10371                    if (d.items.length >= o.desiredSize) {
 10372                      p = !0;
 10373                      break;
 10374                    }
 10375                  }
 10376                  if (p) next(R);
 10377                  else {
 10378                    flushTextContentItem();
 10379                    enqueueChunk();
 10380                    e();
 10381                  }
 10382                }).catch((e) => {
 10383                  if (!(e instanceof r.AbortException)) {
 10384                    if (!this.options.ignoreErrors) throw e;
 10385                    (0, r.warn)(
 10386                      `getTextContent - ignoring errors during "${t.name}" task: "${e}".`,
 10387                    );
 10388                    flushTextContentItem();
 10389                    enqueueChunk();
 10390                  }
 10391                });
 10392              }
 10393              extractDataStructures(e, t, a) {
 10394                const n = this.xref;
 10395                let s;
 10396                const l = this.readToUnicode(
 10397                  a.toUnicode || e.get("ToUnicode") || t.get("ToUnicode"),
 10398                );
 10399                if (a.composite) {
 10400                  const t = e.get("CIDSystemInfo");
 10401                  t instanceof i.Dict &&
 10402                    (a.cidSystemInfo = {
 10403                      registry: (0, r.stringToPDFString)(t.get("Registry")),
 10404                      ordering: (0, r.stringToPDFString)(t.get("Ordering")),
 10405                      supplement: t.get("Supplement"),
 10406                    });
 10407                  try {
 10408                    const t = e.get("CIDToGIDMap");
 10409                    t instanceof m.BaseStream && (s = t.getBytes());
 10410                  } catch (e) {
 10411                    if (!this.options.ignoreErrors) throw e;
 10412                    (0, r.warn)(
 10413                      `extractDataStructures - ignoring CIDToGIDMap data: "${e}".`,
 10414                    );
 10415                  }
 10416                }
 10417                const h = [];
 10418                let u,
 10419                  d = null;
 10420                if (e.has("Encoding")) {
 10421                  u = e.get("Encoding");
 10422                  if (u instanceof i.Dict) {
 10423                    d = u.get("BaseEncoding");
 10424                    d = d instanceof i.Name ? d.name : null;
 10425                    if (u.has("Differences")) {
 10426                      const e = u.get("Differences");
 10427                      let t = 0;
 10428                      for (const a of e) {
 10429                        const e = n.fetchIfRef(a);
 10430                        if ("number" == typeof e) t = e;
 10431                        else {
 10432                          if (!(e instanceof i.Name))
 10433                            throw new r.FormatError(
 10434                              `Invalid entry in 'Differences' array: ${e}`,
 10435                            );
 10436                          h[t++] = e.name;
 10437                        }
 10438                      }
 10439                    }
 10440                  } else if (u instanceof i.Name) d = u.name;
 10441                  else {
 10442                    const e = "Encoding is not a Name nor a Dict";
 10443                    if (!this.options.ignoreErrors) throw new r.FormatError(e);
 10444                    (0, r.warn)(e);
 10445                  }
 10446                  "MacRomanEncoding" !== d &&
 10447                    "MacExpertEncoding" !== d &&
 10448                    "WinAnsiEncoding" !== d &&
 10449                    (d = null);
 10450                }
 10451                const f = !a.file || a.isInternalFont,
 10452                  g = (0, c.getSymbolsFonts)()[a.name];
 10453                d && f && g && (d = null);
 10454                if (d) a.defaultEncoding = (0, o.getEncoding)(d);
 10455                else {
 10456                  const e = !!(a.flags & S.FontFlags.Symbolic),
 10457                    t = !!(a.flags & S.FontFlags.Nonsymbolic);
 10458                  u = o.StandardEncoding;
 10459                  "TrueType" !== a.type || t || (u = o.WinAnsiEncoding);
 10460                  if (e || g) {
 10461                    u = o.MacRomanEncoding;
 10462                    f &&
 10463                      (/Symbol/i.test(a.name)
 10464                        ? (u = o.SymbolSetEncoding)
 10465                        : /Dingbats/i.test(a.name)
 10466                          ? (u = o.ZapfDingbatsEncoding)
 10467                          : /Wingdings/i.test(a.name) && (u = o.WinAnsiEncoding));
 10468                  }
 10469                  a.defaultEncoding = u;
 10470                }
 10471                a.differences = h;
 10472                a.baseEncodingName = d;
 10473                a.hasEncoding = !!d || h.length > 0;
 10474                a.dict = e;
 10475                return l
 10476                  .then((e) => {
 10477                    a.toUnicode = e;
 10478                    return this.buildToUnicode(a);
 10479                  })
 10480                  .then((e) => {
 10481                    a.toUnicode = e;
 10482                    s && (a.cidToGidMap = this.readCidToGidMap(s, e));
 10483                    return a;
 10484                  });
 10485              }
 10486              _simpleFontToUnicode(e, t = !1) {
 10487                (0, r.assert)(!e.composite, "Must be a simple font.");
 10488                const a = [],
 10489                  n = e.defaultEncoding.slice(),
 10490                  i = e.baseEncodingName,
 10491                  s = e.differences;
 10492                for (const e in s) {
 10493                  const t = s[e];
 10494                  ".notdef" !== t && (n[e] = t);
 10495                }
 10496                const c = (0, C.getGlyphsUnicode)();
 10497                for (const r in n) {
 10498                  let s = n[r];
 10499                  if ("" === s) continue;
 10500                  let l = c[s];
 10501                  if (void 0 !== l) {
 10502                    a[r] = String.fromCharCode(l);
 10503                    continue;
 10504                  }
 10505                  let h = 0;
 10506                  switch (s[0]) {
 10507                    case "G":
 10508                      3 === s.length && (h = parseInt(s.substring(1), 16));
 10509                      break;
 10510                    case "g":
 10511                      5 === s.length && (h = parseInt(s.substring(1), 16));
 10512                      break;
 10513                    case "C":
 10514                    case "c":
 10515                      if (s.length >= 3 && s.length <= 4) {
 10516                        const a = s.substring(1);
 10517                        if (t) {
 10518                          h = parseInt(a, 16);
 10519                          break;
 10520                        }
 10521                        h = +a;
 10522                        if (Number.isNaN(h) && Number.isInteger(parseInt(a, 16)))
 10523                          return this._simpleFontToUnicode(e, !0);
 10524                      }
 10525                      break;
 10526                    case "u":
 10527                      l = (0, v.getUnicodeForGlyph)(s, c);
 10528                      -1 !== l && (h = l);
 10529                      break;
 10530                    default:
 10531                      switch (s) {
 10532                        case "f_h":
 10533                        case "f_t":
 10534                        case "T_h":
 10535                          a[r] = s.replaceAll("_", "");
 10536                          continue;
 10537                      }
 10538                  }
 10539                  if (h > 0 && h <= 1114111 && Number.isInteger(h)) {
 10540                    if (i && h === +r) {
 10541                      const e = (0, o.getEncoding)(i);
 10542                      if (e && (s = e[r])) {
 10543                        a[r] = String.fromCharCode(c[s]);
 10544                        continue;
 10545                      }
 10546                    }
 10547                    a[r] = String.fromCodePoint(h);
 10548                  }
 10549                }
 10550                return a;
 10551              }
 10552              async buildToUnicode(e) {
 10553                e.hasIncludedToUnicodeMap = e.toUnicode?.length > 0;
 10554                if (e.hasIncludedToUnicodeMap) {
 10555                  !e.composite &&
 10556                    e.hasEncoding &&
 10557                    (e.fallbackToUnicode = this._simpleFontToUnicode(e));
 10558                  return e.toUnicode;
 10559                }
 10560                if (!e.composite)
 10561                  return new u.ToUnicodeMap(this._simpleFontToUnicode(e));
 10562                if (
 10563                  e.composite &&
 10564                  ((e.cMap.builtInCMap && !(e.cMap instanceof n.IdentityCMap)) ||
 10565                    ("Adobe" === e.cidSystemInfo.registry &&
 10566                      ("GB1" === e.cidSystemInfo.ordering ||
 10567                        "CNS1" === e.cidSystemInfo.ordering ||
 10568                        "Japan1" === e.cidSystemInfo.ordering ||
 10569                        "Korea1" === e.cidSystemInfo.ordering)))
 10570                ) {
 10571                  const { registry: t, ordering: a } = e.cidSystemInfo,
 10572                    s = i.Name.get(`${t}-${a}-UCS2`),
 10573                    o = await n.CMapFactory.create({
 10574                      encoding: s,
 10575                      fetchBuiltInCMap: this._fetchBuiltInCMapBound,
 10576                      useCMap: null,
 10577                    }),
 10578                    c = [],
 10579                    l = [];
 10580                  e.cMap.forEach(function (e, t) {
 10581                    if (t > 65535)
 10582                      throw new r.FormatError("Max size of CID is 65,535");
 10583                    const a = o.lookup(t);
 10584                    if (a) {
 10585                      l.length = 0;
 10586                      for (let e = 0, t = a.length; e < t; e += 2)
 10587                        l.push((a.charCodeAt(e) << 8) + a.charCodeAt(e + 1));
 10588                      c[e] = String.fromCharCode(...l);
 10589                    }
 10590                  });
 10591                  return new u.ToUnicodeMap(c);
 10592                }
 10593                return new u.IdentityToUnicodeMap(e.firstChar, e.lastChar);
 10594              }
 10595              readToUnicode(e) {
 10596                return e
 10597                  ? e instanceof i.Name
 10598                    ? n.CMapFactory.create({
 10599                        encoding: e,
 10600                        fetchBuiltInCMap: this._fetchBuiltInCMapBound,
 10601                        useCMap: null,
 10602                      }).then(function (e) {
 10603                        return e instanceof n.IdentityCMap
 10604                          ? new u.IdentityToUnicodeMap(0, 65535)
 10605                          : new u.ToUnicodeMap(e.getMap());
 10606                      })
 10607                    : e instanceof m.BaseStream
 10608                      ? n.CMapFactory.create({
 10609                          encoding: e,
 10610                          fetchBuiltInCMap: this._fetchBuiltInCMapBound,
 10611                          useCMap: null,
 10612                        }).then(
 10613                          function (e) {
 10614                            if (e instanceof n.IdentityCMap)
 10615                              return new u.IdentityToUnicodeMap(0, 65535);
 10616                            const t = new Array(e.length);
 10617                            e.forEach(function (e, a) {
 10618                              if ("number" == typeof a) {
 10619                                t[e] = String.fromCodePoint(a);
 10620                                return;
 10621                              }
 10622                              const r = [];
 10623                              for (let e = 0; e < a.length; e += 2) {
 10624                                const t =
 10625                                  (a.charCodeAt(e) << 8) | a.charCodeAt(e + 1);
 10626                                if (55296 != (63488 & t)) {
 10627                                  r.push(t);
 10628                                  continue;
 10629                                }
 10630                                e += 2;
 10631                                const n =
 10632                                  (a.charCodeAt(e) << 8) | a.charCodeAt(e + 1);
 10633                                r.push(((1023 & t) << 10) + (1023 & n) + 65536);
 10634                              }
 10635                              t[e] = String.fromCodePoint(...r);
 10636                            });
 10637                            return new u.ToUnicodeMap(t);
 10638                          },
 10639                          (e) => {
 10640                            if (e instanceof r.AbortException) return null;
 10641                            if (this.options.ignoreErrors) {
 10642                              (0, r.warn)(
 10643                                `readToUnicode - ignoring ToUnicode data: "${e}".`,
 10644                              );
 10645                              return null;
 10646                            }
 10647                            throw e;
 10648                          },
 10649                        )
 10650                      : Promise.resolve(null)
 10651                  : Promise.resolve(null);
 10652              }
 10653              readCidToGidMap(e, t) {
 10654                const a = [];
 10655                for (let r = 0, n = e.length; r < n; r++) {
 10656                  const n = (e[r++] << 8) | e[r],
 10657                    i = r >> 1;
 10658                  (0 !== n || t.has(i)) && (a[i] = n);
 10659                }
 10660                return a;
 10661              }
 10662              extractWidths(e, t, a) {
 10663                const r = this.xref;
 10664                let n = [],
 10665                  s = 0;
 10666                const o = [];
 10667                let c, l, h, u, d, f, g, p;
 10668                if (a.composite) {
 10669                  s = e.has("DW") ? e.get("DW") : 1e3;
 10670                  p = e.get("W");
 10671                  if (p)
 10672                    for (l = 0, h = p.length; l < h; l++) {
 10673                      f = r.fetchIfRef(p[l++]);
 10674                      g = r.fetchIfRef(p[l]);
 10675                      if (Array.isArray(g))
 10676                        for (u = 0, d = g.length; u < d; u++)
 10677                          n[f++] = r.fetchIfRef(g[u]);
 10678                      else {
 10679                        const e = r.fetchIfRef(p[++l]);
 10680                        for (u = f; u <= g; u++) n[u] = e;
 10681                      }
 10682                    }
 10683                  if (a.vertical) {
 10684                    let t = e.getArray("DW2") || [880, -1e3];
 10685                    c = [t[1], 0.5 * s, t[0]];
 10686                    t = e.get("W2");
 10687                    if (t)
 10688                      for (l = 0, h = t.length; l < h; l++) {
 10689                        f = r.fetchIfRef(t[l++]);
 10690                        g = r.fetchIfRef(t[l]);
 10691                        if (Array.isArray(g))
 10692                          for (u = 0, d = g.length; u < d; u++)
 10693                            o[f++] = [
 10694                              r.fetchIfRef(g[u++]),
 10695                              r.fetchIfRef(g[u++]),
 10696                              r.fetchIfRef(g[u]),
 10697                            ];
 10698                        else {
 10699                          const e = [
 10700                            r.fetchIfRef(t[++l]),
 10701                            r.fetchIfRef(t[++l]),
 10702                            r.fetchIfRef(t[++l]),
 10703                          ];
 10704                          for (u = f; u <= g; u++) o[u] = e;
 10705                        }
 10706                      }
 10707                  }
 10708                } else {
 10709                  const o = a.firstChar;
 10710                  p = e.get("Widths");
 10711                  if (p) {
 10712                    u = o;
 10713                    for (l = 0, h = p.length; l < h; l++)
 10714                      n[u++] = r.fetchIfRef(p[l]);
 10715                    s = parseFloat(t.get("MissingWidth")) || 0;
 10716                  } else {
 10717                    const t = e.get("BaseFont");
 10718                    if (t instanceof i.Name) {
 10719                      const e = this.getBaseFontMetrics(t.name);
 10720                      n = this.buildCharCodeToWidth(e.widths, a);
 10721                      s = e.defaultWidth;
 10722                    }
 10723                  }
 10724                }
 10725                let m = !0,
 10726                  b = s;
 10727                for (const e in n) {
 10728                  const t = n[e];
 10729                  if (t)
 10730                    if (b) {
 10731                      if (b !== t) {
 10732                        m = !1;
 10733                        break;
 10734                      }
 10735                    } else b = t;
 10736                }
 10737                m
 10738                  ? (a.flags |= S.FontFlags.FixedPitch)
 10739                  : (a.flags &= ~S.FontFlags.FixedPitch);
 10740                a.defaultWidth = s;
 10741                a.widths = n;
 10742                a.defaultVMetrics = c;
 10743                a.vmetrics = o;
 10744              }
 10745              isSerifFont(e) {
 10746                const t = e.split("-")[0];
 10747                return t in (0, c.getSerifFonts)() || /serif/gi.test(t);
 10748              }
 10749              getBaseFontMetrics(e) {
 10750                let t = 0,
 10751                  a = Object.create(null),
 10752                  r = !1;
 10753                let n = (0, c.getStdFontMap)()[e] || e;
 10754                const i = (0, k.getMetrics)();
 10755                n in i || (n = this.isSerifFont(e) ? "Times-Roman" : "Helvetica");
 10756                const s = i[n];
 10757                if ("number" == typeof s) {
 10758                  t = s;
 10759                  r = !0;
 10760                } else a = s();
 10761                return { defaultWidth: t, monospace: r, widths: a };
 10762              }
 10763              buildCharCodeToWidth(e, t) {
 10764                const a = Object.create(null),
 10765                  r = t.differences,
 10766                  n = t.defaultEncoding;
 10767                for (let t = 0; t < 256; t++)
 10768                  t in r && e[r[t]]
 10769                    ? (a[t] = e[r[t]])
 10770                    : t in n && e[n[t]] && (a[t] = e[n[t]]);
 10771                return a;
 10772              }
 10773              preEvaluateFont(e) {
 10774                const t = e;
 10775                let a = e.get("Subtype");
 10776                if (!(a instanceof i.Name))
 10777                  throw new r.FormatError("invalid font Subtype");
 10778                let n,
 10779                  s,
 10780                  o = !1;
 10781                if ("Type0" === a.name) {
 10782                  const t = e.get("DescendantFonts");
 10783                  if (!t)
 10784                    throw new r.FormatError("Descendant fonts are not specified");
 10785                  if (
 10786                    !(
 10787                      (e = Array.isArray(t)
 10788                        ? this.xref.fetchIfRef(t[0])
 10789                        : t) instanceof i.Dict
 10790                    )
 10791                  )
 10792                    throw new r.FormatError(
 10793                      "Descendant font is not a dictionary.",
 10794                    );
 10795                  a = e.get("Subtype");
 10796                  if (!(a instanceof i.Name))
 10797                    throw new r.FormatError("invalid font Subtype");
 10798                  o = !0;
 10799                }
 10800                const c = e.get("FirstChar") || 0,
 10801                  l = e.get("LastChar") || (o ? 65535 : 255),
 10802                  h = e.get("FontDescriptor");
 10803                if (h) {
 10804                  n = new O.MurmurHash3_64();
 10805                  const a = t.getRaw("Encoding");
 10806                  if (a instanceof i.Name) n.update(a.name);
 10807                  else if (a instanceof i.Ref) n.update(a.toString());
 10808                  else if (a instanceof i.Dict)
 10809                    for (const e of a.getRawValues())
 10810                      if (e instanceof i.Name) n.update(e.name);
 10811                      else if (e instanceof i.Ref) n.update(e.toString());
 10812                      else if (Array.isArray(e)) {
 10813                        const t = e.length,
 10814                          a = new Array(t);
 10815                        for (let r = 0; r < t; r++) {
 10816                          const t = e[r];
 10817                          t instanceof i.Name
 10818                            ? (a[r] = t.name)
 10819                            : ("number" == typeof t || t instanceof i.Ref) &&
 10820                              (a[r] = t.toString());
 10821                        }
 10822                        n.update(a.join());
 10823                      }
 10824                  n.update(`${c}-${l}`);
 10825                  s = e.get("ToUnicode") || t.get("ToUnicode");
 10826                  if (s instanceof m.BaseStream) {
 10827                    const e = s.str || s,
 10828                      t = e.buffer
 10829                        ? new Uint8Array(e.buffer.buffer, 0, e.bufferLength)
 10830                        : new Uint8Array(
 10831                            e.bytes.buffer,
 10832                            e.start,
 10833                            e.end - e.start,
 10834                          );
 10835                    n.update(t);
 10836                  } else s instanceof i.Name && n.update(s.name);
 10837                  const r = e.get("Widths") || t.get("Widths");
 10838                  if (Array.isArray(r)) {
 10839                    const e = [];
 10840                    for (const t of r)
 10841                      ("number" == typeof t || t instanceof i.Ref) &&
 10842                        e.push(t.toString());
 10843                    n.update(e.join());
 10844                  }
 10845                  if (o) {
 10846                    n.update("compositeFont");
 10847                    const a = e.get("W") || t.get("W");
 10848                    if (Array.isArray(a)) {
 10849                      const e = [];
 10850                      for (const t of a)
 10851                        if ("number" == typeof t || t instanceof i.Ref)
 10852                          e.push(t.toString());
 10853                        else if (Array.isArray(t)) {
 10854                          const a = [];
 10855                          for (const e of t)
 10856                            ("number" == typeof e || e instanceof i.Ref) &&
 10857                              a.push(e.toString());
 10858                          e.push(`[${a.join()}]`);
 10859                        }
 10860                      n.update(e.join());
 10861                    }
 10862                    const r = e.getRaw("CIDToGIDMap") || t.getRaw("CIDToGIDMap");
 10863                    r instanceof i.Name
 10864                      ? n.update(r.name)
 10865                      : r instanceof i.Ref
 10866                        ? n.update(r.toString())
 10867                        : r instanceof m.BaseStream && n.update(r.peekBytes());
 10868                  }
 10869                }
 10870                return {
 10871                  descriptor: h,
 10872                  dict: e,
 10873                  baseDict: t,
 10874                  composite: o,
 10875                  type: a.name,
 10876                  firstChar: c,
 10877                  lastChar: l,
 10878                  toUnicode: s,
 10879                  hash: n ? n.hexdigest() : "",
 10880                };
 10881              }
 10882              async translateFont({
 10883                descriptor: e,
 10884                dict: t,
 10885                baseDict: a,
 10886                composite: o,
 10887                type: l,
 10888                firstChar: u,
 10889                lastChar: d,
 10890                toUnicode: f,
 10891                cssFontInfo: g,
 10892              }) {
 10893                const m = "Type3" === l;
 10894                let b;
 10895                if (!e) {
 10896                  if (!m) {
 10897                    let e = t.get("BaseFont");
 10898                    if (!(e instanceof i.Name))
 10899                      throw new r.FormatError("Base font is not specified");
 10900                    e = e.name.replaceAll(/[,_]/g, "-");
 10901                    const n = this.getBaseFontMetrics(e),
 10902                      o = e.split("-")[0],
 10903                      h =
 10904                        (this.isSerifFont(o) ? S.FontFlags.Serif : 0) |
 10905                        (n.monospace ? S.FontFlags.FixedPitch : 0) |
 10906                        ((0, c.getSymbolsFonts)()[o]
 10907                          ? S.FontFlags.Symbolic
 10908                          : S.FontFlags.Nonsymbolic);
 10909                    b = {
 10910                      type: l,
 10911                      name: e,
 10912                      loadedName: a.loadedName,
 10913                      systemFontInfo: null,
 10914                      widths: n.widths,
 10915                      defaultWidth: n.defaultWidth,
 10916                      isSimulatedFlags: !0,
 10917                      flags: h,
 10918                      firstChar: u,
 10919                      lastChar: d,
 10920                      toUnicode: f,
 10921                      xHeight: 0,
 10922                      capHeight: 0,
 10923                      italicAngle: 0,
 10924                      isType3Font: m,
 10925                    };
 10926                    const g = t.get("Widths"),
 10927                      p = (0, c.getStandardFontName)(e);
 10928                    let y = null;
 10929                    if (p) {
 10930                      y = await this.fetchStandardFontData(p);
 10931                      b.isInternalFont = !!y;
 10932                    }
 10933                    !b.isInternalFont &&
 10934                      this.options.useSystemFonts &&
 10935                      (b.systemFontInfo = (0, x.getFontSubstitution)(
 10936                        this.systemFontCache,
 10937                        this.idFactory,
 10938                        this.options.standardFontDataUrl,
 10939                        e,
 10940                        p,
 10941                      ));
 10942                    return this.extractDataStructures(t, t, b).then((t) => {
 10943                      if (g) {
 10944                        const e = [];
 10945                        let a = u;
 10946                        for (const t of g) e[a++] = this.xref.fetchIfRef(t);
 10947                        t.widths = e;
 10948                      } else t.widths = this.buildCharCodeToWidth(n.widths, t);
 10949                      return new s.Font(e, y, t);
 10950                    });
 10951                  }
 10952                  (e = new i.Dict(null)).set("FontName", i.Name.get(l));
 10953                  e.set("FontBBox", t.getArray("FontBBox") || [0, 0, 0, 0]);
 10954                }
 10955                let y = e.get("FontName"),
 10956                  w = t.get("BaseFont");
 10957                "string" == typeof y && (y = i.Name.get(y));
 10958                "string" == typeof w && (w = i.Name.get(w));
 10959                const C = y?.name,
 10960                  k = w?.name;
 10961                if (!m && C !== k) {
 10962                  (0, r.info)(
 10963                    `The FontDescriptor's FontName is "${C}" but should be the same as the Font's BaseFont "${k}".`,
 10964                  );
 10965                  C &&
 10966                    k &&
 10967                    (k.startsWith(C) ||
 10968                      (!(0, c.isKnownFontName)(C) &&
 10969                        (0, c.isKnownFontName)(k))) &&
 10970                    (y = null);
 10971                }
 10972                y ||= w;
 10973                if (!(y instanceof i.Name))
 10974                  throw new r.FormatError("invalid font name");
 10975                let v, F, O, T, M;
 10976                try {
 10977                  v = e.get("FontFile", "FontFile2", "FontFile3");
 10978                } catch (e) {
 10979                  if (!this.options.ignoreErrors) throw e;
 10980                  (0, r.warn)(
 10981                    `translateFont - fetching "${y.name}" font file: "${e}".`,
 10982                  );
 10983                  v = new p.NullStream();
 10984                }
 10985                let D = !1,
 10986                  E = null,
 10987                  N = null;
 10988                if (v) {
 10989                  if (v.dict) {
 10990                    const e = v.dict.get("Subtype");
 10991                    e instanceof i.Name && (F = e.name);
 10992                    O = v.dict.get("Length1");
 10993                    T = v.dict.get("Length2");
 10994                    M = v.dict.get("Length3");
 10995                  }
 10996                } else if (g) {
 10997                  const e = (0, h.getXfaFontName)(y.name);
 10998                  if (e) {
 10999                    g.fontFamily = `${g.fontFamily}-PdfJS-XFA`;
 11000                    g.metrics = e.metrics || null;
 11001                    E = e.factors || null;
 11002                    v = await this.fetchStandardFontData(e.name);
 11003                    D = !!v;
 11004                    a = t = (0, h.getXfaFontDict)(y.name);
 11005                    o = !0;
 11006                  }
 11007                } else if (!m) {
 11008                  const e = (0, c.getStandardFontName)(y.name);
 11009                  if (e) {
 11010                    v = await this.fetchStandardFontData(e);
 11011                    D = !!v;
 11012                  }
 11013                  !D &&
 11014                    this.options.useSystemFonts &&
 11015                    (N = (0, x.getFontSubstitution)(
 11016                      this.systemFontCache,
 11017                      this.idFactory,
 11018                      this.options.standardFontDataUrl,
 11019                      y.name,
 11020                      e,
 11021                    ));
 11022                }
 11023                b = {
 11024                  type: l,
 11025                  name: y.name,
 11026                  subtype: F,
 11027                  file: v,
 11028                  length1: O,
 11029                  length2: T,
 11030                  length3: M,
 11031                  isInternalFont: D,
 11032                  loadedName: a.loadedName,
 11033                  composite: o,
 11034                  fixedPitch: !1,
 11035                  fontMatrix: t.getArray("FontMatrix") || r.FONT_IDENTITY_MATRIX,
 11036                  firstChar: u,
 11037                  lastChar: d,
 11038                  toUnicode: f,
 11039                  bbox: e.getArray("FontBBox") || t.getArray("FontBBox"),
 11040                  ascent: e.get("Ascent"),
 11041                  descent: e.get("Descent"),
 11042                  xHeight: e.get("XHeight") || 0,
 11043                  capHeight: e.get("CapHeight") || 0,
 11044                  flags: e.get("Flags"),
 11045                  italicAngle: e.get("ItalicAngle") || 0,
 11046                  isType3Font: m,
 11047                  cssFontInfo: g,
 11048                  scaleFactors: E,
 11049                  systemFontInfo: N,
 11050                };
 11051                if (o) {
 11052                  const e = a.get("Encoding");
 11053                  e instanceof i.Name && (b.cidEncoding = e.name);
 11054                  const t = await n.CMapFactory.create({
 11055                    encoding: e,
 11056                    fetchBuiltInCMap: this._fetchBuiltInCMapBound,
 11057                    useCMap: null,
 11058                  });
 11059                  b.cMap = t;
 11060                  b.vertical = b.cMap.vertical;
 11061                }
 11062                return this.extractDataStructures(t, a, b).then((a) => {
 11063                  this.extractWidths(t, e, a);
 11064                  return new s.Font(y.name, v, a);
 11065                });
 11066              }
 11067              static buildFontPaths(e, t, a, n) {
 11068                function buildPath(t) {
 11069                  const i = `${e.loadedName}_path_${t}`;
 11070                  try {
 11071                    if (e.renderer.hasBuiltPath(t)) return;
 11072                    a.send("commonobj", [i, "FontPath", e.renderer.getPathJs(t)]);
 11073                  } catch (e) {
 11074                    if (n.ignoreErrors) {
 11075                      (0, r.warn)(
 11076                        `buildFontPaths - ignoring ${i} glyph: "${e}".`,
 11077                      );
 11078                      return;
 11079                    }
 11080                    throw e;
 11081                  }
 11082                }
 11083                for (const e of t) {
 11084                  buildPath(e.fontChar);
 11085                  const t = e.accent;
 11086                  t?.fontChar && buildPath(t.fontChar);
 11087                }
 11088              }
 11089              static get fallbackFontDict() {
 11090                const e = new i.Dict();
 11091                e.set("BaseFont", i.Name.get("Helvetica"));
 11092                e.set("Type", i.Name.get("FallbackType"));
 11093                e.set("Subtype", i.Name.get("FallbackType"));
 11094                e.set("Encoding", i.Name.get("WinAnsiEncoding"));
 11095                return (0, r.shadow)(this, "fallbackFontDict", e);
 11096              }
 11097            }
 11098            t.PartialEvaluator = PartialEvaluator;
 11099            class TranslatedFont {
 11100              constructor({
 11101                loadedName: e,
 11102                font: t,
 11103                dict: a,
 11104                evaluatorOptions: r,
 11105              }) {
 11106                this.loadedName = e;
 11107                this.font = t;
 11108                this.dict = a;
 11109                this._evaluatorOptions = r || D;
 11110                this.type3Loaded = null;
 11111                this.type3Dependencies = t.isType3Font ? new Set() : null;
 11112                this.sent = !1;
 11113              }
 11114              send(e) {
 11115                if (!this.sent) {
 11116                  this.sent = !0;
 11117                  e.send("commonobj", [
 11118                    this.loadedName,
 11119                    "Font",
 11120                    this.font.exportData(
 11121                      this._evaluatorOptions.fontExtraProperties,
 11122                    ),
 11123                  ]);
 11124                }
 11125              }
 11126              fallback(e) {
 11127                if (this.font.data) {
 11128                  this.font.disableFontFace = !0;
 11129                  PartialEvaluator.buildFontPaths(
 11130                    this.font,
 11131                    this.font.glyphCacheValues,
 11132                    e,
 11133                    this._evaluatorOptions,
 11134                  );
 11135                }
 11136              }
 11137              loadType3Data(e, t, a) {
 11138                if (this.type3Loaded) return this.type3Loaded;
 11139                if (!this.font.isType3Font)
 11140                  throw new Error("Must be a Type3 font.");
 11141                const n = e.clone({ ignoreErrors: !1 });
 11142                n.parsingType3Font = !0;
 11143                const s = new i.RefSet(e.type3FontRefs);
 11144                this.dict.objId &&
 11145                  !s.has(this.dict.objId) &&
 11146                  s.put(this.dict.objId);
 11147                n.type3FontRefs = s;
 11148                const o = this.font,
 11149                  c = this.type3Dependencies;
 11150                let l = Promise.resolve();
 11151                const h = this.dict.get("CharProcs"),
 11152                  u = this.dict.get("Resources") || t,
 11153                  d = Object.create(null),
 11154                  f = r.Util.normalizeRect(o.bbox || [0, 0, 0, 0]),
 11155                  g = f[2] - f[0],
 11156                  p = f[3] - f[1],
 11157                  m = Math.hypot(g, p);
 11158                for (const e of h.getKeys())
 11159                  l = l.then(() => {
 11160                    const t = h.get(e),
 11161                      i = new T.OperatorList();
 11162                    return n
 11163                      .getOperatorList({
 11164                        stream: t,
 11165                        task: a,
 11166                        resources: u,
 11167                        operatorList: i,
 11168                      })
 11169                      .then(() => {
 11170                        i.fnArray[0] === r.OPS.setCharWidthAndBounds &&
 11171                          this._removeType3ColorOperators(i, m);
 11172                        d[e] = i.getIR();
 11173                        for (const e of i.dependencies) c.add(e);
 11174                      })
 11175                      .catch(function (t) {
 11176                        (0, r.warn)(
 11177                          `Type3 font resource "${e}" is not available.`,
 11178                        );
 11179                        const a = new T.OperatorList();
 11180                        d[e] = a.getIR();
 11181                      });
 11182                  });
 11183                this.type3Loaded = l.then(() => {
 11184                  o.charProcOperatorList = d;
 11185                  if (this._bbox) {
 11186                    o.isCharBBox = !0;
 11187                    o.bbox = this._bbox;
 11188                  }
 11189                });
 11190                return this.type3Loaded;
 11191              }
 11192              _removeType3ColorOperators(e, t = NaN) {
 11193                const a = r.Util.normalizeRect(e.argsArray[0].slice(2)),
 11194                  n = a[2] - a[0],
 11195                  i = a[3] - a[1],
 11196                  s = Math.hypot(n, i);
 11197                if (0 === n || 0 === i) {
 11198                  e.fnArray.splice(0, 1);
 11199                  e.argsArray.splice(0, 1);
 11200                } else if (0 === t || Math.round(s / t) >= 10) {
 11201                  this._bbox || (this._bbox = [1 / 0, 1 / 0, -1 / 0, -1 / 0]);
 11202                  this._bbox[0] = Math.min(this._bbox[0], a[0]);
 11203                  this._bbox[1] = Math.min(this._bbox[1], a[1]);
 11204                  this._bbox[2] = Math.max(this._bbox[2], a[2]);
 11205                  this._bbox[3] = Math.max(this._bbox[3], a[3]);
 11206                }
 11207                let o = 0,
 11208                  c = e.length;
 11209                for (; o < c; ) {
 11210                  switch (e.fnArray[o]) {
 11211                    case r.OPS.setCharWidthAndBounds:
 11212                      break;
 11213                    case r.OPS.setStrokeColorSpace:
 11214                    case r.OPS.setFillColorSpace:
 11215                    case r.OPS.setStrokeColor:
 11216                    case r.OPS.setStrokeColorN:
 11217                    case r.OPS.setFillColor:
 11218                    case r.OPS.setFillColorN:
 11219                    case r.OPS.setStrokeGray:
 11220                    case r.OPS.setFillGray:
 11221                    case r.OPS.setStrokeRGBColor:
 11222                    case r.OPS.setFillRGBColor:
 11223                    case r.OPS.setStrokeCMYKColor:
 11224                    case r.OPS.setFillCMYKColor:
 11225                    case r.OPS.shadingFill:
 11226                    case r.OPS.setRenderingIntent:
 11227                      e.fnArray.splice(o, 1);
 11228                      e.argsArray.splice(o, 1);
 11229                      c--;
 11230                      continue;
 11231                    case r.OPS.setGState:
 11232                      const [t] = e.argsArray[o];
 11233                      let a = 0,
 11234                        n = t.length;
 11235                      for (; a < n; ) {
 11236                        const [e] = t[a];
 11237                        switch (e) {
 11238                          case "TR":
 11239                          case "TR2":
 11240                          case "HT":
 11241                          case "BG":
 11242                          case "BG2":
 11243                          case "UCR":
 11244                          case "UCR2":
 11245                            t.splice(a, 1);
 11246                            n--;
 11247                            continue;
 11248                        }
 11249                        a++;
 11250                      }
 11251                  }
 11252                  o++;
 11253                }
 11254              }
 11255            }
 11256            class StateManager {
 11257              constructor(e = new EvalState()) {
 11258                this.state = e;
 11259                this.stateStack = [];
 11260              }
 11261              save() {
 11262                const e = this.state;
 11263                this.stateStack.push(this.state);
 11264                this.state = e.clone();
 11265              }
 11266              restore() {
 11267                const e = this.stateStack.pop();
 11268                e && (this.state = e);
 11269              }
 11270              transform(e) {
 11271                this.state.ctm = r.Util.transform(this.state.ctm, e);
 11272              }
 11273            }
 11274            class TextState {
 11275              constructor() {
 11276                this.ctm = new Float32Array(r.IDENTITY_MATRIX);
 11277                this.fontName = null;
 11278                this.fontSize = 0;
 11279                this.loadedName = null;
 11280                this.font = null;
 11281                this.fontMatrix = r.FONT_IDENTITY_MATRIX;
 11282                this.textMatrix = r.IDENTITY_MATRIX.slice();
 11283                this.textLineMatrix = r.IDENTITY_MATRIX.slice();
 11284                this.charSpacing = 0;
 11285                this.wordSpacing = 0;
 11286                this.leading = 0;
 11287                this.textHScale = 1;
 11288                this.textRise = 0;
 11289              }
 11290              setTextMatrix(e, t, a, r, n, i) {
 11291                const s = this.textMatrix;
 11292                s[0] = e;
 11293                s[1] = t;
 11294                s[2] = a;
 11295                s[3] = r;
 11296                s[4] = n;
 11297                s[5] = i;
 11298              }
 11299              setTextLineMatrix(e, t, a, r, n, i) {
 11300                const s = this.textLineMatrix;
 11301                s[0] = e;
 11302                s[1] = t;
 11303                s[2] = a;
 11304                s[3] = r;
 11305                s[4] = n;
 11306                s[5] = i;
 11307              }
 11308              translateTextMatrix(e, t) {
 11309                const a = this.textMatrix;
 11310                a[4] = a[0] * e + a[2] * t + a[4];
 11311                a[5] = a[1] * e + a[3] * t + a[5];
 11312              }
 11313              translateTextLineMatrix(e, t) {
 11314                const a = this.textLineMatrix;
 11315                a[4] = a[0] * e + a[2] * t + a[4];
 11316                a[5] = a[1] * e + a[3] * t + a[5];
 11317              }
 11318              carriageReturn() {
 11319                this.translateTextLineMatrix(0, -this.leading);
 11320                this.textMatrix = this.textLineMatrix.slice();
 11321              }
 11322              clone() {
 11323                const e = Object.create(this);
 11324                e.textMatrix = this.textMatrix.slice();
 11325                e.textLineMatrix = this.textLineMatrix.slice();
 11326                e.fontMatrix = this.fontMatrix.slice();
 11327                return e;
 11328              }
 11329            }
 11330            class EvalState {
 11331              constructor() {
 11332                this.ctm = new Float32Array(r.IDENTITY_MATRIX);
 11333                this.font = null;
 11334                this.textRenderingMode = r.TextRenderingMode.FILL;
 11335                this.fillColorSpace = y.ColorSpace.singletons.gray;
 11336                this.strokeColorSpace = y.ColorSpace.singletons.gray;
 11337              }
 11338              clone() {
 11339                return Object.create(this);
 11340              }
 11341            }
 11342            class EvaluatorPreprocessor {
 11343              static get opMap() {
 11344                return (0, r.shadow)(this, "opMap", {
 11345                  w: { id: r.OPS.setLineWidth, numArgs: 1, variableArgs: !1 },
 11346                  J: { id: r.OPS.setLineCap, numArgs: 1, variableArgs: !1 },
 11347                  j: { id: r.OPS.setLineJoin, numArgs: 1, variableArgs: !1 },
 11348                  M: { id: r.OPS.setMiterLimit, numArgs: 1, variableArgs: !1 },
 11349                  d: { id: r.OPS.setDash, numArgs: 2, variableArgs: !1 },
 11350                  ri: {
 11351                    id: r.OPS.setRenderingIntent,
 11352                    numArgs: 1,
 11353                    variableArgs: !1,
 11354                  },
 11355                  i: { id: r.OPS.setFlatness, numArgs: 1, variableArgs: !1 },
 11356                  gs: { id: r.OPS.setGState, numArgs: 1, variableArgs: !1 },
 11357                  q: { id: r.OPS.save, numArgs: 0, variableArgs: !1 },
 11358                  Q: { id: r.OPS.restore, numArgs: 0, variableArgs: !1 },
 11359                  cm: { id: r.OPS.transform, numArgs: 6, variableArgs: !1 },
 11360                  m: { id: r.OPS.moveTo, numArgs: 2, variableArgs: !1 },
 11361                  l: { id: r.OPS.lineTo, numArgs: 2, variableArgs: !1 },
 11362                  c: { id: r.OPS.curveTo, numArgs: 6, variableArgs: !1 },
 11363                  v: { id: r.OPS.curveTo2, numArgs: 4, variableArgs: !1 },
 11364                  y: { id: r.OPS.curveTo3, numArgs: 4, variableArgs: !1 },
 11365                  h: { id: r.OPS.closePath, numArgs: 0, variableArgs: !1 },
 11366                  re: { id: r.OPS.rectangle, numArgs: 4, variableArgs: !1 },
 11367                  S: { id: r.OPS.stroke, numArgs: 0, variableArgs: !1 },
 11368                  s: { id: r.OPS.closeStroke, numArgs: 0, variableArgs: !1 },
 11369                  f: { id: r.OPS.fill, numArgs: 0, variableArgs: !1 },
 11370                  F: { id: r.OPS.fill, numArgs: 0, variableArgs: !1 },
 11371                  "f*": { id: r.OPS.eoFill, numArgs: 0, variableArgs: !1 },
 11372                  B: { id: r.OPS.fillStroke, numArgs: 0, variableArgs: !1 },
 11373                  "B*": { id: r.OPS.eoFillStroke, numArgs: 0, variableArgs: !1 },
 11374                  b: { id: r.OPS.closeFillStroke, numArgs: 0, variableArgs: !1 },
 11375                  "b*": {
 11376                    id: r.OPS.closeEOFillStroke,
 11377                    numArgs: 0,
 11378                    variableArgs: !1,
 11379                  },
 11380                  n: { id: r.OPS.endPath, numArgs: 0, variableArgs: !1 },
 11381                  W: { id: r.OPS.clip, numArgs: 0, variableArgs: !1 },
 11382                  "W*": { id: r.OPS.eoClip, numArgs: 0, variableArgs: !1 },
 11383                  BT: { id: r.OPS.beginText, numArgs: 0, variableArgs: !1 },
 11384                  ET: { id: r.OPS.endText, numArgs: 0, variableArgs: !1 },
 11385                  Tc: { id: r.OPS.setCharSpacing, numArgs: 1, variableArgs: !1 },
 11386                  Tw: { id: r.OPS.setWordSpacing, numArgs: 1, variableArgs: !1 },
 11387                  Tz: { id: r.OPS.setHScale, numArgs: 1, variableArgs: !1 },
 11388                  TL: { id: r.OPS.setLeading, numArgs: 1, variableArgs: !1 },
 11389                  Tf: { id: r.OPS.setFont, numArgs: 2, variableArgs: !1 },
 11390                  Tr: {
 11391                    id: r.OPS.setTextRenderingMode,
 11392                    numArgs: 1,
 11393                    variableArgs: !1,
 11394                  },
 11395                  Ts: { id: r.OPS.setTextRise, numArgs: 1, variableArgs: !1 },
 11396                  Td: { id: r.OPS.moveText, numArgs: 2, variableArgs: !1 },
 11397                  TD: {
 11398                    id: r.OPS.setLeadingMoveText,
 11399                    numArgs: 2,
 11400                    variableArgs: !1,
 11401                  },
 11402                  Tm: { id: r.OPS.setTextMatrix, numArgs: 6, variableArgs: !1 },
 11403                  "T*": { id: r.OPS.nextLine, numArgs: 0, variableArgs: !1 },
 11404                  Tj: { id: r.OPS.showText, numArgs: 1, variableArgs: !1 },
 11405                  TJ: { id: r.OPS.showSpacedText, numArgs: 1, variableArgs: !1 },
 11406                  "'": {
 11407                    id: r.OPS.nextLineShowText,
 11408                    numArgs: 1,
 11409                    variableArgs: !1,
 11410                  },
 11411                  '"': {
 11412                    id: r.OPS.nextLineSetSpacingShowText,
 11413                    numArgs: 3,
 11414                    variableArgs: !1,
 11415                  },
 11416                  d0: { id: r.OPS.setCharWidth, numArgs: 2, variableArgs: !1 },
 11417                  d1: {
 11418                    id: r.OPS.setCharWidthAndBounds,
 11419                    numArgs: 6,
 11420                    variableArgs: !1,
 11421                  },
 11422                  CS: {
 11423                    id: r.OPS.setStrokeColorSpace,
 11424                    numArgs: 1,
 11425                    variableArgs: !1,
 11426                  },
 11427                  cs: {
 11428                    id: r.OPS.setFillColorSpace,
 11429                    numArgs: 1,
 11430                    variableArgs: !1,
 11431                  },
 11432                  SC: { id: r.OPS.setStrokeColor, numArgs: 4, variableArgs: !0 },
 11433                  SCN: {
 11434                    id: r.OPS.setStrokeColorN,
 11435                    numArgs: 33,
 11436                    variableArgs: !0,
 11437                  },
 11438                  sc: { id: r.OPS.setFillColor, numArgs: 4, variableArgs: !0 },
 11439                  scn: { id: r.OPS.setFillColorN, numArgs: 33, variableArgs: !0 },
 11440                  G: { id: r.OPS.setStrokeGray, numArgs: 1, variableArgs: !1 },
 11441                  g: { id: r.OPS.setFillGray, numArgs: 1, variableArgs: !1 },
 11442                  RG: {
 11443                    id: r.OPS.setStrokeRGBColor,
 11444                    numArgs: 3,
 11445                    variableArgs: !1,
 11446                  },
 11447                  rg: { id: r.OPS.setFillRGBColor, numArgs: 3, variableArgs: !1 },
 11448                  K: {
 11449                    id: r.OPS.setStrokeCMYKColor,
 11450                    numArgs: 4,
 11451                    variableArgs: !1,
 11452                  },
 11453                  k: { id: r.OPS.setFillCMYKColor, numArgs: 4, variableArgs: !1 },
 11454                  sh: { id: r.OPS.shadingFill, numArgs: 1, variableArgs: !1 },
 11455                  BI: {
 11456                    id: r.OPS.beginInlineImage,
 11457                    numArgs: 0,
 11458                    variableArgs: !1,
 11459                  },
 11460                  ID: { id: r.OPS.beginImageData, numArgs: 0, variableArgs: !1 },
 11461                  EI: { id: r.OPS.endInlineImage, numArgs: 1, variableArgs: !1 },
 11462                  Do: { id: r.OPS.paintXObject, numArgs: 1, variableArgs: !1 },
 11463                  MP: { id: r.OPS.markPoint, numArgs: 1, variableArgs: !1 },
 11464                  DP: { id: r.OPS.markPointProps, numArgs: 2, variableArgs: !1 },
 11465                  BMC: {
 11466                    id: r.OPS.beginMarkedContent,
 11467                    numArgs: 1,
 11468                    variableArgs: !1,
 11469                  },
 11470                  BDC: {
 11471                    id: r.OPS.beginMarkedContentProps,
 11472                    numArgs: 2,
 11473                    variableArgs: !1,
 11474                  },
 11475                  EMC: {
 11476                    id: r.OPS.endMarkedContent,
 11477                    numArgs: 0,
 11478                    variableArgs: !1,
 11479                  },
 11480                  BX: { id: r.OPS.beginCompat, numArgs: 0, variableArgs: !1 },
 11481                  EX: { id: r.OPS.endCompat, numArgs: 0, variableArgs: !1 },
 11482                  BM: null,
 11483                  BD: null,
 11484                  true: null,
 11485                  fa: null,
 11486                  fal: null,
 11487                  fals: null,
 11488                  false: null,
 11489                  nu: null,
 11490                  nul: null,
 11491                  null: null,
 11492                });
 11493              }
 11494              static MAX_INVALID_PATH_OPS = 10;
 11495              constructor(e, t, a = new StateManager()) {
 11496                this.parser = new f.Parser({
 11497                  lexer: new f.Lexer(e, EvaluatorPreprocessor.opMap),
 11498                  xref: t,
 11499                });
 11500                this.stateManager = a;
 11501                this.nonProcessedArgs = [];
 11502                this._isPathOp = !1;
 11503                this._numInvalidPathOPS = 0;
 11504              }
 11505              get savedStatesDepth() {
 11506                return this.stateManager.stateStack.length;
 11507              }
 11508              read(e) {
 11509                let t = e.args;
 11510                for (;;) {
 11511                  const a = this.parser.getObj();
 11512                  if (a instanceof i.Cmd) {
 11513                    const n = a.cmd,
 11514                      i = EvaluatorPreprocessor.opMap[n];
 11515                    if (!i) {
 11516                      (0, r.warn)(`Unknown command "${n}".`);
 11517                      continue;
 11518                    }
 11519                    const s = i.id,
 11520                      o = i.numArgs;
 11521                    let c = null !== t ? t.length : 0;
 11522                    this._isPathOp || (this._numInvalidPathOPS = 0);
 11523                    this._isPathOp = s >= r.OPS.moveTo && s <= r.OPS.endPath;
 11524                    if (i.variableArgs)
 11525                      c > o &&
 11526                        (0, r.info)(
 11527                          `Command ${n}: expected [0, ${o}] args, but received ${c} args.`,
 11528                        );
 11529                    else {
 11530                      if (c !== o) {
 11531                        const e = this.nonProcessedArgs;
 11532                        for (; c > o; ) {
 11533                          e.push(t.shift());
 11534                          c--;
 11535                        }
 11536                        for (; c < o && 0 !== e.length; ) {
 11537                          null === t && (t = []);
 11538                          t.unshift(e.pop());
 11539                          c++;
 11540                        }
 11541                      }
 11542                      if (c < o) {
 11543                        const e = `command ${n}: expected ${o} args, but received ${c} args.`;
 11544                        if (
 11545                          this._isPathOp &&
 11546                          ++this._numInvalidPathOPS >
 11547                            EvaluatorPreprocessor.MAX_INVALID_PATH_OPS
 11548                        )
 11549                          throw new r.FormatError(`Invalid ${e}`);
 11550                        (0, r.warn)(`Skipping ${e}`);
 11551                        null !== t && (t.length = 0);
 11552                        continue;
 11553                      }
 11554                    }
 11555                    this.preprocessCommand(s, t);
 11556                    e.fn = s;
 11557                    e.args = t;
 11558                    return !0;
 11559                  }
 11560                  if (a === i.EOF) return !1;
 11561                  if (null !== a) {
 11562                    null === t && (t = []);
 11563                    t.push(a);
 11564                    if (t.length > 33)
 11565                      throw new r.FormatError("Too many arguments");
 11566                  }
 11567                }
 11568              }
 11569              preprocessCommand(e, t) {
 11570                switch (0 | e) {
 11571                  case r.OPS.save:
 11572                    this.stateManager.save();
 11573                    break;
 11574                  case r.OPS.restore:
 11575                    this.stateManager.restore();
 11576                    break;
 11577                  case r.OPS.transform:
 11578                    this.stateManager.transform(t);
 11579                }
 11580              }
 11581            }
 11582            t.EvaluatorPreprocessor = EvaluatorPreprocessor;
 11583          },
 11584          (e, t, a) => {
 11585            Object.defineProperty(t, "__esModule", { value: !0 });
 11586            t.IdentityCMap = t.CMapFactory = t.CMap = void 0;
 11587            var r = a(2),
 11588              n = a(4),
 11589              i = a(5),
 11590              s = a(15),
 11591              o = a(16),
 11592              c = a(3),
 11593              l = a(8);
 11594            const h = [
 11595                "Adobe-GB1-UCS2",
 11596                "Adobe-CNS1-UCS2",
 11597                "Adobe-Japan1-UCS2",
 11598                "Adobe-Korea1-UCS2",
 11599                "78-EUC-H",
 11600                "78-EUC-V",
 11601                "78-H",
 11602                "78-RKSJ-H",
 11603                "78-RKSJ-V",
 11604                "78-V",
 11605                "78ms-RKSJ-H",
 11606                "78ms-RKSJ-V",
 11607                "83pv-RKSJ-H",
 11608                "90ms-RKSJ-H",
 11609                "90ms-RKSJ-V",
 11610                "90msp-RKSJ-H",
 11611                "90msp-RKSJ-V",
 11612                "90pv-RKSJ-H",
 11613                "90pv-RKSJ-V",
 11614                "Add-H",
 11615                "Add-RKSJ-H",
 11616                "Add-RKSJ-V",
 11617                "Add-V",
 11618                "Adobe-CNS1-0",
 11619                "Adobe-CNS1-1",
 11620                "Adobe-CNS1-2",
 11621                "Adobe-CNS1-3",
 11622                "Adobe-CNS1-4",
 11623                "Adobe-CNS1-5",
 11624                "Adobe-CNS1-6",
 11625                "Adobe-GB1-0",
 11626                "Adobe-GB1-1",
 11627                "Adobe-GB1-2",
 11628                "Adobe-GB1-3",
 11629                "Adobe-GB1-4",
 11630                "Adobe-GB1-5",
 11631                "Adobe-Japan1-0",
 11632                "Adobe-Japan1-1",
 11633                "Adobe-Japan1-2",
 11634                "Adobe-Japan1-3",
 11635                "Adobe-Japan1-4",
 11636                "Adobe-Japan1-5",
 11637                "Adobe-Japan1-6",
 11638                "Adobe-Korea1-0",
 11639                "Adobe-Korea1-1",
 11640                "Adobe-Korea1-2",
 11641                "B5-H",
 11642                "B5-V",
 11643                "B5pc-H",
 11644                "B5pc-V",
 11645                "CNS-EUC-H",
 11646                "CNS-EUC-V",
 11647                "CNS1-H",
 11648                "CNS1-V",
 11649                "CNS2-H",
 11650                "CNS2-V",
 11651                "ETHK-B5-H",
 11652                "ETHK-B5-V",
 11653                "ETen-B5-H",
 11654                "ETen-B5-V",
 11655                "ETenms-B5-H",
 11656                "ETenms-B5-V",
 11657                "EUC-H",
 11658                "EUC-V",
 11659                "Ext-H",
 11660                "Ext-RKSJ-H",
 11661                "Ext-RKSJ-V",
 11662                "Ext-V",
 11663                "GB-EUC-H",
 11664                "GB-EUC-V",
 11665                "GB-H",
 11666                "GB-V",
 11667                "GBK-EUC-H",
 11668                "GBK-EUC-V",
 11669                "GBK2K-H",
 11670                "GBK2K-V",
 11671                "GBKp-EUC-H",
 11672                "GBKp-EUC-V",
 11673                "GBT-EUC-H",
 11674                "GBT-EUC-V",
 11675                "GBT-H",
 11676                "GBT-V",
 11677                "GBTpc-EUC-H",
 11678                "GBTpc-EUC-V",
 11679                "GBpc-EUC-H",
 11680                "GBpc-EUC-V",
 11681                "H",
 11682                "HKdla-B5-H",
 11683                "HKdla-B5-V",
 11684                "HKdlb-B5-H",
 11685                "HKdlb-B5-V",
 11686                "HKgccs-B5-H",
 11687                "HKgccs-B5-V",
 11688                "HKm314-B5-H",
 11689                "HKm314-B5-V",
 11690                "HKm471-B5-H",
 11691                "HKm471-B5-V",
 11692                "HKscs-B5-H",
 11693                "HKscs-B5-V",
 11694                "Hankaku",
 11695                "Hiragana",
 11696                "KSC-EUC-H",
 11697                "KSC-EUC-V",
 11698                "KSC-H",
 11699                "KSC-Johab-H",
 11700                "KSC-Johab-V",
 11701                "KSC-V",
 11702                "KSCms-UHC-H",
 11703                "KSCms-UHC-HW-H",
 11704                "KSCms-UHC-HW-V",
 11705                "KSCms-UHC-V",
 11706                "KSCpc-EUC-H",
 11707                "KSCpc-EUC-V",
 11708                "Katakana",
 11709                "NWP-H",
 11710                "NWP-V",
 11711                "RKSJ-H",
 11712                "RKSJ-V",
 11713                "Roman",
 11714                "UniCNS-UCS2-H",
 11715                "UniCNS-UCS2-V",
 11716                "UniCNS-UTF16-H",
 11717                "UniCNS-UTF16-V",
 11718                "UniCNS-UTF32-H",
 11719                "UniCNS-UTF32-V",
 11720                "UniCNS-UTF8-H",
 11721                "UniCNS-UTF8-V",
 11722                "UniGB-UCS2-H",
 11723                "UniGB-UCS2-V",
 11724                "UniGB-UTF16-H",
 11725                "UniGB-UTF16-V",
 11726                "UniGB-UTF32-H",
 11727                "UniGB-UTF32-V",
 11728                "UniGB-UTF8-H",
 11729                "UniGB-UTF8-V",
 11730                "UniJIS-UCS2-H",
 11731                "UniJIS-UCS2-HW-H",
 11732                "UniJIS-UCS2-HW-V",
 11733                "UniJIS-UCS2-V",
 11734                "UniJIS-UTF16-H",
 11735                "UniJIS-UTF16-V",
 11736                "UniJIS-UTF32-H",
 11737                "UniJIS-UTF32-V",
 11738                "UniJIS-UTF8-H",
 11739                "UniJIS-UTF8-V",
 11740                "UniJIS2004-UTF16-H",
 11741                "UniJIS2004-UTF16-V",
 11742                "UniJIS2004-UTF32-H",
 11743                "UniJIS2004-UTF32-V",
 11744                "UniJIS2004-UTF8-H",
 11745                "UniJIS2004-UTF8-V",
 11746                "UniJISPro-UCS2-HW-V",
 11747                "UniJISPro-UCS2-V",
 11748                "UniJISPro-UTF8-V",
 11749                "UniJISX0213-UTF32-H",
 11750                "UniJISX0213-UTF32-V",
 11751                "UniJISX02132004-UTF32-H",
 11752                "UniJISX02132004-UTF32-V",
 11753                "UniKS-UCS2-H",
 11754                "UniKS-UCS2-V",
 11755                "UniKS-UTF16-H",
 11756                "UniKS-UTF16-V",
 11757                "UniKS-UTF32-H",
 11758                "UniKS-UTF32-V",
 11759                "UniKS-UTF8-H",
 11760                "UniKS-UTF8-V",
 11761                "V",
 11762                "WP-Symbol",
 11763              ],
 11764              u = 2 ** 24 - 1;
 11765            class CMap {
 11766              constructor(e = !1) {
 11767                this.codespaceRanges = [[], [], [], []];
 11768                this.numCodespaceRanges = 0;
 11769                this._map = [];
 11770                this.name = "";
 11771                this.vertical = !1;
 11772                this.useCMap = null;
 11773                this.builtInCMap = e;
 11774              }
 11775              addCodespaceRange(e, t, a) {
 11776                this.codespaceRanges[e - 1].push(t, a);
 11777                this.numCodespaceRanges++;
 11778              }
 11779              mapCidRange(e, t, a) {
 11780                if (t - e > u)
 11781                  throw new Error(
 11782                    "mapCidRange - ignoring data above MAX_MAP_RANGE.",
 11783                  );
 11784                for (; e <= t; ) this._map[e++] = a++;
 11785              }
 11786              mapBfRange(e, t, a) {
 11787                if (t - e > u)
 11788                  throw new Error(
 11789                    "mapBfRange - ignoring data above MAX_MAP_RANGE.",
 11790                  );
 11791                const r = a.length - 1;
 11792                for (; e <= t; ) {
 11793                  this._map[e++] = a;
 11794                  const t = a.charCodeAt(r) + 1;
 11795                  t > 255
 11796                    ? (a =
 11797                        a.substring(0, r - 1) +
 11798                        String.fromCharCode(a.charCodeAt(r - 1) + 1) +
 11799                        "\0")
 11800                    : (a = a.substring(0, r) + String.fromCharCode(t));
 11801                }
 11802              }
 11803              mapBfRangeToArray(e, t, a) {
 11804                if (t - e > u)
 11805                  throw new Error(
 11806                    "mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.",
 11807                  );
 11808                const r = a.length;
 11809                let n = 0;
 11810                for (; e <= t && n < r; ) {
 11811                  this._map[e] = a[n++];
 11812                  ++e;
 11813                }
 11814              }
 11815              mapOne(e, t) {
 11816                this._map[e] = t;
 11817              }
 11818              lookup(e) {
 11819                return this._map[e];
 11820              }
 11821              contains(e) {
 11822                return void 0 !== this._map[e];
 11823              }
 11824              forEach(e) {
 11825                const t = this._map,
 11826                  a = t.length;
 11827                if (a <= 65536)
 11828                  for (let r = 0; r < a; r++) void 0 !== t[r] && e(r, t[r]);
 11829                else for (const a in t) e(a, t[a]);
 11830              }
 11831              charCodeOf(e) {
 11832                const t = this._map;
 11833                if (t.length <= 65536) return t.indexOf(e);
 11834                for (const a in t) if (t[a] === e) return 0 | a;
 11835                return -1;
 11836              }
 11837              getMap() {
 11838                return this._map;
 11839              }
 11840              readCharCode(e, t, a) {
 11841                let r = 0;
 11842                const n = this.codespaceRanges;
 11843                for (let i = 0, s = n.length; i < s; i++) {
 11844                  r = ((r << 8) | e.charCodeAt(t + i)) >>> 0;
 11845                  const s = n[i];
 11846                  for (let e = 0, t = s.length; e < t; ) {
 11847                    const t = s[e++],
 11848                      n = s[e++];
 11849                    if (r >= t && r <= n) {
 11850                      a.charcode = r;
 11851                      a.length = i + 1;
 11852                      return;
 11853                    }
 11854                  }
 11855                }
 11856                a.charcode = 0;
 11857                a.length = 1;
 11858              }
 11859              getCharCodeLength(e) {
 11860                const t = this.codespaceRanges;
 11861                for (let a = 0, r = t.length; a < r; a++) {
 11862                  const r = t[a];
 11863                  for (let t = 0, n = r.length; t < n; ) {
 11864                    const n = r[t++],
 11865                      i = r[t++];
 11866                    if (e >= n && e <= i) return a + 1;
 11867                  }
 11868                }
 11869                return 1;
 11870              }
 11871              get length() {
 11872                return this._map.length;
 11873              }
 11874              get isIdentityCMap() {
 11875                if ("Identity-H" !== this.name && "Identity-V" !== this.name)
 11876                  return !1;
 11877                if (65536 !== this._map.length) return !1;
 11878                for (let e = 0; e < 65536; e++) if (this._map[e] !== e) return !1;
 11879                return !0;
 11880              }
 11881            }
 11882            t.CMap = CMap;
 11883            class IdentityCMap extends CMap {
 11884              constructor(e, t) {
 11885                super();
 11886                this.vertical = e;
 11887                this.addCodespaceRange(t, 0, 65535);
 11888              }
 11889              mapCidRange(e, t, a) {
 11890                (0, r.unreachable)("should not call mapCidRange");
 11891              }
 11892              mapBfRange(e, t, a) {
 11893                (0, r.unreachable)("should not call mapBfRange");
 11894              }
 11895              mapBfRangeToArray(e, t, a) {
 11896                (0, r.unreachable)("should not call mapBfRangeToArray");
 11897              }
 11898              mapOne(e, t) {
 11899                (0, r.unreachable)("should not call mapCidOne");
 11900              }
 11901              lookup(e) {
 11902                return Number.isInteger(e) && e <= 65535 ? e : void 0;
 11903              }
 11904              contains(e) {
 11905                return Number.isInteger(e) && e <= 65535;
 11906              }
 11907              forEach(e) {
 11908                for (let t = 0; t <= 65535; t++) e(t, t);
 11909              }
 11910              charCodeOf(e) {
 11911                return Number.isInteger(e) && e <= 65535 ? e : -1;
 11912              }
 11913              getMap() {
 11914                const e = new Array(65536);
 11915                for (let t = 0; t <= 65535; t++) e[t] = t;
 11916                return e;
 11917              }
 11918              get length() {
 11919                return 65536;
 11920              }
 11921              get isIdentityCMap() {
 11922                (0, r.unreachable)("should not access .isIdentityCMap");
 11923              }
 11924            }
 11925            t.IdentityCMap = IdentityCMap;
 11926            function strToInt(e) {
 11927              let t = 0;
 11928              for (let a = 0; a < e.length; a++) t = (t << 8) | e.charCodeAt(a);
 11929              return t >>> 0;
 11930            }
 11931            function expectString(e) {
 11932              if ("string" != typeof e)
 11933                throw new r.FormatError("Malformed CMap: expected string.");
 11934            }
 11935            function expectInt(e) {
 11936              if (!Number.isInteger(e))
 11937                throw new r.FormatError("Malformed CMap: expected int.");
 11938            }
 11939            function parseBfChar(e, t) {
 11940              for (;;) {
 11941                let a = t.getObj();
 11942                if (a === n.EOF) break;
 11943                if ((0, n.isCmd)(a, "endbfchar")) return;
 11944                expectString(a);
 11945                const r = strToInt(a);
 11946                a = t.getObj();
 11947                expectString(a);
 11948                const i = a;
 11949                e.mapOne(r, i);
 11950              }
 11951            }
 11952            function parseBfRange(e, t) {
 11953              for (;;) {
 11954                let a = t.getObj();
 11955                if (a === n.EOF) break;
 11956                if ((0, n.isCmd)(a, "endbfrange")) return;
 11957                expectString(a);
 11958                const r = strToInt(a);
 11959                a = t.getObj();
 11960                expectString(a);
 11961                const i = strToInt(a);
 11962                a = t.getObj();
 11963                if (Number.isInteger(a) || "string" == typeof a) {
 11964                  const t = Number.isInteger(a) ? String.fromCharCode(a) : a;
 11965                  e.mapBfRange(r, i, t);
 11966                } else {
 11967                  if (!(0, n.isCmd)(a, "[")) break;
 11968                  {
 11969                    a = t.getObj();
 11970                    const s = [];
 11971                    for (; !(0, n.isCmd)(a, "]") && a !== n.EOF; ) {
 11972                      s.push(a);
 11973                      a = t.getObj();
 11974                    }
 11975                    e.mapBfRangeToArray(r, i, s);
 11976                  }
 11977                }
 11978              }
 11979              throw new r.FormatError("Invalid bf range.");
 11980            }
 11981            function parseCidChar(e, t) {
 11982              for (;;) {
 11983                let a = t.getObj();
 11984                if (a === n.EOF) break;
 11985                if ((0, n.isCmd)(a, "endcidchar")) return;
 11986                expectString(a);
 11987                const r = strToInt(a);
 11988                a = t.getObj();
 11989                expectInt(a);
 11990                const i = a;
 11991                e.mapOne(r, i);
 11992              }
 11993            }
 11994            function parseCidRange(e, t) {
 11995              for (;;) {
 11996                let a = t.getObj();
 11997                if (a === n.EOF) break;
 11998                if ((0, n.isCmd)(a, "endcidrange")) return;
 11999                expectString(a);
 12000                const r = strToInt(a);
 12001                a = t.getObj();
 12002                expectString(a);
 12003                const i = strToInt(a);
 12004                a = t.getObj();
 12005                expectInt(a);
 12006                const s = a;
 12007                e.mapCidRange(r, i, s);
 12008              }
 12009            }
 12010            function parseCodespaceRange(e, t) {
 12011              for (;;) {
 12012                let a = t.getObj();
 12013                if (a === n.EOF) break;
 12014                if ((0, n.isCmd)(a, "endcodespacerange")) return;
 12015                if ("string" != typeof a) break;
 12016                const r = strToInt(a);
 12017                a = t.getObj();
 12018                if ("string" != typeof a) break;
 12019                const i = strToInt(a);
 12020                e.addCodespaceRange(a.length, r, i);
 12021              }
 12022              throw new r.FormatError("Invalid codespace range.");
 12023            }
 12024            function parseWMode(e, t) {
 12025              const a = t.getObj();
 12026              Number.isInteger(a) && (e.vertical = !!a);
 12027            }
 12028            function parseCMapName(e, t) {
 12029              const a = t.getObj();
 12030              a instanceof n.Name && (e.name = a.name);
 12031            }
 12032            async function parseCMap(e, t, a, i) {
 12033              let s, o;
 12034              e: for (;;)
 12035                try {
 12036                  const a = t.getObj();
 12037                  if (a === n.EOF) break;
 12038                  if (a instanceof n.Name) {
 12039                    "WMode" === a.name
 12040                      ? parseWMode(e, t)
 12041                      : "CMapName" === a.name && parseCMapName(e, t);
 12042                    s = a;
 12043                  } else if (a instanceof n.Cmd)
 12044                    switch (a.cmd) {
 12045                      case "endcmap":
 12046                        break e;
 12047                      case "usecmap":
 12048                        s instanceof n.Name && (o = s.name);
 12049                        break;
 12050                      case "begincodespacerange":
 12051                        parseCodespaceRange(e, t);
 12052                        break;
 12053                      case "beginbfchar":
 12054                        parseBfChar(e, t);
 12055                        break;
 12056                      case "begincidchar":
 12057                        parseCidChar(e, t);
 12058                        break;
 12059                      case "beginbfrange":
 12060                        parseBfRange(e, t);
 12061                        break;
 12062                      case "begincidrange":
 12063                        parseCidRange(e, t);
 12064                    }
 12065                } catch (e) {
 12066                  if (e instanceof c.MissingDataException) throw e;
 12067                  (0, r.warn)("Invalid cMap data: " + e);
 12068                  continue;
 12069                }
 12070              !i && o && (i = o);
 12071              return i ? extendCMap(e, a, i) : e;
 12072            }
 12073            async function extendCMap(e, t, a) {
 12074              e.useCMap = await createBuiltInCMap(a, t);
 12075              if (0 === e.numCodespaceRanges) {
 12076                const t = e.useCMap.codespaceRanges;
 12077                for (let a = 0; a < t.length; a++)
 12078                  e.codespaceRanges[a] = t[a].slice();
 12079                e.numCodespaceRanges = e.useCMap.numCodespaceRanges;
 12080              }
 12081              e.useCMap.forEach(function (t, a) {
 12082                e.contains(t) || e.mapOne(t, e.useCMap.lookup(t));
 12083              });
 12084              return e;
 12085            }
 12086            async function createBuiltInCMap(e, t) {
 12087              if ("Identity-H" === e) return new IdentityCMap(!1, 2);
 12088              if ("Identity-V" === e) return new IdentityCMap(!0, 2);
 12089              if (!h.includes(e)) throw new Error("Unknown CMap name: " + e);
 12090              if (!t)
 12091                throw new Error("Built-in CMap parameters are not provided.");
 12092              const { cMapData: a, compressionType: n } = await t(e),
 12093                i = new CMap(!0);
 12094              if (n === r.CMapCompressionType.BINARY)
 12095                return new s.BinaryCMapReader().process(a, i, (e) =>
 12096                  extendCMap(i, t, e),
 12097                );
 12098              if (n === r.CMapCompressionType.NONE) {
 12099                const e = new o.Lexer(new l.Stream(a));
 12100                return parseCMap(i, e, t, null);
 12101              }
 12102              throw new Error(`Invalid CMap "compressionType" value: ${n}`);
 12103            }
 12104            t.CMapFactory = class CMapFactory {
 12105              static async create({
 12106                encoding: e,
 12107                fetchBuiltInCMap: t,
 12108                useCMap: a,
 12109              }) {
 12110                if (e instanceof n.Name) return createBuiltInCMap(e.name, t);
 12111                if (e instanceof i.BaseStream) {
 12112                  const r = await parseCMap(new CMap(), new o.Lexer(e), t, a);
 12113                  return r.isIdentityCMap ? createBuiltInCMap(r.name, t) : r;
 12114                }
 12115                throw new Error("Encoding required.");
 12116              }
 12117            };
 12118          },
 12119          (e, t, a) => {
 12120            Object.defineProperty(t, "__esModule", { value: !0 });
 12121            t.BinaryCMapReader = void 0;
 12122            var r = a(2);
 12123            function hexToInt(e, t) {
 12124              let a = 0;
 12125              for (let r = 0; r <= t; r++) a = (a << 8) | e[r];
 12126              return a >>> 0;
 12127            }
 12128            function hexToStr(e, t) {
 12129              return 1 === t
 12130                ? String.fromCharCode(e[0], e[1])
 12131                : 3 === t
 12132                  ? String.fromCharCode(e[0], e[1], e[2], e[3])
 12133                  : String.fromCharCode(...e.subarray(0, t + 1));
 12134            }
 12135            function addHex(e, t, a) {
 12136              let r = 0;
 12137              for (let n = a; n >= 0; n--) {
 12138                r += e[n] + t[n];
 12139                e[n] = 255 & r;
 12140                r >>= 8;
 12141              }
 12142            }
 12143            function incHex(e, t) {
 12144              let a = 1;
 12145              for (let r = t; r >= 0 && a > 0; r--) {
 12146                a += e[r];
 12147                e[r] = 255 & a;
 12148                a >>= 8;
 12149              }
 12150            }
 12151            const n = 16;
 12152            class BinaryCMapStream {
 12153              constructor(e) {
 12154                this.buffer = e;
 12155                this.pos = 0;
 12156                this.end = e.length;
 12157                this.tmpBuf = new Uint8Array(19);
 12158              }
 12159              readByte() {
 12160                return this.pos >= this.end ? -1 : this.buffer[this.pos++];
 12161              }
 12162              readNumber() {
 12163                let e,
 12164                  t = 0;
 12165                do {
 12166                  const a = this.readByte();
 12167                  if (a < 0) throw new r.FormatError("unexpected EOF in bcmap");
 12168                  e = !(128 & a);
 12169                  t = (t << 7) | (127 & a);
 12170                } while (!e);
 12171                return t;
 12172              }
 12173              readSigned() {
 12174                const e = this.readNumber();
 12175                return 1 & e ? ~(e >>> 1) : e >>> 1;
 12176              }
 12177              readHex(e, t) {
 12178                e.set(this.buffer.subarray(this.pos, this.pos + t + 1));
 12179                this.pos += t + 1;
 12180              }
 12181              readHexNumber(e, t) {
 12182                let a;
 12183                const n = this.tmpBuf;
 12184                let i = 0;
 12185                do {
 12186                  const e = this.readByte();
 12187                  if (e < 0) throw new r.FormatError("unexpected EOF in bcmap");
 12188                  a = !(128 & e);
 12189                  n[i++] = 127 & e;
 12190                } while (!a);
 12191                let s = t,
 12192                  o = 0,
 12193                  c = 0;
 12194                for (; s >= 0; ) {
 12195                  for (; c < 8 && n.length > 0; ) {
 12196                    o |= n[--i] << c;
 12197                    c += 7;
 12198                  }
 12199                  e[s] = 255 & o;
 12200                  s--;
 12201                  o >>= 8;
 12202                  c -= 8;
 12203                }
 12204              }
 12205              readHexSigned(e, t) {
 12206                this.readHexNumber(e, t);
 12207                const a = 1 & e[t] ? 255 : 0;
 12208                let r = 0;
 12209                for (let n = 0; n <= t; n++) {
 12210                  r = ((1 & r) << 8) | e[n];
 12211                  e[n] = (r >> 1) ^ a;
 12212                }
 12213              }
 12214              readString() {
 12215                const e = this.readNumber(),
 12216                  t = new Array(e);
 12217                for (let a = 0; a < e; a++) t[a] = this.readNumber();
 12218                return String.fromCharCode(...t);
 12219              }
 12220            }
 12221            t.BinaryCMapReader = class BinaryCMapReader {
 12222              async process(e, t, a) {
 12223                const r = new BinaryCMapStream(e),
 12224                  i = r.readByte();
 12225                t.vertical = !!(1 & i);
 12226                let s = null;
 12227                const o = new Uint8Array(n),
 12228                  c = new Uint8Array(n),
 12229                  l = new Uint8Array(n),
 12230                  h = new Uint8Array(n),
 12231                  u = new Uint8Array(n);
 12232                let d, f;
 12233                for (; (f = r.readByte()) >= 0; ) {
 12234                  const e = f >> 5;
 12235                  if (7 === e) {
 12236                    switch (31 & f) {
 12237                      case 0:
 12238                        r.readString();
 12239                        break;
 12240                      case 1:
 12241                        s = r.readString();
 12242                    }
 12243                    continue;
 12244                  }
 12245                  const a = !!(16 & f),
 12246                    i = 15 & f;
 12247                  if (i + 1 > n)
 12248                    throw new Error(
 12249                      "BinaryCMapReader.process: Invalid dataSize.",
 12250                    );
 12251                  const g = 1,
 12252                    p = r.readNumber();
 12253                  switch (e) {
 12254                    case 0:
 12255                      r.readHex(o, i);
 12256                      r.readHexNumber(c, i);
 12257                      addHex(c, o, i);
 12258                      t.addCodespaceRange(i + 1, hexToInt(o, i), hexToInt(c, i));
 12259                      for (let e = 1; e < p; e++) {
 12260                        incHex(c, i);
 12261                        r.readHexNumber(o, i);
 12262                        addHex(o, c, i);
 12263                        r.readHexNumber(c, i);
 12264                        addHex(c, o, i);
 12265                        t.addCodespaceRange(
 12266                          i + 1,
 12267                          hexToInt(o, i),
 12268                          hexToInt(c, i),
 12269                        );
 12270                      }
 12271                      break;
 12272                    case 1:
 12273                      r.readHex(o, i);
 12274                      r.readHexNumber(c, i);
 12275                      addHex(c, o, i);
 12276                      r.readNumber();
 12277                      for (let e = 1; e < p; e++) {
 12278                        incHex(c, i);
 12279                        r.readHexNumber(o, i);
 12280                        addHex(o, c, i);
 12281                        r.readHexNumber(c, i);
 12282                        addHex(c, o, i);
 12283                        r.readNumber();
 12284                      }
 12285                      break;
 12286                    case 2:
 12287                      r.readHex(l, i);
 12288                      d = r.readNumber();
 12289                      t.mapOne(hexToInt(l, i), d);
 12290                      for (let e = 1; e < p; e++) {
 12291                        incHex(l, i);
 12292                        if (!a) {
 12293                          r.readHexNumber(u, i);
 12294                          addHex(l, u, i);
 12295                        }
 12296                        d = r.readSigned() + (d + 1);
 12297                        t.mapOne(hexToInt(l, i), d);
 12298                      }
 12299                      break;
 12300                    case 3:
 12301                      r.readHex(o, i);
 12302                      r.readHexNumber(c, i);
 12303                      addHex(c, o, i);
 12304                      d = r.readNumber();
 12305                      t.mapCidRange(hexToInt(o, i), hexToInt(c, i), d);
 12306                      for (let e = 1; e < p; e++) {
 12307                        incHex(c, i);
 12308                        if (a) o.set(c);
 12309                        else {
 12310                          r.readHexNumber(o, i);
 12311                          addHex(o, c, i);
 12312                        }
 12313                        r.readHexNumber(c, i);
 12314                        addHex(c, o, i);
 12315                        d = r.readNumber();
 12316                        t.mapCidRange(hexToInt(o, i), hexToInt(c, i), d);
 12317                      }
 12318                      break;
 12319                    case 4:
 12320                      r.readHex(l, g);
 12321                      r.readHex(h, i);
 12322                      t.mapOne(hexToInt(l, g), hexToStr(h, i));
 12323                      for (let e = 1; e < p; e++) {
 12324                        incHex(l, g);
 12325                        if (!a) {
 12326                          r.readHexNumber(u, g);
 12327                          addHex(l, u, g);
 12328                        }
 12329                        incHex(h, i);
 12330                        r.readHexSigned(u, i);
 12331                        addHex(h, u, i);
 12332                        t.mapOne(hexToInt(l, g), hexToStr(h, i));
 12333                      }
 12334                      break;
 12335                    case 5:
 12336                      r.readHex(o, g);
 12337                      r.readHexNumber(c, g);
 12338                      addHex(c, o, g);
 12339                      r.readHex(h, i);
 12340                      t.mapBfRange(
 12341                        hexToInt(o, g),
 12342                        hexToInt(c, g),
 12343                        hexToStr(h, i),
 12344                      );
 12345                      for (let e = 1; e < p; e++) {
 12346                        incHex(c, g);
 12347                        if (a) o.set(c);
 12348                        else {
 12349                          r.readHexNumber(o, g);
 12350                          addHex(o, c, g);
 12351                        }
 12352                        r.readHexNumber(c, g);
 12353                        addHex(c, o, g);
 12354                        r.readHex(h, i);
 12355                        t.mapBfRange(
 12356                          hexToInt(o, g),
 12357                          hexToInt(c, g),
 12358                          hexToStr(h, i),
 12359                        );
 12360                      }
 12361                      break;
 12362                    default:
 12363                      throw new Error(
 12364                        `BinaryCMapReader.process - unknown type: ${e}`,
 12365                      );
 12366                  }
 12367                }
 12368                return s ? a(s) : t;
 12369              }
 12370            };
 12371          },
 12372          (e, t, a) => {
 12373            Object.defineProperty(t, "__esModule", { value: !0 });
 12374            t.Parser = t.Linearization = t.Lexer = void 0;
 12375            var r = a(2),
 12376              n = a(4),
 12377              i = a(3),
 12378              s = a(8),
 12379              o = a(17),
 12380              c = a(19),
 12381              l = a(20),
 12382              h = a(22),
 12383              u = a(23),
 12384              d = a(26),
 12385              f = a(29),
 12386              g = a(31),
 12387              p = a(32),
 12388              m = a(33);
 12389            class Parser {
 12390              constructor({
 12391                lexer: e,
 12392                xref: t,
 12393                allowStreams: a = !1,
 12394                recoveryMode: r = !1,
 12395              }) {
 12396                this.lexer = e;
 12397                this.xref = t;
 12398                this.allowStreams = a;
 12399                this.recoveryMode = r;
 12400                this.imageCache = Object.create(null);
 12401                this._imageId = 0;
 12402                this.refill();
 12403              }
 12404              refill() {
 12405                this.buf1 = this.lexer.getObj();
 12406                this.buf2 = this.lexer.getObj();
 12407              }
 12408              shift() {
 12409                if (this.buf2 instanceof n.Cmd && "ID" === this.buf2.cmd) {
 12410                  this.buf1 = this.buf2;
 12411                  this.buf2 = null;
 12412                } else {
 12413                  this.buf1 = this.buf2;
 12414                  this.buf2 = this.lexer.getObj();
 12415                }
 12416              }
 12417              tryShift() {
 12418                try {
 12419                  this.shift();
 12420                  return !0;
 12421                } catch (e) {
 12422                  if (e instanceof i.MissingDataException) throw e;
 12423                  return !1;
 12424                }
 12425              }
 12426              getObj(e = null) {
 12427                const t = this.buf1;
 12428                this.shift();
 12429                if (t instanceof n.Cmd)
 12430                  switch (t.cmd) {
 12431                    case "BI":
 12432                      return this.makeInlineImage(e);
 12433                    case "[":
 12434                      const a = [];
 12435                      for (
 12436                        ;
 12437                        !(0, n.isCmd)(this.buf1, "]") && this.buf1 !== n.EOF;
 12438  
 12439                      )
 12440                        a.push(this.getObj(e));
 12441                      if (this.buf1 === n.EOF) {
 12442                        if (this.recoveryMode) return a;
 12443                        throw new i.ParserEOFException(
 12444                          "End of file inside array.",
 12445                        );
 12446                      }
 12447                      this.shift();
 12448                      return a;
 12449                    case "<<":
 12450                      const s = new n.Dict(this.xref);
 12451                      for (
 12452                        ;
 12453                        !(0, n.isCmd)(this.buf1, ">>") && this.buf1 !== n.EOF;
 12454  
 12455                      ) {
 12456                        if (!(this.buf1 instanceof n.Name)) {
 12457                          (0, r.info)(
 12458                            "Malformed dictionary: key must be a name object",
 12459                          );
 12460                          this.shift();
 12461                          continue;
 12462                        }
 12463                        const t = this.buf1.name;
 12464                        this.shift();
 12465                        if (this.buf1 === n.EOF) break;
 12466                        s.set(t, this.getObj(e));
 12467                      }
 12468                      if (this.buf1 === n.EOF) {
 12469                        if (this.recoveryMode) return s;
 12470                        throw new i.ParserEOFException(
 12471                          "End of file inside dictionary.",
 12472                        );
 12473                      }
 12474                      if ((0, n.isCmd)(this.buf2, "stream"))
 12475                        return this.allowStreams ? this.makeStream(s, e) : s;
 12476                      this.shift();
 12477                      return s;
 12478                    default:
 12479                      return t;
 12480                  }
 12481                if (Number.isInteger(t)) {
 12482                  if (
 12483                    Number.isInteger(this.buf1) &&
 12484                    (0, n.isCmd)(this.buf2, "R")
 12485                  ) {
 12486                    const e = n.Ref.get(t, this.buf1);
 12487                    this.shift();
 12488                    this.shift();
 12489                    return e;
 12490                  }
 12491                  return t;
 12492                }
 12493                return "string" == typeof t && e ? e.decryptString(t) : t;
 12494              }
 12495              findDefaultInlineStreamEnd(e) {
 12496                const { knownCommands: t } = this.lexer,
 12497                  a = e.pos;
 12498                let o,
 12499                  c,
 12500                  l = 0;
 12501                for (; -1 !== (o = e.getByte()); )
 12502                  if (0 === l) l = 69 === o ? 1 : 0;
 12503                  else if (1 === l) l = 73 === o ? 2 : 0;
 12504                  else if (32 === o || 10 === o || 13 === o) {
 12505                    c = e.pos;
 12506                    const a = e.peekBytes(15),
 12507                      i = a.length;
 12508                    if (0 === i) break;
 12509                    for (let e = 0; e < i; e++) {
 12510                      o = a[e];
 12511                      if (
 12512                        (0 !== o || 0 === a[e + 1]) &&
 12513                        10 !== o &&
 12514                        13 !== o &&
 12515                        (o < 32 || o > 127)
 12516                      ) {
 12517                        l = 0;
 12518                        break;
 12519                      }
 12520                    }
 12521                    if (2 !== l) continue;
 12522                    if (!t) {
 12523                      (0, r.warn)(
 12524                        "findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.",
 12525                      );
 12526                      continue;
 12527                    }
 12528                    const h = new Lexer(new s.Stream(a.slice()), t);
 12529                    h._hexStringWarn = () => {};
 12530                    let u = 0;
 12531                    for (;;) {
 12532                      const e = h.getObj();
 12533                      if (e === n.EOF) {
 12534                        l = 0;
 12535                        break;
 12536                      }
 12537                      if (e instanceof n.Cmd) {
 12538                        const a = t[e.cmd];
 12539                        if (!a) {
 12540                          l = 0;
 12541                          break;
 12542                        }
 12543                        if (a.variableArgs ? u <= a.numArgs : u === a.numArgs)
 12544                          break;
 12545                        u = 0;
 12546                      } else u++;
 12547                    }
 12548                    if (2 === l) break;
 12549                  } else l = 0;
 12550                if (-1 === o) {
 12551                  (0, r.warn)(
 12552                    "findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker",
 12553                  );
 12554                  if (c) {
 12555                    (0, r.warn)(
 12556                      '... trying to recover by using the last "EI" occurrence.',
 12557                    );
 12558                    e.skip(-(e.pos - c));
 12559                  }
 12560                }
 12561                let h = 4;
 12562                e.skip(-h);
 12563                o = e.peekByte();
 12564                e.skip(h);
 12565                (0, i.isWhiteSpace)(o) || h--;
 12566                return e.pos - h - a;
 12567              }
 12568              findDCTDecodeInlineStreamEnd(e) {
 12569                const t = e.pos;
 12570                let a,
 12571                  n,
 12572                  i = !1;
 12573                for (; -1 !== (a = e.getByte()); )
 12574                  if (255 === a) {
 12575                    switch (e.getByte()) {
 12576                      case 0:
 12577                        break;
 12578                      case 255:
 12579                        e.skip(-1);
 12580                        break;
 12581                      case 217:
 12582                        i = !0;
 12583                        break;
 12584                      case 192:
 12585                      case 193:
 12586                      case 194:
 12587                      case 195:
 12588                      case 197:
 12589                      case 198:
 12590                      case 199:
 12591                      case 201:
 12592                      case 202:
 12593                      case 203:
 12594                      case 205:
 12595                      case 206:
 12596                      case 207:
 12597                      case 196:
 12598                      case 204:
 12599                      case 218:
 12600                      case 219:
 12601                      case 220:
 12602                      case 221:
 12603                      case 222:
 12604                      case 223:
 12605                      case 224:
 12606                      case 225:
 12607                      case 226:
 12608                      case 227:
 12609                      case 228:
 12610                      case 229:
 12611                      case 230:
 12612                      case 231:
 12613                      case 232:
 12614                      case 233:
 12615                      case 234:
 12616                      case 235:
 12617                      case 236:
 12618                      case 237:
 12619                      case 238:
 12620                      case 239:
 12621                      case 254:
 12622                        n = e.getUint16();
 12623                        n > 2 ? e.skip(n - 2) : e.skip(-2);
 12624                    }
 12625                    if (i) break;
 12626                  }
 12627                const s = e.pos - t;
 12628                if (-1 === a) {
 12629                  (0, r.warn)(
 12630                    "Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead.",
 12631                  );
 12632                  e.skip(-s);
 12633                  return this.findDefaultInlineStreamEnd(e);
 12634                }
 12635                this.inlineStreamSkipEI(e);
 12636                return s;
 12637              }
 12638              findASCII85DecodeInlineStreamEnd(e) {
 12639                const t = e.pos;
 12640                let a;
 12641                for (; -1 !== (a = e.getByte()); )
 12642                  if (126 === a) {
 12643                    const t = e.pos;
 12644                    a = e.peekByte();
 12645                    for (; (0, i.isWhiteSpace)(a); ) {
 12646                      e.skip();
 12647                      a = e.peekByte();
 12648                    }
 12649                    if (62 === a) {
 12650                      e.skip();
 12651                      break;
 12652                    }
 12653                    if (e.pos > t) {
 12654                      const t = e.peekBytes(2);
 12655                      if (69 === t[0] && 73 === t[1]) break;
 12656                    }
 12657                  }
 12658                const n = e.pos - t;
 12659                if (-1 === a) {
 12660                  (0, r.warn)(
 12661                    "Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead.",
 12662                  );
 12663                  e.skip(-n);
 12664                  return this.findDefaultInlineStreamEnd(e);
 12665                }
 12666                this.inlineStreamSkipEI(e);
 12667                return n;
 12668              }
 12669              findASCIIHexDecodeInlineStreamEnd(e) {
 12670                const t = e.pos;
 12671                let a;
 12672                for (; -1 !== (a = e.getByte()) && 62 !== a; );
 12673                const n = e.pos - t;
 12674                if (-1 === a) {
 12675                  (0, r.warn)(
 12676                    "Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead.",
 12677                  );
 12678                  e.skip(-n);
 12679                  return this.findDefaultInlineStreamEnd(e);
 12680                }
 12681                this.inlineStreamSkipEI(e);
 12682                return n;
 12683              }
 12684              inlineStreamSkipEI(e) {
 12685                let t,
 12686                  a = 0;
 12687                for (; -1 !== (t = e.getByte()); )
 12688                  if (0 === a) a = 69 === t ? 1 : 0;
 12689                  else if (1 === a) a = 73 === t ? 2 : 0;
 12690                  else if (2 === a) break;
 12691              }
 12692              makeInlineImage(e) {
 12693                const t = this.lexer,
 12694                  a = t.stream,
 12695                  i = Object.create(null);
 12696                let s;
 12697                for (; !(0, n.isCmd)(this.buf1, "ID") && this.buf1 !== n.EOF; ) {
 12698                  if (!(this.buf1 instanceof n.Name))
 12699                    throw new r.FormatError(
 12700                      "Dictionary key must be a name object",
 12701                    );
 12702                  const t = this.buf1.name;
 12703                  this.shift();
 12704                  if (this.buf1 === n.EOF) break;
 12705                  i[t] = this.getObj(e);
 12706                }
 12707                -1 !== t.beginInlineImagePos &&
 12708                  (s = a.pos - t.beginInlineImagePos);
 12709                const o = this.xref.fetchIfRef(i.F || i.Filter);
 12710                let c;
 12711                if (o instanceof n.Name) c = o.name;
 12712                else if (Array.isArray(o)) {
 12713                  const e = this.xref.fetchIfRef(o[0]);
 12714                  e instanceof n.Name && (c = e.name);
 12715                }
 12716                const l = a.pos;
 12717                let h, u;
 12718                switch (c) {
 12719                  case "DCT":
 12720                  case "DCTDecode":
 12721                    h = this.findDCTDecodeInlineStreamEnd(a);
 12722                    break;
 12723                  case "A85":
 12724                  case "ASCII85Decode":
 12725                    h = this.findASCII85DecodeInlineStreamEnd(a);
 12726                    break;
 12727                  case "AHx":
 12728                  case "ASCIIHexDecode":
 12729                    h = this.findASCIIHexDecodeInlineStreamEnd(a);
 12730                    break;
 12731                  default:
 12732                    h = this.findDefaultInlineStreamEnd(a);
 12733                }
 12734                if (h < 1e3 && s > 0) {
 12735                  const e = a.pos;
 12736                  a.pos = t.beginInlineImagePos;
 12737                  u = (function getInlineImageCacheKey(e) {
 12738                    const t = [],
 12739                      a = e.length;
 12740                    let r = 0;
 12741                    for (; r < a - 1; ) t.push((e[r++] << 8) | e[r++]);
 12742                    r < a && t.push(e[r]);
 12743                    return a + "_" + String.fromCharCode.apply(null, t);
 12744                  })(a.getBytes(s + h));
 12745                  a.pos = e;
 12746                  const r = this.imageCache[u];
 12747                  if (void 0 !== r) {
 12748                    this.buf2 = n.Cmd.get("EI");
 12749                    this.shift();
 12750                    r.reset();
 12751                    return r;
 12752                  }
 12753                }
 12754                const d = new n.Dict(this.xref);
 12755                for (const e in i) d.set(e, i[e]);
 12756                let f = a.makeSubStream(l, h, d);
 12757                e && (f = e.createStream(f, h));
 12758                f = this.filter(f, d, h);
 12759                f.dict = d;
 12760                if (void 0 !== u) {
 12761                  f.cacheKey = "inline_img_" + ++this._imageId;
 12762                  this.imageCache[u] = f;
 12763                }
 12764                this.buf2 = n.Cmd.get("EI");
 12765                this.shift();
 12766                return f;
 12767              }
 12768              _findStreamLength(e, t) {
 12769                const { stream: a } = this.lexer;
 12770                a.pos = e;
 12771                const r = t.length;
 12772                for (; a.pos < a.end; ) {
 12773                  const n = a.peekBytes(2048),
 12774                    i = n.length - r;
 12775                  if (i <= 0) break;
 12776                  let s = 0;
 12777                  for (; s < i; ) {
 12778                    let i = 0;
 12779                    for (; i < r && n[s + i] === t[i]; ) i++;
 12780                    if (i >= r) {
 12781                      a.pos += s;
 12782                      return a.pos - e;
 12783                    }
 12784                    s++;
 12785                  }
 12786                  a.pos += i;
 12787                }
 12788                return -1;
 12789              }
 12790              makeStream(e, t) {
 12791                const a = this.lexer;
 12792                let s = a.stream;
 12793                a.skipToNextLine();
 12794                const o = s.pos - 1;
 12795                let c = e.get("Length");
 12796                if (!Number.isInteger(c)) {
 12797                  (0, r.info)(`Bad length "${c && c.toString()}" in stream.`);
 12798                  c = 0;
 12799                }
 12800                s.pos = o + c;
 12801                a.nextChar();
 12802                if (this.tryShift() && (0, n.isCmd)(this.buf2, "endstream"))
 12803                  this.shift();
 12804                else {
 12805                  const e = new Uint8Array([
 12806                    101, 110, 100, 115, 116, 114, 101, 97, 109,
 12807                  ]);
 12808                  let t = this._findStreamLength(o, e);
 12809                  if (t < 0) {
 12810                    const a = 1;
 12811                    for (let n = 1; n <= a; n++) {
 12812                      const a = e.length - n,
 12813                        c = e.slice(0, a),
 12814                        l = this._findStreamLength(o, c);
 12815                      if (l >= 0) {
 12816                        const e = s.peekBytes(a + 1)[a];
 12817                        if (!(0, i.isWhiteSpace)(e)) break;
 12818                        (0, r.info)(
 12819                          `Found "${(0, r.bytesToString)(
 12820                            c,
 12821                          )}" when searching for endstream command.`,
 12822                        );
 12823                        t = l;
 12824                        break;
 12825                      }
 12826                    }
 12827                    if (t < 0)
 12828                      throw new r.FormatError("Missing endstream command.");
 12829                  }
 12830                  c = t;
 12831                  a.nextChar();
 12832                  this.shift();
 12833                  this.shift();
 12834                }
 12835                this.shift();
 12836                s = s.makeSubStream(o, c, e);
 12837                t && (s = t.createStream(s, c));
 12838                s = this.filter(s, e, c);
 12839                s.dict = e;
 12840                return s;
 12841              }
 12842              filter(e, t, a) {
 12843                let i = t.get("F", "Filter"),
 12844                  s = t.get("DP", "DecodeParms");
 12845                if (i instanceof n.Name) {
 12846                  Array.isArray(s) &&
 12847                    (0, r.warn)(
 12848                      "/DecodeParms should not be an Array, when /Filter is a Name.",
 12849                    );
 12850                  return this.makeFilter(e, i.name, a, s);
 12851                }
 12852                let o = a;
 12853                if (Array.isArray(i)) {
 12854                  const t = i,
 12855                    a = s;
 12856                  for (let c = 0, l = t.length; c < l; ++c) {
 12857                    i = this.xref.fetchIfRef(t[c]);
 12858                    if (!(i instanceof n.Name))
 12859                      throw new r.FormatError(`Bad filter name "${i}"`);
 12860                    s = null;
 12861                    Array.isArray(a) &&
 12862                      c in a &&
 12863                      (s = this.xref.fetchIfRef(a[c]));
 12864                    e = this.makeFilter(e, i.name, o, s);
 12865                    o = null;
 12866                  }
 12867                }
 12868                return e;
 12869              }
 12870              makeFilter(e, t, a, n) {
 12871                if (0 === a) {
 12872                  (0, r.warn)(`Empty "${t}" stream.`);
 12873                  return new s.NullStream();
 12874                }
 12875                try {
 12876                  switch (t) {
 12877                    case "Fl":
 12878                    case "FlateDecode":
 12879                      return n
 12880                        ? new p.PredictorStream(new h.FlateStream(e, a), a, n)
 12881                        : new h.FlateStream(e, a);
 12882                    case "LZW":
 12883                    case "LZWDecode":
 12884                      let t = 1;
 12885                      if (n) {
 12886                        n.has("EarlyChange") && (t = n.get("EarlyChange"));
 12887                        return new p.PredictorStream(
 12888                          new g.LZWStream(e, a, t),
 12889                          a,
 12890                          n,
 12891                        );
 12892                      }
 12893                      return new g.LZWStream(e, a, t);
 12894                    case "DCT":
 12895                    case "DCTDecode":
 12896                      return new d.JpegStream(e, a, n);
 12897                    case "JPX":
 12898                    case "JPXDecode":
 12899                      return new f.JpxStream(e, a, n);
 12900                    case "A85":
 12901                    case "ASCII85Decode":
 12902                      return new o.Ascii85Stream(e, a);
 12903                    case "AHx":
 12904                    case "ASCIIHexDecode":
 12905                      return new c.AsciiHexStream(e, a);
 12906                    case "CCF":
 12907                    case "CCITTFaxDecode":
 12908                      return new l.CCITTFaxStream(e, a, n);
 12909                    case "RL":
 12910                    case "RunLengthDecode":
 12911                      return new m.RunLengthStream(e, a);
 12912                    case "JBIG2Decode":
 12913                      return new u.Jbig2Stream(e, a, n);
 12914                  }
 12915                  (0, r.warn)(`Filter "${t}" is not supported.`);
 12916                  return e;
 12917                } catch (e) {
 12918                  if (e instanceof i.MissingDataException) throw e;
 12919                  (0, r.warn)(`Invalid stream: "${e}"`);
 12920                  return new s.NullStream();
 12921                }
 12922              }
 12923            }
 12924            t.Parser = Parser;
 12925            const b = [
 12926              1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 12927              0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0,
 12928              0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0,
 12929              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
 12930              0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 12931              0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 12932              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 12933              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 12934              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 12935              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 12936              0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 12937              0, 0, 0,
 12938            ];
 12939            function toHexDigit(e) {
 12940              return e >= 48 && e <= 57
 12941                ? 15 & e
 12942                : (e >= 65 && e <= 70) || (e >= 97 && e <= 102)
 12943                  ? 9 + (15 & e)
 12944                  : -1;
 12945            }
 12946            class Lexer {
 12947              constructor(e, t = null) {
 12948                this.stream = e;
 12949                this.nextChar();
 12950                this.strBuf = [];
 12951                this.knownCommands = t;
 12952                this._hexStringNumWarn = 0;
 12953                this.beginInlineImagePos = -1;
 12954              }
 12955              nextChar() {
 12956                return (this.currentChar = this.stream.getByte());
 12957              }
 12958              peekChar() {
 12959                return this.stream.peekByte();
 12960              }
 12961              getNumber() {
 12962                let e = this.currentChar,
 12963                  t = !1,
 12964                  a = 0,
 12965                  n = 1;
 12966                if (45 === e) {
 12967                  n = -1;
 12968                  e = this.nextChar();
 12969                  45 === e && (e = this.nextChar());
 12970                } else 43 === e && (e = this.nextChar());
 12971                if (10 === e || 13 === e)
 12972                  do {
 12973                    e = this.nextChar();
 12974                  } while (10 === e || 13 === e);
 12975                if (46 === e) {
 12976                  a = 10;
 12977                  e = this.nextChar();
 12978                }
 12979                if (e < 48 || e > 57) {
 12980                  const t = `Invalid number: ${String.fromCharCode(
 12981                    e,
 12982                  )} (charCode ${e})`;
 12983                  if ((0, i.isWhiteSpace)(e) || -1 === e) {
 12984                    (0, r.info)(`Lexer.getNumber - "${t}".`);
 12985                    return 0;
 12986                  }
 12987                  throw new r.FormatError(t);
 12988                }
 12989                let s = e - 48,
 12990                  o = 0,
 12991                  c = 1;
 12992                for (; (e = this.nextChar()) >= 0; )
 12993                  if (e >= 48 && e <= 57) {
 12994                    const r = e - 48;
 12995                    if (t) o = 10 * o + r;
 12996                    else {
 12997                      0 !== a && (a *= 10);
 12998                      s = 10 * s + r;
 12999                    }
 13000                  } else if (46 === e) {
 13001                    if (0 !== a) break;
 13002                    a = 1;
 13003                  } else if (45 === e)
 13004                    (0, r.warn)(
 13005                      "Badly formatted number: minus sign in the middle",
 13006                    );
 13007                  else {
 13008                    if (69 !== e && 101 !== e) break;
 13009                    e = this.peekChar();
 13010                    if (43 === e || 45 === e) {
 13011                      c = 45 === e ? -1 : 1;
 13012                      this.nextChar();
 13013                    } else if (e < 48 || e > 57) break;
 13014                    t = !0;
 13015                  }
 13016                0 !== a && (s /= a);
 13017                t && (s *= 10 ** (c * o));
 13018                return n * s;
 13019              }
 13020              getString() {
 13021                let e = 1,
 13022                  t = !1;
 13023                const a = this.strBuf;
 13024                a.length = 0;
 13025                let n = this.nextChar();
 13026                for (;;) {
 13027                  let i = !1;
 13028                  switch (0 | n) {
 13029                    case -1:
 13030                      (0, r.warn)("Unterminated string");
 13031                      t = !0;
 13032                      break;
 13033                    case 40:
 13034                      ++e;
 13035                      a.push("(");
 13036                      break;
 13037                    case 41:
 13038                      if (0 == --e) {
 13039                        this.nextChar();
 13040                        t = !0;
 13041                      } else a.push(")");
 13042                      break;
 13043                    case 92:
 13044                      n = this.nextChar();
 13045                      switch (n) {
 13046                        case -1:
 13047                          (0, r.warn)("Unterminated string");
 13048                          t = !0;
 13049                          break;
 13050                        case 110:
 13051                          a.push("\n");
 13052                          break;
 13053                        case 114:
 13054                          a.push("\r");
 13055                          break;
 13056                        case 116:
 13057                          a.push("\t");
 13058                          break;
 13059                        case 98:
 13060                          a.push("\b");
 13061                          break;
 13062                        case 102:
 13063                          a.push("\f");
 13064                          break;
 13065                        case 92:
 13066                        case 40:
 13067                        case 41:
 13068                          a.push(String.fromCharCode(n));
 13069                          break;
 13070                        case 48:
 13071                        case 49:
 13072                        case 50:
 13073                        case 51:
 13074                        case 52:
 13075                        case 53:
 13076                        case 54:
 13077                        case 55:
 13078                          let e = 15 & n;
 13079                          n = this.nextChar();
 13080                          i = !0;
 13081                          if (n >= 48 && n <= 55) {
 13082                            e = (e << 3) + (15 & n);
 13083                            n = this.nextChar();
 13084                            if (n >= 48 && n <= 55) {
 13085                              i = !1;
 13086                              e = (e << 3) + (15 & n);
 13087                            }
 13088                          }
 13089                          a.push(String.fromCharCode(e));
 13090                          break;
 13091                        case 13:
 13092                          10 === this.peekChar() && this.nextChar();
 13093                          break;
 13094                        case 10:
 13095                          break;
 13096                        default:
 13097                          a.push(String.fromCharCode(n));
 13098                      }
 13099                      break;
 13100                    default:
 13101                      a.push(String.fromCharCode(n));
 13102                  }
 13103                  if (t) break;
 13104                  i || (n = this.nextChar());
 13105                }
 13106                return a.join("");
 13107              }
 13108              getName() {
 13109                let e, t;
 13110                const a = this.strBuf;
 13111                a.length = 0;
 13112                for (; (e = this.nextChar()) >= 0 && !b[e]; )
 13113                  if (35 === e) {
 13114                    e = this.nextChar();
 13115                    if (b[e]) {
 13116                      (0, r.warn)(
 13117                        "Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number.",
 13118                      );
 13119                      a.push("#");
 13120                      break;
 13121                    }
 13122                    const n = toHexDigit(e);
 13123                    if (-1 !== n) {
 13124                      t = e;
 13125                      e = this.nextChar();
 13126                      const i = toHexDigit(e);
 13127                      if (-1 === i) {
 13128                        (0, r.warn)(
 13129                          `Lexer_getName: Illegal digit (${String.fromCharCode(
 13130                            e,
 13131                          )}) in hexadecimal number.`,
 13132                        );
 13133                        a.push("#", String.fromCharCode(t));
 13134                        if (b[e]) break;
 13135                        a.push(String.fromCharCode(e));
 13136                        continue;
 13137                      }
 13138                      a.push(String.fromCharCode((n << 4) | i));
 13139                    } else a.push("#", String.fromCharCode(e));
 13140                  } else a.push(String.fromCharCode(e));
 13141                a.length > 127 &&
 13142                  (0, r.warn)(
 13143                    `Name token is longer than allowed by the spec: ${a.length}`,
 13144                  );
 13145                return n.Name.get(a.join(""));
 13146              }
 13147              _hexStringWarn(e) {
 13148                5 != this._hexStringNumWarn++
 13149                  ? this._hexStringNumWarn > 5 ||
 13150                    (0, r.warn)(`getHexString - ignoring invalid character: ${e}`)
 13151                  : (0, r.warn)(
 13152                      "getHexString - ignoring additional invalid characters.",
 13153                    );
 13154              }
 13155              getHexString() {
 13156                const e = this.strBuf;
 13157                e.length = 0;
 13158                let t,
 13159                  a,
 13160                  n = this.currentChar,
 13161                  i = !0;
 13162                this._hexStringNumWarn = 0;
 13163                for (;;) {
 13164                  if (n < 0) {
 13165                    (0, r.warn)("Unterminated hex string");
 13166                    break;
 13167                  }
 13168                  if (62 === n) {
 13169                    this.nextChar();
 13170                    break;
 13171                  }
 13172                  if (1 !== b[n]) {
 13173                    if (i) {
 13174                      t = toHexDigit(n);
 13175                      if (-1 === t) {
 13176                        this._hexStringWarn(n);
 13177                        n = this.nextChar();
 13178                        continue;
 13179                      }
 13180                    } else {
 13181                      a = toHexDigit(n);
 13182                      if (-1 === a) {
 13183                        this._hexStringWarn(n);
 13184                        n = this.nextChar();
 13185                        continue;
 13186                      }
 13187                      e.push(String.fromCharCode((t << 4) | a));
 13188                    }
 13189                    i = !i;
 13190                    n = this.nextChar();
 13191                  } else n = this.nextChar();
 13192                }
 13193                return e.join("");
 13194              }
 13195              getObj() {
 13196                let e = !1,
 13197                  t = this.currentChar;
 13198                for (;;) {
 13199                  if (t < 0) return n.EOF;
 13200                  if (e) (10 !== t && 13 !== t) || (e = !1);
 13201                  else if (37 === t) e = !0;
 13202                  else if (1 !== b[t]) break;
 13203                  t = this.nextChar();
 13204                }
 13205                switch (0 | t) {
 13206                  case 48:
 13207                  case 49:
 13208                  case 50:
 13209                  case 51:
 13210                  case 52:
 13211                  case 53:
 13212                  case 54:
 13213                  case 55:
 13214                  case 56:
 13215                  case 57:
 13216                  case 43:
 13217                  case 45:
 13218                  case 46:
 13219                    return this.getNumber();
 13220                  case 40:
 13221                    return this.getString();
 13222                  case 47:
 13223                    return this.getName();
 13224                  case 91:
 13225                    this.nextChar();
 13226                    return n.Cmd.get("[");
 13227                  case 93:
 13228                    this.nextChar();
 13229                    return n.Cmd.get("]");
 13230                  case 60:
 13231                    t = this.nextChar();
 13232                    if (60 === t) {
 13233                      this.nextChar();
 13234                      return n.Cmd.get("<<");
 13235                    }
 13236                    return this.getHexString();
 13237                  case 62:
 13238                    t = this.nextChar();
 13239                    if (62 === t) {
 13240                      this.nextChar();
 13241                      return n.Cmd.get(">>");
 13242                    }
 13243                    return n.Cmd.get(">");
 13244                  case 123:
 13245                    this.nextChar();
 13246                    return n.Cmd.get("{");
 13247                  case 125:
 13248                    this.nextChar();
 13249                    return n.Cmd.get("}");
 13250                  case 41:
 13251                    this.nextChar();
 13252                    throw new r.FormatError(`Illegal character: ${t}`);
 13253                }
 13254                let a = String.fromCharCode(t);
 13255                if (t < 32 || t > 127) {
 13256                  const e = this.peekChar();
 13257                  if (e >= 32 && e <= 127) {
 13258                    this.nextChar();
 13259                    return n.Cmd.get(a);
 13260                  }
 13261                }
 13262                const i = this.knownCommands;
 13263                let s = void 0 !== i?.[a];
 13264                for (; (t = this.nextChar()) >= 0 && !b[t]; ) {
 13265                  const e = a + String.fromCharCode(t);
 13266                  if (s && void 0 === i[e]) break;
 13267                  if (128 === a.length)
 13268                    throw new r.FormatError(
 13269                      `Command token too long: ${a.length}`,
 13270                    );
 13271                  a = e;
 13272                  s = void 0 !== i?.[a];
 13273                }
 13274                if ("true" === a) return !0;
 13275                if ("false" === a) return !1;
 13276                if ("null" === a) return null;
 13277                "BI" === a && (this.beginInlineImagePos = this.stream.pos);
 13278                return n.Cmd.get(a);
 13279              }
 13280              skipToNextLine() {
 13281                let e = this.currentChar;
 13282                for (; e >= 0; ) {
 13283                  if (13 === e) {
 13284                    e = this.nextChar();
 13285                    10 === e && this.nextChar();
 13286                    break;
 13287                  }
 13288                  if (10 === e) {
 13289                    this.nextChar();
 13290                    break;
 13291                  }
 13292                  e = this.nextChar();
 13293                }
 13294              }
 13295            }
 13296            t.Lexer = Lexer;
 13297            t.Linearization = class Linearization {
 13298              static create(e) {
 13299                function getInt(e, t, a = !1) {
 13300                  const r = e.get(t);
 13301                  if (Number.isInteger(r) && (a ? r >= 0 : r > 0)) return r;
 13302                  throw new Error(
 13303                    `The "${t}" parameter in the linearization dictionary is invalid.`,
 13304                  );
 13305                }
 13306                const t = new Parser({ lexer: new Lexer(e), xref: null }),
 13307                  a = t.getObj(),
 13308                  r = t.getObj(),
 13309                  i = t.getObj(),
 13310                  s = t.getObj();
 13311                let o, c;
 13312                if (
 13313                  !(
 13314                    Number.isInteger(a) &&
 13315                    Number.isInteger(r) &&
 13316                    (0, n.isCmd)(i, "obj") &&
 13317                    s instanceof n.Dict &&
 13318                    "number" == typeof (o = s.get("Linearized")) &&
 13319                    o > 0
 13320                  )
 13321                )
 13322                  return null;
 13323                if ((c = getInt(s, "L")) !== e.length)
 13324                  throw new Error(
 13325                    'The "L" parameter in the linearization dictionary does not equal the stream length.',
 13326                  );
 13327                return {
 13328                  length: c,
 13329                  hints: (function getHints(e) {
 13330                    const t = e.get("H");
 13331                    let a;
 13332                    if (Array.isArray(t) && (2 === (a = t.length) || 4 === a)) {
 13333                      for (let e = 0; e < a; e++) {
 13334                        const a = t[e];
 13335                        if (!(Number.isInteger(a) && a > 0))
 13336                          throw new Error(
 13337                            `Hint (${e}) in the linearization dictionary is invalid.`,
 13338                          );
 13339                      }
 13340                      return t;
 13341                    }
 13342                    throw new Error(
 13343                      "Hint array in the linearization dictionary is invalid.",
 13344                    );
 13345                  })(s),
 13346                  objectNumberFirst: getInt(s, "O"),
 13347                  endFirst: getInt(s, "E"),
 13348                  numPages: getInt(s, "N"),
 13349                  mainXRefEntriesOffset: getInt(s, "T"),
 13350                  pageFirst: s.has("P") ? getInt(s, "P", !0) : 0,
 13351                };
 13352              }
 13353            };
 13354          },
 13355          (e, t, a) => {
 13356            Object.defineProperty(t, "__esModule", { value: !0 });
 13357            t.Ascii85Stream = void 0;
 13358            var r = a(18),
 13359              n = a(3);
 13360            class Ascii85Stream extends r.DecodeStream {
 13361              constructor(e, t) {
 13362                t && (t *= 0.8);
 13363                super(t);
 13364                this.str = e;
 13365                this.dict = e.dict;
 13366                this.input = new Uint8Array(5);
 13367              }
 13368              readBlock() {
 13369                const e = this.str;
 13370                let t = e.getByte();
 13371                for (; (0, n.isWhiteSpace)(t); ) t = e.getByte();
 13372                if (-1 === t || 126 === t) {
 13373                  this.eof = !0;
 13374                  return;
 13375                }
 13376                const a = this.bufferLength;
 13377                let r, i;
 13378                if (122 === t) {
 13379                  r = this.ensureBuffer(a + 4);
 13380                  for (i = 0; i < 4; ++i) r[a + i] = 0;
 13381                  this.bufferLength += 4;
 13382                } else {
 13383                  const s = this.input;
 13384                  s[0] = t;
 13385                  for (i = 1; i < 5; ++i) {
 13386                    t = e.getByte();
 13387                    for (; (0, n.isWhiteSpace)(t); ) t = e.getByte();
 13388                    s[i] = t;
 13389                    if (-1 === t || 126 === t) break;
 13390                  }
 13391                  r = this.ensureBuffer(a + i - 1);
 13392                  this.bufferLength += i - 1;
 13393                  if (i < 5) {
 13394                    for (; i < 5; ++i) s[i] = 117;
 13395                    this.eof = !0;
 13396                  }
 13397                  let o = 0;
 13398                  for (i = 0; i < 5; ++i) o = 85 * o + (s[i] - 33);
 13399                  for (i = 3; i >= 0; --i) {
 13400                    r[a + i] = 255 & o;
 13401                    o >>= 8;
 13402                  }
 13403                }
 13404              }
 13405            }
 13406            t.Ascii85Stream = Ascii85Stream;
 13407          },
 13408          (e, t, a) => {
 13409            Object.defineProperty(t, "__esModule", { value: !0 });
 13410            t.StreamsSequenceStream = t.DecodeStream = void 0;
 13411            var r = a(5),
 13412              n = a(8);
 13413            const i = new Uint8Array(0);
 13414            class DecodeStream extends r.BaseStream {
 13415              constructor(e) {
 13416                super();
 13417                this._rawMinBufferLength = e || 0;
 13418                this.pos = 0;
 13419                this.bufferLength = 0;
 13420                this.eof = !1;
 13421                this.buffer = i;
 13422                this.minBufferLength = 512;
 13423                if (e)
 13424                  for (; this.minBufferLength < e; ) this.minBufferLength *= 2;
 13425              }
 13426              get isEmpty() {
 13427                for (; !this.eof && 0 === this.bufferLength; ) this.readBlock();
 13428                return 0 === this.bufferLength;
 13429              }
 13430              ensureBuffer(e) {
 13431                const t = this.buffer;
 13432                if (e <= t.byteLength) return t;
 13433                let a = this.minBufferLength;
 13434                for (; a < e; ) a *= 2;
 13435                const r = new Uint8Array(a);
 13436                r.set(t);
 13437                return (this.buffer = r);
 13438              }
 13439              getByte() {
 13440                const e = this.pos;
 13441                for (; this.bufferLength <= e; ) {
 13442                  if (this.eof) return -1;
 13443                  this.readBlock();
 13444                }
 13445                return this.buffer[this.pos++];
 13446              }
 13447              getBytes(e) {
 13448                const t = this.pos;
 13449                let a;
 13450                if (e) {
 13451                  this.ensureBuffer(t + e);
 13452                  a = t + e;
 13453                  for (; !this.eof && this.bufferLength < a; ) this.readBlock();
 13454                  const r = this.bufferLength;
 13455                  a > r && (a = r);
 13456                } else {
 13457                  for (; !this.eof; ) this.readBlock();
 13458                  a = this.bufferLength;
 13459                }
 13460                this.pos = a;
 13461                return this.buffer.subarray(t, a);
 13462              }
 13463              reset() {
 13464                this.pos = 0;
 13465              }
 13466              makeSubStream(e, t, a = null) {
 13467                if (void 0 === t) for (; !this.eof; ) this.readBlock();
 13468                else {
 13469                  const a = e + t;
 13470                  for (; this.bufferLength <= a && !this.eof; ) this.readBlock();
 13471                }
 13472                return new n.Stream(this.buffer, e, t, a);
 13473              }
 13474              getBaseStreams() {
 13475                return this.str ? this.str.getBaseStreams() : null;
 13476              }
 13477            }
 13478            t.DecodeStream = DecodeStream;
 13479            t.StreamsSequenceStream = class StreamsSequenceStream extends (
 13480              DecodeStream
 13481            ) {
 13482              constructor(e, t = null) {
 13483                let a = 0;
 13484                for (const t of e)
 13485                  a +=
 13486                    t instanceof DecodeStream ? t._rawMinBufferLength : t.length;
 13487                super(a);
 13488                this.streams = e;
 13489                this._onError = t;
 13490              }
 13491              readBlock() {
 13492                const e = this.streams;
 13493                if (0 === e.length) {
 13494                  this.eof = !0;
 13495                  return;
 13496                }
 13497                const t = e.shift();
 13498                let a;
 13499                try {
 13500                  a = t.getBytes();
 13501                } catch (e) {
 13502                  if (this._onError) {
 13503                    this._onError(e, t.dict?.objId);
 13504                    return;
 13505                  }
 13506                  throw e;
 13507                }
 13508                const r = this.bufferLength,
 13509                  n = r + a.length;
 13510                this.ensureBuffer(n).set(a, r);
 13511                this.bufferLength = n;
 13512              }
 13513              getBaseStreams() {
 13514                const e = [];
 13515                for (const t of this.streams) {
 13516                  const a = t.getBaseStreams();
 13517                  a && e.push(...a);
 13518                }
 13519                return e.length > 0 ? e : null;
 13520              }
 13521            };
 13522          },
 13523          (e, t, a) => {
 13524            Object.defineProperty(t, "__esModule", { value: !0 });
 13525            t.AsciiHexStream = void 0;
 13526            var r = a(18);
 13527            class AsciiHexStream extends r.DecodeStream {
 13528              constructor(e, t) {
 13529                t && (t *= 0.5);
 13530                super(t);
 13531                this.str = e;
 13532                this.dict = e.dict;
 13533                this.firstDigit = -1;
 13534              }
 13535              readBlock() {
 13536                const e = this.str.getBytes(8e3);
 13537                if (!e.length) {
 13538                  this.eof = !0;
 13539                  return;
 13540                }
 13541                const t = (e.length + 1) >> 1,
 13542                  a = this.ensureBuffer(this.bufferLength + t);
 13543                let r = this.bufferLength,
 13544                  n = this.firstDigit;
 13545                for (const t of e) {
 13546                  let e;
 13547                  if (t >= 48 && t <= 57) e = 15 & t;
 13548                  else {
 13549                    if (!((t >= 65 && t <= 70) || (t >= 97 && t <= 102))) {
 13550                      if (62 === t) {
 13551                        this.eof = !0;
 13552                        break;
 13553                      }
 13554                      continue;
 13555                    }
 13556                    e = 9 + (15 & t);
 13557                  }
 13558                  if (n < 0) n = e;
 13559                  else {
 13560                    a[r++] = (n << 4) | e;
 13561                    n = -1;
 13562                  }
 13563                }
 13564                if (n >= 0 && this.eof) {
 13565                  a[r++] = n << 4;
 13566                  n = -1;
 13567                }
 13568                this.firstDigit = n;
 13569                this.bufferLength = r;
 13570              }
 13571            }
 13572            t.AsciiHexStream = AsciiHexStream;
 13573          },
 13574          (e, t, a) => {
 13575            Object.defineProperty(t, "__esModule", { value: !0 });
 13576            t.CCITTFaxStream = void 0;
 13577            var r = a(21),
 13578              n = a(18),
 13579              i = a(4);
 13580            class CCITTFaxStream extends n.DecodeStream {
 13581              constructor(e, t, a) {
 13582                super(t);
 13583                this.str = e;
 13584                this.dict = e.dict;
 13585                a instanceof i.Dict || (a = i.Dict.empty);
 13586                const n = { next: () => e.getByte() };
 13587                this.ccittFaxDecoder = new r.CCITTFaxDecoder(n, {
 13588                  K: a.get("K"),
 13589                  EndOfLine: a.get("EndOfLine"),
 13590                  EncodedByteAlign: a.get("EncodedByteAlign"),
 13591                  Columns: a.get("Columns"),
 13592                  Rows: a.get("Rows"),
 13593                  EndOfBlock: a.get("EndOfBlock"),
 13594                  BlackIs1: a.get("BlackIs1"),
 13595                });
 13596              }
 13597              readBlock() {
 13598                for (; !this.eof; ) {
 13599                  const e = this.ccittFaxDecoder.readNextChar();
 13600                  if (-1 === e) {
 13601                    this.eof = !0;
 13602                    return;
 13603                  }
 13604                  this.ensureBuffer(this.bufferLength + 1);
 13605                  this.buffer[this.bufferLength++] = e;
 13606                }
 13607              }
 13608            }
 13609            t.CCITTFaxStream = CCITTFaxStream;
 13610          },
 13611          (e, t, a) => {
 13612            Object.defineProperty(t, "__esModule", { value: !0 });
 13613            t.CCITTFaxDecoder = void 0;
 13614            var r = a(2);
 13615            const n = -1,
 13616              i = [
 13617                [-1, -1],
 13618                [-1, -1],
 13619                [7, 8],
 13620                [7, 7],
 13621                [6, 6],
 13622                [6, 6],
 13623                [6, 5],
 13624                [6, 5],
 13625                [4, 0],
 13626                [4, 0],
 13627                [4, 0],
 13628                [4, 0],
 13629                [4, 0],
 13630                [4, 0],
 13631                [4, 0],
 13632                [4, 0],
 13633                [3, 1],
 13634                [3, 1],
 13635                [3, 1],
 13636                [3, 1],
 13637                [3, 1],
 13638                [3, 1],
 13639                [3, 1],
 13640                [3, 1],
 13641                [3, 1],
 13642                [3, 1],
 13643                [3, 1],
 13644                [3, 1],
 13645                [3, 1],
 13646                [3, 1],
 13647                [3, 1],
 13648                [3, 1],
 13649                [3, 4],
 13650                [3, 4],
 13651                [3, 4],
 13652                [3, 4],
 13653                [3, 4],
 13654                [3, 4],
 13655                [3, 4],
 13656                [3, 4],
 13657                [3, 4],
 13658                [3, 4],
 13659                [3, 4],
 13660                [3, 4],
 13661                [3, 4],
 13662                [3, 4],
 13663                [3, 4],
 13664                [3, 4],
 13665                [3, 3],
 13666                [3, 3],
 13667                [3, 3],
 13668                [3, 3],
 13669                [3, 3],
 13670                [3, 3],
 13671                [3, 3],
 13672                [3, 3],
 13673                [3, 3],
 13674                [3, 3],
 13675                [3, 3],
 13676                [3, 3],
 13677                [3, 3],
 13678                [3, 3],
 13679                [3, 3],
 13680                [3, 3],
 13681                [1, 2],
 13682                [1, 2],
 13683                [1, 2],
 13684                [1, 2],
 13685                [1, 2],
 13686                [1, 2],
 13687                [1, 2],
 13688                [1, 2],
 13689                [1, 2],
 13690                [1, 2],
 13691                [1, 2],
 13692                [1, 2],
 13693                [1, 2],
 13694                [1, 2],
 13695                [1, 2],
 13696                [1, 2],
 13697                [1, 2],
 13698                [1, 2],
 13699                [1, 2],
 13700                [1, 2],
 13701                [1, 2],
 13702                [1, 2],
 13703                [1, 2],
 13704                [1, 2],
 13705                [1, 2],
 13706                [1, 2],
 13707                [1, 2],
 13708                [1, 2],
 13709                [1, 2],
 13710                [1, 2],
 13711                [1, 2],
 13712                [1, 2],
 13713                [1, 2],
 13714                [1, 2],
 13715                [1, 2],
 13716                [1, 2],
 13717                [1, 2],
 13718                [1, 2],
 13719                [1, 2],
 13720                [1, 2],
 13721                [1, 2],
 13722                [1, 2],
 13723                [1, 2],
 13724                [1, 2],
 13725                [1, 2],
 13726                [1, 2],
 13727                [1, 2],
 13728                [1, 2],
 13729                [1, 2],
 13730                [1, 2],
 13731                [1, 2],
 13732                [1, 2],
 13733                [1, 2],
 13734                [1, 2],
 13735                [1, 2],
 13736                [1, 2],
 13737                [1, 2],
 13738                [1, 2],
 13739                [1, 2],
 13740                [1, 2],
 13741                [1, 2],
 13742                [1, 2],
 13743                [1, 2],
 13744                [1, 2],
 13745              ],
 13746              s = [
 13747                [-1, -1],
 13748                [12, -2],
 13749                [-1, -1],
 13750                [-1, -1],
 13751                [-1, -1],
 13752                [-1, -1],
 13753                [-1, -1],
 13754                [-1, -1],
 13755                [-1, -1],
 13756                [-1, -1],
 13757                [-1, -1],
 13758                [-1, -1],
 13759                [-1, -1],
 13760                [-1, -1],
 13761                [-1, -1],
 13762                [-1, -1],
 13763                [11, 1792],
 13764                [11, 1792],
 13765                [12, 1984],
 13766                [12, 2048],
 13767                [12, 2112],
 13768                [12, 2176],
 13769                [12, 2240],
 13770                [12, 2304],
 13771                [11, 1856],
 13772                [11, 1856],
 13773                [11, 1920],
 13774                [11, 1920],
 13775                [12, 2368],
 13776                [12, 2432],
 13777                [12, 2496],
 13778                [12, 2560],
 13779              ],
 13780              o = [
 13781                [-1, -1],
 13782                [-1, -1],
 13783                [-1, -1],
 13784                [-1, -1],
 13785                [8, 29],
 13786                [8, 29],
 13787                [8, 30],
 13788                [8, 30],
 13789                [8, 45],
 13790                [8, 45],
 13791                [8, 46],
 13792                [8, 46],
 13793                [7, 22],
 13794                [7, 22],
 13795                [7, 22],
 13796                [7, 22],
 13797                [7, 23],
 13798                [7, 23],
 13799                [7, 23],
 13800                [7, 23],
 13801                [8, 47],
 13802                [8, 47],
 13803                [8, 48],
 13804                [8, 48],
 13805                [6, 13],
 13806                [6, 13],
 13807                [6, 13],
 13808                [6, 13],
 13809                [6, 13],
 13810                [6, 13],
 13811                [6, 13],
 13812                [6, 13],
 13813                [7, 20],
 13814                [7, 20],
 13815                [7, 20],
 13816                [7, 20],
 13817                [8, 33],
 13818                [8, 33],
 13819                [8, 34],
 13820                [8, 34],
 13821                [8, 35],
 13822                [8, 35],
 13823                [8, 36],
 13824                [8, 36],
 13825                [8, 37],
 13826                [8, 37],
 13827                [8, 38],
 13828                [8, 38],
 13829                [7, 19],
 13830                [7, 19],
 13831                [7, 19],
 13832                [7, 19],
 13833                [8, 31],
 13834                [8, 31],
 13835                [8, 32],
 13836                [8, 32],
 13837                [6, 1],
 13838                [6, 1],
 13839                [6, 1],
 13840                [6, 1],
 13841                [6, 1],
 13842                [6, 1],
 13843                [6, 1],
 13844                [6, 1],
 13845                [6, 12],
 13846                [6, 12],
 13847                [6, 12],
 13848                [6, 12],
 13849                [6, 12],
 13850                [6, 12],
 13851                [6, 12],
 13852                [6, 12],
 13853                [8, 53],
 13854                [8, 53],
 13855                [8, 54],
 13856                [8, 54],
 13857                [7, 26],
 13858                [7, 26],
 13859                [7, 26],
 13860                [7, 26],
 13861                [8, 39],
 13862                [8, 39],
 13863                [8, 40],
 13864                [8, 40],
 13865                [8, 41],
 13866                [8, 41],
 13867                [8, 42],
 13868                [8, 42],
 13869                [8, 43],
 13870                [8, 43],
 13871                [8, 44],
 13872                [8, 44],
 13873                [7, 21],
 13874                [7, 21],
 13875                [7, 21],
 13876                [7, 21],
 13877                [7, 28],
 13878                [7, 28],
 13879                [7, 28],
 13880                [7, 28],
 13881                [8, 61],
 13882                [8, 61],
 13883                [8, 62],
 13884                [8, 62],
 13885                [8, 63],
 13886                [8, 63],
 13887                [8, 0],
 13888                [8, 0],
 13889                [8, 320],
 13890                [8, 320],
 13891                [8, 384],
 13892                [8, 384],
 13893                [5, 10],
 13894                [5, 10],
 13895                [5, 10],
 13896                [5, 10],
 13897                [5, 10],
 13898                [5, 10],
 13899                [5, 10],
 13900                [5, 10],
 13901                [5, 10],
 13902                [5, 10],
 13903                [5, 10],
 13904                [5, 10],
 13905                [5, 10],
 13906                [5, 10],
 13907                [5, 10],
 13908                [5, 10],
 13909                [5, 11],
 13910                [5, 11],
 13911                [5, 11],
 13912                [5, 11],
 13913                [5, 11],
 13914                [5, 11],
 13915                [5, 11],
 13916                [5, 11],
 13917                [5, 11],
 13918                [5, 11],
 13919                [5, 11],
 13920                [5, 11],
 13921                [5, 11],
 13922                [5, 11],
 13923                [5, 11],
 13924                [5, 11],
 13925                [7, 27],
 13926                [7, 27],
 13927                [7, 27],
 13928                [7, 27],
 13929                [8, 59],
 13930                [8, 59],
 13931                [8, 60],
 13932                [8, 60],
 13933                [9, 1472],
 13934                [9, 1536],
 13935                [9, 1600],
 13936                [9, 1728],
 13937                [7, 18],
 13938                [7, 18],
 13939                [7, 18],
 13940                [7, 18],
 13941                [7, 24],
 13942                [7, 24],
 13943                [7, 24],
 13944                [7, 24],
 13945                [8, 49],
 13946                [8, 49],
 13947                [8, 50],
 13948                [8, 50],
 13949                [8, 51],
 13950                [8, 51],
 13951                [8, 52],
 13952                [8, 52],
 13953                [7, 25],
 13954                [7, 25],
 13955                [7, 25],
 13956                [7, 25],
 13957                [8, 55],
 13958                [8, 55],
 13959                [8, 56],
 13960                [8, 56],
 13961                [8, 57],
 13962                [8, 57],
 13963                [8, 58],
 13964                [8, 58],
 13965                [6, 192],
 13966                [6, 192],
 13967                [6, 192],
 13968                [6, 192],
 13969                [6, 192],
 13970                [6, 192],
 13971                [6, 192],
 13972                [6, 192],
 13973                [6, 1664],
 13974                [6, 1664],
 13975                [6, 1664],
 13976                [6, 1664],
 13977                [6, 1664],
 13978                [6, 1664],
 13979                [6, 1664],
 13980                [6, 1664],
 13981                [8, 448],
 13982                [8, 448],
 13983                [8, 512],
 13984                [8, 512],
 13985                [9, 704],
 13986                [9, 768],
 13987                [8, 640],
 13988                [8, 640],
 13989                [8, 576],
 13990                [8, 576],
 13991                [9, 832],
 13992                [9, 896],
 13993                [9, 960],
 13994                [9, 1024],
 13995                [9, 1088],
 13996                [9, 1152],
 13997                [9, 1216],
 13998                [9, 1280],
 13999                [9, 1344],
 14000                [9, 1408],
 14001                [7, 256],
 14002                [7, 256],
 14003                [7, 256],
 14004                [7, 256],
 14005                [4, 2],
 14006                [4, 2],
 14007                [4, 2],
 14008                [4, 2],
 14009                [4, 2],
 14010                [4, 2],
 14011                [4, 2],
 14012                [4, 2],
 14013                [4, 2],
 14014                [4, 2],
 14015                [4, 2],
 14016                [4, 2],
 14017                [4, 2],
 14018                [4, 2],
 14019                [4, 2],
 14020                [4, 2],
 14021                [4, 2],
 14022                [4, 2],
 14023                [4, 2],
 14024                [4, 2],
 14025                [4, 2],
 14026                [4, 2],
 14027                [4, 2],
 14028                [4, 2],
 14029                [4, 2],
 14030                [4, 2],
 14031                [4, 2],
 14032                [4, 2],
 14033                [4, 2],
 14034                [4, 2],
 14035                [4, 2],
 14036                [4, 2],
 14037                [4, 3],
 14038                [4, 3],
 14039                [4, 3],
 14040                [4, 3],
 14041                [4, 3],
 14042                [4, 3],
 14043                [4, 3],
 14044                [4, 3],
 14045                [4, 3],
 14046                [4, 3],
 14047                [4, 3],
 14048                [4, 3],
 14049                [4, 3],
 14050                [4, 3],
 14051                [4, 3],
 14052                [4, 3],
 14053                [4, 3],
 14054                [4, 3],
 14055                [4, 3],
 14056                [4, 3],
 14057                [4, 3],
 14058                [4, 3],
 14059                [4, 3],
 14060                [4, 3],
 14061                [4, 3],
 14062                [4, 3],
 14063                [4, 3],
 14064                [4, 3],
 14065                [4, 3],
 14066                [4, 3],
 14067                [4, 3],
 14068                [4, 3],
 14069                [5, 128],
 14070                [5, 128],
 14071                [5, 128],
 14072                [5, 128],
 14073                [5, 128],
 14074                [5, 128],
 14075                [5, 128],
 14076                [5, 128],
 14077                [5, 128],
 14078                [5, 128],
 14079                [5, 128],
 14080                [5, 128],
 14081                [5, 128],
 14082                [5, 128],
 14083                [5, 128],
 14084                [5, 128],
 14085                [5, 8],
 14086                [5, 8],
 14087                [5, 8],
 14088                [5, 8],
 14089                [5, 8],
 14090                [5, 8],
 14091                [5, 8],
 14092                [5, 8],
 14093                [5, 8],
 14094                [5, 8],
 14095                [5, 8],
 14096                [5, 8],
 14097                [5, 8],
 14098                [5, 8],
 14099                [5, 8],
 14100                [5, 8],
 14101                [5, 9],
 14102                [5, 9],
 14103                [5, 9],
 14104                [5, 9],
 14105                [5, 9],
 14106                [5, 9],
 14107                [5, 9],
 14108                [5, 9],
 14109                [5, 9],
 14110                [5, 9],
 14111                [5, 9],
 14112                [5, 9],
 14113                [5, 9],
 14114                [5, 9],
 14115                [5, 9],
 14116                [5, 9],
 14117                [6, 16],
 14118                [6, 16],
 14119                [6, 16],
 14120                [6, 16],
 14121                [6, 16],
 14122                [6, 16],
 14123                [6, 16],
 14124                [6, 16],
 14125                [6, 17],
 14126                [6, 17],
 14127                [6, 17],
 14128                [6, 17],
 14129                [6, 17],
 14130                [6, 17],
 14131                [6, 17],
 14132                [6, 17],
 14133                [4, 4],
 14134                [4, 4],
 14135                [4, 4],
 14136                [4, 4],
 14137                [4, 4],
 14138                [4, 4],
 14139                [4, 4],
 14140                [4, 4],
 14141                [4, 4],
 14142                [4, 4],
 14143                [4, 4],
 14144                [4, 4],
 14145                [4, 4],
 14146                [4, 4],
 14147                [4, 4],
 14148                [4, 4],
 14149                [4, 4],
 14150                [4, 4],
 14151                [4, 4],
 14152                [4, 4],
 14153                [4, 4],
 14154                [4, 4],
 14155                [4, 4],
 14156                [4, 4],
 14157                [4, 4],
 14158                [4, 4],
 14159                [4, 4],
 14160                [4, 4],
 14161                [4, 4],
 14162                [4, 4],
 14163                [4, 4],
 14164                [4, 4],
 14165                [4, 5],
 14166                [4, 5],
 14167                [4, 5],
 14168                [4, 5],
 14169                [4, 5],
 14170                [4, 5],
 14171                [4, 5],
 14172                [4, 5],
 14173                [4, 5],
 14174                [4, 5],
 14175                [4, 5],
 14176                [4, 5],
 14177                [4, 5],
 14178                [4, 5],
 14179                [4, 5],
 14180                [4, 5],
 14181                [4, 5],
 14182                [4, 5],
 14183                [4, 5],
 14184                [4, 5],
 14185                [4, 5],
 14186                [4, 5],
 14187                [4, 5],
 14188                [4, 5],
 14189                [4, 5],
 14190                [4, 5],
 14191                [4, 5],
 14192                [4, 5],
 14193                [4, 5],
 14194                [4, 5],
 14195                [4, 5],
 14196                [4, 5],
 14197                [6, 14],
 14198                [6, 14],
 14199                [6, 14],
 14200                [6, 14],
 14201                [6, 14],
 14202                [6, 14],
 14203                [6, 14],
 14204                [6, 14],
 14205                [6, 15],
 14206                [6, 15],
 14207                [6, 15],
 14208                [6, 15],
 14209                [6, 15],
 14210                [6, 15],
 14211                [6, 15],
 14212                [6, 15],
 14213                [5, 64],
 14214                [5, 64],
 14215                [5, 64],
 14216                [5, 64],
 14217                [5, 64],
 14218                [5, 64],
 14219                [5, 64],
 14220                [5, 64],
 14221                [5, 64],
 14222                [5, 64],
 14223                [5, 64],
 14224                [5, 64],
 14225                [5, 64],
 14226                [5, 64],
 14227                [5, 64],
 14228                [5, 64],
 14229                [4, 6],
 14230                [4, 6],
 14231                [4, 6],
 14232                [4, 6],
 14233                [4, 6],
 14234                [4, 6],
 14235                [4, 6],
 14236                [4, 6],
 14237                [4, 6],
 14238                [4, 6],
 14239                [4, 6],
 14240                [4, 6],
 14241                [4, 6],
 14242                [4, 6],
 14243                [4, 6],
 14244                [4, 6],
 14245                [4, 6],
 14246                [4, 6],
 14247                [4, 6],
 14248                [4, 6],
 14249                [4, 6],
 14250                [4, 6],
 14251                [4, 6],
 14252                [4, 6],
 14253                [4, 6],
 14254                [4, 6],
 14255                [4, 6],
 14256                [4, 6],
 14257                [4, 6],
 14258                [4, 6],
 14259                [4, 6],
 14260                [4, 6],
 14261                [4, 7],
 14262                [4, 7],
 14263                [4, 7],
 14264                [4, 7],
 14265                [4, 7],
 14266                [4, 7],
 14267                [4, 7],
 14268                [4, 7],
 14269                [4, 7],
 14270                [4, 7],
 14271                [4, 7],
 14272                [4, 7],
 14273                [4, 7],
 14274                [4, 7],
 14275                [4, 7],
 14276                [4, 7],
 14277                [4, 7],
 14278                [4, 7],
 14279                [4, 7],
 14280                [4, 7],
 14281                [4, 7],
 14282                [4, 7],
 14283                [4, 7],
 14284                [4, 7],
 14285                [4, 7],
 14286                [4, 7],
 14287                [4, 7],
 14288                [4, 7],
 14289                [4, 7],
 14290                [4, 7],
 14291                [4, 7],
 14292                [4, 7],
 14293              ],
 14294              c = [
 14295                [-1, -1],
 14296                [-1, -1],
 14297                [12, -2],
 14298                [12, -2],
 14299                [-1, -1],
 14300                [-1, -1],
 14301                [-1, -1],
 14302                [-1, -1],
 14303                [-1, -1],
 14304                [-1, -1],
 14305                [-1, -1],
 14306                [-1, -1],
 14307                [-1, -1],
 14308                [-1, -1],
 14309                [-1, -1],
 14310                [-1, -1],
 14311                [-1, -1],
 14312                [-1, -1],
 14313                [-1, -1],
 14314                [-1, -1],
 14315                [-1, -1],
 14316                [-1, -1],
 14317                [-1, -1],
 14318                [-1, -1],
 14319                [-1, -1],
 14320                [-1, -1],
 14321                [-1, -1],
 14322                [-1, -1],
 14323                [-1, -1],
 14324                [-1, -1],
 14325                [-1, -1],
 14326                [-1, -1],
 14327                [11, 1792],
 14328                [11, 1792],
 14329                [11, 1792],
 14330                [11, 1792],
 14331                [12, 1984],
 14332                [12, 1984],
 14333                [12, 2048],
 14334                [12, 2048],
 14335                [12, 2112],
 14336                [12, 2112],
 14337                [12, 2176],
 14338                [12, 2176],
 14339                [12, 2240],
 14340                [12, 2240],
 14341                [12, 2304],
 14342                [12, 2304],
 14343                [11, 1856],
 14344                [11, 1856],
 14345                [11, 1856],
 14346                [11, 1856],
 14347                [11, 1920],
 14348                [11, 1920],
 14349                [11, 1920],
 14350                [11, 1920],
 14351                [12, 2368],
 14352                [12, 2368],
 14353                [12, 2432],
 14354                [12, 2432],
 14355                [12, 2496],
 14356                [12, 2496],
 14357                [12, 2560],
 14358                [12, 2560],
 14359                [10, 18],
 14360                [10, 18],
 14361                [10, 18],
 14362                [10, 18],
 14363                [10, 18],
 14364                [10, 18],
 14365                [10, 18],
 14366                [10, 18],
 14367                [12, 52],
 14368                [12, 52],
 14369                [13, 640],
 14370                [13, 704],
 14371                [13, 768],
 14372                [13, 832],
 14373                [12, 55],
 14374                [12, 55],
 14375                [12, 56],
 14376                [12, 56],
 14377                [13, 1280],
 14378                [13, 1344],
 14379                [13, 1408],
 14380                [13, 1472],
 14381                [12, 59],
 14382                [12, 59],
 14383                [12, 60],
 14384                [12, 60],
 14385                [13, 1536],
 14386                [13, 1600],
 14387                [11, 24],
 14388                [11, 24],
 14389                [11, 24],
 14390                [11, 24],
 14391                [11, 25],
 14392                [11, 25],
 14393                [11, 25],
 14394                [11, 25],
 14395                [13, 1664],
 14396                [13, 1728],
 14397                [12, 320],
 14398                [12, 320],
 14399                [12, 384],
 14400                [12, 384],
 14401                [12, 448],
 14402                [12, 448],
 14403                [13, 512],
 14404                [13, 576],
 14405                [12, 53],
 14406                [12, 53],
 14407                [12, 54],
 14408                [12, 54],
 14409                [13, 896],
 14410                [13, 960],
 14411                [13, 1024],
 14412                [13, 1088],
 14413                [13, 1152],
 14414                [13, 1216],
 14415                [10, 64],
 14416                [10, 64],
 14417                [10, 64],
 14418                [10, 64],
 14419                [10, 64],
 14420                [10, 64],
 14421                [10, 64],
 14422                [10, 64],
 14423              ],
 14424              l = [
 14425                [8, 13],
 14426                [8, 13],
 14427                [8, 13],
 14428                [8, 13],
 14429                [8, 13],
 14430                [8, 13],
 14431                [8, 13],
 14432                [8, 13],
 14433                [8, 13],
 14434                [8, 13],
 14435                [8, 13],
 14436                [8, 13],
 14437                [8, 13],
 14438                [8, 13],
 14439                [8, 13],
 14440                [8, 13],
 14441                [11, 23],
 14442                [11, 23],
 14443                [12, 50],
 14444                [12, 51],
 14445                [12, 44],
 14446                [12, 45],
 14447                [12, 46],
 14448                [12, 47],
 14449                [12, 57],
 14450                [12, 58],
 14451                [12, 61],
 14452                [12, 256],
 14453                [10, 16],
 14454                [10, 16],
 14455                [10, 16],
 14456                [10, 16],
 14457                [10, 17],
 14458                [10, 17],
 14459                [10, 17],
 14460                [10, 17],
 14461                [12, 48],
 14462                [12, 49],
 14463                [12, 62],
 14464                [12, 63],
 14465                [12, 30],
 14466                [12, 31],
 14467                [12, 32],
 14468                [12, 33],
 14469                [12, 40],
 14470                [12, 41],
 14471                [11, 22],
 14472                [11, 22],
 14473                [8, 14],
 14474                [8, 14],
 14475                [8, 14],
 14476                [8, 14],
 14477                [8, 14],
 14478                [8, 14],
 14479                [8, 14],
 14480                [8, 14],
 14481                [8, 14],
 14482                [8, 14],
 14483                [8, 14],
 14484                [8, 14],
 14485                [8, 14],
 14486                [8, 14],
 14487                [8, 14],
 14488                [8, 14],
 14489                [7, 10],
 14490                [7, 10],
 14491                [7, 10],
 14492                [7, 10],
 14493                [7, 10],
 14494                [7, 10],
 14495                [7, 10],
 14496                [7, 10],
 14497                [7, 10],
 14498                [7, 10],
 14499                [7, 10],
 14500                [7, 10],
 14501                [7, 10],
 14502                [7, 10],
 14503                [7, 10],
 14504                [7, 10],
 14505                [7, 10],
 14506                [7, 10],
 14507                [7, 10],
 14508                [7, 10],
 14509                [7, 10],
 14510                [7, 10],
 14511                [7, 10],
 14512                [7, 10],
 14513                [7, 10],
 14514                [7, 10],
 14515                [7, 10],
 14516                [7, 10],
 14517                [7, 10],
 14518                [7, 10],
 14519                [7, 10],
 14520                [7, 10],
 14521                [7, 11],
 14522                [7, 11],
 14523                [7, 11],
 14524                [7, 11],
 14525                [7, 11],
 14526                [7, 11],
 14527                [7, 11],
 14528                [7, 11],
 14529                [7, 11],
 14530                [7, 11],
 14531                [7, 11],
 14532                [7, 11],
 14533                [7, 11],
 14534                [7, 11],
 14535                [7, 11],
 14536                [7, 11],
 14537                [7, 11],
 14538                [7, 11],
 14539                [7, 11],
 14540                [7, 11],
 14541                [7, 11],
 14542                [7, 11],
 14543                [7, 11],
 14544                [7, 11],
 14545                [7, 11],
 14546                [7, 11],
 14547                [7, 11],
 14548                [7, 11],
 14549                [7, 11],
 14550                [7, 11],
 14551                [7, 11],
 14552                [7, 11],
 14553                [9, 15],
 14554                [9, 15],
 14555                [9, 15],
 14556                [9, 15],
 14557                [9, 15],
 14558                [9, 15],
 14559                [9, 15],
 14560                [9, 15],
 14561                [12, 128],
 14562                [12, 192],
 14563                [12, 26],
 14564                [12, 27],
 14565                [12, 28],
 14566                [12, 29],
 14567                [11, 19],
 14568                [11, 19],
 14569                [11, 20],
 14570                [11, 20],
 14571                [12, 34],
 14572                [12, 35],
 14573                [12, 36],
 14574                [12, 37],
 14575                [12, 38],
 14576                [12, 39],
 14577                [11, 21],
 14578                [11, 21],
 14579                [12, 42],
 14580                [12, 43],
 14581                [10, 0],
 14582                [10, 0],
 14583                [10, 0],
 14584                [10, 0],
 14585                [7, 12],
 14586                [7, 12],
 14587                [7, 12],
 14588                [7, 12],
 14589                [7, 12],
 14590                [7, 12],
 14591                [7, 12],
 14592                [7, 12],
 14593                [7, 12],
 14594                [7, 12],
 14595                [7, 12],
 14596                [7, 12],
 14597                [7, 12],
 14598                [7, 12],
 14599                [7, 12],
 14600                [7, 12],
 14601                [7, 12],
 14602                [7, 12],
 14603                [7, 12],
 14604                [7, 12],
 14605                [7, 12],
 14606                [7, 12],
 14607                [7, 12],
 14608                [7, 12],
 14609                [7, 12],
 14610                [7, 12],
 14611                [7, 12],
 14612                [7, 12],
 14613                [7, 12],
 14614                [7, 12],
 14615                [7, 12],
 14616                [7, 12],
 14617              ],
 14618              h = [
 14619                [-1, -1],
 14620                [-1, -1],
 14621                [-1, -1],
 14622                [-1, -1],
 14623                [6, 9],
 14624                [6, 8],
 14625                [5, 7],
 14626                [5, 7],
 14627                [4, 6],
 14628                [4, 6],
 14629                [4, 6],
 14630                [4, 6],
 14631                [4, 5],
 14632                [4, 5],
 14633                [4, 5],
 14634                [4, 5],
 14635                [3, 1],
 14636                [3, 1],
 14637                [3, 1],
 14638                [3, 1],
 14639                [3, 1],
 14640                [3, 1],
 14641                [3, 1],
 14642                [3, 1],
 14643                [3, 4],
 14644                [3, 4],
 14645                [3, 4],
 14646                [3, 4],
 14647                [3, 4],
 14648                [3, 4],
 14649                [3, 4],
 14650                [3, 4],
 14651                [2, 3],
 14652                [2, 3],
 14653                [2, 3],
 14654                [2, 3],
 14655                [2, 3],
 14656                [2, 3],
 14657                [2, 3],
 14658                [2, 3],
 14659                [2, 3],
 14660                [2, 3],
 14661                [2, 3],
 14662                [2, 3],
 14663                [2, 3],
 14664                [2, 3],
 14665                [2, 3],
 14666                [2, 3],
 14667                [2, 2],
 14668                [2, 2],
 14669                [2, 2],
 14670                [2, 2],
 14671                [2, 2],
 14672                [2, 2],
 14673                [2, 2],
 14674                [2, 2],
 14675                [2, 2],
 14676                [2, 2],
 14677                [2, 2],
 14678                [2, 2],
 14679                [2, 2],
 14680                [2, 2],
 14681                [2, 2],
 14682                [2, 2],
 14683              ];
 14684            t.CCITTFaxDecoder = class CCITTFaxDecoder {
 14685              constructor(e, t = {}) {
 14686                if (!e || "function" != typeof e.next)
 14687                  throw new Error(
 14688                    'CCITTFaxDecoder - invalid "source" parameter.',
 14689                  );
 14690                this.source = e;
 14691                this.eof = !1;
 14692                this.encoding = t.K || 0;
 14693                this.eoline = t.EndOfLine || !1;
 14694                this.byteAlign = t.EncodedByteAlign || !1;
 14695                this.columns = t.Columns || 1728;
 14696                this.rows = t.Rows || 0;
 14697                this.eoblock = t.EndOfBlock ?? !0;
 14698                this.black = t.BlackIs1 || !1;
 14699                this.codingLine = new Uint32Array(this.columns + 1);
 14700                this.refLine = new Uint32Array(this.columns + 2);
 14701                this.codingLine[0] = this.columns;
 14702                this.codingPos = 0;
 14703                this.row = 0;
 14704                this.nextLine2D = this.encoding < 0;
 14705                this.inputBits = 0;
 14706                this.inputBuf = 0;
 14707                this.outputBits = 0;
 14708                this.rowsDone = !1;
 14709                let a;
 14710                for (; 0 === (a = this._lookBits(12)); ) this._eatBits(1);
 14711                1 === a && this._eatBits(12);
 14712                if (this.encoding > 0) {
 14713                  this.nextLine2D = !this._lookBits(1);
 14714                  this._eatBits(1);
 14715                }
 14716              }
 14717              readNextChar() {
 14718                if (this.eof) return -1;
 14719                const e = this.refLine,
 14720                  t = this.codingLine,
 14721                  a = this.columns;
 14722                let i, s, o, c, l;
 14723                if (0 === this.outputBits) {
 14724                  this.rowsDone && (this.eof = !0);
 14725                  if (this.eof) return -1;
 14726                  this.err = !1;
 14727                  let o, l, h;
 14728                  if (this.nextLine2D) {
 14729                    for (c = 0; t[c] < a; ++c) e[c] = t[c];
 14730                    e[c++] = a;
 14731                    e[c] = a;
 14732                    t[0] = 0;
 14733                    this.codingPos = 0;
 14734                    i = 0;
 14735                    s = 0;
 14736                    for (; t[this.codingPos] < a; ) {
 14737                      o = this._getTwoDimCode();
 14738                      switch (o) {
 14739                        case 0:
 14740                          this._addPixels(e[i + 1], s);
 14741                          e[i + 1] < a && (i += 2);
 14742                          break;
 14743                        case 1:
 14744                          o = l = 0;
 14745                          if (s) {
 14746                            do {
 14747                              o += h = this._getBlackCode();
 14748                            } while (h >= 64);
 14749                            do {
 14750                              l += h = this._getWhiteCode();
 14751                            } while (h >= 64);
 14752                          } else {
 14753                            do {
 14754                              o += h = this._getWhiteCode();
 14755                            } while (h >= 64);
 14756                            do {
 14757                              l += h = this._getBlackCode();
 14758                            } while (h >= 64);
 14759                          }
 14760                          this._addPixels(t[this.codingPos] + o, s);
 14761                          t[this.codingPos] < a &&
 14762                            this._addPixels(t[this.codingPos] + l, 1 ^ s);
 14763                          for (; e[i] <= t[this.codingPos] && e[i] < a; ) i += 2;
 14764                          break;
 14765                        case 7:
 14766                          this._addPixels(e[i] + 3, s);
 14767                          s ^= 1;
 14768                          if (t[this.codingPos] < a) {
 14769                            ++i;
 14770                            for (; e[i] <= t[this.codingPos] && e[i] < a; )
 14771                              i += 2;
 14772                          }
 14773                          break;
 14774                        case 5:
 14775                          this._addPixels(e[i] + 2, s);
 14776                          s ^= 1;
 14777                          if (t[this.codingPos] < a) {
 14778                            ++i;
 14779                            for (; e[i] <= t[this.codingPos] && e[i] < a; )
 14780                              i += 2;
 14781                          }
 14782                          break;
 14783                        case 3:
 14784                          this._addPixels(e[i] + 1, s);
 14785                          s ^= 1;
 14786                          if (t[this.codingPos] < a) {
 14787                            ++i;
 14788                            for (; e[i] <= t[this.codingPos] && e[i] < a; )
 14789                              i += 2;
 14790                          }
 14791                          break;
 14792                        case 2:
 14793                          this._addPixels(e[i], s);
 14794                          s ^= 1;
 14795                          if (t[this.codingPos] < a) {
 14796                            ++i;
 14797                            for (; e[i] <= t[this.codingPos] && e[i] < a; )
 14798                              i += 2;
 14799                          }
 14800                          break;
 14801                        case 8:
 14802                          this._addPixelsNeg(e[i] - 3, s);
 14803                          s ^= 1;
 14804                          if (t[this.codingPos] < a) {
 14805                            i > 0 ? --i : ++i;
 14806                            for (; e[i] <= t[this.codingPos] && e[i] < a; )
 14807                              i += 2;
 14808                          }
 14809                          break;
 14810                        case 6:
 14811                          this._addPixelsNeg(e[i] - 2, s);
 14812                          s ^= 1;
 14813                          if (t[this.codingPos] < a) {
 14814                            i > 0 ? --i : ++i;
 14815                            for (; e[i] <= t[this.codingPos] && e[i] < a; )
 14816                              i += 2;
 14817                          }
 14818                          break;
 14819                        case 4:
 14820                          this._addPixelsNeg(e[i] - 1, s);
 14821                          s ^= 1;
 14822                          if (t[this.codingPos] < a) {
 14823                            i > 0 ? --i : ++i;
 14824                            for (; e[i] <= t[this.codingPos] && e[i] < a; )
 14825                              i += 2;
 14826                          }
 14827                          break;
 14828                        case n:
 14829                          this._addPixels(a, 0);
 14830                          this.eof = !0;
 14831                          break;
 14832                        default:
 14833                          (0, r.info)("bad 2d code");
 14834                          this._addPixels(a, 0);
 14835                          this.err = !0;
 14836                      }
 14837                    }
 14838                  } else {
 14839                    t[0] = 0;
 14840                    this.codingPos = 0;
 14841                    s = 0;
 14842                    for (; t[this.codingPos] < a; ) {
 14843                      o = 0;
 14844                      if (s)
 14845                        do {
 14846                          o += h = this._getBlackCode();
 14847                        } while (h >= 64);
 14848                      else
 14849                        do {
 14850                          o += h = this._getWhiteCode();
 14851                        } while (h >= 64);
 14852                      this._addPixels(t[this.codingPos] + o, s);
 14853                      s ^= 1;
 14854                    }
 14855                  }
 14856                  let u = !1;
 14857                  this.byteAlign && (this.inputBits &= -8);
 14858                  if (this.eoblock || this.row !== this.rows - 1) {
 14859                    o = this._lookBits(12);
 14860                    if (this.eoline)
 14861                      for (; o !== n && 1 !== o; ) {
 14862                        this._eatBits(1);
 14863                        o = this._lookBits(12);
 14864                      }
 14865                    else
 14866                      for (; 0 === o; ) {
 14867                        this._eatBits(1);
 14868                        o = this._lookBits(12);
 14869                      }
 14870                    if (1 === o) {
 14871                      this._eatBits(12);
 14872                      u = !0;
 14873                    } else o === n && (this.eof = !0);
 14874                  } else this.rowsDone = !0;
 14875                  if (!this.eof && this.encoding > 0 && !this.rowsDone) {
 14876                    this.nextLine2D = !this._lookBits(1);
 14877                    this._eatBits(1);
 14878                  }
 14879                  if (this.eoblock && u && this.byteAlign) {
 14880                    o = this._lookBits(12);
 14881                    if (1 === o) {
 14882                      this._eatBits(12);
 14883                      if (this.encoding > 0) {
 14884                        this._lookBits(1);
 14885                        this._eatBits(1);
 14886                      }
 14887                      if (this.encoding >= 0)
 14888                        for (c = 0; c < 4; ++c) {
 14889                          o = this._lookBits(12);
 14890                          1 !== o && (0, r.info)("bad rtc code: " + o);
 14891                          this._eatBits(12);
 14892                          if (this.encoding > 0) {
 14893                            this._lookBits(1);
 14894                            this._eatBits(1);
 14895                          }
 14896                        }
 14897                      this.eof = !0;
 14898                    }
 14899                  } else if (this.err && this.eoline) {
 14900                    for (;;) {
 14901                      o = this._lookBits(13);
 14902                      if (o === n) {
 14903                        this.eof = !0;
 14904                        return -1;
 14905                      }
 14906                      if (o >> 1 == 1) break;
 14907                      this._eatBits(1);
 14908                    }
 14909                    this._eatBits(12);
 14910                    if (this.encoding > 0) {
 14911                      this._eatBits(1);
 14912                      this.nextLine2D = !(1 & o);
 14913                    }
 14914                  }
 14915                  this.outputBits =
 14916                    t[0] > 0 ? t[(this.codingPos = 0)] : t[(this.codingPos = 1)];
 14917                  this.row++;
 14918                }
 14919                if (this.outputBits >= 8) {
 14920                  l = 1 & this.codingPos ? 0 : 255;
 14921                  this.outputBits -= 8;
 14922                  if (0 === this.outputBits && t[this.codingPos] < a) {
 14923                    this.codingPos++;
 14924                    this.outputBits = t[this.codingPos] - t[this.codingPos - 1];
 14925                  }
 14926                } else {
 14927                  o = 8;
 14928                  l = 0;
 14929                  do {
 14930                    if ("number" != typeof this.outputBits)
 14931                      throw new r.FormatError(
 14932                        'Invalid /CCITTFaxDecode data, "outputBits" must be a number.',
 14933                      );
 14934                    if (this.outputBits > o) {
 14935                      l <<= o;
 14936                      1 & this.codingPos || (l |= 255 >> (8 - o));
 14937                      this.outputBits -= o;
 14938                      o = 0;
 14939                    } else {
 14940                      l <<= this.outputBits;
 14941                      1 & this.codingPos || (l |= 255 >> (8 - this.outputBits));
 14942                      o -= this.outputBits;
 14943                      this.outputBits = 0;
 14944                      if (t[this.codingPos] < a) {
 14945                        this.codingPos++;
 14946                        this.outputBits =
 14947                          t[this.codingPos] - t[this.codingPos - 1];
 14948                      } else if (o > 0) {
 14949                        l <<= o;
 14950                        o = 0;
 14951                      }
 14952                    }
 14953                  } while (o);
 14954                }
 14955                this.black && (l ^= 255);
 14956                return l;
 14957              }
 14958              _addPixels(e, t) {
 14959                const a = this.codingLine;
 14960                let n = this.codingPos;
 14961                if (e > a[n]) {
 14962                  if (e > this.columns) {
 14963                    (0, r.info)("row is wrong length");
 14964                    this.err = !0;
 14965                    e = this.columns;
 14966                  }
 14967                  (1 & n) ^ t && ++n;
 14968                  a[n] = e;
 14969                }
 14970                this.codingPos = n;
 14971              }
 14972              _addPixelsNeg(e, t) {
 14973                const a = this.codingLine;
 14974                let n = this.codingPos;
 14975                if (e > a[n]) {
 14976                  if (e > this.columns) {
 14977                    (0, r.info)("row is wrong length");
 14978                    this.err = !0;
 14979                    e = this.columns;
 14980                  }
 14981                  (1 & n) ^ t && ++n;
 14982                  a[n] = e;
 14983                } else if (e < a[n]) {
 14984                  if (e < 0) {
 14985                    (0, r.info)("invalid code");
 14986                    this.err = !0;
 14987                    e = 0;
 14988                  }
 14989                  for (; n > 0 && e < a[n - 1]; ) --n;
 14990                  a[n] = e;
 14991                }
 14992                this.codingPos = n;
 14993              }
 14994              _findTableCode(e, t, a, r) {
 14995                const i = r || 0;
 14996                for (let r = e; r <= t; ++r) {
 14997                  let e = this._lookBits(r);
 14998                  if (e === n) return [!0, 1, !1];
 14999                  r < t && (e <<= t - r);
 15000                  if (!i || e >= i) {
 15001                    const t = a[e - i];
 15002                    if (t[0] === r) {
 15003                      this._eatBits(r);
 15004                      return [!0, t[1], !0];
 15005                    }
 15006                  }
 15007                }
 15008                return [!1, 0, !1];
 15009              }
 15010              _getTwoDimCode() {
 15011                let e,
 15012                  t = 0;
 15013                if (this.eoblock) {
 15014                  t = this._lookBits(7);
 15015                  e = i[t];
 15016                  if (e?.[0] > 0) {
 15017                    this._eatBits(e[0]);
 15018                    return e[1];
 15019                  }
 15020                } else {
 15021                  const e = this._findTableCode(1, 7, i);
 15022                  if (e[0] && e[2]) return e[1];
 15023                }
 15024                (0, r.info)("Bad two dim code");
 15025                return n;
 15026              }
 15027              _getWhiteCode() {
 15028                let e,
 15029                  t = 0;
 15030                if (this.eoblock) {
 15031                  t = this._lookBits(12);
 15032                  if (t === n) return 1;
 15033                  e = t >> 5 == 0 ? s[t] : o[t >> 3];
 15034                  if (e[0] > 0) {
 15035                    this._eatBits(e[0]);
 15036                    return e[1];
 15037                  }
 15038                } else {
 15039                  let e = this._findTableCode(1, 9, o);
 15040                  if (e[0]) return e[1];
 15041                  e = this._findTableCode(11, 12, s);
 15042                  if (e[0]) return e[1];
 15043                }
 15044                (0, r.info)("bad white code");
 15045                this._eatBits(1);
 15046                return 1;
 15047              }
 15048              _getBlackCode() {
 15049                let e, t;
 15050                if (this.eoblock) {
 15051                  e = this._lookBits(13);
 15052                  if (e === n) return 1;
 15053                  t =
 15054                    e >> 7 == 0
 15055                      ? c[e]
 15056                      : e >> 9 == 0 && e >> 7 != 0
 15057                        ? l[(e >> 1) - 64]
 15058                        : h[e >> 7];
 15059                  if (t[0] > 0) {
 15060                    this._eatBits(t[0]);
 15061                    return t[1];
 15062                  }
 15063                } else {
 15064                  let e = this._findTableCode(2, 6, h);
 15065                  if (e[0]) return e[1];
 15066                  e = this._findTableCode(7, 12, l, 64);
 15067                  if (e[0]) return e[1];
 15068                  e = this._findTableCode(10, 13, c);
 15069                  if (e[0]) return e[1];
 15070                }
 15071                (0, r.info)("bad black code");
 15072                this._eatBits(1);
 15073                return 1;
 15074              }
 15075              _lookBits(e) {
 15076                let t;
 15077                for (; this.inputBits < e; ) {
 15078                  if (-1 === (t = this.source.next()))
 15079                    return 0 === this.inputBits
 15080                      ? n
 15081                      : (this.inputBuf << (e - this.inputBits)) &
 15082                          (65535 >> (16 - e));
 15083                  this.inputBuf = (this.inputBuf << 8) | t;
 15084                  this.inputBits += 8;
 15085                }
 15086                return (
 15087                  (this.inputBuf >> (this.inputBits - e)) & (65535 >> (16 - e))
 15088                );
 15089              }
 15090              _eatBits(e) {
 15091                (this.inputBits -= e) < 0 && (this.inputBits = 0);
 15092              }
 15093            };
 15094          },
 15095          (e, t, a) => {
 15096            Object.defineProperty(t, "__esModule", { value: !0 });
 15097            t.FlateStream = void 0;
 15098            var r = a(18),
 15099              n = a(2);
 15100            const i = new Int32Array([
 15101                16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15,
 15102              ]),
 15103              s = new Int32Array([
 15104                3, 4, 5, 6, 7, 8, 9, 10, 65547, 65549, 65551, 65553, 131091,
 15105                131095, 131099, 131103, 196643, 196651, 196659, 196667, 262211,
 15106                262227, 262243, 262259, 327811, 327843, 327875, 327907, 258, 258,
 15107                258,
 15108              ]),
 15109              o = new Int32Array([
 15110                1, 2, 3, 4, 65541, 65543, 131081, 131085, 196625, 196633, 262177,
 15111                262193, 327745, 327777, 393345, 393409, 459009, 459137, 524801,
 15112                525057, 590849, 591361, 657409, 658433, 724993, 727041, 794625,
 15113                798721, 868353, 876545,
 15114              ]),
 15115              c = [
 15116                new Int32Array([
 15117                  459008, 524368, 524304, 524568, 459024, 524400, 524336, 590016,
 15118                  459016, 524384, 524320, 589984, 524288, 524416, 524352, 590048,
 15119                  459012, 524376, 524312, 589968, 459028, 524408, 524344, 590032,
 15120                  459020, 524392, 524328, 59e4, 524296, 524424, 524360, 590064,
 15121                  459010, 524372, 524308, 524572, 459026, 524404, 524340, 590024,
 15122                  459018, 524388, 524324, 589992, 524292, 524420, 524356, 590056,
 15123                  459014, 524380, 524316, 589976, 459030, 524412, 524348, 590040,
 15124                  459022, 524396, 524332, 590008, 524300, 524428, 524364, 590072,
 15125                  459009, 524370, 524306, 524570, 459025, 524402, 524338, 590020,
 15126                  459017, 524386, 524322, 589988, 524290, 524418, 524354, 590052,
 15127                  459013, 524378, 524314, 589972, 459029, 524410, 524346, 590036,
 15128                  459021, 524394, 524330, 590004, 524298, 524426, 524362, 590068,
 15129                  459011, 524374, 524310, 524574, 459027, 524406, 524342, 590028,
 15130                  459019, 524390, 524326, 589996, 524294, 524422, 524358, 590060,
 15131                  459015, 524382, 524318, 589980, 459031, 524414, 524350, 590044,
 15132                  459023, 524398, 524334, 590012, 524302, 524430, 524366, 590076,
 15133                  459008, 524369, 524305, 524569, 459024, 524401, 524337, 590018,
 15134                  459016, 524385, 524321, 589986, 524289, 524417, 524353, 590050,
 15135                  459012, 524377, 524313, 589970, 459028, 524409, 524345, 590034,
 15136                  459020, 524393, 524329, 590002, 524297, 524425, 524361, 590066,
 15137                  459010, 524373, 524309, 524573, 459026, 524405, 524341, 590026,
 15138                  459018, 524389, 524325, 589994, 524293, 524421, 524357, 590058,
 15139                  459014, 524381, 524317, 589978, 459030, 524413, 524349, 590042,
 15140                  459022, 524397, 524333, 590010, 524301, 524429, 524365, 590074,
 15141                  459009, 524371, 524307, 524571, 459025, 524403, 524339, 590022,
 15142                  459017, 524387, 524323, 589990, 524291, 524419, 524355, 590054,
 15143                  459013, 524379, 524315, 589974, 459029, 524411, 524347, 590038,
 15144                  459021, 524395, 524331, 590006, 524299, 524427, 524363, 590070,
 15145                  459011, 524375, 524311, 524575, 459027, 524407, 524343, 590030,
 15146                  459019, 524391, 524327, 589998, 524295, 524423, 524359, 590062,
 15147                  459015, 524383, 524319, 589982, 459031, 524415, 524351, 590046,
 15148                  459023, 524399, 524335, 590014, 524303, 524431, 524367, 590078,
 15149                  459008, 524368, 524304, 524568, 459024, 524400, 524336, 590017,
 15150                  459016, 524384, 524320, 589985, 524288, 524416, 524352, 590049,
 15151                  459012, 524376, 524312, 589969, 459028, 524408, 524344, 590033,
 15152                  459020, 524392, 524328, 590001, 524296, 524424, 524360, 590065,
 15153                  459010, 524372, 524308, 524572, 459026, 524404, 524340, 590025,
 15154                  459018, 524388, 524324, 589993, 524292, 524420, 524356, 590057,
 15155                  459014, 524380, 524316, 589977, 459030, 524412, 524348, 590041,
 15156                  459022, 524396, 524332, 590009, 524300, 524428, 524364, 590073,
 15157                  459009, 524370, 524306, 524570, 459025, 524402, 524338, 590021,
 15158                  459017, 524386, 524322, 589989, 524290, 524418, 524354, 590053,
 15159                  459013, 524378, 524314, 589973, 459029, 524410, 524346, 590037,
 15160                  459021, 524394, 524330, 590005, 524298, 524426, 524362, 590069,
 15161                  459011, 524374, 524310, 524574, 459027, 524406, 524342, 590029,
 15162                  459019, 524390, 524326, 589997, 524294, 524422, 524358, 590061,
 15163                  459015, 524382, 524318, 589981, 459031, 524414, 524350, 590045,
 15164                  459023, 524398, 524334, 590013, 524302, 524430, 524366, 590077,
 15165                  459008, 524369, 524305, 524569, 459024, 524401, 524337, 590019,
 15166                  459016, 524385, 524321, 589987, 524289, 524417, 524353, 590051,
 15167                  459012, 524377, 524313, 589971, 459028, 524409, 524345, 590035,
 15168                  459020, 524393, 524329, 590003, 524297, 524425, 524361, 590067,
 15169                  459010, 524373, 524309, 524573, 459026, 524405, 524341, 590027,
 15170                  459018, 524389, 524325, 589995, 524293, 524421, 524357, 590059,
 15171                  459014, 524381, 524317, 589979, 459030, 524413, 524349, 590043,
 15172                  459022, 524397, 524333, 590011, 524301, 524429, 524365, 590075,
 15173                  459009, 524371, 524307, 524571, 459025, 524403, 524339, 590023,
 15174                  459017, 524387, 524323, 589991, 524291, 524419, 524355, 590055,
 15175                  459013, 524379, 524315, 589975, 459029, 524411, 524347, 590039,
 15176                  459021, 524395, 524331, 590007, 524299, 524427, 524363, 590071,
 15177                  459011, 524375, 524311, 524575, 459027, 524407, 524343, 590031,
 15178                  459019, 524391, 524327, 589999, 524295, 524423, 524359, 590063,
 15179                  459015, 524383, 524319, 589983, 459031, 524415, 524351, 590047,
 15180                  459023, 524399, 524335, 590015, 524303, 524431, 524367, 590079,
 15181                ]),
 15182                9,
 15183              ],
 15184              l = [
 15185                new Int32Array([
 15186                  327680, 327696, 327688, 327704, 327684, 327700, 327692, 327708,
 15187                  327682, 327698, 327690, 327706, 327686, 327702, 327694, 0,
 15188                  327681, 327697, 327689, 327705, 327685, 327701, 327693, 327709,
 15189                  327683, 327699, 327691, 327707, 327687, 327703, 327695, 0,
 15190                ]),
 15191                5,
 15192              ];
 15193            class FlateStream extends r.DecodeStream {
 15194              constructor(e, t) {
 15195                super(t);
 15196                this.str = e;
 15197                this.dict = e.dict;
 15198                const a = e.getByte(),
 15199                  r = e.getByte();
 15200                if (-1 === a || -1 === r)
 15201                  throw new n.FormatError(
 15202                    `Invalid header in flate stream: ${a}, ${r}`,
 15203                  );
 15204                if (8 != (15 & a))
 15205                  throw new n.FormatError(
 15206                    `Unknown compression method in flate stream: ${a}, ${r}`,
 15207                  );
 15208                if (((a << 8) + r) % 31 != 0)
 15209                  throw new n.FormatError(
 15210                    `Bad FCHECK in flate stream: ${a}, ${r}`,
 15211                  );
 15212                if (32 & r)
 15213                  throw new n.FormatError(
 15214                    `FDICT bit set in flate stream: ${a}, ${r}`,
 15215                  );
 15216                this.codeSize = 0;
 15217                this.codeBuf = 0;
 15218              }
 15219              getBits(e) {
 15220                const t = this.str;
 15221                let a,
 15222                  r = this.codeSize,
 15223                  i = this.codeBuf;
 15224                for (; r < e; ) {
 15225                  if (-1 === (a = t.getByte()))
 15226                    throw new n.FormatError("Bad encoding in flate stream");
 15227                  i |= a << r;
 15228                  r += 8;
 15229                }
 15230                a = i & ((1 << e) - 1);
 15231                this.codeBuf = i >> e;
 15232                this.codeSize = r -= e;
 15233                return a;
 15234              }
 15235              getCode(e) {
 15236                const t = this.str,
 15237                  a = e[0],
 15238                  r = e[1];
 15239                let i,
 15240                  s = this.codeSize,
 15241                  o = this.codeBuf;
 15242                for (; s < r && -1 !== (i = t.getByte()); ) {
 15243                  o |= i << s;
 15244                  s += 8;
 15245                }
 15246                const c = a[o & ((1 << r) - 1)],
 15247                  l = c >> 16,
 15248                  h = 65535 & c;
 15249                if (l < 1 || s < l)
 15250                  throw new n.FormatError("Bad encoding in flate stream");
 15251                this.codeBuf = o >> l;
 15252                this.codeSize = s - l;
 15253                return h;
 15254              }
 15255              generateHuffmanTable(e) {
 15256                const t = e.length;
 15257                let a,
 15258                  r = 0;
 15259                for (a = 0; a < t; ++a) e[a] > r && (r = e[a]);
 15260                const n = 1 << r,
 15261                  i = new Int32Array(n);
 15262                for (let s = 1, o = 0, c = 2; s <= r; ++s, o <<= 1, c <<= 1)
 15263                  for (let r = 0; r < t; ++r)
 15264                    if (e[r] === s) {
 15265                      let e = 0,
 15266                        t = o;
 15267                      for (a = 0; a < s; ++a) {
 15268                        e = (e << 1) | (1 & t);
 15269                        t >>= 1;
 15270                      }
 15271                      for (a = e; a < n; a += c) i[a] = (s << 16) | r;
 15272                      ++o;
 15273                    }
 15274                return [i, r];
 15275              }
 15276              readBlock() {
 15277                let e, t;
 15278                const a = this.str;
 15279                let r,
 15280                  h,
 15281                  u = this.getBits(3);
 15282                1 & u && (this.eof = !0);
 15283                u >>= 1;
 15284                if (0 === u) {
 15285                  let t;
 15286                  if (-1 === (t = a.getByte()))
 15287                    throw new n.FormatError("Bad block header in flate stream");
 15288                  let r = t;
 15289                  if (-1 === (t = a.getByte()))
 15290                    throw new n.FormatError("Bad block header in flate stream");
 15291                  r |= t << 8;
 15292                  if (-1 === (t = a.getByte()))
 15293                    throw new n.FormatError("Bad block header in flate stream");
 15294                  let i = t;
 15295                  if (-1 === (t = a.getByte()))
 15296                    throw new n.FormatError("Bad block header in flate stream");
 15297                  i |= t << 8;
 15298                  if (i !== (65535 & ~r) && (0 !== r || 0 !== i))
 15299                    throw new n.FormatError(
 15300                      "Bad uncompressed block length in flate stream",
 15301                    );
 15302                  this.codeBuf = 0;
 15303                  this.codeSize = 0;
 15304                  const s = this.bufferLength,
 15305                    o = s + r;
 15306                  e = this.ensureBuffer(o);
 15307                  this.bufferLength = o;
 15308                  if (0 === r) -1 === a.peekByte() && (this.eof = !0);
 15309                  else {
 15310                    const t = a.getBytes(r);
 15311                    e.set(t, s);
 15312                    t.length < r && (this.eof = !0);
 15313                  }
 15314                  return;
 15315                }
 15316                if (1 === u) {
 15317                  r = c;
 15318                  h = l;
 15319                } else {
 15320                  if (2 !== u)
 15321                    throw new n.FormatError("Unknown block type in flate stream");
 15322                  {
 15323                    const e = this.getBits(5) + 257,
 15324                      a = this.getBits(5) + 1,
 15325                      n = this.getBits(4) + 4,
 15326                      s = new Uint8Array(i.length);
 15327                    let o;
 15328                    for (o = 0; o < n; ++o) s[i[o]] = this.getBits(3);
 15329                    const c = this.generateHuffmanTable(s);
 15330                    t = 0;
 15331                    o = 0;
 15332                    const l = e + a,
 15333                      u = new Uint8Array(l);
 15334                    let d, f, g;
 15335                    for (; o < l; ) {
 15336                      const e = this.getCode(c);
 15337                      if (16 === e) {
 15338                        d = 2;
 15339                        f = 3;
 15340                        g = t;
 15341                      } else if (17 === e) {
 15342                        d = 3;
 15343                        f = 3;
 15344                        g = t = 0;
 15345                      } else {
 15346                        if (18 !== e) {
 15347                          u[o++] = t = e;
 15348                          continue;
 15349                        }
 15350                        d = 7;
 15351                        f = 11;
 15352                        g = t = 0;
 15353                      }
 15354                      let a = this.getBits(d) + f;
 15355                      for (; a-- > 0; ) u[o++] = g;
 15356                    }
 15357                    r = this.generateHuffmanTable(u.subarray(0, e));
 15358                    h = this.generateHuffmanTable(u.subarray(e, l));
 15359                  }
 15360                }
 15361                e = this.buffer;
 15362                let d = e ? e.length : 0,
 15363                  f = this.bufferLength;
 15364                for (;;) {
 15365                  let a = this.getCode(r);
 15366                  if (a < 256) {
 15367                    if (f + 1 >= d) {
 15368                      e = this.ensureBuffer(f + 1);
 15369                      d = e.length;
 15370                    }
 15371                    e[f++] = a;
 15372                    continue;
 15373                  }
 15374                  if (256 === a) {
 15375                    this.bufferLength = f;
 15376                    return;
 15377                  }
 15378                  a -= 257;
 15379                  a = s[a];
 15380                  let n = a >> 16;
 15381                  n > 0 && (n = this.getBits(n));
 15382                  t = (65535 & a) + n;
 15383                  a = this.getCode(h);
 15384                  a = o[a];
 15385                  n = a >> 16;
 15386                  n > 0 && (n = this.getBits(n));
 15387                  const i = (65535 & a) + n;
 15388                  if (f + t >= d) {
 15389                    e = this.ensureBuffer(f + t);
 15390                    d = e.length;
 15391                  }
 15392                  for (let a = 0; a < t; ++a, ++f) e[f] = e[f - i];
 15393                }
 15394              }
 15395            }
 15396            t.FlateStream = FlateStream;
 15397          },
 15398          (e, t, a) => {
 15399            Object.defineProperty(t, "__esModule", { value: !0 });
 15400            t.Jbig2Stream = void 0;
 15401            var r = a(5),
 15402              n = a(18),
 15403              i = a(4),
 15404              s = a(24),
 15405              o = a(2);
 15406            class Jbig2Stream extends n.DecodeStream {
 15407              constructor(e, t, a) {
 15408                super(t);
 15409                this.stream = e;
 15410                this.dict = e.dict;
 15411                this.maybeLength = t;
 15412                this.params = a;
 15413              }
 15414              get bytes() {
 15415                return (0, o.shadow)(
 15416                  this,
 15417                  "bytes",
 15418                  this.stream.getBytes(this.maybeLength),
 15419                );
 15420              }
 15421              ensureBuffer(e) {}
 15422              readBlock() {
 15423                if (this.eof) return;
 15424                const e = new s.Jbig2Image(),
 15425                  t = [];
 15426                if (this.params instanceof i.Dict) {
 15427                  const e = this.params.get("JBIG2Globals");
 15428                  if (e instanceof r.BaseStream) {
 15429                    const a = e.getBytes();
 15430                    t.push({ data: a, start: 0, end: a.length });
 15431                  }
 15432                }
 15433                t.push({ data: this.bytes, start: 0, end: this.bytes.length });
 15434                const a = e.parseChunks(t),
 15435                  n = a.length;
 15436                for (let e = 0; e < n; e++) a[e] ^= 255;
 15437                this.buffer = a;
 15438                this.bufferLength = n;
 15439                this.eof = !0;
 15440              }
 15441            }
 15442            t.Jbig2Stream = Jbig2Stream;
 15443          },
 15444          (e, t, a) => {
 15445            Object.defineProperty(t, "__esModule", { value: !0 });
 15446            t.Jbig2Image = void 0;
 15447            var r = a(2),
 15448              n = a(3),
 15449              i = a(25),
 15450              s = a(21);
 15451            class Jbig2Error extends r.BaseException {
 15452              constructor(e) {
 15453                super(`JBIG2 error: ${e}`, "Jbig2Error");
 15454              }
 15455            }
 15456            class ContextCache {
 15457              getContexts(e) {
 15458                return e in this ? this[e] : (this[e] = new Int8Array(65536));
 15459              }
 15460            }
 15461            class DecodingContext {
 15462              constructor(e, t, a) {
 15463                this.data = e;
 15464                this.start = t;
 15465                this.end = a;
 15466              }
 15467              get decoder() {
 15468                const e = new i.ArithmeticDecoder(
 15469                  this.data,
 15470                  this.start,
 15471                  this.end,
 15472                );
 15473                return (0, r.shadow)(this, "decoder", e);
 15474              }
 15475              get contextCache() {
 15476                const e = new ContextCache();
 15477                return (0, r.shadow)(this, "contextCache", e);
 15478              }
 15479            }
 15480            const o = 2 ** 31 - 1,
 15481              c = -(2 ** 31);
 15482            function decodeInteger(e, t, a) {
 15483              const r = e.getContexts(t);
 15484              let n = 1;
 15485              function readBits(e) {
 15486                let t = 0;
 15487                for (let i = 0; i < e; i++) {
 15488                  const e = a.readBit(r, n);
 15489                  n = n < 256 ? (n << 1) | e : (511 & ((n << 1) | e)) | 256;
 15490                  t = (t << 1) | e;
 15491                }
 15492                return t >>> 0;
 15493              }
 15494              const i = readBits(1),
 15495                s = readBits(1)
 15496                  ? readBits(1)
 15497                    ? readBits(1)
 15498                      ? readBits(1)
 15499                        ? readBits(1)
 15500                          ? readBits(32) + 4436
 15501                          : readBits(12) + 340
 15502                        : readBits(8) + 84
 15503                      : readBits(6) + 20
 15504                    : readBits(4) + 4
 15505                  : readBits(2);
 15506              let l;
 15507              0 === i ? (l = s) : s > 0 && (l = -s);
 15508              return l >= c && l <= o ? l : null;
 15509            }
 15510            function decodeIAID(e, t, a) {
 15511              const r = e.getContexts("IAID");
 15512              let n = 1;
 15513              for (let e = 0; e < a; e++) {
 15514                n = (n << 1) | t.readBit(r, n);
 15515              }
 15516              return a < 31 ? n & ((1 << a) - 1) : 2147483647 & n;
 15517            }
 15518            const l = [
 15519                "SymbolDictionary",
 15520                null,
 15521                null,
 15522                null,
 15523                "IntermediateTextRegion",
 15524                null,
 15525                "ImmediateTextRegion",
 15526                "ImmediateLosslessTextRegion",
 15527                null,
 15528                null,
 15529                null,
 15530                null,
 15531                null,
 15532                null,
 15533                null,
 15534                null,
 15535                "PatternDictionary",
 15536                null,
 15537                null,
 15538                null,
 15539                "IntermediateHalftoneRegion",
 15540                null,
 15541                "ImmediateHalftoneRegion",
 15542                "ImmediateLosslessHalftoneRegion",
 15543                null,
 15544                null,
 15545                null,
 15546                null,
 15547                null,
 15548                null,
 15549                null,
 15550                null,
 15551                null,
 15552                null,
 15553                null,
 15554                null,
 15555                "IntermediateGenericRegion",
 15556                null,
 15557                "ImmediateGenericRegion",
 15558                "ImmediateLosslessGenericRegion",
 15559                "IntermediateGenericRefinementRegion",
 15560                null,
 15561                "ImmediateGenericRefinementRegion",
 15562                "ImmediateLosslessGenericRefinementRegion",
 15563                null,
 15564                null,
 15565                null,
 15566                null,
 15567                "PageInformation",
 15568                "EndOfPage",
 15569                "EndOfStripe",
 15570                "EndOfFile",
 15571                "Profiles",
 15572                "Tables",
 15573                null,
 15574                null,
 15575                null,
 15576                null,
 15577                null,
 15578                null,
 15579                null,
 15580                null,
 15581                "Extension",
 15582              ],
 15583              h = [
 15584                [
 15585                  { x: -1, y: -2 },
 15586                  { x: 0, y: -2 },
 15587                  { x: 1, y: -2 },
 15588                  { x: -2, y: -1 },
 15589                  { x: -1, y: -1 },
 15590                  { x: 0, y: -1 },
 15591                  { x: 1, y: -1 },
 15592                  { x: 2, y: -1 },
 15593                  { x: -4, y: 0 },
 15594                  { x: -3, y: 0 },
 15595                  { x: -2, y: 0 },
 15596                  { x: -1, y: 0 },
 15597                ],
 15598                [
 15599                  { x: -1, y: -2 },
 15600                  { x: 0, y: -2 },
 15601                  { x: 1, y: -2 },
 15602                  { x: 2, y: -2 },
 15603                  { x: -2, y: -1 },
 15604                  { x: -1, y: -1 },
 15605                  { x: 0, y: -1 },
 15606                  { x: 1, y: -1 },
 15607                  { x: 2, y: -1 },
 15608                  { x: -3, y: 0 },
 15609                  { x: -2, y: 0 },
 15610                  { x: -1, y: 0 },
 15611                ],
 15612                [
 15613                  { x: -1, y: -2 },
 15614                  { x: 0, y: -2 },
 15615                  { x: 1, y: -2 },
 15616                  { x: -2, y: -1 },
 15617                  { x: -1, y: -1 },
 15618                  { x: 0, y: -1 },
 15619                  { x: 1, y: -1 },
 15620                  { x: -2, y: 0 },
 15621                  { x: -1, y: 0 },
 15622                ],
 15623                [
 15624                  { x: -3, y: -1 },
 15625                  { x: -2, y: -1 },
 15626                  { x: -1, y: -1 },
 15627                  { x: 0, y: -1 },
 15628                  { x: 1, y: -1 },
 15629                  { x: -4, y: 0 },
 15630                  { x: -3, y: 0 },
 15631                  { x: -2, y: 0 },
 15632                  { x: -1, y: 0 },
 15633                ],
 15634              ],
 15635              u = [
 15636                {
 15637                  coding: [
 15638                    { x: 0, y: -1 },
 15639                    { x: 1, y: -1 },
 15640                    { x: -1, y: 0 },
 15641                  ],
 15642                  reference: [
 15643                    { x: 0, y: -1 },
 15644                    { x: 1, y: -1 },
 15645                    { x: -1, y: 0 },
 15646                    { x: 0, y: 0 },
 15647                    { x: 1, y: 0 },
 15648                    { x: -1, y: 1 },
 15649                    { x: 0, y: 1 },
 15650                    { x: 1, y: 1 },
 15651                  ],
 15652                },
 15653                {
 15654                  coding: [
 15655                    { x: -1, y: -1 },
 15656                    { x: 0, y: -1 },
 15657                    { x: 1, y: -1 },
 15658                    { x: -1, y: 0 },
 15659                  ],
 15660                  reference: [
 15661                    { x: 0, y: -1 },
 15662                    { x: -1, y: 0 },
 15663                    { x: 0, y: 0 },
 15664                    { x: 1, y: 0 },
 15665                    { x: 0, y: 1 },
 15666                    { x: 1, y: 1 },
 15667                  ],
 15668                },
 15669              ],
 15670              d = [39717, 1941, 229, 405],
 15671              f = [32, 8];
 15672            function decodeBitmap(e, t, a, r, n, i, s, o) {
 15673              if (e) {
 15674                return decodeMMRBitmap(
 15675                  new Reader(o.data, o.start, o.end),
 15676                  t,
 15677                  a,
 15678                  !1,
 15679                );
 15680              }
 15681              if (
 15682                0 === r &&
 15683                !i &&
 15684                !n &&
 15685                4 === s.length &&
 15686                3 === s[0].x &&
 15687                -1 === s[0].y &&
 15688                -3 === s[1].x &&
 15689                -1 === s[1].y &&
 15690                2 === s[2].x &&
 15691                -2 === s[2].y &&
 15692                -2 === s[3].x &&
 15693                -2 === s[3].y
 15694              )
 15695                return (function decodeBitmapTemplate0(e, t, a) {
 15696                  const r = a.decoder,
 15697                    n = a.contextCache.getContexts("GB"),
 15698                    i = [];
 15699                  let s, o, c, l, h, u, d;
 15700                  for (o = 0; o < t; o++) {
 15701                    h = i[o] = new Uint8Array(e);
 15702                    u = o < 1 ? h : i[o - 1];
 15703                    d = o < 2 ? h : i[o - 2];
 15704                    s =
 15705                      (d[0] << 13) |
 15706                      (d[1] << 12) |
 15707                      (d[2] << 11) |
 15708                      (u[0] << 7) |
 15709                      (u[1] << 6) |
 15710                      (u[2] << 5) |
 15711                      (u[3] << 4);
 15712                    for (c = 0; c < e; c++) {
 15713                      h[c] = l = r.readBit(n, s);
 15714                      s =
 15715                        ((31735 & s) << 1) |
 15716                        (c + 3 < e ? d[c + 3] << 11 : 0) |
 15717                        (c + 4 < e ? u[c + 4] << 4 : 0) |
 15718                        l;
 15719                    }
 15720                  }
 15721                  return i;
 15722                })(t, a, o);
 15723              const c = !!i,
 15724                l = h[r].concat(s);
 15725              l.sort(function (e, t) {
 15726                return e.y - t.y || e.x - t.x;
 15727              });
 15728              const u = l.length,
 15729                f = new Int8Array(u),
 15730                g = new Int8Array(u),
 15731                p = [];
 15732              let m,
 15733                b,
 15734                y = 0,
 15735                w = 0,
 15736                S = 0,
 15737                x = 0;
 15738              for (b = 0; b < u; b++) {
 15739                f[b] = l[b].x;
 15740                g[b] = l[b].y;
 15741                w = Math.min(w, l[b].x);
 15742                S = Math.max(S, l[b].x);
 15743                x = Math.min(x, l[b].y);
 15744                b < u - 1 && l[b].y === l[b + 1].y && l[b].x === l[b + 1].x - 1
 15745                  ? (y |= 1 << (u - 1 - b))
 15746                  : p.push(b);
 15747              }
 15748              const C = p.length,
 15749                k = new Int8Array(C),
 15750                v = new Int8Array(C),
 15751                F = new Uint16Array(C);
 15752              for (m = 0; m < C; m++) {
 15753                b = p[m];
 15754                k[m] = l[b].x;
 15755                v[m] = l[b].y;
 15756                F[m] = 1 << (u - 1 - b);
 15757              }
 15758              const O = -w,
 15759                T = -x,
 15760                M = t - S,
 15761                D = d[r];
 15762              let E = new Uint8Array(t);
 15763              const N = [],
 15764                R = o.decoder,
 15765                L = o.contextCache.getContexts("GB");
 15766              let $,
 15767                _,
 15768                j,
 15769                U,
 15770                X,
 15771                H = 0,
 15772                q = 0;
 15773              for (let e = 0; e < a; e++) {
 15774                if (n) {
 15775                  H ^= R.readBit(L, D);
 15776                  if (H) {
 15777                    N.push(E);
 15778                    continue;
 15779                  }
 15780                }
 15781                E = new Uint8Array(E);
 15782                N.push(E);
 15783                for ($ = 0; $ < t; $++) {
 15784                  if (c && i[e][$]) {
 15785                    E[$] = 0;
 15786                    continue;
 15787                  }
 15788                  if ($ >= O && $ < M && e >= T) {
 15789                    q = (q << 1) & y;
 15790                    for (b = 0; b < C; b++) {
 15791                      _ = e + v[b];
 15792                      j = $ + k[b];
 15793                      U = N[_][j];
 15794                      if (U) {
 15795                        U = F[b];
 15796                        q |= U;
 15797                      }
 15798                    }
 15799                  } else {
 15800                    q = 0;
 15801                    X = u - 1;
 15802                    for (b = 0; b < u; b++, X--) {
 15803                      j = $ + f[b];
 15804                      if (j >= 0 && j < t) {
 15805                        _ = e + g[b];
 15806                        if (_ >= 0) {
 15807                          U = N[_][j];
 15808                          U && (q |= U << X);
 15809                        }
 15810                      }
 15811                    }
 15812                  }
 15813                  const a = R.readBit(L, q);
 15814                  E[$] = a;
 15815                }
 15816              }
 15817              return N;
 15818            }
 15819            function decodeRefinement(e, t, a, r, n, i, s, o, c) {
 15820              let l = u[a].coding;
 15821              0 === a && (l = l.concat([o[0]]));
 15822              const h = l.length,
 15823                d = new Int32Array(h),
 15824                g = new Int32Array(h);
 15825              let p;
 15826              for (p = 0; p < h; p++) {
 15827                d[p] = l[p].x;
 15828                g[p] = l[p].y;
 15829              }
 15830              let m = u[a].reference;
 15831              0 === a && (m = m.concat([o[1]]));
 15832              const b = m.length,
 15833                y = new Int32Array(b),
 15834                w = new Int32Array(b);
 15835              for (p = 0; p < b; p++) {
 15836                y[p] = m[p].x;
 15837                w[p] = m[p].y;
 15838              }
 15839              const S = r[0].length,
 15840                x = r.length,
 15841                C = f[a],
 15842                k = [],
 15843                v = c.decoder,
 15844                F = c.contextCache.getContexts("GR");
 15845              let O = 0;
 15846              for (let a = 0; a < t; a++) {
 15847                if (s) {
 15848                  O ^= v.readBit(F, C);
 15849                  if (O) throw new Jbig2Error("prediction is not supported");
 15850                }
 15851                const t = new Uint8Array(e);
 15852                k.push(t);
 15853                for (let s = 0; s < e; s++) {
 15854                  let o,
 15855                    c,
 15856                    l = 0;
 15857                  for (p = 0; p < h; p++) {
 15858                    o = a + g[p];
 15859                    c = s + d[p];
 15860                    o < 0 || c < 0 || c >= e
 15861                      ? (l <<= 1)
 15862                      : (l = (l << 1) | k[o][c]);
 15863                  }
 15864                  for (p = 0; p < b; p++) {
 15865                    o = a + w[p] - i;
 15866                    c = s + y[p] - n;
 15867                    o < 0 || o >= x || c < 0 || c >= S
 15868                      ? (l <<= 1)
 15869                      : (l = (l << 1) | r[o][c]);
 15870                  }
 15871                  const u = v.readBit(F, l);
 15872                  t[s] = u;
 15873                }
 15874              }
 15875              return k;
 15876            }
 15877            function decodeTextRegion(
 15878              e,
 15879              t,
 15880              a,
 15881              r,
 15882              n,
 15883              i,
 15884              s,
 15885              o,
 15886              c,
 15887              l,
 15888              h,
 15889              u,
 15890              d,
 15891              f,
 15892              g,
 15893              p,
 15894              m,
 15895              b,
 15896              y,
 15897            ) {
 15898              if (e && t)
 15899                throw new Jbig2Error("refinement with Huffman is not supported");
 15900              const w = [];
 15901              let S, x;
 15902              for (S = 0; S < r; S++) {
 15903                x = new Uint8Array(a);
 15904                if (n) for (let e = 0; e < a; e++) x[e] = n;
 15905                w.push(x);
 15906              }
 15907              const C = m.decoder,
 15908                k = m.contextCache;
 15909              let v = e ? -f.tableDeltaT.decode(y) : -decodeInteger(k, "IADT", C),
 15910                F = 0;
 15911              S = 0;
 15912              for (; S < i; ) {
 15913                v += e ? f.tableDeltaT.decode(y) : decodeInteger(k, "IADT", C);
 15914                F += e ? f.tableFirstS.decode(y) : decodeInteger(k, "IAFS", C);
 15915                let r = F;
 15916                for (;;) {
 15917                  let n = 0;
 15918                  s > 1 && (n = e ? y.readBits(b) : decodeInteger(k, "IAIT", C));
 15919                  const i = s * v + n,
 15920                    F = e ? f.symbolIDTable.decode(y) : decodeIAID(k, C, c),
 15921                    O = t && (e ? y.readBit() : decodeInteger(k, "IARI", C));
 15922                  let T = o[F],
 15923                    M = T[0].length,
 15924                    D = T.length;
 15925                  if (O) {
 15926                    const e = decodeInteger(k, "IARDW", C),
 15927                      t = decodeInteger(k, "IARDH", C);
 15928                    M += e;
 15929                    D += t;
 15930                    T = decodeRefinement(
 15931                      M,
 15932                      D,
 15933                      g,
 15934                      T,
 15935                      (e >> 1) + decodeInteger(k, "IARDX", C),
 15936                      (t >> 1) + decodeInteger(k, "IARDY", C),
 15937                      !1,
 15938                      p,
 15939                      m,
 15940                    );
 15941                  }
 15942                  const E = i - (1 & u ? 0 : D - 1),
 15943                    N = r - (2 & u ? M - 1 : 0);
 15944                  let R, L, $;
 15945                  if (l) {
 15946                    for (R = 0; R < D; R++) {
 15947                      x = w[N + R];
 15948                      if (!x) continue;
 15949                      $ = T[R];
 15950                      const e = Math.min(a - E, M);
 15951                      switch (d) {
 15952                        case 0:
 15953                          for (L = 0; L < e; L++) x[E + L] |= $[L];
 15954                          break;
 15955                        case 2:
 15956                          for (L = 0; L < e; L++) x[E + L] ^= $[L];
 15957                          break;
 15958                        default:
 15959                          throw new Jbig2Error(`operator ${d} is not supported`);
 15960                      }
 15961                    }
 15962                    r += D - 1;
 15963                  } else {
 15964                    for (L = 0; L < D; L++) {
 15965                      x = w[E + L];
 15966                      if (x) {
 15967                        $ = T[L];
 15968                        switch (d) {
 15969                          case 0:
 15970                            for (R = 0; R < M; R++) x[N + R] |= $[R];
 15971                            break;
 15972                          case 2:
 15973                            for (R = 0; R < M; R++) x[N + R] ^= $[R];
 15974                            break;
 15975                          default:
 15976                            throw new Jbig2Error(
 15977                              `operator ${d} is not supported`,
 15978                            );
 15979                        }
 15980                      }
 15981                    }
 15982                    r += M - 1;
 15983                  }
 15984                  S++;
 15985                  const _ = e
 15986                    ? f.tableDeltaS.decode(y)
 15987                    : decodeInteger(k, "IADS", C);
 15988                  if (null === _) break;
 15989                  r += _ + h;
 15990                }
 15991              }
 15992              return w;
 15993            }
 15994            function readSegmentHeader(e, t) {
 15995              const a = {};
 15996              a.number = (0, n.readUint32)(e, t);
 15997              const r = e[t + 4],
 15998                i = 63 & r;
 15999              if (!l[i]) throw new Jbig2Error("invalid segment type: " + i);
 16000              a.type = i;
 16001              a.typeName = l[i];
 16002              a.deferredNonRetain = !!(128 & r);
 16003              const s = !!(64 & r),
 16004                o = e[t + 5];
 16005              let c = (o >> 5) & 7;
 16006              const h = [31 & o];
 16007              let u = t + 6;
 16008              if (7 === o) {
 16009                c = 536870911 & (0, n.readUint32)(e, u - 1);
 16010                u += 3;
 16011                let t = (c + 7) >> 3;
 16012                h[0] = e[u++];
 16013                for (; --t > 0; ) h.push(e[u++]);
 16014              } else if (5 === o || 6 === o)
 16015                throw new Jbig2Error("invalid referred-to flags");
 16016              a.retainBits = h;
 16017              let d = 4;
 16018              a.number <= 256 ? (d = 1) : a.number <= 65536 && (d = 2);
 16019              const f = [];
 16020              let p, m;
 16021              for (p = 0; p < c; p++) {
 16022                let t;
 16023                t =
 16024                  1 === d
 16025                    ? e[u]
 16026                    : 2 === d
 16027                      ? (0, n.readUint16)(e, u)
 16028                      : (0, n.readUint32)(e, u);
 16029                f.push(t);
 16030                u += d;
 16031              }
 16032              a.referredTo = f;
 16033              if (s) {
 16034                a.pageAssociation = (0, n.readUint32)(e, u);
 16035                u += 4;
 16036              } else a.pageAssociation = e[u++];
 16037              a.length = (0, n.readUint32)(e, u);
 16038              u += 4;
 16039              if (4294967295 === a.length) {
 16040                if (38 !== i)
 16041                  throw new Jbig2Error("invalid unknown segment length");
 16042                {
 16043                  const t = readRegionSegmentInformation(e, u),
 16044                    r = !!(1 & e[u + g]),
 16045                    n = 6,
 16046                    i = new Uint8Array(n);
 16047                  if (!r) {
 16048                    i[0] = 255;
 16049                    i[1] = 172;
 16050                  }
 16051                  i[2] = (t.height >>> 24) & 255;
 16052                  i[3] = (t.height >> 16) & 255;
 16053                  i[4] = (t.height >> 8) & 255;
 16054                  i[5] = 255 & t.height;
 16055                  for (p = u, m = e.length; p < m; p++) {
 16056                    let t = 0;
 16057                    for (; t < n && i[t] === e[p + t]; ) t++;
 16058                    if (t === n) {
 16059                      a.length = p + n;
 16060                      break;
 16061                    }
 16062                  }
 16063                  if (4294967295 === a.length)
 16064                    throw new Jbig2Error("segment end was not found");
 16065                }
 16066              }
 16067              a.headerEnd = u;
 16068              return a;
 16069            }
 16070            function readSegments(e, t, a, r) {
 16071              const n = [];
 16072              let i = a;
 16073              for (; i < r; ) {
 16074                const a = readSegmentHeader(t, i);
 16075                i = a.headerEnd;
 16076                const r = { header: a, data: t };
 16077                if (!e.randomAccess) {
 16078                  r.start = i;
 16079                  i += a.length;
 16080                  r.end = i;
 16081                }
 16082                n.push(r);
 16083                if (51 === a.type) break;
 16084              }
 16085              if (e.randomAccess)
 16086                for (let e = 0, t = n.length; e < t; e++) {
 16087                  n[e].start = i;
 16088                  i += n[e].header.length;
 16089                  n[e].end = i;
 16090                }
 16091              return n;
 16092            }
 16093            function readRegionSegmentInformation(e, t) {
 16094              return {
 16095                width: (0, n.readUint32)(e, t),
 16096                height: (0, n.readUint32)(e, t + 4),
 16097                x: (0, n.readUint32)(e, t + 8),
 16098                y: (0, n.readUint32)(e, t + 12),
 16099                combinationOperator: 7 & e[t + 16],
 16100              };
 16101            }
 16102            const g = 17;
 16103            function processSegment(e, t) {
 16104              const a = e.header,
 16105                r = e.data,
 16106                i = e.end;
 16107              let s,
 16108                o,
 16109                c,
 16110                l,
 16111                h = e.start;
 16112              switch (a.type) {
 16113                case 0:
 16114                  const e = {},
 16115                    t = (0, n.readUint16)(r, h);
 16116                  e.huffman = !!(1 & t);
 16117                  e.refinement = !!(2 & t);
 16118                  e.huffmanDHSelector = (t >> 2) & 3;
 16119                  e.huffmanDWSelector = (t >> 4) & 3;
 16120                  e.bitmapSizeSelector = (t >> 6) & 1;
 16121                  e.aggregationInstancesSelector = (t >> 7) & 1;
 16122                  e.bitmapCodingContextUsed = !!(256 & t);
 16123                  e.bitmapCodingContextRetained = !!(512 & t);
 16124                  e.template = (t >> 10) & 3;
 16125                  e.refinementTemplate = (t >> 12) & 1;
 16126                  h += 2;
 16127                  if (!e.huffman) {
 16128                    l = 0 === e.template ? 4 : 1;
 16129                    o = [];
 16130                    for (c = 0; c < l; c++) {
 16131                      o.push({
 16132                        x: (0, n.readInt8)(r, h),
 16133                        y: (0, n.readInt8)(r, h + 1),
 16134                      });
 16135                      h += 2;
 16136                    }
 16137                    e.at = o;
 16138                  }
 16139                  if (e.refinement && !e.refinementTemplate) {
 16140                    o = [];
 16141                    for (c = 0; c < 2; c++) {
 16142                      o.push({
 16143                        x: (0, n.readInt8)(r, h),
 16144                        y: (0, n.readInt8)(r, h + 1),
 16145                      });
 16146                      h += 2;
 16147                    }
 16148                    e.refinementAt = o;
 16149                  }
 16150                  e.numberOfExportedSymbols = (0, n.readUint32)(r, h);
 16151                  h += 4;
 16152                  e.numberOfNewSymbols = (0, n.readUint32)(r, h);
 16153                  h += 4;
 16154                  s = [e, a.number, a.referredTo, r, h, i];
 16155                  break;
 16156                case 6:
 16157                case 7:
 16158                  const u = {};
 16159                  u.info = readRegionSegmentInformation(r, h);
 16160                  h += g;
 16161                  const d = (0, n.readUint16)(r, h);
 16162                  h += 2;
 16163                  u.huffman = !!(1 & d);
 16164                  u.refinement = !!(2 & d);
 16165                  u.logStripSize = (d >> 2) & 3;
 16166                  u.stripSize = 1 << u.logStripSize;
 16167                  u.referenceCorner = (d >> 4) & 3;
 16168                  u.transposed = !!(64 & d);
 16169                  u.combinationOperator = (d >> 7) & 3;
 16170                  u.defaultPixelValue = (d >> 9) & 1;
 16171                  u.dsOffset = (d << 17) >> 27;
 16172                  u.refinementTemplate = (d >> 15) & 1;
 16173                  if (u.huffman) {
 16174                    const e = (0, n.readUint16)(r, h);
 16175                    h += 2;
 16176                    u.huffmanFS = 3 & e;
 16177                    u.huffmanDS = (e >> 2) & 3;
 16178                    u.huffmanDT = (e >> 4) & 3;
 16179                    u.huffmanRefinementDW = (e >> 6) & 3;
 16180                    u.huffmanRefinementDH = (e >> 8) & 3;
 16181                    u.huffmanRefinementDX = (e >> 10) & 3;
 16182                    u.huffmanRefinementDY = (e >> 12) & 3;
 16183                    u.huffmanRefinementSizeSelector = !!(16384 & e);
 16184                  }
 16185                  if (u.refinement && !u.refinementTemplate) {
 16186                    o = [];
 16187                    for (c = 0; c < 2; c++) {
 16188                      o.push({
 16189                        x: (0, n.readInt8)(r, h),
 16190                        y: (0, n.readInt8)(r, h + 1),
 16191                      });
 16192                      h += 2;
 16193                    }
 16194                    u.refinementAt = o;
 16195                  }
 16196                  u.numberOfSymbolInstances = (0, n.readUint32)(r, h);
 16197                  h += 4;
 16198                  s = [u, a.referredTo, r, h, i];
 16199                  break;
 16200                case 16:
 16201                  const f = {},
 16202                    p = r[h++];
 16203                  f.mmr = !!(1 & p);
 16204                  f.template = (p >> 1) & 3;
 16205                  f.patternWidth = r[h++];
 16206                  f.patternHeight = r[h++];
 16207                  f.maxPatternIndex = (0, n.readUint32)(r, h);
 16208                  h += 4;
 16209                  s = [f, a.number, r, h, i];
 16210                  break;
 16211                case 22:
 16212                case 23:
 16213                  const m = {};
 16214                  m.info = readRegionSegmentInformation(r, h);
 16215                  h += g;
 16216                  const b = r[h++];
 16217                  m.mmr = !!(1 & b);
 16218                  m.template = (b >> 1) & 3;
 16219                  m.enableSkip = !!(8 & b);
 16220                  m.combinationOperator = (b >> 4) & 7;
 16221                  m.defaultPixelValue = (b >> 7) & 1;
 16222                  m.gridWidth = (0, n.readUint32)(r, h);
 16223                  h += 4;
 16224                  m.gridHeight = (0, n.readUint32)(r, h);
 16225                  h += 4;
 16226                  m.gridOffsetX = 4294967295 & (0, n.readUint32)(r, h);
 16227                  h += 4;
 16228                  m.gridOffsetY = 4294967295 & (0, n.readUint32)(r, h);
 16229                  h += 4;
 16230                  m.gridVectorX = (0, n.readUint16)(r, h);
 16231                  h += 2;
 16232                  m.gridVectorY = (0, n.readUint16)(r, h);
 16233                  h += 2;
 16234                  s = [m, a.referredTo, r, h, i];
 16235                  break;
 16236                case 38:
 16237                case 39:
 16238                  const y = {};
 16239                  y.info = readRegionSegmentInformation(r, h);
 16240                  h += g;
 16241                  const w = r[h++];
 16242                  y.mmr = !!(1 & w);
 16243                  y.template = (w >> 1) & 3;
 16244                  y.prediction = !!(8 & w);
 16245                  if (!y.mmr) {
 16246                    l = 0 === y.template ? 4 : 1;
 16247                    o = [];
 16248                    for (c = 0; c < l; c++) {
 16249                      o.push({
 16250                        x: (0, n.readInt8)(r, h),
 16251                        y: (0, n.readInt8)(r, h + 1),
 16252                      });
 16253                      h += 2;
 16254                    }
 16255                    y.at = o;
 16256                  }
 16257                  s = [y, r, h, i];
 16258                  break;
 16259                case 48:
 16260                  const S = {
 16261                    width: (0, n.readUint32)(r, h),
 16262                    height: (0, n.readUint32)(r, h + 4),
 16263                    resolutionX: (0, n.readUint32)(r, h + 8),
 16264                    resolutionY: (0, n.readUint32)(r, h + 12),
 16265                  };
 16266                  4294967295 === S.height && delete S.height;
 16267                  const x = r[h + 16];
 16268                  (0, n.readUint16)(r, h + 17);
 16269                  S.lossless = !!(1 & x);
 16270                  S.refinement = !!(2 & x);
 16271                  S.defaultPixelValue = (x >> 2) & 1;
 16272                  S.combinationOperator = (x >> 3) & 3;
 16273                  S.requiresBuffer = !!(32 & x);
 16274                  S.combinationOperatorOverride = !!(64 & x);
 16275                  s = [S];
 16276                  break;
 16277                case 49:
 16278                case 50:
 16279                case 51:
 16280                case 62:
 16281                  break;
 16282                case 53:
 16283                  s = [a.number, r, h, i];
 16284                  break;
 16285                default:
 16286                  throw new Jbig2Error(
 16287                    `segment type ${a.typeName}(${a.type}) is not implemented`,
 16288                  );
 16289              }
 16290              const u = "on" + a.typeName;
 16291              u in t && t[u].apply(t, s);
 16292            }
 16293            function processSegments(e, t) {
 16294              for (let a = 0, r = e.length; a < r; a++) processSegment(e[a], t);
 16295            }
 16296            class SimpleSegmentVisitor {
 16297              onPageInformation(e) {
 16298                this.currentPageInfo = e;
 16299                const t = (e.width + 7) >> 3,
 16300                  a = new Uint8ClampedArray(t * e.height);
 16301                e.defaultPixelValue && a.fill(255);
 16302                this.buffer = a;
 16303              }
 16304              drawBitmap(e, t) {
 16305                const a = this.currentPageInfo,
 16306                  r = e.width,
 16307                  n = e.height,
 16308                  i = (a.width + 7) >> 3,
 16309                  s = a.combinationOperatorOverride
 16310                    ? e.combinationOperator
 16311                    : a.combinationOperator,
 16312                  o = this.buffer,
 16313                  c = 128 >> (7 & e.x);
 16314                let l,
 16315                  h,
 16316                  u,
 16317                  d,
 16318                  f = e.y * i + (e.x >> 3);
 16319                switch (s) {
 16320                  case 0:
 16321                    for (l = 0; l < n; l++) {
 16322                      u = c;
 16323                      d = f;
 16324                      for (h = 0; h < r; h++) {
 16325                        t[l][h] && (o[d] |= u);
 16326                        u >>= 1;
 16327                        if (!u) {
 16328                          u = 128;
 16329                          d++;
 16330                        }
 16331                      }
 16332                      f += i;
 16333                    }
 16334                    break;
 16335                  case 2:
 16336                    for (l = 0; l < n; l++) {
 16337                      u = c;
 16338                      d = f;
 16339                      for (h = 0; h < r; h++) {
 16340                        t[l][h] && (o[d] ^= u);
 16341                        u >>= 1;
 16342                        if (!u) {
 16343                          u = 128;
 16344                          d++;
 16345                        }
 16346                      }
 16347                      f += i;
 16348                    }
 16349                    break;
 16350                  default:
 16351                    throw new Jbig2Error(`operator ${s} is not supported`);
 16352                }
 16353              }
 16354              onImmediateGenericRegion(e, t, a, r) {
 16355                const n = e.info,
 16356                  i = new DecodingContext(t, a, r),
 16357                  s = decodeBitmap(
 16358                    e.mmr,
 16359                    n.width,
 16360                    n.height,
 16361                    e.template,
 16362                    e.prediction,
 16363                    null,
 16364                    e.at,
 16365                    i,
 16366                  );
 16367                this.drawBitmap(n, s);
 16368              }
 16369              onImmediateLosslessGenericRegion() {
 16370                this.onImmediateGenericRegion(...arguments);
 16371              }
 16372              onSymbolDictionary(e, t, a, r, i, s) {
 16373                let o, c;
 16374                if (e.huffman) {
 16375                  o = (function getSymbolDictionaryHuffmanTables(e, t, a) {
 16376                    let r,
 16377                      n,
 16378                      i,
 16379                      s,
 16380                      o = 0;
 16381                    switch (e.huffmanDHSelector) {
 16382                      case 0:
 16383                      case 1:
 16384                        r = getStandardTable(e.huffmanDHSelector + 4);
 16385                        break;
 16386                      case 3:
 16387                        r = getCustomHuffmanTable(o, t, a);
 16388                        o++;
 16389                        break;
 16390                      default:
 16391                        throw new Jbig2Error("invalid Huffman DH selector");
 16392                    }
 16393                    switch (e.huffmanDWSelector) {
 16394                      case 0:
 16395                      case 1:
 16396                        n = getStandardTable(e.huffmanDWSelector + 2);
 16397                        break;
 16398                      case 3:
 16399                        n = getCustomHuffmanTable(o, t, a);
 16400                        o++;
 16401                        break;
 16402                      default:
 16403                        throw new Jbig2Error("invalid Huffman DW selector");
 16404                    }
 16405                    if (e.bitmapSizeSelector) {
 16406                      i = getCustomHuffmanTable(o, t, a);
 16407                      o++;
 16408                    } else i = getStandardTable(1);
 16409                    s = e.aggregationInstancesSelector
 16410                      ? getCustomHuffmanTable(o, t, a)
 16411                      : getStandardTable(1);
 16412                    return {
 16413                      tableDeltaHeight: r,
 16414                      tableDeltaWidth: n,
 16415                      tableBitmapSize: i,
 16416                      tableAggregateInstances: s,
 16417                    };
 16418                  })(e, a, this.customTables);
 16419                  c = new Reader(r, i, s);
 16420                }
 16421                let l = this.symbols;
 16422                l || (this.symbols = l = {});
 16423                const h = [];
 16424                for (const e of a) {
 16425                  const t = l[e];
 16426                  t && h.push(...t);
 16427                }
 16428                const u = new DecodingContext(r, i, s);
 16429                l[t] = (function decodeSymbolDictionary(
 16430                  e,
 16431                  t,
 16432                  a,
 16433                  r,
 16434                  i,
 16435                  s,
 16436                  o,
 16437                  c,
 16438                  l,
 16439                  h,
 16440                  u,
 16441                  d,
 16442                ) {
 16443                  if (e && t)
 16444                    throw new Jbig2Error(
 16445                      "symbol refinement with Huffman is not supported",
 16446                    );
 16447                  const f = [];
 16448                  let g = 0,
 16449                    p = (0, n.log2)(a.length + r);
 16450                  const m = u.decoder,
 16451                    b = u.contextCache;
 16452                  let y, w;
 16453                  if (e) {
 16454                    y = getStandardTable(1);
 16455                    w = [];
 16456                    p = Math.max(p, 1);
 16457                  }
 16458                  for (; f.length < r; ) {
 16459                    g += e
 16460                      ? s.tableDeltaHeight.decode(d)
 16461                      : decodeInteger(b, "IADH", m);
 16462                    let r = 0,
 16463                      n = 0;
 16464                    const i = e ? w.length : 0;
 16465                    for (;;) {
 16466                      const i = e
 16467                        ? s.tableDeltaWidth.decode(d)
 16468                        : decodeInteger(b, "IADW", m);
 16469                      if (null === i) break;
 16470                      r += i;
 16471                      n += r;
 16472                      let y;
 16473                      if (t) {
 16474                        const n = decodeInteger(b, "IAAI", m);
 16475                        if (n > 1)
 16476                          y = decodeTextRegion(
 16477                            e,
 16478                            t,
 16479                            r,
 16480                            g,
 16481                            0,
 16482                            n,
 16483                            1,
 16484                            a.concat(f),
 16485                            p,
 16486                            0,
 16487                            0,
 16488                            1,
 16489                            0,
 16490                            s,
 16491                            l,
 16492                            h,
 16493                            u,
 16494                            0,
 16495                            d,
 16496                          );
 16497                        else {
 16498                          const e = decodeIAID(b, m, p),
 16499                            t = decodeInteger(b, "IARDX", m),
 16500                            n = decodeInteger(b, "IARDY", m);
 16501                          y = decodeRefinement(
 16502                            r,
 16503                            g,
 16504                            l,
 16505                            e < a.length ? a[e] : f[e - a.length],
 16506                            t,
 16507                            n,
 16508                            !1,
 16509                            h,
 16510                            u,
 16511                          );
 16512                        }
 16513                        f.push(y);
 16514                      } else if (e) w.push(r);
 16515                      else {
 16516                        y = decodeBitmap(!1, r, g, o, !1, null, c, u);
 16517                        f.push(y);
 16518                      }
 16519                    }
 16520                    if (e && !t) {
 16521                      const e = s.tableBitmapSize.decode(d);
 16522                      d.byteAlign();
 16523                      let t;
 16524                      if (0 === e) t = readUncompressedBitmap(d, n, g);
 16525                      else {
 16526                        const a = d.end,
 16527                          r = d.position + e;
 16528                        d.end = r;
 16529                        t = decodeMMRBitmap(d, n, g, !1);
 16530                        d.end = a;
 16531                        d.position = r;
 16532                      }
 16533                      const a = w.length;
 16534                      if (i === a - 1) f.push(t);
 16535                      else {
 16536                        let e,
 16537                          r,
 16538                          n,
 16539                          s,
 16540                          o,
 16541                          c = 0;
 16542                        for (e = i; e < a; e++) {
 16543                          s = w[e];
 16544                          n = c + s;
 16545                          o = [];
 16546                          for (r = 0; r < g; r++) o.push(t[r].subarray(c, n));
 16547                          f.push(o);
 16548                          c = n;
 16549                        }
 16550                      }
 16551                    }
 16552                  }
 16553                  const S = [],
 16554                    x = [];
 16555                  let C,
 16556                    k,
 16557                    v = !1;
 16558                  const F = a.length + r;
 16559                  for (; x.length < F; ) {
 16560                    let t = e ? y.decode(d) : decodeInteger(b, "IAEX", m);
 16561                    for (; t--; ) x.push(v);
 16562                    v = !v;
 16563                  }
 16564                  for (C = 0, k = a.length; C < k; C++) x[C] && S.push(a[C]);
 16565                  for (let e = 0; e < r; C++, e++) x[C] && S.push(f[e]);
 16566                  return S;
 16567                })(
 16568                  e.huffman,
 16569                  e.refinement,
 16570                  h,
 16571                  e.numberOfNewSymbols,
 16572                  e.numberOfExportedSymbols,
 16573                  o,
 16574                  e.template,
 16575                  e.at,
 16576                  e.refinementTemplate,
 16577                  e.refinementAt,
 16578                  u,
 16579                  c,
 16580                );
 16581              }
 16582              onImmediateTextRegion(e, t, a, r, i) {
 16583                const s = e.info;
 16584                let o, c;
 16585                const l = this.symbols,
 16586                  h = [];
 16587                for (const e of t) {
 16588                  const t = l[e];
 16589                  t && h.push(...t);
 16590                }
 16591                const u = (0, n.log2)(h.length);
 16592                if (e.huffman) {
 16593                  c = new Reader(a, r, i);
 16594                  o = (function getTextRegionHuffmanTables(e, t, a, r, n) {
 16595                    const i = [];
 16596                    for (let e = 0; e <= 34; e++) {
 16597                      const t = n.readBits(4);
 16598                      i.push(new HuffmanLine([e, t, 0, 0]));
 16599                    }
 16600                    const s = new HuffmanTable(i, !1);
 16601                    i.length = 0;
 16602                    for (let e = 0; e < r; ) {
 16603                      const t = s.decode(n);
 16604                      if (t >= 32) {
 16605                        let a, r, s;
 16606                        switch (t) {
 16607                          case 32:
 16608                            if (0 === e)
 16609                              throw new Jbig2Error(
 16610                                "no previous value in symbol ID table",
 16611                              );
 16612                            r = n.readBits(2) + 3;
 16613                            a = i[e - 1].prefixLength;
 16614                            break;
 16615                          case 33:
 16616                            r = n.readBits(3) + 3;
 16617                            a = 0;
 16618                            break;
 16619                          case 34:
 16620                            r = n.readBits(7) + 11;
 16621                            a = 0;
 16622                            break;
 16623                          default:
 16624                            throw new Jbig2Error(
 16625                              "invalid code length in symbol ID table",
 16626                            );
 16627                        }
 16628                        for (s = 0; s < r; s++) {
 16629                          i.push(new HuffmanLine([e, a, 0, 0]));
 16630                          e++;
 16631                        }
 16632                      } else {
 16633                        i.push(new HuffmanLine([e, t, 0, 0]));
 16634                        e++;
 16635                      }
 16636                    }
 16637                    n.byteAlign();
 16638                    const o = new HuffmanTable(i, !1);
 16639                    let c,
 16640                      l,
 16641                      h,
 16642                      u = 0;
 16643                    switch (e.huffmanFS) {
 16644                      case 0:
 16645                      case 1:
 16646                        c = getStandardTable(e.huffmanFS + 6);
 16647                        break;
 16648                      case 3:
 16649                        c = getCustomHuffmanTable(u, t, a);
 16650                        u++;
 16651                        break;
 16652                      default:
 16653                        throw new Jbig2Error("invalid Huffman FS selector");
 16654                    }
 16655                    switch (e.huffmanDS) {
 16656                      case 0:
 16657                      case 1:
 16658                      case 2:
 16659                        l = getStandardTable(e.huffmanDS + 8);
 16660                        break;
 16661                      case 3:
 16662                        l = getCustomHuffmanTable(u, t, a);
 16663                        u++;
 16664                        break;
 16665                      default:
 16666                        throw new Jbig2Error("invalid Huffman DS selector");
 16667                    }
 16668                    switch (e.huffmanDT) {
 16669                      case 0:
 16670                      case 1:
 16671                      case 2:
 16672                        h = getStandardTable(e.huffmanDT + 11);
 16673                        break;
 16674                      case 3:
 16675                        h = getCustomHuffmanTable(u, t, a);
 16676                        u++;
 16677                        break;
 16678                      default:
 16679                        throw new Jbig2Error("invalid Huffman DT selector");
 16680                    }
 16681                    if (e.refinement)
 16682                      throw new Jbig2Error(
 16683                        "refinement with Huffman is not supported",
 16684                      );
 16685                    return {
 16686                      symbolIDTable: o,
 16687                      tableFirstS: c,
 16688                      tableDeltaS: l,
 16689                      tableDeltaT: h,
 16690                    };
 16691                  })(e, t, this.customTables, h.length, c);
 16692                }
 16693                const d = new DecodingContext(a, r, i),
 16694                  f = decodeTextRegion(
 16695                    e.huffman,
 16696                    e.refinement,
 16697                    s.width,
 16698                    s.height,
 16699                    e.defaultPixelValue,
 16700                    e.numberOfSymbolInstances,
 16701                    e.stripSize,
 16702                    h,
 16703                    u,
 16704                    e.transposed,
 16705                    e.dsOffset,
 16706                    e.referenceCorner,
 16707                    e.combinationOperator,
 16708                    o,
 16709                    e.refinementTemplate,
 16710                    e.refinementAt,
 16711                    d,
 16712                    e.logStripSize,
 16713                    c,
 16714                  );
 16715                this.drawBitmap(s, f);
 16716              }
 16717              onImmediateLosslessTextRegion() {
 16718                this.onImmediateTextRegion(...arguments);
 16719              }
 16720              onPatternDictionary(e, t, a, r, n) {
 16721                let i = this.patterns;
 16722                i || (this.patterns = i = {});
 16723                const s = new DecodingContext(a, r, n);
 16724                i[t] = (function decodePatternDictionary(e, t, a, r, n, i) {
 16725                  const s = [];
 16726                  if (!e) {
 16727                    s.push({ x: -t, y: 0 });
 16728                    0 === n &&
 16729                      s.push({ x: -3, y: -1 }, { x: 2, y: -2 }, { x: -2, y: -2 });
 16730                  }
 16731                  const o = decodeBitmap(e, (r + 1) * t, a, n, !1, null, s, i),
 16732                    c = [];
 16733                  for (let e = 0; e <= r; e++) {
 16734                    const r = [],
 16735                      n = t * e,
 16736                      i = n + t;
 16737                    for (let e = 0; e < a; e++) r.push(o[e].subarray(n, i));
 16738                    c.push(r);
 16739                  }
 16740                  return c;
 16741                })(
 16742                  e.mmr,
 16743                  e.patternWidth,
 16744                  e.patternHeight,
 16745                  e.maxPatternIndex,
 16746                  e.template,
 16747                  s,
 16748                );
 16749              }
 16750              onImmediateHalftoneRegion(e, t, a, r, i) {
 16751                const s = this.patterns[t[0]],
 16752                  o = e.info,
 16753                  c = new DecodingContext(a, r, i),
 16754                  l = (function decodeHalftoneRegion(
 16755                    e,
 16756                    t,
 16757                    a,
 16758                    r,
 16759                    i,
 16760                    s,
 16761                    o,
 16762                    c,
 16763                    l,
 16764                    h,
 16765                    u,
 16766                    d,
 16767                    f,
 16768                    g,
 16769                    p,
 16770                  ) {
 16771                    if (o) throw new Jbig2Error("skip is not supported");
 16772                    if (0 !== c)
 16773                      throw new Jbig2Error(
 16774                        `operator "${c}" is not supported in halftone region`,
 16775                      );
 16776                    const m = [];
 16777                    let b, y, w;
 16778                    for (b = 0; b < i; b++) {
 16779                      w = new Uint8Array(r);
 16780                      if (s) for (y = 0; y < r; y++) w[y] = s;
 16781                      m.push(w);
 16782                    }
 16783                    const S = t.length,
 16784                      x = t[0],
 16785                      C = x[0].length,
 16786                      k = x.length,
 16787                      v = (0, n.log2)(S),
 16788                      F = [];
 16789                    if (!e) {
 16790                      F.push({ x: a <= 1 ? 3 : 2, y: -1 });
 16791                      0 === a &&
 16792                        F.push(
 16793                          { x: -3, y: -1 },
 16794                          { x: 2, y: -2 },
 16795                          { x: -2, y: -2 },
 16796                        );
 16797                    }
 16798                    const O = [];
 16799                    let T, M, D, E, N, R, L, $, _, j, U;
 16800                    e && (T = new Reader(p.data, p.start, p.end));
 16801                    for (b = v - 1; b >= 0; b--) {
 16802                      M = e
 16803                        ? decodeMMRBitmap(T, l, h, !0)
 16804                        : decodeBitmap(!1, l, h, a, !1, null, F, p);
 16805                      O[b] = M;
 16806                    }
 16807                    for (D = 0; D < h; D++)
 16808                      for (E = 0; E < l; E++) {
 16809                        N = 0;
 16810                        R = 0;
 16811                        for (y = v - 1; y >= 0; y--) {
 16812                          N ^= O[y][D][E];
 16813                          R |= N << y;
 16814                        }
 16815                        L = t[R];
 16816                        $ = (u + D * g + E * f) >> 8;
 16817                        _ = (d + D * f - E * g) >> 8;
 16818                        if ($ >= 0 && $ + C <= r && _ >= 0 && _ + k <= i)
 16819                          for (b = 0; b < k; b++) {
 16820                            U = m[_ + b];
 16821                            j = L[b];
 16822                            for (y = 0; y < C; y++) U[$ + y] |= j[y];
 16823                          }
 16824                        else {
 16825                          let e, t;
 16826                          for (b = 0; b < k; b++) {
 16827                            t = _ + b;
 16828                            if (!(t < 0 || t >= i)) {
 16829                              U = m[t];
 16830                              j = L[b];
 16831                              for (y = 0; y < C; y++) {
 16832                                e = $ + y;
 16833                                e >= 0 && e < r && (U[e] |= j[y]);
 16834                              }
 16835                            }
 16836                          }
 16837                        }
 16838                      }
 16839                    return m;
 16840                  })(
 16841                    e.mmr,
 16842                    s,
 16843                    e.template,
 16844                    o.width,
 16845                    o.height,
 16846                    e.defaultPixelValue,
 16847                    e.enableSkip,
 16848                    e.combinationOperator,
 16849                    e.gridWidth,
 16850                    e.gridHeight,
 16851                    e.gridOffsetX,
 16852                    e.gridOffsetY,
 16853                    e.gridVectorX,
 16854                    e.gridVectorY,
 16855                    c,
 16856                  );
 16857                this.drawBitmap(o, l);
 16858              }
 16859              onImmediateLosslessHalftoneRegion() {
 16860                this.onImmediateHalftoneRegion(...arguments);
 16861              }
 16862              onTables(e, t, a, r) {
 16863                let i = this.customTables;
 16864                i || (this.customTables = i = {});
 16865                i[e] = (function decodeTablesSegment(e, t, a) {
 16866                  const r = e[t],
 16867                    i = 4294967295 & (0, n.readUint32)(e, t + 1),
 16868                    s = 4294967295 & (0, n.readUint32)(e, t + 5),
 16869                    o = new Reader(e, t + 9, a),
 16870                    c = 1 + ((r >> 1) & 7),
 16871                    l = 1 + ((r >> 4) & 7),
 16872                    h = [];
 16873                  let u,
 16874                    d,
 16875                    f = i;
 16876                  do {
 16877                    u = o.readBits(c);
 16878                    d = o.readBits(l);
 16879                    h.push(new HuffmanLine([f, u, d, 0]));
 16880                    f += 1 << d;
 16881                  } while (f < s);
 16882                  u = o.readBits(c);
 16883                  h.push(new HuffmanLine([i - 1, u, 32, 0, "lower"]));
 16884                  u = o.readBits(c);
 16885                  h.push(new HuffmanLine([s, u, 32, 0]));
 16886                  if (1 & r) {
 16887                    u = o.readBits(c);
 16888                    h.push(new HuffmanLine([u, 0]));
 16889                  }
 16890                  return new HuffmanTable(h, !1);
 16891                })(t, a, r);
 16892              }
 16893            }
 16894            class HuffmanLine {
 16895              constructor(e) {
 16896                if (2 === e.length) {
 16897                  this.isOOB = !0;
 16898                  this.rangeLow = 0;
 16899                  this.prefixLength = e[0];
 16900                  this.rangeLength = 0;
 16901                  this.prefixCode = e[1];
 16902                  this.isLowerRange = !1;
 16903                } else {
 16904                  this.isOOB = !1;
 16905                  this.rangeLow = e[0];
 16906                  this.prefixLength = e[1];
 16907                  this.rangeLength = e[2];
 16908                  this.prefixCode = e[3];
 16909                  this.isLowerRange = "lower" === e[4];
 16910                }
 16911              }
 16912            }
 16913            class HuffmanTreeNode {
 16914              constructor(e) {
 16915                this.children = [];
 16916                if (e) {
 16917                  this.isLeaf = !0;
 16918                  this.rangeLength = e.rangeLength;
 16919                  this.rangeLow = e.rangeLow;
 16920                  this.isLowerRange = e.isLowerRange;
 16921                  this.isOOB = e.isOOB;
 16922                } else this.isLeaf = !1;
 16923              }
 16924              buildTree(e, t) {
 16925                const a = (e.prefixCode >> t) & 1;
 16926                if (t <= 0) this.children[a] = new HuffmanTreeNode(e);
 16927                else {
 16928                  let r = this.children[a];
 16929                  r || (this.children[a] = r = new HuffmanTreeNode(null));
 16930                  r.buildTree(e, t - 1);
 16931                }
 16932              }
 16933              decodeNode(e) {
 16934                if (this.isLeaf) {
 16935                  if (this.isOOB) return null;
 16936                  const t = e.readBits(this.rangeLength);
 16937                  return this.rangeLow + (this.isLowerRange ? -t : t);
 16938                }
 16939                const t = this.children[e.readBit()];
 16940                if (!t) throw new Jbig2Error("invalid Huffman data");
 16941                return t.decodeNode(e);
 16942              }
 16943            }
 16944            class HuffmanTable {
 16945              constructor(e, t) {
 16946                t || this.assignPrefixCodes(e);
 16947                this.rootNode = new HuffmanTreeNode(null);
 16948                for (let t = 0, a = e.length; t < a; t++) {
 16949                  const a = e[t];
 16950                  a.prefixLength > 0 &&
 16951                    this.rootNode.buildTree(a, a.prefixLength - 1);
 16952                }
 16953              }
 16954              decode(e) {
 16955                return this.rootNode.decodeNode(e);
 16956              }
 16957              assignPrefixCodes(e) {
 16958                const t = e.length;
 16959                let a = 0;
 16960                for (let r = 0; r < t; r++) a = Math.max(a, e[r].prefixLength);
 16961                const r = new Uint32Array(a + 1);
 16962                for (let a = 0; a < t; a++) r[e[a].prefixLength]++;
 16963                let n,
 16964                  i,
 16965                  s,
 16966                  o = 1,
 16967                  c = 0;
 16968                r[0] = 0;
 16969                for (; o <= a; ) {
 16970                  c = (c + r[o - 1]) << 1;
 16971                  n = c;
 16972                  i = 0;
 16973                  for (; i < t; ) {
 16974                    s = e[i];
 16975                    if (s.prefixLength === o) {
 16976                      s.prefixCode = n;
 16977                      n++;
 16978                    }
 16979                    i++;
 16980                  }
 16981                  o++;
 16982                }
 16983              }
 16984            }
 16985            const p = {};
 16986            function getStandardTable(e) {
 16987              let t,
 16988                a = p[e];
 16989              if (a) return a;
 16990              switch (e) {
 16991                case 1:
 16992                  t = [
 16993                    [0, 1, 4, 0],
 16994                    [16, 2, 8, 2],
 16995                    [272, 3, 16, 6],
 16996                    [65808, 3, 32, 7],
 16997                  ];
 16998                  break;
 16999                case 2:
 17000                  t = [
 17001                    [0, 1, 0, 0],
 17002                    [1, 2, 0, 2],
 17003                    [2, 3, 0, 6],
 17004                    [3, 4, 3, 14],
 17005                    [11, 5, 6, 30],
 17006                    [75, 6, 32, 62],
 17007                    [6, 63],
 17008                  ];
 17009                  break;
 17010                case 3:
 17011                  t = [
 17012                    [-256, 8, 8, 254],
 17013                    [0, 1, 0, 0],
 17014                    [1, 2, 0, 2],
 17015                    [2, 3, 0, 6],
 17016                    [3, 4, 3, 14],
 17017                    [11, 5, 6, 30],
 17018                    [-257, 8, 32, 255, "lower"],
 17019                    [75, 7, 32, 126],
 17020                    [6, 62],
 17021                  ];
 17022                  break;
 17023                case 4:
 17024                  t = [
 17025                    [1, 1, 0, 0],
 17026                    [2, 2, 0, 2],
 17027                    [3, 3, 0, 6],
 17028                    [4, 4, 3, 14],
 17029                    [12, 5, 6, 30],
 17030                    [76, 5, 32, 31],
 17031                  ];
 17032                  break;
 17033                case 5:
 17034                  t = [
 17035                    [-255, 7, 8, 126],
 17036                    [1, 1, 0, 0],
 17037                    [2, 2, 0, 2],
 17038                    [3, 3, 0, 6],
 17039                    [4, 4, 3, 14],
 17040                    [12, 5, 6, 30],
 17041                    [-256, 7, 32, 127, "lower"],
 17042                    [76, 6, 32, 62],
 17043                  ];
 17044                  break;
 17045                case 6:
 17046                  t = [
 17047                    [-2048, 5, 10, 28],
 17048                    [-1024, 4, 9, 8],
 17049                    [-512, 4, 8, 9],
 17050                    [-256, 4, 7, 10],
 17051                    [-128, 5, 6, 29],
 17052                    [-64, 5, 5, 30],
 17053                    [-32, 4, 5, 11],
 17054                    [0, 2, 7, 0],
 17055                    [128, 3, 7, 2],
 17056                    [256, 3, 8, 3],
 17057                    [512, 4, 9, 12],
 17058                    [1024, 4, 10, 13],
 17059                    [-2049, 6, 32, 62, "lower"],
 17060                    [2048, 6, 32, 63],
 17061                  ];
 17062                  break;
 17063                case 7:
 17064                  t = [
 17065                    [-1024, 4, 9, 8],
 17066                    [-512, 3, 8, 0],
 17067                    [-256, 4, 7, 9],
 17068                    [-128, 5, 6, 26],
 17069                    [-64, 5, 5, 27],
 17070                    [-32, 4, 5, 10],
 17071                    [0, 4, 5, 11],
 17072                    [32, 5, 5, 28],
 17073                    [64, 5, 6, 29],
 17074                    [128, 4, 7, 12],
 17075                    [256, 3, 8, 1],
 17076                    [512, 3, 9, 2],
 17077                    [1024, 3, 10, 3],
 17078                    [-1025, 5, 32, 30, "lower"],
 17079                    [2048, 5, 32, 31],
 17080                  ];
 17081                  break;
 17082                case 8:
 17083                  t = [
 17084                    [-15, 8, 3, 252],
 17085                    [-7, 9, 1, 508],
 17086                    [-5, 8, 1, 253],
 17087                    [-3, 9, 0, 509],
 17088                    [-2, 7, 0, 124],
 17089                    [-1, 4, 0, 10],
 17090                    [0, 2, 1, 0],
 17091                    [2, 5, 0, 26],
 17092                    [3, 6, 0, 58],
 17093                    [4, 3, 4, 4],
 17094                    [20, 6, 1, 59],
 17095                    [22, 4, 4, 11],
 17096                    [38, 4, 5, 12],
 17097                    [70, 5, 6, 27],
 17098                    [134, 5, 7, 28],
 17099                    [262, 6, 7, 60],
 17100                    [390, 7, 8, 125],
 17101                    [646, 6, 10, 61],
 17102                    [-16, 9, 32, 510, "lower"],
 17103                    [1670, 9, 32, 511],
 17104                    [2, 1],
 17105                  ];
 17106                  break;
 17107                case 9:
 17108                  t = [
 17109                    [-31, 8, 4, 252],
 17110                    [-15, 9, 2, 508],
 17111                    [-11, 8, 2, 253],
 17112                    [-7, 9, 1, 509],
 17113                    [-5, 7, 1, 124],
 17114                    [-3, 4, 1, 10],
 17115                    [-1, 3, 1, 2],
 17116                    [1, 3, 1, 3],
 17117                    [3, 5, 1, 26],
 17118                    [5, 6, 1, 58],
 17119                    [7, 3, 5, 4],
 17120                    [39, 6, 2, 59],
 17121                    [43, 4, 5, 11],
 17122                    [75, 4, 6, 12],
 17123                    [139, 5, 7, 27],
 17124                    [267, 5, 8, 28],
 17125                    [523, 6, 8, 60],
 17126                    [779, 7, 9, 125],
 17127                    [1291, 6, 11, 61],
 17128                    [-32, 9, 32, 510, "lower"],
 17129                    [3339, 9, 32, 511],
 17130                    [2, 0],
 17131                  ];
 17132                  break;
 17133                case 10:
 17134                  t = [
 17135                    [-21, 7, 4, 122],
 17136                    [-5, 8, 0, 252],
 17137                    [-4, 7, 0, 123],
 17138                    [-3, 5, 0, 24],
 17139                    [-2, 2, 2, 0],
 17140                    [2, 5, 0, 25],
 17141                    [3, 6, 0, 54],
 17142                    [4, 7, 0, 124],
 17143                    [5, 8, 0, 253],
 17144                    [6, 2, 6, 1],
 17145                    [70, 5, 5, 26],
 17146                    [102, 6, 5, 55],
 17147                    [134, 6, 6, 56],
 17148                    [198, 6, 7, 57],
 17149                    [326, 6, 8, 58],
 17150                    [582, 6, 9, 59],
 17151                    [1094, 6, 10, 60],
 17152                    [2118, 7, 11, 125],
 17153                    [-22, 8, 32, 254, "lower"],
 17154                    [4166, 8, 32, 255],
 17155                    [2, 2],
 17156                  ];
 17157                  break;
 17158                case 11:
 17159                  t = [
 17160                    [1, 1, 0, 0],
 17161                    [2, 2, 1, 2],
 17162                    [4, 4, 0, 12],
 17163                    [5, 4, 1, 13],
 17164                    [7, 5, 1, 28],
 17165                    [9, 5, 2, 29],
 17166                    [13, 6, 2, 60],
 17167                    [17, 7, 2, 122],
 17168                    [21, 7, 3, 123],
 17169                    [29, 7, 4, 124],
 17170                    [45, 7, 5, 125],
 17171                    [77, 7, 6, 126],
 17172                    [141, 7, 32, 127],
 17173                  ];
 17174                  break;
 17175                case 12:
 17176                  t = [
 17177                    [1, 1, 0, 0],
 17178                    [2, 2, 0, 2],
 17179                    [3, 3, 1, 6],
 17180                    [5, 5, 0, 28],
 17181                    [6, 5, 1, 29],
 17182                    [8, 6, 1, 60],
 17183                    [10, 7, 0, 122],
 17184                    [11, 7, 1, 123],
 17185                    [13, 7, 2, 124],
 17186                    [17, 7, 3, 125],
 17187                    [25, 7, 4, 126],
 17188                    [41, 8, 5, 254],
 17189                    [73, 8, 32, 255],
 17190                  ];
 17191                  break;
 17192                case 13:
 17193                  t = [
 17194                    [1, 1, 0, 0],
 17195                    [2, 3, 0, 4],
 17196                    [3, 4, 0, 12],
 17197                    [4, 5, 0, 28],
 17198                    [5, 4, 1, 13],
 17199                    [7, 3, 3, 5],
 17200                    [15, 6, 1, 58],
 17201                    [17, 6, 2, 59],
 17202                    [21, 6, 3, 60],
 17203                    [29, 6, 4, 61],
 17204                    [45, 6, 5, 62],
 17205                    [77, 7, 6, 126],
 17206                    [141, 7, 32, 127],
 17207                  ];
 17208                  break;
 17209                case 14:
 17210                  t = [
 17211                    [-2, 3, 0, 4],
 17212                    [-1, 3, 0, 5],
 17213                    [0, 1, 0, 0],
 17214                    [1, 3, 0, 6],
 17215                    [2, 3, 0, 7],
 17216                  ];
 17217                  break;
 17218                case 15:
 17219                  t = [
 17220                    [-24, 7, 4, 124],
 17221                    [-8, 6, 2, 60],
 17222                    [-4, 5, 1, 28],
 17223                    [-2, 4, 0, 12],
 17224                    [-1, 3, 0, 4],
 17225                    [0, 1, 0, 0],
 17226                    [1, 3, 0, 5],
 17227                    [2, 4, 0, 13],
 17228                    [3, 5, 1, 29],
 17229                    [5, 6, 2, 61],
 17230                    [9, 7, 4, 125],
 17231                    [-25, 7, 32, 126, "lower"],
 17232                    [25, 7, 32, 127],
 17233                  ];
 17234                  break;
 17235                default:
 17236                  throw new Jbig2Error(`standard table B.${e} does not exist`);
 17237              }
 17238              for (let e = 0, a = t.length; e < a; e++)
 17239                t[e] = new HuffmanLine(t[e]);
 17240              a = new HuffmanTable(t, !0);
 17241              p[e] = a;
 17242              return a;
 17243            }
 17244            class Reader {
 17245              constructor(e, t, a) {
 17246                this.data = e;
 17247                this.start = t;
 17248                this.end = a;
 17249                this.position = t;
 17250                this.shift = -1;
 17251                this.currentByte = 0;
 17252              }
 17253              readBit() {
 17254                if (this.shift < 0) {
 17255                  if (this.position >= this.end)
 17256                    throw new Jbig2Error("end of data while reading bit");
 17257                  this.currentByte = this.data[this.position++];
 17258                  this.shift = 7;
 17259                }
 17260                const e = (this.currentByte >> this.shift) & 1;
 17261                this.shift--;
 17262                return e;
 17263              }
 17264              readBits(e) {
 17265                let t,
 17266                  a = 0;
 17267                for (t = e - 1; t >= 0; t--) a |= this.readBit() << t;
 17268                return a;
 17269              }
 17270              byteAlign() {
 17271                this.shift = -1;
 17272              }
 17273              next() {
 17274                return this.position >= this.end
 17275                  ? -1
 17276                  : this.data[this.position++];
 17277              }
 17278            }
 17279            function getCustomHuffmanTable(e, t, a) {
 17280              let r = 0;
 17281              for (let n = 0, i = t.length; n < i; n++) {
 17282                const i = a[t[n]];
 17283                if (i) {
 17284                  if (e === r) return i;
 17285                  r++;
 17286                }
 17287              }
 17288              throw new Jbig2Error("can't find custom Huffman table");
 17289            }
 17290            function readUncompressedBitmap(e, t, a) {
 17291              const r = [];
 17292              for (let n = 0; n < a; n++) {
 17293                const a = new Uint8Array(t);
 17294                r.push(a);
 17295                for (let r = 0; r < t; r++) a[r] = e.readBit();
 17296                e.byteAlign();
 17297              }
 17298              return r;
 17299            }
 17300            function decodeMMRBitmap(e, t, a, r) {
 17301              const n = {
 17302                  K: -1,
 17303                  Columns: t,
 17304                  Rows: a,
 17305                  BlackIs1: !0,
 17306                  EndOfBlock: r,
 17307                },
 17308                i = new s.CCITTFaxDecoder(e, n),
 17309                o = [];
 17310              let c,
 17311                l = !1;
 17312              for (let e = 0; e < a; e++) {
 17313                const e = new Uint8Array(t);
 17314                o.push(e);
 17315                let a = -1;
 17316                for (let r = 0; r < t; r++) {
 17317                  if (a < 0) {
 17318                    c = i.readNextChar();
 17319                    if (-1 === c) {
 17320                      c = 0;
 17321                      l = !0;
 17322                    }
 17323                    a = 7;
 17324                  }
 17325                  e[r] = (c >> a) & 1;
 17326                  a--;
 17327                }
 17328              }
 17329              if (r && !l) {
 17330                const e = 5;
 17331                for (let t = 0; t < e && -1 !== i.readNextChar(); t++);
 17332              }
 17333              return o;
 17334            }
 17335            t.Jbig2Image = class Jbig2Image {
 17336              parseChunks(e) {
 17337                return (function parseJbig2Chunks(e) {
 17338                  const t = new SimpleSegmentVisitor();
 17339                  for (let a = 0, r = e.length; a < r; a++) {
 17340                    const r = e[a];
 17341                    processSegments(readSegments({}, r.data, r.start, r.end), t);
 17342                  }
 17343                  return t.buffer;
 17344                })(e);
 17345              }
 17346              parse(e) {
 17347                throw new Error("Not implemented: Jbig2Image.parse");
 17348              }
 17349            };
 17350          },
 17351          (e, t) => {
 17352            Object.defineProperty(t, "__esModule", { value: !0 });
 17353            t.ArithmeticDecoder = void 0;
 17354            const a = [
 17355              { qe: 22017, nmps: 1, nlps: 1, switchFlag: 1 },
 17356              { qe: 13313, nmps: 2, nlps: 6, switchFlag: 0 },
 17357              { qe: 6145, nmps: 3, nlps: 9, switchFlag: 0 },
 17358              { qe: 2753, nmps: 4, nlps: 12, switchFlag: 0 },
 17359              { qe: 1313, nmps: 5, nlps: 29, switchFlag: 0 },
 17360              { qe: 545, nmps: 38, nlps: 33, switchFlag: 0 },
 17361              { qe: 22017, nmps: 7, nlps: 6, switchFlag: 1 },
 17362              { qe: 21505, nmps: 8, nlps: 14, switchFlag: 0 },
 17363              { qe: 18433, nmps: 9, nlps: 14, switchFlag: 0 },
 17364              { qe: 14337, nmps: 10, nlps: 14, switchFlag: 0 },
 17365              { qe: 12289, nmps: 11, nlps: 17, switchFlag: 0 },
 17366              { qe: 9217, nmps: 12, nlps: 18, switchFlag: 0 },
 17367              { qe: 7169, nmps: 13, nlps: 20, switchFlag: 0 },
 17368              { qe: 5633, nmps: 29, nlps: 21, switchFlag: 0 },
 17369              { qe: 22017, nmps: 15, nlps: 14, switchFlag: 1 },
 17370              { qe: 21505, nmps: 16, nlps: 14, switchFlag: 0 },
 17371              { qe: 20737, nmps: 17, nlps: 15, switchFlag: 0 },
 17372              { qe: 18433, nmps: 18, nlps: 16, switchFlag: 0 },
 17373              { qe: 14337, nmps: 19, nlps: 17, switchFlag: 0 },
 17374              { qe: 13313, nmps: 20, nlps: 18, switchFlag: 0 },
 17375              { qe: 12289, nmps: 21, nlps: 19, switchFlag: 0 },
 17376              { qe: 10241, nmps: 22, nlps: 19, switchFlag: 0 },
 17377              { qe: 9217, nmps: 23, nlps: 20, switchFlag: 0 },
 17378              { qe: 8705, nmps: 24, nlps: 21, switchFlag: 0 },
 17379              { qe: 7169, nmps: 25, nlps: 22, switchFlag: 0 },
 17380              { qe: 6145, nmps: 26, nlps: 23, switchFlag: 0 },
 17381              { qe: 5633, nmps: 27, nlps: 24, switchFlag: 0 },
 17382              { qe: 5121, nmps: 28, nlps: 25, switchFlag: 0 },
 17383              { qe: 4609, nmps: 29, nlps: 26, switchFlag: 0 },
 17384              { qe: 4353, nmps: 30, nlps: 27, switchFlag: 0 },
 17385              { qe: 2753, nmps: 31, nlps: 28, switchFlag: 0 },
 17386              { qe: 2497, nmps: 32, nlps: 29, switchFlag: 0 },
 17387              { qe: 2209, nmps: 33, nlps: 30, switchFlag: 0 },
 17388              { qe: 1313, nmps: 34, nlps: 31, switchFlag: 0 },
 17389              { qe: 1089, nmps: 35, nlps: 32, switchFlag: 0 },
 17390              { qe: 673, nmps: 36, nlps: 33, switchFlag: 0 },
 17391              { qe: 545, nmps: 37, nlps: 34, switchFlag: 0 },
 17392              { qe: 321, nmps: 38, nlps: 35, switchFlag: 0 },
 17393              { qe: 273, nmps: 39, nlps: 36, switchFlag: 0 },
 17394              { qe: 133, nmps: 40, nlps: 37, switchFlag: 0 },
 17395              { qe: 73, nmps: 41, nlps: 38, switchFlag: 0 },
 17396              { qe: 37, nmps: 42, nlps: 39, switchFlag: 0 },
 17397              { qe: 21, nmps: 43, nlps: 40, switchFlag: 0 },
 17398              { qe: 9, nmps: 44, nlps: 41, switchFlag: 0 },
 17399              { qe: 5, nmps: 45, nlps: 42, switchFlag: 0 },
 17400              { qe: 1, nmps: 45, nlps: 43, switchFlag: 0 },
 17401              { qe: 22017, nmps: 46, nlps: 46, switchFlag: 0 },
 17402            ];
 17403            t.ArithmeticDecoder = class ArithmeticDecoder {
 17404              constructor(e, t, a) {
 17405                this.data = e;
 17406                this.bp = t;
 17407                this.dataEnd = a;
 17408                this.chigh = e[t];
 17409                this.clow = 0;
 17410                this.byteIn();
 17411                this.chigh =
 17412                  ((this.chigh << 7) & 65535) | ((this.clow >> 9) & 127);
 17413                this.clow = (this.clow << 7) & 65535;
 17414                this.ct -= 7;
 17415                this.a = 32768;
 17416              }
 17417              byteIn() {
 17418                const e = this.data;
 17419                let t = this.bp;
 17420                if (255 === e[t])
 17421                  if (e[t + 1] > 143) {
 17422                    this.clow += 65280;
 17423                    this.ct = 8;
 17424                  } else {
 17425                    t++;
 17426                    this.clow += e[t] << 9;
 17427                    this.ct = 7;
 17428                    this.bp = t;
 17429                  }
 17430                else {
 17431                  t++;
 17432                  this.clow += t < this.dataEnd ? e[t] << 8 : 65280;
 17433                  this.ct = 8;
 17434                  this.bp = t;
 17435                }
 17436                if (this.clow > 65535) {
 17437                  this.chigh += this.clow >> 16;
 17438                  this.clow &= 65535;
 17439                }
 17440              }
 17441              readBit(e, t) {
 17442                let r = e[t] >> 1,
 17443                  n = 1 & e[t];
 17444                const i = a[r],
 17445                  s = i.qe;
 17446                let o,
 17447                  c = this.a - s;
 17448                if (this.chigh < s)
 17449                  if (c < s) {
 17450                    c = s;
 17451                    o = n;
 17452                    r = i.nmps;
 17453                  } else {
 17454                    c = s;
 17455                    o = 1 ^ n;
 17456                    1 === i.switchFlag && (n = o);
 17457                    r = i.nlps;
 17458                  }
 17459                else {
 17460                  this.chigh -= s;
 17461                  if (0 != (32768 & c)) {
 17462                    this.a = c;
 17463                    return n;
 17464                  }
 17465                  if (c < s) {
 17466                    o = 1 ^ n;
 17467                    1 === i.switchFlag && (n = o);
 17468                    r = i.nlps;
 17469                  } else {
 17470                    o = n;
 17471                    r = i.nmps;
 17472                  }
 17473                }
 17474                do {
 17475                  0 === this.ct && this.byteIn();
 17476                  c <<= 1;
 17477                  this.chigh =
 17478                    ((this.chigh << 1) & 65535) | ((this.clow >> 15) & 1);
 17479                  this.clow = (this.clow << 1) & 65535;
 17480                  this.ct--;
 17481                } while (0 == (32768 & c));
 17482                this.a = c;
 17483                e[t] = (r << 1) | n;
 17484                return o;
 17485              }
 17486            };
 17487          },
 17488          (e, t, a) => {
 17489            Object.defineProperty(t, "__esModule", { value: !0 });
 17490            t.JpegStream = void 0;
 17491            var r = a(18),
 17492              n = a(4),
 17493              i = a(27),
 17494              s = a(2);
 17495            class JpegStream extends r.DecodeStream {
 17496              constructor(e, t, a) {
 17497                let r;
 17498                for (; -1 !== (r = e.getByte()); )
 17499                  if (255 === r) {
 17500                    e.skip(-1);
 17501                    break;
 17502                  }
 17503                super(t);
 17504                this.stream = e;
 17505                this.dict = e.dict;
 17506                this.maybeLength = t;
 17507                this.params = a;
 17508              }
 17509              get bytes() {
 17510                return (0, s.shadow)(
 17511                  this,
 17512                  "bytes",
 17513                  this.stream.getBytes(this.maybeLength),
 17514                );
 17515              }
 17516              ensureBuffer(e) {}
 17517              readBlock() {
 17518                if (this.eof) return;
 17519                const e = { decodeTransform: void 0, colorTransform: void 0 },
 17520                  t = this.dict.getArray("D", "Decode");
 17521                if ((this.forceRGBA || this.forceRGB) && Array.isArray(t)) {
 17522                  const a = this.dict.get("BPC", "BitsPerComponent") || 8,
 17523                    r = t.length,
 17524                    n = new Int32Array(r);
 17525                  let i = !1;
 17526                  const s = (1 << a) - 1;
 17527                  for (let e = 0; e < r; e += 2) {
 17528                    n[e] = (256 * (t[e + 1] - t[e])) | 0;
 17529                    n[e + 1] = (t[e] * s) | 0;
 17530                    (256 === n[e] && 0 === n[e + 1]) || (i = !0);
 17531                  }
 17532                  i && (e.decodeTransform = n);
 17533                }
 17534                if (this.params instanceof n.Dict) {
 17535                  const t = this.params.get("ColorTransform");
 17536                  Number.isInteger(t) && (e.colorTransform = t);
 17537                }
 17538                const a = new i.JpegImage(e);
 17539                a.parse(this.bytes);
 17540                const r = a.getData({
 17541                  width: this.drawWidth,
 17542                  height: this.drawHeight,
 17543                  forceRGBA: this.forceRGBA,
 17544                  forceRGB: this.forceRGB,
 17545                  isSourcePDF: !0,
 17546                });
 17547                this.buffer = r;
 17548                this.bufferLength = r.length;
 17549                this.eof = !0;
 17550              }
 17551            }
 17552            t.JpegStream = JpegStream;
 17553          },
 17554          (e, t, a) => {
 17555            Object.defineProperty(t, "__esModule", { value: !0 });
 17556            t.JpegImage = void 0;
 17557            var r = a(2),
 17558              n = a(28),
 17559              i = a(3);
 17560            class JpegError extends r.BaseException {
 17561              constructor(e) {
 17562                super(`JPEG error: ${e}`, "JpegError");
 17563              }
 17564            }
 17565            class DNLMarkerError extends r.BaseException {
 17566              constructor(e, t) {
 17567                super(e, "DNLMarkerError");
 17568                this.scanLines = t;
 17569              }
 17570            }
 17571            class EOIMarkerError extends r.BaseException {
 17572              constructor(e) {
 17573                super(e, "EOIMarkerError");
 17574              }
 17575            }
 17576            const s = new Uint8Array([
 17577                0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19,
 17578                26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49,
 17579                56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52,
 17580                45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63,
 17581              ]),
 17582              o = 4017,
 17583              c = 799,
 17584              l = 3406,
 17585              h = 2276,
 17586              u = 1567,
 17587              d = 3784,
 17588              f = 5793,
 17589              g = 2896;
 17590            function buildHuffmanTable(e, t) {
 17591              let a,
 17592                r,
 17593                n = 0,
 17594                i = 16;
 17595              for (; i > 0 && !e[i - 1]; ) i--;
 17596              const s = [{ children: [], index: 0 }];
 17597              let o,
 17598                c = s[0];
 17599              for (a = 0; a < i; a++) {
 17600                for (r = 0; r < e[a]; r++) {
 17601                  c = s.pop();
 17602                  c.children[c.index] = t[n];
 17603                  for (; c.index > 0; ) c = s.pop();
 17604                  c.index++;
 17605                  s.push(c);
 17606                  for (; s.length <= a; ) {
 17607                    s.push((o = { children: [], index: 0 }));
 17608                    c.children[c.index] = o.children;
 17609                    c = o;
 17610                  }
 17611                  n++;
 17612                }
 17613                if (a + 1 < i) {
 17614                  s.push((o = { children: [], index: 0 }));
 17615                  c.children[c.index] = o.children;
 17616                  c = o;
 17617                }
 17618              }
 17619              return s[0].children;
 17620            }
 17621            function getBlockBufferOffset(e, t, a) {
 17622              return 64 * ((e.blocksPerLine + 1) * t + a);
 17623            }
 17624            function decodeScan(e, t, a, n, o, c, l, h, u, d = !1) {
 17625              const f = a.mcusPerLine,
 17626                g = a.progressive,
 17627                p = t;
 17628              let m = 0,
 17629                b = 0;
 17630              function readBit() {
 17631                if (b > 0) {
 17632                  b--;
 17633                  return (m >> b) & 1;
 17634                }
 17635                m = e[t++];
 17636                if (255 === m) {
 17637                  const r = e[t++];
 17638                  if (r) {
 17639                    if (220 === r && d) {
 17640                      t += 2;
 17641                      const r = (0, i.readUint16)(e, t);
 17642                      t += 2;
 17643                      if (r > 0 && r !== a.scanLines)
 17644                        throw new DNLMarkerError(
 17645                          "Found DNL marker (0xFFDC) while parsing scan data",
 17646                          r,
 17647                        );
 17648                    } else if (217 === r) {
 17649                      if (d) {
 17650                        const e = x * (8 === a.precision ? 8 : 0);
 17651                        if (e > 0 && Math.round(a.scanLines / e) >= 5)
 17652                          throw new DNLMarkerError(
 17653                            "Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",
 17654                            e,
 17655                          );
 17656                      }
 17657                      throw new EOIMarkerError(
 17658                        "Found EOI marker (0xFFD9) while parsing scan data",
 17659                      );
 17660                    }
 17661                    throw new JpegError(
 17662                      `unexpected marker ${((m << 8) | r).toString(16)}`,
 17663                    );
 17664                  }
 17665                }
 17666                b = 7;
 17667                return m >>> 7;
 17668              }
 17669              function decodeHuffman(e) {
 17670                let t = e;
 17671                for (;;) {
 17672                  t = t[readBit()];
 17673                  switch (typeof t) {
 17674                    case "number":
 17675                      return t;
 17676                    case "object":
 17677                      continue;
 17678                  }
 17679                  throw new JpegError("invalid huffman sequence");
 17680                }
 17681              }
 17682              function receive(e) {
 17683                let t = 0;
 17684                for (; e > 0; ) {
 17685                  t = (t << 1) | readBit();
 17686                  e--;
 17687                }
 17688                return t;
 17689              }
 17690              function receiveAndExtend(e) {
 17691                if (1 === e) return 1 === readBit() ? 1 : -1;
 17692                const t = receive(e);
 17693                return t >= 1 << (e - 1) ? t : t + (-1 << e) + 1;
 17694              }
 17695              let y = 0;
 17696              let w,
 17697                S = 0;
 17698              let x = 0;
 17699              function decodeMcu(e, t, a, r, n) {
 17700                const i = a % f;
 17701                x = ((a / f) | 0) * e.v + r;
 17702                const s = i * e.h + n;
 17703                t(e, getBlockBufferOffset(e, x, s));
 17704              }
 17705              function decodeBlock(e, t, a) {
 17706                x = (a / e.blocksPerLine) | 0;
 17707                const r = a % e.blocksPerLine;
 17708                t(e, getBlockBufferOffset(e, x, r));
 17709              }
 17710              const C = n.length;
 17711              let k, v, F, O, T, M;
 17712              M = g
 17713                ? 0 === c
 17714                  ? 0 === h
 17715                    ? function decodeDCFirst(e, t) {
 17716                        const a = decodeHuffman(e.huffmanTableDC),
 17717                          r = 0 === a ? 0 : receiveAndExtend(a) << u;
 17718                        e.blockData[t] = e.pred += r;
 17719                      }
 17720                    : function decodeDCSuccessive(e, t) {
 17721                        e.blockData[t] |= readBit() << u;
 17722                      }
 17723                  : 0 === h
 17724                    ? function decodeACFirst(e, t) {
 17725                        if (y > 0) {
 17726                          y--;
 17727                          return;
 17728                        }
 17729                        let a = c;
 17730                        const r = l;
 17731                        for (; a <= r; ) {
 17732                          const r = decodeHuffman(e.huffmanTableAC),
 17733                            n = 15 & r,
 17734                            i = r >> 4;
 17735                          if (0 === n) {
 17736                            if (i < 15) {
 17737                              y = receive(i) + (1 << i) - 1;
 17738                              break;
 17739                            }
 17740                            a += 16;
 17741                            continue;
 17742                          }
 17743                          a += i;
 17744                          const o = s[a];
 17745                          e.blockData[t + o] = receiveAndExtend(n) * (1 << u);
 17746                          a++;
 17747                        }
 17748                      }
 17749                    : function decodeACSuccessive(e, t) {
 17750                        let a = c;
 17751                        const r = l;
 17752                        let n,
 17753                          i,
 17754                          o = 0;
 17755                        for (; a <= r; ) {
 17756                          const r = t + s[a],
 17757                            c = e.blockData[r] < 0 ? -1 : 1;
 17758                          switch (S) {
 17759                            case 0:
 17760                              i = decodeHuffman(e.huffmanTableAC);
 17761                              n = 15 & i;
 17762                              o = i >> 4;
 17763                              if (0 === n)
 17764                                if (o < 15) {
 17765                                  y = receive(o) + (1 << o);
 17766                                  S = 4;
 17767                                } else {
 17768                                  o = 16;
 17769                                  S = 1;
 17770                                }
 17771                              else {
 17772                                if (1 !== n)
 17773                                  throw new JpegError("invalid ACn encoding");
 17774                                w = receiveAndExtend(n);
 17775                                S = o ? 2 : 3;
 17776                              }
 17777                              continue;
 17778                            case 1:
 17779                            case 2:
 17780                              if (e.blockData[r])
 17781                                e.blockData[r] += c * (readBit() << u);
 17782                              else {
 17783                                o--;
 17784                                0 === o && (S = 2 === S ? 3 : 0);
 17785                              }
 17786                              break;
 17787                            case 3:
 17788                              if (e.blockData[r])
 17789                                e.blockData[r] += c * (readBit() << u);
 17790                              else {
 17791                                e.blockData[r] = w << u;
 17792                                S = 0;
 17793                              }
 17794                              break;
 17795                            case 4:
 17796                              e.blockData[r] &&
 17797                                (e.blockData[r] += c * (readBit() << u));
 17798                          }
 17799                          a++;
 17800                        }
 17801                        if (4 === S) {
 17802                          y--;
 17803                          0 === y && (S = 0);
 17804                        }
 17805                      }
 17806                : function decodeBaseline(e, t) {
 17807                    const a = decodeHuffman(e.huffmanTableDC),
 17808                      r = 0 === a ? 0 : receiveAndExtend(a);
 17809                    e.blockData[t] = e.pred += r;
 17810                    let n = 1;
 17811                    for (; n < 64; ) {
 17812                      const a = decodeHuffman(e.huffmanTableAC),
 17813                        r = 15 & a,
 17814                        i = a >> 4;
 17815                      if (0 === r) {
 17816                        if (i < 15) break;
 17817                        n += 16;
 17818                        continue;
 17819                      }
 17820                      n += i;
 17821                      const o = s[n];
 17822                      e.blockData[t + o] = receiveAndExtend(r);
 17823                      n++;
 17824                    }
 17825                  };
 17826              let D,
 17827                E = 0;
 17828              const N =
 17829                1 === C
 17830                  ? n[0].blocksPerLine * n[0].blocksPerColumn
 17831                  : f * a.mcusPerColumn;
 17832              let R, L;
 17833              for (; E <= N; ) {
 17834                const a = o ? Math.min(N - E, o) : N;
 17835                if (a > 0) {
 17836                  for (v = 0; v < C; v++) n[v].pred = 0;
 17837                  y = 0;
 17838                  if (1 === C) {
 17839                    k = n[0];
 17840                    for (T = 0; T < a; T++) {
 17841                      decodeBlock(k, M, E);
 17842                      E++;
 17843                    }
 17844                  } else
 17845                    for (T = 0; T < a; T++) {
 17846                      for (v = 0; v < C; v++) {
 17847                        k = n[v];
 17848                        R = k.h;
 17849                        L = k.v;
 17850                        for (F = 0; F < L; F++)
 17851                          for (O = 0; O < R; O++) decodeMcu(k, M, E, F, O);
 17852                      }
 17853                      E++;
 17854                    }
 17855                }
 17856                b = 0;
 17857                D = findNextFileMarker(e, t);
 17858                if (!D) break;
 17859                if (D.invalid) {
 17860                  const e = a > 0 ? "unexpected" : "excessive";
 17861                  (0, r.warn)(
 17862                    `decodeScan - ${e} MCU data, current marker is: ${D.invalid}`,
 17863                  );
 17864                  t = D.offset;
 17865                }
 17866                if (!(D.marker >= 65488 && D.marker <= 65495)) break;
 17867                t += 2;
 17868              }
 17869              return t - p;
 17870            }
 17871            function quantizeAndInverse(e, t, a) {
 17872              const r = e.quantizationTable,
 17873                n = e.blockData;
 17874              let i, s, p, m, b, y, w, S, x, C, k, v, F, O, T, M, D;
 17875              if (!r) throw new JpegError("missing required Quantization Table.");
 17876              for (let e = 0; e < 64; e += 8) {
 17877                x = n[t + e];
 17878                C = n[t + e + 1];
 17879                k = n[t + e + 2];
 17880                v = n[t + e + 3];
 17881                F = n[t + e + 4];
 17882                O = n[t + e + 5];
 17883                T = n[t + e + 6];
 17884                M = n[t + e + 7];
 17885                x *= r[e];
 17886                if (0 != (C | k | v | F | O | T | M)) {
 17887                  C *= r[e + 1];
 17888                  k *= r[e + 2];
 17889                  v *= r[e + 3];
 17890                  F *= r[e + 4];
 17891                  O *= r[e + 5];
 17892                  T *= r[e + 6];
 17893                  M *= r[e + 7];
 17894                  i = (f * x + 128) >> 8;
 17895                  s = (f * F + 128) >> 8;
 17896                  p = k;
 17897                  m = T;
 17898                  b = (g * (C - M) + 128) >> 8;
 17899                  S = (g * (C + M) + 128) >> 8;
 17900                  y = v << 4;
 17901                  w = O << 4;
 17902                  i = (i + s + 1) >> 1;
 17903                  s = i - s;
 17904                  D = (p * d + m * u + 128) >> 8;
 17905                  p = (p * u - m * d + 128) >> 8;
 17906                  m = D;
 17907                  b = (b + w + 1) >> 1;
 17908                  w = b - w;
 17909                  S = (S + y + 1) >> 1;
 17910                  y = S - y;
 17911                  i = (i + m + 1) >> 1;
 17912                  m = i - m;
 17913                  s = (s + p + 1) >> 1;
 17914                  p = s - p;
 17915                  D = (b * h + S * l + 2048) >> 12;
 17916                  b = (b * l - S * h + 2048) >> 12;
 17917                  S = D;
 17918                  D = (y * c + w * o + 2048) >> 12;
 17919                  y = (y * o - w * c + 2048) >> 12;
 17920                  w = D;
 17921                  a[e] = i + S;
 17922                  a[e + 7] = i - S;
 17923                  a[e + 1] = s + w;
 17924                  a[e + 6] = s - w;
 17925                  a[e + 2] = p + y;
 17926                  a[e + 5] = p - y;
 17927                  a[e + 3] = m + b;
 17928                  a[e + 4] = m - b;
 17929                } else {
 17930                  D = (f * x + 512) >> 10;
 17931                  a[e] = D;
 17932                  a[e + 1] = D;
 17933                  a[e + 2] = D;
 17934                  a[e + 3] = D;
 17935                  a[e + 4] = D;
 17936                  a[e + 5] = D;
 17937                  a[e + 6] = D;
 17938                  a[e + 7] = D;
 17939                }
 17940              }
 17941              for (let e = 0; e < 8; ++e) {
 17942                x = a[e];
 17943                C = a[e + 8];
 17944                k = a[e + 16];
 17945                v = a[e + 24];
 17946                F = a[e + 32];
 17947                O = a[e + 40];
 17948                T = a[e + 48];
 17949                M = a[e + 56];
 17950                if (0 != (C | k | v | F | O | T | M)) {
 17951                  i = (f * x + 2048) >> 12;
 17952                  s = (f * F + 2048) >> 12;
 17953                  p = k;
 17954                  m = T;
 17955                  b = (g * (C - M) + 2048) >> 12;
 17956                  S = (g * (C + M) + 2048) >> 12;
 17957                  y = v;
 17958                  w = O;
 17959                  i = 4112 + ((i + s + 1) >> 1);
 17960                  s = i - s;
 17961                  D = (p * d + m * u + 2048) >> 12;
 17962                  p = (p * u - m * d + 2048) >> 12;
 17963                  m = D;
 17964                  b = (b + w + 1) >> 1;
 17965                  w = b - w;
 17966                  S = (S + y + 1) >> 1;
 17967                  y = S - y;
 17968                  i = (i + m + 1) >> 1;
 17969                  m = i - m;
 17970                  s = (s + p + 1) >> 1;
 17971                  p = s - p;
 17972                  D = (b * h + S * l + 2048) >> 12;
 17973                  b = (b * l - S * h + 2048) >> 12;
 17974                  S = D;
 17975                  D = (y * c + w * o + 2048) >> 12;
 17976                  y = (y * o - w * c + 2048) >> 12;
 17977                  w = D;
 17978                  x = i + S;
 17979                  M = i - S;
 17980                  C = s + w;
 17981                  T = s - w;
 17982                  k = p + y;
 17983                  O = p - y;
 17984                  v = m + b;
 17985                  F = m - b;
 17986                  x < 16 ? (x = 0) : x >= 4080 ? (x = 255) : (x >>= 4);
 17987                  C < 16 ? (C = 0) : C >= 4080 ? (C = 255) : (C >>= 4);
 17988                  k < 16 ? (k = 0) : k >= 4080 ? (k = 255) : (k >>= 4);
 17989                  v < 16 ? (v = 0) : v >= 4080 ? (v = 255) : (v >>= 4);
 17990                  F < 16 ? (F = 0) : F >= 4080 ? (F = 255) : (F >>= 4);
 17991                  O < 16 ? (O = 0) : O >= 4080 ? (O = 255) : (O >>= 4);
 17992                  T < 16 ? (T = 0) : T >= 4080 ? (T = 255) : (T >>= 4);
 17993                  M < 16 ? (M = 0) : M >= 4080 ? (M = 255) : (M >>= 4);
 17994                  n[t + e] = x;
 17995                  n[t + e + 8] = C;
 17996                  n[t + e + 16] = k;
 17997                  n[t + e + 24] = v;
 17998                  n[t + e + 32] = F;
 17999                  n[t + e + 40] = O;
 18000                  n[t + e + 48] = T;
 18001                  n[t + e + 56] = M;
 18002                } else {
 18003                  D = (f * x + 8192) >> 14;
 18004                  D = D < -2040 ? 0 : D >= 2024 ? 255 : (D + 2056) >> 4;
 18005                  n[t + e] = D;
 18006                  n[t + e + 8] = D;
 18007                  n[t + e + 16] = D;
 18008                  n[t + e + 24] = D;
 18009                  n[t + e + 32] = D;
 18010                  n[t + e + 40] = D;
 18011                  n[t + e + 48] = D;
 18012                  n[t + e + 56] = D;
 18013                }
 18014              }
 18015            }
 18016            function buildComponentData(e, t) {
 18017              const a = t.blocksPerLine,
 18018                r = t.blocksPerColumn,
 18019                n = new Int16Array(64);
 18020              for (let e = 0; e < r; e++)
 18021                for (let r = 0; r < a; r++) {
 18022                  quantizeAndInverse(t, getBlockBufferOffset(t, e, r), n);
 18023                }
 18024              return t.blockData;
 18025            }
 18026            function findNextFileMarker(e, t, a = t) {
 18027              const r = e.length - 1;
 18028              let n = a < t ? a : t;
 18029              if (t >= r) return null;
 18030              const s = (0, i.readUint16)(e, t);
 18031              if (s >= 65472 && s <= 65534)
 18032                return { invalid: null, marker: s, offset: t };
 18033              let o = (0, i.readUint16)(e, n);
 18034              for (; !(o >= 65472 && o <= 65534); ) {
 18035                if (++n >= r) return null;
 18036                o = (0, i.readUint16)(e, n);
 18037              }
 18038              return { invalid: s.toString(16), marker: o, offset: n };
 18039            }
 18040            t.JpegImage = class JpegImage {
 18041              constructor({
 18042                decodeTransform: e = null,
 18043                colorTransform: t = -1,
 18044              } = {}) {
 18045                this._decodeTransform = e;
 18046                this._colorTransform = t;
 18047              }
 18048              parse(e, { dnlScanLines: t = null } = {}) {
 18049                function readDataBlock() {
 18050                  const t = (0, i.readUint16)(e, o);
 18051                  o += 2;
 18052                  let a = o + t - 2;
 18053                  const n = findNextFileMarker(e, a, o);
 18054                  if (n?.invalid) {
 18055                    (0, r.warn)(
 18056                      "readDataBlock - incorrect length, current marker is: " +
 18057                        n.invalid,
 18058                    );
 18059                    a = n.offset;
 18060                  }
 18061                  const s = e.subarray(o, a);
 18062                  o += s.length;
 18063                  return s;
 18064                }
 18065                function prepareComponents(e) {
 18066                  const t = Math.ceil(e.samplesPerLine / 8 / e.maxH),
 18067                    a = Math.ceil(e.scanLines / 8 / e.maxV);
 18068                  for (const r of e.components) {
 18069                    const n = Math.ceil(
 18070                        (Math.ceil(e.samplesPerLine / 8) * r.h) / e.maxH,
 18071                      ),
 18072                      i = Math.ceil((Math.ceil(e.scanLines / 8) * r.v) / e.maxV),
 18073                      s = t * r.h,
 18074                      o = 64 * (a * r.v) * (s + 1);
 18075                    r.blockData = new Int16Array(o);
 18076                    r.blocksPerLine = n;
 18077                    r.blocksPerColumn = i;
 18078                  }
 18079                  e.mcusPerLine = t;
 18080                  e.mcusPerColumn = a;
 18081                }
 18082                let a,
 18083                  n,
 18084                  o = 0,
 18085                  c = null,
 18086                  l = null,
 18087                  h = 0;
 18088                const u = [],
 18089                  d = [],
 18090                  f = [];
 18091                let g = (0, i.readUint16)(e, o);
 18092                o += 2;
 18093                if (65496 !== g) throw new JpegError("SOI not found");
 18094                g = (0, i.readUint16)(e, o);
 18095                o += 2;
 18096                e: for (; 65497 !== g; ) {
 18097                  let p, m, b;
 18098                  switch (g) {
 18099                    case 65504:
 18100                    case 65505:
 18101                    case 65506:
 18102                    case 65507:
 18103                    case 65508:
 18104                    case 65509:
 18105                    case 65510:
 18106                    case 65511:
 18107                    case 65512:
 18108                    case 65513:
 18109                    case 65514:
 18110                    case 65515:
 18111                    case 65516:
 18112                    case 65517:
 18113                    case 65518:
 18114                    case 65519:
 18115                    case 65534:
 18116                      const y = readDataBlock();
 18117                      65504 === g &&
 18118                        74 === y[0] &&
 18119                        70 === y[1] &&
 18120                        73 === y[2] &&
 18121                        70 === y[3] &&
 18122                        0 === y[4] &&
 18123                        (c = {
 18124                          version: { major: y[5], minor: y[6] },
 18125                          densityUnits: y[7],
 18126                          xDensity: (y[8] << 8) | y[9],
 18127                          yDensity: (y[10] << 8) | y[11],
 18128                          thumbWidth: y[12],
 18129                          thumbHeight: y[13],
 18130                          thumbData: y.subarray(14, 14 + 3 * y[12] * y[13]),
 18131                        });
 18132                      65518 === g &&
 18133                        65 === y[0] &&
 18134                        100 === y[1] &&
 18135                        111 === y[2] &&
 18136                        98 === y[3] &&
 18137                        101 === y[4] &&
 18138                        (l = {
 18139                          version: (y[5] << 8) | y[6],
 18140                          flags0: (y[7] << 8) | y[8],
 18141                          flags1: (y[9] << 8) | y[10],
 18142                          transformCode: y[11],
 18143                        });
 18144                      break;
 18145                    case 65499:
 18146                      const w = (0, i.readUint16)(e, o);
 18147                      o += 2;
 18148                      const S = w + o - 2;
 18149                      let x;
 18150                      for (; o < S; ) {
 18151                        const t = e[o++],
 18152                          a = new Uint16Array(64);
 18153                        if (t >> 4 == 0)
 18154                          for (m = 0; m < 64; m++) {
 18155                            x = s[m];
 18156                            a[x] = e[o++];
 18157                          }
 18158                        else {
 18159                          if (t >> 4 != 1)
 18160                            throw new JpegError("DQT - invalid table spec");
 18161                          for (m = 0; m < 64; m++) {
 18162                            x = s[m];
 18163                            a[x] = (0, i.readUint16)(e, o);
 18164                            o += 2;
 18165                          }
 18166                        }
 18167                        u[15 & t] = a;
 18168                      }
 18169                      break;
 18170                    case 65472:
 18171                    case 65473:
 18172                    case 65474:
 18173                      if (a)
 18174                        throw new JpegError("Only single frame JPEGs supported");
 18175                      o += 2;
 18176                      a = {};
 18177                      a.extended = 65473 === g;
 18178                      a.progressive = 65474 === g;
 18179                      a.precision = e[o++];
 18180                      const C = (0, i.readUint16)(e, o);
 18181                      o += 2;
 18182                      a.scanLines = t || C;
 18183                      a.samplesPerLine = (0, i.readUint16)(e, o);
 18184                      o += 2;
 18185                      a.components = [];
 18186                      a.componentIds = {};
 18187                      const k = e[o++];
 18188                      let v = 0,
 18189                        F = 0;
 18190                      for (p = 0; p < k; p++) {
 18191                        const t = e[o],
 18192                          r = e[o + 1] >> 4,
 18193                          n = 15 & e[o + 1];
 18194                        v < r && (v = r);
 18195                        F < n && (F = n);
 18196                        const i = e[o + 2];
 18197                        b = a.components.push({
 18198                          h: r,
 18199                          v: n,
 18200                          quantizationId: i,
 18201                          quantizationTable: null,
 18202                        });
 18203                        a.componentIds[t] = b - 1;
 18204                        o += 3;
 18205                      }
 18206                      a.maxH = v;
 18207                      a.maxV = F;
 18208                      prepareComponents(a);
 18209                      break;
 18210                    case 65476:
 18211                      const O = (0, i.readUint16)(e, o);
 18212                      o += 2;
 18213                      for (p = 2; p < O; ) {
 18214                        const t = e[o++],
 18215                          a = new Uint8Array(16);
 18216                        let r = 0;
 18217                        for (m = 0; m < 16; m++, o++) r += a[m] = e[o];
 18218                        const n = new Uint8Array(r);
 18219                        for (m = 0; m < r; m++, o++) n[m] = e[o];
 18220                        p += 17 + r;
 18221                        (t >> 4 == 0 ? f : d)[15 & t] = buildHuffmanTable(a, n);
 18222                      }
 18223                      break;
 18224                    case 65501:
 18225                      o += 2;
 18226                      n = (0, i.readUint16)(e, o);
 18227                      o += 2;
 18228                      break;
 18229                    case 65498:
 18230                      const T = 1 == ++h && !t;
 18231                      o += 2;
 18232                      const M = e[o++],
 18233                        D = [];
 18234                      for (p = 0; p < M; p++) {
 18235                        const t = e[o++],
 18236                          r = a.componentIds[t],
 18237                          n = a.components[r];
 18238                        n.index = t;
 18239                        const i = e[o++];
 18240                        n.huffmanTableDC = f[i >> 4];
 18241                        n.huffmanTableAC = d[15 & i];
 18242                        D.push(n);
 18243                      }
 18244                      const E = e[o++],
 18245                        N = e[o++],
 18246                        R = e[o++];
 18247                      try {
 18248                        const t = decodeScan(
 18249                          e,
 18250                          o,
 18251                          a,
 18252                          D,
 18253                          n,
 18254                          E,
 18255                          N,
 18256                          R >> 4,
 18257                          15 & R,
 18258                          T,
 18259                        );
 18260                        o += t;
 18261                      } catch (t) {
 18262                        if (t instanceof DNLMarkerError) {
 18263                          (0, r.warn)(
 18264                            `${t.message} -- attempting to re-parse the JPEG image.`,
 18265                          );
 18266                          return this.parse(e, { dnlScanLines: t.scanLines });
 18267                        }
 18268                        if (t instanceof EOIMarkerError) {
 18269                          (0, r.warn)(
 18270                            `${t.message} -- ignoring the rest of the image data.`,
 18271                          );
 18272                          break e;
 18273                        }
 18274                        throw t;
 18275                      }
 18276                      break;
 18277                    case 65500:
 18278                      o += 4;
 18279                      break;
 18280                    case 65535:
 18281                      255 !== e[o] && o--;
 18282                      break;
 18283                    default:
 18284                      const L = findNextFileMarker(e, o - 2, o - 3);
 18285                      if (L?.invalid) {
 18286                        (0, r.warn)(
 18287                          "JpegImage.parse - unexpected data, current marker is: " +
 18288                            L.invalid,
 18289                        );
 18290                        o = L.offset;
 18291                        break;
 18292                      }
 18293                      if (!L || o >= e.length - 1) {
 18294                        (0, r.warn)(
 18295                          "JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).",
 18296                        );
 18297                        break e;
 18298                      }
 18299                      throw new JpegError(
 18300                        "JpegImage.parse - unknown marker: " + g.toString(16),
 18301                      );
 18302                  }
 18303                  g = (0, i.readUint16)(e, o);
 18304                  o += 2;
 18305                }
 18306                this.width = a.samplesPerLine;
 18307                this.height = a.scanLines;
 18308                this.jfif = c;
 18309                this.adobe = l;
 18310                this.components = [];
 18311                for (const e of a.components) {
 18312                  const t = u[e.quantizationId];
 18313                  t && (e.quantizationTable = t);
 18314                  this.components.push({
 18315                    index: e.index,
 18316                    output: buildComponentData(0, e),
 18317                    scaleX: e.h / a.maxH,
 18318                    scaleY: e.v / a.maxV,
 18319                    blocksPerLine: e.blocksPerLine,
 18320                    blocksPerColumn: e.blocksPerColumn,
 18321                  });
 18322                }
 18323                this.numComponents = this.components.length;
 18324              }
 18325              _getLinearizedBlockData(e, t, a = !1) {
 18326                const r = this.width / e,
 18327                  n = this.height / t;
 18328                let i,
 18329                  s,
 18330                  o,
 18331                  c,
 18332                  l,
 18333                  h,
 18334                  u,
 18335                  d,
 18336                  f,
 18337                  g,
 18338                  p,
 18339                  m = 0;
 18340                const b = this.components.length,
 18341                  y = e * t * b,
 18342                  w = new Uint8ClampedArray(y),
 18343                  S = new Uint32Array(e),
 18344                  x = 4294967288;
 18345                let C;
 18346                for (u = 0; u < b; u++) {
 18347                  i = this.components[u];
 18348                  s = i.scaleX * r;
 18349                  o = i.scaleY * n;
 18350                  m = u;
 18351                  p = i.output;
 18352                  c = (i.blocksPerLine + 1) << 3;
 18353                  if (s !== C) {
 18354                    for (l = 0; l < e; l++) {
 18355                      d = 0 | (l * s);
 18356                      S[l] = ((d & x) << 3) | (7 & d);
 18357                    }
 18358                    C = s;
 18359                  }
 18360                  for (h = 0; h < t; h++) {
 18361                    d = 0 | (h * o);
 18362                    g = (c * (d & x)) | ((7 & d) << 3);
 18363                    for (l = 0; l < e; l++) {
 18364                      w[m] = p[g + S[l]];
 18365                      m += b;
 18366                    }
 18367                  }
 18368                }
 18369                let k = this._decodeTransform;
 18370                a ||
 18371                  4 !== b ||
 18372                  k ||
 18373                  (k = new Int32Array([
 18374                    -256, 255, -256, 255, -256, 255, -256, 255,
 18375                  ]));
 18376                if (k)
 18377                  for (u = 0; u < y; )
 18378                    for (d = 0, f = 0; d < b; d++, u++, f += 2)
 18379                      w[u] = ((w[u] * k[f]) >> 8) + k[f + 1];
 18380                return w;
 18381              }
 18382              get _isColorConversionNeeded() {
 18383                return this.adobe
 18384                  ? !!this.adobe.transformCode
 18385                  : 3 === this.numComponents
 18386                    ? 0 !== this._colorTransform &&
 18387                      (82 !== this.components[0].index ||
 18388                        71 !== this.components[1].index ||
 18389                        66 !== this.components[2].index)
 18390                    : 1 === this._colorTransform;
 18391              }
 18392              _convertYccToRgb(e) {
 18393                let t, a, r;
 18394                for (let n = 0, i = e.length; n < i; n += 3) {
 18395                  t = e[n];
 18396                  a = e[n + 1];
 18397                  r = e[n + 2];
 18398                  e[n] = t - 179.456 + 1.402 * r;
 18399                  e[n + 1] = t + 135.459 - 0.344 * a - 0.714 * r;
 18400                  e[n + 2] = t - 226.816 + 1.772 * a;
 18401                }
 18402                return e;
 18403              }
 18404              _convertYccToRgba(e, t) {
 18405                for (let a = 0, r = 0, n = e.length; a < n; a += 3, r += 4) {
 18406                  const n = e[a],
 18407                    i = e[a + 1],
 18408                    s = e[a + 2];
 18409                  t[r] = n - 179.456 + 1.402 * s;
 18410                  t[r + 1] = n + 135.459 - 0.344 * i - 0.714 * s;
 18411                  t[r + 2] = n - 226.816 + 1.772 * i;
 18412                  t[r + 3] = 255;
 18413                }
 18414                return t;
 18415              }
 18416              _convertYcckToRgb(e) {
 18417                let t,
 18418                  a,
 18419                  r,
 18420                  n,
 18421                  i = 0;
 18422                for (let s = 0, o = e.length; s < o; s += 4) {
 18423                  t = e[s];
 18424                  a = e[s + 1];
 18425                  r = e[s + 2];
 18426                  n = e[s + 3];
 18427                  e[i++] =
 18428                    a *
 18429                      (-660635669420364e-19 * a +
 18430                        0.000437130475926232 * r -
 18431                        54080610064599e-18 * t +
 18432                        0.00048449797120281 * n -
 18433                        0.154362151871126) -
 18434                    122.67195406894 +
 18435                    r *
 18436                      (-0.000957964378445773 * r +
 18437                        0.000817076911346625 * t -
 18438                        0.00477271405408747 * n +
 18439                        1.53380253221734) +
 18440                    t *
 18441                      (0.000961250184130688 * t -
 18442                        0.00266257332283933 * n +
 18443                        0.48357088451265) +
 18444                    n * (-0.000336197177618394 * n + 0.484791561490776);
 18445                  e[i++] =
 18446                    107.268039397724 +
 18447                    a *
 18448                      (219927104525741e-19 * a -
 18449                        0.000640992018297945 * r +
 18450                        0.000659397001245577 * t +
 18451                        0.000426105652938837 * n -
 18452                        0.176491792462875) +
 18453                    r *
 18454                      (-0.000778269941513683 * r +
 18455                        0.00130872261408275 * t +
 18456                        0.000770482631801132 * n -
 18457                        0.151051492775562) +
 18458                    t *
 18459                      (0.00126935368114843 * t -
 18460                        0.00265090189010898 * n +
 18461                        0.25802910206845) +
 18462                    n * (-0.000318913117588328 * n - 0.213742400323665);
 18463                  e[i++] =
 18464                    a *
 18465                      (-0.000570115196973677 * a -
 18466                        263409051004589e-19 * r +
 18467                        0.0020741088115012 * t -
 18468                        0.00288260236853442 * n +
 18469                        0.814272968359295) -
 18470                    20.810012546947 +
 18471                    r *
 18472                      (-153496057440975e-19 * r -
 18473                        0.000132689043961446 * t +
 18474                        0.000560833691242812 * n -
 18475                        0.195152027534049) +
 18476                    t *
 18477                      (0.00174418132927582 * t -
 18478                        0.00255243321439347 * n +
 18479                        0.116935020465145) +
 18480                    n * (-0.000343531996510555 * n + 0.24165260232407);
 18481                }
 18482                return e.subarray(0, i);
 18483              }
 18484              _convertYcckToRgba(e) {
 18485                for (let t = 0, a = e.length; t < a; t += 4) {
 18486                  const a = e[t],
 18487                    r = e[t + 1],
 18488                    n = e[t + 2],
 18489                    i = e[t + 3];
 18490                  e[t] =
 18491                    r *
 18492                      (-660635669420364e-19 * r +
 18493                        0.000437130475926232 * n -
 18494                        54080610064599e-18 * a +
 18495                        0.00048449797120281 * i -
 18496                        0.154362151871126) -
 18497                    122.67195406894 +
 18498                    n *
 18499                      (-0.000957964378445773 * n +
 18500                        0.000817076911346625 * a -
 18501                        0.00477271405408747 * i +
 18502                        1.53380253221734) +
 18503                    a *
 18504                      (0.000961250184130688 * a -
 18505                        0.00266257332283933 * i +
 18506                        0.48357088451265) +
 18507                    i * (-0.000336197177618394 * i + 0.484791561490776);
 18508                  e[t + 1] =
 18509                    107.268039397724 +
 18510                    r *
 18511                      (219927104525741e-19 * r -
 18512                        0.000640992018297945 * n +
 18513                        0.000659397001245577 * a +
 18514                        0.000426105652938837 * i -
 18515                        0.176491792462875) +
 18516                    n *
 18517                      (-0.000778269941513683 * n +
 18518                        0.00130872261408275 * a +
 18519                        0.000770482631801132 * i -
 18520                        0.151051492775562) +
 18521                    a *
 18522                      (0.00126935368114843 * a -
 18523                        0.00265090189010898 * i +
 18524                        0.25802910206845) +
 18525                    i * (-0.000318913117588328 * i - 0.213742400323665);
 18526                  e[t + 2] =
 18527                    r *
 18528                      (-0.000570115196973677 * r -
 18529                        263409051004589e-19 * n +
 18530                        0.0020741088115012 * a -
 18531                        0.00288260236853442 * i +
 18532                        0.814272968359295) -
 18533                    20.810012546947 +
 18534                    n *
 18535                      (-153496057440975e-19 * n -
 18536                        0.000132689043961446 * a +
 18537                        0.000560833691242812 * i -
 18538                        0.195152027534049) +
 18539                    a *
 18540                      (0.00174418132927582 * a -
 18541                        0.00255243321439347 * i +
 18542                        0.116935020465145) +
 18543                    i * (-0.000343531996510555 * i + 0.24165260232407);
 18544                  e[t + 3] = 255;
 18545                }
 18546                return e;
 18547              }
 18548              _convertYcckToCmyk(e) {
 18549                let t, a, r;
 18550                for (let n = 0, i = e.length; n < i; n += 4) {
 18551                  t = e[n];
 18552                  a = e[n + 1];
 18553                  r = e[n + 2];
 18554                  e[n] = 434.456 - t - 1.402 * r;
 18555                  e[n + 1] = 119.541 - t + 0.344 * a + 0.714 * r;
 18556                  e[n + 2] = 481.816 - t - 1.772 * a;
 18557                }
 18558                return e;
 18559              }
 18560              _convertCmykToRgb(e) {
 18561                let t,
 18562                  a,
 18563                  r,
 18564                  n,
 18565                  i = 0;
 18566                for (let s = 0, o = e.length; s < o; s += 4) {
 18567                  t = e[s];
 18568                  a = e[s + 1];
 18569                  r = e[s + 2];
 18570                  n = e[s + 3];
 18571                  e[i++] =
 18572                    255 +
 18573                    t *
 18574                      (-6747147073602441e-20 * t +
 18575                        0.0008379262121013727 * a +
 18576                        0.0002894718188643294 * r +
 18577                        0.003264231057537806 * n -
 18578                        1.1185611867203937) +
 18579                    a *
 18580                      (26374107616089405e-21 * a -
 18581                        8626949158638572e-20 * r -
 18582                        0.0002748769067499491 * n -
 18583                        0.02155688794978967) +
 18584                    r *
 18585                      (-3878099212869363e-20 * r -
 18586                        0.0003267808279485286 * n +
 18587                        0.0686742238595345) -
 18588                    n * (0.0003361971776183937 * n + 0.7430659151342254);
 18589                  e[i++] =
 18590                    255 +
 18591                    t *
 18592                      (0.00013596372813588848 * t +
 18593                        0.000924537132573585 * a +
 18594                        0.00010567359618683593 * r +
 18595                        0.0004791864687436512 * n -
 18596                        0.3109689587515875) +
 18597                    a *
 18598                      (-0.00023545346108370344 * a +
 18599                        0.0002702845253534714 * r +
 18600                        0.0020200308977307156 * n -
 18601                        0.7488052167015494) +
 18602                    r *
 18603                      (6834815998235662e-20 * r +
 18604                        0.00015168452363460973 * n -
 18605                        0.09751927774728933) -
 18606                    n * (0.0003189131175883281 * n + 0.7364883807733168);
 18607                  e[i++] =
 18608                    255 +
 18609                    t *
 18610                      (13598650411385307e-21 * t +
 18611                        0.00012423956175490851 * a +
 18612                        0.0004751985097583589 * r -
 18613                        36729317476630422e-22 * n -
 18614                        0.05562186980264034) +
 18615                    a *
 18616                      (0.00016141380598724676 * a +
 18617                        0.0009692239130725186 * r +
 18618                        0.0007782692450036253 * n -
 18619                        0.44015232367526463) +
 18620                    r *
 18621                      (5.068882914068769e-7 * r +
 18622                        0.0017778369011375071 * n -
 18623                        0.7591454649749609) -
 18624                    n * (0.0003435319965105553 * n + 0.7063770186160144);
 18625                }
 18626                return e.subarray(0, i);
 18627              }
 18628              _convertCmykToRgba(e) {
 18629                for (let t = 0, a = e.length; t < a; t += 4) {
 18630                  const a = e[t],
 18631                    r = e[t + 1],
 18632                    n = e[t + 2],
 18633                    i = e[t + 3];
 18634                  e[t] =
 18635                    255 +
 18636                    a *
 18637                      (-6747147073602441e-20 * a +
 18638                        0.0008379262121013727 * r +
 18639                        0.0002894718188643294 * n +
 18640                        0.003264231057537806 * i -
 18641                        1.1185611867203937) +
 18642                    r *
 18643                      (26374107616089405e-21 * r -
 18644                        8626949158638572e-20 * n -
 18645                        0.0002748769067499491 * i -
 18646                        0.02155688794978967) +
 18647                    n *
 18648                      (-3878099212869363e-20 * n -
 18649                        0.0003267808279485286 * i +
 18650                        0.0686742238595345) -
 18651                    i * (0.0003361971776183937 * i + 0.7430659151342254);
 18652                  e[t + 1] =
 18653                    255 +
 18654                    a *
 18655                      (0.00013596372813588848 * a +
 18656                        0.000924537132573585 * r +
 18657                        0.00010567359618683593 * n +
 18658                        0.0004791864687436512 * i -
 18659                        0.3109689587515875) +
 18660                    r *
 18661                      (-0.00023545346108370344 * r +
 18662                        0.0002702845253534714 * n +
 18663                        0.0020200308977307156 * i -
 18664                        0.7488052167015494) +
 18665                    n *
 18666                      (6834815998235662e-20 * n +
 18667                        0.00015168452363460973 * i -
 18668                        0.09751927774728933) -
 18669                    i * (0.0003189131175883281 * i + 0.7364883807733168);
 18670                  e[t + 2] =
 18671                    255 +
 18672                    a *
 18673                      (13598650411385307e-21 * a +
 18674                        0.00012423956175490851 * r +
 18675                        0.0004751985097583589 * n -
 18676                        36729317476630422e-22 * i -
 18677                        0.05562186980264034) +
 18678                    r *
 18679                      (0.00016141380598724676 * r +
 18680                        0.0009692239130725186 * n +
 18681                        0.0007782692450036253 * i -
 18682                        0.44015232367526463) +
 18683                    n *
 18684                      (5.068882914068769e-7 * n +
 18685                        0.0017778369011375071 * i -
 18686                        0.7591454649749609) -
 18687                    i * (0.0003435319965105553 * i + 0.7063770186160144);
 18688                  e[t + 3] = 255;
 18689                }
 18690                return e;
 18691              }
 18692              getData({
 18693                width: e,
 18694                height: t,
 18695                forceRGBA: a = !1,
 18696                forceRGB: r = !1,
 18697                isSourcePDF: i = !1,
 18698              }) {
 18699                if (this.numComponents > 4)
 18700                  throw new JpegError("Unsupported color mode");
 18701                const s = this._getLinearizedBlockData(e, t, i);
 18702                if (1 === this.numComponents && (a || r)) {
 18703                  const e = s.length * (a ? 4 : 3),
 18704                    t = new Uint8ClampedArray(e);
 18705                  let r = 0;
 18706                  if (a) (0, n.grayToRGBA)(s, new Uint32Array(t.buffer));
 18707                  else
 18708                    for (const e of s) {
 18709                      t[r++] = e;
 18710                      t[r++] = e;
 18711                      t[r++] = e;
 18712                    }
 18713                  return t;
 18714                }
 18715                if (3 === this.numComponents && this._isColorConversionNeeded) {
 18716                  if (a) {
 18717                    const e = new Uint8ClampedArray((s.length / 3) * 4);
 18718                    return this._convertYccToRgba(s, e);
 18719                  }
 18720                  return this._convertYccToRgb(s);
 18721                }
 18722                if (4 === this.numComponents) {
 18723                  if (this._isColorConversionNeeded)
 18724                    return a
 18725                      ? this._convertYcckToRgba(s)
 18726                      : r
 18727                        ? this._convertYcckToRgb(s)
 18728                        : this._convertYcckToCmyk(s);
 18729                  if (a) return this._convertCmykToRgba(s);
 18730                  if (r) return this._convertCmykToRgb(s);
 18731                }
 18732                return s;
 18733              }
 18734            };
 18735          },
 18736          (e, t, a) => {
 18737            Object.defineProperty(t, "__esModule", { value: !0 });
 18738            t.convertBlackAndWhiteToRGBA = convertBlackAndWhiteToRGBA;
 18739            t.convertToRGBA = function convertToRGBA(e) {
 18740              switch (e.kind) {
 18741                case r.ImageKind.GRAYSCALE_1BPP:
 18742                  return convertBlackAndWhiteToRGBA(e);
 18743                case r.ImageKind.RGB_24BPP:
 18744                  return (function convertRGBToRGBA({
 18745                    src: e,
 18746                    srcPos: t = 0,
 18747                    dest: a,
 18748                    destPos: n = 0,
 18749                    width: i,
 18750                    height: s,
 18751                  }) {
 18752                    let o = 0;
 18753                    const c = e.length >> 2,
 18754                      l = new Uint32Array(e.buffer, t, c);
 18755                    if (r.FeatureTest.isLittleEndian) {
 18756                      for (; o < c - 2; o += 3, n += 4) {
 18757                        const e = l[o],
 18758                          t = l[o + 1],
 18759                          r = l[o + 2];
 18760                        a[n] = 4278190080 | e;
 18761                        a[n + 1] = (e >>> 24) | (t << 8) | 4278190080;
 18762                        a[n + 2] = (t >>> 16) | (r << 16) | 4278190080;
 18763                        a[n + 3] = (r >>> 8) | 4278190080;
 18764                      }
 18765                      for (let t = 4 * o, r = e.length; t < r; t += 3)
 18766                        a[n++] =
 18767                          e[t] | (e[t + 1] << 8) | (e[t + 2] << 16) | 4278190080;
 18768                    } else {
 18769                      for (; o < c - 2; o += 3, n += 4) {
 18770                        const e = l[o],
 18771                          t = l[o + 1],
 18772                          r = l[o + 2];
 18773                        a[n] = 255 | e;
 18774                        a[n + 1] = (e << 24) | (t >>> 8) | 255;
 18775                        a[n + 2] = (t << 16) | (r >>> 16) | 255;
 18776                        a[n + 3] = (r << 8) | 255;
 18777                      }
 18778                      for (let t = 4 * o, r = e.length; t < r; t += 3)
 18779                        a[n++] =
 18780                          (e[t] << 24) | (e[t + 1] << 16) | (e[t + 2] << 8) | 255;
 18781                    }
 18782                    return { srcPos: t, destPos: n };
 18783                  })(e);
 18784              }
 18785              return null;
 18786            };
 18787            t.grayToRGBA = function grayToRGBA(e, t) {
 18788              if (r.FeatureTest.isLittleEndian)
 18789                for (let a = 0, r = e.length; a < r; a++)
 18790                  t[a] = (65793 * e[a]) | 4278190080;
 18791              else
 18792                for (let a = 0, r = e.length; a < r; a++)
 18793                  t[a] = (16843008 * e[a]) | 255;
 18794            };
 18795            var r = a(2);
 18796            function convertBlackAndWhiteToRGBA({
 18797              src: e,
 18798              srcPos: t = 0,
 18799              dest: a,
 18800              width: n,
 18801              height: i,
 18802              nonBlackColor: s = 4294967295,
 18803              inverseDecode: o = !1,
 18804            }) {
 18805              const c = r.FeatureTest.isLittleEndian ? 4278190080 : 255,
 18806                [l, h] = o ? [s, c] : [c, s],
 18807                u = n >> 3,
 18808                d = 7 & n,
 18809                f = e.length;
 18810              a = new Uint32Array(a.buffer);
 18811              let g = 0;
 18812              for (let r = 0; r < i; r++) {
 18813                for (const r = t + u; t < r; t++) {
 18814                  const r = t < f ? e[t] : 255;
 18815                  a[g++] = 128 & r ? h : l;
 18816                  a[g++] = 64 & r ? h : l;
 18817                  a[g++] = 32 & r ? h : l;
 18818                  a[g++] = 16 & r ? h : l;
 18819                  a[g++] = 8 & r ? h : l;
 18820                  a[g++] = 4 & r ? h : l;
 18821                  a[g++] = 2 & r ? h : l;
 18822                  a[g++] = 1 & r ? h : l;
 18823                }
 18824                if (0 === d) continue;
 18825                const r = t < f ? e[t++] : 255;
 18826                for (let e = 0; e < d; e++) a[g++] = r & (1 << (7 - e)) ? h : l;
 18827              }
 18828              return { srcPos: t, destPos: g };
 18829            }
 18830          },
 18831          (e, t, a) => {
 18832            Object.defineProperty(t, "__esModule", { value: !0 });
 18833            t.JpxStream = void 0;
 18834            var r = a(18),
 18835              n = a(30),
 18836              i = a(2);
 18837            class JpxStream extends r.DecodeStream {
 18838              constructor(e, t, a) {
 18839                super(t);
 18840                this.stream = e;
 18841                this.dict = e.dict;
 18842                this.maybeLength = t;
 18843                this.params = a;
 18844              }
 18845              get bytes() {
 18846                return (0, i.shadow)(
 18847                  this,
 18848                  "bytes",
 18849                  this.stream.getBytes(this.maybeLength),
 18850                );
 18851              }
 18852              ensureBuffer(e) {}
 18853              readBlock() {
 18854                if (this.eof) return;
 18855                const e = new n.JpxImage();
 18856                e.parse(this.bytes);
 18857                const t = e.width,
 18858                  a = e.height,
 18859                  r = e.componentsCount,
 18860                  i = e.tiles.length;
 18861                if (1 === i) this.buffer = e.tiles[0].items;
 18862                else {
 18863                  const n = new Uint8ClampedArray(t * a * r);
 18864                  for (let a = 0; a < i; a++) {
 18865                    const i = e.tiles[a],
 18866                      s = i.width,
 18867                      o = i.height,
 18868                      c = i.left,
 18869                      l = i.top,
 18870                      h = i.items;
 18871                    let u = 0,
 18872                      d = (t * l + c) * r;
 18873                    const f = t * r,
 18874                      g = s * r;
 18875                    for (let e = 0; e < o; e++) {
 18876                      const e = h.subarray(u, u + g);
 18877                      n.set(e, d);
 18878                      u += g;
 18879                      d += f;
 18880                    }
 18881                  }
 18882                  this.buffer = n;
 18883                }
 18884                this.bufferLength = this.buffer.length;
 18885                this.eof = !0;
 18886              }
 18887            }
 18888            t.JpxStream = JpxStream;
 18889          },
 18890          (e, t, a) => {
 18891            Object.defineProperty(t, "__esModule", { value: !0 });
 18892            t.JpxImage = void 0;
 18893            var r = a(2),
 18894              n = a(3),
 18895              i = a(25);
 18896            class JpxError extends r.BaseException {
 18897              constructor(e) {
 18898                super(`JPX error: ${e}`, "JpxError");
 18899              }
 18900            }
 18901            const s = { LL: 0, LH: 1, HL: 1, HH: 2 };
 18902            t.JpxImage = class JpxImage {
 18903              constructor() {
 18904                this.failOnCorruptedImage = !1;
 18905              }
 18906              parse(e) {
 18907                if (65359 === (0, n.readUint16)(e, 0)) {
 18908                  this.parseCodestream(e, 0, e.length);
 18909                  return;
 18910                }
 18911                const t = e.length;
 18912                let a = 0;
 18913                for (; a < t; ) {
 18914                  let i = 8,
 18915                    s = (0, n.readUint32)(e, a);
 18916                  const o = (0, n.readUint32)(e, a + 4);
 18917                  a += i;
 18918                  if (1 === s) {
 18919                    s =
 18920                      4294967296 * (0, n.readUint32)(e, a) +
 18921                      (0, n.readUint32)(e, a + 4);
 18922                    a += 8;
 18923                    i += 8;
 18924                  }
 18925                  0 === s && (s = t - a + i);
 18926                  if (s < i) throw new JpxError("Invalid box field size");
 18927                  const c = s - i;
 18928                  let l = !0;
 18929                  switch (o) {
 18930                    case 1785737832:
 18931                      l = !1;
 18932                      break;
 18933                    case 1668246642:
 18934                      const t = e[a];
 18935                      if (1 === t) {
 18936                        const t = (0, n.readUint32)(e, a + 3);
 18937                        switch (t) {
 18938                          case 16:
 18939                          case 17:
 18940                          case 18:
 18941                            break;
 18942                          default:
 18943                            (0, r.warn)("Unknown colorspace " + t);
 18944                        }
 18945                      } else 2 === t && (0, r.info)("ICC profile not supported");
 18946                      break;
 18947                    case 1785737827:
 18948                      this.parseCodestream(e, a, a + c);
 18949                      break;
 18950                    case 1783636e3:
 18951                      218793738 !== (0, n.readUint32)(e, a) &&
 18952                        (0, r.warn)("Invalid JP2 signature");
 18953                      break;
 18954                    case 1783634458:
 18955                    case 1718909296:
 18956                    case 1920099697:
 18957                    case 1919251232:
 18958                    case 1768449138:
 18959                      break;
 18960                    default:
 18961                      const i = String.fromCharCode(
 18962                        (o >> 24) & 255,
 18963                        (o >> 16) & 255,
 18964                        (o >> 8) & 255,
 18965                        255 & o,
 18966                      );
 18967                      (0, r.warn)(`Unsupported header type ${o} (${i}).`);
 18968                  }
 18969                  l && (a += c);
 18970                }
 18971              }
 18972              parseImageProperties(e) {
 18973                let t = e.getByte();
 18974                for (; t >= 0; ) {
 18975                  const a = t;
 18976                  t = e.getByte();
 18977                  if (65361 === ((a << 8) | t)) {
 18978                    e.skip(4);
 18979                    const t = e.getInt32() >>> 0,
 18980                      a = e.getInt32() >>> 0,
 18981                      r = e.getInt32() >>> 0,
 18982                      n = e.getInt32() >>> 0;
 18983                    e.skip(16);
 18984                    const i = e.getUint16();
 18985                    this.width = t - r;
 18986                    this.height = a - n;
 18987                    this.componentsCount = i;
 18988                    this.bitsPerComponent = 8;
 18989                    return;
 18990                  }
 18991                }
 18992                throw new JpxError("No size marker found in JPX stream");
 18993              }
 18994              parseCodestream(e, t, a) {
 18995                const i = {};
 18996                let s = !1;
 18997                try {
 18998                  let o = t;
 18999                  for (; o + 1 < a; ) {
 19000                    const t = (0, n.readUint16)(e, o);
 19001                    o += 2;
 19002                    let a,
 19003                      c,
 19004                      l,
 19005                      h,
 19006                      u,
 19007                      d,
 19008                      f = 0;
 19009                    switch (t) {
 19010                      case 65359:
 19011                        i.mainHeader = !0;
 19012                        break;
 19013                      case 65497:
 19014                        break;
 19015                      case 65361:
 19016                        f = (0, n.readUint16)(e, o);
 19017                        const g = {};
 19018                        g.Xsiz = (0, n.readUint32)(e, o + 4);
 19019                        g.Ysiz = (0, n.readUint32)(e, o + 8);
 19020                        g.XOsiz = (0, n.readUint32)(e, o + 12);
 19021                        g.YOsiz = (0, n.readUint32)(e, o + 16);
 19022                        g.XTsiz = (0, n.readUint32)(e, o + 20);
 19023                        g.YTsiz = (0, n.readUint32)(e, o + 24);
 19024                        g.XTOsiz = (0, n.readUint32)(e, o + 28);
 19025                        g.YTOsiz = (0, n.readUint32)(e, o + 32);
 19026                        const p = (0, n.readUint16)(e, o + 36);
 19027                        g.Csiz = p;
 19028                        const m = [];
 19029                        a = o + 38;
 19030                        for (let t = 0; t < p; t++) {
 19031                          const t = {
 19032                            precision: 1 + (127 & e[a]),
 19033                            isSigned: !!(128 & e[a]),
 19034                            XRsiz: e[a + 1],
 19035                            YRsiz: e[a + 2],
 19036                          };
 19037                          a += 3;
 19038                          calculateComponentDimensions(t, g);
 19039                          m.push(t);
 19040                        }
 19041                        i.SIZ = g;
 19042                        i.components = m;
 19043                        calculateTileGrids(i, m);
 19044                        i.QCC = [];
 19045                        i.COC = [];
 19046                        break;
 19047                      case 65372:
 19048                        f = (0, n.readUint16)(e, o);
 19049                        const b = {};
 19050                        a = o + 2;
 19051                        c = e[a++];
 19052                        switch (31 & c) {
 19053                          case 0:
 19054                            h = 8;
 19055                            u = !0;
 19056                            break;
 19057                          case 1:
 19058                            h = 16;
 19059                            u = !1;
 19060                            break;
 19061                          case 2:
 19062                            h = 16;
 19063                            u = !0;
 19064                            break;
 19065                          default:
 19066                            throw new Error("Invalid SQcd value " + c);
 19067                        }
 19068                        b.noQuantization = 8 === h;
 19069                        b.scalarExpounded = u;
 19070                        b.guardBits = c >> 5;
 19071                        l = [];
 19072                        for (; a < f + o; ) {
 19073                          const t = {};
 19074                          if (8 === h) {
 19075                            t.epsilon = e[a++] >> 3;
 19076                            t.mu = 0;
 19077                          } else {
 19078                            t.epsilon = e[a] >> 3;
 19079                            t.mu = ((7 & e[a]) << 8) | e[a + 1];
 19080                            a += 2;
 19081                          }
 19082                          l.push(t);
 19083                        }
 19084                        b.SPqcds = l;
 19085                        if (i.mainHeader) i.QCD = b;
 19086                        else {
 19087                          i.currentTile.QCD = b;
 19088                          i.currentTile.QCC = [];
 19089                        }
 19090                        break;
 19091                      case 65373:
 19092                        f = (0, n.readUint16)(e, o);
 19093                        const y = {};
 19094                        a = o + 2;
 19095                        let w;
 19096                        if (i.SIZ.Csiz < 257) w = e[a++];
 19097                        else {
 19098                          w = (0, n.readUint16)(e, a);
 19099                          a += 2;
 19100                        }
 19101                        c = e[a++];
 19102                        switch (31 & c) {
 19103                          case 0:
 19104                            h = 8;
 19105                            u = !0;
 19106                            break;
 19107                          case 1:
 19108                            h = 16;
 19109                            u = !1;
 19110                            break;
 19111                          case 2:
 19112                            h = 16;
 19113                            u = !0;
 19114                            break;
 19115                          default:
 19116                            throw new Error("Invalid SQcd value " + c);
 19117                        }
 19118                        y.noQuantization = 8 === h;
 19119                        y.scalarExpounded = u;
 19120                        y.guardBits = c >> 5;
 19121                        l = [];
 19122                        for (; a < f + o; ) {
 19123                          const t = {};
 19124                          if (8 === h) {
 19125                            t.epsilon = e[a++] >> 3;
 19126                            t.mu = 0;
 19127                          } else {
 19128                            t.epsilon = e[a] >> 3;
 19129                            t.mu = ((7 & e[a]) << 8) | e[a + 1];
 19130                            a += 2;
 19131                          }
 19132                          l.push(t);
 19133                        }
 19134                        y.SPqcds = l;
 19135                        i.mainHeader
 19136                          ? (i.QCC[w] = y)
 19137                          : (i.currentTile.QCC[w] = y);
 19138                        break;
 19139                      case 65362:
 19140                        f = (0, n.readUint16)(e, o);
 19141                        const S = {};
 19142                        a = o + 2;
 19143                        const x = e[a++];
 19144                        S.entropyCoderWithCustomPrecincts = !!(1 & x);
 19145                        S.sopMarkerUsed = !!(2 & x);
 19146                        S.ephMarkerUsed = !!(4 & x);
 19147                        S.progressionOrder = e[a++];
 19148                        S.layersCount = (0, n.readUint16)(e, a);
 19149                        a += 2;
 19150                        S.multipleComponentTransform = e[a++];
 19151                        S.decompositionLevelsCount = e[a++];
 19152                        S.xcb = 2 + (15 & e[a++]);
 19153                        S.ycb = 2 + (15 & e[a++]);
 19154                        const C = e[a++];
 19155                        S.selectiveArithmeticCodingBypass = !!(1 & C);
 19156                        S.resetContextProbabilities = !!(2 & C);
 19157                        S.terminationOnEachCodingPass = !!(4 & C);
 19158                        S.verticallyStripe = !!(8 & C);
 19159                        S.predictableTermination = !!(16 & C);
 19160                        S.segmentationSymbolUsed = !!(32 & C);
 19161                        S.reversibleTransformation = e[a++];
 19162                        if (S.entropyCoderWithCustomPrecincts) {
 19163                          const t = [];
 19164                          for (; a < f + o; ) {
 19165                            const r = e[a++];
 19166                            t.push({ PPx: 15 & r, PPy: r >> 4 });
 19167                          }
 19168                          S.precinctsSizes = t;
 19169                        }
 19170                        const k = [];
 19171                        S.selectiveArithmeticCodingBypass &&
 19172                          k.push("selectiveArithmeticCodingBypass");
 19173                        S.terminationOnEachCodingPass &&
 19174                          k.push("terminationOnEachCodingPass");
 19175                        S.verticallyStripe && k.push("verticallyStripe");
 19176                        S.predictableTermination &&
 19177                          k.push("predictableTermination");
 19178                        if (k.length > 0) {
 19179                          s = !0;
 19180                          (0, r.warn)(
 19181                            `JPX: Unsupported COD options (${k.join(", ")}).`,
 19182                          );
 19183                        }
 19184                        if (i.mainHeader) i.COD = S;
 19185                        else {
 19186                          i.currentTile.COD = S;
 19187                          i.currentTile.COC = [];
 19188                        }
 19189                        break;
 19190                      case 65424:
 19191                        f = (0, n.readUint16)(e, o);
 19192                        d = {};
 19193                        d.index = (0, n.readUint16)(e, o + 2);
 19194                        d.length = (0, n.readUint32)(e, o + 4);
 19195                        d.dataEnd = d.length + o - 2;
 19196                        d.partIndex = e[o + 8];
 19197                        d.partsCount = e[o + 9];
 19198                        i.mainHeader = !1;
 19199                        if (0 === d.partIndex) {
 19200                          d.COD = i.COD;
 19201                          d.COC = i.COC.slice(0);
 19202                          d.QCD = i.QCD;
 19203                          d.QCC = i.QCC.slice(0);
 19204                        }
 19205                        i.currentTile = d;
 19206                        break;
 19207                      case 65427:
 19208                        d = i.currentTile;
 19209                        if (0 === d.partIndex) {
 19210                          initializeTile(i, d.index);
 19211                          buildPackets(i);
 19212                        }
 19213                        f = d.dataEnd - o;
 19214                        parseTilePackets(i, e, o, f);
 19215                        break;
 19216                      case 65363:
 19217                        (0, r.warn)(
 19218                          "JPX: Codestream code 0xFF53 (COC) is not implemented.",
 19219                        );
 19220                      case 65365:
 19221                      case 65367:
 19222                      case 65368:
 19223                      case 65380:
 19224                        f = (0, n.readUint16)(e, o);
 19225                        break;
 19226                      default:
 19227                        throw new Error(
 19228                          "Unknown codestream code: " + t.toString(16),
 19229                        );
 19230                    }
 19231                    o += f;
 19232                  }
 19233                } catch (e) {
 19234                  if (s || this.failOnCorruptedImage)
 19235                    throw new JpxError(e.message);
 19236                  (0, r.warn)(`JPX: Trying to recover from: "${e.message}".`);
 19237                }
 19238                this.tiles = (function transformComponents(e) {
 19239                  const t = e.SIZ,
 19240                    a = e.components,
 19241                    r = t.Csiz,
 19242                    n = [];
 19243                  for (let t = 0, i = e.tiles.length; t < i; t++) {
 19244                    const i = e.tiles[t],
 19245                      s = [];
 19246                    for (let t = 0; t < r; t++) s[t] = transformTile(e, i, t);
 19247                    const o = s[0],
 19248                      c = new Uint8ClampedArray(o.items.length * r),
 19249                      l = {
 19250                        left: o.left,
 19251                        top: o.top,
 19252                        width: o.width,
 19253                        height: o.height,
 19254                        items: c,
 19255                      };
 19256                    let h,
 19257                      u,
 19258                      d,
 19259                      f,
 19260                      g,
 19261                      p,
 19262                      m,
 19263                      b = 0;
 19264                    if (
 19265                      i.codingStyleDefaultParameters.multipleComponentTransform
 19266                    ) {
 19267                      const e = 4 === r,
 19268                        t = s[0].items,
 19269                        n = s[1].items,
 19270                        o = s[2].items,
 19271                        l = e ? s[3].items : null;
 19272                      h = a[0].precision - 8;
 19273                      u = 0.5 + (128 << h);
 19274                      const y = i.components[0],
 19275                        w = r - 3;
 19276                      f = t.length;
 19277                      if (y.codingStyleParameters.reversibleTransformation)
 19278                        for (d = 0; d < f; d++, b += w) {
 19279                          g = t[d] + u;
 19280                          p = n[d];
 19281                          m = o[d];
 19282                          const e = g - ((m + p) >> 2);
 19283                          c[b++] = (e + m) >> h;
 19284                          c[b++] = e >> h;
 19285                          c[b++] = (e + p) >> h;
 19286                        }
 19287                      else
 19288                        for (d = 0; d < f; d++, b += w) {
 19289                          g = t[d] + u;
 19290                          p = n[d];
 19291                          m = o[d];
 19292                          c[b++] = (g + 1.402 * m) >> h;
 19293                          c[b++] = (g - 0.34413 * p - 0.71414 * m) >> h;
 19294                          c[b++] = (g + 1.772 * p) >> h;
 19295                        }
 19296                      if (e)
 19297                        for (d = 0, b = 3; d < f; d++, b += 4)
 19298                          c[b] = (l[d] + u) >> h;
 19299                    } else
 19300                      for (let e = 0; e < r; e++) {
 19301                        const t = s[e].items;
 19302                        h = a[e].precision - 8;
 19303                        u = 0.5 + (128 << h);
 19304                        for (b = e, d = 0, f = t.length; d < f; d++) {
 19305                          c[b] = (t[d] + u) >> h;
 19306                          b += r;
 19307                        }
 19308                      }
 19309                    n.push(l);
 19310                  }
 19311                  return n;
 19312                })(i);
 19313                this.width = i.SIZ.Xsiz - i.SIZ.XOsiz;
 19314                this.height = i.SIZ.Ysiz - i.SIZ.YOsiz;
 19315                this.componentsCount = i.SIZ.Csiz;
 19316              }
 19317            };
 19318            function calculateComponentDimensions(e, t) {
 19319              e.x0 = Math.ceil(t.XOsiz / e.XRsiz);
 19320              e.x1 = Math.ceil(t.Xsiz / e.XRsiz);
 19321              e.y0 = Math.ceil(t.YOsiz / e.YRsiz);
 19322              e.y1 = Math.ceil(t.Ysiz / e.YRsiz);
 19323              e.width = e.x1 - e.x0;
 19324              e.height = e.y1 - e.y0;
 19325            }
 19326            function calculateTileGrids(e, t) {
 19327              const a = e.SIZ,
 19328                r = [];
 19329              let n;
 19330              const i = Math.ceil((a.Xsiz - a.XTOsiz) / a.XTsiz),
 19331                s = Math.ceil((a.Ysiz - a.YTOsiz) / a.YTsiz);
 19332              for (let e = 0; e < s; e++)
 19333                for (let t = 0; t < i; t++) {
 19334                  n = {};
 19335                  n.tx0 = Math.max(a.XTOsiz + t * a.XTsiz, a.XOsiz);
 19336                  n.ty0 = Math.max(a.YTOsiz + e * a.YTsiz, a.YOsiz);
 19337                  n.tx1 = Math.min(a.XTOsiz + (t + 1) * a.XTsiz, a.Xsiz);
 19338                  n.ty1 = Math.min(a.YTOsiz + (e + 1) * a.YTsiz, a.Ysiz);
 19339                  n.width = n.tx1 - n.tx0;
 19340                  n.height = n.ty1 - n.ty0;
 19341                  n.components = [];
 19342                  r.push(n);
 19343                }
 19344              e.tiles = r;
 19345              for (let e = 0, i = a.Csiz; e < i; e++) {
 19346                const a = t[e];
 19347                for (let t = 0, i = r.length; t < i; t++) {
 19348                  const i = {};
 19349                  n = r[t];
 19350                  i.tcx0 = Math.ceil(n.tx0 / a.XRsiz);
 19351                  i.tcy0 = Math.ceil(n.ty0 / a.YRsiz);
 19352                  i.tcx1 = Math.ceil(n.tx1 / a.XRsiz);
 19353                  i.tcy1 = Math.ceil(n.ty1 / a.YRsiz);
 19354                  i.width = i.tcx1 - i.tcx0;
 19355                  i.height = i.tcy1 - i.tcy0;
 19356                  n.components[e] = i;
 19357                }
 19358              }
 19359            }
 19360            function getBlocksDimensions(e, t, a) {
 19361              const r = t.codingStyleParameters,
 19362                n = {};
 19363              if (r.entropyCoderWithCustomPrecincts) {
 19364                n.PPx = r.precinctsSizes[a].PPx;
 19365                n.PPy = r.precinctsSizes[a].PPy;
 19366              } else {
 19367                n.PPx = 15;
 19368                n.PPy = 15;
 19369              }
 19370              n.xcb_ =
 19371                a > 0 ? Math.min(r.xcb, n.PPx - 1) : Math.min(r.xcb, n.PPx);
 19372              n.ycb_ =
 19373                a > 0 ? Math.min(r.ycb, n.PPy - 1) : Math.min(r.ycb, n.PPy);
 19374              return n;
 19375            }
 19376            function buildPrecincts(e, t, a) {
 19377              const r = 1 << a.PPx,
 19378                n = 1 << a.PPy,
 19379                i = 0 === t.resLevel,
 19380                s = 1 << (a.PPx + (i ? 0 : -1)),
 19381                o = 1 << (a.PPy + (i ? 0 : -1)),
 19382                c =
 19383                  t.trx1 > t.trx0
 19384                    ? Math.ceil(t.trx1 / r) - Math.floor(t.trx0 / r)
 19385                    : 0,
 19386                l =
 19387                  t.try1 > t.try0
 19388                    ? Math.ceil(t.try1 / n) - Math.floor(t.try0 / n)
 19389                    : 0,
 19390                h = c * l;
 19391              t.precinctParameters = {
 19392                precinctWidth: r,
 19393                precinctHeight: n,
 19394                numprecinctswide: c,
 19395                numprecinctshigh: l,
 19396                numprecincts: h,
 19397                precinctWidthInSubband: s,
 19398                precinctHeightInSubband: o,
 19399              };
 19400            }
 19401            function buildCodeblocks(e, t, a) {
 19402              const r = a.xcb_,
 19403                n = a.ycb_,
 19404                i = 1 << r,
 19405                s = 1 << n,
 19406                o = t.tbx0 >> r,
 19407                c = t.tby0 >> n,
 19408                l = (t.tbx1 + i - 1) >> r,
 19409                h = (t.tby1 + s - 1) >> n,
 19410                u = t.resolution.precinctParameters,
 19411                d = [],
 19412                f = [];
 19413              let g, p, m, b;
 19414              for (p = c; p < h; p++)
 19415                for (g = o; g < l; g++) {
 19416                  m = {
 19417                    cbx: g,
 19418                    cby: p,
 19419                    tbx0: i * g,
 19420                    tby0: s * p,
 19421                    tbx1: i * (g + 1),
 19422                    tby1: s * (p + 1),
 19423                  };
 19424                  m.tbx0_ = Math.max(t.tbx0, m.tbx0);
 19425                  m.tby0_ = Math.max(t.tby0, m.tby0);
 19426                  m.tbx1_ = Math.min(t.tbx1, m.tbx1);
 19427                  m.tby1_ = Math.min(t.tby1, m.tby1);
 19428                  b =
 19429                    Math.floor((m.tbx0_ - t.tbx0) / u.precinctWidthInSubband) +
 19430                    Math.floor((m.tby0_ - t.tby0) / u.precinctHeightInSubband) *
 19431                      u.numprecinctswide;
 19432                  m.precinctNumber = b;
 19433                  m.subbandType = t.type;
 19434                  m.Lblock = 3;
 19435                  if (m.tbx1_ <= m.tbx0_ || m.tby1_ <= m.tby0_) continue;
 19436                  d.push(m);
 19437                  let e = f[b];
 19438                  if (void 0 !== e) {
 19439                    g < e.cbxMin
 19440                      ? (e.cbxMin = g)
 19441                      : g > e.cbxMax && (e.cbxMax = g);
 19442                    p < e.cbyMin
 19443                      ? (e.cbxMin = p)
 19444                      : p > e.cbyMax && (e.cbyMax = p);
 19445                  } else
 19446                    f[b] = e = { cbxMin: g, cbyMin: p, cbxMax: g, cbyMax: p };
 19447                  m.precinct = e;
 19448                }
 19449              t.codeblockParameters = {
 19450                codeblockWidth: r,
 19451                codeblockHeight: n,
 19452                numcodeblockwide: l - o + 1,
 19453                numcodeblockhigh: h - c + 1,
 19454              };
 19455              t.codeblocks = d;
 19456              t.precincts = f;
 19457            }
 19458            function createPacket(e, t, a) {
 19459              const r = [],
 19460                n = e.subbands;
 19461              for (let e = 0, a = n.length; e < a; e++) {
 19462                const a = n[e].codeblocks;
 19463                for (let e = 0, n = a.length; e < n; e++) {
 19464                  const n = a[e];
 19465                  n.precinctNumber === t && r.push(n);
 19466                }
 19467              }
 19468              return { layerNumber: a, codeblocks: r };
 19469            }
 19470            function LayerResolutionComponentPositionIterator(e) {
 19471              const t = e.SIZ,
 19472                a = e.currentTile.index,
 19473                r = e.tiles[a],
 19474                n = r.codingStyleDefaultParameters.layersCount,
 19475                i = t.Csiz;
 19476              let s = 0;
 19477              for (let e = 0; e < i; e++)
 19478                s = Math.max(
 19479                  s,
 19480                  r.components[e].codingStyleParameters.decompositionLevelsCount,
 19481                );
 19482              let o = 0,
 19483                c = 0,
 19484                l = 0,
 19485                h = 0;
 19486              this.nextPacket = function JpxImage_nextPacket() {
 19487                for (; o < n; o++) {
 19488                  for (; c <= s; c++) {
 19489                    for (; l < i; l++) {
 19490                      const e = r.components[l];
 19491                      if (c > e.codingStyleParameters.decompositionLevelsCount)
 19492                        continue;
 19493                      const t = e.resolutions[c],
 19494                        a = t.precinctParameters.numprecincts;
 19495                      for (; h < a; ) {
 19496                        const e = createPacket(t, h, o);
 19497                        h++;
 19498                        return e;
 19499                      }
 19500                      h = 0;
 19501                    }
 19502                    l = 0;
 19503                  }
 19504                  c = 0;
 19505                }
 19506                throw new JpxError("Out of packets");
 19507              };
 19508            }
 19509            function ResolutionLayerComponentPositionIterator(e) {
 19510              const t = e.SIZ,
 19511                a = e.currentTile.index,
 19512                r = e.tiles[a],
 19513                n = r.codingStyleDefaultParameters.layersCount,
 19514                i = t.Csiz;
 19515              let s = 0;
 19516              for (let e = 0; e < i; e++)
 19517                s = Math.max(
 19518                  s,
 19519                  r.components[e].codingStyleParameters.decompositionLevelsCount,
 19520                );
 19521              let o = 0,
 19522                c = 0,
 19523                l = 0,
 19524                h = 0;
 19525              this.nextPacket = function JpxImage_nextPacket() {
 19526                for (; o <= s; o++) {
 19527                  for (; c < n; c++) {
 19528                    for (; l < i; l++) {
 19529                      const e = r.components[l];
 19530                      if (o > e.codingStyleParameters.decompositionLevelsCount)
 19531                        continue;
 19532                      const t = e.resolutions[o],
 19533                        a = t.precinctParameters.numprecincts;
 19534                      for (; h < a; ) {
 19535                        const e = createPacket(t, h, c);
 19536                        h++;
 19537                        return e;
 19538                      }
 19539                      h = 0;
 19540                    }
 19541                    l = 0;
 19542                  }
 19543                  c = 0;
 19544                }
 19545                throw new JpxError("Out of packets");
 19546              };
 19547            }
 19548            function ResolutionPositionComponentLayerIterator(e) {
 19549              const t = e.SIZ,
 19550                a = e.currentTile.index,
 19551                r = e.tiles[a],
 19552                n = r.codingStyleDefaultParameters.layersCount,
 19553                i = t.Csiz;
 19554              let s,
 19555                o,
 19556                c,
 19557                l,
 19558                h = 0;
 19559              for (c = 0; c < i; c++) {
 19560                const e = r.components[c];
 19561                h = Math.max(h, e.codingStyleParameters.decompositionLevelsCount);
 19562              }
 19563              const u = new Int32Array(h + 1);
 19564              for (o = 0; o <= h; ++o) {
 19565                let e = 0;
 19566                for (c = 0; c < i; ++c) {
 19567                  const t = r.components[c].resolutions;
 19568                  o < t.length &&
 19569                    (e = Math.max(e, t[o].precinctParameters.numprecincts));
 19570                }
 19571                u[o] = e;
 19572              }
 19573              s = 0;
 19574              o = 0;
 19575              c = 0;
 19576              l = 0;
 19577              this.nextPacket = function JpxImage_nextPacket() {
 19578                for (; o <= h; o++) {
 19579                  for (; l < u[o]; l++) {
 19580                    for (; c < i; c++) {
 19581                      const e = r.components[c];
 19582                      if (o > e.codingStyleParameters.decompositionLevelsCount)
 19583                        continue;
 19584                      const t = e.resolutions[o],
 19585                        a = t.precinctParameters.numprecincts;
 19586                      if (!(l >= a)) {
 19587                        for (; s < n; ) {
 19588                          const e = createPacket(t, l, s);
 19589                          s++;
 19590                          return e;
 19591                        }
 19592                        s = 0;
 19593                      }
 19594                    }
 19595                    c = 0;
 19596                  }
 19597                  l = 0;
 19598                }
 19599                throw new JpxError("Out of packets");
 19600              };
 19601            }
 19602            function PositionComponentResolutionLayerIterator(e) {
 19603              const t = e.SIZ,
 19604                a = e.currentTile.index,
 19605                r = e.tiles[a],
 19606                n = r.codingStyleDefaultParameters.layersCount,
 19607                i = t.Csiz,
 19608                s = getPrecinctSizesInImageScale(r),
 19609                o = s;
 19610              let c = 0,
 19611                l = 0,
 19612                h = 0,
 19613                u = 0,
 19614                d = 0;
 19615              this.nextPacket = function JpxImage_nextPacket() {
 19616                for (; d < o.maxNumHigh; d++) {
 19617                  for (; u < o.maxNumWide; u++) {
 19618                    for (; h < i; h++) {
 19619                      const e = r.components[h],
 19620                        t = e.codingStyleParameters.decompositionLevelsCount;
 19621                      for (; l <= t; l++) {
 19622                        const t = e.resolutions[l],
 19623                          a = s.components[h].resolutions[l],
 19624                          r = getPrecinctIndexIfExist(u, d, a, o, t);
 19625                        if (null !== r) {
 19626                          for (; c < n; ) {
 19627                            const e = createPacket(t, r, c);
 19628                            c++;
 19629                            return e;
 19630                          }
 19631                          c = 0;
 19632                        }
 19633                      }
 19634                      l = 0;
 19635                    }
 19636                    h = 0;
 19637                  }
 19638                  u = 0;
 19639                }
 19640                throw new JpxError("Out of packets");
 19641              };
 19642            }
 19643            function ComponentPositionResolutionLayerIterator(e) {
 19644              const t = e.SIZ,
 19645                a = e.currentTile.index,
 19646                r = e.tiles[a],
 19647                n = r.codingStyleDefaultParameters.layersCount,
 19648                i = t.Csiz,
 19649                s = getPrecinctSizesInImageScale(r);
 19650              let o = 0,
 19651                c = 0,
 19652                l = 0,
 19653                h = 0,
 19654                u = 0;
 19655              this.nextPacket = function JpxImage_nextPacket() {
 19656                for (; l < i; ++l) {
 19657                  const e = r.components[l],
 19658                    t = s.components[l],
 19659                    a = e.codingStyleParameters.decompositionLevelsCount;
 19660                  for (; u < t.maxNumHigh; u++) {
 19661                    for (; h < t.maxNumWide; h++) {
 19662                      for (; c <= a; c++) {
 19663                        const a = e.resolutions[c],
 19664                          r = t.resolutions[c],
 19665                          i = getPrecinctIndexIfExist(h, u, r, t, a);
 19666                        if (null !== i) {
 19667                          for (; o < n; ) {
 19668                            const e = createPacket(a, i, o);
 19669                            o++;
 19670                            return e;
 19671                          }
 19672                          o = 0;
 19673                        }
 19674                      }
 19675                      c = 0;
 19676                    }
 19677                    h = 0;
 19678                  }
 19679                  u = 0;
 19680                }
 19681                throw new JpxError("Out of packets");
 19682              };
 19683            }
 19684            function getPrecinctIndexIfExist(e, t, a, r, n) {
 19685              const i = e * r.minWidth,
 19686                s = t * r.minHeight;
 19687              if (i % a.width != 0 || s % a.height != 0) return null;
 19688              const o = (s / a.width) * n.precinctParameters.numprecinctswide;
 19689              return i / a.height + o;
 19690            }
 19691            function getPrecinctSizesInImageScale(e) {
 19692              const t = e.components.length;
 19693              let a = Number.MAX_VALUE,
 19694                r = Number.MAX_VALUE,
 19695                n = 0,
 19696                i = 0;
 19697              const s = new Array(t);
 19698              for (let o = 0; o < t; o++) {
 19699                const t = e.components[o],
 19700                  c = t.codingStyleParameters.decompositionLevelsCount,
 19701                  l = new Array(c + 1);
 19702                let h = Number.MAX_VALUE,
 19703                  u = Number.MAX_VALUE,
 19704                  d = 0,
 19705                  f = 0,
 19706                  g = 1;
 19707                for (let e = c; e >= 0; --e) {
 19708                  const a = t.resolutions[e],
 19709                    r = g * a.precinctParameters.precinctWidth,
 19710                    n = g * a.precinctParameters.precinctHeight;
 19711                  h = Math.min(h, r);
 19712                  u = Math.min(u, n);
 19713                  d = Math.max(d, a.precinctParameters.numprecinctswide);
 19714                  f = Math.max(f, a.precinctParameters.numprecinctshigh);
 19715                  l[e] = { width: r, height: n };
 19716                  g <<= 1;
 19717                }
 19718                a = Math.min(a, h);
 19719                r = Math.min(r, u);
 19720                n = Math.max(n, d);
 19721                i = Math.max(i, f);
 19722                s[o] = {
 19723                  resolutions: l,
 19724                  minWidth: h,
 19725                  minHeight: u,
 19726                  maxNumWide: d,
 19727                  maxNumHigh: f,
 19728                };
 19729              }
 19730              return {
 19731                components: s,
 19732                minWidth: a,
 19733                minHeight: r,
 19734                maxNumWide: n,
 19735                maxNumHigh: i,
 19736              };
 19737            }
 19738            function buildPackets(e) {
 19739              const t = e.SIZ,
 19740                a = e.currentTile.index,
 19741                r = e.tiles[a],
 19742                n = t.Csiz;
 19743              for (let e = 0; e < n; e++) {
 19744                const t = r.components[e],
 19745                  a = t.codingStyleParameters.decompositionLevelsCount,
 19746                  n = [],
 19747                  i = [];
 19748                for (let e = 0; e <= a; e++) {
 19749                  const r = getBlocksDimensions(0, t, e),
 19750                    s = {},
 19751                    o = 1 << (a - e);
 19752                  s.trx0 = Math.ceil(t.tcx0 / o);
 19753                  s.try0 = Math.ceil(t.tcy0 / o);
 19754                  s.trx1 = Math.ceil(t.tcx1 / o);
 19755                  s.try1 = Math.ceil(t.tcy1 / o);
 19756                  s.resLevel = e;
 19757                  buildPrecincts(0, s, r);
 19758                  n.push(s);
 19759                  let c;
 19760                  if (0 === e) {
 19761                    c = {};
 19762                    c.type = "LL";
 19763                    c.tbx0 = Math.ceil(t.tcx0 / o);
 19764                    c.tby0 = Math.ceil(t.tcy0 / o);
 19765                    c.tbx1 = Math.ceil(t.tcx1 / o);
 19766                    c.tby1 = Math.ceil(t.tcy1 / o);
 19767                    c.resolution = s;
 19768                    buildCodeblocks(0, c, r);
 19769                    i.push(c);
 19770                    s.subbands = [c];
 19771                  } else {
 19772                    const n = 1 << (a - e + 1),
 19773                      o = [];
 19774                    c = {};
 19775                    c.type = "HL";
 19776                    c.tbx0 = Math.ceil(t.tcx0 / n - 0.5);
 19777                    c.tby0 = Math.ceil(t.tcy0 / n);
 19778                    c.tbx1 = Math.ceil(t.tcx1 / n - 0.5);
 19779                    c.tby1 = Math.ceil(t.tcy1 / n);
 19780                    c.resolution = s;
 19781                    buildCodeblocks(0, c, r);
 19782                    i.push(c);
 19783                    o.push(c);
 19784                    c = {};
 19785                    c.type = "LH";
 19786                    c.tbx0 = Math.ceil(t.tcx0 / n);
 19787                    c.tby0 = Math.ceil(t.tcy0 / n - 0.5);
 19788                    c.tbx1 = Math.ceil(t.tcx1 / n);
 19789                    c.tby1 = Math.ceil(t.tcy1 / n - 0.5);
 19790                    c.resolution = s;
 19791                    buildCodeblocks(0, c, r);
 19792                    i.push(c);
 19793                    o.push(c);
 19794                    c = {};
 19795                    c.type = "HH";
 19796                    c.tbx0 = Math.ceil(t.tcx0 / n - 0.5);
 19797                    c.tby0 = Math.ceil(t.tcy0 / n - 0.5);
 19798                    c.tbx1 = Math.ceil(t.tcx1 / n - 0.5);
 19799                    c.tby1 = Math.ceil(t.tcy1 / n - 0.5);
 19800                    c.resolution = s;
 19801                    buildCodeblocks(0, c, r);
 19802                    i.push(c);
 19803                    o.push(c);
 19804                    s.subbands = o;
 19805                  }
 19806                }
 19807                t.resolutions = n;
 19808                t.subbands = i;
 19809              }
 19810              const i = r.codingStyleDefaultParameters.progressionOrder;
 19811              switch (i) {
 19812                case 0:
 19813                  r.packetsIterator =
 19814                    new LayerResolutionComponentPositionIterator(e);
 19815                  break;
 19816                case 1:
 19817                  r.packetsIterator =
 19818                    new ResolutionLayerComponentPositionIterator(e);
 19819                  break;
 19820                case 2:
 19821                  r.packetsIterator =
 19822                    new ResolutionPositionComponentLayerIterator(e);
 19823                  break;
 19824                case 3:
 19825                  r.packetsIterator =
 19826                    new PositionComponentResolutionLayerIterator(e);
 19827                  break;
 19828                case 4:
 19829                  r.packetsIterator =
 19830                    new ComponentPositionResolutionLayerIterator(e);
 19831                  break;
 19832                default:
 19833                  throw new JpxError(`Unsupported progression order ${i}`);
 19834              }
 19835            }
 19836            function parseTilePackets(e, t, a, r) {
 19837              let i,
 19838                s = 0,
 19839                o = 0,
 19840                c = !1;
 19841              function readBits(e) {
 19842                for (; o < e; ) {
 19843                  const e = t[a + s];
 19844                  s++;
 19845                  if (c) {
 19846                    i = (i << 7) | e;
 19847                    o += 7;
 19848                    c = !1;
 19849                  } else {
 19850                    i = (i << 8) | e;
 19851                    o += 8;
 19852                  }
 19853                  255 === e && (c = !0);
 19854                }
 19855                o -= e;
 19856                return (i >>> o) & ((1 << e) - 1);
 19857              }
 19858              function skipMarkerIfEqual(e) {
 19859                if (255 === t[a + s - 1] && t[a + s] === e) {
 19860                  skipBytes(1);
 19861                  return !0;
 19862                }
 19863                if (255 === t[a + s] && t[a + s + 1] === e) {
 19864                  skipBytes(2);
 19865                  return !0;
 19866                }
 19867                return !1;
 19868              }
 19869              function skipBytes(e) {
 19870                s += e;
 19871              }
 19872              function alignToByte() {
 19873                o = 0;
 19874                if (c) {
 19875                  s++;
 19876                  c = !1;
 19877                }
 19878              }
 19879              function readCodingpasses() {
 19880                if (0 === readBits(1)) return 1;
 19881                if (0 === readBits(1)) return 2;
 19882                let e = readBits(2);
 19883                if (e < 3) return e + 3;
 19884                e = readBits(5);
 19885                if (e < 31) return e + 6;
 19886                e = readBits(7);
 19887                return e + 37;
 19888              }
 19889              const l = e.currentTile.index,
 19890                h = e.tiles[l],
 19891                u = e.COD.sopMarkerUsed,
 19892                d = e.COD.ephMarkerUsed,
 19893                f = h.packetsIterator;
 19894              for (; s < r; ) {
 19895                alignToByte();
 19896                u && skipMarkerIfEqual(145) && skipBytes(4);
 19897                const e = f.nextPacket();
 19898                if (!readBits(1)) continue;
 19899                const r = e.layerNumber,
 19900                  i = [];
 19901                let o;
 19902                for (let t = 0, a = e.codeblocks.length; t < a; t++) {
 19903                  o = e.codeblocks[t];
 19904                  let a = o.precinct;
 19905                  const s = o.cbx - a.cbxMin,
 19906                    c = o.cby - a.cbyMin;
 19907                  let l,
 19908                    h,
 19909                    u = !1,
 19910                    d = !1;
 19911                  if (void 0 !== o.included) u = !!readBits(1);
 19912                  else {
 19913                    a = o.precinct;
 19914                    let e;
 19915                    if (void 0 !== a.inclusionTree) e = a.inclusionTree;
 19916                    else {
 19917                      const t = a.cbxMax - a.cbxMin + 1,
 19918                        n = a.cbyMax - a.cbyMin + 1;
 19919                      e = new InclusionTree(t, n, r);
 19920                      h = new TagTree(t, n);
 19921                      a.inclusionTree = e;
 19922                      a.zeroBitPlanesTree = h;
 19923                      for (let e = 0; e < r; e++)
 19924                        if (0 !== readBits(1))
 19925                          throw new JpxError("Invalid tag tree");
 19926                    }
 19927                    if (e.reset(s, c, r))
 19928                      for (;;) {
 19929                        if (!readBits(1)) {
 19930                          e.incrementValue(r);
 19931                          break;
 19932                        }
 19933                        l = !e.nextLevel();
 19934                        if (l) {
 19935                          o.included = !0;
 19936                          u = d = !0;
 19937                          break;
 19938                        }
 19939                      }
 19940                  }
 19941                  if (!u) continue;
 19942                  if (d) {
 19943                    h = a.zeroBitPlanesTree;
 19944                    h.reset(s, c);
 19945                    for (;;)
 19946                      if (readBits(1)) {
 19947                        l = !h.nextLevel();
 19948                        if (l) break;
 19949                      } else h.incrementValue();
 19950                    o.zeroBitPlanes = h.value;
 19951                  }
 19952                  const f = readCodingpasses();
 19953                  for (; readBits(1); ) o.Lblock++;
 19954                  const g = (0, n.log2)(f),
 19955                    p = readBits((f < 1 << g ? g - 1 : g) + o.Lblock);
 19956                  i.push({ codeblock: o, codingpasses: f, dataLength: p });
 19957                }
 19958                alignToByte();
 19959                d && skipMarkerIfEqual(146);
 19960                for (; i.length > 0; ) {
 19961                  const e = i.shift();
 19962                  o = e.codeblock;
 19963                  void 0 === o.data && (o.data = []);
 19964                  o.data.push({
 19965                    data: t,
 19966                    start: a + s,
 19967                    end: a + s + e.dataLength,
 19968                    codingpasses: e.codingpasses,
 19969                  });
 19970                  s += e.dataLength;
 19971                }
 19972              }
 19973              return s;
 19974            }
 19975            function copyCoefficients(e, t, a, r, n, s, o, c, l) {
 19976              const h = r.tbx0,
 19977                u = r.tby0,
 19978                d = r.tbx1 - r.tbx0,
 19979                f = r.codeblocks,
 19980                g = "H" === r.type.charAt(0) ? 1 : 0,
 19981                p = "H" === r.type.charAt(1) ? t : 0;
 19982              for (let a = 0, m = f.length; a < m; ++a) {
 19983                const m = f[a],
 19984                  b = m.tbx1_ - m.tbx0_,
 19985                  y = m.tby1_ - m.tby0_;
 19986                if (0 === b || 0 === y) continue;
 19987                if (void 0 === m.data) continue;
 19988                const w = new BitModel(b, y, m.subbandType, m.zeroBitPlanes, s);
 19989                let S = 2;
 19990                const x = m.data;
 19991                let C,
 19992                  k,
 19993                  v,
 19994                  F = 0,
 19995                  O = 0;
 19996                for (C = 0, k = x.length; C < k; C++) {
 19997                  v = x[C];
 19998                  F += v.end - v.start;
 19999                  O += v.codingpasses;
 20000                }
 20001                const T = new Uint8Array(F);
 20002                let M = 0;
 20003                for (C = 0, k = x.length; C < k; C++) {
 20004                  v = x[C];
 20005                  const e = v.data.subarray(v.start, v.end);
 20006                  T.set(e, M);
 20007                  M += e.length;
 20008                }
 20009                const D = new i.ArithmeticDecoder(T, 0, F);
 20010                w.setDecoder(D);
 20011                for (C = 0; C < O; C++) {
 20012                  switch (S) {
 20013                    case 0:
 20014                      w.runSignificancePropagationPass();
 20015                      break;
 20016                    case 1:
 20017                      w.runMagnitudeRefinementPass();
 20018                      break;
 20019                    case 2:
 20020                      w.runCleanupPass();
 20021                      c && w.checkSegmentationSymbol();
 20022                  }
 20023                  l && w.reset();
 20024                  S = (S + 1) % 3;
 20025                }
 20026                let E = m.tbx0_ - h + (m.tby0_ - u) * d;
 20027                const N = w.coefficentsSign,
 20028                  R = w.coefficentsMagnitude,
 20029                  L = w.bitsDecoded,
 20030                  $ = o ? 0 : 0.5;
 20031                let _, j, U;
 20032                M = 0;
 20033                const X = "LL" !== r.type;
 20034                for (C = 0; C < y; C++) {
 20035                  const a = 2 * ((E / d) | 0) * (t - d) + g + p;
 20036                  for (_ = 0; _ < b; _++) {
 20037                    j = R[M];
 20038                    if (0 !== j) {
 20039                      j = (j + $) * n;
 20040                      0 !== N[M] && (j = -j);
 20041                      U = L[M];
 20042                      e[X ? a + (E << 1) : E] =
 20043                        o && U >= s ? j : j * (1 << (s - U));
 20044                    }
 20045                    E++;
 20046                    M++;
 20047                  }
 20048                  E += d - b;
 20049                }
 20050              }
 20051            }
 20052            function transformTile(e, t, a) {
 20053              const r = t.components[a],
 20054                n = r.codingStyleParameters,
 20055                i = r.quantizationParameters,
 20056                o = n.decompositionLevelsCount,
 20057                c = i.SPqcds,
 20058                l = i.scalarExpounded,
 20059                h = i.guardBits,
 20060                u = n.segmentationSymbolUsed,
 20061                d = n.resetContextProbabilities,
 20062                f = e.components[a].precision,
 20063                g = n.reversibleTransformation,
 20064                p = g ? new ReversibleTransform() : new IrreversibleTransform(),
 20065                m = [];
 20066              let b = 0;
 20067              for (let e = 0; e <= o; e++) {
 20068                const t = r.resolutions[e],
 20069                  a = t.trx1 - t.trx0,
 20070                  n = t.try1 - t.try0,
 20071                  i = new Float32Array(a * n);
 20072                for (let r = 0, n = t.subbands.length; r < n; r++) {
 20073                  let n, o;
 20074                  if (l) {
 20075                    n = c[b].mu;
 20076                    o = c[b].epsilon;
 20077                    b++;
 20078                  } else {
 20079                    n = c[0].mu;
 20080                    o = c[0].epsilon + (e > 0 ? 1 - e : 0);
 20081                  }
 20082                  const p = t.subbands[r],
 20083                    m = s[p.type];
 20084                  copyCoefficients(
 20085                    i,
 20086                    a,
 20087                    0,
 20088                    p,
 20089                    g ? 1 : 2 ** (f + m - o) * (1 + n / 2048),
 20090                    h + o - 1,
 20091                    g,
 20092                    u,
 20093                    d,
 20094                  );
 20095                }
 20096                m.push({ width: a, height: n, items: i });
 20097              }
 20098              const y = p.calculate(m, r.tcx0, r.tcy0);
 20099              return {
 20100                left: r.tcx0,
 20101                top: r.tcy0,
 20102                width: y.width,
 20103                height: y.height,
 20104                items: y.items,
 20105              };
 20106            }
 20107            function initializeTile(e, t) {
 20108              const a = e.SIZ.Csiz,
 20109                r = e.tiles[t];
 20110              for (let t = 0; t < a; t++) {
 20111                const a = r.components[t],
 20112                  n =
 20113                    void 0 !== e.currentTile.QCC[t]
 20114                      ? e.currentTile.QCC[t]
 20115                      : e.currentTile.QCD;
 20116                a.quantizationParameters = n;
 20117                const i =
 20118                  void 0 !== e.currentTile.COC[t]
 20119                    ? e.currentTile.COC[t]
 20120                    : e.currentTile.COD;
 20121                a.codingStyleParameters = i;
 20122              }
 20123              r.codingStyleDefaultParameters = e.currentTile.COD;
 20124            }
 20125            class TagTree {
 20126              constructor(e, t) {
 20127                const a = (0, n.log2)(Math.max(e, t)) + 1;
 20128                this.levels = [];
 20129                for (let r = 0; r < a; r++) {
 20130                  const a = { width: e, height: t, items: [] };
 20131                  this.levels.push(a);
 20132                  e = Math.ceil(e / 2);
 20133                  t = Math.ceil(t / 2);
 20134                }
 20135              }
 20136              reset(e, t) {
 20137                let a,
 20138                  r = 0,
 20139                  n = 0;
 20140                for (; r < this.levels.length; ) {
 20141                  a = this.levels[r];
 20142                  const i = e + t * a.width;
 20143                  if (void 0 !== a.items[i]) {
 20144                    n = a.items[i];
 20145                    break;
 20146                  }
 20147                  a.index = i;
 20148                  e >>= 1;
 20149                  t >>= 1;
 20150                  r++;
 20151                }
 20152                r--;
 20153                a = this.levels[r];
 20154                a.items[a.index] = n;
 20155                this.currentLevel = r;
 20156                delete this.value;
 20157              }
 20158              incrementValue() {
 20159                const e = this.levels[this.currentLevel];
 20160                e.items[e.index]++;
 20161              }
 20162              nextLevel() {
 20163                let e = this.currentLevel,
 20164                  t = this.levels[e];
 20165                const a = t.items[t.index];
 20166                e--;
 20167                if (e < 0) {
 20168                  this.value = a;
 20169                  return !1;
 20170                }
 20171                this.currentLevel = e;
 20172                t = this.levels[e];
 20173                t.items[t.index] = a;
 20174                return !0;
 20175              }
 20176            }
 20177            class InclusionTree {
 20178              constructor(e, t, a) {
 20179                const r = (0, n.log2)(Math.max(e, t)) + 1;
 20180                this.levels = [];
 20181                for (let n = 0; n < r; n++) {
 20182                  const r = new Uint8Array(e * t);
 20183                  for (let e = 0, t = r.length; e < t; e++) r[e] = a;
 20184                  const n = { width: e, height: t, items: r };
 20185                  this.levels.push(n);
 20186                  e = Math.ceil(e / 2);
 20187                  t = Math.ceil(t / 2);
 20188                }
 20189              }
 20190              reset(e, t, a) {
 20191                let r = 0;
 20192                for (; r < this.levels.length; ) {
 20193                  const n = this.levels[r],
 20194                    i = e + t * n.width;
 20195                  n.index = i;
 20196                  const s = n.items[i];
 20197                  if (255 === s) break;
 20198                  if (s > a) {
 20199                    this.currentLevel = r;
 20200                    this.propagateValues();
 20201                    return !1;
 20202                  }
 20203                  e >>= 1;
 20204                  t >>= 1;
 20205                  r++;
 20206                }
 20207                this.currentLevel = r - 1;
 20208                return !0;
 20209              }
 20210              incrementValue(e) {
 20211                const t = this.levels[this.currentLevel];
 20212                t.items[t.index] = e + 1;
 20213                this.propagateValues();
 20214              }
 20215              propagateValues() {
 20216                let e = this.currentLevel,
 20217                  t = this.levels[e];
 20218                const a = t.items[t.index];
 20219                for (; --e >= 0; ) {
 20220                  t = this.levels[e];
 20221                  t.items[t.index] = a;
 20222                }
 20223              }
 20224              nextLevel() {
 20225                let e = this.currentLevel,
 20226                  t = this.levels[e];
 20227                const a = t.items[t.index];
 20228                t.items[t.index] = 255;
 20229                e--;
 20230                if (e < 0) return !1;
 20231                this.currentLevel = e;
 20232                t = this.levels[e];
 20233                t.items[t.index] = a;
 20234                return !0;
 20235              }
 20236            }
 20237            class BitModel {
 20238              static UNIFORM_CONTEXT = 17;
 20239              static RUNLENGTH_CONTEXT = 18;
 20240              static LLAndLHContextsLabel = new Uint8Array([
 20241                0, 5, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 1, 6, 8, 0, 3, 7,
 20242                8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0,
 20243                0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6,
 20244                8, 0, 3, 7, 8, 0, 4, 7, 8,
 20245              ]);
 20246              static HLContextLabel = new Uint8Array([
 20247                0, 3, 4, 0, 5, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 1, 3, 4, 0, 6, 7,
 20248                7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8, 0,
 20249                0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3,
 20250                4, 0, 6, 7, 7, 0, 8, 8, 8,
 20251              ]);
 20252              static HHContextLabel = new Uint8Array([
 20253                0, 1, 2, 0, 1, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 3, 4, 5, 0, 4, 5,
 20254                5, 0, 5, 5, 5, 0, 0, 0, 0, 0, 6, 7, 7, 0, 7, 7, 7, 0, 7, 7, 7, 0,
 20255                0, 0, 0, 0, 8, 8, 8, 0, 8, 8, 8, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 8,
 20256                8, 0, 8, 8, 8, 0, 8, 8, 8,
 20257              ]);
 20258              constructor(e, t, a, r, n) {
 20259                this.width = e;
 20260                this.height = t;
 20261                let i;
 20262                i =
 20263                  "HH" === a
 20264                    ? BitModel.HHContextLabel
 20265                    : "HL" === a
 20266                      ? BitModel.HLContextLabel
 20267                      : BitModel.LLAndLHContextsLabel;
 20268                this.contextLabelTable = i;
 20269                const s = e * t;
 20270                this.neighborsSignificance = new Uint8Array(s);
 20271                this.coefficentsSign = new Uint8Array(s);
 20272                let o;
 20273                o =
 20274                  n > 14
 20275                    ? new Uint32Array(s)
 20276                    : n > 6
 20277                      ? new Uint16Array(s)
 20278                      : new Uint8Array(s);
 20279                this.coefficentsMagnitude = o;
 20280                this.processingFlags = new Uint8Array(s);
 20281                const c = new Uint8Array(s);
 20282                if (0 !== r) for (let e = 0; e < s; e++) c[e] = r;
 20283                this.bitsDecoded = c;
 20284                this.reset();
 20285              }
 20286              setDecoder(e) {
 20287                this.decoder = e;
 20288              }
 20289              reset() {
 20290                this.contexts = new Int8Array(19);
 20291                this.contexts[0] = 8;
 20292                this.contexts[BitModel.UNIFORM_CONTEXT] = 92;
 20293                this.contexts[BitModel.RUNLENGTH_CONTEXT] = 6;
 20294              }
 20295              setNeighborsSignificance(e, t, a) {
 20296                const r = this.neighborsSignificance,
 20297                  n = this.width,
 20298                  i = this.height,
 20299                  s = t > 0,
 20300                  o = t + 1 < n;
 20301                let c;
 20302                if (e > 0) {
 20303                  c = a - n;
 20304                  s && (r[c - 1] += 16);
 20305                  o && (r[c + 1] += 16);
 20306                  r[c] += 4;
 20307                }
 20308                if (e + 1 < i) {
 20309                  c = a + n;
 20310                  s && (r[c - 1] += 16);
 20311                  o && (r[c + 1] += 16);
 20312                  r[c] += 4;
 20313                }
 20314                s && (r[a - 1] += 1);
 20315                o && (r[a + 1] += 1);
 20316                r[a] |= 128;
 20317              }
 20318              runSignificancePropagationPass() {
 20319                const e = this.decoder,
 20320                  t = this.width,
 20321                  a = this.height,
 20322                  r = this.coefficentsMagnitude,
 20323                  n = this.coefficentsSign,
 20324                  i = this.neighborsSignificance,
 20325                  s = this.processingFlags,
 20326                  o = this.contexts,
 20327                  c = this.contextLabelTable,
 20328                  l = this.bitsDecoded;
 20329                for (let h = 0; h < a; h += 4)
 20330                  for (let u = 0; u < t; u++) {
 20331                    let d = h * t + u;
 20332                    for (let f = 0; f < 4; f++, d += t) {
 20333                      const t = h + f;
 20334                      if (t >= a) break;
 20335                      s[d] &= -2;
 20336                      if (r[d] || !i[d]) continue;
 20337                      const g = c[i[d]];
 20338                      if (e.readBit(o, g)) {
 20339                        const e = this.decodeSignBit(t, u, d);
 20340                        n[d] = e;
 20341                        r[d] = 1;
 20342                        this.setNeighborsSignificance(t, u, d);
 20343                        s[d] |= 2;
 20344                      }
 20345                      l[d]++;
 20346                      s[d] |= 1;
 20347                    }
 20348                  }
 20349              }
 20350              decodeSignBit(e, t, a) {
 20351                const r = this.width,
 20352                  n = this.height,
 20353                  i = this.coefficentsMagnitude,
 20354                  s = this.coefficentsSign;
 20355                let o, c, l, h, u, d;
 20356                h = t > 0 && 0 !== i[a - 1];
 20357                if (t + 1 < r && 0 !== i[a + 1]) {
 20358                  l = s[a + 1];
 20359                  if (h) {
 20360                    c = s[a - 1];
 20361                    o = 1 - l - c;
 20362                  } else o = 1 - l - l;
 20363                } else if (h) {
 20364                  c = s[a - 1];
 20365                  o = 1 - c - c;
 20366                } else o = 0;
 20367                const f = 3 * o;
 20368                h = e > 0 && 0 !== i[a - r];
 20369                if (e + 1 < n && 0 !== i[a + r]) {
 20370                  l = s[a + r];
 20371                  if (h) {
 20372                    c = s[a - r];
 20373                    o = 1 - l - c + f;
 20374                  } else o = 1 - l - l + f;
 20375                } else if (h) {
 20376                  c = s[a - r];
 20377                  o = 1 - c - c + f;
 20378                } else o = f;
 20379                if (o >= 0) {
 20380                  u = 9 + o;
 20381                  d = this.decoder.readBit(this.contexts, u);
 20382                } else {
 20383                  u = 9 - o;
 20384                  d = 1 ^ this.decoder.readBit(this.contexts, u);
 20385                }
 20386                return d;
 20387              }
 20388              runMagnitudeRefinementPass() {
 20389                const e = this.decoder,
 20390                  t = this.width,
 20391                  a = this.height,
 20392                  r = this.coefficentsMagnitude,
 20393                  n = this.neighborsSignificance,
 20394                  i = this.contexts,
 20395                  s = this.bitsDecoded,
 20396                  o = this.processingFlags,
 20397                  c = t * a,
 20398                  l = 4 * t;
 20399                for (let a, h = 0; h < c; h = a) {
 20400                  a = Math.min(c, h + l);
 20401                  for (let c = 0; c < t; c++)
 20402                    for (let l = h + c; l < a; l += t) {
 20403                      if (!r[l] || 0 != (1 & o[l])) continue;
 20404                      let t = 16;
 20405                      if (0 != (2 & o[l])) {
 20406                        o[l] ^= 2;
 20407                        t = 0 === (127 & n[l]) ? 15 : 14;
 20408                      }
 20409                      const a = e.readBit(i, t);
 20410                      r[l] = (r[l] << 1) | a;
 20411                      s[l]++;
 20412                      o[l] |= 1;
 20413                    }
 20414                }
 20415              }
 20416              runCleanupPass() {
 20417                const e = this.decoder,
 20418                  t = this.width,
 20419                  a = this.height,
 20420                  r = this.neighborsSignificance,
 20421                  n = this.coefficentsMagnitude,
 20422                  i = this.coefficentsSign,
 20423                  s = this.contexts,
 20424                  o = this.contextLabelTable,
 20425                  c = this.bitsDecoded,
 20426                  l = this.processingFlags,
 20427                  h = t,
 20428                  u = 2 * t,
 20429                  d = 3 * t;
 20430                let f;
 20431                for (let g = 0; g < a; g = f) {
 20432                  f = Math.min(g + 4, a);
 20433                  const p = g * t,
 20434                    m = g + 3 < a;
 20435                  for (let a = 0; a < t; a++) {
 20436                    const b = p + a;
 20437                    let y,
 20438                      w = 0,
 20439                      S = b,
 20440                      x = g;
 20441                    if (
 20442                      m &&
 20443                      0 === l[b] &&
 20444                      0 === l[b + h] &&
 20445                      0 === l[b + u] &&
 20446                      0 === l[b + d] &&
 20447                      0 === r[b] &&
 20448                      0 === r[b + h] &&
 20449                      0 === r[b + u] &&
 20450                      0 === r[b + d]
 20451                    ) {
 20452                      if (!e.readBit(s, BitModel.RUNLENGTH_CONTEXT)) {
 20453                        c[b]++;
 20454                        c[b + h]++;
 20455                        c[b + u]++;
 20456                        c[b + d]++;
 20457                        continue;
 20458                      }
 20459                      w =
 20460                        (e.readBit(s, BitModel.UNIFORM_CONTEXT) << 1) |
 20461                        e.readBit(s, BitModel.UNIFORM_CONTEXT);
 20462                      if (0 !== w) {
 20463                        x = g + w;
 20464                        S += w * t;
 20465                      }
 20466                      y = this.decodeSignBit(x, a, S);
 20467                      i[S] = y;
 20468                      n[S] = 1;
 20469                      this.setNeighborsSignificance(x, a, S);
 20470                      l[S] |= 2;
 20471                      S = b;
 20472                      for (let e = g; e <= x; e++, S += t) c[S]++;
 20473                      w++;
 20474                    }
 20475                    for (x = g + w; x < f; x++, S += t) {
 20476                      if (n[S] || 0 != (1 & l[S])) continue;
 20477                      const t = o[r[S]];
 20478                      if (1 === e.readBit(s, t)) {
 20479                        y = this.decodeSignBit(x, a, S);
 20480                        i[S] = y;
 20481                        n[S] = 1;
 20482                        this.setNeighborsSignificance(x, a, S);
 20483                        l[S] |= 2;
 20484                      }
 20485                      c[S]++;
 20486                    }
 20487                  }
 20488                }
 20489              }
 20490              checkSegmentationSymbol() {
 20491                const e = this.decoder,
 20492                  t = this.contexts;
 20493                if (
 20494                  10 !==
 20495                  ((e.readBit(t, BitModel.UNIFORM_CONTEXT) << 3) |
 20496                    (e.readBit(t, BitModel.UNIFORM_CONTEXT) << 2) |
 20497                    (e.readBit(t, BitModel.UNIFORM_CONTEXT) << 1) |
 20498                    e.readBit(t, BitModel.UNIFORM_CONTEXT))
 20499                )
 20500                  throw new JpxError("Invalid segmentation symbol");
 20501              }
 20502            }
 20503            class Transform {
 20504              constructor() {
 20505                this.constructor === Transform &&
 20506                  (0, r.unreachable)("Cannot initialize Transform.");
 20507              }
 20508              calculate(e, t, a) {
 20509                let r = e[0];
 20510                for (let n = 1, i = e.length; n < i; n++)
 20511                  r = this.iterate(r, e[n], t, a);
 20512                return r;
 20513              }
 20514              extend(e, t, a) {
 20515                let r = t - 1,
 20516                  n = t + 1,
 20517                  i = t + a - 2,
 20518                  s = t + a;
 20519                e[r--] = e[n++];
 20520                e[s++] = e[i--];
 20521                e[r--] = e[n++];
 20522                e[s++] = e[i--];
 20523                e[r--] = e[n++];
 20524                e[s++] = e[i--];
 20525                e[r] = e[n];
 20526                e[s] = e[i];
 20527              }
 20528              filter(e, t, a) {
 20529                (0, r.unreachable)("Abstract method `filter` called");
 20530              }
 20531              iterate(e, t, a, r) {
 20532                const n = e.width,
 20533                  i = e.height;
 20534                let s = e.items;
 20535                const o = t.width,
 20536                  c = t.height,
 20537                  l = t.items;
 20538                let h, u, d, f, g, p;
 20539                for (d = 0, h = 0; h < i; h++) {
 20540                  f = 2 * h * o;
 20541                  for (u = 0; u < n; u++, d++, f += 2) l[f] = s[d];
 20542                }
 20543                s = e.items = null;
 20544                const m = new Float32Array(o + 8);
 20545                if (1 === o) {
 20546                  if (0 != (1 & a))
 20547                    for (p = 0, d = 0; p < c; p++, d += o) l[d] *= 0.5;
 20548                } else
 20549                  for (p = 0, d = 0; p < c; p++, d += o) {
 20550                    m.set(l.subarray(d, d + o), 4);
 20551                    this.extend(m, 4, o);
 20552                    this.filter(m, 4, o);
 20553                    l.set(m.subarray(4, 4 + o), d);
 20554                  }
 20555                let b = 16;
 20556                const y = [];
 20557                for (h = 0; h < b; h++) y.push(new Float32Array(c + 8));
 20558                let w,
 20559                  S = 0;
 20560                e = 4 + c;
 20561                if (1 === c) {
 20562                  if (0 != (1 & r)) for (g = 0; g < o; g++) l[g] *= 0.5;
 20563                } else
 20564                  for (g = 0; g < o; g++) {
 20565                    if (0 === S) {
 20566                      b = Math.min(o - g, b);
 20567                      for (d = g, f = 4; f < e; d += o, f++)
 20568                        for (w = 0; w < b; w++) y[w][f] = l[d + w];
 20569                      S = b;
 20570                    }
 20571                    S--;
 20572                    const t = y[S];
 20573                    this.extend(t, 4, c);
 20574                    this.filter(t, 4, c);
 20575                    if (0 === S) {
 20576                      d = g - b + 1;
 20577                      for (f = 4; f < e; d += o, f++)
 20578                        for (w = 0; w < b; w++) l[d + w] = y[w][f];
 20579                    }
 20580                  }
 20581                return { width: o, height: c, items: l };
 20582              }
 20583            }
 20584            class IrreversibleTransform extends Transform {
 20585              filter(e, t, a) {
 20586                const r = a >> 1;
 20587                let n, i, s, o;
 20588                const c = -1.586134342059924,
 20589                  l = -0.052980118572961,
 20590                  h = 0.882911075530934,
 20591                  u = 0.443506852043971,
 20592                  d = 1.230174104914001;
 20593                n = (t |= 0) - 3;
 20594                for (i = r + 4; i--; n += 2) e[n] *= 0.8128930661159609;
 20595                n = t - 2;
 20596                s = u * e[n - 1];
 20597                for (i = r + 3; i--; n += 2) {
 20598                  o = u * e[n + 1];
 20599                  e[n] = d * e[n] - s - o;
 20600                  if (!i--) break;
 20601                  n += 2;
 20602                  s = u * e[n + 1];
 20603                  e[n] = d * e[n] - s - o;
 20604                }
 20605                n = t - 1;
 20606                s = h * e[n - 1];
 20607                for (i = r + 2; i--; n += 2) {
 20608                  o = h * e[n + 1];
 20609                  e[n] -= s + o;
 20610                  if (!i--) break;
 20611                  n += 2;
 20612                  s = h * e[n + 1];
 20613                  e[n] -= s + o;
 20614                }
 20615                n = t;
 20616                s = l * e[n - 1];
 20617                for (i = r + 1; i--; n += 2) {
 20618                  o = l * e[n + 1];
 20619                  e[n] -= s + o;
 20620                  if (!i--) break;
 20621                  n += 2;
 20622                  s = l * e[n + 1];
 20623                  e[n] -= s + o;
 20624                }
 20625                if (0 !== r) {
 20626                  n = t + 1;
 20627                  s = c * e[n - 1];
 20628                  for (i = r; i--; n += 2) {
 20629                    o = c * e[n + 1];
 20630                    e[n] -= s + o;
 20631                    if (!i--) break;
 20632                    n += 2;
 20633                    s = c * e[n + 1];
 20634                    e[n] -= s + o;
 20635                  }
 20636                }
 20637              }
 20638            }
 20639            class ReversibleTransform extends Transform {
 20640              filter(e, t, a) {
 20641                const r = a >> 1;
 20642                let n, i;
 20643                for (n = t |= 0, i = r + 1; i--; n += 2)
 20644                  e[n] -= (e[n - 1] + e[n + 1] + 2) >> 2;
 20645                for (n = t + 1, i = r; i--; n += 2)
 20646                  e[n] += (e[n - 1] + e[n + 1]) >> 1;
 20647              }
 20648            }
 20649          },
 20650          (e, t, a) => {
 20651            Object.defineProperty(t, "__esModule", { value: !0 });
 20652            t.LZWStream = void 0;
 20653            var r = a(18);
 20654            class LZWStream extends r.DecodeStream {
 20655              constructor(e, t, a) {
 20656                super(t);
 20657                this.str = e;
 20658                this.dict = e.dict;
 20659                this.cachedData = 0;
 20660                this.bitsCached = 0;
 20661                const r = 4096,
 20662                  n = {
 20663                    earlyChange: a,
 20664                    codeLength: 9,
 20665                    nextCode: 258,
 20666                    dictionaryValues: new Uint8Array(r),
 20667                    dictionaryLengths: new Uint16Array(r),
 20668                    dictionaryPrevCodes: new Uint16Array(r),
 20669                    currentSequence: new Uint8Array(r),
 20670                    currentSequenceLength: 0,
 20671                  };
 20672                for (let e = 0; e < 256; ++e) {
 20673                  n.dictionaryValues[e] = e;
 20674                  n.dictionaryLengths[e] = 1;
 20675                }
 20676                this.lzwState = n;
 20677              }
 20678              readBits(e) {
 20679                let t = this.bitsCached,
 20680                  a = this.cachedData;
 20681                for (; t < e; ) {
 20682                  const e = this.str.getByte();
 20683                  if (-1 === e) {
 20684                    this.eof = !0;
 20685                    return null;
 20686                  }
 20687                  a = (a << 8) | e;
 20688                  t += 8;
 20689                }
 20690                this.bitsCached = t -= e;
 20691                this.cachedData = a;
 20692                this.lastCode = null;
 20693                return (a >>> t) & ((1 << e) - 1);
 20694              }
 20695              readBlock() {
 20696                let e,
 20697                  t,
 20698                  a,
 20699                  r = 1024;
 20700                const n = this.lzwState;
 20701                if (!n) return;
 20702                const i = n.earlyChange;
 20703                let s = n.nextCode;
 20704                const o = n.dictionaryValues,
 20705                  c = n.dictionaryLengths,
 20706                  l = n.dictionaryPrevCodes;
 20707                let h = n.codeLength,
 20708                  u = n.prevCode;
 20709                const d = n.currentSequence;
 20710                let f = n.currentSequenceLength,
 20711                  g = 0,
 20712                  p = this.bufferLength,
 20713                  m = this.ensureBuffer(this.bufferLength + r);
 20714                for (e = 0; e < 512; e++) {
 20715                  const e = this.readBits(h),
 20716                    n = f > 0;
 20717                  if (e < 256) {
 20718                    d[0] = e;
 20719                    f = 1;
 20720                  } else {
 20721                    if (!(e >= 258)) {
 20722                      if (256 === e) {
 20723                        h = 9;
 20724                        s = 258;
 20725                        f = 0;
 20726                        continue;
 20727                      }
 20728                      this.eof = !0;
 20729                      delete this.lzwState;
 20730                      break;
 20731                    }
 20732                    if (e < s) {
 20733                      f = c[e];
 20734                      for (t = f - 1, a = e; t >= 0; t--) {
 20735                        d[t] = o[a];
 20736                        a = l[a];
 20737                      }
 20738                    } else d[f++] = d[0];
 20739                  }
 20740                  if (n) {
 20741                    l[s] = u;
 20742                    c[s] = c[u] + 1;
 20743                    o[s] = d[0];
 20744                    s++;
 20745                    h =
 20746                      (s + i) & (s + i - 1)
 20747                        ? h
 20748                        : 0 |
 20749                          Math.min(Math.log(s + i) / 0.6931471805599453 + 1, 12);
 20750                  }
 20751                  u = e;
 20752                  g += f;
 20753                  if (r < g) {
 20754                    do {
 20755                      r += 512;
 20756                    } while (r < g);
 20757                    m = this.ensureBuffer(this.bufferLength + r);
 20758                  }
 20759                  for (t = 0; t < f; t++) m[p++] = d[t];
 20760                }
 20761                n.nextCode = s;
 20762                n.codeLength = h;
 20763                n.prevCode = u;
 20764                n.currentSequenceLength = f;
 20765                this.bufferLength = p;
 20766              }
 20767            }
 20768            t.LZWStream = LZWStream;
 20769          },
 20770          (e, t, a) => {
 20771            Object.defineProperty(t, "__esModule", { value: !0 });
 20772            t.PredictorStream = void 0;
 20773            var r = a(18),
 20774              n = a(4),
 20775              i = a(2);
 20776            class PredictorStream extends r.DecodeStream {
 20777              constructor(e, t, a) {
 20778                super(t);
 20779                if (!(a instanceof n.Dict)) return e;
 20780                const r = (this.predictor = a.get("Predictor") || 1);
 20781                if (r <= 1) return e;
 20782                if (2 !== r && (r < 10 || r > 15))
 20783                  throw new i.FormatError(`Unsupported predictor: ${r}`);
 20784                this.readBlock = 2 === r ? this.readBlockTiff : this.readBlockPng;
 20785                this.str = e;
 20786                this.dict = e.dict;
 20787                const s = (this.colors = a.get("Colors") || 1),
 20788                  o = (this.bits = a.get("BPC", "BitsPerComponent") || 8),
 20789                  c = (this.columns = a.get("Columns") || 1);
 20790                this.pixBytes = (s * o + 7) >> 3;
 20791                this.rowBytes = (c * s * o + 7) >> 3;
 20792                return this;
 20793              }
 20794              readBlockTiff() {
 20795                const e = this.rowBytes,
 20796                  t = this.bufferLength,
 20797                  a = this.ensureBuffer(t + e),
 20798                  r = this.bits,
 20799                  n = this.colors,
 20800                  i = this.str.getBytes(e);
 20801                this.eof = !i.length;
 20802                if (this.eof) return;
 20803                let s,
 20804                  o = 0,
 20805                  c = 0,
 20806                  l = 0,
 20807                  h = 0,
 20808                  u = t;
 20809                if (1 === r && 1 === n)
 20810                  for (s = 0; s < e; ++s) {
 20811                    let e = i[s] ^ o;
 20812                    e ^= e >> 1;
 20813                    e ^= e >> 2;
 20814                    e ^= e >> 4;
 20815                    o = (1 & e) << 7;
 20816                    a[u++] = e;
 20817                  }
 20818                else if (8 === r) {
 20819                  for (s = 0; s < n; ++s) a[u++] = i[s];
 20820                  for (; s < e; ++s) {
 20821                    a[u] = a[u - n] + i[s];
 20822                    u++;
 20823                  }
 20824                } else if (16 === r) {
 20825                  const t = 2 * n;
 20826                  for (s = 0; s < t; ++s) a[u++] = i[s];
 20827                  for (; s < e; s += 2) {
 20828                    const e =
 20829                      ((255 & i[s]) << 8) +
 20830                      (255 & i[s + 1]) +
 20831                      ((255 & a[u - t]) << 8) +
 20832                      (255 & a[u - t + 1]);
 20833                    a[u++] = (e >> 8) & 255;
 20834                    a[u++] = 255 & e;
 20835                  }
 20836                } else {
 20837                  const e = new Uint8Array(n + 1),
 20838                    u = (1 << r) - 1;
 20839                  let d = 0,
 20840                    f = t;
 20841                  const g = this.columns;
 20842                  for (s = 0; s < g; ++s)
 20843                    for (let t = 0; t < n; ++t) {
 20844                      if (l < r) {
 20845                        o = (o << 8) | (255 & i[d++]);
 20846                        l += 8;
 20847                      }
 20848                      e[t] = (e[t] + (o >> (l - r))) & u;
 20849                      l -= r;
 20850                      c = (c << r) | e[t];
 20851                      h += r;
 20852                      if (h >= 8) {
 20853                        a[f++] = (c >> (h - 8)) & 255;
 20854                        h -= 8;
 20855                      }
 20856                    }
 20857                  h > 0 && (a[f++] = (c << (8 - h)) + (o & ((1 << (8 - h)) - 1)));
 20858                }
 20859                this.bufferLength += e;
 20860              }
 20861              readBlockPng() {
 20862                const e = this.rowBytes,
 20863                  t = this.pixBytes,
 20864                  a = this.str.getByte(),
 20865                  r = this.str.getBytes(e);
 20866                this.eof = !r.length;
 20867                if (this.eof) return;
 20868                const n = this.bufferLength,
 20869                  s = this.ensureBuffer(n + e);
 20870                let o = s.subarray(n - e, n);
 20871                0 === o.length && (o = new Uint8Array(e));
 20872                let c,
 20873                  l,
 20874                  h,
 20875                  u = n;
 20876                switch (a) {
 20877                  case 0:
 20878                    for (c = 0; c < e; ++c) s[u++] = r[c];
 20879                    break;
 20880                  case 1:
 20881                    for (c = 0; c < t; ++c) s[u++] = r[c];
 20882                    for (; c < e; ++c) {
 20883                      s[u] = (s[u - t] + r[c]) & 255;
 20884                      u++;
 20885                    }
 20886                    break;
 20887                  case 2:
 20888                    for (c = 0; c < e; ++c) s[u++] = (o[c] + r[c]) & 255;
 20889                    break;
 20890                  case 3:
 20891                    for (c = 0; c < t; ++c) s[u++] = (o[c] >> 1) + r[c];
 20892                    for (; c < e; ++c) {
 20893                      s[u] = (((o[c] + s[u - t]) >> 1) + r[c]) & 255;
 20894                      u++;
 20895                    }
 20896                    break;
 20897                  case 4:
 20898                    for (c = 0; c < t; ++c) {
 20899                      l = o[c];
 20900                      h = r[c];
 20901                      s[u++] = l + h;
 20902                    }
 20903                    for (; c < e; ++c) {
 20904                      l = o[c];
 20905                      const e = o[c - t],
 20906                        a = s[u - t],
 20907                        n = a + l - e;
 20908                      let i = n - a;
 20909                      i < 0 && (i = -i);
 20910                      let d = n - l;
 20911                      d < 0 && (d = -d);
 20912                      let f = n - e;
 20913                      f < 0 && (f = -f);
 20914                      h = r[c];
 20915                      s[u++] = i <= d && i <= f ? a + h : d <= f ? l + h : e + h;
 20916                    }
 20917                    break;
 20918                  default:
 20919                    throw new i.FormatError(`Unsupported predictor: ${a}`);
 20920                }
 20921                this.bufferLength += e;
 20922              }
 20923            }
 20924            t.PredictorStream = PredictorStream;
 20925          },
 20926          (e, t, a) => {
 20927            Object.defineProperty(t, "__esModule", { value: !0 });
 20928            t.RunLengthStream = void 0;
 20929            var r = a(18);
 20930            class RunLengthStream extends r.DecodeStream {
 20931              constructor(e, t) {
 20932                super(t);
 20933                this.str = e;
 20934                this.dict = e.dict;
 20935              }
 20936              readBlock() {
 20937                const e = this.str.getBytes(2);
 20938                if (!e || e.length < 2 || 128 === e[0]) {
 20939                  this.eof = !0;
 20940                  return;
 20941                }
 20942                let t,
 20943                  a = this.bufferLength,
 20944                  r = e[0];
 20945                if (r < 128) {
 20946                  t = this.ensureBuffer(a + r + 1);
 20947                  t[a++] = e[1];
 20948                  if (r > 0) {
 20949                    const e = this.str.getBytes(r);
 20950                    t.set(e, a);
 20951                    a += r;
 20952                  }
 20953                } else {
 20954                  r = 257 - r;
 20955                  const n = e[1];
 20956                  t = this.ensureBuffer(a + r + 1);
 20957                  for (let e = 0; e < r; e++) t[a++] = n;
 20958                }
 20959                this.bufferLength = a;
 20960              }
 20961            }
 20962            t.RunLengthStream = RunLengthStream;
 20963          },
 20964          (e, t, a) => {
 20965            Object.defineProperty(t, "__esModule", { value: !0 });
 20966            t.Font = t.ErrorFont = void 0;
 20967            var r = a(2),
 20968              n = a(35),
 20969              i = a(38),
 20970              s = a(40),
 20971              o = a(39),
 20972              c = a(37),
 20973              l = a(41),
 20974              h = a(42),
 20975              u = a(43),
 20976              d = a(44),
 20977              f = a(45),
 20978              g = a(46),
 20979              p = a(14),
 20980              m = a(47),
 20981              b = a(3),
 20982              y = a(8),
 20983              w = a(48);
 20984            const S = [
 20985                [57344, 63743],
 20986                [1048576, 1114109],
 20987              ],
 20988              x = 1e3,
 20989              C = [
 20990                "ascent",
 20991                "bbox",
 20992                "black",
 20993                "bold",
 20994                "charProcOperatorList",
 20995                "composite",
 20996                "cssFontInfo",
 20997                "data",
 20998                "defaultVMetrics",
 20999                "defaultWidth",
 21000                "descent",
 21001                "fallbackName",
 21002                "fontMatrix",
 21003                "isInvalidPDFjsFont",
 21004                "isType3Font",
 21005                "italic",
 21006                "loadedName",
 21007                "mimetype",
 21008                "missingFile",
 21009                "name",
 21010                "remeasure",
 21011                "subtype",
 21012                "systemFontInfo",
 21013                "type",
 21014                "vertical",
 21015              ],
 21016              k = [
 21017                "cMap",
 21018                "defaultEncoding",
 21019                "differences",
 21020                "isMonospace",
 21021                "isSerifFont",
 21022                "isSymbolicFont",
 21023                "seacMap",
 21024                "toFontChar",
 21025                "toUnicode",
 21026                "vmetrics",
 21027                "widths",
 21028              ];
 21029            function adjustWidths(e) {
 21030              if (!e.fontMatrix) return;
 21031              if (e.fontMatrix[0] === r.FONT_IDENTITY_MATRIX[0]) return;
 21032              const t = 0.001 / e.fontMatrix[0],
 21033                a = e.widths;
 21034              for (const e in a) a[e] *= t;
 21035              e.defaultWidth *= t;
 21036            }
 21037            function amendFallbackToUnicode(e) {
 21038              if (!e.fallbackToUnicode) return;
 21039              if (e.toUnicode instanceof h.IdentityToUnicodeMap) return;
 21040              const t = [];
 21041              for (const a in e.fallbackToUnicode)
 21042                e.toUnicode.has(a) || (t[a] = e.fallbackToUnicode[a]);
 21043              t.length > 0 && e.toUnicode.amend(t);
 21044            }
 21045            class Glyph {
 21046              constructor(e, t, a, r, n, i, s, o, c) {
 21047                this.originalCharCode = e;
 21048                this.fontChar = t;
 21049                this.unicode = a;
 21050                this.accent = r;
 21051                this.width = n;
 21052                this.vmetric = i;
 21053                this.operatorListId = s;
 21054                this.isSpace = o;
 21055                this.isInFont = c;
 21056              }
 21057              get category() {
 21058                return (0, r.shadow)(
 21059                  this,
 21060                  "category",
 21061                  (0, s.getCharUnicodeCategory)(this.unicode),
 21062                  !0,
 21063                );
 21064              }
 21065            }
 21066            function int16(e, t) {
 21067              return (e << 8) + t;
 21068            }
 21069            function writeSignedInt16(e, t, a) {
 21070              e[t + 1] = a;
 21071              e[t] = a >>> 8;
 21072            }
 21073            function signedInt16(e, t) {
 21074              const a = (e << 8) + t;
 21075              return 32768 & a ? a - 65536 : a;
 21076            }
 21077            function string16(e) {
 21078              return String.fromCharCode((e >> 8) & 255, 255 & e);
 21079            }
 21080            function safeString16(e) {
 21081              e > 32767 ? (e = 32767) : e < -32768 && (e = -32768);
 21082              return String.fromCharCode((e >> 8) & 255, 255 & e);
 21083            }
 21084            function isTrueTypeCollectionFile(e) {
 21085              const t = e.peekBytes(4);
 21086              return "ttcf" === (0, r.bytesToString)(t);
 21087            }
 21088            function getFontFileType(e, { type: t, subtype: a, composite: n }) {
 21089              let i, s;
 21090              if (
 21091                (function isTrueTypeFile(e) {
 21092                  const t = e.peekBytes(4);
 21093                  return (
 21094                    65536 === (0, b.readUint32)(t, 0) ||
 21095                    "true" === (0, r.bytesToString)(t)
 21096                  );
 21097                })(e) ||
 21098                isTrueTypeCollectionFile(e)
 21099              )
 21100                i = n ? "CIDFontType2" : "TrueType";
 21101              else if (
 21102                (function isOpenTypeFile(e) {
 21103                  const t = e.peekBytes(4);
 21104                  return "OTTO" === (0, r.bytesToString)(t);
 21105                })(e)
 21106              )
 21107                i = n ? "CIDFontType2" : "OpenType";
 21108              else if (
 21109                (function isType1File(e) {
 21110                  const t = e.peekBytes(2);
 21111                  return (
 21112                    (37 === t[0] && 33 === t[1]) || (128 === t[0] && 1 === t[1])
 21113                  );
 21114                })(e)
 21115              )
 21116                i = n ? "CIDFontType0" : "MMType1" === t ? "MMType1" : "Type1";
 21117              else if (
 21118                (function isCFFFile(e) {
 21119                  const t = e.peekBytes(4);
 21120                  return t[0] >= 1 && t[3] >= 1 && t[3] <= 4;
 21121                })(e)
 21122              )
 21123                if (n) {
 21124                  i = "CIDFontType0";
 21125                  s = "CIDFontType0C";
 21126                } else {
 21127                  i = "MMType1" === t ? "MMType1" : "Type1";
 21128                  s = "Type1C";
 21129                }
 21130              else {
 21131                (0, r.warn)(
 21132                  "getFontFileType: Unable to detect correct font file Type/Subtype.",
 21133                );
 21134                i = t;
 21135                s = a;
 21136              }
 21137              return [i, s];
 21138            }
 21139            function applyStandardFontGlyphMap(e, t) {
 21140              for (const a in t) e[+a] = t[a];
 21141            }
 21142            function buildToFontChar(e, t, a) {
 21143              const r = [];
 21144              let n;
 21145              for (let a = 0, i = e.length; a < i; a++) {
 21146                n = (0, s.getUnicodeForGlyph)(e[a], t);
 21147                -1 !== n && (r[a] = n);
 21148              }
 21149              for (const e in a) {
 21150                n = (0, s.getUnicodeForGlyph)(a[e], t);
 21151                -1 !== n && (r[+e] = n);
 21152              }
 21153              return r;
 21154            }
 21155            function isMacNameRecord(e) {
 21156              return 1 === e.platform && 0 === e.encoding && 0 === e.language;
 21157            }
 21158            function isWinNameRecord(e) {
 21159              return 3 === e.platform && 1 === e.encoding && 1033 === e.language;
 21160            }
 21161            function convertCidString(e, t, a = !1) {
 21162              switch (t.length) {
 21163                case 1:
 21164                  return t.charCodeAt(0);
 21165                case 2:
 21166                  return (t.charCodeAt(0) << 8) | t.charCodeAt(1);
 21167              }
 21168              const n = `Unsupported CID string (charCode ${e}): "${t}".`;
 21169              if (a) throw new r.FormatError(n);
 21170              (0, r.warn)(n);
 21171              return t;
 21172            }
 21173            function adjustMapping(e, t, a, n) {
 21174              const i = Object.create(null),
 21175                s = new Map(),
 21176                o = [],
 21177                c = new Set();
 21178              let l = 0;
 21179              let h = S[l][0],
 21180                u = S[l][1];
 21181              for (let f in e) {
 21182                f |= 0;
 21183                let g = e[f];
 21184                if (!t(g)) continue;
 21185                if (h > u) {
 21186                  l++;
 21187                  if (l >= S.length) {
 21188                    (0, r.warn)("Ran out of space in font private use area.");
 21189                    break;
 21190                  }
 21191                  h = S[l][0];
 21192                  u = S[l][1];
 21193                }
 21194                const p = h++;
 21195                0 === g && (g = a);
 21196                let m = n.get(f);
 21197                "string" == typeof m && (m = m.codePointAt(0));
 21198                if (
 21199                  m &&
 21200                  !((d = m),
 21201                  (S[0][0] <= d && d <= S[0][1]) ||
 21202                    (S[1][0] <= d && d <= S[1][1])) &&
 21203                  !c.has(g)
 21204                ) {
 21205                  s.set(m, g);
 21206                  c.add(g);
 21207                }
 21208                i[p] = g;
 21209                o[f] = p;
 21210              }
 21211              var d;
 21212              return {
 21213                toFontChar: o,
 21214                charCodeToGlyphId: i,
 21215                toUnicodeExtraMap: s,
 21216                nextAvailableFontCharCode: h,
 21217              };
 21218            }
 21219            function createCmapTable(e, t, a) {
 21220              const n = (function getRanges(e, t, a) {
 21221                  const r = [];
 21222                  for (const t in e)
 21223                    e[t] >= a || r.push({ fontCharCode: 0 | t, glyphId: e[t] });
 21224                  if (t)
 21225                    for (const [e, n] of t)
 21226                      n >= a || r.push({ fontCharCode: e, glyphId: n });
 21227                  0 === r.length && r.push({ fontCharCode: 0, glyphId: 0 });
 21228                  r.sort(function fontGetRangesSort(e, t) {
 21229                    return e.fontCharCode - t.fontCharCode;
 21230                  });
 21231                  const n = [],
 21232                    i = r.length;
 21233                  for (let e = 0; e < i; ) {
 21234                    const t = r[e].fontCharCode,
 21235                      a = [r[e].glyphId];
 21236                    ++e;
 21237                    let s = t;
 21238                    for (; e < i && s + 1 === r[e].fontCharCode; ) {
 21239                      a.push(r[e].glyphId);
 21240                      ++s;
 21241                      ++e;
 21242                      if (65535 === s) break;
 21243                    }
 21244                    n.push([t, s, a]);
 21245                  }
 21246                  return n;
 21247                })(e, t, a),
 21248                i = n.at(-1)[1] > 65535 ? 2 : 1;
 21249              let s,
 21250                o,
 21251                c,
 21252                l,
 21253                h = "\0\0" + string16(i) + "\0\0" + (0, r.string32)(4 + 8 * i);
 21254              for (s = n.length - 1; s >= 0 && !(n[s][0] <= 65535); --s);
 21255              const u = s + 1;
 21256              n[s][0] < 65535 && 65535 === n[s][1] && (n[s][1] = 65534);
 21257              const d = n[s][1] < 65535 ? 1 : 0,
 21258                f = u + d,
 21259                g = m.OpenTypeFileBuilder.getSearchParams(f, 2);
 21260              let p,
 21261                b,
 21262                y,
 21263                w,
 21264                S = "",
 21265                x = "",
 21266                C = "",
 21267                k = "",
 21268                v = "",
 21269                F = 0;
 21270              for (s = 0, o = u; s < o; s++) {
 21271                p = n[s];
 21272                b = p[0];
 21273                y = p[1];
 21274                S += string16(b);
 21275                x += string16(y);
 21276                w = p[2];
 21277                let e = !0;
 21278                for (c = 1, l = w.length; c < l; ++c)
 21279                  if (w[c] !== w[c - 1] + 1) {
 21280                    e = !1;
 21281                    break;
 21282                  }
 21283                if (e) {
 21284                  C += string16((w[0] - b) & 65535);
 21285                  k += string16(0);
 21286                } else {
 21287                  const e = 2 * (f - s) + 2 * F;
 21288                  F += y - b + 1;
 21289                  C += string16(0);
 21290                  k += string16(e);
 21291                  for (c = 0, l = w.length; c < l; ++c) v += string16(w[c]);
 21292                }
 21293              }
 21294              if (d > 0) {
 21295                x += "ÿÿ";
 21296                S += "ÿÿ";
 21297                C += "\0";
 21298                k += "\0\0";
 21299              }
 21300              const O =
 21301                "\0\0" +
 21302                string16(2 * f) +
 21303                string16(g.range) +
 21304                string16(g.entry) +
 21305                string16(g.rangeShift) +
 21306                x +
 21307                "\0\0" +
 21308                S +
 21309                C +
 21310                k +
 21311                v;
 21312              let T = "",
 21313                M = "";
 21314              if (i > 1) {
 21315                h += "\0\0\n" + (0, r.string32)(4 + 8 * i + 4 + O.length);
 21316                T = "";
 21317                for (s = 0, o = n.length; s < o; s++) {
 21318                  p = n[s];
 21319                  b = p[0];
 21320                  w = p[2];
 21321                  let e = w[0];
 21322                  for (c = 1, l = w.length; c < l; ++c)
 21323                    if (w[c] !== w[c - 1] + 1) {
 21324                      y = p[0] + c - 1;
 21325                      T +=
 21326                        (0, r.string32)(b) +
 21327                        (0, r.string32)(y) +
 21328                        (0, r.string32)(e);
 21329                      b = y + 1;
 21330                      e = w[c];
 21331                    }
 21332                  T +=
 21333                    (0, r.string32)(b) +
 21334                    (0, r.string32)(p[1]) +
 21335                    (0, r.string32)(e);
 21336                }
 21337                M =
 21338                  "\0\f\0\0" +
 21339                  (0, r.string32)(T.length + 16) +
 21340                  "\0\0\0\0" +
 21341                  (0, r.string32)(T.length / 12);
 21342              }
 21343              return h + "\0" + string16(O.length + 4) + O + M + T;
 21344            }
 21345            function createOS2Table(e, t, a) {
 21346              a ||= { unitsPerEm: 0, yMax: 0, yMin: 0, ascent: 0, descent: 0 };
 21347              let n = 0,
 21348                i = 0,
 21349                o = 0,
 21350                c = 0,
 21351                l = null,
 21352                h = 0,
 21353                u = -1;
 21354              if (t) {
 21355                for (let e in t) {
 21356                  e |= 0;
 21357                  (l > e || !l) && (l = e);
 21358                  h < e && (h = e);
 21359                  u = (0, s.getUnicodeRangeFor)(e, u);
 21360                  if (u < 32) n |= 1 << u;
 21361                  else if (u < 64) i |= 1 << (u - 32);
 21362                  else if (u < 96) o |= 1 << (u - 64);
 21363                  else {
 21364                    if (!(u < 123))
 21365                      throw new r.FormatError(
 21366                        "Unicode ranges Bits > 123 are reserved for internal usage",
 21367                      );
 21368                    c |= 1 << (u - 96);
 21369                  }
 21370                }
 21371                h > 65535 && (h = 65535);
 21372              } else {
 21373                l = 0;
 21374                h = 255;
 21375              }
 21376              const d = e.bbox || [0, 0, 0, 0],
 21377                f =
 21378                  a.unitsPerEm || 1 / (e.fontMatrix || r.FONT_IDENTITY_MATRIX)[0],
 21379                g = e.ascentScaled ? 1 : f / x,
 21380                p = a.ascent || Math.round(g * (e.ascent || d[3]));
 21381              let m = a.descent || Math.round(g * (e.descent || d[1]));
 21382              m > 0 && e.descent > 0 && d[1] < 0 && (m = -m);
 21383              const b = a.yMax || p,
 21384                y = -a.yMin || -m;
 21385              return (
 21386                "\0$ô\0\0\0Š»\0\0\0ŒŠ»\0\0ß\x001\0\0\0\0" +
 21387                String.fromCharCode(e.fixedPitch ? 9 : 0) +
 21388                "\0\0\0\0\0\0" +
 21389                (0, r.string32)(n) +
 21390                (0, r.string32)(i) +
 21391                (0, r.string32)(o) +
 21392                (0, r.string32)(c) +
 21393                "*21*" +
 21394                string16(e.italicAngle ? 1 : 0) +
 21395                string16(l || e.firstChar) +
 21396                string16(h || e.lastChar) +
 21397                string16(p) +
 21398                string16(m) +
 21399                "\0d" +
 21400                string16(b) +
 21401                string16(y) +
 21402                "\0\0\0\0\0\0\0\0" +
 21403                string16(e.xHeight) +
 21404                string16(e.capHeight) +
 21405                string16(0) +
 21406                string16(l || e.firstChar) +
 21407                "\0"
 21408              );
 21409            }
 21410            function createPostTable(e) {
 21411              const t = Math.floor(65536 * e.italicAngle);
 21412              return (
 21413                "\0\0\0" +
 21414                (0, r.string32)(t) +
 21415                "\0\0\0\0" +
 21416                (0, r.string32)(e.fixedPitch ? 1 : 0) +
 21417                "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
 21418              );
 21419            }
 21420            function createPostscriptName(e) {
 21421              return e.replaceAll(/[^\x21-\x7E]|[[\](){}<>/%]/g, "").slice(0, 63);
 21422            }
 21423            function createNameTable(e, t) {
 21424              t || (t = [[], []]);
 21425              const a = [
 21426                  t[0][0] || "Original licence",
 21427                  t[0][1] || e,
 21428                  t[0][2] || "Unknown",
 21429                  t[0][3] || "uniqueID",
 21430                  t[0][4] || e,
 21431                  t[0][5] || "Version 0.11",
 21432                  t[0][6] || createPostscriptName(e),
 21433                  t[0][7] || "Unknown",
 21434                  t[0][8] || "Unknown",
 21435                  t[0][9] || "Unknown",
 21436                ],
 21437                r = [];
 21438              let n, i, s, o, c;
 21439              for (n = 0, i = a.length; n < i; n++) {
 21440                c = t[1][n] || a[n];
 21441                const e = [];
 21442                for (s = 0, o = c.length; s < o; s++)
 21443                  e.push(string16(c.charCodeAt(s)));
 21444                r.push(e.join(""));
 21445              }
 21446              const l = [a, r],
 21447                h = ["\0", "\0"],
 21448                u = ["\0\0", "\0"],
 21449                d = ["\0\0", "\t"],
 21450                f = a.length * h.length;
 21451              let g = "\0\0" + string16(f) + string16(12 * f + 6),
 21452                p = 0;
 21453              for (n = 0, i = h.length; n < i; n++) {
 21454                const e = l[n];
 21455                for (s = 0, o = e.length; s < o; s++) {
 21456                  c = e[s];
 21457                  g +=
 21458                    h[n] +
 21459                    u[n] +
 21460                    d[n] +
 21461                    string16(s) +
 21462                    string16(c.length) +
 21463                    string16(p);
 21464                  p += c.length;
 21465                }
 21466              }
 21467              g += a.join("") + r.join("");
 21468              return g;
 21469            }
 21470            t.Font = class Font {
 21471              constructor(e, t, a) {
 21472                this.name = e;
 21473                this.psName = null;
 21474                this.mimetype = null;
 21475                this.disableFontFace = !1;
 21476                this.loadedName = a.loadedName;
 21477                this.isType3Font = a.isType3Font;
 21478                this.missingFile = !1;
 21479                this.cssFontInfo = a.cssFontInfo;
 21480                this._charsCache = Object.create(null);
 21481                this._glyphCache = Object.create(null);
 21482                let n = !!(a.flags & i.FontFlags.Serif);
 21483                if (!n && !a.isSimulatedFlags) {
 21484                  const t = e.replaceAll(/[,_]/g, "-").split("-")[0],
 21485                    a = (0, l.getSerifFonts)();
 21486                  for (const e of t.split("+"))
 21487                    if (a[e]) {
 21488                      n = !0;
 21489                      break;
 21490                    }
 21491                }
 21492                this.isSerifFont = n;
 21493                this.isSymbolicFont = !!(a.flags & i.FontFlags.Symbolic);
 21494                this.isMonospace = !!(a.flags & i.FontFlags.FixedPitch);
 21495                let { type: s, subtype: o } = a;
 21496                this.type = s;
 21497                this.subtype = o;
 21498                this.systemFontInfo = a.systemFontInfo;
 21499                const c = e.match(/^InvalidPDFjsFont_(.*)_\d+$/);
 21500                this.isInvalidPDFjsFont = !!c;
 21501                this.isInvalidPDFjsFont
 21502                  ? (this.fallbackName = c[1])
 21503                  : this.isMonospace
 21504                    ? (this.fallbackName = "monospace")
 21505                    : this.isSerifFont
 21506                      ? (this.fallbackName = "serif")
 21507                      : (this.fallbackName = "sans-serif");
 21508                if (this.systemFontInfo?.guessFallback) {
 21509                  this.systemFontInfo.guessFallback = !1;
 21510                  this.systemFontInfo.css += `,${this.fallbackName}`;
 21511                }
 21512                this.differences = a.differences;
 21513                this.widths = a.widths;
 21514                this.defaultWidth = a.defaultWidth;
 21515                this.composite = a.composite;
 21516                this.cMap = a.cMap;
 21517                this.capHeight = a.capHeight / x;
 21518                this.ascent = a.ascent / x;
 21519                this.descent = a.descent / x;
 21520                this.lineHeight = this.ascent - this.descent;
 21521                this.fontMatrix = a.fontMatrix;
 21522                this.bbox = a.bbox;
 21523                this.defaultEncoding = a.defaultEncoding;
 21524                this.toUnicode = a.toUnicode;
 21525                this.toFontChar = [];
 21526                if ("Type3" === a.type) {
 21527                  for (let e = 0; e < 256; e++)
 21528                    this.toFontChar[e] =
 21529                      this.differences[e] || a.defaultEncoding[e];
 21530                  return;
 21531                }
 21532                this.cidEncoding = a.cidEncoding || "";
 21533                this.vertical = !!a.vertical;
 21534                if (this.vertical) {
 21535                  this.vmetrics = a.vmetrics;
 21536                  this.defaultVMetrics = a.defaultVMetrics;
 21537                }
 21538                if (!t || t.isEmpty) {
 21539                  t &&
 21540                    (0, r.warn)(
 21541                      'Font file is empty in "' +
 21542                        e +
 21543                        '" (' +
 21544                        this.loadedName +
 21545                        ")",
 21546                    );
 21547                  this.fallbackToSystemFont(a);
 21548                  return;
 21549                }
 21550                [s, o] = getFontFileType(t, a);
 21551                (s === this.type && o === this.subtype) ||
 21552                  (0, r.info)(
 21553                    `Inconsistent font file Type/SubType, expected: ${this.type}/${this.subtype} but found: ${s}/${o}.`,
 21554                  );
 21555                let h;
 21556                try {
 21557                  switch (s) {
 21558                    case "MMType1":
 21559                      (0, r.info)(
 21560                        "MMType1 font (" + e + "), falling back to Type1.",
 21561                      );
 21562                    case "Type1":
 21563                    case "CIDFontType0":
 21564                      this.mimetype = "font/opentype";
 21565                      const n =
 21566                        "Type1C" === o || "CIDFontType0C" === o
 21567                          ? new u.CFFFont(t, a)
 21568                          : new w.Type1Font(e, t, a);
 21569                      adjustWidths(a);
 21570                      h = this.convert(e, n, a);
 21571                      break;
 21572                    case "OpenType":
 21573                    case "TrueType":
 21574                    case "CIDFontType2":
 21575                      this.mimetype = "font/opentype";
 21576                      h = this.checkAndRepair(e, t, a);
 21577                      if (this.isOpenType) {
 21578                        adjustWidths(a);
 21579                        s = "OpenType";
 21580                      }
 21581                      break;
 21582                    default:
 21583                      throw new r.FormatError(`Font ${s} is not supported`);
 21584                  }
 21585                } catch (e) {
 21586                  (0, r.warn)(e);
 21587                  this.fallbackToSystemFont(a);
 21588                  return;
 21589                }
 21590                amendFallbackToUnicode(a);
 21591                this.data = h;
 21592                this.type = s;
 21593                this.subtype = o;
 21594                this.fontMatrix = a.fontMatrix;
 21595                this.widths = a.widths;
 21596                this.defaultWidth = a.defaultWidth;
 21597                this.toUnicode = a.toUnicode;
 21598                this.seacMap = a.seacMap;
 21599              }
 21600              get renderer() {
 21601                const e = d.FontRendererFactory.create(
 21602                  this,
 21603                  i.SEAC_ANALYSIS_ENABLED,
 21604                );
 21605                return (0, r.shadow)(this, "renderer", e);
 21606              }
 21607              exportData(e = !1) {
 21608                const t = e ? [...C, ...k] : C,
 21609                  a = Object.create(null);
 21610                let r, n;
 21611                for (r of t) {
 21612                  n = this[r];
 21613                  void 0 !== n && (a[r] = n);
 21614                }
 21615                return a;
 21616              }
 21617              fallbackToSystemFont(e) {
 21618                this.missingFile = !0;
 21619                const { name: t, type: a } = this;
 21620                let r = (0, i.normalizeFontName)(t);
 21621                const n = (0, l.getStdFontMap)(),
 21622                  u = (0, l.getNonStdFontMap)(),
 21623                  d = !!n[r],
 21624                  g = !(!u[r] || !n[u[r]]);
 21625                r = n[r] || u[r] || r;
 21626                const p = (0, f.getFontBasicMetrics)()[r];
 21627                if (p) {
 21628                  isNaN(this.ascent) && (this.ascent = p.ascent / x);
 21629                  isNaN(this.descent) && (this.descent = p.descent / x);
 21630                  isNaN(this.capHeight) && (this.capHeight = p.capHeight / x);
 21631                }
 21632                this.bold = /bold/gi.test(r);
 21633                this.italic = /oblique|italic/gi.test(r);
 21634                this.black = /Black/g.test(t);
 21635                const m = /Narrow/g.test(t);
 21636                this.remeasure = (!d || m) && Object.keys(this.widths).length > 0;
 21637                if (
 21638                  (d || g) &&
 21639                  "CIDFontType2" === a &&
 21640                  this.cidEncoding.startsWith("Identity-")
 21641                ) {
 21642                  const a = e.cidToGidMap,
 21643                    r = [];
 21644                  applyStandardFontGlyphMap(
 21645                    r,
 21646                    (0, l.getGlyphMapForStandardFonts)(),
 21647                  );
 21648                  /Arial-?Black/i.test(t)
 21649                    ? applyStandardFontGlyphMap(
 21650                        r,
 21651                        (0, l.getSupplementalGlyphMapForArialBlack)(),
 21652                      )
 21653                    : /Calibri/i.test(t) &&
 21654                      applyStandardFontGlyphMap(
 21655                        r,
 21656                        (0, l.getSupplementalGlyphMapForCalibri)(),
 21657                      );
 21658                  if (a) {
 21659                    for (const e in r) {
 21660                      const t = r[e];
 21661                      void 0 !== a[t] && (r[+e] = a[t]);
 21662                    }
 21663                    a.length !== this.toUnicode.length &&
 21664                      e.hasIncludedToUnicodeMap &&
 21665                      this.toUnicode instanceof h.IdentityToUnicodeMap &&
 21666                      this.toUnicode.forEach(function (e, t) {
 21667                        const n = r[e];
 21668                        void 0 === a[n] && (r[+e] = t);
 21669                      });
 21670                  }
 21671                  this.toUnicode instanceof h.IdentityToUnicodeMap ||
 21672                    this.toUnicode.forEach(function (e, t) {
 21673                      r[+e] = t;
 21674                    });
 21675                  this.toFontChar = r;
 21676                  this.toUnicode = new h.ToUnicodeMap(r);
 21677                } else if (/Symbol/i.test(r))
 21678                  this.toFontChar = buildToFontChar(
 21679                    c.SymbolSetEncoding,
 21680                    (0, o.getGlyphsUnicode)(),
 21681                    this.differences,
 21682                  );
 21683                else if (/Dingbats/i.test(r))
 21684                  this.toFontChar = buildToFontChar(
 21685                    c.ZapfDingbatsEncoding,
 21686                    (0, o.getDingbatsGlyphsUnicode)(),
 21687                    this.differences,
 21688                  );
 21689                else if (d) {
 21690                  const e = buildToFontChar(
 21691                    this.defaultEncoding,
 21692                    (0, o.getGlyphsUnicode)(),
 21693                    this.differences,
 21694                  );
 21695                  "CIDFontType2" !== a ||
 21696                    this.cidEncoding.startsWith("Identity-") ||
 21697                    this.toUnicode instanceof h.IdentityToUnicodeMap ||
 21698                    this.toUnicode.forEach(function (t, a) {
 21699                      e[+t] = a;
 21700                    });
 21701                  this.toFontChar = e;
 21702                } else {
 21703                  const e = (0, o.getGlyphsUnicode)(),
 21704                    a = [];
 21705                  this.toUnicode.forEach((t, r) => {
 21706                    if (!this.composite) {
 21707                      const a = this.differences[t] || this.defaultEncoding[t],
 21708                        n = (0, s.getUnicodeForGlyph)(a, e);
 21709                      -1 !== n && (r = n);
 21710                    }
 21711                    a[+t] = r;
 21712                  });
 21713                  this.composite &&
 21714                    this.toUnicode instanceof h.IdentityToUnicodeMap &&
 21715                    /Tahoma|Verdana/i.test(t) &&
 21716                    applyStandardFontGlyphMap(
 21717                      a,
 21718                      (0, l.getGlyphMapForStandardFonts)(),
 21719                    );
 21720                  this.toFontChar = a;
 21721                }
 21722                amendFallbackToUnicode(e);
 21723                this.loadedName = r.split("-")[0];
 21724              }
 21725              checkAndRepair(e, t, a) {
 21726                const s = [
 21727                  "OS/2",
 21728                  "cmap",
 21729                  "head",
 21730                  "hhea",
 21731                  "hmtx",
 21732                  "maxp",
 21733                  "name",
 21734                  "post",
 21735                  "loca",
 21736                  "glyf",
 21737                  "fpgm",
 21738                  "prep",
 21739                  "cvt ",
 21740                  "CFF ",
 21741                ];
 21742                function readTables(e, t) {
 21743                  const a = Object.create(null);
 21744                  a["OS/2"] = null;
 21745                  a.cmap = null;
 21746                  a.head = null;
 21747                  a.hhea = null;
 21748                  a.hmtx = null;
 21749                  a.maxp = null;
 21750                  a.name = null;
 21751                  a.post = null;
 21752                  for (let r = 0; r < t; r++) {
 21753                    const t = readTableEntry(e);
 21754                    s.includes(t.tag) && 0 !== t.length && (a[t.tag] = t);
 21755                  }
 21756                  return a;
 21757                }
 21758                function readTableEntry(e) {
 21759                  const t = e.getString(4),
 21760                    a = e.getInt32() >>> 0,
 21761                    r = e.getInt32() >>> 0,
 21762                    n = e.getInt32() >>> 0,
 21763                    i = e.pos;
 21764                  e.pos = e.start || 0;
 21765                  e.skip(r);
 21766                  const s = e.getBytes(n);
 21767                  e.pos = i;
 21768                  if ("head" === t) {
 21769                    s[8] = s[9] = s[10] = s[11] = 0;
 21770                    s[17] |= 32;
 21771                  }
 21772                  return { tag: t, checksum: a, length: n, offset: r, data: s };
 21773                }
 21774                function readOpenTypeHeader(e) {
 21775                  return {
 21776                    version: e.getString(4),
 21777                    numTables: e.getUint16(),
 21778                    searchRange: e.getUint16(),
 21779                    entrySelector: e.getUint16(),
 21780                    rangeShift: e.getUint16(),
 21781                  };
 21782                }
 21783                function sanitizeGlyph(e, t, a, r, n, i) {
 21784                  const s = { length: 0, sizeOfInstructions: 0 };
 21785                  if (t < 0 || t >= e.length || a > e.length || a - t <= 12)
 21786                    return s;
 21787                  const o = e.subarray(t, a),
 21788                    c = signedInt16(o[2], o[3]),
 21789                    l = signedInt16(o[4], o[5]),
 21790                    h = signedInt16(o[6], o[7]),
 21791                    u = signedInt16(o[8], o[9]);
 21792                  if (c > h) {
 21793                    writeSignedInt16(o, 2, h);
 21794                    writeSignedInt16(o, 6, c);
 21795                  }
 21796                  if (l > u) {
 21797                    writeSignedInt16(o, 4, u);
 21798                    writeSignedInt16(o, 8, l);
 21799                  }
 21800                  const d = signedInt16(o[0], o[1]);
 21801                  if (d < 0) {
 21802                    if (d < -1) return s;
 21803                    r.set(o, n);
 21804                    s.length = o.length;
 21805                    return s;
 21806                  }
 21807                  let f,
 21808                    g = 10,
 21809                    p = 0;
 21810                  for (f = 0; f < d; f++) {
 21811                    p = ((o[g] << 8) | o[g + 1]) + 1;
 21812                    g += 2;
 21813                  }
 21814                  const m = g,
 21815                    b = (o[g] << 8) | o[g + 1];
 21816                  s.sizeOfInstructions = b;
 21817                  g += 2 + b;
 21818                  const y = g;
 21819                  let w = 0;
 21820                  for (f = 0; f < p; f++) {
 21821                    const e = o[g++];
 21822                    192 & e && (o[g - 1] = 63 & e);
 21823                    let t = 2;
 21824                    2 & e ? (t = 1) : 16 & e && (t = 0);
 21825                    let a = 2;
 21826                    4 & e ? (a = 1) : 32 & e && (a = 0);
 21827                    const r = t + a;
 21828                    w += r;
 21829                    if (8 & e) {
 21830                      const e = o[g++];
 21831                      0 === e && (o[g - 1] ^= 8);
 21832                      f += e;
 21833                      w += e * r;
 21834                    }
 21835                  }
 21836                  if (0 === w) return s;
 21837                  let S = g + w;
 21838                  if (S > o.length) return s;
 21839                  if (!i && b > 0) {
 21840                    r.set(o.subarray(0, m), n);
 21841                    r.set([0, 0], n + m);
 21842                    r.set(o.subarray(y, S), n + m + 2);
 21843                    S -= b;
 21844                    o.length - S > 3 && (S = (S + 3) & -4);
 21845                    s.length = S;
 21846                    return s;
 21847                  }
 21848                  if (o.length - S > 3) {
 21849                    S = (S + 3) & -4;
 21850                    r.set(o.subarray(0, S), n);
 21851                    s.length = S;
 21852                    return s;
 21853                  }
 21854                  r.set(o, n);
 21855                  s.length = o.length;
 21856                  return s;
 21857                }
 21858                function readNameTable(e) {
 21859                  const a = (t.start || 0) + e.offset;
 21860                  t.pos = a;
 21861                  const r = [[], []],
 21862                    n = [],
 21863                    i = e.length,
 21864                    s = a + i;
 21865                  if (0 !== t.getUint16() || i < 6) return [r, n];
 21866                  const o = t.getUint16(),
 21867                    c = t.getUint16();
 21868                  let l, h;
 21869                  for (l = 0; l < o && t.pos + 12 <= s; l++) {
 21870                    const e = {
 21871                      platform: t.getUint16(),
 21872                      encoding: t.getUint16(),
 21873                      language: t.getUint16(),
 21874                      name: t.getUint16(),
 21875                      length: t.getUint16(),
 21876                      offset: t.getUint16(),
 21877                    };
 21878                    (isMacNameRecord(e) || isWinNameRecord(e)) && n.push(e);
 21879                  }
 21880                  for (l = 0, h = n.length; l < h; l++) {
 21881                    const e = n[l];
 21882                    if (e.length <= 0) continue;
 21883                    const i = a + c + e.offset;
 21884                    if (i + e.length > s) continue;
 21885                    t.pos = i;
 21886                    const o = e.name;
 21887                    if (e.encoding) {
 21888                      let a = "";
 21889                      for (let r = 0, n = e.length; r < n; r += 2)
 21890                        a += String.fromCharCode(t.getUint16());
 21891                      r[1][o] = a;
 21892                    } else r[0][o] = t.getString(e.length);
 21893                  }
 21894                  return [r, n];
 21895                }
 21896                const l = [
 21897                  0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -2, -2, 0, 0, -2, -5, -1, -1,
 21898                  -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, -1, -1, 1, -1,
 21899                  -999, 0, 1, 0, -1, -2, 0, -1, -2, -1, -1, 0, -1, -1, 0, 0, -999,
 21900                  -999, -1, -1, -1, -1, -2, -999, -2, -2, -999, 0, -2, -2, 0, 0,
 21901                  -2, 0, -2, 0, 0, 0, -2, -1, -1, 1, 1, 0, 0, -1, -1, -1, -1, -1,
 21902                  -1, -1, 0, 0, -1, 0, -1, -1, 0, -999, -1, -1, -1, -1, -1, -1, 0,
 21903                  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -999, -999, -999, -999,
 21904                  -999, -1, -1, -2, -2, 0, 0, 0, 0, -1, -1, -999, -2, -2, 0, 0,
 21905                  -1, -2, -2, 0, 0, 0, -1, -1, -1, -2,
 21906                ];
 21907                function sanitizeTTProgram(e, t) {
 21908                  let a,
 21909                    n,
 21910                    i,
 21911                    s,
 21912                    o,
 21913                    c = e.data,
 21914                    h = 0,
 21915                    u = 0,
 21916                    d = 0;
 21917                  const f = [],
 21918                    g = [],
 21919                    p = [];
 21920                  let m = t.tooComplexToFollowFunctions,
 21921                    b = !1,
 21922                    y = 0,
 21923                    w = 0;
 21924                  for (let e = c.length; h < e; ) {
 21925                    const e = c[h++];
 21926                    if (64 === e) {
 21927                      n = c[h++];
 21928                      if (b || w) h += n;
 21929                      else for (a = 0; a < n; a++) f.push(c[h++]);
 21930                    } else if (65 === e) {
 21931                      n = c[h++];
 21932                      if (b || w) h += 2 * n;
 21933                      else
 21934                        for (a = 0; a < n; a++) {
 21935                          i = c[h++];
 21936                          f.push((i << 8) | c[h++]);
 21937                        }
 21938                    } else if (176 == (248 & e)) {
 21939                      n = e - 176 + 1;
 21940                      if (b || w) h += n;
 21941                      else for (a = 0; a < n; a++) f.push(c[h++]);
 21942                    } else if (184 == (248 & e)) {
 21943                      n = e - 184 + 1;
 21944                      if (b || w) h += 2 * n;
 21945                      else
 21946                        for (a = 0; a < n; a++) {
 21947                          i = c[h++];
 21948                          f.push((i << 8) | c[h++]);
 21949                        }
 21950                    } else if (43 !== e || m)
 21951                      if (44 !== e || m) {
 21952                        if (45 === e)
 21953                          if (b) {
 21954                            b = !1;
 21955                            u = h;
 21956                          } else {
 21957                            o = g.pop();
 21958                            if (!o) {
 21959                              (0, r.warn)("TT: ENDF bad stack");
 21960                              t.hintsValid = !1;
 21961                              return;
 21962                            }
 21963                            s = p.pop();
 21964                            c = o.data;
 21965                            h = o.i;
 21966                            t.functionsStackDeltas[s] = f.length - o.stackTop;
 21967                          }
 21968                        else if (137 === e) {
 21969                          if (b || w) {
 21970                            (0, r.warn)("TT: nested IDEFs not allowed");
 21971                            m = !0;
 21972                          }
 21973                          b = !0;
 21974                          d = h;
 21975                        } else if (88 === e) ++y;
 21976                        else if (27 === e) w = y;
 21977                        else if (89 === e) {
 21978                          w === y && (w = 0);
 21979                          --y;
 21980                        } else if (28 === e && !b && !w) {
 21981                          const e = f.at(-1);
 21982                          e > 0 && (h += e - 1);
 21983                        }
 21984                      } else {
 21985                        if (b || w) {
 21986                          (0, r.warn)("TT: nested FDEFs not allowed");
 21987                          m = !0;
 21988                        }
 21989                        b = !0;
 21990                        d = h;
 21991                        s = f.pop();
 21992                        t.functionsDefined[s] = { data: c, i: h };
 21993                      }
 21994                    else if (!b && !w) {
 21995                      s = f.at(-1);
 21996                      if (isNaN(s))
 21997                        (0, r.info)("TT: CALL empty stack (or invalid entry).");
 21998                      else {
 21999                        t.functionsUsed[s] = !0;
 22000                        if (s in t.functionsStackDeltas) {
 22001                          const e = f.length + t.functionsStackDeltas[s];
 22002                          if (e < 0) {
 22003                            (0, r.warn)(
 22004                              "TT: CALL invalid functions stack delta.",
 22005                            );
 22006                            t.hintsValid = !1;
 22007                            return;
 22008                          }
 22009                          f.length = e;
 22010                        } else if (s in t.functionsDefined && !p.includes(s)) {
 22011                          g.push({ data: c, i: h, stackTop: f.length - 1 });
 22012                          p.push(s);
 22013                          o = t.functionsDefined[s];
 22014                          if (!o) {
 22015                            (0, r.warn)("TT: CALL non-existent function");
 22016                            t.hintsValid = !1;
 22017                            return;
 22018                          }
 22019                          c = o.data;
 22020                          h = o.i;
 22021                        }
 22022                      }
 22023                    }
 22024                    if (!b && !w) {
 22025                      let t = 0;
 22026                      e <= 142
 22027                        ? (t = l[e])
 22028                        : e >= 192 && e <= 223
 22029                          ? (t = -1)
 22030                          : e >= 224 && (t = -2);
 22031                      if (e >= 113 && e <= 117) {
 22032                        n = f.pop();
 22033                        isNaN(n) || (t = 2 * -n);
 22034                      }
 22035                      for (; t < 0 && f.length > 0; ) {
 22036                        f.pop();
 22037                        t++;
 22038                      }
 22039                      for (; t > 0; ) {
 22040                        f.push(NaN);
 22041                        t--;
 22042                      }
 22043                    }
 22044                  }
 22045                  t.tooComplexToFollowFunctions = m;
 22046                  const S = [c];
 22047                  h > c.length && S.push(new Uint8Array(h - c.length));
 22048                  if (d > u) {
 22049                    (0, r.warn)("TT: complementing a missing function tail");
 22050                    S.push(new Uint8Array([34, 45]));
 22051                  }
 22052                  !(function foldTTTable(e, t) {
 22053                    if (t.length > 1) {
 22054                      let a,
 22055                        r,
 22056                        n = 0;
 22057                      for (a = 0, r = t.length; a < r; a++) n += t[a].length;
 22058                      n = (n + 3) & -4;
 22059                      const i = new Uint8Array(n);
 22060                      let s = 0;
 22061                      for (a = 0, r = t.length; a < r; a++) {
 22062                        i.set(t[a], s);
 22063                        s += t[a].length;
 22064                      }
 22065                      e.data = i;
 22066                      e.length = n;
 22067                    }
 22068                  })(e, S);
 22069                }
 22070                let d, f, b, w;
 22071                if (
 22072                  isTrueTypeCollectionFile(
 22073                    (t = new y.Stream(new Uint8Array(t.getBytes()))),
 22074                  )
 22075                ) {
 22076                  const e = (function readTrueTypeCollectionData(e, t) {
 22077                    const { numFonts: a, offsetTable: n } =
 22078                        (function readTrueTypeCollectionHeader(e) {
 22079                          const t = e.getString(4);
 22080                          (0, r.assert)(
 22081                            "ttcf" === t,
 22082                            "Must be a TrueType Collection font.",
 22083                          );
 22084                          const a = e.getUint16(),
 22085                            n = e.getUint16(),
 22086                            i = e.getInt32() >>> 0,
 22087                            s = [];
 22088                          for (let t = 0; t < i; t++) s.push(e.getInt32() >>> 0);
 22089                          const o = {
 22090                            ttcTag: t,
 22091                            majorVersion: a,
 22092                            minorVersion: n,
 22093                            numFonts: i,
 22094                            offsetTable: s,
 22095                          };
 22096                          switch (a) {
 22097                            case 1:
 22098                              return o;
 22099                            case 2:
 22100                              o.dsigTag = e.getInt32() >>> 0;
 22101                              o.dsigLength = e.getInt32() >>> 0;
 22102                              o.dsigOffset = e.getInt32() >>> 0;
 22103                              return o;
 22104                          }
 22105                          throw new r.FormatError(
 22106                            `Invalid TrueType Collection majorVersion: ${a}.`,
 22107                          );
 22108                        })(e),
 22109                      i = t.split("+");
 22110                    let s;
 22111                    for (let o = 0; o < a; o++) {
 22112                      e.pos = (e.start || 0) + n[o];
 22113                      const a = readOpenTypeHeader(e),
 22114                        c = readTables(e, a.numTables);
 22115                      if (!c.name)
 22116                        throw new r.FormatError(
 22117                          'TrueType Collection font must contain a "name" table.',
 22118                        );
 22119                      const [l] = readNameTable(c.name);
 22120                      for (let e = 0, r = l.length; e < r; e++)
 22121                        for (let r = 0, n = l[e].length; r < n; r++) {
 22122                          const n = l[e][r]?.replaceAll(/\s/g, "");
 22123                          if (n) {
 22124                            if (n === t) return { header: a, tables: c };
 22125                            if (!(i.length < 2))
 22126                              for (const e of i)
 22127                                n === e &&
 22128                                  (s = { name: e, header: a, tables: c });
 22129                          }
 22130                        }
 22131                    }
 22132                    if (s) {
 22133                      (0, r.warn)(
 22134                        `TrueType Collection does not contain "${t}" font, falling back to "${s.name}" font instead.`,
 22135                      );
 22136                      return { header: s.header, tables: s.tables };
 22137                    }
 22138                    throw new r.FormatError(
 22139                      `TrueType Collection does not contain "${t}" font.`,
 22140                    );
 22141                  })(t, this.name);
 22142                  d = e.header;
 22143                  f = e.tables;
 22144                } else {
 22145                  d = readOpenTypeHeader(t);
 22146                  f = readTables(t, d.numTables);
 22147                }
 22148                const S = !f["CFF "];
 22149                if (S) {
 22150                  if (!f.loca)
 22151                    throw new r.FormatError('Required "loca" table is not found');
 22152                  if (!f.glyf) {
 22153                    (0, r.warn)(
 22154                      'Required "glyf" table is not found -- trying to recover.',
 22155                    );
 22156                    f.glyf = { tag: "glyf", data: new Uint8Array(0) };
 22157                  }
 22158                  this.isOpenType = !1;
 22159                } else {
 22160                  const t =
 22161                    a.composite &&
 22162                    (a.cidToGidMap?.length > 0 ||
 22163                      !(a.cMap instanceof p.IdentityCMap));
 22164                  if (
 22165                    ("OTTO" === d.version && !t) ||
 22166                    !f.head ||
 22167                    !f.hhea ||
 22168                    !f.maxp ||
 22169                    !f.post
 22170                  ) {
 22171                    w = new y.Stream(f["CFF "].data);
 22172                    b = new u.CFFFont(w, a);
 22173                    adjustWidths(a);
 22174                    return this.convert(e, b, a);
 22175                  }
 22176                  delete f.glyf;
 22177                  delete f.loca;
 22178                  delete f.fpgm;
 22179                  delete f.prep;
 22180                  delete f["cvt "];
 22181                  this.isOpenType = !0;
 22182                }
 22183                if (!f.maxp)
 22184                  throw new r.FormatError('Required "maxp" table is not found');
 22185                t.pos = (t.start || 0) + f.maxp.offset;
 22186                const x = t.getInt32(),
 22187                  C = t.getUint16();
 22188                if (a.scaleFactors?.length === C && S) {
 22189                  const { scaleFactors: e } = a,
 22190                    t = int16(f.head.data[50], f.head.data[51]),
 22191                    r = new g.GlyfTable({
 22192                      glyfTable: f.glyf.data,
 22193                      isGlyphLocationsLong: t,
 22194                      locaTable: f.loca.data,
 22195                      numGlyphs: C,
 22196                    });
 22197                  r.scale(e);
 22198                  const { glyf: n, loca: i, isLocationLong: s } = r.write();
 22199                  f.glyf.data = n;
 22200                  f.loca.data = i;
 22201                  if (s !== !!t) {
 22202                    f.head.data[50] = 0;
 22203                    f.head.data[51] = s ? 1 : 0;
 22204                  }
 22205                  const o = f.hmtx.data;
 22206                  for (let t = 0; t < C; t++) {
 22207                    const a = 4 * t,
 22208                      r = Math.round(e[t] * int16(o[a], o[a + 1]));
 22209                    o[a] = (r >> 8) & 255;
 22210                    o[a + 1] = 255 & r;
 22211                    writeSignedInt16(
 22212                      o,
 22213                      a + 2,
 22214                      Math.round(e[t] * signedInt16(o[a + 2], o[a + 3])),
 22215                    );
 22216                  }
 22217                }
 22218                let k = C + 1,
 22219                  v = !0;
 22220                if (k > 65535) {
 22221                  v = !1;
 22222                  k = C;
 22223                  (0, r.warn)(
 22224                    "Not enough space in glyfs to duplicate first glyph.",
 22225                  );
 22226                }
 22227                let F = 0,
 22228                  O = 0;
 22229                if (x >= 65536 && f.maxp.length >= 22) {
 22230                  t.pos += 8;
 22231                  if (t.getUint16() > 2) {
 22232                    f.maxp.data[14] = 0;
 22233                    f.maxp.data[15] = 2;
 22234                  }
 22235                  t.pos += 4;
 22236                  F = t.getUint16();
 22237                  t.pos += 4;
 22238                  O = t.getUint16();
 22239                }
 22240                f.maxp.data[4] = k >> 8;
 22241                f.maxp.data[5] = 255 & k;
 22242                const T = (function sanitizeTTPrograms(e, t, a, n) {
 22243                  const i = {
 22244                    functionsDefined: [],
 22245                    functionsUsed: [],
 22246                    functionsStackDeltas: [],
 22247                    tooComplexToFollowFunctions: !1,
 22248                    hintsValid: !0,
 22249                  };
 22250                  e && sanitizeTTProgram(e, i);
 22251                  t && sanitizeTTProgram(t, i);
 22252                  e &&
 22253                    (function checkInvalidFunctions(e, t) {
 22254                      if (!e.tooComplexToFollowFunctions)
 22255                        if (e.functionsDefined.length > t) {
 22256                          (0, r.warn)("TT: more functions defined than expected");
 22257                          e.hintsValid = !1;
 22258                        } else
 22259                          for (
 22260                            let a = 0, n = e.functionsUsed.length;
 22261                            a < n;
 22262                            a++
 22263                          ) {
 22264                            if (a > t) {
 22265                              (0, r.warn)("TT: invalid function id: " + a);
 22266                              e.hintsValid = !1;
 22267                              return;
 22268                            }
 22269                            if (e.functionsUsed[a] && !e.functionsDefined[a]) {
 22270                              (0, r.warn)("TT: undefined function: " + a);
 22271                              e.hintsValid = !1;
 22272                              return;
 22273                            }
 22274                          }
 22275                    })(i, n);
 22276                  if (a && 1 & a.length) {
 22277                    const e = new Uint8Array(a.length + 1);
 22278                    e.set(a.data);
 22279                    a.data = e;
 22280                  }
 22281                  return i.hintsValid;
 22282                })(f.fpgm, f.prep, f["cvt "], F);
 22283                if (!T) {
 22284                  delete f.fpgm;
 22285                  delete f.prep;
 22286                  delete f["cvt "];
 22287                }
 22288                !(function sanitizeMetrics(e, t, a, n, i, s) {
 22289                  if (!t) {
 22290                    a && (a.data = null);
 22291                    return;
 22292                  }
 22293                  e.pos = (e.start || 0) + t.offset;
 22294                  e.pos += 4;
 22295                  e.pos += 2;
 22296                  e.pos += 2;
 22297                  e.pos += 2;
 22298                  e.pos += 2;
 22299                  e.pos += 2;
 22300                  e.pos += 2;
 22301                  e.pos += 2;
 22302                  e.pos += 2;
 22303                  e.pos += 2;
 22304                  const o = e.getUint16();
 22305                  e.pos += 8;
 22306                  e.pos += 2;
 22307                  let c = e.getUint16();
 22308                  if (0 !== o) {
 22309                    if (!(2 & int16(n.data[44], n.data[45]))) {
 22310                      t.data[22] = 0;
 22311                      t.data[23] = 0;
 22312                    }
 22313                  }
 22314                  if (c > i) {
 22315                    (0, r.info)(
 22316                      `The numOfMetrics (${c}) should not be greater than the numGlyphs (${i}).`,
 22317                    );
 22318                    c = i;
 22319                    t.data[34] = (65280 & c) >> 8;
 22320                    t.data[35] = 255 & c;
 22321                  }
 22322                  const l = i - c - ((a.length - 4 * c) >> 1);
 22323                  if (l > 0) {
 22324                    const e = new Uint8Array(a.length + 2 * l);
 22325                    e.set(a.data);
 22326                    if (s) {
 22327                      e[a.length] = a.data[2];
 22328                      e[a.length + 1] = a.data[3];
 22329                    }
 22330                    a.data = e;
 22331                  }
 22332                })(t, f.hhea, f.hmtx, f.head, k, v);
 22333                if (!f.head)
 22334                  throw new r.FormatError('Required "head" table is not found');
 22335                !(function sanitizeHead(e, t, a) {
 22336                  const n = e.data,
 22337                    i = (function int32(e, t, a, r) {
 22338                      return (e << 24) + (t << 16) + (a << 8) + r;
 22339                    })(n[0], n[1], n[2], n[3]);
 22340                  if (i >> 16 != 1) {
 22341                    (0, r.info)(
 22342                      "Attempting to fix invalid version in head table: " + i,
 22343                    );
 22344                    n[0] = 0;
 22345                    n[1] = 1;
 22346                    n[2] = 0;
 22347                    n[3] = 0;
 22348                  }
 22349                  const s = int16(n[50], n[51]);
 22350                  if (s < 0 || s > 1) {
 22351                    (0, r.info)(
 22352                      "Attempting to fix invalid indexToLocFormat in head table: " +
 22353                        s,
 22354                    );
 22355                    const e = t + 1;
 22356                    if (a === e << 1) {
 22357                      n[50] = 0;
 22358                      n[51] = 0;
 22359                    } else {
 22360                      if (a !== e << 2)
 22361                        throw new r.FormatError(
 22362                          "Could not fix indexToLocFormat: " + s,
 22363                        );
 22364                      n[50] = 0;
 22365                      n[51] = 1;
 22366                    }
 22367                  }
 22368                })(f.head, C, S ? f.loca.length : 0);
 22369                let M = Object.create(null);
 22370                if (S) {
 22371                  const e = int16(f.head.data[50], f.head.data[51]),
 22372                    t = (function sanitizeGlyphLocations(e, t, a, r, n, i, s) {
 22373                      let o, c, l;
 22374                      if (r) {
 22375                        o = 4;
 22376                        c = function fontItemDecodeLong(e, t) {
 22377                          return (
 22378                            (e[t] << 24) |
 22379                            (e[t + 1] << 16) |
 22380                            (e[t + 2] << 8) |
 22381                            e[t + 3]
 22382                          );
 22383                        };
 22384                        l = function fontItemEncodeLong(e, t, a) {
 22385                          e[t] = (a >>> 24) & 255;
 22386                          e[t + 1] = (a >> 16) & 255;
 22387                          e[t + 2] = (a >> 8) & 255;
 22388                          e[t + 3] = 255 & a;
 22389                        };
 22390                      } else {
 22391                        o = 2;
 22392                        c = function fontItemDecode(e, t) {
 22393                          return (e[t] << 9) | (e[t + 1] << 1);
 22394                        };
 22395                        l = function fontItemEncode(e, t, a) {
 22396                          e[t] = (a >> 9) & 255;
 22397                          e[t + 1] = (a >> 1) & 255;
 22398                        };
 22399                      }
 22400                      const h = i ? a + 1 : a,
 22401                        u = o * (1 + h),
 22402                        d = new Uint8Array(u);
 22403                      d.set(e.data.subarray(0, u));
 22404                      e.data = d;
 22405                      const f = t.data,
 22406                        g = f.length,
 22407                        p = new Uint8Array(g);
 22408                      let m, b;
 22409                      const y = [];
 22410                      for (m = 0, b = 0; m < a + 1; m++, b += o) {
 22411                        let e = c(d, b);
 22412                        e > g && (e = g);
 22413                        y.push({ index: m, offset: e, endOffset: 0 });
 22414                      }
 22415                      y.sort((e, t) => e.offset - t.offset);
 22416                      for (m = 0; m < a; m++) y[m].endOffset = y[m + 1].offset;
 22417                      y.sort((e, t) => e.index - t.index);
 22418                      for (m = 0; m < a; m++) {
 22419                        const { offset: e, endOffset: t } = y[m];
 22420                        if (0 !== e || 0 !== t) break;
 22421                        const a = y[m + 1].offset;
 22422                        if (0 !== a) {
 22423                          y[m].endOffset = a;
 22424                          break;
 22425                        }
 22426                      }
 22427                      const w = Object.create(null);
 22428                      let S = 0;
 22429                      l(d, 0, S);
 22430                      for (m = 0, b = o; m < a; m++, b += o) {
 22431                        const e = sanitizeGlyph(
 22432                            f,
 22433                            y[m].offset,
 22434                            y[m].endOffset,
 22435                            p,
 22436                            S,
 22437                            n,
 22438                          ),
 22439                          t = e.length;
 22440                        0 === t && (w[m] = !0);
 22441                        e.sizeOfInstructions > s && (s = e.sizeOfInstructions);
 22442                        S += t;
 22443                        l(d, b, S);
 22444                      }
 22445                      if (0 === S) {
 22446                        const e = new Uint8Array([
 22447                          0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0,
 22448                        ]);
 22449                        for (m = 0, b = o; m < h; m++, b += o) l(d, b, e.length);
 22450                        t.data = e;
 22451                      } else if (i) {
 22452                        const a = c(d, o);
 22453                        if (p.length > a + S) t.data = p.subarray(0, a + S);
 22454                        else {
 22455                          t.data = new Uint8Array(a + S);
 22456                          t.data.set(p.subarray(0, S));
 22457                        }
 22458                        t.data.set(p.subarray(0, a), S);
 22459                        l(e.data, d.length - o, S + a);
 22460                      } else t.data = p.subarray(0, S);
 22461                      return { missingGlyphs: w, maxSizeOfInstructions: s };
 22462                    })(f.loca, f.glyf, C, e, T, v, O);
 22463                  M = t.missingGlyphs;
 22464                  if (x >= 65536 && f.maxp.length >= 22) {
 22465                    f.maxp.data[26] = t.maxSizeOfInstructions >> 8;
 22466                    f.maxp.data[27] = 255 & t.maxSizeOfInstructions;
 22467                  }
 22468                }
 22469                if (!f.hhea)
 22470                  throw new r.FormatError('Required "hhea" table is not found');
 22471                if (0 === f.hhea.data[10] && 0 === f.hhea.data[11]) {
 22472                  f.hhea.data[10] = 255;
 22473                  f.hhea.data[11] = 255;
 22474                }
 22475                const D = {
 22476                  unitsPerEm: int16(f.head.data[18], f.head.data[19]),
 22477                  yMax: signedInt16(f.head.data[42], f.head.data[43]),
 22478                  yMin: signedInt16(f.head.data[38], f.head.data[39]),
 22479                  ascent: signedInt16(f.hhea.data[4], f.hhea.data[5]),
 22480                  descent: signedInt16(f.hhea.data[6], f.hhea.data[7]),
 22481                  lineGap: signedInt16(f.hhea.data[8], f.hhea.data[9]),
 22482                };
 22483                this.ascent = D.ascent / D.unitsPerEm;
 22484                this.descent = D.descent / D.unitsPerEm;
 22485                this.lineGap = D.lineGap / D.unitsPerEm;
 22486                if (this.cssFontInfo?.lineHeight) {
 22487                  this.lineHeight = this.cssFontInfo.metrics.lineHeight;
 22488                  this.lineGap = this.cssFontInfo.metrics.lineGap;
 22489                } else
 22490                  this.lineHeight = this.ascent - this.descent + this.lineGap;
 22491                f.post &&
 22492                  (function readPostScriptTable(e, a, n) {
 22493                    const s = (t.start || 0) + e.offset;
 22494                    t.pos = s;
 22495                    const o = s + e.length,
 22496                      c = t.getInt32();
 22497                    t.skip(28);
 22498                    let l,
 22499                      h,
 22500                      u = !0;
 22501                    switch (c) {
 22502                      case 65536:
 22503                        l = i.MacStandardGlyphOrdering;
 22504                        break;
 22505                      case 131072:
 22506                        const e = t.getUint16();
 22507                        if (e !== n) {
 22508                          u = !1;
 22509                          break;
 22510                        }
 22511                        const s = [];
 22512                        for (h = 0; h < e; ++h) {
 22513                          const e = t.getUint16();
 22514                          if (e >= 32768) {
 22515                            u = !1;
 22516                            break;
 22517                          }
 22518                          s.push(e);
 22519                        }
 22520                        if (!u) break;
 22521                        const d = [],
 22522                          f = [];
 22523                        for (; t.pos < o; ) {
 22524                          const e = t.getByte();
 22525                          f.length = e;
 22526                          for (h = 0; h < e; ++h)
 22527                            f[h] = String.fromCharCode(t.getByte());
 22528                          d.push(f.join(""));
 22529                        }
 22530                        l = [];
 22531                        for (h = 0; h < e; ++h) {
 22532                          const e = s[h];
 22533                          e < 258
 22534                            ? l.push(i.MacStandardGlyphOrdering[e])
 22535                            : l.push(d[e - 258]);
 22536                        }
 22537                        break;
 22538                      case 196608:
 22539                        break;
 22540                      default:
 22541                        (0, r.warn)(
 22542                          "Unknown/unsupported post table version " + c,
 22543                        );
 22544                        u = !1;
 22545                        a.defaultEncoding && (l = a.defaultEncoding);
 22546                    }
 22547                    a.glyphNames = l;
 22548                    return u;
 22549                  })(f.post, a, C);
 22550                f.post = { tag: "post", data: createPostTable(a) };
 22551                const E = [];
 22552                function hasGlyph(e) {
 22553                  return !M[e];
 22554                }
 22555                if (a.composite) {
 22556                  const e = a.cidToGidMap || [],
 22557                    t = 0 === e.length;
 22558                  a.cMap.forEach(function (a, n) {
 22559                    "string" == typeof n && (n = convertCidString(a, n, !0));
 22560                    if (n > 65535)
 22561                      throw new r.FormatError("Max size of CID is 65,535");
 22562                    let i = -1;
 22563                    t ? (i = n) : void 0 !== e[n] && (i = e[n]);
 22564                    i >= 0 && i < C && hasGlyph(i) && (E[a] = i);
 22565                  });
 22566                } else {
 22567                  const e = (function readCmapTable(e, t, a, n) {
 22568                      if (!e) {
 22569                        (0, r.warn)("No cmap table available.");
 22570                        return {
 22571                          platformId: -1,
 22572                          encodingId: -1,
 22573                          mappings: [],
 22574                          hasShortCmap: !1,
 22575                        };
 22576                      }
 22577                      let i,
 22578                        s = (t.start || 0) + e.offset;
 22579                      t.pos = s;
 22580                      t.skip(2);
 22581                      const o = t.getUint16();
 22582                      let c,
 22583                        l = !1;
 22584                      for (let e = 0; e < o; e++) {
 22585                        const r = t.getUint16(),
 22586                          i = t.getUint16(),
 22587                          s = t.getInt32() >>> 0;
 22588                        let h = !1;
 22589                        if (c?.platformId !== r || c?.encodingId !== i) {
 22590                          if (0 !== r || (0 !== i && 1 !== i && 3 !== i))
 22591                            if (1 === r && 0 === i) h = !0;
 22592                            else if (3 !== r || 1 !== i || (!n && c)) {
 22593                              if (a && 3 === r && 0 === i) {
 22594                                h = !0;
 22595                                let a = !0;
 22596                                if (e < o - 1) {
 22597                                  const e = t.peekBytes(2);
 22598                                  int16(e[0], e[1]) < r && (a = !1);
 22599                                }
 22600                                a && (l = !0);
 22601                              }
 22602                            } else {
 22603                              h = !0;
 22604                              a || (l = !0);
 22605                            }
 22606                          else h = !0;
 22607                          h && (c = { platformId: r, encodingId: i, offset: s });
 22608                          if (l) break;
 22609                        }
 22610                      }
 22611                      c && (t.pos = s + c.offset);
 22612                      if (!c || -1 === t.peekByte()) {
 22613                        (0, r.warn)("Could not find a preferred cmap table.");
 22614                        return {
 22615                          platformId: -1,
 22616                          encodingId: -1,
 22617                          mappings: [],
 22618                          hasShortCmap: !1,
 22619                        };
 22620                      }
 22621                      const h = t.getUint16();
 22622                      let u = !1;
 22623                      const d = [];
 22624                      let f, g;
 22625                      if (0 === h) {
 22626                        t.skip(4);
 22627                        for (f = 0; f < 256; f++) {
 22628                          const e = t.getByte();
 22629                          e && d.push({ charCode: f, glyphId: e });
 22630                        }
 22631                        u = !0;
 22632                      } else if (2 === h) {
 22633                        t.skip(4);
 22634                        const e = [];
 22635                        let a = 0;
 22636                        for (let r = 0; r < 256; r++) {
 22637                          const r = t.getUint16() >> 3;
 22638                          e.push(r);
 22639                          a = Math.max(r, a);
 22640                        }
 22641                        const r = [];
 22642                        for (let e = 0; e <= a; e++)
 22643                          r.push({
 22644                            firstCode: t.getUint16(),
 22645                            entryCount: t.getUint16(),
 22646                            idDelta: signedInt16(t.getByte(), t.getByte()),
 22647                            idRangePos: t.pos + t.getUint16(),
 22648                          });
 22649                        for (let a = 0; a < 256; a++)
 22650                          if (0 === e[a]) {
 22651                            t.pos = r[0].idRangePos + 2 * a;
 22652                            g = t.getUint16();
 22653                            d.push({ charCode: a, glyphId: g });
 22654                          } else {
 22655                            const n = r[e[a]];
 22656                            for (f = 0; f < n.entryCount; f++) {
 22657                              const e = (a << 8) + f + n.firstCode;
 22658                              t.pos = n.idRangePos + 2 * f;
 22659                              g = t.getUint16();
 22660                              0 !== g && (g = (g + n.idDelta) % 65536);
 22661                              d.push({ charCode: e, glyphId: g });
 22662                            }
 22663                          }
 22664                      } else if (4 === h) {
 22665                        t.skip(4);
 22666                        const e = t.getUint16() >> 1;
 22667                        t.skip(6);
 22668                        const a = [];
 22669                        let r;
 22670                        for (r = 0; r < e; r++) a.push({ end: t.getUint16() });
 22671                        t.skip(2);
 22672                        for (r = 0; r < e; r++) a[r].start = t.getUint16();
 22673                        for (r = 0; r < e; r++) a[r].delta = t.getUint16();
 22674                        let n,
 22675                          o = 0;
 22676                        for (r = 0; r < e; r++) {
 22677                          i = a[r];
 22678                          const s = t.getUint16();
 22679                          if (s) {
 22680                            n = (s >> 1) - (e - r);
 22681                            i.offsetIndex = n;
 22682                            o = Math.max(o, n + i.end - i.start + 1);
 22683                          } else i.offsetIndex = -1;
 22684                        }
 22685                        const c = [];
 22686                        for (f = 0; f < o; f++) c.push(t.getUint16());
 22687                        for (r = 0; r < e; r++) {
 22688                          i = a[r];
 22689                          s = i.start;
 22690                          const e = i.end,
 22691                            t = i.delta;
 22692                          n = i.offsetIndex;
 22693                          for (f = s; f <= e; f++)
 22694                            if (65535 !== f) {
 22695                              g = n < 0 ? f : c[n + f - s];
 22696                              g = (g + t) & 65535;
 22697                              d.push({ charCode: f, glyphId: g });
 22698                            }
 22699                        }
 22700                      } else if (6 === h) {
 22701                        t.skip(4);
 22702                        const e = t.getUint16(),
 22703                          a = t.getUint16();
 22704                        for (f = 0; f < a; f++) {
 22705                          g = t.getUint16();
 22706                          const a = e + f;
 22707                          d.push({ charCode: a, glyphId: g });
 22708                        }
 22709                      } else {
 22710                        if (12 !== h) {
 22711                          (0, r.warn)("cmap table has unsupported format: " + h);
 22712                          return {
 22713                            platformId: -1,
 22714                            encodingId: -1,
 22715                            mappings: [],
 22716                            hasShortCmap: !1,
 22717                          };
 22718                        }
 22719                        {
 22720                          t.skip(10);
 22721                          const e = t.getInt32() >>> 0;
 22722                          for (f = 0; f < e; f++) {
 22723                            const e = t.getInt32() >>> 0,
 22724                              a = t.getInt32() >>> 0;
 22725                            let r = t.getInt32() >>> 0;
 22726                            for (let t = e; t <= a; t++)
 22727                              d.push({ charCode: t, glyphId: r++ });
 22728                          }
 22729                        }
 22730                      }
 22731                      d.sort(function (e, t) {
 22732                        return e.charCode - t.charCode;
 22733                      });
 22734                      for (let e = 1; e < d.length; e++)
 22735                        if (d[e - 1].charCode === d[e].charCode) {
 22736                          d.splice(e, 1);
 22737                          e--;
 22738                        }
 22739                      return {
 22740                        platformId: c.platformId,
 22741                        encodingId: c.encodingId,
 22742                        mappings: d,
 22743                        hasShortCmap: u,
 22744                      };
 22745                    })(f.cmap, t, this.isSymbolicFont, a.hasEncoding),
 22746                    n = e.platformId,
 22747                    s = e.encodingId,
 22748                    l = e.mappings;
 22749                  let u = [],
 22750                    d = !1;
 22751                  !a.hasEncoding ||
 22752                    ("MacRomanEncoding" !== a.baseEncodingName &&
 22753                      "WinAnsiEncoding" !== a.baseEncodingName) ||
 22754                    (u = (0, c.getEncoding)(a.baseEncodingName));
 22755                  if (
 22756                    a.hasEncoding &&
 22757                    !this.isSymbolicFont &&
 22758                    ((3 === n && 1 === s) || (1 === n && 0 === s))
 22759                  ) {
 22760                    const e = (0, o.getGlyphsUnicode)();
 22761                    for (let t = 0; t < 256; t++) {
 22762                      let r;
 22763                      r =
 22764                        void 0 !== this.differences[t]
 22765                          ? this.differences[t]
 22766                          : u.length && "" !== u[t]
 22767                            ? u[t]
 22768                            : c.StandardEncoding[t];
 22769                      if (!r) continue;
 22770                      const o = (0, i.recoverGlyphName)(r, e);
 22771                      let d;
 22772                      3 === n && 1 === s
 22773                        ? (d = e[o])
 22774                        : 1 === n &&
 22775                          0 === s &&
 22776                          (d = c.MacRomanEncoding.indexOf(o));
 22777                      if (void 0 === d) {
 22778                        if (
 22779                          !a.glyphNames &&
 22780                          a.hasIncludedToUnicodeMap &&
 22781                          !(this.toUnicode instanceof h.IdentityToUnicodeMap)
 22782                        ) {
 22783                          const e = this.toUnicode.get(t);
 22784                          e && (d = e.codePointAt(0));
 22785                        }
 22786                        if (void 0 === d) continue;
 22787                      }
 22788                      for (const e of l)
 22789                        if (e.charCode === d) {
 22790                          E[t] = e.glyphId;
 22791                          break;
 22792                        }
 22793                    }
 22794                  } else if (0 === n) {
 22795                    for (const e of l) E[e.charCode] = e.glyphId;
 22796                    d = !0;
 22797                  } else
 22798                    for (const e of l) {
 22799                      let t = e.charCode;
 22800                      3 === n && t >= 61440 && t <= 61695 && (t &= 255);
 22801                      E[t] = e.glyphId;
 22802                    }
 22803                  if (a.glyphNames && (u.length || this.differences.length))
 22804                    for (let e = 0; e < 256; ++e) {
 22805                      if (!d && void 0 !== E[e]) continue;
 22806                      const t = this.differences[e] || u[e];
 22807                      if (!t) continue;
 22808                      const r = a.glyphNames.indexOf(t);
 22809                      r > 0 && hasGlyph(r) && (E[e] = r);
 22810                    }
 22811                }
 22812                0 === E.length && (E[0] = 0);
 22813                let N = k - 1;
 22814                v || (N = 0);
 22815                if (!a.cssFontInfo) {
 22816                  const e = adjustMapping(E, hasGlyph, N, this.toUnicode);
 22817                  this.toFontChar = e.toFontChar;
 22818                  f.cmap = {
 22819                    tag: "cmap",
 22820                    data: createCmapTable(
 22821                      e.charCodeToGlyphId,
 22822                      e.toUnicodeExtraMap,
 22823                      k,
 22824                    ),
 22825                  };
 22826                  (f["OS/2"] &&
 22827                    (function validateOS2Table(e, t) {
 22828                      t.pos = (t.start || 0) + e.offset;
 22829                      const a = t.getUint16();
 22830                      t.skip(60);
 22831                      const r = t.getUint16();
 22832                      if (a < 4 && 768 & r) return !1;
 22833                      if (t.getUint16() > t.getUint16()) return !1;
 22834                      t.skip(6);
 22835                      if (0 === t.getUint16()) return !1;
 22836                      e.data[8] = e.data[9] = 0;
 22837                      return !0;
 22838                    })(f["OS/2"], t)) ||
 22839                    (f["OS/2"] = {
 22840                      tag: "OS/2",
 22841                      data: createOS2Table(a, e.charCodeToGlyphId, D),
 22842                    });
 22843                }
 22844                if (!S)
 22845                  try {
 22846                    w = new y.Stream(f["CFF "].data);
 22847                    b = new n.CFFParser(w, a, i.SEAC_ANALYSIS_ENABLED).parse();
 22848                    b.duplicateFirstGlyph();
 22849                    const e = new n.CFFCompiler(b);
 22850                    f["CFF "].data = e.compile();
 22851                  } catch {
 22852                    (0, r.warn)("Failed to compile font " + a.loadedName);
 22853                  }
 22854                if (f.name) {
 22855                  const [t, r] = readNameTable(f.name);
 22856                  f.name.data = createNameTable(e, t);
 22857                  this.psName = t[0][6] || null;
 22858                  a.composite ||
 22859                    (function adjustTrueTypeToUnicode(e, t, a) {
 22860                      if (e.isInternalFont) return;
 22861                      if (e.hasIncludedToUnicodeMap) return;
 22862                      if (e.hasEncoding) return;
 22863                      if (e.toUnicode instanceof h.IdentityToUnicodeMap) return;
 22864                      if (!t) return;
 22865                      if (0 === a.length) return;
 22866                      if (e.defaultEncoding === c.WinAnsiEncoding) return;
 22867                      for (const e of a) if (!isWinNameRecord(e)) return;
 22868                      const r = c.WinAnsiEncoding,
 22869                        n = [],
 22870                        i = (0, o.getGlyphsUnicode)();
 22871                      for (const e in r) {
 22872                        const t = r[e];
 22873                        if ("" === t) continue;
 22874                        const a = i[t];
 22875                        void 0 !== a && (n[e] = String.fromCharCode(a));
 22876                      }
 22877                      n.length > 0 && e.toUnicode.amend(n);
 22878                    })(a, this.isSymbolicFont, r);
 22879                } else f.name = { tag: "name", data: createNameTable(this.name) };
 22880                const R = new m.OpenTypeFileBuilder(d.version);
 22881                for (const e in f) R.addTable(e, f[e].data);
 22882                return R.toArray();
 22883              }
 22884              convert(e, t, a) {
 22885                a.fixedPitch = !1;
 22886                a.builtInEncoding &&
 22887                  (function adjustType1ToUnicode(e, t) {
 22888                    if (e.isInternalFont) return;
 22889                    if (e.hasIncludedToUnicodeMap) return;
 22890                    if (t === e.defaultEncoding) return;
 22891                    if (e.toUnicode instanceof h.IdentityToUnicodeMap) return;
 22892                    const a = [],
 22893                      r = (0, o.getGlyphsUnicode)();
 22894                    for (const n in t) {
 22895                      if (
 22896                        e.hasEncoding &&
 22897                        (e.baseEncodingName || void 0 !== e.differences[n])
 22898                      )
 22899                        continue;
 22900                      const i = t[n],
 22901                        o = (0, s.getUnicodeForGlyph)(i, r);
 22902                      -1 !== o && (a[n] = String.fromCharCode(o));
 22903                    }
 22904                    a.length > 0 && e.toUnicode.amend(a);
 22905                  })(a, a.builtInEncoding);
 22906                let n = 1;
 22907                t instanceof u.CFFFont && (n = t.numGlyphs - 1);
 22908                const l = t.getGlyphMapping(a);
 22909                let d = null,
 22910                  f = l,
 22911                  g = null;
 22912                if (!a.cssFontInfo) {
 22913                  d = adjustMapping(l, t.hasGlyphId.bind(t), n, this.toUnicode);
 22914                  this.toFontChar = d.toFontChar;
 22915                  f = d.charCodeToGlyphId;
 22916                  g = d.toUnicodeExtraMap;
 22917                }
 22918                const p = t.numGlyphs;
 22919                function getCharCodes(e, t) {
 22920                  let a = null;
 22921                  for (const r in e) t === e[r] && (a ||= []).push(0 | r);
 22922                  return a;
 22923                }
 22924                function createCharCode(e, t) {
 22925                  for (const a in e) if (t === e[a]) return 0 | a;
 22926                  d.charCodeToGlyphId[d.nextAvailableFontCharCode] = t;
 22927                  return d.nextAvailableFontCharCode++;
 22928                }
 22929                const b = t.seacs;
 22930                if (d && i.SEAC_ANALYSIS_ENABLED && b?.length) {
 22931                  const e = a.fontMatrix || r.FONT_IDENTITY_MATRIX,
 22932                    n = t.getCharset(),
 22933                    i = Object.create(null);
 22934                  for (let t in b) {
 22935                    t |= 0;
 22936                    const a = b[t],
 22937                      r = c.StandardEncoding[a[2]],
 22938                      s = c.StandardEncoding[a[3]],
 22939                      o = n.indexOf(r),
 22940                      h = n.indexOf(s);
 22941                    if (o < 0 || h < 0) continue;
 22942                    const u = {
 22943                        x: a[0] * e[0] + a[1] * e[2] + e[4],
 22944                        y: a[0] * e[1] + a[1] * e[3] + e[5],
 22945                      },
 22946                      f = getCharCodes(l, t);
 22947                    if (f)
 22948                      for (const e of f) {
 22949                        const t = d.charCodeToGlyphId,
 22950                          a = createCharCode(t, o),
 22951                          r = createCharCode(t, h);
 22952                        i[e] = {
 22953                          baseFontCharCode: a,
 22954                          accentFontCharCode: r,
 22955                          accentOffset: u,
 22956                        };
 22957                      }
 22958                  }
 22959                  a.seacMap = i;
 22960                }
 22961                const y = 1 / (a.fontMatrix || r.FONT_IDENTITY_MATRIX)[0],
 22962                  w = new m.OpenTypeFileBuilder("OTTO");
 22963                w.addTable("CFF ", t.data);
 22964                w.addTable("OS/2", createOS2Table(a, f));
 22965                w.addTable("cmap", createCmapTable(f, g, p));
 22966                w.addTable(
 22967                  "head",
 22968                  "\0\0\0\0\0\0\0\0\0\0_<õ\0\0" +
 22969                    safeString16(y) +
 22970                    "\0\0\0\0ž\v~'\0\0\0\0ž\v~'\0\0" +
 22971                    safeString16(a.descent) +
 22972                    "ÿ" +
 22973                    safeString16(a.ascent) +
 22974                    string16(a.italicAngle ? 2 : 0) +
 22975                    "\0\0\0\0\0\0\0",
 22976                );
 22977                w.addTable(
 22978                  "hhea",
 22979                  "\0\0\0" +
 22980                    safeString16(a.ascent) +
 22981                    safeString16(a.descent) +
 22982                    "\0\0ÿÿ\0\0\0\0\0\0" +
 22983                    safeString16(a.capHeight) +
 22984                    safeString16(Math.tan(a.italicAngle) * a.xHeight) +
 22985                    "\0\0\0\0\0\0\0\0\0\0\0\0" +
 22986                    string16(p),
 22987                );
 22988                w.addTable(
 22989                  "hmtx",
 22990                  (function fontFieldsHmtx() {
 22991                    const e = t.charstrings,
 22992                      a = t.cff ? t.cff.widths : null;
 22993                    let r = "\0\0\0\0";
 22994                    for (let t = 1, n = p; t < n; t++) {
 22995                      let n = 0;
 22996                      if (e) {
 22997                        const a = e[t - 1];
 22998                        n = "width" in a ? a.width : 0;
 22999                      } else a && (n = Math.ceil(a[t] || 0));
 23000                      r += string16(n) + string16(0);
 23001                    }
 23002                    return r;
 23003                  })(),
 23004                );
 23005                w.addTable("maxp", "\0\0P\0" + string16(p));
 23006                w.addTable("name", createNameTable(e));
 23007                w.addTable("post", createPostTable(a));
 23008                return w.toArray();
 23009              }
 23010              get spaceWidth() {
 23011                const e = ["space", "minus", "one", "i", "I"];
 23012                let t;
 23013                for (const a of e) {
 23014                  if (a in this.widths) {
 23015                    t = this.widths[a];
 23016                    break;
 23017                  }
 23018                  const e = (0, o.getGlyphsUnicode)()[a];
 23019                  let r = 0;
 23020                  if (this.composite && this.cMap.contains(e)) {
 23021                    r = this.cMap.lookup(e);
 23022                    "string" == typeof r && (r = convertCidString(e, r));
 23023                  }
 23024                  !r && this.toUnicode && (r = this.toUnicode.charCodeOf(e));
 23025                  r <= 0 && (r = e);
 23026                  t = this.widths[r];
 23027                  if (t) break;
 23028                }
 23029                return (0, r.shadow)(this, "spaceWidth", t || this.defaultWidth);
 23030              }
 23031              _charToGlyph(e, t = !1) {
 23032                let a,
 23033                  n,
 23034                  i,
 23035                  o = this._glyphCache[e];
 23036                if (o?.isSpace === t) return o;
 23037                let c = e;
 23038                if (this.cMap?.contains(e)) {
 23039                  c = this.cMap.lookup(e);
 23040                  "string" == typeof c && (c = convertCidString(e, c));
 23041                }
 23042                n = this.widths[c];
 23043                "number" != typeof n && (n = this.defaultWidth);
 23044                const l = this.vmetrics?.[c];
 23045                let h = this.toUnicode.get(e) || e;
 23046                "number" == typeof h && (h = String.fromCharCode(h));
 23047                let u = void 0 !== this.toFontChar[e];
 23048                a = this.toFontChar[e] || e;
 23049                if (this.missingFile) {
 23050                  const t = this.differences[e] || this.defaultEncoding[e];
 23051                  (".notdef" !== t && "" !== t) ||
 23052                    "Type1" !== this.type ||
 23053                    (a = 32);
 23054                  a = (0, s.mapSpecialUnicodeValues)(a);
 23055                }
 23056                this.isType3Font && (i = a);
 23057                let d = null;
 23058                if (this.seacMap?.[e]) {
 23059                  u = !0;
 23060                  const t = this.seacMap[e];
 23061                  a = t.baseFontCharCode;
 23062                  d = {
 23063                    fontChar: String.fromCodePoint(t.accentFontCharCode),
 23064                    offset: t.accentOffset,
 23065                  };
 23066                }
 23067                let f = "";
 23068                "number" == typeof a &&
 23069                  (a <= 1114111
 23070                    ? (f = String.fromCodePoint(a))
 23071                    : (0, r.warn)(`charToGlyph - invalid fontCharCode: ${a}`));
 23072                o = new Glyph(e, f, h, d, n, l, i, t, u);
 23073                return (this._glyphCache[e] = o);
 23074              }
 23075              charsToGlyphs(e) {
 23076                let t = this._charsCache[e];
 23077                if (t) return t;
 23078                t = [];
 23079                if (this.cMap) {
 23080                  const a = Object.create(null),
 23081                    r = e.length;
 23082                  let n = 0;
 23083                  for (; n < r; ) {
 23084                    this.cMap.readCharCode(e, n, a);
 23085                    const { charcode: r, length: i } = a;
 23086                    n += i;
 23087                    const s = this._charToGlyph(
 23088                      r,
 23089                      1 === i && 32 === e.charCodeAt(n - 1),
 23090                    );
 23091                    t.push(s);
 23092                  }
 23093                } else
 23094                  for (let a = 0, r = e.length; a < r; ++a) {
 23095                    const r = e.charCodeAt(a),
 23096                      n = this._charToGlyph(r, 32 === r);
 23097                    t.push(n);
 23098                  }
 23099                return (this._charsCache[e] = t);
 23100              }
 23101              getCharPositions(e) {
 23102                const t = [];
 23103                if (this.cMap) {
 23104                  const a = Object.create(null);
 23105                  let r = 0;
 23106                  for (; r < e.length; ) {
 23107                    this.cMap.readCharCode(e, r, a);
 23108                    const n = a.length;
 23109                    t.push([r, r + n]);
 23110                    r += n;
 23111                  }
 23112                } else
 23113                  for (let a = 0, r = e.length; a < r; ++a) t.push([a, a + 1]);
 23114                return t;
 23115              }
 23116              get glyphCacheValues() {
 23117                return Object.values(this._glyphCache);
 23118              }
 23119              encodeString(e) {
 23120                const t = [],
 23121                  a = [],
 23122                  hasCurrentBufErrors = () => t.length % 2 == 1,
 23123                  r =
 23124                    this.toUnicode instanceof h.IdentityToUnicodeMap
 23125                      ? (e) => this.toUnicode.charCodeOf(e)
 23126                      : (e) => this.toUnicode.charCodeOf(String.fromCodePoint(e));
 23127                for (let n = 0, i = e.length; n < i; n++) {
 23128                  const i = e.codePointAt(n);
 23129                  i > 55295 && (i < 57344 || i > 65533) && n++;
 23130                  if (this.toUnicode) {
 23131                    const e = r(i);
 23132                    if (-1 !== e) {
 23133                      if (hasCurrentBufErrors()) {
 23134                        t.push(a.join(""));
 23135                        a.length = 0;
 23136                      }
 23137                      for (
 23138                        let t =
 23139                          (this.cMap ? this.cMap.getCharCodeLength(e) : 1) - 1;
 23140                        t >= 0;
 23141                        t--
 23142                      )
 23143                        a.push(String.fromCharCode((e >> (8 * t)) & 255));
 23144                      continue;
 23145                    }
 23146                  }
 23147                  if (!hasCurrentBufErrors()) {
 23148                    t.push(a.join(""));
 23149                    a.length = 0;
 23150                  }
 23151                  a.push(String.fromCodePoint(i));
 23152                }
 23153                t.push(a.join(""));
 23154                return t;
 23155              }
 23156            };
 23157            t.ErrorFont = class ErrorFont {
 23158              constructor(e) {
 23159                this.error = e;
 23160                this.loadedName = "g_font_error";
 23161                this.missingFile = !0;
 23162              }
 23163              charsToGlyphs() {
 23164                return [];
 23165              }
 23166              encodeString(e) {
 23167                return [e];
 23168              }
 23169              exportData(e = !1) {
 23170                return { error: this.error };
 23171              }
 23172            };
 23173          },
 23174          (e, t, a) => {
 23175            Object.defineProperty(t, "__esModule", { value: !0 });
 23176            t.CFFTopDict =
 23177              t.CFFStrings =
 23178              t.CFFStandardStrings =
 23179              t.CFFPrivateDict =
 23180              t.CFFParser =
 23181              t.CFFIndex =
 23182              t.CFFHeader =
 23183              t.CFFFDSelect =
 23184              t.CFFCompiler =
 23185              t.CFFCharset =
 23186              t.CFF =
 23187                void 0;
 23188            var r = a(2),
 23189              n = a(36),
 23190              i = a(37);
 23191            const s = [
 23192              ".notdef",
 23193              "space",
 23194              "exclam",
 23195              "quotedbl",
 23196              "numbersign",
 23197              "dollar",
 23198              "percent",
 23199              "ampersand",
 23200              "quoteright",
 23201              "parenleft",
 23202              "parenright",
 23203              "asterisk",
 23204              "plus",
 23205              "comma",
 23206              "hyphen",
 23207              "period",
 23208              "slash",
 23209              "zero",
 23210              "one",
 23211              "two",
 23212              "three",
 23213              "four",
 23214              "five",
 23215              "six",
 23216              "seven",
 23217              "eight",
 23218              "nine",
 23219              "colon",
 23220              "semicolon",
 23221              "less",
 23222              "equal",
 23223              "greater",
 23224              "question",
 23225              "at",
 23226              "A",
 23227              "B",
 23228              "C",
 23229              "D",
 23230              "E",
 23231              "F",
 23232              "G",
 23233              "H",
 23234              "I",
 23235              "J",
 23236              "K",
 23237              "L",
 23238              "M",
 23239              "N",
 23240              "O",
 23241              "P",
 23242              "Q",
 23243              "R",
 23244              "S",
 23245              "T",
 23246              "U",
 23247              "V",
 23248              "W",
 23249              "X",
 23250              "Y",
 23251              "Z",
 23252              "bracketleft",
 23253              "backslash",
 23254              "bracketright",
 23255              "asciicircum",
 23256              "underscore",
 23257              "quoteleft",
 23258              "a",
 23259              "b",
 23260              "c",
 23261              "d",
 23262              "e",
 23263              "f",
 23264              "g",
 23265              "h",
 23266              "i",
 23267              "j",
 23268              "k",
 23269              "l",
 23270              "m",
 23271              "n",
 23272              "o",
 23273              "p",
 23274              "q",
 23275              "r",
 23276              "s",
 23277              "t",
 23278              "u",
 23279              "v",
 23280              "w",
 23281              "x",
 23282              "y",
 23283              "z",
 23284              "braceleft",
 23285              "bar",
 23286              "braceright",
 23287              "asciitilde",
 23288              "exclamdown",
 23289              "cent",
 23290              "sterling",
 23291              "fraction",
 23292              "yen",
 23293              "florin",
 23294              "section",
 23295              "currency",
 23296              "quotesingle",
 23297              "quotedblleft",
 23298              "guillemotleft",
 23299              "guilsinglleft",
 23300              "guilsinglright",
 23301              "fi",
 23302              "fl",
 23303              "endash",
 23304              "dagger",
 23305              "daggerdbl",
 23306              "periodcentered",
 23307              "paragraph",
 23308              "bullet",
 23309              "quotesinglbase",
 23310              "quotedblbase",
 23311              "quotedblright",
 23312              "guillemotright",
 23313              "ellipsis",
 23314              "perthousand",
 23315              "questiondown",
 23316              "grave",
 23317              "acute",
 23318              "circumflex",
 23319              "tilde",
 23320              "macron",
 23321              "breve",
 23322              "dotaccent",
 23323              "dieresis",
 23324              "ring",
 23325              "cedilla",
 23326              "hungarumlaut",
 23327              "ogonek",
 23328              "caron",
 23329              "emdash",
 23330              "AE",
 23331              "ordfeminine",
 23332              "Lslash",
 23333              "Oslash",
 23334              "OE",
 23335              "ordmasculine",
 23336              "ae",
 23337              "dotlessi",
 23338              "lslash",
 23339              "oslash",
 23340              "oe",
 23341              "germandbls",
 23342              "onesuperior",
 23343              "logicalnot",
 23344              "mu",
 23345              "trademark",
 23346              "Eth",
 23347              "onehalf",
 23348              "plusminus",
 23349              "Thorn",
 23350              "onequarter",
 23351              "divide",
 23352              "brokenbar",
 23353              "degree",
 23354              "thorn",
 23355              "threequarters",
 23356              "twosuperior",
 23357              "registered",
 23358              "minus",
 23359              "eth",
 23360              "multiply",
 23361              "threesuperior",
 23362              "copyright",
 23363              "Aacute",
 23364              "Acircumflex",
 23365              "Adieresis",
 23366              "Agrave",
 23367              "Aring",
 23368              "Atilde",
 23369              "Ccedilla",
 23370              "Eacute",
 23371              "Ecircumflex",
 23372              "Edieresis",
 23373              "Egrave",
 23374              "Iacute",
 23375              "Icircumflex",
 23376              "Idieresis",
 23377              "Igrave",
 23378              "Ntilde",
 23379              "Oacute",
 23380              "Ocircumflex",
 23381              "Odieresis",
 23382              "Ograve",
 23383              "Otilde",
 23384              "Scaron",
 23385              "Uacute",
 23386              "Ucircumflex",
 23387              "Udieresis",
 23388              "Ugrave",
 23389              "Yacute",
 23390              "Ydieresis",
 23391              "Zcaron",
 23392              "aacute",
 23393              "acircumflex",
 23394              "adieresis",
 23395              "agrave",
 23396              "aring",
 23397              "atilde",
 23398              "ccedilla",
 23399              "eacute",
 23400              "ecircumflex",
 23401              "edieresis",
 23402              "egrave",
 23403              "iacute",
 23404              "icircumflex",
 23405              "idieresis",
 23406              "igrave",
 23407              "ntilde",
 23408              "oacute",
 23409              "ocircumflex",
 23410              "odieresis",
 23411              "ograve",
 23412              "otilde",
 23413              "scaron",
 23414              "uacute",
 23415              "ucircumflex",
 23416              "udieresis",
 23417              "ugrave",
 23418              "yacute",
 23419              "ydieresis",
 23420              "zcaron",
 23421              "exclamsmall",
 23422              "Hungarumlautsmall",
 23423              "dollaroldstyle",
 23424              "dollarsuperior",
 23425              "ampersandsmall",
 23426              "Acutesmall",
 23427              "parenleftsuperior",
 23428              "parenrightsuperior",
 23429              "twodotenleader",
 23430              "onedotenleader",
 23431              "zerooldstyle",
 23432              "oneoldstyle",
 23433              "twooldstyle",
 23434              "threeoldstyle",
 23435              "fouroldstyle",
 23436              "fiveoldstyle",
 23437              "sixoldstyle",
 23438              "sevenoldstyle",
 23439              "eightoldstyle",
 23440              "nineoldstyle",
 23441              "commasuperior",
 23442              "threequartersemdash",
 23443              "periodsuperior",
 23444              "questionsmall",
 23445              "asuperior",
 23446              "bsuperior",
 23447              "centsuperior",
 23448              "dsuperior",
 23449              "esuperior",
 23450              "isuperior",
 23451              "lsuperior",
 23452              "msuperior",
 23453              "nsuperior",
 23454              "osuperior",
 23455              "rsuperior",
 23456              "ssuperior",
 23457              "tsuperior",
 23458              "ff",
 23459              "ffi",
 23460              "ffl",
 23461              "parenleftinferior",
 23462              "parenrightinferior",
 23463              "Circumflexsmall",
 23464              "hyphensuperior",
 23465              "Gravesmall",
 23466              "Asmall",
 23467              "Bsmall",
 23468              "Csmall",
 23469              "Dsmall",
 23470              "Esmall",
 23471              "Fsmall",
 23472              "Gsmall",
 23473              "Hsmall",
 23474              "Ismall",
 23475              "Jsmall",
 23476              "Ksmall",
 23477              "Lsmall",
 23478              "Msmall",
 23479              "Nsmall",
 23480              "Osmall",
 23481              "Psmall",
 23482              "Qsmall",
 23483              "Rsmall",
 23484              "Ssmall",
 23485              "Tsmall",
 23486              "Usmall",
 23487              "Vsmall",
 23488              "Wsmall",
 23489              "Xsmall",
 23490              "Ysmall",
 23491              "Zsmall",
 23492              "colonmonetary",
 23493              "onefitted",
 23494              "rupiah",
 23495              "Tildesmall",
 23496              "exclamdownsmall",
 23497              "centoldstyle",
 23498              "Lslashsmall",
 23499              "Scaronsmall",
 23500              "Zcaronsmall",
 23501              "Dieresissmall",
 23502              "Brevesmall",
 23503              "Caronsmall",
 23504              "Dotaccentsmall",
 23505              "Macronsmall",
 23506              "figuredash",
 23507              "hypheninferior",
 23508              "Ogoneksmall",
 23509              "Ringsmall",
 23510              "Cedillasmall",
 23511              "questiondownsmall",
 23512              "oneeighth",
 23513              "threeeighths",
 23514              "fiveeighths",
 23515              "seveneighths",
 23516              "onethird",
 23517              "twothirds",
 23518              "zerosuperior",
 23519              "foursuperior",
 23520              "fivesuperior",
 23521              "sixsuperior",
 23522              "sevensuperior",
 23523              "eightsuperior",
 23524              "ninesuperior",
 23525              "zeroinferior",
 23526              "oneinferior",
 23527              "twoinferior",
 23528              "threeinferior",
 23529              "fourinferior",
 23530              "fiveinferior",
 23531              "sixinferior",
 23532              "seveninferior",
 23533              "eightinferior",
 23534              "nineinferior",
 23535              "centinferior",
 23536              "dollarinferior",
 23537              "periodinferior",
 23538              "commainferior",
 23539              "Agravesmall",
 23540              "Aacutesmall",
 23541              "Acircumflexsmall",
 23542              "Atildesmall",
 23543              "Adieresissmall",
 23544              "Aringsmall",
 23545              "AEsmall",
 23546              "Ccedillasmall",
 23547              "Egravesmall",
 23548              "Eacutesmall",
 23549              "Ecircumflexsmall",
 23550              "Edieresissmall",
 23551              "Igravesmall",
 23552              "Iacutesmall",
 23553              "Icircumflexsmall",
 23554              "Idieresissmall",
 23555              "Ethsmall",
 23556              "Ntildesmall",
 23557              "Ogravesmall",
 23558              "Oacutesmall",
 23559              "Ocircumflexsmall",
 23560              "Otildesmall",
 23561              "Odieresissmall",
 23562              "OEsmall",
 23563              "Oslashsmall",
 23564              "Ugravesmall",
 23565              "Uacutesmall",
 23566              "Ucircumflexsmall",
 23567              "Udieresissmall",
 23568              "Yacutesmall",
 23569              "Thornsmall",
 23570              "Ydieresissmall",
 23571              "001.000",
 23572              "001.001",
 23573              "001.002",
 23574              "001.003",
 23575              "Black",
 23576              "Bold",
 23577              "Book",
 23578              "Light",
 23579              "Medium",
 23580              "Regular",
 23581              "Roman",
 23582              "Semibold",
 23583            ];
 23584            t.CFFStandardStrings = s;
 23585            const o = 391,
 23586              c = [
 23587                null,
 23588                { id: "hstem", min: 2, stackClearing: !0, stem: !0 },
 23589                null,
 23590                { id: "vstem", min: 2, stackClearing: !0, stem: !0 },
 23591                { id: "vmoveto", min: 1, stackClearing: !0 },
 23592                { id: "rlineto", min: 2, resetStack: !0 },
 23593                { id: "hlineto", min: 1, resetStack: !0 },
 23594                { id: "vlineto", min: 1, resetStack: !0 },
 23595                { id: "rrcurveto", min: 6, resetStack: !0 },
 23596                null,
 23597                { id: "callsubr", min: 1, undefStack: !0 },
 23598                { id: "return", min: 0, undefStack: !0 },
 23599                null,
 23600                null,
 23601                { id: "endchar", min: 0, stackClearing: !0 },
 23602                null,
 23603                null,
 23604                null,
 23605                { id: "hstemhm", min: 2, stackClearing: !0, stem: !0 },
 23606                { id: "hintmask", min: 0, stackClearing: !0 },
 23607                { id: "cntrmask", min: 0, stackClearing: !0 },
 23608                { id: "rmoveto", min: 2, stackClearing: !0 },
 23609                { id: "hmoveto", min: 1, stackClearing: !0 },
 23610                { id: "vstemhm", min: 2, stackClearing: !0, stem: !0 },
 23611                { id: "rcurveline", min: 8, resetStack: !0 },
 23612                { id: "rlinecurve", min: 8, resetStack: !0 },
 23613                { id: "vvcurveto", min: 4, resetStack: !0 },
 23614                { id: "hhcurveto", min: 4, resetStack: !0 },
 23615                null,
 23616                { id: "callgsubr", min: 1, undefStack: !0 },
 23617                { id: "vhcurveto", min: 4, resetStack: !0 },
 23618                { id: "hvcurveto", min: 4, resetStack: !0 },
 23619              ],
 23620              l = [
 23621                null,
 23622                null,
 23623                null,
 23624                { id: "and", min: 2, stackDelta: -1 },
 23625                { id: "or", min: 2, stackDelta: -1 },
 23626                { id: "not", min: 1, stackDelta: 0 },
 23627                null,
 23628                null,
 23629                null,
 23630                { id: "abs", min: 1, stackDelta: 0 },
 23631                {
 23632                  id: "add",
 23633                  min: 2,
 23634                  stackDelta: -1,
 23635                  stackFn(e, t) {
 23636                    e[t - 2] = e[t - 2] + e[t - 1];
 23637                  },
 23638                },
 23639                {
 23640                  id: "sub",
 23641                  min: 2,
 23642                  stackDelta: -1,
 23643                  stackFn(e, t) {
 23644                    e[t - 2] = e[t - 2] - e[t - 1];
 23645                  },
 23646                },
 23647                {
 23648                  id: "div",
 23649                  min: 2,
 23650                  stackDelta: -1,
 23651                  stackFn(e, t) {
 23652                    e[t - 2] = e[t - 2] / e[t - 1];
 23653                  },
 23654                },
 23655                null,
 23656                {
 23657                  id: "neg",
 23658                  min: 1,
 23659                  stackDelta: 0,
 23660                  stackFn(e, t) {
 23661                    e[t - 1] = -e[t - 1];
 23662                  },
 23663                },
 23664                { id: "eq", min: 2, stackDelta: -1 },
 23665                null,
 23666                null,
 23667                { id: "drop", min: 1, stackDelta: -1 },
 23668                null,
 23669                { id: "put", min: 2, stackDelta: -2 },
 23670                { id: "get", min: 1, stackDelta: 0 },
 23671                { id: "ifelse", min: 4, stackDelta: -3 },
 23672                { id: "random", min: 0, stackDelta: 1 },
 23673                {
 23674                  id: "mul",
 23675                  min: 2,
 23676                  stackDelta: -1,
 23677                  stackFn(e, t) {
 23678                    e[t - 2] = e[t - 2] * e[t - 1];
 23679                  },
 23680                },
 23681                null,
 23682                { id: "sqrt", min: 1, stackDelta: 0 },
 23683                { id: "dup", min: 1, stackDelta: 1 },
 23684                { id: "exch", min: 2, stackDelta: 0 },
 23685                { id: "index", min: 2, stackDelta: 0 },
 23686                { id: "roll", min: 3, stackDelta: -2 },
 23687                null,
 23688                null,
 23689                null,
 23690                { id: "hflex", min: 7, resetStack: !0 },
 23691                { id: "flex", min: 13, resetStack: !0 },
 23692                { id: "hflex1", min: 9, resetStack: !0 },
 23693                { id: "flex1", min: 11, resetStack: !0 },
 23694              ];
 23695            t.CFFParser = class CFFParser {
 23696              constructor(e, t, a) {
 23697                this.bytes = e.getBytes();
 23698                this.properties = t;
 23699                this.seacAnalysisEnabled = !!a;
 23700              }
 23701              parse() {
 23702                const e = this.properties,
 23703                  t = new CFF();
 23704                this.cff = t;
 23705                const a = this.parseHeader(),
 23706                  r = this.parseIndex(a.endPos),
 23707                  n = this.parseIndex(r.endPos),
 23708                  i = this.parseIndex(n.endPos),
 23709                  s = this.parseIndex(i.endPos),
 23710                  o = this.parseDict(n.obj.get(0)),
 23711                  c = this.createDict(CFFTopDict, o, t.strings);
 23712                t.header = a.obj;
 23713                t.names = this.parseNameIndex(r.obj);
 23714                t.strings = this.parseStringIndex(i.obj);
 23715                t.topDict = c;
 23716                t.globalSubrIndex = s.obj;
 23717                this.parsePrivateDict(t.topDict);
 23718                t.isCIDFont = c.hasName("ROS");
 23719                const l = c.getByName("CharStrings"),
 23720                  h = this.parseIndex(l).obj,
 23721                  u = c.getByName("FontMatrix");
 23722                u && (e.fontMatrix = u);
 23723                const d = c.getByName("FontBBox");
 23724                if (d) {
 23725                  e.ascent = Math.max(d[3], d[1]);
 23726                  e.descent = Math.min(d[1], d[3]);
 23727                  e.ascentScaled = !0;
 23728                }
 23729                let f, g;
 23730                if (t.isCIDFont) {
 23731                  const e = this.parseIndex(c.getByName("FDArray")).obj;
 23732                  for (let a = 0, r = e.count; a < r; ++a) {
 23733                    const r = e.get(a),
 23734                      n = this.createDict(
 23735                        CFFTopDict,
 23736                        this.parseDict(r),
 23737                        t.strings,
 23738                      );
 23739                    this.parsePrivateDict(n);
 23740                    t.fdArray.push(n);
 23741                  }
 23742                  g = null;
 23743                  f = this.parseCharsets(
 23744                    c.getByName("charset"),
 23745                    h.count,
 23746                    t.strings,
 23747                    !0,
 23748                  );
 23749                  t.fdSelect = this.parseFDSelect(
 23750                    c.getByName("FDSelect"),
 23751                    h.count,
 23752                  );
 23753                } else {
 23754                  f = this.parseCharsets(
 23755                    c.getByName("charset"),
 23756                    h.count,
 23757                    t.strings,
 23758                    !1,
 23759                  );
 23760                  g = this.parseEncoding(
 23761                    c.getByName("Encoding"),
 23762                    e,
 23763                    t.strings,
 23764                    f.charset,
 23765                  );
 23766                }
 23767                t.charset = f;
 23768                t.encoding = g;
 23769                const p = this.parseCharStrings({
 23770                  charStrings: h,
 23771                  localSubrIndex: c.privateDict.subrsIndex,
 23772                  globalSubrIndex: s.obj,
 23773                  fdSelect: t.fdSelect,
 23774                  fdArray: t.fdArray,
 23775                  privateDict: c.privateDict,
 23776                });
 23777                t.charStrings = p.charStrings;
 23778                t.seacs = p.seacs;
 23779                t.widths = p.widths;
 23780                return t;
 23781              }
 23782              parseHeader() {
 23783                let e = this.bytes;
 23784                const t = e.length;
 23785                let a = 0;
 23786                for (; a < t && 1 !== e[a]; ) ++a;
 23787                if (a >= t) throw new r.FormatError("Invalid CFF header");
 23788                if (0 !== a) {
 23789                  (0, r.info)("cff data is shifted");
 23790                  e = e.subarray(a);
 23791                  this.bytes = e;
 23792                }
 23793                const n = e[0],
 23794                  i = e[1],
 23795                  s = e[2],
 23796                  o = e[3];
 23797                return { obj: new CFFHeader(n, i, s, o), endPos: s };
 23798              }
 23799              parseDict(e) {
 23800                let t = 0;
 23801                function parseOperand() {
 23802                  let a = e[t++];
 23803                  if (30 === a)
 23804                    return (function parseFloatOperand() {
 23805                      let a = "";
 23806                      const r = 15,
 23807                        n = [
 23808                          "0",
 23809                          "1",
 23810                          "2",
 23811                          "3",
 23812                          "4",
 23813                          "5",
 23814                          "6",
 23815                          "7",
 23816                          "8",
 23817                          "9",
 23818                          ".",
 23819                          "E",
 23820                          "E-",
 23821                          null,
 23822                          "-",
 23823                        ],
 23824                        i = e.length;
 23825                      for (; t < i; ) {
 23826                        const i = e[t++],
 23827                          s = i >> 4,
 23828                          o = 15 & i;
 23829                        if (s === r) break;
 23830                        a += n[s];
 23831                        if (o === r) break;
 23832                        a += n[o];
 23833                      }
 23834                      return parseFloat(a);
 23835                    })();
 23836                  if (28 === a) {
 23837                    a = e[t++];
 23838                    a = ((a << 24) | (e[t++] << 16)) >> 16;
 23839                    return a;
 23840                  }
 23841                  if (29 === a) {
 23842                    a = e[t++];
 23843                    a = (a << 8) | e[t++];
 23844                    a = (a << 8) | e[t++];
 23845                    a = (a << 8) | e[t++];
 23846                    return a;
 23847                  }
 23848                  if (a >= 32 && a <= 246) return a - 139;
 23849                  if (a >= 247 && a <= 250) return 256 * (a - 247) + e[t++] + 108;
 23850                  if (a >= 251 && a <= 254)
 23851                    return -256 * (a - 251) - e[t++] - 108;
 23852                  (0, r.warn)(
 23853                    'CFFParser_parseDict: "' + a + '" is a reserved command.',
 23854                  );
 23855                  return NaN;
 23856                }
 23857                let a = [];
 23858                const n = [];
 23859                t = 0;
 23860                const i = e.length;
 23861                for (; t < i; ) {
 23862                  let r = e[t];
 23863                  if (r <= 21) {
 23864                    12 === r && (r = (r << 8) | e[++t]);
 23865                    n.push([r, a]);
 23866                    a = [];
 23867                    ++t;
 23868                  } else a.push(parseOperand());
 23869                }
 23870                return n;
 23871              }
 23872              parseIndex(e) {
 23873                const t = new CFFIndex(),
 23874                  a = this.bytes,
 23875                  r = (a[e++] << 8) | a[e++],
 23876                  n = [];
 23877                let i,
 23878                  s,
 23879                  o = e;
 23880                if (0 !== r) {
 23881                  const t = a[e++],
 23882                    c = e + (r + 1) * t - 1;
 23883                  for (i = 0, s = r + 1; i < s; ++i) {
 23884                    let r = 0;
 23885                    for (let n = 0; n < t; ++n) {
 23886                      r <<= 8;
 23887                      r += a[e++];
 23888                    }
 23889                    n.push(c + r);
 23890                  }
 23891                  o = n[r];
 23892                }
 23893                for (i = 0, s = n.length - 1; i < s; ++i) {
 23894                  const e = n[i],
 23895                    r = n[i + 1];
 23896                  t.add(a.subarray(e, r));
 23897                }
 23898                return { obj: t, endPos: o };
 23899              }
 23900              parseNameIndex(e) {
 23901                const t = [];
 23902                for (let a = 0, n = e.count; a < n; ++a) {
 23903                  const n = e.get(a);
 23904                  t.push((0, r.bytesToString)(n));
 23905                }
 23906                return t;
 23907              }
 23908              parseStringIndex(e) {
 23909                const t = new CFFStrings();
 23910                for (let a = 0, n = e.count; a < n; ++a) {
 23911                  const n = e.get(a);
 23912                  t.add((0, r.bytesToString)(n));
 23913                }
 23914                return t;
 23915              }
 23916              createDict(e, t, a) {
 23917                const r = new e(a);
 23918                for (const [e, a] of t) r.setByKey(e, a);
 23919                return r;
 23920              }
 23921              parseCharString(e, t, a, n) {
 23922                if (!t || e.callDepth > 10) return !1;
 23923                let i = e.stackSize;
 23924                const s = e.stack;
 23925                let o = t.length;
 23926                for (let h = 0; h < o; ) {
 23927                  const u = t[h++];
 23928                  let d = null;
 23929                  if (12 === u) {
 23930                    const e = t[h++];
 23931                    if (0 === e) {
 23932                      t[h - 2] = 139;
 23933                      t[h - 1] = 22;
 23934                      i = 0;
 23935                    } else d = l[e];
 23936                  } else if (28 === u) {
 23937                    s[i] = ((t[h] << 24) | (t[h + 1] << 16)) >> 16;
 23938                    h += 2;
 23939                    i++;
 23940                  } else if (14 === u) {
 23941                    if (i >= 4) {
 23942                      i -= 4;
 23943                      if (this.seacAnalysisEnabled) {
 23944                        e.seac = s.slice(i, i + 4);
 23945                        return !1;
 23946                      }
 23947                    }
 23948                    d = c[u];
 23949                  } else if (u >= 32 && u <= 246) {
 23950                    s[i] = u - 139;
 23951                    i++;
 23952                  } else if (u >= 247 && u <= 254) {
 23953                    s[i] =
 23954                      u < 251
 23955                        ? ((u - 247) << 8) + t[h] + 108
 23956                        : -((u - 251) << 8) - t[h] - 108;
 23957                    h++;
 23958                    i++;
 23959                  } else if (255 === u) {
 23960                    s[i] =
 23961                      ((t[h] << 24) |
 23962                        (t[h + 1] << 16) |
 23963                        (t[h + 2] << 8) |
 23964                        t[h + 3]) /
 23965                      65536;
 23966                    h += 4;
 23967                    i++;
 23968                  } else if (19 === u || 20 === u) {
 23969                    e.hints += i >> 1;
 23970                    if (0 === e.hints) {
 23971                      t.copyWithin(h - 1, h, -1);
 23972                      h -= 1;
 23973                      o -= 1;
 23974                      continue;
 23975                    }
 23976                    h += (e.hints + 7) >> 3;
 23977                    i %= 2;
 23978                    d = c[u];
 23979                  } else {
 23980                    if (10 === u || 29 === u) {
 23981                      const t = 10 === u ? a : n;
 23982                      if (!t) {
 23983                        d = c[u];
 23984                        (0, r.warn)("Missing subrsIndex for " + d.id);
 23985                        return !1;
 23986                      }
 23987                      let o = 32768;
 23988                      t.count < 1240 ? (o = 107) : t.count < 33900 && (o = 1131);
 23989                      const l = s[--i] + o;
 23990                      if (l < 0 || l >= t.count || isNaN(l)) {
 23991                        d = c[u];
 23992                        (0, r.warn)("Out of bounds subrIndex for " + d.id);
 23993                        return !1;
 23994                      }
 23995                      e.stackSize = i;
 23996                      e.callDepth++;
 23997                      if (!this.parseCharString(e, t.get(l), a, n)) return !1;
 23998                      e.callDepth--;
 23999                      i = e.stackSize;
 24000                      continue;
 24001                    }
 24002                    if (11 === u) {
 24003                      e.stackSize = i;
 24004                      return !0;
 24005                    }
 24006                    if (0 === u && h === t.length) {
 24007                      t[h - 1] = 14;
 24008                      d = c[14];
 24009                    } else {
 24010                      if (9 === u) {
 24011                        t.copyWithin(h - 1, h, -1);
 24012                        h -= 1;
 24013                        o -= 1;
 24014                        continue;
 24015                      }
 24016                      d = c[u];
 24017                    }
 24018                  }
 24019                  if (d) {
 24020                    if (d.stem) {
 24021                      e.hints += i >> 1;
 24022                      if (3 === u || 23 === u) e.hasVStems = !0;
 24023                      else if (e.hasVStems && (1 === u || 18 === u)) {
 24024                        (0, r.warn)("CFF stem hints are in wrong order");
 24025                        t[h - 1] = 1 === u ? 3 : 23;
 24026                      }
 24027                    }
 24028                    if ("min" in d && !e.undefStack && i < d.min) {
 24029                      (0, r.warn)(
 24030                        "Not enough parameters for " +
 24031                          d.id +
 24032                          "; actual: " +
 24033                          i +
 24034                          ", expected: " +
 24035                          d.min,
 24036                      );
 24037                      if (0 === i) {
 24038                        t[h - 1] = 14;
 24039                        return !0;
 24040                      }
 24041                      return !1;
 24042                    }
 24043                    if (e.firstStackClearing && d.stackClearing) {
 24044                      e.firstStackClearing = !1;
 24045                      i -= d.min;
 24046                      i >= 2 && d.stem
 24047                        ? (i %= 2)
 24048                        : i > 1 &&
 24049                          (0, r.warn)(
 24050                            "Found too many parameters for stack-clearing command",
 24051                          );
 24052                      i > 0 && (e.width = s[i - 1]);
 24053                    }
 24054                    if ("stackDelta" in d) {
 24055                      "stackFn" in d && d.stackFn(s, i);
 24056                      i += d.stackDelta;
 24057                    } else if (d.stackClearing) i = 0;
 24058                    else if (d.resetStack) {
 24059                      i = 0;
 24060                      e.undefStack = !1;
 24061                    } else if (d.undefStack) {
 24062                      i = 0;
 24063                      e.undefStack = !0;
 24064                      e.firstStackClearing = !1;
 24065                    }
 24066                  }
 24067                }
 24068                o < t.length && t.fill(14, o);
 24069                e.stackSize = i;
 24070                return !0;
 24071              }
 24072              parseCharStrings({
 24073                charStrings: e,
 24074                localSubrIndex: t,
 24075                globalSubrIndex: a,
 24076                fdSelect: n,
 24077                fdArray: i,
 24078                privateDict: s,
 24079              }) {
 24080                const o = [],
 24081                  c = [],
 24082                  l = e.count;
 24083                for (let h = 0; h < l; h++) {
 24084                  const l = e.get(h),
 24085                    u = {
 24086                      callDepth: 0,
 24087                      stackSize: 0,
 24088                      stack: [],
 24089                      undefStack: !0,
 24090                      hints: 0,
 24091                      firstStackClearing: !0,
 24092                      seac: null,
 24093                      width: null,
 24094                      hasVStems: !1,
 24095                    };
 24096                  let d = !0,
 24097                    f = null,
 24098                    g = s;
 24099                  if (n && i.length) {
 24100                    const e = n.getFDIndex(h);
 24101                    if (-1 === e) {
 24102                      (0, r.warn)("Glyph index is not in fd select.");
 24103                      d = !1;
 24104                    }
 24105                    if (e >= i.length) {
 24106                      (0, r.warn)("Invalid fd index for glyph index.");
 24107                      d = !1;
 24108                    }
 24109                    if (d) {
 24110                      g = i[e].privateDict;
 24111                      f = g.subrsIndex;
 24112                    }
 24113                  } else t && (f = t);
 24114                  d && (d = this.parseCharString(u, l, f, a));
 24115                  if (null !== u.width) {
 24116                    const e = g.getByName("nominalWidthX");
 24117                    c[h] = e + u.width;
 24118                  } else {
 24119                    const e = g.getByName("defaultWidthX");
 24120                    c[h] = e;
 24121                  }
 24122                  null !== u.seac && (o[h] = u.seac);
 24123                  d || e.set(h, new Uint8Array([14]));
 24124                }
 24125                return { charStrings: e, seacs: o, widths: c };
 24126              }
 24127              emptyPrivateDictionary(e) {
 24128                const t = this.createDict(CFFPrivateDict, [], e.strings);
 24129                e.setByKey(18, [0, 0]);
 24130                e.privateDict = t;
 24131              }
 24132              parsePrivateDict(e) {
 24133                if (!e.hasName("Private")) {
 24134                  this.emptyPrivateDictionary(e);
 24135                  return;
 24136                }
 24137                const t = e.getByName("Private");
 24138                if (!Array.isArray(t) || 2 !== t.length) {
 24139                  e.removeByName("Private");
 24140                  return;
 24141                }
 24142                const a = t[0],
 24143                  r = t[1];
 24144                if (0 === a || r >= this.bytes.length) {
 24145                  this.emptyPrivateDictionary(e);
 24146                  return;
 24147                }
 24148                const n = r + a,
 24149                  i = this.bytes.subarray(r, n),
 24150                  s = this.parseDict(i),
 24151                  o = this.createDict(CFFPrivateDict, s, e.strings);
 24152                e.privateDict = o;
 24153                0 === o.getByName("ExpansionFactor") &&
 24154                  o.setByName("ExpansionFactor", 0.06);
 24155                if (!o.getByName("Subrs")) return;
 24156                const c = o.getByName("Subrs"),
 24157                  l = r + c;
 24158                if (0 === c || l >= this.bytes.length) {
 24159                  this.emptyPrivateDictionary(e);
 24160                  return;
 24161                }
 24162                const h = this.parseIndex(l);
 24163                o.subrsIndex = h.obj;
 24164              }
 24165              parseCharsets(e, t, a, i) {
 24166                if (0 === e)
 24167                  return new CFFCharset(!0, d.ISO_ADOBE, n.ISOAdobeCharset);
 24168                if (1 === e) return new CFFCharset(!0, d.EXPERT, n.ExpertCharset);
 24169                if (2 === e)
 24170                  return new CFFCharset(
 24171                    !0,
 24172                    d.EXPERT_SUBSET,
 24173                    n.ExpertSubsetCharset,
 24174                  );
 24175                const s = this.bytes,
 24176                  o = e,
 24177                  c = s[e++],
 24178                  l = [i ? 0 : ".notdef"];
 24179                let h, u, f;
 24180                t -= 1;
 24181                switch (c) {
 24182                  case 0:
 24183                    for (f = 0; f < t; f++) {
 24184                      h = (s[e++] << 8) | s[e++];
 24185                      l.push(i ? h : a.get(h));
 24186                    }
 24187                    break;
 24188                  case 1:
 24189                    for (; l.length <= t; ) {
 24190                      h = (s[e++] << 8) | s[e++];
 24191                      u = s[e++];
 24192                      for (f = 0; f <= u; f++) l.push(i ? h++ : a.get(h++));
 24193                    }
 24194                    break;
 24195                  case 2:
 24196                    for (; l.length <= t; ) {
 24197                      h = (s[e++] << 8) | s[e++];
 24198                      u = (s[e++] << 8) | s[e++];
 24199                      for (f = 0; f <= u; f++) l.push(i ? h++ : a.get(h++));
 24200                    }
 24201                    break;
 24202                  default:
 24203                    throw new r.FormatError("Unknown charset format");
 24204                }
 24205                const g = e,
 24206                  p = s.subarray(o, g);
 24207                return new CFFCharset(!1, c, l, p);
 24208              }
 24209              parseEncoding(e, t, a, n) {
 24210                const s = Object.create(null),
 24211                  o = this.bytes;
 24212                let c,
 24213                  l,
 24214                  h,
 24215                  u = !1,
 24216                  d = null;
 24217                if (0 === e || 1 === e) {
 24218                  u = !0;
 24219                  c = e;
 24220                  const t = e ? i.ExpertEncoding : i.StandardEncoding;
 24221                  for (l = 0, h = n.length; l < h; l++) {
 24222                    const e = t.indexOf(n[l]);
 24223                    -1 !== e && (s[e] = l);
 24224                  }
 24225                } else {
 24226                  const t = e;
 24227                  c = o[e++];
 24228                  switch (127 & c) {
 24229                    case 0:
 24230                      const t = o[e++];
 24231                      for (l = 1; l <= t; l++) s[o[e++]] = l;
 24232                      break;
 24233                    case 1:
 24234                      const a = o[e++];
 24235                      let n = 1;
 24236                      for (l = 0; l < a; l++) {
 24237                        const t = o[e++],
 24238                          a = o[e++];
 24239                        for (let e = t; e <= t + a; e++) s[e] = n++;
 24240                      }
 24241                      break;
 24242                    default:
 24243                      throw new r.FormatError(
 24244                        `Unknown encoding format: ${c} in CFF`,
 24245                      );
 24246                  }
 24247                  const i = e;
 24248                  if (128 & c) {
 24249                    o[t] &= 127;
 24250                    !(function readSupplement() {
 24251                      const t = o[e++];
 24252                      for (l = 0; l < t; l++) {
 24253                        const t = o[e++],
 24254                          r = (o[e++] << 8) + (255 & o[e++]);
 24255                        s[t] = n.indexOf(a.get(r));
 24256                      }
 24257                    })();
 24258                  }
 24259                  d = o.subarray(t, i);
 24260                }
 24261                c &= 127;
 24262                return new CFFEncoding(u, c, s, d);
 24263              }
 24264              parseFDSelect(e, t) {
 24265                const a = this.bytes,
 24266                  n = a[e++],
 24267                  i = [];
 24268                let s;
 24269                switch (n) {
 24270                  case 0:
 24271                    for (s = 0; s < t; ++s) {
 24272                      const t = a[e++];
 24273                      i.push(t);
 24274                    }
 24275                    break;
 24276                  case 3:
 24277                    const o = (a[e++] << 8) | a[e++];
 24278                    for (s = 0; s < o; ++s) {
 24279                      let t = (a[e++] << 8) | a[e++];
 24280                      if (0 === s && 0 !== t) {
 24281                        (0, r.warn)(
 24282                          "parseFDSelect: The first range must have a first GID of 0 -- trying to recover.",
 24283                        );
 24284                        t = 0;
 24285                      }
 24286                      const n = a[e++],
 24287                        o = (a[e] << 8) | a[e + 1];
 24288                      for (let e = t; e < o; ++e) i.push(n);
 24289                    }
 24290                    e += 2;
 24291                    break;
 24292                  default:
 24293                    throw new r.FormatError(
 24294                      `parseFDSelect: Unknown format "${n}".`,
 24295                    );
 24296                }
 24297                if (i.length !== t)
 24298                  throw new r.FormatError("parseFDSelect: Invalid font data.");
 24299                return new CFFFDSelect(n, i);
 24300              }
 24301            };
 24302            class CFF {
 24303              constructor() {
 24304                this.header = null;
 24305                this.names = [];
 24306                this.topDict = null;
 24307                this.strings = new CFFStrings();
 24308                this.globalSubrIndex = null;
 24309                this.encoding = null;
 24310                this.charset = null;
 24311                this.charStrings = null;
 24312                this.fdArray = [];
 24313                this.fdSelect = null;
 24314                this.isCIDFont = !1;
 24315              }
 24316              duplicateFirstGlyph() {
 24317                if (this.charStrings.count >= 65535) {
 24318                  (0, r.warn)(
 24319                    "Not enough space in charstrings to duplicate first glyph.",
 24320                  );
 24321                  return;
 24322                }
 24323                const e = this.charStrings.get(0);
 24324                this.charStrings.add(e);
 24325                this.isCIDFont &&
 24326                  this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0]);
 24327              }
 24328              hasGlyphId(e) {
 24329                if (e < 0 || e >= this.charStrings.count) return !1;
 24330                return this.charStrings.get(e).length > 0;
 24331              }
 24332            }
 24333            t.CFF = CFF;
 24334            class CFFHeader {
 24335              constructor(e, t, a, r) {
 24336                this.major = e;
 24337                this.minor = t;
 24338                this.hdrSize = a;
 24339                this.offSize = r;
 24340              }
 24341            }
 24342            t.CFFHeader = CFFHeader;
 24343            class CFFStrings {
 24344              constructor() {
 24345                this.strings = [];
 24346              }
 24347              get(e) {
 24348                return e >= 0 && e <= 390
 24349                  ? s[e]
 24350                  : e - o <= this.strings.length
 24351                    ? this.strings[e - o]
 24352                    : s[0];
 24353              }
 24354              getSID(e) {
 24355                let t = s.indexOf(e);
 24356                if (-1 !== t) return t;
 24357                t = this.strings.indexOf(e);
 24358                return -1 !== t ? t + o : -1;
 24359              }
 24360              add(e) {
 24361                this.strings.push(e);
 24362              }
 24363              get count() {
 24364                return this.strings.length;
 24365              }
 24366            }
 24367            t.CFFStrings = CFFStrings;
 24368            class CFFIndex {
 24369              constructor() {
 24370                this.objects = [];
 24371                this.length = 0;
 24372              }
 24373              add(e) {
 24374                this.length += e.length;
 24375                this.objects.push(e);
 24376              }
 24377              set(e, t) {
 24378                this.length += t.length - this.objects[e].length;
 24379                this.objects[e] = t;
 24380              }
 24381              get(e) {
 24382                return this.objects[e];
 24383              }
 24384              get count() {
 24385                return this.objects.length;
 24386              }
 24387            }
 24388            t.CFFIndex = CFFIndex;
 24389            class CFFDict {
 24390              constructor(e, t) {
 24391                this.keyToNameMap = e.keyToNameMap;
 24392                this.nameToKeyMap = e.nameToKeyMap;
 24393                this.defaults = e.defaults;
 24394                this.types = e.types;
 24395                this.opcodes = e.opcodes;
 24396                this.order = e.order;
 24397                this.strings = t;
 24398                this.values = Object.create(null);
 24399              }
 24400              setByKey(e, t) {
 24401                if (!(e in this.keyToNameMap)) return !1;
 24402                if (0 === t.length) return !0;
 24403                for (const a of t)
 24404                  if (isNaN(a)) {
 24405                    (0, r.warn)(`Invalid CFFDict value: "${t}" for key "${e}".`);
 24406                    return !0;
 24407                  }
 24408                const a = this.types[e];
 24409                ("num" !== a && "sid" !== a && "offset" !== a) || (t = t[0]);
 24410                this.values[e] = t;
 24411                return !0;
 24412              }
 24413              setByName(e, t) {
 24414                if (!(e in this.nameToKeyMap))
 24415                  throw new r.FormatError(`Invalid dictionary name "${e}"`);
 24416                this.values[this.nameToKeyMap[e]] = t;
 24417              }
 24418              hasName(e) {
 24419                return this.nameToKeyMap[e] in this.values;
 24420              }
 24421              getByName(e) {
 24422                if (!(e in this.nameToKeyMap))
 24423                  throw new r.FormatError(`Invalid dictionary name ${e}"`);
 24424                const t = this.nameToKeyMap[e];
 24425                return t in this.values ? this.values[t] : this.defaults[t];
 24426              }
 24427              removeByName(e) {
 24428                delete this.values[this.nameToKeyMap[e]];
 24429              }
 24430              static createTables(e) {
 24431                const t = {
 24432                  keyToNameMap: {},
 24433                  nameToKeyMap: {},
 24434                  defaults: {},
 24435                  types: {},
 24436                  opcodes: {},
 24437                  order: [],
 24438                };
 24439                for (const a of e) {
 24440                  const e = Array.isArray(a[0]) ? (a[0][0] << 8) + a[0][1] : a[0];
 24441                  t.keyToNameMap[e] = a[1];
 24442                  t.nameToKeyMap[a[1]] = e;
 24443                  t.types[e] = a[2];
 24444                  t.defaults[e] = a[3];
 24445                  t.opcodes[e] = Array.isArray(a[0]) ? a[0] : [a[0]];
 24446                  t.order.push(e);
 24447                }
 24448                return t;
 24449              }
 24450            }
 24451            const h = [
 24452              [[12, 30], "ROS", ["sid", "sid", "num"], null],
 24453              [[12, 20], "SyntheticBase", "num", null],
 24454              [0, "version", "sid", null],
 24455              [1, "Notice", "sid", null],
 24456              [[12, 0], "Copyright", "sid", null],
 24457              [2, "FullName", "sid", null],
 24458              [3, "FamilyName", "sid", null],
 24459              [4, "Weight", "sid", null],
 24460              [[12, 1], "isFixedPitch", "num", 0],
 24461              [[12, 2], "ItalicAngle", "num", 0],
 24462              [[12, 3], "UnderlinePosition", "num", -100],
 24463              [[12, 4], "UnderlineThickness", "num", 50],
 24464              [[12, 5], "PaintType", "num", 0],
 24465              [[12, 6], "CharstringType", "num", 2],
 24466              [
 24467                [12, 7],
 24468                "FontMatrix",
 24469                ["num", "num", "num", "num", "num", "num"],
 24470                [0.001, 0, 0, 0.001, 0, 0],
 24471              ],
 24472              [13, "UniqueID", "num", null],
 24473              [5, "FontBBox", ["num", "num", "num", "num"], [0, 0, 0, 0]],
 24474              [[12, 8], "StrokeWidth", "num", 0],
 24475              [14, "XUID", "array", null],
 24476              [15, "charset", "offset", 0],
 24477              [16, "Encoding", "offset", 0],
 24478              [17, "CharStrings", "offset", 0],
 24479              [18, "Private", ["offset", "offset"], null],
 24480              [[12, 21], "PostScript", "sid", null],
 24481              [[12, 22], "BaseFontName", "sid", null],
 24482              [[12, 23], "BaseFontBlend", "delta", null],
 24483              [[12, 31], "CIDFontVersion", "num", 0],
 24484              [[12, 32], "CIDFontRevision", "num", 0],
 24485              [[12, 33], "CIDFontType", "num", 0],
 24486              [[12, 34], "CIDCount", "num", 8720],
 24487              [[12, 35], "UIDBase", "num", null],
 24488              [[12, 37], "FDSelect", "offset", null],
 24489              [[12, 36], "FDArray", "offset", null],
 24490              [[12, 38], "FontName", "sid", null],
 24491            ];
 24492            class CFFTopDict extends CFFDict {
 24493              static get tables() {
 24494                return (0, r.shadow)(this, "tables", this.createTables(h));
 24495              }
 24496              constructor(e) {
 24497                super(CFFTopDict.tables, e);
 24498                this.privateDict = null;
 24499              }
 24500            }
 24501            t.CFFTopDict = CFFTopDict;
 24502            const u = [
 24503              [6, "BlueValues", "delta", null],
 24504              [7, "OtherBlues", "delta", null],
 24505              [8, "FamilyBlues", "delta", null],
 24506              [9, "FamilyOtherBlues", "delta", null],
 24507              [[12, 9], "BlueScale", "num", 0.039625],
 24508              [[12, 10], "BlueShift", "num", 7],
 24509              [[12, 11], "BlueFuzz", "num", 1],
 24510              [10, "StdHW", "num", null],
 24511              [11, "StdVW", "num", null],
 24512              [[12, 12], "StemSnapH", "delta", null],
 24513              [[12, 13], "StemSnapV", "delta", null],
 24514              [[12, 14], "ForceBold", "num", 0],
 24515              [[12, 17], "LanguageGroup", "num", 0],
 24516              [[12, 18], "ExpansionFactor", "num", 0.06],
 24517              [[12, 19], "initialRandomSeed", "num", 0],
 24518              [20, "defaultWidthX", "num", 0],
 24519              [21, "nominalWidthX", "num", 0],
 24520              [19, "Subrs", "offset", null],
 24521            ];
 24522            class CFFPrivateDict extends CFFDict {
 24523              static get tables() {
 24524                return (0, r.shadow)(this, "tables", this.createTables(u));
 24525              }
 24526              constructor(e) {
 24527                super(CFFPrivateDict.tables, e);
 24528                this.subrsIndex = null;
 24529              }
 24530            }
 24531            t.CFFPrivateDict = CFFPrivateDict;
 24532            const d = { ISO_ADOBE: 0, EXPERT: 1, EXPERT_SUBSET: 2 };
 24533            class CFFCharset {
 24534              constructor(e, t, a, r) {
 24535                this.predefined = e;
 24536                this.format = t;
 24537                this.charset = a;
 24538                this.raw = r;
 24539              }
 24540            }
 24541            t.CFFCharset = CFFCharset;
 24542            class CFFEncoding {
 24543              constructor(e, t, a, r) {
 24544                this.predefined = e;
 24545                this.format = t;
 24546                this.encoding = a;
 24547                this.raw = r;
 24548              }
 24549            }
 24550            class CFFFDSelect {
 24551              constructor(e, t) {
 24552                this.format = e;
 24553                this.fdSelect = t;
 24554              }
 24555              getFDIndex(e) {
 24556                return e < 0 || e >= this.fdSelect.length ? -1 : this.fdSelect[e];
 24557              }
 24558            }
 24559            t.CFFFDSelect = CFFFDSelect;
 24560            class CFFOffsetTracker {
 24561              constructor() {
 24562                this.offsets = Object.create(null);
 24563              }
 24564              isTracking(e) {
 24565                return e in this.offsets;
 24566              }
 24567              track(e, t) {
 24568                if (e in this.offsets)
 24569                  throw new r.FormatError(`Already tracking location of ${e}`);
 24570                this.offsets[e] = t;
 24571              }
 24572              offset(e) {
 24573                for (const t in this.offsets) this.offsets[t] += e;
 24574              }
 24575              setEntryLocation(e, t, a) {
 24576                if (!(e in this.offsets))
 24577                  throw new r.FormatError(`Not tracking location of ${e}`);
 24578                const n = a.data,
 24579                  i = this.offsets[e];
 24580                for (let e = 0, a = t.length; e < a; ++e) {
 24581                  const a = 5 * e + i,
 24582                    s = a + 1,
 24583                    o = a + 2,
 24584                    c = a + 3,
 24585                    l = a + 4;
 24586                  if (
 24587                    29 !== n[a] ||
 24588                    0 !== n[s] ||
 24589                    0 !== n[o] ||
 24590                    0 !== n[c] ||
 24591                    0 !== n[l]
 24592                  )
 24593                    throw new r.FormatError(
 24594                      "writing to an offset that is not empty",
 24595                    );
 24596                  const h = t[e];
 24597                  n[a] = 29;
 24598                  n[s] = (h >> 24) & 255;
 24599                  n[o] = (h >> 16) & 255;
 24600                  n[c] = (h >> 8) & 255;
 24601                  n[l] = 255 & h;
 24602                }
 24603              }
 24604            }
 24605            class CFFCompiler {
 24606              constructor(e) {
 24607                this.cff = e;
 24608              }
 24609              compile() {
 24610                const e = this.cff,
 24611                  t = {
 24612                    data: [],
 24613                    length: 0,
 24614                    add(e) {
 24615                      try {
 24616                        this.data.push(...e);
 24617                      } catch {
 24618                        this.data = this.data.concat(e);
 24619                      }
 24620                      this.length = this.data.length;
 24621                    },
 24622                  },
 24623                  a = this.compileHeader(e.header);
 24624                t.add(a);
 24625                const n = this.compileNameIndex(e.names);
 24626                t.add(n);
 24627                if (e.isCIDFont && e.topDict.hasName("FontMatrix")) {
 24628                  const t = e.topDict.getByName("FontMatrix");
 24629                  e.topDict.removeByName("FontMatrix");
 24630                  for (const a of e.fdArray) {
 24631                    let e = t.slice(0);
 24632                    a.hasName("FontMatrix") &&
 24633                      (e = r.Util.transform(e, a.getByName("FontMatrix")));
 24634                    a.setByName("FontMatrix", e);
 24635                  }
 24636                }
 24637                const i = e.topDict.getByName("XUID");
 24638                i?.length > 16 && e.topDict.removeByName("XUID");
 24639                e.topDict.setByName("charset", 0);
 24640                let s = this.compileTopDicts([e.topDict], t.length, e.isCIDFont);
 24641                t.add(s.output);
 24642                const o = s.trackers[0],
 24643                  c = this.compileStringIndex(e.strings.strings);
 24644                t.add(c);
 24645                const l = this.compileIndex(e.globalSubrIndex);
 24646                t.add(l);
 24647                if (e.encoding && e.topDict.hasName("Encoding"))
 24648                  if (e.encoding.predefined)
 24649                    o.setEntryLocation("Encoding", [e.encoding.format], t);
 24650                  else {
 24651                    const a = this.compileEncoding(e.encoding);
 24652                    o.setEntryLocation("Encoding", [t.length], t);
 24653                    t.add(a);
 24654                  }
 24655                const h = this.compileCharset(
 24656                  e.charset,
 24657                  e.charStrings.count,
 24658                  e.strings,
 24659                  e.isCIDFont,
 24660                );
 24661                o.setEntryLocation("charset", [t.length], t);
 24662                t.add(h);
 24663                const u = this.compileCharStrings(e.charStrings);
 24664                o.setEntryLocation("CharStrings", [t.length], t);
 24665                t.add(u);
 24666                if (e.isCIDFont) {
 24667                  o.setEntryLocation("FDSelect", [t.length], t);
 24668                  const a = this.compileFDSelect(e.fdSelect);
 24669                  t.add(a);
 24670                  s = this.compileTopDicts(e.fdArray, t.length, !0);
 24671                  o.setEntryLocation("FDArray", [t.length], t);
 24672                  t.add(s.output);
 24673                  const r = s.trackers;
 24674                  this.compilePrivateDicts(e.fdArray, r, t);
 24675                }
 24676                this.compilePrivateDicts([e.topDict], [o], t);
 24677                t.add([0]);
 24678                return t.data;
 24679              }
 24680              encodeNumber(e) {
 24681                return Number.isInteger(e)
 24682                  ? this.encodeInteger(e)
 24683                  : this.encodeFloat(e);
 24684              }
 24685              static get EncodeFloatRegExp() {
 24686                return (0, r.shadow)(
 24687                  this,
 24688                  "EncodeFloatRegExp",
 24689                  /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/,
 24690                );
 24691              }
 24692              encodeFloat(e) {
 24693                let t = e.toString();
 24694                const a = CFFCompiler.EncodeFloatRegExp.exec(t);
 24695                if (a) {
 24696                  const r = parseFloat("1e" + ((a[2] ? +a[2] : 0) + a[1].length));
 24697                  t = (Math.round(e * r) / r).toString();
 24698                }
 24699                let r,
 24700                  n,
 24701                  i = "";
 24702                for (r = 0, n = t.length; r < n; ++r) {
 24703                  const e = t[r];
 24704                  i +=
 24705                    "e" === e
 24706                      ? "-" === t[++r]
 24707                        ? "c"
 24708                        : "b"
 24709                      : "." === e
 24710                        ? "a"
 24711                        : "-" === e
 24712                          ? "e"
 24713                          : e;
 24714                }
 24715                i += 1 & i.length ? "f" : "ff";
 24716                const s = [30];
 24717                for (r = 0, n = i.length; r < n; r += 2)
 24718                  s.push(parseInt(i.substring(r, r + 2), 16));
 24719                return s;
 24720              }
 24721              encodeInteger(e) {
 24722                let t;
 24723                t =
 24724                  e >= -107 && e <= 107
 24725                    ? [e + 139]
 24726                    : e >= 108 && e <= 1131
 24727                      ? [247 + ((e -= 108) >> 8), 255 & e]
 24728                      : e >= -1131 && e <= -108
 24729                        ? [251 + ((e = -e - 108) >> 8), 255 & e]
 24730                        : e >= -32768 && e <= 32767
 24731                          ? [28, (e >> 8) & 255, 255 & e]
 24732                          : [
 24733                              29,
 24734                              (e >> 24) & 255,
 24735                              (e >> 16) & 255,
 24736                              (e >> 8) & 255,
 24737                              255 & e,
 24738                            ];
 24739                return t;
 24740              }
 24741              compileHeader(e) {
 24742                return [e.major, e.minor, 4, e.offSize];
 24743              }
 24744              compileNameIndex(e) {
 24745                const t = new CFFIndex();
 24746                for (const a of e) {
 24747                  const e = Math.min(a.length, 127);
 24748                  let n = new Array(e);
 24749                  for (let t = 0; t < e; t++) {
 24750                    let e = a[t];
 24751                    (e < "!" ||
 24752                      e > "~" ||
 24753                      "[" === e ||
 24754                      "]" === e ||
 24755                      "(" === e ||
 24756                      ")" === e ||
 24757                      "{" === e ||
 24758                      "}" === e ||
 24759                      "<" === e ||
 24760                      ">" === e ||
 24761                      "/" === e ||
 24762                      "%" === e) &&
 24763                      (e = "_");
 24764                    n[t] = e;
 24765                  }
 24766                  n = n.join("");
 24767                  "" === n && (n = "Bad_Font_Name");
 24768                  t.add((0, r.stringToBytes)(n));
 24769                }
 24770                return this.compileIndex(t);
 24771              }
 24772              compileTopDicts(e, t, a) {
 24773                const r = [];
 24774                let n = new CFFIndex();
 24775                for (const i of e) {
 24776                  if (a) {
 24777                    i.removeByName("CIDFontVersion");
 24778                    i.removeByName("CIDFontRevision");
 24779                    i.removeByName("CIDFontType");
 24780                    i.removeByName("CIDCount");
 24781                    i.removeByName("UIDBase");
 24782                  }
 24783                  const e = new CFFOffsetTracker(),
 24784                    s = this.compileDict(i, e);
 24785                  r.push(e);
 24786                  n.add(s);
 24787                  e.offset(t);
 24788                }
 24789                n = this.compileIndex(n, r);
 24790                return { trackers: r, output: n };
 24791              }
 24792              compilePrivateDicts(e, t, a) {
 24793                for (let n = 0, i = e.length; n < i; ++n) {
 24794                  const i = e[n],
 24795                    s = i.privateDict;
 24796                  if (!s || !i.hasName("Private"))
 24797                    throw new r.FormatError(
 24798                      "There must be a private dictionary.",
 24799                    );
 24800                  const o = new CFFOffsetTracker(),
 24801                    c = this.compileDict(s, o);
 24802                  let l = a.length;
 24803                  o.offset(l);
 24804                  c.length || (l = 0);
 24805                  t[n].setEntryLocation("Private", [c.length, l], a);
 24806                  a.add(c);
 24807                  if (s.subrsIndex && s.hasName("Subrs")) {
 24808                    const e = this.compileIndex(s.subrsIndex);
 24809                    o.setEntryLocation("Subrs", [c.length], a);
 24810                    a.add(e);
 24811                  }
 24812                }
 24813              }
 24814              compileDict(e, t) {
 24815                const a = [];
 24816                for (const n of e.order) {
 24817                  if (!(n in e.values)) continue;
 24818                  let i = e.values[n],
 24819                    s = e.types[n];
 24820                  Array.isArray(s) || (s = [s]);
 24821                  Array.isArray(i) || (i = [i]);
 24822                  if (0 !== i.length) {
 24823                    for (let o = 0, c = s.length; o < c; ++o) {
 24824                      const c = s[o],
 24825                        l = i[o];
 24826                      switch (c) {
 24827                        case "num":
 24828                        case "sid":
 24829                          a.push(...this.encodeNumber(l));
 24830                          break;
 24831                        case "offset":
 24832                          const s = e.keyToNameMap[n];
 24833                          t.isTracking(s) || t.track(s, a.length);
 24834                          a.push(29, 0, 0, 0, 0);
 24835                          break;
 24836                        case "array":
 24837                        case "delta":
 24838                          a.push(...this.encodeNumber(l));
 24839                          for (let e = 1, t = i.length; e < t; ++e)
 24840                            a.push(...this.encodeNumber(i[e]));
 24841                          break;
 24842                        default:
 24843                          throw new r.FormatError(`Unknown data type of ${c}`);
 24844                      }
 24845                    }
 24846                    a.push(...e.opcodes[n]);
 24847                  }
 24848                }
 24849                return a;
 24850              }
 24851              compileStringIndex(e) {
 24852                const t = new CFFIndex();
 24853                for (const a of e) t.add((0, r.stringToBytes)(a));
 24854                return this.compileIndex(t);
 24855              }
 24856              compileCharStrings(e) {
 24857                const t = new CFFIndex();
 24858                for (let a = 0; a < e.count; a++) {
 24859                  const r = e.get(a);
 24860                  0 !== r.length ? t.add(r) : t.add(new Uint8Array([139, 14]));
 24861                }
 24862                return this.compileIndex(t);
 24863              }
 24864              compileCharset(e, t, a, n) {
 24865                let i;
 24866                const s = t - 1;
 24867                if (n) i = new Uint8Array([2, 0, 0, (s >> 8) & 255, 255 & s]);
 24868                else {
 24869                  i = new Uint8Array(1 + 2 * s);
 24870                  i[0] = 0;
 24871                  let t = 0;
 24872                  const n = e.charset.length;
 24873                  let o = !1;
 24874                  for (let s = 1; s < i.length; s += 2) {
 24875                    let c = 0;
 24876                    if (t < n) {
 24877                      const n = e.charset[t++];
 24878                      c = a.getSID(n);
 24879                      if (-1 === c) {
 24880                        c = 0;
 24881                        if (!o) {
 24882                          o = !0;
 24883                          (0, r.warn)(`Couldn't find ${n} in CFF strings`);
 24884                        }
 24885                      }
 24886                    }
 24887                    i[s] = (c >> 8) & 255;
 24888                    i[s + 1] = 255 & c;
 24889                  }
 24890                }
 24891                return this.compileTypedArray(i);
 24892              }
 24893              compileEncoding(e) {
 24894                return this.compileTypedArray(e.raw);
 24895              }
 24896              compileFDSelect(e) {
 24897                const t = e.format;
 24898                let a, r;
 24899                switch (t) {
 24900                  case 0:
 24901                    a = new Uint8Array(1 + e.fdSelect.length);
 24902                    a[0] = t;
 24903                    for (r = 0; r < e.fdSelect.length; r++)
 24904                      a[r + 1] = e.fdSelect[r];
 24905                    break;
 24906                  case 3:
 24907                    const n = 0;
 24908                    let i = e.fdSelect[0];
 24909                    const s = [t, 0, 0, (n >> 8) & 255, 255 & n, i];
 24910                    for (r = 1; r < e.fdSelect.length; r++) {
 24911                      const t = e.fdSelect[r];
 24912                      if (t !== i) {
 24913                        s.push((r >> 8) & 255, 255 & r, t);
 24914                        i = t;
 24915                      }
 24916                    }
 24917                    const o = (s.length - 3) / 3;
 24918                    s[1] = (o >> 8) & 255;
 24919                    s[2] = 255 & o;
 24920                    s.push((r >> 8) & 255, 255 & r);
 24921                    a = new Uint8Array(s);
 24922                }
 24923                return this.compileTypedArray(a);
 24924              }
 24925              compileTypedArray(e) {
 24926                return Array.from(e);
 24927              }
 24928              compileIndex(e, t = []) {
 24929                const a = e.objects,
 24930                  r = a.length;
 24931                if (0 === r) return [0, 0];
 24932                const n = [(r >> 8) & 255, 255 & r];
 24933                let i,
 24934                  s,
 24935                  o = 1;
 24936                for (i = 0; i < r; ++i) o += a[i].length;
 24937                s = o < 256 ? 1 : o < 65536 ? 2 : o < 16777216 ? 3 : 4;
 24938                n.push(s);
 24939                let c = 1;
 24940                for (i = 0; i < r + 1; i++) {
 24941                  1 === s
 24942                    ? n.push(255 & c)
 24943                    : 2 === s
 24944                      ? n.push((c >> 8) & 255, 255 & c)
 24945                      : 3 === s
 24946                        ? n.push((c >> 16) & 255, (c >> 8) & 255, 255 & c)
 24947                        : n.push(
 24948                            (c >>> 24) & 255,
 24949                            (c >> 16) & 255,
 24950                            (c >> 8) & 255,
 24951                            255 & c,
 24952                          );
 24953                  a[i] && (c += a[i].length);
 24954                }
 24955                for (i = 0; i < r; i++) {
 24956                  t[i] && t[i].offset(n.length);
 24957                  n.push(...a[i]);
 24958                }
 24959                return n;
 24960              }
 24961            }
 24962            t.CFFCompiler = CFFCompiler;
 24963          },
 24964          (e, t) => {
 24965            Object.defineProperty(t, "__esModule", { value: !0 });
 24966            t.ISOAdobeCharset = t.ExpertSubsetCharset = t.ExpertCharset = void 0;
 24967            t.ISOAdobeCharset = [
 24968              ".notdef",
 24969              "space",
 24970              "exclam",
 24971              "quotedbl",
 24972              "numbersign",
 24973              "dollar",
 24974              "percent",
 24975              "ampersand",
 24976              "quoteright",
 24977              "parenleft",
 24978              "parenright",
 24979              "asterisk",
 24980              "plus",
 24981              "comma",
 24982              "hyphen",
 24983              "period",
 24984              "slash",
 24985              "zero",
 24986              "one",
 24987              "two",
 24988              "three",
 24989              "four",
 24990              "five",
 24991              "six",
 24992              "seven",
 24993              "eight",
 24994              "nine",
 24995              "colon",
 24996              "semicolon",
 24997              "less",
 24998              "equal",
 24999              "greater",
 25000              "question",
 25001              "at",
 25002              "A",
 25003              "B",
 25004              "C",
 25005              "D",
 25006              "E",
 25007              "F",
 25008              "G",
 25009              "H",
 25010              "I",
 25011              "J",
 25012              "K",
 25013              "L",
 25014              "M",
 25015              "N",
 25016              "O",
 25017              "P",
 25018              "Q",
 25019              "R",
 25020              "S",
 25021              "T",
 25022              "U",
 25023              "V",
 25024              "W",
 25025              "X",
 25026              "Y",
 25027              "Z",
 25028              "bracketleft",
 25029              "backslash",
 25030              "bracketright",
 25031              "asciicircum",
 25032              "underscore",
 25033              "quoteleft",
 25034              "a",
 25035              "b",
 25036              "c",
 25037              "d",
 25038              "e",
 25039              "f",
 25040              "g",
 25041              "h",
 25042              "i",
 25043              "j",
 25044              "k",
 25045              "l",
 25046              "m",
 25047              "n",
 25048              "o",
 25049              "p",
 25050              "q",
 25051              "r",
 25052              "s",
 25053              "t",
 25054              "u",
 25055              "v",
 25056              "w",
 25057              "x",
 25058              "y",
 25059              "z",
 25060              "braceleft",
 25061              "bar",
 25062              "braceright",
 25063              "asciitilde",
 25064              "exclamdown",
 25065              "cent",
 25066              "sterling",
 25067              "fraction",
 25068              "yen",
 25069              "florin",
 25070              "section",
 25071              "currency",
 25072              "quotesingle",
 25073              "quotedblleft",
 25074              "guillemotleft",
 25075              "guilsinglleft",
 25076              "guilsinglright",
 25077              "fi",
 25078              "fl",
 25079              "endash",
 25080              "dagger",
 25081              "daggerdbl",
 25082              "periodcentered",
 25083              "paragraph",
 25084              "bullet",
 25085              "quotesinglbase",
 25086              "quotedblbase",
 25087              "quotedblright",
 25088              "guillemotright",
 25089              "ellipsis",
 25090              "perthousand",
 25091              "questiondown",
 25092              "grave",
 25093              "acute",
 25094              "circumflex",
 25095              "tilde",
 25096              "macron",
 25097              "breve",
 25098              "dotaccent",
 25099              "dieresis",
 25100              "ring",
 25101              "cedilla",
 25102              "hungarumlaut",
 25103              "ogonek",
 25104              "caron",
 25105              "emdash",
 25106              "AE",
 25107              "ordfeminine",
 25108              "Lslash",
 25109              "Oslash",
 25110              "OE",
 25111              "ordmasculine",
 25112              "ae",
 25113              "dotlessi",
 25114              "lslash",
 25115              "oslash",
 25116              "oe",
 25117              "germandbls",
 25118              "onesuperior",
 25119              "logicalnot",
 25120              "mu",
 25121              "trademark",
 25122              "Eth",
 25123              "onehalf",
 25124              "plusminus",
 25125              "Thorn",
 25126              "onequarter",
 25127              "divide",
 25128              "brokenbar",
 25129              "degree",
 25130              "thorn",
 25131              "threequarters",
 25132              "twosuperior",
 25133              "registered",
 25134              "minus",
 25135              "eth",
 25136              "multiply",
 25137              "threesuperior",
 25138              "copyright",
 25139              "Aacute",
 25140              "Acircumflex",
 25141              "Adieresis",
 25142              "Agrave",
 25143              "Aring",
 25144              "Atilde",
 25145              "Ccedilla",
 25146              "Eacute",
 25147              "Ecircumflex",
 25148              "Edieresis",
 25149              "Egrave",
 25150              "Iacute",
 25151              "Icircumflex",
 25152              "Idieresis",
 25153              "Igrave",
 25154              "Ntilde",
 25155              "Oacute",
 25156              "Ocircumflex",
 25157              "Odieresis",
 25158              "Ograve",
 25159              "Otilde",
 25160              "Scaron",
 25161              "Uacute",
 25162              "Ucircumflex",
 25163              "Udieresis",
 25164              "Ugrave",
 25165              "Yacute",
 25166              "Ydieresis",
 25167              "Zcaron",
 25168              "aacute",
 25169              "acircumflex",
 25170              "adieresis",
 25171              "agrave",
 25172              "aring",
 25173              "atilde",
 25174              "ccedilla",
 25175              "eacute",
 25176              "ecircumflex",
 25177              "edieresis",
 25178              "egrave",
 25179              "iacute",
 25180              "icircumflex",
 25181              "idieresis",
 25182              "igrave",
 25183              "ntilde",
 25184              "oacute",
 25185              "ocircumflex",
 25186              "odieresis",
 25187              "ograve",
 25188              "otilde",
 25189              "scaron",
 25190              "uacute",
 25191              "ucircumflex",
 25192              "udieresis",
 25193              "ugrave",
 25194              "yacute",
 25195              "ydieresis",
 25196              "zcaron",
 25197            ];
 25198            t.ExpertCharset = [
 25199              ".notdef",
 25200              "space",
 25201              "exclamsmall",
 25202              "Hungarumlautsmall",
 25203              "dollaroldstyle",
 25204              "dollarsuperior",
 25205              "ampersandsmall",
 25206              "Acutesmall",
 25207              "parenleftsuperior",
 25208              "parenrightsuperior",
 25209              "twodotenleader",
 25210              "onedotenleader",
 25211              "comma",
 25212              "hyphen",
 25213              "period",
 25214              "fraction",
 25215              "zerooldstyle",
 25216              "oneoldstyle",
 25217              "twooldstyle",
 25218              "threeoldstyle",
 25219              "fouroldstyle",
 25220              "fiveoldstyle",
 25221              "sixoldstyle",
 25222              "sevenoldstyle",
 25223              "eightoldstyle",
 25224              "nineoldstyle",
 25225              "colon",
 25226              "semicolon",
 25227              "commasuperior",
 25228              "threequartersemdash",
 25229              "periodsuperior",
 25230              "questionsmall",
 25231              "asuperior",
 25232              "bsuperior",
 25233              "centsuperior",
 25234              "dsuperior",
 25235              "esuperior",
 25236              "isuperior",
 25237              "lsuperior",
 25238              "msuperior",
 25239              "nsuperior",
 25240              "osuperior",
 25241              "rsuperior",
 25242              "ssuperior",
 25243              "tsuperior",
 25244              "ff",
 25245              "fi",
 25246              "fl",
 25247              "ffi",
 25248              "ffl",
 25249              "parenleftinferior",
 25250              "parenrightinferior",
 25251              "Circumflexsmall",
 25252              "hyphensuperior",
 25253              "Gravesmall",
 25254              "Asmall",
 25255              "Bsmall",
 25256              "Csmall",
 25257              "Dsmall",
 25258              "Esmall",
 25259              "Fsmall",
 25260              "Gsmall",
 25261              "Hsmall",
 25262              "Ismall",
 25263              "Jsmall",
 25264              "Ksmall",
 25265              "Lsmall",
 25266              "Msmall",
 25267              "Nsmall",
 25268              "Osmall",
 25269              "Psmall",
 25270              "Qsmall",
 25271              "Rsmall",
 25272              "Ssmall",
 25273              "Tsmall",
 25274              "Usmall",
 25275              "Vsmall",
 25276              "Wsmall",
 25277              "Xsmall",
 25278              "Ysmall",
 25279              "Zsmall",
 25280              "colonmonetary",
 25281              "onefitted",
 25282              "rupiah",
 25283              "Tildesmall",
 25284              "exclamdownsmall",
 25285              "centoldstyle",
 25286              "Lslashsmall",
 25287              "Scaronsmall",
 25288              "Zcaronsmall",
 25289              "Dieresissmall",
 25290              "Brevesmall",
 25291              "Caronsmall",
 25292              "Dotaccentsmall",
 25293              "Macronsmall",
 25294              "figuredash",
 25295              "hypheninferior",
 25296              "Ogoneksmall",
 25297              "Ringsmall",
 25298              "Cedillasmall",
 25299              "onequarter",
 25300              "onehalf",
 25301              "threequarters",
 25302              "questiondownsmall",
 25303              "oneeighth",
 25304              "threeeighths",
 25305              "fiveeighths",
 25306              "seveneighths",
 25307              "onethird",
 25308              "twothirds",
 25309              "zerosuperior",
 25310              "onesuperior",
 25311              "twosuperior",
 25312              "threesuperior",
 25313              "foursuperior",
 25314              "fivesuperior",
 25315              "sixsuperior",
 25316              "sevensuperior",
 25317              "eightsuperior",
 25318              "ninesuperior",
 25319              "zeroinferior",
 25320              "oneinferior",
 25321              "twoinferior",
 25322              "threeinferior",
 25323              "fourinferior",
 25324              "fiveinferior",
 25325              "sixinferior",
 25326              "seveninferior",
 25327              "eightinferior",
 25328              "nineinferior",
 25329              "centinferior",
 25330              "dollarinferior",
 25331              "periodinferior",
 25332              "commainferior",
 25333              "Agravesmall",
 25334              "Aacutesmall",
 25335              "Acircumflexsmall",
 25336              "Atildesmall",
 25337              "Adieresissmall",
 25338              "Aringsmall",
 25339              "AEsmall",
 25340              "Ccedillasmall",
 25341              "Egravesmall",
 25342              "Eacutesmall",
 25343              "Ecircumflexsmall",
 25344              "Edieresissmall",
 25345              "Igravesmall",
 25346              "Iacutesmall",
 25347              "Icircumflexsmall",
 25348              "Idieresissmall",
 25349              "Ethsmall",
 25350              "Ntildesmall",
 25351              "Ogravesmall",
 25352              "Oacutesmall",
 25353              "Ocircumflexsmall",
 25354              "Otildesmall",
 25355              "Odieresissmall",
 25356              "OEsmall",
 25357              "Oslashsmall",
 25358              "Ugravesmall",
 25359              "Uacutesmall",
 25360              "Ucircumflexsmall",
 25361              "Udieresissmall",
 25362              "Yacutesmall",
 25363              "Thornsmall",
 25364              "Ydieresissmall",
 25365            ];
 25366            t.ExpertSubsetCharset = [
 25367              ".notdef",
 25368              "space",
 25369              "dollaroldstyle",
 25370              "dollarsuperior",
 25371              "parenleftsuperior",
 25372              "parenrightsuperior",
 25373              "twodotenleader",
 25374              "onedotenleader",
 25375              "comma",
 25376              "hyphen",
 25377              "period",
 25378              "fraction",
 25379              "zerooldstyle",
 25380              "oneoldstyle",
 25381              "twooldstyle",
 25382              "threeoldstyle",
 25383              "fouroldstyle",
 25384              "fiveoldstyle",
 25385              "sixoldstyle",
 25386              "sevenoldstyle",
 25387              "eightoldstyle",
 25388              "nineoldstyle",
 25389              "colon",
 25390              "semicolon",
 25391              "commasuperior",
 25392              "threequartersemdash",
 25393              "periodsuperior",
 25394              "asuperior",
 25395              "bsuperior",
 25396              "centsuperior",
 25397              "dsuperior",
 25398              "esuperior",
 25399              "isuperior",
 25400              "lsuperior",
 25401              "msuperior",
 25402              "nsuperior",
 25403              "osuperior",
 25404              "rsuperior",
 25405              "ssuperior",
 25406              "tsuperior",
 25407              "ff",
 25408              "fi",
 25409              "fl",
 25410              "ffi",
 25411              "ffl",
 25412              "parenleftinferior",
 25413              "parenrightinferior",
 25414              "hyphensuperior",
 25415              "colonmonetary",
 25416              "onefitted",
 25417              "rupiah",
 25418              "centoldstyle",
 25419              "figuredash",
 25420              "hypheninferior",
 25421              "onequarter",
 25422              "onehalf",
 25423              "threequarters",
 25424              "oneeighth",
 25425              "threeeighths",
 25426              "fiveeighths",
 25427              "seveneighths",
 25428              "onethird",
 25429              "twothirds",
 25430              "zerosuperior",
 25431              "onesuperior",
 25432              "twosuperior",
 25433              "threesuperior",
 25434              "foursuperior",
 25435              "fivesuperior",
 25436              "sixsuperior",
 25437              "sevensuperior",
 25438              "eightsuperior",
 25439              "ninesuperior",
 25440              "zeroinferior",
 25441              "oneinferior",
 25442              "twoinferior",
 25443              "threeinferior",
 25444              "fourinferior",
 25445              "fiveinferior",
 25446              "sixinferior",
 25447              "seveninferior",
 25448              "eightinferior",
 25449              "nineinferior",
 25450              "centinferior",
 25451              "dollarinferior",
 25452              "periodinferior",
 25453              "commainferior",
 25454            ];
 25455          },
 25456          (e, t) => {
 25457            Object.defineProperty(t, "__esModule", { value: !0 });
 25458            t.ZapfDingbatsEncoding =
 25459              t.WinAnsiEncoding =
 25460              t.SymbolSetEncoding =
 25461              t.StandardEncoding =
 25462              t.MacRomanEncoding =
 25463              t.ExpertEncoding =
 25464                void 0;
 25465            t.getEncoding = function getEncoding(e) {
 25466              switch (e) {
 25467                case "WinAnsiEncoding":
 25468                  return s;
 25469                case "StandardEncoding":
 25470                  return i;
 25471                case "MacRomanEncoding":
 25472                  return n;
 25473                case "SymbolSetEncoding":
 25474                  return o;
 25475                case "ZapfDingbatsEncoding":
 25476                  return c;
 25477                case "ExpertEncoding":
 25478                  return a;
 25479                case "MacExpertEncoding":
 25480                  return r;
 25481                default:
 25482                  return null;
 25483              }
 25484            };
 25485            const a = [
 25486              "",
 25487              "",
 25488              "",
 25489              "",
 25490              "",
 25491              "",
 25492              "",
 25493              "",
 25494              "",
 25495              "",
 25496              "",
 25497              "",
 25498              "",
 25499              "",
 25500              "",
 25501              "",
 25502              "",
 25503              "",
 25504              "",
 25505              "",
 25506              "",
 25507              "",
 25508              "",
 25509              "",
 25510              "",
 25511              "",
 25512              "",
 25513              "",
 25514              "",
 25515              "",
 25516              "",
 25517              "",
 25518              "space",
 25519              "exclamsmall",
 25520              "Hungarumlautsmall",
 25521              "",
 25522              "dollaroldstyle",
 25523              "dollarsuperior",
 25524              "ampersandsmall",
 25525              "Acutesmall",
 25526              "parenleftsuperior",
 25527              "parenrightsuperior",
 25528              "twodotenleader",
 25529              "onedotenleader",
 25530              "comma",
 25531              "hyphen",
 25532              "period",
 25533              "fraction",
 25534              "zerooldstyle",
 25535              "oneoldstyle",
 25536              "twooldstyle",
 25537              "threeoldstyle",
 25538              "fouroldstyle",
 25539              "fiveoldstyle",
 25540              "sixoldstyle",
 25541              "sevenoldstyle",
 25542              "eightoldstyle",
 25543              "nineoldstyle",
 25544              "colon",
 25545              "semicolon",
 25546              "commasuperior",
 25547              "threequartersemdash",
 25548              "periodsuperior",
 25549              "questionsmall",
 25550              "",
 25551              "asuperior",
 25552              "bsuperior",
 25553              "centsuperior",
 25554              "dsuperior",
 25555              "esuperior",
 25556              "",
 25557              "",
 25558              "",
 25559              "isuperior",
 25560              "",
 25561              "",
 25562              "lsuperior",
 25563              "msuperior",
 25564              "nsuperior",
 25565              "osuperior",
 25566              "",
 25567              "",
 25568              "rsuperior",
 25569              "ssuperior",
 25570              "tsuperior",
 25571              "",
 25572              "ff",
 25573              "fi",
 25574              "fl",
 25575              "ffi",
 25576              "ffl",
 25577              "parenleftinferior",
 25578              "",
 25579              "parenrightinferior",
 25580              "Circumflexsmall",
 25581              "hyphensuperior",
 25582              "Gravesmall",
 25583              "Asmall",
 25584              "Bsmall",
 25585              "Csmall",
 25586              "Dsmall",
 25587              "Esmall",
 25588              "Fsmall",
 25589              "Gsmall",
 25590              "Hsmall",
 25591              "Ismall",
 25592              "Jsmall",
 25593              "Ksmall",
 25594              "Lsmall",
 25595              "Msmall",
 25596              "Nsmall",
 25597              "Osmall",
 25598              "Psmall",
 25599              "Qsmall",
 25600              "Rsmall",
 25601              "Ssmall",
 25602              "Tsmall",
 25603              "Usmall",
 25604              "Vsmall",
 25605              "Wsmall",
 25606              "Xsmall",
 25607              "Ysmall",
 25608              "Zsmall",
 25609              "colonmonetary",
 25610              "onefitted",
 25611              "rupiah",
 25612              "Tildesmall",
 25613              "",
 25614              "",
 25615              "",
 25616              "",
 25617              "",
 25618              "",
 25619              "",
 25620              "",
 25621              "",
 25622              "",
 25623              "",
 25624              "",
 25625              "",
 25626              "",
 25627              "",
 25628              "",
 25629              "",
 25630              "",
 25631              "",
 25632              "",
 25633              "",
 25634              "",
 25635              "",
 25636              "",
 25637              "",
 25638              "",
 25639              "",
 25640              "",
 25641              "",
 25642              "",
 25643              "",
 25644              "",
 25645              "",
 25646              "",
 25647              "exclamdownsmall",
 25648              "centoldstyle",
 25649              "Lslashsmall",
 25650              "",
 25651              "",
 25652              "Scaronsmall",
 25653              "Zcaronsmall",
 25654              "Dieresissmall",
 25655              "Brevesmall",
 25656              "Caronsmall",
 25657              "",
 25658              "Dotaccentsmall",
 25659              "",
 25660              "",
 25661              "Macronsmall",
 25662              "",
 25663              "",
 25664              "figuredash",
 25665              "hypheninferior",
 25666              "",
 25667              "",
 25668              "Ogoneksmall",
 25669              "Ringsmall",
 25670              "Cedillasmall",
 25671              "",
 25672              "",
 25673              "",
 25674              "onequarter",
 25675              "onehalf",
 25676              "threequarters",
 25677              "questiondownsmall",
 25678              "oneeighth",
 25679              "threeeighths",
 25680              "fiveeighths",
 25681              "seveneighths",
 25682              "onethird",
 25683              "twothirds",
 25684              "",
 25685              "",
 25686              "zerosuperior",
 25687              "onesuperior",
 25688              "twosuperior",
 25689              "threesuperior",
 25690              "foursuperior",
 25691              "fivesuperior",
 25692              "sixsuperior",
 25693              "sevensuperior",
 25694              "eightsuperior",
 25695              "ninesuperior",
 25696              "zeroinferior",
 25697              "oneinferior",
 25698              "twoinferior",
 25699              "threeinferior",
 25700              "fourinferior",
 25701              "fiveinferior",
 25702              "sixinferior",
 25703              "seveninferior",
 25704              "eightinferior",
 25705              "nineinferior",
 25706              "centinferior",
 25707              "dollarinferior",
 25708              "periodinferior",
 25709              "commainferior",
 25710              "Agravesmall",
 25711              "Aacutesmall",
 25712              "Acircumflexsmall",
 25713              "Atildesmall",
 25714              "Adieresissmall",
 25715              "Aringsmall",
 25716              "AEsmall",
 25717              "Ccedillasmall",
 25718              "Egravesmall",
 25719              "Eacutesmall",
 25720              "Ecircumflexsmall",
 25721              "Edieresissmall",
 25722              "Igravesmall",
 25723              "Iacutesmall",
 25724              "Icircumflexsmall",
 25725              "Idieresissmall",
 25726              "Ethsmall",
 25727              "Ntildesmall",
 25728              "Ogravesmall",
 25729              "Oacutesmall",
 25730              "Ocircumflexsmall",
 25731              "Otildesmall",
 25732              "Odieresissmall",
 25733              "OEsmall",
 25734              "Oslashsmall",
 25735              "Ugravesmall",
 25736              "Uacutesmall",
 25737              "Ucircumflexsmall",
 25738              "Udieresissmall",
 25739              "Yacutesmall",
 25740              "Thornsmall",
 25741              "Ydieresissmall",
 25742            ];
 25743            t.ExpertEncoding = a;
 25744            const r = [
 25745                "",
 25746                "",
 25747                "",
 25748                "",
 25749                "",
 25750                "",
 25751                "",
 25752                "",
 25753                "",
 25754                "",
 25755                "",
 25756                "",
 25757                "",
 25758                "",
 25759                "",
 25760                "",
 25761                "",
 25762                "",
 25763                "",
 25764                "",
 25765                "",
 25766                "",
 25767                "",
 25768                "",
 25769                "",
 25770                "",
 25771                "",
 25772                "",
 25773                "",
 25774                "",
 25775                "",
 25776                "",
 25777                "space",
 25778                "exclamsmall",
 25779                "Hungarumlautsmall",
 25780                "centoldstyle",
 25781                "dollaroldstyle",
 25782                "dollarsuperior",
 25783                "ampersandsmall",
 25784                "Acutesmall",
 25785                "parenleftsuperior",
 25786                "parenrightsuperior",
 25787                "twodotenleader",
 25788                "onedotenleader",
 25789                "comma",
 25790                "hyphen",
 25791                "period",
 25792                "fraction",
 25793                "zerooldstyle",
 25794                "oneoldstyle",
 25795                "twooldstyle",
 25796                "threeoldstyle",
 25797                "fouroldstyle",
 25798                "fiveoldstyle",
 25799                "sixoldstyle",
 25800                "sevenoldstyle",
 25801                "eightoldstyle",
 25802                "nineoldstyle",
 25803                "colon",
 25804                "semicolon",
 25805                "",
 25806                "threequartersemdash",
 25807                "",
 25808                "questionsmall",
 25809                "",
 25810                "",
 25811                "",
 25812                "",
 25813                "Ethsmall",
 25814                "",
 25815                "",
 25816                "onequarter",
 25817                "onehalf",
 25818                "threequarters",
 25819                "oneeighth",
 25820                "threeeighths",
 25821                "fiveeighths",
 25822                "seveneighths",
 25823                "onethird",
 25824                "twothirds",
 25825                "",
 25826                "",
 25827                "",
 25828                "",
 25829                "",
 25830                "",
 25831                "ff",
 25832                "fi",
 25833                "fl",
 25834                "ffi",
 25835                "ffl",
 25836                "parenleftinferior",
 25837                "",
 25838                "parenrightinferior",
 25839                "Circumflexsmall",
 25840                "hypheninferior",
 25841                "Gravesmall",
 25842                "Asmall",
 25843                "Bsmall",
 25844                "Csmall",
 25845                "Dsmall",
 25846                "Esmall",
 25847                "Fsmall",
 25848                "Gsmall",
 25849                "Hsmall",
 25850                "Ismall",
 25851                "Jsmall",
 25852                "Ksmall",
 25853                "Lsmall",
 25854                "Msmall",
 25855                "Nsmall",
 25856                "Osmall",
 25857                "Psmall",
 25858                "Qsmall",
 25859                "Rsmall",
 25860                "Ssmall",
 25861                "Tsmall",
 25862                "Usmall",
 25863                "Vsmall",
 25864                "Wsmall",
 25865                "Xsmall",
 25866                "Ysmall",
 25867                "Zsmall",
 25868                "colonmonetary",
 25869                "onefitted",
 25870                "rupiah",
 25871                "Tildesmall",
 25872                "",
 25873                "",
 25874                "asuperior",
 25875                "centsuperior",
 25876                "",
 25877                "",
 25878                "",
 25879                "",
 25880                "Aacutesmall",
 25881                "Agravesmall",
 25882                "Acircumflexsmall",
 25883                "Adieresissmall",
 25884                "Atildesmall",
 25885                "Aringsmall",
 25886                "Ccedillasmall",
 25887                "Eacutesmall",
 25888                "Egravesmall",
 25889                "Ecircumflexsmall",
 25890                "Edieresissmall",
 25891                "Iacutesmall",
 25892                "Igravesmall",
 25893                "Icircumflexsmall",
 25894                "Idieresissmall",
 25895                "Ntildesmall",
 25896                "Oacutesmall",
 25897                "Ogravesmall",
 25898                "Ocircumflexsmall",
 25899                "Odieresissmall",
 25900                "Otildesmall",
 25901                "Uacutesmall",
 25902                "Ugravesmall",
 25903                "Ucircumflexsmall",
 25904                "Udieresissmall",
 25905                "",
 25906                "eightsuperior",
 25907                "fourinferior",
 25908                "threeinferior",
 25909                "sixinferior",
 25910                "eightinferior",
 25911                "seveninferior",
 25912                "Scaronsmall",
 25913                "",
 25914                "centinferior",
 25915                "twoinferior",
 25916                "",
 25917                "Dieresissmall",
 25918                "",
 25919                "Caronsmall",
 25920                "osuperior",
 25921                "fiveinferior",
 25922                "",
 25923                "commainferior",
 25924                "periodinferior",
 25925                "Yacutesmall",
 25926                "",
 25927                "dollarinferior",
 25928                "",
 25929                "",
 25930                "Thornsmall",
 25931                "",
 25932                "nineinferior",
 25933                "zeroinferior",
 25934                "Zcaronsmall",
 25935                "AEsmall",
 25936                "Oslashsmall",
 25937                "questiondownsmall",
 25938                "oneinferior",
 25939                "Lslashsmall",
 25940                "",
 25941                "",
 25942                "",
 25943                "",
 25944                "",
 25945                "",
 25946                "Cedillasmall",
 25947                "",
 25948                "",
 25949                "",
 25950                "",
 25951                "",
 25952                "OEsmall",
 25953                "figuredash",
 25954                "hyphensuperior",
 25955                "",
 25956                "",
 25957                "",
 25958                "",
 25959                "exclamdownsmall",
 25960                "",
 25961                "Ydieresissmall",
 25962                "",
 25963                "onesuperior",
 25964                "twosuperior",
 25965                "threesuperior",
 25966                "foursuperior",
 25967                "fivesuperior",
 25968                "sixsuperior",
 25969                "sevensuperior",
 25970                "ninesuperior",
 25971                "zerosuperior",
 25972                "",
 25973                "esuperior",
 25974                "rsuperior",
 25975                "tsuperior",
 25976                "",
 25977                "",
 25978                "isuperior",
 25979                "ssuperior",
 25980                "dsuperior",
 25981                "",
 25982                "",
 25983                "",
 25984                "",
 25985                "",
 25986                "lsuperior",
 25987                "Ogoneksmall",
 25988                "Brevesmall",
 25989                "Macronsmall",
 25990                "bsuperior",
 25991                "nsuperior",
 25992                "msuperior",
 25993                "commasuperior",
 25994                "periodsuperior",
 25995                "Dotaccentsmall",
 25996                "Ringsmall",
 25997                "",
 25998                "",
 25999                "",
 26000                "",
 26001              ],
 26002              n = [
 26003                "",
 26004                "",
 26005                "",
 26006                "",
 26007                "",
 26008                "",
 26009                "",
 26010                "",
 26011                "",
 26012                "",
 26013                "",
 26014                "",
 26015                "",
 26016                "",
 26017                "",
 26018                "",
 26019                "",
 26020                "",
 26021                "",
 26022                "",
 26023                "",
 26024                "",
 26025                "",
 26026                "",
 26027                "",
 26028                "",
 26029                "",
 26030                "",
 26031                "",
 26032                "",
 26033                "",
 26034                "",
 26035                "space",
 26036                "exclam",
 26037                "quotedbl",
 26038                "numbersign",
 26039                "dollar",
 26040                "percent",
 26041                "ampersand",
 26042                "quotesingle",
 26043                "parenleft",
 26044                "parenright",
 26045                "asterisk",
 26046                "plus",
 26047                "comma",
 26048                "hyphen",
 26049                "period",
 26050                "slash",
 26051                "zero",
 26052                "one",
 26053                "two",
 26054                "three",
 26055                "four",
 26056                "five",
 26057                "six",
 26058                "seven",
 26059                "eight",
 26060                "nine",
 26061                "colon",
 26062                "semicolon",
 26063                "less",
 26064                "equal",
 26065                "greater",
 26066                "question",
 26067                "at",
 26068                "A",
 26069                "B",
 26070                "C",
 26071                "D",
 26072                "E",
 26073                "F",
 26074                "G",
 26075                "H",
 26076                "I",
 26077                "J",
 26078                "K",
 26079                "L",
 26080                "M",
 26081                "N",
 26082                "O",
 26083                "P",
 26084                "Q",
 26085                "R",
 26086                "S",
 26087                "T",
 26088                "U",
 26089                "V",
 26090                "W",
 26091                "X",
 26092                "Y",
 26093                "Z",
 26094                "bracketleft",
 26095                "backslash",
 26096                "bracketright",
 26097                "asciicircum",
 26098                "underscore",
 26099                "grave",
 26100                "a",
 26101                "b",
 26102                "c",
 26103                "d",
 26104                "e",
 26105                "f",
 26106                "g",
 26107                "h",
 26108                "i",
 26109                "j",
 26110                "k",
 26111                "l",
 26112                "m",
 26113                "n",
 26114                "o",
 26115                "p",
 26116                "q",
 26117                "r",
 26118                "s",
 26119                "t",
 26120                "u",
 26121                "v",
 26122                "w",
 26123                "x",
 26124                "y",
 26125                "z",
 26126                "braceleft",
 26127                "bar",
 26128                "braceright",
 26129                "asciitilde",
 26130                "",
 26131                "Adieresis",
 26132                "Aring",
 26133                "Ccedilla",
 26134                "Eacute",
 26135                "Ntilde",
 26136                "Odieresis",
 26137                "Udieresis",
 26138                "aacute",
 26139                "agrave",
 26140                "acircumflex",
 26141                "adieresis",
 26142                "atilde",
 26143                "aring",
 26144                "ccedilla",
 26145                "eacute",
 26146                "egrave",
 26147                "ecircumflex",
 26148                "edieresis",
 26149                "iacute",
 26150                "igrave",
 26151                "icircumflex",
 26152                "idieresis",
 26153                "ntilde",
 26154                "oacute",
 26155                "ograve",
 26156                "ocircumflex",
 26157                "odieresis",
 26158                "otilde",
 26159                "uacute",
 26160                "ugrave",
 26161                "ucircumflex",
 26162                "udieresis",
 26163                "dagger",
 26164                "degree",
 26165                "cent",
 26166                "sterling",
 26167                "section",
 26168                "bullet",
 26169                "paragraph",
 26170                "germandbls",
 26171                "registered",
 26172                "copyright",
 26173                "trademark",
 26174                "acute",
 26175                "dieresis",
 26176                "notequal",
 26177                "AE",
 26178                "Oslash",
 26179                "infinity",
 26180                "plusminus",
 26181                "lessequal",
 26182                "greaterequal",
 26183                "yen",
 26184                "mu",
 26185                "partialdiff",
 26186                "summation",
 26187                "product",
 26188                "pi",
 26189                "integral",
 26190                "ordfeminine",
 26191                "ordmasculine",
 26192                "Omega",
 26193                "ae",
 26194                "oslash",
 26195                "questiondown",
 26196                "exclamdown",
 26197                "logicalnot",
 26198                "radical",
 26199                "florin",
 26200                "approxequal",
 26201                "Delta",
 26202                "guillemotleft",
 26203                "guillemotright",
 26204                "ellipsis",
 26205                "space",
 26206                "Agrave",
 26207                "Atilde",
 26208                "Otilde",
 26209                "OE",
 26210                "oe",
 26211                "endash",
 26212                "emdash",
 26213                "quotedblleft",
 26214                "quotedblright",
 26215                "quoteleft",
 26216                "quoteright",
 26217                "divide",
 26218                "lozenge",
 26219                "ydieresis",
 26220                "Ydieresis",
 26221                "fraction",
 26222                "currency",
 26223                "guilsinglleft",
 26224                "guilsinglright",
 26225                "fi",
 26226                "fl",
 26227                "daggerdbl",
 26228                "periodcentered",
 26229                "quotesinglbase",
 26230                "quotedblbase",
 26231                "perthousand",
 26232                "Acircumflex",
 26233                "Ecircumflex",
 26234                "Aacute",
 26235                "Edieresis",
 26236                "Egrave",
 26237                "Iacute",
 26238                "Icircumflex",
 26239                "Idieresis",
 26240                "Igrave",
 26241                "Oacute",
 26242                "Ocircumflex",
 26243                "apple",
 26244                "Ograve",
 26245                "Uacute",
 26246                "Ucircumflex",
 26247                "Ugrave",
 26248                "dotlessi",
 26249                "circumflex",
 26250                "tilde",
 26251                "macron",
 26252                "breve",
 26253                "dotaccent",
 26254                "ring",
 26255                "cedilla",
 26256                "hungarumlaut",
 26257                "ogonek",
 26258                "caron",
 26259              ];
 26260            t.MacRomanEncoding = n;
 26261            const i = [
 26262              "",
 26263              "",
 26264              "",
 26265              "",
 26266              "",
 26267              "",
 26268              "",
 26269              "",
 26270              "",
 26271              "",
 26272              "",
 26273              "",
 26274              "",
 26275              "",
 26276              "",
 26277              "",
 26278              "",
 26279              "",
 26280              "",
 26281              "",
 26282              "",
 26283              "",
 26284              "",
 26285              "",
 26286              "",
 26287              "",
 26288              "",
 26289              "",
 26290              "",
 26291              "",
 26292              "",
 26293              "",
 26294              "space",
 26295              "exclam",
 26296              "quotedbl",
 26297              "numbersign",
 26298              "dollar",
 26299              "percent",
 26300              "ampersand",
 26301              "quoteright",
 26302              "parenleft",
 26303              "parenright",
 26304              "asterisk",
 26305              "plus",
 26306              "comma",
 26307              "hyphen",
 26308              "period",
 26309              "slash",
 26310              "zero",
 26311              "one",
 26312              "two",
 26313              "three",
 26314              "four",
 26315              "five",
 26316              "six",
 26317              "seven",
 26318              "eight",
 26319              "nine",
 26320              "colon",
 26321              "semicolon",
 26322              "less",
 26323              "equal",
 26324              "greater",
 26325              "question",
 26326              "at",
 26327              "A",
 26328              "B",
 26329              "C",
 26330              "D",
 26331              "E",
 26332              "F",
 26333              "G",
 26334              "H",
 26335              "I",
 26336              "J",
 26337              "K",
 26338              "L",
 26339              "M",
 26340              "N",
 26341              "O",
 26342              "P",
 26343              "Q",
 26344              "R",
 26345              "S",
 26346              "T",
 26347              "U",
 26348              "V",
 26349              "W",
 26350              "X",
 26351              "Y",
 26352              "Z",
 26353              "bracketleft",
 26354              "backslash",
 26355              "bracketright",
 26356              "asciicircum",
 26357              "underscore",
 26358              "quoteleft",
 26359              "a",
 26360              "b",
 26361              "c",
 26362              "d",
 26363              "e",
 26364              "f",
 26365              "g",
 26366              "h",
 26367              "i",
 26368              "j",
 26369              "k",
 26370              "l",
 26371              "m",
 26372              "n",
 26373              "o",
 26374              "p",
 26375              "q",
 26376              "r",
 26377              "s",
 26378              "t",
 26379              "u",
 26380              "v",
 26381              "w",
 26382              "x",
 26383              "y",
 26384              "z",
 26385              "braceleft",
 26386              "bar",
 26387              "braceright",
 26388              "asciitilde",
 26389              "",
 26390              "",
 26391              "",
 26392              "",
 26393              "",
 26394              "",
 26395              "",
 26396              "",
 26397              "",
 26398              "",
 26399              "",
 26400              "",
 26401              "",
 26402              "",
 26403              "",
 26404              "",
 26405              "",
 26406              "",
 26407              "",
 26408              "",
 26409              "",
 26410              "",
 26411              "",
 26412              "",
 26413              "",
 26414              "",
 26415              "",
 26416              "",
 26417              "",
 26418              "",
 26419              "",
 26420              "",
 26421              "",
 26422              "",
 26423              "exclamdown",
 26424              "cent",
 26425              "sterling",
 26426              "fraction",
 26427              "yen",
 26428              "florin",
 26429              "section",
 26430              "currency",
 26431              "quotesingle",
 26432              "quotedblleft",
 26433              "guillemotleft",
 26434              "guilsinglleft",
 26435              "guilsinglright",
 26436              "fi",
 26437              "fl",
 26438              "",
 26439              "endash",
 26440              "dagger",
 26441              "daggerdbl",
 26442              "periodcentered",
 26443              "",
 26444              "paragraph",
 26445              "bullet",
 26446              "quotesinglbase",
 26447              "quotedblbase",
 26448              "quotedblright",
 26449              "guillemotright",
 26450              "ellipsis",
 26451              "perthousand",
 26452              "",
 26453              "questiondown",
 26454              "",
 26455              "grave",
 26456              "acute",
 26457              "circumflex",
 26458              "tilde",
 26459              "macron",
 26460              "breve",
 26461              "dotaccent",
 26462              "dieresis",
 26463              "",
 26464              "ring",
 26465              "cedilla",
 26466              "",
 26467              "hungarumlaut",
 26468              "ogonek",
 26469              "caron",
 26470              "emdash",
 26471              "",
 26472              "",
 26473              "",
 26474              "",
 26475              "",
 26476              "",
 26477              "",
 26478              "",
 26479              "",
 26480              "",
 26481              "",
 26482              "",
 26483              "",
 26484              "",
 26485              "",
 26486              "",
 26487              "AE",
 26488              "",
 26489              "ordfeminine",
 26490              "",
 26491              "",
 26492              "",
 26493              "",
 26494              "Lslash",
 26495              "Oslash",
 26496              "OE",
 26497              "ordmasculine",
 26498              "",
 26499              "",
 26500              "",
 26501              "",
 26502              "",
 26503              "ae",
 26504              "",
 26505              "",
 26506              "",
 26507              "dotlessi",
 26508              "",
 26509              "",
 26510              "lslash",
 26511              "oslash",
 26512              "oe",
 26513              "germandbls",
 26514              "",
 26515              "",
 26516              "",
 26517              "",
 26518            ];
 26519            t.StandardEncoding = i;
 26520            const s = [
 26521              "",
 26522              "",
 26523              "",
 26524              "",
 26525              "",
 26526              "",
 26527              "",
 26528              "",
 26529              "",
 26530              "",
 26531              "",
 26532              "",
 26533              "",
 26534              "",
 26535              "",
 26536              "",
 26537              "",
 26538              "",
 26539              "",
 26540              "",
 26541              "",
 26542              "",
 26543              "",
 26544              "",
 26545              "",
 26546              "",
 26547              "",
 26548              "",
 26549              "",
 26550              "",
 26551              "",
 26552              "",
 26553              "space",
 26554              "exclam",
 26555              "quotedbl",
 26556              "numbersign",
 26557              "dollar",
 26558              "percent",
 26559              "ampersand",
 26560              "quotesingle",
 26561              "parenleft",
 26562              "parenright",
 26563              "asterisk",
 26564              "plus",
 26565              "comma",
 26566              "hyphen",
 26567              "period",
 26568              "slash",
 26569              "zero",
 26570              "one",
 26571              "two",
 26572              "three",
 26573              "four",
 26574              "five",
 26575              "six",
 26576              "seven",
 26577              "eight",
 26578              "nine",
 26579              "colon",
 26580              "semicolon",
 26581              "less",
 26582              "equal",
 26583              "greater",
 26584              "question",
 26585              "at",
 26586              "A",
 26587              "B",
 26588              "C",
 26589              "D",
 26590              "E",
 26591              "F",
 26592              "G",
 26593              "H",
 26594              "I",
 26595              "J",
 26596              "K",
 26597              "L",
 26598              "M",
 26599              "N",
 26600              "O",
 26601              "P",
 26602              "Q",
 26603              "R",
 26604              "S",
 26605              "T",
 26606              "U",
 26607              "V",
 26608              "W",
 26609              "X",
 26610              "Y",
 26611              "Z",
 26612              "bracketleft",
 26613              "backslash",
 26614              "bracketright",
 26615              "asciicircum",
 26616              "underscore",
 26617              "grave",
 26618              "a",
 26619              "b",
 26620              "c",
 26621              "d",
 26622              "e",
 26623              "f",
 26624              "g",
 26625              "h",
 26626              "i",
 26627              "j",
 26628              "k",
 26629              "l",
 26630              "m",
 26631              "n",
 26632              "o",
 26633              "p",
 26634              "q",
 26635              "r",
 26636              "s",
 26637              "t",
 26638              "u",
 26639              "v",
 26640              "w",
 26641              "x",
 26642              "y",
 26643              "z",
 26644              "braceleft",
 26645              "bar",
 26646              "braceright",
 26647              "asciitilde",
 26648              "bullet",
 26649              "Euro",
 26650              "bullet",
 26651              "quotesinglbase",
 26652              "florin",
 26653              "quotedblbase",
 26654              "ellipsis",
 26655              "dagger",
 26656              "daggerdbl",
 26657              "circumflex",
 26658              "perthousand",
 26659              "Scaron",
 26660              "guilsinglleft",
 26661              "OE",
 26662              "bullet",
 26663              "Zcaron",
 26664              "bullet",
 26665              "bullet",
 26666              "quoteleft",
 26667              "quoteright",
 26668              "quotedblleft",
 26669              "quotedblright",
 26670              "bullet",
 26671              "endash",
 26672              "emdash",
 26673              "tilde",
 26674              "trademark",
 26675              "scaron",
 26676              "guilsinglright",
 26677              "oe",
 26678              "bullet",
 26679              "zcaron",
 26680              "Ydieresis",
 26681              "space",
 26682              "exclamdown",
 26683              "cent",
 26684              "sterling",
 26685              "currency",
 26686              "yen",
 26687              "brokenbar",
 26688              "section",
 26689              "dieresis",
 26690              "copyright",
 26691              "ordfeminine",
 26692              "guillemotleft",
 26693              "logicalnot",
 26694              "hyphen",
 26695              "registered",
 26696              "macron",
 26697              "degree",
 26698              "plusminus",
 26699              "twosuperior",
 26700              "threesuperior",
 26701              "acute",
 26702              "mu",
 26703              "paragraph",
 26704              "periodcentered",
 26705              "cedilla",
 26706              "onesuperior",
 26707              "ordmasculine",
 26708              "guillemotright",
 26709              "onequarter",
 26710              "onehalf",
 26711              "threequarters",
 26712              "questiondown",
 26713              "Agrave",
 26714              "Aacute",
 26715              "Acircumflex",
 26716              "Atilde",
 26717              "Adieresis",
 26718              "Aring",
 26719              "AE",
 26720              "Ccedilla",
 26721              "Egrave",
 26722              "Eacute",
 26723              "Ecircumflex",
 26724              "Edieresis",
 26725              "Igrave",
 26726              "Iacute",
 26727              "Icircumflex",
 26728              "Idieresis",
 26729              "Eth",
 26730              "Ntilde",
 26731              "Ograve",
 26732              "Oacute",
 26733              "Ocircumflex",
 26734              "Otilde",
 26735              "Odieresis",
 26736              "multiply",
 26737              "Oslash",
 26738              "Ugrave",
 26739              "Uacute",
 26740              "Ucircumflex",
 26741              "Udieresis",
 26742              "Yacute",
 26743              "Thorn",
 26744              "germandbls",
 26745              "agrave",
 26746              "aacute",
 26747              "acircumflex",
 26748              "atilde",
 26749              "adieresis",
 26750              "aring",
 26751              "ae",
 26752              "ccedilla",
 26753              "egrave",
 26754              "eacute",
 26755              "ecircumflex",
 26756              "edieresis",
 26757              "igrave",
 26758              "iacute",
 26759              "icircumflex",
 26760              "idieresis",
 26761              "eth",
 26762              "ntilde",
 26763              "ograve",
 26764              "oacute",
 26765              "ocircumflex",
 26766              "otilde",
 26767              "odieresis",
 26768              "divide",
 26769              "oslash",
 26770              "ugrave",
 26771              "uacute",
 26772              "ucircumflex",
 26773              "udieresis",
 26774              "yacute",
 26775              "thorn",
 26776              "ydieresis",
 26777            ];
 26778            t.WinAnsiEncoding = s;
 26779            const o = [
 26780              "",
 26781              "",
 26782              "",
 26783              "",
 26784              "",
 26785              "",
 26786              "",
 26787              "",
 26788              "",
 26789              "",
 26790              "",
 26791              "",
 26792              "",
 26793              "",
 26794              "",
 26795              "",
 26796              "",
 26797              "",
 26798              "",
 26799              "",
 26800              "",
 26801              "",
 26802              "",
 26803              "",
 26804              "",
 26805              "",
 26806              "",
 26807              "",
 26808              "",
 26809              "",
 26810              "",
 26811              "",
 26812              "space",
 26813              "exclam",
 26814              "universal",
 26815              "numbersign",
 26816              "existential",
 26817              "percent",
 26818              "ampersand",
 26819              "suchthat",
 26820              "parenleft",
 26821              "parenright",
 26822              "asteriskmath",
 26823              "plus",
 26824              "comma",
 26825              "minus",
 26826              "period",
 26827              "slash",
 26828              "zero",
 26829              "one",
 26830              "two",
 26831              "three",
 26832              "four",
 26833              "five",
 26834              "six",
 26835              "seven",
 26836              "eight",
 26837              "nine",
 26838              "colon",
 26839              "semicolon",
 26840              "less",
 26841              "equal",
 26842              "greater",
 26843              "question",
 26844              "congruent",
 26845              "Alpha",
 26846              "Beta",
 26847              "Chi",
 26848              "Delta",
 26849              "Epsilon",
 26850              "Phi",
 26851              "Gamma",
 26852              "Eta",
 26853              "Iota",
 26854              "theta1",
 26855              "Kappa",
 26856              "Lambda",
 26857              "Mu",
 26858              "Nu",
 26859              "Omicron",
 26860              "Pi",
 26861              "Theta",
 26862              "Rho",
 26863              "Sigma",
 26864              "Tau",
 26865              "Upsilon",
 26866              "sigma1",
 26867              "Omega",
 26868              "Xi",
 26869              "Psi",
 26870              "Zeta",
 26871              "bracketleft",
 26872              "therefore",
 26873              "bracketright",
 26874              "perpendicular",
 26875              "underscore",
 26876              "radicalex",
 26877              "alpha",
 26878              "beta",
 26879              "chi",
 26880              "delta",
 26881              "epsilon",
 26882              "phi",
 26883              "gamma",
 26884              "eta",
 26885              "iota",
 26886              "phi1",
 26887              "kappa",
 26888              "lambda",
 26889              "mu",
 26890              "nu",
 26891              "omicron",
 26892              "pi",
 26893              "theta",
 26894              "rho",
 26895              "sigma",
 26896              "tau",
 26897              "upsilon",
 26898              "omega1",
 26899              "omega",
 26900              "xi",
 26901              "psi",
 26902              "zeta",
 26903              "braceleft",
 26904              "bar",
 26905              "braceright",
 26906              "similar",
 26907              "",
 26908              "",
 26909              "",
 26910              "",
 26911              "",
 26912              "",
 26913              "",
 26914              "",
 26915              "",
 26916              "",
 26917              "",
 26918              "",
 26919              "",
 26920              "",
 26921              "",
 26922              "",
 26923              "",
 26924              "",
 26925              "",
 26926              "",
 26927              "",
 26928              "",
 26929              "",
 26930              "",
 26931              "",
 26932              "",
 26933              "",
 26934              "",
 26935              "",
 26936              "",
 26937              "",
 26938              "",
 26939              "",
 26940              "Euro",
 26941              "Upsilon1",
 26942              "minute",
 26943              "lessequal",
 26944              "fraction",
 26945              "infinity",
 26946              "florin",
 26947              "club",
 26948              "diamond",
 26949              "heart",
 26950              "spade",
 26951              "arrowboth",
 26952              "arrowleft",
 26953              "arrowup",
 26954              "arrowright",
 26955              "arrowdown",
 26956              "degree",
 26957              "plusminus",
 26958              "second",
 26959              "greaterequal",
 26960              "multiply",
 26961              "proportional",
 26962              "partialdiff",
 26963              "bullet",
 26964              "divide",
 26965              "notequal",
 26966              "equivalence",
 26967              "approxequal",
 26968              "ellipsis",
 26969              "arrowvertex",
 26970              "arrowhorizex",
 26971              "carriagereturn",
 26972              "aleph",
 26973              "Ifraktur",
 26974              "Rfraktur",
 26975              "weierstrass",
 26976              "circlemultiply",
 26977              "circleplus",
 26978              "emptyset",
 26979              "intersection",
 26980              "union",
 26981              "propersuperset",
 26982              "reflexsuperset",
 26983              "notsubset",
 26984              "propersubset",
 26985              "reflexsubset",
 26986              "element",
 26987              "notelement",
 26988              "angle",
 26989              "gradient",
 26990              "registerserif",
 26991              "copyrightserif",
 26992              "trademarkserif",
 26993              "product",
 26994              "radical",
 26995              "dotmath",
 26996              "logicalnot",
 26997              "logicaland",
 26998              "logicalor",
 26999              "arrowdblboth",
 27000              "arrowdblleft",
 27001              "arrowdblup",
 27002              "arrowdblright",
 27003              "arrowdbldown",
 27004              "lozenge",
 27005              "angleleft",
 27006              "registersans",
 27007              "copyrightsans",
 27008              "trademarksans",
 27009              "summation",
 27010              "parenlefttp",
 27011              "parenleftex",
 27012              "parenleftbt",
 27013              "bracketlefttp",
 27014              "bracketleftex",
 27015              "bracketleftbt",
 27016              "bracelefttp",
 27017              "braceleftmid",
 27018              "braceleftbt",
 27019              "braceex",
 27020              "",
 27021              "angleright",
 27022              "integral",
 27023              "integraltp",
 27024              "integralex",
 27025              "integralbt",
 27026              "parenrighttp",
 27027              "parenrightex",
 27028              "parenrightbt",
 27029              "bracketrighttp",
 27030              "bracketrightex",
 27031              "bracketrightbt",
 27032              "bracerighttp",
 27033              "bracerightmid",
 27034              "bracerightbt",
 27035              "",
 27036            ];
 27037            t.SymbolSetEncoding = o;
 27038            const c = [
 27039              "",
 27040              "",
 27041              "",
 27042              "",
 27043              "",
 27044              "",
 27045              "",
 27046              "",
 27047              "",
 27048              "",
 27049              "",
 27050              "",
 27051              "",
 27052              "",
 27053              "",
 27054              "",
 27055              "",
 27056              "",
 27057              "",
 27058              "",
 27059              "",
 27060              "",
 27061              "",
 27062              "",
 27063              "",
 27064              "",
 27065              "",
 27066              "",
 27067              "",
 27068              "",
 27069              "",
 27070              "",
 27071              "space",
 27072              "a1",
 27073              "a2",
 27074              "a202",
 27075              "a3",
 27076              "a4",
 27077              "a5",
 27078              "a119",
 27079              "a118",
 27080              "a117",
 27081              "a11",
 27082              "a12",
 27083              "a13",
 27084              "a14",
 27085              "a15",
 27086              "a16",
 27087              "a105",
 27088              "a17",
 27089              "a18",
 27090              "a19",
 27091              "a20",
 27092              "a21",
 27093              "a22",
 27094              "a23",
 27095              "a24",
 27096              "a25",
 27097              "a26",
 27098              "a27",
 27099              "a28",
 27100              "a6",
 27101              "a7",
 27102              "a8",
 27103              "a9",
 27104              "a10",
 27105              "a29",
 27106              "a30",
 27107              "a31",
 27108              "a32",
 27109              "a33",
 27110              "a34",
 27111              "a35",
 27112              "a36",
 27113              "a37",
 27114              "a38",
 27115              "a39",
 27116              "a40",
 27117              "a41",
 27118              "a42",
 27119              "a43",
 27120              "a44",
 27121              "a45",
 27122              "a46",
 27123              "a47",
 27124              "a48",
 27125              "a49",
 27126              "a50",
 27127              "a51",
 27128              "a52",
 27129              "a53",
 27130              "a54",
 27131              "a55",
 27132              "a56",
 27133              "a57",
 27134              "a58",
 27135              "a59",
 27136              "a60",
 27137              "a61",
 27138              "a62",
 27139              "a63",
 27140              "a64",
 27141              "a65",
 27142              "a66",
 27143              "a67",
 27144              "a68",
 27145              "a69",
 27146              "a70",
 27147              "a71",
 27148              "a72",
 27149              "a73",
 27150              "a74",
 27151              "a203",
 27152              "a75",
 27153              "a204",
 27154              "a76",
 27155              "a77",
 27156              "a78",
 27157              "a79",
 27158              "a81",
 27159              "a82",
 27160              "a83",
 27161              "a84",
 27162              "a97",
 27163              "a98",
 27164              "a99",
 27165              "a100",
 27166              "",
 27167              "a89",
 27168              "a90",
 27169              "a93",
 27170              "a94",
 27171              "a91",
 27172              "a92",
 27173              "a205",
 27174              "a85",
 27175              "a206",
 27176              "a86",
 27177              "a87",
 27178              "a88",
 27179              "a95",
 27180              "a96",
 27181              "",
 27182              "",
 27183              "",
 27184              "",
 27185              "",
 27186              "",
 27187              "",
 27188              "",
 27189              "",
 27190              "",
 27191              "",
 27192              "",
 27193              "",
 27194              "",
 27195              "",
 27196              "",
 27197              "",
 27198              "",
 27199              "",
 27200              "a101",
 27201              "a102",
 27202              "a103",
 27203              "a104",
 27204              "a106",
 27205              "a107",
 27206              "a108",
 27207              "a112",
 27208              "a111",
 27209              "a110",
 27210              "a109",
 27211              "a120",
 27212              "a121",
 27213              "a122",
 27214              "a123",
 27215              "a124",
 27216              "a125",
 27217              "a126",
 27218              "a127",
 27219              "a128",
 27220              "a129",
 27221              "a130",
 27222              "a131",
 27223              "a132",
 27224              "a133",
 27225              "a134",
 27226              "a135",
 27227              "a136",
 27228              "a137",
 27229              "a138",
 27230              "a139",
 27231              "a140",
 27232              "a141",
 27233              "a142",
 27234              "a143",
 27235              "a144",
 27236              "a145",
 27237              "a146",
 27238              "a147",
 27239              "a148",
 27240              "a149",
 27241              "a150",
 27242              "a151",
 27243              "a152",
 27244              "a153",
 27245              "a154",
 27246              "a155",
 27247              "a156",
 27248              "a157",
 27249              "a158",
 27250              "a159",
 27251              "a160",
 27252              "a161",
 27253              "a163",
 27254              "a164",
 27255              "a196",
 27256              "a165",
 27257              "a192",
 27258              "a166",
 27259              "a167",
 27260              "a168",
 27261              "a169",
 27262              "a170",
 27263              "a171",
 27264              "a172",
 27265              "a173",
 27266              "a162",
 27267              "a174",
 27268              "a175",
 27269              "a176",
 27270              "a177",
 27271              "a178",
 27272              "a179",
 27273              "a193",
 27274              "a180",
 27275              "a199",
 27276              "a181",
 27277              "a200",
 27278              "a182",
 27279              "",
 27280              "a201",
 27281              "a183",
 27282              "a184",
 27283              "a197",
 27284              "a185",
 27285              "a194",
 27286              "a198",
 27287              "a186",
 27288              "a195",
 27289              "a187",
 27290              "a188",
 27291              "a189",
 27292              "a190",
 27293              "a191",
 27294              "",
 27295            ];
 27296            t.ZapfDingbatsEncoding = c;
 27297          },
 27298          (e, t, a) => {
 27299            Object.defineProperty(t, "__esModule", { value: !0 });
 27300            t.SEAC_ANALYSIS_ENABLED =
 27301              t.MacStandardGlyphOrdering =
 27302              t.FontFlags =
 27303                void 0;
 27304            t.normalizeFontName = function normalizeFontName(e) {
 27305              return e.replaceAll(/[,_]/g, "-").replaceAll(/\s/g, "");
 27306            };
 27307            t.recoverGlyphName = recoverGlyphName;
 27308            t.type1FontGlyphMapping = function type1FontGlyphMapping(e, t, a) {
 27309              const i = Object.create(null);
 27310              let s, c, l;
 27311              const h = !!(e.flags & o.Symbolic);
 27312              if (e.isInternalFont) {
 27313                l = t;
 27314                for (c = 0; c < l.length; c++) {
 27315                  s = a.indexOf(l[c]);
 27316                  i[c] = s >= 0 ? s : 0;
 27317                }
 27318              } else if (e.baseEncodingName) {
 27319                l = (0, r.getEncoding)(e.baseEncodingName);
 27320                for (c = 0; c < l.length; c++) {
 27321                  s = a.indexOf(l[c]);
 27322                  i[c] = s >= 0 ? s : 0;
 27323                }
 27324              } else if (h) for (c in t) i[c] = t[c];
 27325              else {
 27326                l = r.StandardEncoding;
 27327                for (c = 0; c < l.length; c++) {
 27328                  s = a.indexOf(l[c]);
 27329                  i[c] = s >= 0 ? s : 0;
 27330                }
 27331              }
 27332              const u = e.differences;
 27333              let d;
 27334              if (u)
 27335                for (c in u) {
 27336                  const e = u[c];
 27337                  s = a.indexOf(e);
 27338                  if (-1 === s) {
 27339                    d || (d = (0, n.getGlyphsUnicode)());
 27340                    const t = recoverGlyphName(e, d);
 27341                    t !== e && (s = a.indexOf(t));
 27342                  }
 27343                  i[c] = s >= 0 ? s : 0;
 27344                }
 27345              return i;
 27346            };
 27347            var r = a(37),
 27348              n = a(39),
 27349              i = a(40),
 27350              s = a(2);
 27351            t.SEAC_ANALYSIS_ENABLED = !0;
 27352            const o = {
 27353              FixedPitch: 1,
 27354              Serif: 2,
 27355              Symbolic: 4,
 27356              Script: 8,
 27357              Nonsymbolic: 32,
 27358              Italic: 64,
 27359              AllCap: 65536,
 27360              SmallCap: 131072,
 27361              ForceBold: 262144,
 27362            };
 27363            t.FontFlags = o;
 27364            t.MacStandardGlyphOrdering = [
 27365              ".notdef",
 27366              ".null",
 27367              "nonmarkingreturn",
 27368              "space",
 27369              "exclam",
 27370              "quotedbl",
 27371              "numbersign",
 27372              "dollar",
 27373              "percent",
 27374              "ampersand",
 27375              "quotesingle",
 27376              "parenleft",
 27377              "parenright",
 27378              "asterisk",
 27379              "plus",
 27380              "comma",
 27381              "hyphen",
 27382              "period",
 27383              "slash",
 27384              "zero",
 27385              "one",
 27386              "two",
 27387              "three",
 27388              "four",
 27389              "five",
 27390              "six",
 27391              "seven",
 27392              "eight",
 27393              "nine",
 27394              "colon",
 27395              "semicolon",
 27396              "less",
 27397              "equal",
 27398              "greater",
 27399              "question",
 27400              "at",
 27401              "A",
 27402              "B",
 27403              "C",
 27404              "D",
 27405              "E",
 27406              "F",
 27407              "G",
 27408              "H",
 27409              "I",
 27410              "J",
 27411              "K",
 27412              "L",
 27413              "M",
 27414              "N",
 27415              "O",
 27416              "P",
 27417              "Q",
 27418              "R",
 27419              "S",
 27420              "T",
 27421              "U",
 27422              "V",
 27423              "W",
 27424              "X",
 27425              "Y",
 27426              "Z",
 27427              "bracketleft",
 27428              "backslash",
 27429              "bracketright",
 27430              "asciicircum",
 27431              "underscore",
 27432              "grave",
 27433              "a",
 27434              "b",
 27435              "c",
 27436              "d",
 27437              "e",
 27438              "f",
 27439              "g",
 27440              "h",
 27441              "i",
 27442              "j",
 27443              "k",
 27444              "l",
 27445              "m",
 27446              "n",
 27447              "o",
 27448              "p",
 27449              "q",
 27450              "r",
 27451              "s",
 27452              "t",
 27453              "u",
 27454              "v",
 27455              "w",
 27456              "x",
 27457              "y",
 27458              "z",
 27459              "braceleft",
 27460              "bar",
 27461              "braceright",
 27462              "asciitilde",
 27463              "Adieresis",
 27464              "Aring",
 27465              "Ccedilla",
 27466              "Eacute",
 27467              "Ntilde",
 27468              "Odieresis",
 27469              "Udieresis",
 27470              "aacute",
 27471              "agrave",
 27472              "acircumflex",
 27473              "adieresis",
 27474              "atilde",
 27475              "aring",
 27476              "ccedilla",
 27477              "eacute",
 27478              "egrave",
 27479              "ecircumflex",
 27480              "edieresis",
 27481              "iacute",
 27482              "igrave",
 27483              "icircumflex",
 27484              "idieresis",
 27485              "ntilde",
 27486              "oacute",
 27487              "ograve",
 27488              "ocircumflex",
 27489              "odieresis",
 27490              "otilde",
 27491              "uacute",
 27492              "ugrave",
 27493              "ucircumflex",
 27494              "udieresis",
 27495              "dagger",
 27496              "degree",
 27497              "cent",
 27498              "sterling",
 27499              "section",
 27500              "bullet",
 27501              "paragraph",
 27502              "germandbls",
 27503              "registered",
 27504              "copyright",
 27505              "trademark",
 27506              "acute",
 27507              "dieresis",
 27508              "notequal",
 27509              "AE",
 27510              "Oslash",
 27511              "infinity",
 27512              "plusminus",
 27513              "lessequal",
 27514              "greaterequal",
 27515              "yen",
 27516              "mu",
 27517              "partialdiff",
 27518              "summation",
 27519              "product",
 27520              "pi",
 27521              "integral",
 27522              "ordfeminine",
 27523              "ordmasculine",
 27524              "Omega",
 27525              "ae",
 27526              "oslash",
 27527              "questiondown",
 27528              "exclamdown",
 27529              "logicalnot",
 27530              "radical",
 27531              "florin",
 27532              "approxequal",
 27533              "Delta",
 27534              "guillemotleft",
 27535              "guillemotright",
 27536              "ellipsis",
 27537              "nonbreakingspace",
 27538              "Agrave",
 27539              "Atilde",
 27540              "Otilde",
 27541              "OE",
 27542              "oe",
 27543              "endash",
 27544              "emdash",
 27545              "quotedblleft",
 27546              "quotedblright",
 27547              "quoteleft",
 27548              "quoteright",
 27549              "divide",
 27550              "lozenge",
 27551              "ydieresis",
 27552              "Ydieresis",
 27553              "fraction",
 27554              "currency",
 27555              "guilsinglleft",
 27556              "guilsinglright",
 27557              "fi",
 27558              "fl",
 27559              "daggerdbl",
 27560              "periodcentered",
 27561              "quotesinglbase",
 27562              "quotedblbase",
 27563              "perthousand",
 27564              "Acircumflex",
 27565              "Ecircumflex",
 27566              "Aacute",
 27567              "Edieresis",
 27568              "Egrave",
 27569              "Iacute",
 27570              "Icircumflex",
 27571              "Idieresis",
 27572              "Igrave",
 27573              "Oacute",
 27574              "Ocircumflex",
 27575              "apple",
 27576              "Ograve",
 27577              "Uacute",
 27578              "Ucircumflex",
 27579              "Ugrave",
 27580              "dotlessi",
 27581              "circumflex",
 27582              "tilde",
 27583              "macron",
 27584              "breve",
 27585              "dotaccent",
 27586              "ring",
 27587              "cedilla",
 27588              "hungarumlaut",
 27589              "ogonek",
 27590              "caron",
 27591              "Lslash",
 27592              "lslash",
 27593              "Scaron",
 27594              "scaron",
 27595              "Zcaron",
 27596              "zcaron",
 27597              "brokenbar",
 27598              "Eth",
 27599              "eth",
 27600              "Yacute",
 27601              "yacute",
 27602              "Thorn",
 27603              "thorn",
 27604              "minus",
 27605              "multiply",
 27606              "onesuperior",
 27607              "twosuperior",
 27608              "threesuperior",
 27609              "onehalf",
 27610              "onequarter",
 27611              "threequarters",
 27612              "franc",
 27613              "Gbreve",
 27614              "gbreve",
 27615              "Idotaccent",
 27616              "Scedilla",
 27617              "scedilla",
 27618              "Cacute",
 27619              "cacute",
 27620              "Ccaron",
 27621              "ccaron",
 27622              "dcroat",
 27623            ];
 27624            function recoverGlyphName(e, t) {
 27625              if (void 0 !== t[e]) return e;
 27626              const a = (0, i.getUnicodeForGlyph)(e, t);
 27627              if (-1 !== a) for (const e in t) if (t[e] === a) return e;
 27628              (0, s.info)("Unable to recover a standard glyph name for: " + e);
 27629              return e;
 27630            }
 27631          },
 27632          (e, t, a) => {
 27633            Object.defineProperty(t, "__esModule", { value: !0 });
 27634            t.getGlyphsUnicode = t.getDingbatsGlyphsUnicode = void 0;
 27635            var r = a(3);
 27636            const n = (0, r.getLookupTableFactory)(function (e) {
 27637              e.A = 65;
 27638              e.AE = 198;
 27639              e.AEacute = 508;
 27640              e.AEmacron = 482;
 27641              e.AEsmall = 63462;
 27642              e.Aacute = 193;
 27643              e.Aacutesmall = 63457;
 27644              e.Abreve = 258;
 27645              e.Abreveacute = 7854;
 27646              e.Abrevecyrillic = 1232;
 27647              e.Abrevedotbelow = 7862;
 27648              e.Abrevegrave = 7856;
 27649              e.Abrevehookabove = 7858;
 27650              e.Abrevetilde = 7860;
 27651              e.Acaron = 461;
 27652              e.Acircle = 9398;
 27653              e.Acircumflex = 194;
 27654              e.Acircumflexacute = 7844;
 27655              e.Acircumflexdotbelow = 7852;
 27656              e.Acircumflexgrave = 7846;
 27657              e.Acircumflexhookabove = 7848;
 27658              e.Acircumflexsmall = 63458;
 27659              e.Acircumflextilde = 7850;
 27660              e.Acute = 63177;
 27661              e.Acutesmall = 63412;
 27662              e.Acyrillic = 1040;
 27663              e.Adblgrave = 512;
 27664              e.Adieresis = 196;
 27665              e.Adieresiscyrillic = 1234;
 27666              e.Adieresismacron = 478;
 27667              e.Adieresissmall = 63460;
 27668              e.Adotbelow = 7840;
 27669              e.Adotmacron = 480;
 27670              e.Agrave = 192;
 27671              e.Agravesmall = 63456;
 27672              e.Ahookabove = 7842;
 27673              e.Aiecyrillic = 1236;
 27674              e.Ainvertedbreve = 514;
 27675              e.Alpha = 913;
 27676              e.Alphatonos = 902;
 27677              e.Amacron = 256;
 27678              e.Amonospace = 65313;
 27679              e.Aogonek = 260;
 27680              e.Aring = 197;
 27681              e.Aringacute = 506;
 27682              e.Aringbelow = 7680;
 27683              e.Aringsmall = 63461;
 27684              e.Asmall = 63329;
 27685              e.Atilde = 195;
 27686              e.Atildesmall = 63459;
 27687              e.Aybarmenian = 1329;
 27688              e.B = 66;
 27689              e.Bcircle = 9399;
 27690              e.Bdotaccent = 7682;
 27691              e.Bdotbelow = 7684;
 27692              e.Becyrillic = 1041;
 27693              e.Benarmenian = 1330;
 27694              e.Beta = 914;
 27695              e.Bhook = 385;
 27696              e.Blinebelow = 7686;
 27697              e.Bmonospace = 65314;
 27698              e.Brevesmall = 63220;
 27699              e.Bsmall = 63330;
 27700              e.Btopbar = 386;
 27701              e.C = 67;
 27702              e.Caarmenian = 1342;
 27703              e.Cacute = 262;
 27704              e.Caron = 63178;
 27705              e.Caronsmall = 63221;
 27706              e.Ccaron = 268;
 27707              e.Ccedilla = 199;
 27708              e.Ccedillaacute = 7688;
 27709              e.Ccedillasmall = 63463;
 27710              e.Ccircle = 9400;
 27711              e.Ccircumflex = 264;
 27712              e.Cdot = 266;
 27713              e.Cdotaccent = 266;
 27714              e.Cedillasmall = 63416;
 27715              e.Chaarmenian = 1353;
 27716              e.Cheabkhasiancyrillic = 1212;
 27717              e.Checyrillic = 1063;
 27718              e.Chedescenderabkhasiancyrillic = 1214;
 27719              e.Chedescendercyrillic = 1206;
 27720              e.Chedieresiscyrillic = 1268;
 27721              e.Cheharmenian = 1347;
 27722              e.Chekhakassiancyrillic = 1227;
 27723              e.Cheverticalstrokecyrillic = 1208;
 27724              e.Chi = 935;
 27725              e.Chook = 391;
 27726              e.Circumflexsmall = 63222;
 27727              e.Cmonospace = 65315;
 27728              e.Coarmenian = 1361;
 27729              e.Csmall = 63331;
 27730              e.D = 68;
 27731              e.DZ = 497;
 27732              e.DZcaron = 452;
 27733              e.Daarmenian = 1332;
 27734              e.Dafrican = 393;
 27735              e.Dcaron = 270;
 27736              e.Dcedilla = 7696;
 27737              e.Dcircle = 9401;
 27738              e.Dcircumflexbelow = 7698;
 27739              e.Dcroat = 272;
 27740              e.Ddotaccent = 7690;
 27741              e.Ddotbelow = 7692;
 27742              e.Decyrillic = 1044;
 27743              e.Deicoptic = 1006;
 27744              e.Delta = 8710;
 27745              e.Deltagreek = 916;
 27746              e.Dhook = 394;
 27747              e.Dieresis = 63179;
 27748              e.DieresisAcute = 63180;
 27749              e.DieresisGrave = 63181;
 27750              e.Dieresissmall = 63400;
 27751              e.Digammagreek = 988;
 27752              e.Djecyrillic = 1026;
 27753              e.Dlinebelow = 7694;
 27754              e.Dmonospace = 65316;
 27755              e.Dotaccentsmall = 63223;
 27756              e.Dslash = 272;
 27757              e.Dsmall = 63332;
 27758              e.Dtopbar = 395;
 27759              e.Dz = 498;
 27760              e.Dzcaron = 453;
 27761              e.Dzeabkhasiancyrillic = 1248;
 27762              e.Dzecyrillic = 1029;
 27763              e.Dzhecyrillic = 1039;
 27764              e.E = 69;
 27765              e.Eacute = 201;
 27766              e.Eacutesmall = 63465;
 27767              e.Ebreve = 276;
 27768              e.Ecaron = 282;
 27769              e.Ecedillabreve = 7708;
 27770              e.Echarmenian = 1333;
 27771              e.Ecircle = 9402;
 27772              e.Ecircumflex = 202;
 27773              e.Ecircumflexacute = 7870;
 27774              e.Ecircumflexbelow = 7704;
 27775              e.Ecircumflexdotbelow = 7878;
 27776              e.Ecircumflexgrave = 7872;
 27777              e.Ecircumflexhookabove = 7874;
 27778              e.Ecircumflexsmall = 63466;
 27779              e.Ecircumflextilde = 7876;
 27780              e.Ecyrillic = 1028;
 27781              e.Edblgrave = 516;
 27782              e.Edieresis = 203;
 27783              e.Edieresissmall = 63467;
 27784              e.Edot = 278;
 27785              e.Edotaccent = 278;
 27786              e.Edotbelow = 7864;
 27787              e.Efcyrillic = 1060;
 27788              e.Egrave = 200;
 27789              e.Egravesmall = 63464;
 27790              e.Eharmenian = 1335;
 27791              e.Ehookabove = 7866;
 27792              e.Eightroman = 8551;
 27793              e.Einvertedbreve = 518;
 27794              e.Eiotifiedcyrillic = 1124;
 27795              e.Elcyrillic = 1051;
 27796              e.Elevenroman = 8554;
 27797              e.Emacron = 274;
 27798              e.Emacronacute = 7702;
 27799              e.Emacrongrave = 7700;
 27800              e.Emcyrillic = 1052;
 27801              e.Emonospace = 65317;
 27802              e.Encyrillic = 1053;
 27803              e.Endescendercyrillic = 1186;
 27804              e.Eng = 330;
 27805              e.Enghecyrillic = 1188;
 27806              e.Enhookcyrillic = 1223;
 27807              e.Eogonek = 280;
 27808              e.Eopen = 400;
 27809              e.Epsilon = 917;
 27810              e.Epsilontonos = 904;
 27811              e.Ercyrillic = 1056;
 27812              e.Ereversed = 398;
 27813              e.Ereversedcyrillic = 1069;
 27814              e.Escyrillic = 1057;
 27815              e.Esdescendercyrillic = 1194;
 27816              e.Esh = 425;
 27817              e.Esmall = 63333;
 27818              e.Eta = 919;
 27819              e.Etarmenian = 1336;
 27820              e.Etatonos = 905;
 27821              e.Eth = 208;
 27822              e.Ethsmall = 63472;
 27823              e.Etilde = 7868;
 27824              e.Etildebelow = 7706;
 27825              e.Euro = 8364;
 27826              e.Ezh = 439;
 27827              e.Ezhcaron = 494;
 27828              e.Ezhreversed = 440;
 27829              e.F = 70;
 27830              e.Fcircle = 9403;
 27831              e.Fdotaccent = 7710;
 27832              e.Feharmenian = 1366;
 27833              e.Feicoptic = 996;
 27834              e.Fhook = 401;
 27835              e.Fitacyrillic = 1138;
 27836              e.Fiveroman = 8548;
 27837              e.Fmonospace = 65318;
 27838              e.Fourroman = 8547;
 27839              e.Fsmall = 63334;
 27840              e.G = 71;
 27841              e.GBsquare = 13191;
 27842              e.Gacute = 500;
 27843              e.Gamma = 915;
 27844              e.Gammaafrican = 404;
 27845              e.Gangiacoptic = 1002;
 27846              e.Gbreve = 286;
 27847              e.Gcaron = 486;
 27848              e.Gcedilla = 290;
 27849              e.Gcircle = 9404;
 27850              e.Gcircumflex = 284;
 27851              e.Gcommaaccent = 290;
 27852              e.Gdot = 288;
 27853              e.Gdotaccent = 288;
 27854              e.Gecyrillic = 1043;
 27855              e.Ghadarmenian = 1346;
 27856              e.Ghemiddlehookcyrillic = 1172;
 27857              e.Ghestrokecyrillic = 1170;
 27858              e.Gheupturncyrillic = 1168;
 27859              e.Ghook = 403;
 27860              e.Gimarmenian = 1331;
 27861              e.Gjecyrillic = 1027;
 27862              e.Gmacron = 7712;
 27863              e.Gmonospace = 65319;
 27864              e.Grave = 63182;
 27865              e.Gravesmall = 63328;
 27866              e.Gsmall = 63335;
 27867              e.Gsmallhook = 667;
 27868              e.Gstroke = 484;
 27869              e.H = 72;
 27870              e.H18533 = 9679;
 27871              e.H18543 = 9642;
 27872              e.H18551 = 9643;
 27873              e.H22073 = 9633;
 27874              e.HPsquare = 13259;
 27875              e.Haabkhasiancyrillic = 1192;
 27876              e.Hadescendercyrillic = 1202;
 27877              e.Hardsigncyrillic = 1066;
 27878              e.Hbar = 294;
 27879              e.Hbrevebelow = 7722;
 27880              e.Hcedilla = 7720;
 27881              e.Hcircle = 9405;
 27882              e.Hcircumflex = 292;
 27883              e.Hdieresis = 7718;
 27884              e.Hdotaccent = 7714;
 27885              e.Hdotbelow = 7716;
 27886              e.Hmonospace = 65320;
 27887              e.Hoarmenian = 1344;
 27888              e.Horicoptic = 1e3;
 27889              e.Hsmall = 63336;
 27890              e.Hungarumlaut = 63183;
 27891              e.Hungarumlautsmall = 63224;
 27892              e.Hzsquare = 13200;
 27893              e.I = 73;
 27894              e.IAcyrillic = 1071;
 27895              e.IJ = 306;
 27896              e.IUcyrillic = 1070;
 27897              e.Iacute = 205;
 27898              e.Iacutesmall = 63469;
 27899              e.Ibreve = 300;
 27900              e.Icaron = 463;
 27901              e.Icircle = 9406;
 27902              e.Icircumflex = 206;
 27903              e.Icircumflexsmall = 63470;
 27904              e.Icyrillic = 1030;
 27905              e.Idblgrave = 520;
 27906              e.Idieresis = 207;
 27907              e.Idieresisacute = 7726;
 27908              e.Idieresiscyrillic = 1252;
 27909              e.Idieresissmall = 63471;
 27910              e.Idot = 304;
 27911              e.Idotaccent = 304;
 27912              e.Idotbelow = 7882;
 27913              e.Iebrevecyrillic = 1238;
 27914              e.Iecyrillic = 1045;
 27915              e.Ifraktur = 8465;
 27916              e.Igrave = 204;
 27917              e.Igravesmall = 63468;
 27918              e.Ihookabove = 7880;
 27919              e.Iicyrillic = 1048;
 27920              e.Iinvertedbreve = 522;
 27921              e.Iishortcyrillic = 1049;
 27922              e.Imacron = 298;
 27923              e.Imacroncyrillic = 1250;
 27924              e.Imonospace = 65321;
 27925              e.Iniarmenian = 1339;
 27926              e.Iocyrillic = 1025;
 27927              e.Iogonek = 302;
 27928              e.Iota = 921;
 27929              e.Iotaafrican = 406;
 27930              e.Iotadieresis = 938;
 27931              e.Iotatonos = 906;
 27932              e.Ismall = 63337;
 27933              e.Istroke = 407;
 27934              e.Itilde = 296;
 27935              e.Itildebelow = 7724;
 27936              e.Izhitsacyrillic = 1140;
 27937              e.Izhitsadblgravecyrillic = 1142;
 27938              e.J = 74;
 27939              e.Jaarmenian = 1345;
 27940              e.Jcircle = 9407;
 27941              e.Jcircumflex = 308;
 27942              e.Jecyrillic = 1032;
 27943              e.Jheharmenian = 1355;
 27944              e.Jmonospace = 65322;
 27945              e.Jsmall = 63338;
 27946              e.K = 75;
 27947              e.KBsquare = 13189;
 27948              e.KKsquare = 13261;
 27949              e.Kabashkircyrillic = 1184;
 27950              e.Kacute = 7728;
 27951              e.Kacyrillic = 1050;
 27952              e.Kadescendercyrillic = 1178;
 27953              e.Kahookcyrillic = 1219;
 27954              e.Kappa = 922;
 27955              e.Kastrokecyrillic = 1182;
 27956              e.Kaverticalstrokecyrillic = 1180;
 27957              e.Kcaron = 488;
 27958              e.Kcedilla = 310;
 27959              e.Kcircle = 9408;
 27960              e.Kcommaaccent = 310;
 27961              e.Kdotbelow = 7730;
 27962              e.Keharmenian = 1364;
 27963              e.Kenarmenian = 1343;
 27964              e.Khacyrillic = 1061;
 27965              e.Kheicoptic = 998;
 27966              e.Khook = 408;
 27967              e.Kjecyrillic = 1036;
 27968              e.Klinebelow = 7732;
 27969              e.Kmonospace = 65323;
 27970              e.Koppacyrillic = 1152;
 27971              e.Koppagreek = 990;
 27972              e.Ksicyrillic = 1134;
 27973              e.Ksmall = 63339;
 27974              e.L = 76;
 27975              e.LJ = 455;
 27976              e.LL = 63167;
 27977              e.Lacute = 313;
 27978              e.Lambda = 923;
 27979              e.Lcaron = 317;
 27980              e.Lcedilla = 315;
 27981              e.Lcircle = 9409;
 27982              e.Lcircumflexbelow = 7740;
 27983              e.Lcommaaccent = 315;
 27984              e.Ldot = 319;
 27985              e.Ldotaccent = 319;
 27986              e.Ldotbelow = 7734;
 27987              e.Ldotbelowmacron = 7736;
 27988              e.Liwnarmenian = 1340;
 27989              e.Lj = 456;
 27990              e.Ljecyrillic = 1033;
 27991              e.Llinebelow = 7738;
 27992              e.Lmonospace = 65324;
 27993              e.Lslash = 321;
 27994              e.Lslashsmall = 63225;
 27995              e.Lsmall = 63340;
 27996              e.M = 77;
 27997              e.MBsquare = 13190;
 27998              e.Macron = 63184;
 27999              e.Macronsmall = 63407;
 28000              e.Macute = 7742;
 28001              e.Mcircle = 9410;
 28002              e.Mdotaccent = 7744;
 28003              e.Mdotbelow = 7746;
 28004              e.Menarmenian = 1348;
 28005              e.Mmonospace = 65325;
 28006              e.Msmall = 63341;
 28007              e.Mturned = 412;
 28008              e.Mu = 924;
 28009              e.N = 78;
 28010              e.NJ = 458;
 28011              e.Nacute = 323;
 28012              e.Ncaron = 327;
 28013              e.Ncedilla = 325;
 28014              e.Ncircle = 9411;
 28015              e.Ncircumflexbelow = 7754;
 28016              e.Ncommaaccent = 325;
 28017              e.Ndotaccent = 7748;
 28018              e.Ndotbelow = 7750;
 28019              e.Nhookleft = 413;
 28020              e.Nineroman = 8552;
 28021              e.Nj = 459;
 28022              e.Njecyrillic = 1034;
 28023              e.Nlinebelow = 7752;
 28024              e.Nmonospace = 65326;
 28025              e.Nowarmenian = 1350;
 28026              e.Nsmall = 63342;
 28027              e.Ntilde = 209;
 28028              e.Ntildesmall = 63473;
 28029              e.Nu = 925;
 28030              e.O = 79;
 28031              e.OE = 338;
 28032              e.OEsmall = 63226;
 28033              e.Oacute = 211;
 28034              e.Oacutesmall = 63475;
 28035              e.Obarredcyrillic = 1256;
 28036              e.Obarreddieresiscyrillic = 1258;
 28037              e.Obreve = 334;
 28038              e.Ocaron = 465;
 28039              e.Ocenteredtilde = 415;
 28040              e.Ocircle = 9412;
 28041              e.Ocircumflex = 212;
 28042              e.Ocircumflexacute = 7888;
 28043              e.Ocircumflexdotbelow = 7896;
 28044              e.Ocircumflexgrave = 7890;
 28045              e.Ocircumflexhookabove = 7892;
 28046              e.Ocircumflexsmall = 63476;
 28047              e.Ocircumflextilde = 7894;
 28048              e.Ocyrillic = 1054;
 28049              e.Odblacute = 336;
 28050              e.Odblgrave = 524;
 28051              e.Odieresis = 214;
 28052              e.Odieresiscyrillic = 1254;
 28053              e.Odieresissmall = 63478;
 28054              e.Odotbelow = 7884;
 28055              e.Ogoneksmall = 63227;
 28056              e.Ograve = 210;
 28057              e.Ogravesmall = 63474;
 28058              e.Oharmenian = 1365;
 28059              e.Ohm = 8486;
 28060              e.Ohookabove = 7886;
 28061              e.Ohorn = 416;
 28062              e.Ohornacute = 7898;
 28063              e.Ohorndotbelow = 7906;
 28064              e.Ohorngrave = 7900;
 28065              e.Ohornhookabove = 7902;
 28066              e.Ohorntilde = 7904;
 28067              e.Ohungarumlaut = 336;
 28068              e.Oi = 418;
 28069              e.Oinvertedbreve = 526;
 28070              e.Omacron = 332;
 28071              e.Omacronacute = 7762;
 28072              e.Omacrongrave = 7760;
 28073              e.Omega = 8486;
 28074              e.Omegacyrillic = 1120;
 28075              e.Omegagreek = 937;
 28076              e.Omegaroundcyrillic = 1146;
 28077              e.Omegatitlocyrillic = 1148;
 28078              e.Omegatonos = 911;
 28079              e.Omicron = 927;
 28080              e.Omicrontonos = 908;
 28081              e.Omonospace = 65327;
 28082              e.Oneroman = 8544;
 28083              e.Oogonek = 490;
 28084              e.Oogonekmacron = 492;
 28085              e.Oopen = 390;
 28086              e.Oslash = 216;
 28087              e.Oslashacute = 510;
 28088              e.Oslashsmall = 63480;
 28089              e.Osmall = 63343;
 28090              e.Ostrokeacute = 510;
 28091              e.Otcyrillic = 1150;
 28092              e.Otilde = 213;
 28093              e.Otildeacute = 7756;
 28094              e.Otildedieresis = 7758;
 28095              e.Otildesmall = 63477;
 28096              e.P = 80;
 28097              e.Pacute = 7764;
 28098              e.Pcircle = 9413;
 28099              e.Pdotaccent = 7766;
 28100              e.Pecyrillic = 1055;
 28101              e.Peharmenian = 1354;
 28102              e.Pemiddlehookcyrillic = 1190;
 28103              e.Phi = 934;
 28104              e.Phook = 420;
 28105              e.Pi = 928;
 28106              e.Piwrarmenian = 1363;
 28107              e.Pmonospace = 65328;
 28108              e.Psi = 936;
 28109              e.Psicyrillic = 1136;
 28110              e.Psmall = 63344;
 28111              e.Q = 81;
 28112              e.Qcircle = 9414;
 28113              e.Qmonospace = 65329;
 28114              e.Qsmall = 63345;
 28115              e.R = 82;
 28116              e.Raarmenian = 1356;
 28117              e.Racute = 340;
 28118              e.Rcaron = 344;
 28119              e.Rcedilla = 342;
 28120              e.Rcircle = 9415;
 28121              e.Rcommaaccent = 342;
 28122              e.Rdblgrave = 528;
 28123              e.Rdotaccent = 7768;
 28124              e.Rdotbelow = 7770;
 28125              e.Rdotbelowmacron = 7772;
 28126              e.Reharmenian = 1360;
 28127              e.Rfraktur = 8476;
 28128              e.Rho = 929;
 28129              e.Ringsmall = 63228;
 28130              e.Rinvertedbreve = 530;
 28131              e.Rlinebelow = 7774;
 28132              e.Rmonospace = 65330;
 28133              e.Rsmall = 63346;
 28134              e.Rsmallinverted = 641;
 28135              e.Rsmallinvertedsuperior = 694;
 28136              e.S = 83;
 28137              e.SF010000 = 9484;
 28138              e.SF020000 = 9492;
 28139              e.SF030000 = 9488;
 28140              e.SF040000 = 9496;
 28141              e.SF050000 = 9532;
 28142              e.SF060000 = 9516;
 28143              e.SF070000 = 9524;
 28144              e.SF080000 = 9500;
 28145              e.SF090000 = 9508;
 28146              e.SF100000 = 9472;
 28147              e.SF110000 = 9474;
 28148              e.SF190000 = 9569;
 28149              e.SF200000 = 9570;
 28150              e.SF210000 = 9558;
 28151              e.SF220000 = 9557;
 28152              e.SF230000 = 9571;
 28153              e.SF240000 = 9553;
 28154              e.SF250000 = 9559;
 28155              e.SF260000 = 9565;
 28156              e.SF270000 = 9564;
 28157              e.SF280000 = 9563;
 28158              e.SF360000 = 9566;
 28159              e.SF370000 = 9567;
 28160              e.SF380000 = 9562;
 28161              e.SF390000 = 9556;
 28162              e.SF400000 = 9577;
 28163              e.SF410000 = 9574;
 28164              e.SF420000 = 9568;
 28165              e.SF430000 = 9552;
 28166              e.SF440000 = 9580;
 28167              e.SF450000 = 9575;
 28168              e.SF460000 = 9576;
 28169              e.SF470000 = 9572;
 28170              e.SF480000 = 9573;
 28171              e.SF490000 = 9561;
 28172              e.SF500000 = 9560;
 28173              e.SF510000 = 9554;
 28174              e.SF520000 = 9555;
 28175              e.SF530000 = 9579;
 28176              e.SF540000 = 9578;
 28177              e.Sacute = 346;
 28178              e.Sacutedotaccent = 7780;
 28179              e.Sampigreek = 992;
 28180              e.Scaron = 352;
 28181              e.Scarondotaccent = 7782;
 28182              e.Scaronsmall = 63229;
 28183              e.Scedilla = 350;
 28184              e.Schwa = 399;
 28185              e.Schwacyrillic = 1240;
 28186              e.Schwadieresiscyrillic = 1242;
 28187              e.Scircle = 9416;
 28188              e.Scircumflex = 348;
 28189              e.Scommaaccent = 536;
 28190              e.Sdotaccent = 7776;
 28191              e.Sdotbelow = 7778;
 28192              e.Sdotbelowdotaccent = 7784;
 28193              e.Seharmenian = 1357;
 28194              e.Sevenroman = 8550;
 28195              e.Shaarmenian = 1351;
 28196              e.Shacyrillic = 1064;
 28197              e.Shchacyrillic = 1065;
 28198              e.Sheicoptic = 994;
 28199              e.Shhacyrillic = 1210;
 28200              e.Shimacoptic = 1004;
 28201              e.Sigma = 931;
 28202              e.Sixroman = 8549;
 28203              e.Smonospace = 65331;
 28204              e.Softsigncyrillic = 1068;
 28205              e.Ssmall = 63347;
 28206              e.Stigmagreek = 986;
 28207              e.T = 84;
 28208              e.Tau = 932;
 28209              e.Tbar = 358;
 28210              e.Tcaron = 356;
 28211              e.Tcedilla = 354;
 28212              e.Tcircle = 9417;
 28213              e.Tcircumflexbelow = 7792;
 28214              e.Tcommaaccent = 354;
 28215              e.Tdotaccent = 7786;
 28216              e.Tdotbelow = 7788;
 28217              e.Tecyrillic = 1058;
 28218              e.Tedescendercyrillic = 1196;
 28219              e.Tenroman = 8553;
 28220              e.Tetsecyrillic = 1204;
 28221              e.Theta = 920;
 28222              e.Thook = 428;
 28223              e.Thorn = 222;
 28224              e.Thornsmall = 63486;
 28225              e.Threeroman = 8546;
 28226              e.Tildesmall = 63230;
 28227              e.Tiwnarmenian = 1359;
 28228              e.Tlinebelow = 7790;
 28229              e.Tmonospace = 65332;
 28230              e.Toarmenian = 1337;
 28231              e.Tonefive = 444;
 28232              e.Tonesix = 388;
 28233              e.Tonetwo = 423;
 28234              e.Tretroflexhook = 430;
 28235              e.Tsecyrillic = 1062;
 28236              e.Tshecyrillic = 1035;
 28237              e.Tsmall = 63348;
 28238              e.Twelveroman = 8555;
 28239              e.Tworoman = 8545;
 28240              e.U = 85;
 28241              e.Uacute = 218;
 28242              e.Uacutesmall = 63482;
 28243              e.Ubreve = 364;
 28244              e.Ucaron = 467;
 28245              e.Ucircle = 9418;
 28246              e.Ucircumflex = 219;
 28247              e.Ucircumflexbelow = 7798;
 28248              e.Ucircumflexsmall = 63483;
 28249              e.Ucyrillic = 1059;
 28250              e.Udblacute = 368;
 28251              e.Udblgrave = 532;
 28252              e.Udieresis = 220;
 28253              e.Udieresisacute = 471;
 28254              e.Udieresisbelow = 7794;
 28255              e.Udieresiscaron = 473;
 28256              e.Udieresiscyrillic = 1264;
 28257              e.Udieresisgrave = 475;
 28258              e.Udieresismacron = 469;
 28259              e.Udieresissmall = 63484;
 28260              e.Udotbelow = 7908;
 28261              e.Ugrave = 217;
 28262              e.Ugravesmall = 63481;
 28263              e.Uhookabove = 7910;
 28264              e.Uhorn = 431;
 28265              e.Uhornacute = 7912;
 28266              e.Uhorndotbelow = 7920;
 28267              e.Uhorngrave = 7914;
 28268              e.Uhornhookabove = 7916;
 28269              e.Uhorntilde = 7918;
 28270              e.Uhungarumlaut = 368;
 28271              e.Uhungarumlautcyrillic = 1266;
 28272              e.Uinvertedbreve = 534;
 28273              e.Ukcyrillic = 1144;
 28274              e.Umacron = 362;
 28275              e.Umacroncyrillic = 1262;
 28276              e.Umacrondieresis = 7802;
 28277              e.Umonospace = 65333;
 28278              e.Uogonek = 370;
 28279              e.Upsilon = 933;
 28280              e.Upsilon1 = 978;
 28281              e.Upsilonacutehooksymbolgreek = 979;
 28282              e.Upsilonafrican = 433;
 28283              e.Upsilondieresis = 939;
 28284              e.Upsilondieresishooksymbolgreek = 980;
 28285              e.Upsilonhooksymbol = 978;
 28286              e.Upsilontonos = 910;
 28287              e.Uring = 366;
 28288              e.Ushortcyrillic = 1038;
 28289              e.Usmall = 63349;
 28290              e.Ustraightcyrillic = 1198;
 28291              e.Ustraightstrokecyrillic = 1200;
 28292              e.Utilde = 360;
 28293              e.Utildeacute = 7800;
 28294              e.Utildebelow = 7796;
 28295              e.V = 86;
 28296              e.Vcircle = 9419;
 28297              e.Vdotbelow = 7806;
 28298              e.Vecyrillic = 1042;
 28299              e.Vewarmenian = 1358;
 28300              e.Vhook = 434;
 28301              e.Vmonospace = 65334;
 28302              e.Voarmenian = 1352;
 28303              e.Vsmall = 63350;
 28304              e.Vtilde = 7804;
 28305              e.W = 87;
 28306              e.Wacute = 7810;
 28307              e.Wcircle = 9420;
 28308              e.Wcircumflex = 372;
 28309              e.Wdieresis = 7812;
 28310              e.Wdotaccent = 7814;
 28311              e.Wdotbelow = 7816;
 28312              e.Wgrave = 7808;
 28313              e.Wmonospace = 65335;
 28314              e.Wsmall = 63351;
 28315              e.X = 88;
 28316              e.Xcircle = 9421;
 28317              e.Xdieresis = 7820;
 28318              e.Xdotaccent = 7818;
 28319              e.Xeharmenian = 1341;
 28320              e.Xi = 926;
 28321              e.Xmonospace = 65336;
 28322              e.Xsmall = 63352;
 28323              e.Y = 89;
 28324              e.Yacute = 221;
 28325              e.Yacutesmall = 63485;
 28326              e.Yatcyrillic = 1122;
 28327              e.Ycircle = 9422;
 28328              e.Ycircumflex = 374;
 28329              e.Ydieresis = 376;
 28330              e.Ydieresissmall = 63487;
 28331              e.Ydotaccent = 7822;
 28332              e.Ydotbelow = 7924;
 28333              e.Yericyrillic = 1067;
 28334              e.Yerudieresiscyrillic = 1272;
 28335              e.Ygrave = 7922;
 28336              e.Yhook = 435;
 28337              e.Yhookabove = 7926;
 28338              e.Yiarmenian = 1349;
 28339              e.Yicyrillic = 1031;
 28340              e.Yiwnarmenian = 1362;
 28341              e.Ymonospace = 65337;
 28342              e.Ysmall = 63353;
 28343              e.Ytilde = 7928;
 28344              e.Yusbigcyrillic = 1130;
 28345              e.Yusbigiotifiedcyrillic = 1132;
 28346              e.Yuslittlecyrillic = 1126;
 28347              e.Yuslittleiotifiedcyrillic = 1128;
 28348              e.Z = 90;
 28349              e.Zaarmenian = 1334;
 28350              e.Zacute = 377;
 28351              e.Zcaron = 381;
 28352              e.Zcaronsmall = 63231;
 28353              e.Zcircle = 9423;
 28354              e.Zcircumflex = 7824;
 28355              e.Zdot = 379;
 28356              e.Zdotaccent = 379;
 28357              e.Zdotbelow = 7826;
 28358              e.Zecyrillic = 1047;
 28359              e.Zedescendercyrillic = 1176;
 28360              e.Zedieresiscyrillic = 1246;
 28361              e.Zeta = 918;
 28362              e.Zhearmenian = 1338;
 28363              e.Zhebrevecyrillic = 1217;
 28364              e.Zhecyrillic = 1046;
 28365              e.Zhedescendercyrillic = 1174;
 28366              e.Zhedieresiscyrillic = 1244;
 28367              e.Zlinebelow = 7828;
 28368              e.Zmonospace = 65338;
 28369              e.Zsmall = 63354;
 28370              e.Zstroke = 437;
 28371              e.a = 97;
 28372              e.aabengali = 2438;
 28373              e.aacute = 225;
 28374              e.aadeva = 2310;
 28375              e.aagujarati = 2694;
 28376              e.aagurmukhi = 2566;
 28377              e.aamatragurmukhi = 2622;
 28378              e.aarusquare = 13059;
 28379              e.aavowelsignbengali = 2494;
 28380              e.aavowelsigndeva = 2366;
 28381              e.aavowelsigngujarati = 2750;
 28382              e.abbreviationmarkarmenian = 1375;
 28383              e.abbreviationsigndeva = 2416;
 28384              e.abengali = 2437;
 28385              e.abopomofo = 12570;
 28386              e.abreve = 259;
 28387              e.abreveacute = 7855;
 28388              e.abrevecyrillic = 1233;
 28389              e.abrevedotbelow = 7863;
 28390              e.abrevegrave = 7857;
 28391              e.abrevehookabove = 7859;
 28392              e.abrevetilde = 7861;
 28393              e.acaron = 462;
 28394              e.acircle = 9424;
 28395              e.acircumflex = 226;
 28396              e.acircumflexacute = 7845;
 28397              e.acircumflexdotbelow = 7853;
 28398              e.acircumflexgrave = 7847;
 28399              e.acircumflexhookabove = 7849;
 28400              e.acircumflextilde = 7851;
 28401              e.acute = 180;
 28402              e.acutebelowcmb = 791;
 28403              e.acutecmb = 769;
 28404              e.acutecomb = 769;
 28405              e.acutedeva = 2388;
 28406              e.acutelowmod = 719;
 28407              e.acutetonecmb = 833;
 28408              e.acyrillic = 1072;
 28409              e.adblgrave = 513;
 28410              e.addakgurmukhi = 2673;
 28411              e.adeva = 2309;
 28412              e.adieresis = 228;
 28413              e.adieresiscyrillic = 1235;
 28414              e.adieresismacron = 479;
 28415              e.adotbelow = 7841;
 28416              e.adotmacron = 481;
 28417              e.ae = 230;
 28418              e.aeacute = 509;
 28419              e.aekorean = 12624;
 28420              e.aemacron = 483;
 28421              e.afii00208 = 8213;
 28422              e.afii08941 = 8356;
 28423              e.afii10017 = 1040;
 28424              e.afii10018 = 1041;
 28425              e.afii10019 = 1042;
 28426              e.afii10020 = 1043;
 28427              e.afii10021 = 1044;
 28428              e.afii10022 = 1045;
 28429              e.afii10023 = 1025;
 28430              e.afii10024 = 1046;
 28431              e.afii10025 = 1047;
 28432              e.afii10026 = 1048;
 28433              e.afii10027 = 1049;
 28434              e.afii10028 = 1050;
 28435              e.afii10029 = 1051;
 28436              e.afii10030 = 1052;
 28437              e.afii10031 = 1053;
 28438              e.afii10032 = 1054;
 28439              e.afii10033 = 1055;
 28440              e.afii10034 = 1056;
 28441              e.afii10035 = 1057;
 28442              e.afii10036 = 1058;
 28443              e.afii10037 = 1059;
 28444              e.afii10038 = 1060;
 28445              e.afii10039 = 1061;
 28446              e.afii10040 = 1062;
 28447              e.afii10041 = 1063;
 28448              e.afii10042 = 1064;
 28449              e.afii10043 = 1065;
 28450              e.afii10044 = 1066;
 28451              e.afii10045 = 1067;
 28452              e.afii10046 = 1068;
 28453              e.afii10047 = 1069;
 28454              e.afii10048 = 1070;
 28455              e.afii10049 = 1071;
 28456              e.afii10050 = 1168;
 28457              e.afii10051 = 1026;
 28458              e.afii10052 = 1027;
 28459              e.afii10053 = 1028;
 28460              e.afii10054 = 1029;
 28461              e.afii10055 = 1030;
 28462              e.afii10056 = 1031;
 28463              e.afii10057 = 1032;
 28464              e.afii10058 = 1033;
 28465              e.afii10059 = 1034;
 28466              e.afii10060 = 1035;
 28467              e.afii10061 = 1036;
 28468              e.afii10062 = 1038;
 28469              e.afii10063 = 63172;
 28470              e.afii10064 = 63173;
 28471              e.afii10065 = 1072;
 28472              e.afii10066 = 1073;
 28473              e.afii10067 = 1074;
 28474              e.afii10068 = 1075;
 28475              e.afii10069 = 1076;
 28476              e.afii10070 = 1077;
 28477              e.afii10071 = 1105;
 28478              e.afii10072 = 1078;
 28479              e.afii10073 = 1079;
 28480              e.afii10074 = 1080;
 28481              e.afii10075 = 1081;
 28482              e.afii10076 = 1082;
 28483              e.afii10077 = 1083;
 28484              e.afii10078 = 1084;
 28485              e.afii10079 = 1085;
 28486              e.afii10080 = 1086;
 28487              e.afii10081 = 1087;
 28488              e.afii10082 = 1088;
 28489              e.afii10083 = 1089;
 28490              e.afii10084 = 1090;
 28491              e.afii10085 = 1091;
 28492              e.afii10086 = 1092;
 28493              e.afii10087 = 1093;
 28494              e.afii10088 = 1094;
 28495              e.afii10089 = 1095;
 28496              e.afii10090 = 1096;
 28497              e.afii10091 = 1097;
 28498              e.afii10092 = 1098;
 28499              e.afii10093 = 1099;
 28500              e.afii10094 = 1100;
 28501              e.afii10095 = 1101;
 28502              e.afii10096 = 1102;
 28503              e.afii10097 = 1103;
 28504              e.afii10098 = 1169;
 28505              e.afii10099 = 1106;
 28506              e.afii10100 = 1107;
 28507              e.afii10101 = 1108;
 28508              e.afii10102 = 1109;
 28509              e.afii10103 = 1110;
 28510              e.afii10104 = 1111;
 28511              e.afii10105 = 1112;
 28512              e.afii10106 = 1113;
 28513              e.afii10107 = 1114;
 28514              e.afii10108 = 1115;
 28515              e.afii10109 = 1116;
 28516              e.afii10110 = 1118;
 28517              e.afii10145 = 1039;
 28518              e.afii10146 = 1122;
 28519              e.afii10147 = 1138;
 28520              e.afii10148 = 1140;
 28521              e.afii10192 = 63174;
 28522              e.afii10193 = 1119;
 28523              e.afii10194 = 1123;
 28524              e.afii10195 = 1139;
 28525              e.afii10196 = 1141;
 28526              e.afii10831 = 63175;
 28527              e.afii10832 = 63176;
 28528              e.afii10846 = 1241;
 28529              e.afii299 = 8206;
 28530              e.afii300 = 8207;
 28531              e.afii301 = 8205;
 28532              e.afii57381 = 1642;
 28533              e.afii57388 = 1548;
 28534              e.afii57392 = 1632;
 28535              e.afii57393 = 1633;
 28536              e.afii57394 = 1634;
 28537              e.afii57395 = 1635;
 28538              e.afii57396 = 1636;
 28539              e.afii57397 = 1637;
 28540              e.afii57398 = 1638;
 28541              e.afii57399 = 1639;
 28542              e.afii57400 = 1640;
 28543              e.afii57401 = 1641;
 28544              e.afii57403 = 1563;
 28545              e.afii57407 = 1567;
 28546              e.afii57409 = 1569;
 28547              e.afii57410 = 1570;
 28548              e.afii57411 = 1571;
 28549              e.afii57412 = 1572;
 28550              e.afii57413 = 1573;
 28551              e.afii57414 = 1574;
 28552              e.afii57415 = 1575;
 28553              e.afii57416 = 1576;
 28554              e.afii57417 = 1577;
 28555              e.afii57418 = 1578;
 28556              e.afii57419 = 1579;
 28557              e.afii57420 = 1580;
 28558              e.afii57421 = 1581;
 28559              e.afii57422 = 1582;
 28560              e.afii57423 = 1583;
 28561              e.afii57424 = 1584;
 28562              e.afii57425 = 1585;
 28563              e.afii57426 = 1586;
 28564              e.afii57427 = 1587;
 28565              e.afii57428 = 1588;
 28566              e.afii57429 = 1589;
 28567              e.afii57430 = 1590;
 28568              e.afii57431 = 1591;
 28569              e.afii57432 = 1592;
 28570              e.afii57433 = 1593;
 28571              e.afii57434 = 1594;
 28572              e.afii57440 = 1600;
 28573              e.afii57441 = 1601;
 28574              e.afii57442 = 1602;
 28575              e.afii57443 = 1603;
 28576              e.afii57444 = 1604;
 28577              e.afii57445 = 1605;
 28578              e.afii57446 = 1606;
 28579              e.afii57448 = 1608;
 28580              e.afii57449 = 1609;
 28581              e.afii57450 = 1610;
 28582              e.afii57451 = 1611;
 28583              e.afii57452 = 1612;
 28584              e.afii57453 = 1613;
 28585              e.afii57454 = 1614;
 28586              e.afii57455 = 1615;
 28587              e.afii57456 = 1616;
 28588              e.afii57457 = 1617;
 28589              e.afii57458 = 1618;
 28590              e.afii57470 = 1607;
 28591              e.afii57505 = 1700;
 28592              e.afii57506 = 1662;
 28593              e.afii57507 = 1670;
 28594              e.afii57508 = 1688;
 28595              e.afii57509 = 1711;
 28596              e.afii57511 = 1657;
 28597              e.afii57512 = 1672;
 28598              e.afii57513 = 1681;
 28599              e.afii57514 = 1722;
 28600              e.afii57519 = 1746;
 28601              e.afii57534 = 1749;
 28602              e.afii57636 = 8362;
 28603              e.afii57645 = 1470;
 28604              e.afii57658 = 1475;
 28605              e.afii57664 = 1488;
 28606              e.afii57665 = 1489;
 28607              e.afii57666 = 1490;
 28608              e.afii57667 = 1491;
 28609              e.afii57668 = 1492;
 28610              e.afii57669 = 1493;
 28611              e.afii57670 = 1494;
 28612              e.afii57671 = 1495;
 28613              e.afii57672 = 1496;
 28614              e.afii57673 = 1497;
 28615              e.afii57674 = 1498;
 28616              e.afii57675 = 1499;
 28617              e.afii57676 = 1500;
 28618              e.afii57677 = 1501;
 28619              e.afii57678 = 1502;
 28620              e.afii57679 = 1503;
 28621              e.afii57680 = 1504;
 28622              e.afii57681 = 1505;
 28623              e.afii57682 = 1506;
 28624              e.afii57683 = 1507;
 28625              e.afii57684 = 1508;
 28626              e.afii57685 = 1509;
 28627              e.afii57686 = 1510;
 28628              e.afii57687 = 1511;
 28629              e.afii57688 = 1512;
 28630              e.afii57689 = 1513;
 28631              e.afii57690 = 1514;
 28632              e.afii57694 = 64298;
 28633              e.afii57695 = 64299;
 28634              e.afii57700 = 64331;
 28635              e.afii57705 = 64287;
 28636              e.afii57716 = 1520;
 28637              e.afii57717 = 1521;
 28638              e.afii57718 = 1522;
 28639              e.afii57723 = 64309;
 28640              e.afii57793 = 1460;
 28641              e.afii57794 = 1461;
 28642              e.afii57795 = 1462;
 28643              e.afii57796 = 1467;
 28644              e.afii57797 = 1464;
 28645              e.afii57798 = 1463;
 28646              e.afii57799 = 1456;
 28647              e.afii57800 = 1458;
 28648              e.afii57801 = 1457;
 28649              e.afii57802 = 1459;
 28650              e.afii57803 = 1474;
 28651              e.afii57804 = 1473;
 28652              e.afii57806 = 1465;
 28653              e.afii57807 = 1468;
 28654              e.afii57839 = 1469;
 28655              e.afii57841 = 1471;
 28656              e.afii57842 = 1472;
 28657              e.afii57929 = 700;
 28658              e.afii61248 = 8453;
 28659              e.afii61289 = 8467;
 28660              e.afii61352 = 8470;
 28661              e.afii61573 = 8236;
 28662              e.afii61574 = 8237;
 28663              e.afii61575 = 8238;
 28664              e.afii61664 = 8204;
 28665              e.afii63167 = 1645;
 28666              e.afii64937 = 701;
 28667              e.agrave = 224;
 28668              e.agujarati = 2693;
 28669              e.agurmukhi = 2565;
 28670              e.ahiragana = 12354;
 28671              e.ahookabove = 7843;
 28672              e.aibengali = 2448;
 28673              e.aibopomofo = 12574;
 28674              e.aideva = 2320;
 28675              e.aiecyrillic = 1237;
 28676              e.aigujarati = 2704;
 28677              e.aigurmukhi = 2576;
 28678              e.aimatragurmukhi = 2632;
 28679              e.ainarabic = 1593;
 28680              e.ainfinalarabic = 65226;
 28681              e.aininitialarabic = 65227;
 28682              e.ainmedialarabic = 65228;
 28683              e.ainvertedbreve = 515;
 28684              e.aivowelsignbengali = 2504;
 28685              e.aivowelsigndeva = 2376;
 28686              e.aivowelsigngujarati = 2760;
 28687              e.akatakana = 12450;
 28688              e.akatakanahalfwidth = 65393;
 28689              e.akorean = 12623;
 28690              e.alef = 1488;
 28691              e.alefarabic = 1575;
 28692              e.alefdageshhebrew = 64304;
 28693              e.aleffinalarabic = 65166;
 28694              e.alefhamzaabovearabic = 1571;
 28695              e.alefhamzaabovefinalarabic = 65156;
 28696              e.alefhamzabelowarabic = 1573;
 28697              e.alefhamzabelowfinalarabic = 65160;
 28698              e.alefhebrew = 1488;
 28699              e.aleflamedhebrew = 64335;
 28700              e.alefmaddaabovearabic = 1570;
 28701              e.alefmaddaabovefinalarabic = 65154;
 28702              e.alefmaksuraarabic = 1609;
 28703              e.alefmaksurafinalarabic = 65264;
 28704              e.alefmaksurainitialarabic = 65267;
 28705              e.alefmaksuramedialarabic = 65268;
 28706              e.alefpatahhebrew = 64302;
 28707              e.alefqamatshebrew = 64303;
 28708              e.aleph = 8501;
 28709              e.allequal = 8780;
 28710              e.alpha = 945;
 28711              e.alphatonos = 940;
 28712              e.amacron = 257;
 28713              e.amonospace = 65345;
 28714              e.ampersand = 38;
 28715              e.ampersandmonospace = 65286;
 28716              e.ampersandsmall = 63270;
 28717              e.amsquare = 13250;
 28718              e.anbopomofo = 12578;
 28719              e.angbopomofo = 12580;
 28720              e.angbracketleft = 12296;
 28721              e.angbracketright = 12297;
 28722              e.angkhankhuthai = 3674;
 28723              e.angle = 8736;
 28724              e.anglebracketleft = 12296;
 28725              e.anglebracketleftvertical = 65087;
 28726              e.anglebracketright = 12297;
 28727              e.anglebracketrightvertical = 65088;
 28728              e.angleleft = 9001;
 28729              e.angleright = 9002;
 28730              e.angstrom = 8491;
 28731              e.anoteleia = 903;
 28732              e.anudattadeva = 2386;
 28733              e.anusvarabengali = 2434;
 28734              e.anusvaradeva = 2306;
 28735              e.anusvaragujarati = 2690;
 28736              e.aogonek = 261;
 28737              e.apaatosquare = 13056;
 28738              e.aparen = 9372;
 28739              e.apostrophearmenian = 1370;
 28740              e.apostrophemod = 700;
 28741              e.apple = 63743;
 28742              e.approaches = 8784;
 28743              e.approxequal = 8776;
 28744              e.approxequalorimage = 8786;
 28745              e.approximatelyequal = 8773;
 28746              e.araeaekorean = 12686;
 28747              e.araeakorean = 12685;
 28748              e.arc = 8978;
 28749              e.arighthalfring = 7834;
 28750              e.aring = 229;
 28751              e.aringacute = 507;
 28752              e.aringbelow = 7681;
 28753              e.arrowboth = 8596;
 28754              e.arrowdashdown = 8675;
 28755              e.arrowdashleft = 8672;
 28756              e.arrowdashright = 8674;
 28757              e.arrowdashup = 8673;
 28758              e.arrowdblboth = 8660;
 28759              e.arrowdbldown = 8659;
 28760              e.arrowdblleft = 8656;
 28761              e.arrowdblright = 8658;
 28762              e.arrowdblup = 8657;
 28763              e.arrowdown = 8595;
 28764              e.arrowdownleft = 8601;
 28765              e.arrowdownright = 8600;
 28766              e.arrowdownwhite = 8681;
 28767              e.arrowheaddownmod = 709;
 28768              e.arrowheadleftmod = 706;
 28769              e.arrowheadrightmod = 707;
 28770              e.arrowheadupmod = 708;
 28771              e.arrowhorizex = 63719;
 28772              e.arrowleft = 8592;
 28773              e.arrowleftdbl = 8656;
 28774              e.arrowleftdblstroke = 8653;
 28775              e.arrowleftoverright = 8646;
 28776              e.arrowleftwhite = 8678;
 28777              e.arrowright = 8594;
 28778              e.arrowrightdblstroke = 8655;
 28779              e.arrowrightheavy = 10142;
 28780              e.arrowrightoverleft = 8644;
 28781              e.arrowrightwhite = 8680;
 28782              e.arrowtableft = 8676;
 28783              e.arrowtabright = 8677;
 28784              e.arrowup = 8593;
 28785              e.arrowupdn = 8597;
 28786              e.arrowupdnbse = 8616;
 28787              e.arrowupdownbase = 8616;
 28788              e.arrowupleft = 8598;
 28789              e.arrowupleftofdown = 8645;
 28790              e.arrowupright = 8599;
 28791              e.arrowupwhite = 8679;
 28792              e.arrowvertex = 63718;
 28793              e.asciicircum = 94;
 28794              e.asciicircummonospace = 65342;
 28795              e.asciitilde = 126;
 28796              e.asciitildemonospace = 65374;
 28797              e.ascript = 593;
 28798              e.ascriptturned = 594;
 28799              e.asmallhiragana = 12353;
 28800              e.asmallkatakana = 12449;
 28801              e.asmallkatakanahalfwidth = 65383;
 28802              e.asterisk = 42;
 28803              e.asteriskaltonearabic = 1645;
 28804              e.asteriskarabic = 1645;
 28805              e.asteriskmath = 8727;
 28806              e.asteriskmonospace = 65290;
 28807              e.asterisksmall = 65121;
 28808              e.asterism = 8258;
 28809              e.asuperior = 63209;
 28810              e.asymptoticallyequal = 8771;
 28811              e.at = 64;
 28812              e.atilde = 227;
 28813              e.atmonospace = 65312;
 28814              e.atsmall = 65131;
 28815              e.aturned = 592;
 28816              e.aubengali = 2452;
 28817              e.aubopomofo = 12576;
 28818              e.audeva = 2324;
 28819              e.augujarati = 2708;
 28820              e.augurmukhi = 2580;
 28821              e.aulengthmarkbengali = 2519;
 28822              e.aumatragurmukhi = 2636;
 28823              e.auvowelsignbengali = 2508;
 28824              e.auvowelsigndeva = 2380;
 28825              e.auvowelsigngujarati = 2764;
 28826              e.avagrahadeva = 2365;
 28827              e.aybarmenian = 1377;
 28828              e.ayin = 1506;
 28829              e.ayinaltonehebrew = 64288;
 28830              e.ayinhebrew = 1506;
 28831              e.b = 98;
 28832              e.babengali = 2476;
 28833              e.backslash = 92;
 28834              e.backslashmonospace = 65340;
 28835              e.badeva = 2348;
 28836              e.bagujarati = 2732;
 28837              e.bagurmukhi = 2604;
 28838              e.bahiragana = 12400;
 28839              e.bahtthai = 3647;
 28840              e.bakatakana = 12496;
 28841              e.bar = 124;
 28842              e.barmonospace = 65372;
 28843              e.bbopomofo = 12549;
 28844              e.bcircle = 9425;
 28845              e.bdotaccent = 7683;
 28846              e.bdotbelow = 7685;
 28847              e.beamedsixteenthnotes = 9836;
 28848              e.because = 8757;
 28849              e.becyrillic = 1073;
 28850              e.beharabic = 1576;
 28851              e.behfinalarabic = 65168;
 28852              e.behinitialarabic = 65169;
 28853              e.behiragana = 12409;
 28854              e.behmedialarabic = 65170;
 28855              e.behmeeminitialarabic = 64671;
 28856              e.behmeemisolatedarabic = 64520;
 28857              e.behnoonfinalarabic = 64621;
 28858              e.bekatakana = 12505;
 28859              e.benarmenian = 1378;
 28860              e.bet = 1489;
 28861              e.beta = 946;
 28862              e.betasymbolgreek = 976;
 28863              e.betdagesh = 64305;
 28864              e.betdageshhebrew = 64305;
 28865              e.bethebrew = 1489;
 28866              e.betrafehebrew = 64332;
 28867              e.bhabengali = 2477;
 28868              e.bhadeva = 2349;
 28869              e.bhagujarati = 2733;
 28870              e.bhagurmukhi = 2605;
 28871              e.bhook = 595;
 28872              e.bihiragana = 12403;
 28873              e.bikatakana = 12499;
 28874              e.bilabialclick = 664;
 28875              e.bindigurmukhi = 2562;
 28876              e.birusquare = 13105;
 28877              e.blackcircle = 9679;
 28878              e.blackdiamond = 9670;
 28879              e.blackdownpointingtriangle = 9660;
 28880              e.blackleftpointingpointer = 9668;
 28881              e.blackleftpointingtriangle = 9664;
 28882              e.blacklenticularbracketleft = 12304;
 28883              e.blacklenticularbracketleftvertical = 65083;
 28884              e.blacklenticularbracketright = 12305;
 28885              e.blacklenticularbracketrightvertical = 65084;
 28886              e.blacklowerlefttriangle = 9699;
 28887              e.blacklowerrighttriangle = 9698;
 28888              e.blackrectangle = 9644;
 28889              e.blackrightpointingpointer = 9658;
 28890              e.blackrightpointingtriangle = 9654;
 28891              e.blacksmallsquare = 9642;
 28892              e.blacksmilingface = 9787;
 28893              e.blacksquare = 9632;
 28894              e.blackstar = 9733;
 28895              e.blackupperlefttriangle = 9700;
 28896              e.blackupperrighttriangle = 9701;
 28897              e.blackuppointingsmalltriangle = 9652;
 28898              e.blackuppointingtriangle = 9650;
 28899              e.blank = 9251;
 28900              e.blinebelow = 7687;
 28901              e.block = 9608;
 28902              e.bmonospace = 65346;
 28903              e.bobaimaithai = 3610;
 28904              e.bohiragana = 12412;
 28905              e.bokatakana = 12508;
 28906              e.bparen = 9373;
 28907              e.bqsquare = 13251;
 28908              e.braceex = 63732;
 28909              e.braceleft = 123;
 28910              e.braceleftbt = 63731;
 28911              e.braceleftmid = 63730;
 28912              e.braceleftmonospace = 65371;
 28913              e.braceleftsmall = 65115;
 28914              e.bracelefttp = 63729;
 28915              e.braceleftvertical = 65079;
 28916              e.braceright = 125;
 28917              e.bracerightbt = 63742;
 28918              e.bracerightmid = 63741;
 28919              e.bracerightmonospace = 65373;
 28920              e.bracerightsmall = 65116;
 28921              e.bracerighttp = 63740;
 28922              e.bracerightvertical = 65080;
 28923              e.bracketleft = 91;
 28924              e.bracketleftbt = 63728;
 28925              e.bracketleftex = 63727;
 28926              e.bracketleftmonospace = 65339;
 28927              e.bracketlefttp = 63726;
 28928              e.bracketright = 93;
 28929              e.bracketrightbt = 63739;
 28930              e.bracketrightex = 63738;
 28931              e.bracketrightmonospace = 65341;
 28932              e.bracketrighttp = 63737;
 28933              e.breve = 728;
 28934              e.brevebelowcmb = 814;
 28935              e.brevecmb = 774;
 28936              e.breveinvertedbelowcmb = 815;
 28937              e.breveinvertedcmb = 785;
 28938              e.breveinverteddoublecmb = 865;
 28939              e.bridgebelowcmb = 810;
 28940              e.bridgeinvertedbelowcmb = 826;
 28941              e.brokenbar = 166;
 28942              e.bstroke = 384;
 28943              e.bsuperior = 63210;
 28944              e.btopbar = 387;
 28945              e.buhiragana = 12406;
 28946              e.bukatakana = 12502;
 28947              e.bullet = 8226;
 28948              e.bulletinverse = 9688;
 28949              e.bulletoperator = 8729;
 28950              e.bullseye = 9678;
 28951              e.c = 99;
 28952              e.caarmenian = 1390;
 28953              e.cabengali = 2458;
 28954              e.cacute = 263;
 28955              e.cadeva = 2330;
 28956              e.cagujarati = 2714;
 28957              e.cagurmukhi = 2586;
 28958              e.calsquare = 13192;
 28959              e.candrabindubengali = 2433;
 28960              e.candrabinducmb = 784;
 28961              e.candrabindudeva = 2305;
 28962              e.candrabindugujarati = 2689;
 28963              e.capslock = 8682;
 28964              e.careof = 8453;
 28965              e.caron = 711;
 28966              e.caronbelowcmb = 812;
 28967              e.caroncmb = 780;
 28968              e.carriagereturn = 8629;
 28969              e.cbopomofo = 12568;
 28970              e.ccaron = 269;
 28971              e.ccedilla = 231;
 28972              e.ccedillaacute = 7689;
 28973              e.ccircle = 9426;
 28974              e.ccircumflex = 265;
 28975              e.ccurl = 597;
 28976              e.cdot = 267;
 28977              e.cdotaccent = 267;
 28978              e.cdsquare = 13253;
 28979              e.cedilla = 184;
 28980              e.cedillacmb = 807;
 28981              e.cent = 162;
 28982              e.centigrade = 8451;
 28983              e.centinferior = 63199;
 28984              e.centmonospace = 65504;
 28985              e.centoldstyle = 63394;
 28986              e.centsuperior = 63200;
 28987              e.chaarmenian = 1401;
 28988              e.chabengali = 2459;
 28989              e.chadeva = 2331;
 28990              e.chagujarati = 2715;
 28991              e.chagurmukhi = 2587;
 28992              e.chbopomofo = 12564;
 28993              e.cheabkhasiancyrillic = 1213;
 28994              e.checkmark = 10003;
 28995              e.checyrillic = 1095;
 28996              e.chedescenderabkhasiancyrillic = 1215;
 28997              e.chedescendercyrillic = 1207;
 28998              e.chedieresiscyrillic = 1269;
 28999              e.cheharmenian = 1395;
 29000              e.chekhakassiancyrillic = 1228;
 29001              e.cheverticalstrokecyrillic = 1209;
 29002              e.chi = 967;
 29003              e.chieuchacirclekorean = 12919;
 29004              e.chieuchaparenkorean = 12823;
 29005              e.chieuchcirclekorean = 12905;
 29006              e.chieuchkorean = 12618;
 29007              e.chieuchparenkorean = 12809;
 29008              e.chochangthai = 3594;
 29009              e.chochanthai = 3592;
 29010              e.chochingthai = 3593;
 29011              e.chochoethai = 3596;
 29012              e.chook = 392;
 29013              e.cieucacirclekorean = 12918;
 29014              e.cieucaparenkorean = 12822;
 29015              e.cieuccirclekorean = 12904;
 29016              e.cieuckorean = 12616;
 29017              e.cieucparenkorean = 12808;
 29018              e.cieucuparenkorean = 12828;
 29019              e.circle = 9675;
 29020              e.circlecopyrt = 169;
 29021              e.circlemultiply = 8855;
 29022              e.circleot = 8857;
 29023              e.circleplus = 8853;
 29024              e.circlepostalmark = 12342;
 29025              e.circlewithlefthalfblack = 9680;
 29026              e.circlewithrighthalfblack = 9681;
 29027              e.circumflex = 710;
 29028              e.circumflexbelowcmb = 813;
 29029              e.circumflexcmb = 770;
 29030              e.clear = 8999;
 29031              e.clickalveolar = 450;
 29032              e.clickdental = 448;
 29033              e.clicklateral = 449;
 29034              e.clickretroflex = 451;
 29035              e.club = 9827;
 29036              e.clubsuitblack = 9827;
 29037              e.clubsuitwhite = 9831;
 29038              e.cmcubedsquare = 13220;
 29039              e.cmonospace = 65347;
 29040              e.cmsquaredsquare = 13216;
 29041              e.coarmenian = 1409;
 29042              e.colon = 58;
 29043              e.colonmonetary = 8353;
 29044              e.colonmonospace = 65306;
 29045              e.colonsign = 8353;
 29046              e.colonsmall = 65109;
 29047              e.colontriangularhalfmod = 721;
 29048              e.colontriangularmod = 720;
 29049              e.comma = 44;
 29050              e.commaabovecmb = 787;
 29051              e.commaaboverightcmb = 789;
 29052              e.commaaccent = 63171;
 29053              e.commaarabic = 1548;
 29054              e.commaarmenian = 1373;
 29055              e.commainferior = 63201;
 29056              e.commamonospace = 65292;
 29057              e.commareversedabovecmb = 788;
 29058              e.commareversedmod = 701;
 29059              e.commasmall = 65104;
 29060              e.commasuperior = 63202;
 29061              e.commaturnedabovecmb = 786;
 29062              e.commaturnedmod = 699;
 29063              e.compass = 9788;
 29064              e.congruent = 8773;
 29065              e.contourintegral = 8750;
 29066              e.control = 8963;
 29067              e.controlACK = 6;
 29068              e.controlBEL = 7;
 29069              e.controlBS = 8;
 29070              e.controlCAN = 24;
 29071              e.controlCR = 13;
 29072              e.controlDC1 = 17;
 29073              e.controlDC2 = 18;
 29074              e.controlDC3 = 19;
 29075              e.controlDC4 = 20;
 29076              e.controlDEL = 127;
 29077              e.controlDLE = 16;
 29078              e.controlEM = 25;
 29079              e.controlENQ = 5;
 29080              e.controlEOT = 4;
 29081              e.controlESC = 27;
 29082              e.controlETB = 23;
 29083              e.controlETX = 3;
 29084              e.controlFF = 12;
 29085              e.controlFS = 28;
 29086              e.controlGS = 29;
 29087              e.controlHT = 9;
 29088              e.controlLF = 10;
 29089              e.controlNAK = 21;
 29090              e.controlNULL = 0;
 29091              e.controlRS = 30;
 29092              e.controlSI = 15;
 29093              e.controlSO = 14;
 29094              e.controlSOT = 2;
 29095              e.controlSTX = 1;
 29096              e.controlSUB = 26;
 29097              e.controlSYN = 22;
 29098              e.controlUS = 31;
 29099              e.controlVT = 11;
 29100              e.copyright = 169;
 29101              e.copyrightsans = 63721;
 29102              e.copyrightserif = 63193;
 29103              e.cornerbracketleft = 12300;
 29104              e.cornerbracketlefthalfwidth = 65378;
 29105              e.cornerbracketleftvertical = 65089;
 29106              e.cornerbracketright = 12301;
 29107              e.cornerbracketrighthalfwidth = 65379;
 29108              e.cornerbracketrightvertical = 65090;
 29109              e.corporationsquare = 13183;
 29110              e.cosquare = 13255;
 29111              e.coverkgsquare = 13254;
 29112              e.cparen = 9374;
 29113              e.cruzeiro = 8354;
 29114              e.cstretched = 663;
 29115              e.curlyand = 8911;
 29116              e.curlyor = 8910;
 29117              e.currency = 164;
 29118              e.cyrBreve = 63185;
 29119              e.cyrFlex = 63186;
 29120              e.cyrbreve = 63188;
 29121              e.cyrflex = 63189;
 29122              e.d = 100;
 29123              e.daarmenian = 1380;
 29124              e.dabengali = 2470;
 29125              e.dadarabic = 1590;
 29126              e.dadeva = 2342;
 29127              e.dadfinalarabic = 65214;
 29128              e.dadinitialarabic = 65215;
 29129              e.dadmedialarabic = 65216;
 29130              e.dagesh = 1468;
 29131              e.dageshhebrew = 1468;
 29132              e.dagger = 8224;
 29133              e.daggerdbl = 8225;
 29134              e.dagujarati = 2726;
 29135              e.dagurmukhi = 2598;
 29136              e.dahiragana = 12384;
 29137              e.dakatakana = 12480;
 29138              e.dalarabic = 1583;
 29139              e.dalet = 1491;
 29140              e.daletdagesh = 64307;
 29141              e.daletdageshhebrew = 64307;
 29142              e.dalethebrew = 1491;
 29143              e.dalfinalarabic = 65194;
 29144              e.dammaarabic = 1615;
 29145              e.dammalowarabic = 1615;
 29146              e.dammatanaltonearabic = 1612;
 29147              e.dammatanarabic = 1612;
 29148              e.danda = 2404;
 29149              e.dargahebrew = 1447;
 29150              e.dargalefthebrew = 1447;
 29151              e.dasiapneumatacyrilliccmb = 1157;
 29152              e.dblGrave = 63187;
 29153              e.dblanglebracketleft = 12298;
 29154              e.dblanglebracketleftvertical = 65085;
 29155              e.dblanglebracketright = 12299;
 29156              e.dblanglebracketrightvertical = 65086;
 29157              e.dblarchinvertedbelowcmb = 811;
 29158              e.dblarrowleft = 8660;
 29159              e.dblarrowright = 8658;
 29160              e.dbldanda = 2405;
 29161              e.dblgrave = 63190;
 29162              e.dblgravecmb = 783;
 29163              e.dblintegral = 8748;
 29164              e.dbllowline = 8215;
 29165              e.dbllowlinecmb = 819;
 29166              e.dbloverlinecmb = 831;
 29167              e.dblprimemod = 698;
 29168              e.dblverticalbar = 8214;
 29169              e.dblverticallineabovecmb = 782;
 29170              e.dbopomofo = 12553;
 29171              e.dbsquare = 13256;
 29172              e.dcaron = 271;
 29173              e.dcedilla = 7697;
 29174              e.dcircle = 9427;
 29175              e.dcircumflexbelow = 7699;
 29176              e.dcroat = 273;
 29177              e.ddabengali = 2465;
 29178              e.ddadeva = 2337;
 29179              e.ddagujarati = 2721;
 29180              e.ddagurmukhi = 2593;
 29181              e.ddalarabic = 1672;
 29182              e.ddalfinalarabic = 64393;
 29183              e.dddhadeva = 2396;
 29184              e.ddhabengali = 2466;
 29185              e.ddhadeva = 2338;
 29186              e.ddhagujarati = 2722;
 29187              e.ddhagurmukhi = 2594;
 29188              e.ddotaccent = 7691;
 29189              e.ddotbelow = 7693;
 29190              e.decimalseparatorarabic = 1643;
 29191              e.decimalseparatorpersian = 1643;
 29192              e.decyrillic = 1076;
 29193              e.degree = 176;
 29194              e.dehihebrew = 1453;
 29195              e.dehiragana = 12391;
 29196              e.deicoptic = 1007;
 29197              e.dekatakana = 12487;
 29198              e.deleteleft = 9003;
 29199              e.deleteright = 8998;
 29200              e.delta = 948;
 29201              e.deltaturned = 397;
 29202              e.denominatorminusonenumeratorbengali = 2552;
 29203              e.dezh = 676;
 29204              e.dhabengali = 2471;
 29205              e.dhadeva = 2343;
 29206              e.dhagujarati = 2727;
 29207              e.dhagurmukhi = 2599;
 29208              e.dhook = 599;
 29209              e.dialytikatonos = 901;
 29210              e.dialytikatonoscmb = 836;
 29211              e.diamond = 9830;
 29212              e.diamondsuitwhite = 9826;
 29213              e.dieresis = 168;
 29214              e.dieresisacute = 63191;
 29215              e.dieresisbelowcmb = 804;
 29216              e.dieresiscmb = 776;
 29217              e.dieresisgrave = 63192;
 29218              e.dieresistonos = 901;
 29219              e.dihiragana = 12386;
 29220              e.dikatakana = 12482;
 29221              e.dittomark = 12291;
 29222              e.divide = 247;
 29223              e.divides = 8739;
 29224              e.divisionslash = 8725;
 29225              e.djecyrillic = 1106;
 29226              e.dkshade = 9619;
 29227              e.dlinebelow = 7695;
 29228              e.dlsquare = 13207;
 29229              e.dmacron = 273;
 29230              e.dmonospace = 65348;
 29231              e.dnblock = 9604;
 29232              e.dochadathai = 3598;
 29233              e.dodekthai = 3604;
 29234              e.dohiragana = 12393;
 29235              e.dokatakana = 12489;
 29236              e.dollar = 36;
 29237              e.dollarinferior = 63203;
 29238              e.dollarmonospace = 65284;
 29239              e.dollaroldstyle = 63268;
 29240              e.dollarsmall = 65129;
 29241              e.dollarsuperior = 63204;
 29242              e.dong = 8363;
 29243              e.dorusquare = 13094;
 29244              e.dotaccent = 729;
 29245              e.dotaccentcmb = 775;
 29246              e.dotbelowcmb = 803;
 29247              e.dotbelowcomb = 803;
 29248              e.dotkatakana = 12539;
 29249              e.dotlessi = 305;
 29250              e.dotlessj = 63166;
 29251              e.dotlessjstrokehook = 644;
 29252              e.dotmath = 8901;
 29253              e.dottedcircle = 9676;
 29254              e.doubleyodpatah = 64287;
 29255              e.doubleyodpatahhebrew = 64287;
 29256              e.downtackbelowcmb = 798;
 29257              e.downtackmod = 725;
 29258              e.dparen = 9375;
 29259              e.dsuperior = 63211;
 29260              e.dtail = 598;
 29261              e.dtopbar = 396;
 29262              e.duhiragana = 12389;
 29263              e.dukatakana = 12485;
 29264              e.dz = 499;
 29265              e.dzaltone = 675;
 29266              e.dzcaron = 454;
 29267              e.dzcurl = 677;
 29268              e.dzeabkhasiancyrillic = 1249;
 29269              e.dzecyrillic = 1109;
 29270              e.dzhecyrillic = 1119;
 29271              e.e = 101;
 29272              e.eacute = 233;
 29273              e.earth = 9793;
 29274              e.ebengali = 2447;
 29275              e.ebopomofo = 12572;
 29276              e.ebreve = 277;
 29277              e.ecandradeva = 2317;
 29278              e.ecandragujarati = 2701;
 29279              e.ecandravowelsigndeva = 2373;
 29280              e.ecandravowelsigngujarati = 2757;
 29281              e.ecaron = 283;
 29282              e.ecedillabreve = 7709;
 29283              e.echarmenian = 1381;
 29284              e.echyiwnarmenian = 1415;
 29285              e.ecircle = 9428;
 29286              e.ecircumflex = 234;
 29287              e.ecircumflexacute = 7871;
 29288              e.ecircumflexbelow = 7705;
 29289              e.ecircumflexdotbelow = 7879;
 29290              e.ecircumflexgrave = 7873;
 29291              e.ecircumflexhookabove = 7875;
 29292              e.ecircumflextilde = 7877;
 29293              e.ecyrillic = 1108;
 29294              e.edblgrave = 517;
 29295              e.edeva = 2319;
 29296              e.edieresis = 235;
 29297              e.edot = 279;
 29298              e.edotaccent = 279;
 29299              e.edotbelow = 7865;
 29300              e.eegurmukhi = 2575;
 29301              e.eematragurmukhi = 2631;
 29302              e.efcyrillic = 1092;
 29303              e.egrave = 232;
 29304              e.egujarati = 2703;
 29305              e.eharmenian = 1383;
 29306              e.ehbopomofo = 12573;
 29307              e.ehiragana = 12360;
 29308              e.ehookabove = 7867;
 29309              e.eibopomofo = 12575;
 29310              e.eight = 56;
 29311              e.eightarabic = 1640;
 29312              e.eightbengali = 2542;
 29313              e.eightcircle = 9319;
 29314              e.eightcircleinversesansserif = 10129;
 29315              e.eightdeva = 2414;
 29316              e.eighteencircle = 9329;
 29317              e.eighteenparen = 9349;
 29318              e.eighteenperiod = 9369;
 29319              e.eightgujarati = 2798;
 29320              e.eightgurmukhi = 2670;
 29321              e.eighthackarabic = 1640;
 29322              e.eighthangzhou = 12328;
 29323              e.eighthnotebeamed = 9835;
 29324              e.eightideographicparen = 12839;
 29325              e.eightinferior = 8328;
 29326              e.eightmonospace = 65304;
 29327              e.eightoldstyle = 63288;
 29328              e.eightparen = 9339;
 29329              e.eightperiod = 9359;
 29330              e.eightpersian = 1784;
 29331              e.eightroman = 8567;
 29332              e.eightsuperior = 8312;
 29333              e.eightthai = 3672;
 29334              e.einvertedbreve = 519;
 29335              e.eiotifiedcyrillic = 1125;
 29336              e.ekatakana = 12456;
 29337              e.ekatakanahalfwidth = 65396;
 29338              e.ekonkargurmukhi = 2676;
 29339              e.ekorean = 12628;
 29340              e.elcyrillic = 1083;
 29341              e.element = 8712;
 29342              e.elevencircle = 9322;
 29343              e.elevenparen = 9342;
 29344              e.elevenperiod = 9362;
 29345              e.elevenroman = 8570;
 29346              e.ellipsis = 8230;
 29347              e.ellipsisvertical = 8942;
 29348              e.emacron = 275;
 29349              e.emacronacute = 7703;
 29350              e.emacrongrave = 7701;
 29351              e.emcyrillic = 1084;
 29352              e.emdash = 8212;
 29353              e.emdashvertical = 65073;
 29354              e.emonospace = 65349;
 29355              e.emphasismarkarmenian = 1371;
 29356              e.emptyset = 8709;
 29357              e.enbopomofo = 12579;
 29358              e.encyrillic = 1085;
 29359              e.endash = 8211;
 29360              e.endashvertical = 65074;
 29361              e.endescendercyrillic = 1187;
 29362              e.eng = 331;
 29363              e.engbopomofo = 12581;
 29364              e.enghecyrillic = 1189;
 29365              e.enhookcyrillic = 1224;
 29366              e.enspace = 8194;
 29367              e.eogonek = 281;
 29368              e.eokorean = 12627;
 29369              e.eopen = 603;
 29370              e.eopenclosed = 666;
 29371              e.eopenreversed = 604;
 29372              e.eopenreversedclosed = 606;
 29373              e.eopenreversedhook = 605;
 29374              e.eparen = 9376;
 29375              e.epsilon = 949;
 29376              e.epsilontonos = 941;
 29377              e.equal = 61;
 29378              e.equalmonospace = 65309;
 29379              e.equalsmall = 65126;
 29380              e.equalsuperior = 8316;
 29381              e.equivalence = 8801;
 29382              e.erbopomofo = 12582;
 29383              e.ercyrillic = 1088;
 29384              e.ereversed = 600;
 29385              e.ereversedcyrillic = 1101;
 29386              e.escyrillic = 1089;
 29387              e.esdescendercyrillic = 1195;
 29388              e.esh = 643;
 29389              e.eshcurl = 646;
 29390              e.eshortdeva = 2318;
 29391              e.eshortvowelsigndeva = 2374;
 29392              e.eshreversedloop = 426;
 29393              e.eshsquatreversed = 645;
 29394              e.esmallhiragana = 12359;
 29395              e.esmallkatakana = 12455;
 29396              e.esmallkatakanahalfwidth = 65386;
 29397              e.estimated = 8494;
 29398              e.esuperior = 63212;
 29399              e.eta = 951;
 29400              e.etarmenian = 1384;
 29401              e.etatonos = 942;
 29402              e.eth = 240;
 29403              e.etilde = 7869;
 29404              e.etildebelow = 7707;
 29405              e.etnahtafoukhhebrew = 1425;
 29406              e.etnahtafoukhlefthebrew = 1425;
 29407              e.etnahtahebrew = 1425;
 29408              e.etnahtalefthebrew = 1425;
 29409              e.eturned = 477;
 29410              e.eukorean = 12641;
 29411              e.euro = 8364;
 29412              e.evowelsignbengali = 2503;
 29413              e.evowelsigndeva = 2375;
 29414              e.evowelsigngujarati = 2759;
 29415              e.exclam = 33;
 29416              e.exclamarmenian = 1372;
 29417              e.exclamdbl = 8252;
 29418              e.exclamdown = 161;
 29419              e.exclamdownsmall = 63393;
 29420              e.exclammonospace = 65281;
 29421              e.exclamsmall = 63265;
 29422              e.existential = 8707;
 29423              e.ezh = 658;
 29424              e.ezhcaron = 495;
 29425              e.ezhcurl = 659;
 29426              e.ezhreversed = 441;
 29427              e.ezhtail = 442;
 29428              e.f = 102;
 29429              e.fadeva = 2398;
 29430              e.fagurmukhi = 2654;
 29431              e.fahrenheit = 8457;
 29432              e.fathaarabic = 1614;
 29433              e.fathalowarabic = 1614;
 29434              e.fathatanarabic = 1611;
 29435              e.fbopomofo = 12552;
 29436              e.fcircle = 9429;
 29437              e.fdotaccent = 7711;
 29438              e.feharabic = 1601;
 29439              e.feharmenian = 1414;
 29440              e.fehfinalarabic = 65234;
 29441              e.fehinitialarabic = 65235;
 29442              e.fehmedialarabic = 65236;
 29443              e.feicoptic = 997;
 29444              e.female = 9792;
 29445              e.ff = 64256;
 29446              e.f_f = 64256;
 29447              e.ffi = 64259;
 29448              e.f_f_i = 64259;
 29449              e.ffl = 64260;
 29450              e.f_f_l = 64260;
 29451              e.fi = 64257;
 29452              e.f_i = 64257;
 29453              e.fifteencircle = 9326;
 29454              e.fifteenparen = 9346;
 29455              e.fifteenperiod = 9366;
 29456              e.figuredash = 8210;
 29457              e.filledbox = 9632;
 29458              e.filledrect = 9644;
 29459              e.finalkaf = 1498;
 29460              e.finalkafdagesh = 64314;
 29461              e.finalkafdageshhebrew = 64314;
 29462              e.finalkafhebrew = 1498;
 29463              e.finalmem = 1501;
 29464              e.finalmemhebrew = 1501;
 29465              e.finalnun = 1503;
 29466              e.finalnunhebrew = 1503;
 29467              e.finalpe = 1507;
 29468              e.finalpehebrew = 1507;
 29469              e.finaltsadi = 1509;
 29470              e.finaltsadihebrew = 1509;
 29471              e.firsttonechinese = 713;
 29472              e.fisheye = 9673;
 29473              e.fitacyrillic = 1139;
 29474              e.five = 53;
 29475              e.fivearabic = 1637;
 29476              e.fivebengali = 2539;
 29477              e.fivecircle = 9316;
 29478              e.fivecircleinversesansserif = 10126;
 29479              e.fivedeva = 2411;
 29480              e.fiveeighths = 8541;
 29481              e.fivegujarati = 2795;
 29482              e.fivegurmukhi = 2667;
 29483              e.fivehackarabic = 1637;
 29484              e.fivehangzhou = 12325;
 29485              e.fiveideographicparen = 12836;
 29486              e.fiveinferior = 8325;
 29487              e.fivemonospace = 65301;
 29488              e.fiveoldstyle = 63285;
 29489              e.fiveparen = 9336;
 29490              e.fiveperiod = 9356;
 29491              e.fivepersian = 1781;
 29492              e.fiveroman = 8564;
 29493              e.fivesuperior = 8309;
 29494              e.fivethai = 3669;
 29495              e.fl = 64258;
 29496              e.f_l = 64258;
 29497              e.florin = 402;
 29498              e.fmonospace = 65350;
 29499              e.fmsquare = 13209;
 29500              e.fofanthai = 3615;
 29501              e.fofathai = 3613;
 29502              e.fongmanthai = 3663;
 29503              e.forall = 8704;
 29504              e.four = 52;
 29505              e.fourarabic = 1636;
 29506              e.fourbengali = 2538;
 29507              e.fourcircle = 9315;
 29508              e.fourcircleinversesansserif = 10125;
 29509              e.fourdeva = 2410;
 29510              e.fourgujarati = 2794;
 29511              e.fourgurmukhi = 2666;
 29512              e.fourhackarabic = 1636;
 29513              e.fourhangzhou = 12324;
 29514              e.fourideographicparen = 12835;
 29515              e.fourinferior = 8324;
 29516              e.fourmonospace = 65300;
 29517              e.fournumeratorbengali = 2551;
 29518              e.fouroldstyle = 63284;
 29519              e.fourparen = 9335;
 29520              e.fourperiod = 9355;
 29521              e.fourpersian = 1780;
 29522              e.fourroman = 8563;
 29523              e.foursuperior = 8308;
 29524              e.fourteencircle = 9325;
 29525              e.fourteenparen = 9345;
 29526              e.fourteenperiod = 9365;
 29527              e.fourthai = 3668;
 29528              e.fourthtonechinese = 715;
 29529              e.fparen = 9377;
 29530              e.fraction = 8260;
 29531              e.franc = 8355;
 29532              e.g = 103;
 29533              e.gabengali = 2455;
 29534              e.gacute = 501;
 29535              e.gadeva = 2327;
 29536              e.gafarabic = 1711;
 29537              e.gaffinalarabic = 64403;
 29538              e.gafinitialarabic = 64404;
 29539              e.gafmedialarabic = 64405;
 29540              e.gagujarati = 2711;
 29541              e.gagurmukhi = 2583;
 29542              e.gahiragana = 12364;
 29543              e.gakatakana = 12460;
 29544              e.gamma = 947;
 29545              e.gammalatinsmall = 611;
 29546              e.gammasuperior = 736;
 29547              e.gangiacoptic = 1003;
 29548              e.gbopomofo = 12557;
 29549              e.gbreve = 287;
 29550              e.gcaron = 487;
 29551              e.gcedilla = 291;
 29552              e.gcircle = 9430;
 29553              e.gcircumflex = 285;
 29554              e.gcommaaccent = 291;
 29555              e.gdot = 289;
 29556              e.gdotaccent = 289;
 29557              e.gecyrillic = 1075;
 29558              e.gehiragana = 12370;
 29559              e.gekatakana = 12466;
 29560              e.geometricallyequal = 8785;
 29561              e.gereshaccenthebrew = 1436;
 29562              e.gereshhebrew = 1523;
 29563              e.gereshmuqdamhebrew = 1437;
 29564              e.germandbls = 223;
 29565              e.gershayimaccenthebrew = 1438;
 29566              e.gershayimhebrew = 1524;
 29567              e.getamark = 12307;
 29568              e.ghabengali = 2456;
 29569              e.ghadarmenian = 1394;
 29570              e.ghadeva = 2328;
 29571              e.ghagujarati = 2712;
 29572              e.ghagurmukhi = 2584;
 29573              e.ghainarabic = 1594;
 29574              e.ghainfinalarabic = 65230;
 29575              e.ghaininitialarabic = 65231;
 29576              e.ghainmedialarabic = 65232;
 29577              e.ghemiddlehookcyrillic = 1173;
 29578              e.ghestrokecyrillic = 1171;
 29579              e.gheupturncyrillic = 1169;
 29580              e.ghhadeva = 2394;
 29581              e.ghhagurmukhi = 2650;
 29582              e.ghook = 608;
 29583              e.ghzsquare = 13203;
 29584              e.gihiragana = 12366;
 29585              e.gikatakana = 12462;
 29586              e.gimarmenian = 1379;
 29587              e.gimel = 1490;
 29588              e.gimeldagesh = 64306;
 29589              e.gimeldageshhebrew = 64306;
 29590              e.gimelhebrew = 1490;
 29591              e.gjecyrillic = 1107;
 29592              e.glottalinvertedstroke = 446;
 29593              e.glottalstop = 660;
 29594              e.glottalstopinverted = 662;
 29595              e.glottalstopmod = 704;
 29596              e.glottalstopreversed = 661;
 29597              e.glottalstopreversedmod = 705;
 29598              e.glottalstopreversedsuperior = 740;
 29599              e.glottalstopstroke = 673;
 29600              e.glottalstopstrokereversed = 674;
 29601              e.gmacron = 7713;
 29602              e.gmonospace = 65351;
 29603              e.gohiragana = 12372;
 29604              e.gokatakana = 12468;
 29605              e.gparen = 9378;
 29606              e.gpasquare = 13228;
 29607              e.gradient = 8711;
 29608              e.grave = 96;
 29609              e.gravebelowcmb = 790;
 29610              e.gravecmb = 768;
 29611              e.gravecomb = 768;
 29612              e.gravedeva = 2387;
 29613              e.gravelowmod = 718;
 29614              e.gravemonospace = 65344;
 29615              e.gravetonecmb = 832;
 29616              e.greater = 62;
 29617              e.greaterequal = 8805;
 29618              e.greaterequalorless = 8923;
 29619              e.greatermonospace = 65310;
 29620              e.greaterorequivalent = 8819;
 29621              e.greaterorless = 8823;
 29622              e.greateroverequal = 8807;
 29623              e.greatersmall = 65125;
 29624              e.gscript = 609;
 29625              e.gstroke = 485;
 29626              e.guhiragana = 12368;
 29627              e.guillemotleft = 171;
 29628              e.guillemotright = 187;
 29629              e.guilsinglleft = 8249;
 29630              e.guilsinglright = 8250;
 29631              e.gukatakana = 12464;
 29632              e.guramusquare = 13080;
 29633              e.gysquare = 13257;
 29634              e.h = 104;
 29635              e.haabkhasiancyrillic = 1193;
 29636              e.haaltonearabic = 1729;
 29637              e.habengali = 2489;
 29638              e.hadescendercyrillic = 1203;
 29639              e.hadeva = 2361;
 29640              e.hagujarati = 2745;
 29641              e.hagurmukhi = 2617;
 29642              e.haharabic = 1581;
 29643              e.hahfinalarabic = 65186;
 29644              e.hahinitialarabic = 65187;
 29645              e.hahiragana = 12399;
 29646              e.hahmedialarabic = 65188;
 29647              e.haitusquare = 13098;
 29648              e.hakatakana = 12495;
 29649              e.hakatakanahalfwidth = 65418;
 29650              e.halantgurmukhi = 2637;
 29651              e.hamzaarabic = 1569;
 29652              e.hamzalowarabic = 1569;
 29653              e.hangulfiller = 12644;
 29654              e.hardsigncyrillic = 1098;
 29655              e.harpoonleftbarbup = 8636;
 29656              e.harpoonrightbarbup = 8640;
 29657              e.hasquare = 13258;
 29658              e.hatafpatah = 1458;
 29659              e.hatafpatah16 = 1458;
 29660              e.hatafpatah23 = 1458;
 29661              e.hatafpatah2f = 1458;
 29662              e.hatafpatahhebrew = 1458;
 29663              e.hatafpatahnarrowhebrew = 1458;
 29664              e.hatafpatahquarterhebrew = 1458;
 29665              e.hatafpatahwidehebrew = 1458;
 29666              e.hatafqamats = 1459;
 29667              e.hatafqamats1b = 1459;
 29668              e.hatafqamats28 = 1459;
 29669              e.hatafqamats34 = 1459;
 29670              e.hatafqamatshebrew = 1459;
 29671              e.hatafqamatsnarrowhebrew = 1459;
 29672              e.hatafqamatsquarterhebrew = 1459;
 29673              e.hatafqamatswidehebrew = 1459;
 29674              e.hatafsegol = 1457;
 29675              e.hatafsegol17 = 1457;
 29676              e.hatafsegol24 = 1457;
 29677              e.hatafsegol30 = 1457;
 29678              e.hatafsegolhebrew = 1457;
 29679              e.hatafsegolnarrowhebrew = 1457;
 29680              e.hatafsegolquarterhebrew = 1457;
 29681              e.hatafsegolwidehebrew = 1457;
 29682              e.hbar = 295;
 29683              e.hbopomofo = 12559;
 29684              e.hbrevebelow = 7723;
 29685              e.hcedilla = 7721;
 29686              e.hcircle = 9431;
 29687              e.hcircumflex = 293;
 29688              e.hdieresis = 7719;
 29689              e.hdotaccent = 7715;
 29690              e.hdotbelow = 7717;
 29691              e.he = 1492;
 29692              e.heart = 9829;
 29693              e.heartsuitblack = 9829;
 29694              e.heartsuitwhite = 9825;
 29695              e.hedagesh = 64308;
 29696              e.hedageshhebrew = 64308;
 29697              e.hehaltonearabic = 1729;
 29698              e.heharabic = 1607;
 29699              e.hehebrew = 1492;
 29700              e.hehfinalaltonearabic = 64423;
 29701              e.hehfinalalttwoarabic = 65258;
 29702              e.hehfinalarabic = 65258;
 29703              e.hehhamzaabovefinalarabic = 64421;
 29704              e.hehhamzaaboveisolatedarabic = 64420;
 29705              e.hehinitialaltonearabic = 64424;
 29706              e.hehinitialarabic = 65259;
 29707              e.hehiragana = 12408;
 29708              e.hehmedialaltonearabic = 64425;
 29709              e.hehmedialarabic = 65260;
 29710              e.heiseierasquare = 13179;
 29711              e.hekatakana = 12504;
 29712              e.hekatakanahalfwidth = 65421;
 29713              e.hekutaarusquare = 13110;
 29714              e.henghook = 615;
 29715              e.herutusquare = 13113;
 29716              e.het = 1495;
 29717              e.hethebrew = 1495;
 29718              e.hhook = 614;
 29719              e.hhooksuperior = 689;
 29720              e.hieuhacirclekorean = 12923;
 29721              e.hieuhaparenkorean = 12827;
 29722              e.hieuhcirclekorean = 12909;
 29723              e.hieuhkorean = 12622;
 29724              e.hieuhparenkorean = 12813;
 29725              e.hihiragana = 12402;
 29726              e.hikatakana = 12498;
 29727              e.hikatakanahalfwidth = 65419;
 29728              e.hiriq = 1460;
 29729              e.hiriq14 = 1460;
 29730              e.hiriq21 = 1460;
 29731              e.hiriq2d = 1460;
 29732              e.hiriqhebrew = 1460;
 29733              e.hiriqnarrowhebrew = 1460;
 29734              e.hiriqquarterhebrew = 1460;
 29735              e.hiriqwidehebrew = 1460;
 29736              e.hlinebelow = 7830;
 29737              e.hmonospace = 65352;
 29738              e.hoarmenian = 1392;
 29739              e.hohipthai = 3627;
 29740              e.hohiragana = 12411;
 29741              e.hokatakana = 12507;
 29742              e.hokatakanahalfwidth = 65422;
 29743              e.holam = 1465;
 29744              e.holam19 = 1465;
 29745              e.holam26 = 1465;
 29746              e.holam32 = 1465;
 29747              e.holamhebrew = 1465;
 29748              e.holamnarrowhebrew = 1465;
 29749              e.holamquarterhebrew = 1465;
 29750              e.holamwidehebrew = 1465;
 29751              e.honokhukthai = 3630;
 29752              e.hookabovecomb = 777;
 29753              e.hookcmb = 777;
 29754              e.hookpalatalizedbelowcmb = 801;
 29755              e.hookretroflexbelowcmb = 802;
 29756              e.hoonsquare = 13122;
 29757              e.horicoptic = 1001;
 29758              e.horizontalbar = 8213;
 29759              e.horncmb = 795;
 29760              e.hotsprings = 9832;
 29761              e.house = 8962;
 29762              e.hparen = 9379;
 29763              e.hsuperior = 688;
 29764              e.hturned = 613;
 29765              e.huhiragana = 12405;
 29766              e.huiitosquare = 13107;
 29767              e.hukatakana = 12501;
 29768              e.hukatakanahalfwidth = 65420;
 29769              e.hungarumlaut = 733;
 29770              e.hungarumlautcmb = 779;
 29771              e.hv = 405;
 29772              e.hyphen = 45;
 29773              e.hypheninferior = 63205;
 29774              e.hyphenmonospace = 65293;
 29775              e.hyphensmall = 65123;
 29776              e.hyphensuperior = 63206;
 29777              e.hyphentwo = 8208;
 29778              e.i = 105;
 29779              e.iacute = 237;
 29780              e.iacyrillic = 1103;
 29781              e.ibengali = 2439;
 29782              e.ibopomofo = 12583;
 29783              e.ibreve = 301;
 29784              e.icaron = 464;
 29785              e.icircle = 9432;
 29786              e.icircumflex = 238;
 29787              e.icyrillic = 1110;
 29788              e.idblgrave = 521;
 29789              e.ideographearthcircle = 12943;
 29790              e.ideographfirecircle = 12939;
 29791              e.ideographicallianceparen = 12863;
 29792              e.ideographiccallparen = 12858;
 29793              e.ideographiccentrecircle = 12965;
 29794              e.ideographicclose = 12294;
 29795              e.ideographiccomma = 12289;
 29796              e.ideographiccommaleft = 65380;
 29797              e.ideographiccongratulationparen = 12855;
 29798              e.ideographiccorrectcircle = 12963;
 29799              e.ideographicearthparen = 12847;
 29800              e.ideographicenterpriseparen = 12861;
 29801              e.ideographicexcellentcircle = 12957;
 29802              e.ideographicfestivalparen = 12864;
 29803              e.ideographicfinancialcircle = 12950;
 29804              e.ideographicfinancialparen = 12854;
 29805              e.ideographicfireparen = 12843;
 29806              e.ideographichaveparen = 12850;
 29807              e.ideographichighcircle = 12964;
 29808              e.ideographiciterationmark = 12293;
 29809              e.ideographiclaborcircle = 12952;
 29810              e.ideographiclaborparen = 12856;
 29811              e.ideographicleftcircle = 12967;
 29812              e.ideographiclowcircle = 12966;
 29813              e.ideographicmedicinecircle = 12969;
 29814              e.ideographicmetalparen = 12846;
 29815              e.ideographicmoonparen = 12842;
 29816              e.ideographicnameparen = 12852;
 29817              e.ideographicperiod = 12290;
 29818              e.ideographicprintcircle = 12958;
 29819              e.ideographicreachparen = 12867;
 29820              e.ideographicrepresentparen = 12857;
 29821              e.ideographicresourceparen = 12862;
 29822              e.ideographicrightcircle = 12968;
 29823              e.ideographicsecretcircle = 12953;
 29824              e.ideographicselfparen = 12866;
 29825              e.ideographicsocietyparen = 12851;
 29826              e.ideographicspace = 12288;
 29827              e.ideographicspecialparen = 12853;
 29828              e.ideographicstockparen = 12849;
 29829              e.ideographicstudyparen = 12859;
 29830              e.ideographicsunparen = 12848;
 29831              e.ideographicsuperviseparen = 12860;
 29832              e.ideographicwaterparen = 12844;
 29833              e.ideographicwoodparen = 12845;
 29834              e.ideographiczero = 12295;
 29835              e.ideographmetalcircle = 12942;
 29836              e.ideographmooncircle = 12938;
 29837              e.ideographnamecircle = 12948;
 29838              e.ideographsuncircle = 12944;
 29839              e.ideographwatercircle = 12940;
 29840              e.ideographwoodcircle = 12941;
 29841              e.ideva = 2311;
 29842              e.idieresis = 239;
 29843              e.idieresisacute = 7727;
 29844              e.idieresiscyrillic = 1253;
 29845              e.idotbelow = 7883;
 29846              e.iebrevecyrillic = 1239;
 29847              e.iecyrillic = 1077;
 29848              e.ieungacirclekorean = 12917;
 29849              e.ieungaparenkorean = 12821;
 29850              e.ieungcirclekorean = 12903;
 29851              e.ieungkorean = 12615;
 29852              e.ieungparenkorean = 12807;
 29853              e.igrave = 236;
 29854              e.igujarati = 2695;
 29855              e.igurmukhi = 2567;
 29856              e.ihiragana = 12356;
 29857              e.ihookabove = 7881;
 29858              e.iibengali = 2440;
 29859              e.iicyrillic = 1080;
 29860              e.iideva = 2312;
 29861              e.iigujarati = 2696;
 29862              e.iigurmukhi = 2568;
 29863              e.iimatragurmukhi = 2624;
 29864              e.iinvertedbreve = 523;
 29865              e.iishortcyrillic = 1081;
 29866              e.iivowelsignbengali = 2496;
 29867              e.iivowelsigndeva = 2368;
 29868              e.iivowelsigngujarati = 2752;
 29869              e.ij = 307;
 29870              e.ikatakana = 12452;
 29871              e.ikatakanahalfwidth = 65394;
 29872              e.ikorean = 12643;
 29873              e.ilde = 732;
 29874              e.iluyhebrew = 1452;
 29875              e.imacron = 299;
 29876              e.imacroncyrillic = 1251;
 29877              e.imageorapproximatelyequal = 8787;
 29878              e.imatragurmukhi = 2623;
 29879              e.imonospace = 65353;
 29880              e.increment = 8710;
 29881              e.infinity = 8734;
 29882              e.iniarmenian = 1387;
 29883              e.integral = 8747;
 29884              e.integralbottom = 8993;
 29885              e.integralbt = 8993;
 29886              e.integralex = 63733;
 29887              e.integraltop = 8992;
 29888              e.integraltp = 8992;
 29889              e.intersection = 8745;
 29890              e.intisquare = 13061;
 29891              e.invbullet = 9688;
 29892              e.invcircle = 9689;
 29893              e.invsmileface = 9787;
 29894              e.iocyrillic = 1105;
 29895              e.iogonek = 303;
 29896              e.iota = 953;
 29897              e.iotadieresis = 970;
 29898              e.iotadieresistonos = 912;
 29899              e.iotalatin = 617;
 29900              e.iotatonos = 943;
 29901              e.iparen = 9380;
 29902              e.irigurmukhi = 2674;
 29903              e.ismallhiragana = 12355;
 29904              e.ismallkatakana = 12451;
 29905              e.ismallkatakanahalfwidth = 65384;
 29906              e.issharbengali = 2554;
 29907              e.istroke = 616;
 29908              e.isuperior = 63213;
 29909              e.iterationhiragana = 12445;
 29910              e.iterationkatakana = 12541;
 29911              e.itilde = 297;
 29912              e.itildebelow = 7725;
 29913              e.iubopomofo = 12585;
 29914              e.iucyrillic = 1102;
 29915              e.ivowelsignbengali = 2495;
 29916              e.ivowelsigndeva = 2367;
 29917              e.ivowelsigngujarati = 2751;
 29918              e.izhitsacyrillic = 1141;
 29919              e.izhitsadblgravecyrillic = 1143;
 29920              e.j = 106;
 29921              e.jaarmenian = 1393;
 29922              e.jabengali = 2460;
 29923              e.jadeva = 2332;
 29924              e.jagujarati = 2716;
 29925              e.jagurmukhi = 2588;
 29926              e.jbopomofo = 12560;
 29927              e.jcaron = 496;
 29928              e.jcircle = 9433;
 29929              e.jcircumflex = 309;
 29930              e.jcrossedtail = 669;
 29931              e.jdotlessstroke = 607;
 29932              e.jecyrillic = 1112;
 29933              e.jeemarabic = 1580;
 29934              e.jeemfinalarabic = 65182;
 29935              e.jeeminitialarabic = 65183;
 29936              e.jeemmedialarabic = 65184;
 29937              e.jeharabic = 1688;
 29938              e.jehfinalarabic = 64395;
 29939              e.jhabengali = 2461;
 29940              e.jhadeva = 2333;
 29941              e.jhagujarati = 2717;
 29942              e.jhagurmukhi = 2589;
 29943              e.jheharmenian = 1403;
 29944              e.jis = 12292;
 29945              e.jmonospace = 65354;
 29946              e.jparen = 9381;
 29947              e.jsuperior = 690;
 29948              e.k = 107;
 29949              e.kabashkircyrillic = 1185;
 29950              e.kabengali = 2453;
 29951              e.kacute = 7729;
 29952              e.kacyrillic = 1082;
 29953              e.kadescendercyrillic = 1179;
 29954              e.kadeva = 2325;
 29955              e.kaf = 1499;
 29956              e.kafarabic = 1603;
 29957              e.kafdagesh = 64315;
 29958              e.kafdageshhebrew = 64315;
 29959              e.kaffinalarabic = 65242;
 29960              e.kafhebrew = 1499;
 29961              e.kafinitialarabic = 65243;
 29962              e.kafmedialarabic = 65244;
 29963              e.kafrafehebrew = 64333;
 29964              e.kagujarati = 2709;
 29965              e.kagurmukhi = 2581;
 29966              e.kahiragana = 12363;
 29967              e.kahookcyrillic = 1220;
 29968              e.kakatakana = 12459;
 29969              e.kakatakanahalfwidth = 65398;
 29970              e.kappa = 954;
 29971              e.kappasymbolgreek = 1008;
 29972              e.kapyeounmieumkorean = 12657;
 29973              e.kapyeounphieuphkorean = 12676;
 29974              e.kapyeounpieupkorean = 12664;
 29975              e.kapyeounssangpieupkorean = 12665;
 29976              e.karoriisquare = 13069;
 29977              e.kashidaautoarabic = 1600;
 29978              e.kashidaautonosidebearingarabic = 1600;
 29979              e.kasmallkatakana = 12533;
 29980              e.kasquare = 13188;
 29981              e.kasraarabic = 1616;
 29982              e.kasratanarabic = 1613;
 29983              e.kastrokecyrillic = 1183;
 29984              e.katahiraprolongmarkhalfwidth = 65392;
 29985              e.kaverticalstrokecyrillic = 1181;
 29986              e.kbopomofo = 12558;
 29987              e.kcalsquare = 13193;
 29988              e.kcaron = 489;
 29989              e.kcedilla = 311;
 29990              e.kcircle = 9434;
 29991              e.kcommaaccent = 311;
 29992              e.kdotbelow = 7731;
 29993              e.keharmenian = 1412;
 29994              e.kehiragana = 12369;
 29995              e.kekatakana = 12465;
 29996              e.kekatakanahalfwidth = 65401;
 29997              e.kenarmenian = 1391;
 29998              e.kesmallkatakana = 12534;
 29999              e.kgreenlandic = 312;
 30000              e.khabengali = 2454;
 30001              e.khacyrillic = 1093;
 30002              e.khadeva = 2326;
 30003              e.khagujarati = 2710;
 30004              e.khagurmukhi = 2582;
 30005              e.khaharabic = 1582;
 30006              e.khahfinalarabic = 65190;
 30007              e.khahinitialarabic = 65191;
 30008              e.khahmedialarabic = 65192;
 30009              e.kheicoptic = 999;
 30010              e.khhadeva = 2393;
 30011              e.khhagurmukhi = 2649;
 30012              e.khieukhacirclekorean = 12920;
 30013              e.khieukhaparenkorean = 12824;
 30014              e.khieukhcirclekorean = 12906;
 30015              e.khieukhkorean = 12619;
 30016              e.khieukhparenkorean = 12810;
 30017              e.khokhaithai = 3586;
 30018              e.khokhonthai = 3589;
 30019              e.khokhuatthai = 3587;
 30020              e.khokhwaithai = 3588;
 30021              e.khomutthai = 3675;
 30022              e.khook = 409;
 30023              e.khorakhangthai = 3590;
 30024              e.khzsquare = 13201;
 30025              e.kihiragana = 12365;
 30026              e.kikatakana = 12461;
 30027              e.kikatakanahalfwidth = 65399;
 30028              e.kiroguramusquare = 13077;
 30029              e.kiromeetorusquare = 13078;
 30030              e.kirosquare = 13076;
 30031              e.kiyeokacirclekorean = 12910;
 30032              e.kiyeokaparenkorean = 12814;
 30033              e.kiyeokcirclekorean = 12896;
 30034              e.kiyeokkorean = 12593;
 30035              e.kiyeokparenkorean = 12800;
 30036              e.kiyeoksioskorean = 12595;
 30037              e.kjecyrillic = 1116;
 30038              e.klinebelow = 7733;
 30039              e.klsquare = 13208;
 30040              e.kmcubedsquare = 13222;
 30041              e.kmonospace = 65355;
 30042              e.kmsquaredsquare = 13218;
 30043              e.kohiragana = 12371;
 30044              e.kohmsquare = 13248;
 30045              e.kokaithai = 3585;
 30046              e.kokatakana = 12467;
 30047              e.kokatakanahalfwidth = 65402;
 30048              e.kooposquare = 13086;
 30049              e.koppacyrillic = 1153;
 30050              e.koreanstandardsymbol = 12927;
 30051              e.koroniscmb = 835;
 30052              e.kparen = 9382;
 30053              e.kpasquare = 13226;
 30054              e.ksicyrillic = 1135;
 30055              e.ktsquare = 13263;
 30056              e.kturned = 670;
 30057              e.kuhiragana = 12367;
 30058              e.kukatakana = 12463;
 30059              e.kukatakanahalfwidth = 65400;
 30060              e.kvsquare = 13240;
 30061              e.kwsquare = 13246;
 30062              e.l = 108;
 30063              e.labengali = 2482;
 30064              e.lacute = 314;
 30065              e.ladeva = 2354;
 30066              e.lagujarati = 2738;
 30067              e.lagurmukhi = 2610;
 30068              e.lakkhangyaothai = 3653;
 30069              e.lamaleffinalarabic = 65276;
 30070              e.lamalefhamzaabovefinalarabic = 65272;
 30071              e.lamalefhamzaaboveisolatedarabic = 65271;
 30072              e.lamalefhamzabelowfinalarabic = 65274;
 30073              e.lamalefhamzabelowisolatedarabic = 65273;
 30074              e.lamalefisolatedarabic = 65275;
 30075              e.lamalefmaddaabovefinalarabic = 65270;
 30076              e.lamalefmaddaaboveisolatedarabic = 65269;
 30077              e.lamarabic = 1604;
 30078              e.lambda = 955;
 30079              e.lambdastroke = 411;
 30080              e.lamed = 1500;
 30081              e.lameddagesh = 64316;
 30082              e.lameddageshhebrew = 64316;
 30083              e.lamedhebrew = 1500;
 30084              e.lamfinalarabic = 65246;
 30085              e.lamhahinitialarabic = 64714;
 30086              e.laminitialarabic = 65247;
 30087              e.lamjeeminitialarabic = 64713;
 30088              e.lamkhahinitialarabic = 64715;
 30089              e.lamlamhehisolatedarabic = 65010;
 30090              e.lammedialarabic = 65248;
 30091              e.lammeemhahinitialarabic = 64904;
 30092              e.lammeeminitialarabic = 64716;
 30093              e.largecircle = 9711;
 30094              e.lbar = 410;
 30095              e.lbelt = 620;
 30096              e.lbopomofo = 12556;
 30097              e.lcaron = 318;
 30098              e.lcedilla = 316;
 30099              e.lcircle = 9435;
 30100              e.lcircumflexbelow = 7741;
 30101              e.lcommaaccent = 316;
 30102              e.ldot = 320;
 30103              e.ldotaccent = 320;
 30104              e.ldotbelow = 7735;
 30105              e.ldotbelowmacron = 7737;
 30106              e.leftangleabovecmb = 794;
 30107              e.lefttackbelowcmb = 792;
 30108              e.less = 60;
 30109              e.lessequal = 8804;
 30110              e.lessequalorgreater = 8922;
 30111              e.lessmonospace = 65308;
 30112              e.lessorequivalent = 8818;
 30113              e.lessorgreater = 8822;
 30114              e.lessoverequal = 8806;
 30115              e.lesssmall = 65124;
 30116              e.lezh = 622;
 30117              e.lfblock = 9612;
 30118              e.lhookretroflex = 621;
 30119              e.lira = 8356;
 30120              e.liwnarmenian = 1388;
 30121              e.lj = 457;
 30122              e.ljecyrillic = 1113;
 30123              e.ll = 63168;
 30124              e.lladeva = 2355;
 30125              e.llagujarati = 2739;
 30126              e.llinebelow = 7739;
 30127              e.llladeva = 2356;
 30128              e.llvocalicbengali = 2529;
 30129              e.llvocalicdeva = 2401;
 30130              e.llvocalicvowelsignbengali = 2531;
 30131              e.llvocalicvowelsigndeva = 2403;
 30132              e.lmiddletilde = 619;
 30133              e.lmonospace = 65356;
 30134              e.lmsquare = 13264;
 30135              e.lochulathai = 3628;
 30136              e.logicaland = 8743;
 30137              e.logicalnot = 172;
 30138              e.logicalnotreversed = 8976;
 30139              e.logicalor = 8744;
 30140              e.lolingthai = 3621;
 30141              e.longs = 383;
 30142              e.lowlinecenterline = 65102;
 30143              e.lowlinecmb = 818;
 30144              e.lowlinedashed = 65101;
 30145              e.lozenge = 9674;
 30146              e.lparen = 9383;
 30147              e.lslash = 322;
 30148              e.lsquare = 8467;
 30149              e.lsuperior = 63214;
 30150              e.ltshade = 9617;
 30151              e.luthai = 3622;
 30152              e.lvocalicbengali = 2444;
 30153              e.lvocalicdeva = 2316;
 30154              e.lvocalicvowelsignbengali = 2530;
 30155              e.lvocalicvowelsigndeva = 2402;
 30156              e.lxsquare = 13267;
 30157              e.m = 109;
 30158              e.mabengali = 2478;
 30159              e.macron = 175;
 30160              e.macronbelowcmb = 817;
 30161              e.macroncmb = 772;
 30162              e.macronlowmod = 717;
 30163              e.macronmonospace = 65507;
 30164              e.macute = 7743;
 30165              e.madeva = 2350;
 30166              e.magujarati = 2734;
 30167              e.magurmukhi = 2606;
 30168              e.mahapakhhebrew = 1444;
 30169              e.mahapakhlefthebrew = 1444;
 30170              e.mahiragana = 12414;
 30171              e.maichattawalowleftthai = 63637;
 30172              e.maichattawalowrightthai = 63636;
 30173              e.maichattawathai = 3659;
 30174              e.maichattawaupperleftthai = 63635;
 30175              e.maieklowleftthai = 63628;
 30176              e.maieklowrightthai = 63627;
 30177              e.maiekthai = 3656;
 30178              e.maiekupperleftthai = 63626;
 30179              e.maihanakatleftthai = 63620;
 30180              e.maihanakatthai = 3633;
 30181              e.maitaikhuleftthai = 63625;
 30182              e.maitaikhuthai = 3655;
 30183              e.maitholowleftthai = 63631;
 30184              e.maitholowrightthai = 63630;
 30185              e.maithothai = 3657;
 30186              e.maithoupperleftthai = 63629;
 30187              e.maitrilowleftthai = 63634;
 30188              e.maitrilowrightthai = 63633;
 30189              e.maitrithai = 3658;
 30190              e.maitriupperleftthai = 63632;
 30191              e.maiyamokthai = 3654;
 30192              e.makatakana = 12510;
 30193              e.makatakanahalfwidth = 65423;
 30194              e.male = 9794;
 30195              e.mansyonsquare = 13127;
 30196              e.maqafhebrew = 1470;
 30197              e.mars = 9794;
 30198              e.masoracirclehebrew = 1455;
 30199              e.masquare = 13187;
 30200              e.mbopomofo = 12551;
 30201              e.mbsquare = 13268;
 30202              e.mcircle = 9436;
 30203              e.mcubedsquare = 13221;
 30204              e.mdotaccent = 7745;
 30205              e.mdotbelow = 7747;
 30206              e.meemarabic = 1605;
 30207              e.meemfinalarabic = 65250;
 30208              e.meeminitialarabic = 65251;
 30209              e.meemmedialarabic = 65252;
 30210              e.meemmeeminitialarabic = 64721;
 30211              e.meemmeemisolatedarabic = 64584;
 30212              e.meetorusquare = 13133;
 30213              e.mehiragana = 12417;
 30214              e.meizierasquare = 13182;
 30215              e.mekatakana = 12513;
 30216              e.mekatakanahalfwidth = 65426;
 30217              e.mem = 1502;
 30218              e.memdagesh = 64318;
 30219              e.memdageshhebrew = 64318;
 30220              e.memhebrew = 1502;
 30221              e.menarmenian = 1396;
 30222              e.merkhahebrew = 1445;
 30223              e.merkhakefulahebrew = 1446;
 30224              e.merkhakefulalefthebrew = 1446;
 30225              e.merkhalefthebrew = 1445;
 30226              e.mhook = 625;
 30227              e.mhzsquare = 13202;
 30228              e.middledotkatakanahalfwidth = 65381;
 30229              e.middot = 183;
 30230              e.mieumacirclekorean = 12914;
 30231              e.mieumaparenkorean = 12818;
 30232              e.mieumcirclekorean = 12900;
 30233              e.mieumkorean = 12609;
 30234              e.mieumpansioskorean = 12656;
 30235              e.mieumparenkorean = 12804;
 30236              e.mieumpieupkorean = 12654;
 30237              e.mieumsioskorean = 12655;
 30238              e.mihiragana = 12415;
 30239              e.mikatakana = 12511;
 30240              e.mikatakanahalfwidth = 65424;
 30241              e.minus = 8722;
 30242              e.minusbelowcmb = 800;
 30243              e.minuscircle = 8854;
 30244              e.minusmod = 727;
 30245              e.minusplus = 8723;
 30246              e.minute = 8242;
 30247              e.miribaarusquare = 13130;
 30248              e.mirisquare = 13129;
 30249              e.mlonglegturned = 624;
 30250              e.mlsquare = 13206;
 30251              e.mmcubedsquare = 13219;
 30252              e.mmonospace = 65357;
 30253              e.mmsquaredsquare = 13215;
 30254              e.mohiragana = 12418;
 30255              e.mohmsquare = 13249;
 30256              e.mokatakana = 12514;
 30257              e.mokatakanahalfwidth = 65427;
 30258              e.molsquare = 13270;
 30259              e.momathai = 3617;
 30260              e.moverssquare = 13223;
 30261              e.moverssquaredsquare = 13224;
 30262              e.mparen = 9384;
 30263              e.mpasquare = 13227;
 30264              e.mssquare = 13235;
 30265              e.msuperior = 63215;
 30266              e.mturned = 623;
 30267              e.mu = 181;
 30268              e.mu1 = 181;
 30269              e.muasquare = 13186;
 30270              e.muchgreater = 8811;
 30271              e.muchless = 8810;
 30272              e.mufsquare = 13196;
 30273              e.mugreek = 956;
 30274              e.mugsquare = 13197;
 30275              e.muhiragana = 12416;
 30276              e.mukatakana = 12512;
 30277              e.mukatakanahalfwidth = 65425;
 30278              e.mulsquare = 13205;
 30279              e.multiply = 215;
 30280              e.mumsquare = 13211;
 30281              e.munahhebrew = 1443;
 30282              e.munahlefthebrew = 1443;
 30283              e.musicalnote = 9834;
 30284              e.musicalnotedbl = 9835;
 30285              e.musicflatsign = 9837;
 30286              e.musicsharpsign = 9839;
 30287              e.mussquare = 13234;
 30288              e.muvsquare = 13238;
 30289              e.muwsquare = 13244;
 30290              e.mvmegasquare = 13241;
 30291              e.mvsquare = 13239;
 30292              e.mwmegasquare = 13247;
 30293              e.mwsquare = 13245;
 30294              e.n = 110;
 30295              e.nabengali = 2472;
 30296              e.nabla = 8711;
 30297              e.nacute = 324;
 30298              e.nadeva = 2344;
 30299              e.nagujarati = 2728;
 30300              e.nagurmukhi = 2600;
 30301              e.nahiragana = 12394;
 30302              e.nakatakana = 12490;
 30303              e.nakatakanahalfwidth = 65413;
 30304              e.napostrophe = 329;
 30305              e.nasquare = 13185;
 30306              e.nbopomofo = 12555;
 30307              e.nbspace = 160;
 30308              e.ncaron = 328;
 30309              e.ncedilla = 326;
 30310              e.ncircle = 9437;
 30311              e.ncircumflexbelow = 7755;
 30312              e.ncommaaccent = 326;
 30313              e.ndotaccent = 7749;
 30314              e.ndotbelow = 7751;
 30315              e.nehiragana = 12397;
 30316              e.nekatakana = 12493;
 30317              e.nekatakanahalfwidth = 65416;
 30318              e.newsheqelsign = 8362;
 30319              e.nfsquare = 13195;
 30320              e.ngabengali = 2457;
 30321              e.ngadeva = 2329;
 30322              e.ngagujarati = 2713;
 30323              e.ngagurmukhi = 2585;
 30324              e.ngonguthai = 3591;
 30325              e.nhiragana = 12435;
 30326              e.nhookleft = 626;
 30327              e.nhookretroflex = 627;
 30328              e.nieunacirclekorean = 12911;
 30329              e.nieunaparenkorean = 12815;
 30330              e.nieuncieuckorean = 12597;
 30331              e.nieuncirclekorean = 12897;
 30332              e.nieunhieuhkorean = 12598;
 30333              e.nieunkorean = 12596;
 30334              e.nieunpansioskorean = 12648;
 30335              e.nieunparenkorean = 12801;
 30336              e.nieunsioskorean = 12647;
 30337              e.nieuntikeutkorean = 12646;
 30338              e.nihiragana = 12395;
 30339              e.nikatakana = 12491;
 30340              e.nikatakanahalfwidth = 65414;
 30341              e.nikhahitleftthai = 63641;
 30342              e.nikhahitthai = 3661;
 30343              e.nine = 57;
 30344              e.ninearabic = 1641;
 30345              e.ninebengali = 2543;
 30346              e.ninecircle = 9320;
 30347              e.ninecircleinversesansserif = 10130;
 30348              e.ninedeva = 2415;
 30349              e.ninegujarati = 2799;
 30350              e.ninegurmukhi = 2671;
 30351              e.ninehackarabic = 1641;
 30352              e.ninehangzhou = 12329;
 30353              e.nineideographicparen = 12840;
 30354              e.nineinferior = 8329;
 30355              e.ninemonospace = 65305;
 30356              e.nineoldstyle = 63289;
 30357              e.nineparen = 9340;
 30358              e.nineperiod = 9360;
 30359              e.ninepersian = 1785;
 30360              e.nineroman = 8568;
 30361              e.ninesuperior = 8313;
 30362              e.nineteencircle = 9330;
 30363              e.nineteenparen = 9350;
 30364              e.nineteenperiod = 9370;
 30365              e.ninethai = 3673;
 30366              e.nj = 460;
 30367              e.njecyrillic = 1114;
 30368              e.nkatakana = 12531;
 30369              e.nkatakanahalfwidth = 65437;
 30370              e.nlegrightlong = 414;
 30371              e.nlinebelow = 7753;
 30372              e.nmonospace = 65358;
 30373              e.nmsquare = 13210;
 30374              e.nnabengali = 2467;
 30375              e.nnadeva = 2339;
 30376              e.nnagujarati = 2723;
 30377              e.nnagurmukhi = 2595;
 30378              e.nnnadeva = 2345;
 30379              e.nohiragana = 12398;
 30380              e.nokatakana = 12494;
 30381              e.nokatakanahalfwidth = 65417;
 30382              e.nonbreakingspace = 160;
 30383              e.nonenthai = 3603;
 30384              e.nonuthai = 3609;
 30385              e.noonarabic = 1606;
 30386              e.noonfinalarabic = 65254;
 30387              e.noonghunnaarabic = 1722;
 30388              e.noonghunnafinalarabic = 64415;
 30389              e.nooninitialarabic = 65255;
 30390              e.noonjeeminitialarabic = 64722;
 30391              e.noonjeemisolatedarabic = 64587;
 30392              e.noonmedialarabic = 65256;
 30393              e.noonmeeminitialarabic = 64725;
 30394              e.noonmeemisolatedarabic = 64590;
 30395              e.noonnoonfinalarabic = 64653;
 30396              e.notcontains = 8716;
 30397              e.notelement = 8713;
 30398              e.notelementof = 8713;
 30399              e.notequal = 8800;
 30400              e.notgreater = 8815;
 30401              e.notgreaternorequal = 8817;
 30402              e.notgreaternorless = 8825;
 30403              e.notidentical = 8802;
 30404              e.notless = 8814;
 30405              e.notlessnorequal = 8816;
 30406              e.notparallel = 8742;
 30407              e.notprecedes = 8832;
 30408              e.notsubset = 8836;
 30409              e.notsucceeds = 8833;
 30410              e.notsuperset = 8837;
 30411              e.nowarmenian = 1398;
 30412              e.nparen = 9385;
 30413              e.nssquare = 13233;
 30414              e.nsuperior = 8319;
 30415              e.ntilde = 241;
 30416              e.nu = 957;
 30417              e.nuhiragana = 12396;
 30418              e.nukatakana = 12492;
 30419              e.nukatakanahalfwidth = 65415;
 30420              e.nuktabengali = 2492;
 30421              e.nuktadeva = 2364;
 30422              e.nuktagujarati = 2748;
 30423              e.nuktagurmukhi = 2620;
 30424              e.numbersign = 35;
 30425              e.numbersignmonospace = 65283;
 30426              e.numbersignsmall = 65119;
 30427              e.numeralsigngreek = 884;
 30428              e.numeralsignlowergreek = 885;
 30429              e.numero = 8470;
 30430              e.nun = 1504;
 30431              e.nundagesh = 64320;
 30432              e.nundageshhebrew = 64320;
 30433              e.nunhebrew = 1504;
 30434              e.nvsquare = 13237;
 30435              e.nwsquare = 13243;
 30436              e.nyabengali = 2462;
 30437              e.nyadeva = 2334;
 30438              e.nyagujarati = 2718;
 30439              e.nyagurmukhi = 2590;
 30440              e.o = 111;
 30441              e.oacute = 243;
 30442              e.oangthai = 3629;
 30443              e.obarred = 629;
 30444              e.obarredcyrillic = 1257;
 30445              e.obarreddieresiscyrillic = 1259;
 30446              e.obengali = 2451;
 30447              e.obopomofo = 12571;
 30448              e.obreve = 335;
 30449              e.ocandradeva = 2321;
 30450              e.ocandragujarati = 2705;
 30451              e.ocandravowelsigndeva = 2377;
 30452              e.ocandravowelsigngujarati = 2761;
 30453              e.ocaron = 466;
 30454              e.ocircle = 9438;
 30455              e.ocircumflex = 244;
 30456              e.ocircumflexacute = 7889;
 30457              e.ocircumflexdotbelow = 7897;
 30458              e.ocircumflexgrave = 7891;
 30459              e.ocircumflexhookabove = 7893;
 30460              e.ocircumflextilde = 7895;
 30461              e.ocyrillic = 1086;
 30462              e.odblacute = 337;
 30463              e.odblgrave = 525;
 30464              e.odeva = 2323;
 30465              e.odieresis = 246;
 30466              e.odieresiscyrillic = 1255;
 30467              e.odotbelow = 7885;
 30468              e.oe = 339;
 30469              e.oekorean = 12634;
 30470              e.ogonek = 731;
 30471              e.ogonekcmb = 808;
 30472              e.ograve = 242;
 30473              e.ogujarati = 2707;
 30474              e.oharmenian = 1413;
 30475              e.ohiragana = 12362;
 30476              e.ohookabove = 7887;
 30477              e.ohorn = 417;
 30478              e.ohornacute = 7899;
 30479              e.ohorndotbelow = 7907;
 30480              e.ohorngrave = 7901;
 30481              e.ohornhookabove = 7903;
 30482              e.ohorntilde = 7905;
 30483              e.ohungarumlaut = 337;
 30484              e.oi = 419;
 30485              e.oinvertedbreve = 527;
 30486              e.okatakana = 12458;
 30487              e.okatakanahalfwidth = 65397;
 30488              e.okorean = 12631;
 30489              e.olehebrew = 1451;
 30490              e.omacron = 333;
 30491              e.omacronacute = 7763;
 30492              e.omacrongrave = 7761;
 30493              e.omdeva = 2384;
 30494              e.omega = 969;
 30495              e.omega1 = 982;
 30496              e.omegacyrillic = 1121;
 30497              e.omegalatinclosed = 631;
 30498              e.omegaroundcyrillic = 1147;
 30499              e.omegatitlocyrillic = 1149;
 30500              e.omegatonos = 974;
 30501              e.omgujarati = 2768;
 30502              e.omicron = 959;
 30503              e.omicrontonos = 972;
 30504              e.omonospace = 65359;
 30505              e.one = 49;
 30506              e.onearabic = 1633;
 30507              e.onebengali = 2535;
 30508              e.onecircle = 9312;
 30509              e.onecircleinversesansserif = 10122;
 30510              e.onedeva = 2407;
 30511              e.onedotenleader = 8228;
 30512              e.oneeighth = 8539;
 30513              e.onefitted = 63196;
 30514              e.onegujarati = 2791;
 30515              e.onegurmukhi = 2663;
 30516              e.onehackarabic = 1633;
 30517              e.onehalf = 189;
 30518              e.onehangzhou = 12321;
 30519              e.oneideographicparen = 12832;
 30520              e.oneinferior = 8321;
 30521              e.onemonospace = 65297;
 30522              e.onenumeratorbengali = 2548;
 30523              e.oneoldstyle = 63281;
 30524              e.oneparen = 9332;
 30525              e.oneperiod = 9352;
 30526              e.onepersian = 1777;
 30527              e.onequarter = 188;
 30528              e.oneroman = 8560;
 30529              e.onesuperior = 185;
 30530              e.onethai = 3665;
 30531              e.onethird = 8531;
 30532              e.oogonek = 491;
 30533              e.oogonekmacron = 493;
 30534              e.oogurmukhi = 2579;
 30535              e.oomatragurmukhi = 2635;
 30536              e.oopen = 596;
 30537              e.oparen = 9386;
 30538              e.openbullet = 9702;
 30539              e.option = 8997;
 30540              e.ordfeminine = 170;
 30541              e.ordmasculine = 186;
 30542              e.orthogonal = 8735;
 30543              e.oshortdeva = 2322;
 30544              e.oshortvowelsigndeva = 2378;
 30545              e.oslash = 248;
 30546              e.oslashacute = 511;
 30547              e.osmallhiragana = 12361;
 30548              e.osmallkatakana = 12457;
 30549              e.osmallkatakanahalfwidth = 65387;
 30550              e.ostrokeacute = 511;
 30551              e.osuperior = 63216;
 30552              e.otcyrillic = 1151;
 30553              e.otilde = 245;
 30554              e.otildeacute = 7757;
 30555              e.otildedieresis = 7759;
 30556              e.oubopomofo = 12577;
 30557              e.overline = 8254;
 30558              e.overlinecenterline = 65098;
 30559              e.overlinecmb = 773;
 30560              e.overlinedashed = 65097;
 30561              e.overlinedblwavy = 65100;
 30562              e.overlinewavy = 65099;
 30563              e.overscore = 175;
 30564              e.ovowelsignbengali = 2507;
 30565              e.ovowelsigndeva = 2379;
 30566              e.ovowelsigngujarati = 2763;
 30567              e.p = 112;
 30568              e.paampssquare = 13184;
 30569              e.paasentosquare = 13099;
 30570              e.pabengali = 2474;
 30571              e.pacute = 7765;
 30572              e.padeva = 2346;
 30573              e.pagedown = 8671;
 30574              e.pageup = 8670;
 30575              e.pagujarati = 2730;
 30576              e.pagurmukhi = 2602;
 30577              e.pahiragana = 12401;
 30578              e.paiyannoithai = 3631;
 30579              e.pakatakana = 12497;
 30580              e.palatalizationcyrilliccmb = 1156;
 30581              e.palochkacyrillic = 1216;
 30582              e.pansioskorean = 12671;
 30583              e.paragraph = 182;
 30584              e.parallel = 8741;
 30585              e.parenleft = 40;
 30586              e.parenleftaltonearabic = 64830;
 30587              e.parenleftbt = 63725;
 30588              e.parenleftex = 63724;
 30589              e.parenleftinferior = 8333;
 30590              e.parenleftmonospace = 65288;
 30591              e.parenleftsmall = 65113;
 30592              e.parenleftsuperior = 8317;
 30593              e.parenlefttp = 63723;
 30594              e.parenleftvertical = 65077;
 30595              e.parenright = 41;
 30596              e.parenrightaltonearabic = 64831;
 30597              e.parenrightbt = 63736;
 30598              e.parenrightex = 63735;
 30599              e.parenrightinferior = 8334;
 30600              e.parenrightmonospace = 65289;
 30601              e.parenrightsmall = 65114;
 30602              e.parenrightsuperior = 8318;
 30603              e.parenrighttp = 63734;
 30604              e.parenrightvertical = 65078;
 30605              e.partialdiff = 8706;
 30606              e.paseqhebrew = 1472;
 30607              e.pashtahebrew = 1433;
 30608              e.pasquare = 13225;
 30609              e.patah = 1463;
 30610              e.patah11 = 1463;
 30611              e.patah1d = 1463;
 30612              e.patah2a = 1463;
 30613              e.patahhebrew = 1463;
 30614              e.patahnarrowhebrew = 1463;
 30615              e.patahquarterhebrew = 1463;
 30616              e.patahwidehebrew = 1463;
 30617              e.pazerhebrew = 1441;
 30618              e.pbopomofo = 12550;
 30619              e.pcircle = 9439;
 30620              e.pdotaccent = 7767;
 30621              e.pe = 1508;
 30622              e.pecyrillic = 1087;
 30623              e.pedagesh = 64324;
 30624              e.pedageshhebrew = 64324;
 30625              e.peezisquare = 13115;
 30626              e.pefinaldageshhebrew = 64323;
 30627              e.peharabic = 1662;
 30628              e.peharmenian = 1402;
 30629              e.pehebrew = 1508;
 30630              e.pehfinalarabic = 64343;
 30631              e.pehinitialarabic = 64344;
 30632              e.pehiragana = 12410;
 30633              e.pehmedialarabic = 64345;
 30634              e.pekatakana = 12506;
 30635              e.pemiddlehookcyrillic = 1191;
 30636              e.perafehebrew = 64334;
 30637              e.percent = 37;
 30638              e.percentarabic = 1642;
 30639              e.percentmonospace = 65285;
 30640              e.percentsmall = 65130;
 30641              e.period = 46;
 30642              e.periodarmenian = 1417;
 30643              e.periodcentered = 183;
 30644              e.periodhalfwidth = 65377;
 30645              e.periodinferior = 63207;
 30646              e.periodmonospace = 65294;
 30647              e.periodsmall = 65106;
 30648              e.periodsuperior = 63208;
 30649              e.perispomenigreekcmb = 834;
 30650              e.perpendicular = 8869;
 30651              e.perthousand = 8240;
 30652              e.peseta = 8359;
 30653              e.pfsquare = 13194;
 30654              e.phabengali = 2475;
 30655              e.phadeva = 2347;
 30656              e.phagujarati = 2731;
 30657              e.phagurmukhi = 2603;
 30658              e.phi = 966;
 30659              e.phi1 = 981;
 30660              e.phieuphacirclekorean = 12922;
 30661              e.phieuphaparenkorean = 12826;
 30662              e.phieuphcirclekorean = 12908;
 30663              e.phieuphkorean = 12621;
 30664              e.phieuphparenkorean = 12812;
 30665              e.philatin = 632;
 30666              e.phinthuthai = 3642;
 30667              e.phisymbolgreek = 981;
 30668              e.phook = 421;
 30669              e.phophanthai = 3614;
 30670              e.phophungthai = 3612;
 30671              e.phosamphaothai = 3616;
 30672              e.pi = 960;
 30673              e.pieupacirclekorean = 12915;
 30674              e.pieupaparenkorean = 12819;
 30675              e.pieupcieuckorean = 12662;
 30676              e.pieupcirclekorean = 12901;
 30677              e.pieupkiyeokkorean = 12658;
 30678              e.pieupkorean = 12610;
 30679              e.pieupparenkorean = 12805;
 30680              e.pieupsioskiyeokkorean = 12660;
 30681              e.pieupsioskorean = 12612;
 30682              e.pieupsiostikeutkorean = 12661;
 30683              e.pieupthieuthkorean = 12663;
 30684              e.pieuptikeutkorean = 12659;
 30685              e.pihiragana = 12404;
 30686              e.pikatakana = 12500;
 30687              e.pisymbolgreek = 982;
 30688              e.piwrarmenian = 1411;
 30689              e.planckover2pi = 8463;
 30690              e.planckover2pi1 = 8463;
 30691              e.plus = 43;
 30692              e.plusbelowcmb = 799;
 30693              e.pluscircle = 8853;
 30694              e.plusminus = 177;
 30695              e.plusmod = 726;
 30696              e.plusmonospace = 65291;
 30697              e.plussmall = 65122;
 30698              e.plussuperior = 8314;
 30699              e.pmonospace = 65360;
 30700              e.pmsquare = 13272;
 30701              e.pohiragana = 12413;
 30702              e.pointingindexdownwhite = 9759;
 30703              e.pointingindexleftwhite = 9756;
 30704              e.pointingindexrightwhite = 9758;
 30705              e.pointingindexupwhite = 9757;
 30706              e.pokatakana = 12509;
 30707              e.poplathai = 3611;
 30708              e.postalmark = 12306;
 30709              e.postalmarkface = 12320;
 30710              e.pparen = 9387;
 30711              e.precedes = 8826;
 30712              e.prescription = 8478;
 30713              e.primemod = 697;
 30714              e.primereversed = 8245;
 30715              e.product = 8719;
 30716              e.projective = 8965;
 30717              e.prolongedkana = 12540;
 30718              e.propellor = 8984;
 30719              e.propersubset = 8834;
 30720              e.propersuperset = 8835;
 30721              e.proportion = 8759;
 30722              e.proportional = 8733;
 30723              e.psi = 968;
 30724              e.psicyrillic = 1137;
 30725              e.psilipneumatacyrilliccmb = 1158;
 30726              e.pssquare = 13232;
 30727              e.puhiragana = 12407;
 30728              e.pukatakana = 12503;
 30729              e.pvsquare = 13236;
 30730              e.pwsquare = 13242;
 30731              e.q = 113;
 30732              e.qadeva = 2392;
 30733              e.qadmahebrew = 1448;
 30734              e.qafarabic = 1602;
 30735              e.qaffinalarabic = 65238;
 30736              e.qafinitialarabic = 65239;
 30737              e.qafmedialarabic = 65240;
 30738              e.qamats = 1464;
 30739              e.qamats10 = 1464;
 30740              e.qamats1a = 1464;
 30741              e.qamats1c = 1464;
 30742              e.qamats27 = 1464;
 30743              e.qamats29 = 1464;
 30744              e.qamats33 = 1464;
 30745              e.qamatsde = 1464;
 30746              e.qamatshebrew = 1464;
 30747              e.qamatsnarrowhebrew = 1464;
 30748              e.qamatsqatanhebrew = 1464;
 30749              e.qamatsqatannarrowhebrew = 1464;
 30750              e.qamatsqatanquarterhebrew = 1464;
 30751              e.qamatsqatanwidehebrew = 1464;
 30752              e.qamatsquarterhebrew = 1464;
 30753              e.qamatswidehebrew = 1464;
 30754              e.qarneyparahebrew = 1439;
 30755              e.qbopomofo = 12561;
 30756              e.qcircle = 9440;
 30757              e.qhook = 672;
 30758              e.qmonospace = 65361;
 30759              e.qof = 1511;
 30760              e.qofdagesh = 64327;
 30761              e.qofdageshhebrew = 64327;
 30762              e.qofhebrew = 1511;
 30763              e.qparen = 9388;
 30764              e.quarternote = 9833;
 30765              e.qubuts = 1467;
 30766              e.qubuts18 = 1467;
 30767              e.qubuts25 = 1467;
 30768              e.qubuts31 = 1467;
 30769              e.qubutshebrew = 1467;
 30770              e.qubutsnarrowhebrew = 1467;
 30771              e.qubutsquarterhebrew = 1467;
 30772              e.qubutswidehebrew = 1467;
 30773              e.question = 63;
 30774              e.questionarabic = 1567;
 30775              e.questionarmenian = 1374;
 30776              e.questiondown = 191;
 30777              e.questiondownsmall = 63423;
 30778              e.questiongreek = 894;
 30779              e.questionmonospace = 65311;
 30780              e.questionsmall = 63295;
 30781              e.quotedbl = 34;
 30782              e.quotedblbase = 8222;
 30783              e.quotedblleft = 8220;
 30784              e.quotedblmonospace = 65282;
 30785              e.quotedblprime = 12318;
 30786              e.quotedblprimereversed = 12317;
 30787              e.quotedblright = 8221;
 30788              e.quoteleft = 8216;
 30789              e.quoteleftreversed = 8219;
 30790              e.quotereversed = 8219;
 30791              e.quoteright = 8217;
 30792              e.quoterightn = 329;
 30793              e.quotesinglbase = 8218;
 30794              e.quotesingle = 39;
 30795              e.quotesinglemonospace = 65287;
 30796              e.r = 114;
 30797              e.raarmenian = 1404;
 30798              e.rabengali = 2480;
 30799              e.racute = 341;
 30800              e.radeva = 2352;
 30801              e.radical = 8730;
 30802              e.radicalex = 63717;
 30803              e.radoverssquare = 13230;
 30804              e.radoverssquaredsquare = 13231;
 30805              e.radsquare = 13229;
 30806              e.rafe = 1471;
 30807              e.rafehebrew = 1471;
 30808              e.ragujarati = 2736;
 30809              e.ragurmukhi = 2608;
 30810              e.rahiragana = 12425;
 30811              e.rakatakana = 12521;
 30812              e.rakatakanahalfwidth = 65431;
 30813              e.ralowerdiagonalbengali = 2545;
 30814              e.ramiddlediagonalbengali = 2544;
 30815              e.ramshorn = 612;
 30816              e.ratio = 8758;
 30817              e.rbopomofo = 12566;
 30818              e.rcaron = 345;
 30819              e.rcedilla = 343;
 30820              e.rcircle = 9441;
 30821              e.rcommaaccent = 343;
 30822              e.rdblgrave = 529;
 30823              e.rdotaccent = 7769;
 30824              e.rdotbelow = 7771;
 30825              e.rdotbelowmacron = 7773;
 30826              e.referencemark = 8251;
 30827              e.reflexsubset = 8838;
 30828              e.reflexsuperset = 8839;
 30829              e.registered = 174;
 30830              e.registersans = 63720;
 30831              e.registerserif = 63194;
 30832              e.reharabic = 1585;
 30833              e.reharmenian = 1408;
 30834              e.rehfinalarabic = 65198;
 30835              e.rehiragana = 12428;
 30836              e.rekatakana = 12524;
 30837              e.rekatakanahalfwidth = 65434;
 30838              e.resh = 1512;
 30839              e.reshdageshhebrew = 64328;
 30840              e.reshhebrew = 1512;
 30841              e.reversedtilde = 8765;
 30842              e.reviahebrew = 1431;
 30843              e.reviamugrashhebrew = 1431;
 30844              e.revlogicalnot = 8976;
 30845              e.rfishhook = 638;
 30846              e.rfishhookreversed = 639;
 30847              e.rhabengali = 2525;
 30848              e.rhadeva = 2397;
 30849              e.rho = 961;
 30850              e.rhook = 637;
 30851              e.rhookturned = 635;
 30852              e.rhookturnedsuperior = 693;
 30853              e.rhosymbolgreek = 1009;
 30854              e.rhotichookmod = 734;
 30855              e.rieulacirclekorean = 12913;
 30856              e.rieulaparenkorean = 12817;
 30857              e.rieulcirclekorean = 12899;
 30858              e.rieulhieuhkorean = 12608;
 30859              e.rieulkiyeokkorean = 12602;
 30860              e.rieulkiyeoksioskorean = 12649;
 30861              e.rieulkorean = 12601;
 30862              e.rieulmieumkorean = 12603;
 30863              e.rieulpansioskorean = 12652;
 30864              e.rieulparenkorean = 12803;
 30865              e.rieulphieuphkorean = 12607;
 30866              e.rieulpieupkorean = 12604;
 30867              e.rieulpieupsioskorean = 12651;
 30868              e.rieulsioskorean = 12605;
 30869              e.rieulthieuthkorean = 12606;
 30870              e.rieultikeutkorean = 12650;
 30871              e.rieulyeorinhieuhkorean = 12653;
 30872              e.rightangle = 8735;
 30873              e.righttackbelowcmb = 793;
 30874              e.righttriangle = 8895;
 30875              e.rihiragana = 12426;
 30876              e.rikatakana = 12522;
 30877              e.rikatakanahalfwidth = 65432;
 30878              e.ring = 730;
 30879              e.ringbelowcmb = 805;
 30880              e.ringcmb = 778;
 30881              e.ringhalfleft = 703;
 30882              e.ringhalfleftarmenian = 1369;
 30883              e.ringhalfleftbelowcmb = 796;
 30884              e.ringhalfleftcentered = 723;
 30885              e.ringhalfright = 702;
 30886              e.ringhalfrightbelowcmb = 825;
 30887              e.ringhalfrightcentered = 722;
 30888              e.rinvertedbreve = 531;
 30889              e.rittorusquare = 13137;
 30890              e.rlinebelow = 7775;
 30891              e.rlongleg = 636;
 30892              e.rlonglegturned = 634;
 30893              e.rmonospace = 65362;
 30894              e.rohiragana = 12429;
 30895              e.rokatakana = 12525;
 30896              e.rokatakanahalfwidth = 65435;
 30897              e.roruathai = 3619;
 30898              e.rparen = 9389;
 30899              e.rrabengali = 2524;
 30900              e.rradeva = 2353;
 30901              e.rragurmukhi = 2652;
 30902              e.rreharabic = 1681;
 30903              e.rrehfinalarabic = 64397;
 30904              e.rrvocalicbengali = 2528;
 30905              e.rrvocalicdeva = 2400;
 30906              e.rrvocalicgujarati = 2784;
 30907              e.rrvocalicvowelsignbengali = 2500;
 30908              e.rrvocalicvowelsigndeva = 2372;
 30909              e.rrvocalicvowelsigngujarati = 2756;
 30910              e.rsuperior = 63217;
 30911              e.rtblock = 9616;
 30912              e.rturned = 633;
 30913              e.rturnedsuperior = 692;
 30914              e.ruhiragana = 12427;
 30915              e.rukatakana = 12523;
 30916              e.rukatakanahalfwidth = 65433;
 30917              e.rupeemarkbengali = 2546;
 30918              e.rupeesignbengali = 2547;
 30919              e.rupiah = 63197;
 30920              e.ruthai = 3620;
 30921              e.rvocalicbengali = 2443;
 30922              e.rvocalicdeva = 2315;
 30923              e.rvocalicgujarati = 2699;
 30924              e.rvocalicvowelsignbengali = 2499;
 30925              e.rvocalicvowelsigndeva = 2371;
 30926              e.rvocalicvowelsigngujarati = 2755;
 30927              e.s = 115;
 30928              e.sabengali = 2488;
 30929              e.sacute = 347;
 30930              e.sacutedotaccent = 7781;
 30931              e.sadarabic = 1589;
 30932              e.sadeva = 2360;
 30933              e.sadfinalarabic = 65210;
 30934              e.sadinitialarabic = 65211;
 30935              e.sadmedialarabic = 65212;
 30936              e.sagujarati = 2744;
 30937              e.sagurmukhi = 2616;
 30938              e.sahiragana = 12373;
 30939              e.sakatakana = 12469;
 30940              e.sakatakanahalfwidth = 65403;
 30941              e.sallallahoualayhewasallamarabic = 65018;
 30942              e.samekh = 1505;
 30943              e.samekhdagesh = 64321;
 30944              e.samekhdageshhebrew = 64321;
 30945              e.samekhhebrew = 1505;
 30946              e.saraaathai = 3634;
 30947              e.saraaethai = 3649;
 30948              e.saraaimaimalaithai = 3652;
 30949              e.saraaimaimuanthai = 3651;
 30950              e.saraamthai = 3635;
 30951              e.saraathai = 3632;
 30952              e.saraethai = 3648;
 30953              e.saraiileftthai = 63622;
 30954              e.saraiithai = 3637;
 30955              e.saraileftthai = 63621;
 30956              e.saraithai = 3636;
 30957              e.saraothai = 3650;
 30958              e.saraueeleftthai = 63624;
 30959              e.saraueethai = 3639;
 30960              e.saraueleftthai = 63623;
 30961              e.sarauethai = 3638;
 30962              e.sarauthai = 3640;
 30963              e.sarauuthai = 3641;
 30964              e.sbopomofo = 12569;
 30965              e.scaron = 353;
 30966              e.scarondotaccent = 7783;
 30967              e.scedilla = 351;
 30968              e.schwa = 601;
 30969              e.schwacyrillic = 1241;
 30970              e.schwadieresiscyrillic = 1243;
 30971              e.schwahook = 602;
 30972              e.scircle = 9442;
 30973              e.scircumflex = 349;
 30974              e.scommaaccent = 537;
 30975              e.sdotaccent = 7777;
 30976              e.sdotbelow = 7779;
 30977              e.sdotbelowdotaccent = 7785;
 30978              e.seagullbelowcmb = 828;
 30979              e.second = 8243;
 30980              e.secondtonechinese = 714;
 30981              e.section = 167;
 30982              e.seenarabic = 1587;
 30983              e.seenfinalarabic = 65202;
 30984              e.seeninitialarabic = 65203;
 30985              e.seenmedialarabic = 65204;
 30986              e.segol = 1462;
 30987              e.segol13 = 1462;
 30988              e.segol1f = 1462;
 30989              e.segol2c = 1462;
 30990              e.segolhebrew = 1462;
 30991              e.segolnarrowhebrew = 1462;
 30992              e.segolquarterhebrew = 1462;
 30993              e.segoltahebrew = 1426;
 30994              e.segolwidehebrew = 1462;
 30995              e.seharmenian = 1405;
 30996              e.sehiragana = 12379;
 30997              e.sekatakana = 12475;
 30998              e.sekatakanahalfwidth = 65406;
 30999              e.semicolon = 59;
 31000              e.semicolonarabic = 1563;
 31001              e.semicolonmonospace = 65307;
 31002              e.semicolonsmall = 65108;
 31003              e.semivoicedmarkkana = 12444;
 31004              e.semivoicedmarkkanahalfwidth = 65439;
 31005              e.sentisquare = 13090;
 31006              e.sentosquare = 13091;
 31007              e.seven = 55;
 31008              e.sevenarabic = 1639;
 31009              e.sevenbengali = 2541;
 31010              e.sevencircle = 9318;
 31011              e.sevencircleinversesansserif = 10128;
 31012              e.sevendeva = 2413;
 31013              e.seveneighths = 8542;
 31014              e.sevengujarati = 2797;
 31015              e.sevengurmukhi = 2669;
 31016              e.sevenhackarabic = 1639;
 31017              e.sevenhangzhou = 12327;
 31018              e.sevenideographicparen = 12838;
 31019              e.seveninferior = 8327;
 31020              e.sevenmonospace = 65303;
 31021              e.sevenoldstyle = 63287;
 31022              e.sevenparen = 9338;
 31023              e.sevenperiod = 9358;
 31024              e.sevenpersian = 1783;
 31025              e.sevenroman = 8566;
 31026              e.sevensuperior = 8311;
 31027              e.seventeencircle = 9328;
 31028              e.seventeenparen = 9348;
 31029              e.seventeenperiod = 9368;
 31030              e.seventhai = 3671;
 31031              e.sfthyphen = 173;
 31032              e.shaarmenian = 1399;
 31033              e.shabengali = 2486;
 31034              e.shacyrillic = 1096;
 31035              e.shaddaarabic = 1617;
 31036              e.shaddadammaarabic = 64609;
 31037              e.shaddadammatanarabic = 64606;
 31038              e.shaddafathaarabic = 64608;
 31039              e.shaddakasraarabic = 64610;
 31040              e.shaddakasratanarabic = 64607;
 31041              e.shade = 9618;
 31042              e.shadedark = 9619;
 31043              e.shadelight = 9617;
 31044              e.shademedium = 9618;
 31045              e.shadeva = 2358;
 31046              e.shagujarati = 2742;
 31047              e.shagurmukhi = 2614;
 31048              e.shalshelethebrew = 1427;
 31049              e.shbopomofo = 12565;
 31050              e.shchacyrillic = 1097;
 31051              e.sheenarabic = 1588;
 31052              e.sheenfinalarabic = 65206;
 31053              e.sheeninitialarabic = 65207;
 31054              e.sheenmedialarabic = 65208;
 31055              e.sheicoptic = 995;
 31056              e.sheqel = 8362;
 31057              e.sheqelhebrew = 8362;
 31058              e.sheva = 1456;
 31059              e.sheva115 = 1456;
 31060              e.sheva15 = 1456;
 31061              e.sheva22 = 1456;
 31062              e.sheva2e = 1456;
 31063              e.shevahebrew = 1456;
 31064              e.shevanarrowhebrew = 1456;
 31065              e.shevaquarterhebrew = 1456;
 31066              e.shevawidehebrew = 1456;
 31067              e.shhacyrillic = 1211;
 31068              e.shimacoptic = 1005;
 31069              e.shin = 1513;
 31070              e.shindagesh = 64329;
 31071              e.shindageshhebrew = 64329;
 31072              e.shindageshshindot = 64300;
 31073              e.shindageshshindothebrew = 64300;
 31074              e.shindageshsindot = 64301;
 31075              e.shindageshsindothebrew = 64301;
 31076              e.shindothebrew = 1473;
 31077              e.shinhebrew = 1513;
 31078              e.shinshindot = 64298;
 31079              e.shinshindothebrew = 64298;
 31080              e.shinsindot = 64299;
 31081              e.shinsindothebrew = 64299;
 31082              e.shook = 642;
 31083              e.sigma = 963;
 31084              e.sigma1 = 962;
 31085              e.sigmafinal = 962;
 31086              e.sigmalunatesymbolgreek = 1010;
 31087              e.sihiragana = 12375;
 31088              e.sikatakana = 12471;
 31089              e.sikatakanahalfwidth = 65404;
 31090              e.siluqhebrew = 1469;
 31091              e.siluqlefthebrew = 1469;
 31092              e.similar = 8764;
 31093              e.sindothebrew = 1474;
 31094              e.siosacirclekorean = 12916;
 31095              e.siosaparenkorean = 12820;
 31096              e.sioscieuckorean = 12670;
 31097              e.sioscirclekorean = 12902;
 31098              e.sioskiyeokkorean = 12666;
 31099              e.sioskorean = 12613;
 31100              e.siosnieunkorean = 12667;
 31101              e.siosparenkorean = 12806;
 31102              e.siospieupkorean = 12669;
 31103              e.siostikeutkorean = 12668;
 31104              e.six = 54;
 31105              e.sixarabic = 1638;
 31106              e.sixbengali = 2540;
 31107              e.sixcircle = 9317;
 31108              e.sixcircleinversesansserif = 10127;
 31109              e.sixdeva = 2412;
 31110              e.sixgujarati = 2796;
 31111              e.sixgurmukhi = 2668;
 31112              e.sixhackarabic = 1638;
 31113              e.sixhangzhou = 12326;
 31114              e.sixideographicparen = 12837;
 31115              e.sixinferior = 8326;
 31116              e.sixmonospace = 65302;
 31117              e.sixoldstyle = 63286;
 31118              e.sixparen = 9337;
 31119              e.sixperiod = 9357;
 31120              e.sixpersian = 1782;
 31121              e.sixroman = 8565;
 31122              e.sixsuperior = 8310;
 31123              e.sixteencircle = 9327;
 31124              e.sixteencurrencydenominatorbengali = 2553;
 31125              e.sixteenparen = 9347;
 31126              e.sixteenperiod = 9367;
 31127              e.sixthai = 3670;
 31128              e.slash = 47;
 31129              e.slashmonospace = 65295;
 31130              e.slong = 383;
 31131              e.slongdotaccent = 7835;
 31132              e.smileface = 9786;
 31133              e.smonospace = 65363;
 31134              e.sofpasuqhebrew = 1475;
 31135              e.softhyphen = 173;
 31136              e.softsigncyrillic = 1100;
 31137              e.sohiragana = 12381;
 31138              e.sokatakana = 12477;
 31139              e.sokatakanahalfwidth = 65407;
 31140              e.soliduslongoverlaycmb = 824;
 31141              e.solidusshortoverlaycmb = 823;
 31142              e.sorusithai = 3625;
 31143              e.sosalathai = 3624;
 31144              e.sosothai = 3595;
 31145              e.sosuathai = 3626;
 31146              e.space = 32;
 31147              e.spacehackarabic = 32;
 31148              e.spade = 9824;
 31149              e.spadesuitblack = 9824;
 31150              e.spadesuitwhite = 9828;
 31151              e.sparen = 9390;
 31152              e.squarebelowcmb = 827;
 31153              e.squarecc = 13252;
 31154              e.squarecm = 13213;
 31155              e.squarediagonalcrosshatchfill = 9641;
 31156              e.squarehorizontalfill = 9636;
 31157              e.squarekg = 13199;
 31158              e.squarekm = 13214;
 31159              e.squarekmcapital = 13262;
 31160              e.squareln = 13265;
 31161              e.squarelog = 13266;
 31162              e.squaremg = 13198;
 31163              e.squaremil = 13269;
 31164              e.squaremm = 13212;
 31165              e.squaremsquared = 13217;
 31166              e.squareorthogonalcrosshatchfill = 9638;
 31167              e.squareupperlefttolowerrightfill = 9639;
 31168              e.squareupperrighttolowerleftfill = 9640;
 31169              e.squareverticalfill = 9637;
 31170              e.squarewhitewithsmallblack = 9635;
 31171              e.srsquare = 13275;
 31172              e.ssabengali = 2487;
 31173              e.ssadeva = 2359;
 31174              e.ssagujarati = 2743;
 31175              e.ssangcieuckorean = 12617;
 31176              e.ssanghieuhkorean = 12677;
 31177              e.ssangieungkorean = 12672;
 31178              e.ssangkiyeokkorean = 12594;
 31179              e.ssangnieunkorean = 12645;
 31180              e.ssangpieupkorean = 12611;
 31181              e.ssangsioskorean = 12614;
 31182              e.ssangtikeutkorean = 12600;
 31183              e.ssuperior = 63218;
 31184              e.sterling = 163;
 31185              e.sterlingmonospace = 65505;
 31186              e.strokelongoverlaycmb = 822;
 31187              e.strokeshortoverlaycmb = 821;
 31188              e.subset = 8834;
 31189              e.subsetnotequal = 8842;
 31190              e.subsetorequal = 8838;
 31191              e.succeeds = 8827;
 31192              e.suchthat = 8715;
 31193              e.suhiragana = 12377;
 31194              e.sukatakana = 12473;
 31195              e.sukatakanahalfwidth = 65405;
 31196              e.sukunarabic = 1618;
 31197              e.summation = 8721;
 31198              e.sun = 9788;
 31199              e.superset = 8835;
 31200              e.supersetnotequal = 8843;
 31201              e.supersetorequal = 8839;
 31202              e.svsquare = 13276;
 31203              e.syouwaerasquare = 13180;
 31204              e.t = 116;
 31205              e.tabengali = 2468;
 31206              e.tackdown = 8868;
 31207              e.tackleft = 8867;
 31208              e.tadeva = 2340;
 31209              e.tagujarati = 2724;
 31210              e.tagurmukhi = 2596;
 31211              e.taharabic = 1591;
 31212              e.tahfinalarabic = 65218;
 31213              e.tahinitialarabic = 65219;
 31214              e.tahiragana = 12383;
 31215              e.tahmedialarabic = 65220;
 31216              e.taisyouerasquare = 13181;
 31217              e.takatakana = 12479;
 31218              e.takatakanahalfwidth = 65408;
 31219              e.tatweelarabic = 1600;
 31220              e.tau = 964;
 31221              e.tav = 1514;
 31222              e.tavdages = 64330;
 31223              e.tavdagesh = 64330;
 31224              e.tavdageshhebrew = 64330;
 31225              e.tavhebrew = 1514;
 31226              e.tbar = 359;
 31227              e.tbopomofo = 12554;
 31228              e.tcaron = 357;
 31229              e.tccurl = 680;
 31230              e.tcedilla = 355;
 31231              e.tcheharabic = 1670;
 31232              e.tchehfinalarabic = 64379;
 31233              e.tchehinitialarabic = 64380;
 31234              e.tchehmedialarabic = 64381;
 31235              e.tcircle = 9443;
 31236              e.tcircumflexbelow = 7793;
 31237              e.tcommaaccent = 355;
 31238              e.tdieresis = 7831;
 31239              e.tdotaccent = 7787;
 31240              e.tdotbelow = 7789;
 31241              e.tecyrillic = 1090;
 31242              e.tedescendercyrillic = 1197;
 31243              e.teharabic = 1578;
 31244              e.tehfinalarabic = 65174;
 31245              e.tehhahinitialarabic = 64674;
 31246              e.tehhahisolatedarabic = 64524;
 31247              e.tehinitialarabic = 65175;
 31248              e.tehiragana = 12390;
 31249              e.tehjeeminitialarabic = 64673;
 31250              e.tehjeemisolatedarabic = 64523;
 31251              e.tehmarbutaarabic = 1577;
 31252              e.tehmarbutafinalarabic = 65172;
 31253              e.tehmedialarabic = 65176;
 31254              e.tehmeeminitialarabic = 64676;
 31255              e.tehmeemisolatedarabic = 64526;
 31256              e.tehnoonfinalarabic = 64627;
 31257              e.tekatakana = 12486;
 31258              e.tekatakanahalfwidth = 65411;
 31259              e.telephone = 8481;
 31260              e.telephoneblack = 9742;
 31261              e.telishagedolahebrew = 1440;
 31262              e.telishaqetanahebrew = 1449;
 31263              e.tencircle = 9321;
 31264              e.tenideographicparen = 12841;
 31265              e.tenparen = 9341;
 31266              e.tenperiod = 9361;
 31267              e.tenroman = 8569;
 31268              e.tesh = 679;
 31269              e.tet = 1496;
 31270              e.tetdagesh = 64312;
 31271              e.tetdageshhebrew = 64312;
 31272              e.tethebrew = 1496;
 31273              e.tetsecyrillic = 1205;
 31274              e.tevirhebrew = 1435;
 31275              e.tevirlefthebrew = 1435;
 31276              e.thabengali = 2469;
 31277              e.thadeva = 2341;
 31278              e.thagujarati = 2725;
 31279              e.thagurmukhi = 2597;
 31280              e.thalarabic = 1584;
 31281              e.thalfinalarabic = 65196;
 31282              e.thanthakhatlowleftthai = 63640;
 31283              e.thanthakhatlowrightthai = 63639;
 31284              e.thanthakhatthai = 3660;
 31285              e.thanthakhatupperleftthai = 63638;
 31286              e.theharabic = 1579;
 31287              e.thehfinalarabic = 65178;
 31288              e.thehinitialarabic = 65179;
 31289              e.thehmedialarabic = 65180;
 31290              e.thereexists = 8707;
 31291              e.therefore = 8756;
 31292              e.theta = 952;
 31293              e.theta1 = 977;
 31294              e.thetasymbolgreek = 977;
 31295              e.thieuthacirclekorean = 12921;
 31296              e.thieuthaparenkorean = 12825;
 31297              e.thieuthcirclekorean = 12907;
 31298              e.thieuthkorean = 12620;
 31299              e.thieuthparenkorean = 12811;
 31300              e.thirteencircle = 9324;
 31301              e.thirteenparen = 9344;
 31302              e.thirteenperiod = 9364;
 31303              e.thonangmonthothai = 3601;
 31304              e.thook = 429;
 31305              e.thophuthaothai = 3602;
 31306              e.thorn = 254;
 31307              e.thothahanthai = 3607;
 31308              e.thothanthai = 3600;
 31309              e.thothongthai = 3608;
 31310              e.thothungthai = 3606;
 31311              e.thousandcyrillic = 1154;
 31312              e.thousandsseparatorarabic = 1644;
 31313              e.thousandsseparatorpersian = 1644;
 31314              e.three = 51;
 31315              e.threearabic = 1635;
 31316              e.threebengali = 2537;
 31317              e.threecircle = 9314;
 31318              e.threecircleinversesansserif = 10124;
 31319              e.threedeva = 2409;
 31320              e.threeeighths = 8540;
 31321              e.threegujarati = 2793;
 31322              e.threegurmukhi = 2665;
 31323              e.threehackarabic = 1635;
 31324              e.threehangzhou = 12323;
 31325              e.threeideographicparen = 12834;
 31326              e.threeinferior = 8323;
 31327              e.threemonospace = 65299;
 31328              e.threenumeratorbengali = 2550;
 31329              e.threeoldstyle = 63283;
 31330              e.threeparen = 9334;
 31331              e.threeperiod = 9354;
 31332              e.threepersian = 1779;
 31333              e.threequarters = 190;
 31334              e.threequartersemdash = 63198;
 31335              e.threeroman = 8562;
 31336              e.threesuperior = 179;
 31337              e.threethai = 3667;
 31338              e.thzsquare = 13204;
 31339              e.tihiragana = 12385;
 31340              e.tikatakana = 12481;
 31341              e.tikatakanahalfwidth = 65409;
 31342              e.tikeutacirclekorean = 12912;
 31343              e.tikeutaparenkorean = 12816;
 31344              e.tikeutcirclekorean = 12898;
 31345              e.tikeutkorean = 12599;
 31346              e.tikeutparenkorean = 12802;
 31347              e.tilde = 732;
 31348              e.tildebelowcmb = 816;
 31349              e.tildecmb = 771;
 31350              e.tildecomb = 771;
 31351              e.tildedoublecmb = 864;
 31352              e.tildeoperator = 8764;
 31353              e.tildeoverlaycmb = 820;
 31354              e.tildeverticalcmb = 830;
 31355              e.timescircle = 8855;
 31356              e.tipehahebrew = 1430;
 31357              e.tipehalefthebrew = 1430;
 31358              e.tippigurmukhi = 2672;
 31359              e.titlocyrilliccmb = 1155;
 31360              e.tiwnarmenian = 1407;
 31361              e.tlinebelow = 7791;
 31362              e.tmonospace = 65364;
 31363              e.toarmenian = 1385;
 31364              e.tohiragana = 12392;
 31365              e.tokatakana = 12488;
 31366              e.tokatakanahalfwidth = 65412;
 31367              e.tonebarextrahighmod = 741;
 31368              e.tonebarextralowmod = 745;
 31369              e.tonebarhighmod = 742;
 31370              e.tonebarlowmod = 744;
 31371              e.tonebarmidmod = 743;
 31372              e.tonefive = 445;
 31373              e.tonesix = 389;
 31374              e.tonetwo = 424;
 31375              e.tonos = 900;
 31376              e.tonsquare = 13095;
 31377              e.topatakthai = 3599;
 31378              e.tortoiseshellbracketleft = 12308;
 31379              e.tortoiseshellbracketleftsmall = 65117;
 31380              e.tortoiseshellbracketleftvertical = 65081;
 31381              e.tortoiseshellbracketright = 12309;
 31382              e.tortoiseshellbracketrightsmall = 65118;
 31383              e.tortoiseshellbracketrightvertical = 65082;
 31384              e.totaothai = 3605;
 31385              e.tpalatalhook = 427;
 31386              e.tparen = 9391;
 31387              e.trademark = 8482;
 31388              e.trademarksans = 63722;
 31389              e.trademarkserif = 63195;
 31390              e.tretroflexhook = 648;
 31391              e.triagdn = 9660;
 31392              e.triaglf = 9668;
 31393              e.triagrt = 9658;
 31394              e.triagup = 9650;
 31395              e.ts = 678;
 31396              e.tsadi = 1510;
 31397              e.tsadidagesh = 64326;
 31398              e.tsadidageshhebrew = 64326;
 31399              e.tsadihebrew = 1510;
 31400              e.tsecyrillic = 1094;
 31401              e.tsere = 1461;
 31402              e.tsere12 = 1461;
 31403              e.tsere1e = 1461;
 31404              e.tsere2b = 1461;
 31405              e.tserehebrew = 1461;
 31406              e.tserenarrowhebrew = 1461;
 31407              e.tserequarterhebrew = 1461;
 31408              e.tserewidehebrew = 1461;
 31409              e.tshecyrillic = 1115;
 31410              e.tsuperior = 63219;
 31411              e.ttabengali = 2463;
 31412              e.ttadeva = 2335;
 31413              e.ttagujarati = 2719;
 31414              e.ttagurmukhi = 2591;
 31415              e.tteharabic = 1657;
 31416              e.ttehfinalarabic = 64359;
 31417              e.ttehinitialarabic = 64360;
 31418              e.ttehmedialarabic = 64361;
 31419              e.tthabengali = 2464;
 31420              e.tthadeva = 2336;
 31421              e.tthagujarati = 2720;
 31422              e.tthagurmukhi = 2592;
 31423              e.tturned = 647;
 31424              e.tuhiragana = 12388;
 31425              e.tukatakana = 12484;
 31426              e.tukatakanahalfwidth = 65410;
 31427              e.tusmallhiragana = 12387;
 31428              e.tusmallkatakana = 12483;
 31429              e.tusmallkatakanahalfwidth = 65391;
 31430              e.twelvecircle = 9323;
 31431              e.twelveparen = 9343;
 31432              e.twelveperiod = 9363;
 31433              e.twelveroman = 8571;
 31434              e.twentycircle = 9331;
 31435              e.twentyhangzhou = 21316;
 31436              e.twentyparen = 9351;
 31437              e.twentyperiod = 9371;
 31438              e.two = 50;
 31439              e.twoarabic = 1634;
 31440              e.twobengali = 2536;
 31441              e.twocircle = 9313;
 31442              e.twocircleinversesansserif = 10123;
 31443              e.twodeva = 2408;
 31444              e.twodotenleader = 8229;
 31445              e.twodotleader = 8229;
 31446              e.twodotleadervertical = 65072;
 31447              e.twogujarati = 2792;
 31448              e.twogurmukhi = 2664;
 31449              e.twohackarabic = 1634;
 31450              e.twohangzhou = 12322;
 31451              e.twoideographicparen = 12833;
 31452              e.twoinferior = 8322;
 31453              e.twomonospace = 65298;
 31454              e.twonumeratorbengali = 2549;
 31455              e.twooldstyle = 63282;
 31456              e.twoparen = 9333;
 31457              e.twoperiod = 9353;
 31458              e.twopersian = 1778;
 31459              e.tworoman = 8561;
 31460              e.twostroke = 443;
 31461              e.twosuperior = 178;
 31462              e.twothai = 3666;
 31463              e.twothirds = 8532;
 31464              e.u = 117;
 31465              e.uacute = 250;
 31466              e.ubar = 649;
 31467              e.ubengali = 2441;
 31468              e.ubopomofo = 12584;
 31469              e.ubreve = 365;
 31470              e.ucaron = 468;
 31471              e.ucircle = 9444;
 31472              e.ucircumflex = 251;
 31473              e.ucircumflexbelow = 7799;
 31474              e.ucyrillic = 1091;
 31475              e.udattadeva = 2385;
 31476              e.udblacute = 369;
 31477              e.udblgrave = 533;
 31478              e.udeva = 2313;
 31479              e.udieresis = 252;
 31480              e.udieresisacute = 472;
 31481              e.udieresisbelow = 7795;
 31482              e.udieresiscaron = 474;
 31483              e.udieresiscyrillic = 1265;
 31484              e.udieresisgrave = 476;
 31485              e.udieresismacron = 470;
 31486              e.udotbelow = 7909;
 31487              e.ugrave = 249;
 31488              e.ugujarati = 2697;
 31489              e.ugurmukhi = 2569;
 31490              e.uhiragana = 12358;
 31491              e.uhookabove = 7911;
 31492              e.uhorn = 432;
 31493              e.uhornacute = 7913;
 31494              e.uhorndotbelow = 7921;
 31495              e.uhorngrave = 7915;
 31496              e.uhornhookabove = 7917;
 31497              e.uhorntilde = 7919;
 31498              e.uhungarumlaut = 369;
 31499              e.uhungarumlautcyrillic = 1267;
 31500              e.uinvertedbreve = 535;
 31501              e.ukatakana = 12454;
 31502              e.ukatakanahalfwidth = 65395;
 31503              e.ukcyrillic = 1145;
 31504              e.ukorean = 12636;
 31505              e.umacron = 363;
 31506              e.umacroncyrillic = 1263;
 31507              e.umacrondieresis = 7803;
 31508              e.umatragurmukhi = 2625;
 31509              e.umonospace = 65365;
 31510              e.underscore = 95;
 31511              e.underscoredbl = 8215;
 31512              e.underscoremonospace = 65343;
 31513              e.underscorevertical = 65075;
 31514              e.underscorewavy = 65103;
 31515              e.union = 8746;
 31516              e.universal = 8704;
 31517              e.uogonek = 371;
 31518              e.uparen = 9392;
 31519              e.upblock = 9600;
 31520              e.upperdothebrew = 1476;
 31521              e.upsilon = 965;
 31522              e.upsilondieresis = 971;
 31523              e.upsilondieresistonos = 944;
 31524              e.upsilonlatin = 650;
 31525              e.upsilontonos = 973;
 31526              e.uptackbelowcmb = 797;
 31527              e.uptackmod = 724;
 31528              e.uragurmukhi = 2675;
 31529              e.uring = 367;
 31530              e.ushortcyrillic = 1118;
 31531              e.usmallhiragana = 12357;
 31532              e.usmallkatakana = 12453;
 31533              e.usmallkatakanahalfwidth = 65385;
 31534              e.ustraightcyrillic = 1199;
 31535              e.ustraightstrokecyrillic = 1201;
 31536              e.utilde = 361;
 31537              e.utildeacute = 7801;
 31538              e.utildebelow = 7797;
 31539              e.uubengali = 2442;
 31540              e.uudeva = 2314;
 31541              e.uugujarati = 2698;
 31542              e.uugurmukhi = 2570;
 31543              e.uumatragurmukhi = 2626;
 31544              e.uuvowelsignbengali = 2498;
 31545              e.uuvowelsigndeva = 2370;
 31546              e.uuvowelsigngujarati = 2754;
 31547              e.uvowelsignbengali = 2497;
 31548              e.uvowelsigndeva = 2369;
 31549              e.uvowelsigngujarati = 2753;
 31550              e.v = 118;
 31551              e.vadeva = 2357;
 31552              e.vagujarati = 2741;
 31553              e.vagurmukhi = 2613;
 31554              e.vakatakana = 12535;
 31555              e.vav = 1493;
 31556              e.vavdagesh = 64309;
 31557              e.vavdagesh65 = 64309;
 31558              e.vavdageshhebrew = 64309;
 31559              e.vavhebrew = 1493;
 31560              e.vavholam = 64331;
 31561              e.vavholamhebrew = 64331;
 31562              e.vavvavhebrew = 1520;
 31563              e.vavyodhebrew = 1521;
 31564              e.vcircle = 9445;
 31565              e.vdotbelow = 7807;
 31566              e.vecyrillic = 1074;
 31567              e.veharabic = 1700;
 31568              e.vehfinalarabic = 64363;
 31569              e.vehinitialarabic = 64364;
 31570              e.vehmedialarabic = 64365;
 31571              e.vekatakana = 12537;
 31572              e.venus = 9792;
 31573              e.verticalbar = 124;
 31574              e.verticallineabovecmb = 781;
 31575              e.verticallinebelowcmb = 809;
 31576              e.verticallinelowmod = 716;
 31577              e.verticallinemod = 712;
 31578              e.vewarmenian = 1406;
 31579              e.vhook = 651;
 31580              e.vikatakana = 12536;
 31581              e.viramabengali = 2509;
 31582              e.viramadeva = 2381;
 31583              e.viramagujarati = 2765;
 31584              e.visargabengali = 2435;
 31585              e.visargadeva = 2307;
 31586              e.visargagujarati = 2691;
 31587              e.vmonospace = 65366;
 31588              e.voarmenian = 1400;
 31589              e.voicediterationhiragana = 12446;
 31590              e.voicediterationkatakana = 12542;
 31591              e.voicedmarkkana = 12443;
 31592              e.voicedmarkkanahalfwidth = 65438;
 31593              e.vokatakana = 12538;
 31594              e.vparen = 9393;
 31595              e.vtilde = 7805;
 31596              e.vturned = 652;
 31597              e.vuhiragana = 12436;
 31598              e.vukatakana = 12532;
 31599              e.w = 119;
 31600              e.wacute = 7811;
 31601              e.waekorean = 12633;
 31602              e.wahiragana = 12431;
 31603              e.wakatakana = 12527;
 31604              e.wakatakanahalfwidth = 65436;
 31605              e.wakorean = 12632;
 31606              e.wasmallhiragana = 12430;
 31607              e.wasmallkatakana = 12526;
 31608              e.wattosquare = 13143;
 31609              e.wavedash = 12316;
 31610              e.wavyunderscorevertical = 65076;
 31611              e.wawarabic = 1608;
 31612              e.wawfinalarabic = 65262;
 31613              e.wawhamzaabovearabic = 1572;
 31614              e.wawhamzaabovefinalarabic = 65158;
 31615              e.wbsquare = 13277;
 31616              e.wcircle = 9446;
 31617              e.wcircumflex = 373;
 31618              e.wdieresis = 7813;
 31619              e.wdotaccent = 7815;
 31620              e.wdotbelow = 7817;
 31621              e.wehiragana = 12433;
 31622              e.weierstrass = 8472;
 31623              e.wekatakana = 12529;
 31624              e.wekorean = 12638;
 31625              e.weokorean = 12637;
 31626              e.wgrave = 7809;
 31627              e.whitebullet = 9702;
 31628              e.whitecircle = 9675;
 31629              e.whitecircleinverse = 9689;
 31630              e.whitecornerbracketleft = 12302;
 31631              e.whitecornerbracketleftvertical = 65091;
 31632              e.whitecornerbracketright = 12303;
 31633              e.whitecornerbracketrightvertical = 65092;
 31634              e.whitediamond = 9671;
 31635              e.whitediamondcontainingblacksmalldiamond = 9672;
 31636              e.whitedownpointingsmalltriangle = 9663;
 31637              e.whitedownpointingtriangle = 9661;
 31638              e.whiteleftpointingsmalltriangle = 9667;
 31639              e.whiteleftpointingtriangle = 9665;
 31640              e.whitelenticularbracketleft = 12310;
 31641              e.whitelenticularbracketright = 12311;
 31642              e.whiterightpointingsmalltriangle = 9657;
 31643              e.whiterightpointingtriangle = 9655;
 31644              e.whitesmallsquare = 9643;
 31645              e.whitesmilingface = 9786;
 31646              e.whitesquare = 9633;
 31647              e.whitestar = 9734;
 31648              e.whitetelephone = 9743;
 31649              e.whitetortoiseshellbracketleft = 12312;
 31650              e.whitetortoiseshellbracketright = 12313;
 31651              e.whiteuppointingsmalltriangle = 9653;
 31652              e.whiteuppointingtriangle = 9651;
 31653              e.wihiragana = 12432;
 31654              e.wikatakana = 12528;
 31655              e.wikorean = 12639;
 31656              e.wmonospace = 65367;
 31657              e.wohiragana = 12434;
 31658              e.wokatakana = 12530;
 31659              e.wokatakanahalfwidth = 65382;
 31660              e.won = 8361;
 31661              e.wonmonospace = 65510;
 31662              e.wowaenthai = 3623;
 31663              e.wparen = 9394;
 31664              e.wring = 7832;
 31665              e.wsuperior = 695;
 31666              e.wturned = 653;
 31667              e.wynn = 447;
 31668              e.x = 120;
 31669              e.xabovecmb = 829;
 31670              e.xbopomofo = 12562;
 31671              e.xcircle = 9447;
 31672              e.xdieresis = 7821;
 31673              e.xdotaccent = 7819;
 31674              e.xeharmenian = 1389;
 31675              e.xi = 958;
 31676              e.xmonospace = 65368;
 31677              e.xparen = 9395;
 31678              e.xsuperior = 739;
 31679              e.y = 121;
 31680              e.yaadosquare = 13134;
 31681              e.yabengali = 2479;
 31682              e.yacute = 253;
 31683              e.yadeva = 2351;
 31684              e.yaekorean = 12626;
 31685              e.yagujarati = 2735;
 31686              e.yagurmukhi = 2607;
 31687              e.yahiragana = 12420;
 31688              e.yakatakana = 12516;
 31689              e.yakatakanahalfwidth = 65428;
 31690              e.yakorean = 12625;
 31691              e.yamakkanthai = 3662;
 31692              e.yasmallhiragana = 12419;
 31693              e.yasmallkatakana = 12515;
 31694              e.yasmallkatakanahalfwidth = 65388;
 31695              e.yatcyrillic = 1123;
 31696              e.ycircle = 9448;
 31697              e.ycircumflex = 375;
 31698              e.ydieresis = 255;
 31699              e.ydotaccent = 7823;
 31700              e.ydotbelow = 7925;
 31701              e.yeharabic = 1610;
 31702              e.yehbarreearabic = 1746;
 31703              e.yehbarreefinalarabic = 64431;
 31704              e.yehfinalarabic = 65266;
 31705              e.yehhamzaabovearabic = 1574;
 31706              e.yehhamzaabovefinalarabic = 65162;
 31707              e.yehhamzaaboveinitialarabic = 65163;
 31708              e.yehhamzaabovemedialarabic = 65164;
 31709              e.yehinitialarabic = 65267;
 31710              e.yehmedialarabic = 65268;
 31711              e.yehmeeminitialarabic = 64733;
 31712              e.yehmeemisolatedarabic = 64600;
 31713              e.yehnoonfinalarabic = 64660;
 31714              e.yehthreedotsbelowarabic = 1745;
 31715              e.yekorean = 12630;
 31716              e.yen = 165;
 31717              e.yenmonospace = 65509;
 31718              e.yeokorean = 12629;
 31719              e.yeorinhieuhkorean = 12678;
 31720              e.yerahbenyomohebrew = 1450;
 31721              e.yerahbenyomolefthebrew = 1450;
 31722              e.yericyrillic = 1099;
 31723              e.yerudieresiscyrillic = 1273;
 31724              e.yesieungkorean = 12673;
 31725              e.yesieungpansioskorean = 12675;
 31726              e.yesieungsioskorean = 12674;
 31727              e.yetivhebrew = 1434;
 31728              e.ygrave = 7923;
 31729              e.yhook = 436;
 31730              e.yhookabove = 7927;
 31731              e.yiarmenian = 1397;
 31732              e.yicyrillic = 1111;
 31733              e.yikorean = 12642;
 31734              e.yinyang = 9775;
 31735              e.yiwnarmenian = 1410;
 31736              e.ymonospace = 65369;
 31737              e.yod = 1497;
 31738              e.yoddagesh = 64313;
 31739              e.yoddageshhebrew = 64313;
 31740              e.yodhebrew = 1497;
 31741              e.yodyodhebrew = 1522;
 31742              e.yodyodpatahhebrew = 64287;
 31743              e.yohiragana = 12424;
 31744              e.yoikorean = 12681;
 31745              e.yokatakana = 12520;
 31746              e.yokatakanahalfwidth = 65430;
 31747              e.yokorean = 12635;
 31748              e.yosmallhiragana = 12423;
 31749              e.yosmallkatakana = 12519;
 31750              e.yosmallkatakanahalfwidth = 65390;
 31751              e.yotgreek = 1011;
 31752              e.yoyaekorean = 12680;
 31753              e.yoyakorean = 12679;
 31754              e.yoyakthai = 3618;
 31755              e.yoyingthai = 3597;
 31756              e.yparen = 9396;
 31757              e.ypogegrammeni = 890;
 31758              e.ypogegrammenigreekcmb = 837;
 31759              e.yr = 422;
 31760              e.yring = 7833;
 31761              e.ysuperior = 696;
 31762              e.ytilde = 7929;
 31763              e.yturned = 654;
 31764              e.yuhiragana = 12422;
 31765              e.yuikorean = 12684;
 31766              e.yukatakana = 12518;
 31767              e.yukatakanahalfwidth = 65429;
 31768              e.yukorean = 12640;
 31769              e.yusbigcyrillic = 1131;
 31770              e.yusbigiotifiedcyrillic = 1133;
 31771              e.yuslittlecyrillic = 1127;
 31772              e.yuslittleiotifiedcyrillic = 1129;
 31773              e.yusmallhiragana = 12421;
 31774              e.yusmallkatakana = 12517;
 31775              e.yusmallkatakanahalfwidth = 65389;
 31776              e.yuyekorean = 12683;
 31777              e.yuyeokorean = 12682;
 31778              e.yyabengali = 2527;
 31779              e.yyadeva = 2399;
 31780              e.z = 122;
 31781              e.zaarmenian = 1382;
 31782              e.zacute = 378;
 31783              e.zadeva = 2395;
 31784              e.zagurmukhi = 2651;
 31785              e.zaharabic = 1592;
 31786              e.zahfinalarabic = 65222;
 31787              e.zahinitialarabic = 65223;
 31788              e.zahiragana = 12374;
 31789              e.zahmedialarabic = 65224;
 31790              e.zainarabic = 1586;
 31791              e.zainfinalarabic = 65200;
 31792              e.zakatakana = 12470;
 31793              e.zaqefgadolhebrew = 1429;
 31794              e.zaqefqatanhebrew = 1428;
 31795              e.zarqahebrew = 1432;
 31796              e.zayin = 1494;
 31797              e.zayindagesh = 64310;
 31798              e.zayindageshhebrew = 64310;
 31799              e.zayinhebrew = 1494;
 31800              e.zbopomofo = 12567;
 31801              e.zcaron = 382;
 31802              e.zcircle = 9449;
 31803              e.zcircumflex = 7825;
 31804              e.zcurl = 657;
 31805              e.zdot = 380;
 31806              e.zdotaccent = 380;
 31807              e.zdotbelow = 7827;
 31808              e.zecyrillic = 1079;
 31809              e.zedescendercyrillic = 1177;
 31810              e.zedieresiscyrillic = 1247;
 31811              e.zehiragana = 12380;
 31812              e.zekatakana = 12476;
 31813              e.zero = 48;
 31814              e.zeroarabic = 1632;
 31815              e.zerobengali = 2534;
 31816              e.zerodeva = 2406;
 31817              e.zerogujarati = 2790;
 31818              e.zerogurmukhi = 2662;
 31819              e.zerohackarabic = 1632;
 31820              e.zeroinferior = 8320;
 31821              e.zeromonospace = 65296;
 31822              e.zerooldstyle = 63280;
 31823              e.zeropersian = 1776;
 31824              e.zerosuperior = 8304;
 31825              e.zerothai = 3664;
 31826              e.zerowidthjoiner = 65279;
 31827              e.zerowidthnonjoiner = 8204;
 31828              e.zerowidthspace = 8203;
 31829              e.zeta = 950;
 31830              e.zhbopomofo = 12563;
 31831              e.zhearmenian = 1386;
 31832              e.zhebrevecyrillic = 1218;
 31833              e.zhecyrillic = 1078;
 31834              e.zhedescendercyrillic = 1175;
 31835              e.zhedieresiscyrillic = 1245;
 31836              e.zihiragana = 12376;
 31837              e.zikatakana = 12472;
 31838              e.zinorhebrew = 1454;
 31839              e.zlinebelow = 7829;
 31840              e.zmonospace = 65370;
 31841              e.zohiragana = 12382;
 31842              e.zokatakana = 12478;
 31843              e.zparen = 9397;
 31844              e.zretroflexhook = 656;
 31845              e.zstroke = 438;
 31846              e.zuhiragana = 12378;
 31847              e.zukatakana = 12474;
 31848              e[".notdef"] = 0;
 31849              e.angbracketleftbig = 9001;
 31850              e.angbracketleftBig = 9001;
 31851              e.angbracketleftbigg = 9001;
 31852              e.angbracketleftBigg = 9001;
 31853              e.angbracketrightBig = 9002;
 31854              e.angbracketrightbig = 9002;
 31855              e.angbracketrightBigg = 9002;
 31856              e.angbracketrightbigg = 9002;
 31857              e.arrowhookleft = 8618;
 31858              e.arrowhookright = 8617;
 31859              e.arrowlefttophalf = 8636;
 31860              e.arrowleftbothalf = 8637;
 31861              e.arrownortheast = 8599;
 31862              e.arrownorthwest = 8598;
 31863              e.arrowrighttophalf = 8640;
 31864              e.arrowrightbothalf = 8641;
 31865              e.arrowsoutheast = 8600;
 31866              e.arrowsouthwest = 8601;
 31867              e.backslashbig = 8726;
 31868              e.backslashBig = 8726;
 31869              e.backslashBigg = 8726;
 31870              e.backslashbigg = 8726;
 31871              e.bardbl = 8214;
 31872              e.bracehtipdownleft = 65079;
 31873              e.bracehtipdownright = 65079;
 31874              e.bracehtipupleft = 65080;
 31875              e.bracehtipupright = 65080;
 31876              e.braceleftBig = 123;
 31877              e.braceleftbig = 123;
 31878              e.braceleftbigg = 123;
 31879              e.braceleftBigg = 123;
 31880              e.bracerightBig = 125;
 31881              e.bracerightbig = 125;
 31882              e.bracerightbigg = 125;
 31883              e.bracerightBigg = 125;
 31884              e.bracketleftbig = 91;
 31885              e.bracketleftBig = 91;
 31886              e.bracketleftbigg = 91;
 31887              e.bracketleftBigg = 91;
 31888              e.bracketrightBig = 93;
 31889              e.bracketrightbig = 93;
 31890              e.bracketrightbigg = 93;
 31891              e.bracketrightBigg = 93;
 31892              e.ceilingleftbig = 8968;
 31893              e.ceilingleftBig = 8968;
 31894              e.ceilingleftBigg = 8968;
 31895              e.ceilingleftbigg = 8968;
 31896              e.ceilingrightbig = 8969;
 31897              e.ceilingrightBig = 8969;
 31898              e.ceilingrightbigg = 8969;
 31899              e.ceilingrightBigg = 8969;
 31900              e.circledotdisplay = 8857;
 31901              e.circledottext = 8857;
 31902              e.circlemultiplydisplay = 8855;
 31903              e.circlemultiplytext = 8855;
 31904              e.circleplusdisplay = 8853;
 31905              e.circleplustext = 8853;
 31906              e.contintegraldisplay = 8750;
 31907              e.contintegraltext = 8750;
 31908              e.coproductdisplay = 8720;
 31909              e.coproducttext = 8720;
 31910              e.floorleftBig = 8970;
 31911              e.floorleftbig = 8970;
 31912              e.floorleftbigg = 8970;
 31913              e.floorleftBigg = 8970;
 31914              e.floorrightbig = 8971;
 31915              e.floorrightBig = 8971;
 31916              e.floorrightBigg = 8971;
 31917              e.floorrightbigg = 8971;
 31918              e.hatwide = 770;
 31919              e.hatwider = 770;
 31920              e.hatwidest = 770;
 31921              e.intercal = 7488;
 31922              e.integraldisplay = 8747;
 31923              e.integraltext = 8747;
 31924              e.intersectiondisplay = 8898;
 31925              e.intersectiontext = 8898;
 31926              e.logicalanddisplay = 8743;
 31927              e.logicalandtext = 8743;
 31928              e.logicalordisplay = 8744;
 31929              e.logicalortext = 8744;
 31930              e.parenleftBig = 40;
 31931              e.parenleftbig = 40;
 31932              e.parenleftBigg = 40;
 31933              e.parenleftbigg = 40;
 31934              e.parenrightBig = 41;
 31935              e.parenrightbig = 41;
 31936              e.parenrightBigg = 41;
 31937              e.parenrightbigg = 41;
 31938              e.prime = 8242;
 31939              e.productdisplay = 8719;
 31940              e.producttext = 8719;
 31941              e.radicalbig = 8730;
 31942              e.radicalBig = 8730;
 31943              e.radicalBigg = 8730;
 31944              e.radicalbigg = 8730;
 31945              e.radicalbt = 8730;
 31946              e.radicaltp = 8730;
 31947              e.radicalvertex = 8730;
 31948              e.slashbig = 47;
 31949              e.slashBig = 47;
 31950              e.slashBigg = 47;
 31951              e.slashbigg = 47;
 31952              e.summationdisplay = 8721;
 31953              e.summationtext = 8721;
 31954              e.tildewide = 732;
 31955              e.tildewider = 732;
 31956              e.tildewidest = 732;
 31957              e.uniondisplay = 8899;
 31958              e.unionmultidisplay = 8846;
 31959              e.unionmultitext = 8846;
 31960              e.unionsqdisplay = 8852;
 31961              e.unionsqtext = 8852;
 31962              e.uniontext = 8899;
 31963              e.vextenddouble = 8741;
 31964              e.vextendsingle = 8739;
 31965            });
 31966            t.getGlyphsUnicode = n;
 31967            const i = (0, r.getLookupTableFactory)(function (e) {
 31968              e.space = 32;
 31969              e.a1 = 9985;
 31970              e.a2 = 9986;
 31971              e.a202 = 9987;
 31972              e.a3 = 9988;
 31973              e.a4 = 9742;
 31974              e.a5 = 9990;
 31975              e.a119 = 9991;
 31976              e.a118 = 9992;
 31977              e.a117 = 9993;
 31978              e.a11 = 9755;
 31979              e.a12 = 9758;
 31980              e.a13 = 9996;
 31981              e.a14 = 9997;
 31982              e.a15 = 9998;
 31983              e.a16 = 9999;
 31984              e.a105 = 1e4;
 31985              e.a17 = 10001;
 31986              e.a18 = 10002;
 31987              e.a19 = 10003;
 31988              e.a20 = 10004;
 31989              e.a21 = 10005;
 31990              e.a22 = 10006;
 31991              e.a23 = 10007;
 31992              e.a24 = 10008;
 31993              e.a25 = 10009;
 31994              e.a26 = 10010;
 31995              e.a27 = 10011;
 31996              e.a28 = 10012;
 31997              e.a6 = 10013;
 31998              e.a7 = 10014;
 31999              e.a8 = 10015;
 32000              e.a9 = 10016;
 32001              e.a10 = 10017;
 32002              e.a29 = 10018;
 32003              e.a30 = 10019;
 32004              e.a31 = 10020;
 32005              e.a32 = 10021;
 32006              e.a33 = 10022;
 32007              e.a34 = 10023;
 32008              e.a35 = 9733;
 32009              e.a36 = 10025;
 32010              e.a37 = 10026;
 32011              e.a38 = 10027;
 32012              e.a39 = 10028;
 32013              e.a40 = 10029;
 32014              e.a41 = 10030;
 32015              e.a42 = 10031;
 32016              e.a43 = 10032;
 32017              e.a44 = 10033;
 32018              e.a45 = 10034;
 32019              e.a46 = 10035;
 32020              e.a47 = 10036;
 32021              e.a48 = 10037;
 32022              e.a49 = 10038;
 32023              e.a50 = 10039;
 32024              e.a51 = 10040;
 32025              e.a52 = 10041;
 32026              e.a53 = 10042;
 32027              e.a54 = 10043;
 32028              e.a55 = 10044;
 32029              e.a56 = 10045;
 32030              e.a57 = 10046;
 32031              e.a58 = 10047;
 32032              e.a59 = 10048;
 32033              e.a60 = 10049;
 32034              e.a61 = 10050;
 32035              e.a62 = 10051;
 32036              e.a63 = 10052;
 32037              e.a64 = 10053;
 32038              e.a65 = 10054;
 32039              e.a66 = 10055;
 32040              e.a67 = 10056;
 32041              e.a68 = 10057;
 32042              e.a69 = 10058;
 32043              e.a70 = 10059;
 32044              e.a71 = 9679;
 32045              e.a72 = 10061;
 32046              e.a73 = 9632;
 32047              e.a74 = 10063;
 32048              e.a203 = 10064;
 32049              e.a75 = 10065;
 32050              e.a204 = 10066;
 32051              e.a76 = 9650;
 32052              e.a77 = 9660;
 32053              e.a78 = 9670;
 32054              e.a79 = 10070;
 32055              e.a81 = 9687;
 32056              e.a82 = 10072;
 32057              e.a83 = 10073;
 32058              e.a84 = 10074;
 32059              e.a97 = 10075;
 32060              e.a98 = 10076;
 32061              e.a99 = 10077;
 32062              e.a100 = 10078;
 32063              e.a101 = 10081;
 32064              e.a102 = 10082;
 32065              e.a103 = 10083;
 32066              e.a104 = 10084;
 32067              e.a106 = 10085;
 32068              e.a107 = 10086;
 32069              e.a108 = 10087;
 32070              e.a112 = 9827;
 32071              e.a111 = 9830;
 32072              e.a110 = 9829;
 32073              e.a109 = 9824;
 32074              e.a120 = 9312;
 32075              e.a121 = 9313;
 32076              e.a122 = 9314;
 32077              e.a123 = 9315;
 32078              e.a124 = 9316;
 32079              e.a125 = 9317;
 32080              e.a126 = 9318;
 32081              e.a127 = 9319;
 32082              e.a128 = 9320;
 32083              e.a129 = 9321;
 32084              e.a130 = 10102;
 32085              e.a131 = 10103;
 32086              e.a132 = 10104;
 32087              e.a133 = 10105;
 32088              e.a134 = 10106;
 32089              e.a135 = 10107;
 32090              e.a136 = 10108;
 32091              e.a137 = 10109;
 32092              e.a138 = 10110;
 32093              e.a139 = 10111;
 32094              e.a140 = 10112;
 32095              e.a141 = 10113;
 32096              e.a142 = 10114;
 32097              e.a143 = 10115;
 32098              e.a144 = 10116;
 32099              e.a145 = 10117;
 32100              e.a146 = 10118;
 32101              e.a147 = 10119;
 32102              e.a148 = 10120;
 32103              e.a149 = 10121;
 32104              e.a150 = 10122;
 32105              e.a151 = 10123;
 32106              e.a152 = 10124;
 32107              e.a153 = 10125;
 32108              e.a154 = 10126;
 32109              e.a155 = 10127;
 32110              e.a156 = 10128;
 32111              e.a157 = 10129;
 32112              e.a158 = 10130;
 32113              e.a159 = 10131;
 32114              e.a160 = 10132;
 32115              e.a161 = 8594;
 32116              e.a163 = 8596;
 32117              e.a164 = 8597;
 32118              e.a196 = 10136;
 32119              e.a165 = 10137;
 32120              e.a192 = 10138;
 32121              e.a166 = 10139;
 32122              e.a167 = 10140;
 32123              e.a168 = 10141;
 32124              e.a169 = 10142;
 32125              e.a170 = 10143;
 32126              e.a171 = 10144;
 32127              e.a172 = 10145;
 32128              e.a173 = 10146;
 32129              e.a162 = 10147;
 32130              e.a174 = 10148;
 32131              e.a175 = 10149;
 32132              e.a176 = 10150;
 32133              e.a177 = 10151;
 32134              e.a178 = 10152;
 32135              e.a179 = 10153;
 32136              e.a193 = 10154;
 32137              e.a180 = 10155;
 32138              e.a199 = 10156;
 32139              e.a181 = 10157;
 32140              e.a200 = 10158;
 32141              e.a182 = 10159;
 32142              e.a201 = 10161;
 32143              e.a183 = 10162;
 32144              e.a184 = 10163;
 32145              e.a197 = 10164;
 32146              e.a185 = 10165;
 32147              e.a194 = 10166;
 32148              e.a198 = 10167;
 32149              e.a186 = 10168;
 32150              e.a195 = 10169;
 32151              e.a187 = 10170;
 32152              e.a188 = 10171;
 32153              e.a189 = 10172;
 32154              e.a190 = 10173;
 32155              e.a191 = 10174;
 32156              e.a89 = 10088;
 32157              e.a90 = 10089;
 32158              e.a93 = 10090;
 32159              e.a94 = 10091;
 32160              e.a91 = 10092;
 32161              e.a92 = 10093;
 32162              e.a205 = 10094;
 32163              e.a85 = 10095;
 32164              e.a206 = 10096;
 32165              e.a86 = 10097;
 32166              e.a87 = 10098;
 32167              e.a88 = 10099;
 32168              e.a95 = 10100;
 32169              e.a96 = 10101;
 32170              e[".notdef"] = 0;
 32171            });
 32172            t.getDingbatsGlyphsUnicode = i;
 32173          },
 32174          (e, t, a) => {
 32175            Object.defineProperty(t, "__esModule", { value: !0 });
 32176            t.clearUnicodeCaches = function clearUnicodeCaches() {
 32177              s.clear();
 32178            };
 32179            t.getCharUnicodeCategory = function getCharUnicodeCategory(e) {
 32180              const t = s.get(e);
 32181              if (t) return t;
 32182              const a = e.match(i),
 32183                r = {
 32184                  isWhitespace: !!a?.[1],
 32185                  isZeroWidthDiacritic: !!a?.[2],
 32186                  isInvisibleFormatMark: !!a?.[3],
 32187                };
 32188              s.set(e, r);
 32189              return r;
 32190            };
 32191            t.getUnicodeForGlyph = function getUnicodeForGlyph(e, t) {
 32192              let a = t[e];
 32193              if (void 0 !== a) return a;
 32194              if (!e) return -1;
 32195              if ("u" === e[0]) {
 32196                const t = e.length;
 32197                let r;
 32198                if (7 === t && "n" === e[1] && "i" === e[2]) r = e.substring(3);
 32199                else {
 32200                  if (!(t >= 5 && t <= 7)) return -1;
 32201                  r = e.substring(1);
 32202                }
 32203                if (r === r.toUpperCase()) {
 32204                  a = parseInt(r, 16);
 32205                  if (a >= 0) return a;
 32206                }
 32207              }
 32208              return -1;
 32209            };
 32210            t.getUnicodeRangeFor = function getUnicodeRangeFor(e, t = -1) {
 32211              if (-1 !== t) {
 32212                const a = n[t];
 32213                for (let r = 0, n = a.length; r < n; r += 2)
 32214                  if (e >= a[r] && e <= a[r + 1]) return t;
 32215              }
 32216              for (let t = 0, a = n.length; t < a; t++) {
 32217                const a = n[t];
 32218                for (let r = 0, n = a.length; r < n; r += 2)
 32219                  if (e >= a[r] && e <= a[r + 1]) return t;
 32220              }
 32221              return -1;
 32222            };
 32223            t.mapSpecialUnicodeValues = function mapSpecialUnicodeValues(e) {
 32224              if (e >= 65520 && e <= 65535) return 0;
 32225              if (e >= 62976 && e <= 63743) return r()[e] || e;
 32226              if (173 === e) return 45;
 32227              return e;
 32228            };
 32229            const r = (0, a(3).getLookupTableFactory)(function (e) {
 32230              e[63721] = 169;
 32231              e[63193] = 169;
 32232              e[63720] = 174;
 32233              e[63194] = 174;
 32234              e[63722] = 8482;
 32235              e[63195] = 8482;
 32236              e[63729] = 9127;
 32237              e[63730] = 9128;
 32238              e[63731] = 9129;
 32239              e[63740] = 9131;
 32240              e[63741] = 9132;
 32241              e[63742] = 9133;
 32242              e[63726] = 9121;
 32243              e[63727] = 9122;
 32244              e[63728] = 9123;
 32245              e[63737] = 9124;
 32246              e[63738] = 9125;
 32247              e[63739] = 9126;
 32248              e[63723] = 9115;
 32249              e[63724] = 9116;
 32250              e[63725] = 9117;
 32251              e[63734] = 9118;
 32252              e[63735] = 9119;
 32253              e[63736] = 9120;
 32254            });
 32255            const n = [
 32256              [0, 127],
 32257              [128, 255],
 32258              [256, 383],
 32259              [384, 591],
 32260              [592, 687, 7424, 7551, 7552, 7615],
 32261              [688, 767, 42752, 42783],
 32262              [768, 879, 7616, 7679],
 32263              [880, 1023],
 32264              [11392, 11519],
 32265              [1024, 1279, 1280, 1327, 11744, 11775, 42560, 42655],
 32266              [1328, 1423],
 32267              [1424, 1535],
 32268              [42240, 42559],
 32269              [1536, 1791, 1872, 1919],
 32270              [1984, 2047],
 32271              [2304, 2431],
 32272              [2432, 2559],
 32273              [2560, 2687],
 32274              [2688, 2815],
 32275              [2816, 2943],
 32276              [2944, 3071],
 32277              [3072, 3199],
 32278              [3200, 3327],
 32279              [3328, 3455],
 32280              [3584, 3711],
 32281              [3712, 3839],
 32282              [4256, 4351, 11520, 11567],
 32283              [6912, 7039],
 32284              [4352, 4607],
 32285              [7680, 7935, 11360, 11391, 42784, 43007],
 32286              [7936, 8191],
 32287              [8192, 8303, 11776, 11903],
 32288              [8304, 8351],
 32289              [8352, 8399],
 32290              [8400, 8447],
 32291              [8448, 8527],
 32292              [8528, 8591],
 32293              [8592, 8703, 10224, 10239, 10496, 10623, 11008, 11263],
 32294              [8704, 8959, 10752, 11007, 10176, 10223, 10624, 10751],
 32295              [8960, 9215],
 32296              [9216, 9279],
 32297              [9280, 9311],
 32298              [9312, 9471],
 32299              [9472, 9599],
 32300              [9600, 9631],
 32301              [9632, 9727],
 32302              [9728, 9983],
 32303              [9984, 10175],
 32304              [12288, 12351],
 32305              [12352, 12447],
 32306              [12448, 12543, 12784, 12799],
 32307              [12544, 12591, 12704, 12735],
 32308              [12592, 12687],
 32309              [43072, 43135],
 32310              [12800, 13055],
 32311              [13056, 13311],
 32312              [44032, 55215],
 32313              [55296, 57343],
 32314              [67840, 67871],
 32315              [
 32316                19968, 40959, 11904, 12031, 12032, 12255, 12272, 12287, 13312,
 32317                19903, 131072, 173791, 12688, 12703,
 32318              ],
 32319              [57344, 63743],
 32320              [12736, 12783, 63744, 64255, 194560, 195103],
 32321              [64256, 64335],
 32322              [64336, 65023],
 32323              [65056, 65071],
 32324              [65040, 65055],
 32325              [65104, 65135],
 32326              [65136, 65279],
 32327              [65280, 65519],
 32328              [65520, 65535],
 32329              [3840, 4095],
 32330              [1792, 1871],
 32331              [1920, 1983],
 32332              [3456, 3583],
 32333              [4096, 4255],
 32334              [4608, 4991, 4992, 5023, 11648, 11743],
 32335              [5024, 5119],
 32336              [5120, 5759],
 32337              [5760, 5791],
 32338              [5792, 5887],
 32339              [6016, 6143],
 32340              [6144, 6319],
 32341              [10240, 10495],
 32342              [40960, 42127],
 32343              [5888, 5919, 5920, 5951, 5952, 5983, 5984, 6015],
 32344              [66304, 66351],
 32345              [66352, 66383],
 32346              [66560, 66639],
 32347              [118784, 119039, 119040, 119295, 119296, 119375],
 32348              [119808, 120831],
 32349              [1044480, 1048573],
 32350              [65024, 65039, 917760, 917999],
 32351              [917504, 917631],
 32352              [6400, 6479],
 32353              [6480, 6527],
 32354              [6528, 6623],
 32355              [6656, 6687],
 32356              [11264, 11359],
 32357              [11568, 11647],
 32358              [19904, 19967],
 32359              [43008, 43055],
 32360              [65536, 65663, 65664, 65791, 65792, 65855],
 32361              [65856, 65935],
 32362              [66432, 66463],
 32363              [66464, 66527],
 32364              [66640, 66687],
 32365              [66688, 66735],
 32366              [67584, 67647],
 32367              [68096, 68191],
 32368              [119552, 119647],
 32369              [73728, 74751, 74752, 74879],
 32370              [119648, 119679],
 32371              [7040, 7103],
 32372              [7168, 7247],
 32373              [7248, 7295],
 32374              [43136, 43231],
 32375              [43264, 43311],
 32376              [43312, 43359],
 32377              [43520, 43615],
 32378              [65936, 65999],
 32379              [66e3, 66047],
 32380              [66208, 66271, 66176, 66207, 67872, 67903],
 32381              [127024, 127135, 126976, 127023],
 32382            ];
 32383            const i = new RegExp("^(\\s)|(\\p{Mn})|(\\p{Cf})$", "u"),
 32384              s = new Map();
 32385          },
 32386          (e, t, a) => {
 32387            Object.defineProperty(t, "__esModule", { value: !0 });
 32388            t.getSerifFonts =
 32389              t.getNonStdFontMap =
 32390              t.getGlyphMapForStandardFonts =
 32391              t.getFontNameToFileMap =
 32392                void 0;
 32393            t.getStandardFontName = function getStandardFontName(e) {
 32394              const t = (0, n.normalizeFontName)(e);
 32395              return i()[t];
 32396            };
 32397            t.getSymbolsFonts =
 32398              t.getSupplementalGlyphMapForCalibri =
 32399              t.getSupplementalGlyphMapForArialBlack =
 32400              t.getStdFontMap =
 32401                void 0;
 32402            t.isKnownFontName = function isKnownFontName(e) {
 32403              const t = (0, n.normalizeFontName)(e);
 32404              return !!(i()[t] || o()[t] || c()[t] || l()[t]);
 32405            };
 32406            var r = a(3),
 32407              n = a(38);
 32408            const i = (0, r.getLookupTableFactory)(function (e) {
 32409              e["Times-Roman"] = "Times-Roman";
 32410              e.Helvetica = "Helvetica";
 32411              e.Courier = "Courier";
 32412              e.Symbol = "Symbol";
 32413              e["Times-Bold"] = "Times-Bold";
 32414              e["Helvetica-Bold"] = "Helvetica-Bold";
 32415              e["Courier-Bold"] = "Courier-Bold";
 32416              e.ZapfDingbats = "ZapfDingbats";
 32417              e["Times-Italic"] = "Times-Italic";
 32418              e["Helvetica-Oblique"] = "Helvetica-Oblique";
 32419              e["Courier-Oblique"] = "Courier-Oblique";
 32420              e["Times-BoldItalic"] = "Times-BoldItalic";
 32421              e["Helvetica-BoldOblique"] = "Helvetica-BoldOblique";
 32422              e["Courier-BoldOblique"] = "Courier-BoldOblique";
 32423              e.ArialNarrow = "Helvetica";
 32424              e["ArialNarrow-Bold"] = "Helvetica-Bold";
 32425              e["ArialNarrow-BoldItalic"] = "Helvetica-BoldOblique";
 32426              e["ArialNarrow-Italic"] = "Helvetica-Oblique";
 32427              e.ArialBlack = "Helvetica";
 32428              e["ArialBlack-Bold"] = "Helvetica-Bold";
 32429              e["ArialBlack-BoldItalic"] = "Helvetica-BoldOblique";
 32430              e["ArialBlack-Italic"] = "Helvetica-Oblique";
 32431              e["Arial-Black"] = "Helvetica";
 32432              e["Arial-Black-Bold"] = "Helvetica-Bold";
 32433              e["Arial-Black-BoldItalic"] = "Helvetica-BoldOblique";
 32434              e["Arial-Black-Italic"] = "Helvetica-Oblique";
 32435              e.Arial = "Helvetica";
 32436              e["Arial-Bold"] = "Helvetica-Bold";
 32437              e["Arial-BoldItalic"] = "Helvetica-BoldOblique";
 32438              e["Arial-Italic"] = "Helvetica-Oblique";
 32439              e.ArialMT = "Helvetica";
 32440              e["Arial-BoldItalicMT"] = "Helvetica-BoldOblique";
 32441              e["Arial-BoldMT"] = "Helvetica-Bold";
 32442              e["Arial-ItalicMT"] = "Helvetica-Oblique";
 32443              e["Arial-BoldItalicMT-BoldItalic"] = "Helvetica-BoldOblique";
 32444              e["Arial-BoldMT-Bold"] = "Helvetica-Bold";
 32445              e["Arial-ItalicMT-Italic"] = "Helvetica-Oblique";
 32446              e.ArialUnicodeMS = "Helvetica";
 32447              e["ArialUnicodeMS-Bold"] = "Helvetica-Bold";
 32448              e["ArialUnicodeMS-BoldItalic"] = "Helvetica-BoldOblique";
 32449              e["ArialUnicodeMS-Italic"] = "Helvetica-Oblique";
 32450              e["Courier-BoldItalic"] = "Courier-BoldOblique";
 32451              e["Courier-Italic"] = "Courier-Oblique";
 32452              e.CourierNew = "Courier";
 32453              e["CourierNew-Bold"] = "Courier-Bold";
 32454              e["CourierNew-BoldItalic"] = "Courier-BoldOblique";
 32455              e["CourierNew-Italic"] = "Courier-Oblique";
 32456              e["CourierNewPS-BoldItalicMT"] = "Courier-BoldOblique";
 32457              e["CourierNewPS-BoldMT"] = "Courier-Bold";
 32458              e["CourierNewPS-ItalicMT"] = "Courier-Oblique";
 32459              e.CourierNewPSMT = "Courier";
 32460              e["Helvetica-BoldItalic"] = "Helvetica-BoldOblique";
 32461              e["Helvetica-Italic"] = "Helvetica-Oblique";
 32462              e["Symbol-Bold"] = "Symbol";
 32463              e["Symbol-BoldItalic"] = "Symbol";
 32464              e["Symbol-Italic"] = "Symbol";
 32465              e.TimesNewRoman = "Times-Roman";
 32466              e["TimesNewRoman-Bold"] = "Times-Bold";
 32467              e["TimesNewRoman-BoldItalic"] = "Times-BoldItalic";
 32468              e["TimesNewRoman-Italic"] = "Times-Italic";
 32469              e.TimesNewRomanPS = "Times-Roman";
 32470              e["TimesNewRomanPS-Bold"] = "Times-Bold";
 32471              e["TimesNewRomanPS-BoldItalic"] = "Times-BoldItalic";
 32472              e["TimesNewRomanPS-BoldItalicMT"] = "Times-BoldItalic";
 32473              e["TimesNewRomanPS-BoldMT"] = "Times-Bold";
 32474              e["TimesNewRomanPS-Italic"] = "Times-Italic";
 32475              e["TimesNewRomanPS-ItalicMT"] = "Times-Italic";
 32476              e.TimesNewRomanPSMT = "Times-Roman";
 32477              e["TimesNewRomanPSMT-Bold"] = "Times-Bold";
 32478              e["TimesNewRomanPSMT-BoldItalic"] = "Times-BoldItalic";
 32479              e["TimesNewRomanPSMT-Italic"] = "Times-Italic";
 32480            });
 32481            t.getStdFontMap = i;
 32482            const s = (0, r.getLookupTableFactory)(function (e) {
 32483              e.Courier = "FoxitFixed.pfb";
 32484              e["Courier-Bold"] = "FoxitFixedBold.pfb";
 32485              e["Courier-BoldOblique"] = "FoxitFixedBoldItalic.pfb";
 32486              e["Courier-Oblique"] = "FoxitFixedItalic.pfb";
 32487              e.Helvetica = "LiberationSans-Regular.ttf";
 32488              e["Helvetica-Bold"] = "LiberationSans-Bold.ttf";
 32489              e["Helvetica-BoldOblique"] = "LiberationSans-BoldItalic.ttf";
 32490              e["Helvetica-Oblique"] = "LiberationSans-Italic.ttf";
 32491              e["Times-Roman"] = "FoxitSerif.pfb";
 32492              e["Times-Bold"] = "FoxitSerifBold.pfb";
 32493              e["Times-BoldItalic"] = "FoxitSerifBoldItalic.pfb";
 32494              e["Times-Italic"] = "FoxitSerifItalic.pfb";
 32495              e.Symbol = "FoxitSymbol.pfb";
 32496              e.ZapfDingbats = "FoxitDingbats.pfb";
 32497              e["LiberationSans-Regular"] = "LiberationSans-Regular.ttf";
 32498              e["LiberationSans-Bold"] = "LiberationSans-Bold.ttf";
 32499              e["LiberationSans-Italic"] = "LiberationSans-Italic.ttf";
 32500              e["LiberationSans-BoldItalic"] = "LiberationSans-BoldItalic.ttf";
 32501            });
 32502            t.getFontNameToFileMap = s;
 32503            const o = (0, r.getLookupTableFactory)(function (e) {
 32504              e.Calibri = "Helvetica";
 32505              e["Calibri-Bold"] = "Helvetica-Bold";
 32506              e["Calibri-BoldItalic"] = "Helvetica-BoldOblique";
 32507              e["Calibri-Italic"] = "Helvetica-Oblique";
 32508              e.CenturyGothic = "Helvetica";
 32509              e["CenturyGothic-Bold"] = "Helvetica-Bold";
 32510              e["CenturyGothic-BoldItalic"] = "Helvetica-BoldOblique";
 32511              e["CenturyGothic-Italic"] = "Helvetica-Oblique";
 32512              e.ComicSansMS = "Comic Sans MS";
 32513              e["ComicSansMS-Bold"] = "Comic Sans MS-Bold";
 32514              e["ComicSansMS-BoldItalic"] = "Comic Sans MS-BoldItalic";
 32515              e["ComicSansMS-Italic"] = "Comic Sans MS-Italic";
 32516              e.Impact = "Helvetica";
 32517              e["ItcSymbol-Bold"] = "Helvetica-Bold";
 32518              e["ItcSymbol-BoldItalic"] = "Helvetica-BoldOblique";
 32519              e["ItcSymbol-Book"] = "Helvetica";
 32520              e["ItcSymbol-BookItalic"] = "Helvetica-Oblique";
 32521              e["ItcSymbol-Medium"] = "Helvetica";
 32522              e["ItcSymbol-MediumItalic"] = "Helvetica-Oblique";
 32523              e.LucidaConsole = "Courier";
 32524              e["LucidaConsole-Bold"] = "Courier-Bold";
 32525              e["LucidaConsole-BoldItalic"] = "Courier-BoldOblique";
 32526              e["LucidaConsole-Italic"] = "Courier-Oblique";
 32527              e["LucidaSans-Demi"] = "Helvetica-Bold";
 32528              e["MS-Gothic"] = "MS Gothic";
 32529              e["MS-Gothic-Bold"] = "MS Gothic-Bold";
 32530              e["MS-Gothic-BoldItalic"] = "MS Gothic-BoldItalic";
 32531              e["MS-Gothic-Italic"] = "MS Gothic-Italic";
 32532              e["MS-Mincho"] = "MS Mincho";
 32533              e["MS-Mincho-Bold"] = "MS Mincho-Bold";
 32534              e["MS-Mincho-BoldItalic"] = "MS Mincho-BoldItalic";
 32535              e["MS-Mincho-Italic"] = "MS Mincho-Italic";
 32536              e["MS-PGothic"] = "MS PGothic";
 32537              e["MS-PGothic-Bold"] = "MS PGothic-Bold";
 32538              e["MS-PGothic-BoldItalic"] = "MS PGothic-BoldItalic";
 32539              e["MS-PGothic-Italic"] = "MS PGothic-Italic";
 32540              e["MS-PMincho"] = "MS PMincho";
 32541              e["MS-PMincho-Bold"] = "MS PMincho-Bold";
 32542              e["MS-PMincho-BoldItalic"] = "MS PMincho-BoldItalic";
 32543              e["MS-PMincho-Italic"] = "MS PMincho-Italic";
 32544              e.NuptialScript = "Times-Italic";
 32545              e.SegoeUISymbol = "Helvetica";
 32546            });
 32547            t.getNonStdFontMap = o;
 32548            const c = (0, r.getLookupTableFactory)(function (e) {
 32549              e["Adobe Jenson"] = !0;
 32550              e["Adobe Text"] = !0;
 32551              e.Albertus = !0;
 32552              e.Aldus = !0;
 32553              e.Alexandria = !0;
 32554              e.Algerian = !0;
 32555              e["American Typewriter"] = !0;
 32556              e.Antiqua = !0;
 32557              e.Apex = !0;
 32558              e.Arno = !0;
 32559              e.Aster = !0;
 32560              e.Aurora = !0;
 32561              e.Baskerville = !0;
 32562              e.Bell = !0;
 32563              e.Bembo = !0;
 32564              e["Bembo Schoolbook"] = !0;
 32565              e.Benguiat = !0;
 32566              e["Berkeley Old Style"] = !0;
 32567              e["Bernhard Modern"] = !0;
 32568              e["Berthold City"] = !0;
 32569              e.Bodoni = !0;
 32570              e["Bauer Bodoni"] = !0;
 32571              e["Book Antiqua"] = !0;
 32572              e.Bookman = !0;
 32573              e["Bordeaux Roman"] = !0;
 32574              e["Californian FB"] = !0;
 32575              e.Calisto = !0;
 32576              e.Calvert = !0;
 32577              e.Capitals = !0;
 32578              e.Cambria = !0;
 32579              e.Cartier = !0;
 32580              e.Caslon = !0;
 32581              e.Catull = !0;
 32582              e.Centaur = !0;
 32583              e["Century Old Style"] = !0;
 32584              e["Century Schoolbook"] = !0;
 32585              e.Chaparral = !0;
 32586              e["Charis SIL"] = !0;
 32587              e.Cheltenham = !0;
 32588              e["Cholla Slab"] = !0;
 32589              e.Clarendon = !0;
 32590              e.Clearface = !0;
 32591              e.Cochin = !0;
 32592              e.Colonna = !0;
 32593              e["Computer Modern"] = !0;
 32594              e["Concrete Roman"] = !0;
 32595              e.Constantia = !0;
 32596              e["Cooper Black"] = !0;
 32597              e.Corona = !0;
 32598              e.Ecotype = !0;
 32599              e.Egyptienne = !0;
 32600              e.Elephant = !0;
 32601              e.Excelsior = !0;
 32602              e.Fairfield = !0;
 32603              e["FF Scala"] = !0;
 32604              e.Folkard = !0;
 32605              e.Footlight = !0;
 32606              e.FreeSerif = !0;
 32607              e["Friz Quadrata"] = !0;
 32608              e.Garamond = !0;
 32609              e.Gentium = !0;
 32610              e.Georgia = !0;
 32611              e.Gloucester = !0;
 32612              e["Goudy Old Style"] = !0;
 32613              e["Goudy Schoolbook"] = !0;
 32614              e["Goudy Pro Font"] = !0;
 32615              e.Granjon = !0;
 32616              e["Guardian Egyptian"] = !0;
 32617              e.Heather = !0;
 32618              e.Hercules = !0;
 32619              e["High Tower Text"] = !0;
 32620              e.Hiroshige = !0;
 32621              e["Hoefler Text"] = !0;
 32622              e["Humana Serif"] = !0;
 32623              e.Imprint = !0;
 32624              e["Ionic No. 5"] = !0;
 32625              e.Janson = !0;
 32626              e.Joanna = !0;
 32627              e.Korinna = !0;
 32628              e.Lexicon = !0;
 32629              e.LiberationSerif = !0;
 32630              e["Liberation Serif"] = !0;
 32631              e["Linux Libertine"] = !0;
 32632              e.Literaturnaya = !0;
 32633              e.Lucida = !0;
 32634              e["Lucida Bright"] = !0;
 32635              e.Melior = !0;
 32636              e.Memphis = !0;
 32637              e.Miller = !0;
 32638              e.Minion = !0;
 32639              e.Modern = !0;
 32640              e["Mona Lisa"] = !0;
 32641              e["Mrs Eaves"] = !0;
 32642              e["MS Serif"] = !0;
 32643              e["Museo Slab"] = !0;
 32644              e["New York"] = !0;
 32645              e["Nimbus Roman"] = !0;
 32646              e["NPS Rawlinson Roadway"] = !0;
 32647              e.NuptialScript = !0;
 32648              e.Palatino = !0;
 32649              e.Perpetua = !0;
 32650              e.Plantin = !0;
 32651              e["Plantin Schoolbook"] = !0;
 32652              e.Playbill = !0;
 32653              e["Poor Richard"] = !0;
 32654              e["Rawlinson Roadway"] = !0;
 32655              e.Renault = !0;
 32656              e.Requiem = !0;
 32657              e.Rockwell = !0;
 32658              e.Roman = !0;
 32659              e["Rotis Serif"] = !0;
 32660              e.Sabon = !0;
 32661              e.Scala = !0;
 32662              e.Seagull = !0;
 32663              e.Sistina = !0;
 32664              e.Souvenir = !0;
 32665              e.STIX = !0;
 32666              e["Stone Informal"] = !0;
 32667              e["Stone Serif"] = !0;
 32668              e.Sylfaen = !0;
 32669              e.Times = !0;
 32670              e.Trajan = !0;
 32671              e["Trinité"] = !0;
 32672              e["Trump Mediaeval"] = !0;
 32673              e.Utopia = !0;
 32674              e["Vale Type"] = !0;
 32675              e["Bitstream Vera"] = !0;
 32676              e["Vera Serif"] = !0;
 32677              e.Versailles = !0;
 32678              e.Wanted = !0;
 32679              e.Weiss = !0;
 32680              e["Wide Latin"] = !0;
 32681              e.Windsor = !0;
 32682              e.XITS = !0;
 32683            });
 32684            t.getSerifFonts = c;
 32685            const l = (0, r.getLookupTableFactory)(function (e) {
 32686              e.Dingbats = !0;
 32687              e.Symbol = !0;
 32688              e.ZapfDingbats = !0;
 32689              e.Wingdings = !0;
 32690              e["Wingdings-Bold"] = !0;
 32691              e["Wingdings-Regular"] = !0;
 32692            });
 32693            t.getSymbolsFonts = l;
 32694            const h = (0, r.getLookupTableFactory)(function (e) {
 32695              e[2] = 10;
 32696              e[3] = 32;
 32697              e[4] = 33;
 32698              e[5] = 34;
 32699              e[6] = 35;
 32700              e[7] = 36;
 32701              e[8] = 37;
 32702              e[9] = 38;
 32703              e[10] = 39;
 32704              e[11] = 40;
 32705              e[12] = 41;
 32706              e[13] = 42;
 32707              e[14] = 43;
 32708              e[15] = 44;
 32709              e[16] = 45;
 32710              e[17] = 46;
 32711              e[18] = 47;
 32712              e[19] = 48;
 32713              e[20] = 49;
 32714              e[21] = 50;
 32715              e[22] = 51;
 32716              e[23] = 52;
 32717              e[24] = 53;
 32718              e[25] = 54;
 32719              e[26] = 55;
 32720              e[27] = 56;
 32721              e[28] = 57;
 32722              e[29] = 58;
 32723              e[30] = 894;
 32724              e[31] = 60;
 32725              e[32] = 61;
 32726              e[33] = 62;
 32727              e[34] = 63;
 32728              e[35] = 64;
 32729              e[36] = 65;
 32730              e[37] = 66;
 32731              e[38] = 67;
 32732              e[39] = 68;
 32733              e[40] = 69;
 32734              e[41] = 70;
 32735              e[42] = 71;
 32736              e[43] = 72;
 32737              e[44] = 73;
 32738              e[45] = 74;
 32739              e[46] = 75;
 32740              e[47] = 76;
 32741              e[48] = 77;
 32742              e[49] = 78;
 32743              e[50] = 79;
 32744              e[51] = 80;
 32745              e[52] = 81;
 32746              e[53] = 82;
 32747              e[54] = 83;
 32748              e[55] = 84;
 32749              e[56] = 85;
 32750              e[57] = 86;
 32751              e[58] = 87;
 32752              e[59] = 88;
 32753              e[60] = 89;
 32754              e[61] = 90;
 32755              e[62] = 91;
 32756              e[63] = 92;
 32757              e[64] = 93;
 32758              e[65] = 94;
 32759              e[66] = 95;
 32760              e[67] = 96;
 32761              e[68] = 97;
 32762              e[69] = 98;
 32763              e[70] = 99;
 32764              e[71] = 100;
 32765              e[72] = 101;
 32766              e[73] = 102;
 32767              e[74] = 103;
 32768              e[75] = 104;
 32769              e[76] = 105;
 32770              e[77] = 106;
 32771              e[78] = 107;
 32772              e[79] = 108;
 32773              e[80] = 109;
 32774              e[81] = 110;
 32775              e[82] = 111;
 32776              e[83] = 112;
 32777              e[84] = 113;
 32778              e[85] = 114;
 32779              e[86] = 115;
 32780              e[87] = 116;
 32781              e[88] = 117;
 32782              e[89] = 118;
 32783              e[90] = 119;
 32784              e[91] = 120;
 32785              e[92] = 121;
 32786              e[93] = 122;
 32787              e[94] = 123;
 32788              e[95] = 124;
 32789              e[96] = 125;
 32790              e[97] = 126;
 32791              e[98] = 196;
 32792              e[99] = 197;
 32793              e[100] = 199;
 32794              e[101] = 201;
 32795              e[102] = 209;
 32796              e[103] = 214;
 32797              e[104] = 220;
 32798              e[105] = 225;
 32799              e[106] = 224;
 32800              e[107] = 226;
 32801              e[108] = 228;
 32802              e[109] = 227;
 32803              e[110] = 229;
 32804              e[111] = 231;
 32805              e[112] = 233;
 32806              e[113] = 232;
 32807              e[114] = 234;
 32808              e[115] = 235;
 32809              e[116] = 237;
 32810              e[117] = 236;
 32811              e[118] = 238;
 32812              e[119] = 239;
 32813              e[120] = 241;
 32814              e[121] = 243;
 32815              e[122] = 242;
 32816              e[123] = 244;
 32817              e[124] = 246;
 32818              e[125] = 245;
 32819              e[126] = 250;
 32820              e[127] = 249;
 32821              e[128] = 251;
 32822              e[129] = 252;
 32823              e[130] = 8224;
 32824              e[131] = 176;
 32825              e[132] = 162;
 32826              e[133] = 163;
 32827              e[134] = 167;
 32828              e[135] = 8226;
 32829              e[136] = 182;
 32830              e[137] = 223;
 32831              e[138] = 174;
 32832              e[139] = 169;
 32833              e[140] = 8482;
 32834              e[141] = 180;
 32835              e[142] = 168;
 32836              e[143] = 8800;
 32837              e[144] = 198;
 32838              e[145] = 216;
 32839              e[146] = 8734;
 32840              e[147] = 177;
 32841              e[148] = 8804;
 32842              e[149] = 8805;
 32843              e[150] = 165;
 32844              e[151] = 181;
 32845              e[152] = 8706;
 32846              e[153] = 8721;
 32847              e[154] = 8719;
 32848              e[156] = 8747;
 32849              e[157] = 170;
 32850              e[158] = 186;
 32851              e[159] = 8486;
 32852              e[160] = 230;
 32853              e[161] = 248;
 32854              e[162] = 191;
 32855              e[163] = 161;
 32856              e[164] = 172;
 32857              e[165] = 8730;
 32858              e[166] = 402;
 32859              e[167] = 8776;
 32860              e[168] = 8710;
 32861              e[169] = 171;
 32862              e[170] = 187;
 32863              e[171] = 8230;
 32864              e[179] = 8220;
 32865              e[180] = 8221;
 32866              e[181] = 8216;
 32867              e[182] = 8217;
 32868              e[200] = 193;
 32869              e[203] = 205;
 32870              e[207] = 211;
 32871              e[210] = 218;
 32872              e[223] = 711;
 32873              e[224] = 321;
 32874              e[225] = 322;
 32875              e[226] = 352;
 32876              e[227] = 353;
 32877              e[228] = 381;
 32878              e[229] = 382;
 32879              e[233] = 221;
 32880              e[234] = 253;
 32881              e[252] = 263;
 32882              e[253] = 268;
 32883              e[254] = 269;
 32884              e[258] = 258;
 32885              e[260] = 260;
 32886              e[261] = 261;
 32887              e[265] = 280;
 32888              e[266] = 281;
 32889              e[267] = 282;
 32890              e[268] = 283;
 32891              e[269] = 313;
 32892              e[275] = 323;
 32893              e[276] = 324;
 32894              e[278] = 328;
 32895              e[283] = 344;
 32896              e[284] = 345;
 32897              e[285] = 346;
 32898              e[286] = 347;
 32899              e[292] = 367;
 32900              e[295] = 377;
 32901              e[296] = 378;
 32902              e[298] = 380;
 32903              e[305] = 963;
 32904              e[306] = 964;
 32905              e[307] = 966;
 32906              e[308] = 8215;
 32907              e[309] = 8252;
 32908              e[310] = 8319;
 32909              e[311] = 8359;
 32910              e[312] = 8592;
 32911              e[313] = 8593;
 32912              e[337] = 9552;
 32913              e[493] = 1039;
 32914              e[494] = 1040;
 32915              e[672] = 1488;
 32916              e[673] = 1489;
 32917              e[674] = 1490;
 32918              e[675] = 1491;
 32919              e[676] = 1492;
 32920              e[677] = 1493;
 32921              e[678] = 1494;
 32922              e[679] = 1495;
 32923              e[680] = 1496;
 32924              e[681] = 1497;
 32925              e[682] = 1498;
 32926              e[683] = 1499;
 32927              e[684] = 1500;
 32928              e[685] = 1501;
 32929              e[686] = 1502;
 32930              e[687] = 1503;
 32931              e[688] = 1504;
 32932              e[689] = 1505;
 32933              e[690] = 1506;
 32934              e[691] = 1507;
 32935              e[692] = 1508;
 32936              e[693] = 1509;
 32937              e[694] = 1510;
 32938              e[695] = 1511;
 32939              e[696] = 1512;
 32940              e[697] = 1513;
 32941              e[698] = 1514;
 32942              e[705] = 1524;
 32943              e[706] = 8362;
 32944              e[710] = 64288;
 32945              e[711] = 64298;
 32946              e[759] = 1617;
 32947              e[761] = 1776;
 32948              e[763] = 1778;
 32949              e[775] = 1652;
 32950              e[777] = 1764;
 32951              e[778] = 1780;
 32952              e[779] = 1781;
 32953              e[780] = 1782;
 32954              e[782] = 771;
 32955              e[783] = 64726;
 32956              e[786] = 8363;
 32957              e[788] = 8532;
 32958              e[790] = 768;
 32959              e[791] = 769;
 32960              e[792] = 768;
 32961              e[795] = 803;
 32962              e[797] = 64336;
 32963              e[798] = 64337;
 32964              e[799] = 64342;
 32965              e[800] = 64343;
 32966              e[801] = 64344;
 32967              e[802] = 64345;
 32968              e[803] = 64362;
 32969              e[804] = 64363;
 32970              e[805] = 64364;
 32971              e[2424] = 7821;
 32972              e[2425] = 7822;
 32973              e[2426] = 7823;
 32974              e[2427] = 7824;
 32975              e[2428] = 7825;
 32976              e[2429] = 7826;
 32977              e[2430] = 7827;
 32978              e[2433] = 7682;
 32979              e[2678] = 8045;
 32980              e[2679] = 8046;
 32981              e[2830] = 1552;
 32982              e[2838] = 686;
 32983              e[2840] = 751;
 32984              e[2842] = 753;
 32985              e[2843] = 754;
 32986              e[2844] = 755;
 32987              e[2846] = 757;
 32988              e[2856] = 767;
 32989              e[2857] = 848;
 32990              e[2858] = 849;
 32991              e[2862] = 853;
 32992              e[2863] = 854;
 32993              e[2864] = 855;
 32994              e[2865] = 861;
 32995              e[2866] = 862;
 32996              e[2906] = 7460;
 32997              e[2908] = 7462;
 32998              e[2909] = 7463;
 32999              e[2910] = 7464;
 33000              e[2912] = 7466;
 33001              e[2913] = 7467;
 33002              e[2914] = 7468;
 33003              e[2916] = 7470;
 33004              e[2917] = 7471;
 33005              e[2918] = 7472;
 33006              e[2920] = 7474;
 33007              e[2921] = 7475;
 33008              e[2922] = 7476;
 33009              e[2924] = 7478;
 33010              e[2925] = 7479;
 33011              e[2926] = 7480;
 33012              e[2928] = 7482;
 33013              e[2929] = 7483;
 33014              e[2930] = 7484;
 33015              e[2932] = 7486;
 33016              e[2933] = 7487;
 33017              e[2934] = 7488;
 33018              e[2936] = 7490;
 33019              e[2937] = 7491;
 33020              e[2938] = 7492;
 33021              e[2940] = 7494;
 33022              e[2941] = 7495;
 33023              e[2942] = 7496;
 33024              e[2944] = 7498;
 33025              e[2946] = 7500;
 33026              e[2948] = 7502;
 33027              e[2950] = 7504;
 33028              e[2951] = 7505;
 33029              e[2952] = 7506;
 33030              e[2954] = 7508;
 33031              e[2955] = 7509;
 33032              e[2956] = 7510;
 33033              e[2958] = 7512;
 33034              e[2959] = 7513;
 33035              e[2960] = 7514;
 33036              e[2962] = 7516;
 33037              e[2963] = 7517;
 33038              e[2964] = 7518;
 33039              e[2966] = 7520;
 33040              e[2967] = 7521;
 33041              e[2968] = 7522;
 33042              e[2970] = 7524;
 33043              e[2971] = 7525;
 33044              e[2972] = 7526;
 33045              e[2974] = 7528;
 33046              e[2975] = 7529;
 33047              e[2976] = 7530;
 33048              e[2978] = 1537;
 33049              e[2979] = 1538;
 33050              e[2980] = 1539;
 33051              e[2982] = 1549;
 33052              e[2983] = 1551;
 33053              e[2984] = 1552;
 33054              e[2986] = 1554;
 33055              e[2987] = 1555;
 33056              e[2988] = 1556;
 33057              e[2990] = 1623;
 33058              e[2991] = 1624;
 33059              e[2995] = 1775;
 33060              e[2999] = 1791;
 33061              e[3002] = 64290;
 33062              e[3003] = 64291;
 33063              e[3004] = 64292;
 33064              e[3006] = 64294;
 33065              e[3007] = 64295;
 33066              e[3008] = 64296;
 33067              e[3011] = 1900;
 33068              e[3014] = 8223;
 33069              e[3015] = 8244;
 33070              e[3017] = 7532;
 33071              e[3018] = 7533;
 33072              e[3019] = 7534;
 33073              e[3075] = 7590;
 33074              e[3076] = 7591;
 33075              e[3079] = 7594;
 33076              e[3080] = 7595;
 33077              e[3083] = 7598;
 33078              e[3084] = 7599;
 33079              e[3087] = 7602;
 33080              e[3088] = 7603;
 33081              e[3091] = 7606;
 33082              e[3092] = 7607;
 33083              e[3095] = 7610;
 33084              e[3096] = 7611;
 33085              e[3099] = 7614;
 33086              e[3100] = 7615;
 33087              e[3103] = 7618;
 33088              e[3104] = 7619;
 33089              e[3107] = 8337;
 33090              e[3108] = 8338;
 33091              e[3116] = 1884;
 33092              e[3119] = 1885;
 33093              e[3120] = 1885;
 33094              e[3123] = 1886;
 33095              e[3124] = 1886;
 33096              e[3127] = 1887;
 33097              e[3128] = 1887;
 33098              e[3131] = 1888;
 33099              e[3132] = 1888;
 33100              e[3135] = 1889;
 33101              e[3136] = 1889;
 33102              e[3139] = 1890;
 33103              e[3140] = 1890;
 33104              e[3143] = 1891;
 33105              e[3144] = 1891;
 33106              e[3147] = 1892;
 33107              e[3148] = 1892;
 33108              e[3153] = 580;
 33109              e[3154] = 581;
 33110              e[3157] = 584;
 33111              e[3158] = 585;
 33112              e[3161] = 588;
 33113              e[3162] = 589;
 33114              e[3165] = 891;
 33115              e[3166] = 892;
 33116              e[3169] = 1274;
 33117              e[3170] = 1275;
 33118              e[3173] = 1278;
 33119              e[3174] = 1279;
 33120              e[3181] = 7622;
 33121              e[3182] = 7623;
 33122              e[3282] = 11799;
 33123              e[3316] = 578;
 33124              e[3379] = 42785;
 33125              e[3393] = 1159;
 33126              e[3416] = 8377;
 33127            });
 33128            t.getGlyphMapForStandardFonts = h;
 33129            const u = (0, r.getLookupTableFactory)(function (e) {
 33130              e[227] = 322;
 33131              e[264] = 261;
 33132              e[291] = 346;
 33133            });
 33134            t.getSupplementalGlyphMapForArialBlack = u;
 33135            const d = (0, r.getLookupTableFactory)(function (e) {
 33136              e[1] = 32;
 33137              e[4] = 65;
 33138              e[5] = 192;
 33139              e[6] = 193;
 33140              e[9] = 196;
 33141              e[17] = 66;
 33142              e[18] = 67;
 33143              e[21] = 268;
 33144              e[24] = 68;
 33145              e[28] = 69;
 33146              e[29] = 200;
 33147              e[30] = 201;
 33148              e[32] = 282;
 33149              e[38] = 70;
 33150              e[39] = 71;
 33151              e[44] = 72;
 33152              e[47] = 73;
 33153              e[48] = 204;
 33154              e[49] = 205;
 33155              e[58] = 74;
 33156              e[60] = 75;
 33157              e[62] = 76;
 33158              e[68] = 77;
 33159              e[69] = 78;
 33160              e[75] = 79;
 33161              e[76] = 210;
 33162              e[80] = 214;
 33163              e[87] = 80;
 33164              e[89] = 81;
 33165              e[90] = 82;
 33166              e[92] = 344;
 33167              e[94] = 83;
 33168              e[97] = 352;
 33169              e[100] = 84;
 33170              e[104] = 85;
 33171              e[109] = 220;
 33172              e[115] = 86;
 33173              e[116] = 87;
 33174              e[121] = 88;
 33175              e[122] = 89;
 33176              e[124] = 221;
 33177              e[127] = 90;
 33178              e[129] = 381;
 33179              e[258] = 97;
 33180              e[259] = 224;
 33181              e[260] = 225;
 33182              e[263] = 228;
 33183              e[268] = 261;
 33184              e[271] = 98;
 33185              e[272] = 99;
 33186              e[273] = 263;
 33187              e[275] = 269;
 33188              e[282] = 100;
 33189              e[286] = 101;
 33190              e[287] = 232;
 33191              e[288] = 233;
 33192              e[290] = 283;
 33193              e[295] = 281;
 33194              e[296] = 102;
 33195              e[336] = 103;
 33196              e[346] = 104;
 33197              e[349] = 105;
 33198              e[350] = 236;
 33199              e[351] = 237;
 33200              e[361] = 106;
 33201              e[364] = 107;
 33202              e[367] = 108;
 33203              e[371] = 322;
 33204              e[373] = 109;
 33205              e[374] = 110;
 33206              e[381] = 111;
 33207              e[382] = 242;
 33208              e[383] = 243;
 33209              e[386] = 246;
 33210              e[393] = 112;
 33211              e[395] = 113;
 33212              e[396] = 114;
 33213              e[398] = 345;
 33214              e[400] = 115;
 33215              e[401] = 347;
 33216              e[403] = 353;
 33217              e[410] = 116;
 33218              e[437] = 117;
 33219              e[442] = 252;
 33220              e[448] = 118;
 33221              e[449] = 119;
 33222              e[454] = 120;
 33223              e[455] = 121;
 33224              e[457] = 253;
 33225              e[460] = 122;
 33226              e[462] = 382;
 33227              e[463] = 380;
 33228              e[853] = 44;
 33229              e[855] = 58;
 33230              e[856] = 46;
 33231              e[876] = 47;
 33232              e[878] = 45;
 33233              e[882] = 45;
 33234              e[894] = 40;
 33235              e[895] = 41;
 33236              e[896] = 91;
 33237              e[897] = 93;
 33238              e[923] = 64;
 33239              e[1004] = 48;
 33240              e[1005] = 49;
 33241              e[1006] = 50;
 33242              e[1007] = 51;
 33243              e[1008] = 52;
 33244              e[1009] = 53;
 33245              e[1010] = 54;
 33246              e[1011] = 55;
 33247              e[1012] = 56;
 33248              e[1013] = 57;
 33249              e[1081] = 37;
 33250              e[1085] = 43;
 33251              e[1086] = 45;
 33252            });
 33253            t.getSupplementalGlyphMapForCalibri = d;
 33254          },
 33255          (e, t, a) => {
 33256            Object.defineProperty(t, "__esModule", { value: !0 });
 33257            t.ToUnicodeMap = t.IdentityToUnicodeMap = void 0;
 33258            var r = a(2);
 33259            t.ToUnicodeMap = class ToUnicodeMap {
 33260              constructor(e = []) {
 33261                this._map = e;
 33262              }
 33263              get length() {
 33264                return this._map.length;
 33265              }
 33266              forEach(e) {
 33267                for (const t in this._map) e(t, this._map[t].charCodeAt(0));
 33268              }
 33269              has(e) {
 33270                return void 0 !== this._map[e];
 33271              }
 33272              get(e) {
 33273                return this._map[e];
 33274              }
 33275              charCodeOf(e) {
 33276                const t = this._map;
 33277                if (t.length <= 65536) return t.indexOf(e);
 33278                for (const a in t) if (t[a] === e) return 0 | a;
 33279                return -1;
 33280              }
 33281              amend(e) {
 33282                for (const t in e) this._map[t] = e[t];
 33283              }
 33284            };
 33285            t.IdentityToUnicodeMap = class IdentityToUnicodeMap {
 33286              constructor(e, t) {
 33287                this.firstChar = e;
 33288                this.lastChar = t;
 33289              }
 33290              get length() {
 33291                return this.lastChar + 1 - this.firstChar;
 33292              }
 33293              forEach(e) {
 33294                for (let t = this.firstChar, a = this.lastChar; t <= a; t++)
 33295                  e(t, t);
 33296              }
 33297              has(e) {
 33298                return this.firstChar <= e && e <= this.lastChar;
 33299              }
 33300              get(e) {
 33301                if (this.firstChar <= e && e <= this.lastChar)
 33302                  return String.fromCharCode(e);
 33303              }
 33304              charCodeOf(e) {
 33305                return Number.isInteger(e) &&
 33306                  e >= this.firstChar &&
 33307                  e <= this.lastChar
 33308                  ? e
 33309                  : -1;
 33310              }
 33311              amend(e) {
 33312                (0, r.unreachable)("Should not call amend()");
 33313              }
 33314            };
 33315          },
 33316          (e, t, a) => {
 33317            Object.defineProperty(t, "__esModule", { value: !0 });
 33318            t.CFFFont = void 0;
 33319            var r = a(35),
 33320              n = a(38),
 33321              i = a(2);
 33322            t.CFFFont = class CFFFont {
 33323              constructor(e, t) {
 33324                this.properties = t;
 33325                const a = new r.CFFParser(e, t, n.SEAC_ANALYSIS_ENABLED);
 33326                this.cff = a.parse();
 33327                this.cff.duplicateFirstGlyph();
 33328                const s = new r.CFFCompiler(this.cff);
 33329                this.seacs = this.cff.seacs;
 33330                try {
 33331                  this.data = s.compile();
 33332                } catch {
 33333                  (0, i.warn)("Failed to compile font " + t.loadedName);
 33334                  this.data = e;
 33335                }
 33336                this._createBuiltInEncoding();
 33337              }
 33338              get numGlyphs() {
 33339                return this.cff.charStrings.count;
 33340              }
 33341              getCharset() {
 33342                return this.cff.charset.charset;
 33343              }
 33344              getGlyphMapping() {
 33345                const e = this.cff,
 33346                  t = this.properties,
 33347                  { cidToGidMap: a, cMap: r } = t,
 33348                  i = e.charset.charset;
 33349                let s, o;
 33350                if (t.composite) {
 33351                  let t, n;
 33352                  if (a?.length > 0) {
 33353                    t = Object.create(null);
 33354                    for (let e = 0, r = a.length; e < r; e++) {
 33355                      const r = a[e];
 33356                      void 0 !== r && (t[r] = e);
 33357                    }
 33358                  }
 33359                  s = Object.create(null);
 33360                  if (e.isCIDFont)
 33361                    for (o = 0; o < i.length; o++) {
 33362                      const e = i[o];
 33363                      n = r.charCodeOf(e);
 33364                      void 0 !== t?.[n] && (n = t[n]);
 33365                      s[n] = o;
 33366                    }
 33367                  else
 33368                    for (o = 0; o < e.charStrings.count; o++) {
 33369                      n = r.charCodeOf(o);
 33370                      s[n] = o;
 33371                    }
 33372                  return s;
 33373                }
 33374                let c = e.encoding ? e.encoding.encoding : null;
 33375                t.isInternalFont && (c = t.defaultEncoding);
 33376                s = (0, n.type1FontGlyphMapping)(t, c, i);
 33377                return s;
 33378              }
 33379              hasGlyphId(e) {
 33380                return this.cff.hasGlyphId(e);
 33381              }
 33382              _createBuiltInEncoding() {
 33383                const { charset: e, encoding: t } = this.cff;
 33384                if (!e || !t) return;
 33385                const a = e.charset,
 33386                  r = t.encoding,
 33387                  n = [];
 33388                for (const e in r) {
 33389                  const t = r[e];
 33390                  if (t >= 0) {
 33391                    const r = a[t];
 33392                    r && (n[e] = r);
 33393                  }
 33394                }
 33395                n.length > 0 && (this.properties.builtInEncoding = n);
 33396              }
 33397            };
 33398          },
 33399          (e, t, a) => {
 33400            Object.defineProperty(t, "__esModule", { value: !0 });
 33401            t.FontRendererFactory = void 0;
 33402            var r = a(2),
 33403              n = a(35),
 33404              i = a(39),
 33405              s = a(37),
 33406              o = a(8);
 33407            function getUint32(e, t) {
 33408              return (
 33409                ((e[t] << 24) | (e[t + 1] << 16) | (e[t + 2] << 8) | e[t + 3]) >>>
 33410                0
 33411              );
 33412            }
 33413            function getUint16(e, t) {
 33414              return (e[t] << 8) | e[t + 1];
 33415            }
 33416            function getInt16(e, t) {
 33417              return ((e[t] << 24) | (e[t + 1] << 16)) >> 16;
 33418            }
 33419            function getInt8(e, t) {
 33420              return (e[t] << 24) >> 24;
 33421            }
 33422            function getFloat214(e, t) {
 33423              return getInt16(e, t) / 16384;
 33424            }
 33425            function getSubroutineBias(e) {
 33426              const t = e.length;
 33427              let a = 32768;
 33428              t < 1240 ? (a = 107) : t < 33900 && (a = 1131);
 33429              return a;
 33430            }
 33431            function parseCmap(e, t, a) {
 33432              const n =
 33433                  1 === getUint16(e, t + 2)
 33434                    ? getUint32(e, t + 8)
 33435                    : getUint32(e, t + 16),
 33436                i = getUint16(e, t + n);
 33437              let s, o, c;
 33438              if (4 === i) {
 33439                getUint16(e, t + n + 2);
 33440                const a = getUint16(e, t + n + 6) >> 1;
 33441                o = t + n + 14;
 33442                s = [];
 33443                for (c = 0; c < a; c++, o += 2) s[c] = { end: getUint16(e, o) };
 33444                o += 2;
 33445                for (c = 0; c < a; c++, o += 2) s[c].start = getUint16(e, o);
 33446                for (c = 0; c < a; c++, o += 2) s[c].idDelta = getUint16(e, o);
 33447                for (c = 0; c < a; c++, o += 2) {
 33448                  let t = getUint16(e, o);
 33449                  if (0 !== t) {
 33450                    s[c].ids = [];
 33451                    for (let a = 0, r = s[c].end - s[c].start + 1; a < r; a++) {
 33452                      s[c].ids[a] = getUint16(e, o + t);
 33453                      t += 2;
 33454                    }
 33455                  }
 33456                }
 33457                return s;
 33458              }
 33459              if (12 === i) {
 33460                const a = getUint32(e, t + n + 12);
 33461                o = t + n + 16;
 33462                s = [];
 33463                for (c = 0; c < a; c++) {
 33464                  t = getUint32(e, o);
 33465                  s.push({
 33466                    start: t,
 33467                    end: getUint32(e, o + 4),
 33468                    idDelta: getUint32(e, o + 8) - t,
 33469                  });
 33470                  o += 12;
 33471                }
 33472                return s;
 33473              }
 33474              throw new r.FormatError(`unsupported cmap: ${i}`);
 33475            }
 33476            function parseCff(e, t, a, r) {
 33477              const i = new n.CFFParser(new o.Stream(e, t, a - t), {}, r).parse();
 33478              return {
 33479                glyphs: i.charStrings.objects,
 33480                subrs: i.topDict.privateDict?.subrsIndex?.objects,
 33481                gsubrs: i.globalSubrIndex?.objects,
 33482                isCFFCIDFont: i.isCIDFont,
 33483                fdSelect: i.fdSelect,
 33484                fdArray: i.fdArray,
 33485              };
 33486            }
 33487            function lookupCmap(e, t) {
 33488              const a = t.codePointAt(0);
 33489              let r = 0,
 33490                n = 0,
 33491                i = e.length - 1;
 33492              for (; n < i; ) {
 33493                const t = (n + i + 1) >> 1;
 33494                a < e[t].start ? (i = t - 1) : (n = t);
 33495              }
 33496              e[n].start <= a &&
 33497                a <= e[n].end &&
 33498                (r =
 33499                  (e[n].idDelta + (e[n].ids ? e[n].ids[a - e[n].start] : a)) &
 33500                  65535);
 33501              return { charCode: a, glyphId: r };
 33502            }
 33503            function compileGlyf(e, t, a) {
 33504              function moveTo(e, a) {
 33505                t.push({ cmd: "moveTo", args: [e, a] });
 33506              }
 33507              function lineTo(e, a) {
 33508                t.push({ cmd: "lineTo", args: [e, a] });
 33509              }
 33510              function quadraticCurveTo(e, a, r, n) {
 33511                t.push({ cmd: "quadraticCurveTo", args: [e, a, r, n] });
 33512              }
 33513              let r = 0;
 33514              const n = getInt16(e, r);
 33515              let i,
 33516                s = 0,
 33517                o = 0;
 33518              r += 10;
 33519              if (n < 0)
 33520                do {
 33521                  i = getUint16(e, r);
 33522                  const n = getUint16(e, r + 2);
 33523                  r += 4;
 33524                  let c, l;
 33525                  if (1 & i) {
 33526                    if (2 & i) {
 33527                      c = getInt16(e, r);
 33528                      l = getInt16(e, r + 2);
 33529                    } else {
 33530                      c = getUint16(e, r);
 33531                      l = getUint16(e, r + 2);
 33532                    }
 33533                    r += 4;
 33534                  } else if (2 & i) {
 33535                    c = getInt8(e, r++);
 33536                    l = getInt8(e, r++);
 33537                  } else {
 33538                    c = e[r++];
 33539                    l = e[r++];
 33540                  }
 33541                  if (2 & i) {
 33542                    s = c;
 33543                    o = l;
 33544                  } else {
 33545                    s = 0;
 33546                    o = 0;
 33547                  }
 33548                  let h = 1,
 33549                    u = 1,
 33550                    d = 0,
 33551                    f = 0;
 33552                  if (8 & i) {
 33553                    h = u = getFloat214(e, r);
 33554                    r += 2;
 33555                  } else if (64 & i) {
 33556                    h = getFloat214(e, r);
 33557                    u = getFloat214(e, r + 2);
 33558                    r += 4;
 33559                  } else if (128 & i) {
 33560                    h = getFloat214(e, r);
 33561                    d = getFloat214(e, r + 2);
 33562                    f = getFloat214(e, r + 4);
 33563                    u = getFloat214(e, r + 6);
 33564                    r += 8;
 33565                  }
 33566                  const g = a.glyphs[n];
 33567                  if (g) {
 33568                    t.push(
 33569                      { cmd: "save" },
 33570                      { cmd: "transform", args: [h, d, f, u, s, o] },
 33571                    );
 33572                    compileGlyf(g, t, a);
 33573                    t.push({ cmd: "restore" });
 33574                  }
 33575                } while (32 & i);
 33576              else {
 33577                const t = [];
 33578                let a, c;
 33579                for (a = 0; a < n; a++) {
 33580                  t.push(getUint16(e, r));
 33581                  r += 2;
 33582                }
 33583                r += 2 + getUint16(e, r);
 33584                const l = t.at(-1) + 1,
 33585                  h = [];
 33586                for (; h.length < l; ) {
 33587                  i = e[r++];
 33588                  let t = 1;
 33589                  8 & i && (t += e[r++]);
 33590                  for (; t-- > 0; ) h.push({ flags: i });
 33591                }
 33592                for (a = 0; a < l; a++) {
 33593                  switch (18 & h[a].flags) {
 33594                    case 0:
 33595                      s += getInt16(e, r);
 33596                      r += 2;
 33597                      break;
 33598                    case 2:
 33599                      s -= e[r++];
 33600                      break;
 33601                    case 18:
 33602                      s += e[r++];
 33603                  }
 33604                  h[a].x = s;
 33605                }
 33606                for (a = 0; a < l; a++) {
 33607                  switch (36 & h[a].flags) {
 33608                    case 0:
 33609                      o += getInt16(e, r);
 33610                      r += 2;
 33611                      break;
 33612                    case 4:
 33613                      o -= e[r++];
 33614                      break;
 33615                    case 36:
 33616                      o += e[r++];
 33617                  }
 33618                  h[a].y = o;
 33619                }
 33620                let u = 0;
 33621                for (r = 0; r < n; r++) {
 33622                  const e = t[r],
 33623                    n = h.slice(u, e + 1);
 33624                  if (1 & n[0].flags) n.push(n[0]);
 33625                  else if (1 & n.at(-1).flags) n.unshift(n.at(-1));
 33626                  else {
 33627                    const e = {
 33628                      flags: 1,
 33629                      x: (n[0].x + n.at(-1).x) / 2,
 33630                      y: (n[0].y + n.at(-1).y) / 2,
 33631                    };
 33632                    n.unshift(e);
 33633                    n.push(e);
 33634                  }
 33635                  moveTo(n[0].x, n[0].y);
 33636                  for (a = 1, c = n.length; a < c; a++)
 33637                    if (1 & n[a].flags) lineTo(n[a].x, n[a].y);
 33638                    else if (1 & n[a + 1].flags) {
 33639                      quadraticCurveTo(n[a].x, n[a].y, n[a + 1].x, n[a + 1].y);
 33640                      a++;
 33641                    } else
 33642                      quadraticCurveTo(
 33643                        n[a].x,
 33644                        n[a].y,
 33645                        (n[a].x + n[a + 1].x) / 2,
 33646                        (n[a].y + n[a + 1].y) / 2,
 33647                      );
 33648                  u = e + 1;
 33649                }
 33650              }
 33651            }
 33652            function compileCharString(e, t, a, n) {
 33653              function moveTo(e, a) {
 33654                t.push({ cmd: "moveTo", args: [e, a] });
 33655              }
 33656              function lineTo(e, a) {
 33657                t.push({ cmd: "lineTo", args: [e, a] });
 33658              }
 33659              function bezierCurveTo(e, a, r, n, i, s) {
 33660                t.push({ cmd: "bezierCurveTo", args: [e, a, r, n, i, s] });
 33661              }
 33662              const i = [];
 33663              let o = 0,
 33664                c = 0,
 33665                l = 0;
 33666              !(function parse(e) {
 33667                let h = 0;
 33668                for (; h < e.length; ) {
 33669                  let u,
 33670                    d,
 33671                    f,
 33672                    g,
 33673                    p,
 33674                    m,
 33675                    b,
 33676                    y,
 33677                    w,
 33678                    S = !1,
 33679                    x = e[h++];
 33680                  switch (x) {
 33681                    case 1:
 33682                    case 3:
 33683                    case 18:
 33684                    case 23:
 33685                      l += i.length >> 1;
 33686                      S = !0;
 33687                      break;
 33688                    case 4:
 33689                      c += i.pop();
 33690                      moveTo(o, c);
 33691                      S = !0;
 33692                      break;
 33693                    case 5:
 33694                      for (; i.length > 0; ) {
 33695                        o += i.shift();
 33696                        c += i.shift();
 33697                        lineTo(o, c);
 33698                      }
 33699                      break;
 33700                    case 6:
 33701                      for (; i.length > 0; ) {
 33702                        o += i.shift();
 33703                        lineTo(o, c);
 33704                        if (0 === i.length) break;
 33705                        c += i.shift();
 33706                        lineTo(o, c);
 33707                      }
 33708                      break;
 33709                    case 7:
 33710                      for (; i.length > 0; ) {
 33711                        c += i.shift();
 33712                        lineTo(o, c);
 33713                        if (0 === i.length) break;
 33714                        o += i.shift();
 33715                        lineTo(o, c);
 33716                      }
 33717                      break;
 33718                    case 8:
 33719                      for (; i.length > 0; ) {
 33720                        u = o + i.shift();
 33721                        f = c + i.shift();
 33722                        d = u + i.shift();
 33723                        g = f + i.shift();
 33724                        o = d + i.shift();
 33725                        c = g + i.shift();
 33726                        bezierCurveTo(u, f, d, g, o, c);
 33727                      }
 33728                      break;
 33729                    case 10:
 33730                      y = i.pop();
 33731                      w = null;
 33732                      if (a.isCFFCIDFont) {
 33733                        const e = a.fdSelect.getFDIndex(n);
 33734                        if (e >= 0 && e < a.fdArray.length) {
 33735                          const t = a.fdArray[e];
 33736                          let r;
 33737                          t.privateDict?.subrsIndex &&
 33738                            (r = t.privateDict.subrsIndex.objects);
 33739                          if (r) {
 33740                            y += getSubroutineBias(r);
 33741                            w = r[y];
 33742                          }
 33743                        } else (0, r.warn)("Invalid fd index for glyph index.");
 33744                      } else w = a.subrs[y + a.subrsBias];
 33745                      w && parse(w);
 33746                      break;
 33747                    case 11:
 33748                      return;
 33749                    case 12:
 33750                      x = e[h++];
 33751                      switch (x) {
 33752                        case 34:
 33753                          u = o + i.shift();
 33754                          d = u + i.shift();
 33755                          p = c + i.shift();
 33756                          o = d + i.shift();
 33757                          bezierCurveTo(u, c, d, p, o, p);
 33758                          u = o + i.shift();
 33759                          d = u + i.shift();
 33760                          o = d + i.shift();
 33761                          bezierCurveTo(u, p, d, c, o, c);
 33762                          break;
 33763                        case 35:
 33764                          u = o + i.shift();
 33765                          f = c + i.shift();
 33766                          d = u + i.shift();
 33767                          g = f + i.shift();
 33768                          o = d + i.shift();
 33769                          c = g + i.shift();
 33770                          bezierCurveTo(u, f, d, g, o, c);
 33771                          u = o + i.shift();
 33772                          f = c + i.shift();
 33773                          d = u + i.shift();
 33774                          g = f + i.shift();
 33775                          o = d + i.shift();
 33776                          c = g + i.shift();
 33777                          bezierCurveTo(u, f, d, g, o, c);
 33778                          i.pop();
 33779                          break;
 33780                        case 36:
 33781                          u = o + i.shift();
 33782                          p = c + i.shift();
 33783                          d = u + i.shift();
 33784                          m = p + i.shift();
 33785                          o = d + i.shift();
 33786                          bezierCurveTo(u, p, d, m, o, m);
 33787                          u = o + i.shift();
 33788                          d = u + i.shift();
 33789                          b = m + i.shift();
 33790                          o = d + i.shift();
 33791                          bezierCurveTo(u, m, d, b, o, c);
 33792                          break;
 33793                        case 37:
 33794                          const e = o,
 33795                            t = c;
 33796                          u = o + i.shift();
 33797                          f = c + i.shift();
 33798                          d = u + i.shift();
 33799                          g = f + i.shift();
 33800                          o = d + i.shift();
 33801                          c = g + i.shift();
 33802                          bezierCurveTo(u, f, d, g, o, c);
 33803                          u = o + i.shift();
 33804                          f = c + i.shift();
 33805                          d = u + i.shift();
 33806                          g = f + i.shift();
 33807                          o = d;
 33808                          c = g;
 33809                          Math.abs(o - e) > Math.abs(c - t)
 33810                            ? (o += i.shift())
 33811                            : (c += i.shift());
 33812                          bezierCurveTo(u, f, d, g, o, c);
 33813                          break;
 33814                        default:
 33815                          throw new r.FormatError(`unknown operator: 12 ${x}`);
 33816                      }
 33817                      break;
 33818                    case 14:
 33819                      if (i.length >= 4) {
 33820                        const e = i.pop(),
 33821                          r = i.pop();
 33822                        c = i.pop();
 33823                        o = i.pop();
 33824                        t.push(
 33825                          { cmd: "save" },
 33826                          { cmd: "translate", args: [o, c] },
 33827                        );
 33828                        let n = lookupCmap(
 33829                          a.cmap,
 33830                          String.fromCharCode(
 33831                            a.glyphNameMap[s.StandardEncoding[e]],
 33832                          ),
 33833                        );
 33834                        compileCharString(a.glyphs[n.glyphId], t, a, n.glyphId);
 33835                        t.push({ cmd: "restore" });
 33836                        n = lookupCmap(
 33837                          a.cmap,
 33838                          String.fromCharCode(
 33839                            a.glyphNameMap[s.StandardEncoding[r]],
 33840                          ),
 33841                        );
 33842                        compileCharString(a.glyphs[n.glyphId], t, a, n.glyphId);
 33843                      }
 33844                      return;
 33845                    case 19:
 33846                    case 20:
 33847                      l += i.length >> 1;
 33848                      h += (l + 7) >> 3;
 33849                      S = !0;
 33850                      break;
 33851                    case 21:
 33852                      c += i.pop();
 33853                      o += i.pop();
 33854                      moveTo(o, c);
 33855                      S = !0;
 33856                      break;
 33857                    case 22:
 33858                      o += i.pop();
 33859                      moveTo(o, c);
 33860                      S = !0;
 33861                      break;
 33862                    case 24:
 33863                      for (; i.length > 2; ) {
 33864                        u = o + i.shift();
 33865                        f = c + i.shift();
 33866                        d = u + i.shift();
 33867                        g = f + i.shift();
 33868                        o = d + i.shift();
 33869                        c = g + i.shift();
 33870                        bezierCurveTo(u, f, d, g, o, c);
 33871                      }
 33872                      o += i.shift();
 33873                      c += i.shift();
 33874                      lineTo(o, c);
 33875                      break;
 33876                    case 25:
 33877                      for (; i.length > 6; ) {
 33878                        o += i.shift();
 33879                        c += i.shift();
 33880                        lineTo(o, c);
 33881                      }
 33882                      u = o + i.shift();
 33883                      f = c + i.shift();
 33884                      d = u + i.shift();
 33885                      g = f + i.shift();
 33886                      o = d + i.shift();
 33887                      c = g + i.shift();
 33888                      bezierCurveTo(u, f, d, g, o, c);
 33889                      break;
 33890                    case 26:
 33891                      i.length % 2 && (o += i.shift());
 33892                      for (; i.length > 0; ) {
 33893                        u = o;
 33894                        f = c + i.shift();
 33895                        d = u + i.shift();
 33896                        g = f + i.shift();
 33897                        o = d;
 33898                        c = g + i.shift();
 33899                        bezierCurveTo(u, f, d, g, o, c);
 33900                      }
 33901                      break;
 33902                    case 27:
 33903                      i.length % 2 && (c += i.shift());
 33904                      for (; i.length > 0; ) {
 33905                        u = o + i.shift();
 33906                        f = c;
 33907                        d = u + i.shift();
 33908                        g = f + i.shift();
 33909                        o = d + i.shift();
 33910                        c = g;
 33911                        bezierCurveTo(u, f, d, g, o, c);
 33912                      }
 33913                      break;
 33914                    case 28:
 33915                      i.push(((e[h] << 24) | (e[h + 1] << 16)) >> 16);
 33916                      h += 2;
 33917                      break;
 33918                    case 29:
 33919                      y = i.pop() + a.gsubrsBias;
 33920                      w = a.gsubrs[y];
 33921                      w && parse(w);
 33922                      break;
 33923                    case 30:
 33924                      for (; i.length > 0; ) {
 33925                        u = o;
 33926                        f = c + i.shift();
 33927                        d = u + i.shift();
 33928                        g = f + i.shift();
 33929                        o = d + i.shift();
 33930                        c = g + (1 === i.length ? i.shift() : 0);
 33931                        bezierCurveTo(u, f, d, g, o, c);
 33932                        if (0 === i.length) break;
 33933                        u = o + i.shift();
 33934                        f = c;
 33935                        d = u + i.shift();
 33936                        g = f + i.shift();
 33937                        c = g + i.shift();
 33938                        o = d + (1 === i.length ? i.shift() : 0);
 33939                        bezierCurveTo(u, f, d, g, o, c);
 33940                      }
 33941                      break;
 33942                    case 31:
 33943                      for (; i.length > 0; ) {
 33944                        u = o + i.shift();
 33945                        f = c;
 33946                        d = u + i.shift();
 33947                        g = f + i.shift();
 33948                        c = g + i.shift();
 33949                        o = d + (1 === i.length ? i.shift() : 0);
 33950                        bezierCurveTo(u, f, d, g, o, c);
 33951                        if (0 === i.length) break;
 33952                        u = o;
 33953                        f = c + i.shift();
 33954                        d = u + i.shift();
 33955                        g = f + i.shift();
 33956                        o = d + i.shift();
 33957                        c = g + (1 === i.length ? i.shift() : 0);
 33958                        bezierCurveTo(u, f, d, g, o, c);
 33959                      }
 33960                      break;
 33961                    default:
 33962                      if (x < 32)
 33963                        throw new r.FormatError(`unknown operator: ${x}`);
 33964                      if (x < 247) i.push(x - 139);
 33965                      else if (x < 251) i.push(256 * (x - 247) + e[h++] + 108);
 33966                      else if (x < 255) i.push(256 * -(x - 251) - e[h++] - 108);
 33967                      else {
 33968                        i.push(
 33969                          ((e[h] << 24) |
 33970                            (e[h + 1] << 16) |
 33971                            (e[h + 2] << 8) |
 33972                            e[h + 3]) /
 33973                            65536,
 33974                        );
 33975                        h += 4;
 33976                      }
 33977                  }
 33978                  S && (i.length = 0);
 33979                }
 33980              })(e);
 33981            }
 33982            const c = [];
 33983            class CompiledFont {
 33984              constructor(e) {
 33985                this.constructor === CompiledFont &&
 33986                  (0, r.unreachable)("Cannot initialize CompiledFont.");
 33987                this.fontMatrix = e;
 33988                this.compiledGlyphs = Object.create(null);
 33989                this.compiledCharCodeToGlyphId = Object.create(null);
 33990              }
 33991              getPathJs(e) {
 33992                const { charCode: t, glyphId: a } = lookupCmap(this.cmap, e);
 33993                let r = this.compiledGlyphs[a];
 33994                if (!r)
 33995                  try {
 33996                    r = this.compileGlyph(this.glyphs[a], a);
 33997                    this.compiledGlyphs[a] = r;
 33998                  } catch (e) {
 33999                    this.compiledGlyphs[a] = c;
 34000                    void 0 === this.compiledCharCodeToGlyphId[t] &&
 34001                      (this.compiledCharCodeToGlyphId[t] = a);
 34002                    throw e;
 34003                  }
 34004                void 0 === this.compiledCharCodeToGlyphId[t] &&
 34005                  (this.compiledCharCodeToGlyphId[t] = a);
 34006                return r;
 34007              }
 34008              compileGlyph(e, t) {
 34009                if (!e || 0 === e.length || 14 === e[0]) return c;
 34010                let a = this.fontMatrix;
 34011                if (this.isCFFCIDFont) {
 34012                  const e = this.fdSelect.getFDIndex(t);
 34013                  if (e >= 0 && e < this.fdArray.length) {
 34014                    a =
 34015                      this.fdArray[e].getByName("FontMatrix") ||
 34016                      r.FONT_IDENTITY_MATRIX;
 34017                  } else (0, r.warn)("Invalid fd index for glyph index.");
 34018                }
 34019                const n = [
 34020                  { cmd: "save" },
 34021                  { cmd: "transform", args: a.slice() },
 34022                  { cmd: "scale", args: ["size", "-size"] },
 34023                ];
 34024                this.compileGlyphImpl(e, n, t);
 34025                n.push({ cmd: "restore" });
 34026                return n;
 34027              }
 34028              compileGlyphImpl() {
 34029                (0, r.unreachable)("Children classes should implement this.");
 34030              }
 34031              hasBuiltPath(e) {
 34032                const { charCode: t, glyphId: a } = lookupCmap(this.cmap, e);
 34033                return (
 34034                  void 0 !== this.compiledGlyphs[a] &&
 34035                  void 0 !== this.compiledCharCodeToGlyphId[t]
 34036                );
 34037              }
 34038            }
 34039            class TrueTypeCompiled extends CompiledFont {
 34040              constructor(e, t, a) {
 34041                super(a || [488e-6, 0, 0, 488e-6, 0, 0]);
 34042                this.glyphs = e;
 34043                this.cmap = t;
 34044              }
 34045              compileGlyphImpl(e, t) {
 34046                compileGlyf(e, t, this);
 34047              }
 34048            }
 34049            class Type2Compiled extends CompiledFont {
 34050              constructor(e, t, a, r) {
 34051                super(a || [0.001, 0, 0, 0.001, 0, 0]);
 34052                this.glyphs = e.glyphs;
 34053                this.gsubrs = e.gsubrs || [];
 34054                this.subrs = e.subrs || [];
 34055                this.cmap = t;
 34056                this.glyphNameMap = r || (0, i.getGlyphsUnicode)();
 34057                this.gsubrsBias = getSubroutineBias(this.gsubrs);
 34058                this.subrsBias = getSubroutineBias(this.subrs);
 34059                this.isCFFCIDFont = e.isCFFCIDFont;
 34060                this.fdSelect = e.fdSelect;
 34061                this.fdArray = e.fdArray;
 34062              }
 34063              compileGlyphImpl(e, t, a) {
 34064                compileCharString(e, t, this, a);
 34065              }
 34066            }
 34067            t.FontRendererFactory = class FontRendererFactory {
 34068              static create(e, t) {
 34069                const a = new Uint8Array(e.data);
 34070                let n, i, s, o, c, l;
 34071                const h = getUint16(a, 4);
 34072                for (let e = 0, u = 12; e < h; e++, u += 16) {
 34073                  const e = (0, r.bytesToString)(a.subarray(u, u + 4)),
 34074                    h = getUint32(a, u + 8),
 34075                    d = getUint32(a, u + 12);
 34076                  switch (e) {
 34077                    case "cmap":
 34078                      n = parseCmap(a, h);
 34079                      break;
 34080                    case "glyf":
 34081                      i = a.subarray(h, h + d);
 34082                      break;
 34083                    case "loca":
 34084                      s = a.subarray(h, h + d);
 34085                      break;
 34086                    case "head":
 34087                      l = getUint16(a, h + 18);
 34088                      c = getUint16(a, h + 50);
 34089                      break;
 34090                    case "CFF ":
 34091                      o = parseCff(a, h, h + d, t);
 34092                  }
 34093                }
 34094                if (i) {
 34095                  const t = l ? [1 / l, 0, 0, 1 / l, 0, 0] : e.fontMatrix;
 34096                  return new TrueTypeCompiled(
 34097                    (function parseGlyfTable(e, t, a) {
 34098                      let r, n;
 34099                      if (a) {
 34100                        r = 4;
 34101                        n = getUint32;
 34102                      } else {
 34103                        r = 2;
 34104                        n = (e, t) => 2 * getUint16(e, t);
 34105                      }
 34106                      const i = [];
 34107                      let s = n(t, 0);
 34108                      for (let a = r; a < t.length; a += r) {
 34109                        const r = n(t, a);
 34110                        i.push(e.subarray(s, r));
 34111                        s = r;
 34112                      }
 34113                      return i;
 34114                    })(i, s, c),
 34115                    n,
 34116                    t,
 34117                  );
 34118                }
 34119                return new Type2Compiled(o, n, e.fontMatrix, e.glyphNameMap);
 34120              }
 34121            };
 34122          },
 34123          (e, t, a) => {
 34124            Object.defineProperty(t, "__esModule", { value: !0 });
 34125            t.getMetrics = t.getFontBasicMetrics = void 0;
 34126            var r = a(3);
 34127            const n = (0, r.getLookupTableFactory)(function (e) {
 34128              e.Courier = 600;
 34129              e["Courier-Bold"] = 600;
 34130              e["Courier-BoldOblique"] = 600;
 34131              e["Courier-Oblique"] = 600;
 34132              e.Helvetica = (0, r.getLookupTableFactory)(function (e) {
 34133                e.space = 278;
 34134                e.exclam = 278;
 34135                e.quotedbl = 355;
 34136                e.numbersign = 556;
 34137                e.dollar = 556;
 34138                e.percent = 889;
 34139                e.ampersand = 667;
 34140                e.quoteright = 222;
 34141                e.parenleft = 333;
 34142                e.parenright = 333;
 34143                e.asterisk = 389;
 34144                e.plus = 584;
 34145                e.comma = 278;
 34146                e.hyphen = 333;
 34147                e.period = 278;
 34148                e.slash = 278;
 34149                e.zero = 556;
 34150                e.one = 556;
 34151                e.two = 556;
 34152                e.three = 556;
 34153                e.four = 556;
 34154                e.five = 556;
 34155                e.six = 556;
 34156                e.seven = 556;
 34157                e.eight = 556;
 34158                e.nine = 556;
 34159                e.colon = 278;
 34160                e.semicolon = 278;
 34161                e.less = 584;
 34162                e.equal = 584;
 34163                e.greater = 584;
 34164                e.question = 556;
 34165                e.at = 1015;
 34166                e.A = 667;
 34167                e.B = 667;
 34168                e.C = 722;
 34169                e.D = 722;
 34170                e.E = 667;
 34171                e.F = 611;
 34172                e.G = 778;
 34173                e.H = 722;
 34174                e.I = 278;
 34175                e.J = 500;
 34176                e.K = 667;
 34177                e.L = 556;
 34178                e.M = 833;
 34179                e.N = 722;
 34180                e.O = 778;
 34181                e.P = 667;
 34182                e.Q = 778;
 34183                e.R = 722;
 34184                e.S = 667;
 34185                e.T = 611;
 34186                e.U = 722;
 34187                e.V = 667;
 34188                e.W = 944;
 34189                e.X = 667;
 34190                e.Y = 667;
 34191                e.Z = 611;
 34192                e.bracketleft = 278;
 34193                e.backslash = 278;
 34194                e.bracketright = 278;
 34195                e.asciicircum = 469;
 34196                e.underscore = 556;
 34197                e.quoteleft = 222;
 34198                e.a = 556;
 34199                e.b = 556;
 34200                e.c = 500;
 34201                e.d = 556;
 34202                e.e = 556;
 34203                e.f = 278;
 34204                e.g = 556;
 34205                e.h = 556;
 34206                e.i = 222;
 34207                e.j = 222;
 34208                e.k = 500;
 34209                e.l = 222;
 34210                e.m = 833;
 34211                e.n = 556;
 34212                e.o = 556;
 34213                e.p = 556;
 34214                e.q = 556;
 34215                e.r = 333;
 34216                e.s = 500;
 34217                e.t = 278;
 34218                e.u = 556;
 34219                e.v = 500;
 34220                e.w = 722;
 34221                e.x = 500;
 34222                e.y = 500;
 34223                e.z = 500;
 34224                e.braceleft = 334;
 34225                e.bar = 260;
 34226                e.braceright = 334;
 34227                e.asciitilde = 584;
 34228                e.exclamdown = 333;
 34229                e.cent = 556;
 34230                e.sterling = 556;
 34231                e.fraction = 167;
 34232                e.yen = 556;
 34233                e.florin = 556;
 34234                e.section = 556;
 34235                e.currency = 556;
 34236                e.quotesingle = 191;
 34237                e.quotedblleft = 333;
 34238                e.guillemotleft = 556;
 34239                e.guilsinglleft = 333;
 34240                e.guilsinglright = 333;
 34241                e.fi = 500;
 34242                e.fl = 500;
 34243                e.endash = 556;
 34244                e.dagger = 556;
 34245                e.daggerdbl = 556;
 34246                e.periodcentered = 278;
 34247                e.paragraph = 537;
 34248                e.bullet = 350;
 34249                e.quotesinglbase = 222;
 34250                e.quotedblbase = 333;
 34251                e.quotedblright = 333;
 34252                e.guillemotright = 556;
 34253                e.ellipsis = 1e3;
 34254                e.perthousand = 1e3;
 34255                e.questiondown = 611;
 34256                e.grave = 333;
 34257                e.acute = 333;
 34258                e.circumflex = 333;
 34259                e.tilde = 333;
 34260                e.macron = 333;
 34261                e.breve = 333;
 34262                e.dotaccent = 333;
 34263                e.dieresis = 333;
 34264                e.ring = 333;
 34265                e.cedilla = 333;
 34266                e.hungarumlaut = 333;
 34267                e.ogonek = 333;
 34268                e.caron = 333;
 34269                e.emdash = 1e3;
 34270                e.AE = 1e3;
 34271                e.ordfeminine = 370;
 34272                e.Lslash = 556;
 34273                e.Oslash = 778;
 34274                e.OE = 1e3;
 34275                e.ordmasculine = 365;
 34276                e.ae = 889;
 34277                e.dotlessi = 278;
 34278                e.lslash = 222;
 34279                e.oslash = 611;
 34280                e.oe = 944;
 34281                e.germandbls = 611;
 34282                e.Idieresis = 278;
 34283                e.eacute = 556;
 34284                e.abreve = 556;
 34285                e.uhungarumlaut = 556;
 34286                e.ecaron = 556;
 34287                e.Ydieresis = 667;
 34288                e.divide = 584;
 34289                e.Yacute = 667;
 34290                e.Acircumflex = 667;
 34291                e.aacute = 556;
 34292                e.Ucircumflex = 722;
 34293                e.yacute = 500;
 34294                e.scommaaccent = 500;
 34295                e.ecircumflex = 556;
 34296                e.Uring = 722;
 34297                e.Udieresis = 722;
 34298                e.aogonek = 556;
 34299                e.Uacute = 722;
 34300                e.uogonek = 556;
 34301                e.Edieresis = 667;
 34302                e.Dcroat = 722;
 34303                e.commaaccent = 250;
 34304                e.copyright = 737;
 34305                e.Emacron = 667;
 34306                e.ccaron = 500;
 34307                e.aring = 556;
 34308                e.Ncommaaccent = 722;
 34309                e.lacute = 222;
 34310                e.agrave = 556;
 34311                e.Tcommaaccent = 611;
 34312                e.Cacute = 722;
 34313                e.atilde = 556;
 34314                e.Edotaccent = 667;
 34315                e.scaron = 500;
 34316                e.scedilla = 500;
 34317                e.iacute = 278;
 34318                e.lozenge = 471;
 34319                e.Rcaron = 722;
 34320                e.Gcommaaccent = 778;
 34321                e.ucircumflex = 556;
 34322                e.acircumflex = 556;
 34323                e.Amacron = 667;
 34324                e.rcaron = 333;
 34325                e.ccedilla = 500;
 34326                e.Zdotaccent = 611;
 34327                e.Thorn = 667;
 34328                e.Omacron = 778;
 34329                e.Racute = 722;
 34330                e.Sacute = 667;
 34331                e.dcaron = 643;
 34332                e.Umacron = 722;
 34333                e.uring = 556;
 34334                e.threesuperior = 333;
 34335                e.Ograve = 778;
 34336                e.Agrave = 667;
 34337                e.Abreve = 667;
 34338                e.multiply = 584;
 34339                e.uacute = 556;
 34340                e.Tcaron = 611;
 34341                e.partialdiff = 476;
 34342                e.ydieresis = 500;
 34343                e.Nacute = 722;
 34344                e.icircumflex = 278;
 34345                e.Ecircumflex = 667;
 34346                e.adieresis = 556;
 34347                e.edieresis = 556;
 34348                e.cacute = 500;
 34349                e.nacute = 556;
 34350                e.umacron = 556;
 34351                e.Ncaron = 722;
 34352                e.Iacute = 278;
 34353                e.plusminus = 584;
 34354                e.brokenbar = 260;
 34355                e.registered = 737;
 34356                e.Gbreve = 778;
 34357                e.Idotaccent = 278;
 34358                e.summation = 600;
 34359                e.Egrave = 667;
 34360                e.racute = 333;
 34361                e.omacron = 556;
 34362                e.Zacute = 611;
 34363                e.Zcaron = 611;
 34364                e.greaterequal = 549;
 34365                e.Eth = 722;
 34366                e.Ccedilla = 722;
 34367                e.lcommaaccent = 222;
 34368                e.tcaron = 317;
 34369                e.eogonek = 556;
 34370                e.Uogonek = 722;
 34371                e.Aacute = 667;
 34372                e.Adieresis = 667;
 34373                e.egrave = 556;
 34374                e.zacute = 500;
 34375                e.iogonek = 222;
 34376                e.Oacute = 778;
 34377                e.oacute = 556;
 34378                e.amacron = 556;
 34379                e.sacute = 500;
 34380                e.idieresis = 278;
 34381                e.Ocircumflex = 778;
 34382                e.Ugrave = 722;
 34383                e.Delta = 612;
 34384                e.thorn = 556;
 34385                e.twosuperior = 333;
 34386                e.Odieresis = 778;
 34387                e.mu = 556;
 34388                e.igrave = 278;
 34389                e.ohungarumlaut = 556;
 34390                e.Eogonek = 667;
 34391                e.dcroat = 556;
 34392                e.threequarters = 834;
 34393                e.Scedilla = 667;
 34394                e.lcaron = 299;
 34395                e.Kcommaaccent = 667;
 34396                e.Lacute = 556;
 34397                e.trademark = 1e3;
 34398                e.edotaccent = 556;
 34399                e.Igrave = 278;
 34400                e.Imacron = 278;
 34401                e.Lcaron = 556;
 34402                e.onehalf = 834;
 34403                e.lessequal = 549;
 34404                e.ocircumflex = 556;
 34405                e.ntilde = 556;
 34406                e.Uhungarumlaut = 722;
 34407                e.Eacute = 667;
 34408                e.emacron = 556;
 34409                e.gbreve = 556;
 34410                e.onequarter = 834;
 34411                e.Scaron = 667;
 34412                e.Scommaaccent = 667;
 34413                e.Ohungarumlaut = 778;
 34414                e.degree = 400;
 34415                e.ograve = 556;
 34416                e.Ccaron = 722;
 34417                e.ugrave = 556;
 34418                e.radical = 453;
 34419                e.Dcaron = 722;
 34420                e.rcommaaccent = 333;
 34421                e.Ntilde = 722;
 34422                e.otilde = 556;
 34423                e.Rcommaaccent = 722;
 34424                e.Lcommaaccent = 556;
 34425                e.Atilde = 667;
 34426                e.Aogonek = 667;
 34427                e.Aring = 667;
 34428                e.Otilde = 778;
 34429                e.zdotaccent = 500;
 34430                e.Ecaron = 667;
 34431                e.Iogonek = 278;
 34432                e.kcommaaccent = 500;
 34433                e.minus = 584;
 34434                e.Icircumflex = 278;
 34435                e.ncaron = 556;
 34436                e.tcommaaccent = 278;
 34437                e.logicalnot = 584;
 34438                e.odieresis = 556;
 34439                e.udieresis = 556;
 34440                e.notequal = 549;
 34441                e.gcommaaccent = 556;
 34442                e.eth = 556;
 34443                e.zcaron = 500;
 34444                e.ncommaaccent = 556;
 34445                e.onesuperior = 333;
 34446                e.imacron = 278;
 34447                e.Euro = 556;
 34448              });
 34449              e["Helvetica-Bold"] = (0, r.getLookupTableFactory)(function (e) {
 34450                e.space = 278;
 34451                e.exclam = 333;
 34452                e.quotedbl = 474;
 34453                e.numbersign = 556;
 34454                e.dollar = 556;
 34455                e.percent = 889;
 34456                e.ampersand = 722;
 34457                e.quoteright = 278;
 34458                e.parenleft = 333;
 34459                e.parenright = 333;
 34460                e.asterisk = 389;
 34461                e.plus = 584;
 34462                e.comma = 278;
 34463                e.hyphen = 333;
 34464                e.period = 278;
 34465                e.slash = 278;
 34466                e.zero = 556;
 34467                e.one = 556;
 34468                e.two = 556;
 34469                e.three = 556;
 34470                e.four = 556;
 34471                e.five = 556;
 34472                e.six = 556;
 34473                e.seven = 556;
 34474                e.eight = 556;
 34475                e.nine = 556;
 34476                e.colon = 333;
 34477                e.semicolon = 333;
 34478                e.less = 584;
 34479                e.equal = 584;
 34480                e.greater = 584;
 34481                e.question = 611;
 34482                e.at = 975;
 34483                e.A = 722;
 34484                e.B = 722;
 34485                e.C = 722;
 34486                e.D = 722;
 34487                e.E = 667;
 34488                e.F = 611;
 34489                e.G = 778;
 34490                e.H = 722;
 34491                e.I = 278;
 34492                e.J = 556;
 34493                e.K = 722;
 34494                e.L = 611;
 34495                e.M = 833;
 34496                e.N = 722;
 34497                e.O = 778;
 34498                e.P = 667;
 34499                e.Q = 778;
 34500                e.R = 722;
 34501                e.S = 667;
 34502                e.T = 611;
 34503                e.U = 722;
 34504                e.V = 667;
 34505                e.W = 944;
 34506                e.X = 667;
 34507                e.Y = 667;
 34508                e.Z = 611;
 34509                e.bracketleft = 333;
 34510                e.backslash = 278;
 34511                e.bracketright = 333;
 34512                e.asciicircum = 584;
 34513                e.underscore = 556;
 34514                e.quoteleft = 278;
 34515                e.a = 556;
 34516                e.b = 611;
 34517                e.c = 556;
 34518                e.d = 611;
 34519                e.e = 556;
 34520                e.f = 333;
 34521                e.g = 611;
 34522                e.h = 611;
 34523                e.i = 278;
 34524                e.j = 278;
 34525                e.k = 556;
 34526                e.l = 278;
 34527                e.m = 889;
 34528                e.n = 611;
 34529                e.o = 611;
 34530                e.p = 611;
 34531                e.q = 611;
 34532                e.r = 389;
 34533                e.s = 556;
 34534                e.t = 333;
 34535                e.u = 611;
 34536                e.v = 556;
 34537                e.w = 778;
 34538                e.x = 556;
 34539                e.y = 556;
 34540                e.z = 500;
 34541                e.braceleft = 389;
 34542                e.bar = 280;
 34543                e.braceright = 389;
 34544                e.asciitilde = 584;
 34545                e.exclamdown = 333;
 34546                e.cent = 556;
 34547                e.sterling = 556;
 34548                e.fraction = 167;
 34549                e.yen = 556;
 34550                e.florin = 556;
 34551                e.section = 556;
 34552                e.currency = 556;
 34553                e.quotesingle = 238;
 34554                e.quotedblleft = 500;
 34555                e.guillemotleft = 556;
 34556                e.guilsinglleft = 333;
 34557                e.guilsinglright = 333;
 34558                e.fi = 611;
 34559                e.fl = 611;
 34560                e.endash = 556;
 34561                e.dagger = 556;
 34562                e.daggerdbl = 556;
 34563                e.periodcentered = 278;
 34564                e.paragraph = 556;
 34565                e.bullet = 350;
 34566                e.quotesinglbase = 278;
 34567                e.quotedblbase = 500;
 34568                e.quotedblright = 500;
 34569                e.guillemotright = 556;
 34570                e.ellipsis = 1e3;
 34571                e.perthousand = 1e3;
 34572                e.questiondown = 611;
 34573                e.grave = 333;
 34574                e.acute = 333;
 34575                e.circumflex = 333;
 34576                e.tilde = 333;
 34577                e.macron = 333;
 34578                e.breve = 333;
 34579                e.dotaccent = 333;
 34580                e.dieresis = 333;
 34581                e.ring = 333;
 34582                e.cedilla = 333;
 34583                e.hungarumlaut = 333;
 34584                e.ogonek = 333;
 34585                e.caron = 333;
 34586                e.emdash = 1e3;
 34587                e.AE = 1e3;
 34588                e.ordfeminine = 370;
 34589                e.Lslash = 611;
 34590                e.Oslash = 778;
 34591                e.OE = 1e3;
 34592                e.ordmasculine = 365;
 34593                e.ae = 889;
 34594                e.dotlessi = 278;
 34595                e.lslash = 278;
 34596                e.oslash = 611;
 34597                e.oe = 944;
 34598                e.germandbls = 611;
 34599                e.Idieresis = 278;
 34600                e.eacute = 556;
 34601                e.abreve = 556;
 34602                e.uhungarumlaut = 611;
 34603                e.ecaron = 556;
 34604                e.Ydieresis = 667;
 34605                e.divide = 584;
 34606                e.Yacute = 667;
 34607                e.Acircumflex = 722;
 34608                e.aacute = 556;
 34609                e.Ucircumflex = 722;
 34610                e.yacute = 556;
 34611                e.scommaaccent = 556;
 34612                e.ecircumflex = 556;
 34613                e.Uring = 722;
 34614                e.Udieresis = 722;
 34615                e.aogonek = 556;
 34616                e.Uacute = 722;
 34617                e.uogonek = 611;
 34618                e.Edieresis = 667;
 34619                e.Dcroat = 722;
 34620                e.commaaccent = 250;
 34621                e.copyright = 737;
 34622                e.Emacron = 667;
 34623                e.ccaron = 556;
 34624                e.aring = 556;
 34625                e.Ncommaaccent = 722;
 34626                e.lacute = 278;
 34627                e.agrave = 556;
 34628                e.Tcommaaccent = 611;
 34629                e.Cacute = 722;
 34630                e.atilde = 556;
 34631                e.Edotaccent = 667;
 34632                e.scaron = 556;
 34633                e.scedilla = 556;
 34634                e.iacute = 278;
 34635                e.lozenge = 494;
 34636                e.Rcaron = 722;
 34637                e.Gcommaaccent = 778;
 34638                e.ucircumflex = 611;
 34639                e.acircumflex = 556;
 34640                e.Amacron = 722;
 34641                e.rcaron = 389;
 34642                e.ccedilla = 556;
 34643                e.Zdotaccent = 611;
 34644                e.Thorn = 667;
 34645                e.Omacron = 778;
 34646                e.Racute = 722;
 34647                e.Sacute = 667;
 34648                e.dcaron = 743;
 34649                e.Umacron = 722;
 34650                e.uring = 611;
 34651                e.threesuperior = 333;
 34652                e.Ograve = 778;
 34653                e.Agrave = 722;
 34654                e.Abreve = 722;
 34655                e.multiply = 584;
 34656                e.uacute = 611;
 34657                e.Tcaron = 611;
 34658                e.partialdiff = 494;
 34659                e.ydieresis = 556;
 34660                e.Nacute = 722;
 34661                e.icircumflex = 278;
 34662                e.Ecircumflex = 667;
 34663                e.adieresis = 556;
 34664                e.edieresis = 556;
 34665                e.cacute = 556;
 34666                e.nacute = 611;
 34667                e.umacron = 611;
 34668                e.Ncaron = 722;
 34669                e.Iacute = 278;
 34670                e.plusminus = 584;
 34671                e.brokenbar = 280;
 34672                e.registered = 737;
 34673                e.Gbreve = 778;
 34674                e.Idotaccent = 278;
 34675                e.summation = 600;
 34676                e.Egrave = 667;
 34677                e.racute = 389;
 34678                e.omacron = 611;
 34679                e.Zacute = 611;
 34680                e.Zcaron = 611;
 34681                e.greaterequal = 549;
 34682                e.Eth = 722;
 34683                e.Ccedilla = 722;
 34684                e.lcommaaccent = 278;
 34685                e.tcaron = 389;
 34686                e.eogonek = 556;
 34687                e.Uogonek = 722;
 34688                e.Aacute = 722;
 34689                e.Adieresis = 722;
 34690                e.egrave = 556;
 34691                e.zacute = 500;
 34692                e.iogonek = 278;
 34693                e.Oacute = 778;
 34694                e.oacute = 611;
 34695                e.amacron = 556;
 34696                e.sacute = 556;
 34697                e.idieresis = 278;
 34698                e.Ocircumflex = 778;
 34699                e.Ugrave = 722;
 34700                e.Delta = 612;
 34701                e.thorn = 611;
 34702                e.twosuperior = 333;
 34703                e.Odieresis = 778;
 34704                e.mu = 611;
 34705                e.igrave = 278;
 34706                e.ohungarumlaut = 611;
 34707                e.Eogonek = 667;
 34708                e.dcroat = 611;
 34709                e.threequarters = 834;
 34710                e.Scedilla = 667;
 34711                e.lcaron = 400;
 34712                e.Kcommaaccent = 722;
 34713                e.Lacute = 611;
 34714                e.trademark = 1e3;
 34715                e.edotaccent = 556;
 34716                e.Igrave = 278;
 34717                e.Imacron = 278;
 34718                e.Lcaron = 611;
 34719                e.onehalf = 834;
 34720                e.lessequal = 549;
 34721                e.ocircumflex = 611;
 34722                e.ntilde = 611;
 34723                e.Uhungarumlaut = 722;
 34724                e.Eacute = 667;
 34725                e.emacron = 556;
 34726                e.gbreve = 611;
 34727                e.onequarter = 834;
 34728                e.Scaron = 667;
 34729                e.Scommaaccent = 667;
 34730                e.Ohungarumlaut = 778;
 34731                e.degree = 400;
 34732                e.ograve = 611;
 34733                e.Ccaron = 722;
 34734                e.ugrave = 611;
 34735                e.radical = 549;
 34736                e.Dcaron = 722;
 34737                e.rcommaaccent = 389;
 34738                e.Ntilde = 722;
 34739                e.otilde = 611;
 34740                e.Rcommaaccent = 722;
 34741                e.Lcommaaccent = 611;
 34742                e.Atilde = 722;
 34743                e.Aogonek = 722;
 34744                e.Aring = 722;
 34745                e.Otilde = 778;
 34746                e.zdotaccent = 500;
 34747                e.Ecaron = 667;
 34748                e.Iogonek = 278;
 34749                e.kcommaaccent = 556;
 34750                e.minus = 584;
 34751                e.Icircumflex = 278;
 34752                e.ncaron = 611;
 34753                e.tcommaaccent = 333;
 34754                e.logicalnot = 584;
 34755                e.odieresis = 611;
 34756                e.udieresis = 611;
 34757                e.notequal = 549;
 34758                e.gcommaaccent = 611;
 34759                e.eth = 611;
 34760                e.zcaron = 500;
 34761                e.ncommaaccent = 611;
 34762                e.onesuperior = 333;
 34763                e.imacron = 278;
 34764                e.Euro = 556;
 34765              });
 34766              e["Helvetica-BoldOblique"] = (0, r.getLookupTableFactory)(
 34767                function (e) {
 34768                  e.space = 278;
 34769                  e.exclam = 333;
 34770                  e.quotedbl = 474;
 34771                  e.numbersign = 556;
 34772                  e.dollar = 556;
 34773                  e.percent = 889;
 34774                  e.ampersand = 722;
 34775                  e.quoteright = 278;
 34776                  e.parenleft = 333;
 34777                  e.parenright = 333;
 34778                  e.asterisk = 389;
 34779                  e.plus = 584;
 34780                  e.comma = 278;
 34781                  e.hyphen = 333;
 34782                  e.period = 278;
 34783                  e.slash = 278;
 34784                  e.zero = 556;
 34785                  e.one = 556;
 34786                  e.two = 556;
 34787                  e.three = 556;
 34788                  e.four = 556;
 34789                  e.five = 556;
 34790                  e.six = 556;
 34791                  e.seven = 556;
 34792                  e.eight = 556;
 34793                  e.nine = 556;
 34794                  e.colon = 333;
 34795                  e.semicolon = 333;
 34796                  e.less = 584;
 34797                  e.equal = 584;
 34798                  e.greater = 584;
 34799                  e.question = 611;
 34800                  e.at = 975;
 34801                  e.A = 722;
 34802                  e.B = 722;
 34803                  e.C = 722;
 34804                  e.D = 722;
 34805                  e.E = 667;
 34806                  e.F = 611;
 34807                  e.G = 778;
 34808                  e.H = 722;
 34809                  e.I = 278;
 34810                  e.J = 556;
 34811                  e.K = 722;
 34812                  e.L = 611;
 34813                  e.M = 833;
 34814                  e.N = 722;
 34815                  e.O = 778;
 34816                  e.P = 667;
 34817                  e.Q = 778;
 34818                  e.R = 722;
 34819                  e.S = 667;
 34820                  e.T = 611;
 34821                  e.U = 722;
 34822                  e.V = 667;
 34823                  e.W = 944;
 34824                  e.X = 667;
 34825                  e.Y = 667;
 34826                  e.Z = 611;
 34827                  e.bracketleft = 333;
 34828                  e.backslash = 278;
 34829                  e.bracketright = 333;
 34830                  e.asciicircum = 584;
 34831                  e.underscore = 556;
 34832                  e.quoteleft = 278;
 34833                  e.a = 556;
 34834                  e.b = 611;
 34835                  e.c = 556;
 34836                  e.d = 611;
 34837                  e.e = 556;
 34838                  e.f = 333;
 34839                  e.g = 611;
 34840                  e.h = 611;
 34841                  e.i = 278;
 34842                  e.j = 278;
 34843                  e.k = 556;
 34844                  e.l = 278;
 34845                  e.m = 889;
 34846                  e.n = 611;
 34847                  e.o = 611;
 34848                  e.p = 611;
 34849                  e.q = 611;
 34850                  e.r = 389;
 34851                  e.s = 556;
 34852                  e.t = 333;
 34853                  e.u = 611;
 34854                  e.v = 556;
 34855                  e.w = 778;
 34856                  e.x = 556;
 34857                  e.y = 556;
 34858                  e.z = 500;
 34859                  e.braceleft = 389;
 34860                  e.bar = 280;
 34861                  e.braceright = 389;
 34862                  e.asciitilde = 584;
 34863                  e.exclamdown = 333;
 34864                  e.cent = 556;
 34865                  e.sterling = 556;
 34866                  e.fraction = 167;
 34867                  e.yen = 556;
 34868                  e.florin = 556;
 34869                  e.section = 556;
 34870                  e.currency = 556;
 34871                  e.quotesingle = 238;
 34872                  e.quotedblleft = 500;
 34873                  e.guillemotleft = 556;
 34874                  e.guilsinglleft = 333;
 34875                  e.guilsinglright = 333;
 34876                  e.fi = 611;
 34877                  e.fl = 611;
 34878                  e.endash = 556;
 34879                  e.dagger = 556;
 34880                  e.daggerdbl = 556;
 34881                  e.periodcentered = 278;
 34882                  e.paragraph = 556;
 34883                  e.bullet = 350;
 34884                  e.quotesinglbase = 278;
 34885                  e.quotedblbase = 500;
 34886                  e.quotedblright = 500;
 34887                  e.guillemotright = 556;
 34888                  e.ellipsis = 1e3;
 34889                  e.perthousand = 1e3;
 34890                  e.questiondown = 611;
 34891                  e.grave = 333;
 34892                  e.acute = 333;
 34893                  e.circumflex = 333;
 34894                  e.tilde = 333;
 34895                  e.macron = 333;
 34896                  e.breve = 333;
 34897                  e.dotaccent = 333;
 34898                  e.dieresis = 333;
 34899                  e.ring = 333;
 34900                  e.cedilla = 333;
 34901                  e.hungarumlaut = 333;
 34902                  e.ogonek = 333;
 34903                  e.caron = 333;
 34904                  e.emdash = 1e3;
 34905                  e.AE = 1e3;
 34906                  e.ordfeminine = 370;
 34907                  e.Lslash = 611;
 34908                  e.Oslash = 778;
 34909                  e.OE = 1e3;
 34910                  e.ordmasculine = 365;
 34911                  e.ae = 889;
 34912                  e.dotlessi = 278;
 34913                  e.lslash = 278;
 34914                  e.oslash = 611;
 34915                  e.oe = 944;
 34916                  e.germandbls = 611;
 34917                  e.Idieresis = 278;
 34918                  e.eacute = 556;
 34919                  e.abreve = 556;
 34920                  e.uhungarumlaut = 611;
 34921                  e.ecaron = 556;
 34922                  e.Ydieresis = 667;
 34923                  e.divide = 584;
 34924                  e.Yacute = 667;
 34925                  e.Acircumflex = 722;
 34926                  e.aacute = 556;
 34927                  e.Ucircumflex = 722;
 34928                  e.yacute = 556;
 34929                  e.scommaaccent = 556;
 34930                  e.ecircumflex = 556;
 34931                  e.Uring = 722;
 34932                  e.Udieresis = 722;
 34933                  e.aogonek = 556;
 34934                  e.Uacute = 722;
 34935                  e.uogonek = 611;
 34936                  e.Edieresis = 667;
 34937                  e.Dcroat = 722;
 34938                  e.commaaccent = 250;
 34939                  e.copyright = 737;
 34940                  e.Emacron = 667;
 34941                  e.ccaron = 556;
 34942                  e.aring = 556;
 34943                  e.Ncommaaccent = 722;
 34944                  e.lacute = 278;
 34945                  e.agrave = 556;
 34946                  e.Tcommaaccent = 611;
 34947                  e.Cacute = 722;
 34948                  e.atilde = 556;
 34949                  e.Edotaccent = 667;
 34950                  e.scaron = 556;
 34951                  e.scedilla = 556;
 34952                  e.iacute = 278;
 34953                  e.lozenge = 494;
 34954                  e.Rcaron = 722;
 34955                  e.Gcommaaccent = 778;
 34956                  e.ucircumflex = 611;
 34957                  e.acircumflex = 556;
 34958                  e.Amacron = 722;
 34959                  e.rcaron = 389;
 34960                  e.ccedilla = 556;
 34961                  e.Zdotaccent = 611;
 34962                  e.Thorn = 667;
 34963                  e.Omacron = 778;
 34964                  e.Racute = 722;
 34965                  e.Sacute = 667;
 34966                  e.dcaron = 743;
 34967                  e.Umacron = 722;
 34968                  e.uring = 611;
 34969                  e.threesuperior = 333;
 34970                  e.Ograve = 778;
 34971                  e.Agrave = 722;
 34972                  e.Abreve = 722;
 34973                  e.multiply = 584;
 34974                  e.uacute = 611;
 34975                  e.Tcaron = 611;
 34976                  e.partialdiff = 494;
 34977                  e.ydieresis = 556;
 34978                  e.Nacute = 722;
 34979                  e.icircumflex = 278;
 34980                  e.Ecircumflex = 667;
 34981                  e.adieresis = 556;
 34982                  e.edieresis = 556;
 34983                  e.cacute = 556;
 34984                  e.nacute = 611;
 34985                  e.umacron = 611;
 34986                  e.Ncaron = 722;
 34987                  e.Iacute = 278;
 34988                  e.plusminus = 584;
 34989                  e.brokenbar = 280;
 34990                  e.registered = 737;
 34991                  e.Gbreve = 778;
 34992                  e.Idotaccent = 278;
 34993                  e.summation = 600;
 34994                  e.Egrave = 667;
 34995                  e.racute = 389;
 34996                  e.omacron = 611;
 34997                  e.Zacute = 611;
 34998                  e.Zcaron = 611;
 34999                  e.greaterequal = 549;
 35000                  e.Eth = 722;
 35001                  e.Ccedilla = 722;
 35002                  e.lcommaaccent = 278;
 35003                  e.tcaron = 389;
 35004                  e.eogonek = 556;
 35005                  e.Uogonek = 722;
 35006                  e.Aacute = 722;
 35007                  e.Adieresis = 722;
 35008                  e.egrave = 556;
 35009                  e.zacute = 500;
 35010                  e.iogonek = 278;
 35011                  e.Oacute = 778;
 35012                  e.oacute = 611;
 35013                  e.amacron = 556;
 35014                  e.sacute = 556;
 35015                  e.idieresis = 278;
 35016                  e.Ocircumflex = 778;
 35017                  e.Ugrave = 722;
 35018                  e.Delta = 612;
 35019                  e.thorn = 611;
 35020                  e.twosuperior = 333;
 35021                  e.Odieresis = 778;
 35022                  e.mu = 611;
 35023                  e.igrave = 278;
 35024                  e.ohungarumlaut = 611;
 35025                  e.Eogonek = 667;
 35026                  e.dcroat = 611;
 35027                  e.threequarters = 834;
 35028                  e.Scedilla = 667;
 35029                  e.lcaron = 400;
 35030                  e.Kcommaaccent = 722;
 35031                  e.Lacute = 611;
 35032                  e.trademark = 1e3;
 35033                  e.edotaccent = 556;
 35034                  e.Igrave = 278;
 35035                  e.Imacron = 278;
 35036                  e.Lcaron = 611;
 35037                  e.onehalf = 834;
 35038                  e.lessequal = 549;
 35039                  e.ocircumflex = 611;
 35040                  e.ntilde = 611;
 35041                  e.Uhungarumlaut = 722;
 35042                  e.Eacute = 667;
 35043                  e.emacron = 556;
 35044                  e.gbreve = 611;
 35045                  e.onequarter = 834;
 35046                  e.Scaron = 667;
 35047                  e.Scommaaccent = 667;
 35048                  e.Ohungarumlaut = 778;
 35049                  e.degree = 400;
 35050                  e.ograve = 611;
 35051                  e.Ccaron = 722;
 35052                  e.ugrave = 611;
 35053                  e.radical = 549;
 35054                  e.Dcaron = 722;
 35055                  e.rcommaaccent = 389;
 35056                  e.Ntilde = 722;
 35057                  e.otilde = 611;
 35058                  e.Rcommaaccent = 722;
 35059                  e.Lcommaaccent = 611;
 35060                  e.Atilde = 722;
 35061                  e.Aogonek = 722;
 35062                  e.Aring = 722;
 35063                  e.Otilde = 778;
 35064                  e.zdotaccent = 500;
 35065                  e.Ecaron = 667;
 35066                  e.Iogonek = 278;
 35067                  e.kcommaaccent = 556;
 35068                  e.minus = 584;
 35069                  e.Icircumflex = 278;
 35070                  e.ncaron = 611;
 35071                  e.tcommaaccent = 333;
 35072                  e.logicalnot = 584;
 35073                  e.odieresis = 611;
 35074                  e.udieresis = 611;
 35075                  e.notequal = 549;
 35076                  e.gcommaaccent = 611;
 35077                  e.eth = 611;
 35078                  e.zcaron = 500;
 35079                  e.ncommaaccent = 611;
 35080                  e.onesuperior = 333;
 35081                  e.imacron = 278;
 35082                  e.Euro = 556;
 35083                },
 35084              );
 35085              e["Helvetica-Oblique"] = (0, r.getLookupTableFactory)(function (e) {
 35086                e.space = 278;
 35087                e.exclam = 278;
 35088                e.quotedbl = 355;
 35089                e.numbersign = 556;
 35090                e.dollar = 556;
 35091                e.percent = 889;
 35092                e.ampersand = 667;
 35093                e.quoteright = 222;
 35094                e.parenleft = 333;
 35095                e.parenright = 333;
 35096                e.asterisk = 389;
 35097                e.plus = 584;
 35098                e.comma = 278;
 35099                e.hyphen = 333;
 35100                e.period = 278;
 35101                e.slash = 278;
 35102                e.zero = 556;
 35103                e.one = 556;
 35104                e.two = 556;
 35105                e.three = 556;
 35106                e.four = 556;
 35107                e.five = 556;
 35108                e.six = 556;
 35109                e.seven = 556;
 35110                e.eight = 556;
 35111                e.nine = 556;
 35112                e.colon = 278;
 35113                e.semicolon = 278;
 35114                e.less = 584;
 35115                e.equal = 584;
 35116                e.greater = 584;
 35117                e.question = 556;
 35118                e.at = 1015;
 35119                e.A = 667;
 35120                e.B = 667;
 35121                e.C = 722;
 35122                e.D = 722;
 35123                e.E = 667;
 35124                e.F = 611;
 35125                e.G = 778;
 35126                e.H = 722;
 35127                e.I = 278;
 35128                e.J = 500;
 35129                e.K = 667;
 35130                e.L = 556;
 35131                e.M = 833;
 35132                e.N = 722;
 35133                e.O = 778;
 35134                e.P = 667;
 35135                e.Q = 778;
 35136                e.R = 722;
 35137                e.S = 667;
 35138                e.T = 611;
 35139                e.U = 722;
 35140                e.V = 667;
 35141                e.W = 944;
 35142                e.X = 667;
 35143                e.Y = 667;
 35144                e.Z = 611;
 35145                e.bracketleft = 278;
 35146                e.backslash = 278;
 35147                e.bracketright = 278;
 35148                e.asciicircum = 469;
 35149                e.underscore = 556;
 35150                e.quoteleft = 222;
 35151                e.a = 556;
 35152                e.b = 556;
 35153                e.c = 500;
 35154                e.d = 556;
 35155                e.e = 556;
 35156                e.f = 278;
 35157                e.g = 556;
 35158                e.h = 556;
 35159                e.i = 222;
 35160                e.j = 222;
 35161                e.k = 500;
 35162                e.l = 222;
 35163                e.m = 833;
 35164                e.n = 556;
 35165                e.o = 556;
 35166                e.p = 556;
 35167                e.q = 556;
 35168                e.r = 333;
 35169                e.s = 500;
 35170                e.t = 278;
 35171                e.u = 556;
 35172                e.v = 500;
 35173                e.w = 722;
 35174                e.x = 500;
 35175                e.y = 500;
 35176                e.z = 500;
 35177                e.braceleft = 334;
 35178                e.bar = 260;
 35179                e.braceright = 334;
 35180                e.asciitilde = 584;
 35181                e.exclamdown = 333;
 35182                e.cent = 556;
 35183                e.sterling = 556;
 35184                e.fraction = 167;
 35185                e.yen = 556;
 35186                e.florin = 556;
 35187                e.section = 556;
 35188                e.currency = 556;
 35189                e.quotesingle = 191;
 35190                e.quotedblleft = 333;
 35191                e.guillemotleft = 556;
 35192                e.guilsinglleft = 333;
 35193                e.guilsinglright = 333;
 35194                e.fi = 500;
 35195                e.fl = 500;
 35196                e.endash = 556;
 35197                e.dagger = 556;
 35198                e.daggerdbl = 556;
 35199                e.periodcentered = 278;
 35200                e.paragraph = 537;
 35201                e.bullet = 350;
 35202                e.quotesinglbase = 222;
 35203                e.quotedblbase = 333;
 35204                e.quotedblright = 333;
 35205                e.guillemotright = 556;
 35206                e.ellipsis = 1e3;
 35207                e.perthousand = 1e3;
 35208                e.questiondown = 611;
 35209                e.grave = 333;
 35210                e.acute = 333;
 35211                e.circumflex = 333;
 35212                e.tilde = 333;
 35213                e.macron = 333;
 35214                e.breve = 333;
 35215                e.dotaccent = 333;
 35216                e.dieresis = 333;
 35217                e.ring = 333;
 35218                e.cedilla = 333;
 35219                e.hungarumlaut = 333;
 35220                e.ogonek = 333;
 35221                e.caron = 333;
 35222                e.emdash = 1e3;
 35223                e.AE = 1e3;
 35224                e.ordfeminine = 370;
 35225                e.Lslash = 556;
 35226                e.Oslash = 778;
 35227                e.OE = 1e3;
 35228                e.ordmasculine = 365;
 35229                e.ae = 889;
 35230                e.dotlessi = 278;
 35231                e.lslash = 222;
 35232                e.oslash = 611;
 35233                e.oe = 944;
 35234                e.germandbls = 611;
 35235                e.Idieresis = 278;
 35236                e.eacute = 556;
 35237                e.abreve = 556;
 35238                e.uhungarumlaut = 556;
 35239                e.ecaron = 556;
 35240                e.Ydieresis = 667;
 35241                e.divide = 584;
 35242                e.Yacute = 667;
 35243                e.Acircumflex = 667;
 35244                e.aacute = 556;
 35245                e.Ucircumflex = 722;
 35246                e.yacute = 500;
 35247                e.scommaaccent = 500;
 35248                e.ecircumflex = 556;
 35249                e.Uring = 722;
 35250                e.Udieresis = 722;
 35251                e.aogonek = 556;
 35252                e.Uacute = 722;
 35253                e.uogonek = 556;
 35254                e.Edieresis = 667;
 35255                e.Dcroat = 722;
 35256                e.commaaccent = 250;
 35257                e.copyright = 737;
 35258                e.Emacron = 667;
 35259                e.ccaron = 500;
 35260                e.aring = 556;
 35261                e.Ncommaaccent = 722;
 35262                e.lacute = 222;
 35263                e.agrave = 556;
 35264                e.Tcommaaccent = 611;
 35265                e.Cacute = 722;
 35266                e.atilde = 556;
 35267                e.Edotaccent = 667;
 35268                e.scaron = 500;
 35269                e.scedilla = 500;
 35270                e.iacute = 278;
 35271                e.lozenge = 471;
 35272                e.Rcaron = 722;
 35273                e.Gcommaaccent = 778;
 35274                e.ucircumflex = 556;
 35275                e.acircumflex = 556;
 35276                e.Amacron = 667;
 35277                e.rcaron = 333;
 35278                e.ccedilla = 500;
 35279                e.Zdotaccent = 611;
 35280                e.Thorn = 667;
 35281                e.Omacron = 778;
 35282                e.Racute = 722;
 35283                e.Sacute = 667;
 35284                e.dcaron = 643;
 35285                e.Umacron = 722;
 35286                e.uring = 556;
 35287                e.threesuperior = 333;
 35288                e.Ograve = 778;
 35289                e.Agrave = 667;
 35290                e.Abreve = 667;
 35291                e.multiply = 584;
 35292                e.uacute = 556;
 35293                e.Tcaron = 611;
 35294                e.partialdiff = 476;
 35295                e.ydieresis = 500;
 35296                e.Nacute = 722;
 35297                e.icircumflex = 278;
 35298                e.Ecircumflex = 667;
 35299                e.adieresis = 556;
 35300                e.edieresis = 556;
 35301                e.cacute = 500;
 35302                e.nacute = 556;
 35303                e.umacron = 556;
 35304                e.Ncaron = 722;
 35305                e.Iacute = 278;
 35306                e.plusminus = 584;
 35307                e.brokenbar = 260;
 35308                e.registered = 737;
 35309                e.Gbreve = 778;
 35310                e.Idotaccent = 278;
 35311                e.summation = 600;
 35312                e.Egrave = 667;
 35313                e.racute = 333;
 35314                e.omacron = 556;
 35315                e.Zacute = 611;
 35316                e.Zcaron = 611;
 35317                e.greaterequal = 549;
 35318                e.Eth = 722;
 35319                e.Ccedilla = 722;
 35320                e.lcommaaccent = 222;
 35321                e.tcaron = 317;
 35322                e.eogonek = 556;
 35323                e.Uogonek = 722;
 35324                e.Aacute = 667;
 35325                e.Adieresis = 667;
 35326                e.egrave = 556;
 35327                e.zacute = 500;
 35328                e.iogonek = 222;
 35329                e.Oacute = 778;
 35330                e.oacute = 556;
 35331                e.amacron = 556;
 35332                e.sacute = 500;
 35333                e.idieresis = 278;
 35334                e.Ocircumflex = 778;
 35335                e.Ugrave = 722;
 35336                e.Delta = 612;
 35337                e.thorn = 556;
 35338                e.twosuperior = 333;
 35339                e.Odieresis = 778;
 35340                e.mu = 556;
 35341                e.igrave = 278;
 35342                e.ohungarumlaut = 556;
 35343                e.Eogonek = 667;
 35344                e.dcroat = 556;
 35345                e.threequarters = 834;
 35346                e.Scedilla = 667;
 35347                e.lcaron = 299;
 35348                e.Kcommaaccent = 667;
 35349                e.Lacute = 556;
 35350                e.trademark = 1e3;
 35351                e.edotaccent = 556;
 35352                e.Igrave = 278;
 35353                e.Imacron = 278;
 35354                e.Lcaron = 556;
 35355                e.onehalf = 834;
 35356                e.lessequal = 549;
 35357                e.ocircumflex = 556;
 35358                e.ntilde = 556;
 35359                e.Uhungarumlaut = 722;
 35360                e.Eacute = 667;
 35361                e.emacron = 556;
 35362                e.gbreve = 556;
 35363                e.onequarter = 834;
 35364                e.Scaron = 667;
 35365                e.Scommaaccent = 667;
 35366                e.Ohungarumlaut = 778;
 35367                e.degree = 400;
 35368                e.ograve = 556;
 35369                e.Ccaron = 722;
 35370                e.ugrave = 556;
 35371                e.radical = 453;
 35372                e.Dcaron = 722;
 35373                e.rcommaaccent = 333;
 35374                e.Ntilde = 722;
 35375                e.otilde = 556;
 35376                e.Rcommaaccent = 722;
 35377                e.Lcommaaccent = 556;
 35378                e.Atilde = 667;
 35379                e.Aogonek = 667;
 35380                e.Aring = 667;
 35381                e.Otilde = 778;
 35382                e.zdotaccent = 500;
 35383                e.Ecaron = 667;
 35384                e.Iogonek = 278;
 35385                e.kcommaaccent = 500;
 35386                e.minus = 584;
 35387                e.Icircumflex = 278;
 35388                e.ncaron = 556;
 35389                e.tcommaaccent = 278;
 35390                e.logicalnot = 584;
 35391                e.odieresis = 556;
 35392                e.udieresis = 556;
 35393                e.notequal = 549;
 35394                e.gcommaaccent = 556;
 35395                e.eth = 556;
 35396                e.zcaron = 500;
 35397                e.ncommaaccent = 556;
 35398                e.onesuperior = 333;
 35399                e.imacron = 278;
 35400                e.Euro = 556;
 35401              });
 35402              e.Symbol = (0, r.getLookupTableFactory)(function (e) {
 35403                e.space = 250;
 35404                e.exclam = 333;
 35405                e.universal = 713;
 35406                e.numbersign = 500;
 35407                e.existential = 549;
 35408                e.percent = 833;
 35409                e.ampersand = 778;
 35410                e.suchthat = 439;
 35411                e.parenleft = 333;
 35412                e.parenright = 333;
 35413                e.asteriskmath = 500;
 35414                e.plus = 549;
 35415                e.comma = 250;
 35416                e.minus = 549;
 35417                e.period = 250;
 35418                e.slash = 278;
 35419                e.zero = 500;
 35420                e.one = 500;
 35421                e.two = 500;
 35422                e.three = 500;
 35423                e.four = 500;
 35424                e.five = 500;
 35425                e.six = 500;
 35426                e.seven = 500;
 35427                e.eight = 500;
 35428                e.nine = 500;
 35429                e.colon = 278;
 35430                e.semicolon = 278;
 35431                e.less = 549;
 35432                e.equal = 549;
 35433                e.greater = 549;
 35434                e.question = 444;
 35435                e.congruent = 549;
 35436                e.Alpha = 722;
 35437                e.Beta = 667;
 35438                e.Chi = 722;
 35439                e.Delta = 612;
 35440                e.Epsilon = 611;
 35441                e.Phi = 763;
 35442                e.Gamma = 603;
 35443                e.Eta = 722;
 35444                e.Iota = 333;
 35445                e.theta1 = 631;
 35446                e.Kappa = 722;
 35447                e.Lambda = 686;
 35448                e.Mu = 889;
 35449                e.Nu = 722;
 35450                e.Omicron = 722;
 35451                e.Pi = 768;
 35452                e.Theta = 741;
 35453                e.Rho = 556;
 35454                e.Sigma = 592;
 35455                e.Tau = 611;
 35456                e.Upsilon = 690;
 35457                e.sigma1 = 439;
 35458                e.Omega = 768;
 35459                e.Xi = 645;
 35460                e.Psi = 795;
 35461                e.Zeta = 611;
 35462                e.bracketleft = 333;
 35463                e.therefore = 863;
 35464                e.bracketright = 333;
 35465                e.perpendicular = 658;
 35466                e.underscore = 500;
 35467                e.radicalex = 500;
 35468                e.alpha = 631;
 35469                e.beta = 549;
 35470                e.chi = 549;
 35471                e.delta = 494;
 35472                e.epsilon = 439;
 35473                e.phi = 521;
 35474                e.gamma = 411;
 35475                e.eta = 603;
 35476                e.iota = 329;
 35477                e.phi1 = 603;
 35478                e.kappa = 549;
 35479                e.lambda = 549;
 35480                e.mu = 576;
 35481                e.nu = 521;
 35482                e.omicron = 549;
 35483                e.pi = 549;
 35484                e.theta = 521;
 35485                e.rho = 549;
 35486                e.sigma = 603;
 35487                e.tau = 439;
 35488                e.upsilon = 576;
 35489                e.omega1 = 713;
 35490                e.omega = 686;
 35491                e.xi = 493;
 35492                e.psi = 686;
 35493                e.zeta = 494;
 35494                e.braceleft = 480;
 35495                e.bar = 200;
 35496                e.braceright = 480;
 35497                e.similar = 549;
 35498                e.Euro = 750;
 35499                e.Upsilon1 = 620;
 35500                e.minute = 247;
 35501                e.lessequal = 549;
 35502                e.fraction = 167;
 35503                e.infinity = 713;
 35504                e.florin = 500;
 35505                e.club = 753;
 35506                e.diamond = 753;
 35507                e.heart = 753;
 35508                e.spade = 753;
 35509                e.arrowboth = 1042;
 35510                e.arrowleft = 987;
 35511                e.arrowup = 603;
 35512                e.arrowright = 987;
 35513                e.arrowdown = 603;
 35514                e.degree = 400;
 35515                e.plusminus = 549;
 35516                e.second = 411;
 35517                e.greaterequal = 549;
 35518                e.multiply = 549;
 35519                e.proportional = 713;
 35520                e.partialdiff = 494;
 35521                e.bullet = 460;
 35522                e.divide = 549;
 35523                e.notequal = 549;
 35524                e.equivalence = 549;
 35525                e.approxequal = 549;
 35526                e.ellipsis = 1e3;
 35527                e.arrowvertex = 603;
 35528                e.arrowhorizex = 1e3;
 35529                e.carriagereturn = 658;
 35530                e.aleph = 823;
 35531                e.Ifraktur = 686;
 35532                e.Rfraktur = 795;
 35533                e.weierstrass = 987;
 35534                e.circlemultiply = 768;
 35535                e.circleplus = 768;
 35536                e.emptyset = 823;
 35537                e.intersection = 768;
 35538                e.union = 768;
 35539                e.propersuperset = 713;
 35540                e.reflexsuperset = 713;
 35541                e.notsubset = 713;
 35542                e.propersubset = 713;
 35543                e.reflexsubset = 713;
 35544                e.element = 713;
 35545                e.notelement = 713;
 35546                e.angle = 768;
 35547                e.gradient = 713;
 35548                e.registerserif = 790;
 35549                e.copyrightserif = 790;
 35550                e.trademarkserif = 890;
 35551                e.product = 823;
 35552                e.radical = 549;
 35553                e.dotmath = 250;
 35554                e.logicalnot = 713;
 35555                e.logicaland = 603;
 35556                e.logicalor = 603;
 35557                e.arrowdblboth = 1042;
 35558                e.arrowdblleft = 987;
 35559                e.arrowdblup = 603;
 35560                e.arrowdblright = 987;
 35561                e.arrowdbldown = 603;
 35562                e.lozenge = 494;
 35563                e.angleleft = 329;
 35564                e.registersans = 790;
 35565                e.copyrightsans = 790;
 35566                e.trademarksans = 786;
 35567                e.summation = 713;
 35568                e.parenlefttp = 384;
 35569                e.parenleftex = 384;
 35570                e.parenleftbt = 384;
 35571                e.bracketlefttp = 384;
 35572                e.bracketleftex = 384;
 35573                e.bracketleftbt = 384;
 35574                e.bracelefttp = 494;
 35575                e.braceleftmid = 494;
 35576                e.braceleftbt = 494;
 35577                e.braceex = 494;
 35578                e.angleright = 329;
 35579                e.integral = 274;
 35580                e.integraltp = 686;
 35581                e.integralex = 686;
 35582                e.integralbt = 686;
 35583                e.parenrighttp = 384;
 35584                e.parenrightex = 384;
 35585                e.parenrightbt = 384;
 35586                e.bracketrighttp = 384;
 35587                e.bracketrightex = 384;
 35588                e.bracketrightbt = 384;
 35589                e.bracerighttp = 494;
 35590                e.bracerightmid = 494;
 35591                e.bracerightbt = 494;
 35592                e.apple = 790;
 35593              });
 35594              e["Times-Roman"] = (0, r.getLookupTableFactory)(function (e) {
 35595                e.space = 250;
 35596                e.exclam = 333;
 35597                e.quotedbl = 408;
 35598                e.numbersign = 500;
 35599                e.dollar = 500;
 35600                e.percent = 833;
 35601                e.ampersand = 778;
 35602                e.quoteright = 333;
 35603                e.parenleft = 333;
 35604                e.parenright = 333;
 35605                e.asterisk = 500;
 35606                e.plus = 564;
 35607                e.comma = 250;
 35608                e.hyphen = 333;
 35609                e.period = 250;
 35610                e.slash = 278;
 35611                e.zero = 500;
 35612                e.one = 500;
 35613                e.two = 500;
 35614                e.three = 500;
 35615                e.four = 500;
 35616                e.five = 500;
 35617                e.six = 500;
 35618                e.seven = 500;
 35619                e.eight = 500;
 35620                e.nine = 500;
 35621                e.colon = 278;
 35622                e.semicolon = 278;
 35623                e.less = 564;
 35624                e.equal = 564;
 35625                e.greater = 564;
 35626                e.question = 444;
 35627                e.at = 921;
 35628                e.A = 722;
 35629                e.B = 667;
 35630                e.C = 667;
 35631                e.D = 722;
 35632                e.E = 611;
 35633                e.F = 556;
 35634                e.G = 722;
 35635                e.H = 722;
 35636                e.I = 333;
 35637                e.J = 389;
 35638                e.K = 722;
 35639                e.L = 611;
 35640                e.M = 889;
 35641                e.N = 722;
 35642                e.O = 722;
 35643                e.P = 556;
 35644                e.Q = 722;
 35645                e.R = 667;
 35646                e.S = 556;
 35647                e.T = 611;
 35648                e.U = 722;
 35649                e.V = 722;
 35650                e.W = 944;
 35651                e.X = 722;
 35652                e.Y = 722;
 35653                e.Z = 611;
 35654                e.bracketleft = 333;
 35655                e.backslash = 278;
 35656                e.bracketright = 333;
 35657                e.asciicircum = 469;
 35658                e.underscore = 500;
 35659                e.quoteleft = 333;
 35660                e.a = 444;
 35661                e.b = 500;
 35662                e.c = 444;
 35663                e.d = 500;
 35664                e.e = 444;
 35665                e.f = 333;
 35666                e.g = 500;
 35667                e.h = 500;
 35668                e.i = 278;
 35669                e.j = 278;
 35670                e.k = 500;
 35671                e.l = 278;
 35672                e.m = 778;
 35673                e.n = 500;
 35674                e.o = 500;
 35675                e.p = 500;
 35676                e.q = 500;
 35677                e.r = 333;
 35678                e.s = 389;
 35679                e.t = 278;
 35680                e.u = 500;
 35681                e.v = 500;
 35682                e.w = 722;
 35683                e.x = 500;
 35684                e.y = 500;
 35685                e.z = 444;
 35686                e.braceleft = 480;
 35687                e.bar = 200;
 35688                e.braceright = 480;
 35689                e.asciitilde = 541;
 35690                e.exclamdown = 333;
 35691                e.cent = 500;
 35692                e.sterling = 500;
 35693                e.fraction = 167;
 35694                e.yen = 500;
 35695                e.florin = 500;
 35696                e.section = 500;
 35697                e.currency = 500;
 35698                e.quotesingle = 180;
 35699                e.quotedblleft = 444;
 35700                e.guillemotleft = 500;
 35701                e.guilsinglleft = 333;
 35702                e.guilsinglright = 333;
 35703                e.fi = 556;
 35704                e.fl = 556;
 35705                e.endash = 500;
 35706                e.dagger = 500;
 35707                e.daggerdbl = 500;
 35708                e.periodcentered = 250;
 35709                e.paragraph = 453;
 35710                e.bullet = 350;
 35711                e.quotesinglbase = 333;
 35712                e.quotedblbase = 444;
 35713                e.quotedblright = 444;
 35714                e.guillemotright = 500;
 35715                e.ellipsis = 1e3;
 35716                e.perthousand = 1e3;
 35717                e.questiondown = 444;
 35718                e.grave = 333;
 35719                e.acute = 333;
 35720                e.circumflex = 333;
 35721                e.tilde = 333;
 35722                e.macron = 333;
 35723                e.breve = 333;
 35724                e.dotaccent = 333;
 35725                e.dieresis = 333;
 35726                e.ring = 333;
 35727                e.cedilla = 333;
 35728                e.hungarumlaut = 333;
 35729                e.ogonek = 333;
 35730                e.caron = 333;
 35731                e.emdash = 1e3;
 35732                e.AE = 889;
 35733                e.ordfeminine = 276;
 35734                e.Lslash = 611;
 35735                e.Oslash = 722;
 35736                e.OE = 889;
 35737                e.ordmasculine = 310;
 35738                e.ae = 667;
 35739                e.dotlessi = 278;
 35740                e.lslash = 278;
 35741                e.oslash = 500;
 35742                e.oe = 722;
 35743                e.germandbls = 500;
 35744                e.Idieresis = 333;
 35745                e.eacute = 444;
 35746                e.abreve = 444;
 35747                e.uhungarumlaut = 500;
 35748                e.ecaron = 444;
 35749                e.Ydieresis = 722;
 35750                e.divide = 564;
 35751                e.Yacute = 722;
 35752                e.Acircumflex = 722;
 35753                e.aacute = 444;
 35754                e.Ucircumflex = 722;
 35755                e.yacute = 500;
 35756                e.scommaaccent = 389;
 35757                e.ecircumflex = 444;
 35758                e.Uring = 722;
 35759                e.Udieresis = 722;
 35760                e.aogonek = 444;
 35761                e.Uacute = 722;
 35762                e.uogonek = 500;
 35763                e.Edieresis = 611;
 35764                e.Dcroat = 722;
 35765                e.commaaccent = 250;
 35766                e.copyright = 760;
 35767                e.Emacron = 611;
 35768                e.ccaron = 444;
 35769                e.aring = 444;
 35770                e.Ncommaaccent = 722;
 35771                e.lacute = 278;
 35772                e.agrave = 444;
 35773                e.Tcommaaccent = 611;
 35774                e.Cacute = 667;
 35775                e.atilde = 444;
 35776                e.Edotaccent = 611;
 35777                e.scaron = 389;
 35778                e.scedilla = 389;
 35779                e.iacute = 278;
 35780                e.lozenge = 471;
 35781                e.Rcaron = 667;
 35782                e.Gcommaaccent = 722;
 35783                e.ucircumflex = 500;
 35784                e.acircumflex = 444;
 35785                e.Amacron = 722;
 35786                e.rcaron = 333;
 35787                e.ccedilla = 444;
 35788                e.Zdotaccent = 611;
 35789                e.Thorn = 556;
 35790                e.Omacron = 722;
 35791                e.Racute = 667;
 35792                e.Sacute = 556;
 35793                e.dcaron = 588;
 35794                e.Umacron = 722;
 35795                e.uring = 500;
 35796                e.threesuperior = 300;
 35797                e.Ograve = 722;
 35798                e.Agrave = 722;
 35799                e.Abreve = 722;
 35800                e.multiply = 564;
 35801                e.uacute = 500;
 35802                e.Tcaron = 611;
 35803                e.partialdiff = 476;
 35804                e.ydieresis = 500;
 35805                e.Nacute = 722;
 35806                e.icircumflex = 278;
 35807                e.Ecircumflex = 611;
 35808                e.adieresis = 444;
 35809                e.edieresis = 444;
 35810                e.cacute = 444;
 35811                e.nacute = 500;
 35812                e.umacron = 500;
 35813                e.Ncaron = 722;
 35814                e.Iacute = 333;
 35815                e.plusminus = 564;
 35816                e.brokenbar = 200;
 35817                e.registered = 760;
 35818                e.Gbreve = 722;
 35819                e.Idotaccent = 333;
 35820                e.summation = 600;
 35821                e.Egrave = 611;
 35822                e.racute = 333;
 35823                e.omacron = 500;
 35824                e.Zacute = 611;
 35825                e.Zcaron = 611;
 35826                e.greaterequal = 549;
 35827                e.Eth = 722;
 35828                e.Ccedilla = 667;
 35829                e.lcommaaccent = 278;
 35830                e.tcaron = 326;
 35831                e.eogonek = 444;
 35832                e.Uogonek = 722;
 35833                e.Aacute = 722;
 35834                e.Adieresis = 722;
 35835                e.egrave = 444;
 35836                e.zacute = 444;
 35837                e.iogonek = 278;
 35838                e.Oacute = 722;
 35839                e.oacute = 500;
 35840                e.amacron = 444;
 35841                e.sacute = 389;
 35842                e.idieresis = 278;
 35843                e.Ocircumflex = 722;
 35844                e.Ugrave = 722;
 35845                e.Delta = 612;
 35846                e.thorn = 500;
 35847                e.twosuperior = 300;
 35848                e.Odieresis = 722;
 35849                e.mu = 500;
 35850                e.igrave = 278;
 35851                e.ohungarumlaut = 500;
 35852                e.Eogonek = 611;
 35853                e.dcroat = 500;
 35854                e.threequarters = 750;
 35855                e.Scedilla = 556;
 35856                e.lcaron = 344;
 35857                e.Kcommaaccent = 722;
 35858                e.Lacute = 611;
 35859                e.trademark = 980;
 35860                e.edotaccent = 444;
 35861                e.Igrave = 333;
 35862                e.Imacron = 333;
 35863                e.Lcaron = 611;
 35864                e.onehalf = 750;
 35865                e.lessequal = 549;
 35866                e.ocircumflex = 500;
 35867                e.ntilde = 500;
 35868                e.Uhungarumlaut = 722;
 35869                e.Eacute = 611;
 35870                e.emacron = 444;
 35871                e.gbreve = 500;
 35872                e.onequarter = 750;
 35873                e.Scaron = 556;
 35874                e.Scommaaccent = 556;
 35875                e.Ohungarumlaut = 722;
 35876                e.degree = 400;
 35877                e.ograve = 500;
 35878                e.Ccaron = 667;
 35879                e.ugrave = 500;
 35880                e.radical = 453;
 35881                e.Dcaron = 722;
 35882                e.rcommaaccent = 333;
 35883                e.Ntilde = 722;
 35884                e.otilde = 500;
 35885                e.Rcommaaccent = 667;
 35886                e.Lcommaaccent = 611;
 35887                e.Atilde = 722;
 35888                e.Aogonek = 722;
 35889                e.Aring = 722;
 35890                e.Otilde = 722;
 35891                e.zdotaccent = 444;
 35892                e.Ecaron = 611;
 35893                e.Iogonek = 333;
 35894                e.kcommaaccent = 500;
 35895                e.minus = 564;
 35896                e.Icircumflex = 333;
 35897                e.ncaron = 500;
 35898                e.tcommaaccent = 278;
 35899                e.logicalnot = 564;
 35900                e.odieresis = 500;
 35901                e.udieresis = 500;
 35902                e.notequal = 549;
 35903                e.gcommaaccent = 500;
 35904                e.eth = 500;
 35905                e.zcaron = 444;
 35906                e.ncommaaccent = 500;
 35907                e.onesuperior = 300;
 35908                e.imacron = 278;
 35909                e.Euro = 500;
 35910              });
 35911              e["Times-Bold"] = (0, r.getLookupTableFactory)(function (e) {
 35912                e.space = 250;
 35913                e.exclam = 333;
 35914                e.quotedbl = 555;
 35915                e.numbersign = 500;
 35916                e.dollar = 500;
 35917                e.percent = 1e3;
 35918                e.ampersand = 833;
 35919                e.quoteright = 333;
 35920                e.parenleft = 333;
 35921                e.parenright = 333;
 35922                e.asterisk = 500;
 35923                e.plus = 570;
 35924                e.comma = 250;
 35925                e.hyphen = 333;
 35926                e.period = 250;
 35927                e.slash = 278;
 35928                e.zero = 500;
 35929                e.one = 500;
 35930                e.two = 500;
 35931                e.three = 500;
 35932                e.four = 500;
 35933                e.five = 500;
 35934                e.six = 500;
 35935                e.seven = 500;
 35936                e.eight = 500;
 35937                e.nine = 500;
 35938                e.colon = 333;
 35939                e.semicolon = 333;
 35940                e.less = 570;
 35941                e.equal = 570;
 35942                e.greater = 570;
 35943                e.question = 500;
 35944                e.at = 930;
 35945                e.A = 722;
 35946                e.B = 667;
 35947                e.C = 722;
 35948                e.D = 722;
 35949                e.E = 667;
 35950                e.F = 611;
 35951                e.G = 778;
 35952                e.H = 778;
 35953                e.I = 389;
 35954                e.J = 500;
 35955                e.K = 778;
 35956                e.L = 667;
 35957                e.M = 944;
 35958                e.N = 722;
 35959                e.O = 778;
 35960                e.P = 611;
 35961                e.Q = 778;
 35962                e.R = 722;
 35963                e.S = 556;
 35964                e.T = 667;
 35965                e.U = 722;
 35966                e.V = 722;
 35967                e.W = 1e3;
 35968                e.X = 722;
 35969                e.Y = 722;
 35970                e.Z = 667;
 35971                e.bracketleft = 333;
 35972                e.backslash = 278;
 35973                e.bracketright = 333;
 35974                e.asciicircum = 581;
 35975                e.underscore = 500;
 35976                e.quoteleft = 333;
 35977                e.a = 500;
 35978                e.b = 556;
 35979                e.c = 444;
 35980                e.d = 556;
 35981                e.e = 444;
 35982                e.f = 333;
 35983                e.g = 500;
 35984                e.h = 556;
 35985                e.i = 278;
 35986                e.j = 333;
 35987                e.k = 556;
 35988                e.l = 278;
 35989                e.m = 833;
 35990                e.n = 556;
 35991                e.o = 500;
 35992                e.p = 556;
 35993                e.q = 556;
 35994                e.r = 444;
 35995                e.s = 389;
 35996                e.t = 333;
 35997                e.u = 556;
 35998                e.v = 500;
 35999                e.w = 722;
 36000                e.x = 500;
 36001                e.y = 500;
 36002                e.z = 444;
 36003                e.braceleft = 394;
 36004                e.bar = 220;
 36005                e.braceright = 394;
 36006                e.asciitilde = 520;
 36007                e.exclamdown = 333;
 36008                e.cent = 500;
 36009                e.sterling = 500;
 36010                e.fraction = 167;
 36011                e.yen = 500;
 36012                e.florin = 500;
 36013                e.section = 500;
 36014                e.currency = 500;
 36015                e.quotesingle = 278;
 36016                e.quotedblleft = 500;
 36017                e.guillemotleft = 500;
 36018                e.guilsinglleft = 333;
 36019                e.guilsinglright = 333;
 36020                e.fi = 556;
 36021                e.fl = 556;
 36022                e.endash = 500;
 36023                e.dagger = 500;
 36024                e.daggerdbl = 500;
 36025                e.periodcentered = 250;
 36026                e.paragraph = 540;
 36027                e.bullet = 350;
 36028                e.quotesinglbase = 333;
 36029                e.quotedblbase = 500;
 36030                e.quotedblright = 500;
 36031                e.guillemotright = 500;
 36032                e.ellipsis = 1e3;
 36033                e.perthousand = 1e3;
 36034                e.questiondown = 500;
 36035                e.grave = 333;
 36036                e.acute = 333;
 36037                e.circumflex = 333;
 36038                e.tilde = 333;
 36039                e.macron = 333;
 36040                e.breve = 333;
 36041                e.dotaccent = 333;
 36042                e.dieresis = 333;
 36043                e.ring = 333;
 36044                e.cedilla = 333;
 36045                e.hungarumlaut = 333;
 36046                e.ogonek = 333;
 36047                e.caron = 333;
 36048                e.emdash = 1e3;
 36049                e.AE = 1e3;
 36050                e.ordfeminine = 300;
 36051                e.Lslash = 667;
 36052                e.Oslash = 778;
 36053                e.OE = 1e3;
 36054                e.ordmasculine = 330;
 36055                e.ae = 722;
 36056                e.dotlessi = 278;
 36057                e.lslash = 278;
 36058                e.oslash = 500;
 36059                e.oe = 722;
 36060                e.germandbls = 556;
 36061                e.Idieresis = 389;
 36062                e.eacute = 444;
 36063                e.abreve = 500;
 36064                e.uhungarumlaut = 556;
 36065                e.ecaron = 444;
 36066                e.Ydieresis = 722;
 36067                e.divide = 570;
 36068                e.Yacute = 722;
 36069                e.Acircumflex = 722;
 36070                e.aacute = 500;
 36071                e.Ucircumflex = 722;
 36072                e.yacute = 500;
 36073                e.scommaaccent = 389;
 36074                e.ecircumflex = 444;
 36075                e.Uring = 722;
 36076                e.Udieresis = 722;
 36077                e.aogonek = 500;
 36078                e.Uacute = 722;
 36079                e.uogonek = 556;
 36080                e.Edieresis = 667;
 36081                e.Dcroat = 722;
 36082                e.commaaccent = 250;
 36083                e.copyright = 747;
 36084                e.Emacron = 667;
 36085                e.ccaron = 444;
 36086                e.aring = 500;
 36087                e.Ncommaaccent = 722;
 36088                e.lacute = 278;
 36089                e.agrave = 500;
 36090                e.Tcommaaccent = 667;
 36091                e.Cacute = 722;
 36092                e.atilde = 500;
 36093                e.Edotaccent = 667;
 36094                e.scaron = 389;
 36095                e.scedilla = 389;
 36096                e.iacute = 278;
 36097                e.lozenge = 494;
 36098                e.Rcaron = 722;
 36099                e.Gcommaaccent = 778;
 36100                e.ucircumflex = 556;
 36101                e.acircumflex = 500;
 36102                e.Amacron = 722;
 36103                e.rcaron = 444;
 36104                e.ccedilla = 444;
 36105                e.Zdotaccent = 667;
 36106                e.Thorn = 611;
 36107                e.Omacron = 778;
 36108                e.Racute = 722;
 36109                e.Sacute = 556;
 36110                e.dcaron = 672;
 36111                e.Umacron = 722;
 36112                e.uring = 556;
 36113                e.threesuperior = 300;
 36114                e.Ograve = 778;
 36115                e.Agrave = 722;
 36116                e.Abreve = 722;
 36117                e.multiply = 570;
 36118                e.uacute = 556;
 36119                e.Tcaron = 667;
 36120                e.partialdiff = 494;
 36121                e.ydieresis = 500;
 36122                e.Nacute = 722;
 36123                e.icircumflex = 278;
 36124                e.Ecircumflex = 667;
 36125                e.adieresis = 500;
 36126                e.edieresis = 444;
 36127                e.cacute = 444;
 36128                e.nacute = 556;
 36129                e.umacron = 556;
 36130                e.Ncaron = 722;
 36131                e.Iacute = 389;
 36132                e.plusminus = 570;
 36133                e.brokenbar = 220;
 36134                e.registered = 747;
 36135                e.Gbreve = 778;
 36136                e.Idotaccent = 389;
 36137                e.summation = 600;
 36138                e.Egrave = 667;
 36139                e.racute = 444;
 36140                e.omacron = 500;
 36141                e.Zacute = 667;
 36142                e.Zcaron = 667;
 36143                e.greaterequal = 549;
 36144                e.Eth = 722;
 36145                e.Ccedilla = 722;
 36146                e.lcommaaccent = 278;
 36147                e.tcaron = 416;
 36148                e.eogonek = 444;
 36149                e.Uogonek = 722;
 36150                e.Aacute = 722;
 36151                e.Adieresis = 722;
 36152                e.egrave = 444;
 36153                e.zacute = 444;
 36154                e.iogonek = 278;
 36155                e.Oacute = 778;
 36156                e.oacute = 500;
 36157                e.amacron = 500;
 36158                e.sacute = 389;
 36159                e.idieresis = 278;
 36160                e.Ocircumflex = 778;
 36161                e.Ugrave = 722;
 36162                e.Delta = 612;
 36163                e.thorn = 556;
 36164                e.twosuperior = 300;
 36165                e.Odieresis = 778;
 36166                e.mu = 556;
 36167                e.igrave = 278;
 36168                e.ohungarumlaut = 500;
 36169                e.Eogonek = 667;
 36170                e.dcroat = 556;
 36171                e.threequarters = 750;
 36172                e.Scedilla = 556;
 36173                e.lcaron = 394;
 36174                e.Kcommaaccent = 778;
 36175                e.Lacute = 667;
 36176                e.trademark = 1e3;
 36177                e.edotaccent = 444;
 36178                e.Igrave = 389;
 36179                e.Imacron = 389;
 36180                e.Lcaron = 667;
 36181                e.onehalf = 750;
 36182                e.lessequal = 549;
 36183                e.ocircumflex = 500;
 36184                e.ntilde = 556;
 36185                e.Uhungarumlaut = 722;
 36186                e.Eacute = 667;
 36187                e.emacron = 444;
 36188                e.gbreve = 500;
 36189                e.onequarter = 750;
 36190                e.Scaron = 556;
 36191                e.Scommaaccent = 556;
 36192                e.Ohungarumlaut = 778;
 36193                e.degree = 400;
 36194                e.ograve = 500;
 36195                e.Ccaron = 722;
 36196                e.ugrave = 556;
 36197                e.radical = 549;
 36198                e.Dcaron = 722;
 36199                e.rcommaaccent = 444;
 36200                e.Ntilde = 722;
 36201                e.otilde = 500;
 36202                e.Rcommaaccent = 722;
 36203                e.Lcommaaccent = 667;
 36204                e.Atilde = 722;
 36205                e.Aogonek = 722;
 36206                e.Aring = 722;
 36207                e.Otilde = 778;
 36208                e.zdotaccent = 444;
 36209                e.Ecaron = 667;
 36210                e.Iogonek = 389;
 36211                e.kcommaaccent = 556;
 36212                e.minus = 570;
 36213                e.Icircumflex = 389;
 36214                e.ncaron = 556;
 36215                e.tcommaaccent = 333;
 36216                e.logicalnot = 570;
 36217                e.odieresis = 500;
 36218                e.udieresis = 556;
 36219                e.notequal = 549;
 36220                e.gcommaaccent = 500;
 36221                e.eth = 500;
 36222                e.zcaron = 444;
 36223                e.ncommaaccent = 556;
 36224                e.onesuperior = 300;
 36225                e.imacron = 278;
 36226                e.Euro = 500;
 36227              });
 36228              e["Times-BoldItalic"] = (0, r.getLookupTableFactory)(function (e) {
 36229                e.space = 250;
 36230                e.exclam = 389;
 36231                e.quotedbl = 555;
 36232                e.numbersign = 500;
 36233                e.dollar = 500;
 36234                e.percent = 833;
 36235                e.ampersand = 778;
 36236                e.quoteright = 333;
 36237                e.parenleft = 333;
 36238                e.parenright = 333;
 36239                e.asterisk = 500;
 36240                e.plus = 570;
 36241                e.comma = 250;
 36242                e.hyphen = 333;
 36243                e.period = 250;
 36244                e.slash = 278;
 36245                e.zero = 500;
 36246                e.one = 500;
 36247                e.two = 500;
 36248                e.three = 500;
 36249                e.four = 500;
 36250                e.five = 500;
 36251                e.six = 500;
 36252                e.seven = 500;
 36253                e.eight = 500;
 36254                e.nine = 500;
 36255                e.colon = 333;
 36256                e.semicolon = 333;
 36257                e.less = 570;
 36258                e.equal = 570;
 36259                e.greater = 570;
 36260                e.question = 500;
 36261                e.at = 832;
 36262                e.A = 667;
 36263                e.B = 667;
 36264                e.C = 667;
 36265                e.D = 722;
 36266                e.E = 667;
 36267                e.F = 667;
 36268                e.G = 722;
 36269                e.H = 778;
 36270                e.I = 389;
 36271                e.J = 500;
 36272                e.K = 667;
 36273                e.L = 611;
 36274                e.M = 889;
 36275                e.N = 722;
 36276                e.O = 722;
 36277                e.P = 611;
 36278                e.Q = 722;
 36279                e.R = 667;
 36280                e.S = 556;
 36281                e.T = 611;
 36282                e.U = 722;
 36283                e.V = 667;
 36284                e.W = 889;
 36285                e.X = 667;
 36286                e.Y = 611;
 36287                e.Z = 611;
 36288                e.bracketleft = 333;
 36289                e.backslash = 278;
 36290                e.bracketright = 333;
 36291                e.asciicircum = 570;
 36292                e.underscore = 500;
 36293                e.quoteleft = 333;
 36294                e.a = 500;
 36295                e.b = 500;
 36296                e.c = 444;
 36297                e.d = 500;
 36298                e.e = 444;
 36299                e.f = 333;
 36300                e.g = 500;
 36301                e.h = 556;
 36302                e.i = 278;
 36303                e.j = 278;
 36304                e.k = 500;
 36305                e.l = 278;
 36306                e.m = 778;
 36307                e.n = 556;
 36308                e.o = 500;
 36309                e.p = 500;
 36310                e.q = 500;
 36311                e.r = 389;
 36312                e.s = 389;
 36313                e.t = 278;
 36314                e.u = 556;
 36315                e.v = 444;
 36316                e.w = 667;
 36317                e.x = 500;
 36318                e.y = 444;
 36319                e.z = 389;
 36320                e.braceleft = 348;
 36321                e.bar = 220;
 36322                e.braceright = 348;
 36323                e.asciitilde = 570;
 36324                e.exclamdown = 389;
 36325                e.cent = 500;
 36326                e.sterling = 500;
 36327                e.fraction = 167;
 36328                e.yen = 500;
 36329                e.florin = 500;
 36330                e.section = 500;
 36331                e.currency = 500;
 36332                e.quotesingle = 278;
 36333                e.quotedblleft = 500;
 36334                e.guillemotleft = 500;
 36335                e.guilsinglleft = 333;
 36336                e.guilsinglright = 333;
 36337                e.fi = 556;
 36338                e.fl = 556;
 36339                e.endash = 500;
 36340                e.dagger = 500;
 36341                e.daggerdbl = 500;
 36342                e.periodcentered = 250;
 36343                e.paragraph = 500;
 36344                e.bullet = 350;
 36345                e.quotesinglbase = 333;
 36346                e.quotedblbase = 500;
 36347                e.quotedblright = 500;
 36348                e.guillemotright = 500;
 36349                e.ellipsis = 1e3;
 36350                e.perthousand = 1e3;
 36351                e.questiondown = 500;
 36352                e.grave = 333;
 36353                e.acute = 333;
 36354                e.circumflex = 333;
 36355                e.tilde = 333;
 36356                e.macron = 333;
 36357                e.breve = 333;
 36358                e.dotaccent = 333;
 36359                e.dieresis = 333;
 36360                e.ring = 333;
 36361                e.cedilla = 333;
 36362                e.hungarumlaut = 333;
 36363                e.ogonek = 333;
 36364                e.caron = 333;
 36365                e.emdash = 1e3;
 36366                e.AE = 944;
 36367                e.ordfeminine = 266;
 36368                e.Lslash = 611;
 36369                e.Oslash = 722;
 36370                e.OE = 944;
 36371                e.ordmasculine = 300;
 36372                e.ae = 722;
 36373                e.dotlessi = 278;
 36374                e.lslash = 278;
 36375                e.oslash = 500;
 36376                e.oe = 722;
 36377                e.germandbls = 500;
 36378                e.Idieresis = 389;
 36379                e.eacute = 444;
 36380                e.abreve = 500;
 36381                e.uhungarumlaut = 556;
 36382                e.ecaron = 444;
 36383                e.Ydieresis = 611;
 36384                e.divide = 570;
 36385                e.Yacute = 611;
 36386                e.Acircumflex = 667;
 36387                e.aacute = 500;
 36388                e.Ucircumflex = 722;
 36389                e.yacute = 444;
 36390                e.scommaaccent = 389;
 36391                e.ecircumflex = 444;
 36392                e.Uring = 722;
 36393                e.Udieresis = 722;
 36394                e.aogonek = 500;
 36395                e.Uacute = 722;
 36396                e.uogonek = 556;
 36397                e.Edieresis = 667;
 36398                e.Dcroat = 722;
 36399                e.commaaccent = 250;
 36400                e.copyright = 747;
 36401                e.Emacron = 667;
 36402                e.ccaron = 444;
 36403                e.aring = 500;
 36404                e.Ncommaaccent = 722;
 36405                e.lacute = 278;
 36406                e.agrave = 500;
 36407                e.Tcommaaccent = 611;
 36408                e.Cacute = 667;
 36409                e.atilde = 500;
 36410                e.Edotaccent = 667;
 36411                e.scaron = 389;
 36412                e.scedilla = 389;
 36413                e.iacute = 278;
 36414                e.lozenge = 494;
 36415                e.Rcaron = 667;
 36416                e.Gcommaaccent = 722;
 36417                e.ucircumflex = 556;
 36418                e.acircumflex = 500;
 36419                e.Amacron = 667;
 36420                e.rcaron = 389;
 36421                e.ccedilla = 444;
 36422                e.Zdotaccent = 611;
 36423                e.Thorn = 611;
 36424                e.Omacron = 722;
 36425                e.Racute = 667;
 36426                e.Sacute = 556;
 36427                e.dcaron = 608;
 36428                e.Umacron = 722;
 36429                e.uring = 556;
 36430                e.threesuperior = 300;
 36431                e.Ograve = 722;
 36432                e.Agrave = 667;
 36433                e.Abreve = 667;
 36434                e.multiply = 570;
 36435                e.uacute = 556;
 36436                e.Tcaron = 611;
 36437                e.partialdiff = 494;
 36438                e.ydieresis = 444;
 36439                e.Nacute = 722;
 36440                e.icircumflex = 278;
 36441                e.Ecircumflex = 667;
 36442                e.adieresis = 500;
 36443                e.edieresis = 444;
 36444                e.cacute = 444;
 36445                e.nacute = 556;
 36446                e.umacron = 556;
 36447                e.Ncaron = 722;
 36448                e.Iacute = 389;
 36449                e.plusminus = 570;
 36450                e.brokenbar = 220;
 36451                e.registered = 747;
 36452                e.Gbreve = 722;
 36453                e.Idotaccent = 389;
 36454                e.summation = 600;
 36455                e.Egrave = 667;
 36456                e.racute = 389;
 36457                e.omacron = 500;
 36458                e.Zacute = 611;
 36459                e.Zcaron = 611;
 36460                e.greaterequal = 549;
 36461                e.Eth = 722;
 36462                e.Ccedilla = 667;
 36463                e.lcommaaccent = 278;
 36464                e.tcaron = 366;
 36465                e.eogonek = 444;
 36466                e.Uogonek = 722;
 36467                e.Aacute = 667;
 36468                e.Adieresis = 667;
 36469                e.egrave = 444;
 36470                e.zacute = 389;
 36471                e.iogonek = 278;
 36472                e.Oacute = 722;
 36473                e.oacute = 500;
 36474                e.amacron = 500;
 36475                e.sacute = 389;
 36476                e.idieresis = 278;
 36477                e.Ocircumflex = 722;
 36478                e.Ugrave = 722;
 36479                e.Delta = 612;
 36480                e.thorn = 500;
 36481                e.twosuperior = 300;
 36482                e.Odieresis = 722;
 36483                e.mu = 576;
 36484                e.igrave = 278;
 36485                e.ohungarumlaut = 500;
 36486                e.Eogonek = 667;
 36487                e.dcroat = 500;
 36488                e.threequarters = 750;
 36489                e.Scedilla = 556;
 36490                e.lcaron = 382;
 36491                e.Kcommaaccent = 667;
 36492                e.Lacute = 611;
 36493                e.trademark = 1e3;
 36494                e.edotaccent = 444;
 36495                e.Igrave = 389;
 36496                e.Imacron = 389;
 36497                e.Lcaron = 611;
 36498                e.onehalf = 750;
 36499                e.lessequal = 549;
 36500                e.ocircumflex = 500;
 36501                e.ntilde = 556;
 36502                e.Uhungarumlaut = 722;
 36503                e.Eacute = 667;
 36504                e.emacron = 444;
 36505                e.gbreve = 500;
 36506                e.onequarter = 750;
 36507                e.Scaron = 556;
 36508                e.Scommaaccent = 556;
 36509                e.Ohungarumlaut = 722;
 36510                e.degree = 400;
 36511                e.ograve = 500;
 36512                e.Ccaron = 667;
 36513                e.ugrave = 556;
 36514                e.radical = 549;
 36515                e.Dcaron = 722;
 36516                e.rcommaaccent = 389;
 36517                e.Ntilde = 722;
 36518                e.otilde = 500;
 36519                e.Rcommaaccent = 667;
 36520                e.Lcommaaccent = 611;
 36521                e.Atilde = 667;
 36522                e.Aogonek = 667;
 36523                e.Aring = 667;
 36524                e.Otilde = 722;
 36525                e.zdotaccent = 389;
 36526                e.Ecaron = 667;
 36527                e.Iogonek = 389;
 36528                e.kcommaaccent = 500;
 36529                e.minus = 606;
 36530                e.Icircumflex = 389;
 36531                e.ncaron = 556;
 36532                e.tcommaaccent = 278;
 36533                e.logicalnot = 606;
 36534                e.odieresis = 500;
 36535                e.udieresis = 556;
 36536                e.notequal = 549;
 36537                e.gcommaaccent = 500;
 36538                e.eth = 500;
 36539                e.zcaron = 389;
 36540                e.ncommaaccent = 556;
 36541                e.onesuperior = 300;
 36542                e.imacron = 278;
 36543                e.Euro = 500;
 36544              });
 36545              e["Times-Italic"] = (0, r.getLookupTableFactory)(function (e) {
 36546                e.space = 250;
 36547                e.exclam = 333;
 36548                e.quotedbl = 420;
 36549                e.numbersign = 500;
 36550                e.dollar = 500;
 36551                e.percent = 833;
 36552                e.ampersand = 778;
 36553                e.quoteright = 333;
 36554                e.parenleft = 333;
 36555                e.parenright = 333;
 36556                e.asterisk = 500;
 36557                e.plus = 675;
 36558                e.comma = 250;
 36559                e.hyphen = 333;
 36560                e.period = 250;
 36561                e.slash = 278;
 36562                e.zero = 500;
 36563                e.one = 500;
 36564                e.two = 500;
 36565                e.three = 500;
 36566                e.four = 500;
 36567                e.five = 500;
 36568                e.six = 500;
 36569                e.seven = 500;
 36570                e.eight = 500;
 36571                e.nine = 500;
 36572                e.colon = 333;
 36573                e.semicolon = 333;
 36574                e.less = 675;
 36575                e.equal = 675;
 36576                e.greater = 675;
 36577                e.question = 500;
 36578                e.at = 920;
 36579                e.A = 611;
 36580                e.B = 611;
 36581                e.C = 667;
 36582                e.D = 722;
 36583                e.E = 611;
 36584                e.F = 611;
 36585                e.G = 722;
 36586                e.H = 722;
 36587                e.I = 333;
 36588                e.J = 444;
 36589                e.K = 667;
 36590                e.L = 556;
 36591                e.M = 833;
 36592                e.N = 667;
 36593                e.O = 722;
 36594                e.P = 611;
 36595                e.Q = 722;
 36596                e.R = 611;
 36597                e.S = 500;
 36598                e.T = 556;
 36599                e.U = 722;
 36600                e.V = 611;
 36601                e.W = 833;
 36602                e.X = 611;
 36603                e.Y = 556;
 36604                e.Z = 556;
 36605                e.bracketleft = 389;
 36606                e.backslash = 278;
 36607                e.bracketright = 389;
 36608                e.asciicircum = 422;
 36609                e.underscore = 500;
 36610                e.quoteleft = 333;
 36611                e.a = 500;
 36612                e.b = 500;
 36613                e.c = 444;
 36614                e.d = 500;
 36615                e.e = 444;
 36616                e.f = 278;
 36617                e.g = 500;
 36618                e.h = 500;
 36619                e.i = 278;
 36620                e.j = 278;
 36621                e.k = 444;
 36622                e.l = 278;
 36623                e.m = 722;
 36624                e.n = 500;
 36625                e.o = 500;
 36626                e.p = 500;
 36627                e.q = 500;
 36628                e.r = 389;
 36629                e.s = 389;
 36630                e.t = 278;
 36631                e.u = 500;
 36632                e.v = 444;
 36633                e.w = 667;
 36634                e.x = 444;
 36635                e.y = 444;
 36636                e.z = 389;
 36637                e.braceleft = 400;
 36638                e.bar = 275;
 36639                e.braceright = 400;
 36640                e.asciitilde = 541;
 36641                e.exclamdown = 389;
 36642                e.cent = 500;
 36643                e.sterling = 500;
 36644                e.fraction = 167;
 36645                e.yen = 500;
 36646                e.florin = 500;
 36647                e.section = 500;
 36648                e.currency = 500;
 36649                e.quotesingle = 214;
 36650                e.quotedblleft = 556;
 36651                e.guillemotleft = 500;
 36652                e.guilsinglleft = 333;
 36653                e.guilsinglright = 333;
 36654                e.fi = 500;
 36655                e.fl = 500;
 36656                e.endash = 500;
 36657                e.dagger = 500;
 36658                e.daggerdbl = 500;
 36659                e.periodcentered = 250;
 36660                e.paragraph = 523;
 36661                e.bullet = 350;
 36662                e.quotesinglbase = 333;
 36663                e.quotedblbase = 556;
 36664                e.quotedblright = 556;
 36665                e.guillemotright = 500;
 36666                e.ellipsis = 889;
 36667                e.perthousand = 1e3;
 36668                e.questiondown = 500;
 36669                e.grave = 333;
 36670                e.acute = 333;
 36671                e.circumflex = 333;
 36672                e.tilde = 333;
 36673                e.macron = 333;
 36674                e.breve = 333;
 36675                e.dotaccent = 333;
 36676                e.dieresis = 333;
 36677                e.ring = 333;
 36678                e.cedilla = 333;
 36679                e.hungarumlaut = 333;
 36680                e.ogonek = 333;
 36681                e.caron = 333;
 36682                e.emdash = 889;
 36683                e.AE = 889;
 36684                e.ordfeminine = 276;
 36685                e.Lslash = 556;
 36686                e.Oslash = 722;
 36687                e.OE = 944;
 36688                e.ordmasculine = 310;
 36689                e.ae = 667;
 36690                e.dotlessi = 278;
 36691                e.lslash = 278;
 36692                e.oslash = 500;
 36693                e.oe = 667;
 36694                e.germandbls = 500;
 36695                e.Idieresis = 333;
 36696                e.eacute = 444;
 36697                e.abreve = 500;
 36698                e.uhungarumlaut = 500;
 36699                e.ecaron = 444;
 36700                e.Ydieresis = 556;
 36701                e.divide = 675;
 36702                e.Yacute = 556;
 36703                e.Acircumflex = 611;
 36704                e.aacute = 500;
 36705                e.Ucircumflex = 722;
 36706                e.yacute = 444;
 36707                e.scommaaccent = 389;
 36708                e.ecircumflex = 444;
 36709                e.Uring = 722;
 36710                e.Udieresis = 722;
 36711                e.aogonek = 500;
 36712                e.Uacute = 722;
 36713                e.uogonek = 500;
 36714                e.Edieresis = 611;
 36715                e.Dcroat = 722;
 36716                e.commaaccent = 250;
 36717                e.copyright = 760;
 36718                e.Emacron = 611;
 36719                e.ccaron = 444;
 36720                e.aring = 500;
 36721                e.Ncommaaccent = 667;
 36722                e.lacute = 278;
 36723                e.agrave = 500;
 36724                e.Tcommaaccent = 556;
 36725                e.Cacute = 667;
 36726                e.atilde = 500;
 36727                e.Edotaccent = 611;
 36728                e.scaron = 389;
 36729                e.scedilla = 389;
 36730                e.iacute = 278;
 36731                e.lozenge = 471;
 36732                e.Rcaron = 611;
 36733                e.Gcommaaccent = 722;
 36734                e.ucircumflex = 500;
 36735                e.acircumflex = 500;
 36736                e.Amacron = 611;
 36737                e.rcaron = 389;
 36738                e.ccedilla = 444;
 36739                e.Zdotaccent = 556;
 36740                e.Thorn = 611;
 36741                e.Omacron = 722;
 36742                e.Racute = 611;
 36743                e.Sacute = 500;
 36744                e.dcaron = 544;
 36745                e.Umacron = 722;
 36746                e.uring = 500;
 36747                e.threesuperior = 300;
 36748                e.Ograve = 722;
 36749                e.Agrave = 611;
 36750                e.Abreve = 611;
 36751                e.multiply = 675;
 36752                e.uacute = 500;
 36753                e.Tcaron = 556;
 36754                e.partialdiff = 476;
 36755                e.ydieresis = 444;
 36756                e.Nacute = 667;
 36757                e.icircumflex = 278;
 36758                e.Ecircumflex = 611;
 36759                e.adieresis = 500;
 36760                e.edieresis = 444;
 36761                e.cacute = 444;
 36762                e.nacute = 500;
 36763                e.umacron = 500;
 36764                e.Ncaron = 667;
 36765                e.Iacute = 333;
 36766                e.plusminus = 675;
 36767                e.brokenbar = 275;
 36768                e.registered = 760;
 36769                e.Gbreve = 722;
 36770                e.Idotaccent = 333;
 36771                e.summation = 600;
 36772                e.Egrave = 611;
 36773                e.racute = 389;
 36774                e.omacron = 500;
 36775                e.Zacute = 556;
 36776                e.Zcaron = 556;
 36777                e.greaterequal = 549;
 36778                e.Eth = 722;
 36779                e.Ccedilla = 667;
 36780                e.lcommaaccent = 278;
 36781                e.tcaron = 300;
 36782                e.eogonek = 444;
 36783                e.Uogonek = 722;
 36784                e.Aacute = 611;
 36785                e.Adieresis = 611;
 36786                e.egrave = 444;
 36787                e.zacute = 389;
 36788                e.iogonek = 278;
 36789                e.Oacute = 722;
 36790                e.oacute = 500;
 36791                e.amacron = 500;
 36792                e.sacute = 389;
 36793                e.idieresis = 278;
 36794                e.Ocircumflex = 722;
 36795                e.Ugrave = 722;
 36796                e.Delta = 612;
 36797                e.thorn = 500;
 36798                e.twosuperior = 300;
 36799                e.Odieresis = 722;
 36800                e.mu = 500;
 36801                e.igrave = 278;
 36802                e.ohungarumlaut = 500;
 36803                e.Eogonek = 611;
 36804                e.dcroat = 500;
 36805                e.threequarters = 750;
 36806                e.Scedilla = 500;
 36807                e.lcaron = 300;
 36808                e.Kcommaaccent = 667;
 36809                e.Lacute = 556;
 36810                e.trademark = 980;
 36811                e.edotaccent = 444;
 36812                e.Igrave = 333;
 36813                e.Imacron = 333;
 36814                e.Lcaron = 611;
 36815                e.onehalf = 750;
 36816                e.lessequal = 549;
 36817                e.ocircumflex = 500;
 36818                e.ntilde = 500;
 36819                e.Uhungarumlaut = 722;
 36820                e.Eacute = 611;
 36821                e.emacron = 444;
 36822                e.gbreve = 500;
 36823                e.onequarter = 750;
 36824                e.Scaron = 500;
 36825                e.Scommaaccent = 500;
 36826                e.Ohungarumlaut = 722;
 36827                e.degree = 400;
 36828                e.ograve = 500;
 36829                e.Ccaron = 667;
 36830                e.ugrave = 500;
 36831                e.radical = 453;
 36832                e.Dcaron = 722;
 36833                e.rcommaaccent = 389;
 36834                e.Ntilde = 667;
 36835                e.otilde = 500;
 36836                e.Rcommaaccent = 611;
 36837                e.Lcommaaccent = 556;
 36838                e.Atilde = 611;
 36839                e.Aogonek = 611;
 36840                e.Aring = 611;
 36841                e.Otilde = 722;
 36842                e.zdotaccent = 389;
 36843                e.Ecaron = 611;
 36844                e.Iogonek = 333;
 36845                e.kcommaaccent = 444;
 36846                e.minus = 675;
 36847                e.Icircumflex = 333;
 36848                e.ncaron = 500;
 36849                e.tcommaaccent = 278;
 36850                e.logicalnot = 675;
 36851                e.odieresis = 500;
 36852                e.udieresis = 500;
 36853                e.notequal = 549;
 36854                e.gcommaaccent = 500;
 36855                e.eth = 500;
 36856                e.zcaron = 389;
 36857                e.ncommaaccent = 500;
 36858                e.onesuperior = 300;
 36859                e.imacron = 278;
 36860                e.Euro = 500;
 36861              });
 36862              e.ZapfDingbats = (0, r.getLookupTableFactory)(function (e) {
 36863                e.space = 278;
 36864                e.a1 = 974;
 36865                e.a2 = 961;
 36866                e.a202 = 974;
 36867                e.a3 = 980;
 36868                e.a4 = 719;
 36869                e.a5 = 789;
 36870                e.a119 = 790;
 36871                e.a118 = 791;
 36872                e.a117 = 690;
 36873                e.a11 = 960;
 36874                e.a12 = 939;
 36875                e.a13 = 549;
 36876                e.a14 = 855;
 36877                e.a15 = 911;
 36878                e.a16 = 933;
 36879                e.a105 = 911;
 36880                e.a17 = 945;
 36881                e.a18 = 974;
 36882                e.a19 = 755;
 36883                e.a20 = 846;
 36884                e.a21 = 762;
 36885                e.a22 = 761;
 36886                e.a23 = 571;
 36887                e.a24 = 677;
 36888                e.a25 = 763;
 36889                e.a26 = 760;
 36890                e.a27 = 759;
 36891                e.a28 = 754;
 36892                e.a6 = 494;
 36893                e.a7 = 552;
 36894                e.a8 = 537;
 36895                e.a9 = 577;
 36896                e.a10 = 692;
 36897                e.a29 = 786;
 36898                e.a30 = 788;
 36899                e.a31 = 788;
 36900                e.a32 = 790;
 36901                e.a33 = 793;
 36902                e.a34 = 794;
 36903                e.a35 = 816;
 36904                e.a36 = 823;
 36905                e.a37 = 789;
 36906                e.a38 = 841;
 36907                e.a39 = 823;
 36908                e.a40 = 833;
 36909                e.a41 = 816;
 36910                e.a42 = 831;
 36911                e.a43 = 923;
 36912                e.a44 = 744;
 36913                e.a45 = 723;
 36914                e.a46 = 749;
 36915                e.a47 = 790;
 36916                e.a48 = 792;
 36917                e.a49 = 695;
 36918                e.a50 = 776;
 36919                e.a51 = 768;
 36920                e.a52 = 792;
 36921                e.a53 = 759;
 36922                e.a54 = 707;
 36923                e.a55 = 708;
 36924                e.a56 = 682;
 36925                e.a57 = 701;
 36926                e.a58 = 826;
 36927                e.a59 = 815;
 36928                e.a60 = 789;
 36929                e.a61 = 789;
 36930                e.a62 = 707;
 36931                e.a63 = 687;
 36932                e.a64 = 696;
 36933                e.a65 = 689;
 36934                e.a66 = 786;
 36935                e.a67 = 787;
 36936                e.a68 = 713;
 36937                e.a69 = 791;
 36938                e.a70 = 785;
 36939                e.a71 = 791;
 36940                e.a72 = 873;
 36941                e.a73 = 761;
 36942                e.a74 = 762;
 36943                e.a203 = 762;
 36944                e.a75 = 759;
 36945                e.a204 = 759;
 36946                e.a76 = 892;
 36947                e.a77 = 892;
 36948                e.a78 = 788;
 36949                e.a79 = 784;
 36950                e.a81 = 438;
 36951                e.a82 = 138;
 36952                e.a83 = 277;
 36953                e.a84 = 415;
 36954                e.a97 = 392;
 36955                e.a98 = 392;
 36956                e.a99 = 668;
 36957                e.a100 = 668;
 36958                e.a89 = 390;
 36959                e.a90 = 390;
 36960                e.a93 = 317;
 36961                e.a94 = 317;
 36962                e.a91 = 276;
 36963                e.a92 = 276;
 36964                e.a205 = 509;
 36965                e.a85 = 509;
 36966                e.a206 = 410;
 36967                e.a86 = 410;
 36968                e.a87 = 234;
 36969                e.a88 = 234;
 36970                e.a95 = 334;
 36971                e.a96 = 334;
 36972                e.a101 = 732;
 36973                e.a102 = 544;
 36974                e.a103 = 544;
 36975                e.a104 = 910;
 36976                e.a106 = 667;
 36977                e.a107 = 760;
 36978                e.a108 = 760;
 36979                e.a112 = 776;
 36980                e.a111 = 595;
 36981                e.a110 = 694;
 36982                e.a109 = 626;
 36983                e.a120 = 788;
 36984                e.a121 = 788;
 36985                e.a122 = 788;
 36986                e.a123 = 788;
 36987                e.a124 = 788;
 36988                e.a125 = 788;
 36989                e.a126 = 788;
 36990                e.a127 = 788;
 36991                e.a128 = 788;
 36992                e.a129 = 788;
 36993                e.a130 = 788;
 36994                e.a131 = 788;
 36995                e.a132 = 788;
 36996                e.a133 = 788;
 36997                e.a134 = 788;
 36998                e.a135 = 788;
 36999                e.a136 = 788;
 37000                e.a137 = 788;
 37001                e.a138 = 788;
 37002                e.a139 = 788;
 37003                e.a140 = 788;
 37004                e.a141 = 788;
 37005                e.a142 = 788;
 37006                e.a143 = 788;
 37007                e.a144 = 788;
 37008                e.a145 = 788;
 37009                e.a146 = 788;
 37010                e.a147 = 788;
 37011                e.a148 = 788;
 37012                e.a149 = 788;
 37013                e.a150 = 788;
 37014                e.a151 = 788;
 37015                e.a152 = 788;
 37016                e.a153 = 788;
 37017                e.a154 = 788;
 37018                e.a155 = 788;
 37019                e.a156 = 788;
 37020                e.a157 = 788;
 37021                e.a158 = 788;
 37022                e.a159 = 788;
 37023                e.a160 = 894;
 37024                e.a161 = 838;
 37025                e.a163 = 1016;
 37026                e.a164 = 458;
 37027                e.a196 = 748;
 37028                e.a165 = 924;
 37029                e.a192 = 748;
 37030                e.a166 = 918;
 37031                e.a167 = 927;
 37032                e.a168 = 928;
 37033                e.a169 = 928;
 37034                e.a170 = 834;
 37035                e.a171 = 873;
 37036                e.a172 = 828;
 37037                e.a173 = 924;
 37038                e.a162 = 924;
 37039                e.a174 = 917;
 37040                e.a175 = 930;
 37041                e.a176 = 931;
 37042                e.a177 = 463;
 37043                e.a178 = 883;
 37044                e.a179 = 836;
 37045                e.a193 = 836;
 37046                e.a180 = 867;
 37047                e.a199 = 867;
 37048                e.a181 = 696;
 37049                e.a200 = 696;
 37050                e.a182 = 874;
 37051                e.a201 = 874;
 37052                e.a183 = 760;
 37053                e.a184 = 946;
 37054                e.a197 = 771;
 37055                e.a185 = 865;
 37056                e.a194 = 771;
 37057                e.a198 = 888;
 37058                e.a186 = 967;
 37059                e.a195 = 888;
 37060                e.a187 = 831;
 37061                e.a188 = 873;
 37062                e.a189 = 927;
 37063                e.a190 = 970;
 37064                e.a191 = 918;
 37065              });
 37066            });
 37067            t.getMetrics = n;
 37068            const i = (0, r.getLookupTableFactory)(function (e) {
 37069              e.Courier = {
 37070                ascent: 629,
 37071                descent: -157,
 37072                capHeight: 562,
 37073                xHeight: -426,
 37074              };
 37075              e["Courier-Bold"] = {
 37076                ascent: 629,
 37077                descent: -157,
 37078                capHeight: 562,
 37079                xHeight: 439,
 37080              };
 37081              e["Courier-Oblique"] = {
 37082                ascent: 629,
 37083                descent: -157,
 37084                capHeight: 562,
 37085                xHeight: 426,
 37086              };
 37087              e["Courier-BoldOblique"] = {
 37088                ascent: 629,
 37089                descent: -157,
 37090                capHeight: 562,
 37091                xHeight: 426,
 37092              };
 37093              e.Helvetica = {
 37094                ascent: 718,
 37095                descent: -207,
 37096                capHeight: 718,
 37097                xHeight: 523,
 37098              };
 37099              e["Helvetica-Bold"] = {
 37100                ascent: 718,
 37101                descent: -207,
 37102                capHeight: 718,
 37103                xHeight: 532,
 37104              };
 37105              e["Helvetica-Oblique"] = {
 37106                ascent: 718,
 37107                descent: -207,
 37108                capHeight: 718,
 37109                xHeight: 523,
 37110              };
 37111              e["Helvetica-BoldOblique"] = {
 37112                ascent: 718,
 37113                descent: -207,
 37114                capHeight: 718,
 37115                xHeight: 532,
 37116              };
 37117              e["Times-Roman"] = {
 37118                ascent: 683,
 37119                descent: -217,
 37120                capHeight: 662,
 37121                xHeight: 450,
 37122              };
 37123              e["Times-Bold"] = {
 37124                ascent: 683,
 37125                descent: -217,
 37126                capHeight: 676,
 37127                xHeight: 461,
 37128              };
 37129              e["Times-Italic"] = {
 37130                ascent: 683,
 37131                descent: -217,
 37132                capHeight: 653,
 37133                xHeight: 441,
 37134              };
 37135              e["Times-BoldItalic"] = {
 37136                ascent: 683,
 37137                descent: -217,
 37138                capHeight: 669,
 37139                xHeight: 462,
 37140              };
 37141              e.Symbol = {
 37142                ascent: Math.NaN,
 37143                descent: Math.NaN,
 37144                capHeight: Math.NaN,
 37145                xHeight: Math.NaN,
 37146              };
 37147              e.ZapfDingbats = {
 37148                ascent: Math.NaN,
 37149                descent: Math.NaN,
 37150                capHeight: Math.NaN,
 37151                xHeight: Math.NaN,
 37152              };
 37153            });
 37154            t.getFontBasicMetrics = i;
 37155          },
 37156          (e, t) => {
 37157            Object.defineProperty(t, "__esModule", { value: !0 });
 37158            t.GlyfTable = void 0;
 37159            t.GlyfTable = class GlyfTable {
 37160              constructor({
 37161                glyfTable: e,
 37162                isGlyphLocationsLong: t,
 37163                locaTable: a,
 37164                numGlyphs: r,
 37165              }) {
 37166                this.glyphs = [];
 37167                const n = new DataView(a.buffer, a.byteOffset, a.byteLength),
 37168                  i = new DataView(e.buffer, e.byteOffset, e.byteLength),
 37169                  s = t ? 4 : 2;
 37170                let o = t ? n.getUint32(0) : 2 * n.getUint16(0),
 37171                  c = 0;
 37172                for (let e = 0; e < r; e++) {
 37173                  c += s;
 37174                  const e = t ? n.getUint32(c) : 2 * n.getUint16(c);
 37175                  if (e === o) {
 37176                    this.glyphs.push(new Glyph({}));
 37177                    continue;
 37178                  }
 37179                  const a = Glyph.parse(o, i);
 37180                  this.glyphs.push(a);
 37181                  o = e;
 37182                }
 37183              }
 37184              getSize() {
 37185                return this.glyphs.reduce(
 37186                  (e, t) => e + ((t.getSize() + 3) & -4),
 37187                  0,
 37188                );
 37189              }
 37190              write() {
 37191                const e = this.getSize(),
 37192                  t = new DataView(new ArrayBuffer(e)),
 37193                  a = e > 131070,
 37194                  r = a ? 4 : 2,
 37195                  n = new DataView(new ArrayBuffer((this.glyphs.length + 1) * r));
 37196                a ? n.setUint32(0, 0) : n.setUint16(0, 0);
 37197                let i = 0,
 37198                  s = 0;
 37199                for (const e of this.glyphs) {
 37200                  i += e.write(i, t);
 37201                  i = (i + 3) & -4;
 37202                  s += r;
 37203                  a ? n.setUint32(s, i) : n.setUint16(s, i >> 1);
 37204                }
 37205                return {
 37206                  isLocationLong: a,
 37207                  loca: new Uint8Array(n.buffer),
 37208                  glyf: new Uint8Array(t.buffer),
 37209                };
 37210              }
 37211              scale(e) {
 37212                for (let t = 0, a = this.glyphs.length; t < a; t++)
 37213                  this.glyphs[t].scale(e[t]);
 37214              }
 37215            };
 37216            class Glyph {
 37217              constructor({
 37218                header: e = null,
 37219                simple: t = null,
 37220                composites: a = null,
 37221              }) {
 37222                this.header = e;
 37223                this.simple = t;
 37224                this.composites = a;
 37225              }
 37226              static parse(e, t) {
 37227                const [a, r] = GlyphHeader.parse(e, t);
 37228                e += a;
 37229                if (r.numberOfContours < 0) {
 37230                  const a = [];
 37231                  for (;;) {
 37232                    const [r, n] = CompositeGlyph.parse(e, t);
 37233                    e += r;
 37234                    a.push(n);
 37235                    if (!(32 & n.flags)) break;
 37236                  }
 37237                  return new Glyph({ header: r, composites: a });
 37238                }
 37239                const n = SimpleGlyph.parse(e, t, r.numberOfContours);
 37240                return new Glyph({ header: r, simple: n });
 37241              }
 37242              getSize() {
 37243                if (!this.header) return 0;
 37244                const e = this.simple
 37245                  ? this.simple.getSize()
 37246                  : this.composites.reduce((e, t) => e + t.getSize(), 0);
 37247                return this.header.getSize() + e;
 37248              }
 37249              write(e, t) {
 37250                if (!this.header) return 0;
 37251                const a = e;
 37252                e += this.header.write(e, t);
 37253                if (this.simple) e += this.simple.write(e, t);
 37254                else for (const a of this.composites) e += a.write(e, t);
 37255                return e - a;
 37256              }
 37257              scale(e) {
 37258                if (!this.header) return;
 37259                const t = (this.header.xMin + this.header.xMax) / 2;
 37260                this.header.scale(t, e);
 37261                if (this.simple) this.simple.scale(t, e);
 37262                else for (const a of this.composites) a.scale(t, e);
 37263              }
 37264            }
 37265            class GlyphHeader {
 37266              constructor({
 37267                numberOfContours: e,
 37268                xMin: t,
 37269                yMin: a,
 37270                xMax: r,
 37271                yMax: n,
 37272              }) {
 37273                this.numberOfContours = e;
 37274                this.xMin = t;
 37275                this.yMin = a;
 37276                this.xMax = r;
 37277                this.yMax = n;
 37278              }
 37279              static parse(e, t) {
 37280                return [
 37281                  10,
 37282                  new GlyphHeader({
 37283                    numberOfContours: t.getInt16(e),
 37284                    xMin: t.getInt16(e + 2),
 37285                    yMin: t.getInt16(e + 4),
 37286                    xMax: t.getInt16(e + 6),
 37287                    yMax: t.getInt16(e + 8),
 37288                  }),
 37289                ];
 37290              }
 37291              getSize() {
 37292                return 10;
 37293              }
 37294              write(e, t) {
 37295                t.setInt16(e, this.numberOfContours);
 37296                t.setInt16(e + 2, this.xMin);
 37297                t.setInt16(e + 4, this.yMin);
 37298                t.setInt16(e + 6, this.xMax);
 37299                t.setInt16(e + 8, this.yMax);
 37300                return 10;
 37301              }
 37302              scale(e, t) {
 37303                this.xMin = Math.round(e + (this.xMin - e) * t);
 37304                this.xMax = Math.round(e + (this.xMax - e) * t);
 37305              }
 37306            }
 37307            class Contour {
 37308              constructor({ flags: e, xCoordinates: t, yCoordinates: a }) {
 37309                this.xCoordinates = t;
 37310                this.yCoordinates = a;
 37311                this.flags = e;
 37312              }
 37313            }
 37314            class SimpleGlyph {
 37315              constructor({ contours: e, instructions: t }) {
 37316                this.contours = e;
 37317                this.instructions = t;
 37318              }
 37319              static parse(e, t, a) {
 37320                const r = [];
 37321                for (let n = 0; n < a; n++) {
 37322                  const a = t.getUint16(e);
 37323                  e += 2;
 37324                  r.push(a);
 37325                }
 37326                const n = r[a - 1] + 1,
 37327                  i = t.getUint16(e);
 37328                e += 2;
 37329                const s = new Uint8Array(t).slice(e, e + i);
 37330                e += i;
 37331                const o = [];
 37332                for (let a = 0; a < n; e++, a++) {
 37333                  let r = t.getUint8(e);
 37334                  o.push(r);
 37335                  if (8 & r) {
 37336                    const n = t.getUint8(++e);
 37337                    r ^= 8;
 37338                    for (let e = 0; e < n; e++) o.push(r);
 37339                    a += n;
 37340                  }
 37341                }
 37342                const c = [];
 37343                let l = [],
 37344                  h = [],
 37345                  u = [];
 37346                const d = [];
 37347                let f = 0,
 37348                  g = 0;
 37349                for (let a = 0; a < n; a++) {
 37350                  const n = o[a];
 37351                  if (2 & n) {
 37352                    const a = t.getUint8(e++);
 37353                    g += 16 & n ? a : -a;
 37354                    l.push(g);
 37355                  } else if (16 & n) l.push(g);
 37356                  else {
 37357                    g += t.getInt16(e);
 37358                    e += 2;
 37359                    l.push(g);
 37360                  }
 37361                  if (r[f] === a) {
 37362                    f++;
 37363                    c.push(l);
 37364                    l = [];
 37365                  }
 37366                }
 37367                g = 0;
 37368                f = 0;
 37369                for (let a = 0; a < n; a++) {
 37370                  const n = o[a];
 37371                  if (4 & n) {
 37372                    const a = t.getUint8(e++);
 37373                    g += 32 & n ? a : -a;
 37374                    h.push(g);
 37375                  } else if (32 & n) h.push(g);
 37376                  else {
 37377                    g += t.getInt16(e);
 37378                    e += 2;
 37379                    h.push(g);
 37380                  }
 37381                  u.push((1 & n) | (64 & n));
 37382                  if (r[f] === a) {
 37383                    l = c[f];
 37384                    f++;
 37385                    d.push(
 37386                      new Contour({ flags: u, xCoordinates: l, yCoordinates: h }),
 37387                    );
 37388                    h = [];
 37389                    u = [];
 37390                  }
 37391                }
 37392                return new SimpleGlyph({ contours: d, instructions: s });
 37393              }
 37394              getSize() {
 37395                let e = 2 * this.contours.length + 2 + this.instructions.length,
 37396                  t = 0,
 37397                  a = 0;
 37398                for (const r of this.contours) {
 37399                  e += r.flags.length;
 37400                  for (let n = 0, i = r.xCoordinates.length; n < i; n++) {
 37401                    const i = r.xCoordinates[n],
 37402                      s = r.yCoordinates[n];
 37403                    let o = Math.abs(i - t);
 37404                    o > 255 ? (e += 2) : o > 0 && (e += 1);
 37405                    t = i;
 37406                    o = Math.abs(s - a);
 37407                    o > 255 ? (e += 2) : o > 0 && (e += 1);
 37408                    a = s;
 37409                  }
 37410                }
 37411                return e;
 37412              }
 37413              write(e, t) {
 37414                const a = e,
 37415                  r = [],
 37416                  n = [],
 37417                  i = [];
 37418                let s = 0,
 37419                  o = 0;
 37420                for (const a of this.contours) {
 37421                  for (let e = 0, t = a.xCoordinates.length; e < t; e++) {
 37422                    let t = a.flags[e];
 37423                    const c = a.xCoordinates[e];
 37424                    let l = c - s;
 37425                    if (0 === l) {
 37426                      t |= 16;
 37427                      r.push(0);
 37428                    } else {
 37429                      const e = Math.abs(l);
 37430                      if (e <= 255) {
 37431                        t |= l >= 0 ? 18 : 2;
 37432                        r.push(e);
 37433                      } else r.push(l);
 37434                    }
 37435                    s = c;
 37436                    const h = a.yCoordinates[e];
 37437                    l = h - o;
 37438                    if (0 === l) {
 37439                      t |= 32;
 37440                      n.push(0);
 37441                    } else {
 37442                      const e = Math.abs(l);
 37443                      if (e <= 255) {
 37444                        t |= l >= 0 ? 36 : 4;
 37445                        n.push(e);
 37446                      } else n.push(l);
 37447                    }
 37448                    o = h;
 37449                    i.push(t);
 37450                  }
 37451                  t.setUint16(e, r.length - 1);
 37452                  e += 2;
 37453                }
 37454                t.setUint16(e, this.instructions.length);
 37455                e += 2;
 37456                if (this.instructions.length) {
 37457                  new Uint8Array(t.buffer, 0, t.buffer.byteLength).set(
 37458                    this.instructions,
 37459                    e,
 37460                  );
 37461                  e += this.instructions.length;
 37462                }
 37463                for (const a of i) t.setUint8(e++, a);
 37464                for (let a = 0, n = r.length; a < n; a++) {
 37465                  const n = r[a],
 37466                    s = i[a];
 37467                  if (2 & s) t.setUint8(e++, n);
 37468                  else if (!(16 & s)) {
 37469                    t.setInt16(e, n);
 37470                    e += 2;
 37471                  }
 37472                }
 37473                for (let a = 0, r = n.length; a < r; a++) {
 37474                  const r = n[a],
 37475                    s = i[a];
 37476                  if (4 & s) t.setUint8(e++, r);
 37477                  else if (!(32 & s)) {
 37478                    t.setInt16(e, r);
 37479                    e += 2;
 37480                  }
 37481                }
 37482                return e - a;
 37483              }
 37484              scale(e, t) {
 37485                for (const a of this.contours)
 37486                  if (0 !== a.xCoordinates.length)
 37487                    for (let r = 0, n = a.xCoordinates.length; r < n; r++)
 37488                      a.xCoordinates[r] = Math.round(
 37489                        e + (a.xCoordinates[r] - e) * t,
 37490                      );
 37491              }
 37492            }
 37493            class CompositeGlyph {
 37494              constructor({
 37495                flags: e,
 37496                glyphIndex: t,
 37497                argument1: a,
 37498                argument2: r,
 37499                transf: n,
 37500                instructions: i,
 37501              }) {
 37502                this.flags = e;
 37503                this.glyphIndex = t;
 37504                this.argument1 = a;
 37505                this.argument2 = r;
 37506                this.transf = n;
 37507                this.instructions = i;
 37508              }
 37509              static parse(e, t) {
 37510                const a = e,
 37511                  r = [];
 37512                let n = t.getUint16(e);
 37513                const i = t.getUint16(e + 2);
 37514                e += 4;
 37515                let s, o;
 37516                if (1 & n) {
 37517                  if (2 & n) {
 37518                    s = t.getInt16(e);
 37519                    o = t.getInt16(e + 2);
 37520                  } else {
 37521                    s = t.getUint16(e);
 37522                    o = t.getUint16(e + 2);
 37523                  }
 37524                  e += 4;
 37525                  n ^= 1;
 37526                } else {
 37527                  if (2 & n) {
 37528                    s = t.getInt8(e);
 37529                    o = t.getInt8(e + 1);
 37530                  } else {
 37531                    s = t.getUint8(e);
 37532                    o = t.getUint8(e + 1);
 37533                  }
 37534                  e += 2;
 37535                }
 37536                if (8 & n) {
 37537                  r.push(t.getUint16(e));
 37538                  e += 2;
 37539                } else if (64 & n) {
 37540                  r.push(t.getUint16(e), t.getUint16(e + 2));
 37541                  e += 4;
 37542                } else if (128 & n) {
 37543                  r.push(
 37544                    t.getUint16(e),
 37545                    t.getUint16(e + 2),
 37546                    t.getUint16(e + 4),
 37547                    t.getUint16(e + 6),
 37548                  );
 37549                  e += 8;
 37550                }
 37551                let c = null;
 37552                if (256 & n) {
 37553                  const a = t.getUint16(e);
 37554                  e += 2;
 37555                  c = new Uint8Array(t).slice(e, e + a);
 37556                  e += a;
 37557                }
 37558                return [
 37559                  e - a,
 37560                  new CompositeGlyph({
 37561                    flags: n,
 37562                    glyphIndex: i,
 37563                    argument1: s,
 37564                    argument2: o,
 37565                    transf: r,
 37566                    instructions: c,
 37567                  }),
 37568                ];
 37569              }
 37570              getSize() {
 37571                let e = 4 + 2 * this.transf.length;
 37572                256 & this.flags && (e += 2 + this.instructions.length);
 37573                e += 2;
 37574                2 & this.flags
 37575                  ? (this.argument1 >= -128 &&
 37576                      this.argument1 <= 127 &&
 37577                      this.argument2 >= -128 &&
 37578                      this.argument2 <= 127) ||
 37579                    (e += 2)
 37580                  : (this.argument1 >= 0 &&
 37581                      this.argument1 <= 255 &&
 37582                      this.argument2 >= 0 &&
 37583                      this.argument2 <= 255) ||
 37584                    (e += 2);
 37585                return e;
 37586              }
 37587              write(e, t) {
 37588                const a = e;
 37589                2 & this.flags
 37590                  ? (this.argument1 >= -128 &&
 37591                      this.argument1 <= 127 &&
 37592                      this.argument2 >= -128 &&
 37593                      this.argument2 <= 127) ||
 37594                    (this.flags |= 1)
 37595                  : (this.argument1 >= 0 &&
 37596                      this.argument1 <= 255 &&
 37597                      this.argument2 >= 0 &&
 37598                      this.argument2 <= 255) ||
 37599                    (this.flags |= 1);
 37600                t.setUint16(e, this.flags);
 37601                t.setUint16(e + 2, this.glyphIndex);
 37602                e += 4;
 37603                if (1 & this.flags) {
 37604                  if (2 & this.flags) {
 37605                    t.setInt16(e, this.argument1);
 37606                    t.setInt16(e + 2, this.argument2);
 37607                  } else {
 37608                    t.setUint16(e, this.argument1);
 37609                    t.setUint16(e + 2, this.argument2);
 37610                  }
 37611                  e += 4;
 37612                } else {
 37613                  t.setUint8(e, this.argument1);
 37614                  t.setUint8(e + 1, this.argument2);
 37615                  e += 2;
 37616                }
 37617                if (256 & this.flags) {
 37618                  t.setUint16(e, this.instructions.length);
 37619                  e += 2;
 37620                  if (this.instructions.length) {
 37621                    new Uint8Array(t.buffer, 0, t.buffer.byteLength).set(
 37622                      this.instructions,
 37623                      e,
 37624                    );
 37625                    e += this.instructions.length;
 37626                  }
 37627                }
 37628                return e - a;
 37629              }
 37630              scale(e, t) {}
 37631            }
 37632          },
 37633          (e, t, a) => {
 37634            Object.defineProperty(t, "__esModule", { value: !0 });
 37635            t.OpenTypeFileBuilder = void 0;
 37636            var r = a(3),
 37637              n = a(2);
 37638            function writeInt16(e, t, a) {
 37639              e[t] = (a >> 8) & 255;
 37640              e[t + 1] = 255 & a;
 37641            }
 37642            function writeInt32(e, t, a) {
 37643              e[t] = (a >> 24) & 255;
 37644              e[t + 1] = (a >> 16) & 255;
 37645              e[t + 2] = (a >> 8) & 255;
 37646              e[t + 3] = 255 & a;
 37647            }
 37648            function writeData(e, t, a) {
 37649              if (a instanceof Uint8Array) e.set(a, t);
 37650              else if ("string" == typeof a)
 37651                for (let r = 0, n = a.length; r < n; r++)
 37652                  e[t++] = 255 & a.charCodeAt(r);
 37653              else for (const r of a) e[t++] = 255 & r;
 37654            }
 37655            class OpenTypeFileBuilder {
 37656              constructor(e) {
 37657                this.sfnt = e;
 37658                this.tables = Object.create(null);
 37659              }
 37660              static getSearchParams(e, t) {
 37661                let a = 1,
 37662                  r = 0;
 37663                for (; (a ^ e) > a; ) {
 37664                  a <<= 1;
 37665                  r++;
 37666                }
 37667                const n = a * t;
 37668                return { range: n, entry: r, rangeShift: t * e - n };
 37669              }
 37670              toArray() {
 37671                let e = this.sfnt;
 37672                const t = this.tables,
 37673                  a = Object.keys(t);
 37674                a.sort();
 37675                const i = a.length;
 37676                let s,
 37677                  o,
 37678                  c,
 37679                  l,
 37680                  h,
 37681                  u = 12 + 16 * i;
 37682                const d = [u];
 37683                for (s = 0; s < i; s++) {
 37684                  l = t[a[s]];
 37685                  u += ((l.length + 3) & -4) >>> 0;
 37686                  d.push(u);
 37687                }
 37688                const f = new Uint8Array(u);
 37689                for (s = 0; s < i; s++) {
 37690                  l = t[a[s]];
 37691                  writeData(f, d[s], l);
 37692                }
 37693                "true" === e && (e = (0, n.string32)(65536));
 37694                f[0] = 255 & e.charCodeAt(0);
 37695                f[1] = 255 & e.charCodeAt(1);
 37696                f[2] = 255 & e.charCodeAt(2);
 37697                f[3] = 255 & e.charCodeAt(3);
 37698                writeInt16(f, 4, i);
 37699                const g = OpenTypeFileBuilder.getSearchParams(i, 16);
 37700                writeInt16(f, 6, g.range);
 37701                writeInt16(f, 8, g.entry);
 37702                writeInt16(f, 10, g.rangeShift);
 37703                u = 12;
 37704                for (s = 0; s < i; s++) {
 37705                  h = a[s];
 37706                  f[u] = 255 & h.charCodeAt(0);
 37707                  f[u + 1] = 255 & h.charCodeAt(1);
 37708                  f[u + 2] = 255 & h.charCodeAt(2);
 37709                  f[u + 3] = 255 & h.charCodeAt(3);
 37710                  let e = 0;
 37711                  for (o = d[s], c = d[s + 1]; o < c; o += 4) {
 37712                    e = (e + (0, r.readUint32)(f, o)) >>> 0;
 37713                  }
 37714                  writeInt32(f, u + 4, e);
 37715                  writeInt32(f, u + 8, d[s]);
 37716                  writeInt32(f, u + 12, t[h].length);
 37717                  u += 16;
 37718                }
 37719                return f;
 37720              }
 37721              addTable(e, t) {
 37722                if (e in this.tables)
 37723                  throw new Error("Table " + e + " already exists");
 37724                this.tables[e] = t;
 37725              }
 37726            }
 37727            t.OpenTypeFileBuilder = OpenTypeFileBuilder;
 37728          },
 37729          (e, t, a) => {
 37730            Object.defineProperty(t, "__esModule", { value: !0 });
 37731            t.Type1Font = void 0;
 37732            var r = a(35),
 37733              n = a(2),
 37734              i = a(38),
 37735              s = a(3),
 37736              o = a(8),
 37737              c = a(49);
 37738            function findBlock(e, t, a) {
 37739              const r = e.length,
 37740                n = t.length,
 37741                i = r - n;
 37742              let o = a,
 37743                c = !1;
 37744              for (; o < i; ) {
 37745                let a = 0;
 37746                for (; a < n && e[o + a] === t[a]; ) a++;
 37747                if (a >= n) {
 37748                  o += a;
 37749                  for (; o < r && (0, s.isWhiteSpace)(e[o]); ) o++;
 37750                  c = !0;
 37751                  break;
 37752                }
 37753                o++;
 37754              }
 37755              return { found: c, length: o };
 37756            }
 37757            t.Type1Font = class Type1Font {
 37758              constructor(e, t, a) {
 37759                let r = a.length1,
 37760                  s = a.length2,
 37761                  l = t.peekBytes(6);
 37762                const h = 128 === l[0] && 1 === l[1];
 37763                if (h) {
 37764                  t.skip(6);
 37765                  r = (l[5] << 24) | (l[4] << 16) | (l[3] << 8) | l[2];
 37766                }
 37767                const u = (function getHeaderBlock(e, t) {
 37768                  const a = [101, 101, 120, 101, 99],
 37769                    r = e.pos;
 37770                  let i, s, c, l;
 37771                  try {
 37772                    i = e.getBytes(t);
 37773                    s = i.length;
 37774                  } catch {}
 37775                  if (s === t) {
 37776                    c = findBlock(i, a, t - 2 * a.length);
 37777                    if (c.found && c.length === t)
 37778                      return { stream: new o.Stream(i), length: t };
 37779                  }
 37780                  (0, n.warn)(
 37781                    'Invalid "Length1" property in Type1 font -- trying to recover.',
 37782                  );
 37783                  e.pos = r;
 37784                  for (;;) {
 37785                    c = findBlock(e.peekBytes(2048), a, 0);
 37786                    if (0 === c.length) break;
 37787                    e.pos += c.length;
 37788                    if (c.found) {
 37789                      l = e.pos - r;
 37790                      break;
 37791                    }
 37792                  }
 37793                  e.pos = r;
 37794                  if (l)
 37795                    return { stream: new o.Stream(e.getBytes(l)), length: l };
 37796                  (0, n.warn)(
 37797                    'Unable to recover "Length1" property in Type1 font -- using as is.',
 37798                  );
 37799                  return { stream: new o.Stream(e.getBytes(t)), length: t };
 37800                })(t, r);
 37801                new c.Type1Parser(
 37802                  u.stream,
 37803                  !1,
 37804                  i.SEAC_ANALYSIS_ENABLED,
 37805                ).extractFontHeader(a);
 37806                if (h) {
 37807                  l = t.getBytes(6);
 37808                  s = (l[5] << 24) | (l[4] << 16) | (l[3] << 8) | l[2];
 37809                }
 37810                const d = (function getEexecBlock(e, t) {
 37811                    const a = e.getBytes();
 37812                    if (0 === a.length)
 37813                      throw new n.FormatError(
 37814                        "getEexecBlock - no font program found.",
 37815                      );
 37816                    return { stream: new o.Stream(a), length: a.length };
 37817                  })(t),
 37818                  f = new c.Type1Parser(
 37819                    d.stream,
 37820                    !0,
 37821                    i.SEAC_ANALYSIS_ENABLED,
 37822                  ).extractFontProgram(a);
 37823                for (const e in f.properties) a[e] = f.properties[e];
 37824                const g = f.charstrings,
 37825                  p = this.getType2Charstrings(g),
 37826                  m = this.getType2Subrs(f.subrs);
 37827                this.charstrings = g;
 37828                this.data = this.wrap(e, p, this.charstrings, m, a);
 37829                this.seacs = this.getSeacs(f.charstrings);
 37830              }
 37831              get numGlyphs() {
 37832                return this.charstrings.length + 1;
 37833              }
 37834              getCharset() {
 37835                const e = [".notdef"];
 37836                for (const { glyphName: t } of this.charstrings) e.push(t);
 37837                return e;
 37838              }
 37839              getGlyphMapping(e) {
 37840                const t = this.charstrings;
 37841                if (e.composite) {
 37842                  const a = Object.create(null);
 37843                  for (let r = 0, n = t.length; r < n; r++) {
 37844                    a[e.cMap.charCodeOf(r)] = r + 1;
 37845                  }
 37846                  return a;
 37847                }
 37848                const a = [".notdef"];
 37849                let r, n;
 37850                for (n = 0; n < t.length; n++) a.push(t[n].glyphName);
 37851                const s = e.builtInEncoding;
 37852                if (s) {
 37853                  r = Object.create(null);
 37854                  for (const e in s) {
 37855                    n = a.indexOf(s[e]);
 37856                    n >= 0 && (r[e] = n);
 37857                  }
 37858                }
 37859                return (0, i.type1FontGlyphMapping)(e, r, a);
 37860              }
 37861              hasGlyphId(e) {
 37862                if (e < 0 || e >= this.numGlyphs) return !1;
 37863                if (0 === e) return !0;
 37864                return this.charstrings[e - 1].charstring.length > 0;
 37865              }
 37866              getSeacs(e) {
 37867                const t = [];
 37868                for (let a = 0, r = e.length; a < r; a++) {
 37869                  const r = e[a];
 37870                  r.seac && (t[a + 1] = r.seac);
 37871                }
 37872                return t;
 37873              }
 37874              getType2Charstrings(e) {
 37875                const t = [];
 37876                for (const a of e) t.push(a.charstring);
 37877                return t;
 37878              }
 37879              getType2Subrs(e) {
 37880                let t = 0;
 37881                const a = e.length;
 37882                t = a < 1133 ? 107 : a < 33769 ? 1131 : 32768;
 37883                const r = [];
 37884                let n;
 37885                for (n = 0; n < t; n++) r.push([11]);
 37886                for (n = 0; n < a; n++) r.push(e[n]);
 37887                return r;
 37888              }
 37889              wrap(e, t, a, n, i) {
 37890                const s = new r.CFF();
 37891                s.header = new r.CFFHeader(1, 0, 4, 4);
 37892                s.names = [e];
 37893                const o = new r.CFFTopDict();
 37894                o.setByName("version", 391);
 37895                o.setByName("Notice", 392);
 37896                o.setByName("FullName", 393);
 37897                o.setByName("FamilyName", 394);
 37898                o.setByName("Weight", 395);
 37899                o.setByName("Encoding", null);
 37900                o.setByName("FontMatrix", i.fontMatrix);
 37901                o.setByName("FontBBox", i.bbox);
 37902                o.setByName("charset", null);
 37903                o.setByName("CharStrings", null);
 37904                o.setByName("Private", null);
 37905                s.topDict = o;
 37906                const c = new r.CFFStrings();
 37907                c.add("Version 0.11");
 37908                c.add("See original notice");
 37909                c.add(e);
 37910                c.add(e);
 37911                c.add("Medium");
 37912                s.strings = c;
 37913                s.globalSubrIndex = new r.CFFIndex();
 37914                const l = t.length,
 37915                  h = [".notdef"];
 37916                let u, d;
 37917                for (u = 0; u < l; u++) {
 37918                  const e = a[u].glyphName;
 37919                  -1 === r.CFFStandardStrings.indexOf(e) && c.add(e);
 37920                  h.push(e);
 37921                }
 37922                s.charset = new r.CFFCharset(!1, 0, h);
 37923                const f = new r.CFFIndex();
 37924                f.add([139, 14]);
 37925                for (u = 0; u < l; u++) f.add(t[u]);
 37926                s.charStrings = f;
 37927                const g = new r.CFFPrivateDict();
 37928                g.setByName("Subrs", null);
 37929                const p = [
 37930                  "BlueValues",
 37931                  "OtherBlues",
 37932                  "FamilyBlues",
 37933                  "FamilyOtherBlues",
 37934                  "StemSnapH",
 37935                  "StemSnapV",
 37936                  "BlueShift",
 37937                  "BlueFuzz",
 37938                  "BlueScale",
 37939                  "LanguageGroup",
 37940                  "ExpansionFactor",
 37941                  "ForceBold",
 37942                  "StdHW",
 37943                  "StdVW",
 37944                ];
 37945                for (u = 0, d = p.length; u < d; u++) {
 37946                  const e = p[u];
 37947                  if (!(e in i.privateData)) continue;
 37948                  const t = i.privateData[e];
 37949                  if (Array.isArray(t))
 37950                    for (let e = t.length - 1; e > 0; e--) t[e] -= t[e - 1];
 37951                  g.setByName(e, t);
 37952                }
 37953                s.topDict.privateDict = g;
 37954                const m = new r.CFFIndex();
 37955                for (u = 0, d = n.length; u < d; u++) m.add(n[u]);
 37956                g.subrsIndex = m;
 37957                return new r.CFFCompiler(s).compile();
 37958              }
 37959            };
 37960          },
 37961          (e, t, a) => {
 37962            Object.defineProperty(t, "__esModule", { value: !0 });
 37963            t.Type1Parser = void 0;
 37964            var r = a(37),
 37965              n = a(3),
 37966              i = a(8),
 37967              s = a(2);
 37968            const o = [4],
 37969              c = [5],
 37970              l = [6],
 37971              h = [7],
 37972              u = [8],
 37973              d = [12, 35],
 37974              f = [14],
 37975              g = [21],
 37976              p = [22],
 37977              m = [30],
 37978              b = [31];
 37979            class Type1CharString {
 37980              constructor() {
 37981                this.width = 0;
 37982                this.lsb = 0;
 37983                this.flexing = !1;
 37984                this.output = [];
 37985                this.stack = [];
 37986              }
 37987              convert(e, t, a) {
 37988                const r = e.length;
 37989                let n,
 37990                  i,
 37991                  y,
 37992                  w = !1;
 37993                for (let S = 0; S < r; S++) {
 37994                  let r = e[S];
 37995                  if (r < 32) {
 37996                    12 === r && (r = (r << 8) + e[++S]);
 37997                    switch (r) {
 37998                      case 1:
 37999                      case 3:
 38000                      case 9:
 38001                      case 3072:
 38002                      case 3073:
 38003                      case 3074:
 38004                      case 3105:
 38005                        this.stack = [];
 38006                        break;
 38007                      case 4:
 38008                        if (this.flexing) {
 38009                          if (this.stack.length < 1) {
 38010                            w = !0;
 38011                            break;
 38012                          }
 38013                          const e = this.stack.pop();
 38014                          this.stack.push(0, e);
 38015                          break;
 38016                        }
 38017                        w = this.executeCommand(1, o);
 38018                        break;
 38019                      case 5:
 38020                        w = this.executeCommand(2, c);
 38021                        break;
 38022                      case 6:
 38023                        w = this.executeCommand(1, l);
 38024                        break;
 38025                      case 7:
 38026                        w = this.executeCommand(1, h);
 38027                        break;
 38028                      case 8:
 38029                        w = this.executeCommand(6, u);
 38030                        break;
 38031                      case 10:
 38032                        if (this.stack.length < 1) {
 38033                          w = !0;
 38034                          break;
 38035                        }
 38036                        y = this.stack.pop();
 38037                        if (!t[y]) {
 38038                          w = !0;
 38039                          break;
 38040                        }
 38041                        w = this.convert(t[y], t, a);
 38042                        break;
 38043                      case 11:
 38044                        return w;
 38045                      case 13:
 38046                        if (this.stack.length < 2) {
 38047                          w = !0;
 38048                          break;
 38049                        }
 38050                        n = this.stack.pop();
 38051                        i = this.stack.pop();
 38052                        this.lsb = i;
 38053                        this.width = n;
 38054                        this.stack.push(n, i);
 38055                        w = this.executeCommand(2, p);
 38056                        break;
 38057                      case 14:
 38058                        this.output.push(f[0]);
 38059                        break;
 38060                      case 21:
 38061                        if (this.flexing) break;
 38062                        w = this.executeCommand(2, g);
 38063                        break;
 38064                      case 22:
 38065                        if (this.flexing) {
 38066                          this.stack.push(0);
 38067                          break;
 38068                        }
 38069                        w = this.executeCommand(1, p);
 38070                        break;
 38071                      case 30:
 38072                        w = this.executeCommand(4, m);
 38073                        break;
 38074                      case 31:
 38075                        w = this.executeCommand(4, b);
 38076                        break;
 38077                      case 3078:
 38078                        if (a) {
 38079                          const e = this.stack.at(-5);
 38080                          this.seac = this.stack.splice(-4, 4);
 38081                          this.seac[0] += this.lsb - e;
 38082                          w = this.executeCommand(0, f);
 38083                        } else w = this.executeCommand(4, f);
 38084                        break;
 38085                      case 3079:
 38086                        if (this.stack.length < 4) {
 38087                          w = !0;
 38088                          break;
 38089                        }
 38090                        this.stack.pop();
 38091                        n = this.stack.pop();
 38092                        const e = this.stack.pop();
 38093                        i = this.stack.pop();
 38094                        this.lsb = i;
 38095                        this.width = n;
 38096                        this.stack.push(n, i, e);
 38097                        w = this.executeCommand(3, g);
 38098                        break;
 38099                      case 3084:
 38100                        if (this.stack.length < 2) {
 38101                          w = !0;
 38102                          break;
 38103                        }
 38104                        const S = this.stack.pop(),
 38105                          x = this.stack.pop();
 38106                        this.stack.push(x / S);
 38107                        break;
 38108                      case 3088:
 38109                        if (this.stack.length < 2) {
 38110                          w = !0;
 38111                          break;
 38112                        }
 38113                        y = this.stack.pop();
 38114                        const C = this.stack.pop();
 38115                        if (0 === y && 3 === C) {
 38116                          const e = this.stack.splice(-17, 17);
 38117                          this.stack.push(
 38118                            e[2] + e[0],
 38119                            e[3] + e[1],
 38120                            e[4],
 38121                            e[5],
 38122                            e[6],
 38123                            e[7],
 38124                            e[8],
 38125                            e[9],
 38126                            e[10],
 38127                            e[11],
 38128                            e[12],
 38129                            e[13],
 38130                            e[14],
 38131                          );
 38132                          w = this.executeCommand(13, d, !0);
 38133                          this.flexing = !1;
 38134                          this.stack.push(e[15], e[16]);
 38135                        } else 1 === y && 0 === C && (this.flexing = !0);
 38136                        break;
 38137                      case 3089:
 38138                        break;
 38139                      default:
 38140                        (0, s.warn)(
 38141                          'Unknown type 1 charstring command of "' + r + '"',
 38142                        );
 38143                    }
 38144                    if (w) break;
 38145                  } else {
 38146                    r <= 246
 38147                      ? (r -= 139)
 38148                      : (r =
 38149                          r <= 250
 38150                            ? 256 * (r - 247) + e[++S] + 108
 38151                            : r <= 254
 38152                              ? -256 * (r - 251) - e[++S] - 108
 38153                              : ((255 & e[++S]) << 24) |
 38154                                ((255 & e[++S]) << 16) |
 38155                                ((255 & e[++S]) << 8) |
 38156                                ((255 & e[++S]) << 0));
 38157                    this.stack.push(r);
 38158                  }
 38159                }
 38160                return w;
 38161              }
 38162              executeCommand(e, t, a) {
 38163                const r = this.stack.length;
 38164                if (e > r) return !0;
 38165                const n = r - e;
 38166                for (let e = n; e < r; e++) {
 38167                  let t = this.stack[e];
 38168                  if (Number.isInteger(t))
 38169                    this.output.push(28, (t >> 8) & 255, 255 & t);
 38170                  else {
 38171                    t = (65536 * t) | 0;
 38172                    this.output.push(
 38173                      255,
 38174                      (t >> 24) & 255,
 38175                      (t >> 16) & 255,
 38176                      (t >> 8) & 255,
 38177                      255 & t,
 38178                    );
 38179                  }
 38180                }
 38181                this.output.push(...t);
 38182                a ? this.stack.splice(n, e) : (this.stack.length = 0);
 38183                return !1;
 38184              }
 38185            }
 38186            function isHexDigit(e) {
 38187              return (
 38188                (e >= 48 && e <= 57) ||
 38189                (e >= 65 && e <= 70) ||
 38190                (e >= 97 && e <= 102)
 38191              );
 38192            }
 38193            function decrypt(e, t, a) {
 38194              if (a >= e.length) return new Uint8Array(0);
 38195              let r,
 38196                n,
 38197                i = 0 | t;
 38198              for (r = 0; r < a; r++) i = (52845 * (e[r] + i) + 22719) & 65535;
 38199              const s = e.length - a,
 38200                o = new Uint8Array(s);
 38201              for (r = a, n = 0; n < s; r++, n++) {
 38202                const t = e[r];
 38203                o[n] = t ^ (i >> 8);
 38204                i = (52845 * (t + i) + 22719) & 65535;
 38205              }
 38206              return o;
 38207            }
 38208            function isSpecial(e) {
 38209              return (
 38210                47 === e ||
 38211                91 === e ||
 38212                93 === e ||
 38213                123 === e ||
 38214                125 === e ||
 38215                40 === e ||
 38216                41 === e
 38217              );
 38218            }
 38219            t.Type1Parser = class Type1Parser {
 38220              constructor(e, t, a) {
 38221                if (t) {
 38222                  const t = e.getBytes(),
 38223                    a = !(
 38224                      (isHexDigit(t[0]) || (0, n.isWhiteSpace)(t[0])) &&
 38225                      isHexDigit(t[1]) &&
 38226                      isHexDigit(t[2]) &&
 38227                      isHexDigit(t[3]) &&
 38228                      isHexDigit(t[4]) &&
 38229                      isHexDigit(t[5]) &&
 38230                      isHexDigit(t[6]) &&
 38231                      isHexDigit(t[7])
 38232                    );
 38233                  e = new i.Stream(
 38234                    a
 38235                      ? decrypt(t, 55665, 4)
 38236                      : (function decryptAscii(e, t, a) {
 38237                          let r = 0 | t;
 38238                          const n = e.length,
 38239                            i = new Uint8Array(n >>> 1);
 38240                          let s, o;
 38241                          for (s = 0, o = 0; s < n; s++) {
 38242                            const t = e[s];
 38243                            if (!isHexDigit(t)) continue;
 38244                            s++;
 38245                            let a;
 38246                            for (; s < n && !isHexDigit((a = e[s])); ) s++;
 38247                            if (s < n) {
 38248                              const e = parseInt(String.fromCharCode(t, a), 16);
 38249                              i[o++] = e ^ (r >> 8);
 38250                              r = (52845 * (e + r) + 22719) & 65535;
 38251                            }
 38252                          }
 38253                          return i.slice(a, o);
 38254                        })(t, 55665, 4),
 38255                  );
 38256                }
 38257                this.seacAnalysisEnabled = !!a;
 38258                this.stream = e;
 38259                this.nextChar();
 38260              }
 38261              readNumberArray() {
 38262                this.getToken();
 38263                const e = [];
 38264                for (;;) {
 38265                  const t = this.getToken();
 38266                  if (null === t || "]" === t || "}" === t) break;
 38267                  e.push(parseFloat(t || 0));
 38268                }
 38269                return e;
 38270              }
 38271              readNumber() {
 38272                const e = this.getToken();
 38273                return parseFloat(e || 0);
 38274              }
 38275              readInt() {
 38276                const e = this.getToken();
 38277                return 0 | parseInt(e || 0, 10);
 38278              }
 38279              readBoolean() {
 38280                return "true" === this.getToken() ? 1 : 0;
 38281              }
 38282              nextChar() {
 38283                return (this.currentChar = this.stream.getByte());
 38284              }
 38285              prevChar() {
 38286                this.stream.skip(-2);
 38287                return (this.currentChar = this.stream.getByte());
 38288              }
 38289              getToken() {
 38290                let e = !1,
 38291                  t = this.currentChar;
 38292                for (;;) {
 38293                  if (-1 === t) return null;
 38294                  if (e) (10 !== t && 13 !== t) || (e = !1);
 38295                  else if (37 === t) e = !0;
 38296                  else if (!(0, n.isWhiteSpace)(t)) break;
 38297                  t = this.nextChar();
 38298                }
 38299                if (isSpecial(t)) {
 38300                  this.nextChar();
 38301                  return String.fromCharCode(t);
 38302                }
 38303                let a = "";
 38304                do {
 38305                  a += String.fromCharCode(t);
 38306                  t = this.nextChar();
 38307                } while (t >= 0 && !(0, n.isWhiteSpace)(t) && !isSpecial(t));
 38308                return a;
 38309              }
 38310              readCharStrings(e, t) {
 38311                return -1 === t ? e : decrypt(e, 4330, t);
 38312              }
 38313              extractFontProgram(e) {
 38314                const t = this.stream,
 38315                  a = [],
 38316                  r = [],
 38317                  n = Object.create(null);
 38318                n.lenIV = 4;
 38319                const i = {
 38320                  subrs: [],
 38321                  charstrings: [],
 38322                  properties: { privateData: n },
 38323                };
 38324                let s, o, c, l;
 38325                for (; null !== (s = this.getToken()); )
 38326                  if ("/" === s) {
 38327                    s = this.getToken();
 38328                    switch (s) {
 38329                      case "CharStrings":
 38330                        this.getToken();
 38331                        this.getToken();
 38332                        this.getToken();
 38333                        this.getToken();
 38334                        for (;;) {
 38335                          s = this.getToken();
 38336                          if (null === s || "end" === s) break;
 38337                          if ("/" !== s) continue;
 38338                          const e = this.getToken();
 38339                          o = this.readInt();
 38340                          this.getToken();
 38341                          c = o > 0 ? t.getBytes(o) : new Uint8Array(0);
 38342                          l = i.properties.privateData.lenIV;
 38343                          const a = this.readCharStrings(c, l);
 38344                          this.nextChar();
 38345                          s = this.getToken();
 38346                          "noaccess" === s
 38347                            ? this.getToken()
 38348                            : "/" === s && this.prevChar();
 38349                          r.push({ glyph: e, encoded: a });
 38350                        }
 38351                        break;
 38352                      case "Subrs":
 38353                        this.readInt();
 38354                        this.getToken();
 38355                        for (; "dup" === this.getToken(); ) {
 38356                          const e = this.readInt();
 38357                          o = this.readInt();
 38358                          this.getToken();
 38359                          c = o > 0 ? t.getBytes(o) : new Uint8Array(0);
 38360                          l = i.properties.privateData.lenIV;
 38361                          const r = this.readCharStrings(c, l);
 38362                          this.nextChar();
 38363                          s = this.getToken();
 38364                          "noaccess" === s && this.getToken();
 38365                          a[e] = r;
 38366                        }
 38367                        break;
 38368                      case "BlueValues":
 38369                      case "OtherBlues":
 38370                      case "FamilyBlues":
 38371                      case "FamilyOtherBlues":
 38372                        const e = this.readNumberArray();
 38373                        e.length > 0 && e.length, 0;
 38374                        break;
 38375                      case "StemSnapH":
 38376                      case "StemSnapV":
 38377                        i.properties.privateData[s] = this.readNumberArray();
 38378                        break;
 38379                      case "StdHW":
 38380                      case "StdVW":
 38381                        i.properties.privateData[s] = this.readNumberArray()[0];
 38382                        break;
 38383                      case "BlueShift":
 38384                      case "lenIV":
 38385                      case "BlueFuzz":
 38386                      case "BlueScale":
 38387                      case "LanguageGroup":
 38388                        i.properties.privateData[s] = this.readNumber();
 38389                        break;
 38390                      case "ExpansionFactor":
 38391                        i.properties.privateData[s] = this.readNumber() || 0.06;
 38392                        break;
 38393                      case "ForceBold":
 38394                        i.properties.privateData[s] = this.readBoolean();
 38395                    }
 38396                  }
 38397                for (const { encoded: t, glyph: n } of r) {
 38398                  const r = new Type1CharString(),
 38399                    s = r.convert(t, a, this.seacAnalysisEnabled);
 38400                  let o = r.output;
 38401                  s && (o = [14]);
 38402                  const c = {
 38403                    glyphName: n,
 38404                    charstring: o,
 38405                    width: r.width,
 38406                    lsb: r.lsb,
 38407                    seac: r.seac,
 38408                  };
 38409                  ".notdef" === n
 38410                    ? i.charstrings.unshift(c)
 38411                    : i.charstrings.push(c);
 38412                  if (e.builtInEncoding) {
 38413                    const t = e.builtInEncoding.indexOf(n);
 38414                    t > -1 &&
 38415                      void 0 === e.widths[t] &&
 38416                      t >= e.firstChar &&
 38417                      t <= e.lastChar &&
 38418                      (e.widths[t] = r.width);
 38419                  }
 38420                }
 38421                return i;
 38422              }
 38423              extractFontHeader(e) {
 38424                let t;
 38425                for (; null !== (t = this.getToken()); )
 38426                  if ("/" === t) {
 38427                    t = this.getToken();
 38428                    switch (t) {
 38429                      case "FontMatrix":
 38430                        const a = this.readNumberArray();
 38431                        e.fontMatrix = a;
 38432                        break;
 38433                      case "Encoding":
 38434                        const n = this.getToken();
 38435                        let i;
 38436                        if (/^\d+$/.test(n)) {
 38437                          i = [];
 38438                          const e = 0 | parseInt(n, 10);
 38439                          this.getToken();
 38440                          for (let a = 0; a < e; a++) {
 38441                            t = this.getToken();
 38442                            for (; "dup" !== t && "def" !== t; ) {
 38443                              t = this.getToken();
 38444                              if (null === t) return;
 38445                            }
 38446                            if ("def" === t) break;
 38447                            const e = this.readInt();
 38448                            this.getToken();
 38449                            const a = this.getToken();
 38450                            i[e] = a;
 38451                            this.getToken();
 38452                          }
 38453                        } else i = (0, r.getEncoding)(n);
 38454                        e.builtInEncoding = i;
 38455                        break;
 38456                      case "FontBBox":
 38457                        const s = this.readNumberArray();
 38458                        e.ascent = Math.max(s[3], s[1]);
 38459                        e.descent = Math.min(s[1], s[3]);
 38460                        e.ascentScaled = !0;
 38461                    }
 38462                  }
 38463              }
 38464            };
 38465          },
 38466          (e, t, a) => {
 38467            Object.defineProperty(t, "__esModule", { value: !0 });
 38468            t.Pattern = void 0;
 38469            t.clearPatternCaches = function clearPatternCaches() {
 38470              f = Object.create(null);
 38471            };
 38472            t.getTilingPatternIR = function getTilingPatternIR(e, t, a) {
 38473              const n = t.getArray("Matrix"),
 38474                i = r.Util.normalizeRect(t.getArray("BBox")),
 38475                s = t.get("XStep"),
 38476                o = t.get("YStep"),
 38477                c = t.get("PaintType"),
 38478                l = t.get("TilingType");
 38479              if (i[2] - i[0] == 0 || i[3] - i[1] == 0)
 38480                throw new r.FormatError(
 38481                  `Invalid getTilingPatternIR /BBox array: [${i}].`,
 38482                );
 38483              return ["TilingPattern", a, e, n, i, s, o, c, l];
 38484            };
 38485            var r = a(2),
 38486              n = a(5),
 38487              i = a(12),
 38488              s = a(3);
 38489            const o = 2,
 38490              c = 3,
 38491              l = 4,
 38492              h = 5,
 38493              u = 6,
 38494              d = 7;
 38495            t.Pattern = class Pattern {
 38496              constructor() {
 38497                (0, r.unreachable)("Cannot initialize Pattern.");
 38498              }
 38499              static parseShading(e, t, a, i, f) {
 38500                const g = e instanceof n.BaseStream ? e.dict : e,
 38501                  p = g.get("ShadingType");
 38502                try {
 38503                  switch (p) {
 38504                    case o:
 38505                    case c:
 38506                      return new RadialAxialShading(g, t, a, i, f);
 38507                    case l:
 38508                    case h:
 38509                    case u:
 38510                    case d:
 38511                      return new MeshShading(e, t, a, i, f);
 38512                    default:
 38513                      throw new r.FormatError("Unsupported ShadingType: " + p);
 38514                  }
 38515                } catch (e) {
 38516                  if (e instanceof s.MissingDataException) throw e;
 38517                  (0, r.warn)(e);
 38518                  return new DummyShading();
 38519                }
 38520              }
 38521            };
 38522            class BaseShading {
 38523              static SMALL_NUMBER = 1e-6;
 38524              constructor() {
 38525                this.constructor === BaseShading &&
 38526                  (0, r.unreachable)("Cannot initialize BaseShading.");
 38527              }
 38528              getIR() {
 38529                (0, r.unreachable)("Abstract method `getIR` called.");
 38530              }
 38531            }
 38532            class RadialAxialShading extends BaseShading {
 38533              constructor(e, t, a, n, s) {
 38534                super();
 38535                this.coordsArr = e.getArray("Coords");
 38536                this.shadingType = e.get("ShadingType");
 38537                const o = i.ColorSpace.parse({
 38538                    cs: e.getRaw("CS") || e.getRaw("ColorSpace"),
 38539                    xref: t,
 38540                    resources: a,
 38541                    pdfFunctionFactory: n,
 38542                    localColorSpaceCache: s,
 38543                  }),
 38544                  l = e.getArray("BBox");
 38545                this.bbox =
 38546                  Array.isArray(l) && 4 === l.length
 38547                    ? r.Util.normalizeRect(l)
 38548                    : null;
 38549                let h = 0,
 38550                  u = 1;
 38551                if (e.has("Domain")) {
 38552                  const t = e.getArray("Domain");
 38553                  h = t[0];
 38554                  u = t[1];
 38555                }
 38556                let d = !1,
 38557                  f = !1;
 38558                if (e.has("Extend")) {
 38559                  const t = e.getArray("Extend");
 38560                  d = t[0];
 38561                  f = t[1];
 38562                }
 38563                if (!(this.shadingType !== c || (d && f))) {
 38564                  const [e, t, a, n, i, s] = this.coordsArr,
 38565                    o = Math.hypot(e - n, t - i);
 38566                  a <= s + o &&
 38567                    s <= a + o &&
 38568                    (0, r.warn)("Unsupported radial gradient.");
 38569                }
 38570                this.extendStart = d;
 38571                this.extendEnd = f;
 38572                const g = e.getRaw("Function"),
 38573                  p = n.createFromArray(g),
 38574                  m = (u - h) / 840,
 38575                  b = (this.colorStops = []);
 38576                if (h >= u || m <= 0) {
 38577                  (0, r.info)("Bad shading domain.");
 38578                  return;
 38579                }
 38580                const y = new Float32Array(o.numComps),
 38581                  w = new Float32Array(1);
 38582                let S,
 38583                  x = 0;
 38584                w[0] = h;
 38585                p(w, 0, y, 0);
 38586                let C = o.getRgb(y, 0);
 38587                const k = r.Util.makeHexColor(C[0], C[1], C[2]);
 38588                b.push([0, k]);
 38589                let v = 1;
 38590                w[0] = h + m;
 38591                p(w, 0, y, 0);
 38592                let F = o.getRgb(y, 0),
 38593                  O = F[0] - C[0] + 1,
 38594                  T = F[1] - C[1] + 1,
 38595                  M = F[2] - C[2] + 1,
 38596                  D = F[0] - C[0] - 1,
 38597                  E = F[1] - C[1] - 1,
 38598                  N = F[2] - C[2] - 1;
 38599                for (let e = 2; e < 840; e++) {
 38600                  w[0] = h + e * m;
 38601                  p(w, 0, y, 0);
 38602                  S = o.getRgb(y, 0);
 38603                  const t = e - x;
 38604                  O = Math.min(O, (S[0] - C[0] + 1) / t);
 38605                  T = Math.min(T, (S[1] - C[1] + 1) / t);
 38606                  M = Math.min(M, (S[2] - C[2] + 1) / t);
 38607                  D = Math.max(D, (S[0] - C[0] - 1) / t);
 38608                  E = Math.max(E, (S[1] - C[1] - 1) / t);
 38609                  N = Math.max(N, (S[2] - C[2] - 1) / t);
 38610                  if (!(D <= O && E <= T && N <= M)) {
 38611                    const e = r.Util.makeHexColor(F[0], F[1], F[2]);
 38612                    b.push([v / 840, e]);
 38613                    O = S[0] - F[0] + 1;
 38614                    T = S[1] - F[1] + 1;
 38615                    M = S[2] - F[2] + 1;
 38616                    D = S[0] - F[0] - 1;
 38617                    E = S[1] - F[1] - 1;
 38618                    N = S[2] - F[2] - 1;
 38619                    x = v;
 38620                    C = F;
 38621                  }
 38622                  v = e;
 38623                  F = S;
 38624                }
 38625                const R = r.Util.makeHexColor(F[0], F[1], F[2]);
 38626                b.push([1, R]);
 38627                let L = "transparent";
 38628                if (e.has("Background")) {
 38629                  S = o.getRgb(e.get("Background"), 0);
 38630                  L = r.Util.makeHexColor(S[0], S[1], S[2]);
 38631                }
 38632                if (!d) {
 38633                  b.unshift([0, L]);
 38634                  b[1][0] += BaseShading.SMALL_NUMBER;
 38635                }
 38636                if (!f) {
 38637                  b.at(-1)[0] -= BaseShading.SMALL_NUMBER;
 38638                  b.push([1, L]);
 38639                }
 38640                this.colorStops = b;
 38641              }
 38642              getIR() {
 38643                const e = this.coordsArr,
 38644                  t = this.shadingType;
 38645                let a, n, i, s, l;
 38646                if (t === o) {
 38647                  n = [e[0], e[1]];
 38648                  i = [e[2], e[3]];
 38649                  s = null;
 38650                  l = null;
 38651                  a = "axial";
 38652                } else if (t === c) {
 38653                  n = [e[0], e[1]];
 38654                  i = [e[3], e[4]];
 38655                  s = e[2];
 38656                  l = e[5];
 38657                  a = "radial";
 38658                } else (0, r.unreachable)(`getPattern type unknown: ${t}`);
 38659                return ["RadialAxial", a, this.bbox, this.colorStops, n, i, s, l];
 38660              }
 38661            }
 38662            class MeshStreamReader {
 38663              constructor(e, t) {
 38664                this.stream = e;
 38665                this.context = t;
 38666                this.buffer = 0;
 38667                this.bufferLength = 0;
 38668                const a = t.numComps;
 38669                this.tmpCompsBuf = new Float32Array(a);
 38670                const r = t.colorSpace.numComps;
 38671                this.tmpCsCompsBuf = t.colorFn
 38672                  ? new Float32Array(r)
 38673                  : this.tmpCompsBuf;
 38674              }
 38675              get hasData() {
 38676                if (this.stream.end) return this.stream.pos < this.stream.end;
 38677                if (this.bufferLength > 0) return !0;
 38678                const e = this.stream.getByte();
 38679                if (e < 0) return !1;
 38680                this.buffer = e;
 38681                this.bufferLength = 8;
 38682                return !0;
 38683              }
 38684              readBits(e) {
 38685                let t = this.buffer,
 38686                  a = this.bufferLength;
 38687                if (32 === e) {
 38688                  if (0 === a)
 38689                    return (
 38690                      ((this.stream.getByte() << 24) |
 38691                        (this.stream.getByte() << 16) |
 38692                        (this.stream.getByte() << 8) |
 38693                        this.stream.getByte()) >>>
 38694                      0
 38695                    );
 38696                  t =
 38697                    (t << 24) |
 38698                    (this.stream.getByte() << 16) |
 38699                    (this.stream.getByte() << 8) |
 38700                    this.stream.getByte();
 38701                  const e = this.stream.getByte();
 38702                  this.buffer = e & ((1 << a) - 1);
 38703                  return ((t << (8 - a)) | ((255 & e) >> a)) >>> 0;
 38704                }
 38705                if (8 === e && 0 === a) return this.stream.getByte();
 38706                for (; a < e; ) {
 38707                  t = (t << 8) | this.stream.getByte();
 38708                  a += 8;
 38709                }
 38710                a -= e;
 38711                this.bufferLength = a;
 38712                this.buffer = t & ((1 << a) - 1);
 38713                return t >> a;
 38714              }
 38715              align() {
 38716                this.buffer = 0;
 38717                this.bufferLength = 0;
 38718              }
 38719              readFlag() {
 38720                return this.readBits(this.context.bitsPerFlag);
 38721              }
 38722              readCoordinate() {
 38723                const e = this.context.bitsPerCoordinate,
 38724                  t = this.readBits(e),
 38725                  a = this.readBits(e),
 38726                  r = this.context.decode,
 38727                  n = e < 32 ? 1 / ((1 << e) - 1) : 2.3283064365386963e-10;
 38728                return [
 38729                  t * n * (r[1] - r[0]) + r[0],
 38730                  a * n * (r[3] - r[2]) + r[2],
 38731                ];
 38732              }
 38733              readComponents() {
 38734                const e = this.context.numComps,
 38735                  t = this.context.bitsPerComponent,
 38736                  a = t < 32 ? 1 / ((1 << t) - 1) : 2.3283064365386963e-10,
 38737                  r = this.context.decode,
 38738                  n = this.tmpCompsBuf;
 38739                for (let i = 0, s = 4; i < e; i++, s += 2) {
 38740                  const e = this.readBits(t);
 38741                  n[i] = e * a * (r[s + 1] - r[s]) + r[s];
 38742                }
 38743                const i = this.tmpCsCompsBuf;
 38744                this.context.colorFn && this.context.colorFn(n, 0, i, 0);
 38745                return this.context.colorSpace.getRgb(i, 0);
 38746              }
 38747            }
 38748            let f = Object.create(null);
 38749            function getB(e) {
 38750              return (f[e] ||= (function buildB(e) {
 38751                const t = [];
 38752                for (let a = 0; a <= e; a++) {
 38753                  const r = a / e,
 38754                    n = 1 - r;
 38755                  t.push(
 38756                    new Float32Array([
 38757                      n ** 3,
 38758                      3 * r * n ** 2,
 38759                      3 * r ** 2 * n,
 38760                      r ** 3,
 38761                    ]),
 38762                  );
 38763                }
 38764                return t;
 38765              })(e));
 38766            }
 38767            class MeshShading extends BaseShading {
 38768              static MIN_SPLIT_PATCH_CHUNKS_AMOUNT = 3;
 38769              static MAX_SPLIT_PATCH_CHUNKS_AMOUNT = 20;
 38770              static TRIANGLE_DENSITY = 20;
 38771              constructor(e, t, a, s, o) {
 38772                super();
 38773                if (!(e instanceof n.BaseStream))
 38774                  throw new r.FormatError("Mesh data is not a stream");
 38775                const c = e.dict;
 38776                this.shadingType = c.get("ShadingType");
 38777                const f = c.getArray("BBox");
 38778                this.bbox =
 38779                  Array.isArray(f) && 4 === f.length
 38780                    ? r.Util.normalizeRect(f)
 38781                    : null;
 38782                const g = i.ColorSpace.parse({
 38783                  cs: c.getRaw("CS") || c.getRaw("ColorSpace"),
 38784                  xref: t,
 38785                  resources: a,
 38786                  pdfFunctionFactory: s,
 38787                  localColorSpaceCache: o,
 38788                });
 38789                this.background = c.has("Background")
 38790                  ? g.getRgb(c.get("Background"), 0)
 38791                  : null;
 38792                const p = c.getRaw("Function"),
 38793                  m = p ? s.createFromArray(p) : null;
 38794                this.coords = [];
 38795                this.colors = [];
 38796                this.figures = [];
 38797                const b = {
 38798                    bitsPerCoordinate: c.get("BitsPerCoordinate"),
 38799                    bitsPerComponent: c.get("BitsPerComponent"),
 38800                    bitsPerFlag: c.get("BitsPerFlag"),
 38801                    decode: c.getArray("Decode"),
 38802                    colorFn: m,
 38803                    colorSpace: g,
 38804                    numComps: m ? 1 : g.numComps,
 38805                  },
 38806                  y = new MeshStreamReader(e, b);
 38807                let w = !1;
 38808                switch (this.shadingType) {
 38809                  case l:
 38810                    this._decodeType4Shading(y);
 38811                    break;
 38812                  case h:
 38813                    const e = 0 | c.get("VerticesPerRow");
 38814                    if (e < 2) throw new r.FormatError("Invalid VerticesPerRow");
 38815                    this._decodeType5Shading(y, e);
 38816                    break;
 38817                  case u:
 38818                    this._decodeType6Shading(y);
 38819                    w = !0;
 38820                    break;
 38821                  case d:
 38822                    this._decodeType7Shading(y);
 38823                    w = !0;
 38824                    break;
 38825                  default:
 38826                    (0, r.unreachable)("Unsupported mesh type.");
 38827                }
 38828                if (w) {
 38829                  this._updateBounds();
 38830                  for (let e = 0, t = this.figures.length; e < t; e++)
 38831                    this._buildFigureFromPatch(e);
 38832                }
 38833                this._updateBounds();
 38834                this._packData();
 38835              }
 38836              _decodeType4Shading(e) {
 38837                const t = this.coords,
 38838                  a = this.colors,
 38839                  n = [],
 38840                  i = [];
 38841                let s = 0;
 38842                for (; e.hasData; ) {
 38843                  const o = e.readFlag(),
 38844                    c = e.readCoordinate(),
 38845                    l = e.readComponents();
 38846                  if (0 === s) {
 38847                    if (!(0 <= o && o <= 2))
 38848                      throw new r.FormatError("Unknown type4 flag");
 38849                    switch (o) {
 38850                      case 0:
 38851                        s = 3;
 38852                        break;
 38853                      case 1:
 38854                        i.push(i.at(-2), i.at(-1));
 38855                        s = 1;
 38856                        break;
 38857                      case 2:
 38858                        i.push(i.at(-3), i.at(-1));
 38859                        s = 1;
 38860                    }
 38861                    n.push(o);
 38862                  }
 38863                  i.push(t.length);
 38864                  t.push(c);
 38865                  a.push(l);
 38866                  s--;
 38867                  e.align();
 38868                }
 38869                this.figures.push({
 38870                  type: "triangles",
 38871                  coords: new Int32Array(i),
 38872                  colors: new Int32Array(i),
 38873                });
 38874              }
 38875              _decodeType5Shading(e, t) {
 38876                const a = this.coords,
 38877                  r = this.colors,
 38878                  n = [];
 38879                for (; e.hasData; ) {
 38880                  const t = e.readCoordinate(),
 38881                    i = e.readComponents();
 38882                  n.push(a.length);
 38883                  a.push(t);
 38884                  r.push(i);
 38885                }
 38886                this.figures.push({
 38887                  type: "lattice",
 38888                  coords: new Int32Array(n),
 38889                  colors: new Int32Array(n),
 38890                  verticesPerRow: t,
 38891                });
 38892              }
 38893              _decodeType6Shading(e) {
 38894                const t = this.coords,
 38895                  a = this.colors,
 38896                  n = new Int32Array(16),
 38897                  i = new Int32Array(4);
 38898                for (; e.hasData; ) {
 38899                  const s = e.readFlag();
 38900                  if (!(0 <= s && s <= 3))
 38901                    throw new r.FormatError("Unknown type6 flag");
 38902                  const o = t.length;
 38903                  for (let a = 0, r = 0 !== s ? 8 : 12; a < r; a++)
 38904                    t.push(e.readCoordinate());
 38905                  const c = a.length;
 38906                  for (let t = 0, r = 0 !== s ? 2 : 4; t < r; t++)
 38907                    a.push(e.readComponents());
 38908                  let l, h, u, d;
 38909                  switch (s) {
 38910                    case 0:
 38911                      n[12] = o + 3;
 38912                      n[13] = o + 4;
 38913                      n[14] = o + 5;
 38914                      n[15] = o + 6;
 38915                      n[8] = o + 2;
 38916                      n[11] = o + 7;
 38917                      n[4] = o + 1;
 38918                      n[7] = o + 8;
 38919                      n[0] = o;
 38920                      n[1] = o + 11;
 38921                      n[2] = o + 10;
 38922                      n[3] = o + 9;
 38923                      i[2] = c + 1;
 38924                      i[3] = c + 2;
 38925                      i[0] = c;
 38926                      i[1] = c + 3;
 38927                      break;
 38928                    case 1:
 38929                      l = n[12];
 38930                      h = n[13];
 38931                      u = n[14];
 38932                      d = n[15];
 38933                      n[12] = d;
 38934                      n[13] = o + 0;
 38935                      n[14] = o + 1;
 38936                      n[15] = o + 2;
 38937                      n[8] = u;
 38938                      n[11] = o + 3;
 38939                      n[4] = h;
 38940                      n[7] = o + 4;
 38941                      n[0] = l;
 38942                      n[1] = o + 7;
 38943                      n[2] = o + 6;
 38944                      n[3] = o + 5;
 38945                      l = i[2];
 38946                      h = i[3];
 38947                      i[2] = h;
 38948                      i[3] = c;
 38949                      i[0] = l;
 38950                      i[1] = c + 1;
 38951                      break;
 38952                    case 2:
 38953                      l = n[15];
 38954                      h = n[11];
 38955                      n[12] = n[3];
 38956                      n[13] = o + 0;
 38957                      n[14] = o + 1;
 38958                      n[15] = o + 2;
 38959                      n[8] = n[7];
 38960                      n[11] = o + 3;
 38961                      n[4] = h;
 38962                      n[7] = o + 4;
 38963                      n[0] = l;
 38964                      n[1] = o + 7;
 38965                      n[2] = o + 6;
 38966                      n[3] = o + 5;
 38967                      l = i[3];
 38968                      i[2] = i[1];
 38969                      i[3] = c;
 38970                      i[0] = l;
 38971                      i[1] = c + 1;
 38972                      break;
 38973                    case 3:
 38974                      n[12] = n[0];
 38975                      n[13] = o + 0;
 38976                      n[14] = o + 1;
 38977                      n[15] = o + 2;
 38978                      n[8] = n[1];
 38979                      n[11] = o + 3;
 38980                      n[4] = n[2];
 38981                      n[7] = o + 4;
 38982                      n[0] = n[3];
 38983                      n[1] = o + 7;
 38984                      n[2] = o + 6;
 38985                      n[3] = o + 5;
 38986                      i[2] = i[0];
 38987                      i[3] = c;
 38988                      i[0] = i[1];
 38989                      i[1] = c + 1;
 38990                  }
 38991                  n[5] = t.length;
 38992                  t.push([
 38993                    (-4 * t[n[0]][0] -
 38994                      t[n[15]][0] +
 38995                      6 * (t[n[4]][0] + t[n[1]][0]) -
 38996                      2 * (t[n[12]][0] + t[n[3]][0]) +
 38997                      3 * (t[n[13]][0] + t[n[7]][0])) /
 38998                      9,
 38999                    (-4 * t[n[0]][1] -
 39000                      t[n[15]][1] +
 39001                      6 * (t[n[4]][1] + t[n[1]][1]) -
 39002                      2 * (t[n[12]][1] + t[n[3]][1]) +
 39003                      3 * (t[n[13]][1] + t[n[7]][1])) /
 39004                      9,
 39005                  ]);
 39006                  n[6] = t.length;
 39007                  t.push([
 39008                    (-4 * t[n[3]][0] -
 39009                      t[n[12]][0] +
 39010                      6 * (t[n[2]][0] + t[n[7]][0]) -
 39011                      2 * (t[n[0]][0] + t[n[15]][0]) +
 39012                      3 * (t[n[4]][0] + t[n[14]][0])) /
 39013                      9,
 39014                    (-4 * t[n[3]][1] -
 39015                      t[n[12]][1] +
 39016                      6 * (t[n[2]][1] + t[n[7]][1]) -
 39017                      2 * (t[n[0]][1] + t[n[15]][1]) +
 39018                      3 * (t[n[4]][1] + t[n[14]][1])) /
 39019                      9,
 39020                  ]);
 39021                  n[9] = t.length;
 39022                  t.push([
 39023                    (-4 * t[n[12]][0] -
 39024                      t[n[3]][0] +
 39025                      6 * (t[n[8]][0] + t[n[13]][0]) -
 39026                      2 * (t[n[0]][0] + t[n[15]][0]) +
 39027                      3 * (t[n[11]][0] + t[n[1]][0])) /
 39028                      9,
 39029                    (-4 * t[n[12]][1] -
 39030                      t[n[3]][1] +
 39031                      6 * (t[n[8]][1] + t[n[13]][1]) -
 39032                      2 * (t[n[0]][1] + t[n[15]][1]) +
 39033                      3 * (t[n[11]][1] + t[n[1]][1])) /
 39034                      9,
 39035                  ]);
 39036                  n[10] = t.length;
 39037                  t.push([
 39038                    (-4 * t[n[15]][0] -
 39039                      t[n[0]][0] +
 39040                      6 * (t[n[11]][0] + t[n[14]][0]) -
 39041                      2 * (t[n[12]][0] + t[n[3]][0]) +
 39042                      3 * (t[n[2]][0] + t[n[8]][0])) /
 39043                      9,
 39044                    (-4 * t[n[15]][1] -
 39045                      t[n[0]][1] +
 39046                      6 * (t[n[11]][1] + t[n[14]][1]) -
 39047                      2 * (t[n[12]][1] + t[n[3]][1]) +
 39048                      3 * (t[n[2]][1] + t[n[8]][1])) /
 39049                      9,
 39050                  ]);
 39051                  this.figures.push({
 39052                    type: "patch",
 39053                    coords: new Int32Array(n),
 39054                    colors: new Int32Array(i),
 39055                  });
 39056                }
 39057              }
 39058              _decodeType7Shading(e) {
 39059                const t = this.coords,
 39060                  a = this.colors,
 39061                  n = new Int32Array(16),
 39062                  i = new Int32Array(4);
 39063                for (; e.hasData; ) {
 39064                  const s = e.readFlag();
 39065                  if (!(0 <= s && s <= 3))
 39066                    throw new r.FormatError("Unknown type7 flag");
 39067                  const o = t.length;
 39068                  for (let a = 0, r = 0 !== s ? 12 : 16; a < r; a++)
 39069                    t.push(e.readCoordinate());
 39070                  const c = a.length;
 39071                  for (let t = 0, r = 0 !== s ? 2 : 4; t < r; t++)
 39072                    a.push(e.readComponents());
 39073                  let l, h, u, d;
 39074                  switch (s) {
 39075                    case 0:
 39076                      n[12] = o + 3;
 39077                      n[13] = o + 4;
 39078                      n[14] = o + 5;
 39079                      n[15] = o + 6;
 39080                      n[8] = o + 2;
 39081                      n[9] = o + 13;
 39082                      n[10] = o + 14;
 39083                      n[11] = o + 7;
 39084                      n[4] = o + 1;
 39085                      n[5] = o + 12;
 39086                      n[6] = o + 15;
 39087                      n[7] = o + 8;
 39088                      n[0] = o;
 39089                      n[1] = o + 11;
 39090                      n[2] = o + 10;
 39091                      n[3] = o + 9;
 39092                      i[2] = c + 1;
 39093                      i[3] = c + 2;
 39094                      i[0] = c;
 39095                      i[1] = c + 3;
 39096                      break;
 39097                    case 1:
 39098                      l = n[12];
 39099                      h = n[13];
 39100                      u = n[14];
 39101                      d = n[15];
 39102                      n[12] = d;
 39103                      n[13] = o + 0;
 39104                      n[14] = o + 1;
 39105                      n[15] = o + 2;
 39106                      n[8] = u;
 39107                      n[9] = o + 9;
 39108                      n[10] = o + 10;
 39109                      n[11] = o + 3;
 39110                      n[4] = h;
 39111                      n[5] = o + 8;
 39112                      n[6] = o + 11;
 39113                      n[7] = o + 4;
 39114                      n[0] = l;
 39115                      n[1] = o + 7;
 39116                      n[2] = o + 6;
 39117                      n[3] = o + 5;
 39118                      l = i[2];
 39119                      h = i[3];
 39120                      i[2] = h;
 39121                      i[3] = c;
 39122                      i[0] = l;
 39123                      i[1] = c + 1;
 39124                      break;
 39125                    case 2:
 39126                      l = n[15];
 39127                      h = n[11];
 39128                      n[12] = n[3];
 39129                      n[13] = o + 0;
 39130                      n[14] = o + 1;
 39131                      n[15] = o + 2;
 39132                      n[8] = n[7];
 39133                      n[9] = o + 9;
 39134                      n[10] = o + 10;
 39135                      n[11] = o + 3;
 39136                      n[4] = h;
 39137                      n[5] = o + 8;
 39138                      n[6] = o + 11;
 39139                      n[7] = o + 4;
 39140                      n[0] = l;
 39141                      n[1] = o + 7;
 39142                      n[2] = o + 6;
 39143                      n[3] = o + 5;
 39144                      l = i[3];
 39145                      i[2] = i[1];
 39146                      i[3] = c;
 39147                      i[0] = l;
 39148                      i[1] = c + 1;
 39149                      break;
 39150                    case 3:
 39151                      n[12] = n[0];
 39152                      n[13] = o + 0;
 39153                      n[14] = o + 1;
 39154                      n[15] = o + 2;
 39155                      n[8] = n[1];
 39156                      n[9] = o + 9;
 39157                      n[10] = o + 10;
 39158                      n[11] = o + 3;
 39159                      n[4] = n[2];
 39160                      n[5] = o + 8;
 39161                      n[6] = o + 11;
 39162                      n[7] = o + 4;
 39163                      n[0] = n[3];
 39164                      n[1] = o + 7;
 39165                      n[2] = o + 6;
 39166                      n[3] = o + 5;
 39167                      i[2] = i[0];
 39168                      i[3] = c;
 39169                      i[0] = i[1];
 39170                      i[1] = c + 1;
 39171                  }
 39172                  this.figures.push({
 39173                    type: "patch",
 39174                    coords: new Int32Array(n),
 39175                    colors: new Int32Array(i),
 39176                  });
 39177                }
 39178              }
 39179              _buildFigureFromPatch(e) {
 39180                const t = this.figures[e];
 39181                (0, r.assert)("patch" === t.type, "Unexpected patch mesh figure");
 39182                const a = this.coords,
 39183                  n = this.colors,
 39184                  i = t.coords,
 39185                  s = t.colors,
 39186                  o = Math.min(a[i[0]][0], a[i[3]][0], a[i[12]][0], a[i[15]][0]),
 39187                  c = Math.min(a[i[0]][1], a[i[3]][1], a[i[12]][1], a[i[15]][1]),
 39188                  l = Math.max(a[i[0]][0], a[i[3]][0], a[i[12]][0], a[i[15]][0]),
 39189                  h = Math.max(a[i[0]][1], a[i[3]][1], a[i[12]][1], a[i[15]][1]);
 39190                let u = Math.ceil(
 39191                  ((l - o) * MeshShading.TRIANGLE_DENSITY) /
 39192                    (this.bounds[2] - this.bounds[0]),
 39193                );
 39194                u = Math.max(
 39195                  MeshShading.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,
 39196                  Math.min(MeshShading.MAX_SPLIT_PATCH_CHUNKS_AMOUNT, u),
 39197                );
 39198                let d = Math.ceil(
 39199                  ((h - c) * MeshShading.TRIANGLE_DENSITY) /
 39200                    (this.bounds[3] - this.bounds[1]),
 39201                );
 39202                d = Math.max(
 39203                  MeshShading.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,
 39204                  Math.min(MeshShading.MAX_SPLIT_PATCH_CHUNKS_AMOUNT, d),
 39205                );
 39206                const f = u + 1,
 39207                  g = new Int32Array((d + 1) * f),
 39208                  p = new Int32Array((d + 1) * f);
 39209                let m = 0;
 39210                const b = new Uint8Array(3),
 39211                  y = new Uint8Array(3),
 39212                  w = n[s[0]],
 39213                  S = n[s[1]],
 39214                  x = n[s[2]],
 39215                  C = n[s[3]],
 39216                  k = getB(d),
 39217                  v = getB(u);
 39218                for (let e = 0; e <= d; e++) {
 39219                  b[0] = ((w[0] * (d - e) + x[0] * e) / d) | 0;
 39220                  b[1] = ((w[1] * (d - e) + x[1] * e) / d) | 0;
 39221                  b[2] = ((w[2] * (d - e) + x[2] * e) / d) | 0;
 39222                  y[0] = ((S[0] * (d - e) + C[0] * e) / d) | 0;
 39223                  y[1] = ((S[1] * (d - e) + C[1] * e) / d) | 0;
 39224                  y[2] = ((S[2] * (d - e) + C[2] * e) / d) | 0;
 39225                  for (let t = 0; t <= u; t++, m++) {
 39226                    if (!((0 !== e && e !== d) || (0 !== t && t !== u))) continue;
 39227                    let r = 0,
 39228                      s = 0,
 39229                      o = 0;
 39230                    for (let n = 0; n <= 3; n++)
 39231                      for (let c = 0; c <= 3; c++, o++) {
 39232                        const l = k[e][n] * v[t][c];
 39233                        r += a[i[o]][0] * l;
 39234                        s += a[i[o]][1] * l;
 39235                      }
 39236                    g[m] = a.length;
 39237                    a.push([r, s]);
 39238                    p[m] = n.length;
 39239                    const c = new Uint8Array(3);
 39240                    c[0] = ((b[0] * (u - t) + y[0] * t) / u) | 0;
 39241                    c[1] = ((b[1] * (u - t) + y[1] * t) / u) | 0;
 39242                    c[2] = ((b[2] * (u - t) + y[2] * t) / u) | 0;
 39243                    n.push(c);
 39244                  }
 39245                }
 39246                g[0] = i[0];
 39247                p[0] = s[0];
 39248                g[u] = i[3];
 39249                p[u] = s[1];
 39250                g[f * d] = i[12];
 39251                p[f * d] = s[2];
 39252                g[f * d + u] = i[15];
 39253                p[f * d + u] = s[3];
 39254                this.figures[e] = {
 39255                  type: "lattice",
 39256                  coords: g,
 39257                  colors: p,
 39258                  verticesPerRow: f,
 39259                };
 39260              }
 39261              _updateBounds() {
 39262                let e = this.coords[0][0],
 39263                  t = this.coords[0][1],
 39264                  a = e,
 39265                  r = t;
 39266                for (let n = 1, i = this.coords.length; n < i; n++) {
 39267                  const i = this.coords[n][0],
 39268                    s = this.coords[n][1];
 39269                  e = e > i ? i : e;
 39270                  t = t > s ? s : t;
 39271                  a = a < i ? i : a;
 39272                  r = r < s ? s : r;
 39273                }
 39274                this.bounds = [e, t, a, r];
 39275              }
 39276              _packData() {
 39277                let e, t, a, r;
 39278                const n = this.coords,
 39279                  i = new Float32Array(2 * n.length);
 39280                for (e = 0, a = 0, t = n.length; e < t; e++) {
 39281                  const t = n[e];
 39282                  i[a++] = t[0];
 39283                  i[a++] = t[1];
 39284                }
 39285                this.coords = i;
 39286                const s = this.colors,
 39287                  o = new Uint8Array(3 * s.length);
 39288                for (e = 0, a = 0, t = s.length; e < t; e++) {
 39289                  const t = s[e];
 39290                  o[a++] = t[0];
 39291                  o[a++] = t[1];
 39292                  o[a++] = t[2];
 39293                }
 39294                this.colors = o;
 39295                const c = this.figures;
 39296                for (e = 0, t = c.length; e < t; e++) {
 39297                  const t = c[e],
 39298                    n = t.coords,
 39299                    i = t.colors;
 39300                  for (a = 0, r = n.length; a < r; a++) {
 39301                    n[a] *= 2;
 39302                    i[a] *= 3;
 39303                  }
 39304                }
 39305              }
 39306              getIR() {
 39307                return [
 39308                  "Mesh",
 39309                  this.shadingType,
 39310                  this.coords,
 39311                  this.colors,
 39312                  this.figures,
 39313                  this.bounds,
 39314                  this.bbox,
 39315                  this.background,
 39316                ];
 39317              }
 39318            }
 39319            class DummyShading extends BaseShading {
 39320              getIR() {
 39321                return ["Dummy"];
 39322              }
 39323            }
 39324          },
 39325          (e, t, a) => {
 39326            Object.defineProperty(t, "__esModule", { value: !0 });
 39327            t.getXfaFontDict = function getXfaFontDict(e) {
 39328              const t = (function getXfaFontWidths(e) {
 39329                  const t = getXfaFontName(e);
 39330                  if (!t) return null;
 39331                  const { baseWidths: a, baseMapping: r, factors: n } = t,
 39332                    i = n ? a.map((e, t) => e * n[t]) : a;
 39333                  let s,
 39334                    o = -2;
 39335                  const c = [];
 39336                  for (const [e, t] of r
 39337                    .map((e, t) => [e, t])
 39338                    .sort(([e], [t]) => e - t))
 39339                    if (-1 !== e)
 39340                      if (e === o + 1) {
 39341                        s.push(i[t]);
 39342                        o += 1;
 39343                      } else {
 39344                        o = e;
 39345                        s = [i[t]];
 39346                        c.push(e, s);
 39347                      }
 39348                  return c;
 39349                })(e),
 39350                a = new n.Dict(null);
 39351              a.set("BaseFont", n.Name.get(e));
 39352              a.set("Type", n.Name.get("Font"));
 39353              a.set("Subtype", n.Name.get("CIDFontType2"));
 39354              a.set("Encoding", n.Name.get("Identity-H"));
 39355              a.set("CIDToGIDMap", n.Name.get("Identity"));
 39356              a.set("W", t);
 39357              a.set("FirstChar", t[0]);
 39358              a.set("LastChar", t.at(-2) + t.at(-1).length - 1);
 39359              const r = new n.Dict(null);
 39360              a.set("FontDescriptor", r);
 39361              const i = new n.Dict(null);
 39362              i.set("Ordering", "Identity");
 39363              i.set("Registry", "Adobe");
 39364              i.set("Supplement", 0);
 39365              a.set("CIDSystemInfo", i);
 39366              return a;
 39367            };
 39368            t.getXfaFontName = getXfaFontName;
 39369            var r = a(52),
 39370              n = a(4),
 39371              i = a(53),
 39372              s = a(54),
 39373              o = a(55),
 39374              c = a(56),
 39375              l = a(3),
 39376              h = a(38);
 39377            const u = (0, l.getLookupTableFactory)(function (e) {
 39378              e["MyriadPro-Regular"] = e["PdfJS-Fallback-Regular"] = {
 39379                name: "LiberationSans-Regular",
 39380                factors: o.MyriadProRegularFactors,
 39381                baseWidths: s.LiberationSansRegularWidths,
 39382                baseMapping: s.LiberationSansRegularMapping,
 39383                metrics: o.MyriadProRegularMetrics,
 39384              };
 39385              e["MyriadPro-Bold"] = e["PdfJS-Fallback-Bold"] = {
 39386                name: "LiberationSans-Bold",
 39387                factors: o.MyriadProBoldFactors,
 39388                baseWidths: s.LiberationSansBoldWidths,
 39389                baseMapping: s.LiberationSansBoldMapping,
 39390                metrics: o.MyriadProBoldMetrics,
 39391              };
 39392              e["MyriadPro-It"] =
 39393                e["MyriadPro-Italic"] =
 39394                e["PdfJS-Fallback-Italic"] =
 39395                  {
 39396                    name: "LiberationSans-Italic",
 39397                    factors: o.MyriadProItalicFactors,
 39398                    baseWidths: s.LiberationSansItalicWidths,
 39399                    baseMapping: s.LiberationSansItalicMapping,
 39400                    metrics: o.MyriadProItalicMetrics,
 39401                  };
 39402              e["MyriadPro-BoldIt"] =
 39403                e["MyriadPro-BoldItalic"] =
 39404                e["PdfJS-Fallback-BoldItalic"] =
 39405                  {
 39406                    name: "LiberationSans-BoldItalic",
 39407                    factors: o.MyriadProBoldItalicFactors,
 39408                    baseWidths: s.LiberationSansBoldItalicWidths,
 39409                    baseMapping: s.LiberationSansBoldItalicMapping,
 39410                    metrics: o.MyriadProBoldItalicMetrics,
 39411                  };
 39412              e.ArialMT =
 39413                e.Arial =
 39414                e["Arial-Regular"] =
 39415                  {
 39416                    name: "LiberationSans-Regular",
 39417                    baseWidths: s.LiberationSansRegularWidths,
 39418                    baseMapping: s.LiberationSansRegularMapping,
 39419                  };
 39420              e["Arial-BoldMT"] = e["Arial-Bold"] = {
 39421                name: "LiberationSans-Bold",
 39422                baseWidths: s.LiberationSansBoldWidths,
 39423                baseMapping: s.LiberationSansBoldMapping,
 39424              };
 39425              e["Arial-ItalicMT"] = e["Arial-Italic"] = {
 39426                name: "LiberationSans-Italic",
 39427                baseWidths: s.LiberationSansItalicWidths,
 39428                baseMapping: s.LiberationSansItalicMapping,
 39429              };
 39430              e["Arial-BoldItalicMT"] = e["Arial-BoldItalic"] = {
 39431                name: "LiberationSans-BoldItalic",
 39432                baseWidths: s.LiberationSansBoldItalicWidths,
 39433                baseMapping: s.LiberationSansBoldItalicMapping,
 39434              };
 39435              e["Calibri-Regular"] = {
 39436                name: "LiberationSans-Regular",
 39437                factors: r.CalibriRegularFactors,
 39438                baseWidths: s.LiberationSansRegularWidths,
 39439                baseMapping: s.LiberationSansRegularMapping,
 39440                metrics: r.CalibriRegularMetrics,
 39441              };
 39442              e["Calibri-Bold"] = {
 39443                name: "LiberationSans-Bold",
 39444                factors: r.CalibriBoldFactors,
 39445                baseWidths: s.LiberationSansBoldWidths,
 39446                baseMapping: s.LiberationSansBoldMapping,
 39447                metrics: r.CalibriBoldMetrics,
 39448              };
 39449              e["Calibri-Italic"] = {
 39450                name: "LiberationSans-Italic",
 39451                factors: r.CalibriItalicFactors,
 39452                baseWidths: s.LiberationSansItalicWidths,
 39453                baseMapping: s.LiberationSansItalicMapping,
 39454                metrics: r.CalibriItalicMetrics,
 39455              };
 39456              e["Calibri-BoldItalic"] = {
 39457                name: "LiberationSans-BoldItalic",
 39458                factors: r.CalibriBoldItalicFactors,
 39459                baseWidths: s.LiberationSansBoldItalicWidths,
 39460                baseMapping: s.LiberationSansBoldItalicMapping,
 39461                metrics: r.CalibriBoldItalicMetrics,
 39462              };
 39463              e["Segoeui-Regular"] = {
 39464                name: "LiberationSans-Regular",
 39465                factors: c.SegoeuiRegularFactors,
 39466                baseWidths: s.LiberationSansRegularWidths,
 39467                baseMapping: s.LiberationSansRegularMapping,
 39468                metrics: c.SegoeuiRegularMetrics,
 39469              };
 39470              e["Segoeui-Bold"] = {
 39471                name: "LiberationSans-Bold",
 39472                factors: c.SegoeuiBoldFactors,
 39473                baseWidths: s.LiberationSansBoldWidths,
 39474                baseMapping: s.LiberationSansBoldMapping,
 39475                metrics: c.SegoeuiBoldMetrics,
 39476              };
 39477              e["Segoeui-Italic"] = {
 39478                name: "LiberationSans-Italic",
 39479                factors: c.SegoeuiItalicFactors,
 39480                baseWidths: s.LiberationSansItalicWidths,
 39481                baseMapping: s.LiberationSansItalicMapping,
 39482                metrics: c.SegoeuiItalicMetrics,
 39483              };
 39484              e["Segoeui-BoldItalic"] = {
 39485                name: "LiberationSans-BoldItalic",
 39486                factors: c.SegoeuiBoldItalicFactors,
 39487                baseWidths: s.LiberationSansBoldItalicWidths,
 39488                baseMapping: s.LiberationSansBoldItalicMapping,
 39489                metrics: c.SegoeuiBoldItalicMetrics,
 39490              };
 39491              e["Helvetica-Regular"] = e.Helvetica = {
 39492                name: "LiberationSans-Regular",
 39493                factors: i.HelveticaRegularFactors,
 39494                baseWidths: s.LiberationSansRegularWidths,
 39495                baseMapping: s.LiberationSansRegularMapping,
 39496                metrics: i.HelveticaRegularMetrics,
 39497              };
 39498              e["Helvetica-Bold"] = {
 39499                name: "LiberationSans-Bold",
 39500                factors: i.HelveticaBoldFactors,
 39501                baseWidths: s.LiberationSansBoldWidths,
 39502                baseMapping: s.LiberationSansBoldMapping,
 39503                metrics: i.HelveticaBoldMetrics,
 39504              };
 39505              e["Helvetica-Italic"] = {
 39506                name: "LiberationSans-Italic",
 39507                factors: i.HelveticaItalicFactors,
 39508                baseWidths: s.LiberationSansItalicWidths,
 39509                baseMapping: s.LiberationSansItalicMapping,
 39510                metrics: i.HelveticaItalicMetrics,
 39511              };
 39512              e["Helvetica-BoldItalic"] = {
 39513                name: "LiberationSans-BoldItalic",
 39514                factors: i.HelveticaBoldItalicFactors,
 39515                baseWidths: s.LiberationSansBoldItalicWidths,
 39516                baseMapping: s.LiberationSansBoldItalicMapping,
 39517                metrics: i.HelveticaBoldItalicMetrics,
 39518              };
 39519            });
 39520            function getXfaFontName(e) {
 39521              const t = (0, h.normalizeFontName)(e);
 39522              return u()[t];
 39523            }
 39524          },
 39525          (e, t) => {
 39526            Object.defineProperty(t, "__esModule", { value: !0 });
 39527            t.CalibriRegularMetrics =
 39528              t.CalibriRegularFactors =
 39529              t.CalibriItalicMetrics =
 39530              t.CalibriItalicFactors =
 39531              t.CalibriBoldMetrics =
 39532              t.CalibriBoldItalicMetrics =
 39533              t.CalibriBoldItalicFactors =
 39534              t.CalibriBoldFactors =
 39535                void 0;
 39536            t.CalibriBoldFactors = [
 39537              1.3877, 1, 1, 1, 0.97801, 0.92482, 0.89552, 0.91133, 0.81988,
 39538              0.97566, 0.98152, 0.93548, 0.93548, 1.2798, 0.85284, 0.92794, 1,
 39539              0.96134, 1.54657, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133,
 39540              0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.82845, 0.82845,
 39541              0.85284, 0.85284, 0.85284, 0.75859, 0.92138, 0.83908, 0.7762,
 39542              0.73293, 0.87289, 0.73133, 0.7514, 0.81921, 0.87356, 0.95958,
 39543              0.59526, 0.75727, 0.69225, 1.04924, 0.9121, 0.86943, 0.79795,
 39544              0.88198, 0.77958, 0.70864, 0.81055, 0.90399, 0.88653, 0.96017,
 39545              0.82577, 0.77892, 0.78257, 0.97507, 1.54657, 0.97507, 0.85284,
 39546              0.89552, 0.90176, 0.88762, 0.8785, 0.75241, 0.8785, 0.90518,
 39547              0.95015, 0.77618, 0.8785, 0.88401, 0.91916, 0.86304, 0.88401,
 39548              0.91488, 0.8785, 0.8801, 0.8785, 0.8785, 0.91343, 0.7173, 1.04106,
 39549              0.8785, 0.85075, 0.95794, 0.82616, 0.85162, 0.79492, 0.88331,
 39550              1.69808, 0.88331, 0.85284, 0.97801, 0.89552, 0.91133, 0.89552,
 39551              0.91133, 1.7801, 0.89552, 1.24487, 1.13254, 1.12401, 0.96839,
 39552              0.85284, 0.68787, 0.70645, 0.85592, 0.90747, 1.01466, 1.0088,
 39553              0.90323, 1, 1.07463, 1, 0.91056, 0.75806, 1.19118, 0.96839, 0.78864,
 39554              0.82845, 0.84133, 0.75859, 0.83908, 0.83908, 0.83908, 0.83908,
 39555              0.83908, 0.83908, 0.77539, 0.73293, 0.73133, 0.73133, 0.73133,
 39556              0.73133, 0.95958, 0.95958, 0.95958, 0.95958, 0.88506, 0.9121,
 39557              0.86943, 0.86943, 0.86943, 0.86943, 0.86943, 0.85284, 0.87508,
 39558              0.90399, 0.90399, 0.90399, 0.90399, 0.77892, 0.79795, 0.90807,
 39559              0.88762, 0.88762, 0.88762, 0.88762, 0.88762, 0.88762, 0.8715,
 39560              0.75241, 0.90518, 0.90518, 0.90518, 0.90518, 0.88401, 0.88401,
 39561              0.88401, 0.88401, 0.8785, 0.8785, 0.8801, 0.8801, 0.8801, 0.8801,
 39562              0.8801, 0.90747, 0.89049, 0.8785, 0.8785, 0.8785, 0.8785, 0.85162,
 39563              0.8785, 0.85162, 0.83908, 0.88762, 0.83908, 0.88762, 0.83908,
 39564              0.88762, 0.73293, 0.75241, 0.73293, 0.75241, 0.73293, 0.75241,
 39565              0.73293, 0.75241, 0.87289, 0.83016, 0.88506, 0.93125, 0.73133,
 39566              0.90518, 0.73133, 0.90518, 0.73133, 0.90518, 0.73133, 0.90518,
 39567              0.73133, 0.90518, 0.81921, 0.77618, 0.81921, 0.77618, 0.81921,
 39568              0.77618, 1, 1, 0.87356, 0.8785, 0.91075, 0.89608, 0.95958, 0.88401,
 39569              0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958,
 39570              0.88401, 0.76229, 0.90167, 0.59526, 0.91916, 1, 1, 0.86304, 0.69225,
 39571              0.88401, 1, 1, 0.70424, 0.79468, 0.91926, 0.88175, 0.70823, 0.94903,
 39572              0.9121, 0.8785, 1, 1, 0.9121, 0.8785, 0.87802, 0.88656, 0.8785,
 39573              0.86943, 0.8801, 0.86943, 0.8801, 0.86943, 0.8801, 0.87402, 0.89291,
 39574              0.77958, 0.91343, 1, 1, 0.77958, 0.91343, 0.70864, 0.7173, 0.70864,
 39575              0.7173, 0.70864, 0.7173, 0.70864, 0.7173, 1, 1, 0.81055, 0.75841,
 39576              0.81055, 1.06452, 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785,
 39577              0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, 0.96017, 0.95794,
 39578              0.77892, 0.85162, 0.77892, 0.78257, 0.79492, 0.78257, 0.79492,
 39579              0.78257, 0.79492, 0.9297, 0.56892, 0.83908, 0.88762, 0.77539,
 39580              0.8715, 0.87508, 0.89049, 1, 1, 0.81055, 1.04106, 1.20528, 1.20528,
 39581              1, 1.15543, 0.70674, 0.98387, 0.94721, 1.33431, 1.45894, 0.95161,
 39582              1.06303, 0.83908, 0.80352, 0.57184, 0.6965, 0.56289, 0.82001,
 39583              0.56029, 0.81235, 1.02988, 0.83908, 0.7762, 0.68156, 0.80367,
 39584              0.73133, 0.78257, 0.87356, 0.86943, 0.95958, 0.75727, 0.89019,
 39585              1.04924, 0.9121, 0.7648, 0.86943, 0.87356, 0.79795, 0.78275,
 39586              0.81055, 0.77892, 0.9762, 0.82577, 0.99819, 0.84896, 0.95958,
 39587              0.77892, 0.96108, 1.01407, 0.89049, 1.02988, 0.94211, 0.96108,
 39588              0.8936, 0.84021, 0.87842, 0.96399, 0.79109, 0.89049, 1.00813,
 39589              1.02988, 0.86077, 0.87445, 0.92099, 0.84723, 0.86513, 0.8801,
 39590              0.75638, 0.85714, 0.78216, 0.79586, 0.87965, 0.94211, 0.97747,
 39591              0.78287, 0.97926, 0.84971, 1.02988, 0.94211, 0.8801, 0.94211,
 39592              0.84971, 0.73133, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90264, 1, 1,
 39593              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39594              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39595              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90518, 1, 1,
 39596              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90548, 1, 1, 1, 1, 1, 1, 0.96017,
 39597              0.95794, 0.96017, 0.95794, 0.96017, 0.95794, 0.77892, 0.85162, 1, 1,
 39598              0.89552, 0.90527, 1, 0.90363, 0.92794, 0.92794, 0.92794, 0.92794,
 39599              0.87012, 0.87012, 0.87012, 0.89552, 0.89552, 1.42259, 0.71143,
 39600              1.06152, 1, 1, 1.03372, 1.03372, 0.97171, 1.4956, 2.2807, 0.93835,
 39601              0.83406, 0.91133, 0.84107, 0.91133, 1, 1, 1, 0.72021, 1, 1.23108,
 39602              0.83489, 0.88525, 0.88525, 0.81499, 0.90527, 1.81055, 0.90527,
 39603              1.81055, 1.31006, 1.53711, 0.94434, 1.08696, 1, 0.95018, 0.77192,
 39604              0.85284, 0.90747, 1.17534, 0.69825, 0.9716, 1.37077, 0.90747,
 39605              0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941,
 39606              0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1,
 39607              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39608              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862,
 39609              0.99862, 1, 1, 1, 1, 1, 1.08004, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1,
 39610              1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90727, 0.90727, 1, 1, 1, 1, 1, 1, 1, 1,
 39611              1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39612            ];
 39613            t.CalibriBoldMetrics = { lineHeight: 1.2207, lineGap: 0.2207 };
 39614            t.CalibriBoldItalicFactors = [
 39615              1.3877, 1, 1, 1, 0.97801, 0.92482, 0.89552, 0.91133, 0.81988,
 39616              0.97566, 0.98152, 0.93548, 0.93548, 1.2798, 0.85284, 0.92794, 1,
 39617              0.96134, 1.56239, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133,
 39618              0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.82845, 0.82845,
 39619              0.85284, 0.85284, 0.85284, 0.75859, 0.92138, 0.83908, 0.7762,
 39620              0.71805, 0.87289, 0.73133, 0.7514, 0.81921, 0.87356, 0.95958,
 39621              0.59526, 0.75727, 0.69225, 1.04924, 0.90872, 0.85938, 0.79795,
 39622              0.87068, 0.77958, 0.69766, 0.81055, 0.90399, 0.88653, 0.96068,
 39623              0.82577, 0.77892, 0.78257, 0.97507, 1.529, 0.97507, 0.85284,
 39624              0.89552, 0.90176, 0.94908, 0.86411, 0.74012, 0.86411, 0.88323,
 39625              0.95015, 0.86411, 0.86331, 0.88401, 0.91916, 0.86304, 0.88401,
 39626              0.9039, 0.86331, 0.86331, 0.86411, 0.86411, 0.90464, 0.70852,
 39627              1.04106, 0.86331, 0.84372, 0.95794, 0.82616, 0.84548, 0.79492,
 39628              0.88331, 1.69808, 0.88331, 0.85284, 0.97801, 0.89552, 0.91133,
 39629              0.89552, 0.91133, 1.7801, 0.89552, 1.24487, 1.13254, 1.19129,
 39630              0.96839, 0.85284, 0.68787, 0.70645, 0.85592, 0.90747, 1.01466,
 39631              1.0088, 0.90323, 1, 1.07463, 1, 0.91056, 0.75806, 1.19118, 0.96839,
 39632              0.78864, 0.82845, 0.84133, 0.75859, 0.83908, 0.83908, 0.83908,
 39633              0.83908, 0.83908, 0.83908, 0.77539, 0.71805, 0.73133, 0.73133,
 39634              0.73133, 0.73133, 0.95958, 0.95958, 0.95958, 0.95958, 0.88506,
 39635              0.90872, 0.85938, 0.85938, 0.85938, 0.85938, 0.85938, 0.85284,
 39636              0.87068, 0.90399, 0.90399, 0.90399, 0.90399, 0.77892, 0.79795,
 39637              0.90807, 0.94908, 0.94908, 0.94908, 0.94908, 0.94908, 0.94908,
 39638              0.85887, 0.74012, 0.88323, 0.88323, 0.88323, 0.88323, 0.88401,
 39639              0.88401, 0.88401, 0.88401, 0.8785, 0.86331, 0.86331, 0.86331,
 39640              0.86331, 0.86331, 0.86331, 0.90747, 0.89049, 0.86331, 0.86331,
 39641              0.86331, 0.86331, 0.84548, 0.86411, 0.84548, 0.83908, 0.94908,
 39642              0.83908, 0.94908, 0.83908, 0.94908, 0.71805, 0.74012, 0.71805,
 39643              0.74012, 0.71805, 0.74012, 0.71805, 0.74012, 0.87289, 0.79538,
 39644              0.88506, 0.92726, 0.73133, 0.88323, 0.73133, 0.88323, 0.73133,
 39645              0.88323, 0.73133, 0.88323, 0.73133, 0.88323, 0.81921, 0.86411,
 39646              0.81921, 0.86411, 0.81921, 0.86411, 1, 1, 0.87356, 0.86331, 0.91075,
 39647              0.8777, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401,
 39648              0.95958, 0.88401, 0.95958, 0.88401, 0.76467, 0.90167, 0.59526,
 39649              0.91916, 1, 1, 0.86304, 0.69225, 0.88401, 1, 1, 0.70424, 0.77312,
 39650              0.91926, 0.88175, 0.70823, 0.94903, 0.90872, 0.86331, 1, 1, 0.90872,
 39651              0.86331, 0.86906, 0.88116, 0.86331, 0.85938, 0.86331, 0.85938,
 39652              0.86331, 0.85938, 0.86331, 0.87402, 0.86549, 0.77958, 0.90464, 1, 1,
 39653              0.77958, 0.90464, 0.69766, 0.70852, 0.69766, 0.70852, 0.69766,
 39654              0.70852, 0.69766, 0.70852, 1, 1, 0.81055, 0.75841, 0.81055, 1.06452,
 39655              0.90399, 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.90399,
 39656              0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.96068, 0.95794,
 39657              0.77892, 0.84548, 0.77892, 0.78257, 0.79492, 0.78257, 0.79492,
 39658              0.78257, 0.79492, 0.9297, 0.56892, 0.83908, 0.94908, 0.77539,
 39659              0.85887, 0.87068, 0.89049, 1, 1, 0.81055, 1.04106, 1.20528, 1.20528,
 39660              1, 1.15543, 0.70088, 0.98387, 0.94721, 1.33431, 1.45894, 0.95161,
 39661              1.48387, 0.83908, 0.80352, 0.57118, 0.6965, 0.56347, 0.79179,
 39662              0.55853, 0.80346, 1.02988, 0.83908, 0.7762, 0.67174, 0.86036,
 39663              0.73133, 0.78257, 0.87356, 0.86441, 0.95958, 0.75727, 0.89019,
 39664              1.04924, 0.90872, 0.74889, 0.85938, 0.87891, 0.79795, 0.7957,
 39665              0.81055, 0.77892, 0.97447, 0.82577, 0.97466, 0.87179, 0.95958,
 39666              0.77892, 0.94252, 0.95612, 0.8753, 1.02988, 0.92733, 0.94252,
 39667              0.87411, 0.84021, 0.8728, 0.95612, 0.74081, 0.8753, 1.02189,
 39668              1.02988, 0.84814, 0.87445, 0.91822, 0.84723, 0.85668, 0.86331,
 39669              0.81344, 0.87581, 0.76422, 0.82046, 0.96057, 0.92733, 0.99375,
 39670              0.78022, 0.95452, 0.86015, 1.02988, 0.92733, 0.86331, 0.92733,
 39671              0.86015, 0.73133, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90631, 1, 1,
 39672              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39673              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39674              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.88323, 1, 1,
 39675              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.85174, 1, 1, 1, 1, 1, 1, 0.96068,
 39676              0.95794, 0.96068, 0.95794, 0.96068, 0.95794, 0.77892, 0.84548, 1, 1,
 39677              0.89552, 0.90527, 1, 0.90363, 0.92794, 0.92794, 0.92794, 0.89807,
 39678              0.87012, 0.87012, 0.87012, 0.89552, 0.89552, 1.42259, 0.71094,
 39679              1.06152, 1, 1, 1.03372, 1.03372, 0.97171, 1.4956, 2.2807, 0.92972,
 39680              0.83406, 0.91133, 0.83326, 0.91133, 1, 1, 1, 0.72021, 1, 1.23108,
 39681              0.83489, 0.88525, 0.88525, 0.81499, 0.90616, 1.81055, 0.90527,
 39682              1.81055, 1.3107, 1.53711, 0.94434, 1.08696, 1, 0.95018, 0.77192,
 39683              0.85284, 0.90747, 1.17534, 0.69825, 0.9716, 1.37077, 0.90747,
 39684              0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941,
 39685              0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1, 1, 1,
 39686              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39687              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862,
 39688              0.99862, 1, 1, 1, 1, 1, 1.08004, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1,
 39689              1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90727, 0.90727, 1, 1, 1, 1, 1, 1, 1, 1,
 39690              1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39691            ];
 39692            t.CalibriBoldItalicMetrics = { lineHeight: 1.2207, lineGap: 0.2207 };
 39693            t.CalibriItalicFactors = [
 39694              1.3877, 1, 1, 1, 1.17223, 1.1293, 0.89552, 0.91133, 0.80395,
 39695              1.02269, 1.15601, 0.91056, 0.91056, 1.2798, 0.85284, 0.89807, 1,
 39696              0.90861, 1.39543, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133,
 39697              0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.96309, 0.96309,
 39698              0.85284, 0.85284, 0.85284, 0.83319, 0.88071, 0.8675, 0.81552,
 39699              0.72346, 0.85193, 0.73206, 0.7522, 0.81105, 0.86275, 0.90685,
 39700              0.6377, 0.77892, 0.75593, 1.02638, 0.89249, 0.84118, 0.77452,
 39701              0.85374, 0.75186, 0.67789, 0.79776, 0.88844, 0.85066, 0.94309,
 39702              0.77818, 0.7306, 0.76659, 1.10369, 1.38313, 1.10369, 1.06139,
 39703              0.89552, 0.8739, 0.9245, 0.9245, 0.83203, 0.9245, 0.85865, 1.09842,
 39704              0.9245, 0.9245, 1.03297, 1.07692, 0.90918, 1.03297, 0.94959, 0.9245,
 39705              0.92274, 0.9245, 0.9245, 1.02933, 0.77832, 1.20562, 0.9245, 0.8916,
 39706              0.98986, 0.86621, 0.89453, 0.79004, 0.94152, 1.77256, 0.94152,
 39707              0.85284, 0.97801, 0.89552, 0.91133, 0.89552, 0.91133, 1.91729,
 39708              0.89552, 1.17889, 1.13254, 1.16359, 0.92098, 0.85284, 0.68787,
 39709              0.71353, 0.84737, 0.90747, 1.0088, 1.0044, 0.87683, 1, 1.09091, 1,
 39710              0.92229, 0.739, 1.15642, 0.92098, 0.76288, 0.80504, 0.80972,
 39711              0.75859, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.76318,
 39712              0.72346, 0.73206, 0.73206, 0.73206, 0.73206, 0.90685, 0.90685,
 39713              0.90685, 0.90685, 0.86477, 0.89249, 0.84118, 0.84118, 0.84118,
 39714              0.84118, 0.84118, 0.85284, 0.84557, 0.88844, 0.88844, 0.88844,
 39715              0.88844, 0.7306, 0.77452, 0.86331, 0.9245, 0.9245, 0.9245, 0.9245,
 39716              0.9245, 0.9245, 0.84843, 0.83203, 0.85865, 0.85865, 0.85865,
 39717              0.85865, 0.82601, 0.82601, 0.82601, 0.82601, 0.94469, 0.9245,
 39718              0.92274, 0.92274, 0.92274, 0.92274, 0.92274, 0.90747, 0.86651,
 39719              0.9245, 0.9245, 0.9245, 0.9245, 0.89453, 0.9245, 0.89453, 0.8675,
 39720              0.9245, 0.8675, 0.9245, 0.8675, 0.9245, 0.72346, 0.83203, 0.72346,
 39721              0.83203, 0.72346, 0.83203, 0.72346, 0.83203, 0.85193, 0.8875,
 39722              0.86477, 0.99034, 0.73206, 0.85865, 0.73206, 0.85865, 0.73206,
 39723              0.85865, 0.73206, 0.85865, 0.73206, 0.85865, 0.81105, 0.9245,
 39724              0.81105, 0.9245, 0.81105, 0.9245, 1, 1, 0.86275, 0.9245, 0.90872,
 39725              0.93591, 0.90685, 0.82601, 0.90685, 0.82601, 0.90685, 0.82601,
 39726              0.90685, 1.03297, 0.90685, 0.82601, 0.77896, 1.05611, 0.6377,
 39727              1.07692, 1, 1, 0.90918, 0.75593, 1.03297, 1, 1, 0.76032, 0.9375,
 39728              0.98156, 0.93407, 0.77261, 1.11429, 0.89249, 0.9245, 1, 1, 0.89249,
 39729              0.9245, 0.92534, 0.86698, 0.9245, 0.84118, 0.92274, 0.84118,
 39730              0.92274, 0.84118, 0.92274, 0.8667, 0.86291, 0.75186, 1.02933, 1, 1,
 39731              0.75186, 1.02933, 0.67789, 0.77832, 0.67789, 0.77832, 0.67789,
 39732              0.77832, 0.67789, 0.77832, 1, 1, 0.79776, 0.97655, 0.79776, 1.23023,
 39733              0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245,
 39734              0.88844, 0.9245, 0.88844, 0.9245, 0.94309, 0.98986, 0.7306, 0.89453,
 39735              0.7306, 0.76659, 0.79004, 0.76659, 0.79004, 0.76659, 0.79004,
 39736              1.09231, 0.54873, 0.8675, 0.9245, 0.76318, 0.84843, 0.84557,
 39737              0.86651, 1, 1, 0.79776, 1.20562, 1.18622, 1.18622, 1, 1.1437,
 39738              0.67009, 0.96334, 0.93695, 1.35191, 1.40909, 0.95161, 1.48387,
 39739              0.8675, 0.90861, 0.6192, 0.7363, 0.64824, 0.82411, 0.56321, 0.85696,
 39740              1.23516, 0.8675, 0.81552, 0.7286, 0.84134, 0.73206, 0.76659,
 39741              0.86275, 0.84369, 0.90685, 0.77892, 0.85871, 1.02638, 0.89249,
 39742              0.75828, 0.84118, 0.85984, 0.77452, 0.76466, 0.79776, 0.7306,
 39743              0.90782, 0.77818, 0.903, 0.87291, 0.90685, 0.7306, 0.99058, 1.03667,
 39744              0.94635, 1.23516, 0.9849, 0.99058, 0.92393, 0.8916, 0.942, 1.03667,
 39745              0.75026, 0.94635, 1.0297, 1.23516, 0.90918, 0.94048, 0.98217,
 39746              0.89746, 0.84153, 0.92274, 0.82507, 0.88832, 0.84438, 0.88178,
 39747              1.03525, 0.9849, 1.00225, 0.78086, 0.97248, 0.89404, 1.23516,
 39748              0.9849, 0.92274, 0.9849, 0.89404, 0.73206, 1, 1, 1, 1, 1, 1, 1, 1,
 39749              1, 1, 1, 1, 0.89693, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39750              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39751              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39752              1, 1, 1, 1, 0.85865, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90933, 1,
 39753              1, 1, 1, 1, 1, 0.94309, 0.98986, 0.94309, 0.98986, 0.94309, 0.98986,
 39754              0.7306, 0.89453, 1, 1, 0.89552, 0.90527, 1, 0.90186, 1.12308,
 39755              1.12308, 1.12308, 1.12308, 1.2566, 1.2566, 1.2566, 0.89552, 0.89552,
 39756              1.42259, 0.68994, 1.03809, 1, 1, 1.0176, 1.0176, 1.11523, 1.4956,
 39757              2.01462, 0.97858, 0.82616, 0.91133, 0.83437, 0.91133, 1, 1, 1,
 39758              0.70508, 1, 1.23108, 0.79801, 0.84426, 0.84426, 0.774, 0.90572,
 39759              1.81055, 0.90749, 1.81055, 1.28809, 1.55469, 0.94434, 1.07806, 1,
 39760              0.97094, 0.7589, 0.85284, 0.90747, 1.19658, 0.69825, 0.97622,
 39761              1.33512, 0.90747, 0.90747, 0.85284, 0.90747, 0.90747, 1.44947,
 39762              0.85284, 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572,
 39763              0.70572, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39764              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39765              1, 0.99862, 0.99862, 1, 1, 1, 1, 1, 1.0336, 0.91027, 1, 1, 1,
 39766              0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05859, 1.05859, 1, 1,
 39767              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39768            ];
 39769            t.CalibriItalicMetrics = { lineHeight: 1.2207, lineGap: 0.2207 };
 39770            t.CalibriRegularFactors = [
 39771              1.3877, 1, 1, 1, 1.17223, 1.1293, 0.89552, 0.91133, 0.80395,
 39772              1.02269, 1.15601, 0.91056, 0.91056, 1.2798, 0.85284, 0.89807, 1,
 39773              0.90861, 1.39016, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133,
 39774              0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.96309, 0.96309,
 39775              0.85284, 0.85284, 0.85284, 0.83319, 0.88071, 0.8675, 0.81552,
 39776              0.73834, 0.85193, 0.73206, 0.7522, 0.81105, 0.86275, 0.90685,
 39777              0.6377, 0.77892, 0.75593, 1.02638, 0.89385, 0.85122, 0.77452,
 39778              0.86503, 0.75186, 0.68887, 0.79776, 0.88844, 0.85066, 0.94258,
 39779              0.77818, 0.7306, 0.76659, 1.10369, 1.39016, 1.10369, 1.06139,
 39780              0.89552, 0.8739, 0.86128, 0.94469, 0.8457, 0.94469, 0.89464,
 39781              1.09842, 0.84636, 0.94469, 1.03297, 1.07692, 0.90918, 1.03297,
 39782              0.95897, 0.94469, 0.9482, 0.94469, 0.94469, 1.04692, 0.78223,
 39783              1.20562, 0.94469, 0.90332, 0.98986, 0.86621, 0.90527, 0.79004,
 39784              0.94152, 1.77256, 0.94152, 0.85284, 0.97801, 0.89552, 0.91133,
 39785              0.89552, 0.91133, 1.91729, 0.89552, 1.17889, 1.13254, 1.08707,
 39786              0.92098, 0.85284, 0.68787, 0.71353, 0.84737, 0.90747, 1.0088,
 39787              1.0044, 0.87683, 1, 1.09091, 1, 0.92229, 0.739, 1.15642, 0.92098,
 39788              0.76288, 0.80504, 0.80972, 0.75859, 0.8675, 0.8675, 0.8675, 0.8675,
 39789              0.8675, 0.8675, 0.76318, 0.73834, 0.73206, 0.73206, 0.73206,
 39790              0.73206, 0.90685, 0.90685, 0.90685, 0.90685, 0.86477, 0.89385,
 39791              0.85122, 0.85122, 0.85122, 0.85122, 0.85122, 0.85284, 0.85311,
 39792              0.88844, 0.88844, 0.88844, 0.88844, 0.7306, 0.77452, 0.86331,
 39793              0.86128, 0.86128, 0.86128, 0.86128, 0.86128, 0.86128, 0.8693,
 39794              0.8457, 0.89464, 0.89464, 0.89464, 0.89464, 0.82601, 0.82601,
 39795              0.82601, 0.82601, 0.94469, 0.94469, 0.9482, 0.9482, 0.9482, 0.9482,
 39796              0.9482, 0.90747, 0.86651, 0.94469, 0.94469, 0.94469, 0.94469,
 39797              0.90527, 0.94469, 0.90527, 0.8675, 0.86128, 0.8675, 0.86128, 0.8675,
 39798              0.86128, 0.73834, 0.8457, 0.73834, 0.8457, 0.73834, 0.8457, 0.73834,
 39799              0.8457, 0.85193, 0.92454, 0.86477, 0.9921, 0.73206, 0.89464,
 39800              0.73206, 0.89464, 0.73206, 0.89464, 0.73206, 0.89464, 0.73206,
 39801              0.89464, 0.81105, 0.84636, 0.81105, 0.84636, 0.81105, 0.84636, 1, 1,
 39802              0.86275, 0.94469, 0.90872, 0.95786, 0.90685, 0.82601, 0.90685,
 39803              0.82601, 0.90685, 0.82601, 0.90685, 1.03297, 0.90685, 0.82601,
 39804              0.77741, 1.05611, 0.6377, 1.07692, 1, 1, 0.90918, 0.75593, 1.03297,
 39805              1, 1, 0.76032, 0.90452, 0.98156, 1.11842, 0.77261, 1.11429, 0.89385,
 39806              0.94469, 1, 1, 0.89385, 0.94469, 0.95877, 0.86901, 0.94469, 0.85122,
 39807              0.9482, 0.85122, 0.9482, 0.85122, 0.9482, 0.8667, 0.90016, 0.75186,
 39808              1.04692, 1, 1, 0.75186, 1.04692, 0.68887, 0.78223, 0.68887, 0.78223,
 39809              0.68887, 0.78223, 0.68887, 0.78223, 1, 1, 0.79776, 0.92188, 0.79776,
 39810              1.23023, 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469,
 39811              0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, 0.94258,
 39812              0.98986, 0.7306, 0.90527, 0.7306, 0.76659, 0.79004, 0.76659,
 39813              0.79004, 0.76659, 0.79004, 1.09231, 0.54873, 0.8675, 0.86128,
 39814              0.76318, 0.8693, 0.85311, 0.86651, 1, 1, 0.79776, 1.20562, 1.18622,
 39815              1.18622, 1, 1.1437, 0.67742, 0.96334, 0.93695, 1.35191, 1.40909,
 39816              0.95161, 1.48387, 0.86686, 0.90861, 0.62267, 0.74359, 0.65649,
 39817              0.85498, 0.56963, 0.88254, 1.23516, 0.8675, 0.81552, 0.75443,
 39818              0.84503, 0.73206, 0.76659, 0.86275, 0.85122, 0.90685, 0.77892,
 39819              0.85746, 1.02638, 0.89385, 0.75657, 0.85122, 0.86275, 0.77452,
 39820              0.74171, 0.79776, 0.7306, 0.95165, 0.77818, 0.89772, 0.88831,
 39821              0.90685, 0.7306, 0.98142, 1.02191, 0.96576, 1.23516, 0.99018,
 39822              0.98142, 0.9236, 0.89258, 0.94035, 1.02191, 0.78848, 0.96576,
 39823              0.9561, 1.23516, 0.90918, 0.92578, 0.95424, 0.89746, 0.83969,
 39824              0.9482, 0.80113, 0.89442, 0.85208, 0.86155, 0.98022, 0.99018,
 39825              1.00452, 0.81209, 0.99247, 0.89181, 1.23516, 0.99018, 0.9482,
 39826              0.99018, 0.89181, 0.73206, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39827              0.88844, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39828              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39829              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39830              0.89464, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.96766, 1, 1, 1, 1, 1,
 39831              1, 0.94258, 0.98986, 0.94258, 0.98986, 0.94258, 0.98986, 0.7306,
 39832              0.90527, 1, 1, 0.89552, 0.90527, 1, 0.90186, 1.12308, 1.12308,
 39833              1.12308, 1.12308, 1.2566, 1.2566, 1.2566, 0.89552, 0.89552, 1.42259,
 39834              0.69043, 1.03809, 1, 1, 1.0176, 1.0176, 1.11523, 1.4956, 2.01462,
 39835              0.99331, 0.82616, 0.91133, 0.84286, 0.91133, 1, 1, 1, 0.70508, 1,
 39836              1.23108, 0.79801, 0.84426, 0.84426, 0.774, 0.90527, 1.81055,
 39837              0.90527, 1.81055, 1.28809, 1.55469, 0.94434, 1.07806, 1, 0.97094,
 39838              0.7589, 0.85284, 0.90747, 1.19658, 0.69825, 0.97622, 1.33512,
 39839              0.90747, 0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284,
 39840              0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 1,
 39841              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39842              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.99862,
 39843              0.99862, 1, 1, 1, 1, 1, 1.0336, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1,
 39844              1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05859, 1.05859, 1, 1, 1, 1.07185,
 39845              0.99413, 0.96334, 1.08065, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 39846            ];
 39847            t.CalibriRegularMetrics = { lineHeight: 1.2207, lineGap: 0.2207 };
 39848          },
 39849          (e, t) => {
 39850            Object.defineProperty(t, "__esModule", { value: !0 });
 39851            t.HelveticaRegularMetrics =
 39852              t.HelveticaRegularFactors =
 39853              t.HelveticaItalicMetrics =
 39854              t.HelveticaItalicFactors =
 39855              t.HelveticaBoldMetrics =
 39856              t.HelveticaBoldItalicMetrics =
 39857              t.HelveticaBoldItalicFactors =
 39858              t.HelveticaBoldFactors =
 39859                void 0;
 39860            t.HelveticaBoldFactors = [
 39861              0.76116, 1, 1, 1.0006, 0.99998, 0.99974, 0.99973, 0.99973, 0.99982,
 39862              0.99977, 1.00087, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006,
 39863              0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973,
 39864              0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1,
 39865              1.00003, 1.00003, 1.00003, 1.00026, 0.9999, 0.99977, 0.99977,
 39866              0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006,
 39867              0.99973, 0.99977, 1.00026, 0.99999, 0.99977, 1.00022, 1.00001,
 39868              1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016,
 39869              1.00001, 1.00001, 1.00026, 0.99998, 1.0006, 0.99998, 1.00003,
 39870              0.99973, 0.99998, 0.99973, 1.00026, 0.99973, 1.00026, 0.99973,
 39871              0.99998, 1.00026, 1.00026, 1.0006, 1.0006, 0.99973, 1.0006, 0.99982,
 39872              1.00026, 1.00026, 1.00026, 1.00026, 0.99959, 0.99973, 0.99998,
 39873              1.00026, 0.99973, 1.00022, 0.99973, 0.99973, 1, 0.99959, 1.00077,
 39874              0.99959, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973,
 39875              1.00077, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003,
 39876              1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.99973,
 39877              1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002,
 39878              1.00026, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1,
 39879              0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006,
 39880              1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022,
 39881              1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977,
 39882              1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973,
 39883              0.99973, 0.99973, 0.99982, 0.99973, 0.99973, 0.99973, 0.99973,
 39884              0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.00026, 1.00026, 1.00026,
 39885              1.00026, 1.00026, 1.00026, 1.00026, 1.06409, 1.00026, 1.00026,
 39886              1.00026, 1.00026, 1.00026, 0.99973, 1.00026, 0.99973, 0.99977,
 39887              0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973,
 39888              0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977,
 39889              1.03374, 0.99977, 1.00026, 1.00001, 0.99973, 1.00001, 0.99973,
 39890              1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022,
 39891              1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026,
 39892              0.99977, 1.00026, 0.99977, 1.00026, 1.0006, 1.0006, 1.0006, 1.0006,
 39893              1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.00042, 0.99973,
 39894              0.99973, 1.0006, 0.99977, 0.99973, 0.99973, 1.00026, 1.0006,
 39895              1.00026, 1.0006, 1.00026, 1.03828, 1.00026, 0.99999, 1.00026,
 39896              1.0006, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026,
 39897              0.9993, 0.9998, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026,
 39898              1.00022, 1.00026, 1, 1.00016, 0.99977, 0.99959, 0.99977, 0.99959,
 39899              0.99977, 0.99959, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001,
 39900              0.99973, 1.00001, 0.99973, 1.00026, 0.99998, 1.00026, 0.8121,
 39901              1.00026, 0.99998, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977,
 39902              1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026,
 39903              1.00016, 1.00022, 1.00001, 0.99973, 1.00001, 1.00026, 1, 1.00026, 1,
 39904              1.00026, 1, 1.0006, 0.99973, 0.99977, 0.99973, 1, 0.99982, 1.00022,
 39905              1.00026, 1.00001, 0.99973, 1.00026, 0.99998, 0.99998, 0.99998,
 39906              0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998,
 39907              0.99998, 1.00034, 0.99977, 1, 0.99997, 1.00026, 1.00078, 1.00036,
 39908              0.99973, 1.00013, 1.0006, 0.99977, 0.99977, 0.99988, 0.85148,
 39909              1.00001, 1.00026, 0.99977, 1.00022, 1.0006, 0.99977, 1.00001,
 39910              0.99999, 0.99977, 1.00069, 1.00022, 0.99977, 1.00001, 0.99984,
 39911              1.00026, 1.00001, 1.00024, 1.00001, 0.9999, 1, 1.0006, 1.00001,
 39912              1.00041, 0.99962, 1.00026, 1.0006, 0.99995, 1.00041, 0.99942,
 39913              0.99973, 0.99927, 1.00082, 0.99902, 1.00026, 1.00087, 1.0006,
 39914              1.00069, 0.99973, 0.99867, 0.99973, 0.9993, 1.00026, 1.00049,
 39915              1.00056, 1, 0.99988, 0.99935, 0.99995, 0.99954, 1.00055, 0.99945,
 39916              1.00032, 1.0006, 0.99995, 1.00026, 0.99995, 1.00032, 1.00001,
 39917              1.00008, 0.99971, 1.00019, 0.9994, 1.00001, 1.0006, 1.00044,
 39918              0.99973, 1.00023, 1.00047, 1, 0.99942, 0.99561, 0.99989, 1.00035,
 39919              0.99977, 1.00035, 0.99977, 1.00019, 0.99944, 1.00001, 1.00021,
 39920              0.99926, 1.00035, 1.00035, 0.99942, 1.00048, 0.99999, 0.99977,
 39921              1.00022, 1.00035, 1.00001, 0.99977, 1.00026, 0.99989, 1.00057,
 39922              1.00001, 0.99936, 1.00052, 1.00012, 0.99996, 1.00043, 1, 1.00035,
 39923              0.9994, 0.99976, 1.00035, 0.99973, 1.00052, 1.00041, 1.00119,
 39924              1.00037, 0.99973, 1.00002, 0.99986, 1.00041, 1.00041, 0.99902,
 39925              0.9996, 1.00034, 0.99999, 1.00026, 0.99999, 1.00026, 0.99973,
 39926              1.00052, 0.99973, 1, 0.99973, 1.00041, 1.00075, 0.9994, 1.0003,
 39927              0.99999, 1, 1.00041, 0.99955, 1, 0.99915, 0.99973, 0.99973, 1.00026,
 39928              1.00119, 0.99955, 0.99973, 1.0006, 0.99911, 1.0006, 1.00026,
 39929              0.99972, 1.00026, 0.99902, 1.00041, 0.99973, 0.99999, 1, 1, 1.00038,
 39930              1.0005, 1.00016, 1.00022, 1.00016, 1.00022, 1.00016, 1.00022,
 39931              1.00001, 0.99973, 1, 1, 0.99973, 1, 1, 0.99955, 1.0006, 1.0006,
 39932              1.0006, 1.0006, 1, 1, 1, 0.99973, 0.99973, 0.99972, 1, 1, 1.00106,
 39933              0.99999, 0.99998, 0.99998, 0.99999, 0.99998, 1.66475, 1, 0.99973,
 39934              0.99973, 1.00023, 0.99973, 0.99971, 1.00047, 1.00023, 1, 0.99991,
 39935              0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1, 1, 1, 1, 1, 1, 1,
 39936              0.99972, 1, 1.20985, 1.39713, 1.00003, 1.00031, 1.00015, 1, 0.99561,
 39937              1.00027, 1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999,
 39938              1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144,
 39939              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 39940              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 39941              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 39942              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 39943              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 39944              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579,
 39945              1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026,
 39946              1.00026, 0.99972, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1,
 39947              0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1,
 39948              1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, 1, 1, 1,
 39949              1, 1, 1, 1, 1,
 39950            ];
 39951            t.HelveticaBoldMetrics = { lineHeight: 1.2, lineGap: 0.2 };
 39952            t.HelveticaBoldItalicFactors = [
 39953              0.76116, 1, 1, 1.0006, 0.99998, 0.99974, 0.99973, 0.99973, 0.99982,
 39954              0.99977, 1.00087, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006,
 39955              0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973,
 39956              0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1,
 39957              1.00003, 1.00003, 1.00003, 1.00026, 0.9999, 0.99977, 0.99977,
 39958              0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006,
 39959              0.99973, 0.99977, 1.00026, 0.99999, 0.99977, 1.00022, 1.00001,
 39960              1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016,
 39961              1.00001, 1.00001, 1.00026, 0.99998, 1.0006, 0.99998, 1.00003,
 39962              0.99973, 0.99998, 0.99973, 1.00026, 0.99973, 1.00026, 0.99973,
 39963              0.99998, 1.00026, 1.00026, 1.0006, 1.0006, 0.99973, 1.0006, 0.99982,
 39964              1.00026, 1.00026, 1.00026, 1.00026, 0.99959, 0.99973, 0.99998,
 39965              1.00026, 0.99973, 1.00022, 0.99973, 0.99973, 1, 0.99959, 1.00077,
 39966              0.99959, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973,
 39967              1.00077, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003,
 39968              1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.99973,
 39969              1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002,
 39970              1.00026, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1,
 39971              0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006,
 39972              1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022,
 39973              1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977,
 39974              1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973,
 39975              0.99973, 0.99973, 0.99982, 0.99973, 0.99973, 0.99973, 0.99973,
 39976              0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.00026, 1.00026, 1.00026,
 39977              1.00026, 1.00026, 1.00026, 1.00026, 1.06409, 1.00026, 1.00026,
 39978              1.00026, 1.00026, 1.00026, 0.99973, 1.00026, 0.99973, 0.99977,
 39979              0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973,
 39980              0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977,
 39981              1.0044, 0.99977, 1.00026, 1.00001, 0.99973, 1.00001, 0.99973,
 39982              1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022,
 39983              1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026,
 39984              0.99977, 1.00026, 0.99977, 1.00026, 1.0006, 1.0006, 1.0006, 1.0006,
 39985              1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99971, 0.99973,
 39986              0.99973, 1.0006, 0.99977, 0.99973, 0.99973, 1.00026, 1.0006,
 39987              1.00026, 1.0006, 1.00026, 1.01011, 1.00026, 0.99999, 1.00026,
 39988              1.0006, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026,
 39989              0.9993, 0.9998, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026,
 39990              1.00022, 1.00026, 1, 1.00016, 0.99977, 0.99959, 0.99977, 0.99959,
 39991              0.99977, 0.99959, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001,
 39992              0.99973, 1.00001, 0.99973, 1.00026, 0.99998, 1.00026, 0.8121,
 39993              1.00026, 0.99998, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977,
 39994              1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026,
 39995              1.00016, 1.00022, 1.00001, 0.99973, 1.00001, 1.00026, 1, 1.00026, 1,
 39996              1.00026, 1, 1.0006, 0.99973, 0.99977, 0.99973, 1, 0.99982, 1.00022,
 39997              1.00026, 1.00001, 0.99973, 1.00026, 0.99998, 0.99998, 0.99998,
 39998              0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998,
 39999              0.99998, 0.99998, 0.99977, 1, 1, 1.00026, 0.99969, 0.99972, 0.99981,
 40000              0.9998, 1.0006, 0.99977, 0.99977, 1.00022, 0.91155, 1.00001,
 40001              1.00026, 0.99977, 1.00022, 1.0006, 0.99977, 1.00001, 0.99999,
 40002              0.99977, 0.99966, 1.00022, 1.00032, 1.00001, 0.99944, 1.00026,
 40003              1.00001, 0.99968, 1.00001, 1.00047, 1, 1.0006, 1.00001, 0.99981,
 40004              1.00101, 1.00026, 1.0006, 0.99948, 0.99981, 1.00064, 0.99973,
 40005              0.99942, 1.00101, 1.00061, 1.00026, 1.00069, 1.0006, 1.00014,
 40006              0.99973, 1.01322, 0.99973, 1.00065, 1.00026, 1.00012, 0.99923, 1,
 40007              1.00064, 1.00076, 0.99948, 1.00055, 1.00063, 1.00007, 0.99943,
 40008              1.0006, 0.99948, 1.00026, 0.99948, 0.99943, 1.00001, 1.00001,
 40009              1.00029, 1.00038, 1.00035, 1.00001, 1.0006, 1.0006, 0.99973,
 40010              0.99978, 1.00001, 1.00057, 0.99989, 0.99967, 0.99964, 0.99967,
 40011              0.99977, 0.99999, 0.99977, 1.00038, 0.99977, 1.00001, 0.99973,
 40012              1.00066, 0.99967, 0.99967, 1.00041, 0.99998, 0.99999, 0.99977,
 40013              1.00022, 0.99967, 1.00001, 0.99977, 1.00026, 0.99964, 1.00031,
 40014              1.00001, 0.99999, 0.99999, 1, 1.00023, 1, 1, 0.99999, 1.00035,
 40015              1.00001, 0.99999, 0.99973, 0.99977, 0.99999, 1.00058, 0.99973,
 40016              0.99973, 0.99955, 0.9995, 1.00026, 1.00026, 1.00032, 0.99989,
 40017              1.00034, 0.99999, 1.00026, 1.00026, 1.00026, 0.99973, 0.45998,
 40018              0.99973, 1.00026, 0.99973, 1.00001, 0.99999, 0.99982, 0.99994,
 40019              0.99996, 1, 1.00042, 1.00044, 1.00029, 1.00023, 0.99973, 0.99973,
 40020              1.00026, 0.99949, 1.00002, 0.99973, 1.0006, 1.0006, 1.0006, 0.99975,
 40021              1.00026, 1.00026, 1.00032, 0.98685, 0.99973, 1.00026, 1, 1, 0.99966,
 40022              1.00044, 1.00016, 1.00022, 1.00016, 1.00022, 1.00016, 1.00022,
 40023              1.00001, 0.99973, 1, 1, 0.99973, 1, 1, 0.99955, 1.0006, 1.0006,
 40024              1.0006, 1.0006, 1, 1, 1, 0.99973, 0.99973, 0.99972, 1, 1, 1.00106,
 40025              0.99999, 0.99998, 0.99998, 0.99999, 0.99998, 1.66475, 1, 0.99973,
 40026              0.99973, 1, 0.99973, 0.99971, 0.99978, 1, 1, 0.99991, 0.99984,
 40027              1.00002, 1.00002, 1.00002, 1.00002, 1.00098, 1, 1, 1, 1.00049, 1, 1,
 40028              0.99972, 1, 1.20985, 1.39713, 1.00003, 1.00031, 1.00015, 1, 0.99561,
 40029              1.00027, 1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999,
 40030              1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144,
 40031              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40032              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40033              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40034              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40035              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40036              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579,
 40037              1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026,
 40038              1.00026, 0.99972, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1,
 40039              0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1,
 40040              1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, 1, 1, 1,
 40041              1, 1, 1, 1, 1,
 40042            ];
 40043            t.HelveticaBoldItalicMetrics = { lineHeight: 1.35, lineGap: 0.2 };
 40044            t.HelveticaItalicFactors = [
 40045              0.76116, 1, 1, 1.0006, 1.0006, 1.00006, 0.99973, 0.99973, 0.99982,
 40046              1.00001, 1.00043, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006,
 40047              0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973,
 40048              0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1,
 40049              1.00003, 1.00003, 1.00003, 0.99973, 0.99987, 1.00001, 1.00001,
 40050              0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 1,
 40051              1.00001, 0.99973, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022,
 40052              0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001,
 40053              1.00001, 1.00026, 1.0006, 1.0006, 1.0006, 0.99949, 0.99973, 0.99998,
 40054              0.99973, 0.99973, 1, 0.99973, 0.99973, 1.0006, 0.99973, 0.99973,
 40055              0.99924, 0.99924, 1, 0.99924, 0.99999, 0.99973, 0.99973, 0.99973,
 40056              0.99973, 0.99998, 1, 1.0006, 0.99973, 1, 0.99977, 1, 1, 1, 1.00005,
 40057              1.0009, 1.00005, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973,
 40058              0.99973, 1.0009, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973,
 40059              1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1,
 40060              0.9998, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002,
 40061              1.00002, 1.00026, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001,
 40062              1.00001, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006,
 40063              1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022,
 40064              1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977,
 40065              0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973,
 40066              0.99973, 0.99973, 0.99973, 0.99982, 1, 0.99973, 0.99973, 0.99973,
 40067              0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973,
 40068              0.99973, 0.99973, 0.99973, 0.99973, 1.06409, 1.00026, 0.99973,
 40069              0.99973, 0.99973, 0.99973, 1, 0.99973, 1, 1.00001, 0.99973, 1.00001,
 40070              0.99973, 1.00001, 0.99973, 0.99977, 1, 0.99977, 1, 0.99977, 1,
 40071              0.99977, 1, 0.99977, 1.0288, 0.99977, 0.99973, 1.00001, 0.99973,
 40072              1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001,
 40073              0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973,
 40074              1.00022, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.0006,
 40075              1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99924, 1.0006,
 40076              1.0006, 0.99946, 1.00034, 1, 0.99924, 1.00001, 1, 1, 0.99973,
 40077              0.99924, 0.99973, 0.99924, 0.99973, 1.06311, 0.99973, 1.00024,
 40078              0.99973, 0.99924, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977,
 40079              0.99973, 1.00041, 0.9998, 0.99973, 1.00022, 0.99973, 1.00022,
 40080              0.99973, 1.00022, 0.99973, 1, 1.00016, 0.99977, 0.99998, 0.99977,
 40081              0.99998, 0.99977, 0.99998, 1.00001, 1, 1.00001, 1, 1.00001, 1,
 40082              1.00001, 1, 1.00026, 1.0006, 1.00026, 0.89547, 1.00026, 1.0006,
 40083              0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977,
 40084              0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.00016, 0.99977,
 40085              1.00001, 1, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 0.99924,
 40086              0.99973, 1.00001, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 1,
 40087              1.00026, 1.0006, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998,
 40088              0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 1.00001, 1,
 40089              1.00054, 0.99977, 1.00084, 1.00007, 0.99973, 1.00013, 0.99924,
 40090              1.00001, 1.00001, 0.99945, 0.91221, 1.00001, 1.00026, 0.99977,
 40091              1.00022, 1.0006, 1.00001, 1.00001, 0.99999, 0.99977, 0.99933,
 40092              1.00022, 1.00054, 1.00001, 1.00065, 1.00026, 1.00001, 1.0001,
 40093              1.00001, 1.00052, 1, 1.0006, 1.00001, 0.99945, 0.99897, 0.99968,
 40094              0.99924, 1.00036, 0.99945, 0.99949, 1, 1.0006, 0.99897, 0.99918,
 40095              0.99968, 0.99911, 0.99924, 1, 0.99962, 1.01487, 1, 1.0005, 0.99973,
 40096              1.00012, 1.00043, 1, 0.99995, 0.99994, 1.00036, 0.99947, 1.00019,
 40097              1.00063, 1.00025, 0.99924, 1.00036, 0.99973, 1.00036, 1.00025,
 40098              1.00001, 1.00001, 1.00027, 1.0001, 1.00068, 1.00001, 1.0006, 1.0006,
 40099              1, 1.00008, 0.99957, 0.99972, 0.9994, 0.99954, 0.99975, 1.00051,
 40100              1.00001, 1.00019, 1.00001, 1.0001, 0.99986, 1.00001, 1.00001,
 40101              1.00038, 0.99954, 0.99954, 0.9994, 1.00066, 0.99999, 0.99977,
 40102              1.00022, 1.00054, 1.00001, 0.99977, 1.00026, 0.99975, 1.0001,
 40103              1.00001, 0.99993, 0.9995, 0.99955, 1.00016, 0.99978, 0.99974,
 40104              1.00019, 1.00022, 0.99955, 1.00053, 0.99973, 1.00089, 1.00005,
 40105              0.99967, 1.00048, 0.99973, 1.00002, 1.00034, 0.99973, 0.99973,
 40106              0.99964, 1.00006, 1.00066, 0.99947, 0.99973, 0.98894, 0.99973, 1,
 40107              0.44898, 1, 0.99946, 1, 1.00039, 1.00082, 0.99991, 0.99991, 0.99985,
 40108              1.00022, 1.00023, 1.00061, 1.00006, 0.99966, 0.99973, 0.99973,
 40109              0.99973, 1.00019, 1.0008, 1, 0.99924, 0.99924, 0.99924, 0.99983,
 40110              1.00044, 0.99973, 0.99964, 0.98332, 1, 0.99973, 1, 1, 0.99962,
 40111              0.99895, 1.00016, 0.99977, 1.00016, 0.99977, 1.00016, 0.99977,
 40112              1.00001, 1, 1, 1, 0.99973, 1, 1, 0.99955, 0.99924, 0.99924, 0.99924,
 40113              0.99924, 0.99998, 0.99998, 0.99998, 0.99973, 0.99973, 0.99972, 1, 1,
 40114              1.00267, 0.99999, 0.99998, 0.99998, 1, 0.99998, 1.66475, 1, 0.99973,
 40115              0.99973, 1.00023, 0.99973, 1.00423, 0.99925, 0.99999, 1, 0.99991,
 40116              0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1.00049, 1, 1.00245, 1,
 40117              1, 1, 1, 0.96329, 1, 1.20985, 1.39713, 1.00003, 0.8254, 1.00015, 1,
 40118              1.00035, 1.00027, 1.00031, 1.00031, 1.00003, 1.00031, 1.00031,
 40119              0.99999, 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144,
 40120              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40121              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40122              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40123              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40124              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40125              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579,
 40126              1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026,
 40127              1.00026, 1.00026, 0.95317, 0.99999, 0.99999, 0.99999, 0.99999,
 40128              1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042,
 40129              0.9995, 1, 1, 1, 1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998,
 40130              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40131            ];
 40132            t.HelveticaItalicMetrics = { lineHeight: 1.35, lineGap: 0.2 };
 40133            t.HelveticaRegularFactors = [
 40134              0.76116, 1, 1, 1.0006, 1.0006, 1.00006, 0.99973, 0.99973, 0.99982,
 40135              1.00001, 1.00043, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006,
 40136              0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973,
 40137              0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1,
 40138              1.00003, 1.00003, 1.00003, 0.99973, 0.99987, 1.00001, 1.00001,
 40139              0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 1,
 40140              1.00001, 0.99973, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022,
 40141              0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001,
 40142              1.00001, 1.00026, 1.0006, 1.0006, 1.0006, 0.99949, 0.99973, 0.99998,
 40143              0.99973, 0.99973, 1, 0.99973, 0.99973, 1.0006, 0.99973, 0.99973,
 40144              0.99924, 0.99924, 1, 0.99924, 0.99999, 0.99973, 0.99973, 0.99973,
 40145              0.99973, 0.99998, 1, 1.0006, 0.99973, 1, 0.99977, 1, 1, 1, 1.00005,
 40146              1.0009, 1.00005, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973,
 40147              0.99973, 1.0009, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973,
 40148              1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1,
 40149              0.9998, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002,
 40150              1.00002, 1.00026, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001,
 40151              1.00001, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006,
 40152              1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022,
 40153              1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977,
 40154              0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973,
 40155              0.99973, 0.99973, 0.99973, 0.99982, 1, 0.99973, 0.99973, 0.99973,
 40156              0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973,
 40157              0.99973, 0.99973, 0.99973, 0.99973, 1.06409, 1.00026, 0.99973,
 40158              0.99973, 0.99973, 0.99973, 1, 0.99973, 1, 1.00001, 0.99973, 1.00001,
 40159              0.99973, 1.00001, 0.99973, 0.99977, 1, 0.99977, 1, 0.99977, 1,
 40160              0.99977, 1, 0.99977, 1.04596, 0.99977, 0.99973, 1.00001, 0.99973,
 40161              1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001,
 40162              0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973,
 40163              1.00022, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.0006,
 40164              1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99924, 1.0006,
 40165              1.0006, 1.00019, 1.00034, 1, 0.99924, 1.00001, 1, 1, 0.99973,
 40166              0.99924, 0.99973, 0.99924, 0.99973, 1.02572, 0.99973, 1.00005,
 40167              0.99973, 0.99924, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977,
 40168              0.99973, 0.99999, 0.9998, 0.99973, 1.00022, 0.99973, 1.00022,
 40169              0.99973, 1.00022, 0.99973, 1, 1.00016, 0.99977, 0.99998, 0.99977,
 40170              0.99998, 0.99977, 0.99998, 1.00001, 1, 1.00001, 1, 1.00001, 1,
 40171              1.00001, 1, 1.00026, 1.0006, 1.00026, 0.84533, 1.00026, 1.0006,
 40172              0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977,
 40173              0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.00016, 0.99977,
 40174              1.00001, 1, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 0.99924,
 40175              0.99973, 1.00001, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 1,
 40176              1.00026, 1.0006, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998,
 40177              0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99928, 1,
 40178              0.99977, 1.00013, 1.00055, 0.99947, 0.99945, 0.99941, 0.99924,
 40179              1.00001, 1.00001, 1.0004, 0.91621, 1.00001, 1.00026, 0.99977,
 40180              1.00022, 1.0006, 1.00001, 1.00005, 0.99999, 0.99977, 1.00015,
 40181              1.00022, 0.99977, 1.00001, 0.99973, 1.00026, 1.00001, 1.00019,
 40182              1.00001, 0.99946, 1, 1.0006, 1.00001, 0.99978, 1.00045, 0.99973,
 40183              0.99924, 1.00023, 0.99978, 0.99966, 1, 1.00065, 1.00045, 1.00019,
 40184              0.99973, 0.99973, 0.99924, 1, 1, 0.96499, 1, 1.00055, 0.99973,
 40185              1.00008, 1.00027, 1, 0.9997, 0.99995, 1.00023, 0.99933, 1.00019,
 40186              1.00015, 1.00031, 0.99924, 1.00023, 0.99973, 1.00023, 1.00031,
 40187              1.00001, 0.99928, 1.00029, 1.00092, 1.00035, 1.00001, 1.0006,
 40188              1.0006, 1, 0.99988, 0.99975, 1, 1.00082, 0.99561, 0.9996, 1.00035,
 40189              1.00001, 0.99962, 1.00001, 1.00092, 0.99964, 1.00001, 0.99963,
 40190              0.99999, 1.00035, 1.00035, 1.00082, 0.99962, 0.99999, 0.99977,
 40191              1.00022, 1.00035, 1.00001, 0.99977, 1.00026, 0.9996, 0.99967,
 40192              1.00001, 1.00034, 1.00074, 1.00054, 1.00053, 1.00063, 0.99971,
 40193              0.99962, 1.00035, 0.99975, 0.99977, 0.99973, 1.00043, 0.99953,
 40194              1.0007, 0.99915, 0.99973, 1.00008, 0.99892, 1.00073, 1.00073,
 40195              1.00114, 0.99915, 1.00073, 0.99955, 0.99973, 1.00092, 0.99973, 1,
 40196              0.99998, 1, 1.0003, 1, 1.00043, 1.00001, 0.99969, 1.0003, 1,
 40197              1.00035, 1.00001, 0.9995, 1, 1.00092, 0.99973, 0.99973, 0.99973,
 40198              1.0007, 0.9995, 1, 0.99924, 1.0006, 0.99924, 0.99972, 1.00062,
 40199              0.99973, 1.00114, 1.00073, 1, 0.99955, 1, 1, 1.00047, 0.99968,
 40200              1.00016, 0.99977, 1.00016, 0.99977, 1.00016, 0.99977, 1.00001, 1, 1,
 40201              1, 0.99973, 1, 1, 0.99955, 0.99924, 0.99924, 0.99924, 0.99924,
 40202              0.99998, 0.99998, 0.99998, 0.99973, 0.99973, 0.99972, 1, 1, 1.00267,
 40203              0.99999, 0.99998, 0.99998, 1, 0.99998, 1.66475, 1, 0.99973, 0.99973,
 40204              1.00023, 0.99973, 0.99971, 0.99925, 1.00023, 1, 0.99991, 0.99984,
 40205              1.00002, 1.00002, 1.00002, 1.00002, 1, 1, 1, 1, 1, 1, 1, 0.96329, 1,
 40206              1.20985, 1.39713, 1.00003, 0.8254, 1.00015, 1, 1.00035, 1.00027,
 40207              1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999, 1.00003,
 40208              0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144,
 40209              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40210              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40211              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40212              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40213              1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144,
 40214              1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, 1.36625,
 40215              0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, 1.00026,
 40216              0.95317, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, 0.99977,
 40217              1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, 1, 1, 1,
 40218              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40219            ];
 40220            t.HelveticaRegularMetrics = { lineHeight: 1.2, lineGap: 0.2 };
 40221          },
 40222          (e, t) => {
 40223            Object.defineProperty(t, "__esModule", { value: !0 });
 40224            t.LiberationSansRegularWidths =
 40225              t.LiberationSansRegularMapping =
 40226              t.LiberationSansItalicWidths =
 40227              t.LiberationSansItalicMapping =
 40228              t.LiberationSansBoldWidths =
 40229              t.LiberationSansBoldMapping =
 40230              t.LiberationSansBoldItalicWidths =
 40231              t.LiberationSansBoldItalicMapping =
 40232                void 0;
 40233            t.LiberationSansBoldWidths = [
 40234              365, 0, 333, 278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389,
 40235              584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556,
 40236              556, 556, 333, 333, 584, 584, 584, 611, 975, 722, 722, 722, 722,
 40237              667, 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, 667, 778,
 40238              722, 667, 611, 722, 667, 944, 667, 667, 611, 333, 278, 333, 584,
 40239              556, 333, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556,
 40240              278, 889, 611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556,
 40241              556, 500, 389, 280, 389, 584, 333, 556, 556, 556, 556, 280, 556,
 40242              333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576,
 40243              556, 278, 333, 333, 365, 556, 834, 834, 834, 611, 722, 722, 722,
 40244              722, 722, 722, 1e3, 722, 667, 667, 667, 667, 278, 278, 278, 278,
 40245              722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722,
 40246              667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 556, 556, 556,
 40247              556, 556, 278, 278, 278, 278, 611, 611, 611, 611, 611, 611, 611,
 40248              549, 611, 611, 611, 611, 611, 556, 611, 556, 722, 556, 722, 556,
 40249              722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 719, 722,
 40250              611, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 611,
 40251              778, 611, 778, 611, 778, 611, 722, 611, 722, 611, 278, 278, 278,
 40252              278, 278, 278, 278, 278, 278, 278, 785, 556, 556, 278, 722, 556,
 40253              556, 611, 278, 611, 278, 611, 385, 611, 479, 611, 278, 722, 611,
 40254              722, 611, 722, 611, 708, 723, 611, 778, 611, 778, 611, 778, 611,
 40255              1e3, 944, 722, 389, 722, 389, 722, 389, 667, 556, 667, 556, 667,
 40256              556, 667, 556, 611, 333, 611, 479, 611, 333, 722, 611, 722, 611,
 40257              722, 611, 722, 611, 722, 611, 722, 611, 944, 778, 667, 556, 667,
 40258              611, 500, 611, 500, 611, 500, 278, 556, 722, 556, 1e3, 889, 778,
 40259              611, 667, 556, 611, 333, 333, 333, 333, 333, 333, 333, 333, 333,
 40260              333, 333, 465, 722, 333, 853, 906, 474, 825, 927, 838, 278, 722,
 40261              722, 601, 719, 667, 611, 722, 778, 278, 722, 667, 833, 722, 644,
 40262              778, 722, 667, 600, 611, 667, 821, 667, 809, 802, 278, 667, 615,
 40263              451, 611, 278, 582, 615, 610, 556, 606, 475, 460, 611, 541, 278,
 40264              558, 556, 612, 556, 445, 611, 766, 619, 520, 684, 446, 582, 715,
 40265              576, 753, 845, 278, 582, 611, 582, 845, 667, 669, 885, 567, 711,
 40266              667, 278, 276, 556, 1094, 1062, 875, 610, 722, 622, 719, 722, 719,
 40267              722, 567, 712, 667, 904, 626, 719, 719, 610, 702, 833, 722, 778,
 40268              719, 667, 722, 611, 622, 854, 667, 730, 703, 1005, 1019, 870, 979,
 40269              719, 711, 1031, 719, 556, 618, 615, 417, 635, 556, 709, 497, 615,
 40270              615, 500, 635, 740, 604, 611, 604, 611, 556, 490, 556, 875, 556,
 40271              615, 581, 833, 844, 729, 854, 615, 552, 854, 583, 556, 556, 611,
 40272              417, 552, 556, 278, 281, 278, 969, 906, 611, 500, 615, 556, 604,
 40273              778, 611, 487, 447, 944, 778, 944, 778, 944, 778, 667, 556, 333,
 40274              333, 556, 1e3, 1e3, 552, 278, 278, 278, 278, 500, 500, 500, 556,
 40275              556, 350, 1e3, 1e3, 240, 479, 333, 333, 604, 333, 167, 396, 556,
 40276              556, 1094, 556, 885, 489, 1115, 1e3, 768, 600, 834, 834, 834, 834,
 40277              1e3, 500, 1e3, 500, 1e3, 500, 500, 494, 612, 823, 713, 584, 549,
 40278              713, 979, 722, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604,
 40279              708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40280              708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40281              708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40282              708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354,
 40283              1e3, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052,
 40284              917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 611, 611, 333,
 40285              333, 333, 333, 333, 333, 333, 333, 222, 222, 333, 333, 333, 333,
 40286              333, 333, 333, 333,
 40287            ];
 40288            t.LiberationSansBoldMapping = [
 40289              -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
 40290              46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
 40291              63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
 40292              80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
 40293              97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
 40294              111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
 40295              124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
 40296              171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
 40297              185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
 40298              198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
 40299              211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
 40300              224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
 40301              237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
 40302              250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
 40303              263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
 40304              276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
 40305              289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
 40306              302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
 40307              315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
 40308              328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
 40309              341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
 40310              354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
 40311              367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
 40312              380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537,
 40313              538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901,
 40314              902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916,
 40315              917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929,
 40316              931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943,
 40317              944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956,
 40318              957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969,
 40319              970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030,
 40320              1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041,
 40321              1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052,
 40322              1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063,
 40323              1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074,
 40324              1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085,
 40325              1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096,
 40326              1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107,
 40327              1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118,
 40328              1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813,
 40329              7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218,
 40330              8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243,
 40331              8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453,
 40332              8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593,
 40333              8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730,
 40334              8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976,
 40335              8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516,
 40336              9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560,
 40337              9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571,
 40338              9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604,
 40339              9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644,
 40340              9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786,
 40341              9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836,
 40342              61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
 40343              -1, -1, -1, -1, -1,
 40344            ];
 40345            t.LiberationSansBoldItalicWidths = [
 40346              365, 0, 333, 278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389,
 40347              584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556,
 40348              556, 556, 333, 333, 584, 584, 584, 611, 975, 722, 722, 722, 722,
 40349              667, 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, 667, 778,
 40350              722, 667, 611, 722, 667, 944, 667, 667, 611, 333, 278, 333, 584,
 40351              556, 333, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556,
 40352              278, 889, 611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556,
 40353              556, 500, 389, 280, 389, 584, 333, 556, 556, 556, 556, 280, 556,
 40354              333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576,
 40355              556, 278, 333, 333, 365, 556, 834, 834, 834, 611, 722, 722, 722,
 40356              722, 722, 722, 1e3, 722, 667, 667, 667, 667, 278, 278, 278, 278,
 40357              722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722,
 40358              667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 556, 556, 556,
 40359              556, 556, 278, 278, 278, 278, 611, 611, 611, 611, 611, 611, 611,
 40360              549, 611, 611, 611, 611, 611, 556, 611, 556, 722, 556, 722, 556,
 40361              722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 740, 722,
 40362              611, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 611,
 40363              778, 611, 778, 611, 778, 611, 722, 611, 722, 611, 278, 278, 278,
 40364              278, 278, 278, 278, 278, 278, 278, 782, 556, 556, 278, 722, 556,
 40365              556, 611, 278, 611, 278, 611, 396, 611, 479, 611, 278, 722, 611,
 40366              722, 611, 722, 611, 708, 723, 611, 778, 611, 778, 611, 778, 611,
 40367              1e3, 944, 722, 389, 722, 389, 722, 389, 667, 556, 667, 556, 667,
 40368              556, 667, 556, 611, 333, 611, 479, 611, 333, 722, 611, 722, 611,
 40369              722, 611, 722, 611, 722, 611, 722, 611, 944, 778, 667, 556, 667,
 40370              611, 500, 611, 500, 611, 500, 278, 556, 722, 556, 1e3, 889, 778,
 40371              611, 667, 556, 611, 333, 333, 333, 333, 333, 333, 333, 333, 333,
 40372              333, 333, 333, 722, 333, 854, 906, 473, 844, 930, 847, 278, 722,
 40373              722, 610, 671, 667, 611, 722, 778, 278, 722, 667, 833, 722, 657,
 40374              778, 718, 667, 590, 611, 667, 822, 667, 829, 781, 278, 667, 620,
 40375              479, 611, 278, 591, 620, 621, 556, 610, 479, 492, 611, 558, 278,
 40376              566, 556, 603, 556, 450, 611, 712, 605, 532, 664, 409, 591, 704,
 40377              578, 773, 834, 278, 591, 611, 591, 834, 667, 667, 886, 614, 719,
 40378              667, 278, 278, 556, 1094, 1042, 854, 622, 719, 677, 719, 722, 708,
 40379              722, 614, 722, 667, 927, 643, 719, 719, 615, 687, 833, 722, 778,
 40380              719, 667, 722, 611, 677, 781, 667, 729, 708, 979, 989, 854, 1e3,
 40381              708, 719, 1042, 729, 556, 619, 604, 534, 618, 556, 736, 510, 611,
 40382              611, 507, 622, 740, 604, 611, 611, 611, 556, 889, 556, 885, 556,
 40383              646, 583, 889, 935, 707, 854, 594, 552, 865, 589, 556, 556, 611,
 40384              469, 563, 556, 278, 278, 278, 969, 906, 611, 507, 619, 556, 611,
 40385              778, 611, 575, 467, 944, 778, 944, 778, 944, 778, 667, 556, 333,
 40386              333, 556, 1e3, 1e3, 552, 278, 278, 278, 278, 500, 500, 500, 556,
 40387              556, 350, 1e3, 1e3, 240, 479, 333, 333, 604, 333, 167, 396, 556,
 40388              556, 1104, 556, 885, 516, 1146, 1e3, 768, 600, 834, 834, 834, 834,
 40389              999, 500, 1e3, 500, 1e3, 500, 500, 494, 612, 823, 713, 584, 549,
 40390              713, 979, 722, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604,
 40391              708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40392              708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40393              708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40394              708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354,
 40395              1e3, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052,
 40396              917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 611, 611, 333,
 40397              333, 333, 333, 333, 333, 333, 333, 222, 222, 333, 333, 333, 333,
 40398              333, 333, 333, 333,
 40399            ];
 40400            t.LiberationSansBoldItalicMapping = [
 40401              -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
 40402              46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
 40403              63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
 40404              80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
 40405              97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
 40406              111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
 40407              124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
 40408              171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
 40409              185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
 40410              198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
 40411              211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
 40412              224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
 40413              237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
 40414              250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
 40415              263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
 40416              276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
 40417              289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
 40418              302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
 40419              315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
 40420              328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
 40421              341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
 40422              354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
 40423              367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
 40424              380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537,
 40425              538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901,
 40426              902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916,
 40427              917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929,
 40428              931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943,
 40429              944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956,
 40430              957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969,
 40431              970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030,
 40432              1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041,
 40433              1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052,
 40434              1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063,
 40435              1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074,
 40436              1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085,
 40437              1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096,
 40438              1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107,
 40439              1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118,
 40440              1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813,
 40441              7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218,
 40442              8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243,
 40443              8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453,
 40444              8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593,
 40445              8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730,
 40446              8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976,
 40447              8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516,
 40448              9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560,
 40449              9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571,
 40450              9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604,
 40451              9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644,
 40452              9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786,
 40453              9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836,
 40454              61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
 40455              -1, -1, -1, -1, -1,
 40456            ];
 40457            t.LiberationSansItalicWidths = [
 40458              365, 0, 333, 278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389,
 40459              584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556,
 40460              556, 556, 278, 278, 584, 584, 584, 556, 1015, 667, 667, 722, 722,
 40461              667, 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, 667, 778,
 40462              722, 667, 611, 722, 667, 944, 667, 667, 611, 278, 278, 278, 469,
 40463              556, 333, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500,
 40464              222, 833, 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500,
 40465              500, 500, 334, 260, 334, 584, 333, 556, 556, 556, 556, 260, 556,
 40466              333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576,
 40467              537, 278, 333, 333, 365, 556, 834, 834, 834, 611, 667, 667, 667,
 40468              667, 667, 667, 1e3, 722, 667, 667, 667, 667, 278, 278, 278, 278,
 40469              722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722,
 40470              667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 500, 556, 556,
 40471              556, 556, 278, 278, 278, 278, 556, 556, 556, 556, 556, 556, 556,
 40472              549, 611, 556, 556, 556, 556, 500, 556, 500, 667, 556, 667, 556,
 40473              667, 556, 722, 500, 722, 500, 722, 500, 722, 500, 722, 625, 722,
 40474              556, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 556,
 40475              778, 556, 778, 556, 778, 556, 722, 556, 722, 556, 278, 278, 278,
 40476              278, 278, 278, 278, 222, 278, 278, 733, 444, 500, 222, 667, 500,
 40477              500, 556, 222, 556, 222, 556, 281, 556, 400, 556, 222, 722, 556,
 40478              722, 556, 722, 556, 615, 723, 556, 778, 556, 778, 556, 778, 556,
 40479              1e3, 944, 722, 333, 722, 333, 722, 333, 667, 500, 667, 500, 667,
 40480              500, 667, 500, 611, 278, 611, 354, 611, 278, 722, 556, 722, 556,
 40481              722, 556, 722, 556, 722, 556, 722, 556, 944, 722, 667, 500, 667,
 40482              611, 500, 611, 500, 611, 500, 222, 556, 667, 556, 1e3, 889, 778,
 40483              611, 667, 500, 611, 278, 333, 333, 333, 333, 333, 333, 333, 333,
 40484              333, 333, 333, 667, 278, 789, 846, 389, 794, 865, 775, 222, 667,
 40485              667, 570, 671, 667, 611, 722, 778, 278, 667, 667, 833, 722, 648,
 40486              778, 725, 667, 600, 611, 667, 837, 667, 831, 761, 278, 667, 570,
 40487              439, 555, 222, 550, 570, 571, 500, 556, 439, 463, 555, 542, 222,
 40488              500, 492, 548, 500, 447, 556, 670, 573, 486, 603, 374, 550, 652,
 40489              546, 728, 779, 222, 550, 556, 550, 779, 667, 667, 843, 544, 708,
 40490              667, 278, 278, 500, 1066, 982, 844, 589, 715, 639, 724, 667, 651,
 40491              667, 544, 704, 667, 917, 614, 715, 715, 589, 686, 833, 722, 778,
 40492              725, 667, 722, 611, 639, 795, 667, 727, 673, 920, 923, 805, 886,
 40493              651, 694, 1022, 682, 556, 562, 522, 493, 553, 556, 688, 465, 556,
 40494              556, 472, 564, 686, 550, 556, 556, 556, 500, 833, 500, 835, 500,
 40495              572, 518, 830, 851, 621, 736, 526, 492, 752, 534, 556, 556, 556,
 40496              378, 496, 500, 222, 222, 222, 910, 828, 556, 472, 565, 500, 556,
 40497              778, 556, 492, 339, 944, 722, 944, 722, 944, 722, 667, 500, 333,
 40498              333, 556, 1e3, 1e3, 552, 222, 222, 222, 222, 333, 333, 333, 556,
 40499              556, 350, 1e3, 1e3, 188, 354, 333, 333, 500, 333, 167, 365, 556,
 40500              556, 1094, 556, 885, 323, 1083, 1e3, 768, 600, 834, 834, 834, 834,
 40501              1e3, 500, 998, 500, 1e3, 500, 500, 494, 612, 823, 713, 584, 549,
 40502              713, 979, 719, 274, 549, 549, 584, 549, 549, 604, 584, 604, 604,
 40503              708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40504              708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40505              708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40506              708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354,
 40507              1e3, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052,
 40508              917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 500, 500, 333,
 40509              333, 333, 333, 333, 333, 333, 333, 222, 222, 294, 294, 324, 324,
 40510              316, 328, 398, 285,
 40511            ];
 40512            t.LiberationSansItalicMapping = [
 40513              -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
 40514              46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
 40515              63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
 40516              80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
 40517              97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
 40518              111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
 40519              124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
 40520              171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
 40521              185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
 40522              198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
 40523              211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
 40524              224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
 40525              237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
 40526              250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
 40527              263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
 40528              276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
 40529              289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
 40530              302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
 40531              315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
 40532              328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
 40533              341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
 40534              354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
 40535              367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
 40536              380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537,
 40537              538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901,
 40538              902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916,
 40539              917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929,
 40540              931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943,
 40541              944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956,
 40542              957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969,
 40543              970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030,
 40544              1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041,
 40545              1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052,
 40546              1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063,
 40547              1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074,
 40548              1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085,
 40549              1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096,
 40550              1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107,
 40551              1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118,
 40552              1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813,
 40553              7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218,
 40554              8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243,
 40555              8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453,
 40556              8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593,
 40557              8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730,
 40558              8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976,
 40559              8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516,
 40560              9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560,
 40561              9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571,
 40562              9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604,
 40563              9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644,
 40564              9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786,
 40565              9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836,
 40566              61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
 40567              -1, -1, -1, -1, -1,
 40568            ];
 40569            t.LiberationSansRegularWidths = [
 40570              365, 0, 333, 278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389,
 40571              584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556,
 40572              556, 556, 278, 278, 584, 584, 584, 556, 1015, 667, 667, 722, 722,
 40573              667, 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, 667, 778,
 40574              722, 667, 611, 722, 667, 944, 667, 667, 611, 278, 278, 278, 469,
 40575              556, 333, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500,
 40576              222, 833, 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500,
 40577              500, 500, 334, 260, 334, 584, 333, 556, 556, 556, 556, 260, 556,
 40578              333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576,
 40579              537, 278, 333, 333, 365, 556, 834, 834, 834, 611, 667, 667, 667,
 40580              667, 667, 667, 1e3, 722, 667, 667, 667, 667, 278, 278, 278, 278,
 40581              722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722,
 40582              667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 500, 556, 556,
 40583              556, 556, 278, 278, 278, 278, 556, 556, 556, 556, 556, 556, 556,
 40584              549, 611, 556, 556, 556, 556, 500, 556, 500, 667, 556, 667, 556,
 40585              667, 556, 722, 500, 722, 500, 722, 500, 722, 500, 722, 615, 722,
 40586              556, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 556,
 40587              778, 556, 778, 556, 778, 556, 722, 556, 722, 556, 278, 278, 278,
 40588              278, 278, 278, 278, 222, 278, 278, 735, 444, 500, 222, 667, 500,
 40589              500, 556, 222, 556, 222, 556, 292, 556, 334, 556, 222, 722, 556,
 40590              722, 556, 722, 556, 604, 723, 556, 778, 556, 778, 556, 778, 556,
 40591              1e3, 944, 722, 333, 722, 333, 722, 333, 667, 500, 667, 500, 667,
 40592              500, 667, 500, 611, 278, 611, 375, 611, 278, 722, 556, 722, 556,
 40593              722, 556, 722, 556, 722, 556, 722, 556, 944, 722, 667, 500, 667,
 40594              611, 500, 611, 500, 611, 500, 222, 556, 667, 556, 1e3, 889, 778,
 40595              611, 667, 500, 611, 278, 333, 333, 333, 333, 333, 333, 333, 333,
 40596              333, 333, 333, 667, 278, 784, 838, 384, 774, 855, 752, 222, 667,
 40597              667, 551, 668, 667, 611, 722, 778, 278, 667, 668, 833, 722, 650,
 40598              778, 722, 667, 618, 611, 667, 798, 667, 835, 748, 278, 667, 578,
 40599              446, 556, 222, 547, 578, 575, 500, 557, 446, 441, 556, 556, 222,
 40600              500, 500, 576, 500, 448, 556, 690, 569, 482, 617, 395, 547, 648,
 40601              525, 713, 781, 222, 547, 556, 547, 781, 667, 667, 865, 542, 719,
 40602              667, 278, 278, 500, 1057, 1010, 854, 583, 722, 635, 719, 667, 656,
 40603              667, 542, 677, 667, 923, 604, 719, 719, 583, 656, 833, 722, 778,
 40604              719, 667, 722, 611, 635, 760, 667, 740, 667, 917, 938, 792, 885,
 40605              656, 719, 1010, 722, 556, 573, 531, 365, 583, 556, 669, 458, 559,
 40606              559, 438, 583, 688, 552, 556, 542, 556, 500, 458, 500, 823, 500,
 40607              573, 521, 802, 823, 625, 719, 521, 510, 750, 542, 556, 556, 556,
 40608              365, 510, 500, 222, 278, 222, 906, 812, 556, 438, 559, 500, 552,
 40609              778, 556, 489, 411, 944, 722, 944, 722, 944, 722, 667, 500, 333,
 40610              333, 556, 1e3, 1e3, 552, 222, 222, 222, 222, 333, 333, 333, 556,
 40611              556, 350, 1e3, 1e3, 188, 354, 333, 333, 500, 333, 167, 365, 556,
 40612              556, 1094, 556, 885, 323, 1073, 1e3, 768, 600, 834, 834, 834, 834,
 40613              1e3, 500, 1e3, 500, 1e3, 500, 500, 494, 612, 823, 713, 584, 549,
 40614              713, 979, 719, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604,
 40615              708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40616              708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40617              708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
 40618              708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354,
 40619              1e3, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052,
 40620              917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 500, 500, 333,
 40621              333, 333, 333, 333, 333, 333, 333, 222, 222, 294, 294, 324, 324,
 40622              316, 328, 398, 285,
 40623            ];
 40624            t.LiberationSansRegularMapping = [
 40625              -1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
 40626              46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
 40627              63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
 40628              80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
 40629              97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
 40630              111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
 40631              124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
 40632              171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
 40633              185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
 40634              198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
 40635              211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
 40636              224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
 40637              237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
 40638              250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
 40639              263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
 40640              276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
 40641              289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
 40642              302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
 40643              315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
 40644              328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
 40645              341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
 40646              354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
 40647              367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
 40648              380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537,
 40649              538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901,
 40650              902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916,
 40651              917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929,
 40652              931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943,
 40653              944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956,
 40654              957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969,
 40655              970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030,
 40656              1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041,
 40657              1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052,
 40658              1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063,
 40659              1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074,
 40660              1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085,
 40661              1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096,
 40662              1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107,
 40663              1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118,
 40664              1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813,
 40665              7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218,
 40666              8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243,
 40667              8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453,
 40668              8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593,
 40669              8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730,
 40670              8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976,
 40671              8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516,
 40672              9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560,
 40673              9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571,
 40674              9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604,
 40675              9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644,
 40676              9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786,
 40677              9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836,
 40678              61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
 40679              -1, -1, -1, -1, -1,
 40680            ];
 40681          },
 40682          (e, t) => {
 40683            Object.defineProperty(t, "__esModule", { value: !0 });
 40684            t.MyriadProRegularMetrics =
 40685              t.MyriadProRegularFactors =
 40686              t.MyriadProItalicMetrics =
 40687              t.MyriadProItalicFactors =
 40688              t.MyriadProBoldMetrics =
 40689              t.MyriadProBoldItalicMetrics =
 40690              t.MyriadProBoldItalicFactors =
 40691              t.MyriadProBoldFactors =
 40692                void 0;
 40693            t.MyriadProBoldFactors = [
 40694              1.36898, 1, 1, 0.72706, 0.80479, 0.83734, 0.98894, 0.99793, 0.9897,
 40695              0.93884, 0.86209, 0.94292, 0.94292, 1.16661, 1.02058, 0.93582,
 40696              0.96694, 0.93582, 1.19137, 0.99793, 0.99793, 0.99793, 0.99793,
 40697              0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.78076,
 40698              0.78076, 1.02058, 1.02058, 1.02058, 0.72851, 0.78966, 0.90838,
 40699              0.83637, 0.82391, 0.96376, 0.80061, 0.86275, 0.8768, 0.95407,
 40700              1.0258, 0.73901, 0.85022, 0.83655, 1.0156, 0.95546, 0.92179,
 40701              0.87107, 0.92179, 0.82114, 0.8096, 0.89713, 0.94438, 0.95353,
 40702              0.94083, 0.91905, 0.90406, 0.9446, 0.94292, 1.18777, 0.94292,
 40703              1.02058, 0.89903, 0.90088, 0.94938, 0.97898, 0.81093, 0.97571,
 40704              0.94938, 1.024, 0.9577, 0.95933, 0.98621, 1.0474, 0.97455, 0.98981,
 40705              0.9672, 0.95933, 0.9446, 0.97898, 0.97407, 0.97646, 0.78036,
 40706              1.10208, 0.95442, 0.95298, 0.97579, 0.9332, 0.94039, 0.938, 0.80687,
 40707              1.01149, 0.80687, 1.02058, 0.80479, 0.99793, 0.99793, 0.99793,
 40708              0.99793, 1.01149, 1.00872, 0.90088, 0.91882, 1.0213, 0.8361,
 40709              1.02058, 0.62295, 0.54324, 0.89022, 1.08595, 1, 1, 0.90088, 1,
 40710              0.97455, 0.93582, 0.90088, 1, 1.05686, 0.8361, 0.99642, 0.99642,
 40711              0.99642, 0.72851, 0.90838, 0.90838, 0.90838, 0.90838, 0.90838,
 40712              0.90838, 0.868, 0.82391, 0.80061, 0.80061, 0.80061, 0.80061, 1.0258,
 40713              1.0258, 1.0258, 1.0258, 0.97484, 0.95546, 0.92179, 0.92179, 0.92179,
 40714              0.92179, 0.92179, 1.02058, 0.92179, 0.94438, 0.94438, 0.94438,
 40715              0.94438, 0.90406, 0.86958, 0.98225, 0.94938, 0.94938, 0.94938,
 40716              0.94938, 0.94938, 0.94938, 0.9031, 0.81093, 0.94938, 0.94938,
 40717              0.94938, 0.94938, 0.98621, 0.98621, 0.98621, 0.98621, 0.93969,
 40718              0.95933, 0.9446, 0.9446, 0.9446, 0.9446, 0.9446, 1.08595, 0.9446,
 40719              0.95442, 0.95442, 0.95442, 0.95442, 0.94039, 0.97898, 0.94039,
 40720              0.90838, 0.94938, 0.90838, 0.94938, 0.90838, 0.94938, 0.82391,
 40721              0.81093, 0.82391, 0.81093, 0.82391, 0.81093, 0.82391, 0.81093,
 40722              0.96376, 0.84313, 0.97484, 0.97571, 0.80061, 0.94938, 0.80061,
 40723              0.94938, 0.80061, 0.94938, 0.80061, 0.94938, 0.80061, 0.94938,
 40724              0.8768, 0.9577, 0.8768, 0.9577, 0.8768, 0.9577, 1, 1, 0.95407,
 40725              0.95933, 0.97069, 0.95933, 1.0258, 0.98621, 1.0258, 0.98621, 1.0258,
 40726              0.98621, 1.0258, 0.98621, 1.0258, 0.98621, 0.887, 1.01591, 0.73901,
 40727              1.0474, 1, 1, 0.97455, 0.83655, 0.98981, 1, 1, 0.83655, 0.73977,
 40728              0.83655, 0.73903, 0.84638, 1.033, 0.95546, 0.95933, 1, 1, 0.95546,
 40729              0.95933, 0.8271, 0.95417, 0.95933, 0.92179, 0.9446, 0.92179, 0.9446,
 40730              0.92179, 0.9446, 0.936, 0.91964, 0.82114, 0.97646, 1, 1, 0.82114,
 40731              0.97646, 0.8096, 0.78036, 0.8096, 0.78036, 1, 1, 0.8096, 0.78036, 1,
 40732              1, 0.89713, 0.77452, 0.89713, 1.10208, 0.94438, 0.95442, 0.94438,
 40733              0.95442, 0.94438, 0.95442, 0.94438, 0.95442, 0.94438, 0.95442,
 40734              0.94438, 0.95442, 0.94083, 0.97579, 0.90406, 0.94039, 0.90406,
 40735              0.9446, 0.938, 0.9446, 0.938, 0.9446, 0.938, 1, 0.99793, 0.90838,
 40736              0.94938, 0.868, 0.9031, 0.92179, 0.9446, 1, 1, 0.89713, 1.10208,
 40737              0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088,
 40738              0.90088, 0.90088, 0.90989, 0.9358, 0.91945, 0.83181, 0.75261,
 40739              0.87992, 0.82976, 0.96034, 0.83689, 0.97268, 1.0078, 0.90838,
 40740              0.83637, 0.8019, 0.90157, 0.80061, 0.9446, 0.95407, 0.92436, 1.0258,
 40741              0.85022, 0.97153, 1.0156, 0.95546, 0.89192, 0.92179, 0.92361,
 40742              0.87107, 0.96318, 0.89713, 0.93704, 0.95638, 0.91905, 0.91709,
 40743              0.92796, 1.0258, 0.93704, 0.94836, 1.0373, 0.95933, 1.0078, 0.95871,
 40744              0.94836, 0.96174, 0.92601, 0.9498, 0.98607, 0.95776, 0.95933,
 40745              1.05453, 1.0078, 0.98275, 0.9314, 0.95617, 0.91701, 1.05993, 0.9446,
 40746              0.78367, 0.9553, 1, 0.86832, 1.0128, 0.95871, 0.99394, 0.87548,
 40747              0.96361, 0.86774, 1.0078, 0.95871, 0.9446, 0.95871, 0.86774, 1, 1,
 40748              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40749              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40750              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40751              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40752              1, 1, 1, 1, 1, 1, 0.94083, 0.97579, 0.94083, 0.97579, 0.94083,
 40753              0.97579, 0.90406, 0.94039, 0.96694, 1, 0.89903, 1, 1, 1, 0.93582,
 40754              0.93582, 0.93582, 1, 0.908, 0.908, 0.918, 0.94219, 0.94219, 0.96544,
 40755              1, 1.285, 1, 1, 0.81079, 0.81079, 1, 1, 0.74854, 1, 1, 1, 1,
 40756              0.99793, 1, 1, 1, 0.65, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40757              1.17173, 1, 0.80535, 0.76169, 1.02058, 1.0732, 1.05486, 1, 1,
 40758              1.30692, 1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1,
 40759              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40760              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40761              1, 1, 1, 1, 1, 1, 1, 1, 1.16161, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40762              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40763              1, 1,
 40764            ];
 40765            t.MyriadProBoldMetrics = { lineHeight: 1.2, lineGap: 0.2 };
 40766            t.MyriadProBoldItalicFactors = [
 40767              1.36898, 1, 1, 0.66227, 0.80779, 0.81625, 0.97276, 0.97276, 0.97733,
 40768              0.92222, 0.83266, 0.94292, 0.94292, 1.16148, 1.02058, 0.93582,
 40769              0.96694, 0.93582, 1.17337, 0.97276, 0.97276, 0.97276, 0.97276,
 40770              0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.78076,
 40771              0.78076, 1.02058, 1.02058, 1.02058, 0.71541, 0.76813, 0.85576,
 40772              0.80591, 0.80729, 0.94299, 0.77512, 0.83655, 0.86523, 0.92222,
 40773              0.98621, 0.71743, 0.81698, 0.79726, 0.98558, 0.92222, 0.90637,
 40774              0.83809, 0.90637, 0.80729, 0.76463, 0.86275, 0.90699, 0.91605,
 40775              0.9154, 0.85308, 0.85458, 0.90531, 0.94292, 1.21296, 0.94292,
 40776              1.02058, 0.89903, 1.18616, 0.99613, 0.91677, 0.78216, 0.91677,
 40777              0.90083, 0.98796, 0.9135, 0.92168, 0.95381, 0.98981, 0.95298,
 40778              0.95381, 0.93459, 0.92168, 0.91513, 0.92004, 0.91677, 0.95077,
 40779              0.748, 1.04502, 0.91677, 0.92061, 0.94236, 0.89544, 0.89364, 0.9,
 40780              0.80687, 0.8578, 0.80687, 1.02058, 0.80779, 0.97276, 0.97276,
 40781              0.97276, 0.97276, 0.8578, 0.99973, 1.18616, 0.91339, 1.08074,
 40782              0.82891, 1.02058, 0.55509, 0.71526, 0.89022, 1.08595, 1, 1, 1.18616,
 40783              1, 0.96736, 0.93582, 1.18616, 1, 1.04864, 0.82711, 0.99043, 0.99043,
 40784              0.99043, 0.71541, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576,
 40785              0.85576, 0.845, 0.80729, 0.77512, 0.77512, 0.77512, 0.77512,
 40786              0.98621, 0.98621, 0.98621, 0.98621, 0.95961, 0.92222, 0.90637,
 40787              0.90637, 0.90637, 0.90637, 0.90637, 1.02058, 0.90251, 0.90699,
 40788              0.90699, 0.90699, 0.90699, 0.85458, 0.83659, 0.94951, 0.99613,
 40789              0.99613, 0.99613, 0.99613, 0.99613, 0.99613, 0.85811, 0.78216,
 40790              0.90083, 0.90083, 0.90083, 0.90083, 0.95381, 0.95381, 0.95381,
 40791              0.95381, 0.9135, 0.92168, 0.91513, 0.91513, 0.91513, 0.91513,
 40792              0.91513, 1.08595, 0.91677, 0.91677, 0.91677, 0.91677, 0.91677,
 40793              0.89364, 0.92332, 0.89364, 0.85576, 0.99613, 0.85576, 0.99613,
 40794              0.85576, 0.99613, 0.80729, 0.78216, 0.80729, 0.78216, 0.80729,
 40795              0.78216, 0.80729, 0.78216, 0.94299, 0.76783, 0.95961, 0.91677,
 40796              0.77512, 0.90083, 0.77512, 0.90083, 0.77512, 0.90083, 0.77512,
 40797              0.90083, 0.77512, 0.90083, 0.86523, 0.9135, 0.86523, 0.9135,
 40798              0.86523, 0.9135, 1, 1, 0.92222, 0.92168, 0.92222, 0.92168, 0.98621,
 40799              0.95381, 0.98621, 0.95381, 0.98621, 0.95381, 0.98621, 0.95381,
 40800              0.98621, 0.95381, 0.86036, 0.97096, 0.71743, 0.98981, 1, 1, 0.95298,
 40801              0.79726, 0.95381, 1, 1, 0.79726, 0.6894, 0.79726, 0.74321, 0.81691,
 40802              1.0006, 0.92222, 0.92168, 1, 1, 0.92222, 0.92168, 0.79464, 0.92098,
 40803              0.92168, 0.90637, 0.91513, 0.90637, 0.91513, 0.90637, 0.91513,
 40804              0.909, 0.87514, 0.80729, 0.95077, 1, 1, 0.80729, 0.95077, 0.76463,
 40805              0.748, 0.76463, 0.748, 1, 1, 0.76463, 0.748, 1, 1, 0.86275, 0.72651,
 40806              0.86275, 1.04502, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699,
 40807              0.91677, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, 0.91677,
 40808              0.9154, 0.94236, 0.85458, 0.89364, 0.85458, 0.90531, 0.9, 0.90531,
 40809              0.9, 0.90531, 0.9, 1, 0.97276, 0.85576, 0.99613, 0.845, 0.85811,
 40810              0.90251, 0.91677, 1, 1, 0.86275, 1.04502, 1.18616, 1.18616, 1.18616,
 40811              1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.00899,
 40812              1.30628, 0.85576, 0.80178, 0.66862, 0.7927, 0.69323, 0.88127,
 40813              0.72459, 0.89711, 0.95381, 0.85576, 0.80591, 0.7805, 0.94729,
 40814              0.77512, 0.90531, 0.92222, 0.90637, 0.98621, 0.81698, 0.92655,
 40815              0.98558, 0.92222, 0.85359, 0.90637, 0.90976, 0.83809, 0.94523,
 40816              0.86275, 0.83509, 0.93157, 0.85308, 0.83392, 0.92346, 0.98621,
 40817              0.83509, 0.92886, 0.91324, 0.92168, 0.95381, 0.90646, 0.92886,
 40818              0.90557, 0.86847, 0.90276, 0.91324, 0.86842, 0.92168, 0.99531,
 40819              0.95381, 0.9224, 0.85408, 0.92699, 0.86847, 1.0051, 0.91513,
 40820              0.80487, 0.93481, 1, 0.88159, 1.05214, 0.90646, 0.97355, 0.81539,
 40821              0.89398, 0.85923, 0.95381, 0.90646, 0.91513, 0.90646, 0.85923, 1, 1,
 40822              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40823              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40824              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40825              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40826              1, 1, 1, 1, 1, 1, 0.9154, 0.94236, 0.9154, 0.94236, 0.9154, 0.94236,
 40827              0.85458, 0.89364, 0.96694, 1, 0.89903, 1, 1, 1, 0.91782, 0.91782,
 40828              0.91782, 1, 0.896, 0.896, 0.896, 0.9332, 0.9332, 0.95973, 1, 1.26,
 40829              1, 1, 0.80479, 0.80178, 1, 1, 0.85633, 1, 1, 1, 1, 0.97276, 1, 1, 1,
 40830              0.698, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.14542, 1,
 40831              0.79199, 0.78694, 1.02058, 1.03493, 1.05486, 1, 1, 1.23026, 1.08595,
 40832              1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40833              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40834              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40835              1, 1, 1.20006, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40836              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40837            ];
 40838            t.MyriadProBoldItalicMetrics = { lineHeight: 1.2, lineGap: 0.2 };
 40839            t.MyriadProItalicFactors = [
 40840              1.36898, 1, 1, 0.65507, 0.84943, 0.85639, 0.88465, 0.88465, 0.86936,
 40841              0.88307, 0.86948, 0.85283, 0.85283, 1.06383, 1.02058, 0.75945,
 40842              0.9219, 0.75945, 1.17337, 0.88465, 0.88465, 0.88465, 0.88465,
 40843              0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.75945,
 40844              0.75945, 1.02058, 1.02058, 1.02058, 0.69046, 0.70926, 0.85158,
 40845              0.77812, 0.76852, 0.89591, 0.70466, 0.76125, 0.80094, 0.86822,
 40846              0.83864, 0.728, 0.77212, 0.79475, 0.93637, 0.87514, 0.8588, 0.76013,
 40847              0.8588, 0.72421, 0.69866, 0.77598, 0.85991, 0.80811, 0.87832,
 40848              0.78112, 0.77512, 0.8562, 1.0222, 1.18417, 1.0222, 1.27014, 0.89903,
 40849              1.15012, 0.93859, 0.94399, 0.846, 0.94399, 0.81453, 1.0186, 0.94219,
 40850              0.96017, 1.03075, 1.02175, 0.912, 1.03075, 0.96998, 0.96017,
 40851              0.93859, 0.94399, 0.94399, 0.95493, 0.746, 1.12658, 0.94578, 0.91,
 40852              0.979, 0.882, 0.882, 0.83, 0.85034, 0.83537, 0.85034, 1.02058,
 40853              0.70869, 0.88465, 0.88465, 0.88465, 0.88465, 0.83537, 0.90083,
 40854              1.15012, 0.9161, 0.94565, 0.73541, 1.02058, 0.53609, 0.69353,
 40855              0.79519, 1.08595, 1, 1, 1.15012, 1, 0.91974, 0.75945, 1.15012, 1,
 40856              0.9446, 0.73361, 0.9005, 0.9005, 0.9005, 0.62864, 0.85158, 0.85158,
 40857              0.85158, 0.85158, 0.85158, 0.85158, 0.773, 0.76852, 0.70466,
 40858              0.70466, 0.70466, 0.70466, 0.83864, 0.83864, 0.83864, 0.83864,
 40859              0.90561, 0.87514, 0.8588, 0.8588, 0.8588, 0.8588, 0.8588, 1.02058,
 40860              0.85751, 0.85991, 0.85991, 0.85991, 0.85991, 0.77512, 0.76013,
 40861              0.88075, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859,
 40862              0.8075, 0.846, 0.81453, 0.81453, 0.81453, 0.81453, 0.82424, 0.82424,
 40863              0.82424, 0.82424, 0.9278, 0.96017, 0.93859, 0.93859, 0.93859,
 40864              0.93859, 0.93859, 1.08595, 0.8562, 0.94578, 0.94578, 0.94578,
 40865              0.94578, 0.882, 0.94578, 0.882, 0.85158, 0.93859, 0.85158, 0.93859,
 40866              0.85158, 0.93859, 0.76852, 0.846, 0.76852, 0.846, 0.76852, 0.846,
 40867              0.76852, 0.846, 0.89591, 0.8544, 0.90561, 0.94399, 0.70466, 0.81453,
 40868              0.70466, 0.81453, 0.70466, 0.81453, 0.70466, 0.81453, 0.70466,
 40869              0.81453, 0.80094, 0.94219, 0.80094, 0.94219, 0.80094, 0.94219, 1, 1,
 40870              0.86822, 0.96017, 0.86822, 0.96017, 0.83864, 0.82424, 0.83864,
 40871              0.82424, 0.83864, 0.82424, 0.83864, 1.03075, 0.83864, 0.82424,
 40872              0.81402, 1.02738, 0.728, 1.02175, 1, 1, 0.912, 0.79475, 1.03075, 1,
 40873              1, 0.79475, 0.83911, 0.79475, 0.66266, 0.80553, 1.06676, 0.87514,
 40874              0.96017, 1, 1, 0.87514, 0.96017, 0.86865, 0.87396, 0.96017, 0.8588,
 40875              0.93859, 0.8588, 0.93859, 0.8588, 0.93859, 0.867, 0.84759, 0.72421,
 40876              0.95493, 1, 1, 0.72421, 0.95493, 0.69866, 0.746, 0.69866, 0.746, 1,
 40877              1, 0.69866, 0.746, 1, 1, 0.77598, 0.88417, 0.77598, 1.12658,
 40878              0.85991, 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.85991,
 40879              0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.87832, 0.979,
 40880              0.77512, 0.882, 0.77512, 0.8562, 0.83, 0.8562, 0.83, 0.8562, 0.83,
 40881              1, 0.88465, 0.85158, 0.93859, 0.773, 0.8075, 0.85751, 0.8562, 1, 1,
 40882              0.77598, 1.12658, 1.15012, 1.15012, 1.15012, 1.15012, 1.15012,
 40883              1.15313, 1.15012, 1.15012, 1.15012, 1.08106, 1.03901, 0.85158,
 40884              0.77025, 0.62264, 0.7646, 0.65351, 0.86026, 0.69461, 0.89947,
 40885              1.03075, 0.85158, 0.77812, 0.76449, 0.88836, 0.70466, 0.8562,
 40886              0.86822, 0.8588, 0.83864, 0.77212, 0.85308, 0.93637, 0.87514,
 40887              0.82352, 0.8588, 0.85701, 0.76013, 0.89058, 0.77598, 0.8156,
 40888              0.82565, 0.78112, 0.77899, 0.89386, 0.83864, 0.8156, 0.9486,
 40889              0.92388, 0.96186, 1.03075, 0.91123, 0.9486, 0.93298, 0.878, 0.93942,
 40890              0.92388, 0.84596, 0.96186, 0.95119, 1.03075, 0.922, 0.88787,
 40891              0.95829, 0.88, 0.93559, 0.93859, 0.78815, 0.93758, 1, 0.89217,
 40892              1.03737, 0.91123, 0.93969, 0.77487, 0.85769, 0.86799, 1.03075,
 40893              0.91123, 0.93859, 0.91123, 0.86799, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40894              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40895              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40896              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40897              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.87832,
 40898              0.979, 0.87832, 0.979, 0.87832, 0.979, 0.77512, 0.882, 0.9219, 1,
 40899              0.89903, 1, 1, 1, 0.87321, 0.87321, 0.87321, 1, 1.027, 1.027, 1.027,
 40900              0.86847, 0.86847, 0.79121, 1, 1.124, 1, 1, 0.73572, 0.73572, 1, 1,
 40901              0.85034, 1, 1, 1, 1, 0.88465, 1, 1, 1, 0.669, 1, 1.36145, 1, 1, 1,
 40902              1, 1, 1, 1, 1, 1, 1, 1, 1.04828, 1, 0.74948, 0.75187, 1.02058,
 40903              0.98391, 1.02119, 1, 1, 1.06233, 1.08595, 1.08595, 1, 1.08595,
 40904              1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40905              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40906              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05233, 1, 1,
 40907              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40908              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40909            ];
 40910            t.MyriadProItalicMetrics = { lineHeight: 1.2, lineGap: 0.2 };
 40911            t.MyriadProRegularFactors = [
 40912              1.36898, 1, 1, 0.76305, 0.82784, 0.94935, 0.89364, 0.92241, 0.89073,
 40913              0.90706, 0.98472, 0.85283, 0.85283, 1.0664, 1.02058, 0.74505,
 40914              0.9219, 0.74505, 1.23456, 0.92241, 0.92241, 0.92241, 0.92241,
 40915              0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.74505,
 40916              0.74505, 1.02058, 1.02058, 1.02058, 0.73002, 0.72601, 0.91755,
 40917              0.8126, 0.80314, 0.92222, 0.73764, 0.79726, 0.83051, 0.90284,
 40918              0.86023, 0.74, 0.8126, 0.84869, 0.96518, 0.91115, 0.8858, 0.79761,
 40919              0.8858, 0.74498, 0.73914, 0.81363, 0.89591, 0.83659, 0.89633,
 40920              0.85608, 0.8111, 0.90531, 1.0222, 1.22736, 1.0222, 1.27014, 0.89903,
 40921              0.90088, 0.86667, 1.0231, 0.896, 1.01411, 0.90083, 1.05099, 1.00512,
 40922              0.99793, 1.05326, 1.09377, 0.938, 1.06226, 1.00119, 0.99793,
 40923              0.98714, 1.0231, 1.01231, 0.98196, 0.792, 1.19137, 0.99074, 0.962,
 40924              1.01915, 0.926, 0.942, 0.856, 0.85034, 0.92006, 0.85034, 1.02058,
 40925              0.69067, 0.92241, 0.92241, 0.92241, 0.92241, 0.92006, 0.9332,
 40926              0.90088, 0.91882, 0.93484, 0.75339, 1.02058, 0.56866, 0.54324,
 40927              0.79519, 1.08595, 1, 1, 0.90088, 1, 0.95325, 0.74505, 0.90088, 1,
 40928              0.97198, 0.75339, 0.91009, 0.91009, 0.91009, 0.66466, 0.91755,
 40929              0.91755, 0.91755, 0.91755, 0.91755, 0.91755, 0.788, 0.80314,
 40930              0.73764, 0.73764, 0.73764, 0.73764, 0.86023, 0.86023, 0.86023,
 40931              0.86023, 0.92915, 0.91115, 0.8858, 0.8858, 0.8858, 0.8858, 0.8858,
 40932              1.02058, 0.8858, 0.89591, 0.89591, 0.89591, 0.89591, 0.8111,
 40933              0.79611, 0.89713, 0.86667, 0.86667, 0.86667, 0.86667, 0.86667,
 40934              0.86667, 0.86936, 0.896, 0.90083, 0.90083, 0.90083, 0.90083,
 40935              0.84224, 0.84224, 0.84224, 0.84224, 0.97276, 0.99793, 0.98714,
 40936              0.98714, 0.98714, 0.98714, 0.98714, 1.08595, 0.89876, 0.99074,
 40937              0.99074, 0.99074, 0.99074, 0.942, 1.0231, 0.942, 0.91755, 0.86667,
 40938              0.91755, 0.86667, 0.91755, 0.86667, 0.80314, 0.896, 0.80314, 0.896,
 40939              0.80314, 0.896, 0.80314, 0.896, 0.92222, 0.93372, 0.92915, 1.01411,
 40940              0.73764, 0.90083, 0.73764, 0.90083, 0.73764, 0.90083, 0.73764,
 40941              0.90083, 0.73764, 0.90083, 0.83051, 1.00512, 0.83051, 1.00512,
 40942              0.83051, 1.00512, 1, 1, 0.90284, 0.99793, 0.90976, 0.99793, 0.86023,
 40943              0.84224, 0.86023, 0.84224, 0.86023, 0.84224, 0.86023, 1.05326,
 40944              0.86023, 0.84224, 0.82873, 1.07469, 0.74, 1.09377, 1, 1, 0.938,
 40945              0.84869, 1.06226, 1, 1, 0.84869, 0.83704, 0.84869, 0.81441, 0.85588,
 40946              1.08927, 0.91115, 0.99793, 1, 1, 0.91115, 0.99793, 0.91887, 0.90991,
 40947              0.99793, 0.8858, 0.98714, 0.8858, 0.98714, 0.8858, 0.98714, 0.894,
 40948              0.91434, 0.74498, 0.98196, 1, 1, 0.74498, 0.98196, 0.73914, 0.792,
 40949              0.73914, 0.792, 1, 1, 0.73914, 0.792, 1, 1, 0.81363, 0.904, 0.81363,
 40950              1.19137, 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074,
 40951              0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, 0.89633,
 40952              1.01915, 0.8111, 0.942, 0.8111, 0.90531, 0.856, 0.90531, 0.856,
 40953              0.90531, 0.856, 1, 0.92241, 0.91755, 0.86667, 0.788, 0.86936,
 40954              0.8858, 0.89876, 1, 1, 0.81363, 1.19137, 0.90088, 0.90088, 0.90088,
 40955              0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90388,
 40956              1.03901, 0.92138, 0.78105, 0.7154, 0.86169, 0.80513, 0.94007,
 40957              0.82528, 0.98612, 1.06226, 0.91755, 0.8126, 0.81884, 0.92819,
 40958              0.73764, 0.90531, 0.90284, 0.8858, 0.86023, 0.8126, 0.91172,
 40959              0.96518, 0.91115, 0.83089, 0.8858, 0.87791, 0.79761, 0.89297,
 40960              0.81363, 0.88157, 0.89992, 0.85608, 0.81992, 0.94307, 0.86023,
 40961              0.88157, 0.95308, 0.98699, 0.99793, 1.06226, 0.95817, 0.95308,
 40962              0.97358, 0.928, 0.98088, 0.98699, 0.92761, 0.99793, 0.96017,
 40963              1.06226, 0.986, 0.944, 0.95978, 0.938, 0.96705, 0.98714, 0.80442,
 40964              0.98972, 1, 0.89762, 1.04552, 0.95817, 0.99007, 0.87064, 0.91879,
 40965              0.88888, 1.06226, 0.95817, 0.98714, 0.95817, 0.88888, 1, 1, 1, 1, 1,
 40966              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40967              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40968              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40969              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40970              1, 1, 1, 0.89633, 1.01915, 0.89633, 1.01915, 0.89633, 1.01915,
 40971              0.8111, 0.942, 0.9219, 1, 0.89903, 1, 1, 1, 0.93173, 0.93173,
 40972              0.93173, 1, 1.06304, 1.06304, 1.06904, 0.89903, 0.89903, 0.80549, 1,
 40973              1.156, 1, 1, 0.76575, 0.76575, 1, 1, 0.72458, 1, 1, 1, 1, 0.92241,
 40974              1, 1, 1, 0.619, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40975              1.07257, 1, 0.74705, 0.71119, 1.02058, 1.024, 1.02119, 1, 1, 1.1536,
 40976              1.08595, 1.08595, 1, 1.08595, 1.08595, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40977              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40978              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40979              1, 1, 1, 1, 1, 1.05638, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40980              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 40981            ];
 40982            t.MyriadProRegularMetrics = { lineHeight: 1.2, lineGap: 0.2 };
 40983          },
 40984          (e, t) => {
 40985            Object.defineProperty(t, "__esModule", { value: !0 });
 40986            t.SegoeuiRegularMetrics =
 40987              t.SegoeuiRegularFactors =
 40988              t.SegoeuiItalicMetrics =
 40989              t.SegoeuiItalicFactors =
 40990              t.SegoeuiBoldMetrics =
 40991              t.SegoeuiBoldItalicMetrics =
 40992              t.SegoeuiBoldItalicFactors =
 40993              t.SegoeuiBoldFactors =
 40994                void 0;
 40995            t.SegoeuiBoldFactors = [
 40996              1.76738, 1, 1, 0.99297, 0.9824, 1.04016, 1.06497, 1.03424, 0.97529,
 40997              1.17647, 1.23203, 1.1085, 1.1085, 1.16939, 1.2107, 0.9754, 1.21408,
 40998              0.9754, 1.59578, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424,
 40999              1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 0.81378, 0.81378,
 41000              1.2107, 1.2107, 1.2107, 0.71703, 0.97847, 0.97363, 0.88776, 0.8641,
 41001              1.02096, 0.79795, 0.85132, 0.914, 1.06085, 1.1406, 0.8007, 0.89858,
 41002              0.83693, 1.14889, 1.09398, 0.97489, 0.92094, 0.97489, 0.90399,
 41003              0.84041, 0.95923, 1.00135, 1, 1.06467, 0.98243, 0.90996, 0.99361,
 41004              1.1085, 1.56942, 1.1085, 1.2107, 0.74627, 0.94282, 0.96752, 1.01519,
 41005              0.86304, 1.01359, 0.97278, 1.15103, 1.01359, 0.98561, 1.02285,
 41006              1.02285, 1.00527, 1.02285, 1.0302, 0.99041, 1.0008, 1.01519,
 41007              1.01359, 1.02258, 0.79104, 1.16862, 0.99041, 0.97454, 1.02511,
 41008              0.99298, 0.96752, 0.95801, 0.94856, 1.16579, 0.94856, 1.2107,
 41009              0.9824, 1.03424, 1.03424, 1, 1.03424, 1.16579, 0.8727, 1.3871,
 41010              1.18622, 1.10818, 1.04478, 1.2107, 1.18622, 0.75155, 0.94994,
 41011              1.28826, 1.21408, 1.21408, 0.91056, 1, 0.91572, 0.9754, 0.64663,
 41012              1.18328, 1.24866, 1.04478, 1.14169, 1.15749, 1.17389, 0.71703,
 41013              0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.93506,
 41014              0.8641, 0.79795, 0.79795, 0.79795, 0.79795, 1.1406, 1.1406, 1.1406,
 41015              1.1406, 1.02096, 1.09398, 0.97426, 0.97426, 0.97426, 0.97426,
 41016              0.97426, 1.2107, 0.97489, 1.00135, 1.00135, 1.00135, 1.00135,
 41017              0.90996, 0.92094, 1.02798, 0.96752, 0.96752, 0.96752, 0.96752,
 41018              0.96752, 0.96752, 0.93136, 0.86304, 0.97278, 0.97278, 0.97278,
 41019              0.97278, 1.02285, 1.02285, 1.02285, 1.02285, 0.97122, 0.99041, 1, 1,
 41020              1, 1, 1, 1.28826, 1.0008, 0.99041, 0.99041, 0.99041, 0.99041,
 41021              0.96752, 1.01519, 0.96752, 0.97363, 0.96752, 0.97363, 0.96752,
 41022              0.97363, 0.96752, 0.8641, 0.86304, 0.8641, 0.86304, 0.8641, 0.86304,
 41023              0.8641, 0.86304, 1.02096, 1.03057, 1.02096, 1.03517, 0.79795,
 41024              0.97278, 0.79795, 0.97278, 0.79795, 0.97278, 0.79795, 0.97278,
 41025              0.79795, 0.97278, 0.914, 1.01359, 0.914, 1.01359, 0.914, 1.01359, 1,
 41026              1, 1.06085, 0.98561, 1.06085, 1.00879, 1.1406, 1.02285, 1.1406,
 41027              1.02285, 1.1406, 1.02285, 1.1406, 1.02285, 1.1406, 1.02285, 0.97138,
 41028              1.08692, 0.8007, 1.02285, 1, 1, 1.00527, 0.83693, 1.02285, 1, 1,
 41029              0.83693, 0.9455, 0.83693, 0.90418, 0.83693, 1.13005, 1.09398,
 41030              0.99041, 1, 1, 1.09398, 0.99041, 0.96692, 1.09251, 0.99041, 0.97489,
 41031              1.0008, 0.97489, 1.0008, 0.97489, 1.0008, 0.93994, 0.97931, 0.90399,
 41032              1.02258, 1, 1, 0.90399, 1.02258, 0.84041, 0.79104, 0.84041, 0.79104,
 41033              0.84041, 0.79104, 0.84041, 0.79104, 1, 1, 0.95923, 1.07034, 0.95923,
 41034              1.16862, 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041,
 41035              1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, 1.06467,
 41036              1.02511, 0.90996, 0.96752, 0.90996, 0.99361, 0.95801, 0.99361,
 41037              0.95801, 0.99361, 0.95801, 1.07733, 1.03424, 0.97363, 0.96752,
 41038              0.93506, 0.93136, 0.97489, 1.0008, 1, 1, 0.95923, 1.16862, 1.15103,
 41039              1.15103, 1.01173, 1.03959, 0.75953, 0.81378, 0.79912, 1.15103,
 41040              1.21994, 0.95161, 0.87815, 1.01149, 0.81525, 0.7676, 0.98167,
 41041              1.01134, 1.02546, 0.84097, 1.03089, 1.18102, 0.97363, 0.88776,
 41042              0.85134, 0.97826, 0.79795, 0.99361, 1.06085, 0.97489, 1.1406,
 41043              0.89858, 1.0388, 1.14889, 1.09398, 0.86039, 0.97489, 1.0595,
 41044              0.92094, 0.94793, 0.95923, 0.90996, 0.99346, 0.98243, 1.02112,
 41045              0.95493, 1.1406, 0.90996, 1.03574, 1.02597, 1.0008, 1.18102,
 41046              1.06628, 1.03574, 1.0192, 1.01932, 1.00886, 0.97531, 1.0106, 1.0008,
 41047              1.13189, 1.18102, 1.02277, 0.98683, 1.0016, 0.99561, 1.07237,
 41048              1.0008, 0.90434, 0.99921, 0.93803, 0.8965, 1.23085, 1.06628,
 41049              1.04983, 0.96268, 1.0499, 0.98439, 1.18102, 1.06628, 1.0008,
 41050              1.06628, 0.98439, 0.79795, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41051              1.09466, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41052              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41053              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41054              0.97278, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.02065, 1, 1, 1, 1, 1,
 41055              1, 1.06467, 1.02511, 1.06467, 1.02511, 1.06467, 1.02511, 0.90996,
 41056              0.96752, 1, 1.21408, 0.89903, 1, 1, 0.75155, 1.04394, 1.04394,
 41057              1.04394, 1.04394, 0.98633, 0.98633, 0.98633, 0.73047, 0.73047,
 41058              1.20642, 0.91211, 1.25635, 1.222, 1.02956, 1.03372, 1.03372,
 41059              0.96039, 1.24633, 1, 1.12454, 0.93503, 1.03424, 1.19687, 1.03424, 1,
 41060              1, 1, 0.771, 1, 1, 1.15749, 1.15749, 1.15749, 1.10948, 0.86279,
 41061              0.94434, 0.86279, 0.94434, 0.86182, 1, 1, 1.16897, 1, 0.96085,
 41062              0.90137, 1.2107, 1.18416, 1.13973, 0.69825, 0.9716, 2.10339,
 41063              1.29004, 1.29004, 1.21172, 1.29004, 1.29004, 1, 1, 1, 1, 1, 1, 1, 1,
 41064              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41065              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41066              1.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025,
 41067              1.18874, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1,
 41068              1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.09193, 1.09193, 1, 1,
 41069              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41070            ];
 41071            t.SegoeuiBoldMetrics = { lineHeight: 1.33008, lineGap: 0 };
 41072            t.SegoeuiBoldItalicFactors = [
 41073              1.76738, 1, 1, 0.98946, 1.03959, 1.04016, 1.02809, 1.036, 0.97639,
 41074              1.10953, 1.23203, 1.11144, 1.11144, 1.16939, 1.21237, 0.9754,
 41075              1.21261, 0.9754, 1.59754, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036,
 41076              1.036, 1.036, 1.036, 1.036, 0.81378, 0.81378, 1.21237, 1.21237,
 41077              1.21237, 0.73541, 0.97847, 0.97363, 0.89723, 0.87897, 1.0426,
 41078              0.79429, 0.85292, 0.91149, 1.05815, 1.1406, 0.79631, 0.90128,
 41079              0.83853, 1.04396, 1.10615, 0.97552, 0.94436, 0.97552, 0.88641,
 41080              0.80527, 0.96083, 1.00135, 1, 1.06777, 0.9817, 0.91142, 0.99361,
 41081              1.11144, 1.57293, 1.11144, 1.21237, 0.74627, 1.31818, 1.06585,
 41082              0.97042, 0.83055, 0.97042, 0.93503, 1.1261, 0.97042, 0.97922,
 41083              1.14236, 0.94552, 1.01054, 1.14236, 1.02471, 0.97922, 0.94165,
 41084              0.97042, 0.97042, 1.0276, 0.78929, 1.1261, 0.97922, 0.95874,
 41085              1.02197, 0.98507, 0.96752, 0.97168, 0.95107, 1.16579, 0.95107,
 41086              1.21237, 1.03959, 1.036, 1.036, 1, 1.036, 1.16579, 0.87357, 1.31818,
 41087              1.18754, 1.26781, 1.05356, 1.21237, 1.18622, 0.79487, 0.94994,
 41088              1.29004, 1.24047, 1.24047, 1.31818, 1, 0.91484, 0.9754, 1.31818,
 41089              1.1349, 1.24866, 1.05356, 1.13934, 1.15574, 1.17389, 0.73541,
 41090              0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.94385,
 41091              0.87897, 0.79429, 0.79429, 0.79429, 0.79429, 1.1406, 1.1406, 1.1406,
 41092              1.1406, 1.0426, 1.10615, 0.97552, 0.97552, 0.97552, 0.97552,
 41093              0.97552, 1.21237, 0.97552, 1.00135, 1.00135, 1.00135, 1.00135,
 41094              0.91142, 0.94436, 0.98721, 1.06585, 1.06585, 1.06585, 1.06585,
 41095              1.06585, 1.06585, 0.96705, 0.83055, 0.93503, 0.93503, 0.93503,
 41096              0.93503, 1.14236, 1.14236, 1.14236, 1.14236, 0.93125, 0.97922,
 41097              0.94165, 0.94165, 0.94165, 0.94165, 0.94165, 1.29004, 0.94165,
 41098              0.97922, 0.97922, 0.97922, 0.97922, 0.96752, 0.97042, 0.96752,
 41099              0.97363, 1.06585, 0.97363, 1.06585, 0.97363, 1.06585, 0.87897,
 41100              0.83055, 0.87897, 0.83055, 0.87897, 0.83055, 0.87897, 0.83055,
 41101              1.0426, 1.0033, 1.0426, 0.97042, 0.79429, 0.93503, 0.79429, 0.93503,
 41102              0.79429, 0.93503, 0.79429, 0.93503, 0.79429, 0.93503, 0.91149,
 41103              0.97042, 0.91149, 0.97042, 0.91149, 0.97042, 1, 1, 1.05815, 0.97922,
 41104              1.05815, 0.97922, 1.1406, 1.14236, 1.1406, 1.14236, 1.1406, 1.14236,
 41105              1.1406, 1.14236, 1.1406, 1.14236, 0.97441, 1.04302, 0.79631,
 41106              1.01582, 1, 1, 1.01054, 0.83853, 1.14236, 1, 1, 0.83853, 1.09125,
 41107              0.83853, 0.90418, 0.83853, 1.19508, 1.10615, 0.97922, 1, 1, 1.10615,
 41108              0.97922, 1.01034, 1.10466, 0.97922, 0.97552, 0.94165, 0.97552,
 41109              0.94165, 0.97552, 0.94165, 0.91602, 0.91981, 0.88641, 1.0276, 1, 1,
 41110              0.88641, 1.0276, 0.80527, 0.78929, 0.80527, 0.78929, 0.80527,
 41111              0.78929, 0.80527, 0.78929, 1, 1, 0.96083, 1.05403, 0.95923, 1.16862,
 41112              1.00135, 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.00135,
 41113              0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.06777, 1.02197,
 41114              0.91142, 0.96752, 0.91142, 0.99361, 0.97168, 0.99361, 0.97168,
 41115              0.99361, 0.97168, 1.23199, 1.036, 0.97363, 1.06585, 0.94385,
 41116              0.96705, 0.97552, 0.94165, 1, 1, 0.96083, 1.1261, 1.31818, 1.31818,
 41117              1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818,
 41118              0.95161, 1.27126, 1.00811, 0.83284, 0.77702, 0.99137, 0.95253,
 41119              1.0347, 0.86142, 1.07205, 1.14236, 0.97363, 0.89723, 0.86869,
 41120              1.09818, 0.79429, 0.99361, 1.05815, 0.97552, 1.1406, 0.90128,
 41121              1.06662, 1.04396, 1.10615, 0.84918, 0.97552, 1.04694, 0.94436,
 41122              0.98015, 0.96083, 0.91142, 1.00356, 0.9817, 1.01945, 0.98999,
 41123              1.1406, 0.91142, 1.04961, 0.9898, 1.00639, 1.14236, 1.07514,
 41124              1.04961, 0.99607, 1.02897, 1.008, 0.9898, 0.95134, 1.00639, 1.11121,
 41125              1.14236, 1.00518, 0.97981, 1.02186, 1, 1.08578, 0.94165, 0.99314,
 41126              0.98387, 0.93028, 0.93377, 1.35125, 1.07514, 1.10687, 0.93491,
 41127              1.04232, 1.00351, 1.14236, 1.07514, 0.94165, 1.07514, 1.00351,
 41128              0.79429, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.09097, 1, 1, 1, 1, 1,
 41129              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41130              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41131              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.93503, 1, 1, 1, 1, 1,
 41132              1, 1, 1, 1, 1, 1, 1, 0.96609, 1, 1, 1, 1, 1, 1, 1.06777, 1.02197,
 41133              1.06777, 1.02197, 1.06777, 1.02197, 0.91142, 0.96752, 1, 1.21261,
 41134              0.89903, 1, 1, 0.75155, 1.04745, 1.04745, 1.04745, 1.04394, 0.98633,
 41135              0.98633, 0.98633, 0.72959, 0.72959, 1.20502, 0.91406, 1.26514,
 41136              1.222, 1.02956, 1.03372, 1.03372, 0.96039, 1.24633, 1, 1.09125,
 41137              0.93327, 1.03336, 1.16541, 1.036, 1, 1, 1, 0.771, 1, 1, 1.15574,
 41138              1.15574, 1.15574, 1.15574, 0.86364, 0.94434, 0.86279, 0.94434,
 41139              0.86224, 1, 1, 1.16798, 1, 0.96085, 0.90068, 1.21237, 1.18416,
 41140              1.13904, 0.69825, 0.9716, 2.10339, 1.29004, 1.29004, 1.21339,
 41141              1.29004, 1.29004, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41142              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41143              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.42603, 1, 0.99862, 0.99862, 1,
 41144              0.87025, 0.87025, 0.87025, 0.87025, 1.18775, 1.42603, 1, 1.42603,
 41145              1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163,
 41146              1, 1, 1, 1.13269, 1.13269, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41147              1, 1, 1, 1,
 41148            ];
 41149            t.SegoeuiBoldItalicMetrics = { lineHeight: 1.33008, lineGap: 0 };
 41150            t.SegoeuiItalicFactors = [
 41151              1.76738, 1, 1, 0.98946, 1.14763, 1.05365, 1.06234, 0.96927, 0.92586,
 41152              1.15373, 1.18414, 0.91349, 0.91349, 1.07403, 1.17308, 0.78383,
 41153              1.20088, 0.78383, 1.42531, 0.96927, 0.96927, 0.96927, 0.96927,
 41154              0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.78383,
 41155              0.78383, 1.17308, 1.17308, 1.17308, 0.77349, 0.94565, 0.94729,
 41156              0.85944, 0.88506, 0.9858, 0.74817, 0.80016, 0.88449, 0.98039,
 41157              0.95782, 0.69238, 0.89898, 0.83231, 0.98183, 1.03989, 0.96924,
 41158              0.86237, 0.96924, 0.80595, 0.74524, 0.86091, 0.95402, 0.94143,
 41159              0.98448, 0.8858, 0.83089, 0.93285, 1.0949, 1.39016, 1.0949, 1.45994,
 41160              0.74627, 1.04839, 0.97454, 0.97454, 0.87207, 0.97454, 0.87533,
 41161              1.06151, 0.97454, 1.00176, 1.16484, 1.08132, 0.98047, 1.16484,
 41162              1.02989, 1.01054, 0.96225, 0.97454, 0.97454, 1.06598, 0.79004,
 41163              1.16344, 1.00351, 0.94629, 0.9973, 0.91016, 0.96777, 0.9043,
 41164              0.91082, 0.92481, 0.91082, 1.17308, 0.95748, 0.96927, 0.96927, 1,
 41165              0.96927, 0.92481, 0.80597, 1.04839, 1.23393, 1.1781, 0.9245,
 41166              1.17308, 1.20808, 0.63218, 0.94261, 1.24822, 1.09971, 1.09971,
 41167              1.04839, 1, 0.85273, 0.78032, 1.04839, 1.09971, 1.22326, 0.9245,
 41168              1.09836, 1.13525, 1.15222, 0.70424, 0.94729, 0.94729, 0.94729,
 41169              0.94729, 0.94729, 0.94729, 0.85498, 0.88506, 0.74817, 0.74817,
 41170              0.74817, 0.74817, 0.95782, 0.95782, 0.95782, 0.95782, 0.9858,
 41171              1.03989, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924, 1.17308,
 41172              0.96924, 0.95402, 0.95402, 0.95402, 0.95402, 0.83089, 0.86237,
 41173              0.88409, 0.97454, 0.97454, 0.97454, 0.97454, 0.97454, 0.97454,
 41174              0.92916, 0.87207, 0.87533, 0.87533, 0.87533, 0.87533, 0.93146,
 41175              0.93146, 0.93146, 0.93146, 0.93854, 1.01054, 0.96225, 0.96225,
 41176              0.96225, 0.96225, 0.96225, 1.24822, 0.8761, 1.00351, 1.00351,
 41177              1.00351, 1.00351, 0.96777, 0.97454, 0.96777, 0.94729, 0.97454,
 41178              0.94729, 0.97454, 0.94729, 0.97454, 0.88506, 0.87207, 0.88506,
 41179              0.87207, 0.88506, 0.87207, 0.88506, 0.87207, 0.9858, 0.95391,
 41180              0.9858, 0.97454, 0.74817, 0.87533, 0.74817, 0.87533, 0.74817,
 41181              0.87533, 0.74817, 0.87533, 0.74817, 0.87533, 0.88449, 0.97454,
 41182              0.88449, 0.97454, 0.88449, 0.97454, 1, 1, 0.98039, 1.00176, 0.98039,
 41183              1.00176, 0.95782, 0.93146, 0.95782, 0.93146, 0.95782, 0.93146,
 41184              0.95782, 1.16484, 0.95782, 0.93146, 0.84421, 1.12761, 0.69238,
 41185              1.08132, 1, 1, 0.98047, 0.83231, 1.16484, 1, 1, 0.84723, 1.04861,
 41186              0.84723, 0.78755, 0.83231, 1.23736, 1.03989, 1.01054, 1, 1, 1.03989,
 41187              1.01054, 0.9857, 1.03849, 1.01054, 0.96924, 0.96225, 0.96924,
 41188              0.96225, 0.96924, 0.96225, 0.92383, 0.90171, 0.80595, 1.06598, 1, 1,
 41189              0.80595, 1.06598, 0.74524, 0.79004, 0.74524, 0.79004, 0.74524,
 41190              0.79004, 0.74524, 0.79004, 1, 1, 0.86091, 1.02759, 0.85771, 1.16344,
 41191              0.95402, 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.95402,
 41192              1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.98448, 0.9973,
 41193              0.83089, 0.96777, 0.83089, 0.93285, 0.9043, 0.93285, 0.9043,
 41194              0.93285, 0.9043, 1.31868, 0.96927, 0.94729, 0.97454, 0.85498,
 41195              0.92916, 0.96924, 0.8761, 1, 1, 0.86091, 1.16344, 1.04839, 1.04839,
 41196              1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839,
 41197              0.81965, 0.81965, 0.94729, 0.78032, 0.71022, 0.90883, 0.84171,
 41198              0.99877, 0.77596, 1.05734, 1.2, 0.94729, 0.85944, 0.82791, 0.9607,
 41199              0.74817, 0.93285, 0.98039, 0.96924, 0.95782, 0.89898, 0.98316,
 41200              0.98183, 1.03989, 0.78614, 0.96924, 0.97642, 0.86237, 0.86075,
 41201              0.86091, 0.83089, 0.90082, 0.8858, 0.97296, 1.01284, 0.95782,
 41202              0.83089, 1.0976, 1.04, 1.03342, 1.2, 1.0675, 1.0976, 0.98205,
 41203              1.03809, 1.05097, 1.04, 0.95364, 1.03342, 1.05401, 1.2, 1.02148,
 41204              1.0119, 1.04724, 1.0127, 1.02732, 0.96225, 0.8965, 0.97783, 0.93574,
 41205              0.94818, 1.30679, 1.0675, 1.11826, 0.99821, 1.0557, 1.0326, 1.2,
 41206              1.0675, 0.96225, 1.0675, 1.0326, 0.74817, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41207              1, 1, 1, 1.03754, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41208              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41209              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41210              1, 1, 1, 0.87533, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.98705, 1, 1,
 41211              1, 1, 1, 1, 0.98448, 0.9973, 0.98448, 0.9973, 0.98448, 0.9973,
 41212              0.83089, 0.96777, 1, 1.20088, 0.89903, 1, 1, 0.75155, 0.94945,
 41213              0.94945, 0.94945, 0.94945, 1.12317, 1.12317, 1.12317, 0.67603,
 41214              0.67603, 1.15621, 0.73584, 1.21191, 1.22135, 1.06483, 0.94868,
 41215              0.94868, 0.95996, 1.24633, 1, 1.07497, 0.87709, 0.96927, 1.01473,
 41216              0.96927, 1, 1, 1, 0.77295, 1, 1, 1.09836, 1.09836, 1.09836, 1.01522,
 41217              0.86321, 0.94434, 0.8649, 0.94434, 0.86182, 1, 1, 1.083, 1, 0.91578,
 41218              0.86438, 1.17308, 1.18416, 1.14589, 0.69825, 0.97622, 1.96791,
 41219              1.24822, 1.24822, 1.17308, 1.24822, 1.24822, 1, 1, 1, 1, 1, 1, 1, 1,
 41220              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41221              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41222              1.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025,
 41223              1.17984, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1,
 41224              1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.10742, 1.10742, 1, 1,
 41225              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41226            ];
 41227            t.SegoeuiItalicMetrics = { lineHeight: 1.33008, lineGap: 0 };
 41228            t.SegoeuiRegularFactors = [
 41229              1.76738, 1, 1, 0.98594, 1.02285, 1.10454, 1.06234, 0.96927, 0.92037,
 41230              1.19985, 1.2046, 0.90616, 0.90616, 1.07152, 1.1714, 0.78032,
 41231              1.20088, 0.78032, 1.40246, 0.96927, 0.96927, 0.96927, 0.96927,
 41232              0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.78032,
 41233              0.78032, 1.1714, 1.1714, 1.1714, 0.80597, 0.94084, 0.96706, 0.85944,
 41234              0.85734, 0.97093, 0.75842, 0.79936, 0.88198, 0.9831, 0.95782,
 41235              0.71387, 0.86969, 0.84636, 1.07796, 1.03584, 0.96924, 0.83968,
 41236              0.96924, 0.82826, 0.79649, 0.85771, 0.95132, 0.93119, 0.98965,
 41237              0.88433, 0.8287, 0.93365, 1.08612, 1.3638, 1.08612, 1.45786,
 41238              0.74627, 0.80499, 0.91484, 1.05707, 0.92383, 1.05882, 0.9403,
 41239              1.12654, 1.05882, 1.01756, 1.09011, 1.09011, 0.99414, 1.09011,
 41240              1.034, 1.01756, 1.05356, 1.05707, 1.05882, 1.04399, 0.84863,
 41241              1.21968, 1.01756, 0.95801, 1.00068, 0.91797, 0.96777, 0.9043,
 41242              0.90351, 0.92105, 0.90351, 1.1714, 0.85337, 0.96927, 0.96927,
 41243              0.99912, 0.96927, 0.92105, 0.80597, 1.2434, 1.20808, 1.05937,
 41244              0.90957, 1.1714, 1.20808, 0.75155, 0.94261, 1.24644, 1.09971,
 41245              1.09971, 0.84751, 1, 0.85273, 0.78032, 0.61584, 1.05425, 1.17914,
 41246              0.90957, 1.08665, 1.11593, 1.14169, 0.73381, 0.96706, 0.96706,
 41247              0.96706, 0.96706, 0.96706, 0.96706, 0.86035, 0.85734, 0.75842,
 41248              0.75842, 0.75842, 0.75842, 0.95782, 0.95782, 0.95782, 0.95782,
 41249              0.97093, 1.03584, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924,
 41250              1.1714, 0.96924, 0.95132, 0.95132, 0.95132, 0.95132, 0.8287,
 41251              0.83968, 0.89049, 0.91484, 0.91484, 0.91484, 0.91484, 0.91484,
 41252              0.91484, 0.93575, 0.92383, 0.9403, 0.9403, 0.9403, 0.9403, 0.8717,
 41253              0.8717, 0.8717, 0.8717, 1.00527, 1.01756, 1.05356, 1.05356, 1.05356,
 41254              1.05356, 1.05356, 1.24644, 0.95923, 1.01756, 1.01756, 1.01756,
 41255              1.01756, 0.96777, 1.05707, 0.96777, 0.96706, 0.91484, 0.96706,
 41256              0.91484, 0.96706, 0.91484, 0.85734, 0.92383, 0.85734, 0.92383,
 41257              0.85734, 0.92383, 0.85734, 0.92383, 0.97093, 1.0969, 0.97093,
 41258              1.05882, 0.75842, 0.9403, 0.75842, 0.9403, 0.75842, 0.9403, 0.75842,
 41259              0.9403, 0.75842, 0.9403, 0.88198, 1.05882, 0.88198, 1.05882,
 41260              0.88198, 1.05882, 1, 1, 0.9831, 1.01756, 0.9831, 1.01756, 0.95782,
 41261              0.8717, 0.95782, 0.8717, 0.95782, 0.8717, 0.95782, 1.09011, 0.95782,
 41262              0.8717, 0.84784, 1.11551, 0.71387, 1.09011, 1, 1, 0.99414, 0.84636,
 41263              1.09011, 1, 1, 0.84636, 1.0536, 0.84636, 0.94298, 0.84636, 1.23297,
 41264              1.03584, 1.01756, 1, 1, 1.03584, 1.01756, 1.00323, 1.03444, 1.01756,
 41265              0.96924, 1.05356, 0.96924, 1.05356, 0.96924, 1.05356, 0.93066,
 41266              0.98293, 0.82826, 1.04399, 1, 1, 0.82826, 1.04399, 0.79649, 0.84863,
 41267              0.79649, 0.84863, 0.79649, 0.84863, 0.79649, 0.84863, 1, 1, 0.85771,
 41268              1.17318, 0.85771, 1.21968, 0.95132, 1.01756, 0.95132, 1.01756,
 41269              0.95132, 1.01756, 0.95132, 1.01756, 0.95132, 1.01756, 0.95132,
 41270              1.01756, 0.98965, 1.00068, 0.8287, 0.96777, 0.8287, 0.93365, 0.9043,
 41271              0.93365, 0.9043, 0.93365, 0.9043, 1.08571, 0.96927, 0.96706,
 41272              0.91484, 0.86035, 0.93575, 0.96924, 0.95923, 1, 1, 0.85771, 1.21968,
 41273              1.11437, 1.11437, 0.93109, 0.91202, 0.60411, 0.84164, 0.55572,
 41274              1.01173, 0.97361, 0.81818, 0.81818, 0.96635, 0.78032, 0.72727,
 41275              0.92366, 0.98601, 1.03405, 0.77968, 1.09799, 1.2, 0.96706, 0.85944,
 41276              0.85638, 0.96491, 0.75842, 0.93365, 0.9831, 0.96924, 0.95782,
 41277              0.86969, 0.94152, 1.07796, 1.03584, 0.78437, 0.96924, 0.98715,
 41278              0.83968, 0.83491, 0.85771, 0.8287, 0.94492, 0.88433, 0.9287, 1.0098,
 41279              0.95782, 0.8287, 1.0625, 0.98248, 1.03424, 1.2, 1.01071, 1.0625,
 41280              0.95246, 1.03809, 1.04912, 0.98248, 1.00221, 1.03424, 1.05443, 1.2,
 41281              1.04785, 0.99609, 1.00169, 1.05176, 0.99346, 1.05356, 0.9087,
 41282              1.03004, 0.95542, 0.93117, 1.23362, 1.01071, 1.07831, 1.02512,
 41283              1.05205, 1.03502, 1.2, 1.01071, 1.05356, 1.01071, 1.03502, 0.75842,
 41284              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.03719, 1, 1, 1, 1, 1, 1, 1, 1,
 41285              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41286              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41287              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.9403, 1, 1, 1, 1, 1, 1, 1, 1,
 41288              1, 1, 1, 1, 1.04021, 1, 1, 1, 1, 1, 1, 0.98965, 1.00068, 0.98965,
 41289              1.00068, 0.98965, 1.00068, 0.8287, 0.96777, 1, 1.20088, 0.89903, 1,
 41290              1, 0.75155, 1.03077, 1.03077, 1.03077, 1.03077, 1.13196, 1.13196,
 41291              1.13196, 0.67428, 0.67428, 1.16039, 0.73291, 1.20996, 1.22135,
 41292              1.06483, 0.94868, 0.94868, 0.95996, 1.24633, 1, 1.07497, 0.87796,
 41293              0.96927, 1.01518, 0.96927, 1, 1, 1, 0.77295, 1, 1, 1.10539, 1.10539,
 41294              1.11358, 1.06967, 0.86279, 0.94434, 0.86279, 0.94434, 0.86182, 1, 1,
 41295              1.083, 1, 0.91578, 0.86507, 1.1714, 1.18416, 1.14589, 0.69825,
 41296              0.97622, 1.9697, 1.24822, 1.24822, 1.17238, 1.24822, 1.24822, 1, 1,
 41297              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41298              1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 41299              1, 1, 1, 1, 1.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025,
 41300              0.87025, 0.87025, 1.18083, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1,
 41301              1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.10938,
 41302              1.10938, 1, 1, 1, 1.05425, 1.09971, 1.09971, 1.09971, 1, 1, 1, 1, 1,
 41303              1, 1, 1, 1, 1, 1,
 41304            ];
 41305            t.SegoeuiRegularMetrics = { lineHeight: 1.33008, lineGap: 0 };
 41306          },
 41307          (e, t, a) => {
 41308            Object.defineProperty(t, "__esModule", { value: !0 });
 41309            t.PostScriptEvaluator =
 41310              t.PostScriptCompiler =
 41311              t.PDFFunctionFactory =
 41312                void 0;
 41313            t.isPDFFunction = function isPDFFunction(e) {
 41314              let t;
 41315              if (e instanceof r.Dict) t = e;
 41316              else {
 41317                if (!(e instanceof s.BaseStream)) return !1;
 41318                t = e.dict;
 41319              }
 41320              return t.has("FunctionType");
 41321            };
 41322            var r = a(4),
 41323              n = a(2),
 41324              i = a(58),
 41325              s = a(5),
 41326              o = a(59);
 41327            t.PDFFunctionFactory = class PDFFunctionFactory {
 41328              constructor({ xref: e, isEvalSupported: t = !0 }) {
 41329                this.xref = e;
 41330                this.isEvalSupported = !1 !== t;
 41331              }
 41332              create(e) {
 41333                const t = this.getCached(e);
 41334                if (t) return t;
 41335                const a = PDFFunction.parse({
 41336                  xref: this.xref,
 41337                  isEvalSupported: this.isEvalSupported,
 41338                  fn: e instanceof r.Ref ? this.xref.fetch(e) : e,
 41339                });
 41340                this._cache(e, a);
 41341                return a;
 41342              }
 41343              createFromArray(e) {
 41344                const t = this.getCached(e);
 41345                if (t) return t;
 41346                const a = PDFFunction.parseArray({
 41347                  xref: this.xref,
 41348                  isEvalSupported: this.isEvalSupported,
 41349                  fnObj: e instanceof r.Ref ? this.xref.fetch(e) : e,
 41350                });
 41351                this._cache(e, a);
 41352                return a;
 41353              }
 41354              getCached(e) {
 41355                let t;
 41356                e instanceof r.Ref
 41357                  ? (t = e)
 41358                  : e instanceof r.Dict
 41359                    ? (t = e.objId)
 41360                    : e instanceof s.BaseStream && (t = e.dict?.objId);
 41361                if (t) {
 41362                  const e = this._localFunctionCache.getByRef(t);
 41363                  if (e) return e;
 41364                }
 41365                return null;
 41366              }
 41367              _cache(e, t) {
 41368                if (!t)
 41369                  throw new Error(
 41370                    'PDFFunctionFactory._cache - expected "parsedFunction" argument.',
 41371                  );
 41372                let a;
 41373                e instanceof r.Ref
 41374                  ? (a = e)
 41375                  : e instanceof r.Dict
 41376                    ? (a = e.objId)
 41377                    : e instanceof s.BaseStream && (a = e.dict?.objId);
 41378                a && this._localFunctionCache.set(null, a, t);
 41379              }
 41380              get _localFunctionCache() {
 41381                return (0, n.shadow)(
 41382                  this,
 41383                  "_localFunctionCache",
 41384                  new o.LocalFunctionCache(),
 41385                );
 41386              }
 41387            };
 41388            function toNumberArray(e) {
 41389              if (!Array.isArray(e)) return null;
 41390              const t = e.length;
 41391              for (let a = 0; a < t; a++)
 41392                if ("number" != typeof e[a]) {
 41393                  const a = new Array(t);
 41394                  for (let r = 0; r < t; r++) a[r] = +e[r];
 41395                  return a;
 41396                }
 41397              return e;
 41398            }
 41399            class PDFFunction {
 41400              static getSampleArray(e, t, a, r) {
 41401                let n,
 41402                  i,
 41403                  s = 1;
 41404                for (n = 0, i = e.length; n < i; n++) s *= e[n];
 41405                s *= t;
 41406                const o = new Array(s);
 41407                let c = 0,
 41408                  l = 0;
 41409                const h = 1 / (2 ** a - 1),
 41410                  u = r.getBytes((s * a + 7) / 8);
 41411                let d = 0;
 41412                for (n = 0; n < s; n++) {
 41413                  for (; c < a; ) {
 41414                    l <<= 8;
 41415                    l |= u[d++];
 41416                    c += 8;
 41417                  }
 41418                  c -= a;
 41419                  o[n] = (l >> c) * h;
 41420                  l &= (1 << c) - 1;
 41421                }
 41422                return o;
 41423              }
 41424              static parse({ xref: e, isEvalSupported: t, fn: a }) {
 41425                const r = a.dict || a;
 41426                switch (r.get("FunctionType")) {
 41427                  case 0:
 41428                    return this.constructSampled({
 41429                      xref: e,
 41430                      isEvalSupported: t,
 41431                      fn: a,
 41432                      dict: r,
 41433                    });
 41434                  case 1:
 41435                    break;
 41436                  case 2:
 41437                    return this.constructInterpolated({
 41438                      xref: e,
 41439                      isEvalSupported: t,
 41440                      dict: r,
 41441                    });
 41442                  case 3:
 41443                    return this.constructStiched({
 41444                      xref: e,
 41445                      isEvalSupported: t,
 41446                      dict: r,
 41447                    });
 41448                  case 4:
 41449                    return this.constructPostScript({
 41450                      xref: e,
 41451                      isEvalSupported: t,
 41452                      fn: a,
 41453                      dict: r,
 41454                    });
 41455                }
 41456                throw new n.FormatError("Unknown type of function");
 41457              }
 41458              static parseArray({ xref: e, isEvalSupported: t, fnObj: a }) {
 41459                if (!Array.isArray(a))
 41460                  return this.parse({ xref: e, isEvalSupported: t, fn: a });
 41461                const r = [];
 41462                for (const n of a)
 41463                  r.push(
 41464                    this.parse({
 41465                      xref: e,
 41466                      isEvalSupported: t,
 41467                      fn: e.fetchIfRef(n),
 41468                    }),
 41469                  );
 41470                return function (e, t, a, n) {
 41471                  for (let i = 0, s = r.length; i < s; i++) r[i](e, t, a, n + i);
 41472                };
 41473              }
 41474              static constructSampled({
 41475                xref: e,
 41476                isEvalSupported: t,
 41477                fn: a,
 41478                dict: r,
 41479              }) {
 41480                function toMultiArray(e) {
 41481                  const t = e.length,
 41482                    a = [];
 41483                  let r = 0;
 41484                  for (let n = 0; n < t; n += 2) a[r++] = [e[n], e[n + 1]];
 41485                  return a;
 41486                }
 41487                function interpolate(e, t, a, r, n) {
 41488                  return r + ((n - r) / (a - t)) * (e - t);
 41489                }
 41490                let i = toNumberArray(r.getArray("Domain")),
 41491                  s = toNumberArray(r.getArray("Range"));
 41492                if (!i || !s) throw new n.FormatError("No domain or range");
 41493                const o = i.length / 2,
 41494                  c = s.length / 2;
 41495                i = toMultiArray(i);
 41496                s = toMultiArray(s);
 41497                const l = toNumberArray(r.getArray("Size")),
 41498                  h = r.get("BitsPerSample"),
 41499                  u = r.get("Order") || 1;
 41500                1 !== u &&
 41501                  (0, n.info)("No support for cubic spline interpolation: " + u);
 41502                let d = toNumberArray(r.getArray("Encode"));
 41503                if (d) d = toMultiArray(d);
 41504                else {
 41505                  d = [];
 41506                  for (let e = 0; e < o; ++e) d.push([0, l[e] - 1]);
 41507                }
 41508                let f = toNumberArray(r.getArray("Decode"));
 41509                f = f ? toMultiArray(f) : s;
 41510                const g = this.getSampleArray(l, c, h, a);
 41511                return function constructSampledFn(e, t, a, r) {
 41512                  const n = 1 << o,
 41513                    h = new Float64Array(n),
 41514                    u = new Uint32Array(n);
 41515                  let p, m;
 41516                  for (m = 0; m < n; m++) h[m] = 1;
 41517                  let b = c,
 41518                    y = 1;
 41519                  for (p = 0; p < o; ++p) {
 41520                    const a = i[p][0],
 41521                      r = i[p][1];
 41522                    let s = interpolate(
 41523                      Math.min(Math.max(e[t + p], a), r),
 41524                      a,
 41525                      r,
 41526                      d[p][0],
 41527                      d[p][1],
 41528                    );
 41529                    const o = l[p];
 41530                    s = Math.min(Math.max(s, 0), o - 1);
 41531                    const c = s < o - 1 ? Math.floor(s) : s - 1,
 41532                      f = c + 1 - s,
 41533                      g = s - c,
 41534                      w = c * b,
 41535                      S = w + b;
 41536                    for (m = 0; m < n; m++)
 41537                      if (m & y) {
 41538                        h[m] *= g;
 41539                        u[m] += S;
 41540                      } else {
 41541                        h[m] *= f;
 41542                        u[m] += w;
 41543                      }
 41544                    b *= o;
 41545                    y <<= 1;
 41546                  }
 41547                  for (m = 0; m < c; ++m) {
 41548                    let e = 0;
 41549                    for (p = 0; p < n; p++) e += g[u[p] + m] * h[p];
 41550                    e = interpolate(e, 0, 1, f[m][0], f[m][1]);
 41551                    a[r + m] = Math.min(Math.max(e, s[m][0]), s[m][1]);
 41552                  }
 41553                };
 41554              }
 41555              static constructInterpolated({
 41556                xref: e,
 41557                isEvalSupported: t,
 41558                dict: a,
 41559              }) {
 41560                const r = toNumberArray(a.getArray("C0")) || [0],
 41561                  n = toNumberArray(a.getArray("C1")) || [1],
 41562                  i = a.get("N"),
 41563                  s = [];
 41564                for (let e = 0, t = r.length; e < t; ++e) s.push(n[e] - r[e]);
 41565                const o = s.length;
 41566                return function constructInterpolatedFn(e, t, a, n) {
 41567                  const c = 1 === i ? e[t] : e[t] ** i;
 41568                  for (let e = 0; e < o; ++e) a[n + e] = r[e] + c * s[e];
 41569                };
 41570              }
 41571              static constructStiched({ xref: e, isEvalSupported: t, dict: a }) {
 41572                const r = toNumberArray(a.getArray("Domain"));
 41573                if (!r) throw new n.FormatError("No domain");
 41574                if (1 !== r.length / 2)
 41575                  throw new n.FormatError("Bad domain for stiched function");
 41576                const i = [];
 41577                for (const r of a.get("Functions"))
 41578                  i.push(
 41579                    this.parse({
 41580                      xref: e,
 41581                      isEvalSupported: t,
 41582                      fn: e.fetchIfRef(r),
 41583                    }),
 41584                  );
 41585                const s = toNumberArray(a.getArray("Bounds")),
 41586                  o = toNumberArray(a.getArray("Encode")),
 41587                  c = new Float32Array(1);
 41588                return function constructStichedFn(e, t, a, n) {
 41589                  const l = (function constructStichedFromIRClip(e, t, a) {
 41590                      e > a ? (e = a) : e < t && (e = t);
 41591                      return e;
 41592                    })(e[t], r[0], r[1]),
 41593                    h = s.length;
 41594                  let u;
 41595                  for (u = 0; u < h && !(l < s[u]); ++u);
 41596                  let d = r[0];
 41597                  u > 0 && (d = s[u - 1]);
 41598                  let f = r[1];
 41599                  u < s.length && (f = s[u]);
 41600                  const g = o[2 * u],
 41601                    p = o[2 * u + 1];
 41602                  c[0] = d === f ? g : g + ((l - d) * (p - g)) / (f - d);
 41603                  i[u](c, 0, a, n);
 41604                };
 41605              }
 41606              static constructPostScript({
 41607                xref: e,
 41608                isEvalSupported: t,
 41609                fn: a,
 41610                dict: r,
 41611              }) {
 41612                const s = toNumberArray(r.getArray("Domain")),
 41613                  o = toNumberArray(r.getArray("Range"));
 41614                if (!s) throw new n.FormatError("No domain.");
 41615                if (!o) throw new n.FormatError("No range.");
 41616                const c = new i.PostScriptLexer(a),
 41617                  l = new i.PostScriptParser(c).parse();
 41618                if (t && n.FeatureTest.isEvalSupported) {
 41619                  const e = new PostScriptCompiler().compile(l, s, o);
 41620                  if (e)
 41621                    return new Function(
 41622                      "src",
 41623                      "srcOffset",
 41624                      "dest",
 41625                      "destOffset",
 41626                      e,
 41627                    );
 41628                }
 41629                (0, n.info)("Unable to compile PS function");
 41630                const h = o.length >> 1,
 41631                  u = s.length >> 1,
 41632                  d = new PostScriptEvaluator(l),
 41633                  f = Object.create(null);
 41634                let g = 8192;
 41635                const p = new Float32Array(u);
 41636                return function constructPostScriptFn(e, t, a, r) {
 41637                  let n,
 41638                    i,
 41639                    s = "";
 41640                  const c = p;
 41641                  for (n = 0; n < u; n++) {
 41642                    i = e[t + n];
 41643                    c[n] = i;
 41644                    s += i + "_";
 41645                  }
 41646                  const l = f[s];
 41647                  if (void 0 !== l) {
 41648                    a.set(l, r);
 41649                    return;
 41650                  }
 41651                  const m = new Float32Array(h),
 41652                    b = d.execute(c),
 41653                    y = b.length - h;
 41654                  for (n = 0; n < h; n++) {
 41655                    i = b[y + n];
 41656                    let e = o[2 * n];
 41657                    if (i < e) i = e;
 41658                    else {
 41659                      e = o[2 * n + 1];
 41660                      i > e && (i = e);
 41661                    }
 41662                    m[n] = i;
 41663                  }
 41664                  if (g > 0) {
 41665                    g--;
 41666                    f[s] = m;
 41667                  }
 41668                  a.set(m, r);
 41669                };
 41670              }
 41671            }
 41672            class PostScriptStack {
 41673              static MAX_STACK_SIZE = 100;
 41674              constructor(e) {
 41675                this.stack = e ? Array.from(e) : [];
 41676              }
 41677              push(e) {
 41678                if (this.stack.length >= PostScriptStack.MAX_STACK_SIZE)
 41679                  throw new Error("PostScript function stack overflow.");
 41680                this.stack.push(e);
 41681              }
 41682              pop() {
 41683                if (this.stack.length <= 0)
 41684                  throw new Error("PostScript function stack underflow.");
 41685                return this.stack.pop();
 41686              }
 41687              copy(e) {
 41688                if (this.stack.length + e >= PostScriptStack.MAX_STACK_SIZE)
 41689                  throw new Error("PostScript function stack overflow.");
 41690                const t = this.stack;
 41691                for (let a = t.length - e, r = e - 1; r >= 0; r--, a++)
 41692                  t.push(t[a]);
 41693              }
 41694              index(e) {
 41695                this.push(this.stack[this.stack.length - e - 1]);
 41696              }
 41697              roll(e, t) {
 41698                const a = this.stack,
 41699                  r = a.length - e,
 41700                  n = a.length - 1,
 41701                  i = r + (t - Math.floor(t / e) * e);
 41702                for (let e = r, t = n; e < t; e++, t--) {
 41703                  const r = a[e];
 41704                  a[e] = a[t];
 41705                  a[t] = r;
 41706                }
 41707                for (let e = r, t = i - 1; e < t; e++, t--) {
 41708                  const r = a[e];
 41709                  a[e] = a[t];
 41710                  a[t] = r;
 41711                }
 41712                for (let e = i, t = n; e < t; e++, t--) {
 41713                  const r = a[e];
 41714                  a[e] = a[t];
 41715                  a[t] = r;
 41716                }
 41717              }
 41718            }
 41719            class PostScriptEvaluator {
 41720              constructor(e) {
 41721                this.operators = e;
 41722              }
 41723              execute(e) {
 41724                const t = new PostScriptStack(e);
 41725                let a = 0;
 41726                const r = this.operators,
 41727                  i = r.length;
 41728                let s, o, c;
 41729                for (; a < i; ) {
 41730                  s = r[a++];
 41731                  if ("number" != typeof s)
 41732                    switch (s) {
 41733                      case "jz":
 41734                        c = t.pop();
 41735                        o = t.pop();
 41736                        o || (a = c);
 41737                        break;
 41738                      case "j":
 41739                        o = t.pop();
 41740                        a = o;
 41741                        break;
 41742                      case "abs":
 41743                        o = t.pop();
 41744                        t.push(Math.abs(o));
 41745                        break;
 41746                      case "add":
 41747                        c = t.pop();
 41748                        o = t.pop();
 41749                        t.push(o + c);
 41750                        break;
 41751                      case "and":
 41752                        c = t.pop();
 41753                        o = t.pop();
 41754                        "boolean" == typeof o && "boolean" == typeof c
 41755                          ? t.push(o && c)
 41756                          : t.push(o & c);
 41757                        break;
 41758                      case "atan":
 41759                        c = t.pop();
 41760                        o = t.pop();
 41761                        o = (Math.atan2(o, c) / Math.PI) * 180;
 41762                        o < 0 && (o += 360);
 41763                        t.push(o);
 41764                        break;
 41765                      case "bitshift":
 41766                        c = t.pop();
 41767                        o = t.pop();
 41768                        o > 0 ? t.push(o << c) : t.push(o >> c);
 41769                        break;
 41770                      case "ceiling":
 41771                        o = t.pop();
 41772                        t.push(Math.ceil(o));
 41773                        break;
 41774                      case "copy":
 41775                        o = t.pop();
 41776                        t.copy(o);
 41777                        break;
 41778                      case "cos":
 41779                        o = t.pop();
 41780                        t.push(Math.cos(((o % 360) / 180) * Math.PI));
 41781                        break;
 41782                      case "cvi":
 41783                        o = 0 | t.pop();
 41784                        t.push(o);
 41785                        break;
 41786                      case "cvr":
 41787                        break;
 41788                      case "div":
 41789                        c = t.pop();
 41790                        o = t.pop();
 41791                        t.push(o / c);
 41792                        break;
 41793                      case "dup":
 41794                        t.copy(1);
 41795                        break;
 41796                      case "eq":
 41797                        c = t.pop();
 41798                        o = t.pop();
 41799                        t.push(o === c);
 41800                        break;
 41801                      case "exch":
 41802                        t.roll(2, 1);
 41803                        break;
 41804                      case "exp":
 41805                        c = t.pop();
 41806                        o = t.pop();
 41807                        t.push(o ** c);
 41808                        break;
 41809                      case "false":
 41810                        t.push(!1);
 41811                        break;
 41812                      case "floor":
 41813                        o = t.pop();
 41814                        t.push(Math.floor(o));
 41815                        break;
 41816                      case "ge":
 41817                        c = t.pop();
 41818                        o = t.pop();
 41819                        t.push(o >= c);
 41820                        break;
 41821                      case "gt":
 41822                        c = t.pop();
 41823                        o = t.pop();
 41824                        t.push(o > c);
 41825                        break;
 41826                      case "idiv":
 41827                        c = t.pop();
 41828                        o = t.pop();
 41829                        t.push((o / c) | 0);
 41830                        break;
 41831                      case "index":
 41832                        o = t.pop();
 41833                        t.index(o);
 41834                        break;
 41835                      case "le":
 41836                        c = t.pop();
 41837                        o = t.pop();
 41838                        t.push(o <= c);
 41839                        break;
 41840                      case "ln":
 41841                        o = t.pop();
 41842                        t.push(Math.log(o));
 41843                        break;
 41844                      case "log":
 41845                        o = t.pop();
 41846                        t.push(Math.log10(o));
 41847                        break;
 41848                      case "lt":
 41849                        c = t.pop();
 41850                        o = t.pop();
 41851                        t.push(o < c);
 41852                        break;
 41853                      case "mod":
 41854                        c = t.pop();
 41855                        o = t.pop();
 41856                        t.push(o % c);
 41857                        break;
 41858                      case "mul":
 41859                        c = t.pop();
 41860                        o = t.pop();
 41861                        t.push(o * c);
 41862                        break;
 41863                      case "ne":
 41864                        c = t.pop();
 41865                        o = t.pop();
 41866                        t.push(o !== c);
 41867                        break;
 41868                      case "neg":
 41869                        o = t.pop();
 41870                        t.push(-o);
 41871                        break;
 41872                      case "not":
 41873                        o = t.pop();
 41874                        "boolean" == typeof o ? t.push(!o) : t.push(~o);
 41875                        break;
 41876                      case "or":
 41877                        c = t.pop();
 41878                        o = t.pop();
 41879                        "boolean" == typeof o && "boolean" == typeof c
 41880                          ? t.push(o || c)
 41881                          : t.push(o | c);
 41882                        break;
 41883                      case "pop":
 41884                        t.pop();
 41885                        break;
 41886                      case "roll":
 41887                        c = t.pop();
 41888                        o = t.pop();
 41889                        t.roll(o, c);
 41890                        break;
 41891                      case "round":
 41892                        o = t.pop();
 41893                        t.push(Math.round(o));
 41894                        break;
 41895                      case "sin":
 41896                        o = t.pop();
 41897                        t.push(Math.sin(((o % 360) / 180) * Math.PI));
 41898                        break;
 41899                      case "sqrt":
 41900                        o = t.pop();
 41901                        t.push(Math.sqrt(o));
 41902                        break;
 41903                      case "sub":
 41904                        c = t.pop();
 41905                        o = t.pop();
 41906                        t.push(o - c);
 41907                        break;
 41908                      case "true":
 41909                        t.push(!0);
 41910                        break;
 41911                      case "truncate":
 41912                        o = t.pop();
 41913                        o = o < 0 ? Math.ceil(o) : Math.floor(o);
 41914                        t.push(o);
 41915                        break;
 41916                      case "xor":
 41917                        c = t.pop();
 41918                        o = t.pop();
 41919                        "boolean" == typeof o && "boolean" == typeof c
 41920                          ? t.push(o !== c)
 41921                          : t.push(o ^ c);
 41922                        break;
 41923                      default:
 41924                        throw new n.FormatError(`Unknown operator ${s}`);
 41925                    }
 41926                  else t.push(s);
 41927                }
 41928                return t.stack;
 41929              }
 41930            }
 41931            t.PostScriptEvaluator = PostScriptEvaluator;
 41932            class AstNode {
 41933              constructor(e) {
 41934                this.type = e;
 41935              }
 41936              visit(e) {
 41937                (0, n.unreachable)("abstract method");
 41938              }
 41939            }
 41940            class AstArgument extends AstNode {
 41941              constructor(e, t, a) {
 41942                super("args");
 41943                this.index = e;
 41944                this.min = t;
 41945                this.max = a;
 41946              }
 41947              visit(e) {
 41948                e.visitArgument(this);
 41949              }
 41950            }
 41951            class AstLiteral extends AstNode {
 41952              constructor(e) {
 41953                super("literal");
 41954                this.number = e;
 41955                this.min = e;
 41956                this.max = e;
 41957              }
 41958              visit(e) {
 41959                e.visitLiteral(this);
 41960              }
 41961            }
 41962            class AstBinaryOperation extends AstNode {
 41963              constructor(e, t, a, r, n) {
 41964                super("binary");
 41965                this.op = e;
 41966                this.arg1 = t;
 41967                this.arg2 = a;
 41968                this.min = r;
 41969                this.max = n;
 41970              }
 41971              visit(e) {
 41972                e.visitBinaryOperation(this);
 41973              }
 41974            }
 41975            class AstMin extends AstNode {
 41976              constructor(e, t) {
 41977                super("max");
 41978                this.arg = e;
 41979                this.min = e.min;
 41980                this.max = t;
 41981              }
 41982              visit(e) {
 41983                e.visitMin(this);
 41984              }
 41985            }
 41986            class AstVariable extends AstNode {
 41987              constructor(e, t, a) {
 41988                super("var");
 41989                this.index = e;
 41990                this.min = t;
 41991                this.max = a;
 41992              }
 41993              visit(e) {
 41994                e.visitVariable(this);
 41995              }
 41996            }
 41997            class AstVariableDefinition extends AstNode {
 41998              constructor(e, t) {
 41999                super("definition");
 42000                this.variable = e;
 42001                this.arg = t;
 42002              }
 42003              visit(e) {
 42004                e.visitVariableDefinition(this);
 42005              }
 42006            }
 42007            class ExpressionBuilderVisitor {
 42008              constructor() {
 42009                this.parts = [];
 42010              }
 42011              visitArgument(e) {
 42012                this.parts.push(
 42013                  "Math.max(",
 42014                  e.min,
 42015                  ", Math.min(",
 42016                  e.max,
 42017                  ", src[srcOffset + ",
 42018                  e.index,
 42019                  "]))",
 42020                );
 42021              }
 42022              visitVariable(e) {
 42023                this.parts.push("v", e.index);
 42024              }
 42025              visitLiteral(e) {
 42026                this.parts.push(e.number);
 42027              }
 42028              visitBinaryOperation(e) {
 42029                this.parts.push("(");
 42030                e.arg1.visit(this);
 42031                this.parts.push(" ", e.op, " ");
 42032                e.arg2.visit(this);
 42033                this.parts.push(")");
 42034              }
 42035              visitVariableDefinition(e) {
 42036                this.parts.push("var ");
 42037                e.variable.visit(this);
 42038                this.parts.push(" = ");
 42039                e.arg.visit(this);
 42040                this.parts.push(";");
 42041              }
 42042              visitMin(e) {
 42043                this.parts.push("Math.min(");
 42044                e.arg.visit(this);
 42045                this.parts.push(", ", e.max, ")");
 42046              }
 42047              toString() {
 42048                return this.parts.join("");
 42049              }
 42050            }
 42051            function buildAddOperation(e, t) {
 42052              return "literal" === t.type && 0 === t.number
 42053                ? e
 42054                : "literal" === e.type && 0 === e.number
 42055                  ? t
 42056                  : "literal" === t.type && "literal" === e.type
 42057                    ? new AstLiteral(e.number + t.number)
 42058                    : new AstBinaryOperation(
 42059                        "+",
 42060                        e,
 42061                        t,
 42062                        e.min + t.min,
 42063                        e.max + t.max,
 42064                      );
 42065            }
 42066            function buildMulOperation(e, t) {
 42067              if ("literal" === t.type) {
 42068                if (0 === t.number) return new AstLiteral(0);
 42069                if (1 === t.number) return e;
 42070                if ("literal" === e.type)
 42071                  return new AstLiteral(e.number * t.number);
 42072              }
 42073              if ("literal" === e.type) {
 42074                if (0 === e.number) return new AstLiteral(0);
 42075                if (1 === e.number) return t;
 42076              }
 42077              const a = Math.min(
 42078                  e.min * t.min,
 42079                  e.min * t.max,
 42080                  e.max * t.min,
 42081                  e.max * t.max,
 42082                ),
 42083                r = Math.max(
 42084                  e.min * t.min,
 42085                  e.min * t.max,
 42086                  e.max * t.min,
 42087                  e.max * t.max,
 42088                );
 42089              return new AstBinaryOperation("*", e, t, a, r);
 42090            }
 42091            function buildSubOperation(e, t) {
 42092              if ("literal" === t.type) {
 42093                if (0 === t.number) return e;
 42094                if ("literal" === e.type)
 42095                  return new AstLiteral(e.number - t.number);
 42096              }
 42097              return "binary" === t.type &&
 42098                "-" === t.op &&
 42099                "literal" === e.type &&
 42100                1 === e.number &&
 42101                "literal" === t.arg1.type &&
 42102                1 === t.arg1.number
 42103                ? t.arg2
 42104                : new AstBinaryOperation("-", e, t, e.min - t.max, e.max - t.min);
 42105            }
 42106            function buildMinOperation(e, t) {
 42107              return e.min >= t
 42108                ? new AstLiteral(t)
 42109                : e.max <= t
 42110                  ? e
 42111                  : new AstMin(e, t);
 42112            }
 42113            class PostScriptCompiler {
 42114              compile(e, t, a) {
 42115                const r = [],
 42116                  n = [],
 42117                  i = t.length >> 1,
 42118                  s = a.length >> 1;
 42119                let o,
 42120                  c,
 42121                  l,
 42122                  h,
 42123                  u,
 42124                  d,
 42125                  f,
 42126                  g,
 42127                  p = 0;
 42128                for (let e = 0; e < i; e++)
 42129                  r.push(new AstArgument(e, t[2 * e], t[2 * e + 1]));
 42130                for (let t = 0, a = e.length; t < a; t++) {
 42131                  g = e[t];
 42132                  if ("number" != typeof g)
 42133                    switch (g) {
 42134                      case "add":
 42135                        if (r.length < 2) return null;
 42136                        h = r.pop();
 42137                        l = r.pop();
 42138                        r.push(buildAddOperation(l, h));
 42139                        break;
 42140                      case "cvr":
 42141                        if (r.length < 1) return null;
 42142                        break;
 42143                      case "mul":
 42144                        if (r.length < 2) return null;
 42145                        h = r.pop();
 42146                        l = r.pop();
 42147                        r.push(buildMulOperation(l, h));
 42148                        break;
 42149                      case "sub":
 42150                        if (r.length < 2) return null;
 42151                        h = r.pop();
 42152                        l = r.pop();
 42153                        r.push(buildSubOperation(l, h));
 42154                        break;
 42155                      case "exch":
 42156                        if (r.length < 2) return null;
 42157                        u = r.pop();
 42158                        d = r.pop();
 42159                        r.push(u, d);
 42160                        break;
 42161                      case "pop":
 42162                        if (r.length < 1) return null;
 42163                        r.pop();
 42164                        break;
 42165                      case "index":
 42166                        if (r.length < 1) return null;
 42167                        l = r.pop();
 42168                        if ("literal" !== l.type) return null;
 42169                        o = l.number;
 42170                        if (o < 0 || !Number.isInteger(o) || r.length < o)
 42171                          return null;
 42172                        u = r[r.length - o - 1];
 42173                        if ("literal" === u.type || "var" === u.type) {
 42174                          r.push(u);
 42175                          break;
 42176                        }
 42177                        f = new AstVariable(p++, u.min, u.max);
 42178                        r[r.length - o - 1] = f;
 42179                        r.push(f);
 42180                        n.push(new AstVariableDefinition(f, u));
 42181                        break;
 42182                      case "dup":
 42183                        if (r.length < 1) return null;
 42184                        if (
 42185                          "number" == typeof e[t + 1] &&
 42186                          "gt" === e[t + 2] &&
 42187                          e[t + 3] === t + 7 &&
 42188                          "jz" === e[t + 4] &&
 42189                          "pop" === e[t + 5] &&
 42190                          e[t + 6] === e[t + 1]
 42191                        ) {
 42192                          l = r.pop();
 42193                          r.push(buildMinOperation(l, e[t + 1]));
 42194                          t += 6;
 42195                          break;
 42196                        }
 42197                        u = r.at(-1);
 42198                        if ("literal" === u.type || "var" === u.type) {
 42199                          r.push(u);
 42200                          break;
 42201                        }
 42202                        f = new AstVariable(p++, u.min, u.max);
 42203                        r[r.length - 1] = f;
 42204                        r.push(f);
 42205                        n.push(new AstVariableDefinition(f, u));
 42206                        break;
 42207                      case "roll":
 42208                        if (r.length < 2) return null;
 42209                        h = r.pop();
 42210                        l = r.pop();
 42211                        if ("literal" !== h.type || "literal" !== l.type)
 42212                          return null;
 42213                        c = h.number;
 42214                        o = l.number;
 42215                        if (
 42216                          o <= 0 ||
 42217                          !Number.isInteger(o) ||
 42218                          !Number.isInteger(c) ||
 42219                          r.length < o
 42220                        )
 42221                          return null;
 42222                        c = ((c % o) + o) % o;
 42223                        if (0 === c) break;
 42224                        r.push(...r.splice(r.length - o, o - c));
 42225                        break;
 42226                      default:
 42227                        return null;
 42228                    }
 42229                  else r.push(new AstLiteral(g));
 42230                }
 42231                if (r.length !== s) return null;
 42232                const m = [];
 42233                for (const e of n) {
 42234                  const t = new ExpressionBuilderVisitor();
 42235                  e.visit(t);
 42236                  m.push(t.toString());
 42237                }
 42238                for (let e = 0, t = r.length; e < t; e++) {
 42239                  const t = r[e],
 42240                    n = new ExpressionBuilderVisitor();
 42241                  t.visit(n);
 42242                  const i = a[2 * e],
 42243                    s = a[2 * e + 1],
 42244                    o = [n.toString()];
 42245                  if (i > t.min) {
 42246                    o.unshift("Math.max(", i, ", ");
 42247                    o.push(")");
 42248                  }
 42249                  if (s < t.max) {
 42250                    o.unshift("Math.min(", s, ", ");
 42251                    o.push(")");
 42252                  }
 42253                  o.unshift("dest[destOffset + ", e, "] = ");
 42254                  o.push(";");
 42255                  m.push(o.join(""));
 42256                }
 42257                return m.join("\n");
 42258              }
 42259            }
 42260            t.PostScriptCompiler = PostScriptCompiler;
 42261          },
 42262          (e, t, a) => {
 42263            Object.defineProperty(t, "__esModule", { value: !0 });
 42264            t.PostScriptParser = t.PostScriptLexer = void 0;
 42265            var r = a(2),
 42266              n = a(4),
 42267              i = a(3);
 42268            t.PostScriptParser = class PostScriptParser {
 42269              constructor(e) {
 42270                this.lexer = e;
 42271                this.operators = [];
 42272                this.token = null;
 42273                this.prev = null;
 42274              }
 42275              nextToken() {
 42276                this.prev = this.token;
 42277                this.token = this.lexer.getToken();
 42278              }
 42279              accept(e) {
 42280                if (this.token.type === e) {
 42281                  this.nextToken();
 42282                  return !0;
 42283                }
 42284                return !1;
 42285              }
 42286              expect(e) {
 42287                if (this.accept(e)) return !0;
 42288                throw new r.FormatError(
 42289                  `Unexpected symbol: found ${this.token.type} expected ${e}.`,
 42290                );
 42291              }
 42292              parse() {
 42293                this.nextToken();
 42294                this.expect(s.LBRACE);
 42295                this.parseBlock();
 42296                this.expect(s.RBRACE);
 42297                return this.operators;
 42298              }
 42299              parseBlock() {
 42300                for (;;)
 42301                  if (this.accept(s.NUMBER)) this.operators.push(this.prev.value);
 42302                  else if (this.accept(s.OPERATOR))
 42303                    this.operators.push(this.prev.value);
 42304                  else {
 42305                    if (!this.accept(s.LBRACE)) return;
 42306                    this.parseCondition();
 42307                  }
 42308              }
 42309              parseCondition() {
 42310                const e = this.operators.length;
 42311                this.operators.push(null, null);
 42312                this.parseBlock();
 42313                this.expect(s.RBRACE);
 42314                if (this.accept(s.IF)) {
 42315                  this.operators[e] = this.operators.length;
 42316                  this.operators[e + 1] = "jz";
 42317                } else {
 42318                  if (!this.accept(s.LBRACE))
 42319                    throw new r.FormatError(
 42320                      "PS Function: error parsing conditional.",
 42321                    );
 42322                  {
 42323                    const t = this.operators.length;
 42324                    this.operators.push(null, null);
 42325                    const a = this.operators.length;
 42326                    this.parseBlock();
 42327                    this.expect(s.RBRACE);
 42328                    this.expect(s.IFELSE);
 42329                    this.operators[t] = this.operators.length;
 42330                    this.operators[t + 1] = "j";
 42331                    this.operators[e] = a;
 42332                    this.operators[e + 1] = "jz";
 42333                  }
 42334                }
 42335              }
 42336            };
 42337            const s = {
 42338              LBRACE: 0,
 42339              RBRACE: 1,
 42340              NUMBER: 2,
 42341              OPERATOR: 3,
 42342              IF: 4,
 42343              IFELSE: 5,
 42344            };
 42345            class PostScriptToken {
 42346              static get opCache() {
 42347                return (0, r.shadow)(this, "opCache", Object.create(null));
 42348              }
 42349              constructor(e, t) {
 42350                this.type = e;
 42351                this.value = t;
 42352              }
 42353              static getOperator(e) {
 42354                return (PostScriptToken.opCache[e] ||= new PostScriptToken(
 42355                  s.OPERATOR,
 42356                  e,
 42357                ));
 42358              }
 42359              static get LBRACE() {
 42360                return (0, r.shadow)(
 42361                  this,
 42362                  "LBRACE",
 42363                  new PostScriptToken(s.LBRACE, "{"),
 42364                );
 42365              }
 42366              static get RBRACE() {
 42367                return (0, r.shadow)(
 42368                  this,
 42369                  "RBRACE",
 42370                  new PostScriptToken(s.RBRACE, "}"),
 42371                );
 42372              }
 42373              static get IF() {
 42374                return (0, r.shadow)(this, "IF", new PostScriptToken(s.IF, "IF"));
 42375              }
 42376              static get IFELSE() {
 42377                return (0, r.shadow)(
 42378                  this,
 42379                  "IFELSE",
 42380                  new PostScriptToken(s.IFELSE, "IFELSE"),
 42381                );
 42382              }
 42383            }
 42384            t.PostScriptLexer = class PostScriptLexer {
 42385              constructor(e) {
 42386                this.stream = e;
 42387                this.nextChar();
 42388                this.strBuf = [];
 42389              }
 42390              nextChar() {
 42391                return (this.currentChar = this.stream.getByte());
 42392              }
 42393              getToken() {
 42394                let e = !1,
 42395                  t = this.currentChar;
 42396                for (;;) {
 42397                  if (t < 0) return n.EOF;
 42398                  if (e) (10 !== t && 13 !== t) || (e = !1);
 42399                  else if (37 === t) e = !0;
 42400                  else if (!(0, i.isWhiteSpace)(t)) break;
 42401                  t = this.nextChar();
 42402                }
 42403                switch (0 | t) {
 42404                  case 48:
 42405                  case 49:
 42406                  case 50:
 42407                  case 51:
 42408                  case 52:
 42409                  case 53:
 42410                  case 54:
 42411                  case 55:
 42412                  case 56:
 42413                  case 57:
 42414                  case 43:
 42415                  case 45:
 42416                  case 46:
 42417                    return new PostScriptToken(s.NUMBER, this.getNumber());
 42418                  case 123:
 42419                    this.nextChar();
 42420                    return PostScriptToken.LBRACE;
 42421                  case 125:
 42422                    this.nextChar();
 42423                    return PostScriptToken.RBRACE;
 42424                }
 42425                const a = this.strBuf;
 42426                a.length = 0;
 42427                a[0] = String.fromCharCode(t);
 42428                for (
 42429                  ;
 42430                  (t = this.nextChar()) >= 0 &&
 42431                  ((t >= 65 && t <= 90) || (t >= 97 && t <= 122));
 42432  
 42433                )
 42434                  a.push(String.fromCharCode(t));
 42435                const r = a.join("");
 42436                switch (r.toLowerCase()) {
 42437                  case "if":
 42438                    return PostScriptToken.IF;
 42439                  case "ifelse":
 42440                    return PostScriptToken.IFELSE;
 42441                  default:
 42442                    return PostScriptToken.getOperator(r);
 42443                }
 42444              }
 42445              getNumber() {
 42446                let e = this.currentChar;
 42447                const t = this.strBuf;
 42448                t.length = 0;
 42449                t[0] = String.fromCharCode(e);
 42450                for (
 42451                  ;
 42452                  (e = this.nextChar()) >= 0 &&
 42453                  ((e >= 48 && e <= 57) || 45 === e || 46 === e);
 42454  
 42455                )
 42456                  t.push(String.fromCharCode(e));
 42457                const a = parseFloat(t.join(""));
 42458                if (isNaN(a))
 42459                  throw new r.FormatError(`Invalid floating point number: ${a}`);
 42460                return a;
 42461              }
 42462            };
 42463          },
 42464          (e, t, a) => {
 42465            Object.defineProperty(t, "__esModule", { value: !0 });
 42466            t.RegionalImageCache =
 42467              t.LocalTilingPatternCache =
 42468              t.LocalImageCache =
 42469              t.LocalGStateCache =
 42470              t.LocalFunctionCache =
 42471              t.LocalColorSpaceCache =
 42472              t.GlobalImageCache =
 42473                void 0;
 42474            var r = a(2),
 42475              n = a(4);
 42476            class BaseLocalCache {
 42477              constructor(e) {
 42478                this.constructor === BaseLocalCache &&
 42479                  (0, r.unreachable)("Cannot initialize BaseLocalCache.");
 42480                this._onlyRefs = !0 === e?.onlyRefs;
 42481                if (!this._onlyRefs) {
 42482                  this._nameRefMap = new Map();
 42483                  this._imageMap = new Map();
 42484                }
 42485                this._imageCache = new n.RefSetCache();
 42486              }
 42487              getByName(e) {
 42488                this._onlyRefs &&
 42489                  (0, r.unreachable)("Should not call `getByName` method.");
 42490                const t = this._nameRefMap.get(e);
 42491                return t ? this.getByRef(t) : this._imageMap.get(e) || null;
 42492              }
 42493              getByRef(e) {
 42494                return this._imageCache.get(e) || null;
 42495              }
 42496              set(e, t, a) {
 42497                (0, r.unreachable)("Abstract method `set` called.");
 42498              }
 42499            }
 42500            t.LocalImageCache = class LocalImageCache extends BaseLocalCache {
 42501              set(e, t = null, a) {
 42502                if ("string" != typeof e)
 42503                  throw new Error(
 42504                    'LocalImageCache.set - expected "name" argument.',
 42505                  );
 42506                if (t) {
 42507                  if (this._imageCache.has(t)) return;
 42508                  this._nameRefMap.set(e, t);
 42509                  this._imageCache.put(t, a);
 42510                } else this._imageMap.has(e) || this._imageMap.set(e, a);
 42511              }
 42512            };
 42513            t.LocalColorSpaceCache = class LocalColorSpaceCache extends (
 42514              BaseLocalCache
 42515            ) {
 42516              set(e = null, t = null, a) {
 42517                if ("string" != typeof e && !t)
 42518                  throw new Error(
 42519                    'LocalColorSpaceCache.set - expected "name" and/or "ref" argument.',
 42520                  );
 42521                if (t) {
 42522                  if (this._imageCache.has(t)) return;
 42523                  null !== e && this._nameRefMap.set(e, t);
 42524                  this._imageCache.put(t, a);
 42525                } else this._imageMap.has(e) || this._imageMap.set(e, a);
 42526              }
 42527            };
 42528            t.LocalFunctionCache = class LocalFunctionCache extends (
 42529              BaseLocalCache
 42530            ) {
 42531              constructor(e) {
 42532                super({ onlyRefs: !0 });
 42533              }
 42534              set(e = null, t, a) {
 42535                if (!t)
 42536                  throw new Error(
 42537                    'LocalFunctionCache.set - expected "ref" argument.',
 42538                  );
 42539                this._imageCache.has(t) || this._imageCache.put(t, a);
 42540              }
 42541            };
 42542            t.LocalGStateCache = class LocalGStateCache extends BaseLocalCache {
 42543              set(e, t = null, a) {
 42544                if ("string" != typeof e)
 42545                  throw new Error(
 42546                    'LocalGStateCache.set - expected "name" argument.',
 42547                  );
 42548                if (t) {
 42549                  if (this._imageCache.has(t)) return;
 42550                  this._nameRefMap.set(e, t);
 42551                  this._imageCache.put(t, a);
 42552                } else this._imageMap.has(e) || this._imageMap.set(e, a);
 42553              }
 42554            };
 42555            t.LocalTilingPatternCache = class LocalTilingPatternCache extends (
 42556              BaseLocalCache
 42557            ) {
 42558              constructor(e) {
 42559                super({ onlyRefs: !0 });
 42560              }
 42561              set(e = null, t, a) {
 42562                if (!t)
 42563                  throw new Error(
 42564                    'LocalTilingPatternCache.set - expected "ref" argument.',
 42565                  );
 42566                this._imageCache.has(t) || this._imageCache.put(t, a);
 42567              }
 42568            };
 42569            t.RegionalImageCache = class RegionalImageCache extends (
 42570              BaseLocalCache
 42571            ) {
 42572              constructor(e) {
 42573                super({ onlyRefs: !0 });
 42574              }
 42575              set(e = null, t, a) {
 42576                if (!t)
 42577                  throw new Error(
 42578                    'RegionalImageCache.set - expected "ref" argument.',
 42579                  );
 42580                this._imageCache.has(t) || this._imageCache.put(t, a);
 42581              }
 42582            };
 42583            class GlobalImageCache {
 42584              static NUM_PAGES_THRESHOLD = 2;
 42585              static MIN_IMAGES_TO_CACHE = 10;
 42586              static MAX_BYTE_SIZE = 5 * r.MAX_IMAGE_SIZE_TO_CACHE;
 42587              constructor() {
 42588                this._refCache = new n.RefSetCache();
 42589                this._imageCache = new n.RefSetCache();
 42590              }
 42591              get _byteSize() {
 42592                let e = 0;
 42593                for (const t of this._imageCache) e += t.byteSize;
 42594                return e;
 42595              }
 42596              get _cacheLimitReached() {
 42597                return (
 42598                  !(
 42599                    this._imageCache.size < GlobalImageCache.MIN_IMAGES_TO_CACHE
 42600                  ) && !(this._byteSize < GlobalImageCache.MAX_BYTE_SIZE)
 42601                );
 42602              }
 42603              shouldCache(e, t) {
 42604                let a = this._refCache.get(e);
 42605                if (!a) {
 42606                  a = new Set();
 42607                  this._refCache.put(e, a);
 42608                }
 42609                a.add(t);
 42610                return (
 42611                  !(a.size < GlobalImageCache.NUM_PAGES_THRESHOLD) &&
 42612                  !(!this._imageCache.has(e) && this._cacheLimitReached)
 42613                );
 42614              }
 42615              addByteSize(e, t) {
 42616                const a = this._imageCache.get(e);
 42617                a && (a.byteSize || (a.byteSize = t));
 42618              }
 42619              getData(e, t) {
 42620                const a = this._refCache.get(e);
 42621                if (!a) return null;
 42622                if (a.size < GlobalImageCache.NUM_PAGES_THRESHOLD) return null;
 42623                const r = this._imageCache.get(e);
 42624                if (!r) return null;
 42625                a.add(t);
 42626                return r;
 42627              }
 42628              setData(e, t) {
 42629                if (!this._refCache.has(e))
 42630                  throw new Error(
 42631                    'GlobalImageCache.setData - expected "shouldCache" to have been called.',
 42632                  );
 42633                this._imageCache.has(e) ||
 42634                  (this._cacheLimitReached
 42635                    ? (0, r.warn)(
 42636                        "GlobalImageCache.setData - cache limit reached.",
 42637                      )
 42638                    : this._imageCache.put(e, t));
 42639              }
 42640              clear(e = !1) {
 42641                e || this._refCache.clear();
 42642                this._imageCache.clear();
 42643              }
 42644            }
 42645            t.GlobalImageCache = GlobalImageCache;
 42646          },
 42647          (e, t, a) => {
 42648            Object.defineProperty(t, "__esModule", { value: !0 });
 42649            t.bidi = function bidi(e, t = -1, a = !1) {
 42650              let c = !0;
 42651              const l = e.length;
 42652              if (0 === l || a) return createBidiText(e, c, a);
 42653              s.length = l;
 42654              o.length = l;
 42655              let h,
 42656                u,
 42657                d = 0;
 42658              for (h = 0; h < l; ++h) {
 42659                s[h] = e.charAt(h);
 42660                const t = e.charCodeAt(h);
 42661                let a = "L";
 42662                if (t <= 255) a = n[t];
 42663                else if (1424 <= t && t <= 1524) a = "R";
 42664                else if (1536 <= t && t <= 1791) {
 42665                  a = i[255 & t];
 42666                  a ||
 42667                    (0, r.warn)(
 42668                      "Bidi: invalid Unicode character " + t.toString(16),
 42669                    );
 42670                } else
 42671                  ((1792 <= t && t <= 2220) ||
 42672                    (64336 <= t && t <= 65023) ||
 42673                    (65136 <= t && t <= 65279)) &&
 42674                    (a = "AL");
 42675                ("R" !== a && "AL" !== a && "AN" !== a) || d++;
 42676                o[h] = a;
 42677              }
 42678              if (0 === d) {
 42679                c = !0;
 42680                return createBidiText(e, c);
 42681              }
 42682              if (-1 === t)
 42683                if (d / l < 0.3 && l > 4) {
 42684                  c = !0;
 42685                  t = 0;
 42686                } else {
 42687                  c = !1;
 42688                  t = 1;
 42689                }
 42690              const f = [];
 42691              for (h = 0; h < l; ++h) f[h] = t;
 42692              const g = isOdd(t) ? "R" : "L",
 42693                p = g,
 42694                m = p;
 42695              let b,
 42696                y = p;
 42697              for (h = 0; h < l; ++h) "NSM" === o[h] ? (o[h] = y) : (y = o[h]);
 42698              y = p;
 42699              for (h = 0; h < l; ++h) {
 42700                b = o[h];
 42701                "EN" === b
 42702                  ? (o[h] = "AL" === y ? "AN" : "EN")
 42703                  : ("R" !== b && "L" !== b && "AL" !== b) || (y = b);
 42704              }
 42705              for (h = 0; h < l; ++h) {
 42706                b = o[h];
 42707                "AL" === b && (o[h] = "R");
 42708              }
 42709              for (h = 1; h < l - 1; ++h) {
 42710                "ES" === o[h] &&
 42711                  "EN" === o[h - 1] &&
 42712                  "EN" === o[h + 1] &&
 42713                  (o[h] = "EN");
 42714                "CS" !== o[h] ||
 42715                  ("EN" !== o[h - 1] && "AN" !== o[h - 1]) ||
 42716                  o[h + 1] !== o[h - 1] ||
 42717                  (o[h] = o[h - 1]);
 42718              }
 42719              for (h = 0; h < l; ++h)
 42720                if ("EN" === o[h]) {
 42721                  for (let e = h - 1; e >= 0 && "ET" === o[e]; --e) o[e] = "EN";
 42722                  for (let e = h + 1; e < l && "ET" === o[e]; ++e) o[e] = "EN";
 42723                }
 42724              for (h = 0; h < l; ++h) {
 42725                b = o[h];
 42726                ("WS" !== b && "ES" !== b && "ET" !== b && "CS" !== b) ||
 42727                  (o[h] = "ON");
 42728              }
 42729              y = p;
 42730              for (h = 0; h < l; ++h) {
 42731                b = o[h];
 42732                "EN" === b
 42733                  ? (o[h] = "L" === y ? "L" : "EN")
 42734                  : ("R" !== b && "L" !== b) || (y = b);
 42735              }
 42736              for (h = 0; h < l; ++h)
 42737                if ("ON" === o[h]) {
 42738                  const e = findUnequal(o, h + 1, "ON");
 42739                  let t = p;
 42740                  h > 0 && (t = o[h - 1]);
 42741                  let a = m;
 42742                  e + 1 < l && (a = o[e + 1]);
 42743                  "L" !== t && (t = "R");
 42744                  "L" !== a && (a = "R");
 42745                  t === a && setValues(o, h, e, t);
 42746                  h = e - 1;
 42747                }
 42748              for (h = 0; h < l; ++h) "ON" === o[h] && (o[h] = g);
 42749              for (h = 0; h < l; ++h) {
 42750                b = o[h];
 42751                isEven(f[h])
 42752                  ? "R" === b
 42753                    ? (f[h] += 1)
 42754                    : ("AN" !== b && "EN" !== b) || (f[h] += 2)
 42755                  : ("L" !== b && "AN" !== b && "EN" !== b) || (f[h] += 1);
 42756              }
 42757              let w,
 42758                S = -1,
 42759                x = 99;
 42760              for (h = 0, u = f.length; h < u; ++h) {
 42761                w = f[h];
 42762                S < w && (S = w);
 42763                x > w && isOdd(w) && (x = w);
 42764              }
 42765              for (w = S; w >= x; --w) {
 42766                let e = -1;
 42767                for (h = 0, u = f.length; h < u; ++h)
 42768                  if (f[h] < w) {
 42769                    if (e >= 0) {
 42770                      reverseValues(s, e, h);
 42771                      e = -1;
 42772                    }
 42773                  } else e < 0 && (e = h);
 42774                e >= 0 && reverseValues(s, e, f.length);
 42775              }
 42776              for (h = 0, u = s.length; h < u; ++h) {
 42777                const e = s[h];
 42778                ("<" !== e && ">" !== e) || (s[h] = "");
 42779              }
 42780              return createBidiText(s.join(""), c);
 42781            };
 42782            var r = a(2);
 42783            const n = [
 42784                "BN",
 42785                "BN",
 42786                "BN",
 42787                "BN",
 42788                "BN",
 42789                "BN",
 42790                "BN",
 42791                "BN",
 42792                "BN",
 42793                "S",
 42794                "B",
 42795                "S",
 42796                "WS",
 42797                "B",
 42798                "BN",
 42799                "BN",
 42800                "BN",
 42801                "BN",
 42802                "BN",
 42803                "BN",
 42804                "BN",
 42805                "BN",
 42806                "BN",
 42807                "BN",
 42808                "BN",
 42809                "BN",
 42810                "BN",
 42811                "BN",
 42812                "B",
 42813                "B",
 42814                "B",
 42815                "S",
 42816                "WS",
 42817                "ON",
 42818                "ON",
 42819                "ET",
 42820                "ET",
 42821                "ET",
 42822                "ON",
 42823                "ON",
 42824                "ON",
 42825                "ON",
 42826                "ON",
 42827                "ES",
 42828                "CS",
 42829                "ES",
 42830                "CS",
 42831                "CS",
 42832                "EN",
 42833                "EN",
 42834                "EN",
 42835                "EN",
 42836                "EN",
 42837                "EN",
 42838                "EN",
 42839                "EN",
 42840                "EN",
 42841                "EN",
 42842                "CS",
 42843                "ON",
 42844                "ON",
 42845                "ON",
 42846                "ON",
 42847                "ON",
 42848                "ON",
 42849                "L",
 42850                "L",
 42851                "L",
 42852                "L",
 42853                "L",
 42854                "L",
 42855                "L",
 42856                "L",
 42857                "L",
 42858                "L",
 42859                "L",
 42860                "L",
 42861                "L",
 42862                "L",
 42863                "L",
 42864                "L",
 42865                "L",
 42866                "L",
 42867                "L",
 42868                "L",
 42869                "L",
 42870                "L",
 42871                "L",
 42872                "L",
 42873                "L",
 42874                "L",
 42875                "ON",
 42876                "ON",
 42877                "ON",
 42878                "ON",
 42879                "ON",
 42880                "ON",
 42881                "L",
 42882                "L",
 42883                "L",
 42884                "L",
 42885                "L",
 42886                "L",
 42887                "L",
 42888                "L",
 42889                "L",
 42890                "L",
 42891                "L",
 42892                "L",
 42893                "L",
 42894                "L",
 42895                "L",
 42896                "L",
 42897                "L",
 42898                "L",
 42899                "L",
 42900                "L",
 42901                "L",
 42902                "L",
 42903                "L",
 42904                "L",
 42905                "L",
 42906                "L",
 42907                "ON",
 42908                "ON",
 42909                "ON",
 42910                "ON",
 42911                "BN",
 42912                "BN",
 42913                "BN",
 42914                "BN",
 42915                "BN",
 42916                "BN",
 42917                "B",
 42918                "BN",
 42919                "BN",
 42920                "BN",
 42921                "BN",
 42922                "BN",
 42923                "BN",
 42924                "BN",
 42925                "BN",
 42926                "BN",
 42927                "BN",
 42928                "BN",
 42929                "BN",
 42930                "BN",
 42931                "BN",
 42932                "BN",
 42933                "BN",
 42934                "BN",
 42935                "BN",
 42936                "BN",
 42937                "BN",
 42938                "BN",
 42939                "BN",
 42940                "BN",
 42941                "BN",
 42942                "BN",
 42943                "BN",
 42944                "CS",
 42945                "ON",
 42946                "ET",
 42947                "ET",
 42948                "ET",
 42949                "ET",
 42950                "ON",
 42951                "ON",
 42952                "ON",
 42953                "ON",
 42954                "L",
 42955                "ON",
 42956                "ON",
 42957                "BN",
 42958                "ON",
 42959                "ON",
 42960                "ET",
 42961                "ET",
 42962                "EN",
 42963                "EN",
 42964                "ON",
 42965                "L",
 42966                "ON",
 42967                "ON",
 42968                "ON",
 42969                "EN",
 42970                "L",
 42971                "ON",
 42972                "ON",
 42973                "ON",
 42974                "ON",
 42975                "ON",
 42976                "L",
 42977                "L",
 42978                "L",
 42979                "L",
 42980                "L",
 42981                "L",
 42982                "L",
 42983                "L",
 42984                "L",
 42985                "L",
 42986                "L",
 42987                "L",
 42988                "L",
 42989                "L",
 42990                "L",
 42991                "L",
 42992                "L",
 42993                "L",
 42994                "L",
 42995                "L",
 42996                "L",
 42997                "L",
 42998                "L",
 42999                "ON",
 43000                "L",
 43001                "L",
 43002                "L",
 43003                "L",
 43004                "L",
 43005                "L",
 43006                "L",
 43007                "L",
 43008                "L",
 43009                "L",
 43010                "L",
 43011                "L",
 43012                "L",
 43013                "L",
 43014                "L",
 43015                "L",
 43016                "L",
 43017                "L",
 43018                "L",
 43019                "L",
 43020                "L",
 43021                "L",
 43022                "L",
 43023                "L",
 43024                "L",
 43025                "L",
 43026                "L",
 43027                "L",
 43028                "L",
 43029                "L",
 43030                "L",
 43031                "ON",
 43032                "L",
 43033                "L",
 43034                "L",
 43035                "L",
 43036                "L",
 43037                "L",
 43038                "L",
 43039                "L",
 43040              ],
 43041              i = [
 43042                "AN",
 43043                "AN",
 43044                "AN",
 43045                "AN",
 43046                "AN",
 43047                "AN",
 43048                "ON",
 43049                "ON",
 43050                "AL",
 43051                "ET",
 43052                "ET",
 43053                "AL",
 43054                "CS",
 43055                "AL",
 43056                "ON",
 43057                "ON",
 43058                "NSM",
 43059                "NSM",
 43060                "NSM",
 43061                "NSM",
 43062                "NSM",
 43063                "NSM",
 43064                "NSM",
 43065                "NSM",
 43066                "NSM",
 43067                "NSM",
 43068                "NSM",
 43069                "AL",
 43070                "AL",
 43071                "",
 43072                "AL",
 43073                "AL",
 43074                "AL",
 43075                "AL",
 43076                "AL",
 43077                "AL",
 43078                "AL",
 43079                "AL",
 43080                "AL",
 43081                "AL",
 43082                "AL",
 43083                "AL",
 43084                "AL",
 43085                "AL",
 43086                "AL",
 43087                "AL",
 43088                "AL",
 43089                "AL",
 43090                "AL",
 43091                "AL",
 43092                "AL",
 43093                "AL",
 43094                "AL",
 43095                "AL",
 43096                "AL",
 43097                "AL",
 43098                "AL",
 43099                "AL",
 43100                "AL",
 43101                "AL",
 43102                "AL",
 43103                "AL",
 43104                "AL",
 43105                "AL",
 43106                "AL",
 43107                "AL",
 43108                "AL",
 43109                "AL",
 43110                "AL",
 43111                "AL",
 43112                "AL",
 43113                "AL",
 43114                "AL",
 43115                "AL",
 43116                "AL",
 43117                "NSM",
 43118                "NSM",
 43119                "NSM",
 43120                "NSM",
 43121                "NSM",
 43122                "NSM",
 43123                "NSM",
 43124                "NSM",
 43125                "NSM",
 43126                "NSM",
 43127                "NSM",
 43128                "NSM",
 43129                "NSM",
 43130                "NSM",
 43131                "NSM",
 43132                "NSM",
 43133                "NSM",
 43134                "NSM",
 43135                "NSM",
 43136                "NSM",
 43137                "NSM",
 43138                "AN",
 43139                "AN",
 43140                "AN",
 43141                "AN",
 43142                "AN",
 43143                "AN",
 43144                "AN",
 43145                "AN",
 43146                "AN",
 43147                "AN",
 43148                "ET",
 43149                "AN",
 43150                "AN",
 43151                "AL",
 43152                "AL",
 43153                "AL",
 43154                "NSM",
 43155                "AL",
 43156                "AL",
 43157                "AL",
 43158                "AL",
 43159                "AL",
 43160                "AL",
 43161                "AL",
 43162                "AL",
 43163                "AL",
 43164                "AL",
 43165                "AL",
 43166                "AL",
 43167                "AL",
 43168                "AL",
 43169                "AL",
 43170                "AL",
 43171                "AL",
 43172                "AL",
 43173                "AL",
 43174                "AL",
 43175                "AL",
 43176                "AL",
 43177                "AL",
 43178                "AL",
 43179                "AL",
 43180                "AL",
 43181                "AL",
 43182                "AL",
 43183                "AL",
 43184                "AL",
 43185                "AL",
 43186                "AL",
 43187                "AL",
 43188                "AL",
 43189                "AL",
 43190                "AL",
 43191                "AL",
 43192                "AL",
 43193                "AL",
 43194                "AL",
 43195                "AL",
 43196                "AL",
 43197                "AL",
 43198                "AL",
 43199                "AL",
 43200                "AL",
 43201                "AL",
 43202                "AL",
 43203                "AL",
 43204                "AL",
 43205                "AL",
 43206                "AL",
 43207                "AL",
 43208                "AL",
 43209                "AL",
 43210                "AL",
 43211                "AL",
 43212                "AL",
 43213                "AL",
 43214                "AL",
 43215                "AL",
 43216                "AL",
 43217                "AL",
 43218                "AL",
 43219                "AL",
 43220                "AL",
 43221                "AL",
 43222                "AL",
 43223                "AL",
 43224                "AL",
 43225                "AL",
 43226                "AL",
 43227                "AL",
 43228                "AL",
 43229                "AL",
 43230                "AL",
 43231                "AL",
 43232                "AL",
 43233                "AL",
 43234                "AL",
 43235                "AL",
 43236                "AL",
 43237                "AL",
 43238                "AL",
 43239                "AL",
 43240                "AL",
 43241                "AL",
 43242                "AL",
 43243                "AL",
 43244                "AL",
 43245                "AL",
 43246                "AL",
 43247                "AL",
 43248                "AL",
 43249                "AL",
 43250                "AL",
 43251                "AL",
 43252                "AL",
 43253                "AL",
 43254                "AL",
 43255                "AL",
 43256                "NSM",
 43257                "NSM",
 43258                "NSM",
 43259                "NSM",
 43260                "NSM",
 43261                "NSM",
 43262                "NSM",
 43263                "AN",
 43264                "ON",
 43265                "NSM",
 43266                "NSM",
 43267                "NSM",
 43268                "NSM",
 43269                "NSM",
 43270                "NSM",
 43271                "AL",
 43272                "AL",
 43273                "NSM",
 43274                "NSM",
 43275                "ON",
 43276                "NSM",
 43277                "NSM",
 43278                "NSM",
 43279                "NSM",
 43280                "AL",
 43281                "AL",
 43282                "EN",
 43283                "EN",
 43284                "EN",
 43285                "EN",
 43286                "EN",
 43287                "EN",
 43288                "EN",
 43289                "EN",
 43290                "EN",
 43291                "EN",
 43292                "AL",
 43293                "AL",
 43294                "AL",
 43295                "AL",
 43296                "AL",
 43297                "AL",
 43298              ];
 43299            function isOdd(e) {
 43300              return 0 != (1 & e);
 43301            }
 43302            function isEven(e) {
 43303              return 0 == (1 & e);
 43304            }
 43305            function findUnequal(e, t, a) {
 43306              let r, n;
 43307              for (r = t, n = e.length; r < n; ++r) if (e[r] !== a) return r;
 43308              return r;
 43309            }
 43310            function setValues(e, t, a, r) {
 43311              for (let n = t; n < a; ++n) e[n] = r;
 43312            }
 43313            function reverseValues(e, t, a) {
 43314              for (let r = t, n = a - 1; r < n; ++r, --n) {
 43315                const t = e[r];
 43316                e[r] = e[n];
 43317                e[n] = t;
 43318              }
 43319            }
 43320            function createBidiText(e, t, a = !1) {
 43321              let r = "ltr";
 43322              a ? (r = "ttb") : t || (r = "rtl");
 43323              return { str: e, dir: r };
 43324            }
 43325            const s = [],
 43326              o = [];
 43327          },
 43328          (e, t, a) => {
 43329            Object.defineProperty(t, "__esModule", { value: !0 });
 43330            t.getFontSubstitution = function getFontSubstitution(e, t, a, u, d) {
 43331              const f = (u = (0, r.normalizeFontName)(u));
 43332              let g = e.get(f);
 43333              if (g) return g;
 43334              let p = l.get(u);
 43335              if (!p)
 43336                for (const [e, t] of h)
 43337                  if (u.startsWith(e)) {
 43338                    u = `${t}${u.substring(e.length)}`;
 43339                    p = l.get(u);
 43340                    break;
 43341                  }
 43342              let m = !1;
 43343              if (!p) {
 43344                p = l.get(d);
 43345                m = !0;
 43346              }
 43347              const b = `${t.getDocId()}_s${t.createFontId()}`;
 43348              if (!p) {
 43349                if (!(0, n.validateFontName)(u)) {
 43350                  e.set(f, null);
 43351                  return null;
 43352                }
 43353                const t = /bold/gi.test(u),
 43354                  a = /oblique|italic/gi.test(u);
 43355                g = {
 43356                  css: b,
 43357                  guessFallback: !0,
 43358                  loadedName: b,
 43359                  baseFontName: u,
 43360                  src: `local(${u})`,
 43361                  style: (t && a && c) || (t && s) || (a && o) || i,
 43362                };
 43363                e.set(f, g);
 43364                return g;
 43365              }
 43366              const y = [];
 43367              m && (0, n.validateFontName)(u) && y.push(`local(${u})`);
 43368              const { style: w, ultimate: S } = generateFont(p, y, a),
 43369                x = null === S;
 43370              g = {
 43371                css: `${b}${x ? "" : `,${S}`}`,
 43372                guessFallback: x,
 43373                loadedName: b,
 43374                baseFontName: u,
 43375                src: y.join(","),
 43376                style: w,
 43377              };
 43378              e.set(f, g);
 43379              return g;
 43380            };
 43381            var r = a(38),
 43382              n = a(3);
 43383            const i = { style: "normal", weight: "normal" },
 43384              s = { style: "normal", weight: "bold" },
 43385              o = { style: "italic", weight: "normal" },
 43386              c = { style: "italic", weight: "bold" },
 43387              l = new Map([
 43388                [
 43389                  "Times-Roman",
 43390                  {
 43391                    local: [
 43392                      "Times New Roman",
 43393                      "Times-Roman",
 43394                      "Times",
 43395                      "Liberation Serif",
 43396                      "Nimbus Roman",
 43397                      "Nimbus Roman L",
 43398                      "Tinos",
 43399                      "Thorndale",
 43400                      "TeX Gyre Termes",
 43401                      "FreeSerif",
 43402                      "DejaVu Serif",
 43403                      "Bitstream Vera Serif",
 43404                      "Ubuntu",
 43405                    ],
 43406                    style: i,
 43407                    ultimate: "serif",
 43408                  },
 43409                ],
 43410                [
 43411                  "Times-Bold",
 43412                  { alias: "Times-Roman", style: s, ultimate: "serif" },
 43413                ],
 43414                [
 43415                  "Times-Italic",
 43416                  { alias: "Times-Roman", style: o, ultimate: "serif" },
 43417                ],
 43418                [
 43419                  "Times-BoldItalic",
 43420                  { alias: "Times-Roman", style: c, ultimate: "serif" },
 43421                ],
 43422                [
 43423                  "Helvetica",
 43424                  {
 43425                    local: [
 43426                      "Helvetica",
 43427                      "Helvetica Neue",
 43428                      "Arial",
 43429                      "Arial Nova",
 43430                      "Liberation Sans",
 43431                      "Arimo",
 43432                      "Nimbus Sans",
 43433                      "Nimbus Sans L",
 43434                      "A030",
 43435                      "TeX Gyre Heros",
 43436                      "FreeSans",
 43437                      "DejaVu Sans",
 43438                      "Albany",
 43439                      "Bitstream Vera Sans",
 43440                      "Arial Unicode MS",
 43441                      "Microsoft Sans Serif",
 43442                      "Apple Symbols",
 43443                      "Cantarell",
 43444                    ],
 43445                    path: "LiberationSans-Regular.ttf",
 43446                    style: i,
 43447                    ultimate: "sans-serif",
 43448                  },
 43449                ],
 43450                [
 43451                  "Helvetica-Bold",
 43452                  {
 43453                    alias: "Helvetica",
 43454                    path: "LiberationSans-Bold.ttf",
 43455                    style: s,
 43456                    ultimate: "sans-serif",
 43457                  },
 43458                ],
 43459                [
 43460                  "Helvetica-Oblique",
 43461                  {
 43462                    alias: "Helvetica",
 43463                    path: "LiberationSans-Italic.ttf",
 43464                    style: o,
 43465                    ultimate: "sans-serif",
 43466                  },
 43467                ],
 43468                [
 43469                  "Helvetica-BoldOblique",
 43470                  {
 43471                    alias: "Helvetica",
 43472                    path: "LiberationSans-BoldItalic.ttf",
 43473                    style: c,
 43474                    ultimate: "sans-serif",
 43475                  },
 43476                ],
 43477                [
 43478                  "Courier",
 43479                  {
 43480                    local: [
 43481                      "Courier",
 43482                      "Courier New",
 43483                      "Liberation Mono",
 43484                      "Nimbus Mono",
 43485                      "Nimbus Mono L",
 43486                      "Cousine",
 43487                      "Cumberland",
 43488                      "TeX Gyre Cursor",
 43489                      "FreeMono",
 43490                    ],
 43491                    style: i,
 43492                    ultimate: "monospace",
 43493                  },
 43494                ],
 43495                [
 43496                  "Courier-Bold",
 43497                  { alias: "Courier", style: s, ultimate: "monospace" },
 43498                ],
 43499                [
 43500                  "Courier-Oblique",
 43501                  { alias: "Courier", style: o, ultimate: "monospace" },
 43502                ],
 43503                [
 43504                  "Courier-BoldOblique",
 43505                  { alias: "Courier", style: c, ultimate: "monospace" },
 43506                ],
 43507                [
 43508                  "ArialBlack",
 43509                  {
 43510                    local: ["Arial Black"],
 43511                    style: { style: "normal", weight: "900" },
 43512                    fallback: "Helvetica-Bold",
 43513                  },
 43514                ],
 43515                ["ArialBlack-Bold", { alias: "ArialBlack" }],
 43516                [
 43517                  "ArialBlack-Italic",
 43518                  {
 43519                    alias: "ArialBlack",
 43520                    style: { style: "italic", weight: "900" },
 43521                    fallback: "Helvetica-BoldOblique",
 43522                  },
 43523                ],
 43524                ["ArialBlack-BoldItalic", { alias: "ArialBlack-Italic" }],
 43525                [
 43526                  "ArialNarrow",
 43527                  {
 43528                    local: [
 43529                      "Arial Narrow",
 43530                      "Liberation Sans Narrow",
 43531                      "Helvetica Condensed",
 43532                      "Nimbus Sans Narrow",
 43533                      "TeX Gyre Heros Cn",
 43534                    ],
 43535                    style: i,
 43536                    fallback: "Helvetica",
 43537                  },
 43538                ],
 43539                [
 43540                  "ArialNarrow-Bold",
 43541                  { alias: "ArialNarrow", style: s, fallback: "Helvetica-Bold" },
 43542                ],
 43543                [
 43544                  "ArialNarrow-Italic",
 43545                  {
 43546                    alias: "ArialNarrow",
 43547                    style: o,
 43548                    fallback: "Helvetica-Oblique",
 43549                  },
 43550                ],
 43551                [
 43552                  "ArialNarrow-BoldItalic",
 43553                  {
 43554                    alias: "ArialNarrow",
 43555                    style: c,
 43556                    fallback: "Helvetica-BoldOblique",
 43557                  },
 43558                ],
 43559                [
 43560                  "Calibri",
 43561                  {
 43562                    local: ["Calibri", "Carlito"],
 43563                    style: i,
 43564                    fallback: "Helvetica",
 43565                  },
 43566                ],
 43567                [
 43568                  "Calibri-Bold",
 43569                  { alias: "Calibri", style: s, fallback: "Helvetica-Bold" },
 43570                ],
 43571                [
 43572                  "Calibri-Italic",
 43573                  { alias: "Calibri", style: o, fallback: "Helvetica-Oblique" },
 43574                ],
 43575                [
 43576                  "Calibri-BoldItalic",
 43577                  {
 43578                    alias: "Calibri",
 43579                    style: c,
 43580                    fallback: "Helvetica-BoldOblique",
 43581                  },
 43582                ],
 43583                ["Wingdings", { local: ["Wingdings", "URW Dingbats"], style: i }],
 43584                ["Wingdings-Regular", { alias: "Wingdings" }],
 43585                ["Wingdings-Bold", { alias: "Wingdings" }],
 43586              ]),
 43587              h = new Map([["Arial-Black", "ArialBlack"]]);
 43588            function generateFont(
 43589              { alias: e, local: t, path: a, fallback: r, style: n, ultimate: i },
 43590              h,
 43591              u,
 43592              d = !0,
 43593              f = !0,
 43594              g = "",
 43595            ) {
 43596              const p = { style: null, ultimate: null };
 43597              if (t) {
 43598                const e = g ? ` ${g}` : "";
 43599                for (const a of t) h.push(`local(${a}${e})`);
 43600              }
 43601              if (e) {
 43602                const t = l.get(e),
 43603                  i =
 43604                    g ||
 43605                    (function getStyleToAppend(e) {
 43606                      switch (e) {
 43607                        case s:
 43608                          return "Bold";
 43609                        case o:
 43610                          return "Italic";
 43611                        case c:
 43612                          return "Bold Italic";
 43613                        default:
 43614                          if ("bold" === e?.weight) return "Bold";
 43615                          if ("italic" === e?.style) return "Italic";
 43616                      }
 43617                      return "";
 43618                    })(n);
 43619                Object.assign(p, generateFont(t, h, u, d && !r, f && !a, i));
 43620              }
 43621              n && (p.style = n);
 43622              i && (p.ultimate = i);
 43623              if (d && r) {
 43624                const e = l.get(r),
 43625                  { ultimate: t } = generateFont(e, h, u, d, f && !a, g);
 43626                p.ultimate ||= t;
 43627              }
 43628              f && a && u && h.push(`url(${u}${a})`);
 43629              return p;
 43630            }
 43631          },
 43632          (e, t, a) => {
 43633            Object.defineProperty(t, "__esModule", { value: !0 });
 43634            t.ImageResizer = void 0;
 43635            var r = a(2);
 43636            class ImageResizer {
 43637              constructor(e, t) {
 43638                this._imgData = e;
 43639                this._isMask = t;
 43640              }
 43641              static needsToBeResized(e, t) {
 43642                if (e <= this._goodSquareLength && t <= this._goodSquareLength)
 43643                  return !1;
 43644                const { MAX_DIM: a } = this;
 43645                if (e > a || t > a) return !0;
 43646                const r = e * t;
 43647                if (this._hasMaxArea) return r > this.MAX_AREA;
 43648                if (r < this._goodSquareLength ** 2) return !1;
 43649                if (this._areGoodDims(e, t)) {
 43650                  this._goodSquareLength = Math.max(
 43651                    this._goodSquareLength,
 43652                    Math.floor(Math.sqrt(e * t)),
 43653                  );
 43654                  return !1;
 43655                }
 43656                this._goodSquareLength = this._guessMax(
 43657                  this._goodSquareLength,
 43658                  a,
 43659                  128,
 43660                  0,
 43661                );
 43662                return r > (this.MAX_AREA = this._goodSquareLength ** 2);
 43663              }
 43664              static get MAX_DIM() {
 43665                return (0, r.shadow)(
 43666                  this,
 43667                  "MAX_DIM",
 43668                  this._guessMax(2048, 65537, 0, 1),
 43669                );
 43670              }
 43671              static get MAX_AREA() {
 43672                this._hasMaxArea = !0;
 43673                return (0, r.shadow)(
 43674                  this,
 43675                  "MAX_AREA",
 43676                  this._guessMax(
 43677                    ImageResizer._goodSquareLength,
 43678                    this.MAX_DIM,
 43679                    128,
 43680                    0,
 43681                  ) ** 2,
 43682                );
 43683              }
 43684              static set MAX_AREA(e) {
 43685                if (e >= 0) {
 43686                  this._hasMaxArea = !0;
 43687                  (0, r.shadow)(this, "MAX_AREA", e);
 43688                }
 43689              }
 43690              static setMaxArea(e) {
 43691                this._hasMaxArea || (this.MAX_AREA = e >> 2);
 43692              }
 43693              static _areGoodDims(e, t) {
 43694                try {
 43695                  const a = new OffscreenCanvas(e, t),
 43696                    r = a.getContext("2d");
 43697                  r.fillRect(0, 0, 1, 1);
 43698                  const n = r.getImageData(0, 0, 1, 1).data[3];
 43699                  a.width = a.height = 1;
 43700                  return 0 !== n;
 43701                } catch {
 43702                  return !1;
 43703                }
 43704              }
 43705              static _guessMax(e, t, a, r) {
 43706                for (; e + a + 1 < t; ) {
 43707                  const a = Math.floor((e + t) / 2),
 43708                    n = r || a;
 43709                  this._areGoodDims(a, n) ? (e = a) : (t = a);
 43710                }
 43711                return e;
 43712              }
 43713              static async createImage(e, t = !1) {
 43714                return new ImageResizer(e, t)._createImage();
 43715              }
 43716              async _createImage() {
 43717                const e = this._encodeBMP(),
 43718                  t = new Blob([e.buffer], { type: "image/bmp" }),
 43719                  a = createImageBitmap(t),
 43720                  { MAX_AREA: r, MAX_DIM: n } = ImageResizer,
 43721                  { _imgData: i } = this,
 43722                  { width: s, height: o } = i,
 43723                  c = Math.max(s / n, o / n, Math.sqrt((s * o) / r)),
 43724                  l = Math.max(c, 2),
 43725                  h = Math.round(10 * (c + 1.25)) / 10 / l,
 43726                  u = Math.floor(Math.log2(h)),
 43727                  d = new Array(u + 2).fill(2);
 43728                d[0] = l;
 43729                d.splice(-1, 1, h / (1 << u));
 43730                let f = s,
 43731                  g = o,
 43732                  p = await a;
 43733                for (const e of d) {
 43734                  const t = f,
 43735                    a = g;
 43736                  f = Math.floor(f / e) - 1;
 43737                  g = Math.floor(g / e) - 1;
 43738                  const r = new OffscreenCanvas(f, g);
 43739                  r.getContext("2d").drawImage(p, 0, 0, t, a, 0, 0, f, g);
 43740                  p = r.transferToImageBitmap();
 43741                }
 43742                i.data = null;
 43743                i.bitmap = p;
 43744                i.width = f;
 43745                i.height = g;
 43746                return i;
 43747              }
 43748              _encodeBMP() {
 43749                const { width: e, height: t, kind: a } = this._imgData;
 43750                let n,
 43751                  i = this._imgData.data,
 43752                  s = new Uint8Array(0),
 43753                  o = s,
 43754                  c = 0;
 43755                switch (a) {
 43756                  case r.ImageKind.GRAYSCALE_1BPP: {
 43757                    n = 1;
 43758                    s = new Uint8Array(
 43759                      this._isMask
 43760                        ? [255, 255, 255, 255, 0, 0, 0, 0]
 43761                        : [0, 0, 0, 0, 255, 255, 255, 255],
 43762                    );
 43763                    const a = (e + 7) >> 3,
 43764                      r = (a + 3) & -4;
 43765                    if (a !== r) {
 43766                      const e = new Uint8Array(r * t);
 43767                      let n = 0;
 43768                      for (let s = 0, o = t * a; s < o; s += a, n += r)
 43769                        e.set(i.subarray(s, s + a), n);
 43770                      i = e;
 43771                    }
 43772                    break;
 43773                  }
 43774                  case r.ImageKind.RGB_24BPP:
 43775                    n = 24;
 43776                    if (3 & e) {
 43777                      const a = 3 * e,
 43778                        r = (a + 3) & -4,
 43779                        n = r - a,
 43780                        s = new Uint8Array(r * t);
 43781                      let o = 0;
 43782                      for (let e = 0, r = t * a; e < r; e += a) {
 43783                        const t = i.subarray(e, e + a);
 43784                        for (let e = 0; e < a; e += 3) {
 43785                          s[o++] = t[e + 2];
 43786                          s[o++] = t[e + 1];
 43787                          s[o++] = t[e];
 43788                        }
 43789                        o += n;
 43790                      }
 43791                      i = s;
 43792                    } else
 43793                      for (let e = 0, t = i.length; e < t; e += 3) {
 43794                        const t = i[e];
 43795                        i[e] = i[e + 2];
 43796                        i[e + 2] = t;
 43797                      }
 43798                    break;
 43799                  case r.ImageKind.RGBA_32BPP:
 43800                    n = 32;
 43801                    c = 3;
 43802                    o = new Uint8Array(68);
 43803                    const a = new DataView(o.buffer);
 43804                    if (r.FeatureTest.isLittleEndian) {
 43805                      a.setUint32(0, 255, !0);
 43806                      a.setUint32(4, 65280, !0);
 43807                      a.setUint32(8, 16711680, !0);
 43808                      a.setUint32(12, 4278190080, !0);
 43809                    } else {
 43810                      a.setUint32(0, 4278190080, !0);
 43811                      a.setUint32(4, 16711680, !0);
 43812                      a.setUint32(8, 65280, !0);
 43813                      a.setUint32(12, 255, !0);
 43814                    }
 43815                    break;
 43816                  default:
 43817                    throw new Error("invalid format");
 43818                }
 43819                let l = 0;
 43820                const h = 40 + o.length,
 43821                  u = 14 + h + s.length + i.length,
 43822                  d = new Uint8Array(u),
 43823                  f = new DataView(d.buffer);
 43824                f.setUint16(l, 19778, !0);
 43825                l += 2;
 43826                f.setUint32(l, u, !0);
 43827                l += 4;
 43828                f.setUint32(l, 0, !0);
 43829                l += 4;
 43830                f.setUint32(l, 14 + h + s.length, !0);
 43831                l += 4;
 43832                f.setUint32(l, h, !0);
 43833                l += 4;
 43834                f.setInt32(l, e, !0);
 43835                l += 4;
 43836                f.setInt32(l, -t, !0);
 43837                l += 4;
 43838                f.setUint16(l, 1, !0);
 43839                l += 2;
 43840                f.setUint16(l, n, !0);
 43841                l += 2;
 43842                f.setUint32(l, c, !0);
 43843                l += 4;
 43844                f.setUint32(l, 0, !0);
 43845                l += 4;
 43846                f.setInt32(l, 0, !0);
 43847                l += 4;
 43848                f.setInt32(l, 0, !0);
 43849                l += 4;
 43850                f.setUint32(l, s.length / 4, !0);
 43851                l += 4;
 43852                f.setUint32(l, 0, !0);
 43853                l += 4;
 43854                d.set(o, l);
 43855                l += o.length;
 43856                d.set(s, l);
 43857                l += s.length;
 43858                d.set(i, l);
 43859                return d;
 43860              }
 43861            }
 43862            t.ImageResizer = ImageResizer;
 43863            ImageResizer._goodSquareLength = 2048;
 43864          },
 43865          (e, t, a) => {
 43866            Object.defineProperty(t, "__esModule", { value: !0 });
 43867            t.MurmurHash3_64 = void 0;
 43868            var r = a(2);
 43869            const n = 3285377520,
 43870              i = 4294901760,
 43871              s = 65535;
 43872            t.MurmurHash3_64 = class MurmurHash3_64 {
 43873              constructor(e) {
 43874                this.h1 = e ? 4294967295 & e : n;
 43875                this.h2 = e ? 4294967295 & e : n;
 43876              }
 43877              update(e) {
 43878                let t, a;
 43879                if ("string" == typeof e) {
 43880                  t = new Uint8Array(2 * e.length);
 43881                  a = 0;
 43882                  for (let r = 0, n = e.length; r < n; r++) {
 43883                    const n = e.charCodeAt(r);
 43884                    if (n <= 255) t[a++] = n;
 43885                    else {
 43886                      t[a++] = n >>> 8;
 43887                      t[a++] = 255 & n;
 43888                    }
 43889                  }
 43890                } else {
 43891                  if (!(0, r.isArrayBuffer)(e))
 43892                    throw new Error(
 43893                      "Wrong data format in MurmurHash3_64_update. Input must be a string or array.",
 43894                    );
 43895                  t = e.slice();
 43896                  a = t.byteLength;
 43897                }
 43898                const n = a >> 2,
 43899                  o = a - 4 * n,
 43900                  c = new Uint32Array(t.buffer, 0, n);
 43901                let l = 0,
 43902                  h = 0,
 43903                  u = this.h1,
 43904                  d = this.h2;
 43905                const f = 3432918353,
 43906                  g = 461845907,
 43907                  p = 11601,
 43908                  m = 13715;
 43909                for (let e = 0; e < n; e++)
 43910                  if (1 & e) {
 43911                    l = c[e];
 43912                    l = ((l * f) & i) | ((l * p) & s);
 43913                    l = (l << 15) | (l >>> 17);
 43914                    l = ((l * g) & i) | ((l * m) & s);
 43915                    u ^= l;
 43916                    u = (u << 13) | (u >>> 19);
 43917                    u = 5 * u + 3864292196;
 43918                  } else {
 43919                    h = c[e];
 43920                    h = ((h * f) & i) | ((h * p) & s);
 43921                    h = (h << 15) | (h >>> 17);
 43922                    h = ((h * g) & i) | ((h * m) & s);
 43923                    d ^= h;
 43924                    d = (d << 13) | (d >>> 19);
 43925                    d = 5 * d + 3864292196;
 43926                  }
 43927                l = 0;
 43928                switch (o) {
 43929                  case 3:
 43930                    l ^= t[4 * n + 2] << 16;
 43931                  case 2:
 43932                    l ^= t[4 * n + 1] << 8;
 43933                  case 1:
 43934                    l ^= t[4 * n];
 43935                    l = ((l * f) & i) | ((l * p) & s);
 43936                    l = (l << 15) | (l >>> 17);
 43937                    l = ((l * g) & i) | ((l * m) & s);
 43938                    1 & n ? (u ^= l) : (d ^= l);
 43939                }
 43940                this.h1 = u;
 43941                this.h2 = d;
 43942              }
 43943              hexdigest() {
 43944                let e = this.h1,
 43945                  t = this.h2;
 43946                e ^= t >>> 1;
 43947                e = ((3981806797 * e) & i) | ((36045 * e) & s);
 43948                t =
 43949                  ((4283543511 * t) & i) |
 43950                  (((2950163797 * ((t << 16) | (e >>> 16))) & i) >>> 16);
 43951                e ^= t >>> 1;
 43952                e = ((444984403 * e) & i) | ((60499 * e) & s);
 43953                t =
 43954                  ((3301882366 * t) & i) |
 43955                  (((3120437893 * ((t << 16) | (e >>> 16))) & i) >>> 16);
 43956                e ^= t >>> 1;
 43957                return (
 43958                  (e >>> 0).toString(16).padStart(8, "0") +
 43959                  (t >>> 0).toString(16).padStart(8, "0")
 43960                );
 43961              }
 43962            };
 43963          },
 43964          (e, t, a) => {
 43965            Object.defineProperty(t, "__esModule", { value: !0 });
 43966            t.OperatorList = void 0;
 43967            var r = a(2);
 43968            function addState(e, t, a, r, n) {
 43969              let i = e;
 43970              for (let e = 0, a = t.length - 1; e < a; e++) {
 43971                const a = t[e];
 43972                i = i[a] ||= [];
 43973              }
 43974              i[t.at(-1)] = { checkFn: a, iterateFn: r, processFn: n };
 43975            }
 43976            const n = [];
 43977            addState(
 43978              n,
 43979              [
 43980                r.OPS.save,
 43981                r.OPS.transform,
 43982                r.OPS.paintInlineImageXObject,
 43983                r.OPS.restore,
 43984              ],
 43985              null,
 43986              function iterateInlineImageGroup(e, t) {
 43987                const a = e.fnArray,
 43988                  n = (t - (e.iCurr - 3)) % 4;
 43989                switch (n) {
 43990                  case 0:
 43991                    return a[t] === r.OPS.save;
 43992                  case 1:
 43993                    return a[t] === r.OPS.transform;
 43994                  case 2:
 43995                    return a[t] === r.OPS.paintInlineImageXObject;
 43996                  case 3:
 43997                    return a[t] === r.OPS.restore;
 43998                }
 43999                throw new Error(`iterateInlineImageGroup - invalid pos: ${n}`);
 44000              },
 44001              function foundInlineImageGroup(e, t) {
 44002                const a = e.fnArray,
 44003                  n = e.argsArray,
 44004                  i = e.iCurr,
 44005                  s = i - 3,
 44006                  o = i - 2,
 44007                  c = i - 1,
 44008                  l = Math.min(Math.floor((t - s) / 4), 200);
 44009                if (l < 10) return t - ((t - s) % 4);
 44010                let h = 0;
 44011                const u = [];
 44012                let d = 0,
 44013                  f = 1,
 44014                  g = 1;
 44015                for (let e = 0; e < l; e++) {
 44016                  const t = n[o + (e << 2)],
 44017                    a = n[c + (e << 2)][0];
 44018                  if (f + a.width > 1e3) {
 44019                    h = Math.max(h, f);
 44020                    g += d + 2;
 44021                    f = 0;
 44022                    d = 0;
 44023                  }
 44024                  u.push({ transform: t, x: f, y: g, w: a.width, h: a.height });
 44025                  f += a.width + 2;
 44026                  d = Math.max(d, a.height);
 44027                }
 44028                const p = Math.max(h, f) + 1,
 44029                  m = g + d + 1,
 44030                  b = new Uint8Array(p * m * 4),
 44031                  y = p << 2;
 44032                for (let e = 0; e < l; e++) {
 44033                  const t = n[c + (e << 2)][0].data,
 44034                    a = u[e].w << 2;
 44035                  let r = 0,
 44036                    i = (u[e].x + u[e].y * p) << 2;
 44037                  b.set(t.subarray(0, a), i - y);
 44038                  for (let n = 0, s = u[e].h; n < s; n++) {
 44039                    b.set(t.subarray(r, r + a), i);
 44040                    r += a;
 44041                    i += y;
 44042                  }
 44043                  b.set(t.subarray(r - a, r), i);
 44044                  for (; i >= 0; ) {
 44045                    t[i - 4] = t[i];
 44046                    t[i - 3] = t[i + 1];
 44047                    t[i - 2] = t[i + 2];
 44048                    t[i - 1] = t[i + 3];
 44049                    t[i + a] = t[i + a - 4];
 44050                    t[i + a + 1] = t[i + a - 3];
 44051                    t[i + a + 2] = t[i + a - 2];
 44052                    t[i + a + 3] = t[i + a - 1];
 44053                    i -= y;
 44054                  }
 44055                }
 44056                const w = { width: p, height: m };
 44057                if (e.isOffscreenCanvasSupported) {
 44058                  const e = new OffscreenCanvas(p, m);
 44059                  e.getContext("2d").putImageData(
 44060                    new ImageData(new Uint8ClampedArray(b.buffer), p, m),
 44061                    0,
 44062                    0,
 44063                  );
 44064                  w.bitmap = e.transferToImageBitmap();
 44065                  w.data = null;
 44066                } else {
 44067                  w.kind = r.ImageKind.RGBA_32BPP;
 44068                  w.data = b;
 44069                }
 44070                a.splice(s, 4 * l, r.OPS.paintInlineImageXObjectGroup);
 44071                n.splice(s, 4 * l, [w, u]);
 44072                return s + 1;
 44073              },
 44074            );
 44075            addState(
 44076              n,
 44077              [
 44078                r.OPS.save,
 44079                r.OPS.transform,
 44080                r.OPS.paintImageMaskXObject,
 44081                r.OPS.restore,
 44082              ],
 44083              null,
 44084              function iterateImageMaskGroup(e, t) {
 44085                const a = e.fnArray,
 44086                  n = (t - (e.iCurr - 3)) % 4;
 44087                switch (n) {
 44088                  case 0:
 44089                    return a[t] === r.OPS.save;
 44090                  case 1:
 44091                    return a[t] === r.OPS.transform;
 44092                  case 2:
 44093                    return a[t] === r.OPS.paintImageMaskXObject;
 44094                  case 3:
 44095                    return a[t] === r.OPS.restore;
 44096                }
 44097                throw new Error(`iterateImageMaskGroup - invalid pos: ${n}`);
 44098              },
 44099              function foundImageMaskGroup(e, t) {
 44100                const a = e.fnArray,
 44101                  n = e.argsArray,
 44102                  i = e.iCurr,
 44103                  s = i - 3,
 44104                  o = i - 2,
 44105                  c = i - 1;
 44106                let l = Math.floor((t - s) / 4);
 44107                if (l < 10) return t - ((t - s) % 4);
 44108                let h,
 44109                  u,
 44110                  d = !1;
 44111                const f = n[c][0],
 44112                  g = n[o][0],
 44113                  p = n[o][1],
 44114                  m = n[o][2],
 44115                  b = n[o][3];
 44116                if (p === m) {
 44117                  d = !0;
 44118                  h = o + 4;
 44119                  let e = c + 4;
 44120                  for (let t = 1; t < l; t++, h += 4, e += 4) {
 44121                    u = n[h];
 44122                    if (
 44123                      n[e][0] !== f ||
 44124                      u[0] !== g ||
 44125                      u[1] !== p ||
 44126                      u[2] !== m ||
 44127                      u[3] !== b
 44128                    ) {
 44129                      t < 10 ? (d = !1) : (l = t);
 44130                      break;
 44131                    }
 44132                  }
 44133                }
 44134                if (d) {
 44135                  l = Math.min(l, 1e3);
 44136                  const e = new Float32Array(2 * l);
 44137                  h = o;
 44138                  for (let t = 0; t < l; t++, h += 4) {
 44139                    u = n[h];
 44140                    e[t << 1] = u[4];
 44141                    e[1 + (t << 1)] = u[5];
 44142                  }
 44143                  a.splice(s, 4 * l, r.OPS.paintImageMaskXObjectRepeat);
 44144                  n.splice(s, 4 * l, [f, g, p, m, b, e]);
 44145                } else {
 44146                  l = Math.min(l, 100);
 44147                  const e = [];
 44148                  for (let t = 0; t < l; t++) {
 44149                    u = n[o + (t << 2)];
 44150                    const a = n[c + (t << 2)][0];
 44151                    e.push({
 44152                      data: a.data,
 44153                      width: a.width,
 44154                      height: a.height,
 44155                      interpolate: a.interpolate,
 44156                      count: a.count,
 44157                      transform: u,
 44158                    });
 44159                  }
 44160                  a.splice(s, 4 * l, r.OPS.paintImageMaskXObjectGroup);
 44161                  n.splice(s, 4 * l, [e]);
 44162                }
 44163                return s + 1;
 44164              },
 44165            );
 44166            addState(
 44167              n,
 44168              [
 44169                r.OPS.save,
 44170                r.OPS.transform,
 44171                r.OPS.paintImageXObject,
 44172                r.OPS.restore,
 44173              ],
 44174              function (e) {
 44175                const t = e.argsArray,
 44176                  a = e.iCurr - 2;
 44177                return 0 === t[a][1] && 0 === t[a][2];
 44178              },
 44179              function iterateImageGroup(e, t) {
 44180                const a = e.fnArray,
 44181                  n = e.argsArray,
 44182                  i = (t - (e.iCurr - 3)) % 4;
 44183                switch (i) {
 44184                  case 0:
 44185                    return a[t] === r.OPS.save;
 44186                  case 1:
 44187                    if (a[t] !== r.OPS.transform) return !1;
 44188                    const i = e.iCurr - 2,
 44189                      s = n[i][0],
 44190                      o = n[i][3];
 44191                    return (
 44192                      n[t][0] === s &&
 44193                      0 === n[t][1] &&
 44194                      0 === n[t][2] &&
 44195                      n[t][3] === o
 44196                    );
 44197                  case 2:
 44198                    if (a[t] !== r.OPS.paintImageXObject) return !1;
 44199                    const c = n[e.iCurr - 1][0];
 44200                    return n[t][0] === c;
 44201                  case 3:
 44202                    return a[t] === r.OPS.restore;
 44203                }
 44204                throw new Error(`iterateImageGroup - invalid pos: ${i}`);
 44205              },
 44206              function (e, t) {
 44207                const a = e.fnArray,
 44208                  n = e.argsArray,
 44209                  i = e.iCurr,
 44210                  s = i - 3,
 44211                  o = i - 2,
 44212                  c = n[i - 1][0],
 44213                  l = n[o][0],
 44214                  h = n[o][3],
 44215                  u = Math.min(Math.floor((t - s) / 4), 1e3);
 44216                if (u < 3) return t - ((t - s) % 4);
 44217                const d = new Float32Array(2 * u);
 44218                let f = o;
 44219                for (let e = 0; e < u; e++, f += 4) {
 44220                  const t = n[f];
 44221                  d[e << 1] = t[4];
 44222                  d[1 + (e << 1)] = t[5];
 44223                }
 44224                const g = [c, l, h, d];
 44225                a.splice(s, 4 * u, r.OPS.paintImageXObjectRepeat);
 44226                n.splice(s, 4 * u, g);
 44227                return s + 1;
 44228              },
 44229            );
 44230            addState(
 44231              n,
 44232              [
 44233                r.OPS.beginText,
 44234                r.OPS.setFont,
 44235                r.OPS.setTextMatrix,
 44236                r.OPS.showText,
 44237                r.OPS.endText,
 44238              ],
 44239              null,
 44240              function iterateShowTextGroup(e, t) {
 44241                const a = e.fnArray,
 44242                  n = e.argsArray,
 44243                  i = (t - (e.iCurr - 4)) % 5;
 44244                switch (i) {
 44245                  case 0:
 44246                    return a[t] === r.OPS.beginText;
 44247                  case 1:
 44248                    return a[t] === r.OPS.setFont;
 44249                  case 2:
 44250                    return a[t] === r.OPS.setTextMatrix;
 44251                  case 3:
 44252                    if (a[t] !== r.OPS.showText) return !1;
 44253                    const i = e.iCurr - 3,
 44254                      s = n[i][0],
 44255                      o = n[i][1];
 44256                    return n[t][0] === s && n[t][1] === o;
 44257                  case 4:
 44258                    return a[t] === r.OPS.endText;
 44259                }
 44260                throw new Error(`iterateShowTextGroup - invalid pos: ${i}`);
 44261              },
 44262              function (e, t) {
 44263                const a = e.fnArray,
 44264                  r = e.argsArray,
 44265                  n = e.iCurr,
 44266                  i = n - 4,
 44267                  s = n - 3,
 44268                  o = n - 2,
 44269                  c = n - 1,
 44270                  l = n,
 44271                  h = r[s][0],
 44272                  u = r[s][1];
 44273                let d = Math.min(Math.floor((t - i) / 5), 1e3);
 44274                if (d < 3) return t - ((t - i) % 5);
 44275                let f = i;
 44276                if (
 44277                  i >= 4 &&
 44278                  a[i - 4] === a[s] &&
 44279                  a[i - 3] === a[o] &&
 44280                  a[i - 2] === a[c] &&
 44281                  a[i - 1] === a[l] &&
 44282                  r[i - 4][0] === h &&
 44283                  r[i - 4][1] === u
 44284                ) {
 44285                  d++;
 44286                  f -= 5;
 44287                }
 44288                let g = f + 4;
 44289                for (let e = 1; e < d; e++) {
 44290                  a.splice(g, 3);
 44291                  r.splice(g, 3);
 44292                  g += 2;
 44293                }
 44294                return g + 1;
 44295              },
 44296            );
 44297            class NullOptimizer {
 44298              constructor(e) {
 44299                this.queue = e;
 44300              }
 44301              _optimize() {}
 44302              push(e, t) {
 44303                this.queue.fnArray.push(e);
 44304                this.queue.argsArray.push(t);
 44305                this._optimize();
 44306              }
 44307              flush() {}
 44308              reset() {}
 44309            }
 44310            class QueueOptimizer extends NullOptimizer {
 44311              constructor(e) {
 44312                super(e);
 44313                this.state = null;
 44314                this.context = {
 44315                  iCurr: 0,
 44316                  fnArray: e.fnArray,
 44317                  argsArray: e.argsArray,
 44318                  isOffscreenCanvasSupported: !1,
 44319                };
 44320                this.match = null;
 44321                this.lastProcessed = 0;
 44322              }
 44323              set isOffscreenCanvasSupported(e) {
 44324                this.context.isOffscreenCanvasSupported = e;
 44325              }
 44326              _optimize() {
 44327                const e = this.queue.fnArray;
 44328                let t = this.lastProcessed,
 44329                  a = e.length,
 44330                  r = this.state,
 44331                  i = this.match;
 44332                if (!r && !i && t + 1 === a && !n[e[t]]) {
 44333                  this.lastProcessed = a;
 44334                  return;
 44335                }
 44336                const s = this.context;
 44337                for (; t < a; ) {
 44338                  if (i) {
 44339                    if ((0, i.iterateFn)(s, t)) {
 44340                      t++;
 44341                      continue;
 44342                    }
 44343                    t = (0, i.processFn)(s, t + 1);
 44344                    a = e.length;
 44345                    i = null;
 44346                    r = null;
 44347                    if (t >= a) break;
 44348                  }
 44349                  r = (r || n)[e[t]];
 44350                  if (r && !Array.isArray(r)) {
 44351                    s.iCurr = t;
 44352                    t++;
 44353                    if (!r.checkFn || (0, r.checkFn)(s)) {
 44354                      i = r;
 44355                      r = null;
 44356                    } else r = null;
 44357                  } else t++;
 44358                }
 44359                this.state = r;
 44360                this.match = i;
 44361                this.lastProcessed = t;
 44362              }
 44363              flush() {
 44364                for (; this.match; ) {
 44365                  const e = this.queue.fnArray.length;
 44366                  this.lastProcessed = (0, this.match.processFn)(this.context, e);
 44367                  this.match = null;
 44368                  this.state = null;
 44369                  this._optimize();
 44370                }
 44371              }
 44372              reset() {
 44373                this.state = null;
 44374                this.match = null;
 44375                this.lastProcessed = 0;
 44376              }
 44377            }
 44378            class OperatorList {
 44379              static CHUNK_SIZE = 1e3;
 44380              static CHUNK_SIZE_ABOUT = this.CHUNK_SIZE - 5;
 44381              constructor(e = 0, t) {
 44382                this._streamSink = t;
 44383                this.fnArray = [];
 44384                this.argsArray = [];
 44385                this.optimizer =
 44386                  !t || e & r.RenderingIntentFlag.OPLIST
 44387                    ? new NullOptimizer(this)
 44388                    : new QueueOptimizer(this);
 44389                this.dependencies = new Set();
 44390                this._totalLength = 0;
 44391                this.weight = 0;
 44392                this._resolved = t ? null : Promise.resolve();
 44393              }
 44394              set isOffscreenCanvasSupported(e) {
 44395                this.optimizer.isOffscreenCanvasSupported = e;
 44396              }
 44397              get length() {
 44398                return this.argsArray.length;
 44399              }
 44400              get ready() {
 44401                return this._resolved || this._streamSink.ready;
 44402              }
 44403              get totalLength() {
 44404                return this._totalLength + this.length;
 44405              }
 44406              addOp(e, t) {
 44407                this.optimizer.push(e, t);
 44408                this.weight++;
 44409                this._streamSink &&
 44410                  (this.weight >= OperatorList.CHUNK_SIZE ||
 44411                    (this.weight >= OperatorList.CHUNK_SIZE_ABOUT &&
 44412                      (e === r.OPS.restore || e === r.OPS.endText))) &&
 44413                  this.flush();
 44414              }
 44415              addImageOps(e, t, a) {
 44416                void 0 !== a &&
 44417                  this.addOp(r.OPS.beginMarkedContentProps, ["OC", a]);
 44418                this.addOp(e, t);
 44419                void 0 !== a && this.addOp(r.OPS.endMarkedContent, []);
 44420              }
 44421              addDependency(e) {
 44422                if (!this.dependencies.has(e)) {
 44423                  this.dependencies.add(e);
 44424                  this.addOp(r.OPS.dependency, [e]);
 44425                }
 44426              }
 44427              addDependencies(e) {
 44428                for (const t of e) this.addDependency(t);
 44429              }
 44430              addOpList(e) {
 44431                if (e instanceof OperatorList) {
 44432                  for (const t of e.dependencies) this.dependencies.add(t);
 44433                  for (let t = 0, a = e.length; t < a; t++)
 44434                    this.addOp(e.fnArray[t], e.argsArray[t]);
 44435                } else
 44436                  (0, r.warn)('addOpList - ignoring invalid "opList" parameter.');
 44437              }
 44438              getIR() {
 44439                return {
 44440                  fnArray: this.fnArray,
 44441                  argsArray: this.argsArray,
 44442                  length: this.length,
 44443                };
 44444              }
 44445              get _transfers() {
 44446                const e = [],
 44447                  { fnArray: t, argsArray: a, length: n } = this;
 44448                for (let i = 0; i < n; i++)
 44449                  switch (t[i]) {
 44450                    case r.OPS.paintInlineImageXObject:
 44451                    case r.OPS.paintInlineImageXObjectGroup:
 44452                    case r.OPS.paintImageMaskXObject:
 44453                      const t = a[i][0];
 44454                      !t.cached &&
 44455                        t.data?.buffer instanceof ArrayBuffer &&
 44456                        e.push(t.data.buffer);
 44457                  }
 44458                return e;
 44459              }
 44460              flush(e = !1, t = null) {
 44461                this.optimizer.flush();
 44462                const a = this.length;
 44463                this._totalLength += a;
 44464                this._streamSink.enqueue(
 44465                  {
 44466                    fnArray: this.fnArray,
 44467                    argsArray: this.argsArray,
 44468                    lastChunk: e,
 44469                    separateAnnots: t,
 44470                    length: a,
 44471                  },
 44472                  1,
 44473                  this._transfers,
 44474                );
 44475                this.dependencies.clear();
 44476                this.fnArray.length = 0;
 44477                this.argsArray.length = 0;
 44478                this.weight = 0;
 44479                this.optimizer.reset();
 44480              }
 44481            }
 44482            t.OperatorList = OperatorList;
 44483          },
 44484          (e, t, a) => {
 44485            Object.defineProperty(t, "__esModule", { value: !0 });
 44486            t.PDFImage = void 0;
 44487            var r = a(2),
 44488              n = a(28),
 44489              i = a(5),
 44490              s = a(12),
 44491              o = a(18),
 44492              c = a(62),
 44493              l = a(26),
 44494              h = a(30),
 44495              u = a(4);
 44496            function decodeAndClamp(e, t, a, r) {
 44497              (e = t + e * a) < 0 ? (e = 0) : e > r && (e = r);
 44498              return e;
 44499            }
 44500            function resizeImageMask(e, t, a, r, n, i) {
 44501              const s = n * i;
 44502              let o;
 44503              o =
 44504                t <= 8
 44505                  ? new Uint8Array(s)
 44506                  : t <= 16
 44507                    ? new Uint16Array(s)
 44508                    : new Uint32Array(s);
 44509              const c = a / n,
 44510                l = r / i;
 44511              let h,
 44512                u,
 44513                d,
 44514                f,
 44515                g = 0;
 44516              const p = new Uint16Array(n),
 44517                m = a;
 44518              for (h = 0; h < n; h++) p[h] = Math.floor(h * c);
 44519              for (h = 0; h < i; h++) {
 44520                d = Math.floor(h * l) * m;
 44521                for (u = 0; u < n; u++) {
 44522                  f = d + p[u];
 44523                  o[g++] = e[f];
 44524                }
 44525              }
 44526              return o;
 44527            }
 44528            class PDFImage {
 44529              constructor({
 44530                xref: e,
 44531                res: t,
 44532                image: a,
 44533                isInline: n = !1,
 44534                smask: o = null,
 44535                mask: c = null,
 44536                isMask: l = !1,
 44537                pdfFunctionFactory: d,
 44538                localColorSpaceCache: f,
 44539              }) {
 44540                this.image = a;
 44541                const g = a.dict,
 44542                  p = g.get("F", "Filter");
 44543                let m;
 44544                if (p instanceof u.Name) m = p.name;
 44545                else if (Array.isArray(p)) {
 44546                  const t = e.fetchIfRef(p[0]);
 44547                  t instanceof u.Name && (m = t.name);
 44548                }
 44549                switch (m) {
 44550                  case "JPXDecode":
 44551                    const e = new h.JpxImage();
 44552                    e.parseImageProperties(a.stream);
 44553                    a.stream.reset();
 44554                    a.width = e.width;
 44555                    a.height = e.height;
 44556                    a.bitsPerComponent = e.bitsPerComponent;
 44557                    a.numComps = e.componentsCount;
 44558                    break;
 44559                  case "JBIG2Decode":
 44560                    a.bitsPerComponent = 1;
 44561                    a.numComps = 1;
 44562                }
 44563                let b = g.get("W", "Width"),
 44564                  y = g.get("H", "Height");
 44565                if (
 44566                  Number.isInteger(a.width) &&
 44567                  a.width > 0 &&
 44568                  Number.isInteger(a.height) &&
 44569                  a.height > 0 &&
 44570                  (a.width !== b || a.height !== y)
 44571                ) {
 44572                  (0, r.warn)(
 44573                    "PDFImage - using the Width/Height of the image data, rather than the image dictionary.",
 44574                  );
 44575                  b = a.width;
 44576                  y = a.height;
 44577                }
 44578                if (b < 1 || y < 1)
 44579                  throw new r.FormatError(
 44580                    `Invalid image width: ${b} or height: ${y}`,
 44581                  );
 44582                this.width = b;
 44583                this.height = y;
 44584                this.interpolate = g.get("I", "Interpolate");
 44585                this.imageMask = g.get("IM", "ImageMask") || !1;
 44586                this.matte = g.get("Matte") || !1;
 44587                let w = a.bitsPerComponent;
 44588                if (!w) {
 44589                  w = g.get("BPC", "BitsPerComponent");
 44590                  if (!w) {
 44591                    if (!this.imageMask)
 44592                      throw new r.FormatError(
 44593                        `Bits per component missing in image: ${this.imageMask}`,
 44594                      );
 44595                    w = 1;
 44596                  }
 44597                }
 44598                this.bpc = w;
 44599                if (!this.imageMask) {
 44600                  let i = g.getRaw("CS") || g.getRaw("ColorSpace");
 44601                  if (!i) {
 44602                    (0, r.info)("JPX images (which do not require color spaces)");
 44603                    switch (a.numComps) {
 44604                      case 1:
 44605                        i = u.Name.get("DeviceGray");
 44606                        break;
 44607                      case 3:
 44608                        i = u.Name.get("DeviceRGB");
 44609                        break;
 44610                      case 4:
 44611                        i = u.Name.get("DeviceCMYK");
 44612                        break;
 44613                      default:
 44614                        throw new Error(
 44615                          `JPX images with ${a.numComps} color components not supported.`,
 44616                        );
 44617                    }
 44618                  }
 44619                  this.colorSpace = s.ColorSpace.parse({
 44620                    cs: i,
 44621                    xref: e,
 44622                    resources: n ? t : null,
 44623                    pdfFunctionFactory: d,
 44624                    localColorSpaceCache: f,
 44625                  });
 44626                  this.numComps = this.colorSpace.numComps;
 44627                }
 44628                this.decode = g.getArray("D", "Decode");
 44629                this.needsDecode = !1;
 44630                if (
 44631                  this.decode &&
 44632                  ((this.colorSpace &&
 44633                    !this.colorSpace.isDefaultDecode(this.decode, w)) ||
 44634                    (l && !s.ColorSpace.isDefaultDecode(this.decode, 1)))
 44635                ) {
 44636                  this.needsDecode = !0;
 44637                  const e = (1 << w) - 1;
 44638                  this.decodeCoefficients = [];
 44639                  this.decodeAddends = [];
 44640                  const t = "Indexed" === this.colorSpace?.name;
 44641                  for (let a = 0, r = 0; a < this.decode.length; a += 2, ++r) {
 44642                    const n = this.decode[a],
 44643                      i = this.decode[a + 1];
 44644                    this.decodeCoefficients[r] = t ? (i - n) / e : i - n;
 44645                    this.decodeAddends[r] = t ? n : e * n;
 44646                  }
 44647                }
 44648                if (o)
 44649                  this.smask = new PDFImage({
 44650                    xref: e,
 44651                    res: t,
 44652                    image: o,
 44653                    isInline: n,
 44654                    pdfFunctionFactory: d,
 44655                    localColorSpaceCache: f,
 44656                  });
 44657                else if (c)
 44658                  if (c instanceof i.BaseStream) {
 44659                    c.dict.get("IM", "ImageMask")
 44660                      ? (this.mask = new PDFImage({
 44661                          xref: e,
 44662                          res: t,
 44663                          image: c,
 44664                          isInline: n,
 44665                          isMask: !0,
 44666                          pdfFunctionFactory: d,
 44667                          localColorSpaceCache: f,
 44668                        }))
 44669                      : (0, r.warn)(
 44670                          "Ignoring /Mask in image without /ImageMask.",
 44671                        );
 44672                  } else this.mask = c;
 44673              }
 44674              static async buildImage({
 44675                xref: e,
 44676                res: t,
 44677                image: a,
 44678                isInline: n = !1,
 44679                pdfFunctionFactory: s,
 44680                localColorSpaceCache: o,
 44681              }) {
 44682                const c = a;
 44683                let l = null,
 44684                  h = null;
 44685                const u = a.dict.get("SMask"),
 44686                  d = a.dict.get("Mask");
 44687                u
 44688                  ? u instanceof i.BaseStream
 44689                    ? (l = u)
 44690                    : (0, r.warn)("Unsupported /SMask format.")
 44691                  : d &&
 44692                    (d instanceof i.BaseStream || Array.isArray(d)
 44693                      ? (h = d)
 44694                      : (0, r.warn)("Unsupported /Mask format."));
 44695                return new PDFImage({
 44696                  xref: e,
 44697                  res: t,
 44698                  image: c,
 44699                  isInline: n,
 44700                  smask: l,
 44701                  mask: h,
 44702                  pdfFunctionFactory: s,
 44703                  localColorSpaceCache: o,
 44704                });
 44705              }
 44706              static createRawMask({
 44707                imgArray: e,
 44708                width: t,
 44709                height: a,
 44710                imageIsFromDecodeStream: r,
 44711                inverseDecode: n,
 44712                interpolate: i,
 44713              }) {
 44714                const s = ((t + 7) >> 3) * a,
 44715                  o = e.byteLength;
 44716                let c, l;
 44717                if (!r || (n && !(s === o)))
 44718                  if (n) {
 44719                    c = new Uint8Array(s);
 44720                    c.set(e);
 44721                    c.fill(255, o);
 44722                  } else c = new Uint8Array(e);
 44723                else c = e;
 44724                if (n) for (l = 0; l < o; l++) c[l] ^= 255;
 44725                return { data: c, width: t, height: a, interpolate: i };
 44726              }
 44727              static async createMask({
 44728                imgArray: e,
 44729                width: t,
 44730                height: a,
 44731                imageIsFromDecodeStream: i,
 44732                inverseDecode: s,
 44733                interpolate: o,
 44734                isOffscreenCanvasSupported: l = !1,
 44735              }) {
 44736                const h =
 44737                  1 === t && 1 === a && s === (0 === e.length || !!(128 & e[0]));
 44738                if (h) return { isSingleOpaquePixel: h };
 44739                if (l) {
 44740                  if (c.ImageResizer.needsToBeResized(t, a)) {
 44741                    const i = new Uint8ClampedArray(t * a * 4);
 44742                    (0, n.convertBlackAndWhiteToRGBA)({
 44743                      src: e,
 44744                      dest: i,
 44745                      width: t,
 44746                      height: a,
 44747                      nonBlackColor: 0,
 44748                      inverseDecode: s,
 44749                    });
 44750                    return c.ImageResizer.createImage({
 44751                      kind: r.ImageKind.RGBA_32BPP,
 44752                      data: i,
 44753                      width: t,
 44754                      height: a,
 44755                      interpolate: o,
 44756                    });
 44757                  }
 44758                  const i = new OffscreenCanvas(t, a),
 44759                    l = i.getContext("2d"),
 44760                    h = l.createImageData(t, a);
 44761                  (0, n.convertBlackAndWhiteToRGBA)({
 44762                    src: e,
 44763                    dest: h.data,
 44764                    width: t,
 44765                    height: a,
 44766                    nonBlackColor: 0,
 44767                    inverseDecode: s,
 44768                  });
 44769                  l.putImageData(h, 0, 0);
 44770                  return {
 44771                    data: null,
 44772                    width: t,
 44773                    height: a,
 44774                    interpolate: o,
 44775                    bitmap: i.transferToImageBitmap(),
 44776                  };
 44777                }
 44778                return this.createRawMask({
 44779                  imgArray: e,
 44780                  width: t,
 44781                  height: a,
 44782                  inverseDecode: s,
 44783                  imageIsFromDecodeStream: i,
 44784                  interpolate: o,
 44785                });
 44786              }
 44787              get drawWidth() {
 44788                return Math.max(
 44789                  this.width,
 44790                  this.smask?.width || 0,
 44791                  this.mask?.width || 0,
 44792                );
 44793              }
 44794              get drawHeight() {
 44795                return Math.max(
 44796                  this.height,
 44797                  this.smask?.height || 0,
 44798                  this.mask?.height || 0,
 44799                );
 44800              }
 44801              decodeBuffer(e) {
 44802                const t = this.bpc,
 44803                  a = this.numComps,
 44804                  r = this.decodeAddends,
 44805                  n = this.decodeCoefficients,
 44806                  i = (1 << t) - 1;
 44807                let s, o;
 44808                if (1 === t) {
 44809                  for (s = 0, o = e.length; s < o; s++) e[s] = +!e[s];
 44810                  return;
 44811                }
 44812                let c = 0;
 44813                for (s = 0, o = this.width * this.height; s < o; s++)
 44814                  for (let t = 0; t < a; t++) {
 44815                    e[c] = decodeAndClamp(e[c], r[t], n[t], i);
 44816                    c++;
 44817                  }
 44818              }
 44819              getComponents(e) {
 44820                const t = this.bpc;
 44821                if (8 === t) return e;
 44822                const a = this.width,
 44823                  r = this.height,
 44824                  n = this.numComps,
 44825                  i = a * r * n;
 44826                let s,
 44827                  o = 0;
 44828                s =
 44829                  t <= 8
 44830                    ? new Uint8Array(i)
 44831                    : t <= 16
 44832                      ? new Uint16Array(i)
 44833                      : new Uint32Array(i);
 44834                const c = a * n,
 44835                  l = (1 << t) - 1;
 44836                let h,
 44837                  u,
 44838                  d = 0;
 44839                if (1 === t) {
 44840                  let t, a, n;
 44841                  for (let i = 0; i < r; i++) {
 44842                    a = d + (-8 & c);
 44843                    n = d + c;
 44844                    for (; d < a; ) {
 44845                      u = e[o++];
 44846                      s[d] = (u >> 7) & 1;
 44847                      s[d + 1] = (u >> 6) & 1;
 44848                      s[d + 2] = (u >> 5) & 1;
 44849                      s[d + 3] = (u >> 4) & 1;
 44850                      s[d + 4] = (u >> 3) & 1;
 44851                      s[d + 5] = (u >> 2) & 1;
 44852                      s[d + 6] = (u >> 1) & 1;
 44853                      s[d + 7] = 1 & u;
 44854                      d += 8;
 44855                    }
 44856                    if (d < n) {
 44857                      u = e[o++];
 44858                      t = 128;
 44859                      for (; d < n; ) {
 44860                        s[d++] = +!!(u & t);
 44861                        t >>= 1;
 44862                      }
 44863                    }
 44864                  }
 44865                } else {
 44866                  let a = 0;
 44867                  u = 0;
 44868                  for (d = 0, h = i; d < h; ++d) {
 44869                    if (d % c == 0) {
 44870                      u = 0;
 44871                      a = 0;
 44872                    }
 44873                    for (; a < t; ) {
 44874                      u = (u << 8) | e[o++];
 44875                      a += 8;
 44876                    }
 44877                    const r = a - t;
 44878                    let n = u >> r;
 44879                    n < 0 ? (n = 0) : n > l && (n = l);
 44880                    s[d] = n;
 44881                    u &= (1 << r) - 1;
 44882                    a = r;
 44883                  }
 44884                }
 44885                return s;
 44886              }
 44887              fillOpacity(e, t, a, n, i) {
 44888                const s = this.smask,
 44889                  o = this.mask;
 44890                let c, l, h, u, d, f;
 44891                if (s) {
 44892                  l = s.width;
 44893                  h = s.height;
 44894                  c = new Uint8ClampedArray(l * h);
 44895                  s.fillGrayBuffer(c);
 44896                  (l === t && h === a) ||
 44897                    (c = resizeImageMask(c, s.bpc, l, h, t, a));
 44898                } else if (o)
 44899                  if (o instanceof PDFImage) {
 44900                    l = o.width;
 44901                    h = o.height;
 44902                    c = new Uint8ClampedArray(l * h);
 44903                    o.numComps = 1;
 44904                    o.fillGrayBuffer(c);
 44905                    for (u = 0, d = l * h; u < d; ++u) c[u] = 255 - c[u];
 44906                    (l === t && h === a) ||
 44907                      (c = resizeImageMask(c, o.bpc, l, h, t, a));
 44908                  } else {
 44909                    if (!Array.isArray(o))
 44910                      throw new r.FormatError("Unknown mask format.");
 44911                    {
 44912                      c = new Uint8ClampedArray(t * a);
 44913                      const e = this.numComps;
 44914                      for (u = 0, d = t * a; u < d; ++u) {
 44915                        let t = 0;
 44916                        const a = u * e;
 44917                        for (f = 0; f < e; ++f) {
 44918                          const e = i[a + f],
 44919                            r = 2 * f;
 44920                          if (e < o[r] || e > o[r + 1]) {
 44921                            t = 255;
 44922                            break;
 44923                          }
 44924                        }
 44925                        c[u] = t;
 44926                      }
 44927                    }
 44928                  }
 44929                if (c)
 44930                  for (u = 0, f = 3, d = t * n; u < d; ++u, f += 4) e[f] = c[u];
 44931                else for (u = 0, f = 3, d = t * n; u < d; ++u, f += 4) e[f] = 255;
 44932              }
 44933              undoPreblend(e, t, a) {
 44934                const r = this.smask?.matte;
 44935                if (!r) return;
 44936                const n = this.colorSpace.getRgb(r, 0),
 44937                  i = n[0],
 44938                  s = n[1],
 44939                  o = n[2],
 44940                  c = t * a * 4;
 44941                for (let t = 0; t < c; t += 4) {
 44942                  const a = e[t + 3];
 44943                  if (0 === a) {
 44944                    e[t] = 255;
 44945                    e[t + 1] = 255;
 44946                    e[t + 2] = 255;
 44947                    continue;
 44948                  }
 44949                  const r = 255 / a;
 44950                  e[t] = (e[t] - i) * r + i;
 44951                  e[t + 1] = (e[t + 1] - s) * r + s;
 44952                  e[t + 2] = (e[t + 2] - o) * r + o;
 44953                }
 44954              }
 44955              async createImageData(e = !1, t = !1) {
 44956                const a = this.drawWidth,
 44957                  n = this.drawHeight,
 44958                  i = {
 44959                    width: a,
 44960                    height: n,
 44961                    interpolate: this.interpolate,
 44962                    kind: 0,
 44963                    data: null,
 44964                  },
 44965                  s = this.numComps,
 44966                  o = this.width,
 44967                  h = this.height,
 44968                  u = this.bpc,
 44969                  d = (o * s * u + 7) >> 3,
 44970                  f = t && c.ImageResizer.needsToBeResized(a, n);
 44971                if (!e) {
 44972                  let e;
 44973                  "DeviceGray" === this.colorSpace.name && 1 === u
 44974                    ? (e = r.ImageKind.GRAYSCALE_1BPP)
 44975                    : "DeviceRGB" !== this.colorSpace.name ||
 44976                      8 !== u ||
 44977                      this.needsDecode ||
 44978                      (e = r.ImageKind.RGB_24BPP);
 44979                  if (e && !this.smask && !this.mask && a === o && n === h) {
 44980                    const s = this.getImageBytes(h * d, {});
 44981                    if (t)
 44982                      return f
 44983                        ? c.ImageResizer.createImage(
 44984                            {
 44985                              data: s,
 44986                              kind: e,
 44987                              width: a,
 44988                              height: n,
 44989                              interpolate: this.interpolate,
 44990                            },
 44991                            this.needsDecode,
 44992                          )
 44993                        : this.createBitmap(e, o, h, s);
 44994                    i.kind = e;
 44995                    i.data = s;
 44996                    if (this.needsDecode) {
 44997                      (0, r.assert)(
 44998                        e === r.ImageKind.GRAYSCALE_1BPP,
 44999                        "PDFImage.createImageData: The image must be grayscale.",
 45000                      );
 45001                      const t = i.data;
 45002                      for (let e = 0, a = t.length; e < a; e++) t[e] ^= 255;
 45003                    }
 45004                    return i;
 45005                  }
 45006                  if (
 45007                    this.image instanceof l.JpegStream &&
 45008                    !this.smask &&
 45009                    !this.mask &&
 45010                    !this.needsDecode
 45011                  ) {
 45012                    let e = h * d;
 45013                    if (t && !f) {
 45014                      let t = !1;
 45015                      switch (this.colorSpace.name) {
 45016                        case "DeviceGray":
 45017                          e *= 4;
 45018                          t = !0;
 45019                          break;
 45020                        case "DeviceRGB":
 45021                          e = (e / 3) * 4;
 45022                          t = !0;
 45023                          break;
 45024                        case "DeviceCMYK":
 45025                          t = !0;
 45026                      }
 45027                      if (t) {
 45028                        const t = this.getImageBytes(e, {
 45029                          drawWidth: a,
 45030                          drawHeight: n,
 45031                          forceRGBA: !0,
 45032                        });
 45033                        return this.createBitmap(r.ImageKind.RGBA_32BPP, a, n, t);
 45034                      }
 45035                    } else
 45036                      switch (this.colorSpace.name) {
 45037                        case "DeviceGray":
 45038                          e *= 3;
 45039                        case "DeviceRGB":
 45040                        case "DeviceCMYK":
 45041                          i.kind = r.ImageKind.RGB_24BPP;
 45042                          i.data = this.getImageBytes(e, {
 45043                            drawWidth: a,
 45044                            drawHeight: n,
 45045                            forceRGB: !0,
 45046                          });
 45047                          return f ? c.ImageResizer.createImage(i) : i;
 45048                      }
 45049                  }
 45050                }
 45051                const g = this.getImageBytes(h * d, { internal: !0 }),
 45052                  p = 0 | (((g.length / d) * n) / h),
 45053                  m = this.getComponents(g);
 45054                let b, y, w, S, x, C;
 45055                if (t && !f) {
 45056                  w = new OffscreenCanvas(a, n);
 45057                  S = w.getContext("2d");
 45058                  x = S.createImageData(a, n);
 45059                  C = x.data;
 45060                }
 45061                i.kind = r.ImageKind.RGBA_32BPP;
 45062                if (e || this.smask || this.mask) {
 45063                  (t && !f) || (C = new Uint8ClampedArray(a * n * 4));
 45064                  b = 1;
 45065                  y = !0;
 45066                  this.fillOpacity(C, a, n, p, m);
 45067                } else {
 45068                  if (!t || f) {
 45069                    i.kind = r.ImageKind.RGB_24BPP;
 45070                    C = new Uint8ClampedArray(a * n * 3);
 45071                    b = 0;
 45072                  } else {
 45073                    new Uint32Array(C.buffer).fill(
 45074                      r.FeatureTest.isLittleEndian ? 4278190080 : 255,
 45075                    );
 45076                    b = 1;
 45077                  }
 45078                  y = !1;
 45079                }
 45080                this.needsDecode && this.decodeBuffer(m);
 45081                this.colorSpace.fillRgb(C, o, h, a, n, p, u, m, b);
 45082                y && this.undoPreblend(C, a, p);
 45083                if (t && !f) {
 45084                  S.putImageData(x, 0, 0);
 45085                  return {
 45086                    data: null,
 45087                    width: a,
 45088                    height: n,
 45089                    bitmap: w.transferToImageBitmap(),
 45090                    interpolate: this.interpolate,
 45091                  };
 45092                }
 45093                i.data = C;
 45094                return f ? c.ImageResizer.createImage(i) : i;
 45095              }
 45096              fillGrayBuffer(e) {
 45097                const t = this.numComps;
 45098                if (1 !== t)
 45099                  throw new r.FormatError(
 45100                    `Reading gray scale from a color image: ${t}`,
 45101                  );
 45102                const a = this.width,
 45103                  n = this.height,
 45104                  i = this.bpc,
 45105                  s = (a * t * i + 7) >> 3,
 45106                  o = this.getImageBytes(n * s, { internal: !0 }),
 45107                  c = this.getComponents(o);
 45108                let l, h;
 45109                if (1 === i) {
 45110                  h = a * n;
 45111                  if (this.needsDecode)
 45112                    for (l = 0; l < h; ++l) e[l] = (c[l] - 1) & 255;
 45113                  else for (l = 0; l < h; ++l) e[l] = 255 & -c[l];
 45114                  return;
 45115                }
 45116                this.needsDecode && this.decodeBuffer(c);
 45117                h = a * n;
 45118                const u = 255 / ((1 << i) - 1);
 45119                for (l = 0; l < h; ++l) e[l] = u * c[l];
 45120              }
 45121              createBitmap(e, t, a, i) {
 45122                const s = new OffscreenCanvas(t, a),
 45123                  o = s.getContext("2d");
 45124                let c;
 45125                if (e === r.ImageKind.RGBA_32BPP) c = new ImageData(i, t, a);
 45126                else {
 45127                  c = o.createImageData(t, a);
 45128                  (0, n.convertToRGBA)({
 45129                    kind: e,
 45130                    src: i,
 45131                    dest: new Uint32Array(c.data.buffer),
 45132                    width: t,
 45133                    height: a,
 45134                    inverseDecode: this.needsDecode,
 45135                  });
 45136                }
 45137                o.putImageData(c, 0, 0);
 45138                return {
 45139                  data: null,
 45140                  width: t,
 45141                  height: a,
 45142                  bitmap: s.transferToImageBitmap(),
 45143                  interpolate: this.interpolate,
 45144                };
 45145              }
 45146              getImageBytes(
 45147                e,
 45148                {
 45149                  drawWidth: t,
 45150                  drawHeight: a,
 45151                  forceRGBA: n = !1,
 45152                  forceRGB: i = !1,
 45153                  internal: s = !1,
 45154                },
 45155              ) {
 45156                this.image.reset();
 45157                this.image.drawWidth = t || this.width;
 45158                this.image.drawHeight = a || this.height;
 45159                this.image.forceRGBA = !!n;
 45160                this.image.forceRGB = !!i;
 45161                const c = this.image.getBytes(e);
 45162                if (s || this.image instanceof o.DecodeStream) return c;
 45163                (0, r.assert)(
 45164                  c instanceof Uint8Array,
 45165                  'PDFImage.getImageBytes: Unsupported "imageBytes" type.',
 45166                );
 45167                return new Uint8Array(c);
 45168              }
 45169            }
 45170            t.PDFImage = PDFImage;
 45171          },
 45172          (e, t, a) => {
 45173            Object.defineProperty(t, "__esModule", { value: !0 });
 45174            t.Catalog = void 0;
 45175            var r = a(3),
 45176              n = a(2),
 45177              i = a(4),
 45178              s = a(67),
 45179              o = a(5),
 45180              c = a(68),
 45181              l = a(12),
 45182              h = a(69),
 45183              u = a(59),
 45184              d = a(70),
 45185              f = a(72);
 45186            function fetchDestination(e) {
 45187              e instanceof i.Dict && (e = e.get("D"));
 45188              return Array.isArray(e) ? e : null;
 45189            }
 45190            class Catalog {
 45191              constructor(e, t) {
 45192                this.pdfManager = e;
 45193                this.xref = t;
 45194                this._catDict = t.getCatalogObj();
 45195                if (!(this._catDict instanceof i.Dict))
 45196                  throw new n.FormatError("Catalog object is not a dictionary.");
 45197                this.toplevelPagesDict;
 45198                this._actualNumPages = null;
 45199                this.fontCache = new i.RefSetCache();
 45200                this.builtInCMapCache = new Map();
 45201                this.standardFontDataCache = new Map();
 45202                this.globalImageCache = new u.GlobalImageCache();
 45203                this.pageKidsCountCache = new i.RefSetCache();
 45204                this.pageIndexCache = new i.RefSetCache();
 45205                this.nonBlendModesSet = new i.RefSet();
 45206                this.systemFontCache = new Map();
 45207              }
 45208              cloneDict() {
 45209                return this._catDict.clone();
 45210              }
 45211              get version() {
 45212                const e = this._catDict.get("Version");
 45213                if (e instanceof i.Name) {
 45214                  if (r.PDF_VERSION_REGEXP.test(e.name))
 45215                    return (0, n.shadow)(this, "version", e.name);
 45216                  (0, n.warn)(`Invalid PDF catalog version: ${e.name}`);
 45217                }
 45218                return (0, n.shadow)(this, "version", null);
 45219              }
 45220              get lang() {
 45221                const e = this._catDict.get("Lang");
 45222                return (0, n.shadow)(
 45223                  this,
 45224                  "lang",
 45225                  "string" == typeof e ? (0, n.stringToPDFString)(e) : null,
 45226                );
 45227              }
 45228              get needsRendering() {
 45229                const e = this._catDict.get("NeedsRendering");
 45230                return (0, n.shadow)(
 45231                  this,
 45232                  "needsRendering",
 45233                  "boolean" == typeof e && e,
 45234                );
 45235              }
 45236              get collection() {
 45237                let e = null;
 45238                try {
 45239                  const t = this._catDict.get("Collection");
 45240                  t instanceof i.Dict && t.size > 0 && (e = t);
 45241                } catch (e) {
 45242                  if (e instanceof r.MissingDataException) throw e;
 45243                  (0, n.info)(
 45244                    "Cannot fetch Collection entry; assuming no collection is present.",
 45245                  );
 45246                }
 45247                return (0, n.shadow)(this, "collection", e);
 45248              }
 45249              get acroForm() {
 45250                let e = null;
 45251                try {
 45252                  const t = this._catDict.get("AcroForm");
 45253                  t instanceof i.Dict && t.size > 0 && (e = t);
 45254                } catch (e) {
 45255                  if (e instanceof r.MissingDataException) throw e;
 45256                  (0, n.info)(
 45257                    "Cannot fetch AcroForm entry; assuming no forms are present.",
 45258                  );
 45259                }
 45260                return (0, n.shadow)(this, "acroForm", e);
 45261              }
 45262              get acroFormRef() {
 45263                const e = this._catDict.getRaw("AcroForm");
 45264                return (0, n.shadow)(
 45265                  this,
 45266                  "acroFormRef",
 45267                  e instanceof i.Ref ? e : null,
 45268                );
 45269              }
 45270              get metadata() {
 45271                const e = this._catDict.getRaw("Metadata");
 45272                if (!(e instanceof i.Ref))
 45273                  return (0, n.shadow)(this, "metadata", null);
 45274                let t = null;
 45275                try {
 45276                  const a = this.xref.fetch(
 45277                    e,
 45278                    !this.xref.encrypt?.encryptMetadata,
 45279                  );
 45280                  if (a instanceof o.BaseStream && a.dict instanceof i.Dict) {
 45281                    const e = a.dict.get("Type"),
 45282                      r = a.dict.get("Subtype");
 45283                    if ((0, i.isName)(e, "Metadata") && (0, i.isName)(r, "XML")) {
 45284                      const e = (0, n.stringToUTF8String)(a.getString());
 45285                      e && (t = new d.MetadataParser(e).serializable);
 45286                    }
 45287                  }
 45288                } catch (e) {
 45289                  if (e instanceof r.MissingDataException) throw e;
 45290                  (0, n.info)(`Skipping invalid Metadata: "${e}".`);
 45291                }
 45292                return (0, n.shadow)(this, "metadata", t);
 45293              }
 45294              get markInfo() {
 45295                let e = null;
 45296                try {
 45297                  e = this._readMarkInfo();
 45298                } catch (e) {
 45299                  if (e instanceof r.MissingDataException) throw e;
 45300                  (0, n.warn)("Unable to read mark info.");
 45301                }
 45302                return (0, n.shadow)(this, "markInfo", e);
 45303              }
 45304              _readMarkInfo() {
 45305                const e = this._catDict.get("MarkInfo");
 45306                if (!(e instanceof i.Dict)) return null;
 45307                const t = { Marked: !1, UserProperties: !1, Suspects: !1 };
 45308                for (const a in t) {
 45309                  const r = e.get(a);
 45310                  "boolean" == typeof r && (t[a] = r);
 45311                }
 45312                return t;
 45313              }
 45314              get structTreeRoot() {
 45315                let e = null;
 45316                try {
 45317                  e = this._readStructTreeRoot();
 45318                } catch (e) {
 45319                  if (e instanceof r.MissingDataException) throw e;
 45320                  (0, n.warn)("Unable read to structTreeRoot info.");
 45321                }
 45322                return (0, n.shadow)(this, "structTreeRoot", e);
 45323              }
 45324              _readStructTreeRoot() {
 45325                const e = this._catDict.getRaw("StructTreeRoot"),
 45326                  t = this.xref.fetchIfRef(e);
 45327                if (!(t instanceof i.Dict)) return null;
 45328                const a = new f.StructTreeRoot(t, e);
 45329                a.init();
 45330                return a;
 45331              }
 45332              get toplevelPagesDict() {
 45333                const e = this._catDict.get("Pages");
 45334                if (!(e instanceof i.Dict))
 45335                  throw new n.FormatError("Invalid top-level pages dictionary.");
 45336                return (0, n.shadow)(this, "toplevelPagesDict", e);
 45337              }
 45338              get documentOutline() {
 45339                let e = null;
 45340                try {
 45341                  e = this._readDocumentOutline();
 45342                } catch (e) {
 45343                  if (e instanceof r.MissingDataException) throw e;
 45344                  (0, n.warn)("Unable to read document outline.");
 45345                }
 45346                return (0, n.shadow)(this, "documentOutline", e);
 45347              }
 45348              _readDocumentOutline() {
 45349                let e = this._catDict.get("Outlines");
 45350                if (!(e instanceof i.Dict)) return null;
 45351                e = e.getRaw("First");
 45352                if (!(e instanceof i.Ref)) return null;
 45353                const t = { items: [] },
 45354                  a = [{ obj: e, parent: t }],
 45355                  r = new i.RefSet();
 45356                r.put(e);
 45357                const s = this.xref,
 45358                  o = new Uint8ClampedArray(3);
 45359                for (; a.length > 0; ) {
 45360                  const t = a.shift(),
 45361                    c = s.fetchIfRef(t.obj);
 45362                  if (null === c) continue;
 45363                  if (!c.has("Title"))
 45364                    throw new n.FormatError("Invalid outline item encountered.");
 45365                  const h = { url: null, dest: null, action: null };
 45366                  Catalog.parseDestDictionary({
 45367                    destDict: c,
 45368                    resultObj: h,
 45369                    docBaseUrl: this.baseUrl,
 45370                    docAttachments: this.attachments,
 45371                  });
 45372                  const u = c.get("Title"),
 45373                    d = c.get("F") || 0,
 45374                    f = c.getArray("C"),
 45375                    g = c.get("Count");
 45376                  let p = o;
 45377                  !Array.isArray(f) ||
 45378                    3 !== f.length ||
 45379                    (0 === f[0] && 0 === f[1] && 0 === f[2]) ||
 45380                    (p = l.ColorSpace.singletons.rgb.getRgb(f, 0));
 45381                  const m = {
 45382                    action: h.action,
 45383                    attachment: h.attachment,
 45384                    dest: h.dest,
 45385                    url: h.url,
 45386                    unsafeUrl: h.unsafeUrl,
 45387                    newWindow: h.newWindow,
 45388                    setOCGState: h.setOCGState,
 45389                    title: (0, n.stringToPDFString)(u),
 45390                    color: p,
 45391                    count: Number.isInteger(g) ? g : void 0,
 45392                    bold: !!(2 & d),
 45393                    italic: !!(1 & d),
 45394                    items: [],
 45395                  };
 45396                  t.parent.items.push(m);
 45397                  e = c.getRaw("First");
 45398                  if (e instanceof i.Ref && !r.has(e)) {
 45399                    a.push({ obj: e, parent: m });
 45400                    r.put(e);
 45401                  }
 45402                  e = c.getRaw("Next");
 45403                  if (e instanceof i.Ref && !r.has(e)) {
 45404                    a.push({ obj: e, parent: t.parent });
 45405                    r.put(e);
 45406                  }
 45407                }
 45408                return t.items.length > 0 ? t.items : null;
 45409              }
 45410              get permissions() {
 45411                let e = null;
 45412                try {
 45413                  e = this._readPermissions();
 45414                } catch (e) {
 45415                  if (e instanceof r.MissingDataException) throw e;
 45416                  (0, n.warn)("Unable to read permissions.");
 45417                }
 45418                return (0, n.shadow)(this, "permissions", e);
 45419              }
 45420              _readPermissions() {
 45421                const e = this.xref.trailer.get("Encrypt");
 45422                if (!(e instanceof i.Dict)) return null;
 45423                let t = e.get("P");
 45424                if ("number" != typeof t) return null;
 45425                t += 2 ** 32;
 45426                const a = [];
 45427                for (const e in n.PermissionFlag) {
 45428                  const r = n.PermissionFlag[e];
 45429                  t & r && a.push(r);
 45430                }
 45431                return a;
 45432              }
 45433              get optionalContentConfig() {
 45434                let e = null;
 45435                try {
 45436                  const t = this._catDict.get("OCProperties");
 45437                  if (!t)
 45438                    return (0, n.shadow)(this, "optionalContentConfig", null);
 45439                  const a = t.get("D");
 45440                  if (!a)
 45441                    return (0, n.shadow)(this, "optionalContentConfig", null);
 45442                  const r = t.get("OCGs");
 45443                  if (!Array.isArray(r))
 45444                    return (0, n.shadow)(this, "optionalContentConfig", null);
 45445                  const s = [],
 45446                    o = [];
 45447                  for (const e of r) {
 45448                    if (!(e instanceof i.Ref)) continue;
 45449                    o.push(e);
 45450                    const t = this.xref.fetchIfRef(e);
 45451                    s.push({
 45452                      id: e.toString(),
 45453                      name:
 45454                        "string" == typeof t.get("Name")
 45455                          ? (0, n.stringToPDFString)(t.get("Name"))
 45456                          : null,
 45457                      intent:
 45458                        "string" == typeof t.get("Intent")
 45459                          ? (0, n.stringToPDFString)(t.get("Intent"))
 45460                          : null,
 45461                    });
 45462                  }
 45463                  e = this._readOptionalContentConfig(a, o);
 45464                  e.groups = s;
 45465                } catch (e) {
 45466                  if (e instanceof r.MissingDataException) throw e;
 45467                  (0, n.warn)(`Unable to read optional content config: ${e}`);
 45468                }
 45469                return (0, n.shadow)(this, "optionalContentConfig", e);
 45470              }
 45471              _readOptionalContentConfig(e, t) {
 45472                function parseOnOff(e) {
 45473                  const a = [];
 45474                  if (Array.isArray(e))
 45475                    for (const r of e)
 45476                      r instanceof i.Ref && t.includes(r) && a.push(r.toString());
 45477                  return a;
 45478                }
 45479                function parseOrder(e, a = 0) {
 45480                  if (!Array.isArray(e)) return null;
 45481                  const n = [];
 45482                  for (const s of e) {
 45483                    if (s instanceof i.Ref && t.includes(s)) {
 45484                      r.put(s);
 45485                      n.push(s.toString());
 45486                      continue;
 45487                    }
 45488                    const e = parseNestedOrder(s, a);
 45489                    e && n.push(e);
 45490                  }
 45491                  if (a > 0) return n;
 45492                  const s = [];
 45493                  for (const e of t) r.has(e) || s.push(e.toString());
 45494                  s.length && n.push({ name: null, order: s });
 45495                  return n;
 45496                }
 45497                function parseNestedOrder(e, t) {
 45498                  if (++t > s) {
 45499                    (0, n.warn)("parseNestedOrder - reached MAX_NESTED_LEVELS.");
 45500                    return null;
 45501                  }
 45502                  const r = a.fetchIfRef(e);
 45503                  if (!Array.isArray(r)) return null;
 45504                  const i = a.fetchIfRef(r[0]);
 45505                  if ("string" != typeof i) return null;
 45506                  const o = parseOrder(r.slice(1), t);
 45507                  return o && o.length
 45508                    ? { name: (0, n.stringToPDFString)(i), order: o }
 45509                    : null;
 45510                }
 45511                const a = this.xref,
 45512                  r = new i.RefSet(),
 45513                  s = 10;
 45514                return {
 45515                  name:
 45516                    "string" == typeof e.get("Name")
 45517                      ? (0, n.stringToPDFString)(e.get("Name"))
 45518                      : null,
 45519                  creator:
 45520                    "string" == typeof e.get("Creator")
 45521                      ? (0, n.stringToPDFString)(e.get("Creator"))
 45522                      : null,
 45523                  baseState:
 45524                    e.get("BaseState") instanceof i.Name
 45525                      ? e.get("BaseState").name
 45526                      : null,
 45527                  on: parseOnOff(e.get("ON")),
 45528                  off: parseOnOff(e.get("OFF")),
 45529                  order: parseOrder(e.get("Order")),
 45530                  groups: null,
 45531                };
 45532              }
 45533              setActualNumPages(e = null) {
 45534                this._actualNumPages = e;
 45535              }
 45536              get hasActualNumPages() {
 45537                return null !== this._actualNumPages;
 45538              }
 45539              get _pagesCount() {
 45540                const e = this.toplevelPagesDict.get("Count");
 45541                if (!Number.isInteger(e))
 45542                  throw new n.FormatError(
 45543                    "Page count in top-level pages dictionary is not an integer.",
 45544                  );
 45545                return (0, n.shadow)(this, "_pagesCount", e);
 45546              }
 45547              get numPages() {
 45548                return this.hasActualNumPages
 45549                  ? this._actualNumPages
 45550                  : this._pagesCount;
 45551              }
 45552              get destinations() {
 45553                const e = this._readDests(),
 45554                  t = Object.create(null);
 45555                if (e instanceof s.NameTree)
 45556                  for (const [a, r] of e.getAll()) {
 45557                    const e = fetchDestination(r);
 45558                    e && (t[(0, n.stringToPDFString)(a)] = e);
 45559                  }
 45560                else
 45561                  e instanceof i.Dict &&
 45562                    e.forEach(function (e, a) {
 45563                      const r = fetchDestination(a);
 45564                      r && (t[e] = r);
 45565                    });
 45566                return (0, n.shadow)(this, "destinations", t);
 45567              }
 45568              getDestination(e) {
 45569                const t = this._readDests();
 45570                if (t instanceof s.NameTree) {
 45571                  const a = fetchDestination(t.get(e));
 45572                  if (a) return a;
 45573                  const r = this.destinations[e];
 45574                  if (r) {
 45575                    (0, n.warn)(
 45576                      `Found "${e}" at an incorrect position in the NameTree.`,
 45577                    );
 45578                    return r;
 45579                  }
 45580                } else if (t instanceof i.Dict) {
 45581                  const a = fetchDestination(t.get(e));
 45582                  if (a) return a;
 45583                }
 45584                return null;
 45585              }
 45586              _readDests() {
 45587                const e = this._catDict.get("Names");
 45588                return e?.has("Dests")
 45589                  ? new s.NameTree(e.getRaw("Dests"), this.xref)
 45590                  : this._catDict.has("Dests")
 45591                    ? this._catDict.get("Dests")
 45592                    : void 0;
 45593              }
 45594              get pageLabels() {
 45595                let e = null;
 45596                try {
 45597                  e = this._readPageLabels();
 45598                } catch (e) {
 45599                  if (e instanceof r.MissingDataException) throw e;
 45600                  (0, n.warn)("Unable to read page labels.");
 45601                }
 45602                return (0, n.shadow)(this, "pageLabels", e);
 45603              }
 45604              _readPageLabels() {
 45605                const e = this._catDict.getRaw("PageLabels");
 45606                if (!e) return null;
 45607                const t = new Array(this.numPages);
 45608                let a = null,
 45609                  o = "";
 45610                const c = new s.NumberTree(e, this.xref).getAll();
 45611                let l = "",
 45612                  h = 1;
 45613                for (let e = 0, s = this.numPages; e < s; e++) {
 45614                  const s = c.get(e);
 45615                  if (void 0 !== s) {
 45616                    if (!(s instanceof i.Dict))
 45617                      throw new n.FormatError("PageLabel is not a dictionary.");
 45618                    if (
 45619                      s.has("Type") &&
 45620                      !(0, i.isName)(s.get("Type"), "PageLabel")
 45621                    )
 45622                      throw new n.FormatError(
 45623                        "Invalid type in PageLabel dictionary.",
 45624                      );
 45625                    if (s.has("S")) {
 45626                      const e = s.get("S");
 45627                      if (!(e instanceof i.Name))
 45628                        throw new n.FormatError(
 45629                          "Invalid style in PageLabel dictionary.",
 45630                        );
 45631                      a = e.name;
 45632                    } else a = null;
 45633                    if (s.has("P")) {
 45634                      const e = s.get("P");
 45635                      if ("string" != typeof e)
 45636                        throw new n.FormatError(
 45637                          "Invalid prefix in PageLabel dictionary.",
 45638                        );
 45639                      o = (0, n.stringToPDFString)(e);
 45640                    } else o = "";
 45641                    if (s.has("St")) {
 45642                      const e = s.get("St");
 45643                      if (!(Number.isInteger(e) && e >= 1))
 45644                        throw new n.FormatError(
 45645                          "Invalid start in PageLabel dictionary.",
 45646                        );
 45647                      h = e;
 45648                    } else h = 1;
 45649                  }
 45650                  switch (a) {
 45651                    case "D":
 45652                      l = h;
 45653                      break;
 45654                    case "R":
 45655                    case "r":
 45656                      l = (0, r.toRomanNumerals)(h, "r" === a);
 45657                      break;
 45658                    case "A":
 45659                    case "a":
 45660                      const e = 26,
 45661                        t = "a" === a ? 97 : 65,
 45662                        i = h - 1;
 45663                      l = String.fromCharCode(t + (i % e)).repeat(
 45664                        Math.floor(i / e) + 1,
 45665                      );
 45666                      break;
 45667                    default:
 45668                      if (a)
 45669                        throw new n.FormatError(
 45670                          `Invalid style "${a}" in PageLabel dictionary.`,
 45671                        );
 45672                      l = "";
 45673                  }
 45674                  t[e] = o + l;
 45675                  h++;
 45676                }
 45677                return t;
 45678              }
 45679              get pageLayout() {
 45680                const e = this._catDict.get("PageLayout");
 45681                let t = "";
 45682                if (e instanceof i.Name)
 45683                  switch (e.name) {
 45684                    case "SinglePage":
 45685                    case "OneColumn":
 45686                    case "TwoColumnLeft":
 45687                    case "TwoColumnRight":
 45688                    case "TwoPageLeft":
 45689                    case "TwoPageRight":
 45690                      t = e.name;
 45691                  }
 45692                return (0, n.shadow)(this, "pageLayout", t);
 45693              }
 45694              get pageMode() {
 45695                const e = this._catDict.get("PageMode");
 45696                let t = "UseNone";
 45697                if (e instanceof i.Name)
 45698                  switch (e.name) {
 45699                    case "UseNone":
 45700                    case "UseOutlines":
 45701                    case "UseThumbs":
 45702                    case "FullScreen":
 45703                    case "UseOC":
 45704                    case "UseAttachments":
 45705                      t = e.name;
 45706                  }
 45707                return (0, n.shadow)(this, "pageMode", t);
 45708              }
 45709              get viewerPreferences() {
 45710                const e = this._catDict.get("ViewerPreferences");
 45711                if (!(e instanceof i.Dict))
 45712                  return (0, n.shadow)(this, "viewerPreferences", null);
 45713                let t = null;
 45714                for (const a of e.getKeys()) {
 45715                  const r = e.get(a);
 45716                  let s;
 45717                  switch (a) {
 45718                    case "HideToolbar":
 45719                    case "HideMenubar":
 45720                    case "HideWindowUI":
 45721                    case "FitWindow":
 45722                    case "CenterWindow":
 45723                    case "DisplayDocTitle":
 45724                    case "PickTrayByPDFSize":
 45725                      "boolean" == typeof r && (s = r);
 45726                      break;
 45727                    case "NonFullScreenPageMode":
 45728                      if (r instanceof i.Name)
 45729                        switch (r.name) {
 45730                          case "UseNone":
 45731                          case "UseOutlines":
 45732                          case "UseThumbs":
 45733                          case "UseOC":
 45734                            s = r.name;
 45735                            break;
 45736                          default:
 45737                            s = "UseNone";
 45738                        }
 45739                      break;
 45740                    case "Direction":
 45741                      if (r instanceof i.Name)
 45742                        switch (r.name) {
 45743                          case "L2R":
 45744                          case "R2L":
 45745                            s = r.name;
 45746                            break;
 45747                          default:
 45748                            s = "L2R";
 45749                        }
 45750                      break;
 45751                    case "ViewArea":
 45752                    case "ViewClip":
 45753                    case "PrintArea":
 45754                    case "PrintClip":
 45755                      if (r instanceof i.Name)
 45756                        switch (r.name) {
 45757                          case "MediaBox":
 45758                          case "CropBox":
 45759                          case "BleedBox":
 45760                          case "TrimBox":
 45761                          case "ArtBox":
 45762                            s = r.name;
 45763                            break;
 45764                          default:
 45765                            s = "CropBox";
 45766                        }
 45767                      break;
 45768                    case "PrintScaling":
 45769                      if (r instanceof i.Name)
 45770                        switch (r.name) {
 45771                          case "None":
 45772                          case "AppDefault":
 45773                            s = r.name;
 45774                            break;
 45775                          default:
 45776                            s = "AppDefault";
 45777                        }
 45778                      break;
 45779                    case "Duplex":
 45780                      if (r instanceof i.Name)
 45781                        switch (r.name) {
 45782                          case "Simplex":
 45783                          case "DuplexFlipShortEdge":
 45784                          case "DuplexFlipLongEdge":
 45785                            s = r.name;
 45786                            break;
 45787                          default:
 45788                            s = "None";
 45789                        }
 45790                      break;
 45791                    case "PrintPageRange":
 45792                      if (Array.isArray(r) && r.length % 2 == 0) {
 45793                        r.every(
 45794                          (e, t, a) =>
 45795                            Number.isInteger(e) &&
 45796                            e > 0 &&
 45797                            (0 === t || e >= a[t - 1]) &&
 45798                            e <= this.numPages,
 45799                        ) && (s = r);
 45800                      }
 45801                      break;
 45802                    case "NumCopies":
 45803                      Number.isInteger(r) && r > 0 && (s = r);
 45804                      break;
 45805                    default:
 45806                      (0, n.warn)(
 45807                        `Ignoring non-standard key in ViewerPreferences: ${a}.`,
 45808                      );
 45809                      continue;
 45810                  }
 45811                  if (void 0 !== s) {
 45812                    t || (t = Object.create(null));
 45813                    t[a] = s;
 45814                  } else
 45815                    (0, n.warn)(
 45816                      `Bad value, for key "${a}", in ViewerPreferences: ${r}.`,
 45817                    );
 45818                }
 45819                return (0, n.shadow)(this, "viewerPreferences", t);
 45820              }
 45821              get openAction() {
 45822                const e = this._catDict.get("OpenAction"),
 45823                  t = Object.create(null);
 45824                if (e instanceof i.Dict) {
 45825                  const a = new i.Dict(this.xref);
 45826                  a.set("A", e);
 45827                  const r = { url: null, dest: null, action: null };
 45828                  Catalog.parseDestDictionary({ destDict: a, resultObj: r });
 45829                  Array.isArray(r.dest)
 45830                    ? (t.dest = r.dest)
 45831                    : r.action && (t.action = r.action);
 45832                } else Array.isArray(e) && (t.dest = e);
 45833                return (0, n.shadow)(
 45834                  this,
 45835                  "openAction",
 45836                  (0, n.objectSize)(t) > 0 ? t : null,
 45837                );
 45838              }
 45839              get attachments() {
 45840                const e = this._catDict.get("Names");
 45841                let t = null;
 45842                if (e instanceof i.Dict && e.has("EmbeddedFiles")) {
 45843                  const a = new s.NameTree(e.getRaw("EmbeddedFiles"), this.xref);
 45844                  for (const [e, r] of a.getAll()) {
 45845                    const a = new h.FileSpec(r, this.xref);
 45846                    t || (t = Object.create(null));
 45847                    t[(0, n.stringToPDFString)(e)] = a.serializable;
 45848                  }
 45849                }
 45850                return (0, n.shadow)(this, "attachments", t);
 45851              }
 45852              get xfaImages() {
 45853                const e = this._catDict.get("Names");
 45854                let t = null;
 45855                if (e instanceof i.Dict && e.has("XFAImages")) {
 45856                  const a = new s.NameTree(e.getRaw("XFAImages"), this.xref);
 45857                  for (const [e, r] of a.getAll()) {
 45858                    t || (t = new i.Dict(this.xref));
 45859                    t.set((0, n.stringToPDFString)(e), r);
 45860                  }
 45861                }
 45862                return (0, n.shadow)(this, "xfaImages", t);
 45863              }
 45864              _collectJavaScript() {
 45865                const e = this._catDict.get("Names");
 45866                let t = null;
 45867                function appendIfJavaScriptDict(e, a) {
 45868                  if (!(a instanceof i.Dict)) return;
 45869                  if (!(0, i.isName)(a.get("S"), "JavaScript")) return;
 45870                  let r = a.get("JS");
 45871                  if (r instanceof o.BaseStream) r = r.getString();
 45872                  else if ("string" != typeof r) return;
 45873                  r = (0, n.stringToPDFString)(r).replaceAll("\0", "");
 45874                  r && (t ||= new Map()).set(e, r);
 45875                }
 45876                if (e instanceof i.Dict && e.has("JavaScript")) {
 45877                  const t = new s.NameTree(e.getRaw("JavaScript"), this.xref);
 45878                  for (const [e, a] of t.getAll())
 45879                    appendIfJavaScriptDict((0, n.stringToPDFString)(e), a);
 45880                }
 45881                const a = this._catDict.get("OpenAction");
 45882                a && appendIfJavaScriptDict("OpenAction", a);
 45883                return t;
 45884              }
 45885              get jsActions() {
 45886                const e = this._collectJavaScript();
 45887                let t = (0, r.collectActions)(
 45888                  this.xref,
 45889                  this._catDict,
 45890                  n.DocumentActionEventType,
 45891                );
 45892                if (e) {
 45893                  t ||= Object.create(null);
 45894                  for (const [a, r] of e) a in t ? t[a].push(r) : (t[a] = [r]);
 45895                }
 45896                return (0, n.shadow)(this, "jsActions", t);
 45897              }
 45898              async fontFallback(e, t) {
 45899                const a = await Promise.all(this.fontCache);
 45900                for (const r of a)
 45901                  if (r.loadedName === e) {
 45902                    r.fallback(t);
 45903                    return;
 45904                  }
 45905              }
 45906              async cleanup(e = !1) {
 45907                (0, c.clearGlobalCaches)();
 45908                this.globalImageCache.clear(e);
 45909                this.pageKidsCountCache.clear();
 45910                this.pageIndexCache.clear();
 45911                this.nonBlendModesSet.clear();
 45912                const t = await Promise.all(this.fontCache);
 45913                for (const { dict: e } of t) delete e.cacheKey;
 45914                this.fontCache.clear();
 45915                this.builtInCMapCache.clear();
 45916                this.standardFontDataCache.clear();
 45917                this.systemFontCache.clear();
 45918              }
 45919              async getPageDict(e) {
 45920                const t = [this.toplevelPagesDict],
 45921                  a = new i.RefSet(),
 45922                  r = this._catDict.getRaw("Pages");
 45923                r instanceof i.Ref && a.put(r);
 45924                const s = this.xref,
 45925                  o = this.pageKidsCountCache,
 45926                  c = this.pageIndexCache;
 45927                let l = 0;
 45928                for (; t.length; ) {
 45929                  const r = t.pop();
 45930                  if (r instanceof i.Ref) {
 45931                    const h = o.get(r);
 45932                    if (h >= 0 && l + h <= e) {
 45933                      l += h;
 45934                      continue;
 45935                    }
 45936                    if (a.has(r))
 45937                      throw new n.FormatError(
 45938                        "Pages tree contains circular reference.",
 45939                      );
 45940                    a.put(r);
 45941                    const u = await s.fetchAsync(r);
 45942                    if (u instanceof i.Dict) {
 45943                      let t = u.getRaw("Type");
 45944                      t instanceof i.Ref && (t = await s.fetchAsync(t));
 45945                      if ((0, i.isName)(t, "Page") || !u.has("Kids")) {
 45946                        o.has(r) || o.put(r, 1);
 45947                        c.has(r) || c.put(r, l);
 45948                        if (l === e) return [u, r];
 45949                        l++;
 45950                        continue;
 45951                      }
 45952                    }
 45953                    t.push(u);
 45954                    continue;
 45955                  }
 45956                  if (!(r instanceof i.Dict))
 45957                    throw new n.FormatError(
 45958                      "Page dictionary kid reference points to wrong type of object.",
 45959                    );
 45960                  const { objId: h } = r;
 45961                  let u = r.getRaw("Count");
 45962                  u instanceof i.Ref && (u = await s.fetchAsync(u));
 45963                  if (Number.isInteger(u) && u >= 0) {
 45964                    h && !o.has(h) && o.put(h, u);
 45965                    if (l + u <= e) {
 45966                      l += u;
 45967                      continue;
 45968                    }
 45969                  }
 45970                  let d = r.getRaw("Kids");
 45971                  d instanceof i.Ref && (d = await s.fetchAsync(d));
 45972                  if (!Array.isArray(d)) {
 45973                    let t = r.getRaw("Type");
 45974                    t instanceof i.Ref && (t = await s.fetchAsync(t));
 45975                    if ((0, i.isName)(t, "Page") || !r.has("Kids")) {
 45976                      if (l === e) return [r, null];
 45977                      l++;
 45978                      continue;
 45979                    }
 45980                    throw new n.FormatError(
 45981                      "Page dictionary kids object is not an array.",
 45982                    );
 45983                  }
 45984                  for (let e = d.length - 1; e >= 0; e--) t.push(d[e]);
 45985                }
 45986                throw new Error(`Page index ${e} not found.`);
 45987              }
 45988              async getAllPageDicts(e = !1) {
 45989                const { ignoreErrors: t } = this.pdfManager.evaluatorOptions,
 45990                  a = [{ currentNode: this.toplevelPagesDict, posInKids: 0 }],
 45991                  s = new i.RefSet(),
 45992                  o = this._catDict.getRaw("Pages");
 45993                o instanceof i.Ref && s.put(o);
 45994                const c = new Map(),
 45995                  l = this.xref,
 45996                  h = this.pageIndexCache;
 45997                let u = 0;
 45998                function addPageDict(e, t) {
 45999                  t && !h.has(t) && h.put(t, u);
 46000                  c.set(u++, [e, t]);
 46001                }
 46002                function addPageError(a) {
 46003                  if (a instanceof r.XRefEntryException && !e) throw a;
 46004                  if (e && t && 0 === u) {
 46005                    (0, n.warn)(
 46006                      `getAllPageDicts - Skipping invalid first page: "${a}".`,
 46007                    );
 46008                    a = i.Dict.empty;
 46009                  }
 46010                  c.set(u++, [a, null]);
 46011                }
 46012                for (; a.length > 0; ) {
 46013                  const e = a.at(-1),
 46014                    { currentNode: t, posInKids: r } = e;
 46015                  let o = t.getRaw("Kids");
 46016                  if (o instanceof i.Ref)
 46017                    try {
 46018                      o = await l.fetchAsync(o);
 46019                    } catch (e) {
 46020                      addPageError(e);
 46021                      break;
 46022                    }
 46023                  if (!Array.isArray(o)) {
 46024                    addPageError(
 46025                      new n.FormatError(
 46026                        "Page dictionary kids object is not an array.",
 46027                      ),
 46028                    );
 46029                    break;
 46030                  }
 46031                  if (r >= o.length) {
 46032                    a.pop();
 46033                    continue;
 46034                  }
 46035                  const c = o[r];
 46036                  let h;
 46037                  if (c instanceof i.Ref) {
 46038                    if (s.has(c)) {
 46039                      addPageError(
 46040                        new n.FormatError(
 46041                          "Pages tree contains circular reference.",
 46042                        ),
 46043                      );
 46044                      break;
 46045                    }
 46046                    s.put(c);
 46047                    try {
 46048                      h = await l.fetchAsync(c);
 46049                    } catch (e) {
 46050                      addPageError(e);
 46051                      break;
 46052                    }
 46053                  } else h = c;
 46054                  if (!(h instanceof i.Dict)) {
 46055                    addPageError(
 46056                      new n.FormatError(
 46057                        "Page dictionary kid reference points to wrong type of object.",
 46058                      ),
 46059                    );
 46060                    break;
 46061                  }
 46062                  let u = h.getRaw("Type");
 46063                  if (u instanceof i.Ref)
 46064                    try {
 46065                      u = await l.fetchAsync(u);
 46066                    } catch (e) {
 46067                      addPageError(e);
 46068                      break;
 46069                    }
 46070                  (0, i.isName)(u, "Page") || !h.has("Kids")
 46071                    ? addPageDict(h, c instanceof i.Ref ? c : null)
 46072                    : a.push({ currentNode: h, posInKids: 0 });
 46073                  e.posInKids++;
 46074                }
 46075                return c;
 46076              }
 46077              getPageIndex(e) {
 46078                const t = this.pageIndexCache.get(e);
 46079                if (void 0 !== t) return Promise.resolve(t);
 46080                const a = this.xref;
 46081                let r = 0;
 46082                const next = (t) =>
 46083                  (function pagesBeforeRef(t) {
 46084                    let r,
 46085                      s = 0;
 46086                    return a
 46087                      .fetchAsync(t)
 46088                      .then(function (a) {
 46089                        if (
 46090                          (0, i.isRefsEqual)(t, e) &&
 46091                          !(0, i.isDict)(a, "Page") &&
 46092                          !(
 46093                            a instanceof i.Dict &&
 46094                            !a.has("Type") &&
 46095                            a.has("Contents")
 46096                          )
 46097                        )
 46098                          throw new n.FormatError(
 46099                            "The reference does not point to a /Page dictionary.",
 46100                          );
 46101                        if (!a) return null;
 46102                        if (!(a instanceof i.Dict))
 46103                          throw new n.FormatError("Node must be a dictionary.");
 46104                        r = a.getRaw("Parent");
 46105                        return a.getAsync("Parent");
 46106                      })
 46107                      .then(function (e) {
 46108                        if (!e) return null;
 46109                        if (!(e instanceof i.Dict))
 46110                          throw new n.FormatError("Parent must be a dictionary.");
 46111                        return e.getAsync("Kids");
 46112                      })
 46113                      .then(function (e) {
 46114                        if (!e) return null;
 46115                        const o = [];
 46116                        let c = !1;
 46117                        for (const r of e) {
 46118                          if (!(r instanceof i.Ref))
 46119                            throw new n.FormatError("Kid must be a reference.");
 46120                          if ((0, i.isRefsEqual)(r, t)) {
 46121                            c = !0;
 46122                            break;
 46123                          }
 46124                          o.push(
 46125                            a.fetchAsync(r).then(function (e) {
 46126                              if (!(e instanceof i.Dict))
 46127                                throw new n.FormatError(
 46128                                  "Kid node must be a dictionary.",
 46129                                );
 46130                              e.has("Count") ? (s += e.get("Count")) : s++;
 46131                            }),
 46132                          );
 46133                        }
 46134                        if (!c)
 46135                          throw new n.FormatError(
 46136                            "Kid reference not found in parent's kids.",
 46137                          );
 46138                        return Promise.all(o).then(function () {
 46139                          return [s, r];
 46140                        });
 46141                      });
 46142                  })(t).then((t) => {
 46143                    if (!t) {
 46144                      this.pageIndexCache.put(e, r);
 46145                      return r;
 46146                    }
 46147                    const [a, n] = t;
 46148                    r += a;
 46149                    return next(n);
 46150                  });
 46151                return next(e);
 46152              }
 46153              get baseUrl() {
 46154                const e = this._catDict.get("URI");
 46155                if (e instanceof i.Dict) {
 46156                  const t = e.get("Base");
 46157                  if ("string" == typeof t) {
 46158                    const e = (0, n.createValidAbsoluteUrl)(t, null, {
 46159                      tryConvertEncoding: !0,
 46160                    });
 46161                    if (e) return (0, n.shadow)(this, "baseUrl", e.href);
 46162                  }
 46163                }
 46164                return (0, n.shadow)(this, "baseUrl", this.pdfManager.docBaseUrl);
 46165              }
 46166              static parseDestDictionary({
 46167                destDict: e,
 46168                resultObj: t,
 46169                docBaseUrl: a = null,
 46170                docAttachments: s = null,
 46171              }) {
 46172                if (!(e instanceof i.Dict)) {
 46173                  (0, n.warn)(
 46174                    "parseDestDictionary: `destDict` must be a dictionary.",
 46175                  );
 46176                  return;
 46177                }
 46178                let c,
 46179                  l,
 46180                  h = e.get("A");
 46181                if (!(h instanceof i.Dict))
 46182                  if (e.has("Dest")) h = e.get("Dest");
 46183                  else {
 46184                    h = e.get("AA");
 46185                    h instanceof i.Dict &&
 46186                      (h.has("D")
 46187                        ? (h = h.get("D"))
 46188                        : h.has("U") && (h = h.get("U")));
 46189                  }
 46190                if (h instanceof i.Dict) {
 46191                  const e = h.get("S");
 46192                  if (!(e instanceof i.Name)) {
 46193                    (0, n.warn)(
 46194                      "parseDestDictionary: Invalid type in Action dictionary.",
 46195                    );
 46196                    return;
 46197                  }
 46198                  const a = e.name;
 46199                  switch (a) {
 46200                    case "ResetForm":
 46201                      const e = h.get("Flags"),
 46202                        u = 0 == (1 & ("number" == typeof e ? e : 0)),
 46203                        d = [],
 46204                        f = [];
 46205                      for (const e of h.get("Fields") || [])
 46206                        e instanceof i.Ref
 46207                          ? f.push(e.toString())
 46208                          : "string" == typeof e &&
 46209                            d.push((0, n.stringToPDFString)(e));
 46210                      t.resetForm = { fields: d, refs: f, include: u };
 46211                      break;
 46212                    case "URI":
 46213                      c = h.get("URI");
 46214                      c instanceof i.Name && (c = "/" + c.name);
 46215                      break;
 46216                    case "GoTo":
 46217                      l = h.get("D");
 46218                      break;
 46219                    case "Launch":
 46220                    case "GoToR":
 46221                      const g = h.get("F");
 46222                      g instanceof i.Dict
 46223                        ? (c = g.get("F") || null)
 46224                        : "string" == typeof g && (c = g);
 46225                      let p = h.get("D");
 46226                      if (p) {
 46227                        p instanceof i.Name && (p = p.name);
 46228                        if ("string" == typeof c) {
 46229                          const e = c.split("#")[0];
 46230                          "string" == typeof p
 46231                            ? (c = e + "#" + p)
 46232                            : Array.isArray(p) &&
 46233                              (c = e + "#" + JSON.stringify(p));
 46234                        }
 46235                      }
 46236                      const m = h.get("NewWindow");
 46237                      "boolean" == typeof m && (t.newWindow = m);
 46238                      break;
 46239                    case "GoToE":
 46240                      const b = h.get("T");
 46241                      let y;
 46242                      if (s && b instanceof i.Dict) {
 46243                        const e = b.get("R"),
 46244                          t = b.get("N");
 46245                        (0, i.isName)(e, "C") &&
 46246                          "string" == typeof t &&
 46247                          (y = s[(0, n.stringToPDFString)(t)]);
 46248                      }
 46249                      y
 46250                        ? (t.attachment = y)
 46251                        : (0, n.warn)(
 46252                            'parseDestDictionary - unimplemented "GoToE" action.',
 46253                          );
 46254                      break;
 46255                    case "Named":
 46256                      const w = h.get("N");
 46257                      w instanceof i.Name && (t.action = w.name);
 46258                      break;
 46259                    case "SetOCGState":
 46260                      const S = h.get("State"),
 46261                        x = h.get("PreserveRB");
 46262                      if (!Array.isArray(S) || 0 === S.length) break;
 46263                      const C = [];
 46264                      for (const e of S)
 46265                        if (e instanceof i.Name)
 46266                          switch (e.name) {
 46267                            case "ON":
 46268                            case "OFF":
 46269                            case "Toggle":
 46270                              C.push(e.name);
 46271                          }
 46272                        else e instanceof i.Ref && C.push(e.toString());
 46273                      if (C.length !== S.length) break;
 46274                      t.setOCGState = {
 46275                        state: C,
 46276                        preserveRB: "boolean" != typeof x || x,
 46277                      };
 46278                      break;
 46279                    case "JavaScript":
 46280                      const k = h.get("JS");
 46281                      let v;
 46282                      k instanceof o.BaseStream
 46283                        ? (v = k.getString())
 46284                        : "string" == typeof k && (v = k);
 46285                      const F =
 46286                        v && (0, r.recoverJsURL)((0, n.stringToPDFString)(v));
 46287                      if (F) {
 46288                        c = F.url;
 46289                        t.newWindow = F.newWindow;
 46290                        break;
 46291                      }
 46292                    default:
 46293                      if ("JavaScript" === a || "SubmitForm" === a) break;
 46294                      (0, n.warn)(
 46295                        `parseDestDictionary - unsupported action: "${a}".`,
 46296                      );
 46297                  }
 46298                } else e.has("Dest") && (l = e.get("Dest"));
 46299                if ("string" == typeof c) {
 46300                  const e = (0, n.createValidAbsoluteUrl)(c, a, {
 46301                    addDefaultProtocol: !0,
 46302                    tryConvertEncoding: !0,
 46303                  });
 46304                  e && (t.url = e.href);
 46305                  t.unsafeUrl = c;
 46306                }
 46307                if (l) {
 46308                  l instanceof i.Name && (l = l.name);
 46309                  "string" == typeof l
 46310                    ? (t.dest = (0, n.stringToPDFString)(l))
 46311                    : Array.isArray(l) && (t.dest = l);
 46312                }
 46313              }
 46314            }
 46315            t.Catalog = Catalog;
 46316          },
 46317          (e, t, a) => {
 46318            Object.defineProperty(t, "__esModule", { value: !0 });
 46319            t.NumberTree = t.NameTree = void 0;
 46320            var r = a(4),
 46321              n = a(2);
 46322            class NameOrNumberTree {
 46323              constructor(e, t, a) {
 46324                this.constructor === NameOrNumberTree &&
 46325                  (0, n.unreachable)("Cannot initialize NameOrNumberTree.");
 46326                this.root = e;
 46327                this.xref = t;
 46328                this._type = a;
 46329              }
 46330              getAll() {
 46331                const e = new Map();
 46332                if (!this.root) return e;
 46333                const t = this.xref,
 46334                  a = new r.RefSet();
 46335                a.put(this.root);
 46336                const i = [this.root];
 46337                for (; i.length > 0; ) {
 46338                  const s = t.fetchIfRef(i.shift());
 46339                  if (!(s instanceof r.Dict)) continue;
 46340                  if (s.has("Kids")) {
 46341                    const e = s.get("Kids");
 46342                    if (!Array.isArray(e)) continue;
 46343                    for (const t of e) {
 46344                      if (a.has(t))
 46345                        throw new n.FormatError(
 46346                          `Duplicate entry in "${this._type}" tree.`,
 46347                        );
 46348                      i.push(t);
 46349                      a.put(t);
 46350                    }
 46351                    continue;
 46352                  }
 46353                  const o = s.get(this._type);
 46354                  if (Array.isArray(o))
 46355                    for (let a = 0, r = o.length; a < r; a += 2)
 46356                      e.set(t.fetchIfRef(o[a]), t.fetchIfRef(o[a + 1]));
 46357                }
 46358                return e;
 46359              }
 46360              get(e) {
 46361                if (!this.root) return null;
 46362                const t = this.xref;
 46363                let a = t.fetchIfRef(this.root),
 46364                  r = 0;
 46365                for (; a.has("Kids"); ) {
 46366                  if (++r > 10) {
 46367                    (0, n.warn)(
 46368                      `Search depth limit reached for "${this._type}" tree.`,
 46369                    );
 46370                    return null;
 46371                  }
 46372                  const i = a.get("Kids");
 46373                  if (!Array.isArray(i)) return null;
 46374                  let s = 0,
 46375                    o = i.length - 1;
 46376                  for (; s <= o; ) {
 46377                    const r = (s + o) >> 1,
 46378                      n = t.fetchIfRef(i[r]),
 46379                      c = n.get("Limits");
 46380                    if (e < t.fetchIfRef(c[0])) o = r - 1;
 46381                    else {
 46382                      if (!(e > t.fetchIfRef(c[1]))) {
 46383                        a = n;
 46384                        break;
 46385                      }
 46386                      s = r + 1;
 46387                    }
 46388                  }
 46389                  if (s > o) return null;
 46390                }
 46391                const i = a.get(this._type);
 46392                if (Array.isArray(i)) {
 46393                  let a = 0,
 46394                    r = i.length - 2;
 46395                  for (; a <= r; ) {
 46396                    const n = (a + r) >> 1,
 46397                      s = n + (1 & n),
 46398                      o = t.fetchIfRef(i[s]);
 46399                    if (e < o) r = s - 2;
 46400                    else {
 46401                      if (!(e > o)) return t.fetchIfRef(i[s + 1]);
 46402                      a = s + 2;
 46403                    }
 46404                  }
 46405                }
 46406                return null;
 46407              }
 46408            }
 46409            t.NameTree = class NameTree extends NameOrNumberTree {
 46410              constructor(e, t) {
 46411                super(e, t, "Names");
 46412              }
 46413            };
 46414            t.NumberTree = class NumberTree extends NameOrNumberTree {
 46415              constructor(e, t) {
 46416                super(e, t, "Nums");
 46417              }
 46418            };
 46419          },
 46420          (e, t, a) => {
 46421            Object.defineProperty(t, "__esModule", { value: !0 });
 46422            t.clearGlobalCaches = function clearGlobalCaches() {
 46423              (0, r.clearPatternCaches)();
 46424              (0, n.clearPrimitiveCaches)();
 46425              (0, i.clearUnicodeCaches)();
 46426            };
 46427            var r = a(50),
 46428              n = a(4),
 46429              i = a(40);
 46430          },
 46431          (e, t, a) => {
 46432            Object.defineProperty(t, "__esModule", { value: !0 });
 46433            t.FileSpec = void 0;
 46434            var r = a(2),
 46435              n = a(5),
 46436              i = a(4);
 46437            function pickPlatformItem(e) {
 46438              return e.has("UF")
 46439                ? e.get("UF")
 46440                : e.has("F")
 46441                  ? e.get("F")
 46442                  : e.has("Unix")
 46443                    ? e.get("Unix")
 46444                    : e.has("Mac")
 46445                      ? e.get("Mac")
 46446                      : e.has("DOS")
 46447                        ? e.get("DOS")
 46448                        : null;
 46449            }
 46450            t.FileSpec = class FileSpec {
 46451              constructor(e, t) {
 46452                if (e instanceof i.Dict) {
 46453                  this.xref = t;
 46454                  this.root = e;
 46455                  e.has("FS") && (this.fs = e.get("FS"));
 46456                  this.description = e.has("Desc")
 46457                    ? (0, r.stringToPDFString)(e.get("Desc"))
 46458                    : "";
 46459                  e.has("RF") &&
 46460                    (0, r.warn)("Related file specifications are not supported");
 46461                  this.contentAvailable = !0;
 46462                  if (!e.has("EF")) {
 46463                    this.contentAvailable = !1;
 46464                    (0, r.warn)(
 46465                      "Non-embedded file specifications are not supported",
 46466                    );
 46467                  }
 46468                }
 46469              }
 46470              get filename() {
 46471                if (!this._filename && this.root) {
 46472                  const e = pickPlatformItem(this.root) || "unnamed";
 46473                  this._filename = (0, r.stringToPDFString)(e)
 46474                    .replaceAll("\\\\", "\\")
 46475                    .replaceAll("\\/", "/")
 46476                    .replaceAll("\\", "/");
 46477                }
 46478                return this._filename;
 46479              }
 46480              get content() {
 46481                if (!this.contentAvailable) return null;
 46482                !this.contentRef &&
 46483                  this.root &&
 46484                  (this.contentRef = pickPlatformItem(this.root.get("EF")));
 46485                let e = null;
 46486                if (this.contentRef) {
 46487                  const t = this.xref.fetchIfRef(this.contentRef);
 46488                  t instanceof n.BaseStream
 46489                    ? (e = t.getBytes())
 46490                    : (0, r.warn)(
 46491                        "Embedded file specification points to non-existing/invalid content",
 46492                      );
 46493                } else
 46494                  (0, r.warn)(
 46495                    "Embedded file specification does not have a content",
 46496                  );
 46497                return e;
 46498              }
 46499              get serializable() {
 46500                return { filename: this.filename, content: this.content };
 46501              }
 46502            };
 46503          },
 46504          (e, t, a) => {
 46505            Object.defineProperty(t, "__esModule", { value: !0 });
 46506            t.MetadataParser = void 0;
 46507            var r = a(71);
 46508            t.MetadataParser = class MetadataParser {
 46509              constructor(e) {
 46510                e = this._repair(e);
 46511                const t = new r.SimpleXMLParser({
 46512                  lowerCaseName: !0,
 46513                }).parseFromString(e);
 46514                this._metadataMap = new Map();
 46515                this._data = e;
 46516                t && this._parse(t);
 46517              }
 46518              _repair(e) {
 46519                return e
 46520                  .replace(/^[^<]+/, "")
 46521                  .replaceAll(/>\\376\\377([^<]+)/g, function (e, t) {
 46522                    const a = t
 46523                        .replaceAll(
 46524                          /\\([0-3])([0-7])([0-7])/g,
 46525                          function (e, t, a, r) {
 46526                            return String.fromCharCode(64 * t + 8 * a + 1 * r);
 46527                          },
 46528                        )
 46529                        .replaceAll(/&(amp|apos|gt|lt|quot);/g, function (e, t) {
 46530                          switch (t) {
 46531                            case "amp":
 46532                              return "&";
 46533                            case "apos":
 46534                              return "'";
 46535                            case "gt":
 46536                              return ">";
 46537                            case "lt":
 46538                              return "<";
 46539                            case "quot":
 46540                              return '"';
 46541                          }
 46542                          throw new Error(`_repair: ${t} isn't defined.`);
 46543                        }),
 46544                      r = [">"];
 46545                    for (let e = 0, t = a.length; e < t; e += 2) {
 46546                      const t = 256 * a.charCodeAt(e) + a.charCodeAt(e + 1);
 46547                      t >= 32 && t < 127 && 60 !== t && 62 !== t && 38 !== t
 46548                        ? r.push(String.fromCharCode(t))
 46549                        : r.push(
 46550                            "&#x" + (65536 + t).toString(16).substring(1) + ";",
 46551                          );
 46552                    }
 46553                    return r.join("");
 46554                  });
 46555              }
 46556              _getSequence(e) {
 46557                const t = e.nodeName;
 46558                return "rdf:bag" !== t && "rdf:seq" !== t && "rdf:alt" !== t
 46559                  ? null
 46560                  : e.childNodes.filter((e) => "rdf:li" === e.nodeName);
 46561              }
 46562              _parseArray(e) {
 46563                if (!e.hasChildNodes()) return;
 46564                const [t] = e.childNodes,
 46565                  a = this._getSequence(t) || [];
 46566                this._metadataMap.set(
 46567                  e.nodeName,
 46568                  a.map((e) => e.textContent.trim()),
 46569                );
 46570              }
 46571              _parse(e) {
 46572                let t = e.documentElement;
 46573                if ("rdf:rdf" !== t.nodeName) {
 46574                  t = t.firstChild;
 46575                  for (; t && "rdf:rdf" !== t.nodeName; ) t = t.nextSibling;
 46576                }
 46577                if (t && "rdf:rdf" === t.nodeName && t.hasChildNodes())
 46578                  for (const e of t.childNodes)
 46579                    if ("rdf:description" === e.nodeName)
 46580                      for (const t of e.childNodes) {
 46581                        const e = t.nodeName;
 46582                        switch (e) {
 46583                          case "#text":
 46584                            continue;
 46585                          case "dc:creator":
 46586                          case "dc:subject":
 46587                            this._parseArray(t);
 46588                            continue;
 46589                        }
 46590                        this._metadataMap.set(e, t.textContent.trim());
 46591                      }
 46592              }
 46593              get serializable() {
 46594                return { parsedData: this._metadataMap, rawData: this._data };
 46595              }
 46596            };
 46597          },
 46598          (e, t, a) => {
 46599            Object.defineProperty(t, "__esModule", { value: !0 });
 46600            t.XMLParserErrorCode =
 46601              t.XMLParserBase =
 46602              t.SimpleXMLParser =
 46603              t.SimpleDOMNode =
 46604                void 0;
 46605            var r = a(3);
 46606            const n = {
 46607              NoError: 0,
 46608              EndOfDocument: -1,
 46609              UnterminatedCdat: -2,
 46610              UnterminatedXmlDeclaration: -3,
 46611              UnterminatedDoctypeDeclaration: -4,
 46612              UnterminatedComment: -5,
 46613              MalformedElement: -6,
 46614              OutOfMemory: -7,
 46615              UnterminatedAttributeValue: -8,
 46616              UnterminatedElement: -9,
 46617              ElementNeverBegun: -10,
 46618            };
 46619            t.XMLParserErrorCode = n;
 46620            function isWhitespace(e, t) {
 46621              const a = e[t];
 46622              return " " === a || "\n" === a || "\r" === a || "\t" === a;
 46623            }
 46624            class XMLParserBase {
 46625              _resolveEntities(e) {
 46626                return e.replaceAll(/&([^;]+);/g, (e, t) => {
 46627                  if ("#x" === t.substring(0, 2))
 46628                    return String.fromCodePoint(parseInt(t.substring(2), 16));
 46629                  if ("#" === t.substring(0, 1))
 46630                    return String.fromCodePoint(parseInt(t.substring(1), 10));
 46631                  switch (t) {
 46632                    case "lt":
 46633                      return "<";
 46634                    case "gt":
 46635                      return ">";
 46636                    case "amp":
 46637                      return "&";
 46638                    case "quot":
 46639                      return '"';
 46640                    case "apos":
 46641                      return "'";
 46642                  }
 46643                  return this.onResolveEntity(t);
 46644                });
 46645              }
 46646              _parseContent(e, t) {
 46647                const a = [];
 46648                let r = t;
 46649                function skipWs() {
 46650                  for (; r < e.length && isWhitespace(e, r); ) ++r;
 46651                }
 46652                for (
 46653                  ;
 46654                  r < e.length &&
 46655                  !isWhitespace(e, r) &&
 46656                  ">" !== e[r] &&
 46657                  "/" !== e[r];
 46658  
 46659                )
 46660                  ++r;
 46661                const n = e.substring(t, r);
 46662                skipWs();
 46663                for (
 46664                  ;
 46665                  r < e.length && ">" !== e[r] && "/" !== e[r] && "?" !== e[r];
 46666  
 46667                ) {
 46668                  skipWs();
 46669                  let t = "",
 46670                    n = "";
 46671                  for (; r < e.length && !isWhitespace(e, r) && "=" !== e[r]; ) {
 46672                    t += e[r];
 46673                    ++r;
 46674                  }
 46675                  skipWs();
 46676                  if ("=" !== e[r]) return null;
 46677                  ++r;
 46678                  skipWs();
 46679                  const i = e[r];
 46680                  if ('"' !== i && "'" !== i) return null;
 46681                  const s = e.indexOf(i, ++r);
 46682                  if (s < 0) return null;
 46683                  n = e.substring(r, s);
 46684                  a.push({ name: t, value: this._resolveEntities(n) });
 46685                  r = s + 1;
 46686                  skipWs();
 46687                }
 46688                return { name: n, attributes: a, parsed: r - t };
 46689              }
 46690              _parseProcessingInstruction(e, t) {
 46691                let a = t;
 46692                for (
 46693                  ;
 46694                  a < e.length &&
 46695                  !isWhitespace(e, a) &&
 46696                  ">" !== e[a] &&
 46697                  "?" !== e[a] &&
 46698                  "/" !== e[a];
 46699  
 46700                )
 46701                  ++a;
 46702                const r = e.substring(t, a);
 46703                !(function skipWs() {
 46704                  for (; a < e.length && isWhitespace(e, a); ) ++a;
 46705                })();
 46706                const n = a;
 46707                for (; a < e.length && ("?" !== e[a] || ">" !== e[a + 1]); ) ++a;
 46708                return { name: r, value: e.substring(n, a), parsed: a - t };
 46709              }
 46710              parseXml(e) {
 46711                let t = 0;
 46712                for (; t < e.length; ) {
 46713                  let a = t;
 46714                  if ("<" === e[t]) {
 46715                    ++a;
 46716                    let t;
 46717                    switch (e[a]) {
 46718                      case "/":
 46719                        ++a;
 46720                        t = e.indexOf(">", a);
 46721                        if (t < 0) {
 46722                          this.onError(n.UnterminatedElement);
 46723                          return;
 46724                        }
 46725                        this.onEndElement(e.substring(a, t));
 46726                        a = t + 1;
 46727                        break;
 46728                      case "?":
 46729                        ++a;
 46730                        const r = this._parseProcessingInstruction(e, a);
 46731                        if (
 46732                          "?>" !== e.substring(a + r.parsed, a + r.parsed + 2)
 46733                        ) {
 46734                          this.onError(n.UnterminatedXmlDeclaration);
 46735                          return;
 46736                        }
 46737                        this.onPi(r.name, r.value);
 46738                        a += r.parsed + 2;
 46739                        break;
 46740                      case "!":
 46741                        if ("--" === e.substring(a + 1, a + 3)) {
 46742                          t = e.indexOf("--\x3e", a + 3);
 46743                          if (t < 0) {
 46744                            this.onError(n.UnterminatedComment);
 46745                            return;
 46746                          }
 46747                          this.onComment(e.substring(a + 3, t));
 46748                          a = t + 3;
 46749                        } else if ("[CDATA[" === e.substring(a + 1, a + 8)) {
 46750                          t = e.indexOf("]]>", a + 8);
 46751                          if (t < 0) {
 46752                            this.onError(n.UnterminatedCdat);
 46753                            return;
 46754                          }
 46755                          this.onCdata(e.substring(a + 8, t));
 46756                          a = t + 3;
 46757                        } else {
 46758                          if ("DOCTYPE" !== e.substring(a + 1, a + 8)) {
 46759                            this.onError(n.MalformedElement);
 46760                            return;
 46761                          }
 46762                          {
 46763                            const r = e.indexOf("[", a + 8);
 46764                            let i = !1;
 46765                            t = e.indexOf(">", a + 8);
 46766                            if (t < 0) {
 46767                              this.onError(n.UnterminatedDoctypeDeclaration);
 46768                              return;
 46769                            }
 46770                            if (r > 0 && t > r) {
 46771                              t = e.indexOf("]>", a + 8);
 46772                              if (t < 0) {
 46773                                this.onError(n.UnterminatedDoctypeDeclaration);
 46774                                return;
 46775                              }
 46776                              i = !0;
 46777                            }
 46778                            const s = e.substring(a + 8, t + (i ? 1 : 0));
 46779                            this.onDoctype(s);
 46780                            a = t + (i ? 2 : 1);
 46781                          }
 46782                        }
 46783                        break;
 46784                      default:
 46785                        const i = this._parseContent(e, a);
 46786                        if (null === i) {
 46787                          this.onError(n.MalformedElement);
 46788                          return;
 46789                        }
 46790                        let s = !1;
 46791                        if ("/>" === e.substring(a + i.parsed, a + i.parsed + 2))
 46792                          s = !0;
 46793                        else if (
 46794                          ">" !== e.substring(a + i.parsed, a + i.parsed + 1)
 46795                        ) {
 46796                          this.onError(n.UnterminatedElement);
 46797                          return;
 46798                        }
 46799                        this.onBeginElement(i.name, i.attributes, s);
 46800                        a += i.parsed + (s ? 2 : 1);
 46801                    }
 46802                  } else {
 46803                    for (; a < e.length && "<" !== e[a]; ) a++;
 46804                    const r = e.substring(t, a);
 46805                    this.onText(this._resolveEntities(r));
 46806                  }
 46807                  t = a;
 46808                }
 46809              }
 46810              onResolveEntity(e) {
 46811                return `&${e};`;
 46812              }
 46813              onPi(e, t) {}
 46814              onComment(e) {}
 46815              onCdata(e) {}
 46816              onDoctype(e) {}
 46817              onText(e) {}
 46818              onBeginElement(e, t, a) {}
 46819              onEndElement(e) {}
 46820              onError(e) {}
 46821            }
 46822            t.XMLParserBase = XMLParserBase;
 46823            class SimpleDOMNode {
 46824              constructor(e, t) {
 46825                this.nodeName = e;
 46826                this.nodeValue = t;
 46827                Object.defineProperty(this, "parentNode", {
 46828                  value: null,
 46829                  writable: !0,
 46830                });
 46831              }
 46832              get firstChild() {
 46833                return this.childNodes?.[0];
 46834              }
 46835              get nextSibling() {
 46836                const e = this.parentNode.childNodes;
 46837                if (!e) return;
 46838                const t = e.indexOf(this);
 46839                return -1 !== t ? e[t + 1] : void 0;
 46840              }
 46841              get textContent() {
 46842                return this.childNodes
 46843                  ? this.childNodes
 46844                      .map(function (e) {
 46845                        return e.textContent;
 46846                      })
 46847                      .join("")
 46848                  : this.nodeValue || "";
 46849              }
 46850              get children() {
 46851                return this.childNodes || [];
 46852              }
 46853              hasChildNodes() {
 46854                return this.childNodes?.length > 0;
 46855              }
 46856              searchNode(e, t) {
 46857                if (t >= e.length) return this;
 46858                const a = e[t];
 46859                if (a.name.startsWith("#") && t < e.length - 1)
 46860                  return this.searchNode(e, t + 1);
 46861                const r = [];
 46862                let n = this;
 46863                for (;;) {
 46864                  if (a.name === n.nodeName) {
 46865                    if (0 !== a.pos) {
 46866                      if (0 === r.length) return null;
 46867                      {
 46868                        const [i] = r.pop();
 46869                        let s = 0;
 46870                        for (const r of i.childNodes)
 46871                          if (a.name === r.nodeName) {
 46872                            if (s === a.pos) return r.searchNode(e, t + 1);
 46873                            s++;
 46874                          }
 46875                        return n.searchNode(e, t + 1);
 46876                      }
 46877                    }
 46878                    {
 46879                      const a = n.searchNode(e, t + 1);
 46880                      if (null !== a) return a;
 46881                    }
 46882                  }
 46883                  if (n.childNodes?.length > 0) {
 46884                    r.push([n, 0]);
 46885                    n = n.childNodes[0];
 46886                  } else {
 46887                    if (0 === r.length) return null;
 46888                    for (; 0 !== r.length; ) {
 46889                      const [e, t] = r.pop(),
 46890                        a = t + 1;
 46891                      if (a < e.childNodes.length) {
 46892                        r.push([e, a]);
 46893                        n = e.childNodes[a];
 46894                        break;
 46895                      }
 46896                    }
 46897                    if (0 === r.length) return null;
 46898                  }
 46899                }
 46900              }
 46901              dump(e) {
 46902                if ("#text" !== this.nodeName) {
 46903                  e.push(`<${this.nodeName}`);
 46904                  if (this.attributes)
 46905                    for (const t of this.attributes)
 46906                      e.push(` ${t.name}="${(0, r.encodeToXmlString)(t.value)}"`);
 46907                  if (this.hasChildNodes()) {
 46908                    e.push(">");
 46909                    for (const t of this.childNodes) t.dump(e);
 46910                    e.push(`</${this.nodeName}>`);
 46911                  } else
 46912                    this.nodeValue
 46913                      ? e.push(
 46914                          `>${(0, r.encodeToXmlString)(this.nodeValue)}</${
 46915                            this.nodeName
 46916                          }>`,
 46917                        )
 46918                      : e.push("/>");
 46919                } else e.push((0, r.encodeToXmlString)(this.nodeValue));
 46920              }
 46921            }
 46922            t.SimpleDOMNode = SimpleDOMNode;
 46923            t.SimpleXMLParser = class SimpleXMLParser extends XMLParserBase {
 46924              constructor({ hasAttributes: e = !1, lowerCaseName: t = !1 }) {
 46925                super();
 46926                this._currentFragment = null;
 46927                this._stack = null;
 46928                this._errorCode = n.NoError;
 46929                this._hasAttributes = e;
 46930                this._lowerCaseName = t;
 46931              }
 46932              parseFromString(e) {
 46933                this._currentFragment = [];
 46934                this._stack = [];
 46935                this._errorCode = n.NoError;
 46936                this.parseXml(e);
 46937                if (this._errorCode !== n.NoError) return;
 46938                const [t] = this._currentFragment;
 46939                return t ? { documentElement: t } : void 0;
 46940              }
 46941              onText(e) {
 46942                if (
 46943                  (function isWhitespaceString(e) {
 46944                    for (let t = 0, a = e.length; t < a; t++)
 46945                      if (!isWhitespace(e, t)) return !1;
 46946                    return !0;
 46947                  })(e)
 46948                )
 46949                  return;
 46950                const t = new SimpleDOMNode("#text", e);
 46951                this._currentFragment.push(t);
 46952              }
 46953              onCdata(e) {
 46954                const t = new SimpleDOMNode("#text", e);
 46955                this._currentFragment.push(t);
 46956              }
 46957              onBeginElement(e, t, a) {
 46958                this._lowerCaseName && (e = e.toLowerCase());
 46959                const r = new SimpleDOMNode(e);
 46960                r.childNodes = [];
 46961                this._hasAttributes && (r.attributes = t);
 46962                this._currentFragment.push(r);
 46963                if (!a) {
 46964                  this._stack.push(this._currentFragment);
 46965                  this._currentFragment = r.childNodes;
 46966                }
 46967              }
 46968              onEndElement(e) {
 46969                this._currentFragment = this._stack.pop() || [];
 46970                const t = this._currentFragment.at(-1);
 46971                if (!t) return null;
 46972                for (const e of t.childNodes) e.parentNode = t;
 46973                return t;
 46974              }
 46975              onError(e) {
 46976                this._errorCode = e;
 46977              }
 46978            };
 46979          },
 46980          (e, t, a) => {
 46981            Object.defineProperty(t, "__esModule", { value: !0 });
 46982            t.StructTreeRoot = t.StructTreePage = void 0;
 46983            var r = a(2),
 46984              n = a(4),
 46985              i = a(67),
 46986              s = a(73);
 46987            const o = 1,
 46988              c = 2,
 46989              l = 3,
 46990              h = 4,
 46991              u = 5;
 46992            class StructTreeRoot {
 46993              constructor(e, t) {
 46994                this.dict = e;
 46995                this.ref = t instanceof n.Ref ? t : null;
 46996                this.roleMap = new Map();
 46997                this.structParentIds = null;
 46998              }
 46999              init() {
 47000                this.readRoleMap();
 47001              }
 47002              #C(e, t, a) {
 47003                if (!(e instanceof n.Ref) || t < 0) return;
 47004                this.structParentIds ||= new n.RefSetCache();
 47005                let r = this.structParentIds.get(e);
 47006                if (!r) {
 47007                  r = [];
 47008                  this.structParentIds.put(e, r);
 47009                }
 47010                r.push([t, a]);
 47011              }
 47012              addAnnotationIdToPage(e, t) {
 47013                this.#C(e, t, h);
 47014              }
 47015              readRoleMap() {
 47016                const e = this.dict.get("RoleMap");
 47017                e instanceof n.Dict &&
 47018                  e.forEach((e, t) => {
 47019                    t instanceof n.Name && this.roleMap.set(e, t.name);
 47020                  });
 47021              }
 47022              static async canCreateStructureTree({
 47023                catalogRef: e,
 47024                pdfManager: t,
 47025                newAnnotationsByPage: a,
 47026              }) {
 47027                if (!(e instanceof n.Ref)) {
 47028                  (0, r.warn)(
 47029                    "Cannot save the struct tree: no catalog reference.",
 47030                  );
 47031                  return !1;
 47032                }
 47033                let i = 0,
 47034                  s = !0;
 47035                for (const [e, o] of a) {
 47036                  const { ref: a } = await t.getPage(e);
 47037                  if (!(a instanceof n.Ref)) {
 47038                    (0, r.warn)(
 47039                      `Cannot save the struct tree: page ${e} has no ref.`,
 47040                    );
 47041                    s = !0;
 47042                    break;
 47043                  }
 47044                  for (const e of o)
 47045                    if (e.accessibilityData?.type) {
 47046                      e.parentTreeId = i++;
 47047                      s = !1;
 47048                    }
 47049                }
 47050                if (s) {
 47051                  for (const e of a.values())
 47052                    for (const t of e) delete t.parentTreeId;
 47053                  return !1;
 47054                }
 47055                return !0;
 47056              }
 47057              static async createStructureTree({
 47058                newAnnotationsByPage: e,
 47059                xref: t,
 47060                catalogRef: a,
 47061                pdfManager: r,
 47062                newRefs: i,
 47063              }) {
 47064                const o = r.catalog.cloneDict(),
 47065                  c = t.getNewTemporaryRef();
 47066                o.set("StructTreeRoot", c);
 47067                const l = [];
 47068                await (0, s.writeObject)(a, o, l, t);
 47069                i.push({ ref: a, data: l.join("") });
 47070                const h = new n.Dict(t);
 47071                h.set("Type", n.Name.get("StructTreeRoot"));
 47072                const u = t.getNewTemporaryRef();
 47073                h.set("ParentTree", u);
 47074                const d = [];
 47075                h.set("K", d);
 47076                const f = new n.Dict(t),
 47077                  g = [];
 47078                f.set("Nums", g);
 47079                const p = await this.#k({
 47080                  newAnnotationsByPage: e,
 47081                  structTreeRootRef: c,
 47082                  kids: d,
 47083                  nums: g,
 47084                  xref: t,
 47085                  pdfManager: r,
 47086                  newRefs: i,
 47087                  buffer: l,
 47088                });
 47089                h.set("ParentTreeNextKey", p);
 47090                l.length = 0;
 47091                await (0, s.writeObject)(u, f, l, t);
 47092                i.push({ ref: u, data: l.join("") });
 47093                l.length = 0;
 47094                await (0, s.writeObject)(c, h, l, t);
 47095                i.push({ ref: c, data: l.join("") });
 47096              }
 47097              async canUpdateStructTree({
 47098                pdfManager: e,
 47099                newAnnotationsByPage: t,
 47100              }) {
 47101                if (!this.ref) {
 47102                  (0, r.warn)(
 47103                    "Cannot update the struct tree: no root reference.",
 47104                  );
 47105                  return !1;
 47106                }
 47107                let a = this.dict.get("ParentTreeNextKey");
 47108                if (!Number.isInteger(a) || a < 0) {
 47109                  (0, r.warn)("Cannot update the struct tree: invalid next key.");
 47110                  return !1;
 47111                }
 47112                const i = this.dict.get("ParentTree");
 47113                if (!(i instanceof n.Dict)) {
 47114                  (0, r.warn)(
 47115                    "Cannot update the struct tree: ParentTree isn't a dict.",
 47116                  );
 47117                  return !1;
 47118                }
 47119                const s = i.get("Nums");
 47120                if (!Array.isArray(s)) {
 47121                  (0, r.warn)(
 47122                    "Cannot update the struct tree: nums isn't an array.",
 47123                  );
 47124                  return !1;
 47125                }
 47126                const { numPages: o } = e.catalog;
 47127                for (const a of t.keys()) {
 47128                  const { pageDict: t, ref: i } = await e.getPage(a);
 47129                  if (!(i instanceof n.Ref)) {
 47130                    (0, r.warn)(
 47131                      `Cannot save the struct tree: page ${a} has no ref.`,
 47132                    );
 47133                    return !1;
 47134                  }
 47135                  const s = t.get("StructParents");
 47136                  if (!Number.isInteger(s) || s < 0 || s >= o) {
 47137                    (0, r.warn)(
 47138                      `Cannot save the struct tree: page ${a} has no id.`,
 47139                    );
 47140                    return !1;
 47141                  }
 47142                }
 47143                let c = !0;
 47144                for (const [r, n] of t) {
 47145                  const { pageDict: t } = await e.getPage(r);
 47146                  StructTreeRoot.#v({
 47147                    elements: n,
 47148                    xref: this.dict.xref,
 47149                    pageDict: t,
 47150                    parentTree: i,
 47151                  });
 47152                  for (const e of n)
 47153                    if (e.accessibilityData?.type) {
 47154                      e.parentTreeId = a++;
 47155                      c = !1;
 47156                    }
 47157                }
 47158                if (c) {
 47159                  for (const e of t.values())
 47160                    for (const t of e) {
 47161                      delete t.parentTreeId;
 47162                      delete t.structTreeParent;
 47163                    }
 47164                  return !1;
 47165                }
 47166                return !0;
 47167              }
 47168              async updateStructureTree({
 47169                newAnnotationsByPage: e,
 47170                pdfManager: t,
 47171                newRefs: a,
 47172              }) {
 47173                const r = this.dict.xref,
 47174                  i = this.dict.clone(),
 47175                  o = this.ref;
 47176                let c,
 47177                  l = i.getRaw("ParentTree");
 47178                if (l instanceof n.Ref) c = r.fetch(l);
 47179                else {
 47180                  c = l;
 47181                  l = r.getNewTemporaryRef();
 47182                  i.set("ParentTree", l);
 47183                }
 47184                c = c.clone();
 47185                let h = c.getRaw("Nums"),
 47186                  u = null;
 47187                if (h instanceof n.Ref) {
 47188                  u = h;
 47189                  h = r.fetch(u);
 47190                }
 47191                h = h.slice();
 47192                u || c.set("Nums", h);
 47193                let d = i.getRaw("K"),
 47194                  f = null;
 47195                if (d instanceof n.Ref) {
 47196                  f = d;
 47197                  d = r.fetch(f);
 47198                } else {
 47199                  f = r.getNewTemporaryRef();
 47200                  i.set("K", f);
 47201                }
 47202                d = Array.isArray(d) ? d.slice() : [d];
 47203                const g = [],
 47204                  p = await StructTreeRoot.#k({
 47205                    newAnnotationsByPage: e,
 47206                    structTreeRootRef: o,
 47207                    kids: d,
 47208                    nums: h,
 47209                    xref: r,
 47210                    pdfManager: t,
 47211                    newRefs: a,
 47212                    buffer: g,
 47213                  });
 47214                i.set("ParentTreeNextKey", p);
 47215                g.length = 0;
 47216                await (0, s.writeObject)(f, d, g, r);
 47217                a.push({ ref: f, data: g.join("") });
 47218                if (u) {
 47219                  g.length = 0;
 47220                  await (0, s.writeObject)(u, h, g, r);
 47221                  a.push({ ref: u, data: g.join("") });
 47222                }
 47223                g.length = 0;
 47224                await (0, s.writeObject)(l, c, g, r);
 47225                a.push({ ref: l, data: g.join("") });
 47226                g.length = 0;
 47227                await (0, s.writeObject)(o, i, g, r);
 47228                a.push({ ref: o, data: g.join("") });
 47229              }
 47230              static async #k({
 47231                newAnnotationsByPage: e,
 47232                structTreeRootRef: t,
 47233                kids: a,
 47234                nums: r,
 47235                xref: i,
 47236                pdfManager: o,
 47237                newRefs: c,
 47238                buffer: l,
 47239              }) {
 47240                const h = n.Name.get("OBJR");
 47241                let u = -1 / 0;
 47242                for (const [d, f] of e) {
 47243                  const { ref: e } = await o.getPage(d);
 47244                  for (const {
 47245                    accessibilityData: {
 47246                      type: o,
 47247                      title: d,
 47248                      lang: g,
 47249                      alt: p,
 47250                      expanded: m,
 47251                      actualText: b,
 47252                    },
 47253                    ref: y,
 47254                    parentTreeId: w,
 47255                    structTreeParent: S,
 47256                  } of f) {
 47257                    u = Math.max(u, w);
 47258                    const f = i.getNewTemporaryRef(),
 47259                      x = new n.Dict(i);
 47260                    x.set("S", n.Name.get(o));
 47261                    d && x.set("T", d);
 47262                    g && x.set("Lang", g);
 47263                    p && x.set("Alt", p);
 47264                    m && x.set("E", m);
 47265                    b && x.set("ActualText", b);
 47266                    S
 47267                      ? await this.#F({
 47268                          structTreeParent: S,
 47269                          tagDict: x,
 47270                          newTagRef: f,
 47271                          fallbackRef: t,
 47272                          xref: i,
 47273                          newRefs: c,
 47274                          buffer: l,
 47275                        })
 47276                      : x.set("P", t);
 47277                    const C = new n.Dict(i);
 47278                    x.set("K", C);
 47279                    C.set("Type", h);
 47280                    C.set("Pg", e);
 47281                    C.set("Obj", y);
 47282                    l.length = 0;
 47283                    await (0, s.writeObject)(f, x, l, i);
 47284                    c.push({ ref: f, data: l.join("") });
 47285                    r.push(w, f);
 47286                    a.push(f);
 47287                  }
 47288                }
 47289                return u + 1;
 47290              }
 47291              static #v({ elements: e, xref: t, pageDict: a, parentTree: r }) {
 47292                const s = new Map();
 47293                for (const t of e)
 47294                  if (t.structTreeParentId) {
 47295                    const e = parseInt(t.structTreeParentId.split("_mc")[1], 10);
 47296                    s.set(e, t);
 47297                  }
 47298                const o = a.get("StructParents"),
 47299                  c = new i.NumberTree(r, t).get(o);
 47300                if (!Array.isArray(c)) return;
 47301                const updateElement = (e, a, r) => {
 47302                  const i = s.get(e);
 47303                  if (i) {
 47304                    const e = a.getRaw("P"),
 47305                      s = t.fetchIfRef(e);
 47306                    e instanceof n.Ref &&
 47307                      s instanceof n.Dict &&
 47308                      (i.structTreeParent = { ref: r, dict: a });
 47309                    return !0;
 47310                  }
 47311                  return !1;
 47312                };
 47313                for (const e of c) {
 47314                  if (!(e instanceof n.Ref)) continue;
 47315                  const a = t.fetch(e),
 47316                    r = a.get("K");
 47317                  if (Number.isInteger(r)) updateElement(r, a, e);
 47318                  else if (Array.isArray(r))
 47319                    for (let n of r) {
 47320                      n = t.fetchIfRef(n);
 47321                      if (Number.isInteger(n) && updateElement(n, a, e)) break;
 47322                    }
 47323                }
 47324              }
 47325              static async #F({
 47326                structTreeParent: { ref: e, dict: t },
 47327                tagDict: a,
 47328                newTagRef: i,
 47329                fallbackRef: o,
 47330                xref: c,
 47331                newRefs: l,
 47332                buffer: h,
 47333              }) {
 47334                const u = t.getRaw("P");
 47335                let d = c.fetchIfRef(u);
 47336                a.set("P", u);
 47337                let f,
 47338                  g = !1,
 47339                  p = d.getRaw("K");
 47340                if (p instanceof n.Ref) f = c.fetch(p);
 47341                else {
 47342                  f = p;
 47343                  p = c.getNewTemporaryRef();
 47344                  d = d.clone();
 47345                  d.set("K", p);
 47346                  g = !0;
 47347                }
 47348                if (Array.isArray(f)) {
 47349                  const t = f.indexOf(e);
 47350                  if (!(t >= 0)) {
 47351                    (0, r.warn)(
 47352                      "Cannot update the struct tree: parent kid not found.",
 47353                    );
 47354                    a.set("P", o);
 47355                    return;
 47356                  }
 47357                  f = f.slice();
 47358                  f.splice(t + 1, 0, i);
 47359                } else if (f instanceof n.Dict) {
 47360                  f = [p, i];
 47361                  p = c.getNewTemporaryRef();
 47362                  d.set("K", p);
 47363                  g = !0;
 47364                }
 47365                h.length = 0;
 47366                await (0, s.writeObject)(p, f, h, c);
 47367                l.push({ ref: p, data: h.join("") });
 47368                if (g) {
 47369                  h.length = 0;
 47370                  await (0, s.writeObject)(u, d, h, c);
 47371                  l.push({ ref: u, data: h.join("") });
 47372                }
 47373              }
 47374            }
 47375            t.StructTreeRoot = StructTreeRoot;
 47376            class StructElementNode {
 47377              constructor(e, t) {
 47378                this.tree = e;
 47379                this.dict = t;
 47380                this.kids = [];
 47381                this.parseKids();
 47382              }
 47383              get role() {
 47384                const e = this.dict.get("S"),
 47385                  t = e instanceof n.Name ? e.name : "",
 47386                  { root: a } = this.tree;
 47387                return a.roleMap.has(t) ? a.roleMap.get(t) : t;
 47388              }
 47389              parseKids() {
 47390                let e = null;
 47391                const t = this.dict.getRaw("Pg");
 47392                t instanceof n.Ref && (e = t.toString());
 47393                const a = this.dict.get("K");
 47394                if (Array.isArray(a))
 47395                  for (const t of a) {
 47396                    const a = this.parseKid(e, t);
 47397                    a && this.kids.push(a);
 47398                  }
 47399                else {
 47400                  const t = this.parseKid(e, a);
 47401                  t && this.kids.push(t);
 47402                }
 47403              }
 47404              parseKid(e, t) {
 47405                if (Number.isInteger(t))
 47406                  return this.tree.pageDict.objId !== e
 47407                    ? null
 47408                    : new StructElement({ type: o, mcid: t, pageObjId: e });
 47409                let a = null;
 47410                t instanceof n.Ref
 47411                  ? (a = this.dict.xref.fetch(t))
 47412                  : t instanceof n.Dict && (a = t);
 47413                if (!a) return null;
 47414                const r = a.getRaw("Pg");
 47415                r instanceof n.Ref && (e = r.toString());
 47416                const i =
 47417                  a.get("Type") instanceof n.Name ? a.get("Type").name : null;
 47418                if ("MCR" === i) {
 47419                  if (this.tree.pageDict.objId !== e) return null;
 47420                  const t = a.getRaw("Stm");
 47421                  return new StructElement({
 47422                    type: c,
 47423                    refObjId: t instanceof n.Ref ? t.toString() : null,
 47424                    pageObjId: e,
 47425                    mcid: a.get("MCID"),
 47426                  });
 47427                }
 47428                if ("OBJR" === i) {
 47429                  if (this.tree.pageDict.objId !== e) return null;
 47430                  const t = a.getRaw("Obj");
 47431                  return new StructElement({
 47432                    type: l,
 47433                    refObjId: t instanceof n.Ref ? t.toString() : null,
 47434                    pageObjId: e,
 47435                  });
 47436                }
 47437                return new StructElement({ type: u, dict: a });
 47438              }
 47439            }
 47440            class StructElement {
 47441              constructor({
 47442                type: e,
 47443                dict: t = null,
 47444                mcid: a = null,
 47445                pageObjId: r = null,
 47446                refObjId: n = null,
 47447              }) {
 47448                this.type = e;
 47449                this.dict = t;
 47450                this.mcid = a;
 47451                this.pageObjId = r;
 47452                this.refObjId = n;
 47453                this.parentNode = null;
 47454              }
 47455            }
 47456            t.StructTreePage = class StructTreePage {
 47457              constructor(e, t) {
 47458                this.root = e;
 47459                this.rootDict = e ? e.dict : null;
 47460                this.pageDict = t;
 47461                this.nodes = [];
 47462              }
 47463              parse(e) {
 47464                if (!this.root || !this.rootDict) return;
 47465                const t = this.rootDict.get("ParentTree");
 47466                if (!t) return;
 47467                const a = this.pageDict.get("StructParents"),
 47468                  r = e instanceof n.Ref && this.root.structParentIds?.get(e);
 47469                if (!Number.isInteger(a) && !r) return;
 47470                const s = new Map(),
 47471                  o = new i.NumberTree(t, this.rootDict.xref);
 47472                if (Number.isInteger(a)) {
 47473                  const e = o.get(a);
 47474                  if (Array.isArray(e))
 47475                    for (const t of e)
 47476                      t instanceof n.Ref &&
 47477                        this.addNode(this.rootDict.xref.fetch(t), s);
 47478                }
 47479                if (r)
 47480                  for (const [e, t] of r) {
 47481                    const a = o.get(e);
 47482                    if (a) {
 47483                      const e = this.addNode(this.rootDict.xref.fetchIfRef(a), s);
 47484                      1 === e?.kids?.length &&
 47485                        e.kids[0].type === l &&
 47486                        (e.kids[0].type = t);
 47487                    }
 47488                  }
 47489              }
 47490              addNode(e, t, a = 0) {
 47491                if (a > 40) {
 47492                  (0, r.warn)("StructTree MAX_DEPTH reached.");
 47493                  return null;
 47494                }
 47495                if (t.has(e)) return t.get(e);
 47496                const i = new StructElementNode(this, e);
 47497                t.set(e, i);
 47498                const s = e.get("P");
 47499                if (!s || (0, n.isName)(s.get("Type"), "StructTreeRoot")) {
 47500                  this.addTopLevelNode(e, i) || t.delete(e);
 47501                  return i;
 47502                }
 47503                const o = this.addNode(s, t, a + 1);
 47504                if (!o) return i;
 47505                let c = !1;
 47506                for (const t of o.kids)
 47507                  if (t.type === u && t.dict === e) {
 47508                    t.parentNode = i;
 47509                    c = !0;
 47510                  }
 47511                c || t.delete(e);
 47512                return i;
 47513              }
 47514              addTopLevelNode(e, t) {
 47515                const a = this.rootDict.get("K");
 47516                if (!a) return !1;
 47517                if (a instanceof n.Dict) {
 47518                  if (a.objId !== e.objId) return !1;
 47519                  this.nodes[0] = t;
 47520                  return !0;
 47521                }
 47522                if (!Array.isArray(a)) return !0;
 47523                let r = !1;
 47524                for (let n = 0; n < a.length; n++) {
 47525                  const i = a[n];
 47526                  if (i?.toString() === e.objId) {
 47527                    this.nodes[n] = t;
 47528                    r = !0;
 47529                  }
 47530                }
 47531                return r;
 47532              }
 47533              get serializable() {
 47534                function nodeToSerializable(e, t, a = 0) {
 47535                  if (a > 40) {
 47536                    (0, r.warn)("StructTree too deep to be fully serialized.");
 47537                    return;
 47538                  }
 47539                  const n = Object.create(null);
 47540                  n.role = e.role;
 47541                  n.children = [];
 47542                  t.children.push(n);
 47543                  const i = e.dict.get("Alt");
 47544                  "string" == typeof i && (n.alt = (0, r.stringToPDFString)(i));
 47545                  const s = e.dict.get("Lang");
 47546                  "string" == typeof s && (n.lang = (0, r.stringToPDFString)(s));
 47547                  for (const t of e.kids) {
 47548                    const e = t.type === u ? t.parentNode : null;
 47549                    e
 47550                      ? nodeToSerializable(e, n, a + 1)
 47551                      : t.type === o || t.type === c
 47552                        ? n.children.push({
 47553                            type: "content",
 47554                            id: `p${t.pageObjId}_mc${t.mcid}`,
 47555                          })
 47556                        : t.type === l
 47557                          ? n.children.push({ type: "object", id: t.refObjId })
 47558                          : t.type === h &&
 47559                            n.children.push({
 47560                              type: "annotation",
 47561                              id: `${r.AnnotationPrefix}${t.refObjId}`,
 47562                            });
 47563                  }
 47564                }
 47565                const e = Object.create(null);
 47566                e.children = [];
 47567                e.role = "Root";
 47568                for (const t of this.nodes) t && nodeToSerializable(t, e);
 47569                return e;
 47570              }
 47571            };
 47572          },
 47573          (e, t, a) => {
 47574            Object.defineProperty(t, "__esModule", { value: !0 });
 47575            t.incrementalUpdate = async function incrementalUpdate({
 47576              originalData: e,
 47577              xrefInfo: t,
 47578              newRefs: a,
 47579              xref: o = null,
 47580              hasXfa: l = !1,
 47581              xfaDatasetsRef: h = null,
 47582              hasXfaDatasetsEntry: u = !1,
 47583              needAppearances: d,
 47584              acroFormRef: f = null,
 47585              acroForm: g = null,
 47586              xfaData: p = null,
 47587            }) {
 47588              await (async function updateAcroform({
 47589                xref: e,
 47590                acroForm: t,
 47591                acroFormRef: a,
 47592                hasXfa: n,
 47593                hasXfaDatasetsEntry: i,
 47594                xfaDatasetsRef: s,
 47595                needAppearances: o,
 47596                newRefs: c,
 47597              }) {
 47598                !n || i || s || (0, r.warn)("XFA - Cannot save it");
 47599                if (!o && (!n || !s || i)) return;
 47600                const l = t.clone();
 47601                if (n && !i) {
 47602                  const e = t.get("XFA").slice();
 47603                  e.splice(2, 0, "datasets");
 47604                  e.splice(3, 0, s);
 47605                  l.set("XFA", e);
 47606                }
 47607                o && l.set("NeedAppearances", !0);
 47608                const h = [];
 47609                await writeObject(a, l, h, e);
 47610                c.push({ ref: a, data: h.join("") });
 47611              })({
 47612                xref: o,
 47613                acroForm: g,
 47614                acroFormRef: f,
 47615                hasXfa: l,
 47616                hasXfaDatasetsEntry: u,
 47617                xfaDatasetsRef: h,
 47618                needAppearances: d,
 47619                newRefs: a,
 47620              });
 47621              l &&
 47622                (function updateXFA({
 47623                  xfaData: e,
 47624                  xfaDatasetsRef: t,
 47625                  newRefs: a,
 47626                  xref: n,
 47627                }) {
 47628                  if (null === e) {
 47629                    e = (function writeXFADataForAcroform(e, t) {
 47630                      const a = new s.SimpleXMLParser({
 47631                        hasAttributes: !0,
 47632                      }).parseFromString(e);
 47633                      for (const { xfa: e } of t) {
 47634                        if (!e) continue;
 47635                        const { path: t, value: n } = e;
 47636                        if (!t) continue;
 47637                        const o = (0, i.parseXFAPath)(t);
 47638                        let c = a.documentElement.searchNode(o, 0);
 47639                        !c &&
 47640                          o.length > 1 &&
 47641                          (c = a.documentElement.searchNode([o.at(-1)], 0));
 47642                        c
 47643                          ? (c.childNodes = Array.isArray(n)
 47644                              ? n.map((e) => new s.SimpleDOMNode("value", e))
 47645                              : [new s.SimpleDOMNode("#text", n)])
 47646                          : (0, r.warn)(`Node not found for path: ${t}`);
 47647                      }
 47648                      const n = [];
 47649                      a.documentElement.dump(n);
 47650                      return n.join("");
 47651                    })(n.fetchIfRef(t).getString(), a);
 47652                  }
 47653                  const o = n.encrypt;
 47654                  if (o) {
 47655                    e = o.createCipherTransform(t.num, t.gen).encryptString(e);
 47656                  }
 47657                  const c =
 47658                    `${t.num} ${t.gen} obj\n<< /Type /EmbeddedFile /Length ${e.length}>>\nstream\n` +
 47659                    e +
 47660                    "\nendstream\nendobj\n";
 47661                  a.push({ ref: t, data: c });
 47662                })({ xfaData: p, xfaDatasetsRef: h, newRefs: a, xref: o });
 47663              const m = new n.Dict(null),
 47664                b = t.newRef;
 47665              let y, w;
 47666              const S = e.at(-1);
 47667              if (10 === S || 13 === S) {
 47668                y = [];
 47669                w = e.length;
 47670              } else {
 47671                y = ["\n"];
 47672                w = e.length + 1;
 47673              }
 47674              m.set("Size", b.num + 1);
 47675              m.set("Prev", t.startXRef);
 47676              m.set("Type", n.Name.get("XRef"));
 47677              null !== t.rootRef && m.set("Root", t.rootRef);
 47678              null !== t.infoRef && m.set("Info", t.infoRef);
 47679              null !== t.encryptRef && m.set("Encrypt", t.encryptRef);
 47680              a.push({ ref: b, data: "" });
 47681              a = a.sort((e, t) => e.ref.num - t.ref.num);
 47682              const x = [[0, 1, 65535]],
 47683                C = [0, 1];
 47684              let k = 0;
 47685              for (const { ref: e, data: t } of a) {
 47686                k = Math.max(k, w);
 47687                x.push([1, w, Math.min(e.gen, 65535)]);
 47688                w += t.length;
 47689                C.push(e.num, 1);
 47690                y.push(t);
 47691              }
 47692              m.set("Index", C);
 47693              if (Array.isArray(t.fileIds) && t.fileIds.length > 0) {
 47694                const e = (function computeMD5(e, t) {
 47695                  const a = Math.floor(Date.now() / 1e3),
 47696                    n = t.filename || "",
 47697                    i = [a.toString(), n, e.toString()];
 47698                  let s = i.reduce((e, t) => e + t.length, 0);
 47699                  for (const e of Object.values(t.info)) {
 47700                    i.push(e);
 47701                    s += e.length;
 47702                  }
 47703                  const o = new Uint8Array(s);
 47704                  let l = 0;
 47705                  for (const e of i) {
 47706                    writeString(e, l, o);
 47707                    l += e.length;
 47708                  }
 47709                  return (0, r.bytesToString)((0, c.calculateMD5)(o));
 47710                })(w, t);
 47711                m.set("ID", [t.fileIds[0], e]);
 47712              }
 47713              const v = [1, Math.ceil(Math.log2(k) / 8), 2],
 47714                F = (v[0] + v[1] + v[2]) * x.length;
 47715              m.set("W", v);
 47716              m.set("Length", F);
 47717              y.push(`${b.num} ${b.gen} obj\n`);
 47718              await writeDict(m, y, null);
 47719              y.push(" stream\n");
 47720              const O = y.reduce((e, t) => e + t.length, 0),
 47721                T = `\nendstream\nendobj\nstartxref\n${w}\n%%EOF\n`,
 47722                M = new Uint8Array(e.length + O + F + T.length);
 47723              M.set(e);
 47724              let D = e.length;
 47725              for (const e of y) {
 47726                writeString(e, D, M);
 47727                D += e.length;
 47728              }
 47729              for (const [e, t, a] of x) {
 47730                D = writeInt(e, v[0], D, M);
 47731                D = writeInt(t, v[1], D, M);
 47732                D = writeInt(a, v[2], D, M);
 47733              }
 47734              writeString(T, D, M);
 47735              return M;
 47736            };
 47737            t.writeDict = writeDict;
 47738            t.writeObject = writeObject;
 47739            var r = a(2),
 47740              n = a(4),
 47741              i = a(3),
 47742              s = a(71),
 47743              o = a(5),
 47744              c = a(74);
 47745            async function writeObject(e, t, a, { encrypt: r = null }) {
 47746              const i = r?.createCipherTransform(e.num, e.gen);
 47747              a.push(`${e.num} ${e.gen} obj\n`);
 47748              t instanceof n.Dict
 47749                ? await writeDict(t, a, i)
 47750                : t instanceof o.BaseStream
 47751                  ? await writeStream(t, a, i)
 47752                  : Array.isArray(t) && (await writeArray(t, a, i));
 47753              a.push("\nendobj\n");
 47754            }
 47755            async function writeDict(e, t, a) {
 47756              t.push("<<");
 47757              for (const r of e.getKeys()) {
 47758                t.push(` /${(0, i.escapePDFName)(r)} `);
 47759                await writeValue(e.getRaw(r), t, a);
 47760              }
 47761              t.push(">>");
 47762            }
 47763            async function writeStream(e, t, a) {
 47764              let i = e.getString();
 47765              const { dict: s } = e,
 47766                [o, c] = await Promise.all([
 47767                  s.getAsync("Filter"),
 47768                  s.getAsync("DecodeParms"),
 47769                ]),
 47770                l = Array.isArray(o) ? await s.xref.fetchIfRefAsync(o[0]) : o,
 47771                h = (0, n.isName)(l, "FlateDecode");
 47772              if (
 47773                "undefined" != typeof CompressionStream &&
 47774                (i.length >= 256 || h)
 47775              )
 47776                try {
 47777                  const e = (0, r.stringToBytes)(i),
 47778                    t = new CompressionStream("deflate"),
 47779                    a = t.writable.getWriter();
 47780                  a.write(e);
 47781                  a.close();
 47782                  const l = await new Response(t.readable).arrayBuffer();
 47783                  i = (0, r.bytesToString)(new Uint8Array(l));
 47784                  let u, d;
 47785                  if (o) {
 47786                    if (!h) {
 47787                      u = Array.isArray(o)
 47788                        ? [n.Name.get("FlateDecode"), ...o]
 47789                        : [n.Name.get("FlateDecode"), o];
 47790                      c && (d = Array.isArray(c) ? [null, ...c] : [null, c]);
 47791                    }
 47792                  } else u = n.Name.get("FlateDecode");
 47793                  u && s.set("Filter", u);
 47794                  d && s.set("DecodeParms", d);
 47795                } catch (e) {
 47796                  (0, r.info)(`writeStream - cannot compress data: "${e}".`);
 47797                }
 47798              a && (i = a.encryptString(i));
 47799              s.set("Length", i.length);
 47800              await writeDict(s, t, a);
 47801              t.push(" stream\n", i, "\nendstream");
 47802            }
 47803            async function writeArray(e, t, a) {
 47804              t.push("[");
 47805              let r = !0;
 47806              for (const n of e) {
 47807                r ? (r = !1) : t.push(" ");
 47808                await writeValue(n, t, a);
 47809              }
 47810              t.push("]");
 47811            }
 47812            async function writeValue(e, t, a) {
 47813              if (e instanceof n.Name) t.push(`/${(0, i.escapePDFName)(e.name)}`);
 47814              else if (e instanceof n.Ref) t.push(`${e.num} ${e.gen} R`);
 47815              else if (Array.isArray(e)) await writeArray(e, t, a);
 47816              else if ("string" == typeof e) {
 47817                a && (e = a.encryptString(e));
 47818                t.push(`(${(0, i.escapeString)(e)})`);
 47819              } else
 47820                "number" == typeof e
 47821                  ? t.push((0, i.numberToString)(e))
 47822                  : "boolean" == typeof e
 47823                    ? t.push(e.toString())
 47824                    : e instanceof n.Dict
 47825                      ? await writeDict(e, t, a)
 47826                      : e instanceof o.BaseStream
 47827                        ? await writeStream(e, t, a)
 47828                        : null === e
 47829                          ? t.push("null")
 47830                          : (0, r.warn)(
 47831                              `Unhandled value in writer: ${typeof e}, please file a bug.`,
 47832                            );
 47833            }
 47834            function writeInt(e, t, a, r) {
 47835              for (let n = t + a - 1; n > a - 1; n--) {
 47836                r[n] = 255 & e;
 47837                e >>= 8;
 47838              }
 47839              return a + t;
 47840            }
 47841            function writeString(e, t, a) {
 47842              for (let r = 0, n = e.length; r < n; r++)
 47843                a[t + r] = 255 & e.charCodeAt(r);
 47844            }
 47845          },
 47846          (e, t, a) => {
 47847            Object.defineProperty(t, "__esModule", { value: !0 });
 47848            t.calculateSHA256 =
 47849              t.calculateMD5 =
 47850              t.PDF20 =
 47851              t.PDF17 =
 47852              t.CipherTransformFactory =
 47853              t.ARCFourCipher =
 47854              t.AES256Cipher =
 47855              t.AES128Cipher =
 47856                void 0;
 47857            t.calculateSHA384 = calculateSHA384;
 47858            t.calculateSHA512 = void 0;
 47859            var r = a(2),
 47860              n = a(4),
 47861              i = a(75);
 47862            class ARCFourCipher {
 47863              constructor(e) {
 47864                this.a = 0;
 47865                this.b = 0;
 47866                const t = new Uint8Array(256),
 47867                  a = e.length;
 47868                for (let e = 0; e < 256; ++e) t[e] = e;
 47869                for (let r = 0, n = 0; r < 256; ++r) {
 47870                  const i = t[r];
 47871                  n = (n + i + e[r % a]) & 255;
 47872                  t[r] = t[n];
 47873                  t[n] = i;
 47874                }
 47875                this.s = t;
 47876              }
 47877              encryptBlock(e) {
 47878                let t = this.a,
 47879                  a = this.b;
 47880                const r = this.s,
 47881                  n = e.length,
 47882                  i = new Uint8Array(n);
 47883                for (let s = 0; s < n; ++s) {
 47884                  t = (t + 1) & 255;
 47885                  const n = r[t];
 47886                  a = (a + n) & 255;
 47887                  const o = r[a];
 47888                  r[t] = o;
 47889                  r[a] = n;
 47890                  i[s] = e[s] ^ r[(n + o) & 255];
 47891                }
 47892                this.a = t;
 47893                this.b = a;
 47894                return i;
 47895              }
 47896              decryptBlock(e) {
 47897                return this.encryptBlock(e);
 47898              }
 47899              encrypt(e) {
 47900                return this.encryptBlock(e);
 47901              }
 47902            }
 47903            t.ARCFourCipher = ARCFourCipher;
 47904            const s = (function calculateMD5Closure() {
 47905              const e = new Uint8Array([
 47906                  7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5,
 47907                  9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 4, 11, 16,
 47908                  23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21,
 47909                  6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21,
 47910                ]),
 47911                t = new Int32Array([
 47912                  -680876936, -389564586, 606105819, -1044525330, -176418897,
 47913                  1200080426, -1473231341, -45705983, 1770035416, -1958414417,
 47914                  -42063, -1990404162, 1804603682, -40341101, -1502002290,
 47915                  1236535329, -165796510, -1069501632, 643717713, -373897302,
 47916                  -701558691, 38016083, -660478335, -405537848, 568446438,
 47917                  -1019803690, -187363961, 1163531501, -1444681467, -51403784,
 47918                  1735328473, -1926607734, -378558, -2022574463, 1839030562,
 47919                  -35309556, -1530992060, 1272893353, -155497632, -1094730640,
 47920                  681279174, -358537222, -722521979, 76029189, -640364487,
 47921                  -421815835, 530742520, -995338651, -198630844, 1126891415,
 47922                  -1416354905, -57434055, 1700485571, -1894986606, -1051523,
 47923                  -2054922799, 1873313359, -30611744, -1560198380, 1309151649,
 47924                  -145523070, -1120210379, 718787259, -343485551,
 47925                ]);
 47926              return function hash(a, r, n) {
 47927                let i = 1732584193,
 47928                  s = -271733879,
 47929                  o = -1732584194,
 47930                  c = 271733878;
 47931                const l = (n + 72) & -64,
 47932                  h = new Uint8Array(l);
 47933                let u, d;
 47934                for (u = 0; u < n; ++u) h[u] = a[r++];
 47935                h[u++] = 128;
 47936                const f = l - 8;
 47937                for (; u < f; ) h[u++] = 0;
 47938                h[u++] = (n << 3) & 255;
 47939                h[u++] = (n >> 5) & 255;
 47940                h[u++] = (n >> 13) & 255;
 47941                h[u++] = (n >> 21) & 255;
 47942                h[u++] = (n >>> 29) & 255;
 47943                h[u++] = 0;
 47944                h[u++] = 0;
 47945                h[u++] = 0;
 47946                const g = new Int32Array(16);
 47947                for (u = 0; u < l; ) {
 47948                  for (d = 0; d < 16; ++d, u += 4)
 47949                    g[d] =
 47950                      h[u] |
 47951                      (h[u + 1] << 8) |
 47952                      (h[u + 2] << 16) |
 47953                      (h[u + 3] << 24);
 47954                  let a,
 47955                    r,
 47956                    n = i,
 47957                    l = s,
 47958                    f = o,
 47959                    p = c;
 47960                  for (d = 0; d < 64; ++d) {
 47961                    if (d < 16) {
 47962                      a = (l & f) | (~l & p);
 47963                      r = d;
 47964                    } else if (d < 32) {
 47965                      a = (p & l) | (~p & f);
 47966                      r = (5 * d + 1) & 15;
 47967                    } else if (d < 48) {
 47968                      a = l ^ f ^ p;
 47969                      r = (3 * d + 5) & 15;
 47970                    } else {
 47971                      a = f ^ (l | ~p);
 47972                      r = (7 * d) & 15;
 47973                    }
 47974                    const i = p,
 47975                      s = (n + a + t[d] + g[r]) | 0,
 47976                      o = e[d];
 47977                    p = f;
 47978                    f = l;
 47979                    l = (l + ((s << o) | (s >>> (32 - o)))) | 0;
 47980                    n = i;
 47981                  }
 47982                  i = (i + n) | 0;
 47983                  s = (s + l) | 0;
 47984                  o = (o + f) | 0;
 47985                  c = (c + p) | 0;
 47986                }
 47987                return new Uint8Array([
 47988                  255 & i,
 47989                  (i >> 8) & 255,
 47990                  (i >> 16) & 255,
 47991                  (i >>> 24) & 255,
 47992                  255 & s,
 47993                  (s >> 8) & 255,
 47994                  (s >> 16) & 255,
 47995                  (s >>> 24) & 255,
 47996                  255 & o,
 47997                  (o >> 8) & 255,
 47998                  (o >> 16) & 255,
 47999                  (o >>> 24) & 255,
 48000                  255 & c,
 48001                  (c >> 8) & 255,
 48002                  (c >> 16) & 255,
 48003                  (c >>> 24) & 255,
 48004                ]);
 48005              };
 48006            })();
 48007            t.calculateMD5 = s;
 48008            class Word64 {
 48009              constructor(e, t) {
 48010                this.high = 0 | e;
 48011                this.low = 0 | t;
 48012              }
 48013              and(e) {
 48014                this.high &= e.high;
 48015                this.low &= e.low;
 48016              }
 48017              xor(e) {
 48018                this.high ^= e.high;
 48019                this.low ^= e.low;
 48020              }
 48021              or(e) {
 48022                this.high |= e.high;
 48023                this.low |= e.low;
 48024              }
 48025              shiftRight(e) {
 48026                if (e >= 32) {
 48027                  this.low = (this.high >>> (e - 32)) | 0;
 48028                  this.high = 0;
 48029                } else {
 48030                  this.low = (this.low >>> e) | (this.high << (32 - e));
 48031                  this.high = (this.high >>> e) | 0;
 48032                }
 48033              }
 48034              shiftLeft(e) {
 48035                if (e >= 32) {
 48036                  this.high = this.low << (e - 32);
 48037                  this.low = 0;
 48038                } else {
 48039                  this.high = (this.high << e) | (this.low >>> (32 - e));
 48040                  this.low <<= e;
 48041                }
 48042              }
 48043              rotateRight(e) {
 48044                let t, a;
 48045                if (32 & e) {
 48046                  a = this.low;
 48047                  t = this.high;
 48048                } else {
 48049                  t = this.low;
 48050                  a = this.high;
 48051                }
 48052                e &= 31;
 48053                this.low = (t >>> e) | (a << (32 - e));
 48054                this.high = (a >>> e) | (t << (32 - e));
 48055              }
 48056              not() {
 48057                this.high = ~this.high;
 48058                this.low = ~this.low;
 48059              }
 48060              add(e) {
 48061                const t = (this.low >>> 0) + (e.low >>> 0);
 48062                let a = (this.high >>> 0) + (e.high >>> 0);
 48063                t > 4294967295 && (a += 1);
 48064                this.low = 0 | t;
 48065                this.high = 0 | a;
 48066              }
 48067              copyTo(e, t) {
 48068                e[t] = (this.high >>> 24) & 255;
 48069                e[t + 1] = (this.high >> 16) & 255;
 48070                e[t + 2] = (this.high >> 8) & 255;
 48071                e[t + 3] = 255 & this.high;
 48072                e[t + 4] = (this.low >>> 24) & 255;
 48073                e[t + 5] = (this.low >> 16) & 255;
 48074                e[t + 6] = (this.low >> 8) & 255;
 48075                e[t + 7] = 255 & this.low;
 48076              }
 48077              assign(e) {
 48078                this.high = e.high;
 48079                this.low = e.low;
 48080              }
 48081            }
 48082            const o = (function calculateSHA256Closure() {
 48083              function rotr(e, t) {
 48084                return (e >>> t) | (e << (32 - t));
 48085              }
 48086              function ch(e, t, a) {
 48087                return (e & t) ^ (~e & a);
 48088              }
 48089              function maj(e, t, a) {
 48090                return (e & t) ^ (e & a) ^ (t & a);
 48091              }
 48092              function sigma(e) {
 48093                return rotr(e, 2) ^ rotr(e, 13) ^ rotr(e, 22);
 48094              }
 48095              function sigmaPrime(e) {
 48096                return rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25);
 48097              }
 48098              function littleSigma(e) {
 48099                return rotr(e, 7) ^ rotr(e, 18) ^ (e >>> 3);
 48100              }
 48101              const e = [
 48102                1116352408, 1899447441, 3049323471, 3921009573, 961987163,
 48103                1508970993, 2453635748, 2870763221, 3624381080, 310598401,
 48104                607225278, 1426881987, 1925078388, 2162078206, 2614888103,
 48105                3248222580, 3835390401, 4022224774, 264347078, 604807628,
 48106                770255983, 1249150122, 1555081692, 1996064986, 2554220882,
 48107                2821834349, 2952996808, 3210313671, 3336571891, 3584528711,
 48108                113926993, 338241895, 666307205, 773529912, 1294757372,
 48109                1396182291, 1695183700, 1986661051, 2177026350, 2456956037,
 48110                2730485921, 2820302411, 3259730800, 3345764771, 3516065817,
 48111                3600352804, 4094571909, 275423344, 430227734, 506948616,
 48112                659060556, 883997877, 958139571, 1322822218, 1537002063,
 48113                1747873779, 1955562222, 2024104815, 2227730452, 2361852424,
 48114                2428436474, 2756734187, 3204031479, 3329325298,
 48115              ];
 48116              return function hash(t, a, r) {
 48117                let n = 1779033703,
 48118                  i = 3144134277,
 48119                  s = 1013904242,
 48120                  o = 2773480762,
 48121                  c = 1359893119,
 48122                  l = 2600822924,
 48123                  h = 528734635,
 48124                  u = 1541459225;
 48125                const d = 64 * Math.ceil((r + 9) / 64),
 48126                  f = new Uint8Array(d);
 48127                let g, p;
 48128                for (g = 0; g < r; ++g) f[g] = t[a++];
 48129                f[g++] = 128;
 48130                const m = d - 8;
 48131                for (; g < m; ) f[g++] = 0;
 48132                f[g++] = 0;
 48133                f[g++] = 0;
 48134                f[g++] = 0;
 48135                f[g++] = (r >>> 29) & 255;
 48136                f[g++] = (r >> 21) & 255;
 48137                f[g++] = (r >> 13) & 255;
 48138                f[g++] = (r >> 5) & 255;
 48139                f[g++] = (r << 3) & 255;
 48140                const b = new Uint32Array(64);
 48141                for (g = 0; g < d; ) {
 48142                  for (p = 0; p < 16; ++p) {
 48143                    b[p] =
 48144                      (f[g] << 24) |
 48145                      (f[g + 1] << 16) |
 48146                      (f[g + 2] << 8) |
 48147                      f[g + 3];
 48148                    g += 4;
 48149                  }
 48150                  for (p = 16; p < 64; ++p)
 48151                    b[p] =
 48152                      ((rotr((y = b[p - 2]), 17) ^ rotr(y, 19) ^ (y >>> 10)) +
 48153                        b[p - 7] +
 48154                        littleSigma(b[p - 15]) +
 48155                        b[p - 16]) |
 48156                      0;
 48157                  let t,
 48158                    a,
 48159                    r = n,
 48160                    d = i,
 48161                    m = s,
 48162                    w = o,
 48163                    S = c,
 48164                    x = l,
 48165                    C = h,
 48166                    k = u;
 48167                  for (p = 0; p < 64; ++p) {
 48168                    t = k + sigmaPrime(S) + ch(S, x, C) + e[p] + b[p];
 48169                    a = sigma(r) + maj(r, d, m);
 48170                    k = C;
 48171                    C = x;
 48172                    x = S;
 48173                    S = (w + t) | 0;
 48174                    w = m;
 48175                    m = d;
 48176                    d = r;
 48177                    r = (t + a) | 0;
 48178                  }
 48179                  n = (n + r) | 0;
 48180                  i = (i + d) | 0;
 48181                  s = (s + m) | 0;
 48182                  o = (o + w) | 0;
 48183                  c = (c + S) | 0;
 48184                  l = (l + x) | 0;
 48185                  h = (h + C) | 0;
 48186                  u = (u + k) | 0;
 48187                }
 48188                var y;
 48189                return new Uint8Array([
 48190                  (n >> 24) & 255,
 48191                  (n >> 16) & 255,
 48192                  (n >> 8) & 255,
 48193                  255 & n,
 48194                  (i >> 24) & 255,
 48195                  (i >> 16) & 255,
 48196                  (i >> 8) & 255,
 48197                  255 & i,
 48198                  (s >> 24) & 255,
 48199                  (s >> 16) & 255,
 48200                  (s >> 8) & 255,
 48201                  255 & s,
 48202                  (o >> 24) & 255,
 48203                  (o >> 16) & 255,
 48204                  (o >> 8) & 255,
 48205                  255 & o,
 48206                  (c >> 24) & 255,
 48207                  (c >> 16) & 255,
 48208                  (c >> 8) & 255,
 48209                  255 & c,
 48210                  (l >> 24) & 255,
 48211                  (l >> 16) & 255,
 48212                  (l >> 8) & 255,
 48213                  255 & l,
 48214                  (h >> 24) & 255,
 48215                  (h >> 16) & 255,
 48216                  (h >> 8) & 255,
 48217                  255 & h,
 48218                  (u >> 24) & 255,
 48219                  (u >> 16) & 255,
 48220                  (u >> 8) & 255,
 48221                  255 & u,
 48222                ]);
 48223              };
 48224            })();
 48225            t.calculateSHA256 = o;
 48226            const c = (function calculateSHA512Closure() {
 48227              function ch(e, t, a, r, n) {
 48228                e.assign(t);
 48229                e.and(a);
 48230                n.assign(t);
 48231                n.not();
 48232                n.and(r);
 48233                e.xor(n);
 48234              }
 48235              function maj(e, t, a, r, n) {
 48236                e.assign(t);
 48237                e.and(a);
 48238                n.assign(t);
 48239                n.and(r);
 48240                e.xor(n);
 48241                n.assign(a);
 48242                n.and(r);
 48243                e.xor(n);
 48244              }
 48245              function sigma(e, t, a) {
 48246                e.assign(t);
 48247                e.rotateRight(28);
 48248                a.assign(t);
 48249                a.rotateRight(34);
 48250                e.xor(a);
 48251                a.assign(t);
 48252                a.rotateRight(39);
 48253                e.xor(a);
 48254              }
 48255              function sigmaPrime(e, t, a) {
 48256                e.assign(t);
 48257                e.rotateRight(14);
 48258                a.assign(t);
 48259                a.rotateRight(18);
 48260                e.xor(a);
 48261                a.assign(t);
 48262                a.rotateRight(41);
 48263                e.xor(a);
 48264              }
 48265              function littleSigma(e, t, a) {
 48266                e.assign(t);
 48267                e.rotateRight(1);
 48268                a.assign(t);
 48269                a.rotateRight(8);
 48270                e.xor(a);
 48271                a.assign(t);
 48272                a.shiftRight(7);
 48273                e.xor(a);
 48274              }
 48275              function littleSigmaPrime(e, t, a) {
 48276                e.assign(t);
 48277                e.rotateRight(19);
 48278                a.assign(t);
 48279                a.rotateRight(61);
 48280                e.xor(a);
 48281                a.assign(t);
 48282                a.shiftRight(6);
 48283                e.xor(a);
 48284              }
 48285              const e = [
 48286                new Word64(1116352408, 3609767458),
 48287                new Word64(1899447441, 602891725),
 48288                new Word64(3049323471, 3964484399),
 48289                new Word64(3921009573, 2173295548),
 48290                new Word64(961987163, 4081628472),
 48291                new Word64(1508970993, 3053834265),
 48292                new Word64(2453635748, 2937671579),
 48293                new Word64(2870763221, 3664609560),
 48294                new Word64(3624381080, 2734883394),
 48295                new Word64(310598401, 1164996542),
 48296                new Word64(607225278, 1323610764),
 48297                new Word64(1426881987, 3590304994),
 48298                new Word64(1925078388, 4068182383),
 48299                new Word64(2162078206, 991336113),
 48300                new Word64(2614888103, 633803317),
 48301                new Word64(3248222580, 3479774868),
 48302                new Word64(3835390401, 2666613458),
 48303                new Word64(4022224774, 944711139),
 48304                new Word64(264347078, 2341262773),
 48305                new Word64(604807628, 2007800933),
 48306                new Word64(770255983, 1495990901),
 48307                new Word64(1249150122, 1856431235),
 48308                new Word64(1555081692, 3175218132),
 48309                new Word64(1996064986, 2198950837),
 48310                new Word64(2554220882, 3999719339),
 48311                new Word64(2821834349, 766784016),
 48312                new Word64(2952996808, 2566594879),
 48313                new Word64(3210313671, 3203337956),
 48314                new Word64(3336571891, 1034457026),
 48315                new Word64(3584528711, 2466948901),
 48316                new Word64(113926993, 3758326383),
 48317                new Word64(338241895, 168717936),
 48318                new Word64(666307205, 1188179964),
 48319                new Word64(773529912, 1546045734),
 48320                new Word64(1294757372, 1522805485),
 48321                new Word64(1396182291, 2643833823),
 48322                new Word64(1695183700, 2343527390),
 48323                new Word64(1986661051, 1014477480),
 48324                new Word64(2177026350, 1206759142),
 48325                new Word64(2456956037, 344077627),
 48326                new Word64(2730485921, 1290863460),
 48327                new Word64(2820302411, 3158454273),
 48328                new Word64(3259730800, 3505952657),
 48329                new Word64(3345764771, 106217008),
 48330                new Word64(3516065817, 3606008344),
 48331                new Word64(3600352804, 1432725776),
 48332                new Word64(4094571909, 1467031594),
 48333                new Word64(275423344, 851169720),
 48334                new Word64(430227734, 3100823752),
 48335                new Word64(506948616, 1363258195),
 48336                new Word64(659060556, 3750685593),
 48337                new Word64(883997877, 3785050280),
 48338                new Word64(958139571, 3318307427),
 48339                new Word64(1322822218, 3812723403),
 48340                new Word64(1537002063, 2003034995),
 48341                new Word64(1747873779, 3602036899),
 48342                new Word64(1955562222, 1575990012),
 48343                new Word64(2024104815, 1125592928),
 48344                new Word64(2227730452, 2716904306),
 48345                new Word64(2361852424, 442776044),
 48346                new Word64(2428436474, 593698344),
 48347                new Word64(2756734187, 3733110249),
 48348                new Word64(3204031479, 2999351573),
 48349                new Word64(3329325298, 3815920427),
 48350                new Word64(3391569614, 3928383900),
 48351                new Word64(3515267271, 566280711),
 48352                new Word64(3940187606, 3454069534),
 48353                new Word64(4118630271, 4000239992),
 48354                new Word64(116418474, 1914138554),
 48355                new Word64(174292421, 2731055270),
 48356                new Word64(289380356, 3203993006),
 48357                new Word64(460393269, 320620315),
 48358                new Word64(685471733, 587496836),
 48359                new Word64(852142971, 1086792851),
 48360                new Word64(1017036298, 365543100),
 48361                new Word64(1126000580, 2618297676),
 48362                new Word64(1288033470, 3409855158),
 48363                new Word64(1501505948, 4234509866),
 48364                new Word64(1607167915, 987167468),
 48365                new Word64(1816402316, 1246189591),
 48366              ];
 48367              return function hash(t, a, r, n = !1) {
 48368                let i, s, o, c, l, h, u, d;
 48369                if (n) {
 48370                  i = new Word64(3418070365, 3238371032);
 48371                  s = new Word64(1654270250, 914150663);
 48372                  o = new Word64(2438529370, 812702999);
 48373                  c = new Word64(355462360, 4144912697);
 48374                  l = new Word64(1731405415, 4290775857);
 48375                  h = new Word64(2394180231, 1750603025);
 48376                  u = new Word64(3675008525, 1694076839);
 48377                  d = new Word64(1203062813, 3204075428);
 48378                } else {
 48379                  i = new Word64(1779033703, 4089235720);
 48380                  s = new Word64(3144134277, 2227873595);
 48381                  o = new Word64(1013904242, 4271175723);
 48382                  c = new Word64(2773480762, 1595750129);
 48383                  l = new Word64(1359893119, 2917565137);
 48384                  h = new Word64(2600822924, 725511199);
 48385                  u = new Word64(528734635, 4215389547);
 48386                  d = new Word64(1541459225, 327033209);
 48387                }
 48388                const f = 128 * Math.ceil((r + 17) / 128),
 48389                  g = new Uint8Array(f);
 48390                let p, m;
 48391                for (p = 0; p < r; ++p) g[p] = t[a++];
 48392                g[p++] = 128;
 48393                const b = f - 16;
 48394                for (; p < b; ) g[p++] = 0;
 48395                g[p++] = 0;
 48396                g[p++] = 0;
 48397                g[p++] = 0;
 48398                g[p++] = 0;
 48399                g[p++] = 0;
 48400                g[p++] = 0;
 48401                g[p++] = 0;
 48402                g[p++] = 0;
 48403                g[p++] = 0;
 48404                g[p++] = 0;
 48405                g[p++] = 0;
 48406                g[p++] = (r >>> 29) & 255;
 48407                g[p++] = (r >> 21) & 255;
 48408                g[p++] = (r >> 13) & 255;
 48409                g[p++] = (r >> 5) & 255;
 48410                g[p++] = (r << 3) & 255;
 48411                const y = new Array(80);
 48412                for (p = 0; p < 80; p++) y[p] = new Word64(0, 0);
 48413                let w = new Word64(0, 0),
 48414                  S = new Word64(0, 0),
 48415                  x = new Word64(0, 0),
 48416                  C = new Word64(0, 0),
 48417                  k = new Word64(0, 0),
 48418                  v = new Word64(0, 0),
 48419                  F = new Word64(0, 0),
 48420                  O = new Word64(0, 0);
 48421                const T = new Word64(0, 0),
 48422                  M = new Word64(0, 0),
 48423                  D = new Word64(0, 0),
 48424                  E = new Word64(0, 0);
 48425                let N, R;
 48426                for (p = 0; p < f; ) {
 48427                  for (m = 0; m < 16; ++m) {
 48428                    y[m].high =
 48429                      (g[p] << 24) |
 48430                      (g[p + 1] << 16) |
 48431                      (g[p + 2] << 8) |
 48432                      g[p + 3];
 48433                    y[m].low =
 48434                      (g[p + 4] << 24) |
 48435                      (g[p + 5] << 16) |
 48436                      (g[p + 6] << 8) |
 48437                      g[p + 7];
 48438                    p += 8;
 48439                  }
 48440                  for (m = 16; m < 80; ++m) {
 48441                    N = y[m];
 48442                    littleSigmaPrime(N, y[m - 2], E);
 48443                    N.add(y[m - 7]);
 48444                    littleSigma(D, y[m - 15], E);
 48445                    N.add(D);
 48446                    N.add(y[m - 16]);
 48447                  }
 48448                  w.assign(i);
 48449                  S.assign(s);
 48450                  x.assign(o);
 48451                  C.assign(c);
 48452                  k.assign(l);
 48453                  v.assign(h);
 48454                  F.assign(u);
 48455                  O.assign(d);
 48456                  for (m = 0; m < 80; ++m) {
 48457                    T.assign(O);
 48458                    sigmaPrime(D, k, E);
 48459                    T.add(D);
 48460                    ch(D, k, v, F, E);
 48461                    T.add(D);
 48462                    T.add(e[m]);
 48463                    T.add(y[m]);
 48464                    sigma(M, w, E);
 48465                    maj(D, w, S, x, E);
 48466                    M.add(D);
 48467                    N = O;
 48468                    O = F;
 48469                    F = v;
 48470                    v = k;
 48471                    C.add(T);
 48472                    k = C;
 48473                    C = x;
 48474                    x = S;
 48475                    S = w;
 48476                    N.assign(T);
 48477                    N.add(M);
 48478                    w = N;
 48479                  }
 48480                  i.add(w);
 48481                  s.add(S);
 48482                  o.add(x);
 48483                  c.add(C);
 48484                  l.add(k);
 48485                  h.add(v);
 48486                  u.add(F);
 48487                  d.add(O);
 48488                }
 48489                if (n) {
 48490                  R = new Uint8Array(48);
 48491                  i.copyTo(R, 0);
 48492                  s.copyTo(R, 8);
 48493                  o.copyTo(R, 16);
 48494                  c.copyTo(R, 24);
 48495                  l.copyTo(R, 32);
 48496                  h.copyTo(R, 40);
 48497                } else {
 48498                  R = new Uint8Array(64);
 48499                  i.copyTo(R, 0);
 48500                  s.copyTo(R, 8);
 48501                  o.copyTo(R, 16);
 48502                  c.copyTo(R, 24);
 48503                  l.copyTo(R, 32);
 48504                  h.copyTo(R, 40);
 48505                  u.copyTo(R, 48);
 48506                  d.copyTo(R, 56);
 48507                }
 48508                return R;
 48509              };
 48510            })();
 48511            t.calculateSHA512 = c;
 48512            function calculateSHA384(e, t, a) {
 48513              return c(e, t, a, !0);
 48514            }
 48515            class NullCipher {
 48516              decryptBlock(e) {
 48517                return e;
 48518              }
 48519              encrypt(e) {
 48520                return e;
 48521              }
 48522            }
 48523            class AESBaseCipher {
 48524              constructor() {
 48525                this.constructor === AESBaseCipher &&
 48526                  (0, r.unreachable)("Cannot initialize AESBaseCipher.");
 48527                this._s = new Uint8Array([
 48528                  99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215,
 48529                  171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162,
 48530                  175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204,
 48531                  52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150,
 48532                  5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27,
 48533                  110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0,
 48534                  237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208,
 48535                  239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159,
 48536                  168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16,
 48537                  255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126,
 48538                  61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70,
 48539                  238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92,
 48540                  194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141,
 48541                  213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37,
 48542                  46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138,
 48543                  112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193,
 48544                  29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135,
 48545                  233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65,
 48546                  153, 45, 15, 176, 84, 187, 22,
 48547                ]);
 48548                this._inv_s = new Uint8Array([
 48549                  82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243,
 48550                  215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68,
 48551                  196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76,
 48552                  149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178,
 48553                  118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134,
 48554                  104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112,
 48555                  72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132,
 48556                  144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179,
 48557                  69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1,
 48558                  19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207,
 48559                  206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133,
 48560                  226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41,
 48561                  197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75,
 48562                  198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31,
 48563                  221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236,
 48564                  95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147,
 48565                  201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235,
 48566                  187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38,
 48567                  225, 105, 20, 99, 85, 33, 12, 125,
 48568                ]);
 48569                this._mix = new Uint32Array([
 48570                  0, 235474187, 470948374, 303765277, 941896748, 908933415,
 48571                  607530554, 708780849, 1883793496, 2118214995, 1817866830,
 48572                  1649639237, 1215061108, 1181045119, 1417561698, 1517767529,
 48573                  3767586992, 4003061179, 4236429990, 4069246893, 3635733660,
 48574                  3602770327, 3299278474, 3400528769, 2430122216, 2664543715,
 48575                  2362090238, 2193862645, 2835123396, 2801107407, 3035535058,
 48576                  3135740889, 3678124923, 3576870512, 3341394285, 3374361702,
 48577                  3810496343, 3977675356, 4279080257, 4043610186, 2876494627,
 48578                  2776292904, 3076639029, 3110650942, 2472011535, 2640243204,
 48579                  2403728665, 2169303058, 1001089995, 899835584, 666464733,
 48580                  699432150, 59727847, 226906860, 530400753, 294930682,
 48581                  1273168787, 1172967064, 1475418501, 1509430414, 1942435775,
 48582                  2110667444, 1876241833, 1641816226, 2910219766, 2743034109,
 48583                  2976151520, 3211623147, 2505202138, 2606453969, 2302690252,
 48584                  2269728455, 3711829422, 3543599269, 3240894392, 3475313331,
 48585                  3843699074, 3943906441, 4178062228, 4144047775, 1306967366,
 48586                  1139781709, 1374988112, 1610459739, 1975683434, 2076935265,
 48587                  1775276924, 1742315127, 1034867998, 866637845, 566021896,
 48588                  800440835, 92987698, 193195065, 429456164, 395441711,
 48589                  1984812685, 2017778566, 1784663195, 1683407248, 1315562145,
 48590                  1080094634, 1383856311, 1551037884, 101039829, 135050206,
 48591                  437757123, 337553864, 1042385657, 807962610, 573804783,
 48592                  742039012, 2531067453, 2564033334, 2328828971, 2227573024,
 48593                  2935566865, 2700099354, 3001755655, 3168937228, 3868552805,
 48594                  3902563182, 4203181171, 4102977912, 3736164937, 3501741890,
 48595                  3265478751, 3433712980, 1106041591, 1340463100, 1576976609,
 48596                  1408749034, 2043211483, 2009195472, 1708848333, 1809054150,
 48597                  832877231, 1068351396, 766945465, 599762354, 159417987,
 48598                  126454664, 361929877, 463180190, 2709260871, 2943682380,
 48599                  3178106961, 3009879386, 2572697195, 2538681184, 2236228733,
 48600                  2336434550, 3509871135, 3745345300, 3441850377, 3274667266,
 48601                  3910161971, 3877198648, 4110568485, 4211818798, 2597806476,
 48602                  2497604743, 2261089178, 2295101073, 2733856160, 2902087851,
 48603                  3202437046, 2968011453, 3936291284, 3835036895, 4136440770,
 48604                  4169408201, 3535486456, 3702665459, 3467192302, 3231722213,
 48605                  2051518780, 1951317047, 1716890410, 1750902305, 1113818384,
 48606                  1282050075, 1584504582, 1350078989, 168810852, 67556463,
 48607                  371049330, 404016761, 841739592, 1008918595, 775550814,
 48608                  540080725, 3969562369, 3801332234, 4035489047, 4269907996,
 48609                  3569255213, 3669462566, 3366754619, 3332740144, 2631065433,
 48610                  2463879762, 2160117071, 2395588676, 2767645557, 2868897406,
 48611                  3102011747, 3069049960, 202008497, 33778362, 270040487,
 48612                  504459436, 875451293, 975658646, 675039627, 641025152,
 48613                  2084704233, 1917518562, 1615861247, 1851332852, 1147550661,
 48614                  1248802510, 1484005843, 1451044056, 933301370, 967311729,
 48615                  733156972, 632953703, 260388950, 25965917, 328671808, 496906059,
 48616                  1206477858, 1239443753, 1543208500, 1441952575, 2144161806,
 48617                  1908694277, 1675577880, 1842759443, 3610369226, 3644379585,
 48618                  3408119516, 3307916247, 4011190502, 3776767469, 4077384432,
 48619                  4245618683, 2809771154, 2842737049, 3144396420, 3043140495,
 48620                  2673705150, 2438237621, 2203032232, 2370213795,
 48621                ]);
 48622                this._mixCol = new Uint8Array(256);
 48623                for (let e = 0; e < 256; e++)
 48624                  this._mixCol[e] = e < 128 ? e << 1 : (e << 1) ^ 27;
 48625                this.buffer = new Uint8Array(16);
 48626                this.bufferPosition = 0;
 48627              }
 48628              _expandKey(e) {
 48629                (0, r.unreachable)("Cannot call `_expandKey` on the base class");
 48630              }
 48631              _decrypt(e, t) {
 48632                let a, r, n;
 48633                const i = new Uint8Array(16);
 48634                i.set(e);
 48635                for (let e = 0, a = this._keySize; e < 16; ++e, ++a) i[e] ^= t[a];
 48636                for (let e = this._cyclesOfRepetition - 1; e >= 1; --e) {
 48637                  a = i[13];
 48638                  i[13] = i[9];
 48639                  i[9] = i[5];
 48640                  i[5] = i[1];
 48641                  i[1] = a;
 48642                  a = i[14];
 48643                  r = i[10];
 48644                  i[14] = i[6];
 48645                  i[10] = i[2];
 48646                  i[6] = a;
 48647                  i[2] = r;
 48648                  a = i[15];
 48649                  r = i[11];
 48650                  n = i[7];
 48651                  i[15] = i[3];
 48652                  i[11] = a;
 48653                  i[7] = r;
 48654                  i[3] = n;
 48655                  for (let e = 0; e < 16; ++e) i[e] = this._inv_s[i[e]];
 48656                  for (let a = 0, r = 16 * e; a < 16; ++a, ++r) i[a] ^= t[r];
 48657                  for (let e = 0; e < 16; e += 4) {
 48658                    const t = this._mix[i[e]],
 48659                      r = this._mix[i[e + 1]],
 48660                      n = this._mix[i[e + 2]],
 48661                      s = this._mix[i[e + 3]];
 48662                    a =
 48663                      t ^
 48664                      (r >>> 8) ^
 48665                      (r << 24) ^
 48666                      (n >>> 16) ^
 48667                      (n << 16) ^
 48668                      (s >>> 24) ^
 48669                      (s << 8);
 48670                    i[e] = (a >>> 24) & 255;
 48671                    i[e + 1] = (a >> 16) & 255;
 48672                    i[e + 2] = (a >> 8) & 255;
 48673                    i[e + 3] = 255 & a;
 48674                  }
 48675                }
 48676                a = i[13];
 48677                i[13] = i[9];
 48678                i[9] = i[5];
 48679                i[5] = i[1];
 48680                i[1] = a;
 48681                a = i[14];
 48682                r = i[10];
 48683                i[14] = i[6];
 48684                i[10] = i[2];
 48685                i[6] = a;
 48686                i[2] = r;
 48687                a = i[15];
 48688                r = i[11];
 48689                n = i[7];
 48690                i[15] = i[3];
 48691                i[11] = a;
 48692                i[7] = r;
 48693                i[3] = n;
 48694                for (let e = 0; e < 16; ++e) {
 48695                  i[e] = this._inv_s[i[e]];
 48696                  i[e] ^= t[e];
 48697                }
 48698                return i;
 48699              }
 48700              _encrypt(e, t) {
 48701                const a = this._s;
 48702                let r, n, i;
 48703                const s = new Uint8Array(16);
 48704                s.set(e);
 48705                for (let e = 0; e < 16; ++e) s[e] ^= t[e];
 48706                for (let e = 1; e < this._cyclesOfRepetition; e++) {
 48707                  for (let e = 0; e < 16; ++e) s[e] = a[s[e]];
 48708                  i = s[1];
 48709                  s[1] = s[5];
 48710                  s[5] = s[9];
 48711                  s[9] = s[13];
 48712                  s[13] = i;
 48713                  i = s[2];
 48714                  n = s[6];
 48715                  s[2] = s[10];
 48716                  s[6] = s[14];
 48717                  s[10] = i;
 48718                  s[14] = n;
 48719                  i = s[3];
 48720                  n = s[7];
 48721                  r = s[11];
 48722                  s[3] = s[15];
 48723                  s[7] = i;
 48724                  s[11] = n;
 48725                  s[15] = r;
 48726                  for (let e = 0; e < 16; e += 4) {
 48727                    const t = s[e + 0],
 48728                      a = s[e + 1],
 48729                      n = s[e + 2],
 48730                      i = s[e + 3];
 48731                    r = t ^ a ^ n ^ i;
 48732                    s[e + 0] ^= r ^ this._mixCol[t ^ a];
 48733                    s[e + 1] ^= r ^ this._mixCol[a ^ n];
 48734                    s[e + 2] ^= r ^ this._mixCol[n ^ i];
 48735                    s[e + 3] ^= r ^ this._mixCol[i ^ t];
 48736                  }
 48737                  for (let a = 0, r = 16 * e; a < 16; ++a, ++r) s[a] ^= t[r];
 48738                }
 48739                for (let e = 0; e < 16; ++e) s[e] = a[s[e]];
 48740                i = s[1];
 48741                s[1] = s[5];
 48742                s[5] = s[9];
 48743                s[9] = s[13];
 48744                s[13] = i;
 48745                i = s[2];
 48746                n = s[6];
 48747                s[2] = s[10];
 48748                s[6] = s[14];
 48749                s[10] = i;
 48750                s[14] = n;
 48751                i = s[3];
 48752                n = s[7];
 48753                r = s[11];
 48754                s[3] = s[15];
 48755                s[7] = i;
 48756                s[11] = n;
 48757                s[15] = r;
 48758                for (let e = 0, a = this._keySize; e < 16; ++e, ++a) s[e] ^= t[a];
 48759                return s;
 48760              }
 48761              _decryptBlock2(e, t) {
 48762                const a = e.length;
 48763                let r = this.buffer,
 48764                  n = this.bufferPosition;
 48765                const i = [];
 48766                let s = this.iv;
 48767                for (let t = 0; t < a; ++t) {
 48768                  r[n] = e[t];
 48769                  ++n;
 48770                  if (n < 16) continue;
 48771                  const a = this._decrypt(r, this._key);
 48772                  for (let e = 0; e < 16; ++e) a[e] ^= s[e];
 48773                  s = r;
 48774                  i.push(a);
 48775                  r = new Uint8Array(16);
 48776                  n = 0;
 48777                }
 48778                this.buffer = r;
 48779                this.bufferLength = n;
 48780                this.iv = s;
 48781                if (0 === i.length) return new Uint8Array(0);
 48782                let o = 16 * i.length;
 48783                if (t) {
 48784                  const e = i.at(-1);
 48785                  let t = e[15];
 48786                  if (t <= 16) {
 48787                    for (let a = 15, r = 16 - t; a >= r; --a)
 48788                      if (e[a] !== t) {
 48789                        t = 0;
 48790                        break;
 48791                      }
 48792                    o -= t;
 48793                    i[i.length - 1] = e.subarray(0, 16 - t);
 48794                  }
 48795                }
 48796                const c = new Uint8Array(o);
 48797                for (let e = 0, t = 0, a = i.length; e < a; ++e, t += 16)
 48798                  c.set(i[e], t);
 48799                return c;
 48800              }
 48801              decryptBlock(e, t, a = null) {
 48802                const r = e.length,
 48803                  n = this.buffer;
 48804                let i = this.bufferPosition;
 48805                if (a) this.iv = a;
 48806                else {
 48807                  for (let t = 0; i < 16 && t < r; ++t, ++i) n[i] = e[t];
 48808                  if (i < 16) {
 48809                    this.bufferLength = i;
 48810                    return new Uint8Array(0);
 48811                  }
 48812                  this.iv = n;
 48813                  e = e.subarray(16);
 48814                }
 48815                this.buffer = new Uint8Array(16);
 48816                this.bufferLength = 0;
 48817                this.decryptBlock = this._decryptBlock2;
 48818                return this.decryptBlock(e, t);
 48819              }
 48820              encrypt(e, t) {
 48821                const a = e.length;
 48822                let r = this.buffer,
 48823                  n = this.bufferPosition;
 48824                const i = [];
 48825                t || (t = new Uint8Array(16));
 48826                for (let s = 0; s < a; ++s) {
 48827                  r[n] = e[s];
 48828                  ++n;
 48829                  if (n < 16) continue;
 48830                  for (let e = 0; e < 16; ++e) r[e] ^= t[e];
 48831                  const a = this._encrypt(r, this._key);
 48832                  t = a;
 48833                  i.push(a);
 48834                  r = new Uint8Array(16);
 48835                  n = 0;
 48836                }
 48837                this.buffer = r;
 48838                this.bufferLength = n;
 48839                this.iv = t;
 48840                if (0 === i.length) return new Uint8Array(0);
 48841                const s = 16 * i.length,
 48842                  o = new Uint8Array(s);
 48843                for (let e = 0, t = 0, a = i.length; e < a; ++e, t += 16)
 48844                  o.set(i[e], t);
 48845                return o;
 48846              }
 48847            }
 48848            class AES128Cipher extends AESBaseCipher {
 48849              constructor(e) {
 48850                super();
 48851                this._cyclesOfRepetition = 10;
 48852                this._keySize = 160;
 48853                this._rcon = new Uint8Array([
 48854                  141, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77,
 48855                  154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250,
 48856                  239, 197, 145, 57, 114, 228, 211, 189, 97, 194, 159, 37, 74,
 48857                  148, 51, 102, 204, 131, 29, 58, 116, 232, 203, 141, 1, 2, 4, 8,
 48858                  16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188,
 48859                  99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145, 57,
 48860                  114, 228, 211, 189, 97, 194, 159, 37, 74, 148, 51, 102, 204,
 48861                  131, 29, 58, 116, 232, 203, 141, 1, 2, 4, 8, 16, 32, 64, 128,
 48862                  27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53,
 48863                  106, 212, 179, 125, 250, 239, 197, 145, 57, 114, 228, 211, 189,
 48864                  97, 194, 159, 37, 74, 148, 51, 102, 204, 131, 29, 58, 116, 232,
 48865                  203, 141, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171,
 48866                  77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250,
 48867                  239, 197, 145, 57, 114, 228, 211, 189, 97, 194, 159, 37, 74,
 48868                  148, 51, 102, 204, 131, 29, 58, 116, 232, 203, 141, 1, 2, 4, 8,
 48869                  16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188,
 48870                  99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145, 57,
 48871                  114, 228, 211, 189, 97, 194, 159, 37, 74, 148, 51, 102, 204,
 48872                  131, 29, 58, 116, 232, 203, 141,
 48873                ]);
 48874                this._key = this._expandKey(e);
 48875              }
 48876              _expandKey(e) {
 48877                const t = this._s,
 48878                  a = this._rcon,
 48879                  r = new Uint8Array(176);
 48880                r.set(e);
 48881                for (let e = 16, n = 1; e < 176; ++n) {
 48882                  let i = r[e - 3],
 48883                    s = r[e - 2],
 48884                    o = r[e - 1],
 48885                    c = r[e - 4];
 48886                  i = t[i];
 48887                  s = t[s];
 48888                  o = t[o];
 48889                  c = t[c];
 48890                  i ^= a[n];
 48891                  for (let t = 0; t < 4; ++t) {
 48892                    r[e] = i ^= r[e - 16];
 48893                    e++;
 48894                    r[e] = s ^= r[e - 16];
 48895                    e++;
 48896                    r[e] = o ^= r[e - 16];
 48897                    e++;
 48898                    r[e] = c ^= r[e - 16];
 48899                    e++;
 48900                  }
 48901                }
 48902                return r;
 48903              }
 48904            }
 48905            t.AES128Cipher = AES128Cipher;
 48906            class AES256Cipher extends AESBaseCipher {
 48907              constructor(e) {
 48908                super();
 48909                this._cyclesOfRepetition = 14;
 48910                this._keySize = 224;
 48911                this._key = this._expandKey(e);
 48912              }
 48913              _expandKey(e) {
 48914                const t = this._s,
 48915                  a = new Uint8Array(240);
 48916                a.set(e);
 48917                let r,
 48918                  n,
 48919                  i,
 48920                  s,
 48921                  o = 1;
 48922                for (let e = 32, c = 1; e < 240; ++c) {
 48923                  if (e % 32 == 16) {
 48924                    r = t[r];
 48925                    n = t[n];
 48926                    i = t[i];
 48927                    s = t[s];
 48928                  } else if (e % 32 == 0) {
 48929                    r = a[e - 3];
 48930                    n = a[e - 2];
 48931                    i = a[e - 1];
 48932                    s = a[e - 4];
 48933                    r = t[r];
 48934                    n = t[n];
 48935                    i = t[i];
 48936                    s = t[s];
 48937                    r ^= o;
 48938                    (o <<= 1) >= 256 && (o = 255 & (27 ^ o));
 48939                  }
 48940                  for (let t = 0; t < 4; ++t) {
 48941                    a[e] = r ^= a[e - 32];
 48942                    e++;
 48943                    a[e] = n ^= a[e - 32];
 48944                    e++;
 48945                    a[e] = i ^= a[e - 32];
 48946                    e++;
 48947                    a[e] = s ^= a[e - 32];
 48948                    e++;
 48949                  }
 48950                }
 48951                return a;
 48952              }
 48953            }
 48954            t.AES256Cipher = AES256Cipher;
 48955            class PDF17 {
 48956              checkOwnerPassword(e, t, a, n) {
 48957                const i = new Uint8Array(e.length + 56);
 48958                i.set(e, 0);
 48959                i.set(t, e.length);
 48960                i.set(a, e.length + t.length);
 48961                const s = o(i, 0, i.length);
 48962                return (0, r.isArrayEqual)(s, n);
 48963              }
 48964              checkUserPassword(e, t, a) {
 48965                const n = new Uint8Array(e.length + 8);
 48966                n.set(e, 0);
 48967                n.set(t, e.length);
 48968                const i = o(n, 0, n.length);
 48969                return (0, r.isArrayEqual)(i, a);
 48970              }
 48971              getOwnerKey(e, t, a, r) {
 48972                const n = new Uint8Array(e.length + 56);
 48973                n.set(e, 0);
 48974                n.set(t, e.length);
 48975                n.set(a, e.length + t.length);
 48976                const i = o(n, 0, n.length);
 48977                return new AES256Cipher(i).decryptBlock(
 48978                  r,
 48979                  !1,
 48980                  new Uint8Array(16),
 48981                );
 48982              }
 48983              getUserKey(e, t, a) {
 48984                const r = new Uint8Array(e.length + 8);
 48985                r.set(e, 0);
 48986                r.set(t, e.length);
 48987                const n = o(r, 0, r.length);
 48988                return new AES256Cipher(n).decryptBlock(
 48989                  a,
 48990                  !1,
 48991                  new Uint8Array(16),
 48992                );
 48993              }
 48994            }
 48995            t.PDF17 = PDF17;
 48996            class PDF20 {
 48997              _hash(e, t, a) {
 48998                let r = o(t, 0, t.length).subarray(0, 32),
 48999                  n = [0],
 49000                  i = 0;
 49001                for (; i < 64 || n.at(-1) > i - 32; ) {
 49002                  const t = e.length + r.length + a.length,
 49003                    s = new Uint8Array(t);
 49004                  let l = 0;
 49005                  s.set(e, l);
 49006                  l += e.length;
 49007                  s.set(r, l);
 49008                  l += r.length;
 49009                  s.set(a, l);
 49010                  const h = new Uint8Array(64 * t);
 49011                  for (let e = 0, a = 0; e < 64; e++, a += t) h.set(s, a);
 49012                  n = new AES128Cipher(r.subarray(0, 16)).encrypt(
 49013                    h,
 49014                    r.subarray(16, 32),
 49015                  );
 49016                  const u = n.slice(0, 16).reduce((e, t) => e + t, 0) % 3;
 49017                  0 === u
 49018                    ? (r = o(n, 0, n.length))
 49019                    : 1 === u
 49020                      ? (r = calculateSHA384(n, 0, n.length))
 49021                      : 2 === u && (r = c(n, 0, n.length));
 49022                  i++;
 49023                }
 49024                return r.subarray(0, 32);
 49025              }
 49026              checkOwnerPassword(e, t, a, n) {
 49027                const i = new Uint8Array(e.length + 56);
 49028                i.set(e, 0);
 49029                i.set(t, e.length);
 49030                i.set(a, e.length + t.length);
 49031                const s = this._hash(e, i, a);
 49032                return (0, r.isArrayEqual)(s, n);
 49033              }
 49034              checkUserPassword(e, t, a) {
 49035                const n = new Uint8Array(e.length + 8);
 49036                n.set(e, 0);
 49037                n.set(t, e.length);
 49038                const i = this._hash(e, n, []);
 49039                return (0, r.isArrayEqual)(i, a);
 49040              }
 49041              getOwnerKey(e, t, a, r) {
 49042                const n = new Uint8Array(e.length + 56);
 49043                n.set(e, 0);
 49044                n.set(t, e.length);
 49045                n.set(a, e.length + t.length);
 49046                const i = this._hash(e, n, a);
 49047                return new AES256Cipher(i).decryptBlock(
 49048                  r,
 49049                  !1,
 49050                  new Uint8Array(16),
 49051                );
 49052              }
 49053              getUserKey(e, t, a) {
 49054                const r = new Uint8Array(e.length + 8);
 49055                r.set(e, 0);
 49056                r.set(t, e.length);
 49057                const n = this._hash(e, r, []);
 49058                return new AES256Cipher(n).decryptBlock(
 49059                  a,
 49060                  !1,
 49061                  new Uint8Array(16),
 49062                );
 49063              }
 49064            }
 49065            t.PDF20 = PDF20;
 49066            class CipherTransform {
 49067              constructor(e, t) {
 49068                this.StringCipherConstructor = e;
 49069                this.StreamCipherConstructor = t;
 49070              }
 49071              createStream(e, t) {
 49072                const a = new this.StreamCipherConstructor();
 49073                return new i.DecryptStream(
 49074                  e,
 49075                  t,
 49076                  function cipherTransformDecryptStream(e, t) {
 49077                    return a.decryptBlock(e, t);
 49078                  },
 49079                );
 49080              }
 49081              decryptString(e) {
 49082                const t = new this.StringCipherConstructor();
 49083                let a = (0, r.stringToBytes)(e);
 49084                a = t.decryptBlock(a, !0);
 49085                return (0, r.bytesToString)(a);
 49086              }
 49087              encryptString(e) {
 49088                const t = new this.StringCipherConstructor();
 49089                if (t instanceof AESBaseCipher) {
 49090                  const a = 16 - (e.length % 16);
 49091                  e += String.fromCharCode(a).repeat(a);
 49092                  const n = new Uint8Array(16);
 49093                  if ("undefined" != typeof crypto) crypto.getRandomValues(n);
 49094                  else
 49095                    for (let e = 0; e < 16; e++)
 49096                      n[e] = Math.floor(256 * Math.random());
 49097                  let i = (0, r.stringToBytes)(e);
 49098                  i = t.encrypt(i, n);
 49099                  const s = new Uint8Array(16 + i.length);
 49100                  s.set(n);
 49101                  s.set(i, 16);
 49102                  return (0, r.bytesToString)(s);
 49103                }
 49104                let a = (0, r.stringToBytes)(e);
 49105                a = t.encrypt(a);
 49106                return (0, r.bytesToString)(a);
 49107              }
 49108            }
 49109            class CipherTransformFactory {
 49110              static #O = new Uint8Array([
 49111                40, 191, 78, 94, 78, 117, 138, 65, 100, 0, 78, 86, 255, 250, 1, 8,
 49112                46, 46, 0, 182, 208, 104, 62, 128, 47, 12, 169, 254, 100, 83, 105,
 49113                122,
 49114              ]);
 49115              #I(e, t, a, r, n, i, s, o, c, l, h, u) {
 49116                if (t) {
 49117                  const e = Math.min(127, t.length);
 49118                  t = t.subarray(0, e);
 49119                } else t = [];
 49120                const d = 6 === e ? new PDF20() : new PDF17();
 49121                return d.checkUserPassword(t, o, s)
 49122                  ? d.getUserKey(t, c, h)
 49123                  : t.length && d.checkOwnerPassword(t, r, i, a)
 49124                    ? d.getOwnerKey(t, n, i, l)
 49125                    : null;
 49126              }
 49127              #T(e, t, a, r, n, i, o, c) {
 49128                const l = 40 + a.length + e.length,
 49129                  h = new Uint8Array(l);
 49130                let u,
 49131                  d,
 49132                  f = 0;
 49133                if (t) {
 49134                  d = Math.min(32, t.length);
 49135                  for (; f < d; ++f) h[f] = t[f];
 49136                }
 49137                u = 0;
 49138                for (; f < 32; ) h[f++] = CipherTransformFactory.#O[u++];
 49139                for (u = 0, d = a.length; u < d; ++u) h[f++] = a[u];
 49140                h[f++] = 255 & n;
 49141                h[f++] = (n >> 8) & 255;
 49142                h[f++] = (n >> 16) & 255;
 49143                h[f++] = (n >>> 24) & 255;
 49144                for (u = 0, d = e.length; u < d; ++u) h[f++] = e[u];
 49145                if (i >= 4 && !c) {
 49146                  h[f++] = 255;
 49147                  h[f++] = 255;
 49148                  h[f++] = 255;
 49149                  h[f++] = 255;
 49150                }
 49151                let g = s(h, 0, f);
 49152                const p = o >> 3;
 49153                if (i >= 3) for (u = 0; u < 50; ++u) g = s(g, 0, p);
 49154                const m = g.subarray(0, p);
 49155                let b, y;
 49156                if (i >= 3) {
 49157                  for (f = 0; f < 32; ++f) h[f] = CipherTransformFactory.#O[f];
 49158                  for (u = 0, d = e.length; u < d; ++u) h[f++] = e[u];
 49159                  b = new ARCFourCipher(m);
 49160                  y = b.encryptBlock(s(h, 0, f));
 49161                  d = m.length;
 49162                  const t = new Uint8Array(d);
 49163                  for (u = 1; u <= 19; ++u) {
 49164                    for (let e = 0; e < d; ++e) t[e] = m[e] ^ u;
 49165                    b = new ARCFourCipher(t);
 49166                    y = b.encryptBlock(y);
 49167                  }
 49168                  for (u = 0, d = y.length; u < d; ++u)
 49169                    if (r[u] !== y[u]) return null;
 49170                } else {
 49171                  b = new ARCFourCipher(m);
 49172                  y = b.encryptBlock(CipherTransformFactory.#O);
 49173                  for (u = 0, d = y.length; u < d; ++u)
 49174                    if (r[u] !== y[u]) return null;
 49175                }
 49176                return m;
 49177              }
 49178              #M(e, t, a, r) {
 49179                const n = new Uint8Array(32);
 49180                let i = 0;
 49181                const o = Math.min(32, e.length);
 49182                for (; i < o; ++i) n[i] = e[i];
 49183                let c = 0;
 49184                for (; i < 32; ) n[i++] = CipherTransformFactory.#O[c++];
 49185                let l = s(n, 0, i);
 49186                const h = r >> 3;
 49187                if (a >= 3) for (c = 0; c < 50; ++c) l = s(l, 0, l.length);
 49188                let u, d;
 49189                if (a >= 3) {
 49190                  d = t;
 49191                  const e = new Uint8Array(h);
 49192                  for (c = 19; c >= 0; c--) {
 49193                    for (let t = 0; t < h; ++t) e[t] = l[t] ^ c;
 49194                    u = new ARCFourCipher(e);
 49195                    d = u.encryptBlock(d);
 49196                  }
 49197                } else {
 49198                  u = new ARCFourCipher(l.subarray(0, h));
 49199                  d = u.encryptBlock(t);
 49200                }
 49201                return d;
 49202              }
 49203              #P(e, t, a, r = !1) {
 49204                const n = new Uint8Array(a.length + 9),
 49205                  i = a.length;
 49206                let o;
 49207                for (o = 0; o < i; ++o) n[o] = a[o];
 49208                n[o++] = 255 & e;
 49209                n[o++] = (e >> 8) & 255;
 49210                n[o++] = (e >> 16) & 255;
 49211                n[o++] = 255 & t;
 49212                n[o++] = (t >> 8) & 255;
 49213                if (r) {
 49214                  n[o++] = 115;
 49215                  n[o++] = 65;
 49216                  n[o++] = 108;
 49217                  n[o++] = 84;
 49218                }
 49219                return s(n, 0, o).subarray(0, Math.min(a.length + 5, 16));
 49220              }
 49221              #D(e, t, a, i, s) {
 49222                if (!(t instanceof n.Name))
 49223                  throw new r.FormatError("Invalid crypt filter name.");
 49224                const o = this,
 49225                  c = e.get(t.name),
 49226                  l = c?.get("CFM");
 49227                if (!l || "None" === l.name)
 49228                  return function () {
 49229                    return new NullCipher();
 49230                  };
 49231                if ("V2" === l.name)
 49232                  return function () {
 49233                    return new ARCFourCipher(o.#P(a, i, s, !1));
 49234                  };
 49235                if ("AESV2" === l.name)
 49236                  return function () {
 49237                    return new AES128Cipher(o.#P(a, i, s, !0));
 49238                  };
 49239                if ("AESV3" === l.name)
 49240                  return function () {
 49241                    return new AES256Cipher(s);
 49242                  };
 49243                throw new r.FormatError("Unknown crypto method");
 49244              }
 49245              constructor(e, t, a) {
 49246                const i = e.get("Filter");
 49247                if (!(0, n.isName)(i, "Standard"))
 49248                  throw new r.FormatError("unknown encryption method");
 49249                this.filterName = i.name;
 49250                this.dict = e;
 49251                const s = e.get("V");
 49252                if (
 49253                  !Number.isInteger(s) ||
 49254                  (1 !== s && 2 !== s && 4 !== s && 5 !== s)
 49255                )
 49256                  throw new r.FormatError("unsupported encryption algorithm");
 49257                this.algorithm = s;
 49258                let o = e.get("Length");
 49259                if (!o)
 49260                  if (s <= 3) o = 40;
 49261                  else {
 49262                    const t = e.get("CF"),
 49263                      a = e.get("StmF");
 49264                    if (t instanceof n.Dict && a instanceof n.Name) {
 49265                      t.suppressEncryption = !0;
 49266                      const e = t.get(a.name);
 49267                      o = e?.get("Length") || 128;
 49268                      o < 40 && (o <<= 3);
 49269                    }
 49270                  }
 49271                if (!Number.isInteger(o) || o < 40 || o % 8 != 0)
 49272                  throw new r.FormatError("invalid key length");
 49273                const c = (0, r.stringToBytes)(e.get("O")),
 49274                  l = (0, r.stringToBytes)(e.get("U")),
 49275                  h = c.subarray(0, 32),
 49276                  u = l.subarray(0, 32),
 49277                  d = e.get("P"),
 49278                  f = e.get("R"),
 49279                  g = (4 === s || 5 === s) && !1 !== e.get("EncryptMetadata");
 49280                this.encryptMetadata = g;
 49281                const p = (0, r.stringToBytes)(t);
 49282                let m, b;
 49283                if (a) {
 49284                  if (6 === f)
 49285                    try {
 49286                      a = (0, r.utf8StringToString)(a);
 49287                    } catch {
 49288                      (0, r.warn)(
 49289                        "CipherTransformFactory: Unable to convert UTF8 encoded password.",
 49290                      );
 49291                    }
 49292                  m = (0, r.stringToBytes)(a);
 49293                }
 49294                if (5 !== s) b = this.#T(p, m, h, u, d, f, o, g);
 49295                else {
 49296                  const t = c.subarray(32, 40),
 49297                    a = c.subarray(40, 48),
 49298                    n = l.subarray(0, 48),
 49299                    i = l.subarray(32, 40),
 49300                    s = l.subarray(40, 48),
 49301                    o = (0, r.stringToBytes)(e.get("OE")),
 49302                    d = (0, r.stringToBytes)(e.get("UE")),
 49303                    g = (0, r.stringToBytes)(e.get("Perms"));
 49304                  b = this.#I(f, m, h, t, a, n, u, i, s, o, d, g);
 49305                }
 49306                if (!b && !a)
 49307                  throw new r.PasswordException(
 49308                    "No password given",
 49309                    r.PasswordResponses.NEED_PASSWORD,
 49310                  );
 49311                if (!b && a) {
 49312                  const e = this.#M(m, h, f, o);
 49313                  b = this.#T(p, e, h, u, d, f, o, g);
 49314                }
 49315                if (!b)
 49316                  throw new r.PasswordException(
 49317                    "Incorrect Password",
 49318                    r.PasswordResponses.INCORRECT_PASSWORD,
 49319                  );
 49320                this.encryptionKey = b;
 49321                if (s >= 4) {
 49322                  const t = e.get("CF");
 49323                  t instanceof n.Dict && (t.suppressEncryption = !0);
 49324                  this.cf = t;
 49325                  this.stmf = e.get("StmF") || n.Name.get("Identity");
 49326                  this.strf = e.get("StrF") || n.Name.get("Identity");
 49327                  this.eff = e.get("EFF") || this.stmf;
 49328                }
 49329              }
 49330              createCipherTransform(e, t) {
 49331                if (4 === this.algorithm || 5 === this.algorithm)
 49332                  return new CipherTransform(
 49333                    this.#D(this.cf, this.strf, e, t, this.encryptionKey),
 49334                    this.#D(this.cf, this.stmf, e, t, this.encryptionKey),
 49335                  );
 49336                const a = this.#P(e, t, this.encryptionKey, !1),
 49337                  cipherConstructor = function () {
 49338                    return new ARCFourCipher(a);
 49339                  };
 49340                return new CipherTransform(cipherConstructor, cipherConstructor);
 49341              }
 49342            }
 49343            t.CipherTransformFactory = CipherTransformFactory;
 49344          },
 49345          (e, t, a) => {
 49346            Object.defineProperty(t, "__esModule", { value: !0 });
 49347            t.DecryptStream = void 0;
 49348            var r = a(18);
 49349            class DecryptStream extends r.DecodeStream {
 49350              constructor(e, t, a) {
 49351                super(t);
 49352                this.str = e;
 49353                this.dict = e.dict;
 49354                this.decrypt = a;
 49355                this.nextChunk = null;
 49356                this.initialized = !1;
 49357              }
 49358              readBlock() {
 49359                let e;
 49360                if (this.initialized) e = this.nextChunk;
 49361                else {
 49362                  e = this.str.getBytes(512);
 49363                  this.initialized = !0;
 49364                }
 49365                if (!e || 0 === e.length) {
 49366                  this.eof = !0;
 49367                  return;
 49368                }
 49369                this.nextChunk = this.str.getBytes(512);
 49370                const t = this.nextChunk?.length > 0;
 49371                e = (0, this.decrypt)(e, !t);
 49372                const a = this.bufferLength,
 49373                  r = a + e.length;
 49374                this.ensureBuffer(r).set(e, a);
 49375                this.bufferLength = r;
 49376              }
 49377            }
 49378            t.DecryptStream = DecryptStream;
 49379          },
 49380          (e, t, a) => {
 49381            Object.defineProperty(t, "__esModule", { value: !0 });
 49382            t.ObjectLoader = void 0;
 49383            var r = a(4),
 49384              n = a(5),
 49385              i = a(3),
 49386              s = a(2);
 49387            function addChildren(e, t) {
 49388              if (e instanceof r.Dict) e = e.getRawValues();
 49389              else if (e instanceof n.BaseStream) e = e.dict.getRawValues();
 49390              else if (!Array.isArray(e)) return;
 49391              for (const i of e)
 49392                ((a = i) instanceof r.Ref ||
 49393                  a instanceof r.Dict ||
 49394                  a instanceof n.BaseStream ||
 49395                  Array.isArray(a)) &&
 49396                  t.push(i);
 49397              var a;
 49398            }
 49399            t.ObjectLoader = class ObjectLoader {
 49400              constructor(e, t, a) {
 49401                this.dict = e;
 49402                this.keys = t;
 49403                this.xref = a;
 49404                this.refSet = null;
 49405              }
 49406              async load() {
 49407                if (this.xref.stream.isDataLoaded) return;
 49408                const { keys: e, dict: t } = this;
 49409                this.refSet = new r.RefSet();
 49410                const a = [];
 49411                for (const r of e) {
 49412                  const e = t.getRaw(r);
 49413                  void 0 !== e && a.push(e);
 49414                }
 49415                return this._walk(a);
 49416              }
 49417              async _walk(e) {
 49418                const t = [],
 49419                  a = [];
 49420                for (; e.length; ) {
 49421                  let o = e.pop();
 49422                  if (o instanceof r.Ref) {
 49423                    if (this.refSet.has(o)) continue;
 49424                    try {
 49425                      this.refSet.put(o);
 49426                      o = this.xref.fetch(o);
 49427                    } catch (e) {
 49428                      if (!(e instanceof i.MissingDataException)) {
 49429                        (0, s.warn)(
 49430                          `ObjectLoader._walk - requesting all data: "${e}".`,
 49431                        );
 49432                        this.refSet = null;
 49433                        const { manager: t } = this.xref.stream;
 49434                        return t.requestAllChunks();
 49435                      }
 49436                      t.push(o);
 49437                      a.push({ begin: e.begin, end: e.end });
 49438                    }
 49439                  }
 49440                  if (o instanceof n.BaseStream) {
 49441                    const e = o.getBaseStreams();
 49442                    if (e) {
 49443                      let r = !1;
 49444                      for (const t of e)
 49445                        if (!t.isDataLoaded) {
 49446                          r = !0;
 49447                          a.push({ begin: t.start, end: t.end });
 49448                        }
 49449                      r && t.push(o);
 49450                    }
 49451                  }
 49452                  addChildren(o, e);
 49453                }
 49454                if (a.length) {
 49455                  await this.xref.stream.manager.requestRanges(a);
 49456                  for (const e of t) e instanceof r.Ref && this.refSet.remove(e);
 49457                  return this._walk(t);
 49458                }
 49459                this.refSet = null;
 49460              }
 49461            };
 49462          },
 49463          (e, t, a) => {
 49464            Object.defineProperty(t, "__esModule", { value: !0 });
 49465            t.XFAFactory = void 0;
 49466            var r = a(78),
 49467              n = a(79),
 49468              i = a(89),
 49469              s = a(85),
 49470              o = a(84),
 49471              c = a(2),
 49472              l = a(90),
 49473              h = a(100);
 49474            class XFAFactory {
 49475              constructor(e) {
 49476                try {
 49477                  this.root = new l.XFAParser().parse(
 49478                    XFAFactory._createDocument(e),
 49479                  );
 49480                  const t = new n.Binder(this.root);
 49481                  this.form = t.bind();
 49482                  this.dataHandler = new i.DataHandler(this.root, t.getData());
 49483                  this.form[r.$globalData].template = this.form;
 49484                } catch (e) {
 49485                  (0, c.warn)(
 49486                    `XFA - an error occurred during parsing and binding: ${e}`,
 49487                  );
 49488                }
 49489              }
 49490              isValid() {
 49491                return this.root && this.form;
 49492              }
 49493              _createPagesHelper() {
 49494                const e = this.form[r.$toPages]();
 49495                return new Promise((t, a) => {
 49496                  const nextIteration = () => {
 49497                    try {
 49498                      const a = e.next();
 49499                      a.done ? t(a.value) : setTimeout(nextIteration, 0);
 49500                    } catch (e) {
 49501                      a(e);
 49502                    }
 49503                  };
 49504                  setTimeout(nextIteration, 0);
 49505                });
 49506              }
 49507              async _createPages() {
 49508                try {
 49509                  this.pages = await this._createPagesHelper();
 49510                  this.dims = this.pages.children.map((e) => {
 49511                    const { width: t, height: a } = e.attributes.style;
 49512                    return [0, 0, parseInt(t), parseInt(a)];
 49513                  });
 49514                } catch (e) {
 49515                  (0, c.warn)(`XFA - an error occurred during layout: ${e}`);
 49516                }
 49517              }
 49518              getBoundingBox(e) {
 49519                return this.dims[e];
 49520              }
 49521              async getNumPages() {
 49522                this.pages || (await this._createPages());
 49523                return this.dims.length;
 49524              }
 49525              setImages(e) {
 49526                this.form[r.$globalData].images = e;
 49527              }
 49528              setFonts(e) {
 49529                this.form[r.$globalData].fontFinder = new s.FontFinder(e);
 49530                const t = [];
 49531                for (let e of this.form[r.$globalData].usedTypefaces) {
 49532                  e = (0, o.stripQuotes)(e);
 49533                  this.form[r.$globalData].fontFinder.find(e) || t.push(e);
 49534                }
 49535                return t.length > 0 ? t : null;
 49536              }
 49537              appendFonts(e, t) {
 49538                this.form[r.$globalData].fontFinder.add(e, t);
 49539              }
 49540              async getPages() {
 49541                this.pages || (await this._createPages());
 49542                const e = this.pages;
 49543                this.pages = null;
 49544                return e;
 49545              }
 49546              serializeData(e) {
 49547                return this.dataHandler.serialize(e);
 49548              }
 49549              static _createDocument(e) {
 49550                return e["/xdp:xdp"] ? Object.values(e).join("") : e["xdp:xdp"];
 49551              }
 49552              static getRichTextAsHtml(e) {
 49553                if (!e || "string" != typeof e) return null;
 49554                try {
 49555                  let t = new l.XFAParser(h.XhtmlNamespace, !0).parse(e);
 49556                  if (!["body", "xhtml"].includes(t[r.$nodeName])) {
 49557                    const e = h.XhtmlNamespace.body({});
 49558                    e[r.$appendChild](t);
 49559                    t = e;
 49560                  }
 49561                  const a = t[r.$toHTML]();
 49562                  if (!a.success) return null;
 49563                  const { html: n } = a,
 49564                    { attributes: i } = n;
 49565                  if (i) {
 49566                    i.class &&
 49567                      (i.class = i.class.filter((e) => !e.startsWith("xfa")));
 49568                    i.dir = "auto";
 49569                  }
 49570                  return { html: n, str: t[r.$text]() };
 49571                } catch (e) {
 49572                  (0, c.warn)(
 49573                    `XFA - an error occurred during parsing of rich text: ${e}`,
 49574                  );
 49575                }
 49576                return null;
 49577              }
 49578            }
 49579            t.XFAFactory = XFAFactory;
 49580          },
 49581          (e, t) => {
 49582            Object.defineProperty(t, "__esModule", { value: !0 });
 49583            t.$uid =
 49584              t.$toStyle =
 49585              t.$toString =
 49586              t.$toPages =
 49587              t.$toHTML =
 49588              t.$text =
 49589              t.$tabIndex =
 49590              t.$setValue =
 49591              t.$setSetAttributes =
 49592              t.$setId =
 49593              t.$searchNode =
 49594              t.$root =
 49595              t.$resolvePrototypes =
 49596              t.$removeChild =
 49597              t.$pushPara =
 49598              t.$pushGlyphs =
 49599              t.$popPara =
 49600              t.$onText =
 49601              t.$onChildCheck =
 49602              t.$onChild =
 49603              t.$nsAttributes =
 49604              t.$nodeName =
 49605              t.$namespaceId =
 49606              t.$lastAttribute =
 49607              t.$isUsable =
 49608              t.$isTransparent =
 49609              t.$isThereMoreWidth =
 49610              t.$isSplittable =
 49611              t.$isNsAgnostic =
 49612              t.$isDescendent =
 49613              t.$isDataValue =
 49614              t.$isCDATAXml =
 49615              t.$isBindable =
 49616              t.$insertAt =
 49617              t.$indexOf =
 49618              t.$ids =
 49619              t.$hasSettableValue =
 49620              t.$globalData =
 49621              t.$getTemplateRoot =
 49622              t.$getSubformParent =
 49623              t.$getRealChildrenByNameIt =
 49624              t.$getParent =
 49625              t.$getNextPage =
 49626              t.$getExtra =
 49627              t.$getDataValue =
 49628              t.$getContainedChildren =
 49629              t.$getChildrenByNameIt =
 49630              t.$getChildrenByName =
 49631              t.$getChildrenByClass =
 49632              t.$getChildren =
 49633              t.$getAvailableSpace =
 49634              t.$getAttributes =
 49635              t.$getAttributeIt =
 49636              t.$flushHTML =
 49637              t.$finalize =
 49638              t.$extra =
 49639              t.$dump =
 49640              t.$data =
 49641              t.$content =
 49642              t.$consumed =
 49643              t.$clone =
 49644              t.$cleanup =
 49645              t.$cleanPage =
 49646              t.$clean =
 49647              t.$childrenToHTML =
 49648              t.$appendChild =
 49649              t.$addHTML =
 49650              t.$acceptWhitespace =
 49651                void 0;
 49652            const a = Symbol();
 49653            t.$acceptWhitespace = a;
 49654            const r = Symbol();
 49655            t.$addHTML = r;
 49656            const n = Symbol();
 49657            t.$appendChild = n;
 49658            const i = Symbol();
 49659            t.$childrenToHTML = i;
 49660            const s = Symbol();
 49661            t.$clean = s;
 49662            const o = Symbol();
 49663            t.$cleanPage = o;
 49664            const c = Symbol();
 49665            t.$cleanup = c;
 49666            const l = Symbol();
 49667            t.$clone = l;
 49668            const h = Symbol();
 49669            t.$consumed = h;
 49670            const u = Symbol("content");
 49671            t.$content = u;
 49672            const d = Symbol("data");
 49673            t.$data = d;
 49674            const f = Symbol();
 49675            t.$dump = f;
 49676            const g = Symbol("extra");
 49677            t.$extra = g;
 49678            const p = Symbol();
 49679            t.$finalize = p;
 49680            const m = Symbol();
 49681            t.$flushHTML = m;
 49682            const b = Symbol();
 49683            t.$getAttributeIt = b;
 49684            const y = Symbol();
 49685            t.$getAttributes = y;
 49686            const w = Symbol();
 49687            t.$getAvailableSpace = w;
 49688            const S = Symbol();
 49689            t.$getChildrenByClass = S;
 49690            const x = Symbol();
 49691            t.$getChildrenByName = x;
 49692            const C = Symbol();
 49693            t.$getChildrenByNameIt = C;
 49694            const k = Symbol();
 49695            t.$getDataValue = k;
 49696            const v = Symbol();
 49697            t.$getExtra = v;
 49698            const F = Symbol();
 49699            t.$getRealChildrenByNameIt = F;
 49700            const O = Symbol();
 49701            t.$getChildren = O;
 49702            const T = Symbol();
 49703            t.$getContainedChildren = T;
 49704            const M = Symbol();
 49705            t.$getNextPage = M;
 49706            const D = Symbol();
 49707            t.$getSubformParent = D;
 49708            const E = Symbol();
 49709            t.$getParent = E;
 49710            const N = Symbol();
 49711            t.$getTemplateRoot = N;
 49712            const R = Symbol();
 49713            t.$globalData = R;
 49714            const L = Symbol();
 49715            t.$hasSettableValue = L;
 49716            const $ = Symbol();
 49717            t.$ids = $;
 49718            const _ = Symbol();
 49719            t.$indexOf = _;
 49720            const j = Symbol();
 49721            t.$insertAt = j;
 49722            const U = Symbol();
 49723            t.$isCDATAXml = U;
 49724            const X = Symbol();
 49725            t.$isBindable = X;
 49726            const H = Symbol();
 49727            t.$isDataValue = H;
 49728            const q = Symbol();
 49729            t.$isDescendent = q;
 49730            const z = Symbol();
 49731            t.$isNsAgnostic = z;
 49732            const W = Symbol();
 49733            t.$isSplittable = W;
 49734            const G = Symbol();
 49735            t.$isThereMoreWidth = G;
 49736            const V = Symbol();
 49737            t.$isTransparent = V;
 49738            const K = Symbol();
 49739            t.$isUsable = K;
 49740            const J = Symbol();
 49741            t.$lastAttribute = J;
 49742            const Y = Symbol("namespaceId");
 49743            t.$namespaceId = Y;
 49744            const Z = Symbol("nodeName");
 49745            t.$nodeName = Z;
 49746            const Q = Symbol();
 49747            t.$nsAttributes = Q;
 49748            const ee = Symbol();
 49749            t.$onChild = ee;
 49750            const te = Symbol();
 49751            t.$onChildCheck = te;
 49752            const ae = Symbol();
 49753            t.$onText = ae;
 49754            const re = Symbol();
 49755            t.$pushGlyphs = re;
 49756            const ne = Symbol();
 49757            t.$popPara = ne;
 49758            const ie = Symbol();
 49759            t.$pushPara = ie;
 49760            const se = Symbol();
 49761            t.$removeChild = se;
 49762            const oe = Symbol("root");
 49763            t.$root = oe;
 49764            const ce = Symbol();
 49765            t.$resolvePrototypes = ce;
 49766            const le = Symbol();
 49767            t.$searchNode = le;
 49768            const he = Symbol();
 49769            t.$setId = he;
 49770            const ue = Symbol();
 49771            t.$setSetAttributes = ue;
 49772            const de = Symbol();
 49773            t.$setValue = de;
 49774            const fe = Symbol();
 49775            t.$tabIndex = fe;
 49776            const ge = Symbol();
 49777            t.$text = ge;
 49778            const pe = Symbol();
 49779            t.$toPages = pe;
 49780            const me = Symbol();
 49781            t.$toHTML = me;
 49782            const be = Symbol();
 49783            t.$toString = be;
 49784            const ye = Symbol();
 49785            t.$toStyle = ye;
 49786            const we = Symbol("uid");
 49787            t.$uid = we;
 49788          },
 49789          (e, t, a) => {
 49790            Object.defineProperty(t, "__esModule", { value: !0 });
 49791            t.Binder = void 0;
 49792            var r = a(78),
 49793              n = a(80),
 49794              i = a(88),
 49795              s = a(87),
 49796              o = a(81),
 49797              c = a(2);
 49798            const l = o.NamespaceIds.datasets.id;
 49799            function createText(e) {
 49800              const t = new n.Text({});
 49801              t[r.$content] = e;
 49802              return t;
 49803            }
 49804            t.Binder = class Binder {
 49805              constructor(e) {
 49806                this.root = e;
 49807                this.datasets = e.datasets;
 49808                this.data =
 49809                  e.datasets?.data ||
 49810                  new s.XmlObject(o.NamespaceIds.datasets.id, "data");
 49811                this.emptyMerge = 0 === this.data[r.$getChildren]().length;
 49812                this.root.form = this.form = e.template[r.$clone]();
 49813              }
 49814              _isConsumeData() {
 49815                return !this.emptyMerge && this._mergeMode;
 49816              }
 49817              _isMatchTemplate() {
 49818                return !this._isConsumeData();
 49819              }
 49820              bind() {
 49821                this._bindElement(this.form, this.data);
 49822                return this.form;
 49823              }
 49824              getData() {
 49825                return this.data;
 49826              }
 49827              _bindValue(e, t, a) {
 49828                e[r.$data] = t;
 49829                if (e[r.$hasSettableValue]())
 49830                  if (t[r.$isDataValue]()) {
 49831                    const a = t[r.$getDataValue]();
 49832                    e[r.$setValue](createText(a));
 49833                  } else if (
 49834                    e instanceof n.Field &&
 49835                    "multiSelect" === e.ui?.choiceList?.open
 49836                  ) {
 49837                    const a = t[r.$getChildren]()
 49838                      .map((e) => e[r.$content].trim())
 49839                      .join("\n");
 49840                    e[r.$setValue](createText(a));
 49841                  } else
 49842                    this._isConsumeData() &&
 49843                      (0, c.warn)("XFA - Nodes haven't the same type.");
 49844                else
 49845                  !t[r.$isDataValue]() || this._isMatchTemplate()
 49846                    ? this._bindElement(e, t)
 49847                    : (0, c.warn)("XFA - Nodes haven't the same type.");
 49848              }
 49849              _findDataByNameToConsume(e, t, a, n) {
 49850                if (!e) return null;
 49851                let i, s;
 49852                for (let n = 0; n < 3; n++) {
 49853                  i = a[r.$getRealChildrenByNameIt](e, !1, !0);
 49854                  for (;;) {
 49855                    s = i.next().value;
 49856                    if (!s) break;
 49857                    if (t === s[r.$isDataValue]()) return s;
 49858                  }
 49859                  if (
 49860                    a[r.$namespaceId] === o.NamespaceIds.datasets.id &&
 49861                    "data" === a[r.$nodeName]
 49862                  )
 49863                    break;
 49864                  a = a[r.$getParent]();
 49865                }
 49866                if (!n) return null;
 49867                i = this.data[r.$getRealChildrenByNameIt](e, !0, !1);
 49868                s = i.next().value;
 49869                if (s) return s;
 49870                i = this.data[r.$getAttributeIt](e, !0);
 49871                s = i.next().value;
 49872                return s?.[r.$isDataValue]() ? s : null;
 49873              }
 49874              _setProperties(e, t) {
 49875                if (e.hasOwnProperty("setProperty"))
 49876                  for (const { ref: a, target: o, connection: l } of e.setProperty
 49877                    .children) {
 49878                    if (l) continue;
 49879                    if (!a) continue;
 49880                    const h = (0, i.searchNode)(this.root, t, a, !1, !1);
 49881                    if (!h) {
 49882                      (0, c.warn)(`XFA - Invalid reference: ${a}.`);
 49883                      continue;
 49884                    }
 49885                    const [u] = h;
 49886                    if (!u[r.$isDescendent](this.data)) {
 49887                      (0, c.warn)("XFA - Invalid node: must be a data node.");
 49888                      continue;
 49889                    }
 49890                    const d = (0, i.searchNode)(this.root, e, o, !1, !1);
 49891                    if (!d) {
 49892                      (0, c.warn)(`XFA - Invalid target: ${o}.`);
 49893                      continue;
 49894                    }
 49895                    const [f] = d;
 49896                    if (!f[r.$isDescendent](e)) {
 49897                      (0, c.warn)(
 49898                        "XFA - Invalid target: must be a property or subproperty.",
 49899                      );
 49900                      continue;
 49901                    }
 49902                    const g = f[r.$getParent]();
 49903                    if (
 49904                      f instanceof n.SetProperty ||
 49905                      g instanceof n.SetProperty
 49906                    ) {
 49907                      (0, c.warn)(
 49908                        "XFA - Invalid target: cannot be a setProperty or one of its properties.",
 49909                      );
 49910                      continue;
 49911                    }
 49912                    if (f instanceof n.BindItems || g instanceof n.BindItems) {
 49913                      (0, c.warn)(
 49914                        "XFA - Invalid target: cannot be a bindItems or one of its properties.",
 49915                      );
 49916                      continue;
 49917                    }
 49918                    const p = u[r.$text](),
 49919                      m = f[r.$nodeName];
 49920                    if (f instanceof s.XFAAttribute) {
 49921                      const e = Object.create(null);
 49922                      e[m] = p;
 49923                      const t = Reflect.construct(
 49924                        Object.getPrototypeOf(g).constructor,
 49925                        [e],
 49926                      );
 49927                      g[m] = t[m];
 49928                    } else if (f.hasOwnProperty(r.$content)) {
 49929                      f[r.$data] = u;
 49930                      f[r.$content] = p;
 49931                      f[r.$finalize]();
 49932                    } else
 49933                      (0, c.warn)("XFA - Invalid node to use in setProperty");
 49934                  }
 49935              }
 49936              _bindItems(e, t) {
 49937                if (
 49938                  !e.hasOwnProperty("items") ||
 49939                  !e.hasOwnProperty("bindItems") ||
 49940                  e.bindItems.isEmpty()
 49941                )
 49942                  return;
 49943                for (const t of e.items.children) e[r.$removeChild](t);
 49944                e.items.clear();
 49945                const a = new n.Items({}),
 49946                  s = new n.Items({});
 49947                e[r.$appendChild](a);
 49948                e.items.push(a);
 49949                e[r.$appendChild](s);
 49950                e.items.push(s);
 49951                for (const {
 49952                  ref: n,
 49953                  labelRef: o,
 49954                  valueRef: l,
 49955                  connection: h,
 49956                } of e.bindItems.children) {
 49957                  if (h) continue;
 49958                  if (!n) continue;
 49959                  const e = (0, i.searchNode)(this.root, t, n, !1, !1);
 49960                  if (e)
 49961                    for (const t of e) {
 49962                      if (!t[r.$isDescendent](this.datasets)) {
 49963                        (0, c.warn)(
 49964                          `XFA - Invalid ref (${n}): must be a datasets child.`,
 49965                        );
 49966                        continue;
 49967                      }
 49968                      const e = (0, i.searchNode)(this.root, t, o, !0, !1);
 49969                      if (!e) {
 49970                        (0, c.warn)(`XFA - Invalid label: ${o}.`);
 49971                        continue;
 49972                      }
 49973                      const [h] = e;
 49974                      if (!h[r.$isDescendent](this.datasets)) {
 49975                        (0, c.warn)(
 49976                          "XFA - Invalid label: must be a datasets child.",
 49977                        );
 49978                        continue;
 49979                      }
 49980                      const u = (0, i.searchNode)(this.root, t, l, !0, !1);
 49981                      if (!u) {
 49982                        (0, c.warn)(`XFA - Invalid value: ${l}.`);
 49983                        continue;
 49984                      }
 49985                      const [d] = u;
 49986                      if (!d[r.$isDescendent](this.datasets)) {
 49987                        (0, c.warn)(
 49988                          "XFA - Invalid value: must be a datasets child.",
 49989                        );
 49990                        continue;
 49991                      }
 49992                      const f = createText(h[r.$text]()),
 49993                        g = createText(d[r.$text]());
 49994                      a[r.$appendChild](f);
 49995                      a.text.push(f);
 49996                      s[r.$appendChild](g);
 49997                      s.text.push(g);
 49998                    }
 49999                  else (0, c.warn)(`XFA - Invalid reference: ${n}.`);
 50000                }
 50001              }
 50002              _bindOccurrences(e, t, a) {
 50003                let n;
 50004                if (t.length > 1) {
 50005                  n = e[r.$clone]();
 50006                  n[r.$removeChild](n.occur);
 50007                  n.occur = null;
 50008                }
 50009                this._bindValue(e, t[0], a);
 50010                this._setProperties(e, t[0]);
 50011                this._bindItems(e, t[0]);
 50012                if (1 === t.length) return;
 50013                const i = e[r.$getParent](),
 50014                  s = e[r.$nodeName],
 50015                  o = i[r.$indexOf](e);
 50016                for (let e = 1, c = t.length; e < c; e++) {
 50017                  const c = t[e],
 50018                    l = n[r.$clone]();
 50019                  i[s].push(l);
 50020                  i[r.$insertAt](o + e, l);
 50021                  this._bindValue(l, c, a);
 50022                  this._setProperties(l, c);
 50023                  this._bindItems(l, c);
 50024                }
 50025              }
 50026              _createOccurrences(e) {
 50027                if (!this.emptyMerge) return;
 50028                const { occur: t } = e;
 50029                if (!t || t.initial <= 1) return;
 50030                const a = e[r.$getParent](),
 50031                  n = e[r.$nodeName];
 50032                if (!(a[n] instanceof s.XFAObjectArray)) return;
 50033                let i;
 50034                i = e.name
 50035                  ? a[n].children.filter((t) => t.name === e.name).length
 50036                  : a[n].children.length;
 50037                const o = a[r.$indexOf](e) + 1,
 50038                  c = t.initial - i;
 50039                if (c) {
 50040                  const t = e[r.$clone]();
 50041                  t[r.$removeChild](t.occur);
 50042                  t.occur = null;
 50043                  a[n].push(t);
 50044                  a[r.$insertAt](o, t);
 50045                  for (let e = 1; e < c; e++) {
 50046                    const i = t[r.$clone]();
 50047                    a[n].push(i);
 50048                    a[r.$insertAt](o + e, i);
 50049                  }
 50050                }
 50051              }
 50052              _getOccurInfo(e) {
 50053                const { name: t, occur: a } = e;
 50054                if (!a || !t) return [1, 1];
 50055                const r = -1 === a.max ? 1 / 0 : a.max;
 50056                return [a.min, r];
 50057              }
 50058              _setAndBind(e, t) {
 50059                this._setProperties(e, t);
 50060                this._bindItems(e, t);
 50061                this._bindElement(e, t);
 50062              }
 50063              _bindElement(e, t) {
 50064                const a = [];
 50065                this._createOccurrences(e);
 50066                for (const n of e[r.$getChildren]()) {
 50067                  if (n[r.$data]) continue;
 50068                  if (
 50069                    void 0 === this._mergeMode &&
 50070                    "subform" === n[r.$nodeName]
 50071                  ) {
 50072                    this._mergeMode = "consumeData" === n.mergeMode;
 50073                    const e = t[r.$getChildren]();
 50074                    if (e.length > 0) this._bindOccurrences(n, [e[0]], null);
 50075                    else if (this.emptyMerge) {
 50076                      const e = t[r.$namespaceId] === l ? -1 : t[r.$namespaceId],
 50077                        a = (n[r.$data] = new s.XmlObject(e, n.name || "root"));
 50078                      t[r.$appendChild](a);
 50079                      this._bindElement(n, a);
 50080                    }
 50081                    continue;
 50082                  }
 50083                  if (!n[r.$isBindable]()) continue;
 50084                  let e = !1,
 50085                    o = null,
 50086                    h = null,
 50087                    u = null;
 50088                  if (n.bind) {
 50089                    switch (n.bind.match) {
 50090                      case "none":
 50091                        this._setAndBind(n, t);
 50092                        continue;
 50093                      case "global":
 50094                        e = !0;
 50095                        break;
 50096                      case "dataRef":
 50097                        if (!n.bind.ref) {
 50098                          (0, c.warn)(
 50099                            `XFA - ref is empty in node ${n[r.$nodeName]}.`,
 50100                          );
 50101                          this._setAndBind(n, t);
 50102                          continue;
 50103                        }
 50104                        h = n.bind.ref;
 50105                    }
 50106                    n.bind.picture && (o = n.bind.picture[r.$content]);
 50107                  }
 50108                  const [d, f] = this._getOccurInfo(n);
 50109                  if (h) {
 50110                    u = (0, i.searchNode)(this.root, t, h, !0, !1);
 50111                    if (null === u) {
 50112                      u = (0, i.createDataNode)(this.data, t, h);
 50113                      if (!u) continue;
 50114                      this._isConsumeData() && (u[r.$consumed] = !0);
 50115                      this._setAndBind(n, u);
 50116                      continue;
 50117                    }
 50118                    this._isConsumeData() &&
 50119                      (u = u.filter((e) => !e[r.$consumed]));
 50120                    u.length > f
 50121                      ? (u = u.slice(0, f))
 50122                      : 0 === u.length && (u = null);
 50123                    u &&
 50124                      this._isConsumeData() &&
 50125                      u.forEach((e) => {
 50126                        e[r.$consumed] = !0;
 50127                      });
 50128                  } else {
 50129                    if (!n.name) {
 50130                      this._setAndBind(n, t);
 50131                      continue;
 50132                    }
 50133                    if (this._isConsumeData()) {
 50134                      const a = [];
 50135                      for (; a.length < f; ) {
 50136                        const i = this._findDataByNameToConsume(
 50137                          n.name,
 50138                          n[r.$hasSettableValue](),
 50139                          t,
 50140                          e,
 50141                        );
 50142                        if (!i) break;
 50143                        i[r.$consumed] = !0;
 50144                        a.push(i);
 50145                      }
 50146                      u = a.length > 0 ? a : null;
 50147                    } else {
 50148                      u = t[r.$getRealChildrenByNameIt](
 50149                        n.name,
 50150                        !1,
 50151                        this.emptyMerge,
 50152                      ).next().value;
 50153                      if (!u) {
 50154                        if (0 === d) {
 50155                          a.push(n);
 50156                          continue;
 50157                        }
 50158                        const e =
 50159                          t[r.$namespaceId] === l ? -1 : t[r.$namespaceId];
 50160                        u = n[r.$data] = new s.XmlObject(e, n.name);
 50161                        this.emptyMerge && (u[r.$consumed] = !0);
 50162                        t[r.$appendChild](u);
 50163                        this._setAndBind(n, u);
 50164                        continue;
 50165                      }
 50166                      this.emptyMerge && (u[r.$consumed] = !0);
 50167                      u = [u];
 50168                    }
 50169                  }
 50170                  u
 50171                    ? this._bindOccurrences(n, u, o)
 50172                    : d > 0
 50173                      ? this._setAndBind(n, t)
 50174                      : a.push(n);
 50175                }
 50176                a.forEach((e) => e[r.$getParent]()[r.$removeChild](e));
 50177              }
 50178            };
 50179          },
 50180          (e, t, a) => {
 50181            Object.defineProperty(t, "__esModule", { value: !0 });
 50182            t.Value =
 50183              t.Text =
 50184              t.TemplateNamespace =
 50185              t.Template =
 50186              t.SetProperty =
 50187              t.Items =
 50188              t.Field =
 50189              t.BindItems =
 50190                void 0;
 50191            var r = a(78),
 50192              n = a(81),
 50193              i = a(82),
 50194              s = a(83),
 50195              o = a(87),
 50196              c = a(84),
 50197              l = a(2),
 50198              h = a(85),
 50199              u = a(3),
 50200              d = a(88);
 50201            const f = n.NamespaceIds.template.id,
 50202              g = "http://www.w3.org/2000/svg",
 50203              p = /^H(\d+)$/,
 50204              m = new Set([
 50205                "image/gif",
 50206                "image/jpeg",
 50207                "image/jpg",
 50208                "image/pjpeg",
 50209                "image/png",
 50210                "image/apng",
 50211                "image/x-png",
 50212                "image/bmp",
 50213                "image/x-ms-bmp",
 50214                "image/tiff",
 50215                "image/tif",
 50216                "application/octet-stream",
 50217              ]),
 50218              b = [
 50219                [[66, 77], "image/bmp"],
 50220                [[255, 216, 255], "image/jpeg"],
 50221                [[73, 73, 42, 0], "image/tiff"],
 50222                [[77, 77, 0, 42], "image/tiff"],
 50223                [[71, 73, 70, 56, 57, 97], "image/gif"],
 50224                [[137, 80, 78, 71, 13, 10, 26, 10], "image/png"],
 50225              ];
 50226            function getBorderDims(e) {
 50227              if (!e || !e.border) return { w: 0, h: 0 };
 50228              const t = e.border[r.$getExtra]();
 50229              return t
 50230                ? {
 50231                    w: t.widths[0] + t.widths[2] + t.insets[0] + t.insets[2],
 50232                    h: t.widths[1] + t.widths[3] + t.insets[1] + t.insets[3],
 50233                  }
 50234                : { w: 0, h: 0 };
 50235            }
 50236            function hasMargin(e) {
 50237              return (
 50238                e.margin &&
 50239                (e.margin.topInset ||
 50240                  e.margin.rightInset ||
 50241                  e.margin.bottomInset ||
 50242                  e.margin.leftInset)
 50243              );
 50244            }
 50245            function _setValue(e, t) {
 50246              if (!e.value) {
 50247                const t = new Value({});
 50248                e[r.$appendChild](t);
 50249                e.value = t;
 50250              }
 50251              e.value[r.$setValue](t);
 50252            }
 50253            function* getContainedChildren(e) {
 50254              for (const t of e[r.$getChildren]())
 50255                t instanceof SubformSet
 50256                  ? yield* t[r.$getContainedChildren]()
 50257                  : yield t;
 50258            }
 50259            function isRequired(e) {
 50260              return "error" === e.validate?.nullTest;
 50261            }
 50262            function setTabIndex(e) {
 50263              for (; e; ) {
 50264                if (!e.traversal) {
 50265                  e[r.$tabIndex] = e[r.$getParent]()[r.$tabIndex];
 50266                  return;
 50267                }
 50268                if (e[r.$tabIndex]) return;
 50269                let t = null;
 50270                for (const a of e.traversal[r.$getChildren]())
 50271                  if ("next" === a.operation) {
 50272                    t = a;
 50273                    break;
 50274                  }
 50275                if (!t || !t.ref) {
 50276                  e[r.$tabIndex] = e[r.$getParent]()[r.$tabIndex];
 50277                  return;
 50278                }
 50279                const a = e[r.$getTemplateRoot]();
 50280                e[r.$tabIndex] = ++a[r.$tabIndex];
 50281                const n = a[r.$searchNode](t.ref, e);
 50282                if (!n) return;
 50283                e = n[0];
 50284              }
 50285            }
 50286            function applyAssist(e, t) {
 50287              const a = e.assist;
 50288              if (a) {
 50289                const e = a[r.$toHTML]();
 50290                e && (t.title = e);
 50291                const n = a.role.match(p);
 50292                if (n) {
 50293                  const e = "heading",
 50294                    a = n[1];
 50295                  t.role = e;
 50296                  t["aria-level"] = a;
 50297                }
 50298              }
 50299              if ("table" === e.layout) t.role = "table";
 50300              else if ("row" === e.layout) t.role = "row";
 50301              else {
 50302                const a = e[r.$getParent]();
 50303                "row" === a.layout &&
 50304                  (t.role = "TH" === a.assist?.role ? "columnheader" : "cell");
 50305              }
 50306            }
 50307            function ariaLabel(e) {
 50308              if (!e.assist) return null;
 50309              const t = e.assist;
 50310              return t.speak && "" !== t.speak[r.$content]
 50311                ? t.speak[r.$content]
 50312                : t.toolTip
 50313                  ? t.toolTip[r.$content]
 50314                  : null;
 50315            }
 50316            function valueToHtml(e) {
 50317              return c.HTMLResult.success({
 50318                name: "div",
 50319                attributes: { class: ["xfaRich"], style: Object.create(null) },
 50320                children: [
 50321                  {
 50322                    name: "span",
 50323                    attributes: { style: Object.create(null) },
 50324                    value: e,
 50325                  },
 50326                ],
 50327              });
 50328            }
 50329            function setFirstUnsplittable(e) {
 50330              const t = e[r.$getTemplateRoot]();
 50331              if (null === t[r.$extra].firstUnsplittable) {
 50332                t[r.$extra].firstUnsplittable = e;
 50333                t[r.$extra].noLayoutFailure = !0;
 50334              }
 50335            }
 50336            function unsetFirstUnsplittable(e) {
 50337              const t = e[r.$getTemplateRoot]();
 50338              t[r.$extra].firstUnsplittable === e &&
 50339                (t[r.$extra].noLayoutFailure = !1);
 50340            }
 50341            function handleBreak(e) {
 50342              if (e[r.$extra]) return !1;
 50343              e[r.$extra] = Object.create(null);
 50344              if ("auto" === e.targetType) return !1;
 50345              const t = e[r.$getTemplateRoot]();
 50346              let a = null;
 50347              if (e.target) {
 50348                a = t[r.$searchNode](e.target, e[r.$getParent]());
 50349                if (!a) return !1;
 50350                a = a[0];
 50351              }
 50352              const { currentPageArea: n, currentContentArea: i } = t[r.$extra];
 50353              if ("pageArea" === e.targetType) {
 50354                a instanceof PageArea || (a = null);
 50355                if (e.startNew) {
 50356                  e[r.$extra].target = a || n;
 50357                  return !0;
 50358                }
 50359                if (a && a !== n) {
 50360                  e[r.$extra].target = a;
 50361                  return !0;
 50362                }
 50363                return !1;
 50364              }
 50365              a instanceof ContentArea || (a = null);
 50366              const s = a && a[r.$getParent]();
 50367              let o,
 50368                c = s;
 50369              if (e.startNew)
 50370                if (a) {
 50371                  const e = s.contentArea.children,
 50372                    t = e.indexOf(i),
 50373                    r = e.indexOf(a);
 50374                  -1 !== t && t < r && (c = null);
 50375                  o = r - 1;
 50376                } else o = n.contentArea.children.indexOf(i);
 50377              else {
 50378                if (!a || a === i) return !1;
 50379                o = s.contentArea.children.indexOf(a) - 1;
 50380                c = s === n ? null : s;
 50381              }
 50382              e[r.$extra].target = c;
 50383              e[r.$extra].index = o;
 50384              return !0;
 50385            }
 50386            function handleOverflow(e, t, a) {
 50387              const n = e[r.$getTemplateRoot](),
 50388                i = n[r.$extra].noLayoutFailure,
 50389                s = t[r.$getSubformParent];
 50390              t[r.$getSubformParent] = () => e;
 50391              n[r.$extra].noLayoutFailure = !0;
 50392              const o = t[r.$toHTML](a);
 50393              e[r.$addHTML](o.html, o.bbox);
 50394              n[r.$extra].noLayoutFailure = i;
 50395              t[r.$getSubformParent] = s;
 50396            }
 50397            class AppearanceFilter extends o.StringObject {
 50398              constructor(e) {
 50399                super(f, "appearanceFilter");
 50400                this.id = e.id || "";
 50401                this.type = (0, c.getStringOption)(e.type, [
 50402                  "optional",
 50403                  "required",
 50404                ]);
 50405                this.use = e.use || "";
 50406                this.usehref = e.usehref || "";
 50407              }
 50408            }
 50409            class Arc extends o.XFAObject {
 50410              constructor(e) {
 50411                super(f, "arc", !0);
 50412                this.circular = (0, c.getInteger)({
 50413                  data: e.circular,
 50414                  defaultValue: 0,
 50415                  validate: (e) => 1 === e,
 50416                });
 50417                this.hand = (0, c.getStringOption)(e.hand, [
 50418                  "even",
 50419                  "left",
 50420                  "right",
 50421                ]);
 50422                this.id = e.id || "";
 50423                this.startAngle = (0, c.getFloat)({
 50424                  data: e.startAngle,
 50425                  defaultValue: 0,
 50426                  validate: (e) => !0,
 50427                });
 50428                this.sweepAngle = (0, c.getFloat)({
 50429                  data: e.sweepAngle,
 50430                  defaultValue: 360,
 50431                  validate: (e) => !0,
 50432                });
 50433                this.use = e.use || "";
 50434                this.usehref = e.usehref || "";
 50435                this.edge = null;
 50436                this.fill = null;
 50437              }
 50438              [r.$toHTML]() {
 50439                const e = this.edge || new Edge({}),
 50440                  t = e[r.$toStyle](),
 50441                  a = Object.create(null);
 50442                "visible" === this.fill?.presence
 50443                  ? Object.assign(a, this.fill[r.$toStyle]())
 50444                  : (a.fill = "transparent");
 50445                a.strokeWidth = (0, s.measureToString)(
 50446                  "visible" === e.presence ? e.thickness : 0,
 50447                );
 50448                a.stroke = t.color;
 50449                let n;
 50450                const i = {
 50451                  xmlns: g,
 50452                  style: { width: "100%", height: "100%", overflow: "visible" },
 50453                };
 50454                if (360 === this.sweepAngle)
 50455                  n = {
 50456                    name: "ellipse",
 50457                    attributes: {
 50458                      xmlns: g,
 50459                      cx: "50%",
 50460                      cy: "50%",
 50461                      rx: "50%",
 50462                      ry: "50%",
 50463                      style: a,
 50464                    },
 50465                  };
 50466                else {
 50467                  const e = (this.startAngle * Math.PI) / 180,
 50468                    t = (this.sweepAngle * Math.PI) / 180,
 50469                    r = this.sweepAngle > 180 ? 1 : 0,
 50470                    [s, o, c, l] = [
 50471                      50 * (1 + Math.cos(e)),
 50472                      50 * (1 - Math.sin(e)),
 50473                      50 * (1 + Math.cos(e + t)),
 50474                      50 * (1 - Math.sin(e + t)),
 50475                    ];
 50476                  n = {
 50477                    name: "path",
 50478                    attributes: {
 50479                      xmlns: g,
 50480                      d: `M ${s} ${o} A 50 50 0 ${r} 0 ${c} ${l}`,
 50481                      vectorEffect: "non-scaling-stroke",
 50482                      style: a,
 50483                    },
 50484                  };
 50485                  Object.assign(i, {
 50486                    viewBox: "0 0 100 100",
 50487                    preserveAspectRatio: "none",
 50488                  });
 50489                }
 50490                const o = { name: "svg", children: [n], attributes: i };
 50491                if (hasMargin(this[r.$getParent]()[r.$getParent]()))
 50492                  return c.HTMLResult.success({
 50493                    name: "div",
 50494                    attributes: {
 50495                      style: { display: "inline", width: "100%", height: "100%" },
 50496                    },
 50497                    children: [o],
 50498                  });
 50499                o.attributes.style.position = "absolute";
 50500                return c.HTMLResult.success(o);
 50501              }
 50502            }
 50503            class Area extends o.XFAObject {
 50504              constructor(e) {
 50505                super(f, "area", !0);
 50506                this.colSpan = (0, c.getInteger)({
 50507                  data: e.colSpan,
 50508                  defaultValue: 1,
 50509                  validate: (e) => e >= 1 || -1 === e,
 50510                });
 50511                this.id = e.id || "";
 50512                this.name = e.name || "";
 50513                this.relevant = (0, c.getRelevant)(e.relevant);
 50514                this.use = e.use || "";
 50515                this.usehref = e.usehref || "";
 50516                this.x = (0, c.getMeasurement)(e.x, "0pt");
 50517                this.y = (0, c.getMeasurement)(e.y, "0pt");
 50518                this.desc = null;
 50519                this.extras = null;
 50520                this.area = new o.XFAObjectArray();
 50521                this.draw = new o.XFAObjectArray();
 50522                this.exObject = new o.XFAObjectArray();
 50523                this.exclGroup = new o.XFAObjectArray();
 50524                this.field = new o.XFAObjectArray();
 50525                this.subform = new o.XFAObjectArray();
 50526                this.subformSet = new o.XFAObjectArray();
 50527              }
 50528              *[r.$getContainedChildren]() {
 50529                yield* getContainedChildren(this);
 50530              }
 50531              [r.$isTransparent]() {
 50532                return !0;
 50533              }
 50534              [r.$isBindable]() {
 50535                return !0;
 50536              }
 50537              [r.$addHTML](e, t) {
 50538                const [a, n, i, s] = t;
 50539                this[r.$extra].width = Math.max(this[r.$extra].width, a + i);
 50540                this[r.$extra].height = Math.max(this[r.$extra].height, n + s);
 50541                this[r.$extra].children.push(e);
 50542              }
 50543              [r.$getAvailableSpace]() {
 50544                return this[r.$extra].availableSpace;
 50545              }
 50546              [r.$toHTML](e) {
 50547                const t = (0, s.toStyle)(this, "position"),
 50548                  a = { style: t, id: this[r.$uid], class: ["xfaArea"] };
 50549                (0, s.isPrintOnly)(this) && a.class.push("xfaPrintOnly");
 50550                this.name && (a.xfaName = this.name);
 50551                const n = [];
 50552                this[r.$extra] = {
 50553                  children: n,
 50554                  width: 0,
 50555                  height: 0,
 50556                  availableSpace: e,
 50557                };
 50558                const i = this[r.$childrenToHTML]({
 50559                  filter: new Set([
 50560                    "area",
 50561                    "draw",
 50562                    "field",
 50563                    "exclGroup",
 50564                    "subform",
 50565                    "subformSet",
 50566                  ]),
 50567                  include: !0,
 50568                });
 50569                if (!i.success) {
 50570                  if (i.isBreak()) return i;
 50571                  delete this[r.$extra];
 50572                  return c.HTMLResult.FAILURE;
 50573                }
 50574                t.width = (0, s.measureToString)(this[r.$extra].width);
 50575                t.height = (0, s.measureToString)(this[r.$extra].height);
 50576                const o = { name: "div", attributes: a, children: n },
 50577                  l = [
 50578                    this.x,
 50579                    this.y,
 50580                    this[r.$extra].width,
 50581                    this[r.$extra].height,
 50582                  ];
 50583                delete this[r.$extra];
 50584                return c.HTMLResult.success(o, l);
 50585              }
 50586            }
 50587            class Assist extends o.XFAObject {
 50588              constructor(e) {
 50589                super(f, "assist", !0);
 50590                this.id = e.id || "";
 50591                this.role = e.role || "";
 50592                this.use = e.use || "";
 50593                this.usehref = e.usehref || "";
 50594                this.speak = null;
 50595                this.toolTip = null;
 50596              }
 50597              [r.$toHTML]() {
 50598                return this.toolTip?.[r.$content] || null;
 50599              }
 50600            }
 50601            class Barcode extends o.XFAObject {
 50602              constructor(e) {
 50603                super(f, "barcode", !0);
 50604                this.charEncoding = (0, c.getKeyword)({
 50605                  data: e.charEncoding ? e.charEncoding.toLowerCase() : "",
 50606                  defaultValue: "",
 50607                  validate: (e) =>
 50608                    [
 50609                      "utf-8",
 50610                      "big-five",
 50611                      "fontspecific",
 50612                      "gbk",
 50613                      "gb-18030",
 50614                      "gb-2312",
 50615                      "ksc-5601",
 50616                      "none",
 50617                      "shift-jis",
 50618                      "ucs-2",
 50619                      "utf-16",
 50620                    ].includes(e) || e.match(/iso-8859-\d{2}/),
 50621                });
 50622                this.checksum = (0, c.getStringOption)(e.checksum, [
 50623                  "none",
 50624                  "1mod10",
 50625                  "1mod10_1mod11",
 50626                  "2mod10",
 50627                  "auto",
 50628                ]);
 50629                this.dataColumnCount = (0, c.getInteger)({
 50630                  data: e.dataColumnCount,
 50631                  defaultValue: -1,
 50632                  validate: (e) => e >= 0,
 50633                });
 50634                this.dataLength = (0, c.getInteger)({
 50635                  data: e.dataLength,
 50636                  defaultValue: -1,
 50637                  validate: (e) => e >= 0,
 50638                });
 50639                this.dataPrep = (0, c.getStringOption)(e.dataPrep, [
 50640                  "none",
 50641                  "flateCompress",
 50642                ]);
 50643                this.dataRowCount = (0, c.getInteger)({
 50644                  data: e.dataRowCount,
 50645                  defaultValue: -1,
 50646                  validate: (e) => e >= 0,
 50647                });
 50648                this.endChar = e.endChar || "";
 50649                this.errorCorrectionLevel = (0, c.getInteger)({
 50650                  data: e.errorCorrectionLevel,
 50651                  defaultValue: -1,
 50652                  validate: (e) => e >= 0 && e <= 8,
 50653                });
 50654                this.id = e.id || "";
 50655                this.moduleHeight = (0, c.getMeasurement)(e.moduleHeight, "5mm");
 50656                this.moduleWidth = (0, c.getMeasurement)(e.moduleWidth, "0.25mm");
 50657                this.printCheckDigit = (0, c.getInteger)({
 50658                  data: e.printCheckDigit,
 50659                  defaultValue: 0,
 50660                  validate: (e) => 1 === e,
 50661                });
 50662                this.rowColumnRatio = (0, c.getRatio)(e.rowColumnRatio);
 50663                this.startChar = e.startChar || "";
 50664                this.textLocation = (0, c.getStringOption)(e.textLocation, [
 50665                  "below",
 50666                  "above",
 50667                  "aboveEmbedded",
 50668                  "belowEmbedded",
 50669                  "none",
 50670                ]);
 50671                this.truncate = (0, c.getInteger)({
 50672                  data: e.truncate,
 50673                  defaultValue: 0,
 50674                  validate: (e) => 1 === e,
 50675                });
 50676                this.type = (0, c.getStringOption)(
 50677                  e.type ? e.type.toLowerCase() : "",
 50678                  [
 50679                    "aztec",
 50680                    "codabar",
 50681                    "code2of5industrial",
 50682                    "code2of5interleaved",
 50683                    "code2of5matrix",
 50684                    "code2of5standard",
 50685                    "code3of9",
 50686                    "code3of9extended",
 50687                    "code11",
 50688                    "code49",
 50689                    "code93",
 50690                    "code128",
 50691                    "code128a",
 50692                    "code128b",
 50693                    "code128c",
 50694                    "code128sscc",
 50695                    "datamatrix",
 50696                    "ean8",
 50697                    "ean8add2",
 50698                    "ean8add5",
 50699                    "ean13",
 50700                    "ean13add2",
 50701                    "ean13add5",
 50702                    "ean13pwcd",
 50703                    "fim",
 50704                    "logmars",
 50705                    "maxicode",
 50706                    "msi",
 50707                    "pdf417",
 50708                    "pdf417macro",
 50709                    "plessey",
 50710                    "postauscust2",
 50711                    "postauscust3",
 50712                    "postausreplypaid",
 50713                    "postausstandard",
 50714                    "postukrm4scc",
 50715                    "postusdpbc",
 50716                    "postusimb",
 50717                    "postusstandard",
 50718                    "postus5zip",
 50719                    "qrcode",
 50720                    "rfid",
 50721                    "rss14",
 50722                    "rss14expanded",
 50723                    "rss14limited",
 50724                    "rss14stacked",
 50725                    "rss14stackedomni",
 50726                    "rss14truncated",
 50727                    "telepen",
 50728                    "ucc128",
 50729                    "ucc128random",
 50730                    "ucc128sscc",
 50731                    "upca",
 50732                    "upcaadd2",
 50733                    "upcaadd5",
 50734                    "upcapwcd",
 50735                    "upce",
 50736                    "upceadd2",
 50737                    "upceadd5",
 50738                    "upcean2",
 50739                    "upcean5",
 50740                    "upsmaxicode",
 50741                  ],
 50742                );
 50743                this.upsMode = (0, c.getStringOption)(e.upsMode, [
 50744                  "usCarrier",
 50745                  "internationalCarrier",
 50746                  "secureSymbol",
 50747                  "standardSymbol",
 50748                ]);
 50749                this.use = e.use || "";
 50750                this.usehref = e.usehref || "";
 50751                this.wideNarrowRatio = (0, c.getRatio)(e.wideNarrowRatio);
 50752                this.encrypt = null;
 50753                this.extras = null;
 50754              }
 50755            }
 50756            class Bind extends o.XFAObject {
 50757              constructor(e) {
 50758                super(f, "bind", !0);
 50759                this.match = (0, c.getStringOption)(e.match, [
 50760                  "once",
 50761                  "dataRef",
 50762                  "global",
 50763                  "none",
 50764                ]);
 50765                this.ref = e.ref || "";
 50766                this.picture = null;
 50767              }
 50768            }
 50769            class BindItems extends o.XFAObject {
 50770              constructor(e) {
 50771                super(f, "bindItems");
 50772                this.connection = e.connection || "";
 50773                this.labelRef = e.labelRef || "";
 50774                this.ref = e.ref || "";
 50775                this.valueRef = e.valueRef || "";
 50776              }
 50777            }
 50778            t.BindItems = BindItems;
 50779            class Bookend extends o.XFAObject {
 50780              constructor(e) {
 50781                super(f, "bookend");
 50782                this.id = e.id || "";
 50783                this.leader = e.leader || "";
 50784                this.trailer = e.trailer || "";
 50785                this.use = e.use || "";
 50786                this.usehref = e.usehref || "";
 50787              }
 50788            }
 50789            class BooleanElement extends o.Option01 {
 50790              constructor(e) {
 50791                super(f, "boolean");
 50792                this.id = e.id || "";
 50793                this.name = e.name || "";
 50794                this.use = e.use || "";
 50795                this.usehref = e.usehref || "";
 50796              }
 50797              [r.$toHTML](e) {
 50798                return valueToHtml(1 === this[r.$content] ? "1" : "0");
 50799              }
 50800            }
 50801            class Border extends o.XFAObject {
 50802              constructor(e) {
 50803                super(f, "border", !0);
 50804                this.break = (0, c.getStringOption)(e.break, ["close", "open"]);
 50805                this.hand = (0, c.getStringOption)(e.hand, [
 50806                  "even",
 50807                  "left",
 50808                  "right",
 50809                ]);
 50810                this.id = e.id || "";
 50811                this.presence = (0, c.getStringOption)(e.presence, [
 50812                  "visible",
 50813                  "hidden",
 50814                  "inactive",
 50815                  "invisible",
 50816                ]);
 50817                this.relevant = (0, c.getRelevant)(e.relevant);
 50818                this.use = e.use || "";
 50819                this.usehref = e.usehref || "";
 50820                this.corner = new o.XFAObjectArray(4);
 50821                this.edge = new o.XFAObjectArray(4);
 50822                this.extras = null;
 50823                this.fill = null;
 50824                this.margin = null;
 50825              }
 50826              [r.$getExtra]() {
 50827                if (!this[r.$extra]) {
 50828                  const e = this.edge.children.slice();
 50829                  if (e.length < 4) {
 50830                    const t = e.at(-1) || new Edge({});
 50831                    for (let a = e.length; a < 4; a++) e.push(t);
 50832                  }
 50833                  const t = e.map((e) => e.thickness),
 50834                    a = [0, 0, 0, 0];
 50835                  if (this.margin) {
 50836                    a[0] = this.margin.topInset;
 50837                    a[1] = this.margin.rightInset;
 50838                    a[2] = this.margin.bottomInset;
 50839                    a[3] = this.margin.leftInset;
 50840                  }
 50841                  this[r.$extra] = { widths: t, insets: a, edges: e };
 50842                }
 50843                return this[r.$extra];
 50844              }
 50845              [r.$toStyle]() {
 50846                const { edges: e } = this[r.$getExtra](),
 50847                  t = e.map((e) => {
 50848                    const t = e[r.$toStyle]();
 50849                    t.color ||= "#000000";
 50850                    return t;
 50851                  }),
 50852                  a = Object.create(null);
 50853                this.margin && Object.assign(a, this.margin[r.$toStyle]());
 50854                "visible" === this.fill?.presence &&
 50855                  Object.assign(a, this.fill[r.$toStyle]());
 50856                if (this.corner.children.some((e) => 0 !== e.radius)) {
 50857                  const e = this.corner.children.map((e) => e[r.$toStyle]());
 50858                  if (2 === e.length || 3 === e.length) {
 50859                    const t = e.at(-1);
 50860                    for (let a = e.length; a < 4; a++) e.push(t);
 50861                  }
 50862                  a.borderRadius = e.map((e) => e.radius).join(" ");
 50863                }
 50864                switch (this.presence) {
 50865                  case "invisible":
 50866                  case "hidden":
 50867                    a.borderStyle = "";
 50868                    break;
 50869                  case "inactive":
 50870                    a.borderStyle = "none";
 50871                    break;
 50872                  default:
 50873                    a.borderStyle = t.map((e) => e.style).join(" ");
 50874                }
 50875                a.borderWidth = t.map((e) => e.width).join(" ");
 50876                a.borderColor = t.map((e) => e.color).join(" ");
 50877                return a;
 50878              }
 50879            }
 50880            class Break extends o.XFAObject {
 50881              constructor(e) {
 50882                super(f, "break", !0);
 50883                this.after = (0, c.getStringOption)(e.after, [
 50884                  "auto",
 50885                  "contentArea",
 50886                  "pageArea",
 50887                  "pageEven",
 50888                  "pageOdd",
 50889                ]);
 50890                this.afterTarget = e.afterTarget || "";
 50891                this.before = (0, c.getStringOption)(e.before, [
 50892                  "auto",
 50893                  "contentArea",
 50894                  "pageArea",
 50895                  "pageEven",
 50896                  "pageOdd",
 50897                ]);
 50898                this.beforeTarget = e.beforeTarget || "";
 50899                this.bookendLeader = e.bookendLeader || "";
 50900                this.bookendTrailer = e.bookendTrailer || "";
 50901                this.id = e.id || "";
 50902                this.overflowLeader = e.overflowLeader || "";
 50903                this.overflowTarget = e.overflowTarget || "";
 50904                this.overflowTrailer = e.overflowTrailer || "";
 50905                this.startNew = (0, c.getInteger)({
 50906                  data: e.startNew,
 50907                  defaultValue: 0,
 50908                  validate: (e) => 1 === e,
 50909                });
 50910                this.use = e.use || "";
 50911                this.usehref = e.usehref || "";
 50912                this.extras = null;
 50913              }
 50914            }
 50915            class BreakAfter extends o.XFAObject {
 50916              constructor(e) {
 50917                super(f, "breakAfter", !0);
 50918                this.id = e.id || "";
 50919                this.leader = e.leader || "";
 50920                this.startNew = (0, c.getInteger)({
 50921                  data: e.startNew,
 50922                  defaultValue: 0,
 50923                  validate: (e) => 1 === e,
 50924                });
 50925                this.target = e.target || "";
 50926                this.targetType = (0, c.getStringOption)(e.targetType, [
 50927                  "auto",
 50928                  "contentArea",
 50929                  "pageArea",
 50930                ]);
 50931                this.trailer = e.trailer || "";
 50932                this.use = e.use || "";
 50933                this.usehref = e.usehref || "";
 50934                this.script = null;
 50935              }
 50936            }
 50937            class BreakBefore extends o.XFAObject {
 50938              constructor(e) {
 50939                super(f, "breakBefore", !0);
 50940                this.id = e.id || "";
 50941                this.leader = e.leader || "";
 50942                this.startNew = (0, c.getInteger)({
 50943                  data: e.startNew,
 50944                  defaultValue: 0,
 50945                  validate: (e) => 1 === e,
 50946                });
 50947                this.target = e.target || "";
 50948                this.targetType = (0, c.getStringOption)(e.targetType, [
 50949                  "auto",
 50950                  "contentArea",
 50951                  "pageArea",
 50952                ]);
 50953                this.trailer = e.trailer || "";
 50954                this.use = e.use || "";
 50955                this.usehref = e.usehref || "";
 50956                this.script = null;
 50957              }
 50958              [r.$toHTML](e) {
 50959                this[r.$extra] = {};
 50960                return c.HTMLResult.FAILURE;
 50961              }
 50962            }
 50963            class Button extends o.XFAObject {
 50964              constructor(e) {
 50965                super(f, "button", !0);
 50966                this.highlight = (0, c.getStringOption)(e.highlight, [
 50967                  "inverted",
 50968                  "none",
 50969                  "outline",
 50970                  "push",
 50971                ]);
 50972                this.id = e.id || "";
 50973                this.use = e.use || "";
 50974                this.usehref = e.usehref || "";
 50975                this.extras = null;
 50976              }
 50977              [r.$toHTML](e) {
 50978                const t = this[r.$getParent]()[r.$getParent](),
 50979                  a = {
 50980                    name: "button",
 50981                    attributes: {
 50982                      id: this[r.$uid],
 50983                      class: ["xfaButton"],
 50984                      style: {},
 50985                    },
 50986                    children: [],
 50987                  };
 50988                for (const e of t.event.children) {
 50989                  if ("click" !== e.activity || !e.script) continue;
 50990                  const t = (0, u.recoverJsURL)(e.script[r.$content]);
 50991                  if (!t) continue;
 50992                  const n = (0, s.fixURL)(t.url);
 50993                  n &&
 50994                    a.children.push({
 50995                      name: "a",
 50996                      attributes: {
 50997                        id: "link" + this[r.$uid],
 50998                        href: n,
 50999                        newWindow: t.newWindow,
 51000                        class: ["xfaLink"],
 51001                        style: {},
 51002                      },
 51003                      children: [],
 51004                    });
 51005                }
 51006                return c.HTMLResult.success(a);
 51007              }
 51008            }
 51009            class Calculate extends o.XFAObject {
 51010              constructor(e) {
 51011                super(f, "calculate", !0);
 51012                this.id = e.id || "";
 51013                this.override = (0, c.getStringOption)(e.override, [
 51014                  "disabled",
 51015                  "error",
 51016                  "ignore",
 51017                  "warning",
 51018                ]);
 51019                this.use = e.use || "";
 51020                this.usehref = e.usehref || "";
 51021                this.extras = null;
 51022                this.message = null;
 51023                this.script = null;
 51024              }
 51025            }
 51026            class Caption extends o.XFAObject {
 51027              constructor(e) {
 51028                super(f, "caption", !0);
 51029                this.id = e.id || "";
 51030                this.placement = (0, c.getStringOption)(e.placement, [
 51031                  "left",
 51032                  "bottom",
 51033                  "inline",
 51034                  "right",
 51035                  "top",
 51036                ]);
 51037                this.presence = (0, c.getStringOption)(e.presence, [
 51038                  "visible",
 51039                  "hidden",
 51040                  "inactive",
 51041                  "invisible",
 51042                ]);
 51043                this.reserve = Math.ceil((0, c.getMeasurement)(e.reserve));
 51044                this.use = e.use || "";
 51045                this.usehref = e.usehref || "";
 51046                this.extras = null;
 51047                this.font = null;
 51048                this.margin = null;
 51049                this.para = null;
 51050                this.value = null;
 51051              }
 51052              [r.$setValue](e) {
 51053                _setValue(this, e);
 51054              }
 51055              [r.$getExtra](e) {
 51056                if (!this[r.$extra]) {
 51057                  let { width: t, height: a } = e;
 51058                  switch (this.placement) {
 51059                    case "left":
 51060                    case "right":
 51061                    case "inline":
 51062                      t = this.reserve <= 0 ? t : this.reserve;
 51063                      break;
 51064                    case "top":
 51065                    case "bottom":
 51066                      a = this.reserve <= 0 ? a : this.reserve;
 51067                  }
 51068                  this[r.$extra] = (0, s.layoutNode)(this, {
 51069                    width: t,
 51070                    height: a,
 51071                  });
 51072                }
 51073                return this[r.$extra];
 51074              }
 51075              [r.$toHTML](e) {
 51076                if (!this.value) return c.HTMLResult.EMPTY;
 51077                this[r.$pushPara]();
 51078                const t = this.value[r.$toHTML](e).html;
 51079                if (!t) {
 51080                  this[r.$popPara]();
 51081                  return c.HTMLResult.EMPTY;
 51082                }
 51083                const a = this.reserve;
 51084                if (this.reserve <= 0) {
 51085                  const { w: t, h: a } = this[r.$getExtra](e);
 51086                  switch (this.placement) {
 51087                    case "left":
 51088                    case "right":
 51089                    case "inline":
 51090                      this.reserve = t;
 51091                      break;
 51092                    case "top":
 51093                    case "bottom":
 51094                      this.reserve = a;
 51095                  }
 51096                }
 51097                const n = [];
 51098                "string" == typeof t
 51099                  ? n.push({ name: "#text", value: t })
 51100                  : n.push(t);
 51101                const i = (0, s.toStyle)(this, "font", "margin", "visibility");
 51102                switch (this.placement) {
 51103                  case "left":
 51104                  case "right":
 51105                    this.reserve > 0 &&
 51106                      (i.width = (0, s.measureToString)(this.reserve));
 51107                    break;
 51108                  case "top":
 51109                  case "bottom":
 51110                    this.reserve > 0 &&
 51111                      (i.height = (0, s.measureToString)(this.reserve));
 51112                }
 51113                (0, s.setPara)(this, null, t);
 51114                this[r.$popPara]();
 51115                this.reserve = a;
 51116                return c.HTMLResult.success({
 51117                  name: "div",
 51118                  attributes: { style: i, class: ["xfaCaption"] },
 51119                  children: n,
 51120                });
 51121              }
 51122            }
 51123            class Certificate extends o.StringObject {
 51124              constructor(e) {
 51125                super(f, "certificate");
 51126                this.id = e.id || "";
 51127                this.name = e.name || "";
 51128                this.use = e.use || "";
 51129                this.usehref = e.usehref || "";
 51130              }
 51131            }
 51132            class Certificates extends o.XFAObject {
 51133              constructor(e) {
 51134                super(f, "certificates", !0);
 51135                this.credentialServerPolicy = (0, c.getStringOption)(
 51136                  e.credentialServerPolicy,
 51137                  ["optional", "required"],
 51138                );
 51139                this.id = e.id || "";
 51140                this.url = e.url || "";
 51141                this.urlPolicy = e.urlPolicy || "";
 51142                this.use = e.use || "";
 51143                this.usehref = e.usehref || "";
 51144                this.encryption = null;
 51145                this.issuers = null;
 51146                this.keyUsage = null;
 51147                this.oids = null;
 51148                this.signing = null;
 51149                this.subjectDNs = null;
 51150              }
 51151            }
 51152            class CheckButton extends o.XFAObject {
 51153              constructor(e) {
 51154                super(f, "checkButton", !0);
 51155                this.id = e.id || "";
 51156                this.mark = (0, c.getStringOption)(e.mark, [
 51157                  "default",
 51158                  "check",
 51159                  "circle",
 51160                  "cross",
 51161                  "diamond",
 51162                  "square",
 51163                  "star",
 51164                ]);
 51165                this.shape = (0, c.getStringOption)(e.shape, ["square", "round"]);
 51166                this.size = (0, c.getMeasurement)(e.size, "10pt");
 51167                this.use = e.use || "";
 51168                this.usehref = e.usehref || "";
 51169                this.border = null;
 51170                this.extras = null;
 51171                this.margin = null;
 51172              }
 51173              [r.$toHTML](e) {
 51174                const t = (0, s.toStyle)("margin"),
 51175                  a = (0, s.measureToString)(this.size);
 51176                t.width = t.height = a;
 51177                let n, i, o;
 51178                const l = this[r.$getParent]()[r.$getParent](),
 51179                  h =
 51180                    (l.items.children.length &&
 51181                      l.items.children[0][r.$toHTML]().html) ||
 51182                    [],
 51183                  u = {
 51184                    on: (void 0 !== h[0] ? h[0] : "on").toString(),
 51185                    off: (void 0 !== h[1] ? h[1] : "off").toString(),
 51186                  },
 51187                  d = (l.value?.[r.$text]() || "off") === u.on || void 0,
 51188                  f = l[r.$getSubformParent](),
 51189                  g = l[r.$uid];
 51190                let p;
 51191                if (f instanceof ExclGroup) {
 51192                  o = f[r.$uid];
 51193                  n = "radio";
 51194                  i = "xfaRadio";
 51195                  p = f[r.$data]?.[r.$uid] || f[r.$uid];
 51196                } else {
 51197                  n = "checkbox";
 51198                  i = "xfaCheckbox";
 51199                  p = l[r.$data]?.[r.$uid] || l[r.$uid];
 51200                }
 51201                const m = {
 51202                  name: "input",
 51203                  attributes: {
 51204                    class: [i],
 51205                    style: t,
 51206                    fieldId: g,
 51207                    dataId: p,
 51208                    type: n,
 51209                    checked: d,
 51210                    xfaOn: u.on,
 51211                    xfaOff: u.off,
 51212                    "aria-label": ariaLabel(l),
 51213                    "aria-required": !1,
 51214                  },
 51215                };
 51216                o && (m.attributes.name = o);
 51217                if (isRequired(l)) {
 51218                  m.attributes["aria-required"] = !0;
 51219                  m.attributes.required = !0;
 51220                }
 51221                return c.HTMLResult.success({
 51222                  name: "label",
 51223                  attributes: { class: ["xfaLabel"] },
 51224                  children: [m],
 51225                });
 51226              }
 51227            }
 51228            class ChoiceList extends o.XFAObject {
 51229              constructor(e) {
 51230                super(f, "choiceList", !0);
 51231                this.commitOn = (0, c.getStringOption)(e.commitOn, [
 51232                  "select",
 51233                  "exit",
 51234                ]);
 51235                this.id = e.id || "";
 51236                this.open = (0, c.getStringOption)(e.open, [
 51237                  "userControl",
 51238                  "always",
 51239                  "multiSelect",
 51240                  "onEntry",
 51241                ]);
 51242                this.textEntry = (0, c.getInteger)({
 51243                  data: e.textEntry,
 51244                  defaultValue: 0,
 51245                  validate: (e) => 1 === e,
 51246                });
 51247                this.use = e.use || "";
 51248                this.usehref = e.usehref || "";
 51249                this.border = null;
 51250                this.extras = null;
 51251                this.margin = null;
 51252              }
 51253              [r.$toHTML](e) {
 51254                const t = (0, s.toStyle)(this, "border", "margin"),
 51255                  a = this[r.$getParent]()[r.$getParent](),
 51256                  n = {
 51257                    fontSize: `calc(${
 51258                      a.font?.size || 10
 51259                    }px * var(--scale-factor))`,
 51260                  },
 51261                  i = [];
 51262                if (a.items.children.length > 0) {
 51263                  const e = a.items;
 51264                  let t = 0,
 51265                    s = 0;
 51266                  if (2 === e.children.length) {
 51267                    t = e.children[0].save;
 51268                    s = 1 - t;
 51269                  }
 51270                  const o = e.children[t][r.$toHTML]().html,
 51271                    c = e.children[s][r.$toHTML]().html;
 51272                  let l = !1;
 51273                  const h = a.value?.[r.$text]() || "";
 51274                  for (let e = 0, t = o.length; e < t; e++) {
 51275                    const t = {
 51276                      name: "option",
 51277                      attributes: { value: c[e] || o[e], style: n },
 51278                      value: o[e],
 51279                    };
 51280                    c[e] === h && (t.attributes.selected = l = !0);
 51281                    i.push(t);
 51282                  }
 51283                  l ||
 51284                    i.splice(0, 0, {
 51285                      name: "option",
 51286                      attributes: { hidden: !0, selected: !0 },
 51287                      value: " ",
 51288                    });
 51289                }
 51290                const o = {
 51291                  class: ["xfaSelect"],
 51292                  fieldId: a[r.$uid],
 51293                  dataId: a[r.$data]?.[r.$uid] || a[r.$uid],
 51294                  style: t,
 51295                  "aria-label": ariaLabel(a),
 51296                  "aria-required": !1,
 51297                };
 51298                if (isRequired(a)) {
 51299                  o["aria-required"] = !0;
 51300                  o.required = !0;
 51301                }
 51302                "multiSelect" === this.open && (o.multiple = !0);
 51303                return c.HTMLResult.success({
 51304                  name: "label",
 51305                  attributes: { class: ["xfaLabel"] },
 51306                  children: [{ name: "select", children: i, attributes: o }],
 51307                });
 51308              }
 51309            }
 51310            class Color extends o.XFAObject {
 51311              constructor(e) {
 51312                super(f, "color", !0);
 51313                this.cSpace = (0, c.getStringOption)(e.cSpace, ["SRGB"]);
 51314                this.id = e.id || "";
 51315                this.use = e.use || "";
 51316                this.usehref = e.usehref || "";
 51317                this.value = e.value ? (0, c.getColor)(e.value) : "";
 51318                this.extras = null;
 51319              }
 51320              [r.$hasSettableValue]() {
 51321                return !1;
 51322              }
 51323              [r.$toStyle]() {
 51324                return this.value
 51325                  ? l.Util.makeHexColor(this.value.r, this.value.g, this.value.b)
 51326                  : null;
 51327              }
 51328            }
 51329            class Comb extends o.XFAObject {
 51330              constructor(e) {
 51331                super(f, "comb");
 51332                this.id = e.id || "";
 51333                this.numberOfCells = (0, c.getInteger)({
 51334                  data: e.numberOfCells,
 51335                  defaultValue: 0,
 51336                  validate: (e) => e >= 0,
 51337                });
 51338                this.use = e.use || "";
 51339                this.usehref = e.usehref || "";
 51340              }
 51341            }
 51342            class Connect extends o.XFAObject {
 51343              constructor(e) {
 51344                super(f, "connect", !0);
 51345                this.connection = e.connection || "";
 51346                this.id = e.id || "";
 51347                this.ref = e.ref || "";
 51348                this.usage = (0, c.getStringOption)(e.usage, [
 51349                  "exportAndImport",
 51350                  "exportOnly",
 51351                  "importOnly",
 51352                ]);
 51353                this.use = e.use || "";
 51354                this.usehref = e.usehref || "";
 51355                this.picture = null;
 51356              }
 51357            }
 51358            class ContentArea extends o.XFAObject {
 51359              constructor(e) {
 51360                super(f, "contentArea", !0);
 51361                this.h = (0, c.getMeasurement)(e.h);
 51362                this.id = e.id || "";
 51363                this.name = e.name || "";
 51364                this.relevant = (0, c.getRelevant)(e.relevant);
 51365                this.use = e.use || "";
 51366                this.usehref = e.usehref || "";
 51367                this.w = (0, c.getMeasurement)(e.w);
 51368                this.x = (0, c.getMeasurement)(e.x, "0pt");
 51369                this.y = (0, c.getMeasurement)(e.y, "0pt");
 51370                this.desc = null;
 51371                this.extras = null;
 51372              }
 51373              [r.$toHTML](e) {
 51374                const t = {
 51375                    left: (0, s.measureToString)(this.x),
 51376                    top: (0, s.measureToString)(this.y),
 51377                    width: (0, s.measureToString)(this.w),
 51378                    height: (0, s.measureToString)(this.h),
 51379                  },
 51380                  a = ["xfaContentarea"];
 51381                (0, s.isPrintOnly)(this) && a.push("xfaPrintOnly");
 51382                return c.HTMLResult.success({
 51383                  name: "div",
 51384                  children: [],
 51385                  attributes: { style: t, class: a, id: this[r.$uid] },
 51386                });
 51387              }
 51388            }
 51389            class Corner extends o.XFAObject {
 51390              constructor(e) {
 51391                super(f, "corner", !0);
 51392                this.id = e.id || "";
 51393                this.inverted = (0, c.getInteger)({
 51394                  data: e.inverted,
 51395                  defaultValue: 0,
 51396                  validate: (e) => 1 === e,
 51397                });
 51398                this.join = (0, c.getStringOption)(e.join, ["square", "round"]);
 51399                this.presence = (0, c.getStringOption)(e.presence, [
 51400                  "visible",
 51401                  "hidden",
 51402                  "inactive",
 51403                  "invisible",
 51404                ]);
 51405                this.radius = (0, c.getMeasurement)(e.radius);
 51406                this.stroke = (0, c.getStringOption)(e.stroke, [
 51407                  "solid",
 51408                  "dashDot",
 51409                  "dashDotDot",
 51410                  "dashed",
 51411                  "dotted",
 51412                  "embossed",
 51413                  "etched",
 51414                  "lowered",
 51415                  "raised",
 51416                ]);
 51417                this.thickness = (0, c.getMeasurement)(e.thickness, "0.5pt");
 51418                this.use = e.use || "";
 51419                this.usehref = e.usehref || "";
 51420                this.color = null;
 51421                this.extras = null;
 51422              }
 51423              [r.$toStyle]() {
 51424                const e = (0, s.toStyle)(this, "visibility");
 51425                e.radius = (0, s.measureToString)(
 51426                  "square" === this.join ? 0 : this.radius,
 51427                );
 51428                return e;
 51429              }
 51430            }
 51431            class DateElement extends o.ContentObject {
 51432              constructor(e) {
 51433                super(f, "date");
 51434                this.id = e.id || "";
 51435                this.name = e.name || "";
 51436                this.use = e.use || "";
 51437                this.usehref = e.usehref || "";
 51438              }
 51439              [r.$finalize]() {
 51440                const e = this[r.$content].trim();
 51441                this[r.$content] = e ? new Date(e) : null;
 51442              }
 51443              [r.$toHTML](e) {
 51444                return valueToHtml(
 51445                  this[r.$content] ? this[r.$content].toString() : "",
 51446                );
 51447              }
 51448            }
 51449            class DateTime extends o.ContentObject {
 51450              constructor(e) {
 51451                super(f, "dateTime");
 51452                this.id = e.id || "";
 51453                this.name = e.name || "";
 51454                this.use = e.use || "";
 51455                this.usehref = e.usehref || "";
 51456              }
 51457              [r.$finalize]() {
 51458                const e = this[r.$content].trim();
 51459                this[r.$content] = e ? new Date(e) : null;
 51460              }
 51461              [r.$toHTML](e) {
 51462                return valueToHtml(
 51463                  this[r.$content] ? this[r.$content].toString() : "",
 51464                );
 51465              }
 51466            }
 51467            class DateTimeEdit extends o.XFAObject {
 51468              constructor(e) {
 51469                super(f, "dateTimeEdit", !0);
 51470                this.hScrollPolicy = (0, c.getStringOption)(e.hScrollPolicy, [
 51471                  "auto",
 51472                  "off",
 51473                  "on",
 51474                ]);
 51475                this.id = e.id || "";
 51476                this.picker = (0, c.getStringOption)(e.picker, ["host", "none"]);
 51477                this.use = e.use || "";
 51478                this.usehref = e.usehref || "";
 51479                this.border = null;
 51480                this.comb = null;
 51481                this.extras = null;
 51482                this.margin = null;
 51483              }
 51484              [r.$toHTML](e) {
 51485                const t = (0, s.toStyle)(this, "border", "font", "margin"),
 51486                  a = this[r.$getParent]()[r.$getParent](),
 51487                  n = {
 51488                    name: "input",
 51489                    attributes: {
 51490                      type: "text",
 51491                      fieldId: a[r.$uid],
 51492                      dataId: a[r.$data]?.[r.$uid] || a[r.$uid],
 51493                      class: ["xfaTextfield"],
 51494                      style: t,
 51495                      "aria-label": ariaLabel(a),
 51496                      "aria-required": !1,
 51497                    },
 51498                  };
 51499                if (isRequired(a)) {
 51500                  n.attributes["aria-required"] = !0;
 51501                  n.attributes.required = !0;
 51502                }
 51503                return c.HTMLResult.success({
 51504                  name: "label",
 51505                  attributes: { class: ["xfaLabel"] },
 51506                  children: [n],
 51507                });
 51508              }
 51509            }
 51510            class Decimal extends o.ContentObject {
 51511              constructor(e) {
 51512                super(f, "decimal");
 51513                this.fracDigits = (0, c.getInteger)({
 51514                  data: e.fracDigits,
 51515                  defaultValue: 2,
 51516                  validate: (e) => !0,
 51517                });
 51518                this.id = e.id || "";
 51519                this.leadDigits = (0, c.getInteger)({
 51520                  data: e.leadDigits,
 51521                  defaultValue: -1,
 51522                  validate: (e) => !0,
 51523                });
 51524                this.name = e.name || "";
 51525                this.use = e.use || "";
 51526                this.usehref = e.usehref || "";
 51527              }
 51528              [r.$finalize]() {
 51529                const e = parseFloat(this[r.$content].trim());
 51530                this[r.$content] = isNaN(e) ? null : e;
 51531              }
 51532              [r.$toHTML](e) {
 51533                return valueToHtml(
 51534                  null !== this[r.$content] ? this[r.$content].toString() : "",
 51535                );
 51536              }
 51537            }
 51538            class DefaultUi extends o.XFAObject {
 51539              constructor(e) {
 51540                super(f, "defaultUi", !0);
 51541                this.id = e.id || "";
 51542                this.use = e.use || "";
 51543                this.usehref = e.usehref || "";
 51544                this.extras = null;
 51545              }
 51546            }
 51547            class Desc extends o.XFAObject {
 51548              constructor(e) {
 51549                super(f, "desc", !0);
 51550                this.id = e.id || "";
 51551                this.use = e.use || "";
 51552                this.usehref = e.usehref || "";
 51553                this.boolean = new o.XFAObjectArray();
 51554                this.date = new o.XFAObjectArray();
 51555                this.dateTime = new o.XFAObjectArray();
 51556                this.decimal = new o.XFAObjectArray();
 51557                this.exData = new o.XFAObjectArray();
 51558                this.float = new o.XFAObjectArray();
 51559                this.image = new o.XFAObjectArray();
 51560                this.integer = new o.XFAObjectArray();
 51561                this.text = new o.XFAObjectArray();
 51562                this.time = new o.XFAObjectArray();
 51563              }
 51564            }
 51565            class DigestMethod extends o.OptionObject {
 51566              constructor(e) {
 51567                super(f, "digestMethod", [
 51568                  "",
 51569                  "SHA1",
 51570                  "SHA256",
 51571                  "SHA512",
 51572                  "RIPEMD160",
 51573                ]);
 51574                this.id = e.id || "";
 51575                this.use = e.use || "";
 51576                this.usehref = e.usehref || "";
 51577              }
 51578            }
 51579            class DigestMethods extends o.XFAObject {
 51580              constructor(e) {
 51581                super(f, "digestMethods", !0);
 51582                this.id = e.id || "";
 51583                this.type = (0, c.getStringOption)(e.type, [
 51584                  "optional",
 51585                  "required",
 51586                ]);
 51587                this.use = e.use || "";
 51588                this.usehref = e.usehref || "";
 51589                this.digestMethod = new o.XFAObjectArray();
 51590              }
 51591            }
 51592            class Draw extends o.XFAObject {
 51593              constructor(e) {
 51594                super(f, "draw", !0);
 51595                this.anchorType = (0, c.getStringOption)(e.anchorType, [
 51596                  "topLeft",
 51597                  "bottomCenter",
 51598                  "bottomLeft",
 51599                  "bottomRight",
 51600                  "middleCenter",
 51601                  "middleLeft",
 51602                  "middleRight",
 51603                  "topCenter",
 51604                  "topRight",
 51605                ]);
 51606                this.colSpan = (0, c.getInteger)({
 51607                  data: e.colSpan,
 51608                  defaultValue: 1,
 51609                  validate: (e) => e >= 1 || -1 === e,
 51610                });
 51611                this.h = e.h ? (0, c.getMeasurement)(e.h) : "";
 51612                this.hAlign = (0, c.getStringOption)(e.hAlign, [
 51613                  "left",
 51614                  "center",
 51615                  "justify",
 51616                  "justifyAll",
 51617                  "radix",
 51618                  "right",
 51619                ]);
 51620                this.id = e.id || "";
 51621                this.locale = e.locale || "";
 51622                this.maxH = (0, c.getMeasurement)(e.maxH, "0pt");
 51623                this.maxW = (0, c.getMeasurement)(e.maxW, "0pt");
 51624                this.minH = (0, c.getMeasurement)(e.minH, "0pt");
 51625                this.minW = (0, c.getMeasurement)(e.minW, "0pt");
 51626                this.name = e.name || "";
 51627                this.presence = (0, c.getStringOption)(e.presence, [
 51628                  "visible",
 51629                  "hidden",
 51630                  "inactive",
 51631                  "invisible",
 51632                ]);
 51633                this.relevant = (0, c.getRelevant)(e.relevant);
 51634                this.rotate = (0, c.getInteger)({
 51635                  data: e.rotate,
 51636                  defaultValue: 0,
 51637                  validate: (e) => e % 90 == 0,
 51638                });
 51639                this.use = e.use || "";
 51640                this.usehref = e.usehref || "";
 51641                this.w = e.w ? (0, c.getMeasurement)(e.w) : "";
 51642                this.x = (0, c.getMeasurement)(e.x, "0pt");
 51643                this.y = (0, c.getMeasurement)(e.y, "0pt");
 51644                this.assist = null;
 51645                this.border = null;
 51646                this.caption = null;
 51647                this.desc = null;
 51648                this.extras = null;
 51649                this.font = null;
 51650                this.keep = null;
 51651                this.margin = null;
 51652                this.para = null;
 51653                this.traversal = null;
 51654                this.ui = null;
 51655                this.value = null;
 51656                this.setProperty = new o.XFAObjectArray();
 51657              }
 51658              [r.$setValue](e) {
 51659                _setValue(this, e);
 51660              }
 51661              [r.$toHTML](e) {
 51662                setTabIndex(this);
 51663                if ("hidden" === this.presence || "inactive" === this.presence)
 51664                  return c.HTMLResult.EMPTY;
 51665                (0, s.fixDimensions)(this);
 51666                this[r.$pushPara]();
 51667                const t = this.w,
 51668                  a = this.h,
 51669                  { w: n, h: o, isBroken: l } = (0, s.layoutNode)(this, e);
 51670                if (n && "" === this.w) {
 51671                  if (l && this[r.$getSubformParent]()[r.$isThereMoreWidth]()) {
 51672                    this[r.$popPara]();
 51673                    return c.HTMLResult.FAILURE;
 51674                  }
 51675                  this.w = n;
 51676                }
 51677                o && "" === this.h && (this.h = o);
 51678                setFirstUnsplittable(this);
 51679                if (!(0, i.checkDimensions)(this, e)) {
 51680                  this.w = t;
 51681                  this.h = a;
 51682                  this[r.$popPara]();
 51683                  return c.HTMLResult.FAILURE;
 51684                }
 51685                unsetFirstUnsplittable(this);
 51686                const h = (0, s.toStyle)(
 51687                  this,
 51688                  "font",
 51689                  "hAlign",
 51690                  "dimensions",
 51691                  "position",
 51692                  "presence",
 51693                  "rotate",
 51694                  "anchorType",
 51695                  "border",
 51696                  "margin",
 51697                );
 51698                (0, s.setMinMaxDimensions)(this, h);
 51699                if (h.margin) {
 51700                  h.padding = h.margin;
 51701                  delete h.margin;
 51702                }
 51703                const u = ["xfaDraw"];
 51704                this.font && u.push("xfaFont");
 51705                (0, s.isPrintOnly)(this) && u.push("xfaPrintOnly");
 51706                const d = { style: h, id: this[r.$uid], class: u };
 51707                this.name && (d.xfaName = this.name);
 51708                const f = { name: "div", attributes: d, children: [] };
 51709                applyAssist(this, d);
 51710                const g = (0, s.computeBbox)(this, f, e),
 51711                  p = this.value ? this.value[r.$toHTML](e).html : null;
 51712                if (null === p) {
 51713                  this.w = t;
 51714                  this.h = a;
 51715                  this[r.$popPara]();
 51716                  return c.HTMLResult.success((0, s.createWrapper)(this, f), g);
 51717                }
 51718                f.children.push(p);
 51719                (0, s.setPara)(this, h, p);
 51720                this.w = t;
 51721                this.h = a;
 51722                this[r.$popPara]();
 51723                return c.HTMLResult.success((0, s.createWrapper)(this, f), g);
 51724              }
 51725            }
 51726            class Edge extends o.XFAObject {
 51727              constructor(e) {
 51728                super(f, "edge", !0);
 51729                this.cap = (0, c.getStringOption)(e.cap, [
 51730                  "square",
 51731                  "butt",
 51732                  "round",
 51733                ]);
 51734                this.id = e.id || "";
 51735                this.presence = (0, c.getStringOption)(e.presence, [
 51736                  "visible",
 51737                  "hidden",
 51738                  "inactive",
 51739                  "invisible",
 51740                ]);
 51741                this.stroke = (0, c.getStringOption)(e.stroke, [
 51742                  "solid",
 51743                  "dashDot",
 51744                  "dashDotDot",
 51745                  "dashed",
 51746                  "dotted",
 51747                  "embossed",
 51748                  "etched",
 51749                  "lowered",
 51750                  "raised",
 51751                ]);
 51752                this.thickness = (0, c.getMeasurement)(e.thickness, "0.5pt");
 51753                this.use = e.use || "";
 51754                this.usehref = e.usehref || "";
 51755                this.color = null;
 51756                this.extras = null;
 51757              }
 51758              [r.$toStyle]() {
 51759                const e = (0, s.toStyle)(this, "visibility");
 51760                Object.assign(e, {
 51761                  linecap: this.cap,
 51762                  width: (0, s.measureToString)(this.thickness),
 51763                  color: this.color ? this.color[r.$toStyle]() : "#000000",
 51764                  style: "",
 51765                });
 51766                if ("visible" !== this.presence) e.style = "none";
 51767                else
 51768                  switch (this.stroke) {
 51769                    case "solid":
 51770                      e.style = "solid";
 51771                      break;
 51772                    case "dashDot":
 51773                    case "dashDotDot":
 51774                    case "dashed":
 51775                      e.style = "dashed";
 51776                      break;
 51777                    case "dotted":
 51778                      e.style = "dotted";
 51779                      break;
 51780                    case "embossed":
 51781                      e.style = "ridge";
 51782                      break;
 51783                    case "etched":
 51784                      e.style = "groove";
 51785                      break;
 51786                    case "lowered":
 51787                      e.style = "inset";
 51788                      break;
 51789                    case "raised":
 51790                      e.style = "outset";
 51791                  }
 51792                return e;
 51793              }
 51794            }
 51795            class Encoding extends o.OptionObject {
 51796              constructor(e) {
 51797                super(f, "encoding", [
 51798                  "adbe.x509.rsa_sha1",
 51799                  "adbe.pkcs7.detached",
 51800                  "adbe.pkcs7.sha1",
 51801                ]);
 51802                this.id = e.id || "";
 51803                this.use = e.use || "";
 51804                this.usehref = e.usehref || "";
 51805              }
 51806            }
 51807            class Encodings extends o.XFAObject {
 51808              constructor(e) {
 51809                super(f, "encodings", !0);
 51810                this.id = e.id || "";
 51811                this.type = (0, c.getStringOption)(e.type, [
 51812                  "optional",
 51813                  "required",
 51814                ]);
 51815                this.use = e.use || "";
 51816                this.usehref = e.usehref || "";
 51817                this.encoding = new o.XFAObjectArray();
 51818              }
 51819            }
 51820            class Encrypt extends o.XFAObject {
 51821              constructor(e) {
 51822                super(f, "encrypt", !0);
 51823                this.id = e.id || "";
 51824                this.use = e.use || "";
 51825                this.usehref = e.usehref || "";
 51826                this.certificate = null;
 51827              }
 51828            }
 51829            class EncryptData extends o.XFAObject {
 51830              constructor(e) {
 51831                super(f, "encryptData", !0);
 51832                this.id = e.id || "";
 51833                this.operation = (0, c.getStringOption)(e.operation, [
 51834                  "encrypt",
 51835                  "decrypt",
 51836                ]);
 51837                this.target = e.target || "";
 51838                this.use = e.use || "";
 51839                this.usehref = e.usehref || "";
 51840                this.filter = null;
 51841                this.manifest = null;
 51842              }
 51843            }
 51844            class Encryption extends o.XFAObject {
 51845              constructor(e) {
 51846                super(f, "encryption", !0);
 51847                this.id = e.id || "";
 51848                this.type = (0, c.getStringOption)(e.type, [
 51849                  "optional",
 51850                  "required",
 51851                ]);
 51852                this.use = e.use || "";
 51853                this.usehref = e.usehref || "";
 51854                this.certificate = new o.XFAObjectArray();
 51855              }
 51856            }
 51857            class EncryptionMethod extends o.OptionObject {
 51858              constructor(e) {
 51859                super(f, "encryptionMethod", [
 51860                  "",
 51861                  "AES256-CBC",
 51862                  "TRIPLEDES-CBC",
 51863                  "AES128-CBC",
 51864                  "AES192-CBC",
 51865                ]);
 51866                this.id = e.id || "";
 51867                this.use = e.use || "";
 51868                this.usehref = e.usehref || "";
 51869              }
 51870            }
 51871            class EncryptionMethods extends o.XFAObject {
 51872              constructor(e) {
 51873                super(f, "encryptionMethods", !0);
 51874                this.id = e.id || "";
 51875                this.type = (0, c.getStringOption)(e.type, [
 51876                  "optional",
 51877                  "required",
 51878                ]);
 51879                this.use = e.use || "";
 51880                this.usehref = e.usehref || "";
 51881                this.encryptionMethod = new o.XFAObjectArray();
 51882              }
 51883            }
 51884            class Event extends o.XFAObject {
 51885              constructor(e) {
 51886                super(f, "event", !0);
 51887                this.activity = (0, c.getStringOption)(e.activity, [
 51888                  "click",
 51889                  "change",
 51890                  "docClose",
 51891                  "docReady",
 51892                  "enter",
 51893                  "exit",
 51894                  "full",
 51895                  "indexChange",
 51896                  "initialize",
 51897                  "mouseDown",
 51898                  "mouseEnter",
 51899                  "mouseExit",
 51900                  "mouseUp",
 51901                  "postExecute",
 51902                  "postOpen",
 51903                  "postPrint",
 51904                  "postSave",
 51905                  "postSign",
 51906                  "postSubmit",
 51907                  "preExecute",
 51908                  "preOpen",
 51909                  "prePrint",
 51910                  "preSave",
 51911                  "preSign",
 51912                  "preSubmit",
 51913                  "ready",
 51914                  "validationState",
 51915                ]);
 51916                this.id = e.id || "";
 51917                this.listen = (0, c.getStringOption)(e.listen, [
 51918                  "refOnly",
 51919                  "refAndDescendents",
 51920                ]);
 51921                this.name = e.name || "";
 51922                this.ref = e.ref || "";
 51923                this.use = e.use || "";
 51924                this.usehref = e.usehref || "";
 51925                this.extras = null;
 51926                this.encryptData = null;
 51927                this.execute = null;
 51928                this.script = null;
 51929                this.signData = null;
 51930                this.submit = null;
 51931              }
 51932            }
 51933            class ExData extends o.ContentObject {
 51934              constructor(e) {
 51935                super(f, "exData");
 51936                this.contentType = e.contentType || "";
 51937                this.href = e.href || "";
 51938                this.id = e.id || "";
 51939                this.maxLength = (0, c.getInteger)({
 51940                  data: e.maxLength,
 51941                  defaultValue: -1,
 51942                  validate: (e) => e >= -1,
 51943                });
 51944                this.name = e.name || "";
 51945                this.rid = e.rid || "";
 51946                this.transferEncoding = (0, c.getStringOption)(
 51947                  e.transferEncoding,
 51948                  ["none", "base64", "package"],
 51949                );
 51950                this.use = e.use || "";
 51951                this.usehref = e.usehref || "";
 51952              }
 51953              [r.$isCDATAXml]() {
 51954                return "text/html" === this.contentType;
 51955              }
 51956              [r.$onChild](e) {
 51957                if (
 51958                  "text/html" === this.contentType &&
 51959                  e[r.$namespaceId] === n.NamespaceIds.xhtml.id
 51960                ) {
 51961                  this[r.$content] = e;
 51962                  return !0;
 51963                }
 51964                if ("text/xml" === this.contentType) {
 51965                  this[r.$content] = e;
 51966                  return !0;
 51967                }
 51968                return !1;
 51969              }
 51970              [r.$toHTML](e) {
 51971                return "text/html" === this.contentType && this[r.$content]
 51972                  ? this[r.$content][r.$toHTML](e)
 51973                  : c.HTMLResult.EMPTY;
 51974              }
 51975            }
 51976            class ExObject extends o.XFAObject {
 51977              constructor(e) {
 51978                super(f, "exObject", !0);
 51979                this.archive = e.archive || "";
 51980                this.classId = e.classId || "";
 51981                this.codeBase = e.codeBase || "";
 51982                this.codeType = e.codeType || "";
 51983                this.id = e.id || "";
 51984                this.name = e.name || "";
 51985                this.use = e.use || "";
 51986                this.usehref = e.usehref || "";
 51987                this.extras = null;
 51988                this.boolean = new o.XFAObjectArray();
 51989                this.date = new o.XFAObjectArray();
 51990                this.dateTime = new o.XFAObjectArray();
 51991                this.decimal = new o.XFAObjectArray();
 51992                this.exData = new o.XFAObjectArray();
 51993                this.exObject = new o.XFAObjectArray();
 51994                this.float = new o.XFAObjectArray();
 51995                this.image = new o.XFAObjectArray();
 51996                this.integer = new o.XFAObjectArray();
 51997                this.text = new o.XFAObjectArray();
 51998                this.time = new o.XFAObjectArray();
 51999              }
 52000            }
 52001            class ExclGroup extends o.XFAObject {
 52002              constructor(e) {
 52003                super(f, "exclGroup", !0);
 52004                this.access = (0, c.getStringOption)(e.access, [
 52005                  "open",
 52006                  "nonInteractive",
 52007                  "protected",
 52008                  "readOnly",
 52009                ]);
 52010                this.accessKey = e.accessKey || "";
 52011                this.anchorType = (0, c.getStringOption)(e.anchorType, [
 52012                  "topLeft",
 52013                  "bottomCenter",
 52014                  "bottomLeft",
 52015                  "bottomRight",
 52016                  "middleCenter",
 52017                  "middleLeft",
 52018                  "middleRight",
 52019                  "topCenter",
 52020                  "topRight",
 52021                ]);
 52022                this.colSpan = (0, c.getInteger)({
 52023                  data: e.colSpan,
 52024                  defaultValue: 1,
 52025                  validate: (e) => e >= 1 || -1 === e,
 52026                });
 52027                this.h = e.h ? (0, c.getMeasurement)(e.h) : "";
 52028                this.hAlign = (0, c.getStringOption)(e.hAlign, [
 52029                  "left",
 52030                  "center",
 52031                  "justify",
 52032                  "justifyAll",
 52033                  "radix",
 52034                  "right",
 52035                ]);
 52036                this.id = e.id || "";
 52037                this.layout = (0, c.getStringOption)(e.layout, [
 52038                  "position",
 52039                  "lr-tb",
 52040                  "rl-row",
 52041                  "rl-tb",
 52042                  "row",
 52043                  "table",
 52044                  "tb",
 52045                ]);
 52046                this.maxH = (0, c.getMeasurement)(e.maxH, "0pt");
 52047                this.maxW = (0, c.getMeasurement)(e.maxW, "0pt");
 52048                this.minH = (0, c.getMeasurement)(e.minH, "0pt");
 52049                this.minW = (0, c.getMeasurement)(e.minW, "0pt");
 52050                this.name = e.name || "";
 52051                this.presence = (0, c.getStringOption)(e.presence, [
 52052                  "visible",
 52053                  "hidden",
 52054                  "inactive",
 52055                  "invisible",
 52056                ]);
 52057                this.relevant = (0, c.getRelevant)(e.relevant);
 52058                this.use = e.use || "";
 52059                this.usehref = e.usehref || "";
 52060                this.w = e.w ? (0, c.getMeasurement)(e.w) : "";
 52061                this.x = (0, c.getMeasurement)(e.x, "0pt");
 52062                this.y = (0, c.getMeasurement)(e.y, "0pt");
 52063                this.assist = null;
 52064                this.bind = null;
 52065                this.border = null;
 52066                this.calculate = null;
 52067                this.caption = null;
 52068                this.desc = null;
 52069                this.extras = null;
 52070                this.margin = null;
 52071                this.para = null;
 52072                this.traversal = null;
 52073                this.validate = null;
 52074                this.connect = new o.XFAObjectArray();
 52075                this.event = new o.XFAObjectArray();
 52076                this.field = new o.XFAObjectArray();
 52077                this.setProperty = new o.XFAObjectArray();
 52078              }
 52079              [r.$isBindable]() {
 52080                return !0;
 52081              }
 52082              [r.$hasSettableValue]() {
 52083                return !0;
 52084              }
 52085              [r.$setValue](e) {
 52086                for (const t of this.field.children) {
 52087                  if (!t.value) {
 52088                    const e = new Value({});
 52089                    t[r.$appendChild](e);
 52090                    t.value = e;
 52091                  }
 52092                  t.value[r.$setValue](e);
 52093                }
 52094              }
 52095              [r.$isThereMoreWidth]() {
 52096                return (
 52097                  (this.layout.endsWith("-tb") &&
 52098                    0 === this[r.$extra].attempt &&
 52099                    this[r.$extra].numberInLine > 0) ||
 52100                  this[r.$getParent]()[r.$isThereMoreWidth]()
 52101                );
 52102              }
 52103              [r.$isSplittable]() {
 52104                const e = this[r.$getSubformParent]();
 52105                if (!e[r.$isSplittable]()) return !1;
 52106                if (void 0 !== this[r.$extra]._isSplittable)
 52107                  return this[r.$extra]._isSplittable;
 52108                if ("position" === this.layout || this.layout.includes("row")) {
 52109                  this[r.$extra]._isSplittable = !1;
 52110                  return !1;
 52111                }
 52112                if (e.layout?.endsWith("-tb") && 0 !== e[r.$extra].numberInLine)
 52113                  return !1;
 52114                this[r.$extra]._isSplittable = !0;
 52115                return !0;
 52116              }
 52117              [r.$flushHTML]() {
 52118                return (0, i.flushHTML)(this);
 52119              }
 52120              [r.$addHTML](e, t) {
 52121                (0, i.addHTML)(this, e, t);
 52122              }
 52123              [r.$getAvailableSpace]() {
 52124                return (0, i.getAvailableSpace)(this);
 52125              }
 52126              [r.$toHTML](e) {
 52127                setTabIndex(this);
 52128                if (
 52129                  "hidden" === this.presence ||
 52130                  "inactive" === this.presence ||
 52131                  0 === this.h ||
 52132                  0 === this.w
 52133                )
 52134                  return c.HTMLResult.EMPTY;
 52135                (0, s.fixDimensions)(this);
 52136                const t = [],
 52137                  a = { id: this[r.$uid], class: [] };
 52138                (0, s.setAccess)(this, a.class);
 52139                this[r.$extra] || (this[r.$extra] = Object.create(null));
 52140                Object.assign(this[r.$extra], {
 52141                  children: t,
 52142                  attributes: a,
 52143                  attempt: 0,
 52144                  line: null,
 52145                  numberInLine: 0,
 52146                  availableSpace: {
 52147                    width: Math.min(this.w || 1 / 0, e.width),
 52148                    height: Math.min(this.h || 1 / 0, e.height),
 52149                  },
 52150                  width: 0,
 52151                  height: 0,
 52152                  prevHeight: 0,
 52153                  currentWidth: 0,
 52154                });
 52155                const n = this[r.$isSplittable]();
 52156                n || setFirstUnsplittable(this);
 52157                if (!(0, i.checkDimensions)(this, e)) return c.HTMLResult.FAILURE;
 52158                const o = new Set(["field"]);
 52159                if (this.layout.includes("row")) {
 52160                  const e = this[r.$getSubformParent]().columnWidths;
 52161                  if (Array.isArray(e) && e.length > 0) {
 52162                    this[r.$extra].columnWidths = e;
 52163                    this[r.$extra].currentColumn = 0;
 52164                  }
 52165                }
 52166                const l = (0, s.toStyle)(
 52167                    this,
 52168                    "anchorType",
 52169                    "dimensions",
 52170                    "position",
 52171                    "presence",
 52172                    "border",
 52173                    "margin",
 52174                    "hAlign",
 52175                  ),
 52176                  h = ["xfaExclgroup"],
 52177                  u = (0, s.layoutClass)(this);
 52178                u && h.push(u);
 52179                (0, s.isPrintOnly)(this) && h.push("xfaPrintOnly");
 52180                a.style = l;
 52181                a.class = h;
 52182                this.name && (a.xfaName = this.name);
 52183                this[r.$pushPara]();
 52184                const d = "lr-tb" === this.layout || "rl-tb" === this.layout,
 52185                  f = d ? 2 : 1;
 52186                for (; this[r.$extra].attempt < f; this[r.$extra].attempt++) {
 52187                  d &&
 52188                    1 === this[r.$extra].attempt &&
 52189                    (this[r.$extra].numberInLine = 0);
 52190                  const e = this[r.$childrenToHTML]({ filter: o, include: !0 });
 52191                  if (e.success) break;
 52192                  if (e.isBreak()) {
 52193                    this[r.$popPara]();
 52194                    return e;
 52195                  }
 52196                  if (
 52197                    d &&
 52198                    0 === this[r.$extra].attempt &&
 52199                    0 === this[r.$extra].numberInLine &&
 52200                    !this[r.$getTemplateRoot]()[r.$extra].noLayoutFailure
 52201                  ) {
 52202                    this[r.$extra].attempt = f;
 52203                    break;
 52204                  }
 52205                }
 52206                this[r.$popPara]();
 52207                n || unsetFirstUnsplittable(this);
 52208                if (this[r.$extra].attempt === f) {
 52209                  n || delete this[r.$extra];
 52210                  return c.HTMLResult.FAILURE;
 52211                }
 52212                let g = 0,
 52213                  p = 0;
 52214                if (this.margin) {
 52215                  g = this.margin.leftInset + this.margin.rightInset;
 52216                  p = this.margin.topInset + this.margin.bottomInset;
 52217                }
 52218                const m = Math.max(this[r.$extra].width + g, this.w || 0),
 52219                  b = Math.max(this[r.$extra].height + p, this.h || 0),
 52220                  y = [this.x, this.y, m, b];
 52221                "" === this.w && (l.width = (0, s.measureToString)(m));
 52222                "" === this.h && (l.height = (0, s.measureToString)(b));
 52223                const w = { name: "div", attributes: a, children: t };
 52224                applyAssist(this, a);
 52225                delete this[r.$extra];
 52226                return c.HTMLResult.success((0, s.createWrapper)(this, w), y);
 52227              }
 52228            }
 52229            class Execute extends o.XFAObject {
 52230              constructor(e) {
 52231                super(f, "execute");
 52232                this.connection = e.connection || "";
 52233                this.executeType = (0, c.getStringOption)(e.executeType, [
 52234                  "import",
 52235                  "remerge",
 52236                ]);
 52237                this.id = e.id || "";
 52238                this.runAt = (0, c.getStringOption)(e.runAt, [
 52239                  "client",
 52240                  "both",
 52241                  "server",
 52242                ]);
 52243                this.use = e.use || "";
 52244                this.usehref = e.usehref || "";
 52245              }
 52246            }
 52247            class Extras extends o.XFAObject {
 52248              constructor(e) {
 52249                super(f, "extras", !0);
 52250                this.id = e.id || "";
 52251                this.name = e.name || "";
 52252                this.use = e.use || "";
 52253                this.usehref = e.usehref || "";
 52254                this.boolean = new o.XFAObjectArray();
 52255                this.date = new o.XFAObjectArray();
 52256                this.dateTime = new o.XFAObjectArray();
 52257                this.decimal = new o.XFAObjectArray();
 52258                this.exData = new o.XFAObjectArray();
 52259                this.extras = new o.XFAObjectArray();
 52260                this.float = new o.XFAObjectArray();
 52261                this.image = new o.XFAObjectArray();
 52262                this.integer = new o.XFAObjectArray();
 52263                this.text = new o.XFAObjectArray();
 52264                this.time = new o.XFAObjectArray();
 52265              }
 52266            }
 52267            class Field extends o.XFAObject {
 52268              constructor(e) {
 52269                super(f, "field", !0);
 52270                this.access = (0, c.getStringOption)(e.access, [
 52271                  "open",
 52272                  "nonInteractive",
 52273                  "protected",
 52274                  "readOnly",
 52275                ]);
 52276                this.accessKey = e.accessKey || "";
 52277                this.anchorType = (0, c.getStringOption)(e.anchorType, [
 52278                  "topLeft",
 52279                  "bottomCenter",
 52280                  "bottomLeft",
 52281                  "bottomRight",
 52282                  "middleCenter",
 52283                  "middleLeft",
 52284                  "middleRight",
 52285                  "topCenter",
 52286                  "topRight",
 52287                ]);
 52288                this.colSpan = (0, c.getInteger)({
 52289                  data: e.colSpan,
 52290                  defaultValue: 1,
 52291                  validate: (e) => e >= 1 || -1 === e,
 52292                });
 52293                this.h = e.h ? (0, c.getMeasurement)(e.h) : "";
 52294                this.hAlign = (0, c.getStringOption)(e.hAlign, [
 52295                  "left",
 52296                  "center",
 52297                  "justify",
 52298                  "justifyAll",
 52299                  "radix",
 52300                  "right",
 52301                ]);
 52302                this.id = e.id || "";
 52303                this.locale = e.locale || "";
 52304                this.maxH = (0, c.getMeasurement)(e.maxH, "0pt");
 52305                this.maxW = (0, c.getMeasurement)(e.maxW, "0pt");
 52306                this.minH = (0, c.getMeasurement)(e.minH, "0pt");
 52307                this.minW = (0, c.getMeasurement)(e.minW, "0pt");
 52308                this.name = e.name || "";
 52309                this.presence = (0, c.getStringOption)(e.presence, [
 52310                  "visible",
 52311                  "hidden",
 52312                  "inactive",
 52313                  "invisible",
 52314                ]);
 52315                this.relevant = (0, c.getRelevant)(e.relevant);
 52316                this.rotate = (0, c.getInteger)({
 52317                  data: e.rotate,
 52318                  defaultValue: 0,
 52319                  validate: (e) => e % 90 == 0,
 52320                });
 52321                this.use = e.use || "";
 52322                this.usehref = e.usehref || "";
 52323                this.w = e.w ? (0, c.getMeasurement)(e.w) : "";
 52324                this.x = (0, c.getMeasurement)(e.x, "0pt");
 52325                this.y = (0, c.getMeasurement)(e.y, "0pt");
 52326                this.assist = null;
 52327                this.bind = null;
 52328                this.border = null;
 52329                this.calculate = null;
 52330                this.caption = null;
 52331                this.desc = null;
 52332                this.extras = null;
 52333                this.font = null;
 52334                this.format = null;
 52335                this.items = new o.XFAObjectArray(2);
 52336                this.keep = null;
 52337                this.margin = null;
 52338                this.para = null;
 52339                this.traversal = null;
 52340                this.ui = null;
 52341                this.validate = null;
 52342                this.value = null;
 52343                this.bindItems = new o.XFAObjectArray();
 52344                this.connect = new o.XFAObjectArray();
 52345                this.event = new o.XFAObjectArray();
 52346                this.setProperty = new o.XFAObjectArray();
 52347              }
 52348              [r.$isBindable]() {
 52349                return !0;
 52350              }
 52351              [r.$setValue](e) {
 52352                _setValue(this, e);
 52353              }
 52354              [r.$toHTML](e) {
 52355                setTabIndex(this);
 52356                if (!this.ui) {
 52357                  this.ui = new Ui({});
 52358                  this.ui[r.$globalData] = this[r.$globalData];
 52359                  this[r.$appendChild](this.ui);
 52360                  let e;
 52361                  switch (this.items.children.length) {
 52362                    case 0:
 52363                      e = new TextEdit({});
 52364                      this.ui.textEdit = e;
 52365                      break;
 52366                    case 1:
 52367                      e = new CheckButton({});
 52368                      this.ui.checkButton = e;
 52369                      break;
 52370                    case 2:
 52371                      e = new ChoiceList({});
 52372                      this.ui.choiceList = e;
 52373                  }
 52374                  this.ui[r.$appendChild](e);
 52375                }
 52376                if (
 52377                  !this.ui ||
 52378                  "hidden" === this.presence ||
 52379                  "inactive" === this.presence ||
 52380                  0 === this.h ||
 52381                  0 === this.w
 52382                )
 52383                  return c.HTMLResult.EMPTY;
 52384                this.caption && delete this.caption[r.$extra];
 52385                this[r.$pushPara]();
 52386                const t = this.caption ? this.caption[r.$toHTML](e).html : null,
 52387                  a = this.w,
 52388                  n = this.h;
 52389                let o = 0,
 52390                  l = 0;
 52391                if (this.margin) {
 52392                  o = this.margin.leftInset + this.margin.rightInset;
 52393                  l = this.margin.topInset + this.margin.bottomInset;
 52394                }
 52395                let u = null;
 52396                if ("" === this.w || "" === this.h) {
 52397                  let t = null,
 52398                    a = null,
 52399                    n = 0,
 52400                    i = 0;
 52401                  if (this.ui.checkButton) n = i = this.ui.checkButton.size;
 52402                  else {
 52403                    const { w: t, h: a } = (0, s.layoutNode)(this, e);
 52404                    if (null !== t) {
 52405                      n = t;
 52406                      i = a;
 52407                    } else i = (0, h.getMetrics)(this.font, !0).lineNoGap;
 52408                  }
 52409                  u = getBorderDims(this.ui[r.$getExtra]());
 52410                  n += u.w;
 52411                  i += u.h;
 52412                  if (this.caption) {
 52413                    const {
 52414                      w: s,
 52415                      h: o,
 52416                      isBroken: l,
 52417                    } = this.caption[r.$getExtra](e);
 52418                    if (l && this[r.$getSubformParent]()[r.$isThereMoreWidth]()) {
 52419                      this[r.$popPara]();
 52420                      return c.HTMLResult.FAILURE;
 52421                    }
 52422                    t = s;
 52423                    a = o;
 52424                    switch (this.caption.placement) {
 52425                      case "left":
 52426                      case "right":
 52427                      case "inline":
 52428                        t += n;
 52429                        break;
 52430                      case "top":
 52431                      case "bottom":
 52432                        a += i;
 52433                    }
 52434                  } else {
 52435                    t = n;
 52436                    a = i;
 52437                  }
 52438                  if (t && "" === this.w) {
 52439                    t += o;
 52440                    this.w = Math.min(
 52441                      this.maxW <= 0 ? 1 / 0 : this.maxW,
 52442                      this.minW + 1 < t ? t : this.minW,
 52443                    );
 52444                  }
 52445                  if (a && "" === this.h) {
 52446                    a += l;
 52447                    this.h = Math.min(
 52448                      this.maxH <= 0 ? 1 / 0 : this.maxH,
 52449                      this.minH + 1 < a ? a : this.minH,
 52450                    );
 52451                  }
 52452                }
 52453                this[r.$popPara]();
 52454                (0, s.fixDimensions)(this);
 52455                setFirstUnsplittable(this);
 52456                if (!(0, i.checkDimensions)(this, e)) {
 52457                  this.w = a;
 52458                  this.h = n;
 52459                  this[r.$popPara]();
 52460                  return c.HTMLResult.FAILURE;
 52461                }
 52462                unsetFirstUnsplittable(this);
 52463                const d = (0, s.toStyle)(
 52464                  this,
 52465                  "font",
 52466                  "dimensions",
 52467                  "position",
 52468                  "rotate",
 52469                  "anchorType",
 52470                  "presence",
 52471                  "margin",
 52472                  "hAlign",
 52473                );
 52474                (0, s.setMinMaxDimensions)(this, d);
 52475                const f = ["xfaField"];
 52476                this.font && f.push("xfaFont");
 52477                (0, s.isPrintOnly)(this) && f.push("xfaPrintOnly");
 52478                const g = { style: d, id: this[r.$uid], class: f };
 52479                if (d.margin) {
 52480                  d.padding = d.margin;
 52481                  delete d.margin;
 52482                }
 52483                (0, s.setAccess)(this, f);
 52484                this.name && (g.xfaName = this.name);
 52485                const p = [],
 52486                  m = { name: "div", attributes: g, children: p };
 52487                applyAssist(this, g);
 52488                const b = this.border ? this.border[r.$toStyle]() : null,
 52489                  y = (0, s.computeBbox)(this, m, e),
 52490                  w = this.ui[r.$toHTML]().html;
 52491                if (!w) {
 52492                  Object.assign(d, b);
 52493                  return c.HTMLResult.success((0, s.createWrapper)(this, m), y);
 52494                }
 52495                this[r.$tabIndex] &&
 52496                  (w.children?.[0]
 52497                    ? (w.children[0].attributes.tabindex = this[r.$tabIndex])
 52498                    : (w.attributes.tabindex = this[r.$tabIndex]));
 52499                w.attributes.style || (w.attributes.style = Object.create(null));
 52500                let S = null;
 52501                if (this.ui.button) {
 52502                  1 === w.children.length && ([S] = w.children.splice(0, 1));
 52503                  Object.assign(w.attributes.style, b);
 52504                } else Object.assign(d, b);
 52505                p.push(w);
 52506                if (this.value)
 52507                  if (this.ui.imageEdit)
 52508                    w.children.push(this.value[r.$toHTML]().html);
 52509                  else if (!this.ui.button) {
 52510                    let e = "";
 52511                    if (this.value.exData) e = this.value.exData[r.$text]();
 52512                    else if (this.value.text) e = this.value.text[r.$getExtra]();
 52513                    else {
 52514                      const t = this.value[r.$toHTML]().html;
 52515                      null !== t && (e = t.children[0].value);
 52516                    }
 52517                    this.ui.textEdit &&
 52518                      this.value.text?.maxChars &&
 52519                      (w.children[0].attributes.maxLength =
 52520                        this.value.text.maxChars);
 52521                    if (e) {
 52522                      if (this.ui.numericEdit) {
 52523                        e = parseFloat(e);
 52524                        e = isNaN(e) ? "" : e.toString();
 52525                      }
 52526                      "textarea" === w.children[0].name
 52527                        ? (w.children[0].attributes.textContent = e)
 52528                        : (w.children[0].attributes.value = e);
 52529                    }
 52530                  }
 52531                if (!this.ui.imageEdit && w.children?.[0] && this.h) {
 52532                  u = u || getBorderDims(this.ui[r.$getExtra]());
 52533                  let t = 0;
 52534                  if (
 52535                    this.caption &&
 52536                    ["top", "bottom"].includes(this.caption.placement)
 52537                  ) {
 52538                    t = this.caption.reserve;
 52539                    t <= 0 && (t = this.caption[r.$getExtra](e).h);
 52540                    const a = this.h - t - l - u.h;
 52541                    w.children[0].attributes.style.height = (0,
 52542                    s.measureToString)(a);
 52543                  } else w.children[0].attributes.style.height = "100%";
 52544                }
 52545                S && w.children.push(S);
 52546                if (!t) {
 52547                  w.attributes.class && w.attributes.class.push("xfaLeft");
 52548                  this.w = a;
 52549                  this.h = n;
 52550                  return c.HTMLResult.success((0, s.createWrapper)(this, m), y);
 52551                }
 52552                if (this.ui.button) {
 52553                  d.padding && delete d.padding;
 52554                  "div" === t.name && (t.name = "span");
 52555                  w.children.push(t);
 52556                  return c.HTMLResult.success(m, y);
 52557                }
 52558                this.ui.checkButton &&
 52559                  (t.attributes.class[0] = "xfaCaptionForCheckButton");
 52560                w.attributes.class || (w.attributes.class = []);
 52561                w.children.splice(0, 0, t);
 52562                switch (this.caption.placement) {
 52563                  case "left":
 52564                  case "inline":
 52565                    w.attributes.class.push("xfaLeft");
 52566                    break;
 52567                  case "right":
 52568                    w.attributes.class.push("xfaRight");
 52569                    break;
 52570                  case "top":
 52571                    w.attributes.class.push("xfaTop");
 52572                    break;
 52573                  case "bottom":
 52574                    w.attributes.class.push("xfaBottom");
 52575                }
 52576                this.w = a;
 52577                this.h = n;
 52578                return c.HTMLResult.success((0, s.createWrapper)(this, m), y);
 52579              }
 52580            }
 52581            t.Field = Field;
 52582            class Fill extends o.XFAObject {
 52583              constructor(e) {
 52584                super(f, "fill", !0);
 52585                this.id = e.id || "";
 52586                this.presence = (0, c.getStringOption)(e.presence, [
 52587                  "visible",
 52588                  "hidden",
 52589                  "inactive",
 52590                  "invisible",
 52591                ]);
 52592                this.use = e.use || "";
 52593                this.usehref = e.usehref || "";
 52594                this.color = null;
 52595                this.extras = null;
 52596                this.linear = null;
 52597                this.pattern = null;
 52598                this.radial = null;
 52599                this.solid = null;
 52600                this.stipple = null;
 52601              }
 52602              [r.$toStyle]() {
 52603                const e = this[r.$getParent](),
 52604                  t = e[r.$getParent]()[r.$getParent](),
 52605                  a = Object.create(null);
 52606                let n = "color",
 52607                  i = n;
 52608                if (e instanceof Border) {
 52609                  n = "background-color";
 52610                  i = "background";
 52611                  t instanceof Ui && (a.backgroundColor = "white");
 52612                }
 52613                if (e instanceof Rectangle || e instanceof Arc) {
 52614                  n = i = "fill";
 52615                  a.fill = "white";
 52616                }
 52617                for (const e of Object.getOwnPropertyNames(this)) {
 52618                  if ("extras" === e || "color" === e) continue;
 52619                  const t = this[e];
 52620                  if (!(t instanceof o.XFAObject)) continue;
 52621                  const s = t[r.$toStyle](this.color);
 52622                  s && (a[s.startsWith("#") ? n : i] = s);
 52623                  return a;
 52624                }
 52625                if (this.color?.value) {
 52626                  const e = this.color[r.$toStyle]();
 52627                  a[e.startsWith("#") ? n : i] = e;
 52628                }
 52629                return a;
 52630              }
 52631            }
 52632            class Filter extends o.XFAObject {
 52633              constructor(e) {
 52634                super(f, "filter", !0);
 52635                this.addRevocationInfo = (0, c.getStringOption)(
 52636                  e.addRevocationInfo,
 52637                  ["", "required", "optional", "none"],
 52638                );
 52639                this.id = e.id || "";
 52640                this.name = e.name || "";
 52641                this.use = e.use || "";
 52642                this.usehref = e.usehref || "";
 52643                this.version = (0, c.getInteger)({
 52644                  data: this.version,
 52645                  defaultValue: 5,
 52646                  validate: (e) => e >= 1 && e <= 5,
 52647                });
 52648                this.appearanceFilter = null;
 52649                this.certificates = null;
 52650                this.digestMethods = null;
 52651                this.encodings = null;
 52652                this.encryptionMethods = null;
 52653                this.handler = null;
 52654                this.lockDocument = null;
 52655                this.mdp = null;
 52656                this.reasons = null;
 52657                this.timeStamp = null;
 52658              }
 52659            }
 52660            class Float extends o.ContentObject {
 52661              constructor(e) {
 52662                super(f, "float");
 52663                this.id = e.id || "";
 52664                this.name = e.name || "";
 52665                this.use = e.use || "";
 52666                this.usehref = e.usehref || "";
 52667              }
 52668              [r.$finalize]() {
 52669                const e = parseFloat(this[r.$content].trim());
 52670                this[r.$content] = isNaN(e) ? null : e;
 52671              }
 52672              [r.$toHTML](e) {
 52673                return valueToHtml(
 52674                  null !== this[r.$content] ? this[r.$content].toString() : "",
 52675                );
 52676              }
 52677            }
 52678            class Font extends o.XFAObject {
 52679              constructor(e) {
 52680                super(f, "font", !0);
 52681                this.baselineShift = (0, c.getMeasurement)(e.baselineShift);
 52682                this.fontHorizontalScale = (0, c.getFloat)({
 52683                  data: e.fontHorizontalScale,
 52684                  defaultValue: 100,
 52685                  validate: (e) => e >= 0,
 52686                });
 52687                this.fontVerticalScale = (0, c.getFloat)({
 52688                  data: e.fontVerticalScale,
 52689                  defaultValue: 100,
 52690                  validate: (e) => e >= 0,
 52691                });
 52692                this.id = e.id || "";
 52693                this.kerningMode = (0, c.getStringOption)(e.kerningMode, [
 52694                  "none",
 52695                  "pair",
 52696                ]);
 52697                this.letterSpacing = (0, c.getMeasurement)(e.letterSpacing, "0");
 52698                this.lineThrough = (0, c.getInteger)({
 52699                  data: e.lineThrough,
 52700                  defaultValue: 0,
 52701                  validate: (e) => 1 === e || 2 === e,
 52702                });
 52703                this.lineThroughPeriod = (0, c.getStringOption)(
 52704                  e.lineThroughPeriod,
 52705                  ["all", "word"],
 52706                );
 52707                this.overline = (0, c.getInteger)({
 52708                  data: e.overline,
 52709                  defaultValue: 0,
 52710                  validate: (e) => 1 === e || 2 === e,
 52711                });
 52712                this.overlinePeriod = (0, c.getStringOption)(e.overlinePeriod, [
 52713                  "all",
 52714                  "word",
 52715                ]);
 52716                this.posture = (0, c.getStringOption)(e.posture, [
 52717                  "normal",
 52718                  "italic",
 52719                ]);
 52720                this.size = (0, c.getMeasurement)(e.size, "10pt");
 52721                this.typeface = e.typeface || "Courier";
 52722                this.underline = (0, c.getInteger)({
 52723                  data: e.underline,
 52724                  defaultValue: 0,
 52725                  validate: (e) => 1 === e || 2 === e,
 52726                });
 52727                this.underlinePeriod = (0, c.getStringOption)(e.underlinePeriod, [
 52728                  "all",
 52729                  "word",
 52730                ]);
 52731                this.use = e.use || "";
 52732                this.usehref = e.usehref || "";
 52733                this.weight = (0, c.getStringOption)(e.weight, [
 52734                  "normal",
 52735                  "bold",
 52736                ]);
 52737                this.extras = null;
 52738                this.fill = null;
 52739              }
 52740              [r.$clean](e) {
 52741                super[r.$clean](e);
 52742                this[r.$globalData].usedTypefaces.add(this.typeface);
 52743              }
 52744              [r.$toStyle]() {
 52745                const e = (0, s.toStyle)(this, "fill"),
 52746                  t = e.color;
 52747                if (t)
 52748                  if ("#000000" === t) delete e.color;
 52749                  else if (!t.startsWith("#")) {
 52750                    e.background = t;
 52751                    e.backgroundClip = "text";
 52752                    e.color = "transparent";
 52753                  }
 52754                this.baselineShift &&
 52755                  (e.verticalAlign = (0, s.measureToString)(this.baselineShift));
 52756                e.fontKerning = "none" === this.kerningMode ? "none" : "normal";
 52757                e.letterSpacing = (0, s.measureToString)(this.letterSpacing);
 52758                if (0 !== this.lineThrough) {
 52759                  e.textDecoration = "line-through";
 52760                  2 === this.lineThrough && (e.textDecorationStyle = "double");
 52761                }
 52762                if (0 !== this.overline) {
 52763                  e.textDecoration = "overline";
 52764                  2 === this.overline && (e.textDecorationStyle = "double");
 52765                }
 52766                e.fontStyle = this.posture;
 52767                e.fontSize = (0, s.measureToString)(0.99 * this.size);
 52768                (0, s.setFontFamily)(
 52769                  this,
 52770                  this,
 52771                  this[r.$globalData].fontFinder,
 52772                  e,
 52773                );
 52774                if (0 !== this.underline) {
 52775                  e.textDecoration = "underline";
 52776                  2 === this.underline && (e.textDecorationStyle = "double");
 52777                }
 52778                e.fontWeight = this.weight;
 52779                return e;
 52780              }
 52781            }
 52782            class Format extends o.XFAObject {
 52783              constructor(e) {
 52784                super(f, "format", !0);
 52785                this.id = e.id || "";
 52786                this.use = e.use || "";
 52787                this.usehref = e.usehref || "";
 52788                this.extras = null;
 52789                this.picture = null;
 52790              }
 52791            }
 52792            class Handler extends o.StringObject {
 52793              constructor(e) {
 52794                super(f, "handler");
 52795                this.id = e.id || "";
 52796                this.type = (0, c.getStringOption)(e.type, [
 52797                  "optional",
 52798                  "required",
 52799                ]);
 52800                this.use = e.use || "";
 52801                this.usehref = e.usehref || "";
 52802              }
 52803            }
 52804            class Hyphenation extends o.XFAObject {
 52805              constructor(e) {
 52806                super(f, "hyphenation");
 52807                this.excludeAllCaps = (0, c.getInteger)({
 52808                  data: e.excludeAllCaps,
 52809                  defaultValue: 0,
 52810                  validate: (e) => 1 === e,
 52811                });
 52812                this.excludeInitialCap = (0, c.getInteger)({
 52813                  data: e.excludeInitialCap,
 52814                  defaultValue: 0,
 52815                  validate: (e) => 1 === e,
 52816                });
 52817                this.hyphenate = (0, c.getInteger)({
 52818                  data: e.hyphenate,
 52819                  defaultValue: 0,
 52820                  validate: (e) => 1 === e,
 52821                });
 52822                this.id = e.id || "";
 52823                this.pushCharacterCount = (0, c.getInteger)({
 52824                  data: e.pushCharacterCount,
 52825                  defaultValue: 3,
 52826                  validate: (e) => e >= 0,
 52827                });
 52828                this.remainCharacterCount = (0, c.getInteger)({
 52829                  data: e.remainCharacterCount,
 52830                  defaultValue: 3,
 52831                  validate: (e) => e >= 0,
 52832                });
 52833                this.use = e.use || "";
 52834                this.usehref = e.usehref || "";
 52835                this.wordCharacterCount = (0, c.getInteger)({
 52836                  data: e.wordCharacterCount,
 52837                  defaultValue: 7,
 52838                  validate: (e) => e >= 0,
 52839                });
 52840              }
 52841            }
 52842            class Image extends o.StringObject {
 52843              constructor(e) {
 52844                super(f, "image");
 52845                this.aspect = (0, c.getStringOption)(e.aspect, [
 52846                  "fit",
 52847                  "actual",
 52848                  "height",
 52849                  "none",
 52850                  "width",
 52851                ]);
 52852                this.contentType = e.contentType || "";
 52853                this.href = e.href || "";
 52854                this.id = e.id || "";
 52855                this.name = e.name || "";
 52856                this.transferEncoding = (0, c.getStringOption)(
 52857                  e.transferEncoding,
 52858                  ["base64", "none", "package"],
 52859                );
 52860                this.use = e.use || "";
 52861                this.usehref = e.usehref || "";
 52862              }
 52863              [r.$toHTML]() {
 52864                if (this.contentType && !m.has(this.contentType.toLowerCase()))
 52865                  return c.HTMLResult.EMPTY;
 52866                let e =
 52867                  this[r.$globalData].images &&
 52868                  this[r.$globalData].images.get(this.href);
 52869                if (!e && (this.href || !this[r.$content]))
 52870                  return c.HTMLResult.EMPTY;
 52871                e ||
 52872                  "base64" !== this.transferEncoding ||
 52873                  (e = (0, l.stringToBytes)(atob(this[r.$content])));
 52874                if (!e) return c.HTMLResult.EMPTY;
 52875                if (!this.contentType) {
 52876                  for (const [t, a] of b)
 52877                    if (e.length > t.length && t.every((t, a) => t === e[a])) {
 52878                      this.contentType = a;
 52879                      break;
 52880                    }
 52881                  if (!this.contentType) return c.HTMLResult.EMPTY;
 52882                }
 52883                const t = new Blob([e], { type: this.contentType });
 52884                let a;
 52885                switch (this.aspect) {
 52886                  case "fit":
 52887                  case "actual":
 52888                    break;
 52889                  case "height":
 52890                    a = { height: "100%", objectFit: "fill" };
 52891                    break;
 52892                  case "none":
 52893                    a = { width: "100%", height: "100%", objectFit: "fill" };
 52894                    break;
 52895                  case "width":
 52896                    a = { width: "100%", objectFit: "fill" };
 52897                }
 52898                const n = this[r.$getParent]();
 52899                return c.HTMLResult.success({
 52900                  name: "img",
 52901                  attributes: {
 52902                    class: ["xfaImage"],
 52903                    style: a,
 52904                    src: URL.createObjectURL(t),
 52905                    alt: n ? ariaLabel(n[r.$getParent]()) : null,
 52906                  },
 52907                });
 52908              }
 52909            }
 52910            class ImageEdit extends o.XFAObject {
 52911              constructor(e) {
 52912                super(f, "imageEdit", !0);
 52913                this.data = (0, c.getStringOption)(e.data, ["link", "embed"]);
 52914                this.id = e.id || "";
 52915                this.use = e.use || "";
 52916                this.usehref = e.usehref || "";
 52917                this.border = null;
 52918                this.extras = null;
 52919                this.margin = null;
 52920              }
 52921              [r.$toHTML](e) {
 52922                return "embed" === this.data
 52923                  ? c.HTMLResult.success({
 52924                      name: "div",
 52925                      children: [],
 52926                      attributes: {},
 52927                    })
 52928                  : c.HTMLResult.EMPTY;
 52929              }
 52930            }
 52931            class Integer extends o.ContentObject {
 52932              constructor(e) {
 52933                super(f, "integer");
 52934                this.id = e.id || "";
 52935                this.name = e.name || "";
 52936                this.use = e.use || "";
 52937                this.usehref = e.usehref || "";
 52938              }
 52939              [r.$finalize]() {
 52940                const e = parseInt(this[r.$content].trim(), 10);
 52941                this[r.$content] = isNaN(e) ? null : e;
 52942              }
 52943              [r.$toHTML](e) {
 52944                return valueToHtml(
 52945                  null !== this[r.$content] ? this[r.$content].toString() : "",
 52946                );
 52947              }
 52948            }
 52949            class Issuers extends o.XFAObject {
 52950              constructor(e) {
 52951                super(f, "issuers", !0);
 52952                this.id = e.id || "";
 52953                this.type = (0, c.getStringOption)(e.type, [
 52954                  "optional",
 52955                  "required",
 52956                ]);
 52957                this.use = e.use || "";
 52958                this.usehref = e.usehref || "";
 52959                this.certificate = new o.XFAObjectArray();
 52960              }
 52961            }
 52962            class Items extends o.XFAObject {
 52963              constructor(e) {
 52964                super(f, "items", !0);
 52965                this.id = e.id || "";
 52966                this.name = e.name || "";
 52967                this.presence = (0, c.getStringOption)(e.presence, [
 52968                  "visible",
 52969                  "hidden",
 52970                  "inactive",
 52971                  "invisible",
 52972                ]);
 52973                this.ref = e.ref || "";
 52974                this.save = (0, c.getInteger)({
 52975                  data: e.save,
 52976                  defaultValue: 0,
 52977                  validate: (e) => 1 === e,
 52978                });
 52979                this.use = e.use || "";
 52980                this.usehref = e.usehref || "";
 52981                this.boolean = new o.XFAObjectArray();
 52982                this.date = new o.XFAObjectArray();
 52983                this.dateTime = new o.XFAObjectArray();
 52984                this.decimal = new o.XFAObjectArray();
 52985                this.exData = new o.XFAObjectArray();
 52986                this.float = new o.XFAObjectArray();
 52987                this.image = new o.XFAObjectArray();
 52988                this.integer = new o.XFAObjectArray();
 52989                this.text = new o.XFAObjectArray();
 52990                this.time = new o.XFAObjectArray();
 52991              }
 52992              [r.$toHTML]() {
 52993                const e = [];
 52994                for (const t of this[r.$getChildren]()) e.push(t[r.$text]());
 52995                return c.HTMLResult.success(e);
 52996              }
 52997            }
 52998            t.Items = Items;
 52999            class Keep extends o.XFAObject {
 53000              constructor(e) {
 53001                super(f, "keep", !0);
 53002                this.id = e.id || "";
 53003                const t = ["none", "contentArea", "pageArea"];
 53004                this.intact = (0, c.getStringOption)(e.intact, t);
 53005                this.next = (0, c.getStringOption)(e.next, t);
 53006                this.previous = (0, c.getStringOption)(e.previous, t);
 53007                this.use = e.use || "";
 53008                this.usehref = e.usehref || "";
 53009                this.extras = null;
 53010              }
 53011            }
 53012            class KeyUsage extends o.XFAObject {
 53013              constructor(e) {
 53014                super(f, "keyUsage");
 53015                const t = ["", "yes", "no"];
 53016                this.crlSign = (0, c.getStringOption)(e.crlSign, t);
 53017                this.dataEncipherment = (0, c.getStringOption)(
 53018                  e.dataEncipherment,
 53019                  t,
 53020                );
 53021                this.decipherOnly = (0, c.getStringOption)(e.decipherOnly, t);
 53022                this.digitalSignature = (0, c.getStringOption)(
 53023                  e.digitalSignature,
 53024                  t,
 53025                );
 53026                this.encipherOnly = (0, c.getStringOption)(e.encipherOnly, t);
 53027                this.id = e.id || "";
 53028                this.keyAgreement = (0, c.getStringOption)(e.keyAgreement, t);
 53029                this.keyCertSign = (0, c.getStringOption)(e.keyCertSign, t);
 53030                this.keyEncipherment = (0, c.getStringOption)(
 53031                  e.keyEncipherment,
 53032                  t,
 53033                );
 53034                this.nonRepudiation = (0, c.getStringOption)(e.nonRepudiation, t);
 53035                this.type = (0, c.getStringOption)(e.type, [
 53036                  "optional",
 53037                  "required",
 53038                ]);
 53039                this.use = e.use || "";
 53040                this.usehref = e.usehref || "";
 53041              }
 53042            }
 53043            class Line extends o.XFAObject {
 53044              constructor(e) {
 53045                super(f, "line", !0);
 53046                this.hand = (0, c.getStringOption)(e.hand, [
 53047                  "even",
 53048                  "left",
 53049                  "right",
 53050                ]);
 53051                this.id = e.id || "";
 53052                this.slope = (0, c.getStringOption)(e.slope, ["\\", "/"]);
 53053                this.use = e.use || "";
 53054                this.usehref = e.usehref || "";
 53055                this.edge = null;
 53056              }
 53057              [r.$toHTML]() {
 53058                const e = this[r.$getParent]()[r.$getParent](),
 53059                  t = this.edge || new Edge({}),
 53060                  a = t[r.$toStyle](),
 53061                  n = Object.create(null),
 53062                  i = "visible" === t.presence ? t.thickness : 0;
 53063                n.strokeWidth = (0, s.measureToString)(i);
 53064                n.stroke = a.color;
 53065                let o,
 53066                  l,
 53067                  h,
 53068                  u,
 53069                  d = "100%",
 53070                  f = "100%";
 53071                if (e.w <= i) {
 53072                  [o, l, h, u] = ["50%", 0, "50%", "100%"];
 53073                  d = n.strokeWidth;
 53074                } else if (e.h <= i) {
 53075                  [o, l, h, u] = [0, "50%", "100%", "50%"];
 53076                  f = n.strokeWidth;
 53077                } else
 53078                  "\\" === this.slope
 53079                    ? ([o, l, h, u] = [0, 0, "100%", "100%"])
 53080                    : ([o, l, h, u] = [0, "100%", "100%", 0]);
 53081                const p = {
 53082                  name: "svg",
 53083                  children: [
 53084                    {
 53085                      name: "line",
 53086                      attributes: {
 53087                        xmlns: g,
 53088                        x1: o,
 53089                        y1: l,
 53090                        x2: h,
 53091                        y2: u,
 53092                        style: n,
 53093                      },
 53094                    },
 53095                  ],
 53096                  attributes: {
 53097                    xmlns: g,
 53098                    width: d,
 53099                    height: f,
 53100                    style: { overflow: "visible" },
 53101                  },
 53102                };
 53103                if (hasMargin(e))
 53104                  return c.HTMLResult.success({
 53105                    name: "div",
 53106                    attributes: {
 53107                      style: { display: "inline", width: "100%", height: "100%" },
 53108                    },
 53109                    children: [p],
 53110                  });
 53111                p.attributes.style.position = "absolute";
 53112                return c.HTMLResult.success(p);
 53113              }
 53114            }
 53115            class Linear extends o.XFAObject {
 53116              constructor(e) {
 53117                super(f, "linear", !0);
 53118                this.id = e.id || "";
 53119                this.type = (0, c.getStringOption)(e.type, [
 53120                  "toRight",
 53121                  "toBottom",
 53122                  "toLeft",
 53123                  "toTop",
 53124                ]);
 53125                this.use = e.use || "";
 53126                this.usehref = e.usehref || "";
 53127                this.color = null;
 53128                this.extras = null;
 53129              }
 53130              [r.$toStyle](e) {
 53131                e = e ? e[r.$toStyle]() : "#FFFFFF";
 53132                return `linear-gradient(${this.type
 53133                  .replace(/([RBLT])/, " $1")
 53134                  .toLowerCase()}, ${e}, ${
 53135                  this.color ? this.color[r.$toStyle]() : "#000000"
 53136                })`;
 53137              }
 53138            }
 53139            class LockDocument extends o.ContentObject {
 53140              constructor(e) {
 53141                super(f, "lockDocument");
 53142                this.id = e.id || "";
 53143                this.type = (0, c.getStringOption)(e.type, [
 53144                  "optional",
 53145                  "required",
 53146                ]);
 53147                this.use = e.use || "";
 53148                this.usehref = e.usehref || "";
 53149              }
 53150              [r.$finalize]() {
 53151                this[r.$content] = (0, c.getStringOption)(this[r.$content], [
 53152                  "auto",
 53153                  "0",
 53154                  "1",
 53155                ]);
 53156              }
 53157            }
 53158            class Manifest extends o.XFAObject {
 53159              constructor(e) {
 53160                super(f, "manifest", !0);
 53161                this.action = (0, c.getStringOption)(e.action, [
 53162                  "include",
 53163                  "all",
 53164                  "exclude",
 53165                ]);
 53166                this.id = e.id || "";
 53167                this.name = e.name || "";
 53168                this.use = e.use || "";
 53169                this.usehref = e.usehref || "";
 53170                this.extras = null;
 53171                this.ref = new o.XFAObjectArray();
 53172              }
 53173            }
 53174            class Margin extends o.XFAObject {
 53175              constructor(e) {
 53176                super(f, "margin", !0);
 53177                this.bottomInset = (0, c.getMeasurement)(e.bottomInset, "0");
 53178                this.id = e.id || "";
 53179                this.leftInset = (0, c.getMeasurement)(e.leftInset, "0");
 53180                this.rightInset = (0, c.getMeasurement)(e.rightInset, "0");
 53181                this.topInset = (0, c.getMeasurement)(e.topInset, "0");
 53182                this.use = e.use || "";
 53183                this.usehref = e.usehref || "";
 53184                this.extras = null;
 53185              }
 53186              [r.$toStyle]() {
 53187                return {
 53188                  margin:
 53189                    (0, s.measureToString)(this.topInset) +
 53190                    " " +
 53191                    (0, s.measureToString)(this.rightInset) +
 53192                    " " +
 53193                    (0, s.measureToString)(this.bottomInset) +
 53194                    " " +
 53195                    (0, s.measureToString)(this.leftInset),
 53196                };
 53197              }
 53198            }
 53199            class Mdp extends o.XFAObject {
 53200              constructor(e) {
 53201                super(f, "mdp");
 53202                this.id = e.id || "";
 53203                this.permissions = (0, c.getInteger)({
 53204                  data: e.permissions,
 53205                  defaultValue: 2,
 53206                  validate: (e) => 1 === e || 3 === e,
 53207                });
 53208                this.signatureType = (0, c.getStringOption)(e.signatureType, [
 53209                  "filler",
 53210                  "author",
 53211                ]);
 53212                this.use = e.use || "";
 53213                this.usehref = e.usehref || "";
 53214              }
 53215            }
 53216            class Medium extends o.XFAObject {
 53217              constructor(e) {
 53218                super(f, "medium");
 53219                this.id = e.id || "";
 53220                this.imagingBBox = (0, c.getBBox)(e.imagingBBox);
 53221                this.long = (0, c.getMeasurement)(e.long);
 53222                this.orientation = (0, c.getStringOption)(e.orientation, [
 53223                  "portrait",
 53224                  "landscape",
 53225                ]);
 53226                this.short = (0, c.getMeasurement)(e.short);
 53227                this.stock = e.stock || "";
 53228                this.trayIn = (0, c.getStringOption)(e.trayIn, [
 53229                  "auto",
 53230                  "delegate",
 53231                  "pageFront",
 53232                ]);
 53233                this.trayOut = (0, c.getStringOption)(e.trayOut, [
 53234                  "auto",
 53235                  "delegate",
 53236                ]);
 53237                this.use = e.use || "";
 53238                this.usehref = e.usehref || "";
 53239              }
 53240            }
 53241            class Message extends o.XFAObject {
 53242              constructor(e) {
 53243                super(f, "message", !0);
 53244                this.id = e.id || "";
 53245                this.use = e.use || "";
 53246                this.usehref = e.usehref || "";
 53247                this.text = new o.XFAObjectArray();
 53248              }
 53249            }
 53250            class NumericEdit extends o.XFAObject {
 53251              constructor(e) {
 53252                super(f, "numericEdit", !0);
 53253                this.hScrollPolicy = (0, c.getStringOption)(e.hScrollPolicy, [
 53254                  "auto",
 53255                  "off",
 53256                  "on",
 53257                ]);
 53258                this.id = e.id || "";
 53259                this.use = e.use || "";
 53260                this.usehref = e.usehref || "";
 53261                this.border = null;
 53262                this.comb = null;
 53263                this.extras = null;
 53264                this.margin = null;
 53265              }
 53266              [r.$toHTML](e) {
 53267                const t = (0, s.toStyle)(this, "border", "font", "margin"),
 53268                  a = this[r.$getParent]()[r.$getParent](),
 53269                  n = {
 53270                    name: "input",
 53271                    attributes: {
 53272                      type: "text",
 53273                      fieldId: a[r.$uid],
 53274                      dataId: a[r.$data]?.[r.$uid] || a[r.$uid],
 53275                      class: ["xfaTextfield"],
 53276                      style: t,
 53277                      "aria-label": ariaLabel(a),
 53278                      "aria-required": !1,
 53279                    },
 53280                  };
 53281                if (isRequired(a)) {
 53282                  n.attributes["aria-required"] = !0;
 53283                  n.attributes.required = !0;
 53284                }
 53285                return c.HTMLResult.success({
 53286                  name: "label",
 53287                  attributes: { class: ["xfaLabel"] },
 53288                  children: [n],
 53289                });
 53290              }
 53291            }
 53292            class Occur extends o.XFAObject {
 53293              constructor(e) {
 53294                super(f, "occur", !0);
 53295                this.id = e.id || "";
 53296                this.initial =
 53297                  "" !== e.initial
 53298                    ? (0, c.getInteger)({
 53299                        data: e.initial,
 53300                        defaultValue: "",
 53301                        validate: (e) => !0,
 53302                      })
 53303                    : "";
 53304                this.max =
 53305                  "" !== e.max
 53306                    ? (0, c.getInteger)({
 53307                        data: e.max,
 53308                        defaultValue: 1,
 53309                        validate: (e) => !0,
 53310                      })
 53311                    : "";
 53312                this.min =
 53313                  "" !== e.min
 53314                    ? (0, c.getInteger)({
 53315                        data: e.min,
 53316                        defaultValue: 1,
 53317                        validate: (e) => !0,
 53318                      })
 53319                    : "";
 53320                this.use = e.use || "";
 53321                this.usehref = e.usehref || "";
 53322                this.extras = null;
 53323              }
 53324              [r.$clean]() {
 53325                const e = this[r.$getParent](),
 53326                  t = this.min;
 53327                "" === this.min &&
 53328                  (this.min =
 53329                    e instanceof PageArea || e instanceof PageSet ? 0 : 1);
 53330                "" === this.max &&
 53331                  (this.max =
 53332                    "" === t
 53333                      ? e instanceof PageArea || e instanceof PageSet
 53334                        ? -1
 53335                        : 1
 53336                      : this.min);
 53337                -1 !== this.max && this.max < this.min && (this.max = this.min);
 53338                "" === this.initial &&
 53339                  (this.initial = e instanceof Template ? 1 : this.min);
 53340              }
 53341            }
 53342            class Oid extends o.StringObject {
 53343              constructor(e) {
 53344                super(f, "oid");
 53345                this.id = e.id || "";
 53346                this.name = e.name || "";
 53347                this.use = e.use || "";
 53348                this.usehref = e.usehref || "";
 53349              }
 53350            }
 53351            class Oids extends o.XFAObject {
 53352              constructor(e) {
 53353                super(f, "oids", !0);
 53354                this.id = e.id || "";
 53355                this.type = (0, c.getStringOption)(e.type, [
 53356                  "optional",
 53357                  "required",
 53358                ]);
 53359                this.use = e.use || "";
 53360                this.usehref = e.usehref || "";
 53361                this.oid = new o.XFAObjectArray();
 53362              }
 53363            }
 53364            class Overflow extends o.XFAObject {
 53365              constructor(e) {
 53366                super(f, "overflow");
 53367                this.id = e.id || "";
 53368                this.leader = e.leader || "";
 53369                this.target = e.target || "";
 53370                this.trailer = e.trailer || "";
 53371                this.use = e.use || "";
 53372                this.usehref = e.usehref || "";
 53373              }
 53374              [r.$getExtra]() {
 53375                if (!this[r.$extra]) {
 53376                  const e = this[r.$getParent](),
 53377                    t = this[r.$getTemplateRoot](),
 53378                    a = t[r.$searchNode](this.target, e),
 53379                    n = t[r.$searchNode](this.leader, e),
 53380                    i = t[r.$searchNode](this.trailer, e);
 53381                  this[r.$extra] = {
 53382                    target: a?.[0] || null,
 53383                    leader: n?.[0] || null,
 53384                    trailer: i?.[0] || null,
 53385                    addLeader: !1,
 53386                    addTrailer: !1,
 53387                  };
 53388                }
 53389                return this[r.$extra];
 53390              }
 53391            }
 53392            class PageArea extends o.XFAObject {
 53393              constructor(e) {
 53394                super(f, "pageArea", !0);
 53395                this.blankOrNotBlank = (0, c.getStringOption)(e.blankOrNotBlank, [
 53396                  "any",
 53397                  "blank",
 53398                  "notBlank",
 53399                ]);
 53400                this.id = e.id || "";
 53401                this.initialNumber = (0, c.getInteger)({
 53402                  data: e.initialNumber,
 53403                  defaultValue: 1,
 53404                  validate: (e) => !0,
 53405                });
 53406                this.name = e.name || "";
 53407                this.numbered = (0, c.getInteger)({
 53408                  data: e.numbered,
 53409                  defaultValue: 1,
 53410                  validate: (e) => !0,
 53411                });
 53412                this.oddOrEven = (0, c.getStringOption)(e.oddOrEven, [
 53413                  "any",
 53414                  "even",
 53415                  "odd",
 53416                ]);
 53417                this.pagePosition = (0, c.getStringOption)(e.pagePosition, [
 53418                  "any",
 53419                  "first",
 53420                  "last",
 53421                  "only",
 53422                  "rest",
 53423                ]);
 53424                this.relevant = (0, c.getRelevant)(e.relevant);
 53425                this.use = e.use || "";
 53426                this.usehref = e.usehref || "";
 53427                this.desc = null;
 53428                this.extras = null;
 53429                this.medium = null;
 53430                this.occur = null;
 53431                this.area = new o.XFAObjectArray();
 53432                this.contentArea = new o.XFAObjectArray();
 53433                this.draw = new o.XFAObjectArray();
 53434                this.exclGroup = new o.XFAObjectArray();
 53435                this.field = new o.XFAObjectArray();
 53436                this.subform = new o.XFAObjectArray();
 53437              }
 53438              [r.$isUsable]() {
 53439                if (!this[r.$extra]) {
 53440                  this[r.$extra] = { numberOfUse: 0 };
 53441                  return !0;
 53442                }
 53443                return (
 53444                  !this.occur ||
 53445                  -1 === this.occur.max ||
 53446                  this[r.$extra].numberOfUse < this.occur.max
 53447                );
 53448              }
 53449              [r.$cleanPage]() {
 53450                delete this[r.$extra];
 53451              }
 53452              [r.$getNextPage]() {
 53453                this[r.$extra] || (this[r.$extra] = { numberOfUse: 0 });
 53454                const e = this[r.$getParent]();
 53455                if ("orderedOccurrence" === e.relation && this[r.$isUsable]()) {
 53456                  this[r.$extra].numberOfUse += 1;
 53457                  return this;
 53458                }
 53459                return e[r.$getNextPage]();
 53460              }
 53461              [r.$getAvailableSpace]() {
 53462                return this[r.$extra].space || { width: 0, height: 0 };
 53463              }
 53464              [r.$toHTML]() {
 53465                this[r.$extra] || (this[r.$extra] = { numberOfUse: 1 });
 53466                const e = [];
 53467                this[r.$extra].children = e;
 53468                const t = Object.create(null);
 53469                if (this.medium && this.medium.short && this.medium.long) {
 53470                  t.width = (0, s.measureToString)(this.medium.short);
 53471                  t.height = (0, s.measureToString)(this.medium.long);
 53472                  this[r.$extra].space = {
 53473                    width: this.medium.short,
 53474                    height: this.medium.long,
 53475                  };
 53476                  if ("landscape" === this.medium.orientation) {
 53477                    const e = t.width;
 53478                    t.width = t.height;
 53479                    t.height = e;
 53480                    this[r.$extra].space = {
 53481                      width: this.medium.long,
 53482                      height: this.medium.short,
 53483                    };
 53484                  }
 53485                } else
 53486                  (0, l.warn)(
 53487                    "XFA - No medium specified in pageArea: please file a bug.",
 53488                  );
 53489                this[r.$childrenToHTML]({
 53490                  filter: new Set(["area", "draw", "field", "subform"]),
 53491                  include: !0,
 53492                });
 53493                this[r.$childrenToHTML]({
 53494                  filter: new Set(["contentArea"]),
 53495                  include: !0,
 53496                });
 53497                return c.HTMLResult.success({
 53498                  name: "div",
 53499                  children: e,
 53500                  attributes: {
 53501                    class: ["xfaPage"],
 53502                    id: this[r.$uid],
 53503                    style: t,
 53504                    xfaName: this.name,
 53505                  },
 53506                });
 53507              }
 53508            }
 53509            class PageSet extends o.XFAObject {
 53510              constructor(e) {
 53511                super(f, "pageSet", !0);
 53512                this.duplexImposition = (0, c.getStringOption)(
 53513                  e.duplexImposition,
 53514                  ["longEdge", "shortEdge"],
 53515                );
 53516                this.id = e.id || "";
 53517                this.name = e.name || "";
 53518                this.relation = (0, c.getStringOption)(e.relation, [
 53519                  "orderedOccurrence",
 53520                  "duplexPaginated",
 53521                  "simplexPaginated",
 53522                ]);
 53523                this.relevant = (0, c.getRelevant)(e.relevant);
 53524                this.use = e.use || "";
 53525                this.usehref = e.usehref || "";
 53526                this.extras = null;
 53527                this.occur = null;
 53528                this.pageArea = new o.XFAObjectArray();
 53529                this.pageSet = new o.XFAObjectArray();
 53530              }
 53531              [r.$cleanPage]() {
 53532                for (const e of this.pageArea.children) e[r.$cleanPage]();
 53533                for (const e of this.pageSet.children) e[r.$cleanPage]();
 53534              }
 53535              [r.$isUsable]() {
 53536                return (
 53537                  !this.occur ||
 53538                  -1 === this.occur.max ||
 53539                  this[r.$extra].numberOfUse < this.occur.max
 53540                );
 53541              }
 53542              [r.$getNextPage]() {
 53543                this[r.$extra] ||
 53544                  (this[r.$extra] = {
 53545                    numberOfUse: 1,
 53546                    pageIndex: -1,
 53547                    pageSetIndex: -1,
 53548                  });
 53549                if ("orderedOccurrence" === this.relation) {
 53550                  if (
 53551                    this[r.$extra].pageIndex + 1 <
 53552                    this.pageArea.children.length
 53553                  ) {
 53554                    this[r.$extra].pageIndex += 1;
 53555                    return this.pageArea.children[this[r.$extra].pageIndex][
 53556                      r.$getNextPage
 53557                    ]();
 53558                  }
 53559                  if (
 53560                    this[r.$extra].pageSetIndex + 1 <
 53561                    this.pageSet.children.length
 53562                  ) {
 53563                    this[r.$extra].pageSetIndex += 1;
 53564                    return this.pageSet.children[this[r.$extra].pageSetIndex][
 53565                      r.$getNextPage
 53566                    ]();
 53567                  }
 53568                  if (this[r.$isUsable]()) {
 53569                    this[r.$extra].numberOfUse += 1;
 53570                    this[r.$extra].pageIndex = -1;
 53571                    this[r.$extra].pageSetIndex = -1;
 53572                    return this[r.$getNextPage]();
 53573                  }
 53574                  const e = this[r.$getParent]();
 53575                  if (e instanceof PageSet) return e[r.$getNextPage]();
 53576                  this[r.$cleanPage]();
 53577                  return this[r.$getNextPage]();
 53578                }
 53579                const e = this[r.$getTemplateRoot]()[r.$extra].pageNumber,
 53580                  t = e % 2 == 0 ? "even" : "odd",
 53581                  a = 0 === e ? "first" : "rest";
 53582                let n = this.pageArea.children.find(
 53583                  (e) => e.oddOrEven === t && e.pagePosition === a,
 53584                );
 53585                if (n) return n;
 53586                n = this.pageArea.children.find(
 53587                  (e) => "any" === e.oddOrEven && e.pagePosition === a,
 53588                );
 53589                if (n) return n;
 53590                n = this.pageArea.children.find(
 53591                  (e) => "any" === e.oddOrEven && "any" === e.pagePosition,
 53592                );
 53593                return n || this.pageArea.children[0];
 53594              }
 53595            }
 53596            class Para extends o.XFAObject {
 53597              constructor(e) {
 53598                super(f, "para", !0);
 53599                this.hAlign = (0, c.getStringOption)(e.hAlign, [
 53600                  "left",
 53601                  "center",
 53602                  "justify",
 53603                  "justifyAll",
 53604                  "radix",
 53605                  "right",
 53606                ]);
 53607                this.id = e.id || "";
 53608                this.lineHeight = e.lineHeight
 53609                  ? (0, c.getMeasurement)(e.lineHeight, "0pt")
 53610                  : "";
 53611                this.marginLeft = e.marginLeft
 53612                  ? (0, c.getMeasurement)(e.marginLeft, "0pt")
 53613                  : "";
 53614                this.marginRight = e.marginRight
 53615                  ? (0, c.getMeasurement)(e.marginRight, "0pt")
 53616                  : "";
 53617                this.orphans = (0, c.getInteger)({
 53618                  data: e.orphans,
 53619                  defaultValue: 0,
 53620                  validate: (e) => e >= 0,
 53621                });
 53622                this.preserve = e.preserve || "";
 53623                this.radixOffset = e.radixOffset
 53624                  ? (0, c.getMeasurement)(e.radixOffset, "0pt")
 53625                  : "";
 53626                this.spaceAbove = e.spaceAbove
 53627                  ? (0, c.getMeasurement)(e.spaceAbove, "0pt")
 53628                  : "";
 53629                this.spaceBelow = e.spaceBelow
 53630                  ? (0, c.getMeasurement)(e.spaceBelow, "0pt")
 53631                  : "";
 53632                this.tabDefault = e.tabDefault
 53633                  ? (0, c.getMeasurement)(this.tabDefault)
 53634                  : "";
 53635                this.tabStops = (e.tabStops || "")
 53636                  .trim()
 53637                  .split(/\s+/)
 53638                  .map((e, t) => (t % 2 == 1 ? (0, c.getMeasurement)(e) : e));
 53639                this.textIndent = e.textIndent
 53640                  ? (0, c.getMeasurement)(e.textIndent, "0pt")
 53641                  : "";
 53642                this.use = e.use || "";
 53643                this.usehref = e.usehref || "";
 53644                this.vAlign = (0, c.getStringOption)(e.vAlign, [
 53645                  "top",
 53646                  "bottom",
 53647                  "middle",
 53648                ]);
 53649                this.widows = (0, c.getInteger)({
 53650                  data: e.widows,
 53651                  defaultValue: 0,
 53652                  validate: (e) => e >= 0,
 53653                });
 53654                this.hyphenation = null;
 53655              }
 53656              [r.$toStyle]() {
 53657                const e = (0, s.toStyle)(this, "hAlign");
 53658                "" !== this.marginLeft &&
 53659                  (e.paddingLeft = (0, s.measureToString)(this.marginLeft));
 53660                "" !== this.marginRight &&
 53661                  (e.paddingight = (0, s.measureToString)(this.marginRight));
 53662                "" !== this.spaceAbove &&
 53663                  (e.paddingTop = (0, s.measureToString)(this.spaceAbove));
 53664                "" !== this.spaceBelow &&
 53665                  (e.paddingBottom = (0, s.measureToString)(this.spaceBelow));
 53666                if ("" !== this.textIndent) {
 53667                  e.textIndent = (0, s.measureToString)(this.textIndent);
 53668                  (0, s.fixTextIndent)(e);
 53669                }
 53670                this.lineHeight > 0 &&
 53671                  (e.lineHeight = (0, s.measureToString)(this.lineHeight));
 53672                "" !== this.tabDefault &&
 53673                  (e.tabSize = (0, s.measureToString)(this.tabDefault));
 53674                this.tabStops.length;
 53675                this.hyphenatation &&
 53676                  Object.assign(e, this.hyphenatation[r.$toStyle]());
 53677                return e;
 53678              }
 53679            }
 53680            class PasswordEdit extends o.XFAObject {
 53681              constructor(e) {
 53682                super(f, "passwordEdit", !0);
 53683                this.hScrollPolicy = (0, c.getStringOption)(e.hScrollPolicy, [
 53684                  "auto",
 53685                  "off",
 53686                  "on",
 53687                ]);
 53688                this.id = e.id || "";
 53689                this.passwordChar = e.passwordChar || "*";
 53690                this.use = e.use || "";
 53691                this.usehref = e.usehref || "";
 53692                this.border = null;
 53693                this.extras = null;
 53694                this.margin = null;
 53695              }
 53696            }
 53697            class Pattern extends o.XFAObject {
 53698              constructor(e) {
 53699                super(f, "pattern", !0);
 53700                this.id = e.id || "";
 53701                this.type = (0, c.getStringOption)(e.type, [
 53702                  "crossHatch",
 53703                  "crossDiagonal",
 53704                  "diagonalLeft",
 53705                  "diagonalRight",
 53706                  "horizontal",
 53707                  "vertical",
 53708                ]);
 53709                this.use = e.use || "";
 53710                this.usehref = e.usehref || "";
 53711                this.color = null;
 53712                this.extras = null;
 53713              }
 53714              [r.$toStyle](e) {
 53715                e = e ? e[r.$toStyle]() : "#FFFFFF";
 53716                const t = this.color ? this.color[r.$toStyle]() : "#000000",
 53717                  a = "repeating-linear-gradient",
 53718                  n = `${e},${e} 5px,${t} 5px,${t} 10px`;
 53719                switch (this.type) {
 53720                  case "crossHatch":
 53721                    return `${a}(to top,${n}) ${a}(to right,${n})`;
 53722                  case "crossDiagonal":
 53723                    return `${a}(45deg,${n}) ${a}(-45deg,${n})`;
 53724                  case "diagonalLeft":
 53725                    return `${a}(45deg,${n})`;
 53726                  case "diagonalRight":
 53727                    return `${a}(-45deg,${n})`;
 53728                  case "horizontal":
 53729                    return `${a}(to top,${n})`;
 53730                  case "vertical":
 53731                    return `${a}(to right,${n})`;
 53732                }
 53733                return "";
 53734              }
 53735            }
 53736            class Picture extends o.StringObject {
 53737              constructor(e) {
 53738                super(f, "picture");
 53739                this.id = e.id || "";
 53740                this.use = e.use || "";
 53741                this.usehref = e.usehref || "";
 53742              }
 53743            }
 53744            class Proto extends o.XFAObject {
 53745              constructor(e) {
 53746                super(f, "proto", !0);
 53747                this.appearanceFilter = new o.XFAObjectArray();
 53748                this.arc = new o.XFAObjectArray();
 53749                this.area = new o.XFAObjectArray();
 53750                this.assist = new o.XFAObjectArray();
 53751                this.barcode = new o.XFAObjectArray();
 53752                this.bindItems = new o.XFAObjectArray();
 53753                this.bookend = new o.XFAObjectArray();
 53754                this.boolean = new o.XFAObjectArray();
 53755                this.border = new o.XFAObjectArray();
 53756                this.break = new o.XFAObjectArray();
 53757                this.breakAfter = new o.XFAObjectArray();
 53758                this.breakBefore = new o.XFAObjectArray();
 53759                this.button = new o.XFAObjectArray();
 53760                this.calculate = new o.XFAObjectArray();
 53761                this.caption = new o.XFAObjectArray();
 53762                this.certificate = new o.XFAObjectArray();
 53763                this.certificates = new o.XFAObjectArray();
 53764                this.checkButton = new o.XFAObjectArray();
 53765                this.choiceList = new o.XFAObjectArray();
 53766                this.color = new o.XFAObjectArray();
 53767                this.comb = new o.XFAObjectArray();
 53768                this.connect = new o.XFAObjectArray();
 53769                this.contentArea = new o.XFAObjectArray();
 53770                this.corner = new o.XFAObjectArray();
 53771                this.date = new o.XFAObjectArray();
 53772                this.dateTime = new o.XFAObjectArray();
 53773                this.dateTimeEdit = new o.XFAObjectArray();
 53774                this.decimal = new o.XFAObjectArray();
 53775                this.defaultUi = new o.XFAObjectArray();
 53776                this.desc = new o.XFAObjectArray();
 53777                this.digestMethod = new o.XFAObjectArray();
 53778                this.digestMethods = new o.XFAObjectArray();
 53779                this.draw = new o.XFAObjectArray();
 53780                this.edge = new o.XFAObjectArray();
 53781                this.encoding = new o.XFAObjectArray();
 53782                this.encodings = new o.XFAObjectArray();
 53783                this.encrypt = new o.XFAObjectArray();
 53784                this.encryptData = new o.XFAObjectArray();
 53785                this.encryption = new o.XFAObjectArray();
 53786                this.encryptionMethod = new o.XFAObjectArray();
 53787                this.encryptionMethods = new o.XFAObjectArray();
 53788                this.event = new o.XFAObjectArray();
 53789                this.exData = new o.XFAObjectArray();
 53790                this.exObject = new o.XFAObjectArray();
 53791                this.exclGroup = new o.XFAObjectArray();
 53792                this.execute = new o.XFAObjectArray();
 53793                this.extras = new o.XFAObjectArray();
 53794                this.field = new o.XFAObjectArray();
 53795                this.fill = new o.XFAObjectArray();
 53796                this.filter = new o.XFAObjectArray();
 53797                this.float = new o.XFAObjectArray();
 53798                this.font = new o.XFAObjectArray();
 53799                this.format = new o.XFAObjectArray();
 53800                this.handler = new o.XFAObjectArray();
 53801                this.hyphenation = new o.XFAObjectArray();
 53802                this.image = new o.XFAObjectArray();
 53803                this.imageEdit = new o.XFAObjectArray();
 53804                this.integer = new o.XFAObjectArray();
 53805                this.issuers = new o.XFAObjectArray();
 53806                this.items = new o.XFAObjectArray();
 53807                this.keep = new o.XFAObjectArray();
 53808                this.keyUsage = new o.XFAObjectArray();
 53809                this.line = new o.XFAObjectArray();
 53810                this.linear = new o.XFAObjectArray();
 53811                this.lockDocument = new o.XFAObjectArray();
 53812                this.manifest = new o.XFAObjectArray();
 53813                this.margin = new o.XFAObjectArray();
 53814                this.mdp = new o.XFAObjectArray();
 53815                this.medium = new o.XFAObjectArray();
 53816                this.message = new o.XFAObjectArray();
 53817                this.numericEdit = new o.XFAObjectArray();
 53818                this.occur = new o.XFAObjectArray();
 53819                this.oid = new o.XFAObjectArray();
 53820                this.oids = new o.XFAObjectArray();
 53821                this.overflow = new o.XFAObjectArray();
 53822                this.pageArea = new o.XFAObjectArray();
 53823                this.pageSet = new o.XFAObjectArray();
 53824                this.para = new o.XFAObjectArray();
 53825                this.passwordEdit = new o.XFAObjectArray();
 53826                this.pattern = new o.XFAObjectArray();
 53827                this.picture = new o.XFAObjectArray();
 53828                this.radial = new o.XFAObjectArray();
 53829                this.reason = new o.XFAObjectArray();
 53830                this.reasons = new o.XFAObjectArray();
 53831                this.rectangle = new o.XFAObjectArray();
 53832                this.ref = new o.XFAObjectArray();
 53833                this.script = new o.XFAObjectArray();
 53834                this.setProperty = new o.XFAObjectArray();
 53835                this.signData = new o.XFAObjectArray();
 53836                this.signature = new o.XFAObjectArray();
 53837                this.signing = new o.XFAObjectArray();
 53838                this.solid = new o.XFAObjectArray();
 53839                this.speak = new o.XFAObjectArray();
 53840                this.stipple = new o.XFAObjectArray();
 53841                this.subform = new o.XFAObjectArray();
 53842                this.subformSet = new o.XFAObjectArray();
 53843                this.subjectDN = new o.XFAObjectArray();
 53844                this.subjectDNs = new o.XFAObjectArray();
 53845                this.submit = new o.XFAObjectArray();
 53846                this.text = new o.XFAObjectArray();
 53847                this.textEdit = new o.XFAObjectArray();
 53848                this.time = new o.XFAObjectArray();
 53849                this.timeStamp = new o.XFAObjectArray();
 53850                this.toolTip = new o.XFAObjectArray();
 53851                this.traversal = new o.XFAObjectArray();
 53852                this.traverse = new o.XFAObjectArray();
 53853                this.ui = new o.XFAObjectArray();
 53854                this.validate = new o.XFAObjectArray();
 53855                this.value = new o.XFAObjectArray();
 53856                this.variables = new o.XFAObjectArray();
 53857              }
 53858            }
 53859            class Radial extends o.XFAObject {
 53860              constructor(e) {
 53861                super(f, "radial", !0);
 53862                this.id = e.id || "";
 53863                this.type = (0, c.getStringOption)(e.type, [
 53864                  "toEdge",
 53865                  "toCenter",
 53866                ]);
 53867                this.use = e.use || "";
 53868                this.usehref = e.usehref || "";
 53869                this.color = null;
 53870                this.extras = null;
 53871              }
 53872              [r.$toStyle](e) {
 53873                e = e ? e[r.$toStyle]() : "#FFFFFF";
 53874                const t = this.color ? this.color[r.$toStyle]() : "#000000";
 53875                return `radial-gradient(circle at center, ${
 53876                  "toEdge" === this.type ? `${e},${t}` : `${t},${e}`
 53877                })`;
 53878              }
 53879            }
 53880            class Reason extends o.StringObject {
 53881              constructor(e) {
 53882                super(f, "reason");
 53883                this.id = e.id || "";
 53884                this.name = e.name || "";
 53885                this.use = e.use || "";
 53886                this.usehref = e.usehref || "";
 53887              }
 53888            }
 53889            class Reasons extends o.XFAObject {
 53890              constructor(e) {
 53891                super(f, "reasons", !0);
 53892                this.id = e.id || "";
 53893                this.type = (0, c.getStringOption)(e.type, [
 53894                  "optional",
 53895                  "required",
 53896                ]);
 53897                this.use = e.use || "";
 53898                this.usehref = e.usehref || "";
 53899                this.reason = new o.XFAObjectArray();
 53900              }
 53901            }
 53902            class Rectangle extends o.XFAObject {
 53903              constructor(e) {
 53904                super(f, "rectangle", !0);
 53905                this.hand = (0, c.getStringOption)(e.hand, [
 53906                  "even",
 53907                  "left",
 53908                  "right",
 53909                ]);
 53910                this.id = e.id || "";
 53911                this.use = e.use || "";
 53912                this.usehref = e.usehref || "";
 53913                this.corner = new o.XFAObjectArray(4);
 53914                this.edge = new o.XFAObjectArray(4);
 53915                this.fill = null;
 53916              }
 53917              [r.$toHTML]() {
 53918                const e = this.edge.children.length
 53919                    ? this.edge.children[0]
 53920                    : new Edge({}),
 53921                  t = e[r.$toStyle](),
 53922                  a = Object.create(null);
 53923                "visible" === this.fill?.presence
 53924                  ? Object.assign(a, this.fill[r.$toStyle]())
 53925                  : (a.fill = "transparent");
 53926                a.strokeWidth = (0, s.measureToString)(
 53927                  "visible" === e.presence ? e.thickness : 0,
 53928                );
 53929                a.stroke = t.color;
 53930                const n = (
 53931                    this.corner.children.length
 53932                      ? this.corner.children[0]
 53933                      : new Corner({})
 53934                  )[r.$toStyle](),
 53935                  i = {
 53936                    name: "svg",
 53937                    children: [
 53938                      {
 53939                        name: "rect",
 53940                        attributes: {
 53941                          xmlns: g,
 53942                          width: "100%",
 53943                          height: "100%",
 53944                          x: 0,
 53945                          y: 0,
 53946                          rx: n.radius,
 53947                          ry: n.radius,
 53948                          style: a,
 53949                        },
 53950                      },
 53951                    ],
 53952                    attributes: {
 53953                      xmlns: g,
 53954                      style: { overflow: "visible" },
 53955                      width: "100%",
 53956                      height: "100%",
 53957                    },
 53958                  };
 53959                if (hasMargin(this[r.$getParent]()[r.$getParent]()))
 53960                  return c.HTMLResult.success({
 53961                    name: "div",
 53962                    attributes: {
 53963                      style: { display: "inline", width: "100%", height: "100%" },
 53964                    },
 53965                    children: [i],
 53966                  });
 53967                i.attributes.style.position = "absolute";
 53968                return c.HTMLResult.success(i);
 53969              }
 53970            }
 53971            class RefElement extends o.StringObject {
 53972              constructor(e) {
 53973                super(f, "ref");
 53974                this.id = e.id || "";
 53975                this.use = e.use || "";
 53976                this.usehref = e.usehref || "";
 53977              }
 53978            }
 53979            class Script extends o.StringObject {
 53980              constructor(e) {
 53981                super(f, "script");
 53982                this.binding = e.binding || "";
 53983                this.contentType = e.contentType || "";
 53984                this.id = e.id || "";
 53985                this.name = e.name || "";
 53986                this.runAt = (0, c.getStringOption)(e.runAt, [
 53987                  "client",
 53988                  "both",
 53989                  "server",
 53990                ]);
 53991                this.use = e.use || "";
 53992                this.usehref = e.usehref || "";
 53993              }
 53994            }
 53995            class SetProperty extends o.XFAObject {
 53996              constructor(e) {
 53997                super(f, "setProperty");
 53998                this.connection = e.connection || "";
 53999                this.ref = e.ref || "";
 54000                this.target = e.target || "";
 54001              }
 54002            }
 54003            t.SetProperty = SetProperty;
 54004            class SignData extends o.XFAObject {
 54005              constructor(e) {
 54006                super(f, "signData", !0);
 54007                this.id = e.id || "";
 54008                this.operation = (0, c.getStringOption)(e.operation, [
 54009                  "sign",
 54010                  "clear",
 54011                  "verify",
 54012                ]);
 54013                this.ref = e.ref || "";
 54014                this.target = e.target || "";
 54015                this.use = e.use || "";
 54016                this.usehref = e.usehref || "";
 54017                this.filter = null;
 54018                this.manifest = null;
 54019              }
 54020            }
 54021            class Signature extends o.XFAObject {
 54022              constructor(e) {
 54023                super(f, "signature", !0);
 54024                this.id = e.id || "";
 54025                this.type = (0, c.getStringOption)(e.type, ["PDF1.3", "PDF1.6"]);
 54026                this.use = e.use || "";
 54027                this.usehref = e.usehref || "";
 54028                this.border = null;
 54029                this.extras = null;
 54030                this.filter = null;
 54031                this.manifest = null;
 54032                this.margin = null;
 54033              }
 54034            }
 54035            class Signing extends o.XFAObject {
 54036              constructor(e) {
 54037                super(f, "signing", !0);
 54038                this.id = e.id || "";
 54039                this.type = (0, c.getStringOption)(e.type, [
 54040                  "optional",
 54041                  "required",
 54042                ]);
 54043                this.use = e.use || "";
 54044                this.usehref = e.usehref || "";
 54045                this.certificate = new o.XFAObjectArray();
 54046              }
 54047            }
 54048            class Solid extends o.XFAObject {
 54049              constructor(e) {
 54050                super(f, "solid", !0);
 54051                this.id = e.id || "";
 54052                this.use = e.use || "";
 54053                this.usehref = e.usehref || "";
 54054                this.extras = null;
 54055              }
 54056              [r.$toStyle](e) {
 54057                return e ? e[r.$toStyle]() : "#FFFFFF";
 54058              }
 54059            }
 54060            class Speak extends o.StringObject {
 54061              constructor(e) {
 54062                super(f, "speak");
 54063                this.disable = (0, c.getInteger)({
 54064                  data: e.disable,
 54065                  defaultValue: 0,
 54066                  validate: (e) => 1 === e,
 54067                });
 54068                this.id = e.id || "";
 54069                this.priority = (0, c.getStringOption)(e.priority, [
 54070                  "custom",
 54071                  "caption",
 54072                  "name",
 54073                  "toolTip",
 54074                ]);
 54075                this.rid = e.rid || "";
 54076                this.use = e.use || "";
 54077                this.usehref = e.usehref || "";
 54078              }
 54079            }
 54080            class Stipple extends o.XFAObject {
 54081              constructor(e) {
 54082                super(f, "stipple", !0);
 54083                this.id = e.id || "";
 54084                this.rate = (0, c.getInteger)({
 54085                  data: e.rate,
 54086                  defaultValue: 50,
 54087                  validate: (e) => e >= 0 && e <= 100,
 54088                });
 54089                this.use = e.use || "";
 54090                this.usehref = e.usehref || "";
 54091                this.color = null;
 54092                this.extras = null;
 54093              }
 54094              [r.$toStyle](e) {
 54095                const t = this.rate / 100;
 54096                return l.Util.makeHexColor(
 54097                  Math.round(e.value.r * (1 - t) + this.value.r * t),
 54098                  Math.round(e.value.g * (1 - t) + this.value.g * t),
 54099                  Math.round(e.value.b * (1 - t) + this.value.b * t),
 54100                );
 54101              }
 54102            }
 54103            class Subform extends o.XFAObject {
 54104              constructor(e) {
 54105                super(f, "subform", !0);
 54106                this.access = (0, c.getStringOption)(e.access, [
 54107                  "open",
 54108                  "nonInteractive",
 54109                  "protected",
 54110                  "readOnly",
 54111                ]);
 54112                this.allowMacro = (0, c.getInteger)({
 54113                  data: e.allowMacro,
 54114                  defaultValue: 0,
 54115                  validate: (e) => 1 === e,
 54116                });
 54117                this.anchorType = (0, c.getStringOption)(e.anchorType, [
 54118                  "topLeft",
 54119                  "bottomCenter",
 54120                  "bottomLeft",
 54121                  "bottomRight",
 54122                  "middleCenter",
 54123                  "middleLeft",
 54124                  "middleRight",
 54125                  "topCenter",
 54126                  "topRight",
 54127                ]);
 54128                this.colSpan = (0, c.getInteger)({
 54129                  data: e.colSpan,
 54130                  defaultValue: 1,
 54131                  validate: (e) => e >= 1 || -1 === e,
 54132                });
 54133                this.columnWidths = (e.columnWidths || "")
 54134                  .trim()
 54135                  .split(/\s+/)
 54136                  .map((e) => ("-1" === e ? -1 : (0, c.getMeasurement)(e)));
 54137                this.h = e.h ? (0, c.getMeasurement)(e.h) : "";
 54138                this.hAlign = (0, c.getStringOption)(e.hAlign, [
 54139                  "left",
 54140                  "center",
 54141                  "justify",
 54142                  "justifyAll",
 54143                  "radix",
 54144                  "right",
 54145                ]);
 54146                this.id = e.id || "";
 54147                this.layout = (0, c.getStringOption)(e.layout, [
 54148                  "position",
 54149                  "lr-tb",
 54150                  "rl-row",
 54151                  "rl-tb",
 54152                  "row",
 54153                  "table",
 54154                  "tb",
 54155                ]);
 54156                this.locale = e.locale || "";
 54157                this.maxH = (0, c.getMeasurement)(e.maxH, "0pt");
 54158                this.maxW = (0, c.getMeasurement)(e.maxW, "0pt");
 54159                this.mergeMode = (0, c.getStringOption)(e.mergeMode, [
 54160                  "consumeData",
 54161                  "matchTemplate",
 54162                ]);
 54163                this.minH = (0, c.getMeasurement)(e.minH, "0pt");
 54164                this.minW = (0, c.getMeasurement)(e.minW, "0pt");
 54165                this.name = e.name || "";
 54166                this.presence = (0, c.getStringOption)(e.presence, [
 54167                  "visible",
 54168                  "hidden",
 54169                  "inactive",
 54170                  "invisible",
 54171                ]);
 54172                this.relevant = (0, c.getRelevant)(e.relevant);
 54173                this.restoreState = (0, c.getStringOption)(e.restoreState, [
 54174                  "manual",
 54175                  "auto",
 54176                ]);
 54177                this.scope = (0, c.getStringOption)(e.scope, ["name", "none"]);
 54178                this.use = e.use || "";
 54179                this.usehref = e.usehref || "";
 54180                this.w = e.w ? (0, c.getMeasurement)(e.w) : "";
 54181                this.x = (0, c.getMeasurement)(e.x, "0pt");
 54182                this.y = (0, c.getMeasurement)(e.y, "0pt");
 54183                this.assist = null;
 54184                this.bind = null;
 54185                this.bookend = null;
 54186                this.border = null;
 54187                this.break = null;
 54188                this.calculate = null;
 54189                this.desc = null;
 54190                this.extras = null;
 54191                this.keep = null;
 54192                this.margin = null;
 54193                this.occur = null;
 54194                this.overflow = null;
 54195                this.pageSet = null;
 54196                this.para = null;
 54197                this.traversal = null;
 54198                this.validate = null;
 54199                this.variables = null;
 54200                this.area = new o.XFAObjectArray();
 54201                this.breakAfter = new o.XFAObjectArray();
 54202                this.breakBefore = new o.XFAObjectArray();
 54203                this.connect = new o.XFAObjectArray();
 54204                this.draw = new o.XFAObjectArray();
 54205                this.event = new o.XFAObjectArray();
 54206                this.exObject = new o.XFAObjectArray();
 54207                this.exclGroup = new o.XFAObjectArray();
 54208                this.field = new o.XFAObjectArray();
 54209                this.proto = new o.XFAObjectArray();
 54210                this.setProperty = new o.XFAObjectArray();
 54211                this.subform = new o.XFAObjectArray();
 54212                this.subformSet = new o.XFAObjectArray();
 54213              }
 54214              [r.$getSubformParent]() {
 54215                const e = this[r.$getParent]();
 54216                return e instanceof SubformSet ? e[r.$getSubformParent]() : e;
 54217              }
 54218              [r.$isBindable]() {
 54219                return !0;
 54220              }
 54221              [r.$isThereMoreWidth]() {
 54222                return (
 54223                  (this.layout.endsWith("-tb") &&
 54224                    0 === this[r.$extra].attempt &&
 54225                    this[r.$extra].numberInLine > 0) ||
 54226                  this[r.$getParent]()[r.$isThereMoreWidth]()
 54227                );
 54228              }
 54229              *[r.$getContainedChildren]() {
 54230                yield* getContainedChildren(this);
 54231              }
 54232              [r.$flushHTML]() {
 54233                return (0, i.flushHTML)(this);
 54234              }
 54235              [r.$addHTML](e, t) {
 54236                (0, i.addHTML)(this, e, t);
 54237              }
 54238              [r.$getAvailableSpace]() {
 54239                return (0, i.getAvailableSpace)(this);
 54240              }
 54241              [r.$isSplittable]() {
 54242                const e = this[r.$getSubformParent]();
 54243                if (!e[r.$isSplittable]()) return !1;
 54244                if (void 0 !== this[r.$extra]._isSplittable)
 54245                  return this[r.$extra]._isSplittable;
 54246                if ("position" === this.layout || this.layout.includes("row")) {
 54247                  this[r.$extra]._isSplittable = !1;
 54248                  return !1;
 54249                }
 54250                if (this.keep && "none" !== this.keep.intact) {
 54251                  this[r.$extra]._isSplittable = !1;
 54252                  return !1;
 54253                }
 54254                if (e.layout?.endsWith("-tb") && 0 !== e[r.$extra].numberInLine)
 54255                  return !1;
 54256                this[r.$extra]._isSplittable = !0;
 54257                return !0;
 54258              }
 54259              [r.$toHTML](e) {
 54260                setTabIndex(this);
 54261                if (this.break) {
 54262                  if (
 54263                    "auto" !== this.break.after ||
 54264                    "" !== this.break.afterTarget
 54265                  ) {
 54266                    const e = new BreakAfter({
 54267                      targetType: this.break.after,
 54268                      target: this.break.afterTarget,
 54269                      startNew: this.break.startNew.toString(),
 54270                    });
 54271                    e[r.$globalData] = this[r.$globalData];
 54272                    this[r.$appendChild](e);
 54273                    this.breakAfter.push(e);
 54274                  }
 54275                  if (
 54276                    "auto" !== this.break.before ||
 54277                    "" !== this.break.beforeTarget
 54278                  ) {
 54279                    const e = new BreakBefore({
 54280                      targetType: this.break.before,
 54281                      target: this.break.beforeTarget,
 54282                      startNew: this.break.startNew.toString(),
 54283                    });
 54284                    e[r.$globalData] = this[r.$globalData];
 54285                    this[r.$appendChild](e);
 54286                    this.breakBefore.push(e);
 54287                  }
 54288                  if ("" !== this.break.overflowTarget) {
 54289                    const e = new Overflow({
 54290                      target: this.break.overflowTarget,
 54291                      leader: this.break.overflowLeader,
 54292                      trailer: this.break.overflowTrailer,
 54293                    });
 54294                    e[r.$globalData] = this[r.$globalData];
 54295                    this[r.$appendChild](e);
 54296                    this.overflow.push(e);
 54297                  }
 54298                  this[r.$removeChild](this.break);
 54299                  this.break = null;
 54300                }
 54301                if ("hidden" === this.presence || "inactive" === this.presence)
 54302                  return c.HTMLResult.EMPTY;
 54303                (this.breakBefore.children.length > 1 ||
 54304                  this.breakAfter.children.length > 1) &&
 54305                  (0, l.warn)(
 54306                    "XFA - Several breakBefore or breakAfter in subforms: please file a bug.",
 54307                  );
 54308                if (this.breakBefore.children.length >= 1) {
 54309                  const e = this.breakBefore.children[0];
 54310                  if (handleBreak(e)) return c.HTMLResult.breakNode(e);
 54311                }
 54312                if (this[r.$extra]?.afterBreakAfter) return c.HTMLResult.EMPTY;
 54313                (0, s.fixDimensions)(this);
 54314                const t = [],
 54315                  a = { id: this[r.$uid], class: [] };
 54316                (0, s.setAccess)(this, a.class);
 54317                this[r.$extra] || (this[r.$extra] = Object.create(null));
 54318                Object.assign(this[r.$extra], {
 54319                  children: t,
 54320                  line: null,
 54321                  attributes: a,
 54322                  attempt: 0,
 54323                  numberInLine: 0,
 54324                  availableSpace: {
 54325                    width: Math.min(this.w || 1 / 0, e.width),
 54326                    height: Math.min(this.h || 1 / 0, e.height),
 54327                  },
 54328                  width: 0,
 54329                  height: 0,
 54330                  prevHeight: 0,
 54331                  currentWidth: 0,
 54332                });
 54333                const n = this[r.$getTemplateRoot](),
 54334                  o = n[r.$extra].noLayoutFailure,
 54335                  h = this[r.$isSplittable]();
 54336                h || setFirstUnsplittable(this);
 54337                if (!(0, i.checkDimensions)(this, e)) return c.HTMLResult.FAILURE;
 54338                const u = new Set([
 54339                  "area",
 54340                  "draw",
 54341                  "exclGroup",
 54342                  "field",
 54343                  "subform",
 54344                  "subformSet",
 54345                ]);
 54346                if (this.layout.includes("row")) {
 54347                  const e = this[r.$getSubformParent]().columnWidths;
 54348                  if (Array.isArray(e) && e.length > 0) {
 54349                    this[r.$extra].columnWidths = e;
 54350                    this[r.$extra].currentColumn = 0;
 54351                  }
 54352                }
 54353                const d = (0, s.toStyle)(
 54354                    this,
 54355                    "anchorType",
 54356                    "dimensions",
 54357                    "position",
 54358                    "presence",
 54359                    "border",
 54360                    "margin",
 54361                    "hAlign",
 54362                  ),
 54363                  f = ["xfaSubform"],
 54364                  g = (0, s.layoutClass)(this);
 54365                g && f.push(g);
 54366                a.style = d;
 54367                a.class = f;
 54368                this.name && (a.xfaName = this.name);
 54369                if (this.overflow) {
 54370                  const t = this.overflow[r.$getExtra]();
 54371                  if (t.addLeader) {
 54372                    t.addLeader = !1;
 54373                    handleOverflow(this, t.leader, e);
 54374                  }
 54375                }
 54376                this[r.$pushPara]();
 54377                const p = "lr-tb" === this.layout || "rl-tb" === this.layout,
 54378                  m = p ? 2 : 1;
 54379                for (; this[r.$extra].attempt < m; this[r.$extra].attempt++) {
 54380                  p &&
 54381                    1 === this[r.$extra].attempt &&
 54382                    (this[r.$extra].numberInLine = 0);
 54383                  const e = this[r.$childrenToHTML]({ filter: u, include: !0 });
 54384                  if (e.success) break;
 54385                  if (e.isBreak()) {
 54386                    this[r.$popPara]();
 54387                    return e;
 54388                  }
 54389                  if (
 54390                    p &&
 54391                    0 === this[r.$extra].attempt &&
 54392                    0 === this[r.$extra].numberInLine &&
 54393                    !n[r.$extra].noLayoutFailure
 54394                  ) {
 54395                    this[r.$extra].attempt = m;
 54396                    break;
 54397                  }
 54398                }
 54399                this[r.$popPara]();
 54400                h || unsetFirstUnsplittable(this);
 54401                n[r.$extra].noLayoutFailure = o;
 54402                if (this[r.$extra].attempt === m) {
 54403                  this.overflow &&
 54404                    (this[r.$getTemplateRoot]()[r.$extra].overflowNode =
 54405                      this.overflow);
 54406                  h || delete this[r.$extra];
 54407                  return c.HTMLResult.FAILURE;
 54408                }
 54409                if (this.overflow) {
 54410                  const t = this.overflow[r.$getExtra]();
 54411                  if (t.addTrailer) {
 54412                    t.addTrailer = !1;
 54413                    handleOverflow(this, t.trailer, e);
 54414                  }
 54415                }
 54416                let b = 0,
 54417                  y = 0;
 54418                if (this.margin) {
 54419                  b = this.margin.leftInset + this.margin.rightInset;
 54420                  y = this.margin.topInset + this.margin.bottomInset;
 54421                }
 54422                const w = Math.max(this[r.$extra].width + b, this.w || 0),
 54423                  S = Math.max(this[r.$extra].height + y, this.h || 0),
 54424                  x = [this.x, this.y, w, S];
 54425                "" === this.w && (d.width = (0, s.measureToString)(w));
 54426                "" === this.h && (d.height = (0, s.measureToString)(S));
 54427                if (("0px" === d.width || "0px" === d.height) && 0 === t.length)
 54428                  return c.HTMLResult.EMPTY;
 54429                const C = { name: "div", attributes: a, children: t };
 54430                applyAssist(this, a);
 54431                const k = c.HTMLResult.success((0, s.createWrapper)(this, C), x);
 54432                if (this.breakAfter.children.length >= 1) {
 54433                  const e = this.breakAfter.children[0];
 54434                  if (handleBreak(e)) {
 54435                    this[r.$extra].afterBreakAfter = k;
 54436                    return c.HTMLResult.breakNode(e);
 54437                  }
 54438                }
 54439                delete this[r.$extra];
 54440                return k;
 54441              }
 54442            }
 54443            class SubformSet extends o.XFAObject {
 54444              constructor(e) {
 54445                super(f, "subformSet", !0);
 54446                this.id = e.id || "";
 54447                this.name = e.name || "";
 54448                this.relation = (0, c.getStringOption)(e.relation, [
 54449                  "ordered",
 54450                  "choice",
 54451                  "unordered",
 54452                ]);
 54453                this.relevant = (0, c.getRelevant)(e.relevant);
 54454                this.use = e.use || "";
 54455                this.usehref = e.usehref || "";
 54456                this.bookend = null;
 54457                this.break = null;
 54458                this.desc = null;
 54459                this.extras = null;
 54460                this.occur = null;
 54461                this.overflow = null;
 54462                this.breakAfter = new o.XFAObjectArray();
 54463                this.breakBefore = new o.XFAObjectArray();
 54464                this.subform = new o.XFAObjectArray();
 54465                this.subformSet = new o.XFAObjectArray();
 54466              }
 54467              *[r.$getContainedChildren]() {
 54468                yield* getContainedChildren(this);
 54469              }
 54470              [r.$getSubformParent]() {
 54471                let e = this[r.$getParent]();
 54472                for (; !(e instanceof Subform); ) e = e[r.$getParent]();
 54473                return e;
 54474              }
 54475              [r.$isBindable]() {
 54476                return !0;
 54477              }
 54478            }
 54479            class SubjectDN extends o.ContentObject {
 54480              constructor(e) {
 54481                super(f, "subjectDN");
 54482                this.delimiter = e.delimiter || ",";
 54483                this.id = e.id || "";
 54484                this.name = e.name || "";
 54485                this.use = e.use || "";
 54486                this.usehref = e.usehref || "";
 54487              }
 54488              [r.$finalize]() {
 54489                this[r.$content] = new Map(
 54490                  this[r.$content].split(this.delimiter).map((e) => {
 54491                    (e = e.split("=", 2))[0] = e[0].trim();
 54492                    return e;
 54493                  }),
 54494                );
 54495              }
 54496            }
 54497            class SubjectDNs extends o.XFAObject {
 54498              constructor(e) {
 54499                super(f, "subjectDNs", !0);
 54500                this.id = e.id || "";
 54501                this.type = (0, c.getStringOption)(e.type, [
 54502                  "optional",
 54503                  "required",
 54504                ]);
 54505                this.use = e.use || "";
 54506                this.usehref = e.usehref || "";
 54507                this.subjectDN = new o.XFAObjectArray();
 54508              }
 54509            }
 54510            class Submit extends o.XFAObject {
 54511              constructor(e) {
 54512                super(f, "submit", !0);
 54513                this.embedPDF = (0, c.getInteger)({
 54514                  data: e.embedPDF,
 54515                  defaultValue: 0,
 54516                  validate: (e) => 1 === e,
 54517                });
 54518                this.format = (0, c.getStringOption)(e.format, [
 54519                  "xdp",
 54520                  "formdata",
 54521                  "pdf",
 54522                  "urlencoded",
 54523                  "xfd",
 54524                  "xml",
 54525                ]);
 54526                this.id = e.id || "";
 54527                this.target = e.target || "";
 54528                this.textEncoding = (0, c.getKeyword)({
 54529                  data: e.textEncoding ? e.textEncoding.toLowerCase() : "",
 54530                  defaultValue: "",
 54531                  validate: (e) =>
 54532                    [
 54533                      "utf-8",
 54534                      "big-five",
 54535                      "fontspecific",
 54536                      "gbk",
 54537                      "gb-18030",
 54538                      "gb-2312",
 54539                      "ksc-5601",
 54540                      "none",
 54541                      "shift-jis",
 54542                      "ucs-2",
 54543                      "utf-16",
 54544                    ].includes(e) || e.match(/iso-8859-\d{2}/),
 54545                });
 54546                this.use = e.use || "";
 54547                this.usehref = e.usehref || "";
 54548                this.xdpContent = e.xdpContent || "";
 54549                this.encrypt = null;
 54550                this.encryptData = new o.XFAObjectArray();
 54551                this.signData = new o.XFAObjectArray();
 54552              }
 54553            }
 54554            class Template extends o.XFAObject {
 54555              constructor(e) {
 54556                super(f, "template", !0);
 54557                this.baseProfile = (0, c.getStringOption)(e.baseProfile, [
 54558                  "full",
 54559                  "interactiveForms",
 54560                ]);
 54561                this.extras = null;
 54562                this.subform = new o.XFAObjectArray();
 54563              }
 54564              [r.$finalize]() {
 54565                0 === this.subform.children.length &&
 54566                  (0, l.warn)("XFA - No subforms in template node.");
 54567                this.subform.children.length >= 2 &&
 54568                  (0, l.warn)(
 54569                    "XFA - Several subforms in template node: please file a bug.",
 54570                  );
 54571                this[r.$tabIndex] = 5e3;
 54572              }
 54573              [r.$isSplittable]() {
 54574                return !0;
 54575              }
 54576              [r.$searchNode](e, t) {
 54577                return e.startsWith("#")
 54578                  ? [this[r.$ids].get(e.slice(1))]
 54579                  : (0, d.searchNode)(this, t, e, !0, !0);
 54580              }
 54581              *[r.$toPages]() {
 54582                if (!this.subform.children.length)
 54583                  return c.HTMLResult.success({ name: "div", children: [] });
 54584                this[r.$extra] = {
 54585                  overflowNode: null,
 54586                  firstUnsplittable: null,
 54587                  currentContentArea: null,
 54588                  currentPageArea: null,
 54589                  noLayoutFailure: !1,
 54590                  pageNumber: 1,
 54591                  pagePosition: "first",
 54592                  oddOrEven: "odd",
 54593                  blankOrNotBlank: "nonBlank",
 54594                  paraStack: [],
 54595                };
 54596                const e = this.subform.children[0];
 54597                e.pageSet[r.$cleanPage]();
 54598                const t = e.pageSet.pageArea.children,
 54599                  a = { name: "div", children: [] };
 54600                let n = null,
 54601                  i = null,
 54602                  s = null;
 54603                if (e.breakBefore.children.length >= 1) {
 54604                  i = e.breakBefore.children[0];
 54605                  s = i.target;
 54606                } else if (
 54607                  e.subform.children.length >= 1 &&
 54608                  e.subform.children[0].breakBefore.children.length >= 1
 54609                ) {
 54610                  i = e.subform.children[0].breakBefore.children[0];
 54611                  s = i.target;
 54612                } else if (e.break?.beforeTarget) {
 54613                  i = e.break;
 54614                  s = i.beforeTarget;
 54615                } else if (
 54616                  e.subform.children.length >= 1 &&
 54617                  e.subform.children[0].break?.beforeTarget
 54618                ) {
 54619                  i = e.subform.children[0].break;
 54620                  s = i.beforeTarget;
 54621                }
 54622                if (i) {
 54623                  const e = this[r.$searchNode](s, i[r.$getParent]());
 54624                  if (e instanceof PageArea) {
 54625                    n = e;
 54626                    i[r.$extra] = {};
 54627                  }
 54628                }
 54629                n || (n = t[0]);
 54630                n[r.$extra] = { numberOfUse: 1 };
 54631                const o = n[r.$getParent]();
 54632                o[r.$extra] = {
 54633                  numberOfUse: 1,
 54634                  pageIndex: o.pageArea.children.indexOf(n),
 54635                  pageSetIndex: 0,
 54636                };
 54637                let h,
 54638                  u = null,
 54639                  d = null,
 54640                  f = !0,
 54641                  g = 0,
 54642                  p = 0;
 54643                for (;;) {
 54644                  if (f) g = 0;
 54645                  else {
 54646                    a.children.pop();
 54647                    if (3 == ++g) {
 54648                      (0, l.warn)(
 54649                        "XFA - Something goes wrong: please file a bug.",
 54650                      );
 54651                      return a;
 54652                    }
 54653                  }
 54654                  h = null;
 54655                  this[r.$extra].currentPageArea = n;
 54656                  const t = n[r.$toHTML]().html;
 54657                  a.children.push(t);
 54658                  if (u) {
 54659                    this[r.$extra].noLayoutFailure = !0;
 54660                    t.children.push(u[r.$toHTML](n[r.$extra].space).html);
 54661                    u = null;
 54662                  }
 54663                  if (d) {
 54664                    this[r.$extra].noLayoutFailure = !0;
 54665                    t.children.push(d[r.$toHTML](n[r.$extra].space).html);
 54666                    d = null;
 54667                  }
 54668                  const i = n.contentArea.children,
 54669                    s = t.children.filter((e) =>
 54670                      e.attributes.class.includes("xfaContentarea"),
 54671                    );
 54672                  f = !1;
 54673                  this[r.$extra].firstUnsplittable = null;
 54674                  this[r.$extra].noLayoutFailure = !1;
 54675                  const flush = (t) => {
 54676                    const a = e[r.$flushHTML]();
 54677                    if (a) {
 54678                      f ||= a.children?.length > 0;
 54679                      s[t].children.push(a);
 54680                    }
 54681                  };
 54682                  for (let t = p, n = i.length; t < n; t++) {
 54683                    const n = (this[r.$extra].currentContentArea = i[t]),
 54684                      o = { width: n.w, height: n.h };
 54685                    p = 0;
 54686                    if (u) {
 54687                      s[t].children.push(u[r.$toHTML](o).html);
 54688                      u = null;
 54689                    }
 54690                    if (d) {
 54691                      s[t].children.push(d[r.$toHTML](o).html);
 54692                      d = null;
 54693                    }
 54694                    const c = e[r.$toHTML](o);
 54695                    if (c.success) {
 54696                      if (c.html) {
 54697                        f ||= c.html.children?.length > 0;
 54698                        s[t].children.push(c.html);
 54699                      } else !f && a.children.length > 1 && a.children.pop();
 54700                      return a;
 54701                    }
 54702                    if (c.isBreak()) {
 54703                      const e = c.breakNode;
 54704                      flush(t);
 54705                      if ("auto" === e.targetType) continue;
 54706                      if (e.leader) {
 54707                        u = this[r.$searchNode](e.leader, e[r.$getParent]());
 54708                        u = u ? u[0] : null;
 54709                      }
 54710                      if (e.trailer) {
 54711                        d = this[r.$searchNode](e.trailer, e[r.$getParent]());
 54712                        d = d ? d[0] : null;
 54713                      }
 54714                      if ("pageArea" === e.targetType) {
 54715                        h = e[r.$extra].target;
 54716                        t = 1 / 0;
 54717                      } else if (e[r.$extra].target) {
 54718                        h = e[r.$extra].target;
 54719                        p = e[r.$extra].index + 1;
 54720                        t = 1 / 0;
 54721                      } else t = e[r.$extra].index;
 54722                    } else if (this[r.$extra].overflowNode) {
 54723                      const e = this[r.$extra].overflowNode;
 54724                      this[r.$extra].overflowNode = null;
 54725                      const a = e[r.$getExtra](),
 54726                        n = a.target;
 54727                      a.addLeader = null !== a.leader;
 54728                      a.addTrailer = null !== a.trailer;
 54729                      flush(t);
 54730                      const s = t;
 54731                      t = 1 / 0;
 54732                      if (n instanceof PageArea) h = n;
 54733                      else if (n instanceof ContentArea) {
 54734                        const e = i.indexOf(n);
 54735                        if (-1 !== e) e > s ? (t = e - 1) : (p = e);
 54736                        else {
 54737                          h = n[r.$getParent]();
 54738                          p = h.contentArea.children.indexOf(n);
 54739                        }
 54740                      }
 54741                    } else flush(t);
 54742                  }
 54743                  this[r.$extra].pageNumber += 1;
 54744                  h &&
 54745                    (h[r.$isUsable]()
 54746                      ? (h[r.$extra].numberOfUse += 1)
 54747                      : (h = null));
 54748                  n = h || n[r.$getNextPage]();
 54749                  yield null;
 54750                }
 54751              }
 54752            }
 54753            t.Template = Template;
 54754            class Text extends o.ContentObject {
 54755              constructor(e) {
 54756                super(f, "text");
 54757                this.id = e.id || "";
 54758                this.maxChars = (0, c.getInteger)({
 54759                  data: e.maxChars,
 54760                  defaultValue: 0,
 54761                  validate: (e) => e >= 0,
 54762                });
 54763                this.name = e.name || "";
 54764                this.rid = e.rid || "";
 54765                this.use = e.use || "";
 54766                this.usehref = e.usehref || "";
 54767              }
 54768              [r.$acceptWhitespace]() {
 54769                return !0;
 54770              }
 54771              [r.$onChild](e) {
 54772                if (e[r.$namespaceId] === n.NamespaceIds.xhtml.id) {
 54773                  this[r.$content] = e;
 54774                  return !0;
 54775                }
 54776                (0, l.warn)(`XFA - Invalid content in Text: ${e[r.$nodeName]}.`);
 54777                return !1;
 54778              }
 54779              [r.$onText](e) {
 54780                this[r.$content] instanceof o.XFAObject || super[r.$onText](e);
 54781              }
 54782              [r.$finalize]() {
 54783                "string" == typeof this[r.$content] &&
 54784                  (this[r.$content] = this[r.$content].replaceAll("\r\n", "\n"));
 54785              }
 54786              [r.$getExtra]() {
 54787                return "string" == typeof this[r.$content]
 54788                  ? this[r.$content]
 54789                      .split(/[\u2029\u2028\n]/)
 54790                      .reduce((e, t) => {
 54791                        t && e.push(t);
 54792                        return e;
 54793                      }, [])
 54794                      .join("\n")
 54795                  : this[r.$content][r.$text]();
 54796              }
 54797              [r.$toHTML](e) {
 54798                if ("string" == typeof this[r.$content]) {
 54799                  const e = valueToHtml(this[r.$content]).html;
 54800                  if (this[r.$content].includes("\u2029")) {
 54801                    e.name = "div";
 54802                    e.children = [];
 54803                    this[r.$content]
 54804                      .split("\u2029")
 54805                      .map((e) =>
 54806                        e.split(/[\u2028\n]/).reduce((e, t) => {
 54807                          e.push({ name: "span", value: t }, { name: "br" });
 54808                          return e;
 54809                        }, []),
 54810                      )
 54811                      .forEach((t) => {
 54812                        e.children.push({ name: "p", children: t });
 54813                      });
 54814                  } else if (/[\u2028\n]/.test(this[r.$content])) {
 54815                    e.name = "div";
 54816                    e.children = [];
 54817                    this[r.$content].split(/[\u2028\n]/).forEach((t) => {
 54818                      e.children.push({ name: "span", value: t }, { name: "br" });
 54819                    });
 54820                  }
 54821                  return c.HTMLResult.success(e);
 54822                }
 54823                return this[r.$content][r.$toHTML](e);
 54824              }
 54825            }
 54826            t.Text = Text;
 54827            class TextEdit extends o.XFAObject {
 54828              constructor(e) {
 54829                super(f, "textEdit", !0);
 54830                this.allowRichText = (0, c.getInteger)({
 54831                  data: e.allowRichText,
 54832                  defaultValue: 0,
 54833                  validate: (e) => 1 === e,
 54834                });
 54835                this.hScrollPolicy = (0, c.getStringOption)(e.hScrollPolicy, [
 54836                  "auto",
 54837                  "off",
 54838                  "on",
 54839                ]);
 54840                this.id = e.id || "";
 54841                this.multiLine = (0, c.getInteger)({
 54842                  data: e.multiLine,
 54843                  defaultValue: "",
 54844                  validate: (e) => 0 === e || 1 === e,
 54845                });
 54846                this.use = e.use || "";
 54847                this.usehref = e.usehref || "";
 54848                this.vScrollPolicy = (0, c.getStringOption)(e.vScrollPolicy, [
 54849                  "auto",
 54850                  "off",
 54851                  "on",
 54852                ]);
 54853                this.border = null;
 54854                this.comb = null;
 54855                this.extras = null;
 54856                this.margin = null;
 54857              }
 54858              [r.$toHTML](e) {
 54859                const t = (0, s.toStyle)(this, "border", "font", "margin");
 54860                let a;
 54861                const n = this[r.$getParent]()[r.$getParent]();
 54862                "" === this.multiLine &&
 54863                  (this.multiLine = n instanceof Draw ? 1 : 0);
 54864                a =
 54865                  1 === this.multiLine
 54866                    ? {
 54867                        name: "textarea",
 54868                        attributes: {
 54869                          dataId: n[r.$data]?.[r.$uid] || n[r.$uid],
 54870                          fieldId: n[r.$uid],
 54871                          class: ["xfaTextfield"],
 54872                          style: t,
 54873                          "aria-label": ariaLabel(n),
 54874                          "aria-required": !1,
 54875                        },
 54876                      }
 54877                    : {
 54878                        name: "input",
 54879                        attributes: {
 54880                          type: "text",
 54881                          dataId: n[r.$data]?.[r.$uid] || n[r.$uid],
 54882                          fieldId: n[r.$uid],
 54883                          class: ["xfaTextfield"],
 54884                          style: t,
 54885                          "aria-label": ariaLabel(n),
 54886                          "aria-required": !1,
 54887                        },
 54888                      };
 54889                if (isRequired(n)) {
 54890                  a.attributes["aria-required"] = !0;
 54891                  a.attributes.required = !0;
 54892                }
 54893                return c.HTMLResult.success({
 54894                  name: "label",
 54895                  attributes: { class: ["xfaLabel"] },
 54896                  children: [a],
 54897                });
 54898              }
 54899            }
 54900            class Time extends o.StringObject {
 54901              constructor(e) {
 54902                super(f, "time");
 54903                this.id = e.id || "";
 54904                this.name = e.name || "";
 54905                this.use = e.use || "";
 54906                this.usehref = e.usehref || "";
 54907              }
 54908              [r.$finalize]() {
 54909                const e = this[r.$content].trim();
 54910                this[r.$content] = e ? new Date(e) : null;
 54911              }
 54912              [r.$toHTML](e) {
 54913                return valueToHtml(
 54914                  this[r.$content] ? this[r.$content].toString() : "",
 54915                );
 54916              }
 54917            }
 54918            class TimeStamp extends o.XFAObject {
 54919              constructor(e) {
 54920                super(f, "timeStamp");
 54921                this.id = e.id || "";
 54922                this.server = e.server || "";
 54923                this.type = (0, c.getStringOption)(e.type, [
 54924                  "optional",
 54925                  "required",
 54926                ]);
 54927                this.use = e.use || "";
 54928                this.usehref = e.usehref || "";
 54929              }
 54930            }
 54931            class ToolTip extends o.StringObject {
 54932              constructor(e) {
 54933                super(f, "toolTip");
 54934                this.id = e.id || "";
 54935                this.rid = e.rid || "";
 54936                this.use = e.use || "";
 54937                this.usehref = e.usehref || "";
 54938              }
 54939            }
 54940            class Traversal extends o.XFAObject {
 54941              constructor(e) {
 54942                super(f, "traversal", !0);
 54943                this.id = e.id || "";
 54944                this.use = e.use || "";
 54945                this.usehref = e.usehref || "";
 54946                this.extras = null;
 54947                this.traverse = new o.XFAObjectArray();
 54948              }
 54949            }
 54950            class Traverse extends o.XFAObject {
 54951              constructor(e) {
 54952                super(f, "traverse", !0);
 54953                this.id = e.id || "";
 54954                this.operation = (0, c.getStringOption)(e.operation, [
 54955                  "next",
 54956                  "back",
 54957                  "down",
 54958                  "first",
 54959                  "left",
 54960                  "right",
 54961                  "up",
 54962                ]);
 54963                this.ref = e.ref || "";
 54964                this.use = e.use || "";
 54965                this.usehref = e.usehref || "";
 54966                this.extras = null;
 54967                this.script = null;
 54968              }
 54969              get name() {
 54970                return this.operation;
 54971              }
 54972              [r.$isTransparent]() {
 54973                return !1;
 54974              }
 54975            }
 54976            class Ui extends o.XFAObject {
 54977              constructor(e) {
 54978                super(f, "ui", !0);
 54979                this.id = e.id || "";
 54980                this.use = e.use || "";
 54981                this.usehref = e.usehref || "";
 54982                this.extras = null;
 54983                this.picture = null;
 54984                this.barcode = null;
 54985                this.button = null;
 54986                this.checkButton = null;
 54987                this.choiceList = null;
 54988                this.dateTimeEdit = null;
 54989                this.defaultUi = null;
 54990                this.imageEdit = null;
 54991                this.numericEdit = null;
 54992                this.passwordEdit = null;
 54993                this.signature = null;
 54994                this.textEdit = null;
 54995              }
 54996              [r.$getExtra]() {
 54997                if (void 0 === this[r.$extra]) {
 54998                  for (const e of Object.getOwnPropertyNames(this)) {
 54999                    if ("extras" === e || "picture" === e) continue;
 55000                    const t = this[e];
 55001                    if (t instanceof o.XFAObject) {
 55002                      this[r.$extra] = t;
 55003                      return t;
 55004                    }
 55005                  }
 55006                  this[r.$extra] = null;
 55007                }
 55008                return this[r.$extra];
 55009              }
 55010              [r.$toHTML](e) {
 55011                const t = this[r.$getExtra]();
 55012                return t ? t[r.$toHTML](e) : c.HTMLResult.EMPTY;
 55013              }
 55014            }
 55015            class Validate extends o.XFAObject {
 55016              constructor(e) {
 55017                super(f, "validate", !0);
 55018                this.formatTest = (0, c.getStringOption)(e.formatTest, [
 55019                  "warning",
 55020                  "disabled",
 55021                  "error",
 55022                ]);
 55023                this.id = e.id || "";
 55024                this.nullTest = (0, c.getStringOption)(e.nullTest, [
 55025                  "disabled",
 55026                  "error",
 55027                  "warning",
 55028                ]);
 55029                this.scriptTest = (0, c.getStringOption)(e.scriptTest, [
 55030                  "error",
 55031                  "disabled",
 55032                  "warning",
 55033                ]);
 55034                this.use = e.use || "";
 55035                this.usehref = e.usehref || "";
 55036                this.extras = null;
 55037                this.message = null;
 55038                this.picture = null;
 55039                this.script = null;
 55040              }
 55041            }
 55042            class Value extends o.XFAObject {
 55043              constructor(e) {
 55044                super(f, "value", !0);
 55045                this.id = e.id || "";
 55046                this.override = (0, c.getInteger)({
 55047                  data: e.override,
 55048                  defaultValue: 0,
 55049                  validate: (e) => 1 === e,
 55050                });
 55051                this.relevant = (0, c.getRelevant)(e.relevant);
 55052                this.use = e.use || "";
 55053                this.usehref = e.usehref || "";
 55054                this.arc = null;
 55055                this.boolean = null;
 55056                this.date = null;
 55057                this.dateTime = null;
 55058                this.decimal = null;
 55059                this.exData = null;
 55060                this.float = null;
 55061                this.image = null;
 55062                this.integer = null;
 55063                this.line = null;
 55064                this.rectangle = null;
 55065                this.text = null;
 55066                this.time = null;
 55067              }
 55068              [r.$setValue](e) {
 55069                const t = this[r.$getParent]();
 55070                if (t instanceof Field && t.ui?.imageEdit) {
 55071                  if (!this.image) {
 55072                    this.image = new Image({});
 55073                    this[r.$appendChild](this.image);
 55074                  }
 55075                  this.image[r.$content] = e[r.$content];
 55076                  return;
 55077                }
 55078                const a = e[r.$nodeName];
 55079                if (null === this[a]) {
 55080                  for (const e of Object.getOwnPropertyNames(this)) {
 55081                    const t = this[e];
 55082                    if (t instanceof o.XFAObject) {
 55083                      this[e] = null;
 55084                      this[r.$removeChild](t);
 55085                    }
 55086                  }
 55087                  this[e[r.$nodeName]] = e;
 55088                  this[r.$appendChild](e);
 55089                } else this[a][r.$content] = e[r.$content];
 55090              }
 55091              [r.$text]() {
 55092                if (this.exData)
 55093                  return "string" == typeof this.exData[r.$content]
 55094                    ? this.exData[r.$content].trim()
 55095                    : this.exData[r.$content][r.$text]().trim();
 55096                for (const e of Object.getOwnPropertyNames(this)) {
 55097                  if ("image" === e) continue;
 55098                  const t = this[e];
 55099                  if (t instanceof o.XFAObject)
 55100                    return (t[r.$content] || "").toString().trim();
 55101                }
 55102                return null;
 55103              }
 55104              [r.$toHTML](e) {
 55105                for (const t of Object.getOwnPropertyNames(this)) {
 55106                  const a = this[t];
 55107                  if (a instanceof o.XFAObject) return a[r.$toHTML](e);
 55108                }
 55109                return c.HTMLResult.EMPTY;
 55110              }
 55111            }
 55112            t.Value = Value;
 55113            class Variables extends o.XFAObject {
 55114              constructor(e) {
 55115                super(f, "variables", !0);
 55116                this.id = e.id || "";
 55117                this.use = e.use || "";
 55118                this.usehref = e.usehref || "";
 55119                this.boolean = new o.XFAObjectArray();
 55120                this.date = new o.XFAObjectArray();
 55121                this.dateTime = new o.XFAObjectArray();
 55122                this.decimal = new o.XFAObjectArray();
 55123                this.exData = new o.XFAObjectArray();
 55124                this.float = new o.XFAObjectArray();
 55125                this.image = new o.XFAObjectArray();
 55126                this.integer = new o.XFAObjectArray();
 55127                this.manifest = new o.XFAObjectArray();
 55128                this.script = new o.XFAObjectArray();
 55129                this.text = new o.XFAObjectArray();
 55130                this.time = new o.XFAObjectArray();
 55131              }
 55132              [r.$isTransparent]() {
 55133                return !0;
 55134              }
 55135            }
 55136            class TemplateNamespace {
 55137              static [n.$buildXFAObject](e, t) {
 55138                if (TemplateNamespace.hasOwnProperty(e)) {
 55139                  const a = TemplateNamespace[e](t);
 55140                  a[r.$setSetAttributes](t);
 55141                  return a;
 55142                }
 55143              }
 55144              static appearanceFilter(e) {
 55145                return new AppearanceFilter(e);
 55146              }
 55147              static arc(e) {
 55148                return new Arc(e);
 55149              }
 55150              static area(e) {
 55151                return new Area(e);
 55152              }
 55153              static assist(e) {
 55154                return new Assist(e);
 55155              }
 55156              static barcode(e) {
 55157                return new Barcode(e);
 55158              }
 55159              static bind(e) {
 55160                return new Bind(e);
 55161              }
 55162              static bindItems(e) {
 55163                return new BindItems(e);
 55164              }
 55165              static bookend(e) {
 55166                return new Bookend(e);
 55167              }
 55168              static boolean(e) {
 55169                return new BooleanElement(e);
 55170              }
 55171              static border(e) {
 55172                return new Border(e);
 55173              }
 55174              static break(e) {
 55175                return new Break(e);
 55176              }
 55177              static breakAfter(e) {
 55178                return new BreakAfter(e);
 55179              }
 55180              static breakBefore(e) {
 55181                return new BreakBefore(e);
 55182              }
 55183              static button(e) {
 55184                return new Button(e);
 55185              }
 55186              static calculate(e) {
 55187                return new Calculate(e);
 55188              }
 55189              static caption(e) {
 55190                return new Caption(e);
 55191              }
 55192              static certificate(e) {
 55193                return new Certificate(e);
 55194              }
 55195              static certificates(e) {
 55196                return new Certificates(e);
 55197              }
 55198              static checkButton(e) {
 55199                return new CheckButton(e);
 55200              }
 55201              static choiceList(e) {
 55202                return new ChoiceList(e);
 55203              }
 55204              static color(e) {
 55205                return new Color(e);
 55206              }
 55207              static comb(e) {
 55208                return new Comb(e);
 55209              }
 55210              static connect(e) {
 55211                return new Connect(e);
 55212              }
 55213              static contentArea(e) {
 55214                return new ContentArea(e);
 55215              }
 55216              static corner(e) {
 55217                return new Corner(e);
 55218              }
 55219              static date(e) {
 55220                return new DateElement(e);
 55221              }
 55222              static dateTime(e) {
 55223                return new DateTime(e);
 55224              }
 55225              static dateTimeEdit(e) {
 55226                return new DateTimeEdit(e);
 55227              }
 55228              static decimal(e) {
 55229                return new Decimal(e);
 55230              }
 55231              static defaultUi(e) {
 55232                return new DefaultUi(e);
 55233              }
 55234              static desc(e) {
 55235                return new Desc(e);
 55236              }
 55237              static digestMethod(e) {
 55238                return new DigestMethod(e);
 55239              }
 55240              static digestMethods(e) {
 55241                return new DigestMethods(e);
 55242              }
 55243              static draw(e) {
 55244                return new Draw(e);
 55245              }
 55246              static edge(e) {
 55247                return new Edge(e);
 55248              }
 55249              static encoding(e) {
 55250                return new Encoding(e);
 55251              }
 55252              static encodings(e) {
 55253                return new Encodings(e);
 55254              }
 55255              static encrypt(e) {
 55256                return new Encrypt(e);
 55257              }
 55258              static encryptData(e) {
 55259                return new EncryptData(e);
 55260              }
 55261              static encryption(e) {
 55262                return new Encryption(e);
 55263              }
 55264              static encryptionMethod(e) {
 55265                return new EncryptionMethod(e);
 55266              }
 55267              static encryptionMethods(e) {
 55268                return new EncryptionMethods(e);
 55269              }
 55270              static event(e) {
 55271                return new Event(e);
 55272              }
 55273              static exData(e) {
 55274                return new ExData(e);
 55275              }
 55276              static exObject(e) {
 55277                return new ExObject(e);
 55278              }
 55279              static exclGroup(e) {
 55280                return new ExclGroup(e);
 55281              }
 55282              static execute(e) {
 55283                return new Execute(e);
 55284              }
 55285              static extras(e) {
 55286                return new Extras(e);
 55287              }
 55288              static field(e) {
 55289                return new Field(e);
 55290              }
 55291              static fill(e) {
 55292                return new Fill(e);
 55293              }
 55294              static filter(e) {
 55295                return new Filter(e);
 55296              }
 55297              static float(e) {
 55298                return new Float(e);
 55299              }
 55300              static font(e) {
 55301                return new Font(e);
 55302              }
 55303              static format(e) {
 55304                return new Format(e);
 55305              }
 55306              static handler(e) {
 55307                return new Handler(e);
 55308              }
 55309              static hyphenation(e) {
 55310                return new Hyphenation(e);
 55311              }
 55312              static image(e) {
 55313                return new Image(e);
 55314              }
 55315              static imageEdit(e) {
 55316                return new ImageEdit(e);
 55317              }
 55318              static integer(e) {
 55319                return new Integer(e);
 55320              }
 55321              static issuers(e) {
 55322                return new Issuers(e);
 55323              }
 55324              static items(e) {
 55325                return new Items(e);
 55326              }
 55327              static keep(e) {
 55328                return new Keep(e);
 55329              }
 55330              static keyUsage(e) {
 55331                return new KeyUsage(e);
 55332              }
 55333              static line(e) {
 55334                return new Line(e);
 55335              }
 55336              static linear(e) {
 55337                return new Linear(e);
 55338              }
 55339              static lockDocument(e) {
 55340                return new LockDocument(e);
 55341              }
 55342              static manifest(e) {
 55343                return new Manifest(e);
 55344              }
 55345              static margin(e) {
 55346                return new Margin(e);
 55347              }
 55348              static mdp(e) {
 55349                return new Mdp(e);
 55350              }
 55351              static medium(e) {
 55352                return new Medium(e);
 55353              }
 55354              static message(e) {
 55355                return new Message(e);
 55356              }
 55357              static numericEdit(e) {
 55358                return new NumericEdit(e);
 55359              }
 55360              static occur(e) {
 55361                return new Occur(e);
 55362              }
 55363              static oid(e) {
 55364                return new Oid(e);
 55365              }
 55366              static oids(e) {
 55367                return new Oids(e);
 55368              }
 55369              static overflow(e) {
 55370                return new Overflow(e);
 55371              }
 55372              static pageArea(e) {
 55373                return new PageArea(e);
 55374              }
 55375              static pageSet(e) {
 55376                return new PageSet(e);
 55377              }
 55378              static para(e) {
 55379                return new Para(e);
 55380              }
 55381              static passwordEdit(e) {
 55382                return new PasswordEdit(e);
 55383              }
 55384              static pattern(e) {
 55385                return new Pattern(e);
 55386              }
 55387              static picture(e) {
 55388                return new Picture(e);
 55389              }
 55390              static proto(e) {
 55391                return new Proto(e);
 55392              }
 55393              static radial(e) {
 55394                return new Radial(e);
 55395              }
 55396              static reason(e) {
 55397                return new Reason(e);
 55398              }
 55399              static reasons(e) {
 55400                return new Reasons(e);
 55401              }
 55402              static rectangle(e) {
 55403                return new Rectangle(e);
 55404              }
 55405              static ref(e) {
 55406                return new RefElement(e);
 55407              }
 55408              static script(e) {
 55409                return new Script(e);
 55410              }
 55411              static setProperty(e) {
 55412                return new SetProperty(e);
 55413              }
 55414              static signData(e) {
 55415                return new SignData(e);
 55416              }
 55417              static signature(e) {
 55418                return new Signature(e);
 55419              }
 55420              static signing(e) {
 55421                return new Signing(e);
 55422              }
 55423              static solid(e) {
 55424                return new Solid(e);
 55425              }
 55426              static speak(e) {
 55427                return new Speak(e);
 55428              }
 55429              static stipple(e) {
 55430                return new Stipple(e);
 55431              }
 55432              static subform(e) {
 55433                return new Subform(e);
 55434              }
 55435              static subformSet(e) {
 55436                return new SubformSet(e);
 55437              }
 55438              static subjectDN(e) {
 55439                return new SubjectDN(e);
 55440              }
 55441              static subjectDNs(e) {
 55442                return new SubjectDNs(e);
 55443              }
 55444              static submit(e) {
 55445                return new Submit(e);
 55446              }
 55447              static template(e) {
 55448                return new Template(e);
 55449              }
 55450              static text(e) {
 55451                return new Text(e);
 55452              }
 55453              static textEdit(e) {
 55454                return new TextEdit(e);
 55455              }
 55456              static time(e) {
 55457                return new Time(e);
 55458              }
 55459              static timeStamp(e) {
 55460                return new TimeStamp(e);
 55461              }
 55462              static toolTip(e) {
 55463                return new ToolTip(e);
 55464              }
 55465              static traversal(e) {
 55466                return new Traversal(e);
 55467              }
 55468              static traverse(e) {
 55469                return new Traverse(e);
 55470              }
 55471              static ui(e) {
 55472                return new Ui(e);
 55473              }
 55474              static validate(e) {
 55475                return new Validate(e);
 55476              }
 55477              static value(e) {
 55478                return new Value(e);
 55479              }
 55480              static variables(e) {
 55481                return new Variables(e);
 55482              }
 55483            }
 55484            t.TemplateNamespace = TemplateNamespace;
 55485          },
 55486          (e, t) => {
 55487            Object.defineProperty(t, "__esModule", { value: !0 });
 55488            t.NamespaceIds = t.$buildXFAObject = void 0;
 55489            const a = Symbol();
 55490            t.$buildXFAObject = a;
 55491            t.NamespaceIds = {
 55492              config: {
 55493                id: 0,
 55494                check: (e) => e.startsWith("http://www.xfa.org/schema/xci/"),
 55495              },
 55496              connectionSet: {
 55497                id: 1,
 55498                check: (e) =>
 55499                  e.startsWith("http://www.xfa.org/schema/xfa-connection-set/"),
 55500              },
 55501              datasets: {
 55502                id: 2,
 55503                check: (e) => e.startsWith("http://www.xfa.org/schema/xfa-data/"),
 55504              },
 55505              form: {
 55506                id: 3,
 55507                check: (e) => e.startsWith("http://www.xfa.org/schema/xfa-form/"),
 55508              },
 55509              localeSet: {
 55510                id: 4,
 55511                check: (e) =>
 55512                  e.startsWith("http://www.xfa.org/schema/xfa-locale-set/"),
 55513              },
 55514              pdf: { id: 5, check: (e) => "http://ns.adobe.com/xdp/pdf/" === e },
 55515              signature: {
 55516                id: 6,
 55517                check: (e) => "http://www.w3.org/2000/09/xmldsig#" === e,
 55518              },
 55519              sourceSet: {
 55520                id: 7,
 55521                check: (e) =>
 55522                  e.startsWith("http://www.xfa.org/schema/xfa-source-set/"),
 55523              },
 55524              stylesheet: {
 55525                id: 8,
 55526                check: (e) => "http://www.w3.org/1999/XSL/Transform" === e,
 55527              },
 55528              template: {
 55529                id: 9,
 55530                check: (e) =>
 55531                  e.startsWith("http://www.xfa.org/schema/xfa-template/"),
 55532              },
 55533              xdc: {
 55534                id: 10,
 55535                check: (e) => e.startsWith("http://www.xfa.org/schema/xdc/"),
 55536              },
 55537              xdp: { id: 11, check: (e) => "http://ns.adobe.com/xdp/" === e },
 55538              xfdf: { id: 12, check: (e) => "http://ns.adobe.com/xfdf/" === e },
 55539              xhtml: {
 55540                id: 13,
 55541                check: (e) => "http://www.w3.org/1999/xhtml" === e,
 55542              },
 55543              xmpmeta: {
 55544                id: 14,
 55545                check: (e) => "http://ns.adobe.com/xmpmeta/" === e,
 55546              },
 55547            };
 55548          },
 55549          (e, t, a) => {
 55550            Object.defineProperty(t, "__esModule", { value: !0 });
 55551            t.addHTML = function addHTML(e, t, a) {
 55552              const i = e[r.$extra],
 55553                s = i.availableSpace,
 55554                [o, c, l, h] = a;
 55555              switch (e.layout) {
 55556                case "position":
 55557                  i.width = Math.max(i.width, o + l);
 55558                  i.height = Math.max(i.height, c + h);
 55559                  i.children.push(t);
 55560                  break;
 55561                case "lr-tb":
 55562                case "rl-tb":
 55563                  if (!i.line || 1 === i.attempt) {
 55564                    i.line = createLine(e, []);
 55565                    i.children.push(i.line);
 55566                    i.numberInLine = 0;
 55567                  }
 55568                  i.numberInLine += 1;
 55569                  i.line.children.push(t);
 55570                  if (0 === i.attempt) {
 55571                    i.currentWidth += l;
 55572                    i.height = Math.max(i.height, i.prevHeight + h);
 55573                  } else {
 55574                    i.currentWidth = l;
 55575                    i.prevHeight = i.height;
 55576                    i.height += h;
 55577                    i.attempt = 0;
 55578                  }
 55579                  i.width = Math.max(i.width, i.currentWidth);
 55580                  break;
 55581                case "rl-row":
 55582                case "row": {
 55583                  i.children.push(t);
 55584                  i.width += l;
 55585                  i.height = Math.max(i.height, h);
 55586                  const e = (0, n.measureToString)(i.height);
 55587                  for (const t of i.children) t.attributes.style.height = e;
 55588                  break;
 55589                }
 55590                case "table":
 55591                case "tb":
 55592                  i.width = Math.min(s.width, Math.max(i.width, l));
 55593                  i.height += h;
 55594                  i.children.push(t);
 55595              }
 55596            };
 55597            t.checkDimensions = function checkDimensions(e, t) {
 55598              if (null === e[r.$getTemplateRoot]()[r.$extra].firstUnsplittable)
 55599                return !0;
 55600              if (0 === e.w || 0 === e.h) return !0;
 55601              const a = e[r.$getSubformParent](),
 55602                n = a[r.$extra]?.attempt || 0,
 55603                [, i, s, o] = (function getTransformedBBox(e) {
 55604                  let t,
 55605                    a,
 55606                    r = "" === e.w ? NaN : e.w,
 55607                    n = "" === e.h ? NaN : e.h,
 55608                    [i, s] = [0, 0];
 55609                  switch (e.anchorType || "") {
 55610                    case "bottomCenter":
 55611                      [i, s] = [r / 2, n];
 55612                      break;
 55613                    case "bottomLeft":
 55614                      [i, s] = [0, n];
 55615                      break;
 55616                    case "bottomRight":
 55617                      [i, s] = [r, n];
 55618                      break;
 55619                    case "middleCenter":
 55620                      [i, s] = [r / 2, n / 2];
 55621                      break;
 55622                    case "middleLeft":
 55623                      [i, s] = [0, n / 2];
 55624                      break;
 55625                    case "middleRight":
 55626                      [i, s] = [r, n / 2];
 55627                      break;
 55628                    case "topCenter":
 55629                      [i, s] = [r / 2, 0];
 55630                      break;
 55631                    case "topRight":
 55632                      [i, s] = [r, 0];
 55633                  }
 55634                  switch (e.rotate || 0) {
 55635                    case 0:
 55636                      [t, a] = [-i, -s];
 55637                      break;
 55638                    case 90:
 55639                      [t, a] = [-s, i];
 55640                      [r, n] = [n, -r];
 55641                      break;
 55642                    case 180:
 55643                      [t, a] = [i, s];
 55644                      [r, n] = [-r, -n];
 55645                      break;
 55646                    case 270:
 55647                      [t, a] = [s, -i];
 55648                      [r, n] = [-n, r];
 55649                  }
 55650                  return [
 55651                    e.x + t + Math.min(0, r),
 55652                    e.y + a + Math.min(0, n),
 55653                    Math.abs(r),
 55654                    Math.abs(n),
 55655                  ];
 55656                })(e);
 55657              switch (a.layout) {
 55658                case "lr-tb":
 55659                case "rl-tb":
 55660                  return 0 === n
 55661                    ? e[r.$getTemplateRoot]()[r.$extra].noLayoutFailure
 55662                      ? "" !== e.w
 55663                        ? Math.round(s - t.width) <= 2
 55664                        : t.width > 2
 55665                      : !("" !== e.h && Math.round(o - t.height) > 2) &&
 55666                        ("" !== e.w
 55667                          ? Math.round(s - t.width) <= 2 ||
 55668                            (0 === a[r.$extra].numberInLine && t.height > 2)
 55669                          : t.width > 2)
 55670                    : !!e[r.$getTemplateRoot]()[r.$extra].noLayoutFailure ||
 55671                        (!("" !== e.h && Math.round(o - t.height) > 2) &&
 55672                          ("" === e.w ||
 55673                            Math.round(s - t.width) <= 2 ||
 55674                            !a[r.$isThereMoreWidth]()) &&
 55675                          t.height > 2);
 55676                case "table":
 55677                case "tb":
 55678                  return (
 55679                    !!e[r.$getTemplateRoot]()[r.$extra].noLayoutFailure ||
 55680                    ("" === e.h || e[r.$isSplittable]()
 55681                      ? ("" === e.w ||
 55682                          Math.round(s - t.width) <= 2 ||
 55683                          !a[r.$isThereMoreWidth]()) &&
 55684                        t.height > 2
 55685                      : Math.round(o - t.height) <= 2)
 55686                  );
 55687                case "position":
 55688                  if (e[r.$getTemplateRoot]()[r.$extra].noLayoutFailure)
 55689                    return !0;
 55690                  if ("" === e.h || Math.round(o + i - t.height) <= 2) return !0;
 55691                  return (
 55692                    o + i > e[r.$getTemplateRoot]()[r.$extra].currentContentArea.h
 55693                  );
 55694                case "rl-row":
 55695                case "row":
 55696                  return (
 55697                    !!e[r.$getTemplateRoot]()[r.$extra].noLayoutFailure ||
 55698                    "" === e.h ||
 55699                    Math.round(o - t.height) <= 2
 55700                  );
 55701                default:
 55702                  return !0;
 55703              }
 55704            };
 55705            t.flushHTML = function flushHTML(e) {
 55706              if (!e[r.$extra]) return null;
 55707              const t = {
 55708                name: "div",
 55709                attributes: e[r.$extra].attributes,
 55710                children: e[r.$extra].children,
 55711              };
 55712              if (e[r.$extra].failingNode) {
 55713                const a = e[r.$extra].failingNode[r.$flushHTML]();
 55714                a &&
 55715                  (e.layout.endsWith("-tb")
 55716                    ? t.children.push(createLine(e, [a]))
 55717                    : t.children.push(a));
 55718              }
 55719              if (0 === t.children.length) return null;
 55720              return t;
 55721            };
 55722            t.getAvailableSpace = function getAvailableSpace(e) {
 55723              const t = e[r.$extra].availableSpace,
 55724                a = e.margin ? e.margin.topInset + e.margin.bottomInset : 0,
 55725                n = e.margin ? e.margin.leftInset + e.margin.rightInset : 0;
 55726              switch (e.layout) {
 55727                case "lr-tb":
 55728                case "rl-tb":
 55729                  return 0 === e[r.$extra].attempt
 55730                    ? {
 55731                        width: t.width - n - e[r.$extra].currentWidth,
 55732                        height: t.height - a - e[r.$extra].prevHeight,
 55733                      }
 55734                    : {
 55735                        width: t.width - n,
 55736                        height: t.height - a - e[r.$extra].height,
 55737                      };
 55738                case "rl-row":
 55739                case "row":
 55740                  return {
 55741                    width: e[r.$extra].columnWidths
 55742                      .slice(e[r.$extra].currentColumn)
 55743                      .reduce((e, t) => e + t),
 55744                    height: t.height - n,
 55745                  };
 55746                case "table":
 55747                case "tb":
 55748                  return {
 55749                    width: t.width - n,
 55750                    height: t.height - a - e[r.$extra].height,
 55751                  };
 55752                default:
 55753                  return t;
 55754              }
 55755            };
 55756            var r = a(78),
 55757              n = a(83);
 55758            function createLine(e, t) {
 55759              return {
 55760                name: "div",
 55761                attributes: { class: ["lr-tb" === e.layout ? "xfaLr" : "xfaRl"] },
 55762                children: t,
 55763              };
 55764            }
 55765          },
 55766          (e, t, a) => {
 55767            Object.defineProperty(t, "__esModule", { value: !0 });
 55768            t.computeBbox = function computeBbox(e, t, a) {
 55769              let n;
 55770              if ("" !== e.w && "" !== e.h) n = [e.x, e.y, e.w, e.h];
 55771              else {
 55772                if (!a) return null;
 55773                let i = e.w;
 55774                if ("" === i) {
 55775                  if (0 === e.maxW) {
 55776                    const t = e[r.$getSubformParent]();
 55777                    i = "position" === t.layout && "" !== t.w ? 0 : e.minW;
 55778                  } else i = Math.min(e.maxW, a.width);
 55779                  t.attributes.style.width = measureToString(i);
 55780                }
 55781                let s = e.h;
 55782                if ("" === s) {
 55783                  if (0 === e.maxH) {
 55784                    const t = e[r.$getSubformParent]();
 55785                    s = "position" === t.layout && "" !== t.h ? 0 : e.minH;
 55786                  } else s = Math.min(e.maxH, a.height);
 55787                  t.attributes.style.height = measureToString(s);
 55788                }
 55789                n = [e.x, e.y, i, s];
 55790              }
 55791              return n;
 55792            };
 55793            t.createWrapper = function createWrapper(e, t) {
 55794              const { attributes: a } = t,
 55795                { style: n } = a,
 55796                i = {
 55797                  name: "div",
 55798                  attributes: {
 55799                    class: ["xfaWrapper"],
 55800                    style: Object.create(null),
 55801                  },
 55802                  children: [],
 55803                };
 55804              a.class.push("xfaWrapped");
 55805              if (e.border) {
 55806                const { widths: a, insets: s } = e.border[r.$extra];
 55807                let o,
 55808                  c,
 55809                  l = s[0],
 55810                  h = s[3];
 55811                const u = s[0] + s[2],
 55812                  d = s[1] + s[3];
 55813                switch (e.border.hand) {
 55814                  case "even":
 55815                    l -= a[0] / 2;
 55816                    h -= a[3] / 2;
 55817                    o = `calc(100% + ${(a[1] + a[3]) / 2 - d}px)`;
 55818                    c = `calc(100% + ${(a[0] + a[2]) / 2 - u}px)`;
 55819                    break;
 55820                  case "left":
 55821                    l -= a[0];
 55822                    h -= a[3];
 55823                    o = `calc(100% + ${a[1] + a[3] - d}px)`;
 55824                    c = `calc(100% + ${a[0] + a[2] - u}px)`;
 55825                    break;
 55826                  case "right":
 55827                    o = d ? `calc(100% - ${d}px)` : "100%";
 55828                    c = u ? `calc(100% - ${u}px)` : "100%";
 55829                }
 55830                const f = ["xfaBorder"];
 55831                isPrintOnly(e.border) && f.push("xfaPrintOnly");
 55832                const g = {
 55833                  name: "div",
 55834                  attributes: {
 55835                    class: f,
 55836                    style: { top: `${l}px`, left: `${h}px`, width: o, height: c },
 55837                  },
 55838                  children: [],
 55839                };
 55840                for (const e of [
 55841                  "border",
 55842                  "borderWidth",
 55843                  "borderColor",
 55844                  "borderRadius",
 55845                  "borderStyle",
 55846                ])
 55847                  if (void 0 !== n[e]) {
 55848                    g.attributes.style[e] = n[e];
 55849                    delete n[e];
 55850                  }
 55851                i.children.push(g, t);
 55852              } else i.children.push(t);
 55853              for (const e of [
 55854                "background",
 55855                "backgroundClip",
 55856                "top",
 55857                "left",
 55858                "width",
 55859                "height",
 55860                "minWidth",
 55861                "minHeight",
 55862                "maxWidth",
 55863                "maxHeight",
 55864                "transform",
 55865                "transformOrigin",
 55866                "visibility",
 55867              ])
 55868                if (void 0 !== n[e]) {
 55869                  i.attributes.style[e] = n[e];
 55870                  delete n[e];
 55871                }
 55872              i.attributes.style.position =
 55873                "absolute" === n.position ? "absolute" : "relative";
 55874              delete n.position;
 55875              if (n.alignSelf) {
 55876                i.attributes.style.alignSelf = n.alignSelf;
 55877                delete n.alignSelf;
 55878              }
 55879              return i;
 55880            };
 55881            t.fixDimensions = function fixDimensions(e) {
 55882              const t = e[r.$getSubformParent]();
 55883              if (t.layout?.includes("row")) {
 55884                const a = t[r.$extra],
 55885                  n = e.colSpan;
 55886                let i;
 55887                i =
 55888                  -1 === n
 55889                    ? a.columnWidths
 55890                        .slice(a.currentColumn)
 55891                        .reduce((e, t) => e + t, 0)
 55892                    : a.columnWidths
 55893                        .slice(a.currentColumn, a.currentColumn + n)
 55894                        .reduce((e, t) => e + t, 0);
 55895                isNaN(i) || (e.w = i);
 55896              }
 55897              t.layout && "position" !== t.layout && (e.x = e.y = 0);
 55898              "table" === e.layout &&
 55899                "" === e.w &&
 55900                Array.isArray(e.columnWidths) &&
 55901                (e.w = e.columnWidths.reduce((e, t) => e + t, 0));
 55902            };
 55903            t.fixTextIndent = function fixTextIndent(e) {
 55904              const t = (0, i.getMeasurement)(e.textIndent, "0px");
 55905              if (t >= 0) return;
 55906              const a =
 55907                  "padding" +
 55908                  ("left" == ("right" === e.textAlign ? "right" : "left")
 55909                    ? "Left"
 55910                    : "Right"),
 55911                r = (0, i.getMeasurement)(e[a], "0px");
 55912              e[a] = r - t + "px";
 55913            };
 55914            t.fixURL = function fixURL(e) {
 55915              const t = (0, n.createValidAbsoluteUrl)(e, null, {
 55916                addDefaultProtocol: !0,
 55917                tryConvertEncoding: !0,
 55918              });
 55919              return t ? t.href : null;
 55920            };
 55921            t.isPrintOnly = isPrintOnly;
 55922            t.layoutClass = function layoutClass(e) {
 55923              switch (e.layout) {
 55924                case "position":
 55925                default:
 55926                  return "xfaPosition";
 55927                case "lr-tb":
 55928                  return "xfaLrTb";
 55929                case "rl-row":
 55930                  return "xfaRlRow";
 55931                case "rl-tb":
 55932                  return "xfaRlTb";
 55933                case "row":
 55934                  return "xfaRow";
 55935                case "table":
 55936                  return "xfaTable";
 55937                case "tb":
 55938                  return "xfaTb";
 55939              }
 55940            };
 55941            t.layoutNode = function layoutNode(e, t) {
 55942              let a = null,
 55943                n = null,
 55944                i = !1;
 55945              if ((!e.w || !e.h) && e.value) {
 55946                let s = 0,
 55947                  o = 0;
 55948                if (e.margin) {
 55949                  s = e.margin.leftInset + e.margin.rightInset;
 55950                  o = e.margin.topInset + e.margin.bottomInset;
 55951                }
 55952                let c = null,
 55953                  l = null;
 55954                if (e.para) {
 55955                  l = Object.create(null);
 55956                  c = "" === e.para.lineHeight ? null : e.para.lineHeight;
 55957                  l.top = "" === e.para.spaceAbove ? 0 : e.para.spaceAbove;
 55958                  l.bottom = "" === e.para.spaceBelow ? 0 : e.para.spaceBelow;
 55959                  l.left = "" === e.para.marginLeft ? 0 : e.para.marginLeft;
 55960                  l.right = "" === e.para.marginRight ? 0 : e.para.marginRight;
 55961                }
 55962                let h = e.font;
 55963                if (!h) {
 55964                  const t = e[r.$getTemplateRoot]();
 55965                  let a = e[r.$getParent]();
 55966                  for (; a && a !== t; ) {
 55967                    if (a.font) {
 55968                      h = a.font;
 55969                      break;
 55970                    }
 55971                    a = a[r.$getParent]();
 55972                  }
 55973                }
 55974                const u = (e.w || t.width) - s,
 55975                  d = e[r.$globalData].fontFinder;
 55976                if (
 55977                  e.value.exData &&
 55978                  e.value.exData[r.$content] &&
 55979                  "text/html" === e.value.exData.contentType
 55980                ) {
 55981                  const t = layoutText(e.value.exData[r.$content], h, l, c, d, u);
 55982                  n = t.width;
 55983                  a = t.height;
 55984                  i = t.isBroken;
 55985                } else {
 55986                  const t = e.value[r.$text]();
 55987                  if (t) {
 55988                    const e = layoutText(t, h, l, c, d, u);
 55989                    n = e.width;
 55990                    a = e.height;
 55991                    i = e.isBroken;
 55992                  }
 55993                }
 55994                null === n || e.w || (n += s);
 55995                null === a || e.h || (a += o);
 55996              }
 55997              return { w: n, h: a, isBroken: i };
 55998            };
 55999            t.measureToString = measureToString;
 56000            t.setAccess = function setAccess(e, t) {
 56001              switch (e.access) {
 56002                case "nonInteractive":
 56003                  t.push("xfaNonInteractive");
 56004                  break;
 56005                case "readOnly":
 56006                  t.push("xfaReadOnly");
 56007                  break;
 56008                case "protected":
 56009                  t.push("xfaDisabled");
 56010              }
 56011            };
 56012            t.setFontFamily = function setFontFamily(e, t, a, r) {
 56013              if (!a) {
 56014                delete r.fontFamily;
 56015                return;
 56016              }
 56017              const n = (0, i.stripQuotes)(e.typeface);
 56018              r.fontFamily = `"${n}"`;
 56019              const o = a.find(n);
 56020              if (o) {
 56021                const { fontFamily: a } = o.regular.cssFontInfo;
 56022                a !== n && (r.fontFamily = `"${a}"`);
 56023                const i = getCurrentPara(t);
 56024                if (i && "" !== i.lineHeight) return;
 56025                if (r.lineHeight) return;
 56026                const c = (0, s.selectFont)(e, o);
 56027                c && (r.lineHeight = Math.max(1.2, c.lineHeight));
 56028              }
 56029            };
 56030            t.setMinMaxDimensions = function setMinMaxDimensions(e, t) {
 56031              if ("position" === e[r.$getSubformParent]().layout) {
 56032                e.minW > 0 && (t.minWidth = measureToString(e.minW));
 56033                e.maxW > 0 && (t.maxWidth = measureToString(e.maxW));
 56034                e.minH > 0 && (t.minHeight = measureToString(e.minH));
 56035                e.maxH > 0 && (t.maxHeight = measureToString(e.maxH));
 56036              }
 56037            };
 56038            t.setPara = function setPara(e, t, a) {
 56039              if (a.attributes.class?.includes("xfaRich")) {
 56040                if (t) {
 56041                  "" === e.h && (t.height = "auto");
 56042                  "" === e.w && (t.width = "auto");
 56043                }
 56044                const n = getCurrentPara(e);
 56045                if (n) {
 56046                  const e = a.attributes.style;
 56047                  e.display = "flex";
 56048                  e.flexDirection = "column";
 56049                  switch (n.vAlign) {
 56050                    case "top":
 56051                      e.justifyContent = "start";
 56052                      break;
 56053                    case "bottom":
 56054                      e.justifyContent = "end";
 56055                      break;
 56056                    case "middle":
 56057                      e.justifyContent = "center";
 56058                  }
 56059                  const t = n[r.$toStyle]();
 56060                  for (const [a, r] of Object.entries(t)) a in e || (e[a] = r);
 56061                }
 56062              }
 56063            };
 56064            t.toStyle = function toStyle(e, ...t) {
 56065              const a = Object.create(null);
 56066              for (const i of t) {
 56067                const t = e[i];
 56068                if (null !== t)
 56069                  if (l.hasOwnProperty(i)) l[i](e, a);
 56070                  else if (t instanceof c.XFAObject) {
 56071                    const e = t[r.$toStyle]();
 56072                    e
 56073                      ? Object.assign(a, e)
 56074                      : (0, n.warn)(
 56075                          `(DEBUG) - XFA - style for ${i} not implemented yet`,
 56076                        );
 56077                  }
 56078              }
 56079              return a;
 56080            };
 56081            var r = a(78),
 56082              n = a(2),
 56083              i = a(84),
 56084              s = a(85),
 56085              o = a(86),
 56086              c = a(87);
 56087            function measureToString(e) {
 56088              return "string" == typeof e
 56089                ? "0px"
 56090                : Number.isInteger(e)
 56091                  ? `${e}px`
 56092                  : `${e.toFixed(2)}px`;
 56093            }
 56094            const l = {
 56095              anchorType(e, t) {
 56096                const a = e[r.$getSubformParent]();
 56097                if (a && (!a.layout || "position" === a.layout)) {
 56098                  "transform" in t || (t.transform = "");
 56099                  switch (e.anchorType) {
 56100                    case "bottomCenter":
 56101                      t.transform += "translate(-50%, -100%)";
 56102                      break;
 56103                    case "bottomLeft":
 56104                      t.transform += "translate(0,-100%)";
 56105                      break;
 56106                    case "bottomRight":
 56107                      t.transform += "translate(-100%,-100%)";
 56108                      break;
 56109                    case "middleCenter":
 56110                      t.transform += "translate(-50%,-50%)";
 56111                      break;
 56112                    case "middleLeft":
 56113                      t.transform += "translate(0,-50%)";
 56114                      break;
 56115                    case "middleRight":
 56116                      t.transform += "translate(-100%,-50%)";
 56117                      break;
 56118                    case "topCenter":
 56119                      t.transform += "translate(-50%,0)";
 56120                      break;
 56121                    case "topRight":
 56122                      t.transform += "translate(-100%,0)";
 56123                  }
 56124                }
 56125              },
 56126              dimensions(e, t) {
 56127                const a = e[r.$getSubformParent]();
 56128                let n = e.w;
 56129                const i = e.h;
 56130                if (a.layout?.includes("row")) {
 56131                  const t = a[r.$extra],
 56132                    i = e.colSpan;
 56133                  let s;
 56134                  if (-1 === i) {
 56135                    s = t.columnWidths
 56136                      .slice(t.currentColumn)
 56137                      .reduce((e, t) => e + t, 0);
 56138                    t.currentColumn = 0;
 56139                  } else {
 56140                    s = t.columnWidths
 56141                      .slice(t.currentColumn, t.currentColumn + i)
 56142                      .reduce((e, t) => e + t, 0);
 56143                    t.currentColumn =
 56144                      (t.currentColumn + e.colSpan) % t.columnWidths.length;
 56145                  }
 56146                  isNaN(s) || (n = e.w = s);
 56147                }
 56148                t.width = "" !== n ? measureToString(n) : "auto";
 56149                t.height = "" !== i ? measureToString(i) : "auto";
 56150              },
 56151              position(e, t) {
 56152                const a = e[r.$getSubformParent]();
 56153                if (!a?.layout || "position" === a.layout) {
 56154                  t.position = "absolute";
 56155                  t.left = measureToString(e.x);
 56156                  t.top = measureToString(e.y);
 56157                }
 56158              },
 56159              rotate(e, t) {
 56160                if (e.rotate) {
 56161                  "transform" in t || (t.transform = "");
 56162                  t.transform += `rotate(-${e.rotate}deg)`;
 56163                  t.transformOrigin = "top left";
 56164                }
 56165              },
 56166              presence(e, t) {
 56167                switch (e.presence) {
 56168                  case "invisible":
 56169                    t.visibility = "hidden";
 56170                    break;
 56171                  case "hidden":
 56172                  case "inactive":
 56173                    t.display = "none";
 56174                }
 56175              },
 56176              hAlign(e, t) {
 56177                if ("para" === e[r.$nodeName])
 56178                  switch (e.hAlign) {
 56179                    case "justifyAll":
 56180                      t.textAlign = "justify-all";
 56181                      break;
 56182                    case "radix":
 56183                      t.textAlign = "left";
 56184                      break;
 56185                    default:
 56186                      t.textAlign = e.hAlign;
 56187                  }
 56188                else
 56189                  switch (e.hAlign) {
 56190                    case "left":
 56191                      t.alignSelf = "start";
 56192                      break;
 56193                    case "center":
 56194                      t.alignSelf = "center";
 56195                      break;
 56196                    case "right":
 56197                      t.alignSelf = "end";
 56198                  }
 56199              },
 56200              margin(e, t) {
 56201                e.margin && (t.margin = e.margin[r.$toStyle]().margin);
 56202              },
 56203            };
 56204            function layoutText(e, t, a, n, i, s) {
 56205              const c = new o.TextMeasure(t, a, n, i);
 56206              "string" == typeof e ? c.addString(e) : e[r.$pushGlyphs](c);
 56207              return c.compute(s);
 56208            }
 56209            function isPrintOnly(e) {
 56210              return (
 56211                e.relevant.length > 0 &&
 56212                !e.relevant[0].excluded &&
 56213                "print" === e.relevant[0].viewname
 56214              );
 56215            }
 56216            function getCurrentPara(e) {
 56217              const t = e[r.$getTemplateRoot]()[r.$extra].paraStack;
 56218              return t.length ? t.at(-1) : null;
 56219            }
 56220          },
 56221          (e, t, a) => {
 56222            Object.defineProperty(t, "__esModule", { value: !0 });
 56223            t.HTMLResult = void 0;
 56224            t.getBBox = function getBBox(e) {
 56225              const t = -1;
 56226              if (!e) return { x: t, y: t, width: t, height: t };
 56227              const a = e
 56228                .trim()
 56229                .split(/\s*,\s*/)
 56230                .map((e) => getMeasurement(e, "-1"));
 56231              if (a.length < 4 || a[2] < 0 || a[3] < 0)
 56232                return { x: t, y: t, width: t, height: t };
 56233              const [r, n, i, s] = a;
 56234              return { x: r, y: n, width: i, height: s };
 56235            };
 56236            t.getColor = function getColor(e, t = [0, 0, 0]) {
 56237              let [a, r, n] = t;
 56238              if (!e) return { r: a, g: r, b: n };
 56239              const i = e
 56240                .trim()
 56241                .split(/\s*,\s*/)
 56242                .map((e) => Math.min(Math.max(0, parseInt(e.trim(), 10)), 255))
 56243                .map((e) => (isNaN(e) ? 0 : e));
 56244              if (i.length < 3) return { r: a, g: r, b: n };
 56245              [a, r, n] = i;
 56246              return { r: a, g: r, b: n };
 56247            };
 56248            t.getFloat = function getFloat({
 56249              data: e,
 56250              defaultValue: t,
 56251              validate: a,
 56252            }) {
 56253              if (!e) return t;
 56254              e = e.trim();
 56255              const r = parseFloat(e);
 56256              if (!isNaN(r) && a(r)) return r;
 56257              return t;
 56258            };
 56259            t.getInteger = function getInteger({
 56260              data: e,
 56261              defaultValue: t,
 56262              validate: a,
 56263            }) {
 56264              if (!e) return t;
 56265              e = e.trim();
 56266              const r = parseInt(e, 10);
 56267              if (!isNaN(r) && a(r)) return r;
 56268              return t;
 56269            };
 56270            t.getKeyword = getKeyword;
 56271            t.getMeasurement = getMeasurement;
 56272            t.getRatio = function getRatio(e) {
 56273              if (!e) return { num: 1, den: 1 };
 56274              const t = e
 56275                .trim()
 56276                .split(/\s*:\s*/)
 56277                .map((e) => parseFloat(e))
 56278                .filter((e) => !isNaN(e));
 56279              1 === t.length && t.push(1);
 56280              if (0 === t.length) return { num: 1, den: 1 };
 56281              const [a, r] = t;
 56282              return { num: a, den: r };
 56283            };
 56284            t.getRelevant = function getRelevant(e) {
 56285              if (!e) return [];
 56286              return e
 56287                .trim()
 56288                .split(/\s+/)
 56289                .map((e) => ({
 56290                  excluded: "-" === e[0],
 56291                  viewname: e.substring(1),
 56292                }));
 56293            };
 56294            t.getStringOption = function getStringOption(e, t) {
 56295              return getKeyword({
 56296                data: e,
 56297                defaultValue: t[0],
 56298                validate: (e) => t.includes(e),
 56299              });
 56300            };
 56301            t.stripQuotes = function stripQuotes(e) {
 56302              if (e.startsWith("'") || e.startsWith('"')) return e.slice(1, -1);
 56303              return e;
 56304            };
 56305            var r = a(2);
 56306            const n = {
 56307                pt: (e) => e,
 56308                cm: (e) => (e / 2.54) * 72,
 56309                mm: (e) => (e / 25.4) * 72,
 56310                in: (e) => 72 * e,
 56311                px: (e) => e,
 56312              },
 56313              i = /([+-]?\d+\.?\d*)(.*)/;
 56314            function getKeyword({ data: e, defaultValue: t, validate: a }) {
 56315              return e && a((e = e.trim())) ? e : t;
 56316            }
 56317            function getMeasurement(e, t = "0") {
 56318              t ||= "0";
 56319              if (!e) return getMeasurement(t);
 56320              const a = e.trim().match(i);
 56321              if (!a) return getMeasurement(t);
 56322              const [, r, s] = a,
 56323                o = parseFloat(r);
 56324              if (isNaN(o)) return getMeasurement(t);
 56325              if (0 === o) return 0;
 56326              const c = n[s];
 56327              return c ? c(o) : o;
 56328            }
 56329            class HTMLResult {
 56330              static get FAILURE() {
 56331                return (0, r.shadow)(
 56332                  this,
 56333                  "FAILURE",
 56334                  new HTMLResult(!1, null, null, null),
 56335                );
 56336              }
 56337              static get EMPTY() {
 56338                return (0, r.shadow)(
 56339                  this,
 56340                  "EMPTY",
 56341                  new HTMLResult(!0, null, null, null),
 56342                );
 56343              }
 56344              constructor(e, t, a, r) {
 56345                this.success = e;
 56346                this.html = t;
 56347                this.bbox = a;
 56348                this.breakNode = r;
 56349              }
 56350              isBreak() {
 56351                return !!this.breakNode;
 56352              }
 56353              static breakNode(e) {
 56354                return new HTMLResult(!1, null, null, e);
 56355              }
 56356              static success(e, t = null) {
 56357                return new HTMLResult(!0, e, t, null);
 56358              }
 56359            }
 56360            t.HTMLResult = HTMLResult;
 56361          },
 56362          (e, t, a) => {
 56363            Object.defineProperty(t, "__esModule", { value: !0 });
 56364            t.FontFinder = void 0;
 56365            t.getMetrics = function getMetrics(e, t = !1) {
 56366              let a = null;
 56367              if (e) {
 56368                const t = (0, n.stripQuotes)(e.typeface),
 56369                  i = e[r.$globalData].fontFinder.find(t);
 56370                a = selectFont(e, i);
 56371              }
 56372              if (!a) return { lineHeight: 12, lineGap: 2, lineNoGap: 10 };
 56373              const i = e.size || 10,
 56374                s = a.lineHeight ? Math.max(t ? 0 : 1.2, a.lineHeight) : 1.2,
 56375                o = void 0 === a.lineGap ? 0.2 : a.lineGap;
 56376              return {
 56377                lineHeight: s * i,
 56378                lineGap: o * i,
 56379                lineNoGap: Math.max(1, s - o) * i,
 56380              };
 56381            };
 56382            t.selectFont = selectFont;
 56383            var r = a(78),
 56384              n = a(84),
 56385              i = a(2);
 56386            t.FontFinder = class FontFinder {
 56387              constructor(e) {
 56388                this.fonts = new Map();
 56389                this.cache = new Map();
 56390                this.warned = new Set();
 56391                this.defaultFont = null;
 56392                this.add(e);
 56393              }
 56394              add(e, t = null) {
 56395                for (const t of e) this.addPdfFont(t);
 56396                for (const e of this.fonts.values())
 56397                  e.regular || (e.regular = e.italic || e.bold || e.bolditalic);
 56398                if (!t || 0 === t.size) return;
 56399                const a = this.fonts.get("PdfJS-Fallback-PdfJS-XFA");
 56400                for (const e of t) this.fonts.set(e, a);
 56401              }
 56402              addPdfFont(e) {
 56403                const t = e.cssFontInfo,
 56404                  a = t.fontFamily;
 56405                let r = this.fonts.get(a);
 56406                if (!r) {
 56407                  r = Object.create(null);
 56408                  this.fonts.set(a, r);
 56409                  this.defaultFont || (this.defaultFont = r);
 56410                }
 56411                let n = "";
 56412                const i = parseFloat(t.fontWeight);
 56413                0 !== parseFloat(t.italicAngle)
 56414                  ? (n = i >= 700 ? "bolditalic" : "italic")
 56415                  : i >= 700 && (n = "bold");
 56416                if (!n) {
 56417                  (e.name.includes("Bold") || e.psName?.includes("Bold")) &&
 56418                    (n = "bold");
 56419                  (e.name.includes("Italic") ||
 56420                    e.name.endsWith("It") ||
 56421                    e.psName?.includes("Italic") ||
 56422                    e.psName?.endsWith("It")) &&
 56423                    (n += "italic");
 56424                }
 56425                n || (n = "regular");
 56426                r[n] = e;
 56427              }
 56428              getDefault() {
 56429                return this.defaultFont;
 56430              }
 56431              find(e, t = !0) {
 56432                let a = this.fonts.get(e) || this.cache.get(e);
 56433                if (a) return a;
 56434                const r = /,|-|_| |bolditalic|bold|italic|regular|it/gi;
 56435                let n = e.replaceAll(r, "");
 56436                a = this.fonts.get(n);
 56437                if (a) {
 56438                  this.cache.set(e, a);
 56439                  return a;
 56440                }
 56441                n = n.toLowerCase();
 56442                const s = [];
 56443                for (const [e, t] of this.fonts.entries())
 56444                  e.replaceAll(r, "").toLowerCase().startsWith(n) && s.push(t);
 56445                if (0 === s.length)
 56446                  for (const [, e] of this.fonts.entries())
 56447                    e.regular.name
 56448                      ?.replaceAll(r, "")
 56449                      .toLowerCase()
 56450                      .startsWith(n) && s.push(e);
 56451                if (0 === s.length) {
 56452                  n = n.replaceAll(/psmt|mt/gi, "");
 56453                  for (const [e, t] of this.fonts.entries())
 56454                    e.replaceAll(r, "").toLowerCase().startsWith(n) && s.push(t);
 56455                }
 56456                if (0 === s.length)
 56457                  for (const e of this.fonts.values())
 56458                    e.regular.name
 56459                      ?.replaceAll(r, "")
 56460                      .toLowerCase()
 56461                      .startsWith(n) && s.push(e);
 56462                if (s.length >= 1) {
 56463                  1 !== s.length &&
 56464                    t &&
 56465                    (0, i.warn)(
 56466                      `XFA - Too many choices to guess the correct font: ${e}`,
 56467                    );
 56468                  this.cache.set(e, s[0]);
 56469                  return s[0];
 56470                }
 56471                if (t && !this.warned.has(e)) {
 56472                  this.warned.add(e);
 56473                  (0, i.warn)(`XFA - Cannot find the font: ${e}`);
 56474                }
 56475                return null;
 56476              }
 56477            };
 56478            function selectFont(e, t) {
 56479              return "italic" === e.posture
 56480                ? "bold" === e.weight
 56481                  ? t.bolditalic
 56482                  : t.italic
 56483                : "bold" === e.weight
 56484                  ? t.bold
 56485                  : t.regular;
 56486            }
 56487          },
 56488          (e, t, a) => {
 56489            Object.defineProperty(t, "__esModule", { value: !0 });
 56490            t.TextMeasure = void 0;
 56491            var r = a(85);
 56492            class FontInfo {
 56493              constructor(e, t, a, n) {
 56494                this.lineHeight = a;
 56495                this.paraMargin = t || { top: 0, bottom: 0, left: 0, right: 0 };
 56496                if (!e) {
 56497                  [this.pdfFont, this.xfaFont] = this.defaultFont(n);
 56498                  return;
 56499                }
 56500                this.xfaFont = {
 56501                  typeface: e.typeface,
 56502                  posture: e.posture,
 56503                  weight: e.weight,
 56504                  size: e.size,
 56505                  letterSpacing: e.letterSpacing,
 56506                };
 56507                const i = n.find(e.typeface);
 56508                if (i) {
 56509                  this.pdfFont = (0, r.selectFont)(e, i);
 56510                  this.pdfFont ||
 56511                    ([this.pdfFont, this.xfaFont] = this.defaultFont(n));
 56512                } else [this.pdfFont, this.xfaFont] = this.defaultFont(n);
 56513              }
 56514              defaultFont(e) {
 56515                const t =
 56516                  e.find("Helvetica", !1) ||
 56517                  e.find("Myriad Pro", !1) ||
 56518                  e.find("Arial", !1) ||
 56519                  e.getDefault();
 56520                if (t?.regular) {
 56521                  const e = t.regular;
 56522                  return [
 56523                    e,
 56524                    {
 56525                      typeface: e.cssFontInfo.fontFamily,
 56526                      posture: "normal",
 56527                      weight: "normal",
 56528                      size: 10,
 56529                      letterSpacing: 0,
 56530                    },
 56531                  ];
 56532                }
 56533                return [
 56534                  null,
 56535                  {
 56536                    typeface: "Courier",
 56537                    posture: "normal",
 56538                    weight: "normal",
 56539                    size: 10,
 56540                    letterSpacing: 0,
 56541                  },
 56542                ];
 56543              }
 56544            }
 56545            class FontSelector {
 56546              constructor(e, t, a, r) {
 56547                this.fontFinder = r;
 56548                this.stack = [new FontInfo(e, t, a, r)];
 56549              }
 56550              pushData(e, t, a) {
 56551                const r = this.stack.at(-1);
 56552                for (const t of [
 56553                  "typeface",
 56554                  "posture",
 56555                  "weight",
 56556                  "size",
 56557                  "letterSpacing",
 56558                ])
 56559                  e[t] || (e[t] = r.xfaFont[t]);
 56560                for (const e of ["top", "bottom", "left", "right"])
 56561                  isNaN(t[e]) && (t[e] = r.paraMargin[e]);
 56562                const n = new FontInfo(e, t, a || r.lineHeight, this.fontFinder);
 56563                n.pdfFont || (n.pdfFont = r.pdfFont);
 56564                this.stack.push(n);
 56565              }
 56566              popFont() {
 56567                this.stack.pop();
 56568              }
 56569              topFont() {
 56570                return this.stack.at(-1);
 56571              }
 56572            }
 56573            t.TextMeasure = class TextMeasure {
 56574              constructor(e, t, a, r) {
 56575                this.glyphs = [];
 56576                this.fontSelector = new FontSelector(e, t, a, r);
 56577                this.extraHeight = 0;
 56578              }
 56579              pushData(e, t, a) {
 56580                this.fontSelector.pushData(e, t, a);
 56581              }
 56582              popFont(e) {
 56583                return this.fontSelector.popFont();
 56584              }
 56585              addPara() {
 56586                const e = this.fontSelector.topFont();
 56587                this.extraHeight += e.paraMargin.top + e.paraMargin.bottom;
 56588              }
 56589              addString(e) {
 56590                if (!e) return;
 56591                const t = this.fontSelector.topFont(),
 56592                  a = t.xfaFont.size;
 56593                if (t.pdfFont) {
 56594                  const r = t.xfaFont.letterSpacing,
 56595                    n = t.pdfFont,
 56596                    i = n.lineHeight || 1.2,
 56597                    s = t.lineHeight || Math.max(1.2, i) * a,
 56598                    o = i - (void 0 === n.lineGap ? 0.2 : n.lineGap),
 56599                    c = Math.max(1, o) * a,
 56600                    l = a / 1e3,
 56601                    h = n.defaultWidth || n.charsToGlyphs(" ")[0].width;
 56602                  for (const t of e.split(/[\u2029\n]/)) {
 56603                    const e = n.encodeString(t).join(""),
 56604                      a = n.charsToGlyphs(e);
 56605                    for (const e of a) {
 56606                      const t = e.width || h;
 56607                      this.glyphs.push([t * l + r, s, c, e.unicode, !1]);
 56608                    }
 56609                    this.glyphs.push([0, 0, 0, "\n", !0]);
 56610                  }
 56611                  this.glyphs.pop();
 56612                } else {
 56613                  for (const t of e.split(/[\u2029\n]/)) {
 56614                    for (const e of t.split(""))
 56615                      this.glyphs.push([a, 1.2 * a, a, e, !1]);
 56616                    this.glyphs.push([0, 0, 0, "\n", !0]);
 56617                  }
 56618                  this.glyphs.pop();
 56619                }
 56620              }
 56621              compute(e) {
 56622                let t = -1,
 56623                  a = 0,
 56624                  r = 0,
 56625                  n = 0,
 56626                  i = 0,
 56627                  s = 0,
 56628                  o = !1,
 56629                  c = !0;
 56630                for (let l = 0, h = this.glyphs.length; l < h; l++) {
 56631                  const [h, u, d, f, g] = this.glyphs[l],
 56632                    p = " " === f,
 56633                    m = c ? d : u;
 56634                  if (g) {
 56635                    r = Math.max(r, i);
 56636                    i = 0;
 56637                    n += s;
 56638                    s = m;
 56639                    t = -1;
 56640                    a = 0;
 56641                    c = !1;
 56642                  } else if (p)
 56643                    if (i + h > e) {
 56644                      r = Math.max(r, i);
 56645                      i = 0;
 56646                      n += s;
 56647                      s = m;
 56648                      t = -1;
 56649                      a = 0;
 56650                      o = !0;
 56651                      c = !1;
 56652                    } else {
 56653                      s = Math.max(m, s);
 56654                      a = i;
 56655                      i += h;
 56656                      t = l;
 56657                    }
 56658                  else if (i + h > e) {
 56659                    n += s;
 56660                    s = m;
 56661                    if (-1 !== t) {
 56662                      l = t;
 56663                      r = Math.max(r, a);
 56664                      i = 0;
 56665                      t = -1;
 56666                      a = 0;
 56667                    } else {
 56668                      r = Math.max(r, i);
 56669                      i = h;
 56670                    }
 56671                    o = !0;
 56672                    c = !1;
 56673                  } else {
 56674                    i += h;
 56675                    s = Math.max(m, s);
 56676                  }
 56677                }
 56678                r = Math.max(r, i);
 56679                n += s + this.extraHeight;
 56680                return { width: 1.02 * r, height: n, isBroken: o };
 56681              }
 56682            };
 56683          },
 56684          (e, t, a) => {
 56685            Object.defineProperty(t, "__esModule", { value: !0 });
 56686            t.XmlObject =
 56687              t.XFAObjectArray =
 56688              t.XFAObject =
 56689              t.XFAAttribute =
 56690              t.StringObject =
 56691              t.OptionObject =
 56692              t.Option10 =
 56693              t.Option01 =
 56694              t.IntegerObject =
 56695              t.ContentObject =
 56696                void 0;
 56697            var r = a(78),
 56698              n = a(84),
 56699              i = a(2),
 56700              s = a(3),
 56701              o = a(81),
 56702              c = a(88);
 56703            const l = Symbol(),
 56704              h = Symbol(),
 56705              u = Symbol(),
 56706              d = Symbol("_children"),
 56707              f = Symbol(),
 56708              g = Symbol(),
 56709              p = Symbol(),
 56710              m = Symbol(),
 56711              b = Symbol(),
 56712              y = Symbol(),
 56713              w = Symbol(),
 56714              S = Symbol(),
 56715              x = Symbol(),
 56716              C = Symbol("parent"),
 56717              k = Symbol(),
 56718              v = Symbol(),
 56719              F = Symbol();
 56720            let O = 0;
 56721            const T = o.NamespaceIds.datasets.id;
 56722            class XFAObject {
 56723              constructor(e, t, a = !1) {
 56724                this[r.$namespaceId] = e;
 56725                this[r.$nodeName] = t;
 56726                this[w] = a;
 56727                this[C] = null;
 56728                this[d] = [];
 56729                this[r.$uid] = `${t}${O++}`;
 56730                this[r.$globalData] = null;
 56731              }
 56732              get isXFAObject() {
 56733                return !0;
 56734              }
 56735              get isXFAObjectArray() {
 56736                return !1;
 56737              }
 56738              createNodes(e) {
 56739                let t = this,
 56740                  a = null;
 56741                for (const { name: n, index: i } of e) {
 56742                  for (let e = 0, s = isFinite(i) ? i : 0; e <= s; e++) {
 56743                    const e = t[r.$namespaceId] === T ? -1 : t[r.$namespaceId];
 56744                    a = new XmlObject(e, n);
 56745                    t[r.$appendChild](a);
 56746                  }
 56747                  t = a;
 56748                }
 56749                return a;
 56750              }
 56751              [r.$onChild](e) {
 56752                if (!this[w] || !this[r.$onChildCheck](e)) return !1;
 56753                const t = e[r.$nodeName],
 56754                  a = this[t];
 56755                if (!(a instanceof XFAObjectArray)) {
 56756                  null !== a && this[r.$removeChild](a);
 56757                  this[t] = e;
 56758                  this[r.$appendChild](e);
 56759                  return !0;
 56760                }
 56761                if (a.push(e)) {
 56762                  this[r.$appendChild](e);
 56763                  return !0;
 56764                }
 56765                let n = "";
 56766                this.id
 56767                  ? (n = ` (id: ${this.id})`)
 56768                  : this.name && (n = ` (name: ${this.name} ${this.h.value})`);
 56769                (0, i.warn)(
 56770                  `XFA - node "${
 56771                    this[r.$nodeName]
 56772                  }"${n} has already enough "${t}"!`,
 56773                );
 56774                return !1;
 56775              }
 56776              [r.$onChildCheck](e) {
 56777                return (
 56778                  this.hasOwnProperty(e[r.$nodeName]) &&
 56779                  e[r.$namespaceId] === this[r.$namespaceId]
 56780                );
 56781              }
 56782              [r.$isNsAgnostic]() {
 56783                return !1;
 56784              }
 56785              [r.$acceptWhitespace]() {
 56786                return !1;
 56787              }
 56788              [r.$isCDATAXml]() {
 56789                return !1;
 56790              }
 56791              [r.$isBindable]() {
 56792                return !1;
 56793              }
 56794              [r.$popPara]() {
 56795                this.para && this[r.$getTemplateRoot]()[r.$extra].paraStack.pop();
 56796              }
 56797              [r.$pushPara]() {
 56798                this[r.$getTemplateRoot]()[r.$extra].paraStack.push(this.para);
 56799              }
 56800              [r.$setId](e) {
 56801                this.id &&
 56802                  this[r.$namespaceId] === o.NamespaceIds.template.id &&
 56803                  e.set(this.id, this);
 56804              }
 56805              [r.$getTemplateRoot]() {
 56806                return this[r.$globalData].template;
 56807              }
 56808              [r.$isSplittable]() {
 56809                return !1;
 56810              }
 56811              [r.$isThereMoreWidth]() {
 56812                return !1;
 56813              }
 56814              [r.$appendChild](e) {
 56815                e[C] = this;
 56816                this[d].push(e);
 56817                !e[r.$globalData] &&
 56818                  this[r.$globalData] &&
 56819                  (e[r.$globalData] = this[r.$globalData]);
 56820              }
 56821              [r.$removeChild](e) {
 56822                const t = this[d].indexOf(e);
 56823                this[d].splice(t, 1);
 56824              }
 56825              [r.$hasSettableValue]() {
 56826                return this.hasOwnProperty("value");
 56827              }
 56828              [r.$setValue](e) {}
 56829              [r.$onText](e) {}
 56830              [r.$finalize]() {}
 56831              [r.$clean](e) {
 56832                delete this[w];
 56833                if (this[r.$cleanup]) {
 56834                  e.clean(this[r.$cleanup]);
 56835                  delete this[r.$cleanup];
 56836                }
 56837              }
 56838              [r.$indexOf](e) {
 56839                return this[d].indexOf(e);
 56840              }
 56841              [r.$insertAt](e, t) {
 56842                t[C] = this;
 56843                this[d].splice(e, 0, t);
 56844                !t[r.$globalData] &&
 56845                  this[r.$globalData] &&
 56846                  (t[r.$globalData] = this[r.$globalData]);
 56847              }
 56848              [r.$isTransparent]() {
 56849                return !this.name;
 56850              }
 56851              [r.$lastAttribute]() {
 56852                return "";
 56853              }
 56854              [r.$text]() {
 56855                return 0 === this[d].length
 56856                  ? this[r.$content]
 56857                  : this[d].map((e) => e[r.$text]()).join("");
 56858              }
 56859              get [u]() {
 56860                const e = Object.getPrototypeOf(this);
 56861                if (!e._attributes) {
 56862                  const t = (e._attributes = new Set());
 56863                  for (const e of Object.getOwnPropertyNames(this)) {
 56864                    if (
 56865                      null === this[e] ||
 56866                      this[e] instanceof XFAObject ||
 56867                      this[e] instanceof XFAObjectArray
 56868                    )
 56869                      break;
 56870                    t.add(e);
 56871                  }
 56872                }
 56873                return (0, i.shadow)(this, u, e._attributes);
 56874              }
 56875              [r.$isDescendent](e) {
 56876                let t = this;
 56877                for (; t; ) {
 56878                  if (t === e) return !0;
 56879                  t = t[r.$getParent]();
 56880                }
 56881                return !1;
 56882              }
 56883              [r.$getParent]() {
 56884                return this[C];
 56885              }
 56886              [r.$getSubformParent]() {
 56887                return this[r.$getParent]();
 56888              }
 56889              [r.$getChildren](e = null) {
 56890                return e ? this[e] : this[d];
 56891              }
 56892              [r.$dump]() {
 56893                const e = Object.create(null);
 56894                this[r.$content] && (e.$content = this[r.$content]);
 56895                for (const t of Object.getOwnPropertyNames(this)) {
 56896                  const a = this[t];
 56897                  null !== a &&
 56898                    (a instanceof XFAObject
 56899                      ? (e[t] = a[r.$dump]())
 56900                      : a instanceof XFAObjectArray
 56901                        ? a.isEmpty() || (e[t] = a.dump())
 56902                        : (e[t] = a));
 56903                }
 56904                return e;
 56905              }
 56906              [r.$toStyle]() {
 56907                return null;
 56908              }
 56909              [r.$toHTML]() {
 56910                return n.HTMLResult.EMPTY;
 56911              }
 56912              *[r.$getContainedChildren]() {
 56913                for (const e of this[r.$getChildren]()) yield e;
 56914              }
 56915              *[m](e, t) {
 56916                for (const a of this[r.$getContainedChildren]())
 56917                  if (!e || t === e.has(a[r.$nodeName])) {
 56918                    const e = this[r.$getAvailableSpace](),
 56919                      t = a[r.$toHTML](e);
 56920                    t.success || (this[r.$extra].failingNode = a);
 56921                    yield t;
 56922                  }
 56923              }
 56924              [r.$flushHTML]() {
 56925                return null;
 56926              }
 56927              [r.$addHTML](e, t) {
 56928                this[r.$extra].children.push(e);
 56929              }
 56930              [r.$getAvailableSpace]() {}
 56931              [r.$childrenToHTML]({ filter: e = null, include: t = !0 }) {
 56932                if (this[r.$extra].generator) {
 56933                  const e = this[r.$getAvailableSpace](),
 56934                    t = this[r.$extra].failingNode[r.$toHTML](e);
 56935                  if (!t.success) return t;
 56936                  t.html && this[r.$addHTML](t.html, t.bbox);
 56937                  delete this[r.$extra].failingNode;
 56938                } else this[r.$extra].generator = this[m](e, t);
 56939                for (;;) {
 56940                  const e = this[r.$extra].generator.next();
 56941                  if (e.done) break;
 56942                  const t = e.value;
 56943                  if (!t.success) return t;
 56944                  t.html && this[r.$addHTML](t.html, t.bbox);
 56945                }
 56946                this[r.$extra].generator = null;
 56947                return n.HTMLResult.EMPTY;
 56948              }
 56949              [r.$setSetAttributes](e) {
 56950                this[v] = new Set(Object.keys(e));
 56951              }
 56952              [y](e) {
 56953                const t = this[u],
 56954                  a = this[v];
 56955                return [...e].filter((e) => t.has(e) && !a.has(e));
 56956              }
 56957              [r.$resolvePrototypes](e, t = new Set()) {
 56958                for (const a of this[d]) a[k](e, t);
 56959              }
 56960              [k](e, t) {
 56961                const a = this[b](e, t);
 56962                a ? this[l](a, e, t) : this[r.$resolvePrototypes](e, t);
 56963              }
 56964              [b](e, t) {
 56965                const { use: a, usehref: n } = this;
 56966                if (!a && !n) return null;
 56967                let s = null,
 56968                  o = null,
 56969                  h = null,
 56970                  u = a;
 56971                if (n) {
 56972                  u = n;
 56973                  n.startsWith("#som(") && n.endsWith(")")
 56974                    ? (o = n.slice(5, -1))
 56975                    : n.startsWith(".#som(") && n.endsWith(")")
 56976                      ? (o = n.slice(6, -1))
 56977                      : n.startsWith("#")
 56978                        ? (h = n.slice(1))
 56979                        : n.startsWith(".#") && (h = n.slice(2));
 56980                } else a.startsWith("#") ? (h = a.slice(1)) : (o = a);
 56981                this.use = this.usehref = "";
 56982                if (h) s = e.get(h);
 56983                else {
 56984                  s = (0, c.searchNode)(e.get(r.$root), this, o, !0, !1);
 56985                  s && (s = s[0]);
 56986                }
 56987                if (!s) {
 56988                  (0, i.warn)(`XFA - Invalid prototype reference: ${u}.`);
 56989                  return null;
 56990                }
 56991                if (s[r.$nodeName] !== this[r.$nodeName]) {
 56992                  (0, i.warn)(
 56993                    `XFA - Incompatible prototype: ${s[r.$nodeName]} !== ${
 56994                      this[r.$nodeName]
 56995                    }.`,
 56996                  );
 56997                  return null;
 56998                }
 56999                if (t.has(s)) {
 57000                  (0, i.warn)("XFA - Cycle detected in prototypes use.");
 57001                  return null;
 57002                }
 57003                t.add(s);
 57004                const d = s[b](e, t);
 57005                d && s[l](d, e, t);
 57006                s[r.$resolvePrototypes](e, t);
 57007                t.delete(s);
 57008                return s;
 57009              }
 57010              [l](e, t, a) {
 57011                if (a.has(e)) {
 57012                  (0, i.warn)("XFA - Cycle detected in prototypes use.");
 57013                  return;
 57014                }
 57015                !this[r.$content] &&
 57016                  e[r.$content] &&
 57017                  (this[r.$content] = e[r.$content]);
 57018                new Set(a).add(e);
 57019                for (const t of this[y](e[v])) {
 57020                  this[t] = e[t];
 57021                  this[v] && this[v].add(t);
 57022                }
 57023                for (const n of Object.getOwnPropertyNames(this)) {
 57024                  if (this[u].has(n)) continue;
 57025                  const i = this[n],
 57026                    s = e[n];
 57027                  if (i instanceof XFAObjectArray) {
 57028                    for (const e of i[d]) e[k](t, a);
 57029                    for (let n = i[d].length, o = s[d].length; n < o; n++) {
 57030                      const s = e[d][n][r.$clone]();
 57031                      if (!i.push(s)) break;
 57032                      s[C] = this;
 57033                      this[d].push(s);
 57034                      s[k](t, a);
 57035                    }
 57036                  } else if (null === i) {
 57037                    if (null !== s) {
 57038                      const e = s[r.$clone]();
 57039                      e[C] = this;
 57040                      this[n] = e;
 57041                      this[d].push(e);
 57042                      e[k](t, a);
 57043                    }
 57044                  } else {
 57045                    i[r.$resolvePrototypes](t, a);
 57046                    s && i[l](s, t, a);
 57047                  }
 57048                }
 57049              }
 57050              static [f](e) {
 57051                return Array.isArray(e)
 57052                  ? e.map((e) => XFAObject[f](e))
 57053                  : "object" == typeof e && null !== e
 57054                    ? Object.assign({}, e)
 57055                    : e;
 57056              }
 57057              [r.$clone]() {
 57058                const e = Object.create(Object.getPrototypeOf(this));
 57059                for (const t of Object.getOwnPropertySymbols(this))
 57060                  try {
 57061                    e[t] = this[t];
 57062                  } catch {
 57063                    (0, i.shadow)(e, t, this[t]);
 57064                  }
 57065                e[r.$uid] = `${e[r.$nodeName]}${O++}`;
 57066                e[d] = [];
 57067                for (const t of Object.getOwnPropertyNames(this)) {
 57068                  if (this[u].has(t)) {
 57069                    e[t] = XFAObject[f](this[t]);
 57070                    continue;
 57071                  }
 57072                  const a = this[t];
 57073                  e[t] =
 57074                    a instanceof XFAObjectArray ? new XFAObjectArray(a[S]) : null;
 57075                }
 57076                for (const t of this[d]) {
 57077                  const a = t[r.$nodeName],
 57078                    n = t[r.$clone]();
 57079                  e[d].push(n);
 57080                  n[C] = e;
 57081                  null === e[a] ? (e[a] = n) : e[a][d].push(n);
 57082                }
 57083                return e;
 57084              }
 57085              [r.$getChildren](e = null) {
 57086                return e ? this[d].filter((t) => t[r.$nodeName] === e) : this[d];
 57087              }
 57088              [r.$getChildrenByClass](e) {
 57089                return this[e];
 57090              }
 57091              [r.$getChildrenByName](e, t, a = !0) {
 57092                return Array.from(this[r.$getChildrenByNameIt](e, t, a));
 57093              }
 57094              *[r.$getChildrenByNameIt](e, t, a = !0) {
 57095                if ("parent" !== e) {
 57096                  for (const a of this[d]) {
 57097                    a[r.$nodeName] === e && (yield a);
 57098                    a.name === e && (yield a);
 57099                    (t || a[r.$isTransparent]()) &&
 57100                      (yield* a[r.$getChildrenByNameIt](e, t, !1));
 57101                  }
 57102                  a &&
 57103                    this[u].has(e) &&
 57104                    (yield new XFAAttribute(this, e, this[e]));
 57105                } else yield this[C];
 57106              }
 57107            }
 57108            t.XFAObject = XFAObject;
 57109            class XFAObjectArray {
 57110              constructor(e = 1 / 0) {
 57111                this[S] = e;
 57112                this[d] = [];
 57113              }
 57114              get isXFAObject() {
 57115                return !1;
 57116              }
 57117              get isXFAObjectArray() {
 57118                return !0;
 57119              }
 57120              push(e) {
 57121                if (this[d].length <= this[S]) {
 57122                  this[d].push(e);
 57123                  return !0;
 57124                }
 57125                (0, i.warn)(
 57126                  `XFA - node "${e[r.$nodeName]}" accepts no more than ${
 57127                    this[S]
 57128                  } children`,
 57129                );
 57130                return !1;
 57131              }
 57132              isEmpty() {
 57133                return 0 === this[d].length;
 57134              }
 57135              dump() {
 57136                return 1 === this[d].length
 57137                  ? this[d][0][r.$dump]()
 57138                  : this[d].map((e) => e[r.$dump]());
 57139              }
 57140              [r.$clone]() {
 57141                const e = new XFAObjectArray(this[S]);
 57142                e[d] = this[d].map((e) => e[r.$clone]());
 57143                return e;
 57144              }
 57145              get children() {
 57146                return this[d];
 57147              }
 57148              clear() {
 57149                this[d].length = 0;
 57150              }
 57151            }
 57152            t.XFAObjectArray = XFAObjectArray;
 57153            class XFAAttribute {
 57154              constructor(e, t, a) {
 57155                this[C] = e;
 57156                this[r.$nodeName] = t;
 57157                this[r.$content] = a;
 57158                this[r.$consumed] = !1;
 57159                this[r.$uid] = "attribute" + O++;
 57160              }
 57161              [r.$getParent]() {
 57162                return this[C];
 57163              }
 57164              [r.$isDataValue]() {
 57165                return !0;
 57166              }
 57167              [r.$getDataValue]() {
 57168                return this[r.$content].trim();
 57169              }
 57170              [r.$setValue](e) {
 57171                e = e.value || "";
 57172                this[r.$content] = e.toString();
 57173              }
 57174              [r.$text]() {
 57175                return this[r.$content];
 57176              }
 57177              [r.$isDescendent](e) {
 57178                return this[C] === e || this[C][r.$isDescendent](e);
 57179              }
 57180            }
 57181            t.XFAAttribute = XFAAttribute;
 57182            class XmlObject extends XFAObject {
 57183              constructor(e, t, a = {}) {
 57184                super(e, t);
 57185                this[r.$content] = "";
 57186                this[g] = null;
 57187                if ("#text" !== t) {
 57188                  const e = new Map();
 57189                  this[h] = e;
 57190                  for (const [t, r] of Object.entries(a))
 57191                    e.set(t, new XFAAttribute(this, t, r));
 57192                  if (a.hasOwnProperty(r.$nsAttributes)) {
 57193                    const e = a[r.$nsAttributes].xfa.dataNode;
 57194                    void 0 !== e &&
 57195                      ("dataGroup" === e
 57196                        ? (this[g] = !1)
 57197                        : "dataValue" === e && (this[g] = !0));
 57198                  }
 57199                }
 57200                this[r.$consumed] = !1;
 57201              }
 57202              [r.$toString](e) {
 57203                const t = this[r.$nodeName];
 57204                if ("#text" === t) {
 57205                  e.push((0, s.encodeToXmlString)(this[r.$content]));
 57206                  return;
 57207                }
 57208                const a = (0, i.utf8StringToString)(t),
 57209                  n = this[r.$namespaceId] === T ? "xfa:" : "";
 57210                e.push(`<${n}${a}`);
 57211                for (const [t, a] of this[h].entries()) {
 57212                  const n = (0, i.utf8StringToString)(t);
 57213                  e.push(` ${n}="${(0, s.encodeToXmlString)(a[r.$content])}"`);
 57214                }
 57215                null !== this[g] &&
 57216                  (this[g]
 57217                    ? e.push(' xfa:dataNode="dataValue"')
 57218                    : e.push(' xfa:dataNode="dataGroup"'));
 57219                if (this[r.$content] || 0 !== this[d].length) {
 57220                  e.push(">");
 57221                  if (this[r.$content])
 57222                    "string" == typeof this[r.$content]
 57223                      ? e.push((0, s.encodeToXmlString)(this[r.$content]))
 57224                      : this[r.$content][r.$toString](e);
 57225                  else for (const t of this[d]) t[r.$toString](e);
 57226                  e.push(`</${n}${a}>`);
 57227                } else e.push("/>");
 57228              }
 57229              [r.$onChild](e) {
 57230                if (this[r.$content]) {
 57231                  const e = new XmlObject(this[r.$namespaceId], "#text");
 57232                  this[r.$appendChild](e);
 57233                  e[r.$content] = this[r.$content];
 57234                  this[r.$content] = "";
 57235                }
 57236                this[r.$appendChild](e);
 57237                return !0;
 57238              }
 57239              [r.$onText](e) {
 57240                this[r.$content] += e;
 57241              }
 57242              [r.$finalize]() {
 57243                if (this[r.$content] && this[d].length > 0) {
 57244                  const e = new XmlObject(this[r.$namespaceId], "#text");
 57245                  this[r.$appendChild](e);
 57246                  e[r.$content] = this[r.$content];
 57247                  delete this[r.$content];
 57248                }
 57249              }
 57250              [r.$toHTML]() {
 57251                return "#text" === this[r.$nodeName]
 57252                  ? n.HTMLResult.success({
 57253                      name: "#text",
 57254                      value: this[r.$content],
 57255                    })
 57256                  : n.HTMLResult.EMPTY;
 57257              }
 57258              [r.$getChildren](e = null) {
 57259                return e ? this[d].filter((t) => t[r.$nodeName] === e) : this[d];
 57260              }
 57261              [r.$getAttributes]() {
 57262                return this[h];
 57263              }
 57264              [r.$getChildrenByClass](e) {
 57265                const t = this[h].get(e);
 57266                return void 0 !== t ? t : this[r.$getChildren](e);
 57267              }
 57268              *[r.$getChildrenByNameIt](e, t) {
 57269                const a = this[h].get(e);
 57270                a && (yield a);
 57271                for (const a of this[d]) {
 57272                  a[r.$nodeName] === e && (yield a);
 57273                  t && (yield* a[r.$getChildrenByNameIt](e, t));
 57274                }
 57275              }
 57276              *[r.$getAttributeIt](e, t) {
 57277                const a = this[h].get(e);
 57278                !a || (t && a[r.$consumed]) || (yield a);
 57279                for (const a of this[d]) yield* a[r.$getAttributeIt](e, t);
 57280              }
 57281              *[r.$getRealChildrenByNameIt](e, t, a) {
 57282                for (const n of this[d]) {
 57283                  n[r.$nodeName] !== e || (a && n[r.$consumed]) || (yield n);
 57284                  t && (yield* n[r.$getRealChildrenByNameIt](e, t, a));
 57285                }
 57286              }
 57287              [r.$isDataValue]() {
 57288                return null === this[g]
 57289                  ? 0 === this[d].length ||
 57290                      this[d][0][r.$namespaceId] === o.NamespaceIds.xhtml.id
 57291                  : this[g];
 57292              }
 57293              [r.$getDataValue]() {
 57294                return null === this[g]
 57295                  ? 0 === this[d].length
 57296                    ? this[r.$content].trim()
 57297                    : this[d][0][r.$namespaceId] === o.NamespaceIds.xhtml.id
 57298                      ? this[d][0][r.$text]().trim()
 57299                      : null
 57300                  : this[r.$content].trim();
 57301              }
 57302              [r.$setValue](e) {
 57303                e = e.value || "";
 57304                this[r.$content] = e.toString();
 57305              }
 57306              [r.$dump](e = !1) {
 57307                const t = Object.create(null);
 57308                e && (t.$ns = this[r.$namespaceId]);
 57309                this[r.$content] && (t.$content = this[r.$content]);
 57310                t.$name = this[r.$nodeName];
 57311                t.children = [];
 57312                for (const a of this[d]) t.children.push(a[r.$dump](e));
 57313                t.attributes = Object.create(null);
 57314                for (const [e, a] of this[h]) t.attributes[e] = a[r.$content];
 57315                return t;
 57316              }
 57317            }
 57318            t.XmlObject = XmlObject;
 57319            class ContentObject extends XFAObject {
 57320              constructor(e, t) {
 57321                super(e, t);
 57322                this[r.$content] = "";
 57323              }
 57324              [r.$onText](e) {
 57325                this[r.$content] += e;
 57326              }
 57327              [r.$finalize]() {}
 57328            }
 57329            t.ContentObject = ContentObject;
 57330            class OptionObject extends ContentObject {
 57331              constructor(e, t, a) {
 57332                super(e, t);
 57333                this[x] = a;
 57334              }
 57335              [r.$finalize]() {
 57336                this[r.$content] = (0, n.getKeyword)({
 57337                  data: this[r.$content],
 57338                  defaultValue: this[x][0],
 57339                  validate: (e) => this[x].includes(e),
 57340                });
 57341              }
 57342              [r.$clean](e) {
 57343                super[r.$clean](e);
 57344                delete this[x];
 57345              }
 57346            }
 57347            t.OptionObject = OptionObject;
 57348            class StringObject extends ContentObject {
 57349              [r.$finalize]() {
 57350                this[r.$content] = this[r.$content].trim();
 57351              }
 57352            }
 57353            t.StringObject = StringObject;
 57354            class IntegerObject extends ContentObject {
 57355              constructor(e, t, a, r) {
 57356                super(e, t);
 57357                this[p] = a;
 57358                this[F] = r;
 57359              }
 57360              [r.$finalize]() {
 57361                this[r.$content] = (0, n.getInteger)({
 57362                  data: this[r.$content],
 57363                  defaultValue: this[p],
 57364                  validate: this[F],
 57365                });
 57366              }
 57367              [r.$clean](e) {
 57368                super[r.$clean](e);
 57369                delete this[p];
 57370                delete this[F];
 57371              }
 57372            }
 57373            t.IntegerObject = IntegerObject;
 57374            t.Option01 = class Option01 extends IntegerObject {
 57375              constructor(e, t) {
 57376                super(e, t, 0, (e) => 1 === e);
 57377              }
 57378            };
 57379            t.Option10 = class Option10 extends IntegerObject {
 57380              constructor(e, t) {
 57381                super(e, t, 1, (e) => 0 === e);
 57382              }
 57383            };
 57384          },
 57385          (e, t, a) => {
 57386            Object.defineProperty(t, "__esModule", { value: !0 });
 57387            t.createDataNode = function createDataNode(e, t, a) {
 57388              const i = parseExpression(a);
 57389              if (!i) return null;
 57390              if (i.some((e) => e.operator === o.dotDot)) return null;
 57391              const s = c.get(i[0].name);
 57392              let l = 0;
 57393              if (s) {
 57394                e = s(e, t);
 57395                l = 1;
 57396              } else e = t || e;
 57397              for (let t = i.length; l < t; l++) {
 57398                const { name: t, operator: a, index: s } = i[l];
 57399                if (!isFinite(s)) {
 57400                  i[l].index = 0;
 57401                  return e.createNodes(i.slice(l));
 57402                }
 57403                let c;
 57404                switch (a) {
 57405                  case o.dot:
 57406                    c = e[r.$getChildrenByName](t, !1);
 57407                    break;
 57408                  case o.dotDot:
 57409                    c = e[r.$getChildrenByName](t, !0);
 57410                    break;
 57411                  case o.dotHash:
 57412                    c = e[r.$getChildrenByClass](t);
 57413                    c = c.isXFAObjectArray ? c.children : [c];
 57414                }
 57415                if (0 === c.length) return e.createNodes(i.slice(l));
 57416                if (!(s < c.length)) {
 57417                  i[l].index = s - c.length;
 57418                  return e.createNodes(i.slice(l));
 57419                }
 57420                {
 57421                  const t = c[s];
 57422                  if (!t.isXFAObject) {
 57423                    (0, n.warn)("XFA - Cannot create a node.");
 57424                    return null;
 57425                  }
 57426                  e = t;
 57427                }
 57428              }
 57429              return null;
 57430            };
 57431            t.searchNode = function searchNode(e, t, a, n = !0, i = !0) {
 57432              const s = parseExpression(a, n);
 57433              if (!s) return null;
 57434              const h = c.get(s[0].name);
 57435              let u,
 57436                d = 0;
 57437              if (h) {
 57438                u = !0;
 57439                e = [h(e, t)];
 57440                d = 1;
 57441              } else {
 57442                u = null === t;
 57443                e = [t || e];
 57444              }
 57445              for (let a = s.length; d < a; d++) {
 57446                const { name: a, cacheName: n, operator: c, index: h } = s[d],
 57447                  f = [];
 57448                for (const t of e) {
 57449                  if (!t.isXFAObject) continue;
 57450                  let e, s;
 57451                  if (i) {
 57452                    s = l.get(t);
 57453                    if (!s) {
 57454                      s = new Map();
 57455                      l.set(t, s);
 57456                    }
 57457                    e = s.get(n);
 57458                  }
 57459                  if (!e) {
 57460                    switch (c) {
 57461                      case o.dot:
 57462                        e = t[r.$getChildrenByName](a, !1);
 57463                        break;
 57464                      case o.dotDot:
 57465                        e = t[r.$getChildrenByName](a, !0);
 57466                        break;
 57467                      case o.dotHash:
 57468                        e = t[r.$getChildrenByClass](a);
 57469                        e = e.isXFAObjectArray ? e.children : [e];
 57470                    }
 57471                    i && s.set(n, e);
 57472                  }
 57473                  e.length > 0 && f.push(e);
 57474                }
 57475                if (0 !== f.length || u || 0 !== d)
 57476                  e = isFinite(h)
 57477                    ? f.filter((e) => h < e.length).map((e) => e[h])
 57478                    : f.flat();
 57479                else {
 57480                  const a = t[r.$getParent]();
 57481                  if (!(t = a)) return null;
 57482                  d = -1;
 57483                  e = [t];
 57484                }
 57485              }
 57486              if (0 === e.length) return null;
 57487              return e;
 57488            };
 57489            var r = a(78),
 57490              n = a(2);
 57491            const i = /^[^.[]+/,
 57492              s = /^[^\]]+/,
 57493              o = { dot: 0, dotDot: 1, dotHash: 2, dotBracket: 3, dotParen: 4 },
 57494              c = new Map([
 57495                ["$data", (e, t) => (e.datasets ? e.datasets.data : e)],
 57496                [
 57497                  "$record",
 57498                  (e, t) =>
 57499                    (e.datasets ? e.datasets.data : e)[r.$getChildren]()[0],
 57500                ],
 57501                ["$template", (e, t) => e.template],
 57502                ["$connectionSet", (e, t) => e.connectionSet],
 57503                ["$form", (e, t) => e.form],
 57504                ["$layout", (e, t) => e.layout],
 57505                ["$host", (e, t) => e.host],
 57506                ["$dataWindow", (e, t) => e.dataWindow],
 57507                ["$event", (e, t) => e.event],
 57508                ["!", (e, t) => e.datasets],
 57509                ["$xfa", (e, t) => e],
 57510                ["xfa", (e, t) => e],
 57511                ["$", (e, t) => t],
 57512              ]),
 57513              l = new WeakMap();
 57514            function parseExpression(e, t, a = !0) {
 57515              let r = e.match(i);
 57516              if (!r) return null;
 57517              let [c] = r;
 57518              const l = [
 57519                {
 57520                  name: c,
 57521                  cacheName: "." + c,
 57522                  index: 0,
 57523                  js: null,
 57524                  formCalc: null,
 57525                  operator: o.dot,
 57526                },
 57527              ];
 57528              let h = c.length;
 57529              for (; h < e.length; ) {
 57530                const d = h;
 57531                if ("[" === e.charAt(h++)) {
 57532                  r = e.slice(h).match(s);
 57533                  if (!r) {
 57534                    (0, n.warn)("XFA - Invalid index in SOM expression");
 57535                    return null;
 57536                  }
 57537                  l.at(-1).index =
 57538                    "*" === (u = (u = r[0]).trim())
 57539                      ? 1 / 0
 57540                      : parseInt(u, 10) || 0;
 57541                  h += r[0].length + 1;
 57542                  continue;
 57543                }
 57544                let f;
 57545                switch (e.charAt(h)) {
 57546                  case ".":
 57547                    if (!t) return null;
 57548                    h++;
 57549                    f = o.dotDot;
 57550                    break;
 57551                  case "#":
 57552                    h++;
 57553                    f = o.dotHash;
 57554                    break;
 57555                  case "[":
 57556                    if (a) {
 57557                      (0, n.warn)(
 57558                        "XFA - SOM expression contains a FormCalc subexpression which is not supported for now.",
 57559                      );
 57560                      return null;
 57561                    }
 57562                    f = o.dotBracket;
 57563                    break;
 57564                  case "(":
 57565                    if (a) {
 57566                      (0, n.warn)(
 57567                        "XFA - SOM expression contains a JavaScript subexpression which is not supported for now.",
 57568                      );
 57569                      return null;
 57570                    }
 57571                    f = o.dotParen;
 57572                    break;
 57573                  default:
 57574                    f = o.dot;
 57575                }
 57576                r = e.slice(h).match(i);
 57577                if (!r) break;
 57578                [c] = r;
 57579                h += c.length;
 57580                l.push({
 57581                  name: c,
 57582                  cacheName: e.slice(d, h),
 57583                  operator: f,
 57584                  index: 0,
 57585                  js: null,
 57586                  formCalc: null,
 57587                });
 57588              }
 57589              var u;
 57590              return l;
 57591            }
 57592          },
 57593          (e, t, a) => {
 57594            Object.defineProperty(t, "__esModule", { value: !0 });
 57595            t.DataHandler = void 0;
 57596            var r = a(78);
 57597            t.DataHandler = class DataHandler {
 57598              constructor(e, t) {
 57599                this.data = t;
 57600                this.dataset = e.datasets || null;
 57601              }
 57602              serialize(e) {
 57603                const t = [[-1, this.data[r.$getChildren]()]];
 57604                for (; t.length > 0; ) {
 57605                  const a = t.at(-1),
 57606                    [n, i] = a;
 57607                  if (n + 1 === i.length) {
 57608                    t.pop();
 57609                    continue;
 57610                  }
 57611                  const s = i[++a[0]],
 57612                    o = e.get(s[r.$uid]);
 57613                  if (o) s[r.$setValue](o);
 57614                  else {
 57615                    const t = s[r.$getAttributes]();
 57616                    for (const a of t.values()) {
 57617                      const t = e.get(a[r.$uid]);
 57618                      if (t) {
 57619                        a[r.$setValue](t);
 57620                        break;
 57621                      }
 57622                    }
 57623                  }
 57624                  const c = s[r.$getChildren]();
 57625                  c.length > 0 && t.push([-1, c]);
 57626                }
 57627                const a = [
 57628                  '<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">',
 57629                ];
 57630                if (this.dataset)
 57631                  for (const e of this.dataset[r.$getChildren]())
 57632                    "data" !== e[r.$nodeName] && e[r.$toString](a);
 57633                this.data[r.$toString](a);
 57634                a.push("</xfa:datasets>");
 57635                return a.join("");
 57636              }
 57637            };
 57638          },
 57639          (e, t, a) => {
 57640            Object.defineProperty(t, "__esModule", { value: !0 });
 57641            t.XFAParser = void 0;
 57642            var r = a(78),
 57643              n = a(71),
 57644              i = a(91),
 57645              s = a(2);
 57646            class XFAParser extends n.XMLParserBase {
 57647              constructor(e = null, t = !1) {
 57648                super();
 57649                this._builder = new i.Builder(e);
 57650                this._stack = [];
 57651                this._globalData = { usedTypefaces: new Set() };
 57652                this._ids = new Map();
 57653                this._current = this._builder.buildRoot(this._ids);
 57654                this._errorCode = n.XMLParserErrorCode.NoError;
 57655                this._whiteRegex = /^\s+$/;
 57656                this._nbsps = /\xa0+/g;
 57657                this._richText = t;
 57658              }
 57659              parse(e) {
 57660                this.parseXml(e);
 57661                if (this._errorCode === n.XMLParserErrorCode.NoError) {
 57662                  this._current[r.$finalize]();
 57663                  return this._current.element;
 57664                }
 57665              }
 57666              onText(e) {
 57667                e = e.replace(this._nbsps, (e) => e.slice(1) + " ");
 57668                this._richText || this._current[r.$acceptWhitespace]()
 57669                  ? this._current[r.$onText](e, this._richText)
 57670                  : this._whiteRegex.test(e) ||
 57671                    this._current[r.$onText](e.trim());
 57672              }
 57673              onCdata(e) {
 57674                this._current[r.$onText](e);
 57675              }
 57676              _mkAttributes(e, t) {
 57677                let a = null,
 57678                  n = null;
 57679                const i = Object.create({});
 57680                for (const { name: o, value: c } of e)
 57681                  if ("xmlns" === o)
 57682                    a
 57683                      ? (0, s.warn)(
 57684                          `XFA - multiple namespace definition in <${t}>`,
 57685                        )
 57686                      : (a = c);
 57687                  else if (o.startsWith("xmlns:")) {
 57688                    const e = o.substring(6);
 57689                    n || (n = []);
 57690                    n.push({ prefix: e, value: c });
 57691                  } else {
 57692                    const e = o.indexOf(":");
 57693                    if (-1 === e) i[o] = c;
 57694                    else {
 57695                      let t = i[r.$nsAttributes];
 57696                      t || (t = i[r.$nsAttributes] = Object.create(null));
 57697                      const [a, n] = [o.slice(0, e), o.slice(e + 1)];
 57698                      (t[a] ||= Object.create(null))[n] = c;
 57699                    }
 57700                  }
 57701                return [a, n, i];
 57702              }
 57703              _getNameAndPrefix(e, t) {
 57704                const a = e.indexOf(":");
 57705                return -1 === a
 57706                  ? [e, null]
 57707                  : [e.substring(a + 1), t ? "" : e.substring(0, a)];
 57708              }
 57709              onBeginElement(e, t, a) {
 57710                const [n, i, s] = this._mkAttributes(t, e),
 57711                  [o, c] = this._getNameAndPrefix(
 57712                    e,
 57713                    this._builder.isNsAgnostic(),
 57714                  ),
 57715                  l = this._builder.build({
 57716                    nsPrefix: c,
 57717                    name: o,
 57718                    attributes: s,
 57719                    namespace: n,
 57720                    prefixes: i,
 57721                  });
 57722                l[r.$globalData] = this._globalData;
 57723                if (a) {
 57724                  l[r.$finalize]();
 57725                  this._current[r.$onChild](l) && l[r.$setId](this._ids);
 57726                  l[r.$clean](this._builder);
 57727                } else {
 57728                  this._stack.push(this._current);
 57729                  this._current = l;
 57730                }
 57731              }
 57732              onEndElement(e) {
 57733                const t = this._current;
 57734                if (t[r.$isCDATAXml]() && "string" == typeof t[r.$content]) {
 57735                  const e = new XFAParser();
 57736                  e._globalData = this._globalData;
 57737                  const a = e.parse(t[r.$content]);
 57738                  t[r.$content] = null;
 57739                  t[r.$onChild](a);
 57740                }
 57741                t[r.$finalize]();
 57742                this._current = this._stack.pop();
 57743                this._current[r.$onChild](t) && t[r.$setId](this._ids);
 57744                t[r.$clean](this._builder);
 57745              }
 57746              onError(e) {
 57747                this._errorCode = e;
 57748              }
 57749            }
 57750            t.XFAParser = XFAParser;
 57751          },
 57752          (e, t, a) => {
 57753            Object.defineProperty(t, "__esModule", { value: !0 });
 57754            t.Builder = void 0;
 57755            var r = a(81),
 57756              n = a(78),
 57757              i = a(92),
 57758              s = a(80),
 57759              o = a(101),
 57760              c = a(2),
 57761              l = a(87);
 57762            class Root extends l.XFAObject {
 57763              constructor(e) {
 57764                super(-1, "root", Object.create(null));
 57765                this.element = null;
 57766                this[n.$ids] = e;
 57767              }
 57768              [n.$onChild](e) {
 57769                this.element = e;
 57770                return !0;
 57771              }
 57772              [n.$finalize]() {
 57773                super[n.$finalize]();
 57774                if (this.element.template instanceof s.Template) {
 57775                  this[n.$ids].set(n.$root, this.element);
 57776                  this.element.template[n.$resolvePrototypes](this[n.$ids]);
 57777                  this.element.template[n.$ids] = this[n.$ids];
 57778                }
 57779              }
 57780            }
 57781            class Empty extends l.XFAObject {
 57782              constructor() {
 57783                super(-1, "", Object.create(null));
 57784              }
 57785              [n.$onChild](e) {
 57786                return !1;
 57787              }
 57788            }
 57789            t.Builder = class Builder {
 57790              constructor(e = null) {
 57791                this._namespaceStack = [];
 57792                this._nsAgnosticLevel = 0;
 57793                this._namespacePrefixes = new Map();
 57794                this._namespaces = new Map();
 57795                this._nextNsId = Math.max(
 57796                  ...Object.values(r.NamespaceIds).map(({ id: e }) => e),
 57797                );
 57798                this._currentNamespace =
 57799                  e || new o.UnknownNamespace(++this._nextNsId);
 57800              }
 57801              buildRoot(e) {
 57802                return new Root(e);
 57803              }
 57804              build({
 57805                nsPrefix: e,
 57806                name: t,
 57807                attributes: a,
 57808                namespace: s,
 57809                prefixes: o,
 57810              }) {
 57811                const c = null !== s;
 57812                if (c) {
 57813                  this._namespaceStack.push(this._currentNamespace);
 57814                  this._currentNamespace = this._searchNamespace(s);
 57815                }
 57816                o && this._addNamespacePrefix(o);
 57817                if (a.hasOwnProperty(n.$nsAttributes)) {
 57818                  const e = i.NamespaceSetUp.datasets,
 57819                    t = a[n.$nsAttributes];
 57820                  let r = null;
 57821                  for (const [a, n] of Object.entries(t)) {
 57822                    if (this._getNamespaceToUse(a) === e) {
 57823                      r = { xfa: n };
 57824                      break;
 57825                    }
 57826                  }
 57827                  r ? (a[n.$nsAttributes] = r) : delete a[n.$nsAttributes];
 57828                }
 57829                const l = this._getNamespaceToUse(e),
 57830                  h = l?.[r.$buildXFAObject](t, a) || new Empty();
 57831                h[n.$isNsAgnostic]() && this._nsAgnosticLevel++;
 57832                (c || o || h[n.$isNsAgnostic]()) &&
 57833                  (h[n.$cleanup] = {
 57834                    hasNamespace: c,
 57835                    prefixes: o,
 57836                    nsAgnostic: h[n.$isNsAgnostic](),
 57837                  });
 57838                return h;
 57839              }
 57840              isNsAgnostic() {
 57841                return this._nsAgnosticLevel > 0;
 57842              }
 57843              _searchNamespace(e) {
 57844                let t = this._namespaces.get(e);
 57845                if (t) return t;
 57846                for (const [a, { check: n }] of Object.entries(r.NamespaceIds))
 57847                  if (n(e)) {
 57848                    t = i.NamespaceSetUp[a];
 57849                    if (t) {
 57850                      this._namespaces.set(e, t);
 57851                      return t;
 57852                    }
 57853                    break;
 57854                  }
 57855                t = new o.UnknownNamespace(++this._nextNsId);
 57856                this._namespaces.set(e, t);
 57857                return t;
 57858              }
 57859              _addNamespacePrefix(e) {
 57860                for (const { prefix: t, value: a } of e) {
 57861                  const e = this._searchNamespace(a);
 57862                  let r = this._namespacePrefixes.get(t);
 57863                  if (!r) {
 57864                    r = [];
 57865                    this._namespacePrefixes.set(t, r);
 57866                  }
 57867                  r.push(e);
 57868                }
 57869              }
 57870              _getNamespaceToUse(e) {
 57871                if (!e) return this._currentNamespace;
 57872                const t = this._namespacePrefixes.get(e);
 57873                if (t?.length > 0) return t.at(-1);
 57874                (0, c.warn)(`Unknown namespace prefix: ${e}.`);
 57875                return null;
 57876              }
 57877              clean(e) {
 57878                const { hasNamespace: t, prefixes: a, nsAgnostic: r } = e;
 57879                t && (this._currentNamespace = this._namespaceStack.pop());
 57880                a &&
 57881                  a.forEach(({ prefix: e }) => {
 57882                    this._namespacePrefixes.get(e).pop();
 57883                  });
 57884                r && this._nsAgnosticLevel--;
 57885              }
 57886            };
 57887          },
 57888          (e, t, a) => {
 57889            Object.defineProperty(t, "__esModule", { value: !0 });
 57890            t.NamespaceSetUp = void 0;
 57891            var r = a(93),
 57892              n = a(94),
 57893              i = a(95),
 57894              s = a(96),
 57895              o = a(97),
 57896              c = a(98),
 57897              l = a(80),
 57898              h = a(99),
 57899              u = a(100);
 57900            const d = {
 57901              config: r.ConfigNamespace,
 57902              connection: n.ConnectionSetNamespace,
 57903              datasets: i.DatasetsNamespace,
 57904              localeSet: s.LocaleSetNamespace,
 57905              signature: o.SignatureNamespace,
 57906              stylesheet: c.StylesheetNamespace,
 57907              template: l.TemplateNamespace,
 57908              xdp: h.XdpNamespace,
 57909              xhtml: u.XhtmlNamespace,
 57910            };
 57911            t.NamespaceSetUp = d;
 57912          },
 57913          (e, t, a) => {
 57914            Object.defineProperty(t, "__esModule", { value: !0 });
 57915            t.ConfigNamespace = void 0;
 57916            var r = a(81),
 57917              n = a(78),
 57918              i = a(87),
 57919              s = a(84),
 57920              o = a(2);
 57921            const c = r.NamespaceIds.config.id;
 57922            class Acrobat extends i.XFAObject {
 57923              constructor(e) {
 57924                super(c, "acrobat", !0);
 57925                this.acrobat7 = null;
 57926                this.autoSave = null;
 57927                this.common = null;
 57928                this.validate = null;
 57929                this.validateApprovalSignatures = null;
 57930                this.submitUrl = new i.XFAObjectArray();
 57931              }
 57932            }
 57933            class Acrobat7 extends i.XFAObject {
 57934              constructor(e) {
 57935                super(c, "acrobat7", !0);
 57936                this.dynamicRender = null;
 57937              }
 57938            }
 57939            class ADBE_JSConsole extends i.OptionObject {
 57940              constructor(e) {
 57941                super(c, "ADBE_JSConsole", ["delegate", "Enable", "Disable"]);
 57942              }
 57943            }
 57944            class ADBE_JSDebugger extends i.OptionObject {
 57945              constructor(e) {
 57946                super(c, "ADBE_JSDebugger", ["delegate", "Enable", "Disable"]);
 57947              }
 57948            }
 57949            class AddSilentPrint extends i.Option01 {
 57950              constructor(e) {
 57951                super(c, "addSilentPrint");
 57952              }
 57953            }
 57954            class AddViewerPreferences extends i.Option01 {
 57955              constructor(e) {
 57956                super(c, "addViewerPreferences");
 57957              }
 57958            }
 57959            class AdjustData extends i.Option10 {
 57960              constructor(e) {
 57961                super(c, "adjustData");
 57962              }
 57963            }
 57964            class AdobeExtensionLevel extends i.IntegerObject {
 57965              constructor(e) {
 57966                super(c, "adobeExtensionLevel", 0, (e) => e >= 1 && e <= 8);
 57967              }
 57968            }
 57969            class Agent extends i.XFAObject {
 57970              constructor(e) {
 57971                super(c, "agent", !0);
 57972                this.name = e.name ? e.name.trim() : "";
 57973                this.common = new i.XFAObjectArray();
 57974              }
 57975            }
 57976            class AlwaysEmbed extends i.ContentObject {
 57977              constructor(e) {
 57978                super(c, "alwaysEmbed");
 57979              }
 57980            }
 57981            class Amd extends i.StringObject {
 57982              constructor(e) {
 57983                super(c, "amd");
 57984              }
 57985            }
 57986            class Area extends i.XFAObject {
 57987              constructor(e) {
 57988                super(c, "area");
 57989                this.level = (0, s.getInteger)({
 57990                  data: e.level,
 57991                  defaultValue: 0,
 57992                  validate: (e) => e >= 1 && e <= 3,
 57993                });
 57994                this.name = (0, s.getStringOption)(e.name, [
 57995                  "",
 57996                  "barcode",
 57997                  "coreinit",
 57998                  "deviceDriver",
 57999                  "font",
 58000                  "general",
 58001                  "layout",
 58002                  "merge",
 58003                  "script",
 58004                  "signature",
 58005                  "sourceSet",
 58006                  "templateCache",
 58007                ]);
 58008              }
 58009            }
 58010            class Attributes extends i.OptionObject {
 58011              constructor(e) {
 58012                super(c, "attributes", ["preserve", "delegate", "ignore"]);
 58013              }
 58014            }
 58015            class AutoSave extends i.OptionObject {
 58016              constructor(e) {
 58017                super(c, "autoSave", ["disabled", "enabled"]);
 58018              }
 58019            }
 58020            class Base extends i.StringObject {
 58021              constructor(e) {
 58022                super(c, "base");
 58023              }
 58024            }
 58025            class BatchOutput extends i.XFAObject {
 58026              constructor(e) {
 58027                super(c, "batchOutput");
 58028                this.format = (0, s.getStringOption)(e.format, [
 58029                  "none",
 58030                  "concat",
 58031                  "zip",
 58032                  "zipCompress",
 58033                ]);
 58034              }
 58035            }
 58036            class BehaviorOverride extends i.ContentObject {
 58037              constructor(e) {
 58038                super(c, "behaviorOverride");
 58039              }
 58040              [n.$finalize]() {
 58041                this[n.$content] = new Map(
 58042                  this[n.$content]
 58043                    .trim()
 58044                    .split(/\s+/)
 58045                    .filter((e) => e.includes(":"))
 58046                    .map((e) => e.split(":", 2)),
 58047                );
 58048              }
 58049            }
 58050            class Cache extends i.XFAObject {
 58051              constructor(e) {
 58052                super(c, "cache", !0);
 58053                this.templateCache = null;
 58054              }
 58055            }
 58056            class Change extends i.Option01 {
 58057              constructor(e) {
 58058                super(c, "change");
 58059              }
 58060            }
 58061            class Common extends i.XFAObject {
 58062              constructor(e) {
 58063                super(c, "common", !0);
 58064                this.data = null;
 58065                this.locale = null;
 58066                this.localeSet = null;
 58067                this.messaging = null;
 58068                this.suppressBanner = null;
 58069                this.template = null;
 58070                this.validationMessaging = null;
 58071                this.versionControl = null;
 58072                this.log = new i.XFAObjectArray();
 58073              }
 58074            }
 58075            class Compress extends i.XFAObject {
 58076              constructor(e) {
 58077                super(c, "compress");
 58078                this.scope = (0, s.getStringOption)(e.scope, [
 58079                  "imageOnly",
 58080                  "document",
 58081                ]);
 58082              }
 58083            }
 58084            class CompressLogicalStructure extends i.Option01 {
 58085              constructor(e) {
 58086                super(c, "compressLogicalStructure");
 58087              }
 58088            }
 58089            class CompressObjectStream extends i.Option10 {
 58090              constructor(e) {
 58091                super(c, "compressObjectStream");
 58092              }
 58093            }
 58094            class Compression extends i.XFAObject {
 58095              constructor(e) {
 58096                super(c, "compression", !0);
 58097                this.compressLogicalStructure = null;
 58098                this.compressObjectStream = null;
 58099                this.level = null;
 58100                this.type = null;
 58101              }
 58102            }
 58103            class Config extends i.XFAObject {
 58104              constructor(e) {
 58105                super(c, "config", !0);
 58106                this.acrobat = null;
 58107                this.present = null;
 58108                this.trace = null;
 58109                this.agent = new i.XFAObjectArray();
 58110              }
 58111            }
 58112            class Conformance extends i.OptionObject {
 58113              constructor(e) {
 58114                super(c, "conformance", ["A", "B"]);
 58115              }
 58116            }
 58117            class ContentCopy extends i.Option01 {
 58118              constructor(e) {
 58119                super(c, "contentCopy");
 58120              }
 58121            }
 58122            class Copies extends i.IntegerObject {
 58123              constructor(e) {
 58124                super(c, "copies", 1, (e) => e >= 1);
 58125              }
 58126            }
 58127            class Creator extends i.StringObject {
 58128              constructor(e) {
 58129                super(c, "creator");
 58130              }
 58131            }
 58132            class CurrentPage extends i.IntegerObject {
 58133              constructor(e) {
 58134                super(c, "currentPage", 0, (e) => e >= 0);
 58135              }
 58136            }
 58137            class Data extends i.XFAObject {
 58138              constructor(e) {
 58139                super(c, "data", !0);
 58140                this.adjustData = null;
 58141                this.attributes = null;
 58142                this.incrementalLoad = null;
 58143                this.outputXSL = null;
 58144                this.range = null;
 58145                this.record = null;
 58146                this.startNode = null;
 58147                this.uri = null;
 58148                this.window = null;
 58149                this.xsl = null;
 58150                this.excludeNS = new i.XFAObjectArray();
 58151                this.transform = new i.XFAObjectArray();
 58152              }
 58153            }
 58154            class Debug extends i.XFAObject {
 58155              constructor(e) {
 58156                super(c, "debug", !0);
 58157                this.uri = null;
 58158              }
 58159            }
 58160            class DefaultTypeface extends i.ContentObject {
 58161              constructor(e) {
 58162                super(c, "defaultTypeface");
 58163                this.writingScript = (0, s.getStringOption)(e.writingScript, [
 58164                  "*",
 58165                  "Arabic",
 58166                  "Cyrillic",
 58167                  "EastEuropeanRoman",
 58168                  "Greek",
 58169                  "Hebrew",
 58170                  "Japanese",
 58171                  "Korean",
 58172                  "Roman",
 58173                  "SimplifiedChinese",
 58174                  "Thai",
 58175                  "TraditionalChinese",
 58176                  "Vietnamese",
 58177                ]);
 58178              }
 58179            }
 58180            class Destination extends i.OptionObject {
 58181              constructor(e) {
 58182                super(c, "destination", ["pdf", "pcl", "ps", "webClient", "zpl"]);
 58183              }
 58184            }
 58185            class DocumentAssembly extends i.Option01 {
 58186              constructor(e) {
 58187                super(c, "documentAssembly");
 58188              }
 58189            }
 58190            class Driver extends i.XFAObject {
 58191              constructor(e) {
 58192                super(c, "driver", !0);
 58193                this.name = e.name ? e.name.trim() : "";
 58194                this.fontInfo = null;
 58195                this.xdc = null;
 58196              }
 58197            }
 58198            class DuplexOption extends i.OptionObject {
 58199              constructor(e) {
 58200                super(c, "duplexOption", [
 58201                  "simplex",
 58202                  "duplexFlipLongEdge",
 58203                  "duplexFlipShortEdge",
 58204                ]);
 58205              }
 58206            }
 58207            class DynamicRender extends i.OptionObject {
 58208              constructor(e) {
 58209                super(c, "dynamicRender", ["forbidden", "required"]);
 58210              }
 58211            }
 58212            class Embed extends i.Option01 {
 58213              constructor(e) {
 58214                super(c, "embed");
 58215              }
 58216            }
 58217            class Encrypt extends i.Option01 {
 58218              constructor(e) {
 58219                super(c, "encrypt");
 58220              }
 58221            }
 58222            class Encryption extends i.XFAObject {
 58223              constructor(e) {
 58224                super(c, "encryption", !0);
 58225                this.encrypt = null;
 58226                this.encryptionLevel = null;
 58227                this.permissions = null;
 58228              }
 58229            }
 58230            class EncryptionLevel extends i.OptionObject {
 58231              constructor(e) {
 58232                super(c, "encryptionLevel", ["40bit", "128bit"]);
 58233              }
 58234            }
 58235            class Enforce extends i.StringObject {
 58236              constructor(e) {
 58237                super(c, "enforce");
 58238              }
 58239            }
 58240            class Equate extends i.XFAObject {
 58241              constructor(e) {
 58242                super(c, "equate");
 58243                this.force = (0, s.getInteger)({
 58244                  data: e.force,
 58245                  defaultValue: 1,
 58246                  validate: (e) => 0 === e,
 58247                });
 58248                this.from = e.from || "";
 58249                this.to = e.to || "";
 58250              }
 58251            }
 58252            class EquateRange extends i.XFAObject {
 58253              constructor(e) {
 58254                super(c, "equateRange");
 58255                this.from = e.from || "";
 58256                this.to = e.to || "";
 58257                this._unicodeRange = e.unicodeRange || "";
 58258              }
 58259              get unicodeRange() {
 58260                const e = [],
 58261                  t = /U\+([0-9a-fA-F]+)/,
 58262                  a = this._unicodeRange;
 58263                for (let r of a
 58264                  .split(",")
 58265                  .map((e) => e.trim())
 58266                  .filter((e) => !!e)) {
 58267                  r = r.split("-", 2).map((e) => {
 58268                    const a = e.match(t);
 58269                    return a ? parseInt(a[1], 16) : 0;
 58270                  });
 58271                  1 === r.length && r.push(r[0]);
 58272                  e.push(r);
 58273                }
 58274                return (0, o.shadow)(this, "unicodeRange", e);
 58275              }
 58276            }
 58277            class Exclude extends i.ContentObject {
 58278              constructor(e) {
 58279                super(c, "exclude");
 58280              }
 58281              [n.$finalize]() {
 58282                this[n.$content] = this[n.$content]
 58283                  .trim()
 58284                  .split(/\s+/)
 58285                  .filter(
 58286                    (e) =>
 58287                      e &&
 58288                      [
 58289                        "calculate",
 58290                        "close",
 58291                        "enter",
 58292                        "exit",
 58293                        "initialize",
 58294                        "ready",
 58295                        "validate",
 58296                      ].includes(e),
 58297                  );
 58298              }
 58299            }
 58300            class ExcludeNS extends i.StringObject {
 58301              constructor(e) {
 58302                super(c, "excludeNS");
 58303              }
 58304            }
 58305            class FlipLabel extends i.OptionObject {
 58306              constructor(e) {
 58307                super(c, "flipLabel", ["usePrinterSetting", "on", "off"]);
 58308              }
 58309            }
 58310            class FontInfo extends i.XFAObject {
 58311              constructor(e) {
 58312                super(c, "fontInfo", !0);
 58313                this.embed = null;
 58314                this.map = null;
 58315                this.subsetBelow = null;
 58316                this.alwaysEmbed = new i.XFAObjectArray();
 58317                this.defaultTypeface = new i.XFAObjectArray();
 58318                this.neverEmbed = new i.XFAObjectArray();
 58319              }
 58320            }
 58321            class FormFieldFilling extends i.Option01 {
 58322              constructor(e) {
 58323                super(c, "formFieldFilling");
 58324              }
 58325            }
 58326            class GroupParent extends i.StringObject {
 58327              constructor(e) {
 58328                super(c, "groupParent");
 58329              }
 58330            }
 58331            class IfEmpty extends i.OptionObject {
 58332              constructor(e) {
 58333                super(c, "ifEmpty", [
 58334                  "dataValue",
 58335                  "dataGroup",
 58336                  "ignore",
 58337                  "remove",
 58338                ]);
 58339              }
 58340            }
 58341            class IncludeXDPContent extends i.StringObject {
 58342              constructor(e) {
 58343                super(c, "includeXDPContent");
 58344              }
 58345            }
 58346            class IncrementalLoad extends i.OptionObject {
 58347              constructor(e) {
 58348                super(c, "incrementalLoad", ["none", "forwardOnly"]);
 58349              }
 58350            }
 58351            class IncrementalMerge extends i.Option01 {
 58352              constructor(e) {
 58353                super(c, "incrementalMerge");
 58354              }
 58355            }
 58356            class Interactive extends i.Option01 {
 58357              constructor(e) {
 58358                super(c, "interactive");
 58359              }
 58360            }
 58361            class Jog extends i.OptionObject {
 58362              constructor(e) {
 58363                super(c, "jog", ["usePrinterSetting", "none", "pageSet"]);
 58364              }
 58365            }
 58366            class LabelPrinter extends i.XFAObject {
 58367              constructor(e) {
 58368                super(c, "labelPrinter", !0);
 58369                this.name = (0, s.getStringOption)(e.name, [
 58370                  "zpl",
 58371                  "dpl",
 58372                  "ipl",
 58373                  "tcpl",
 58374                ]);
 58375                this.batchOutput = null;
 58376                this.flipLabel = null;
 58377                this.fontInfo = null;
 58378                this.xdc = null;
 58379              }
 58380            }
 58381            class Layout extends i.OptionObject {
 58382              constructor(e) {
 58383                super(c, "layout", ["paginate", "panel"]);
 58384              }
 58385            }
 58386            class Level extends i.IntegerObject {
 58387              constructor(e) {
 58388                super(c, "level", 0, (e) => e > 0);
 58389              }
 58390            }
 58391            class Linearized extends i.Option01 {
 58392              constructor(e) {
 58393                super(c, "linearized");
 58394              }
 58395            }
 58396            class Locale extends i.StringObject {
 58397              constructor(e) {
 58398                super(c, "locale");
 58399              }
 58400            }
 58401            class LocaleSet extends i.StringObject {
 58402              constructor(e) {
 58403                super(c, "localeSet");
 58404              }
 58405            }
 58406            class Log extends i.XFAObject {
 58407              constructor(e) {
 58408                super(c, "log", !0);
 58409                this.mode = null;
 58410                this.threshold = null;
 58411                this.to = null;
 58412                this.uri = null;
 58413              }
 58414            }
 58415            class MapElement extends i.XFAObject {
 58416              constructor(e) {
 58417                super(c, "map", !0);
 58418                this.equate = new i.XFAObjectArray();
 58419                this.equateRange = new i.XFAObjectArray();
 58420              }
 58421            }
 58422            class MediumInfo extends i.XFAObject {
 58423              constructor(e) {
 58424                super(c, "mediumInfo", !0);
 58425                this.map = null;
 58426              }
 58427            }
 58428            class Message extends i.XFAObject {
 58429              constructor(e) {
 58430                super(c, "message", !0);
 58431                this.msgId = null;
 58432                this.severity = null;
 58433              }
 58434            }
 58435            class Messaging extends i.XFAObject {
 58436              constructor(e) {
 58437                super(c, "messaging", !0);
 58438                this.message = new i.XFAObjectArray();
 58439              }
 58440            }
 58441            class Mode extends i.OptionObject {
 58442              constructor(e) {
 58443                super(c, "mode", ["append", "overwrite"]);
 58444              }
 58445            }
 58446            class ModifyAnnots extends i.Option01 {
 58447              constructor(e) {
 58448                super(c, "modifyAnnots");
 58449              }
 58450            }
 58451            class MsgId extends i.IntegerObject {
 58452              constructor(e) {
 58453                super(c, "msgId", 1, (e) => e >= 1);
 58454              }
 58455            }
 58456            class NameAttr extends i.StringObject {
 58457              constructor(e) {
 58458                super(c, "nameAttr");
 58459              }
 58460            }
 58461            class NeverEmbed extends i.ContentObject {
 58462              constructor(e) {
 58463                super(c, "neverEmbed");
 58464              }
 58465            }
 58466            class NumberOfCopies extends i.IntegerObject {
 58467              constructor(e) {
 58468                super(c, "numberOfCopies", null, (e) => e >= 2 && e <= 5);
 58469              }
 58470            }
 58471            class OpenAction extends i.XFAObject {
 58472              constructor(e) {
 58473                super(c, "openAction", !0);
 58474                this.destination = null;
 58475              }
 58476            }
 58477            class Output extends i.XFAObject {
 58478              constructor(e) {
 58479                super(c, "output", !0);
 58480                this.to = null;
 58481                this.type = null;
 58482                this.uri = null;
 58483              }
 58484            }
 58485            class OutputBin extends i.StringObject {
 58486              constructor(e) {
 58487                super(c, "outputBin");
 58488              }
 58489            }
 58490            class OutputXSL extends i.XFAObject {
 58491              constructor(e) {
 58492                super(c, "outputXSL", !0);
 58493                this.uri = null;
 58494              }
 58495            }
 58496            class Overprint extends i.OptionObject {
 58497              constructor(e) {
 58498                super(c, "overprint", ["none", "both", "draw", "field"]);
 58499              }
 58500            }
 58501            class Packets extends i.StringObject {
 58502              constructor(e) {
 58503                super(c, "packets");
 58504              }
 58505              [n.$finalize]() {
 58506                "*" !== this[n.$content] &&
 58507                  (this[n.$content] = this[n.$content]
 58508                    .trim()
 58509                    .split(/\s+/)
 58510                    .filter((e) =>
 58511                      ["config", "datasets", "template", "xfdf", "xslt"].includes(
 58512                        e,
 58513                      ),
 58514                    ));
 58515              }
 58516            }
 58517            class PageOffset extends i.XFAObject {
 58518              constructor(e) {
 58519                super(c, "pageOffset");
 58520                this.x = (0, s.getInteger)({
 58521                  data: e.x,
 58522                  defaultValue: "useXDCSetting",
 58523                  validate: (e) => !0,
 58524                });
 58525                this.y = (0, s.getInteger)({
 58526                  data: e.y,
 58527                  defaultValue: "useXDCSetting",
 58528                  validate: (e) => !0,
 58529                });
 58530              }
 58531            }
 58532            class PageRange extends i.StringObject {
 58533              constructor(e) {
 58534                super(c, "pageRange");
 58535              }
 58536              [n.$finalize]() {
 58537                const e = this[n.$content]
 58538                    .trim()
 58539                    .split(/\s+/)
 58540                    .map((e) => parseInt(e, 10)),
 58541                  t = [];
 58542                for (let a = 0, r = e.length; a < r; a += 2)
 58543                  t.push(e.slice(a, a + 2));
 58544                this[n.$content] = t;
 58545              }
 58546            }
 58547            class Pagination extends i.OptionObject {
 58548              constructor(e) {
 58549                super(c, "pagination", [
 58550                  "simplex",
 58551                  "duplexShortEdge",
 58552                  "duplexLongEdge",
 58553                ]);
 58554              }
 58555            }
 58556            class PaginationOverride extends i.OptionObject {
 58557              constructor(e) {
 58558                super(c, "paginationOverride", [
 58559                  "none",
 58560                  "forceDuplex",
 58561                  "forceDuplexLongEdge",
 58562                  "forceDuplexShortEdge",
 58563                  "forceSimplex",
 58564                ]);
 58565              }
 58566            }
 58567            class Part extends i.IntegerObject {
 58568              constructor(e) {
 58569                super(c, "part", 1, (e) => !1);
 58570              }
 58571            }
 58572            class Pcl extends i.XFAObject {
 58573              constructor(e) {
 58574                super(c, "pcl", !0);
 58575                this.name = e.name || "";
 58576                this.batchOutput = null;
 58577                this.fontInfo = null;
 58578                this.jog = null;
 58579                this.mediumInfo = null;
 58580                this.outputBin = null;
 58581                this.pageOffset = null;
 58582                this.staple = null;
 58583                this.xdc = null;
 58584              }
 58585            }
 58586            class Pdf extends i.XFAObject {
 58587              constructor(e) {
 58588                super(c, "pdf", !0);
 58589                this.name = e.name || "";
 58590                this.adobeExtensionLevel = null;
 58591                this.batchOutput = null;
 58592                this.compression = null;
 58593                this.creator = null;
 58594                this.encryption = null;
 58595                this.fontInfo = null;
 58596                this.interactive = null;
 58597                this.linearized = null;
 58598                this.openAction = null;
 58599                this.pdfa = null;
 58600                this.producer = null;
 58601                this.renderPolicy = null;
 58602                this.scriptModel = null;
 58603                this.silentPrint = null;
 58604                this.submitFormat = null;
 58605                this.tagged = null;
 58606                this.version = null;
 58607                this.viewerPreferences = null;
 58608                this.xdc = null;
 58609              }
 58610            }
 58611            class Pdfa extends i.XFAObject {
 58612              constructor(e) {
 58613                super(c, "pdfa", !0);
 58614                this.amd = null;
 58615                this.conformance = null;
 58616                this.includeXDPContent = null;
 58617                this.part = null;
 58618              }
 58619            }
 58620            class Permissions extends i.XFAObject {
 58621              constructor(e) {
 58622                super(c, "permissions", !0);
 58623                this.accessibleContent = null;
 58624                this.change = null;
 58625                this.contentCopy = null;
 58626                this.documentAssembly = null;
 58627                this.formFieldFilling = null;
 58628                this.modifyAnnots = null;
 58629                this.plaintextMetadata = null;
 58630                this.print = null;
 58631                this.printHighQuality = null;
 58632              }
 58633            }
 58634            class PickTrayByPDFSize extends i.Option01 {
 58635              constructor(e) {
 58636                super(c, "pickTrayByPDFSize");
 58637              }
 58638            }
 58639            class Picture extends i.StringObject {
 58640              constructor(e) {
 58641                super(c, "picture");
 58642              }
 58643            }
 58644            class PlaintextMetadata extends i.Option01 {
 58645              constructor(e) {
 58646                super(c, "plaintextMetadata");
 58647              }
 58648            }
 58649            class Presence extends i.OptionObject {
 58650              constructor(e) {
 58651                super(c, "presence", [
 58652                  "preserve",
 58653                  "dissolve",
 58654                  "dissolveStructure",
 58655                  "ignore",
 58656                  "remove",
 58657                ]);
 58658              }
 58659            }
 58660            class Present extends i.XFAObject {
 58661              constructor(e) {
 58662                super(c, "present", !0);
 58663                this.behaviorOverride = null;
 58664                this.cache = null;
 58665                this.common = null;
 58666                this.copies = null;
 58667                this.destination = null;
 58668                this.incrementalMerge = null;
 58669                this.layout = null;
 58670                this.output = null;
 58671                this.overprint = null;
 58672                this.pagination = null;
 58673                this.paginationOverride = null;
 58674                this.script = null;
 58675                this.validate = null;
 58676                this.xdp = null;
 58677                this.driver = new i.XFAObjectArray();
 58678                this.labelPrinter = new i.XFAObjectArray();
 58679                this.pcl = new i.XFAObjectArray();
 58680                this.pdf = new i.XFAObjectArray();
 58681                this.ps = new i.XFAObjectArray();
 58682                this.submitUrl = new i.XFAObjectArray();
 58683                this.webClient = new i.XFAObjectArray();
 58684                this.zpl = new i.XFAObjectArray();
 58685              }
 58686            }
 58687            class Print extends i.Option01 {
 58688              constructor(e) {
 58689                super(c, "print");
 58690              }
 58691            }
 58692            class PrintHighQuality extends i.Option01 {
 58693              constructor(e) {
 58694                super(c, "printHighQuality");
 58695              }
 58696            }
 58697            class PrintScaling extends i.OptionObject {
 58698              constructor(e) {
 58699                super(c, "printScaling", ["appdefault", "noScaling"]);
 58700              }
 58701            }
 58702            class PrinterName extends i.StringObject {
 58703              constructor(e) {
 58704                super(c, "printerName");
 58705              }
 58706            }
 58707            class Producer extends i.StringObject {
 58708              constructor(e) {
 58709                super(c, "producer");
 58710              }
 58711            }
 58712            class Ps extends i.XFAObject {
 58713              constructor(e) {
 58714                super(c, "ps", !0);
 58715                this.name = e.name || "";
 58716                this.batchOutput = null;
 58717                this.fontInfo = null;
 58718                this.jog = null;
 58719                this.mediumInfo = null;
 58720                this.outputBin = null;
 58721                this.staple = null;
 58722                this.xdc = null;
 58723              }
 58724            }
 58725            class Range extends i.ContentObject {
 58726              constructor(e) {
 58727                super(c, "range");
 58728              }
 58729              [n.$finalize]() {
 58730                this[n.$content] = this[n.$content]
 58731                  .trim()
 58732                  .split(/\s*,\s*/, 2)
 58733                  .map((e) => e.split("-").map((e) => parseInt(e.trim(), 10)))
 58734                  .filter((e) => e.every((e) => !isNaN(e)))
 58735                  .map((e) => {
 58736                    1 === e.length && e.push(e[0]);
 58737                    return e;
 58738                  });
 58739              }
 58740            }
 58741            class Record extends i.ContentObject {
 58742              constructor(e) {
 58743                super(c, "record");
 58744              }
 58745              [n.$finalize]() {
 58746                this[n.$content] = this[n.$content].trim();
 58747                const e = parseInt(this[n.$content], 10);
 58748                !isNaN(e) && e >= 0 && (this[n.$content] = e);
 58749              }
 58750            }
 58751            class Relevant extends i.ContentObject {
 58752              constructor(e) {
 58753                super(c, "relevant");
 58754              }
 58755              [n.$finalize]() {
 58756                this[n.$content] = this[n.$content].trim().split(/\s+/);
 58757              }
 58758            }
 58759            class Rename extends i.ContentObject {
 58760              constructor(e) {
 58761                super(c, "rename");
 58762              }
 58763              [n.$finalize]() {
 58764                this[n.$content] = this[n.$content].trim();
 58765                (this[n.$content].toLowerCase().startsWith("xml") ||
 58766                  new RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*", "u").test(
 58767                    this[n.$content],
 58768                  )) &&
 58769                  (0, o.warn)("XFA - Rename: invalid XFA name");
 58770              }
 58771            }
 58772            class RenderPolicy extends i.OptionObject {
 58773              constructor(e) {
 58774                super(c, "renderPolicy", ["server", "client"]);
 58775              }
 58776            }
 58777            class RunScripts extends i.OptionObject {
 58778              constructor(e) {
 58779                super(c, "runScripts", ["both", "client", "none", "server"]);
 58780              }
 58781            }
 58782            class Script extends i.XFAObject {
 58783              constructor(e) {
 58784                super(c, "script", !0);
 58785                this.currentPage = null;
 58786                this.exclude = null;
 58787                this.runScripts = null;
 58788              }
 58789            }
 58790            class ScriptModel extends i.OptionObject {
 58791              constructor(e) {
 58792                super(c, "scriptModel", ["XFA", "none"]);
 58793              }
 58794            }
 58795            class Severity extends i.OptionObject {
 58796              constructor(e) {
 58797                super(c, "severity", [
 58798                  "ignore",
 58799                  "error",
 58800                  "information",
 58801                  "trace",
 58802                  "warning",
 58803                ]);
 58804              }
 58805            }
 58806            class SilentPrint extends i.XFAObject {
 58807              constructor(e) {
 58808                super(c, "silentPrint", !0);
 58809                this.addSilentPrint = null;
 58810                this.printerName = null;
 58811              }
 58812            }
 58813            class Staple extends i.XFAObject {
 58814              constructor(e) {
 58815                super(c, "staple");
 58816                this.mode = (0, s.getStringOption)(e.mode, [
 58817                  "usePrinterSetting",
 58818                  "on",
 58819                  "off",
 58820                ]);
 58821              }
 58822            }
 58823            class StartNode extends i.StringObject {
 58824              constructor(e) {
 58825                super(c, "startNode");
 58826              }
 58827            }
 58828            class StartPage extends i.IntegerObject {
 58829              constructor(e) {
 58830                super(c, "startPage", 0, (e) => !0);
 58831              }
 58832            }
 58833            class SubmitFormat extends i.OptionObject {
 58834              constructor(e) {
 58835                super(c, "submitFormat", [
 58836                  "html",
 58837                  "delegate",
 58838                  "fdf",
 58839                  "xml",
 58840                  "pdf",
 58841                ]);
 58842              }
 58843            }
 58844            class SubmitUrl extends i.StringObject {
 58845              constructor(e) {
 58846                super(c, "submitUrl");
 58847              }
 58848            }
 58849            class SubsetBelow extends i.IntegerObject {
 58850              constructor(e) {
 58851                super(c, "subsetBelow", 100, (e) => e >= 0 && e <= 100);
 58852              }
 58853            }
 58854            class SuppressBanner extends i.Option01 {
 58855              constructor(e) {
 58856                super(c, "suppressBanner");
 58857              }
 58858            }
 58859            class Tagged extends i.Option01 {
 58860              constructor(e) {
 58861                super(c, "tagged");
 58862              }
 58863            }
 58864            class Template extends i.XFAObject {
 58865              constructor(e) {
 58866                super(c, "template", !0);
 58867                this.base = null;
 58868                this.relevant = null;
 58869                this.startPage = null;
 58870                this.uri = null;
 58871                this.xsl = null;
 58872              }
 58873            }
 58874            class Threshold extends i.OptionObject {
 58875              constructor(e) {
 58876                super(c, "threshold", [
 58877                  "trace",
 58878                  "error",
 58879                  "information",
 58880                  "warning",
 58881                ]);
 58882              }
 58883            }
 58884            class To extends i.OptionObject {
 58885              constructor(e) {
 58886                super(c, "to", [
 58887                  "null",
 58888                  "memory",
 58889                  "stderr",
 58890                  "stdout",
 58891                  "system",
 58892                  "uri",
 58893                ]);
 58894              }
 58895            }
 58896            class TemplateCache extends i.XFAObject {
 58897              constructor(e) {
 58898                super(c, "templateCache");
 58899                this.maxEntries = (0, s.getInteger)({
 58900                  data: e.maxEntries,
 58901                  defaultValue: 5,
 58902                  validate: (e) => e >= 0,
 58903                });
 58904              }
 58905            }
 58906            class Trace extends i.XFAObject {
 58907              constructor(e) {
 58908                super(c, "trace", !0);
 58909                this.area = new i.XFAObjectArray();
 58910              }
 58911            }
 58912            class Transform extends i.XFAObject {
 58913              constructor(e) {
 58914                super(c, "transform", !0);
 58915                this.groupParent = null;
 58916                this.ifEmpty = null;
 58917                this.nameAttr = null;
 58918                this.picture = null;
 58919                this.presence = null;
 58920                this.rename = null;
 58921                this.whitespace = null;
 58922              }
 58923            }
 58924            class Type extends i.OptionObject {
 58925              constructor(e) {
 58926                super(c, "type", [
 58927                  "none",
 58928                  "ascii85",
 58929                  "asciiHex",
 58930                  "ccittfax",
 58931                  "flate",
 58932                  "lzw",
 58933                  "runLength",
 58934                  "native",
 58935                  "xdp",
 58936                  "mergedXDP",
 58937                ]);
 58938              }
 58939            }
 58940            class Uri extends i.StringObject {
 58941              constructor(e) {
 58942                super(c, "uri");
 58943              }
 58944            }
 58945            class Validate extends i.OptionObject {
 58946              constructor(e) {
 58947                super(c, "validate", [
 58948                  "preSubmit",
 58949                  "prePrint",
 58950                  "preExecute",
 58951                  "preSave",
 58952                ]);
 58953              }
 58954            }
 58955            class ValidateApprovalSignatures extends i.ContentObject {
 58956              constructor(e) {
 58957                super(c, "validateApprovalSignatures");
 58958              }
 58959              [n.$finalize]() {
 58960                this[n.$content] = this[n.$content]
 58961                  .trim()
 58962                  .split(/\s+/)
 58963                  .filter((e) => ["docReady", "postSign"].includes(e));
 58964              }
 58965            }
 58966            class ValidationMessaging extends i.OptionObject {
 58967              constructor(e) {
 58968                super(c, "validationMessaging", [
 58969                  "allMessagesIndividually",
 58970                  "allMessagesTogether",
 58971                  "firstMessageOnly",
 58972                  "noMessages",
 58973                ]);
 58974              }
 58975            }
 58976            class Version extends i.OptionObject {
 58977              constructor(e) {
 58978                super(c, "version", ["1.7", "1.6", "1.5", "1.4", "1.3", "1.2"]);
 58979              }
 58980            }
 58981            class VersionControl extends i.XFAObject {
 58982              constructor(e) {
 58983                super(c, "VersionControl");
 58984                this.outputBelow = (0, s.getStringOption)(e.outputBelow, [
 58985                  "warn",
 58986                  "error",
 58987                  "update",
 58988                ]);
 58989                this.sourceAbove = (0, s.getStringOption)(e.sourceAbove, [
 58990                  "warn",
 58991                  "error",
 58992                ]);
 58993                this.sourceBelow = (0, s.getStringOption)(e.sourceBelow, [
 58994                  "update",
 58995                  "maintain",
 58996                ]);
 58997              }
 58998            }
 58999            class ViewerPreferences extends i.XFAObject {
 59000              constructor(e) {
 59001                super(c, "viewerPreferences", !0);
 59002                this.ADBE_JSConsole = null;
 59003                this.ADBE_JSDebugger = null;
 59004                this.addViewerPreferences = null;
 59005                this.duplexOption = null;
 59006                this.enforce = null;
 59007                this.numberOfCopies = null;
 59008                this.pageRange = null;
 59009                this.pickTrayByPDFSize = null;
 59010                this.printScaling = null;
 59011              }
 59012            }
 59013            class WebClient extends i.XFAObject {
 59014              constructor(e) {
 59015                super(c, "webClient", !0);
 59016                this.name = e.name ? e.name.trim() : "";
 59017                this.fontInfo = null;
 59018                this.xdc = null;
 59019              }
 59020            }
 59021            class Whitespace extends i.OptionObject {
 59022              constructor(e) {
 59023                super(c, "whitespace", [
 59024                  "preserve",
 59025                  "ltrim",
 59026                  "normalize",
 59027                  "rtrim",
 59028                  "trim",
 59029                ]);
 59030              }
 59031            }
 59032            class Window extends i.ContentObject {
 59033              constructor(e) {
 59034                super(c, "window");
 59035              }
 59036              [n.$finalize]() {
 59037                const e = this[n.$content]
 59038                  .trim()
 59039                  .split(/\s*,\s*/, 2)
 59040                  .map((e) => parseInt(e, 10));
 59041                if (e.some((e) => isNaN(e))) this[n.$content] = [0, 0];
 59042                else {
 59043                  1 === e.length && e.push(e[0]);
 59044                  this[n.$content] = e;
 59045                }
 59046              }
 59047            }
 59048            class Xdc extends i.XFAObject {
 59049              constructor(e) {
 59050                super(c, "xdc", !0);
 59051                this.uri = new i.XFAObjectArray();
 59052                this.xsl = new i.XFAObjectArray();
 59053              }
 59054            }
 59055            class Xdp extends i.XFAObject {
 59056              constructor(e) {
 59057                super(c, "xdp", !0);
 59058                this.packets = null;
 59059              }
 59060            }
 59061            class Xsl extends i.XFAObject {
 59062              constructor(e) {
 59063                super(c, "xsl", !0);
 59064                this.debug = null;
 59065                this.uri = null;
 59066              }
 59067            }
 59068            class Zpl extends i.XFAObject {
 59069              constructor(e) {
 59070                super(c, "zpl", !0);
 59071                this.name = e.name ? e.name.trim() : "";
 59072                this.batchOutput = null;
 59073                this.flipLabel = null;
 59074                this.fontInfo = null;
 59075                this.xdc = null;
 59076              }
 59077            }
 59078            class ConfigNamespace {
 59079              static [r.$buildXFAObject](e, t) {
 59080                if (ConfigNamespace.hasOwnProperty(e))
 59081                  return ConfigNamespace[e](t);
 59082              }
 59083              static acrobat(e) {
 59084                return new Acrobat(e);
 59085              }
 59086              static acrobat7(e) {
 59087                return new Acrobat7(e);
 59088              }
 59089              static ADBE_JSConsole(e) {
 59090                return new ADBE_JSConsole(e);
 59091              }
 59092              static ADBE_JSDebugger(e) {
 59093                return new ADBE_JSDebugger(e);
 59094              }
 59095              static addSilentPrint(e) {
 59096                return new AddSilentPrint(e);
 59097              }
 59098              static addViewerPreferences(e) {
 59099                return new AddViewerPreferences(e);
 59100              }
 59101              static adjustData(e) {
 59102                return new AdjustData(e);
 59103              }
 59104              static adobeExtensionLevel(e) {
 59105                return new AdobeExtensionLevel(e);
 59106              }
 59107              static agent(e) {
 59108                return new Agent(e);
 59109              }
 59110              static alwaysEmbed(e) {
 59111                return new AlwaysEmbed(e);
 59112              }
 59113              static amd(e) {
 59114                return new Amd(e);
 59115              }
 59116              static area(e) {
 59117                return new Area(e);
 59118              }
 59119              static attributes(e) {
 59120                return new Attributes(e);
 59121              }
 59122              static autoSave(e) {
 59123                return new AutoSave(e);
 59124              }
 59125              static base(e) {
 59126                return new Base(e);
 59127              }
 59128              static batchOutput(e) {
 59129                return new BatchOutput(e);
 59130              }
 59131              static behaviorOverride(e) {
 59132                return new BehaviorOverride(e);
 59133              }
 59134              static cache(e) {
 59135                return new Cache(e);
 59136              }
 59137              static change(e) {
 59138                return new Change(e);
 59139              }
 59140              static common(e) {
 59141                return new Common(e);
 59142              }
 59143              static compress(e) {
 59144                return new Compress(e);
 59145              }
 59146              static compressLogicalStructure(e) {
 59147                return new CompressLogicalStructure(e);
 59148              }
 59149              static compressObjectStream(e) {
 59150                return new CompressObjectStream(e);
 59151              }
 59152              static compression(e) {
 59153                return new Compression(e);
 59154              }
 59155              static config(e) {
 59156                return new Config(e);
 59157              }
 59158              static conformance(e) {
 59159                return new Conformance(e);
 59160              }
 59161              static contentCopy(e) {
 59162                return new ContentCopy(e);
 59163              }
 59164              static copies(e) {
 59165                return new Copies(e);
 59166              }
 59167              static creator(e) {
 59168                return new Creator(e);
 59169              }
 59170              static currentPage(e) {
 59171                return new CurrentPage(e);
 59172              }
 59173              static data(e) {
 59174                return new Data(e);
 59175              }
 59176              static debug(e) {
 59177                return new Debug(e);
 59178              }
 59179              static defaultTypeface(e) {
 59180                return new DefaultTypeface(e);
 59181              }
 59182              static destination(e) {
 59183                return new Destination(e);
 59184              }
 59185              static documentAssembly(e) {
 59186                return new DocumentAssembly(e);
 59187              }
 59188              static driver(e) {
 59189                return new Driver(e);
 59190              }
 59191              static duplexOption(e) {
 59192                return new DuplexOption(e);
 59193              }
 59194              static dynamicRender(e) {
 59195                return new DynamicRender(e);
 59196              }
 59197              static embed(e) {
 59198                return new Embed(e);
 59199              }
 59200              static encrypt(e) {
 59201                return new Encrypt(e);
 59202              }
 59203              static encryption(e) {
 59204                return new Encryption(e);
 59205              }
 59206              static encryptionLevel(e) {
 59207                return new EncryptionLevel(e);
 59208              }
 59209              static enforce(e) {
 59210                return new Enforce(e);
 59211              }
 59212              static equate(e) {
 59213                return new Equate(e);
 59214              }
 59215              static equateRange(e) {
 59216                return new EquateRange(e);
 59217              }
 59218              static exclude(e) {
 59219                return new Exclude(e);
 59220              }
 59221              static excludeNS(e) {
 59222                return new ExcludeNS(e);
 59223              }
 59224              static flipLabel(e) {
 59225                return new FlipLabel(e);
 59226              }
 59227              static fontInfo(e) {
 59228                return new FontInfo(e);
 59229              }
 59230              static formFieldFilling(e) {
 59231                return new FormFieldFilling(e);
 59232              }
 59233              static groupParent(e) {
 59234                return new GroupParent(e);
 59235              }
 59236              static ifEmpty(e) {
 59237                return new IfEmpty(e);
 59238              }
 59239              static includeXDPContent(e) {
 59240                return new IncludeXDPContent(e);
 59241              }
 59242              static incrementalLoad(e) {
 59243                return new IncrementalLoad(e);
 59244              }
 59245              static incrementalMerge(e) {
 59246                return new IncrementalMerge(e);
 59247              }
 59248              static interactive(e) {
 59249                return new Interactive(e);
 59250              }
 59251              static jog(e) {
 59252                return new Jog(e);
 59253              }
 59254              static labelPrinter(e) {
 59255                return new LabelPrinter(e);
 59256              }
 59257              static layout(e) {
 59258                return new Layout(e);
 59259              }
 59260              static level(e) {
 59261                return new Level(e);
 59262              }
 59263              static linearized(e) {
 59264                return new Linearized(e);
 59265              }
 59266              static locale(e) {
 59267                return new Locale(e);
 59268              }
 59269              static localeSet(e) {
 59270                return new LocaleSet(e);
 59271              }
 59272              static log(e) {
 59273                return new Log(e);
 59274              }
 59275              static map(e) {
 59276                return new MapElement(e);
 59277              }
 59278              static mediumInfo(e) {
 59279                return new MediumInfo(e);
 59280              }
 59281              static message(e) {
 59282                return new Message(e);
 59283              }
 59284              static messaging(e) {
 59285                return new Messaging(e);
 59286              }
 59287              static mode(e) {
 59288                return new Mode(e);
 59289              }
 59290              static modifyAnnots(e) {
 59291                return new ModifyAnnots(e);
 59292              }
 59293              static msgId(e) {
 59294                return new MsgId(e);
 59295              }
 59296              static nameAttr(e) {
 59297                return new NameAttr(e);
 59298              }
 59299              static neverEmbed(e) {
 59300                return new NeverEmbed(e);
 59301              }
 59302              static numberOfCopies(e) {
 59303                return new NumberOfCopies(e);
 59304              }
 59305              static openAction(e) {
 59306                return new OpenAction(e);
 59307              }
 59308              static output(e) {
 59309                return new Output(e);
 59310              }
 59311              static outputBin(e) {
 59312                return new OutputBin(e);
 59313              }
 59314              static outputXSL(e) {
 59315                return new OutputXSL(e);
 59316              }
 59317              static overprint(e) {
 59318                return new Overprint(e);
 59319              }
 59320              static packets(e) {
 59321                return new Packets(e);
 59322              }
 59323              static pageOffset(e) {
 59324                return new PageOffset(e);
 59325              }
 59326              static pageRange(e) {
 59327                return new PageRange(e);
 59328              }
 59329              static pagination(e) {
 59330                return new Pagination(e);
 59331              }
 59332              static paginationOverride(e) {
 59333                return new PaginationOverride(e);
 59334              }
 59335              static part(e) {
 59336                return new Part(e);
 59337              }
 59338              static pcl(e) {
 59339                return new Pcl(e);
 59340              }
 59341              static pdf(e) {
 59342                return new Pdf(e);
 59343              }
 59344              static pdfa(e) {
 59345                return new Pdfa(e);
 59346              }
 59347              static permissions(e) {
 59348                return new Permissions(e);
 59349              }
 59350              static pickTrayByPDFSize(e) {
 59351                return new PickTrayByPDFSize(e);
 59352              }
 59353              static picture(e) {
 59354                return new Picture(e);
 59355              }
 59356              static plaintextMetadata(e) {
 59357                return new PlaintextMetadata(e);
 59358              }
 59359              static presence(e) {
 59360                return new Presence(e);
 59361              }
 59362              static present(e) {
 59363                return new Present(e);
 59364              }
 59365              static print(e) {
 59366                return new Print(e);
 59367              }
 59368              static printHighQuality(e) {
 59369                return new PrintHighQuality(e);
 59370              }
 59371              static printScaling(e) {
 59372                return new PrintScaling(e);
 59373              }
 59374              static printerName(e) {
 59375                return new PrinterName(e);
 59376              }
 59377              static producer(e) {
 59378                return new Producer(e);
 59379              }
 59380              static ps(e) {
 59381                return new Ps(e);
 59382              }
 59383              static range(e) {
 59384                return new Range(e);
 59385              }
 59386              static record(e) {
 59387                return new Record(e);
 59388              }
 59389              static relevant(e) {
 59390                return new Relevant(e);
 59391              }
 59392              static rename(e) {
 59393                return new Rename(e);
 59394              }
 59395              static renderPolicy(e) {
 59396                return new RenderPolicy(e);
 59397              }
 59398              static runScripts(e) {
 59399                return new RunScripts(e);
 59400              }
 59401              static script(e) {
 59402                return new Script(e);
 59403              }
 59404              static scriptModel(e) {
 59405                return new ScriptModel(e);
 59406              }
 59407              static severity(e) {
 59408                return new Severity(e);
 59409              }
 59410              static silentPrint(e) {
 59411                return new SilentPrint(e);
 59412              }
 59413              static staple(e) {
 59414                return new Staple(e);
 59415              }
 59416              static startNode(e) {
 59417                return new StartNode(e);
 59418              }
 59419              static startPage(e) {
 59420                return new StartPage(e);
 59421              }
 59422              static submitFormat(e) {
 59423                return new SubmitFormat(e);
 59424              }
 59425              static submitUrl(e) {
 59426                return new SubmitUrl(e);
 59427              }
 59428              static subsetBelow(e) {
 59429                return new SubsetBelow(e);
 59430              }
 59431              static suppressBanner(e) {
 59432                return new SuppressBanner(e);
 59433              }
 59434              static tagged(e) {
 59435                return new Tagged(e);
 59436              }
 59437              static template(e) {
 59438                return new Template(e);
 59439              }
 59440              static templateCache(e) {
 59441                return new TemplateCache(e);
 59442              }
 59443              static threshold(e) {
 59444                return new Threshold(e);
 59445              }
 59446              static to(e) {
 59447                return new To(e);
 59448              }
 59449              static trace(e) {
 59450                return new Trace(e);
 59451              }
 59452              static transform(e) {
 59453                return new Transform(e);
 59454              }
 59455              static type(e) {
 59456                return new Type(e);
 59457              }
 59458              static uri(e) {
 59459                return new Uri(e);
 59460              }
 59461              static validate(e) {
 59462                return new Validate(e);
 59463              }
 59464              static validateApprovalSignatures(e) {
 59465                return new ValidateApprovalSignatures(e);
 59466              }
 59467              static validationMessaging(e) {
 59468                return new ValidationMessaging(e);
 59469              }
 59470              static version(e) {
 59471                return new Version(e);
 59472              }
 59473              static versionControl(e) {
 59474                return new VersionControl(e);
 59475              }
 59476              static viewerPreferences(e) {
 59477                return new ViewerPreferences(e);
 59478              }
 59479              static webClient(e) {
 59480                return new WebClient(e);
 59481              }
 59482              static whitespace(e) {
 59483                return new Whitespace(e);
 59484              }
 59485              static window(e) {
 59486                return new Window(e);
 59487              }
 59488              static xdc(e) {
 59489                return new Xdc(e);
 59490              }
 59491              static xdp(e) {
 59492                return new Xdp(e);
 59493              }
 59494              static xsl(e) {
 59495                return new Xsl(e);
 59496              }
 59497              static zpl(e) {
 59498                return new Zpl(e);
 59499              }
 59500            }
 59501            t.ConfigNamespace = ConfigNamespace;
 59502          },
 59503          (e, t, a) => {
 59504            Object.defineProperty(t, "__esModule", { value: !0 });
 59505            t.ConnectionSetNamespace = void 0;
 59506            var r = a(81),
 59507              n = a(87);
 59508            const i = r.NamespaceIds.connectionSet.id;
 59509            class ConnectionSet extends n.XFAObject {
 59510              constructor(e) {
 59511                super(i, "connectionSet", !0);
 59512                this.wsdlConnection = new n.XFAObjectArray();
 59513                this.xmlConnection = new n.XFAObjectArray();
 59514                this.xsdConnection = new n.XFAObjectArray();
 59515              }
 59516            }
 59517            class EffectiveInputPolicy extends n.XFAObject {
 59518              constructor(e) {
 59519                super(i, "effectiveInputPolicy");
 59520                this.id = e.id || "";
 59521                this.name = e.name || "";
 59522                this.use = e.use || "";
 59523                this.usehref = e.usehref || "";
 59524              }
 59525            }
 59526            class EffectiveOutputPolicy extends n.XFAObject {
 59527              constructor(e) {
 59528                super(i, "effectiveOutputPolicy");
 59529                this.id = e.id || "";
 59530                this.name = e.name || "";
 59531                this.use = e.use || "";
 59532                this.usehref = e.usehref || "";
 59533              }
 59534            }
 59535            class Operation extends n.StringObject {
 59536              constructor(e) {
 59537                super(i, "operation");
 59538                this.id = e.id || "";
 59539                this.input = e.input || "";
 59540                this.name = e.name || "";
 59541                this.output = e.output || "";
 59542                this.use = e.use || "";
 59543                this.usehref = e.usehref || "";
 59544              }
 59545            }
 59546            class RootElement extends n.StringObject {
 59547              constructor(e) {
 59548                super(i, "rootElement");
 59549                this.id = e.id || "";
 59550                this.name = e.name || "";
 59551                this.use = e.use || "";
 59552                this.usehref = e.usehref || "";
 59553              }
 59554            }
 59555            class SoapAction extends n.StringObject {
 59556              constructor(e) {
 59557                super(i, "soapAction");
 59558                this.id = e.id || "";
 59559                this.name = e.name || "";
 59560                this.use = e.use || "";
 59561                this.usehref = e.usehref || "";
 59562              }
 59563            }
 59564            class SoapAddress extends n.StringObject {
 59565              constructor(e) {
 59566                super(i, "soapAddress");
 59567                this.id = e.id || "";
 59568                this.name = e.name || "";
 59569                this.use = e.use || "";
 59570                this.usehref = e.usehref || "";
 59571              }
 59572            }
 59573            class Uri extends n.StringObject {
 59574              constructor(e) {
 59575                super(i, "uri");
 59576                this.id = e.id || "";
 59577                this.name = e.name || "";
 59578                this.use = e.use || "";
 59579                this.usehref = e.usehref || "";
 59580              }
 59581            }
 59582            class WsdlAddress extends n.StringObject {
 59583              constructor(e) {
 59584                super(i, "wsdlAddress");
 59585                this.id = e.id || "";
 59586                this.name = e.name || "";
 59587                this.use = e.use || "";
 59588                this.usehref = e.usehref || "";
 59589              }
 59590            }
 59591            class WsdlConnection extends n.XFAObject {
 59592              constructor(e) {
 59593                super(i, "wsdlConnection", !0);
 59594                this.dataDescription = e.dataDescription || "";
 59595                this.name = e.name || "";
 59596                this.effectiveInputPolicy = null;
 59597                this.effectiveOutputPolicy = null;
 59598                this.operation = null;
 59599                this.soapAction = null;
 59600                this.soapAddress = null;
 59601                this.wsdlAddress = null;
 59602              }
 59603            }
 59604            class XmlConnection extends n.XFAObject {
 59605              constructor(e) {
 59606                super(i, "xmlConnection", !0);
 59607                this.dataDescription = e.dataDescription || "";
 59608                this.name = e.name || "";
 59609                this.uri = null;
 59610              }
 59611            }
 59612            class XsdConnection extends n.XFAObject {
 59613              constructor(e) {
 59614                super(i, "xsdConnection", !0);
 59615                this.dataDescription = e.dataDescription || "";
 59616                this.name = e.name || "";
 59617                this.rootElement = null;
 59618                this.uri = null;
 59619              }
 59620            }
 59621            class ConnectionSetNamespace {
 59622              static [r.$buildXFAObject](e, t) {
 59623                if (ConnectionSetNamespace.hasOwnProperty(e))
 59624                  return ConnectionSetNamespace[e](t);
 59625              }
 59626              static connectionSet(e) {
 59627                return new ConnectionSet(e);
 59628              }
 59629              static effectiveInputPolicy(e) {
 59630                return new EffectiveInputPolicy(e);
 59631              }
 59632              static effectiveOutputPolicy(e) {
 59633                return new EffectiveOutputPolicy(e);
 59634              }
 59635              static operation(e) {
 59636                return new Operation(e);
 59637              }
 59638              static rootElement(e) {
 59639                return new RootElement(e);
 59640              }
 59641              static soapAction(e) {
 59642                return new SoapAction(e);
 59643              }
 59644              static soapAddress(e) {
 59645                return new SoapAddress(e);
 59646              }
 59647              static uri(e) {
 59648                return new Uri(e);
 59649              }
 59650              static wsdlAddress(e) {
 59651                return new WsdlAddress(e);
 59652              }
 59653              static wsdlConnection(e) {
 59654                return new WsdlConnection(e);
 59655              }
 59656              static xmlConnection(e) {
 59657                return new XmlConnection(e);
 59658              }
 59659              static xsdConnection(e) {
 59660                return new XsdConnection(e);
 59661              }
 59662            }
 59663            t.ConnectionSetNamespace = ConnectionSetNamespace;
 59664          },
 59665          (e, t, a) => {
 59666            Object.defineProperty(t, "__esModule", { value: !0 });
 59667            t.DatasetsNamespace = void 0;
 59668            var r = a(78),
 59669              n = a(81),
 59670              i = a(87);
 59671            const s = n.NamespaceIds.datasets.id;
 59672            class Data extends i.XmlObject {
 59673              constructor(e) {
 59674                super(s, "data", e);
 59675              }
 59676              [r.$isNsAgnostic]() {
 59677                return !0;
 59678              }
 59679            }
 59680            class Datasets extends i.XFAObject {
 59681              constructor(e) {
 59682                super(s, "datasets", !0);
 59683                this.data = null;
 59684                this.Signature = null;
 59685              }
 59686              [r.$onChild](e) {
 59687                const t = e[r.$nodeName];
 59688                (("data" === t && e[r.$namespaceId] === s) ||
 59689                  ("Signature" === t &&
 59690                    e[r.$namespaceId] === n.NamespaceIds.signature.id)) &&
 59691                  (this[t] = e);
 59692                this[r.$appendChild](e);
 59693              }
 59694            }
 59695            class DatasetsNamespace {
 59696              static [n.$buildXFAObject](e, t) {
 59697                if (DatasetsNamespace.hasOwnProperty(e))
 59698                  return DatasetsNamespace[e](t);
 59699              }
 59700              static datasets(e) {
 59701                return new Datasets(e);
 59702              }
 59703              static data(e) {
 59704                return new Data(e);
 59705              }
 59706            }
 59707            t.DatasetsNamespace = DatasetsNamespace;
 59708          },
 59709          (e, t, a) => {
 59710            Object.defineProperty(t, "__esModule", { value: !0 });
 59711            t.LocaleSetNamespace = void 0;
 59712            var r = a(81),
 59713              n = a(87),
 59714              i = a(84);
 59715            const s = r.NamespaceIds.localeSet.id;
 59716            class CalendarSymbols extends n.XFAObject {
 59717              constructor(e) {
 59718                super(s, "calendarSymbols", !0);
 59719                this.name = "gregorian";
 59720                this.dayNames = new n.XFAObjectArray(2);
 59721                this.eraNames = null;
 59722                this.meridiemNames = null;
 59723                this.monthNames = new n.XFAObjectArray(2);
 59724              }
 59725            }
 59726            class CurrencySymbol extends n.StringObject {
 59727              constructor(e) {
 59728                super(s, "currencySymbol");
 59729                this.name = (0, i.getStringOption)(e.name, [
 59730                  "symbol",
 59731                  "isoname",
 59732                  "decimal",
 59733                ]);
 59734              }
 59735            }
 59736            class CurrencySymbols extends n.XFAObject {
 59737              constructor(e) {
 59738                super(s, "currencySymbols", !0);
 59739                this.currencySymbol = new n.XFAObjectArray(3);
 59740              }
 59741            }
 59742            class DatePattern extends n.StringObject {
 59743              constructor(e) {
 59744                super(s, "datePattern");
 59745                this.name = (0, i.getStringOption)(e.name, [
 59746                  "full",
 59747                  "long",
 59748                  "med",
 59749                  "short",
 59750                ]);
 59751              }
 59752            }
 59753            class DatePatterns extends n.XFAObject {
 59754              constructor(e) {
 59755                super(s, "datePatterns", !0);
 59756                this.datePattern = new n.XFAObjectArray(4);
 59757              }
 59758            }
 59759            class DateTimeSymbols extends n.ContentObject {
 59760              constructor(e) {
 59761                super(s, "dateTimeSymbols");
 59762              }
 59763            }
 59764            class Day extends n.StringObject {
 59765              constructor(e) {
 59766                super(s, "day");
 59767              }
 59768            }
 59769            class DayNames extends n.XFAObject {
 59770              constructor(e) {
 59771                super(s, "dayNames", !0);
 59772                this.abbr = (0, i.getInteger)({
 59773                  data: e.abbr,
 59774                  defaultValue: 0,
 59775                  validate: (e) => 1 === e,
 59776                });
 59777                this.day = new n.XFAObjectArray(7);
 59778              }
 59779            }
 59780            class Era extends n.StringObject {
 59781              constructor(e) {
 59782                super(s, "era");
 59783              }
 59784            }
 59785            class EraNames extends n.XFAObject {
 59786              constructor(e) {
 59787                super(s, "eraNames", !0);
 59788                this.era = new n.XFAObjectArray(2);
 59789              }
 59790            }
 59791            class Locale extends n.XFAObject {
 59792              constructor(e) {
 59793                super(s, "locale", !0);
 59794                this.desc = e.desc || "";
 59795                this.name = "isoname";
 59796                this.calendarSymbols = null;
 59797                this.currencySymbols = null;
 59798                this.datePatterns = null;
 59799                this.dateTimeSymbols = null;
 59800                this.numberPatterns = null;
 59801                this.numberSymbols = null;
 59802                this.timePatterns = null;
 59803                this.typeFaces = null;
 59804              }
 59805            }
 59806            class LocaleSet extends n.XFAObject {
 59807              constructor(e) {
 59808                super(s, "localeSet", !0);
 59809                this.locale = new n.XFAObjectArray();
 59810              }
 59811            }
 59812            class Meridiem extends n.StringObject {
 59813              constructor(e) {
 59814                super(s, "meridiem");
 59815              }
 59816            }
 59817            class MeridiemNames extends n.XFAObject {
 59818              constructor(e) {
 59819                super(s, "meridiemNames", !0);
 59820                this.meridiem = new n.XFAObjectArray(2);
 59821              }
 59822            }
 59823            class Month extends n.StringObject {
 59824              constructor(e) {
 59825                super(s, "month");
 59826              }
 59827            }
 59828            class MonthNames extends n.XFAObject {
 59829              constructor(e) {
 59830                super(s, "monthNames", !0);
 59831                this.abbr = (0, i.getInteger)({
 59832                  data: e.abbr,
 59833                  defaultValue: 0,
 59834                  validate: (e) => 1 === e,
 59835                });
 59836                this.month = new n.XFAObjectArray(12);
 59837              }
 59838            }
 59839            class NumberPattern extends n.StringObject {
 59840              constructor(e) {
 59841                super(s, "numberPattern");
 59842                this.name = (0, i.getStringOption)(e.name, [
 59843                  "full",
 59844                  "long",
 59845                  "med",
 59846                  "short",
 59847                ]);
 59848              }
 59849            }
 59850            class NumberPatterns extends n.XFAObject {
 59851              constructor(e) {
 59852                super(s, "numberPatterns", !0);
 59853                this.numberPattern = new n.XFAObjectArray(4);
 59854              }
 59855            }
 59856            class NumberSymbol extends n.StringObject {
 59857              constructor(e) {
 59858                super(s, "numberSymbol");
 59859                this.name = (0, i.getStringOption)(e.name, [
 59860                  "decimal",
 59861                  "grouping",
 59862                  "percent",
 59863                  "minus",
 59864                  "zero",
 59865                ]);
 59866              }
 59867            }
 59868            class NumberSymbols extends n.XFAObject {
 59869              constructor(e) {
 59870                super(s, "numberSymbols", !0);
 59871                this.numberSymbol = new n.XFAObjectArray(5);
 59872              }
 59873            }
 59874            class TimePattern extends n.StringObject {
 59875              constructor(e) {
 59876                super(s, "timePattern");
 59877                this.name = (0, i.getStringOption)(e.name, [
 59878                  "full",
 59879                  "long",
 59880                  "med",
 59881                  "short",
 59882                ]);
 59883              }
 59884            }
 59885            class TimePatterns extends n.XFAObject {
 59886              constructor(e) {
 59887                super(s, "timePatterns", !0);
 59888                this.timePattern = new n.XFAObjectArray(4);
 59889              }
 59890            }
 59891            class TypeFace extends n.XFAObject {
 59892              constructor(e) {
 59893                super(s, "typeFace", !0);
 59894                this.name = "" | e.name;
 59895              }
 59896            }
 59897            class TypeFaces extends n.XFAObject {
 59898              constructor(e) {
 59899                super(s, "typeFaces", !0);
 59900                this.typeFace = new n.XFAObjectArray();
 59901              }
 59902            }
 59903            class LocaleSetNamespace {
 59904              static [r.$buildXFAObject](e, t) {
 59905                if (LocaleSetNamespace.hasOwnProperty(e))
 59906                  return LocaleSetNamespace[e](t);
 59907              }
 59908              static calendarSymbols(e) {
 59909                return new CalendarSymbols(e);
 59910              }
 59911              static currencySymbol(e) {
 59912                return new CurrencySymbol(e);
 59913              }
 59914              static currencySymbols(e) {
 59915                return new CurrencySymbols(e);
 59916              }
 59917              static datePattern(e) {
 59918                return new DatePattern(e);
 59919              }
 59920              static datePatterns(e) {
 59921                return new DatePatterns(e);
 59922              }
 59923              static dateTimeSymbols(e) {
 59924                return new DateTimeSymbols(e);
 59925              }
 59926              static day(e) {
 59927                return new Day(e);
 59928              }
 59929              static dayNames(e) {
 59930                return new DayNames(e);
 59931              }
 59932              static era(e) {
 59933                return new Era(e);
 59934              }
 59935              static eraNames(e) {
 59936                return new EraNames(e);
 59937              }
 59938              static locale(e) {
 59939                return new Locale(e);
 59940              }
 59941              static localeSet(e) {
 59942                return new LocaleSet(e);
 59943              }
 59944              static meridiem(e) {
 59945                return new Meridiem(e);
 59946              }
 59947              static meridiemNames(e) {
 59948                return new MeridiemNames(e);
 59949              }
 59950              static month(e) {
 59951                return new Month(e);
 59952              }
 59953              static monthNames(e) {
 59954                return new MonthNames(e);
 59955              }
 59956              static numberPattern(e) {
 59957                return new NumberPattern(e);
 59958              }
 59959              static numberPatterns(e) {
 59960                return new NumberPatterns(e);
 59961              }
 59962              static numberSymbol(e) {
 59963                return new NumberSymbol(e);
 59964              }
 59965              static numberSymbols(e) {
 59966                return new NumberSymbols(e);
 59967              }
 59968              static timePattern(e) {
 59969                return new TimePattern(e);
 59970              }
 59971              static timePatterns(e) {
 59972                return new TimePatterns(e);
 59973              }
 59974              static typeFace(e) {
 59975                return new TypeFace(e);
 59976              }
 59977              static typeFaces(e) {
 59978                return new TypeFaces(e);
 59979              }
 59980            }
 59981            t.LocaleSetNamespace = LocaleSetNamespace;
 59982          },
 59983          (e, t, a) => {
 59984            Object.defineProperty(t, "__esModule", { value: !0 });
 59985            t.SignatureNamespace = void 0;
 59986            var r = a(81),
 59987              n = a(87);
 59988            const i = r.NamespaceIds.signature.id;
 59989            class Signature extends n.XFAObject {
 59990              constructor(e) {
 59991                super(i, "signature", !0);
 59992              }
 59993            }
 59994            class SignatureNamespace {
 59995              static [r.$buildXFAObject](e, t) {
 59996                if (SignatureNamespace.hasOwnProperty(e))
 59997                  return SignatureNamespace[e](t);
 59998              }
 59999              static signature(e) {
 60000                return new Signature(e);
 60001              }
 60002            }
 60003            t.SignatureNamespace = SignatureNamespace;
 60004          },
 60005          (e, t, a) => {
 60006            Object.defineProperty(t, "__esModule", { value: !0 });
 60007            t.StylesheetNamespace = void 0;
 60008            var r = a(81),
 60009              n = a(87);
 60010            const i = r.NamespaceIds.stylesheet.id;
 60011            class Stylesheet extends n.XFAObject {
 60012              constructor(e) {
 60013                super(i, "stylesheet", !0);
 60014              }
 60015            }
 60016            class StylesheetNamespace {
 60017              static [r.$buildXFAObject](e, t) {
 60018                if (StylesheetNamespace.hasOwnProperty(e))
 60019                  return StylesheetNamespace[e](t);
 60020              }
 60021              static stylesheet(e) {
 60022                return new Stylesheet(e);
 60023              }
 60024            }
 60025            t.StylesheetNamespace = StylesheetNamespace;
 60026          },
 60027          (e, t, a) => {
 60028            Object.defineProperty(t, "__esModule", { value: !0 });
 60029            t.XdpNamespace = void 0;
 60030            var r = a(81),
 60031              n = a(78),
 60032              i = a(87);
 60033            const s = r.NamespaceIds.xdp.id;
 60034            class Xdp extends i.XFAObject {
 60035              constructor(e) {
 60036                super(s, "xdp", !0);
 60037                this.uuid = e.uuid || "";
 60038                this.timeStamp = e.timeStamp || "";
 60039                this.config = null;
 60040                this.connectionSet = null;
 60041                this.datasets = null;
 60042                this.localeSet = null;
 60043                this.stylesheet = new i.XFAObjectArray();
 60044                this.template = null;
 60045              }
 60046              [n.$onChildCheck](e) {
 60047                const t = r.NamespaceIds[e[n.$nodeName]];
 60048                return t && e[n.$namespaceId] === t.id;
 60049              }
 60050            }
 60051            class XdpNamespace {
 60052              static [r.$buildXFAObject](e, t) {
 60053                if (XdpNamespace.hasOwnProperty(e)) return XdpNamespace[e](t);
 60054              }
 60055              static xdp(e) {
 60056                return new Xdp(e);
 60057              }
 60058            }
 60059            t.XdpNamespace = XdpNamespace;
 60060          },
 60061          (e, t, a) => {
 60062            Object.defineProperty(t, "__esModule", { value: !0 });
 60063            t.XhtmlNamespace = void 0;
 60064            var r = a(78),
 60065              n = a(81),
 60066              i = a(83),
 60067              s = a(84),
 60068              o = a(87);
 60069            const c = n.NamespaceIds.xhtml.id,
 60070              l = Symbol(),
 60071              h = new Set([
 60072                "color",
 60073                "font",
 60074                "font-family",
 60075                "font-size",
 60076                "font-stretch",
 60077                "font-style",
 60078                "font-weight",
 60079                "margin",
 60080                "margin-bottom",
 60081                "margin-left",
 60082                "margin-right",
 60083                "margin-top",
 60084                "letter-spacing",
 60085                "line-height",
 60086                "orphans",
 60087                "page-break-after",
 60088                "page-break-before",
 60089                "page-break-inside",
 60090                "tab-interval",
 60091                "tab-stop",
 60092                "text-align",
 60093                "text-decoration",
 60094                "text-indent",
 60095                "vertical-align",
 60096                "widows",
 60097                "kerning-mode",
 60098                "xfa-font-horizontal-scale",
 60099                "xfa-font-vertical-scale",
 60100                "xfa-spacerun",
 60101                "xfa-tab-stops",
 60102              ]),
 60103              u = new Map([
 60104                ["page-break-after", "breakAfter"],
 60105                ["page-break-before", "breakBefore"],
 60106                ["page-break-inside", "breakInside"],
 60107                ["kerning-mode", (e) => ("none" === e ? "none" : "normal")],
 60108                [
 60109                  "xfa-font-horizontal-scale",
 60110                  (e) =>
 60111                    `scaleX(${Math.max(0, Math.min(parseInt(e) / 100)).toFixed(
 60112                      2,
 60113                    )})`,
 60114                ],
 60115                [
 60116                  "xfa-font-vertical-scale",
 60117                  (e) =>
 60118                    `scaleY(${Math.max(0, Math.min(parseInt(e) / 100)).toFixed(
 60119                      2,
 60120                    )})`,
 60121                ],
 60122                ["xfa-spacerun", ""],
 60123                ["xfa-tab-stops", ""],
 60124                [
 60125                  "font-size",
 60126                  (e, t) => {
 60127                    e = t.fontSize = (0, s.getMeasurement)(e);
 60128                    return (0, i.measureToString)(0.99 * e);
 60129                  },
 60130                ],
 60131                [
 60132                  "letter-spacing",
 60133                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60134                ],
 60135                [
 60136                  "line-height",
 60137                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60138                ],
 60139                [
 60140                  "margin",
 60141                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60142                ],
 60143                [
 60144                  "margin-bottom",
 60145                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60146                ],
 60147                [
 60148                  "margin-left",
 60149                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60150                ],
 60151                [
 60152                  "margin-right",
 60153                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60154                ],
 60155                [
 60156                  "margin-top",
 60157                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60158                ],
 60159                [
 60160                  "text-indent",
 60161                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60162                ],
 60163                ["font-family", (e) => e],
 60164                [
 60165                  "vertical-align",
 60166                  (e) => (0, i.measureToString)((0, s.getMeasurement)(e)),
 60167                ],
 60168              ]),
 60169              d = /\s+/g,
 60170              f = /[\r\n]+/g,
 60171              g = /\r\n?/g;
 60172            function mapStyle(e, t, a) {
 60173              const n = Object.create(null);
 60174              if (!e) return n;
 60175              const o = Object.create(null);
 60176              for (const [t, a] of e.split(";").map((e) => e.split(":", 2))) {
 60177                const e = u.get(t);
 60178                if ("" === e) continue;
 60179                let r = a;
 60180                e && (r = "string" == typeof e ? e : e(a, o));
 60181                t.endsWith("scale")
 60182                  ? (n.transform = n.transform ? `${n[t]} ${r}` : r)
 60183                  : (n[t.replaceAll(/-([a-zA-Z])/g, (e, t) => t.toUpperCase())] =
 60184                      r);
 60185              }
 60186              n.fontFamily &&
 60187                (0, i.setFontFamily)(
 60188                  {
 60189                    typeface: n.fontFamily,
 60190                    weight: n.fontWeight || "normal",
 60191                    posture: n.fontStyle || "normal",
 60192                    size: o.fontSize || 0,
 60193                  },
 60194                  t,
 60195                  t[r.$globalData].fontFinder,
 60196                  n,
 60197                );
 60198              if (
 60199                a &&
 60200                n.verticalAlign &&
 60201                "0px" !== n.verticalAlign &&
 60202                n.fontSize
 60203              ) {
 60204                const e = 0.583,
 60205                  t = 0.333,
 60206                  a = (0, s.getMeasurement)(n.fontSize);
 60207                n.fontSize = (0, i.measureToString)(a * e);
 60208                n.verticalAlign = (0, i.measureToString)(
 60209                  Math.sign((0, s.getMeasurement)(n.verticalAlign)) * a * t,
 60210                );
 60211              }
 60212              a &&
 60213                n.fontSize &&
 60214                (n.fontSize = `calc(${n.fontSize} * var(--scale-factor))`);
 60215              (0, i.fixTextIndent)(n);
 60216              return n;
 60217            }
 60218            const p = new Set(["body", "html"]);
 60219            class XhtmlObject extends o.XmlObject {
 60220              constructor(e, t) {
 60221                super(c, t);
 60222                this[l] = !1;
 60223                this.style = e.style || "";
 60224              }
 60225              [r.$clean](e) {
 60226                super[r.$clean](e);
 60227                this.style = (function checkStyle(e) {
 60228                  return e.style
 60229                    ? e.style
 60230                        .trim()
 60231                        .split(/\s*;\s*/)
 60232                        .filter((e) => !!e)
 60233                        .map((e) => e.split(/\s*:\s*/, 2))
 60234                        .filter(([t, a]) => {
 60235                          "font-family" === t &&
 60236                            e[r.$globalData].usedTypefaces.add(a);
 60237                          return h.has(t);
 60238                        })
 60239                        .map((e) => e.join(":"))
 60240                        .join(";")
 60241                    : "";
 60242                })(this);
 60243              }
 60244              [r.$acceptWhitespace]() {
 60245                return !p.has(this[r.$nodeName]);
 60246              }
 60247              [r.$onText](e, t = !1) {
 60248                if (t) this[l] = !0;
 60249                else {
 60250                  e = e.replaceAll(f, "");
 60251                  this.style.includes("xfa-spacerun:yes") ||
 60252                    (e = e.replaceAll(d, " "));
 60253                }
 60254                e && (this[r.$content] += e);
 60255              }
 60256              [r.$pushGlyphs](e, t = !0) {
 60257                const a = Object.create(null),
 60258                  n = { top: NaN, bottom: NaN, left: NaN, right: NaN };
 60259                let i = null;
 60260                for (const [e, t] of this.style
 60261                  .split(";")
 60262                  .map((e) => e.split(":", 2)))
 60263                  switch (e) {
 60264                    case "font-family":
 60265                      a.typeface = (0, s.stripQuotes)(t);
 60266                      break;
 60267                    case "font-size":
 60268                      a.size = (0, s.getMeasurement)(t);
 60269                      break;
 60270                    case "font-weight":
 60271                      a.weight = t;
 60272                      break;
 60273                    case "font-style":
 60274                      a.posture = t;
 60275                      break;
 60276                    case "letter-spacing":
 60277                      a.letterSpacing = (0, s.getMeasurement)(t);
 60278                      break;
 60279                    case "margin":
 60280                      const e = t
 60281                        .split(/ \t/)
 60282                        .map((e) => (0, s.getMeasurement)(e));
 60283                      switch (e.length) {
 60284                        case 1:
 60285                          n.top = n.bottom = n.left = n.right = e[0];
 60286                          break;
 60287                        case 2:
 60288                          n.top = n.bottom = e[0];
 60289                          n.left = n.right = e[1];
 60290                          break;
 60291                        case 3:
 60292                          n.top = e[0];
 60293                          n.bottom = e[2];
 60294                          n.left = n.right = e[1];
 60295                          break;
 60296                        case 4:
 60297                          n.top = e[0];
 60298                          n.left = e[1];
 60299                          n.bottom = e[2];
 60300                          n.right = e[3];
 60301                      }
 60302                      break;
 60303                    case "margin-top":
 60304                      n.top = (0, s.getMeasurement)(t);
 60305                      break;
 60306                    case "margin-bottom":
 60307                      n.bottom = (0, s.getMeasurement)(t);
 60308                      break;
 60309                    case "margin-left":
 60310                      n.left = (0, s.getMeasurement)(t);
 60311                      break;
 60312                    case "margin-right":
 60313                      n.right = (0, s.getMeasurement)(t);
 60314                      break;
 60315                    case "line-height":
 60316                      i = (0, s.getMeasurement)(t);
 60317                  }
 60318                e.pushData(a, n, i);
 60319                if (this[r.$content]) e.addString(this[r.$content]);
 60320                else
 60321                  for (const t of this[r.$getChildren]())
 60322                    "#text" !== t[r.$nodeName]
 60323                      ? t[r.$pushGlyphs](e)
 60324                      : e.addString(t[r.$content]);
 60325                t && e.popFont();
 60326              }
 60327              [r.$toHTML](e) {
 60328                const t = [];
 60329                this[r.$extra] = { children: t };
 60330                this[r.$childrenToHTML]({});
 60331                if (0 === t.length && !this[r.$content])
 60332                  return s.HTMLResult.EMPTY;
 60333                let a;
 60334                a = this[l]
 60335                  ? this[r.$content]
 60336                    ? this[r.$content].replaceAll(g, "\n")
 60337                    : void 0
 60338                  : this[r.$content] || void 0;
 60339                return s.HTMLResult.success({
 60340                  name: this[r.$nodeName],
 60341                  attributes: {
 60342                    href: this.href,
 60343                    style: mapStyle(this.style, this, this[l]),
 60344                  },
 60345                  children: t,
 60346                  value: a,
 60347                });
 60348              }
 60349            }
 60350            class A extends XhtmlObject {
 60351              constructor(e) {
 60352                super(e, "a");
 60353                this.href = (0, i.fixURL)(e.href) || "";
 60354              }
 60355            }
 60356            class B extends XhtmlObject {
 60357              constructor(e) {
 60358                super(e, "b");
 60359              }
 60360              [r.$pushGlyphs](e) {
 60361                e.pushFont({ weight: "bold" });
 60362                super[r.$pushGlyphs](e);
 60363                e.popFont();
 60364              }
 60365            }
 60366            class Body extends XhtmlObject {
 60367              constructor(e) {
 60368                super(e, "body");
 60369              }
 60370              [r.$toHTML](e) {
 60371                const t = super[r.$toHTML](e),
 60372                  { html: a } = t;
 60373                if (!a) return s.HTMLResult.EMPTY;
 60374                a.name = "div";
 60375                a.attributes.class = ["xfaRich"];
 60376                return t;
 60377              }
 60378            }
 60379            class Br extends XhtmlObject {
 60380              constructor(e) {
 60381                super(e, "br");
 60382              }
 60383              [r.$text]() {
 60384                return "\n";
 60385              }
 60386              [r.$pushGlyphs](e) {
 60387                e.addString("\n");
 60388              }
 60389              [r.$toHTML](e) {
 60390                return s.HTMLResult.success({ name: "br" });
 60391              }
 60392            }
 60393            class Html extends XhtmlObject {
 60394              constructor(e) {
 60395                super(e, "html");
 60396              }
 60397              [r.$toHTML](e) {
 60398                const t = [];
 60399                this[r.$extra] = { children: t };
 60400                this[r.$childrenToHTML]({});
 60401                if (0 === t.length)
 60402                  return s.HTMLResult.success({
 60403                    name: "div",
 60404                    attributes: { class: ["xfaRich"], style: {} },
 60405                    value: this[r.$content] || "",
 60406                  });
 60407                if (1 === t.length) {
 60408                  const e = t[0];
 60409                  if (e.attributes?.class.includes("xfaRich"))
 60410                    return s.HTMLResult.success(e);
 60411                }
 60412                return s.HTMLResult.success({
 60413                  name: "div",
 60414                  attributes: { class: ["xfaRich"], style: {} },
 60415                  children: t,
 60416                });
 60417              }
 60418            }
 60419            class I extends XhtmlObject {
 60420              constructor(e) {
 60421                super(e, "i");
 60422              }
 60423              [r.$pushGlyphs](e) {
 60424                e.pushFont({ posture: "italic" });
 60425                super[r.$pushGlyphs](e);
 60426                e.popFont();
 60427              }
 60428            }
 60429            class Li extends XhtmlObject {
 60430              constructor(e) {
 60431                super(e, "li");
 60432              }
 60433            }
 60434            class Ol extends XhtmlObject {
 60435              constructor(e) {
 60436                super(e, "ol");
 60437              }
 60438            }
 60439            class P extends XhtmlObject {
 60440              constructor(e) {
 60441                super(e, "p");
 60442              }
 60443              [r.$pushGlyphs](e) {
 60444                super[r.$pushGlyphs](e, !1);
 60445                e.addString("\n");
 60446                e.addPara();
 60447                e.popFont();
 60448              }
 60449              [r.$text]() {
 60450                return this[r.$getParent]()[r.$getChildren]().at(-1) === this
 60451                  ? super[r.$text]()
 60452                  : super[r.$text]() + "\n";
 60453              }
 60454            }
 60455            class Span extends XhtmlObject {
 60456              constructor(e) {
 60457                super(e, "span");
 60458              }
 60459            }
 60460            class Sub extends XhtmlObject {
 60461              constructor(e) {
 60462                super(e, "sub");
 60463              }
 60464            }
 60465            class Sup extends XhtmlObject {
 60466              constructor(e) {
 60467                super(e, "sup");
 60468              }
 60469            }
 60470            class Ul extends XhtmlObject {
 60471              constructor(e) {
 60472                super(e, "ul");
 60473              }
 60474            }
 60475            class XhtmlNamespace {
 60476              static [n.$buildXFAObject](e, t) {
 60477                if (XhtmlNamespace.hasOwnProperty(e)) return XhtmlNamespace[e](t);
 60478              }
 60479              static a(e) {
 60480                return new A(e);
 60481              }
 60482              static b(e) {
 60483                return new B(e);
 60484              }
 60485              static body(e) {
 60486                return new Body(e);
 60487              }
 60488              static br(e) {
 60489                return new Br(e);
 60490              }
 60491              static html(e) {
 60492                return new Html(e);
 60493              }
 60494              static i(e) {
 60495                return new I(e);
 60496              }
 60497              static li(e) {
 60498                return new Li(e);
 60499              }
 60500              static ol(e) {
 60501                return new Ol(e);
 60502              }
 60503              static p(e) {
 60504                return new P(e);
 60505              }
 60506              static span(e) {
 60507                return new Span(e);
 60508              }
 60509              static sub(e) {
 60510                return new Sub(e);
 60511              }
 60512              static sup(e) {
 60513                return new Sup(e);
 60514              }
 60515              static ul(e) {
 60516                return new Ul(e);
 60517              }
 60518            }
 60519            t.XhtmlNamespace = XhtmlNamespace;
 60520          },
 60521          (e, t, a) => {
 60522            Object.defineProperty(t, "__esModule", { value: !0 });
 60523            t.UnknownNamespace = void 0;
 60524            var r = a(81),
 60525              n = a(87);
 60526            class UnknownNamespace {
 60527              constructor(e) {
 60528                this.namespaceId = e;
 60529              }
 60530              [r.$buildXFAObject](e, t) {
 60531                return new n.XmlObject(this.namespaceId, e, t);
 60532              }
 60533            }
 60534            t.UnknownNamespace = UnknownNamespace;
 60535          },
 60536          (e, t, a) => {
 60537            Object.defineProperty(t, "__esModule", { value: !0 });
 60538            t.DatasetReader = void 0;
 60539            var r = a(2),
 60540              n = a(3),
 60541              i = a(71);
 60542            function decodeString(e) {
 60543              try {
 60544                return (0, r.stringToUTF8String)(e);
 60545              } catch (t) {
 60546                (0, r.warn)(`UTF-8 decoding failed: "${t}".`);
 60547                return e;
 60548              }
 60549            }
 60550            class DatasetXMLParser extends i.SimpleXMLParser {
 60551              constructor(e) {
 60552                super(e);
 60553                this.node = null;
 60554              }
 60555              onEndElement(e) {
 60556                const t = super.onEndElement(e);
 60557                if (t && "xfa:datasets" === e) {
 60558                  this.node = t;
 60559                  throw new Error("Aborting DatasetXMLParser.");
 60560                }
 60561              }
 60562            }
 60563            t.DatasetReader = class DatasetReader {
 60564              constructor(e) {
 60565                if (e.datasets)
 60566                  this.node = new i.SimpleXMLParser({
 60567                    hasAttributes: !0,
 60568                  }).parseFromString(e.datasets).documentElement;
 60569                else {
 60570                  const t = new DatasetXMLParser({ hasAttributes: !0 });
 60571                  try {
 60572                    t.parseFromString(e["xdp:xdp"]);
 60573                  } catch {}
 60574                  this.node = t.node;
 60575                }
 60576              }
 60577              getValue(e) {
 60578                if (!this.node || !e) return "";
 60579                const t = this.node.searchNode((0, n.parseXFAPath)(e), 0);
 60580                if (!t) return "";
 60581                const a = t.firstChild;
 60582                return "value" === a?.nodeName
 60583                  ? t.children.map((e) => decodeString(e.textContent))
 60584                  : decodeString(t.textContent);
 60585              }
 60586            };
 60587          },
 60588          (e, t, a) => {
 60589            Object.defineProperty(t, "__esModule", { value: !0 });
 60590            t.XRef = void 0;
 60591            var r = a(2),
 60592              n = a(4),
 60593              i = a(16),
 60594              s = a(3),
 60595              o = a(5),
 60596              c = a(74);
 60597            t.XRef = class XRef {
 60598              #B = null;
 60599              constructor(e, t) {
 60600                this.stream = e;
 60601                this.pdfManager = t;
 60602                this.entries = [];
 60603                this._xrefStms = new Set();
 60604                this._cacheMap = new Map();
 60605                this._pendingRefs = new n.RefSet();
 60606                this._newPersistentRefNum = null;
 60607                this._newTemporaryRefNum = null;
 60608              }
 60609              getNewPersistentRef(e) {
 60610                null === this._newPersistentRefNum &&
 60611                  (this._newPersistentRefNum = this.entries.length || 1);
 60612                const t = this._newPersistentRefNum++;
 60613                this._cacheMap.set(t, e);
 60614                return n.Ref.get(t, 0);
 60615              }
 60616              getNewTemporaryRef() {
 60617                null === this._newTemporaryRefNum &&
 60618                  (this._newTemporaryRefNum = this.entries.length || 1);
 60619                return n.Ref.get(this._newTemporaryRefNum++, 0);
 60620              }
 60621              resetNewTemporaryRef() {
 60622                this._newTemporaryRefNum = null;
 60623              }
 60624              setStartXRef(e) {
 60625                this.startXRefQueue = [e];
 60626              }
 60627              parse(e = !1) {
 60628                let t, a, i;
 60629                if (e) {
 60630                  (0, r.warn)("Indexing all PDF objects");
 60631                  t = this.indexObjects();
 60632                } else t = this.readXRef();
 60633                t.assignXref(this);
 60634                this.trailer = t;
 60635                try {
 60636                  a = t.get("Encrypt");
 60637                } catch (e) {
 60638                  if (e instanceof s.MissingDataException) throw e;
 60639                  (0, r.warn)(
 60640                    `XRef.parse - Invalid "Encrypt" reference: "${e}".`,
 60641                  );
 60642                }
 60643                if (a instanceof n.Dict) {
 60644                  const e = t.get("ID"),
 60645                    r = e?.length ? e[0] : "";
 60646                  a.suppressEncryption = !0;
 60647                  this.encrypt = new c.CipherTransformFactory(
 60648                    a,
 60649                    r,
 60650                    this.pdfManager.password,
 60651                  );
 60652                }
 60653                try {
 60654                  i = t.get("Root");
 60655                } catch (e) {
 60656                  if (e instanceof s.MissingDataException) throw e;
 60657                  (0, r.warn)(`XRef.parse - Invalid "Root" reference: "${e}".`);
 60658                }
 60659                if (i instanceof n.Dict)
 60660                  try {
 60661                    if (i.get("Pages") instanceof n.Dict) {
 60662                      this.root = i;
 60663                      return;
 60664                    }
 60665                  } catch (e) {
 60666                    if (e instanceof s.MissingDataException) throw e;
 60667                    (0, r.warn)(
 60668                      `XRef.parse - Invalid "Pages" reference: "${e}".`,
 60669                    );
 60670                  }
 60671                if (!e) throw new s.XRefParseException();
 60672                throw new r.InvalidPDFException("Invalid Root reference.");
 60673              }
 60674              processXRefTable(e) {
 60675                "tableState" in this ||
 60676                  (this.tableState = {
 60677                    entryNum: 0,
 60678                    streamPos: e.lexer.stream.pos,
 60679                    parserBuf1: e.buf1,
 60680                    parserBuf2: e.buf2,
 60681                  });
 60682                const t = this.readXRefTable(e);
 60683                if (!(0, n.isCmd)(t, "trailer"))
 60684                  throw new r.FormatError(
 60685                    "Invalid XRef table: could not find trailer dictionary",
 60686                  );
 60687                let a = e.getObj();
 60688                a instanceof n.Dict || !a.dict || (a = a.dict);
 60689                if (!(a instanceof n.Dict))
 60690                  throw new r.FormatError(
 60691                    "Invalid XRef table: could not parse trailer dictionary",
 60692                  );
 60693                delete this.tableState;
 60694                return a;
 60695              }
 60696              readXRefTable(e) {
 60697                const t = e.lexer.stream,
 60698                  a = this.tableState;
 60699                t.pos = a.streamPos;
 60700                e.buf1 = a.parserBuf1;
 60701                e.buf2 = a.parserBuf2;
 60702                let i;
 60703                for (;;) {
 60704                  if (!("firstEntryNum" in a) || !("entryCount" in a)) {
 60705                    if ((0, n.isCmd)((i = e.getObj()), "trailer")) break;
 60706                    a.firstEntryNum = i;
 60707                    a.entryCount = e.getObj();
 60708                  }
 60709                  let s = a.firstEntryNum;
 60710                  const o = a.entryCount;
 60711                  if (!Number.isInteger(s) || !Number.isInteger(o))
 60712                    throw new r.FormatError(
 60713                      "Invalid XRef table: wrong types in subsection header",
 60714                    );
 60715                  for (let i = a.entryNum; i < o; i++) {
 60716                    a.streamPos = t.pos;
 60717                    a.entryNum = i;
 60718                    a.parserBuf1 = e.buf1;
 60719                    a.parserBuf2 = e.buf2;
 60720                    const c = {};
 60721                    c.offset = e.getObj();
 60722                    c.gen = e.getObj();
 60723                    const l = e.getObj();
 60724                    if (l instanceof n.Cmd)
 60725                      switch (l.cmd) {
 60726                        case "f":
 60727                          c.free = !0;
 60728                          break;
 60729                        case "n":
 60730                          c.uncompressed = !0;
 60731                      }
 60732                    if (
 60733                      !Number.isInteger(c.offset) ||
 60734                      !Number.isInteger(c.gen) ||
 60735                      (!c.free && !c.uncompressed)
 60736                    )
 60737                      throw new r.FormatError(
 60738                        `Invalid entry in XRef subsection: ${s}, ${o}`,
 60739                      );
 60740                    0 === i && c.free && 1 === s && (s = 0);
 60741                    this.entries[i + s] || (this.entries[i + s] = c);
 60742                  }
 60743                  a.entryNum = 0;
 60744                  a.streamPos = t.pos;
 60745                  a.parserBuf1 = e.buf1;
 60746                  a.parserBuf2 = e.buf2;
 60747                  delete a.firstEntryNum;
 60748                  delete a.entryCount;
 60749                }
 60750                if (this.entries[0] && !this.entries[0].free)
 60751                  throw new r.FormatError(
 60752                    "Invalid XRef table: unexpected first object",
 60753                  );
 60754                return i;
 60755              }
 60756              processXRefStream(e) {
 60757                if (!("streamState" in this)) {
 60758                  const t = e.dict,
 60759                    a = t.get("W");
 60760                  let r = t.get("Index");
 60761                  r || (r = [0, t.get("Size")]);
 60762                  this.streamState = {
 60763                    entryRanges: r,
 60764                    byteWidths: a,
 60765                    entryNum: 0,
 60766                    streamPos: e.pos,
 60767                  };
 60768                }
 60769                this.readXRefStream(e);
 60770                delete this.streamState;
 60771                return e.dict;
 60772              }
 60773              readXRefStream(e) {
 60774                const t = this.streamState;
 60775                e.pos = t.streamPos;
 60776                const [a, n, i] = t.byteWidths,
 60777                  s = t.entryRanges;
 60778                for (; s.length > 0; ) {
 60779                  const [o, c] = s;
 60780                  if (!Number.isInteger(o) || !Number.isInteger(c))
 60781                    throw new r.FormatError(
 60782                      `Invalid XRef range fields: ${o}, ${c}`,
 60783                    );
 60784                  if (
 60785                    !Number.isInteger(a) ||
 60786                    !Number.isInteger(n) ||
 60787                    !Number.isInteger(i)
 60788                  )
 60789                    throw new r.FormatError(
 60790                      `Invalid XRef entry fields length: ${o}, ${c}`,
 60791                    );
 60792                  for (let s = t.entryNum; s < c; ++s) {
 60793                    t.entryNum = s;
 60794                    t.streamPos = e.pos;
 60795                    let c = 0,
 60796                      l = 0,
 60797                      h = 0;
 60798                    for (let t = 0; t < a; ++t) {
 60799                      const t = e.getByte();
 60800                      if (-1 === t)
 60801                        throw new r.FormatError(
 60802                          "Invalid XRef byteWidths 'type'.",
 60803                        );
 60804                      c = (c << 8) | t;
 60805                    }
 60806                    0 === a && (c = 1);
 60807                    for (let t = 0; t < n; ++t) {
 60808                      const t = e.getByte();
 60809                      if (-1 === t)
 60810                        throw new r.FormatError(
 60811                          "Invalid XRef byteWidths 'offset'.",
 60812                        );
 60813                      l = (l << 8) | t;
 60814                    }
 60815                    for (let t = 0; t < i; ++t) {
 60816                      const t = e.getByte();
 60817                      if (-1 === t)
 60818                        throw new r.FormatError(
 60819                          "Invalid XRef byteWidths 'generation'.",
 60820                        );
 60821                      h = (h << 8) | t;
 60822                    }
 60823                    const u = {};
 60824                    u.offset = l;
 60825                    u.gen = h;
 60826                    switch (c) {
 60827                      case 0:
 60828                        u.free = !0;
 60829                        break;
 60830                      case 1:
 60831                        u.uncompressed = !0;
 60832                        break;
 60833                      case 2:
 60834                        break;
 60835                      default:
 60836                        throw new r.FormatError(`Invalid XRef entry type: ${c}`);
 60837                    }
 60838                    this.entries[o + s] || (this.entries[o + s] = u);
 60839                  }
 60840                  t.entryNum = 0;
 60841                  t.streamPos = e.pos;
 60842                  s.splice(0, 2);
 60843                }
 60844              }
 60845              indexObjects() {
 60846                function readToken(e, t) {
 60847                  let a = "",
 60848                    r = e[t];
 60849                  for (
 60850                    ;
 60851                    10 !== r && 13 !== r && 60 !== r && !(++t >= e.length);
 60852  
 60853                  ) {
 60854                    a += String.fromCharCode(r);
 60855                    r = e[t];
 60856                  }
 60857                  return a;
 60858                }
 60859                function skipUntil(e, t, a) {
 60860                  const r = a.length,
 60861                    n = e.length;
 60862                  let i = 0;
 60863                  for (; t < n; ) {
 60864                    let n = 0;
 60865                    for (; n < r && e[t + n] === a[n]; ) ++n;
 60866                    if (n >= r) break;
 60867                    t++;
 60868                    i++;
 60869                  }
 60870                  return i;
 60871                }
 60872                const e = /\b(endobj|\d+\s+\d+\s+obj|xref|trailer\s*<<)\b/g,
 60873                  t = /\b(startxref|\d+\s+\d+\s+obj)\b/g,
 60874                  a = /^(\d+)\s+(\d+)\s+obj\b/,
 60875                  o = new Uint8Array([116, 114, 97, 105, 108, 101, 114]),
 60876                  c = new Uint8Array([
 60877                    115, 116, 97, 114, 116, 120, 114, 101, 102,
 60878                  ]),
 60879                  l = new Uint8Array([47, 88, 82, 101, 102]);
 60880                this.entries.length = 0;
 60881                this._cacheMap.clear();
 60882                const h = this.stream;
 60883                h.pos = 0;
 60884                const u = h.getBytes(),
 60885                  d = (0, r.bytesToString)(u),
 60886                  f = u.length;
 60887                let g = h.start;
 60888                const p = [],
 60889                  m = [];
 60890                for (; g < f; ) {
 60891                  let n = u[g];
 60892                  if (9 === n || 10 === n || 13 === n || 32 === n) {
 60893                    ++g;
 60894                    continue;
 60895                  }
 60896                  if (37 === n) {
 60897                    do {
 60898                      ++g;
 60899                      if (g >= f) break;
 60900                      n = u[g];
 60901                    } while (10 !== n && 13 !== n);
 60902                    continue;
 60903                  }
 60904                  const b = readToken(u, g);
 60905                  let y;
 60906                  if (
 60907                    b.startsWith("xref") &&
 60908                    (4 === b.length || /\s/.test(b[4]))
 60909                  ) {
 60910                    g += skipUntil(u, g, o);
 60911                    p.push(g);
 60912                    g += skipUntil(u, g, c);
 60913                  } else if ((y = a.exec(b))) {
 60914                    const t = 0 | y[1],
 60915                      a = 0 | y[2],
 60916                      n = g + b.length;
 60917                    let o,
 60918                      c = !1;
 60919                    if (this.entries[t]) {
 60920                      if (this.entries[t].gen === a)
 60921                        try {
 60922                          new i.Parser({
 60923                            lexer: new i.Lexer(h.makeSubStream(n)),
 60924                          }).getObj();
 60925                          c = !0;
 60926                        } catch (e) {
 60927                          e instanceof s.ParserEOFException
 60928                            ? (0, r.warn)(
 60929                                `indexObjects -- checking object (${b}): "${e}".`,
 60930                              )
 60931                            : (c = !0);
 60932                        }
 60933                    } else c = !0;
 60934                    c &&
 60935                      (this.entries[t] = {
 60936                        offset: g - h.start,
 60937                        gen: a,
 60938                        uncompressed: !0,
 60939                      });
 60940                    e.lastIndex = n;
 60941                    const p = e.exec(d);
 60942                    if (p) {
 60943                      o = e.lastIndex + 1 - g;
 60944                      if ("endobj" !== p[1]) {
 60945                        (0, r.warn)(
 60946                          `indexObjects: Found "${p[1]}" inside of another "obj", caused by missing "endobj" -- trying to recover.`,
 60947                        );
 60948                        o -= p[1].length + 1;
 60949                      }
 60950                    } else o = f - g;
 60951                    const w = u.subarray(g, g + o),
 60952                      S = skipUntil(w, 0, l);
 60953                    if (S < o && w[S + 5] < 64) {
 60954                      m.push(g - h.start);
 60955                      this._xrefStms.add(g - h.start);
 60956                    }
 60957                    g += o;
 60958                  } else if (
 60959                    b.startsWith("trailer") &&
 60960                    (7 === b.length || /\s/.test(b[7]))
 60961                  ) {
 60962                    p.push(g);
 60963                    const e = g + b.length;
 60964                    let a;
 60965                    t.lastIndex = e;
 60966                    const n = t.exec(d);
 60967                    if (n) {
 60968                      a = t.lastIndex + 1 - g;
 60969                      if ("startxref" !== n[1]) {
 60970                        (0, r.warn)(
 60971                          `indexObjects: Found "${n[1]}" after "trailer", caused by missing "startxref" -- trying to recover.`,
 60972                        );
 60973                        a -= n[1].length + 1;
 60974                      }
 60975                    } else a = f - g;
 60976                    g += a;
 60977                  } else g += b.length + 1;
 60978                }
 60979                for (const e of m) {
 60980                  this.startXRefQueue.push(e);
 60981                  this.readXRef(!0);
 60982                }
 60983                const b = [];
 60984                let y,
 60985                  w,
 60986                  S = !1;
 60987                for (const e of p) {
 60988                  h.pos = e;
 60989                  const t = new i.Parser({
 60990                      lexer: new i.Lexer(h),
 60991                      xref: this,
 60992                      allowStreams: !0,
 60993                      recoveryMode: !0,
 60994                    }),
 60995                    a = t.getObj();
 60996                  if (!(0, n.isCmd)(a, "trailer")) continue;
 60997                  const r = t.getObj();
 60998                  if (r instanceof n.Dict) {
 60999                    b.push(r);
 61000                    r.has("Encrypt") && (S = !0);
 61001                  }
 61002                }
 61003                for (const e of [...b, "genFallback", ...b]) {
 61004                  if ("genFallback" === e) {
 61005                    if (!w) break;
 61006                    this._generationFallback = !0;
 61007                    continue;
 61008                  }
 61009                  let t = !1;
 61010                  try {
 61011                    const a = e.get("Root");
 61012                    if (!(a instanceof n.Dict)) continue;
 61013                    const r = a.get("Pages");
 61014                    if (!(r instanceof n.Dict)) continue;
 61015                    const i = r.get("Count");
 61016                    Number.isInteger(i) && (t = !0);
 61017                  } catch (e) {
 61018                    w = e;
 61019                    continue;
 61020                  }
 61021                  if (t && (!S || e.has("Encrypt")) && e.has("ID")) return e;
 61022                  y = e;
 61023                }
 61024                if (y) return y;
 61025                if (this.topDict) return this.topDict;
 61026                throw new r.InvalidPDFException("Invalid PDF structure.");
 61027              }
 61028              readXRef(e = !1) {
 61029                const t = this.stream,
 61030                  a = new Set();
 61031                for (; this.startXRefQueue.length; ) {
 61032                  try {
 61033                    const e = this.startXRefQueue[0];
 61034                    if (a.has(e)) {
 61035                      (0, r.warn)(
 61036                        "readXRef - skipping XRef table since it was already parsed.",
 61037                      );
 61038                      this.startXRefQueue.shift();
 61039                      continue;
 61040                    }
 61041                    a.add(e);
 61042                    t.pos = e + t.start;
 61043                    const s = new i.Parser({
 61044                      lexer: new i.Lexer(t),
 61045                      xref: this,
 61046                      allowStreams: !0,
 61047                    });
 61048                    let c,
 61049                      l = s.getObj();
 61050                    if ((0, n.isCmd)(l, "xref")) {
 61051                      c = this.processXRefTable(s);
 61052                      this.topDict || (this.topDict = c);
 61053                      l = c.get("XRefStm");
 61054                      if (Number.isInteger(l) && !this._xrefStms.has(l)) {
 61055                        this._xrefStms.add(l);
 61056                        this.startXRefQueue.push(l);
 61057                        this.#B ??= l;
 61058                      }
 61059                    } else {
 61060                      if (!Number.isInteger(l))
 61061                        throw new r.FormatError("Invalid XRef stream header");
 61062                      if (
 61063                        !(
 61064                          Number.isInteger(s.getObj()) &&
 61065                          (0, n.isCmd)(s.getObj(), "obj") &&
 61066                          (l = s.getObj()) instanceof o.BaseStream
 61067                        )
 61068                      )
 61069                        throw new r.FormatError("Invalid XRef stream");
 61070                      c = this.processXRefStream(l);
 61071                      this.topDict || (this.topDict = c);
 61072                      if (!c)
 61073                        throw new r.FormatError("Failed to read XRef stream");
 61074                    }
 61075                    l = c.get("Prev");
 61076                    Number.isInteger(l)
 61077                      ? this.startXRefQueue.push(l)
 61078                      : l instanceof n.Ref && this.startXRefQueue.push(l.num);
 61079                  } catch (e) {
 61080                    if (e instanceof s.MissingDataException) throw e;
 61081                    (0, r.info)("(while reading XRef): " + e);
 61082                  }
 61083                  this.startXRefQueue.shift();
 61084                }
 61085                if (this.topDict) return this.topDict;
 61086                if (!e) throw new s.XRefParseException();
 61087              }
 61088              get lastXRefStreamPos() {
 61089                return (
 61090                  this.#B ??
 61091                  (this._xrefStms.size > 0 ? Math.max(...this._xrefStms) : null)
 61092                );
 61093              }
 61094              getEntry(e) {
 61095                const t = this.entries[e];
 61096                return t && !t.free && t.offset ? t : null;
 61097              }
 61098              fetchIfRef(e, t = !1) {
 61099                return e instanceof n.Ref ? this.fetch(e, t) : e;
 61100              }
 61101              fetch(e, t = !1) {
 61102                if (!(e instanceof n.Ref))
 61103                  throw new Error("ref object is not a reference");
 61104                const a = e.num,
 61105                  i = this._cacheMap.get(a);
 61106                if (void 0 !== i) {
 61107                  i instanceof n.Dict && !i.objId && (i.objId = e.toString());
 61108                  return i;
 61109                }
 61110                let s = this.getEntry(a);
 61111                if (null === s) {
 61112                  this._cacheMap.set(a, s);
 61113                  return s;
 61114                }
 61115                if (this._pendingRefs.has(e)) {
 61116                  this._pendingRefs.remove(e);
 61117                  (0, r.warn)(`Ignoring circular reference: ${e}.`);
 61118                  return n.CIRCULAR_REF;
 61119                }
 61120                this._pendingRefs.put(e);
 61121                try {
 61122                  s = s.uncompressed
 61123                    ? this.fetchUncompressed(e, s, t)
 61124                    : this.fetchCompressed(e, s, t);
 61125                  this._pendingRefs.remove(e);
 61126                } catch (t) {
 61127                  this._pendingRefs.remove(e);
 61128                  throw t;
 61129                }
 61130                s instanceof n.Dict
 61131                  ? (s.objId = e.toString())
 61132                  : s instanceof o.BaseStream && (s.dict.objId = e.toString());
 61133                return s;
 61134              }
 61135              fetchUncompressed(e, t, a = !1) {
 61136                const c = e.gen;
 61137                let l = e.num;
 61138                if (t.gen !== c) {
 61139                  const i = `Inconsistent generation in XRef: ${e}`;
 61140                  if (this._generationFallback && t.gen < c) {
 61141                    (0, r.warn)(i);
 61142                    return this.fetchUncompressed(n.Ref.get(l, t.gen), t, a);
 61143                  }
 61144                  throw new s.XRefEntryException(i);
 61145                }
 61146                const h = this.stream.makeSubStream(t.offset + this.stream.start),
 61147                  u = new i.Parser({
 61148                    lexer: new i.Lexer(h),
 61149                    xref: this,
 61150                    allowStreams: !0,
 61151                  }),
 61152                  d = u.getObj(),
 61153                  f = u.getObj(),
 61154                  g = u.getObj();
 61155                if (d !== l || f !== c || !(g instanceof n.Cmd))
 61156                  throw new s.XRefEntryException(
 61157                    `Bad (uncompressed) XRef entry: ${e}`,
 61158                  );
 61159                if ("obj" !== g.cmd) {
 61160                  if (g.cmd.startsWith("obj")) {
 61161                    l = parseInt(g.cmd.substring(3), 10);
 61162                    if (!Number.isNaN(l)) return l;
 61163                  }
 61164                  throw new s.XRefEntryException(
 61165                    `Bad (uncompressed) XRef entry: ${e}`,
 61166                  );
 61167                }
 61168                (t =
 61169                  this.encrypt && !a
 61170                    ? u.getObj(this.encrypt.createCipherTransform(l, c))
 61171                    : u.getObj()) instanceof o.BaseStream ||
 61172                  this._cacheMap.set(l, t);
 61173                return t;
 61174              }
 61175              fetchCompressed(e, t, a = !1) {
 61176                const c = t.offset,
 61177                  l = this.fetch(n.Ref.get(c, 0));
 61178                if (!(l instanceof o.BaseStream))
 61179                  throw new r.FormatError("bad ObjStm stream");
 61180                const h = l.dict.get("First"),
 61181                  u = l.dict.get("N");
 61182                if (!Number.isInteger(h) || !Number.isInteger(u))
 61183                  throw new r.FormatError(
 61184                    "invalid first and n parameters for ObjStm stream",
 61185                  );
 61186                let d = new i.Parser({
 61187                  lexer: new i.Lexer(l),
 61188                  xref: this,
 61189                  allowStreams: !0,
 61190                });
 61191                const f = new Array(u),
 61192                  g = new Array(u);
 61193                for (let e = 0; e < u; ++e) {
 61194                  const t = d.getObj();
 61195                  if (!Number.isInteger(t))
 61196                    throw new r.FormatError(
 61197                      `invalid object number in the ObjStm stream: ${t}`,
 61198                    );
 61199                  const a = d.getObj();
 61200                  if (!Number.isInteger(a))
 61201                    throw new r.FormatError(
 61202                      `invalid object offset in the ObjStm stream: ${a}`,
 61203                    );
 61204                  f[e] = t;
 61205                  g[e] = a;
 61206                }
 61207                const p = (l.start || 0) + h,
 61208                  m = new Array(u);
 61209                for (let e = 0; e < u; ++e) {
 61210                  const t = e < u - 1 ? g[e + 1] - g[e] : void 0;
 61211                  if (t < 0)
 61212                    throw new r.FormatError(
 61213                      "Invalid offset in the ObjStm stream.",
 61214                    );
 61215                  d = new i.Parser({
 61216                    lexer: new i.Lexer(l.makeSubStream(p + g[e], t, l.dict)),
 61217                    xref: this,
 61218                    allowStreams: !0,
 61219                  });
 61220                  const a = d.getObj();
 61221                  m[e] = a;
 61222                  if (a instanceof o.BaseStream) continue;
 61223                  const n = f[e],
 61224                    s = this.entries[n];
 61225                  s && s.offset === c && s.gen === e && this._cacheMap.set(n, a);
 61226                }
 61227                if (void 0 === (t = m[t.gen]))
 61228                  throw new s.XRefEntryException(
 61229                    `Bad (compressed) XRef entry: ${e}`,
 61230                  );
 61231                return t;
 61232              }
 61233              async fetchIfRefAsync(e, t) {
 61234                return e instanceof n.Ref ? this.fetchAsync(e, t) : e;
 61235              }
 61236              async fetchAsync(e, t) {
 61237                try {
 61238                  return this.fetch(e, t);
 61239                } catch (a) {
 61240                  if (!(a instanceof s.MissingDataException)) throw a;
 61241                  await this.pdfManager.requestRange(a.begin, a.end);
 61242                  return this.fetchAsync(e, t);
 61243                }
 61244              }
 61245              getCatalogObj() {
 61246                return this.root;
 61247              }
 61248            };
 61249          },
 61250          (e, t, a) => {
 61251            Object.defineProperty(t, "__esModule", { value: !0 });
 61252            t.MessageHandler = void 0;
 61253            var r = a(2);
 61254            const n = 1,
 61255              i = 2,
 61256              s = 1,
 61257              o = 2,
 61258              c = 3,
 61259              l = 4,
 61260              h = 5,
 61261              u = 6,
 61262              d = 7,
 61263              f = 8;
 61264            function wrapReason(e) {
 61265              e instanceof Error ||
 61266                ("object" == typeof e && null !== e) ||
 61267                (0, r.unreachable)(
 61268                  'wrapReason: Expected "reason" to be a (possibly cloned) Error.',
 61269                );
 61270              switch (e.name) {
 61271                case "AbortException":
 61272                  return new r.AbortException(e.message);
 61273                case "MissingPDFException":
 61274                  return new r.MissingPDFException(e.message);
 61275                case "PasswordException":
 61276                  return new r.PasswordException(e.message, e.code);
 61277                case "UnexpectedResponseException":
 61278                  return new r.UnexpectedResponseException(e.message, e.status);
 61279                case "UnknownErrorException":
 61280                  return new r.UnknownErrorException(e.message, e.details);
 61281                default:
 61282                  return new r.UnknownErrorException(e.message, e.toString());
 61283              }
 61284            }
 61285            t.MessageHandler = class MessageHandler {
 61286              constructor(e, t, a) {
 61287                this.sourceName = e;
 61288                this.targetName = t;
 61289                this.comObj = a;
 61290                this.callbackId = 1;
 61291                this.streamId = 1;
 61292                this.streamSinks = Object.create(null);
 61293                this.streamControllers = Object.create(null);
 61294                this.callbackCapabilities = Object.create(null);
 61295                this.actionHandler = Object.create(null);
 61296                this._onComObjOnMessage = (e) => {
 61297                  const t = e.data;
 61298                  if (t.targetName !== this.sourceName) return;
 61299                  if (t.stream) {
 61300                    this.#E(t);
 61301                    return;
 61302                  }
 61303                  if (t.callback) {
 61304                    const e = t.callbackId,
 61305                      a = this.callbackCapabilities[e];
 61306                    if (!a) throw new Error(`Cannot resolve callback ${e}`);
 61307                    delete this.callbackCapabilities[e];
 61308                    if (t.callback === n) a.resolve(t.data);
 61309                    else {
 61310                      if (t.callback !== i)
 61311                        throw new Error("Unexpected callback case");
 61312                      a.reject(wrapReason(t.reason));
 61313                    }
 61314                    return;
 61315                  }
 61316                  const r = this.actionHandler[t.action];
 61317                  if (!r)
 61318                    throw new Error(`Unknown action from worker: ${t.action}`);
 61319                  if (t.callbackId) {
 61320                    const e = this.sourceName,
 61321                      s = t.sourceName;
 61322                    new Promise(function (e) {
 61323                      e(r(t.data));
 61324                    }).then(
 61325                      function (r) {
 61326                        a.postMessage({
 61327                          sourceName: e,
 61328                          targetName: s,
 61329                          callback: n,
 61330                          callbackId: t.callbackId,
 61331                          data: r,
 61332                        });
 61333                      },
 61334                      function (r) {
 61335                        a.postMessage({
 61336                          sourceName: e,
 61337                          targetName: s,
 61338                          callback: i,
 61339                          callbackId: t.callbackId,
 61340                          reason: wrapReason(r),
 61341                        });
 61342                      },
 61343                    );
 61344                  } else t.streamId ? this.#N(t) : r(t.data);
 61345                };
 61346                a.addEventListener("message", this._onComObjOnMessage);
 61347              }
 61348              on(e, t) {
 61349                const a = this.actionHandler;
 61350                if (a[e])
 61351                  throw new Error(`There is already an actionName called "${e}"`);
 61352                a[e] = t;
 61353              }
 61354              send(e, t, a) {
 61355                this.comObj.postMessage(
 61356                  {
 61357                    sourceName: this.sourceName,
 61358                    targetName: this.targetName,
 61359                    action: e,
 61360                    data: t,
 61361                  },
 61362                  a,
 61363                );
 61364              }
 61365              sendWithPromise(e, t, a) {
 61366                const n = this.callbackId++,
 61367                  i = new r.PromiseCapability();
 61368                this.callbackCapabilities[n] = i;
 61369                try {
 61370                  this.comObj.postMessage(
 61371                    {
 61372                      sourceName: this.sourceName,
 61373                      targetName: this.targetName,
 61374                      action: e,
 61375                      callbackId: n,
 61376                      data: t,
 61377                    },
 61378                    a,
 61379                  );
 61380                } catch (e) {
 61381                  i.reject(e);
 61382                }
 61383                return i.promise;
 61384              }
 61385              sendWithStream(e, t, a, n) {
 61386                const i = this.streamId++,
 61387                  o = this.sourceName,
 61388                  c = this.targetName,
 61389                  l = this.comObj;
 61390                return new ReadableStream(
 61391                  {
 61392                    start: (a) => {
 61393                      const s = new r.PromiseCapability();
 61394                      this.streamControllers[i] = {
 61395                        controller: a,
 61396                        startCall: s,
 61397                        pullCall: null,
 61398                        cancelCall: null,
 61399                        isClosed: !1,
 61400                      };
 61401                      l.postMessage(
 61402                        {
 61403                          sourceName: o,
 61404                          targetName: c,
 61405                          action: e,
 61406                          streamId: i,
 61407                          data: t,
 61408                          desiredSize: a.desiredSize,
 61409                        },
 61410                        n,
 61411                      );
 61412                      return s.promise;
 61413                    },
 61414                    pull: (e) => {
 61415                      const t = new r.PromiseCapability();
 61416                      this.streamControllers[i].pullCall = t;
 61417                      l.postMessage({
 61418                        sourceName: o,
 61419                        targetName: c,
 61420                        stream: u,
 61421                        streamId: i,
 61422                        desiredSize: e.desiredSize,
 61423                      });
 61424                      return t.promise;
 61425                    },
 61426                    cancel: (e) => {
 61427                      (0, r.assert)(
 61428                        e instanceof Error,
 61429                        "cancel must have a valid reason",
 61430                      );
 61431                      const t = new r.PromiseCapability();
 61432                      this.streamControllers[i].cancelCall = t;
 61433                      this.streamControllers[i].isClosed = !0;
 61434                      l.postMessage({
 61435                        sourceName: o,
 61436                        targetName: c,
 61437                        stream: s,
 61438                        streamId: i,
 61439                        reason: wrapReason(e),
 61440                      });
 61441                      return t.promise;
 61442                    },
 61443                  },
 61444                  a,
 61445                );
 61446              }
 61447              #N(e) {
 61448                const t = e.streamId,
 61449                  a = this.sourceName,
 61450                  n = e.sourceName,
 61451                  i = this.comObj,
 61452                  s = this,
 61453                  o = this.actionHandler[e.action],
 61454                  u = {
 61455                    enqueue(e, s = 1, o) {
 61456                      if (this.isCancelled) return;
 61457                      const c = this.desiredSize;
 61458                      this.desiredSize -= s;
 61459                      if (c > 0 && this.desiredSize <= 0) {
 61460                        this.sinkCapability = new r.PromiseCapability();
 61461                        this.ready = this.sinkCapability.promise;
 61462                      }
 61463                      i.postMessage(
 61464                        {
 61465                          sourceName: a,
 61466                          targetName: n,
 61467                          stream: l,
 61468                          streamId: t,
 61469                          chunk: e,
 61470                        },
 61471                        o,
 61472                      );
 61473                    },
 61474                    close() {
 61475                      if (!this.isCancelled) {
 61476                        this.isCancelled = !0;
 61477                        i.postMessage({
 61478                          sourceName: a,
 61479                          targetName: n,
 61480                          stream: c,
 61481                          streamId: t,
 61482                        });
 61483                        delete s.streamSinks[t];
 61484                      }
 61485                    },
 61486                    error(e) {
 61487                      (0, r.assert)(
 61488                        e instanceof Error,
 61489                        "error must have a valid reason",
 61490                      );
 61491                      if (!this.isCancelled) {
 61492                        this.isCancelled = !0;
 61493                        i.postMessage({
 61494                          sourceName: a,
 61495                          targetName: n,
 61496                          stream: h,
 61497                          streamId: t,
 61498                          reason: wrapReason(e),
 61499                        });
 61500                      }
 61501                    },
 61502                    sinkCapability: new r.PromiseCapability(),
 61503                    onPull: null,
 61504                    onCancel: null,
 61505                    isCancelled: !1,
 61506                    desiredSize: e.desiredSize,
 61507                    ready: null,
 61508                  };
 61509                u.sinkCapability.resolve();
 61510                u.ready = u.sinkCapability.promise;
 61511                this.streamSinks[t] = u;
 61512                new Promise(function (t) {
 61513                  t(o(e.data, u));
 61514                }).then(
 61515                  function () {
 61516                    i.postMessage({
 61517                      sourceName: a,
 61518                      targetName: n,
 61519                      stream: f,
 61520                      streamId: t,
 61521                      success: !0,
 61522                    });
 61523                  },
 61524                  function (e) {
 61525                    i.postMessage({
 61526                      sourceName: a,
 61527                      targetName: n,
 61528                      stream: f,
 61529                      streamId: t,
 61530                      reason: wrapReason(e),
 61531                    });
 61532                  },
 61533                );
 61534              }
 61535              #E(e) {
 61536                const t = e.streamId,
 61537                  a = this.sourceName,
 61538                  n = e.sourceName,
 61539                  i = this.comObj,
 61540                  g = this.streamControllers[t],
 61541                  p = this.streamSinks[t];
 61542                switch (e.stream) {
 61543                  case f:
 61544                    e.success
 61545                      ? g.startCall.resolve()
 61546                      : g.startCall.reject(wrapReason(e.reason));
 61547                    break;
 61548                  case d:
 61549                    e.success
 61550                      ? g.pullCall.resolve()
 61551                      : g.pullCall.reject(wrapReason(e.reason));
 61552                    break;
 61553                  case u:
 61554                    if (!p) {
 61555                      i.postMessage({
 61556                        sourceName: a,
 61557                        targetName: n,
 61558                        stream: d,
 61559                        streamId: t,
 61560                        success: !0,
 61561                      });
 61562                      break;
 61563                    }
 61564                    p.desiredSize <= 0 &&
 61565                      e.desiredSize > 0 &&
 61566                      p.sinkCapability.resolve();
 61567                    p.desiredSize = e.desiredSize;
 61568                    new Promise(function (e) {
 61569                      e(p.onPull?.());
 61570                    }).then(
 61571                      function () {
 61572                        i.postMessage({
 61573                          sourceName: a,
 61574                          targetName: n,
 61575                          stream: d,
 61576                          streamId: t,
 61577                          success: !0,
 61578                        });
 61579                      },
 61580                      function (e) {
 61581                        i.postMessage({
 61582                          sourceName: a,
 61583                          targetName: n,
 61584                          stream: d,
 61585                          streamId: t,
 61586                          reason: wrapReason(e),
 61587                        });
 61588                      },
 61589                    );
 61590                    break;
 61591                  case l:
 61592                    (0, r.assert)(g, "enqueue should have stream controller");
 61593                    if (g.isClosed) break;
 61594                    g.controller.enqueue(e.chunk);
 61595                    break;
 61596                  case c:
 61597                    (0, r.assert)(g, "close should have stream controller");
 61598                    if (g.isClosed) break;
 61599                    g.isClosed = !0;
 61600                    g.controller.close();
 61601                    this.#R(g, t);
 61602                    break;
 61603                  case h:
 61604                    (0, r.assert)(g, "error should have stream controller");
 61605                    g.controller.error(wrapReason(e.reason));
 61606                    this.#R(g, t);
 61607                    break;
 61608                  case o:
 61609                    e.success
 61610                      ? g.cancelCall.resolve()
 61611                      : g.cancelCall.reject(wrapReason(e.reason));
 61612                    this.#R(g, t);
 61613                    break;
 61614                  case s:
 61615                    if (!p) break;
 61616                    new Promise(function (t) {
 61617                      t(p.onCancel?.(wrapReason(e.reason)));
 61618                    }).then(
 61619                      function () {
 61620                        i.postMessage({
 61621                          sourceName: a,
 61622                          targetName: n,
 61623                          stream: o,
 61624                          streamId: t,
 61625                          success: !0,
 61626                        });
 61627                      },
 61628                      function (e) {
 61629                        i.postMessage({
 61630                          sourceName: a,
 61631                          targetName: n,
 61632                          stream: o,
 61633                          streamId: t,
 61634                          reason: wrapReason(e),
 61635                        });
 61636                      },
 61637                    );
 61638                    p.sinkCapability.reject(wrapReason(e.reason));
 61639                    p.isCancelled = !0;
 61640                    delete this.streamSinks[t];
 61641                    break;
 61642                  default:
 61643                    throw new Error("Unexpected stream case");
 61644                }
 61645              }
 61646              async #R(e, t) {
 61647                await Promise.allSettled([
 61648                  e.startCall?.promise,
 61649                  e.pullCall?.promise,
 61650                  e.cancelCall?.promise,
 61651                ]);
 61652                delete this.streamControllers[t];
 61653              }
 61654              destroy() {
 61655                this.comObj.removeEventListener(
 61656                  "message",
 61657                  this._onComObjOnMessage,
 61658                );
 61659              }
 61660            };
 61661          },
 61662          (e, t, a) => {
 61663            Object.defineProperty(t, "__esModule", { value: !0 });
 61664            t.PDFWorkerStream = void 0;
 61665            var r = a(2);
 61666            t.PDFWorkerStream = class PDFWorkerStream {
 61667              constructor(e) {
 61668                this._msgHandler = e;
 61669                this._contentLength = null;
 61670                this._fullRequestReader = null;
 61671                this._rangeRequestReaders = [];
 61672              }
 61673              getFullReader() {
 61674                (0, r.assert)(
 61675                  !this._fullRequestReader,
 61676                  "PDFWorkerStream.getFullReader can only be called once.",
 61677                );
 61678                this._fullRequestReader = new PDFWorkerStreamReader(
 61679                  this._msgHandler,
 61680                );
 61681                return this._fullRequestReader;
 61682              }
 61683              getRangeReader(e, t) {
 61684                const a = new PDFWorkerStreamRangeReader(e, t, this._msgHandler);
 61685                this._rangeRequestReaders.push(a);
 61686                return a;
 61687              }
 61688              cancelAllRequests(e) {
 61689                this._fullRequestReader?.cancel(e);
 61690                for (const t of this._rangeRequestReaders.slice(0)) t.cancel(e);
 61691              }
 61692            };
 61693            class PDFWorkerStreamReader {
 61694              constructor(e) {
 61695                this._msgHandler = e;
 61696                this.onProgress = null;
 61697                this._contentLength = null;
 61698                this._isRangeSupported = !1;
 61699                this._isStreamingSupported = !1;
 61700                const t = this._msgHandler.sendWithStream("GetReader");
 61701                this._reader = t.getReader();
 61702                this._headersReady = this._msgHandler
 61703                  .sendWithPromise("ReaderHeadersReady")
 61704                  .then((e) => {
 61705                    this._isStreamingSupported = e.isStreamingSupported;
 61706                    this._isRangeSupported = e.isRangeSupported;
 61707                    this._contentLength = e.contentLength;
 61708                  });
 61709              }
 61710              get headersReady() {
 61711                return this._headersReady;
 61712              }
 61713              get contentLength() {
 61714                return this._contentLength;
 61715              }
 61716              get isStreamingSupported() {
 61717                return this._isStreamingSupported;
 61718              }
 61719              get isRangeSupported() {
 61720                return this._isRangeSupported;
 61721              }
 61722              async read() {
 61723                const { value: e, done: t } = await this._reader.read();
 61724                return t
 61725                  ? { value: void 0, done: !0 }
 61726                  : { value: e.buffer, done: !1 };
 61727              }
 61728              cancel(e) {
 61729                this._reader.cancel(e);
 61730              }
 61731            }
 61732            class PDFWorkerStreamRangeReader {
 61733              constructor(e, t, a) {
 61734                this._msgHandler = a;
 61735                this.onProgress = null;
 61736                const r = this._msgHandler.sendWithStream("GetRangeReader", {
 61737                  begin: e,
 61738                  end: t,
 61739                });
 61740                this._reader = r.getReader();
 61741              }
 61742              get isStreamingSupported() {
 61743                return !1;
 61744              }
 61745              async read() {
 61746                const { value: e, done: t } = await this._reader.read();
 61747                return t
 61748                  ? { value: void 0, done: !0 }
 61749                  : { value: e.buffer, done: !1 };
 61750              }
 61751              cancel(e) {
 61752                this._reader.cancel(e);
 61753              }
 61754            }
 61755          },
 61756        ],
 61757        t = {};
 61758      function __w_pdfjs_require__(a) {
 61759        var r = t[a];
 61760        if (void 0 !== r) return r.exports;
 61761        var n = (t[a] = { exports: {} });
 61762        e[a](n, n.exports, __w_pdfjs_require__);
 61763        return n.exports;
 61764      }
 61765      var a = {};
 61766      (() => {
 61767        var e = a;
 61768        Object.defineProperty(e, "__esModule", { value: !0 });
 61769        Object.defineProperty(e, "WorkerMessageHandler", {
 61770          enumerable: !0,
 61771          get: function () {
 61772            return t.WorkerMessageHandler;
 61773          },
 61774        });
 61775        var t = __w_pdfjs_require__(1);
 61776      })();
 61777      return a;
 61778    })(),
 61779  );