/**
 * @licstart The following is the entire license notice for the
 * Javascript code in this page
 *
 * Copyright 2022 Mozilla Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @licend The above is the entire license notice for the
 * Javascript code in this page
 */

(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' && define.amd)
		define("pdfjs-dist/build/pdf.sandbox", [], factory);
	else if(typeof exports === 'object')
		exports["pdfjs-dist/build/pdf.sandbox"] = factory();
	else
		root["pdfjs-dist/build/pdf.sandbox"] = root.pdfjsSandbox = factory();
})(this, function() {
return /******/ (() => { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ([
/* 0 */,
/* 1 */
/***/ ((__unused_webpack_module, exports) => {

Object.defineProperty(exports, "__esModule", ({value:true}));exports["default"]=void 0;function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj;}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;},_typeof(obj);}var Module=function(){var _scriptDir=typeof document!=='undefined'&&document.currentScript?document.currentScript.src:undefined;return function(Module){Module=Module||{};var b;b||(b=typeof Module!=='undefined'?Module:{});var h=Object.assign,n,q;b.ready=new Promise(function(a,c){n=a;q=c;});var r=h({},b),t="";"undefined"!==typeof document&&document.currentScript&&(t=document.currentScript.src);_scriptDir&&(t=_scriptDir);0!==t.indexOf("blob:")?t=t.substr(0,t.replace(/[?#].*/,"").lastIndexOf("/")+1):t="";var aa=b.print||console.log.bind(console),u=b.printErr||console.warn.bind(console);h(b,r);r=null;var v;b.wasmBinary&&(v=b.wasmBinary);var noExitRuntime=b.noExitRuntime||!0;"object"!==(typeof WebAssembly==="undefined"?"undefined":_typeof(WebAssembly))&&x("no native wasm support detected");var y,z=!1;function A(a,c,d,e){var f={string:function string(l){var p=0;if(null!==l&&void 0!==l&&0!==l){var T=(l.length<<2)+1;p=B(T);C(l,D,p,T);}return p;},array:function array(l){var p=B(l.length);E.set(l,p);return p;}};a=b["_"+a];var g=[],k=0;if(e)for(var m=0;m<e.length;m++){var w=f[d[m]];w?(0===k&&(k=F()),g[m]=w(e[m])):g[m]=e[m];}d=a.apply(null,g);return d=function(l){0!==k&&G(k);return"string"===c?H(l):"boolean"===c?!!l:l;}(d);}var I="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;function J(a,c,d){var e=c+d;for(d=c;a[d]&&!(d>=e);){++d;}if(16<d-c&&a.subarray&&I)return I.decode(a.subarray(c,d));for(e="";c<d;){var f=a[c++];if(f&128){var g=a[c++]&63;if(192==(f&224))e+=String.fromCharCode((f&31)<<6|g);else{var k=a[c++]&63;f=224==(f&240)?(f&15)<<12|g<<6|k:(f&7)<<18|g<<12|k<<6|a[c++]&63;65536>f?e+=String.fromCharCode(f):(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023));}}else e+=String.fromCharCode(f);}return e;}function H(a){return a?J(D,a,void 0):"";}function C(a,c,d,e){if(0<e){e=d+e-1;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var k=a.charCodeAt(++f);g=65536+((g&1023)<<10)|k&1023;}if(127>=g){if(d>=e)break;c[d++]=g;}else{if(2047>=g){if(d+1>=e)break;c[d++]=192|g>>6;}else{if(65535>=g){if(d+2>=e)break;c[d++]=224|g>>12;}else{if(d+3>=e)break;c[d++]=240|g>>18;c[d++]=128|g>>12&63;}c[d++]=128|g>>6&63;}c[d++]=128|g&63;}}c[d]=0;}}function K(a){for(var c=0,d=0;d<a.length;++d){var e=a.charCodeAt(d);55296<=e&&57343>=e&&(e=65536+((e&1023)<<10)|a.charCodeAt(++d)&1023);127>=e?++c:c=2047>=e?c+2:65535>=e?c+3:c+4;}return c;}function L(a){var c=K(a)+1,d=M(c);d&&C(a,E,d,c);return d;}var ba,E,D,N;function ca(){var a=y.buffer;ba=a;b.HEAP8=E=new Int8Array(a);b.HEAP16=new Int16Array(a);b.HEAP32=N=new Int32Array(a);b.HEAPU8=D=new Uint8Array(a);b.HEAPU16=new Uint16Array(a);b.HEAPU32=new Uint32Array(a);b.HEAPF32=new Float32Array(a);b.HEAPF64=new Float64Array(a);}var O,da=[],ea=[],fa=[];function ha(){var a=b.preRun.shift();da.unshift(a);}var P=0,Q=null,R=null;b.preloadedImages={};b.preloadedAudios={};function x(a){if(b.onAbort)b.onAbort(a);a="Aborted("+a+")";u(a);z=!0;a=new WebAssembly.RuntimeError(a+". Build with -s ASSERTIONS=1 for more info.");q(a);throw a;}function S(a){return a.startsWith("data:application/octet-stream;base64,");}var U;U="data:application/octet-stream;base64,[encoded data, 502116 characters]";if(!S(U)){var ia=U;U=b.locateFile?b.locateFile(ia,t):t+ia;}function ja(){var a=U;try{if(a==U&&v)return new Uint8Array(v);if(S(a))try{var c=ka(a.slice(37)),d=new Uint8Array(c.length);for(a=0;a<c.length;++a){d[a]=c.charCodeAt(a);}var e=d;}catch(g){throw Error("Converting base64 string to bytes failed.");}else e=void 0;var f=e;if(f)return f;throw"both async and sync fetching of the wasm failed";}catch(g){x(g);}}function la(){return v||"function"!==typeof fetch?Promise.resolve().then(function(){return ja();}):fetch(U,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+U+"'";return a.arrayBuffer();})["catch"](function(){return ja();});}function V(a){for(;0<a.length;){var c=a.shift();if("function"==typeof c)c(b);else{var d=c.B;"number"===typeof d?void 0===c.A?O.get(d)():O.get(d)(c.A):d(void 0===c.A?null:c.A);}}}function W(a){var c=K(a)+1,d=M(c);C(a,D,d,c);return d;}function ma(){}var na=[null,[],[]];function oa(){function a(k){return(k=k.toTimeString().match(/\(([A-Za-z ]+)\)$/))?k[1]:"GMT";}var c=new Date().getFullYear(),d=new Date(c,0,1),e=new Date(c,6,1);c=d.getTimezoneOffset();var f=e.getTimezoneOffset(),g=Math.max(c,f);N[pa()>>2]=60*g;N[qa()>>2]=Number(c!=f);d=a(d);e=a(e);d=L(d);e=L(e);f<c?(N[X()>>2]=d,N[X()+4>>2]=e):(N[X()>>2]=e,N[X()+4>>2]=d);}var ra;ma=function ma(a,c,d){a=H(a);c=null!==c?JSON.parse(H(c)):[];try{var e=b.externalCall(a,c);return e?W(e):null;}catch(e){return b.HEAPU8[d]=1,W(e.message);}};var ka="function"===typeof atob?atob:function(a){var c="",d=0;a=a.replace(/[^A-Za-z0-9\+\/=]/g,"");do{var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(d++));var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(d++));var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(d++));var k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(d++));e=e<<2|f>>4;f=(f&15)<<4|g>>2;var m=(g&3)<<6|k;c+=String.fromCharCode(e);64!==g&&(c+=String.fromCharCode(f));64!==k&&(c+=String.fromCharCode(m));}while(d<a.length);return c;},sa={a:function a(_a,c,d,e){x("Assertion failed: "+H(_a)+", at: "+[c?H(c):"unknown filename",d,e?H(e):"unknown function"]);},b:function b(){x("");},g:ma,f:function f(a,c){a=H(a);var d;try{d=window.JSON.parse(a);}catch(e){d=a;}0!==c?window.alert(a):window.console.log("DUMP",d);},e:function e(a){var c=D.length;a>>>=0;if(2147483648<a)return!1;for(var d=1;4>=d;d*=2){var e=c*(1+.2/d);e=Math.min(e,a+100663296);e=Math.max(a,e);0<e%65536&&(e+=65536-e%65536);a:{try{y.grow(Math.min(2147483648,e)-ba.byteLength+65535>>>16);ca();var f=1;break a;}catch(g){}f=void 0;}if(f)return!0;}return!1;},d:function d(a,c,_d,e){for(var f=0,g=0;g<_d;g++){var k=N[c>>2],m=N[c+4>>2];c+=8;for(var w=0;w<m;w++){var l=D[k+w],p=na[a];0===l||10===l?((1===a?aa:u)(J(p,0)),p.length=0):p.push(l);}f+=m;}N[e>>2]=f;return 0;},c:function c(a){var c=Date.now();N[a>>2]=c/1E3|0;N[a+4>>2]=c%1E3*1E3|0;return 0;},h:function h(a,c){ra||(ra=!0,oa());a=new Date(1E3*N[a>>2]);N[c>>2]=a.getSeconds();N[c+4>>2]=a.getMinutes();N[c+8>>2]=a.getHours();N[c+12>>2]=a.getDate();N[c+16>>2]=a.getMonth();N[c+20>>2]=a.getFullYear()-1900;N[c+24>>2]=a.getDay();var d=new Date(a.getFullYear(),0,1);N[c+28>>2]=(a.getTime()-d.getTime())/864E5|0;N[c+36>>2]=-(60*a.getTimezoneOffset());var e=new Date(a.getFullYear(),6,1).getTimezoneOffset();d=d.getTimezoneOffset();a=(e!=d&&a.getTimezoneOffset()==Math.min(d,e))|0;N[c+32>>2]=a;a=N[X()+(a?4:0)>>2];N[c+40>>2]=a;return c;},i:function i(a){a=H(a);window.console.log(a);},j:function j(a,c,d,e){a=H(a);c=H(c);d=H(d);d="Quickjs -- ".concat(a,": ").concat(c,"\n").concat(d);0!==e?window.alert(d):window.console.error(d);}};(function(){function a(f){b.asm=f.exports;y=b.asm.k;ca();O=b.asm.t;ea.unshift(b.asm.l);P--;b.monitorRunDependencies&&b.monitorRunDependencies(P);0==P&&(null!==Q&&(clearInterval(Q),Q=null),R&&(f=R,R=null,f()));}function c(f){a(f.instance);}function d(f){return la().then(function(g){return WebAssembly.instantiate(g,e);}).then(function(g){return g;}).then(f,function(g){u("failed to asynchronously prepare wasm: "+g);x(g);});}var e={a:sa};P++;b.monitorRunDependencies&&b.monitorRunDependencies(P);if(b.instantiateWasm)try{return b.instantiateWasm(e,a);}catch(f){return u("Module.instantiateWasm callback failed with error: "+f),!1;}(function(){return v||"function"!==typeof WebAssembly.instantiateStreaming||S(U)||"function"!==typeof fetch?d(c):fetch(U,{credentials:"same-origin"}).then(function(f){return WebAssembly.instantiateStreaming(f,e).then(c,function(g){u("wasm streaming compile failed: "+g);u("falling back to ArrayBuffer instantiation");return d(c);});});})()["catch"](q);return{};})();b.___wasm_call_ctors=function(){return(b.___wasm_call_ctors=b.asm.l).apply(null,arguments);};b._evalInSandbox=function(){return(b._evalInSandbox=b.asm.m).apply(null,arguments);};b._nukeSandbox=function(){return(b._nukeSandbox=b.asm.n).apply(null,arguments);};b._init=function(){return(b._init=b.asm.o).apply(null,arguments);};b._commFun=function(){return(b._commFun=b.asm.p).apply(null,arguments);};b._dumpMemoryUse=function(){return(b._dumpMemoryUse=b.asm.q).apply(null,arguments);};var M=b._malloc=function(){return(M=b._malloc=b.asm.r).apply(null,arguments);};b._free=function(){return(b._free=b.asm.s).apply(null,arguments);};var X=b.__get_tzname=function(){return(X=b.__get_tzname=b.asm.u).apply(null,arguments);},qa=b.__get_daylight=function(){return(qa=b.__get_daylight=b.asm.v).apply(null,arguments);},pa=b.__get_timezone=function(){return(pa=b.__get_timezone=b.asm.w).apply(null,arguments);},F=b.stackSave=function(){return(F=b.stackSave=b.asm.x).apply(null,arguments);},G=b.stackRestore=function(){return(G=b.stackRestore=b.asm.y).apply(null,arguments);},B=b.stackAlloc=function(){return(B=b.stackAlloc=b.asm.z).apply(null,arguments);};b.ccall=A;b.cwrap=function(a,c,d,e){d=d||[];var f=d.every(function(g){return"number"===g;});return"string"!==c&&f&&!e?b["_"+a]:function(){return A(a,c,d,arguments,e);};};b.stringToNewUTF8=W;var Y;R=function ta(){Y||Z();Y||(R=ta);};function Z(){function a(){if(!Y&&(Y=!0,b.calledRun=!0,!z)){V(ea);n(b);if(b.onRuntimeInitialized)b.onRuntimeInitialized();if(b.postRun)for("function"==typeof b.postRun&&(b.postRun=[b.postRun]);b.postRun.length;){var c=b.postRun.shift();fa.unshift(c);}V(fa);}}if(!(0<P)){if(b.preRun)for("function"==typeof b.preRun&&(b.preRun=[b.preRun]);b.preRun.length;){ha();}V(da);0<P||(b.setStatus?(b.setStatus("Running..."),setTimeout(function(){setTimeout(function(){b.setStatus("");},1);a();},1)):a());}}b.run=Z;if(b.preInit)for("function"==typeof b.preInit&&(b.preInit=[b.preInit]);0<b.preInit.length;){b.preInit.pop()();}Z();return Module.ready;};}();var _default=Module;exports["default"]=_default;

/***/ }),
/* 2 */
/***/ ((__unused_webpack_module, exports) => {



function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }

var SandboxSupportBase = /*#__PURE__*/function () {
  function SandboxSupportBase(win) {
    _classCallCheck(this, SandboxSupportBase);

    this.win = win;
    this.timeoutIds = new Map();
    this.commFun = null;
  }

  _createClass(SandboxSupportBase, [{
    key: "destroy",
    value: function destroy() {
      var _this = this;

      this.commFunc = null;
      this.timeoutIds.forEach(function (_ref) {
        var _ref2 = _slicedToArray(_ref, 2),
            _ = _ref2[0],
            id = _ref2[1];

        return _this.win.clearTimeout(id);
      });
      this.timeoutIds = null;
    }
  }, {
    key: "exportValueToSandbox",
    value: function exportValueToSandbox(val) {
      throw new Error("Not implemented");
    }
  }, {
    key: "importValueFromSandbox",
    value: function importValueFromSandbox(val) {
      throw new Error("Not implemented");
    }
  }, {
    key: "createErrorForSandbox",
    value: function createErrorForSandbox(errorMessage) {
      throw new Error("Not implemented");
    }
  }, {
    key: "callSandboxFunction",
    value: function callSandboxFunction(name, args) {
      try {
        args = this.exportValueToSandbox(args);
        this.commFun(name, args);
      } catch (e) {
        this.win.console.error(e);
      }
    }
  }, {
    key: "createSandboxExternals",
    value: function createSandboxExternals() {
      var _this2 = this;

      var externals = {
        setTimeout: function setTimeout(callbackId, nMilliseconds) {
          if (typeof callbackId !== "number" || typeof nMilliseconds !== "number") {
            return;
          }

          var id = _this2.win.setTimeout(function () {
            _this2.timeoutIds["delete"](callbackId);

            _this2.callSandboxFunction("timeoutCb", {
              callbackId: callbackId,
              interval: false
            });
          }, nMilliseconds);

          _this2.timeoutIds.set(callbackId, id);
        },
        clearTimeout: function clearTimeout(id) {
          _this2.win.clearTimeout(_this2.timeoutIds.get(id));

          _this2.timeoutIds["delete"](id);
        },
        setInterval: function setInterval(callbackId, nMilliseconds) {
          if (typeof callbackId !== "number" || typeof nMilliseconds !== "number") {
            return;
          }

          var id = _this2.win.setInterval(function () {
            _this2.callSandboxFunction("timeoutCb", {
              callbackId: callbackId,
              interval: true
            });
          }, nMilliseconds);

          _this2.timeoutIds.set(callbackId, id);
        },
        clearInterval: function clearInterval(id) {
          _this2.win.clearInterval(_this2.timeoutIds.get(id));

          _this2.timeoutIds["delete"](id);
        },
        alert: function alert(cMsg) {
          if (typeof cMsg !== "string") {
            return;
          }

          _this2.win.alert(cMsg);
        },
        confirm: function confirm(cMsg) {
          if (typeof cMsg !== "string") {
            return false;
          }

          return _this2.win.confirm(cMsg);
        },
        prompt: function prompt(cQuestion, cDefault) {
          if (typeof cQuestion !== "string" || typeof cDefault !== "string") {
            return null;
          }

          return _this2.win.prompt(cQuestion, cDefault);
        },
        parseURL: function parseURL(cUrl) {
          var url = new _this2.win.URL(cUrl);
          var props = ["hash", "host", "hostname", "href", "origin", "password", "pathname", "port", "protocol", "search", "searchParams", "username"];
          return Object.fromEntries(props.map(function (name) {
            return [name, url[name].toString()];
          }));
        },
        send: function send(data) {
          if (!data) {
            return;
          }

          var event = new _this2.win.CustomEvent("updatefromsandbox", {
            detail: _this2.importValueFromSandbox(data)
          });

          _this2.win.dispatchEvent(event);
        }
      };
      Object.setPrototypeOf(externals, null);
      return function (name, args) {
        try {
          var result = externals[name].apply(externals, _toConsumableArray(args));
          return _this2.exportValueToSandbox(result);
        } catch (error) {
          var _error$toString;

          throw _this2.createErrorForSandbox((_error$toString = error === null || error === void 0 ? void 0 : error.toString()) !== null && _error$toString !== void 0 ? _error$toString : "");
        }
      };
    }
  }]);

  return SandboxSupportBase;
}();

{
  exports.SandboxSupportBase = SandboxSupportBase;
}

/***/ })
/******/ 	]);
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __w_pdfjs_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __w_pdfjs_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
var exports = __webpack_exports__;


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.QuickJSSandbox = QuickJSSandbox;

var _quickjsEval = _interopRequireDefault(__w_pdfjs_require__(1));

var _pdfSandboxExternal = __w_pdfjs_require__(2);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

var pdfjsVersion = '2.14.44';
var pdfjsBuild = 'ee39499a5';

var SandboxSupport = /*#__PURE__*/function (_SandboxSupportBase) {
  _inherits(SandboxSupport, _SandboxSupportBase);

  var _super = _createSuper(SandboxSupport);

  function SandboxSupport() {
    _classCallCheck(this, SandboxSupport);

    return _super.apply(this, arguments);
  }

  _createClass(SandboxSupport, [{
    key: "exportValueToSandbox",
    value: function exportValueToSandbox(val) {
      return JSON.stringify(val);
    }
  }, {
    key: "importValueFromSandbox",
    value: function importValueFromSandbox(val) {
      return val;
    }
  }, {
    key: "createErrorForSandbox",
    value: function createErrorForSandbox(errorMessage) {
      return new Error(errorMessage);
    }
  }]);

  return SandboxSupport;
}(_pdfSandboxExternal.SandboxSupportBase);

var Sandbox = /*#__PURE__*/function () {
  function Sandbox(win, module) {
    _classCallCheck(this, Sandbox);

    this.support = new SandboxSupport(win, this);
    module.externalCall = this.support.createSandboxExternals();
    this._module = module;
    this._alertOnError = 0;
  }

  _createClass(Sandbox, [{
    key: "create",
    value: function create(data) {
      var code = ['(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === \'object\' && typeof module === \'object\')\n\t\tmodule.exports = factory();\n\telse if(typeof define === \'function\' && define.amd)\n\t\tdefine("pdfjs-dist/build/pdf.scripting", [], factory);\n\telse if(typeof exports === \'object\')\n\t\texports["pdfjs-dist/build/pdf.scripting"] = factory();\n\telse\n\t\troot.pdfjsScripting = factory();\n})(this, function() {\nreturn /******/ (() => { // webpackBootstrap\n/******/ \t"use strict";\n/******/ \tvar __webpack_modules__ = ([\n/* 0 */,\n/* 1 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nexports.initSandbox = initSandbox;\n\nvar _constants = __w_pdfjs_require__(2);\n\nvar _field = __w_pdfjs_require__(3);\n\nvar _aform = __w_pdfjs_require__(8);\n\nvar _app = __w_pdfjs_require__(9);\n\nvar _color = __w_pdfjs_require__(5);\n\nvar _console = __w_pdfjs_require__(13);\n\nvar _doc = __w_pdfjs_require__(14);\n\nvar _proxy = __w_pdfjs_require__(16);\n\nvar _util = __w_pdfjs_require__(17);\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction initSandbox(params) {\n  delete globalThis.pdfjsScripting;\n  var externalCall = globalThis.callExternalFunction;\n  delete globalThis.callExternalFunction;\n\n  var globalEval = function globalEval(code) {\n    return globalThis.eval(code);\n  };\n\n  var send = function send(data) {\n    return externalCall("send", [data]);\n  };\n\n  var proxyHandler = new _proxy.ProxyHandler();\n  var data = params.data;\n  var doc = new _doc.Doc(_objectSpread({\n    send: send,\n    globalEval: globalEval\n  }, data.docInfo));\n  var _document = {\n    obj: doc,\n    wrapped: new Proxy(doc, proxyHandler)\n  };\n  var app = new _app.App(_objectSpread({\n    send: send,\n    globalEval: globalEval,\n    externalCall: externalCall,\n    _document: _document,\n    calculationOrder: data.calculationOrder,\n    proxyHandler: proxyHandler\n  }, data.appInfo));\n  var util = new _util.Util({\n    externalCall: externalCall\n  });\n  var appObjects = app._objects;\n\n  if (data.objects) {\n    var annotations = [];\n\n    for (var _i = 0, _Object$entries = Object.entries(data.objects); _i < _Object$entries.length; _i++) {\n      var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),\n          name = _Object$entries$_i[0],\n          objs = _Object$entries$_i[1];\n\n      annotations.length = 0;\n      var container = null;\n\n      var _iterator = _createForOfIteratorHelper(objs),\n          _step;\n\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var _obj = _step.value;\n\n          if (_obj.type !== "") {\n            annotations.push(_obj);\n          } else {\n            container = _obj;\n          }\n        }\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n\n      var obj = container;\n\n      if (annotations.length > 0) {\n        obj = annotations[0];\n        obj.send = send;\n      }\n\n      obj.globalEval = globalEval;\n      obj.doc = _document;\n      obj.fieldPath = name;\n      obj.appObjects = appObjects;\n      var field = void 0;\n\n      switch (obj.type) {\n        case "radiobutton":\n          {\n            var otherButtons = annotations.slice(1);\n            field = new _field.RadioButtonField(otherButtons, obj);\n            break;\n          }\n\n        case "checkbox":\n          {\n            var _otherButtons = annotations.slice(1);\n\n            field = new _field.CheckboxField(_otherButtons, obj);\n            break;\n          }\n\n        case "text":\n          if (annotations.length <= 1) {\n            field = new _field.Field(obj);\n            break;\n          }\n\n          obj.siblings = annotations.map(function (x) {\n            return x.id;\n          }).slice(1);\n          field = new _field.Field(obj);\n          break;\n\n        default:\n          field = new _field.Field(obj);\n      }\n\n      var wrapped = new Proxy(field, proxyHandler);\n\n      doc._addField(name, wrapped);\n\n      var _object = {\n        obj: field,\n        wrapped: wrapped\n      };\n\n      var _iterator2 = _createForOfIteratorHelper(objs),\n          _step2;\n\n      try {\n        for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n          var object = _step2.value;\n          appObjects[object.id] = _object;\n        }\n      } catch (err) {\n        _iterator2.e(err);\n      } finally {\n        _iterator2.f();\n      }\n\n      if (container) {\n        appObjects[container.id] = _object;\n      }\n    }\n  }\n\n  var color = new _color.Color();\n  globalThis.event = null;\n  globalThis.global = Object.create(null);\n  globalThis.app = new Proxy(app, proxyHandler);\n  globalThis.color = new Proxy(color, proxyHandler);\n  globalThis.console = new Proxy(new _console.Console({\n    send: send\n  }), proxyHandler);\n  globalThis.util = new Proxy(util, proxyHandler);\n  globalThis.border = _constants.Border;\n  globalThis.cursor = _constants.Cursor;\n  globalThis.display = _constants.Display;\n  globalThis.font = _constants.Font;\n  globalThis.highlight = _constants.Highlight;\n  globalThis.position = _constants.Position;\n  globalThis.scaleHow = _constants.ScaleHow;\n  globalThis.scaleWhen = _constants.ScaleWhen;\n  globalThis.style = _constants.Style;\n  globalThis.trans = _constants.Trans;\n  globalThis.zoomtype = _constants.ZoomType;\n  globalThis.ADBE = {\n    Reader_Value_Asked: true,\n    Viewer_Value_Asked: true\n  };\n  var aform = new _aform.AForm(doc, app, util, color);\n\n  var _iterator3 = _createForOfIteratorHelper(Object.getOwnPropertyNames(_aform.AForm.prototype)),\n      _step3;\n\n  try {\n    for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n      var _name2 = _step3.value;\n\n      if (_name2 !== "constructor" && !_name2.startsWith("_")) {\n        globalThis[_name2] = aform[_name2].bind(aform);\n      }\n    }\n  } catch (err) {\n    _iterator3.e(err);\n  } finally {\n    _iterator3.f();\n  }\n\n  for (var _i2 = 0, _Object$entries2 = Object.entries(_constants.GlobalConstants); _i2 < _Object$entries2.length; _i2++) {\n    var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2),\n        _name = _Object$entries2$_i[0],\n        value = _Object$entries2$_i[1];\n\n    Object.defineProperty(globalThis, _name, {\n      value: value,\n      writable: false\n    });\n  }\n\n  Object.defineProperties(globalThis, {\n    ColorConvert: {\n      value: color.convert.bind(color),\n      writable: true\n    },\n    ColorEqual: {\n      value: color.equal.bind(color),\n      writable: true\n    }\n  });\n  var properties = Object.create(null);\n\n  var _iterator4 = _createForOfIteratorHelper(Object.getOwnPropertyNames(_doc.Doc.prototype)),\n      _step4;\n\n  try {\n    for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n      var _name3 = _step4.value;\n\n      if (_name3 === "constructor" || _name3.startsWith("_")) {\n        continue;\n      }\n\n      var descriptor = Object.getOwnPropertyDescriptor(_doc.Doc.prototype, _name3);\n\n      if (descriptor.get) {\n        properties[_name3] = {\n          get: descriptor.get.bind(doc),\n          set: descriptor.set.bind(doc)\n        };\n      } else {\n        properties[_name3] = {\n          value: _doc.Doc.prototype[_name3].bind(doc)\n        };\n      }\n    }\n  } catch (err) {\n    _iterator4.e(err);\n  } finally {\n    _iterator4.f();\n  }\n\n  Object.defineProperties(globalThis, properties);\n  var functions = {\n    dispatchEvent: app._dispatchEvent.bind(app),\n    timeoutCb: app._evalCallback.bind(app)\n  };\n  return function (name, args) {\n    try {\n      functions[name](args);\n    } catch (error) {\n      var _value = "".concat(error.toString(), "\\n").concat(error.stack);\n\n      send({\n        command: "error",\n        value: _value\n      });\n    }\n  };\n}\n\n/***/ }),\n/* 2 */\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nexports.ZoomType = exports.Trans = exports.Style = exports.ScaleWhen = exports.ScaleHow = exports.Position = exports.Highlight = exports.GlobalConstants = exports.Font = exports.Display = exports.Cursor = exports.Border = void 0;\nvar Border = Object.freeze({\n  s: "solid",\n  d: "dashed",\n  b: "beveled",\n  i: "inset",\n  u: "underline"\n});\nexports.Border = Border;\nvar Cursor = Object.freeze({\n  visible: 0,\n  hidden: 1,\n  delay: 2\n});\nexports.Cursor = Cursor;\nvar Display = Object.freeze({\n  visible: 0,\n  hidden: 1,\n  noPrint: 2,\n  noView: 3\n});\nexports.Display = Display;\nvar Font = Object.freeze({\n  Times: "Times-Roman",\n  TimesB: "Times-Bold",\n  TimesI: "Times-Italic",\n  TimesBI: "Times-BoldItalic",\n  Helv: "Helvetica",\n  HelvB: "Helvetica-Bold",\n  HelvI: "Helvetica-Oblique",\n  HelvBI: "Helvetica-BoldOblique",\n  Cour: "Courier",\n  CourB: "Courier-Bold",\n  CourI: "Courier-Oblique",\n  CourBI: "Courier-BoldOblique",\n  Symbol: "Symbol",\n  ZapfD: "ZapfDingbats",\n  KaGo: "HeiseiKakuGo-W5-UniJIS-UCS2-H",\n  KaMi: "HeiseiMin-W3-UniJIS-UCS2-H"\n});\nexports.Font = Font;\nvar Highlight = Object.freeze({\n  n: "none",\n  i: "invert",\n  p: "push",\n  o: "outline"\n});\nexports.Highlight = Highlight;\nvar Position = Object.freeze({\n  textOnly: 0,\n  iconOnly: 1,\n  iconTextV: 2,\n  textIconV: 3,\n  iconTextH: 4,\n  textIconH: 5,\n  overlay: 6\n});\nexports.Position = Position;\nvar ScaleHow = Object.freeze({\n  proportional: 0,\n  anamorphic: 1\n});\nexports.ScaleHow = ScaleHow;\nvar ScaleWhen = Object.freeze({\n  always: 0,\n  never: 1,\n  tooBig: 2,\n  tooSmall: 3\n});\nexports.ScaleWhen = ScaleWhen;\nvar Style = Object.freeze({\n  ch: "check",\n  cr: "cross",\n  di: "diamond",\n  ci: "circle",\n  st: "star",\n  sq: "square"\n});\nexports.Style = Style;\nvar Trans = Object.freeze({\n  blindsH: "BlindsHorizontal",\n  blindsV: "BlindsVertical",\n  boxI: "BoxIn",\n  boxO: "BoxOut",\n  dissolve: "Dissolve",\n  glitterD: "GlitterDown",\n  glitterR: "GlitterRight",\n  glitterRD: "GlitterRightDown",\n  random: "Random",\n  replace: "Replace",\n  splitHI: "SplitHorizontalIn",\n  splitHO: "SplitHorizontalOut",\n  splitVI: "SplitVerticalIn",\n  splitVO: "SplitVerticalOut",\n  wipeD: "WipeDown",\n  wipeL: "WipeLeft",\n  wipeR: "WipeRight",\n  wipeU: "WipeUp"\n});\nexports.Trans = Trans;\nvar ZoomType = Object.freeze({\n  none: "NoVary",\n  fitP: "FitPage",\n  fitW: "FitWidth",\n  fitH: "FitHeight",\n  fitV: "FitVisibleWidth",\n  pref: "Preferred",\n  refW: "ReflowWidth"\n});\nexports.ZoomType = ZoomType;\nvar GlobalConstants = Object.freeze({\n  IDS_GREATER_THAN: "Invalid value: must be greater than or equal to % s.",\n  IDS_GT_AND_LT: "Invalid value: must be greater than or equal to % s " + "and less than or equal to % s.",\n  IDS_LESS_THAN: "Invalid value: must be less than or equal to % s.",\n  IDS_INVALID_MONTH: "** Invalid **",\n  IDS_INVALID_DATE: "Invalid date / time: please ensure that the date / time exists.Field",\n  IDS_INVALID_DATE2: " should match format ",\n  IDS_INVALID_VALUE: "The value entered does not match the format of the field",\n  IDS_AM: "am",\n  IDS_PM: "pm",\n  IDS_MONTH_INFO: "January[1] February[2] March[3] April[4] May[5] " + "June[6] July[7] August[8] September[9] October[10] " + "November[11] December[12] Sept[9] Jan[1] Feb[2] Mar[3] " + "Apr[4] Jun[6] Jul[7] Aug[8] Sep[9] Oct[10] Nov[11] Dec[12]",\n  IDS_STARTUP_CONSOLE_MSG: "** ^ _ ^ **",\n  RE_NUMBER_ENTRY_DOT_SEP: ["[+-]?\\\\d*\\\\.?\\\\d*"],\n  RE_NUMBER_COMMIT_DOT_SEP: ["[+-]?\\\\d+(\\\\.\\\\d+)?", "[+-]?\\\\.\\\\d+", "[+-]?\\\\d+\\\\."],\n  RE_NUMBER_ENTRY_COMMA_SEP: ["[+-]?\\\\d*,?\\\\d*"],\n  RE_NUMBER_COMMIT_COMMA_SEP: ["[+-]?\\\\d+([.,]\\\\d+)?", "[+-]?[.,]\\\\d+", "[+-]?\\\\d+[.,]"],\n  RE_ZIP_ENTRY: ["\\\\d{0,5}"],\n  RE_ZIP_COMMIT: ["\\\\d{5}"],\n  RE_ZIP4_ENTRY: ["\\\\d{0,5}(\\\\.|[- ])?\\\\d{0,4}"],\n  RE_ZIP4_COMMIT: ["\\\\d{5}(\\\\.|[- ])?\\\\d{4}"],\n  RE_PHONE_ENTRY: ["\\\\d{0,3}(\\\\.|[- ])?\\\\d{0,3}(\\\\.|[- ])?\\\\d{0,4}", "\\\\(\\\\d{0,3}", "\\\\(\\\\d{0,3}\\\\)(\\\\.|[- ])?\\\\d{0,3}(\\\\.|[- ])?\\\\d{0,4}", "\\\\(\\\\d{0,3}(\\\\.|[- ])?\\\\d{0,3}(\\\\.|[- ])?\\\\d{0,4}", "\\\\d{0,3}\\\\)(\\\\.|[- ])?\\\\d{0,3}(\\\\.|[- ])?\\\\d{0,4}", "011(\\\\.|[- \\\\d])*"],\n  RE_PHONE_COMMIT: ["\\\\d{3}(\\\\.|[- ])?\\\\d{4}", "\\\\d{3}(\\\\.|[- ])?\\\\d{3}(\\\\.|[- ])?\\\\d{4}", "\\\\(\\\\d{3}\\\\)(\\\\.|[- ])?\\\\d{3}(\\\\.|[- ])?\\\\d{4}", "011(\\\\.|[- \\\\d])*"],\n  RE_SSN_ENTRY: ["\\\\d{0,3}(\\\\.|[- ])?\\\\d{0,2}(\\\\.|[- ])?\\\\d{0,4}"],\n  RE_SSN_COMMIT: ["\\\\d{3}(\\\\.|[- ])?\\\\d{2}(\\\\.|[- ])?\\\\d{4}"]\n});\nexports.GlobalConstants = GlobalConstants;\n\n/***/ }),\n/* 3 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nfunction _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nexports.RadioButtonField = exports.Field = exports.CheckboxField = void 0;\n\nvar _common = __w_pdfjs_require__(4);\n\nvar _color = __w_pdfjs_require__(5);\n\nvar _pdf_object = __w_pdfjs_require__(7);\n\nfunction set(target, property, value, receiver) { if (typeof Reflect !== "undefined" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\n\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error(\'failed to set property\'); } return value; }\n\nfunction _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar Field = /*#__PURE__*/function (_PDFObject) {\n  _inherits(Field, _PDFObject);\n\n  var _super = _createSuper(Field);\n\n  function Field(data) {\n    var _this;\n\n    _classCallCheck(this, Field);\n\n    _this = _super.call(this, data);\n    _this.alignment = data.alignment || "left";\n    _this.borderStyle = data.borderStyle || "";\n    _this.buttonAlignX = data.buttonAlignX || 50;\n    _this.buttonAlignY = data.buttonAlignY || 50;\n    _this.buttonFitBounds = data.buttonFitBounds;\n    _this.buttonPosition = data.buttonPosition;\n    _this.buttonScaleHow = data.buttonScaleHow;\n    _this.ButtonScaleWhen = data.buttonScaleWhen;\n    _this.calcOrderIndex = data.calcOrderIndex;\n    _this.charLimit = data.charLimit;\n    _this.comb = data.comb;\n    _this.commitOnSelChange = data.commitOnSelChange;\n    _this.currentValueIndices = data.currentValueIndices;\n    _this.defaultStyle = data.defaultStyle;\n    _this.defaultValue = data.defaultValue;\n    _this.doNotScroll = data.doNotScroll;\n    _this.doNotSpellCheck = data.doNotSpellCheck;\n    _this.delay = data.delay;\n    _this.display = data.display;\n    _this.doc = data.doc.wrapped;\n    _this.editable = data.editable;\n    _this.exportValues = data.exportValues;\n    _this.fileSelect = data.fileSelect;\n    _this.hidden = data.hidden;\n    _this.highlight = data.highlight;\n    _this.lineWidth = data.lineWidth;\n    _this.multiline = data.multiline;\n    _this.multipleSelection = !!data.multipleSelection;\n    _this.name = data.name;\n    _this.password = data.password;\n    _this.print = data.print;\n    _this.radiosInUnison = data.radiosInUnison;\n    _this.readonly = data.readonly;\n    _this.rect = data.rect;\n    _this.required = data.required;\n    _this.richText = data.richText;\n    _this.richValue = data.richValue;\n    _this.rotation = data.rotation;\n    _this.style = data.style;\n    _this.submitName = data.submitName;\n    _this.textFont = data.textFont;\n    _this.textSize = data.textSize;\n    _this.type = data.type;\n    _this.userName = data.userName;\n    _this._actions = (0, _common.createActionsMap)(data.actions);\n    _this._browseForFileToSubmit = data.browseForFileToSubmit || null;\n    _this._buttonCaption = null;\n    _this._buttonIcon = null;\n    _this._children = null;\n    _this._currentValueIndices = data.currentValueIndices || 0;\n    _this._document = data.doc;\n    _this._fieldPath = data.fieldPath;\n    _this._fillColor = data.fillColor || ["T"];\n    _this._isChoice = Array.isArray(data.items);\n    _this._items = data.items || [];\n    _this._page = data.page || 0;\n    _this._strokeColor = data.strokeColor || ["G", 0];\n    _this._textColor = data.textColor || ["G", 0];\n    _this._value = data.value || "";\n    _this._kidIds = data.kidIds || null;\n    _this._fieldType = (0, _common.getFieldType)(_this._actions);\n    _this._siblings = data.siblings || null;\n    _this._globalEval = data.globalEval;\n    _this._appObjects = data.appObjects;\n    _this.valueAsString = data.valueAsString || _this._value;\n    return _this;\n  }\n\n  _createClass(Field, [{\n    key: "currentValueIndices",\n    get: function get() {\n      if (!this._isChoice) {\n        return 0;\n      }\n\n      return this._currentValueIndices;\n    },\n    set: function set(indices) {\n      var _this2 = this;\n\n      if (!this._isChoice) {\n        return;\n      }\n\n      if (!Array.isArray(indices)) {\n        indices = [indices];\n      }\n\n      if (!indices.every(function (i) {\n        return typeof i === "number" && Number.isInteger(i) && i >= 0 && i < _this2.numItems;\n      })) {\n        return;\n      }\n\n      indices.sort();\n\n      if (this.multipleSelection) {\n        this._currentValueIndices = indices;\n        this._value = [];\n        indices.forEach(function (i) {\n          _this2._value.push(_this2._items[i].displayValue);\n        });\n      } else {\n        if (indices.length > 0) {\n          indices = indices.splice(1, indices.length - 1);\n          this._currentValueIndices = indices[0];\n          this._value = this._items[this._currentValueIndices];\n        }\n      }\n\n      this._send({\n        id: this._id,\n        indices: indices\n      });\n    }\n  }, {\n    key: "fillColor",\n    get: function get() {\n      return this._fillColor;\n    },\n    set: function set(color) {\n      if (_color.Color._isValidColor(color)) {\n        this._fillColor = color;\n      }\n    }\n  }, {\n    key: "bgColor",\n    get: function get() {\n      return this.fillColor;\n    },\n    set: function set(color) {\n      this.fillColor = color;\n    }\n  }, {\n    key: "numItems",\n    get: function get() {\n      if (!this._isChoice) {\n        throw new Error("Not a choice widget");\n      }\n\n      return this._items.length;\n    },\n    set: function set(_) {\n      throw new Error("field.numItems is read-only");\n    }\n  }, {\n    key: "strokeColor",\n    get: function get() {\n      return this._strokeColor;\n    },\n    set: function set(color) {\n      if (_color.Color._isValidColor(color)) {\n        this._strokeColor = color;\n      }\n    }\n  }, {\n    key: "borderColor",\n    get: function get() {\n      return this.strokeColor;\n    },\n    set: function set(color) {\n      this.strokeColor = color;\n    }\n  }, {\n    key: "page",\n    get: function get() {\n      return this._page;\n    },\n    set: function set(_) {\n      throw new Error("field.page is read-only");\n    }\n  }, {\n    key: "textColor",\n    get: function get() {\n      return this._textColor;\n    },\n    set: function set(color) {\n      if (_color.Color._isValidColor(color)) {\n        this._textColor = color;\n      }\n    }\n  }, {\n    key: "fgColor",\n    get: function get() {\n      return this.textColor;\n    },\n    set: function set(color) {\n      this.textColor = color;\n    }\n  }, {\n    key: "value",\n    get: function get() {\n      return this._value;\n    },\n    set: function set(value) {\n      var _this3 = this;\n\n      if (value === "") {\n        this._value = "";\n      } else if (typeof value === "string") {\n        switch (this._fieldType) {\n          case _common.FieldType.number:\n          case _common.FieldType.percent:\n            value = parseFloat(value);\n\n            if (!isNaN(value)) {\n              this._value = value;\n            }\n\n            break;\n\n          default:\n            this._value = value;\n        }\n      } else {\n        this._value = value;\n      }\n\n      if (this._isChoice) {\n        if (this.multipleSelection) {\n          var values = new Set(value);\n          this._currentValueIndices.length = 0;\n\n          this._items.forEach(function (_ref, i) {\n            var displayValue = _ref.displayValue;\n\n            if (values.has(displayValue)) {\n              _this3._currentValueIndices.push(i);\n            }\n          });\n        } else {\n          this._currentValueIndices = this._items.findIndex(function (_ref2) {\n            var displayValue = _ref2.displayValue;\n            return value === displayValue;\n          });\n        }\n      }\n    }\n  }, {\n    key: "valueAsString",\n    get: function get() {\n      if (this._valueAsString === undefined) {\n        this._valueAsString = this._value ? this._value.toString() : "";\n      }\n\n      return this._valueAsString;\n    },\n    set: function set(val) {\n      this._valueAsString = val ? val.toString() : "";\n    }\n  }, {\n    key: "browseForFileToSubmit",\n    value: function browseForFileToSubmit() {\n      if (this._browseForFileToSubmit) {\n        this._browseForFileToSubmit();\n      }\n    }\n  }, {\n    key: "buttonGetCaption",\n    value: function buttonGetCaption() {\n      var nFace = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n      if (this._buttonCaption) {\n        return this._buttonCaption[nFace];\n      }\n\n      return "";\n    }\n  }, {\n    key: "buttonGetIcon",\n    value: function buttonGetIcon() {\n      var nFace = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n      if (this._buttonIcon) {\n        return this._buttonIcon[nFace];\n      }\n\n      return null;\n    }\n  }, {\n    key: "buttonImportIcon",\n    value: function buttonImportIcon() {\n      var cPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n      var nPave = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n    }\n  }, {\n    key: "buttonSetCaption",\n    value: function buttonSetCaption(cCaption) {\n      var nFace = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n      if (!this._buttonCaption) {\n        this._buttonCaption = ["", "", ""];\n      }\n\n      this._buttonCaption[nFace] = cCaption;\n    }\n  }, {\n    key: "buttonSetIcon",\n    value: function buttonSetIcon(oIcon) {\n      var nFace = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n      if (!this._buttonIcon) {\n        this._buttonIcon = [null, null, null];\n      }\n\n      this._buttonIcon[nFace] = oIcon;\n    }\n  }, {\n    key: "checkThisBox",\n    value: function checkThisBox(nWidget) {\n      var bCheckIt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n    }\n  }, {\n    key: "clearItems",\n    value: function clearItems() {\n      if (!this._isChoice) {\n        throw new Error("Not a choice widget");\n      }\n\n      this._items = [];\n\n      this._send({\n        id: this._id,\n        clear: null\n      });\n    }\n  }, {\n    key: "deleteItemAt",\n    value: function deleteItemAt() {\n      var nIdx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n      if (!this._isChoice) {\n        throw new Error("Not a choice widget");\n      }\n\n      if (!this.numItems) {\n        return;\n      }\n\n      if (nIdx === null) {\n        nIdx = Array.isArray(this._currentValueIndices) ? this._currentValueIndices[0] : this._currentValueIndices;\n        nIdx = nIdx || 0;\n      }\n\n      if (nIdx < 0 || nIdx >= this.numItems) {\n        nIdx = this.numItems - 1;\n      }\n\n      this._items.splice(nIdx, 1);\n\n      if (Array.isArray(this._currentValueIndices)) {\n        var index = this._currentValueIndices.findIndex(function (i) {\n          return i >= nIdx;\n        });\n\n        if (index !== -1) {\n          if (this._currentValueIndices[index] === nIdx) {\n            this._currentValueIndices.splice(index, 1);\n          }\n\n          for (var ii = this._currentValueIndices.length; index < ii; index++) {\n            --this._currentValueIndices[index];\n          }\n        }\n      } else {\n        if (this._currentValueIndices === nIdx) {\n          this._currentValueIndices = this.numItems > 0 ? 0 : -1;\n        } else if (this._currentValueIndices > nIdx) {\n          --this._currentValueIndices;\n        }\n      }\n\n      this._send({\n        id: this._id,\n        remove: nIdx\n      });\n    }\n  }, {\n    key: "getItemAt",\n    value: function getItemAt() {\n      var nIdx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;\n      var bExportValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n      if (!this._isChoice) {\n        throw new Error("Not a choice widget");\n      }\n\n      if (nIdx < 0 || nIdx >= this.numItems) {\n        nIdx = this.numItems - 1;\n      }\n\n      var item = this._items[nIdx];\n      return bExportValue ? item.exportValue : item.displayValue;\n    }\n  }, {\n    key: "getArray",\n    value: function getArray() {\n      var _this4 = this;\n\n      if (this._kidIds) {\n        return this._kidIds.map(function (id) {\n          return _this4._appObjects[id].wrapped;\n        });\n      }\n\n      if (this._children === null) {\n        this._children = this._document.obj._getChildren(this._fieldPath);\n      }\n\n      return this._children;\n    }\n  }, {\n    key: "getLock",\n    value: function getLock() {\n      return undefined;\n    }\n  }, {\n    key: "isBoxChecked",\n    value: function isBoxChecked(nWidget) {\n      return false;\n    }\n  }, {\n    key: "isDefaultChecked",\n    value: function isDefaultChecked(nWidget) {\n      return false;\n    }\n  }, {\n    key: "insertItemAt",\n    value: function insertItemAt(cName) {\n      var cExport = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n      var nIdx = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n\n      if (!this._isChoice) {\n        throw new Error("Not a choice widget");\n      }\n\n      if (!cName) {\n        return;\n      }\n\n      if (nIdx < 0 || nIdx > this.numItems) {\n        nIdx = this.numItems;\n      }\n\n      if (this._items.some(function (_ref3) {\n        var displayValue = _ref3.displayValue;\n        return displayValue === cName;\n      })) {\n        return;\n      }\n\n      if (cExport === undefined) {\n        cExport = cName;\n      }\n\n      var data = {\n        displayValue: cName,\n        exportValue: cExport\n      };\n\n      this._items.splice(nIdx, 0, data);\n\n      if (Array.isArray(this._currentValueIndices)) {\n        var index = this._currentValueIndices.findIndex(function (i) {\n          return i >= nIdx;\n        });\n\n        if (index !== -1) {\n          for (var ii = this._currentValueIndices.length; index < ii; index++) {\n            ++this._currentValueIndices[index];\n          }\n        }\n      } else if (this._currentValueIndices >= nIdx) {\n        ++this._currentValueIndices;\n      }\n\n      this._send({\n        id: this._id,\n        insert: _objectSpread({\n          index: nIdx\n        }, data)\n      });\n    }\n  }, {\n    key: "setAction",\n    value: function setAction(cTrigger, cScript) {\n      if (typeof cTrigger !== "string" || typeof cScript !== "string") {\n        return;\n      }\n\n      if (!(cTrigger in this._actions)) {\n        this._actions[cTrigger] = [];\n      }\n\n      this._actions[cTrigger].push(cScript);\n    }\n  }, {\n    key: "setFocus",\n    value: function setFocus() {\n      this._send({\n        id: this._id,\n        focus: true\n      });\n    }\n  }, {\n    key: "setItems",\n    value: function setItems(oArray) {\n      if (!this._isChoice) {\n        throw new Error("Not a choice widget");\n      }\n\n      this._items.length = 0;\n\n      var _iterator = _createForOfIteratorHelper(oArray),\n          _step;\n\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var element = _step.value;\n          var displayValue = void 0,\n              exportValue = void 0;\n\n          if (Array.isArray(element)) {\n            var _element$, _element$2;\n\n            displayValue = ((_element$ = element[0]) === null || _element$ === void 0 ? void 0 : _element$.toString()) || "";\n            exportValue = ((_element$2 = element[1]) === null || _element$2 === void 0 ? void 0 : _element$2.toString()) || "";\n          } else {\n            displayValue = exportValue = (element === null || element === void 0 ? void 0 : element.toString()) || "";\n          }\n\n          this._items.push({\n            displayValue: displayValue,\n            exportValue: exportValue\n          });\n        }\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n\n      this._currentValueIndices = 0;\n\n      this._send({\n        id: this._id,\n        items: this._items\n      });\n    }\n  }, {\n    key: "setLock",\n    value: function setLock() {}\n  }, {\n    key: "signatureGetModifications",\n    value: function signatureGetModifications() {}\n  }, {\n    key: "signatureGetSeedValue",\n    value: function signatureGetSeedValue() {}\n  }, {\n    key: "signatureInfo",\n    value: function signatureInfo() {}\n  }, {\n    key: "signatureSetSeedValue",\n    value: function signatureSetSeedValue() {}\n  }, {\n    key: "signatureSign",\n    value: function signatureSign() {}\n  }, {\n    key: "signatureValidate",\n    value: function signatureValidate() {}\n  }, {\n    key: "_isButton",\n    value: function _isButton() {\n      return false;\n    }\n  }, {\n    key: "_reset",\n    value: function _reset() {\n      this.value = this.valueAsString = this.defaultValue;\n    }\n  }, {\n    key: "_runActions",\n    value: function _runActions(event) {\n      var eventName = event.name;\n\n      if (!this._actions.has(eventName)) {\n        return false;\n      }\n\n      var actions = this._actions.get(eventName);\n\n      try {\n        var _iterator2 = _createForOfIteratorHelper(actions),\n            _step2;\n\n        try {\n          for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n            var action = _step2.value;\n\n            this._globalEval(action);\n          }\n        } catch (err) {\n          _iterator2.e(err);\n        } finally {\n          _iterator2.f();\n        }\n      } catch (error) {\n        event.rc = false;\n        throw error;\n      }\n\n      return true;\n    }\n  }]);\n\n  return Field;\n}(_pdf_object.PDFObject);\n\nexports.Field = Field;\n\nvar RadioButtonField = /*#__PURE__*/function (_Field) {\n  _inherits(RadioButtonField, _Field);\n\n  var _super2 = _createSuper(RadioButtonField);\n\n  function RadioButtonField(otherButtons, data) {\n    var _this5;\n\n    _classCallCheck(this, RadioButtonField);\n\n    _this5 = _super2.call(this, data);\n    _this5.exportValues = [_this5.exportValues];\n    _this5._radioIds = [_this5._id];\n    _this5._radioActions = [_this5._actions];\n\n    var _iterator3 = _createForOfIteratorHelper(otherButtons),\n        _step3;\n\n    try {\n      for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n        var radioData = _step3.value;\n\n        _this5.exportValues.push(radioData.exportValues);\n\n        _this5._radioIds.push(radioData.id);\n\n        _this5._radioActions.push((0, _common.createActionsMap)(radioData.actions));\n\n        if (_this5._value === radioData.exportValues) {\n          _this5._id = radioData.id;\n        }\n      }\n    } catch (err) {\n      _iterator3.e(err);\n    } finally {\n      _iterator3.f();\n    }\n\n    return _this5;\n  }\n\n  _createClass(RadioButtonField, [{\n    key: "value",\n    get: function get() {\n      return this._value;\n    },\n    set: function set(value) {\n      if (value === null || value === undefined) {\n        this._value = "";\n      }\n\n      var i = this.exportValues.indexOf(value);\n\n      if (0 <= i && i < this._radioIds.length) {\n        this._id = this._radioIds[i];\n        this._value = value;\n      } else if (value === "Off" && this._radioIds.length === 2) {\n        var nextI = (1 + this._radioIds.indexOf(this._id)) % 2;\n        this._id = this._radioIds[nextI];\n        this._value = this.exportValues[nextI];\n      }\n    }\n  }, {\n    key: "checkThisBox",\n    value: function checkThisBox(nWidget) {\n      var bCheckIt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n      if (nWidget < 0 || nWidget >= this._radioIds.length || !bCheckIt) {\n        return;\n      }\n\n      this._id = this._radioIds[nWidget];\n      this._value = this.exportValues[nWidget];\n\n      this._send({\n        id: this._id,\n        value: this._value\n      });\n    }\n  }, {\n    key: "isBoxChecked",\n    value: function isBoxChecked(nWidget) {\n      return nWidget >= 0 && nWidget < this._radioIds.length && this._id === this._radioIds[nWidget];\n    }\n  }, {\n    key: "isDefaultChecked",\n    value: function isDefaultChecked(nWidget) {\n      return nWidget >= 0 && nWidget < this.exportValues.length && this.defaultValue === this.exportValues[nWidget];\n    }\n  }, {\n    key: "_getExportValue",\n    value: function _getExportValue(state) {\n      var i = this._radioIds.indexOf(this._id);\n\n      return this.exportValues[i];\n    }\n  }, {\n    key: "_runActions",\n    value: function _runActions(event) {\n      var i = this._radioIds.indexOf(this._id);\n\n      this._actions = this._radioActions[i];\n      return _get(_getPrototypeOf(RadioButtonField.prototype), "_runActions", this).call(this, event);\n    }\n  }, {\n    key: "_isButton",\n    value: function _isButton() {\n      return true;\n    }\n  }]);\n\n  return RadioButtonField;\n}(Field);\n\nexports.RadioButtonField = RadioButtonField;\n\nvar CheckboxField = /*#__PURE__*/function (_RadioButtonField) {\n  _inherits(CheckboxField, _RadioButtonField);\n\n  var _super3 = _createSuper(CheckboxField);\n\n  function CheckboxField() {\n    _classCallCheck(this, CheckboxField);\n\n    return _super3.apply(this, arguments);\n  }\n\n  _createClass(CheckboxField, [{\n    key: "value",\n    get: function get() {\n      return this._value;\n    },\n    set: function set(value) {\n      if (!value || value === "Off") {\n        this._value = "Off";\n      } else {\n        _set(_getPrototypeOf(CheckboxField.prototype), "value", value, this, true);\n      }\n    }\n  }, {\n    key: "_getExportValue",\n    value: function _getExportValue(state) {\n      return state ? _get(_getPrototypeOf(CheckboxField.prototype), "_getExportValue", this).call(this, state) : "Off";\n    }\n  }, {\n    key: "isBoxChecked",\n    value: function isBoxChecked(nWidget) {\n      if (this._value === "Off") {\n        return false;\n      }\n\n      return _get(_getPrototypeOf(CheckboxField.prototype), "isBoxChecked", this).call(this, nWidget);\n    }\n  }, {\n    key: "isDefaultChecked",\n    value: function isDefaultChecked(nWidget) {\n      if (this.defaultValue === "Off") {\n        return this._value === "Off";\n      }\n\n      return _get(_getPrototypeOf(CheckboxField.prototype), "isDefaultChecked", this).call(this, nWidget);\n    }\n  }, {\n    key: "checkThisBox",\n    value: function checkThisBox(nWidget) {\n      var bCheckIt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n      if (nWidget < 0 || nWidget >= this._radioIds.length) {\n        return;\n      }\n\n      this._id = this._radioIds[nWidget];\n      this._value = bCheckIt ? this.exportValues[nWidget] : "Off";\n\n      this._send({\n        id: this._id,\n        value: this._value\n      });\n    }\n  }]);\n\n  return CheckboxField;\n}(RadioButtonField);\n\nexports.CheckboxField = CheckboxField;\n\n/***/ }),\n/* 4 */\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nexports.FieldType = void 0;\nexports.createActionsMap = createActionsMap;\nexports.getFieldType = getFieldType;\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nvar FieldType = {\n  none: 0,\n  number: 1,\n  percent: 2,\n  date: 3,\n  time: 4\n};\nexports.FieldType = FieldType;\n\nfunction createActionsMap(actions) {\n  var actionsMap = new Map();\n\n  if (actions) {\n    for (var _i = 0, _Object$entries = Object.entries(actions); _i < _Object$entries.length; _i++) {\n      var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),\n          eventType = _Object$entries$_i[0],\n          actionsForEvent = _Object$entries$_i[1];\n\n      actionsMap.set(eventType, actionsForEvent);\n    }\n  }\n\n  return actionsMap;\n}\n\nfunction getFieldType(actions) {\n  var format = actions.get("Format");\n\n  if (!format) {\n    return FieldType.none;\n  }\n\n  format = format[0];\n  format = format.trim();\n\n  if (format.startsWith("AFNumber_")) {\n    return FieldType.number;\n  }\n\n  if (format.startsWith("AFPercent_")) {\n    return FieldType.percent;\n  }\n\n  if (format.startsWith("AFDate_")) {\n    return FieldType.date;\n  }\n\n  if (format.startsWith("AFTime__")) {\n    return FieldType.time;\n  }\n\n  return FieldType.none;\n}\n\n/***/ }),\n/* 5 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nfunction _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nexports.Color = void 0;\n\nvar _scripting_utils = __w_pdfjs_require__(6);\n\nvar _pdf_object = __w_pdfjs_require__(7);\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar Color = /*#__PURE__*/function (_PDFObject) {\n  _inherits(Color, _PDFObject);\n\n  var _super = _createSuper(Color);\n\n  function Color() {\n    var _this;\n\n    _classCallCheck(this, Color);\n\n    _this = _super.call(this, {});\n    _this.transparent = ["T"];\n    _this.black = ["G", 0];\n    _this.white = ["G", 1];\n    _this.red = ["RGB", 1, 0, 0];\n    _this.green = ["RGB", 0, 1, 0];\n    _this.blue = ["RGB", 0, 0, 1];\n    _this.cyan = ["CMYK", 1, 0, 0, 0];\n    _this.magenta = ["CMYK", 0, 1, 0, 0];\n    _this.yellow = ["CMYK", 0, 0, 1, 0];\n    _this.dkGray = ["G", 0.25];\n    _this.gray = ["G", 0.5];\n    _this.ltGray = ["G", 0.75];\n    return _this;\n  }\n\n  _createClass(Color, [{\n    key: "convert",\n    value: function convert(colorArray, cColorSpace) {\n      if (!Color._isValidSpace(cColorSpace)) {\n        return this.black;\n      }\n\n      if (cColorSpace === "T") {\n        return ["T"];\n      }\n\n      colorArray = Color._getCorrectColor(colorArray);\n\n      if (colorArray[0] === cColorSpace) {\n        return colorArray;\n      }\n\n      if (colorArray[0] === "T") {\n        return this.convert(this.black, cColorSpace);\n      }\n\n      return _scripting_utils.ColorConverters["".concat(colorArray[0], "_").concat(cColorSpace)](colorArray.slice(1));\n    }\n  }, {\n    key: "equal",\n    value: function equal(colorArray1, colorArray2) {\n      colorArray1 = Color._getCorrectColor(colorArray1);\n      colorArray2 = Color._getCorrectColor(colorArray2);\n\n      if (colorArray1[0] === "T" || colorArray2[0] === "T") {\n        return colorArray1[0] === "T" && colorArray2[0] === "T";\n      }\n\n      if (colorArray1[0] !== colorArray2[0]) {\n        colorArray2 = this.convert(colorArray2, colorArray1[0]);\n      }\n\n      return colorArray1.slice(1).every(function (c, i) {\n        return c === colorArray2[i + 1];\n      });\n    }\n  }], [{\n    key: "_isValidSpace",\n    value: function _isValidSpace(cColorSpace) {\n      return typeof cColorSpace === "string" && (cColorSpace === "T" || cColorSpace === "G" || cColorSpace === "RGB" || cColorSpace === "CMYK");\n    }\n  }, {\n    key: "_isValidColor",\n    value: function _isValidColor(colorArray) {\n      if (!Array.isArray(colorArray) || colorArray.length === 0) {\n        return false;\n      }\n\n      var space = colorArray[0];\n\n      if (!Color._isValidSpace(space)) {\n        return false;\n      }\n\n      switch (space) {\n        case "T":\n          if (colorArray.length !== 1) {\n            return false;\n          }\n\n          break;\n\n        case "G":\n          if (colorArray.length !== 2) {\n            return false;\n          }\n\n          break;\n\n        case "RGB":\n          if (colorArray.length !== 4) {\n            return false;\n          }\n\n          break;\n\n        case "CMYK":\n          if (colorArray.length !== 5) {\n            return false;\n          }\n\n          break;\n\n        default:\n          return false;\n      }\n\n      return colorArray.slice(1).every(function (c) {\n        return typeof c === "number" && c >= 0 && c <= 1;\n      });\n    }\n  }, {\n    key: "_getCorrectColor",\n    value: function _getCorrectColor(colorArray) {\n      return Color._isValidColor(colorArray) ? colorArray : ["G", 0];\n    }\n  }]);\n\n  return Color;\n}(_pdf_object.PDFObject);\n\nexports.Color = Color;\n\n/***/ }),\n/* 6 */\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nexports.ColorConverters = void 0;\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }\n\nfunction makeColorComp(n) {\n  return Math.floor(Math.max(0, Math.min(1, n)) * 255).toString(16).padStart(2, "0");\n}\n\nvar ColorConverters = /*#__PURE__*/function () {\n  function ColorConverters() {\n    _classCallCheck(this, ColorConverters);\n  }\n\n  _createClass(ColorConverters, null, [{\n    key: "CMYK_G",\n    value: function CMYK_G(_ref) {\n      var _ref2 = _slicedToArray(_ref, 4),\n          c = _ref2[0],\n          y = _ref2[1],\n          m = _ref2[2],\n          k = _ref2[3];\n\n      return ["G", 1 - Math.min(1, 0.3 * c + 0.59 * m + 0.11 * y + k)];\n    }\n  }, {\n    key: "G_CMYK",\n    value: function G_CMYK(_ref3) {\n      var _ref4 = _slicedToArray(_ref3, 1),\n          g = _ref4[0];\n\n      return ["CMYK", 0, 0, 0, 1 - g];\n    }\n  }, {\n    key: "G_RGB",\n    value: function G_RGB(_ref5) {\n      var _ref6 = _slicedToArray(_ref5, 1),\n          g = _ref6[0];\n\n      return ["RGB", g, g, g];\n    }\n  }, {\n    key: "G_HTML",\n    value: function G_HTML(_ref7) {\n      var _ref8 = _slicedToArray(_ref7, 1),\n          g = _ref8[0];\n\n      var G = makeColorComp(g);\n      return "#".concat(G).concat(G).concat(G);\n    }\n  }, {\n    key: "RGB_G",\n    value: function RGB_G(_ref9) {\n      var _ref10 = _slicedToArray(_ref9, 3),\n          r = _ref10[0],\n          g = _ref10[1],\n          b = _ref10[2];\n\n      return ["G", 0.3 * r + 0.59 * g + 0.11 * b];\n    }\n  }, {\n    key: "RGB_HTML",\n    value: function RGB_HTML(_ref11) {\n      var _ref12 = _slicedToArray(_ref11, 3),\n          r = _ref12[0],\n          g = _ref12[1],\n          b = _ref12[2];\n\n      var R = makeColorComp(r);\n      var G = makeColorComp(g);\n      var B = makeColorComp(b);\n      return "#".concat(R).concat(G).concat(B);\n    }\n  }, {\n    key: "T_HTML",\n    value: function T_HTML() {\n      return "#00000000";\n    }\n  }, {\n    key: "CMYK_RGB",\n    value: function CMYK_RGB(_ref13) {\n      var _ref14 = _slicedToArray(_ref13, 4),\n          c = _ref14[0],\n          y = _ref14[1],\n          m = _ref14[2],\n          k = _ref14[3];\n\n      return ["RGB", 1 - Math.min(1, c + k), 1 - Math.min(1, m + k), 1 - Math.min(1, y + k)];\n    }\n  }, {\n    key: "CMYK_HTML",\n    value: function CMYK_HTML(components) {\n      return this.RGB_HTML(this.CMYK_RGB(components));\n    }\n  }, {\n    key: "RGB_CMYK",\n    value: function RGB_CMYK(_ref15) {\n      var _ref16 = _slicedToArray(_ref15, 3),\n          r = _ref16[0],\n          g = _ref16[1],\n          b = _ref16[2];\n\n      var c = 1 - r;\n      var m = 1 - g;\n      var y = 1 - b;\n      var k = Math.min(c, m, y);\n      return ["CMYK", c, m, y, k];\n    }\n  }]);\n\n  return ColorConverters;\n}();\n\nexports.ColorConverters = ColorConverters;\n\n/***/ }),\n/* 7 */\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nexports.PDFObject = void 0;\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nvar PDFObject = /*#__PURE__*/_createClass(function PDFObject(data) {\n  _classCallCheck(this, PDFObject);\n\n  this._expandos = Object.create(null);\n  this._send = data.send || null;\n  this._id = data.id || null;\n});\n\nexports.PDFObject = PDFObject;\n\n/***/ }),\n/* 8 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nexports.AForm = void 0;\n\nvar _constants = __w_pdfjs_require__(2);\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }\n\nvar AForm = /*#__PURE__*/function () {\n  function AForm(document, app, util, color) {\n    _classCallCheck(this, AForm);\n\n    this._document = document;\n    this._app = app;\n    this._util = util;\n    this._color = color;\n    this._dateFormats = ["m/d", "m/d/yy", "mm/dd/yy", "mm/yy", "d-mmm", "d-mmm-yy", "dd-mmm-yy", "yy-mm-dd", "mmm-yy", "mmmm-yy", "mmm d, yyyy", "mmmm d, yyyy", "m/d/yy h:MM tt", "m/d/yy HH:MM"];\n    this._timeFormats = ["HH:MM", "h:MM tt", "HH:MM:ss", "h:MM:ss tt"];\n    this._emailRegex = new RegExp("^[a-zA-Z0-9.!#$%&\'*+\\\\/=?^_`{|}~-]+" + "@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?" + "(?:\\\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$");\n  }\n\n  _createClass(AForm, [{\n    key: "_mkTargetName",\n    value: function _mkTargetName(event) {\n      return event.target ? "[ ".concat(event.target.name, " ]") : "";\n    }\n  }, {\n    key: "_parseDate",\n    value: function _parseDate(cFormat, cDate) {\n      var ddate = Date.parse(cDate);\n\n      if (isNaN(ddate)) {\n        try {\n          return this._util.scand(cFormat, cDate);\n        } catch (error) {\n          return null;\n        }\n      } else {\n        return new Date(ddate);\n      }\n    }\n  }, {\n    key: "AFMergeChange",\n    value: function AFMergeChange() {\n      var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : globalThis.event;\n\n      if (event.willCommit) {\n        return event.value.toString();\n      }\n\n      return this._app._eventDispatcher.mergeChange(event);\n    }\n  }, {\n    key: "AFParseDateEx",\n    value: function AFParseDateEx(cString, cOrder) {\n      return this._parseDate(cOrder, cString);\n    }\n  }, {\n    key: "AFExtractNums",\n    value: function AFExtractNums(str) {\n      if (typeof str === "number") {\n        return [str];\n      }\n\n      if (!str || typeof str !== "string") {\n        return null;\n      }\n\n      var first = str.charAt(0);\n\n      if (first === "." || first === ",") {\n        str = "0".concat(str);\n      }\n\n      var numbers = str.match(/(\\d+)/g);\n\n      if (numbers.length === 0) {\n        return null;\n      }\n\n      return numbers;\n    }\n  }, {\n    key: "AFMakeNumber",\n    value: function AFMakeNumber(str) {\n      if (typeof str === "number") {\n        return str;\n      }\n\n      if (typeof str !== "string") {\n        return null;\n      }\n\n      str = str.trim().replace(",", ".");\n      var number = parseFloat(str);\n\n      if (isNaN(number) || !isFinite(number)) {\n        return null;\n      }\n\n      return number;\n    }\n  }, {\n    key: "AFMakeArrayFromList",\n    value: function AFMakeArrayFromList(string) {\n      if (typeof string === "string") {\n        return string.split(/, ?/g);\n      }\n\n      return string;\n    }\n  }, {\n    key: "AFNumber_Format",\n    value: function AFNumber_Format(nDec, sepStyle, negStyle, currStyle, strCurrency, bCurrencyPrepend) {\n      var event = globalThis.event;\n\n      if (!event.value) {\n        return;\n      }\n\n      var value = this.AFMakeNumber(event.value);\n\n      if (value === null) {\n        event.value = "";\n        return;\n      }\n\n      var sign = Math.sign(value);\n      var buf = [];\n      var hasParen = false;\n\n      if (sign === -1 && bCurrencyPrepend && negStyle === 0) {\n        buf.push("-");\n      }\n\n      if ((negStyle === 2 || negStyle === 3) && sign === -1) {\n        buf.push("(");\n        hasParen = true;\n      }\n\n      if (bCurrencyPrepend) {\n        buf.push(strCurrency);\n      }\n\n      sepStyle = Math.min(Math.max(0, Math.floor(sepStyle)), 4);\n      buf.push("%,", sepStyle, ".", nDec.toString(), "f");\n\n      if (!bCurrencyPrepend) {\n        buf.push(strCurrency);\n      }\n\n      if (hasParen) {\n        buf.push(")");\n      }\n\n      if (negStyle === 1 || negStyle === 3) {\n        event.target.textColor = sign === 1 ? this._color.black : this._color.red;\n      }\n\n      if ((negStyle !== 0 || bCurrencyPrepend) && sign === -1) {\n        value = -value;\n      }\n\n      var formatStr = buf.join("");\n      event.value = this._util.printf(formatStr, value);\n    }\n  }, {\n    key: "AFNumber_Keystroke",\n    value: function AFNumber_Keystroke(nDec, sepStyle, negStyle, currStyle, strCurrency, bCurrencyPrepend) {\n      var event = globalThis.event;\n      var value = this.AFMergeChange(event);\n\n      if (!value) {\n        return;\n      }\n\n      value = value.trim();\n      var pattern;\n\n      if (sepStyle > 1) {\n        pattern = event.willCommit ? /^[+-]?(\\d+(,\\d*)?|,\\d+)$/ : /^[+-]?\\d*,?\\d*$/;\n      } else {\n        pattern = event.willCommit ? /^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$/ : /^[+-]?\\d*\\.?\\d*$/;\n      }\n\n      if (!pattern.test(value)) {\n        if (event.willCommit) {\n          var err = "".concat(_constants.GlobalConstants.IDS_INVALID_VALUE, " ").concat(this._mkTargetName(event));\n\n          this._app.alert(err);\n        }\n\n        event.rc = false;\n      }\n\n      if (event.willCommit && sepStyle > 1) {\n        event.value = parseFloat(value.replace(",", "."));\n      }\n    }\n  }, {\n    key: "AFPercent_Format",\n    value: function AFPercent_Format(nDec, sepStyle) {\n      var percentPrepend = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n      if (typeof nDec !== "number") {\n        return;\n      }\n\n      if (typeof sepStyle !== "number") {\n        return;\n      }\n\n      if (nDec < 0) {\n        throw new Error("Invalid nDec value in AFPercent_Format");\n      }\n\n      var event = globalThis.event;\n\n      if (nDec > 512) {\n        event.value = "%";\n        return;\n      }\n\n      nDec = Math.floor(nDec);\n      sepStyle = Math.min(Math.max(0, Math.floor(sepStyle)), 4);\n      var value = this.AFMakeNumber(event.value);\n\n      if (value === null) {\n        event.value = "%";\n        return;\n      }\n\n      var formatStr = "%,".concat(sepStyle, ".").concat(nDec, "f");\n      value = this._util.printf(formatStr, value * 100);\n\n      if (percentPrepend) {\n        event.value = "%".concat(value);\n      } else {\n        event.value = "".concat(value, "%");\n      }\n    }\n  }, {\n    key: "AFPercent_Keystroke",\n    value: function AFPercent_Keystroke(nDec, sepStyle) {\n      this.AFNumber_Keystroke(nDec, sepStyle, 0, 0, "", true);\n    }\n  }, {\n    key: "AFDate_FormatEx",\n    value: function AFDate_FormatEx(cFormat) {\n      var event = globalThis.event;\n      var value = event.value;\n\n      if (!value) {\n        return;\n      }\n\n      var date = this._parseDate(cFormat, value);\n\n      if (date !== null) {\n        event.value = this._util.printd(cFormat, date);\n      }\n    }\n  }, {\n    key: "AFDate_Format",\n    value: function AFDate_Format(pdf) {\n      if (pdf >= 0 && pdf < this._dateFormats.length) {\n        this.AFDate_FormatEx(this._dateFormats[pdf]);\n      }\n    }\n  }, {\n    key: "AFDate_KeystrokeEx",\n    value: function AFDate_KeystrokeEx(cFormat) {\n      var event = globalThis.event;\n\n      if (!event.willCommit) {\n        return;\n      }\n\n      var value = this.AFMergeChange(event);\n\n      if (!value) {\n        return;\n      }\n\n      if (this._parseDate(cFormat, value) === null) {\n        var invalid = _constants.GlobalConstants.IDS_INVALID_DATE;\n        var invalid2 = _constants.GlobalConstants.IDS_INVALID_DATE2;\n        var err = "".concat(invalid, " ").concat(this._mkTargetName(event)).concat(invalid2).concat(cFormat);\n\n        this._app.alert(err);\n\n        event.rc = false;\n      }\n    }\n  }, {\n    key: "AFDate_Keystroke",\n    value: function AFDate_Keystroke(pdf) {\n      if (pdf >= 0 && pdf < this._dateFormats.length) {\n        this.AFDate_KeystrokeEx(this._dateFormats[pdf]);\n      }\n    }\n  }, {\n    key: "AFRange_Validate",\n    value: function AFRange_Validate(bGreaterThan, nGreaterThan, bLessThan, nLessThan) {\n      var event = globalThis.event;\n\n      if (!event.value) {\n        return;\n      }\n\n      var value = this.AFMakeNumber(event.value);\n\n      if (value === null) {\n        return;\n      }\n\n      bGreaterThan = !!bGreaterThan;\n      bLessThan = !!bLessThan;\n\n      if (bGreaterThan) {\n        nGreaterThan = this.AFMakeNumber(nGreaterThan);\n\n        if (nGreaterThan === null) {\n          return;\n        }\n      }\n\n      if (bLessThan) {\n        nLessThan = this.AFMakeNumber(nLessThan);\n\n        if (nLessThan === null) {\n          return;\n        }\n      }\n\n      var err = "";\n\n      if (bGreaterThan && bLessThan) {\n        if (value < nGreaterThan || value > nLessThan) {\n          err = this._util.printf(_constants.GlobalConstants.IDS_GT_AND_LT, nGreaterThan, nLessThan);\n        }\n      } else if (bGreaterThan) {\n        if (value < nGreaterThan) {\n          err = this._util.printf(_constants.GlobalConstants.IDS_GREATER_THAN, nGreaterThan);\n        }\n      } else if (value > nLessThan) {\n        err = this._util.printf(_constants.GlobalConstants.IDS_LESS_THAN, nLessThan);\n      }\n\n      if (err) {\n        this._app.alert(err);\n\n        event.rc = false;\n      }\n    }\n  }, {\n    key: "AFSimple",\n    value: function AFSimple(cFunction, nValue1, nValue2) {\n      var value1 = this.AFMakeNumber(nValue1);\n\n      if (value1 === null) {\n        throw new Error("Invalid nValue1 in AFSimple");\n      }\n\n      var value2 = this.AFMakeNumber(nValue2);\n\n      if (value2 === null) {\n        throw new Error("Invalid nValue2 in AFSimple");\n      }\n\n      switch (cFunction) {\n        case "AVG":\n          return (value1 + value2) / 2;\n\n        case "SUM":\n          return value1 + value2;\n\n        case "PRD":\n          return value1 * value2;\n\n        case "MIN":\n          return Math.min(value1, value2);\n\n        case "MAX":\n          return Math.max(value1, value2);\n      }\n\n      throw new Error("Invalid cFunction in AFSimple");\n    }\n  }, {\n    key: "AFSimple_Calculate",\n    value: function AFSimple_Calculate(cFunction, cFields) {\n      var actions = {\n        AVG: function AVG(args) {\n          return args.reduce(function (acc, value) {\n            return acc + value;\n          }, 0) / args.length;\n        },\n        SUM: function SUM(args) {\n          return args.reduce(function (acc, value) {\n            return acc + value;\n          }, 0);\n        },\n        PRD: function PRD(args) {\n          return args.reduce(function (acc, value) {\n            return acc * value;\n          }, 1);\n        },\n        MIN: function MIN(args) {\n          return args.reduce(function (acc, value) {\n            return Math.min(acc, value);\n          }, Number.MAX_VALUE);\n        },\n        MAX: function MAX(args) {\n          return args.reduce(function (acc, value) {\n            return Math.max(acc, value);\n          }, Number.MIN_VALUE);\n        }\n      };\n\n      if (!(cFunction in actions)) {\n        throw new TypeError("Invalid function in AFSimple_Calculate");\n      }\n\n      var event = globalThis.event;\n      var values = [];\n\n      var _iterator = _createForOfIteratorHelper(cFields),\n          _step;\n\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var cField = _step.value;\n\n          var field = this._document.getField(cField);\n\n          var number = this.AFMakeNumber(field.value);\n\n          if (number !== null) {\n            values.push(number);\n          }\n        }\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n\n      if (values.length === 0) {\n        event.value = cFunction === "PRD" ? 1 : 0;\n        return;\n      }\n\n      var res = actions[cFunction](values);\n      event.value = Math.round(1e6 * res) / 1e6;\n    }\n  }, {\n    key: "AFSpecial_Format",\n    value: function AFSpecial_Format(psf) {\n      var event = globalThis.event;\n\n      if (!event.value) {\n        return;\n      }\n\n      psf = this.AFMakeNumber(psf);\n      var formatStr;\n\n      switch (psf) {\n        case 0:\n          formatStr = "99999";\n          break;\n\n        case 1:\n          formatStr = "99999-9999";\n          break;\n\n        case 2:\n          if (this._util.printx("9999999999", event.value).length >= 10) {\n            formatStr = "(999) 999-9999";\n          } else {\n            formatStr = "999-9999";\n          }\n\n          break;\n\n        case 3:\n          formatStr = "999-99-9999";\n          break;\n\n        default:\n          throw new Error("Invalid psf in AFSpecial_Format");\n      }\n\n      event.value = this._util.printx(formatStr, event.value);\n    }\n  }, {\n    key: "AFSpecial_KeystrokeEx",\n    value: function AFSpecial_KeystrokeEx(cMask) {\n      if (!cMask) {\n        return;\n      }\n\n      var event = globalThis.event;\n      var value = this.AFMergeChange(event);\n\n      if (!value) {\n        return;\n      }\n\n      var checkers = new Map([["9", function (_char) {\n        return _char >= "0" && _char <= "9";\n      }], ["A", function (_char2) {\n        return "a" <= _char2 && _char2 <= "z" || "A" <= _char2 && _char2 <= "Z";\n      }], ["O", function (_char3) {\n        return "a" <= _char3 && _char3 <= "z" || "A" <= _char3 && _char3 <= "Z" || "0" <= _char3 && _char3 <= "9";\n      }], ["X", function (_char4) {\n        return true;\n      }]]);\n\n      function _checkValidity(_value, _cMask) {\n        for (var i = 0, ii = _value.length; i < ii; i++) {\n          var mask = _cMask.charAt(i);\n\n          var _char5 = _value.charAt(i);\n\n          var checker = checkers.get(mask);\n\n          if (checker) {\n            if (!checker(_char5)) {\n              return false;\n            }\n          } else if (mask !== _char5) {\n            return false;\n          }\n        }\n\n        return true;\n      }\n\n      var err = "".concat(_constants.GlobalConstants.IDS_INVALID_VALUE, " = \\"").concat(cMask, "\\"");\n\n      if (value.length > cMask.length) {\n        this._app.alert(err);\n\n        event.rc = false;\n        return;\n      }\n\n      if (event.willCommit) {\n        if (value.length < cMask.length) {\n          this._app.alert(err);\n\n          event.rc = false;\n          return;\n        }\n\n        if (!_checkValidity(value, cMask)) {\n          this._app.alert(err);\n\n          event.rc = false;\n          return;\n        }\n\n        event.value += cMask.substring(value.length);\n        return;\n      }\n\n      if (value.length < cMask.length) {\n        cMask = cMask.substring(0, value.length);\n      }\n\n      if (!_checkValidity(value, cMask)) {\n        this._app.alert(err);\n\n        event.rc = false;\n      }\n    }\n  }, {\n    key: "AFSpecial_Keystroke",\n    value: function AFSpecial_Keystroke(psf) {\n      var event = globalThis.event;\n      psf = this.AFMakeNumber(psf);\n      var formatStr;\n\n      switch (psf) {\n        case 0:\n          formatStr = "99999";\n          break;\n\n        case 1:\n          formatStr = "99999-9999";\n          break;\n\n        case 2:\n          var value = this.AFMergeChange(event);\n\n          if (value.length > 8 || value.startsWith("(")) {\n            formatStr = "(999) 999-9999";\n          } else {\n            formatStr = "999-9999";\n          }\n\n          break;\n\n        case 3:\n          formatStr = "999-99-9999";\n          break;\n\n        default:\n          throw new Error("Invalid psf in AFSpecial_Keystroke");\n      }\n\n      this.AFSpecial_KeystrokeEx(formatStr);\n    }\n  }, {\n    key: "AFTime_FormatEx",\n    value: function AFTime_FormatEx(cFormat) {\n      this.AFDate_FormatEx(cFormat);\n    }\n  }, {\n    key: "AFTime_Format",\n    value: function AFTime_Format(pdf) {\n      if (pdf >= 0 && pdf < this._timeFormats.length) {\n        this.AFDate_FormatEx(this._timeFormats[pdf]);\n      }\n    }\n  }, {\n    key: "AFTime_KeystrokeEx",\n    value: function AFTime_KeystrokeEx(cFormat) {\n      this.AFDate_KeystrokeEx(cFormat);\n    }\n  }, {\n    key: "AFTime_Keystroke",\n    value: function AFTime_Keystroke(pdf) {\n      if (pdf >= 0 && pdf < this._timeFormats.length) {\n        this.AFDate_KeystrokeEx(this._timeFormats[pdf]);\n      }\n    }\n  }, {\n    key: "eMailValidate",\n    value: function eMailValidate(str) {\n      return this._emailRegex.test(str);\n    }\n  }]);\n\n  return AForm;\n}();\n\nexports.AForm = AForm;\n\n/***/ }),\n/* 9 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nexports.App = void 0;\n\nvar _color = __w_pdfjs_require__(5);\n\nvar _event = __w_pdfjs_require__(10);\n\nvar _fullscreen = __w_pdfjs_require__(11);\n\nvar _pdf_object = __w_pdfjs_require__(7);\n\nvar _thermometer = __w_pdfjs_require__(12);\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar VIEWER_TYPE = "PDF.js";\nvar VIEWER_VARIATION = "Full";\nvar VIEWER_VERSION = 21.00720099;\nvar FORMS_VERSION = 21.00720099;\n\nvar App = /*#__PURE__*/function (_PDFObject) {\n  _inherits(App, _PDFObject);\n\n  var _super = _createSuper(App);\n\n  function App(data) {\n    var _this;\n\n    _classCallCheck(this, App);\n\n    _this = _super.call(this, data);\n    _this._constants = null;\n    _this._focusRect = true;\n    _this._fs = null;\n    _this._language = App._getLanguage(data.language);\n    _this._openInPlace = false;\n    _this._platform = App._getPlatform(data.platform);\n    _this._runtimeHighlight = false;\n    _this._runtimeHighlightColor = ["T"];\n    _this._thermometer = null;\n    _this._toolbar = false;\n    _this._document = data._document;\n    _this._proxyHandler = data.proxyHandler;\n    _this._objects = Object.create(null);\n    _this._eventDispatcher = new _event.EventDispatcher(_this._document, data.calculationOrder, _this._objects);\n    _this._timeoutIds = new WeakMap();\n\n    if (typeof FinalizationRegistry !== "undefined") {\n      _this._timeoutIdsRegistry = new FinalizationRegistry(_this._cleanTimeout.bind(_assertThisInitialized(_this)));\n    } else {\n      _this._timeoutIdsRegistry = null;\n    }\n\n    _this._timeoutCallbackIds = new Map();\n    _this._timeoutCallbackId = 0;\n    _this._globalEval = data.globalEval;\n    _this._externalCall = data.externalCall;\n    _this._document = data._document;\n    return _this;\n  }\n\n  _createClass(App, [{\n    key: "_dispatchEvent",\n    value: function _dispatchEvent(pdfEvent) {\n      this._eventDispatcher.dispatch(pdfEvent);\n    }\n  }, {\n    key: "_registerTimeoutCallback",\n    value: function _registerTimeoutCallback(cExpr) {\n      var id = this._timeoutCallbackId++;\n\n      this._timeoutCallbackIds.set(id, cExpr);\n\n      return id;\n    }\n  }, {\n    key: "_unregisterTimeoutCallback",\n    value: function _unregisterTimeoutCallback(id) {\n      this._timeoutCallbackIds["delete"](id);\n    }\n  }, {\n    key: "_evalCallback",\n    value: function _evalCallback(_ref) {\n      var callbackId = _ref.callbackId,\n          interval = _ref.interval;\n\n      var expr = this._timeoutCallbackIds.get(callbackId);\n\n      if (!interval) {\n        this._unregisterTimeoutCallback(callbackId);\n      }\n\n      if (expr) {\n        this._globalEval(expr);\n      }\n    }\n  }, {\n    key: "_registerTimeout",\n    value: function _registerTimeout(callbackId, interval) {\n      var timeout = Object.create(null);\n      var id = {\n        callbackId: callbackId,\n        interval: interval\n      };\n\n      this._timeoutIds.set(timeout, id);\n\n      if (this._timeoutIdsRegistry) {\n        this._timeoutIdsRegistry.register(timeout, id);\n      }\n\n      return timeout;\n    }\n  }, {\n    key: "_unregisterTimeout",\n    value: function _unregisterTimeout(timeout) {\n      if (this._timeoutIdsRegistry) {\n        this._timeoutIdsRegistry.unregister(timeout);\n      }\n\n      var data = this._timeoutIds.get(timeout);\n\n      if (!data) {\n        return;\n      }\n\n      this._timeoutIds["delete"](timeout);\n\n      this._cleanTimeout(data);\n    }\n  }, {\n    key: "_cleanTimeout",\n    value: function _cleanTimeout(_ref2) {\n      var callbackId = _ref2.callbackId,\n          interval = _ref2.interval;\n\n      this._unregisterTimeoutCallback(callbackId);\n\n      if (interval) {\n        this._externalCall("clearInterval", [callbackId]);\n      } else {\n        this._externalCall("clearTimeout", [callbackId]);\n      }\n    }\n  }, {\n    key: "activeDocs",\n    get: function get() {\n      return [this._document.wrapped];\n    },\n    set: function set(_) {\n      throw new Error("app.activeDocs is read-only");\n    }\n  }, {\n    key: "calculate",\n    get: function get() {\n      return this._document.obj.calculate;\n    },\n    set: function set(calculate) {\n      this._document.obj.calculate = calculate;\n    }\n  }, {\n    key: "constants",\n    get: function get() {\n      if (!this._constants) {\n        this._constants = Object.freeze({\n          align: Object.freeze({\n            left: 0,\n            center: 1,\n            right: 2,\n            top: 3,\n            bottom: 4\n          })\n        });\n      }\n\n      return this._constants;\n    },\n    set: function set(_) {\n      throw new Error("app.constants is read-only");\n    }\n  }, {\n    key: "focusRect",\n    get: function get() {\n      return this._focusRect;\n    },\n    set: function set(val) {\n      this._focusRect = val;\n    }\n  }, {\n    key: "formsVersion",\n    get: function get() {\n      return FORMS_VERSION;\n    },\n    set: function set(_) {\n      throw new Error("app.formsVersion is read-only");\n    }\n  }, {\n    key: "fromPDFConverters",\n    get: function get() {\n      return [];\n    },\n    set: function set(_) {\n      throw new Error("app.fromPDFConverters is read-only");\n    }\n  }, {\n    key: "fs",\n    get: function get() {\n      if (this._fs === null) {\n        this._fs = new Proxy(new _fullscreen.FullScreen({\n          send: this._send\n        }), this._proxyHandler);\n      }\n\n      return this._fs;\n    },\n    set: function set(_) {\n      throw new Error("app.fs is read-only");\n    }\n  }, {\n    key: "language",\n    get: function get() {\n      return this._language;\n    },\n    set: function set(_) {\n      throw new Error("app.language is read-only");\n    }\n  }, {\n    key: "media",\n    get: function get() {\n      return undefined;\n    },\n    set: function set(_) {\n      throw new Error("app.media is read-only");\n    }\n  }, {\n    key: "monitors",\n    get: function get() {\n      return [];\n    },\n    set: function set(_) {\n      throw new Error("app.monitors is read-only");\n    }\n  }, {\n    key: "numPlugins",\n    get: function get() {\n      return 0;\n    },\n    set: function set(_) {\n      throw new Error("app.numPlugins is read-only");\n    }\n  }, {\n    key: "openInPlace",\n    get: function get() {\n      return this._openInPlace;\n    },\n    set: function set(val) {\n      this._openInPlace = val;\n    }\n  }, {\n    key: "platform",\n    get: function get() {\n      return this._platform;\n    },\n    set: function set(_) {\n      throw new Error("app.platform is read-only");\n    }\n  }, {\n    key: "plugins",\n    get: function get() {\n      return [];\n    },\n    set: function set(_) {\n      throw new Error("app.plugins is read-only");\n    }\n  }, {\n    key: "printColorProfiles",\n    get: function get() {\n      return [];\n    },\n    set: function set(_) {\n      throw new Error("app.printColorProfiles is read-only");\n    }\n  }, {\n    key: "printerNames",\n    get: function get() {\n      return [];\n    },\n    set: function set(_) {\n      throw new Error("app.printerNames is read-only");\n    }\n  }, {\n    key: "runtimeHighlight",\n    get: function get() {\n      return this._runtimeHighlight;\n    },\n    set: function set(val) {\n      this._runtimeHighlight = val;\n    }\n  }, {\n    key: "runtimeHighlightColor",\n    get: function get() {\n      return this._runtimeHighlightColor;\n    },\n    set: function set(val) {\n      if (_color.Color._isValidColor(val)) {\n        this._runtimeHighlightColor = val;\n      }\n    }\n  }, {\n    key: "thermometer",\n    get: function get() {\n      if (this._thermometer === null) {\n        this._thermometer = new Proxy(new _thermometer.Thermometer({\n          send: this._send\n        }), this._proxyHandler);\n      }\n\n      return this._thermometer;\n    },\n    set: function set(_) {\n      throw new Error("app.thermometer is read-only");\n    }\n  }, {\n    key: "toolbar",\n    get: function get() {\n      return this._toolbar;\n    },\n    set: function set(val) {\n      this._toolbar = val;\n    }\n  }, {\n    key: "toolbarHorizontal",\n    get: function get() {\n      return this.toolbar;\n    },\n    set: function set(value) {\n      this.toolbar = value;\n    }\n  }, {\n    key: "toolbarVertical",\n    get: function get() {\n      return this.toolbar;\n    },\n    set: function set(value) {\n      this.toolbar = value;\n    }\n  }, {\n    key: "viewerType",\n    get: function get() {\n      return VIEWER_TYPE;\n    },\n    set: function set(_) {\n      throw new Error("app.viewerType is read-only");\n    }\n  }, {\n    key: "viewerVariation",\n    get: function get() {\n      return VIEWER_VARIATION;\n    },\n    set: function set(_) {\n      throw new Error("app.viewerVariation is read-only");\n    }\n  }, {\n    key: "viewerVersion",\n    get: function get() {\n      return VIEWER_VERSION;\n    },\n    set: function set(_) {\n      throw new Error("app.viewerVersion is read-only");\n    }\n  }, {\n    key: "addMenuItem",\n    value: function addMenuItem() {}\n  }, {\n    key: "addSubMenu",\n    value: function addSubMenu() {}\n  }, {\n    key: "addToolButton",\n    value: function addToolButton() {}\n  }, {\n    key: "alert",\n    value: function alert(cMsg) {\n      var nIcon = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n      var nType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n      var cTitle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "PDF.js";\n      var oDoc = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n      var oCheckbox = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;\n\n      if (_typeof(cMsg) === "object") {\n        nType = cMsg.nType;\n        cMsg = cMsg.cMsg;\n      }\n\n      cMsg = (cMsg || "").toString();\n      nType = typeof nType !== "number" || isNaN(nType) || nType < 0 || nType > 3 ? 0 : nType;\n\n      if (nType >= 2) {\n        return this._externalCall("confirm", [cMsg]) ? 4 : 3;\n      }\n\n      this._externalCall("alert", [cMsg]);\n\n      return 1;\n    }\n  }, {\n    key: "beep",\n    value: function beep() {}\n  }, {\n    key: "beginPriv",\n    value: function beginPriv() {}\n  }, {\n    key: "browseForDoc",\n    value: function browseForDoc() {}\n  }, {\n    key: "clearInterval",\n    value: function clearInterval(oInterval) {\n      this._unregisterTimeout(oInterval);\n    }\n  }, {\n    key: "clearTimeOut",\n    value: function clearTimeOut(oTime) {\n      this._unregisterTimeout(oTime);\n    }\n  }, {\n    key: "endPriv",\n    value: function endPriv() {}\n  }, {\n    key: "execDialog",\n    value: function execDialog() {}\n  }, {\n    key: "execMenuItem",\n    value: function execMenuItem(item) {\n      switch (item) {\n        case "SaveAs":\n        case "FirstPage":\n        case "LastPage":\n        case "NextPage":\n        case "PrevPage":\n        case "ZoomViewIn":\n        case "ZoomViewOut":\n          this._send({\n            command: item\n          });\n\n          break;\n\n        case "FitPage":\n          this._send({\n            command: "zoom",\n            value: "page-fit"\n          });\n\n          break;\n\n        case "Print":\n          this._send({\n            command: "print"\n          });\n\n          break;\n      }\n    }\n  }, {\n    key: "getNthPlugInName",\n    value: function getNthPlugInName() {}\n  }, {\n    key: "getPath",\n    value: function getPath() {}\n  }, {\n    key: "goBack",\n    value: function goBack() {}\n  }, {\n    key: "goForward",\n    value: function goForward() {}\n  }, {\n    key: "hideMenuItem",\n    value: function hideMenuItem() {}\n  }, {\n    key: "hideToolbarButton",\n    value: function hideToolbarButton() {}\n  }, {\n    key: "launchURL",\n    value: function launchURL() {}\n  }, {\n    key: "listMenuItems",\n    value: function listMenuItems() {}\n  }, {\n    key: "listToolbarButtons",\n    value: function listToolbarButtons() {}\n  }, {\n    key: "loadPolicyFile",\n    value: function loadPolicyFile() {}\n  }, {\n    key: "mailGetAddrs",\n    value: function mailGetAddrs() {}\n  }, {\n    key: "mailMsg",\n    value: function mailMsg() {}\n  }, {\n    key: "newDoc",\n    value: function newDoc() {}\n  }, {\n    key: "newCollection",\n    value: function newCollection() {}\n  }, {\n    key: "newFDF",\n    value: function newFDF() {}\n  }, {\n    key: "openDoc",\n    value: function openDoc() {}\n  }, {\n    key: "openFDF",\n    value: function openFDF() {}\n  }, {\n    key: "popUpMenu",\n    value: function popUpMenu() {}\n  }, {\n    key: "popUpMenuEx",\n    value: function popUpMenuEx() {}\n  }, {\n    key: "removeToolButton",\n    value: function removeToolButton() {}\n  }, {\n    key: "response",\n    value: function response(cQuestion) {\n      var cTitle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";\n      var cDefault = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";\n      var bPassword = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "";\n      var cLabel = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "";\n\n      if (_typeof(cQuestion) === "object") {\n        cDefault = cQuestion.cDefault;\n        cQuestion = cQuestion.cQuestion;\n      }\n\n      cQuestion = (cQuestion || "").toString();\n      cDefault = (cDefault || "").toString();\n      return this._externalCall("prompt", [cQuestion, cDefault || ""]);\n    }\n  }, {\n    key: "setInterval",\n    value: function setInterval(cExpr) {\n      var nMilliseconds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n      if (_typeof(cExpr) === "object") {\n        nMilliseconds = cExpr.nMilliseconds || 0;\n        cExpr = cExpr.cExpr;\n      }\n\n      if (typeof cExpr !== "string") {\n        throw new TypeError("First argument of app.setInterval must be a string");\n      }\n\n      if (typeof nMilliseconds !== "number") {\n        throw new TypeError("Second argument of app.setInterval must be a number");\n      }\n\n      var callbackId = this._registerTimeoutCallback(cExpr);\n\n      this._externalCall("setInterval", [callbackId, nMilliseconds]);\n\n      return this._registerTimeout(callbackId, true);\n    }\n  }, {\n    key: "setTimeOut",\n    value: function setTimeOut(cExpr) {\n      var nMilliseconds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n      if (_typeof(cExpr) === "object") {\n        nMilliseconds = cExpr.nMilliseconds || 0;\n        cExpr = cExpr.cExpr;\n      }\n\n      if (typeof cExpr !== "string") {\n        throw new TypeError("First argument of app.setTimeOut must be a string");\n      }\n\n      if (typeof nMilliseconds !== "number") {\n        throw new TypeError("Second argument of app.setTimeOut must be a number");\n      }\n\n      var callbackId = this._registerTimeoutCallback(cExpr);\n\n      this._externalCall("setTimeout", [callbackId, nMilliseconds]);\n\n      return this._registerTimeout(callbackId, false);\n    }\n  }, {\n    key: "trustedFunction",\n    value: function trustedFunction() {}\n  }, {\n    key: "trustPropagatorFunction",\n    value: function trustPropagatorFunction() {}\n  }], [{\n    key: "_getPlatform",\n    value: function _getPlatform(platform) {\n      if (typeof platform === "string") {\n        platform = platform.toLowerCase();\n\n        if (platform.includes("win")) {\n          return "WIN";\n        } else if (platform.includes("mac")) {\n          return "MAC";\n        }\n      }\n\n      return "UNIX";\n    }\n  }, {\n    key: "_getLanguage",\n    value: function _getLanguage(language) {\n      var _language$toLowerCase = language.toLowerCase().split(/[-_]/),\n          _language$toLowerCase2 = _slicedToArray(_language$toLowerCase, 2),\n          main = _language$toLowerCase2[0],\n          sub = _language$toLowerCase2[1];\n\n      switch (main) {\n        case "zh":\n          if (sub === "cn" || sub === "sg") {\n            return "CHS";\n          }\n\n          return "CHT";\n\n        case "da":\n          return "DAN";\n\n        case "de":\n          return "DEU";\n\n        case "es":\n          return "ESP";\n\n        case "fr":\n          return "FRA";\n\n        case "it":\n          return "ITA";\n\n        case "ko":\n          return "KOR";\n\n        case "ja":\n          return "JPN";\n\n        case "nl":\n          return "NLD";\n\n        case "no":\n          return "NOR";\n\n        case "pt":\n          if (sub === "br") {\n            return "PTB";\n          }\n\n          return "ENU";\n\n        case "fi":\n          return "SUO";\n\n        case "SV":\n          return "SVE";\n\n        default:\n          return "ENU";\n      }\n    }\n  }]);\n\n  return App;\n}(_pdf_object.PDFObject);\n\nexports.App = App;\n\n/***/ }),\n/* 10 */\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nexports.EventDispatcher = exports.Event = void 0;\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nvar Event = /*#__PURE__*/_createClass(function Event(data) {\n  var _data$selEnd, _data$selStart;\n\n  _classCallCheck(this, Event);\n\n  this.change = data.change || "";\n  this.changeEx = data.changeEx || null;\n  this.commitKey = data.commitKey || 0;\n  this.fieldFull = data.fieldFull || false;\n  this.keyDown = data.keyDown || false;\n  this.modifier = data.modifier || false;\n  this.name = data.name;\n  this.rc = true;\n  this.richChange = data.richChange || [];\n  this.richChangeEx = data.richChangeEx || [];\n  this.richValue = data.richValue || [];\n  this.selEnd = (_data$selEnd = data.selEnd) !== null && _data$selEnd !== void 0 ? _data$selEnd : -1;\n  this.selStart = (_data$selStart = data.selStart) !== null && _data$selStart !== void 0 ? _data$selStart : -1;\n  this.shift = data.shift || false;\n  this.source = data.source || null;\n  this.target = data.target || null;\n  this.targetName = "";\n  this.type = "Field";\n  this.value = data.value || "";\n  this.willCommit = data.willCommit || false;\n});\n\nexports.Event = Event;\n\nvar EventDispatcher = /*#__PURE__*/function () {\n  function EventDispatcher(document, calculationOrder, objects) {\n    _classCallCheck(this, EventDispatcher);\n\n    this._document = document;\n    this._calculationOrder = calculationOrder;\n    this._objects = objects;\n    this._document.obj._eventDispatcher = this;\n  }\n\n  _createClass(EventDispatcher, [{\n    key: "mergeChange",\n    value: function mergeChange(event) {\n      var value = event.value;\n\n      if (typeof value !== "string") {\n        value = value.toString();\n      }\n\n      var prefix = event.selStart >= 0 ? value.substring(0, event.selStart) : "";\n      var postfix = event.selEnd >= 0 && event.selEnd <= value.length ? value.substring(event.selEnd) : "";\n      return "".concat(prefix).concat(event.change).concat(postfix);\n    }\n  }, {\n    key: "dispatch",\n    value: function dispatch(baseEvent) {\n      var id = baseEvent.id;\n\n      if (!(id in this._objects)) {\n        var _event;\n\n        if (id === "doc" || id === "page") {\n          _event = globalThis.event = new Event(baseEvent);\n          _event.source = _event.target = this._document.wrapped;\n          _event.name = baseEvent.name;\n        }\n\n        if (id === "doc") {\n          this._document.obj._dispatchDocEvent(_event.name);\n        } else if (id === "page") {\n          this._document.obj._dispatchPageEvent(_event.name, baseEvent.actions, baseEvent.pageNumber);\n        } else if (id === "app" && baseEvent.name === "ResetForm") {\n          var _iterator = _createForOfIteratorHelper(baseEvent.ids),\n              _step;\n\n          try {\n            for (_iterator.s(); !(_step = _iterator.n()).done;) {\n              var fieldId = _step.value;\n              var obj = this._objects[fieldId];\n\n              if (obj) {\n                obj.obj._reset();\n              }\n            }\n          } catch (err) {\n            _iterator.e(err);\n          } finally {\n            _iterator.f();\n          }\n        }\n\n        return;\n      }\n\n      var name = baseEvent.name;\n      var source = this._objects[id];\n      var event = globalThis.event = new Event(baseEvent);\n      var savedChange;\n\n      if (source.obj._isButton()) {\n        source.obj._id = id;\n        event.value = source.obj._getExportValue(event.value);\n\n        if (name === "Action") {\n          source.obj._value = event.value;\n        }\n      }\n\n      switch (name) {\n        case "Keystroke":\n          savedChange = {\n            value: event.value,\n            change: event.change,\n            selStart: event.selStart,\n            selEnd: event.selEnd\n          };\n          break;\n\n        case "Blur":\n        case "Focus":\n          Object.defineProperty(event, "value", {\n            configurable: false,\n            writable: false,\n            enumerable: true,\n            value: event.value\n          });\n          break;\n\n        case "Validate":\n          this.runValidation(source, event);\n          return;\n\n        case "Action":\n          this.runActions(source, source, event, name);\n\n          if (this._document.obj.calculate) {\n            this.runCalculate(source, event);\n          }\n\n          return;\n      }\n\n      this.runActions(source, source, event, name);\n\n      if (name === "Keystroke") {\n        if (event.rc) {\n          if (event.willCommit) {\n            this.runValidation(source, event);\n          } else if (event.change !== savedChange.change || event.selStart !== savedChange.selStart || event.selEnd !== savedChange.selEnd) {\n            source.wrapped.value = this.mergeChange(event);\n          }\n        } else if (!event.willCommit) {\n          source.obj._send({\n            id: source.obj._id,\n            value: savedChange.value,\n            selRange: [savedChange.selStart, savedChange.selEnd]\n          });\n        } else {\n          source.obj._send({\n            id: source.obj._id,\n            value: "",\n            selRange: [0, 0]\n          });\n        }\n      }\n    }\n  }, {\n    key: "runValidation",\n    value: function runValidation(source, event) {\n      var hasRan = this.runActions(source, source, event, "Validate");\n\n      if (event.rc) {\n        if (hasRan) {\n          source.wrapped.value = event.value;\n          source.wrapped.valueAsString = event.value;\n        } else {\n          source.obj.value = event.value;\n          source.obj.valueAsString = event.value;\n        }\n\n        if (this._document.obj.calculate) {\n          this.runCalculate(source, event);\n        }\n\n        event.value = source.obj.value;\n        this.runActions(source, source, event, "Format");\n        source.wrapped.valueAsString = event.value;\n      }\n    }\n  }, {\n    key: "runActions",\n    value: function runActions(source, target, event, eventName) {\n      event.source = source.wrapped;\n      event.target = target.wrapped;\n      event.name = eventName;\n      event.targetName = target.obj.name;\n      event.rc = true;\n      return target.obj._runActions(event);\n    }\n  }, {\n    key: "calculateNow",\n    value: function calculateNow() {\n      if (!this._calculationOrder) {\n        return;\n      }\n\n      var first = this._calculationOrder[0];\n      var source = this._objects[first];\n      globalThis.event = new Event({});\n      this.runCalculate(source, globalThis.event);\n    }\n  }, {\n    key: "runCalculate",\n    value: function runCalculate(source, event) {\n      if (!this._calculationOrder) {\n        return;\n      }\n\n      var _iterator2 = _createForOfIteratorHelper(this._calculationOrder),\n          _step2;\n\n      try {\n        for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n          var targetId = _step2.value;\n\n          if (!(targetId in this._objects)) {\n            continue;\n          }\n\n          if (!this._document.obj.calculate) {\n            continue;\n          }\n\n          event.value = null;\n          var target = this._objects[targetId];\n          this.runActions(source, target, event, "Calculate");\n\n          if (!event.rc) {\n            continue;\n          }\n\n          if (event.value !== null) {\n            target.wrapped.value = event.value;\n          }\n\n          event.value = target.obj.value;\n          this.runActions(target, target, event, "Validate");\n\n          if (!event.rc) {\n            continue;\n          }\n\n          event.value = target.obj.value;\n          this.runActions(target, target, event, "Format");\n\n          if (event.value !== null) {\n            target.wrapped.valueAsString = event.value;\n          }\n        }\n      } catch (err) {\n        _iterator2.e(err);\n      } finally {\n        _iterator2.f();\n      }\n    }\n  }]);\n\n  return EventDispatcher;\n}();\n\nexports.EventDispatcher = EventDispatcher;\n\n/***/ }),\n/* 11 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nfunction _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nexports.FullScreen = void 0;\n\nvar _constants = __w_pdfjs_require__(2);\n\nvar _pdf_object = __w_pdfjs_require__(7);\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar FullScreen = /*#__PURE__*/function (_PDFObject) {\n  _inherits(FullScreen, _PDFObject);\n\n  var _super = _createSuper(FullScreen);\n\n  function FullScreen(data) {\n    var _this;\n\n    _classCallCheck(this, FullScreen);\n\n    _this = _super.call(this, data);\n    _this._backgroundColor = [];\n    _this._clickAdvances = true;\n    _this._cursor = _constants.Cursor.hidden;\n    _this._defaultTransition = "";\n    _this._escapeExits = true;\n    _this._isFullScreen = true;\n    _this._loop = false;\n    _this._timeDelay = 3600;\n    _this._usePageTiming = false;\n    _this._useTimer = false;\n    return _this;\n  }\n\n  _createClass(FullScreen, [{\n    key: "backgroundColor",\n    get: function get() {\n      return this._backgroundColor;\n    },\n    set: function set(_) {}\n  }, {\n    key: "clickAdvances",\n    get: function get() {\n      return this._clickAdvances;\n    },\n    set: function set(_) {}\n  }, {\n    key: "cursor",\n    get: function get() {\n      return this._cursor;\n    },\n    set: function set(_) {}\n  }, {\n    key: "defaultTransition",\n    get: function get() {\n      return this._defaultTransition;\n    },\n    set: function set(_) {}\n  }, {\n    key: "escapeExits",\n    get: function get() {\n      return this._escapeExits;\n    },\n    set: function set(_) {}\n  }, {\n    key: "isFullScreen",\n    get: function get() {\n      return this._isFullScreen;\n    },\n    set: function set(_) {}\n  }, {\n    key: "loop",\n    get: function get() {\n      return this._loop;\n    },\n    set: function set(_) {}\n  }, {\n    key: "timeDelay",\n    get: function get() {\n      return this._timeDelay;\n    },\n    set: function set(_) {}\n  }, {\n    key: "transitions",\n    get: function get() {\n      return ["Replace", "WipeRight", "WipeLeft", "WipeDown", "WipeUp", "SplitHorizontalIn", "SplitHorizontalOut", "SplitVerticalIn", "SplitVerticalOut", "BlindsHorizontal", "BlindsVertical", "BoxIn", "BoxOut", "GlitterRight", "GlitterDown", "GlitterRightDown", "Dissolve", "Random"];\n    },\n    set: function set(_) {\n      throw new Error("fullscreen.transitions is read-only");\n    }\n  }, {\n    key: "usePageTiming",\n    get: function get() {\n      return this._usePageTiming;\n    },\n    set: function set(_) {}\n  }, {\n    key: "useTimer",\n    get: function get() {\n      return this._useTimer;\n    },\n    set: function set(_) {}\n  }]);\n\n  return FullScreen;\n}(_pdf_object.PDFObject);\n\nexports.FullScreen = FullScreen;\n\n/***/ }),\n/* 12 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nfunction _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nexports.Thermometer = void 0;\n\nvar _pdf_object = __w_pdfjs_require__(7);\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar Thermometer = /*#__PURE__*/function (_PDFObject) {\n  _inherits(Thermometer, _PDFObject);\n\n  var _super = _createSuper(Thermometer);\n\n  function Thermometer(data) {\n    var _this;\n\n    _classCallCheck(this, Thermometer);\n\n    _this = _super.call(this, data);\n    _this._cancelled = false;\n    _this._duration = 100;\n    _this._text = "";\n    _this._value = 0;\n    return _this;\n  }\n\n  _createClass(Thermometer, [{\n    key: "cancelled",\n    get: function get() {\n      return this._cancelled;\n    },\n    set: function set(_) {\n      throw new Error("thermometer.cancelled is read-only");\n    }\n  }, {\n    key: "duration",\n    get: function get() {\n      return this._duration;\n    },\n    set: function set(val) {\n      this._duration = val;\n    }\n  }, {\n    key: "text",\n    get: function get() {\n      return this._text;\n    },\n    set: function set(val) {\n      this._text = val;\n    }\n  }, {\n    key: "value",\n    get: function get() {\n      return this._value;\n    },\n    set: function set(val) {\n      this._value = val;\n    }\n  }, {\n    key: "begin",\n    value: function begin() {}\n  }, {\n    key: "end",\n    value: function end() {}\n  }]);\n\n  return Thermometer;\n}(_pdf_object.PDFObject);\n\nexports.Thermometer = Thermometer;\n\n/***/ }),\n/* 13 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nfunction _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nexports.Console = void 0;\n\nvar _pdf_object = __w_pdfjs_require__(7);\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar Console = /*#__PURE__*/function (_PDFObject) {\n  _inherits(Console, _PDFObject);\n\n  var _super = _createSuper(Console);\n\n  function Console() {\n    _classCallCheck(this, Console);\n\n    return _super.apply(this, arguments);\n  }\n\n  _createClass(Console, [{\n    key: "clear",\n    value: function clear() {\n      this._send({\n        id: "clear"\n      });\n    }\n  }, {\n    key: "hide",\n    value: function hide() {}\n  }, {\n    key: "println",\n    value: function println(msg) {\n      if (typeof msg === "string") {\n        this._send({\n          command: "println",\n          value: "PDF.js Console:: " + msg\n        });\n      }\n    }\n  }, {\n    key: "show",\n    value: function show() {}\n  }]);\n\n  return Console;\n}(_pdf_object.PDFObject);\n\nexports.Console = Console;\n\n/***/ }),\n/* 14 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nexports.Doc = void 0;\n\nvar _common = __w_pdfjs_require__(4);\n\nvar _pdf_object = __w_pdfjs_require__(7);\n\nvar _print_params = __w_pdfjs_require__(15);\n\nvar _constants = __w_pdfjs_require__(2);\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }\n\nvar InfoProxyHandler = /*#__PURE__*/function () {\n  function InfoProxyHandler() {\n    _classCallCheck(this, InfoProxyHandler);\n  }\n\n  _createClass(InfoProxyHandler, null, [{\n    key: "get",\n    value: function get(obj, prop) {\n      return obj[prop.toLowerCase()];\n    }\n  }, {\n    key: "set",\n    value: function set(obj, prop, value) {\n      throw new Error("doc.info.".concat(prop, " is read-only"));\n    }\n  }]);\n\n  return InfoProxyHandler;\n}();\n\nvar Doc = /*#__PURE__*/function (_PDFObject) {\n  _inherits(Doc, _PDFObject);\n\n  var _super = _createSuper(Doc);\n\n  function Doc(data) {\n    var _this;\n\n    _classCallCheck(this, Doc);\n\n    _this = _super.call(this, data);\n    _this._expandos = globalThis;\n    _this._baseURL = data.baseURL || "";\n    _this._calculate = true;\n    _this._delay = false;\n    _this._dirty = false;\n    _this._disclosed = false;\n    _this._media = undefined;\n    _this._metadata = data.metadata || "";\n    _this._noautocomplete = undefined;\n    _this._nocache = undefined;\n    _this._spellDictionaryOrder = [];\n    _this._spellLanguageOrder = [];\n    _this._printParams = null;\n    _this._fields = new Map();\n    _this._fieldNames = [];\n    _this._event = null;\n    _this._author = data.Author || "";\n    _this._creator = data.Creator || "";\n    _this._creationDate = _this._getDate(data.CreationDate) || null;\n    _this._docID = data.docID || ["", ""];\n    _this._documentFileName = data.filename || "";\n    _this._filesize = data.filesize || 0;\n    _this._keywords = data.Keywords || "";\n    _this._layout = data.layout || "";\n    _this._modDate = _this._getDate(data.ModDate) || null;\n    _this._numFields = 0;\n    _this._numPages = data.numPages || 1;\n    _this._pageNum = data.pageNum || 0;\n    _this._producer = data.Producer || "";\n    _this._securityHandler = data.EncryptFilterName || null;\n    _this._subject = data.Subject || "";\n    _this._title = data.Title || "";\n    _this._URL = data.URL || "";\n    _this._info = new Proxy({\n      title: _this._title,\n      author: _this._author,\n      authors: data.authors || [_this._author],\n      subject: _this._subject,\n      keywords: _this._keywords,\n      creator: _this._creator,\n      producer: _this._producer,\n      creationdate: _this._creationDate,\n      moddate: _this._modDate,\n      trapped: data.Trapped || "Unknown"\n    }, InfoProxyHandler);\n    _this._zoomType = _constants.ZoomType.none;\n    _this._zoom = data.zoom || 100;\n    _this._actions = (0, _common.createActionsMap)(data.actions);\n    _this._globalEval = data.globalEval;\n    _this._pageActions = new Map();\n    return _this;\n  }\n\n  _createClass(Doc, [{\n    key: "_dispatchDocEvent",\n    value: function _dispatchDocEvent(name) {\n      if (name === "Open") {\n        var dontRun = new Set(["WillClose", "WillSave", "DidSave", "WillPrint", "DidPrint", "OpenAction"]);\n\n        var _iterator = _createForOfIteratorHelper(this._actions.keys()),\n            _step;\n\n        try {\n          for (_iterator.s(); !(_step = _iterator.n()).done;) {\n            var actionName = _step.value;\n\n            if (!dontRun.has(actionName)) {\n              this._runActions(actionName);\n            }\n          }\n        } catch (err) {\n          _iterator.e(err);\n        } finally {\n          _iterator.f();\n        }\n\n        this._runActions("OpenAction");\n      } else {\n        this._runActions(name);\n      }\n    }\n  }, {\n    key: "_dispatchPageEvent",\n    value: function _dispatchPageEvent(name, actions, pageNumber) {\n      var _this$_pageActions$ge;\n\n      if (name === "PageOpen") {\n        if (!this._pageActions.has(pageNumber)) {\n          this._pageActions.set(pageNumber, (0, _common.createActionsMap)(actions));\n        }\n\n        this._pageNum = pageNumber - 1;\n      }\n\n      actions = (_this$_pageActions$ge = this._pageActions.get(pageNumber)) === null || _this$_pageActions$ge === void 0 ? void 0 : _this$_pageActions$ge.get(name);\n\n      if (actions) {\n        var _iterator2 = _createForOfIteratorHelper(actions),\n            _step2;\n\n        try {\n          for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n            var action = _step2.value;\n\n            this._globalEval(action);\n          }\n        } catch (err) {\n          _iterator2.e(err);\n        } finally {\n          _iterator2.f();\n        }\n      }\n    }\n  }, {\n    key: "_runActions",\n    value: function _runActions(name) {\n      var actions = this._actions.get(name);\n\n      if (actions) {\n        var _iterator3 = _createForOfIteratorHelper(actions),\n            _step3;\n\n        try {\n          for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n            var action = _step3.value;\n\n            this._globalEval(action);\n          }\n        } catch (err) {\n          _iterator3.e(err);\n        } finally {\n          _iterator3.f();\n        }\n      }\n    }\n  }, {\n    key: "_addField",\n    value: function _addField(name, field) {\n      this._fields.set(name, field);\n\n      this._fieldNames.push(name);\n\n      this._numFields++;\n    }\n  }, {\n    key: "_getDate",\n    value: function _getDate(date) {\n      if (!date || date.length < 15 || !date.startsWith("D:")) {\n        return date;\n      }\n\n      date = date.substring(2);\n      var year = date.substring(0, 4);\n      var month = date.substring(4, 6);\n      var day = date.substring(6, 8);\n      var hour = date.substring(8, 10);\n      var minute = date.substring(10, 12);\n      var o = date.charAt(12);\n      var second, offsetPos;\n\n      if (o === "Z" || o === "+" || o === "-") {\n        second = "00";\n        offsetPos = 12;\n      } else {\n        second = date.substring(12, 14);\n        offsetPos = 14;\n      }\n\n      var offset = date.substring(offsetPos).replaceAll("\'", "");\n      return new Date("".concat(year, "-").concat(month, "-").concat(day, "T").concat(hour, ":").concat(minute, ":").concat(second).concat(offset));\n    }\n  }, {\n    key: "author",\n    get: function get() {\n      return this._author;\n    },\n    set: function set(_) {\n      throw new Error("doc.author is read-only");\n    }\n  }, {\n    key: "baseURL",\n    get: function get() {\n      return this._baseURL;\n    },\n    set: function set(baseURL) {\n      this._baseURL = baseURL;\n    }\n  }, {\n    key: "bookmarkRoot",\n    get: function get() {\n      return undefined;\n    },\n    set: function set(_) {\n      throw new Error("doc.bookmarkRoot is read-only");\n    }\n  }, {\n    key: "calculate",\n    get: function get() {\n      return this._calculate;\n    },\n    set: function set(calculate) {\n      this._calculate = calculate;\n    }\n  }, {\n    key: "creator",\n    get: function get() {\n      return this._creator;\n    },\n    set: function set(_) {\n      throw new Error("doc.creator is read-only");\n    }\n  }, {\n    key: "dataObjects",\n    get: function get() {\n      return [];\n    },\n    set: function set(_) {\n      throw new Error("doc.dataObjects is read-only");\n    }\n  }, {\n    key: "delay",\n    get: function get() {\n      return this._delay;\n    },\n    set: function set(delay) {\n      this._delay = delay;\n    }\n  }, {\n    key: "dirty",\n    get: function get() {\n      return this._dirty;\n    },\n    set: function set(dirty) {\n      this._dirty = dirty;\n    }\n  }, {\n    key: "disclosed",\n    get: function get() {\n      return this._disclosed;\n    },\n    set: function set(disclosed) {\n      this._disclosed = disclosed;\n    }\n  }, {\n    key: "docID",\n    get: function get() {\n      return this._docID;\n    },\n    set: function set(_) {\n      throw new Error("doc.docID is read-only");\n    }\n  }, {\n    key: "documentFileName",\n    get: function get() {\n      return this._documentFileName;\n    },\n    set: function set(_) {\n      throw new Error("doc.documentFileName is read-only");\n    }\n  }, {\n    key: "dynamicXFAForm",\n    get: function get() {\n      return false;\n    },\n    set: function set(_) {\n      throw new Error("doc.dynamicXFAForm is read-only");\n    }\n  }, {\n    key: "external",\n    get: function get() {\n      return true;\n    },\n    set: function set(_) {\n      throw new Error("doc.external is read-only");\n    }\n  }, {\n    key: "filesize",\n    get: function get() {\n      return this._filesize;\n    },\n    set: function set(_) {\n      throw new Error("doc.filesize is read-only");\n    }\n  }, {\n    key: "hidden",\n    get: function get() {\n      return false;\n    },\n    set: function set(_) {\n      throw new Error("doc.hidden is read-only");\n    }\n  }, {\n    key: "hostContainer",\n    get: function get() {\n      return undefined;\n    },\n    set: function set(_) {\n      throw new Error("doc.hostContainer is read-only");\n    }\n  }, {\n    key: "icons",\n    get: function get() {\n      return undefined;\n    },\n    set: function set(_) {\n      throw new Error("doc.icons is read-only");\n    }\n  }, {\n    key: "info",\n    get: function get() {\n      return this._info;\n    },\n    set: function set(_) {\n      throw new Error("doc.info is read-only");\n    }\n  }, {\n    key: "innerAppWindowRect",\n    get: function get() {\n      return [0, 0, 0, 0];\n    },\n    set: function set(_) {\n      throw new Error("doc.innerAppWindowRect is read-only");\n    }\n  }, {\n    key: "innerDocWindowRect",\n    get: function get() {\n      return [0, 0, 0, 0];\n    },\n    set: function set(_) {\n      throw new Error("doc.innerDocWindowRect is read-only");\n    }\n  }, {\n    key: "isModal",\n    get: function get() {\n      return false;\n    },\n    set: function set(_) {\n      throw new Error("doc.isModal is read-only");\n    }\n  }, {\n    key: "keywords",\n    get: function get() {\n      return this._keywords;\n    },\n    set: function set(_) {\n      throw new Error("doc.keywords is read-only");\n    }\n  }, {\n    key: "layout",\n    get: function get() {\n      return this._layout;\n    },\n    set: function set(value) {\n      if (typeof value !== "string") {\n        return;\n      }\n\n      if (value !== "SinglePage" && value !== "OneColumn" && value !== "TwoColumnLeft" && value !== "TwoPageLeft" && value !== "TwoColumnRight" && value !== "TwoPageRight") {\n        value = "SinglePage";\n      }\n\n      this._send({\n        command: "layout",\n        value: value\n      });\n\n      this._layout = value;\n    }\n  }, {\n    key: "media",\n    get: function get() {\n      return this._media;\n    },\n    set: function set(media) {\n      this._media = media;\n    }\n  }, {\n    key: "metadata",\n    get: function get() {\n      return this._metadata;\n    },\n    set: function set(metadata) {\n      this._metadata = metadata;\n    }\n  }, {\n    key: "modDate",\n    get: function get() {\n      return this._modDate;\n    },\n    set: function set(_) {\n      throw new Error("doc.modDate is read-only");\n    }\n  }, {\n    key: "mouseX",\n    get: function get() {\n      return 0;\n    },\n    set: function set(_) {\n      throw new Error("doc.mouseX is read-only");\n    }\n  }, {\n    key: "mouseY",\n    get: function get() {\n      return 0;\n    },\n    set: function set(_) {\n      throw new Error("doc.mouseY is read-only");\n    }\n  }, {\n    key: "noautocomplete",\n    get: function get() {\n      return this._noautocomplete;\n    },\n    set: function set(noautocomplete) {\n      this._noautocomplete = noautocomplete;\n    }\n  }, {\n    key: "nocache",\n    get: function get() {\n      return this._nocache;\n    },\n    set: function set(nocache) {\n      this._nocache = nocache;\n    }\n  }, {\n    key: "numFields",\n    get: function get() {\n      return this._numFields;\n    },\n    set: function set(_) {\n      throw new Error("doc.numFields is read-only");\n    }\n  }, {\n    key: "numPages",\n    get: function get() {\n      return this._numPages;\n    },\n    set: function set(_) {\n      throw new Error("doc.numPages is read-only");\n    }\n  }, {\n    key: "numTemplates",\n    get: function get() {\n      return 0;\n    },\n    set: function set(_) {\n      throw new Error("doc.numTemplates is read-only");\n    }\n  }, {\n    key: "outerAppWindowRect",\n    get: function get() {\n      return [0, 0, 0, 0];\n    },\n    set: function set(_) {\n      throw new Error("doc.outerAppWindowRect is read-only");\n    }\n  }, {\n    key: "outerDocWindowRect",\n    get: function get() {\n      return [0, 0, 0, 0];\n    },\n    set: function set(_) {\n      throw new Error("doc.outerDocWindowRect is read-only");\n    }\n  }, {\n    key: "pageNum",\n    get: function get() {\n      return this._pageNum;\n    },\n    set: function set(value) {\n      if (typeof value !== "number" || value < 0 || value >= this._numPages) {\n        return;\n      }\n\n      this._send({\n        command: "page-num",\n        value: value\n      });\n\n      this._pageNum = value;\n    }\n  }, {\n    key: "pageWindowRect",\n    get: function get() {\n      return [0, 0, 0, 0];\n    },\n    set: function set(_) {\n      throw new Error("doc.pageWindowRect is read-only");\n    }\n  }, {\n    key: "path",\n    get: function get() {\n      return "";\n    },\n    set: function set(_) {\n      throw new Error("doc.path is read-only");\n    }\n  }, {\n    key: "permStatusReady",\n    get: function get() {\n      return true;\n    },\n    set: function set(_) {\n      throw new Error("doc.permStatusReady is read-only");\n    }\n  }, {\n    key: "producer",\n    get: function get() {\n      return this._producer;\n    },\n    set: function set(_) {\n      throw new Error("doc.producer is read-only");\n    }\n  }, {\n    key: "requiresFullSave",\n    get: function get() {\n      return false;\n    },\n    set: function set(_) {\n      throw new Error("doc.requiresFullSave is read-only");\n    }\n  }, {\n    key: "securityHandler",\n    get: function get() {\n      return this._securityHandler;\n    },\n    set: function set(_) {\n      throw new Error("doc.securityHandler is read-only");\n    }\n  }, {\n    key: "selectedAnnots",\n    get: function get() {\n      return [];\n    },\n    set: function set(_) {\n      throw new Error("doc.selectedAnnots is read-only");\n    }\n  }, {\n    key: "sounds",\n    get: function get() {\n      return [];\n    },\n    set: function set(_) {\n      throw new Error("doc.sounds is read-only");\n    }\n  }, {\n    key: "spellDictionaryOrder",\n    get: function get() {\n      return this._spellDictionaryOrder;\n    },\n    set: function set(spellDictionaryOrder) {\n      this._spellDictionaryOrder = spellDictionaryOrder;\n    }\n  }, {\n    key: "spellLanguageOrder",\n    get: function get() {\n      return this._spellLanguageOrder;\n    },\n    set: function set(spellLanguageOrder) {\n      this._spellLanguageOrder = spellLanguageOrder;\n    }\n  }, {\n    key: "subject",\n    get: function get() {\n      return this._subject;\n    },\n    set: function set(_) {\n      throw new Error("doc.subject is read-only");\n    }\n  }, {\n    key: "templates",\n    get: function get() {\n      return [];\n    },\n    set: function set(_) {\n      throw new Error("doc.templates is read-only");\n    }\n  }, {\n    key: "title",\n    get: function get() {\n      return this._title;\n    },\n    set: function set(_) {\n      throw new Error("doc.title is read-only");\n    }\n  }, {\n    key: "URL",\n    get: function get() {\n      return this._URL;\n    },\n    set: function set(_) {\n      throw new Error("doc.URL is read-only");\n    }\n  }, {\n    key: "viewState",\n    get: function get() {\n      return undefined;\n    },\n    set: function set(_) {\n      throw new Error("doc.viewState is read-only");\n    }\n  }, {\n    key: "xfa",\n    get: function get() {\n      return this._xfa;\n    },\n    set: function set(_) {\n      throw new Error("doc.xfa is read-only");\n    }\n  }, {\n    key: "XFAForeground",\n    get: function get() {\n      return false;\n    },\n    set: function set(_) {\n      throw new Error("doc.XFAForeground is read-only");\n    }\n  }, {\n    key: "zoomType",\n    get: function get() {\n      return this._zoomType;\n    },\n    set: function set(type) {\n      if (typeof type !== "string") {\n        return;\n      }\n\n      switch (type) {\n        case _constants.ZoomType.none:\n          this._send({\n            command: "zoom",\n            value: 1\n          });\n\n          break;\n\n        case _constants.ZoomType.fitP:\n          this._send({\n            command: "zoom",\n            value: "page-fit"\n          });\n\n          break;\n\n        case _constants.ZoomType.fitW:\n          this._send({\n            command: "zoom",\n            value: "page-width"\n          });\n\n          break;\n\n        case _constants.ZoomType.fitH:\n          this._send({\n            command: "zoom",\n            value: "page-height"\n          });\n\n          break;\n\n        case _constants.ZoomType.fitV:\n          this._send({\n            command: "zoom",\n            value: "auto"\n          });\n\n          break;\n\n        case _constants.ZoomType.pref:\n        case _constants.ZoomType.refW:\n          break;\n\n        default:\n          return;\n      }\n\n      this._zoomType = type;\n    }\n  }, {\n    key: "zoom",\n    get: function get() {\n      return this._zoom;\n    },\n    set: function set(value) {\n      if (typeof value !== "number" || value < 8.33 || value > 6400) {\n        return;\n      }\n\n      this._send({\n        command: "zoom",\n        value: value / 100\n      });\n    }\n  }, {\n    key: "addAnnot",\n    value: function addAnnot() {}\n  }, {\n    key: "addField",\n    value: function addField() {}\n  }, {\n    key: "addIcon",\n    value: function addIcon() {}\n  }, {\n    key: "addLink",\n    value: function addLink() {}\n  }, {\n    key: "addRecipientListCryptFilter",\n    value: function addRecipientListCryptFilter() {}\n  }, {\n    key: "addRequirement",\n    value: function addRequirement() {}\n  }, {\n    key: "addScript",\n    value: function addScript() {}\n  }, {\n    key: "addThumbnails",\n    value: function addThumbnails() {}\n  }, {\n    key: "addWatermarkFromFile",\n    value: function addWatermarkFromFile() {}\n  }, {\n    key: "addWatermarkFromText",\n    value: function addWatermarkFromText() {}\n  }, {\n    key: "addWeblinks",\n    value: function addWeblinks() {}\n  }, {\n    key: "bringToFront",\n    value: function bringToFront() {}\n  }, {\n    key: "calculateNow",\n    value: function calculateNow() {\n      this._eventDispatcher.calculateNow();\n    }\n  }, {\n    key: "closeDoc",\n    value: function closeDoc() {}\n  }, {\n    key: "colorConvertPage",\n    value: function colorConvertPage() {}\n  }, {\n    key: "createDataObject",\n    value: function createDataObject() {}\n  }, {\n    key: "createTemplate",\n    value: function createTemplate() {}\n  }, {\n    key: "deletePages",\n    value: function deletePages() {}\n  }, {\n    key: "deleteSound",\n    value: function deleteSound() {}\n  }, {\n    key: "embedDocAsDataObject",\n    value: function embedDocAsDataObject() {}\n  }, {\n    key: "embedOutputIntent",\n    value: function embedOutputIntent() {}\n  }, {\n    key: "encryptForRecipients",\n    value: function encryptForRecipients() {}\n  }, {\n    key: "encryptUsingPolicy",\n    value: function encryptUsingPolicy() {}\n  }, {\n    key: "exportAsFDF",\n    value: function exportAsFDF() {}\n  }, {\n    key: "exportAsFDFStr",\n    value: function exportAsFDFStr() {}\n  }, {\n    key: "exportAsText",\n    value: function exportAsText() {}\n  }, {\n    key: "exportAsXFDF",\n    value: function exportAsXFDF() {}\n  }, {\n    key: "exportAsXFDFStr",\n    value: function exportAsXFDFStr() {}\n  }, {\n    key: "exportDataObject",\n    value: function exportDataObject() {}\n  }, {\n    key: "exportXFAData",\n    value: function exportXFAData() {}\n  }, {\n    key: "extractPages",\n    value: function extractPages() {}\n  }, {\n    key: "flattenPages",\n    value: function flattenPages() {}\n  }, {\n    key: "getAnnot",\n    value: function getAnnot() {}\n  }, {\n    key: "getAnnots",\n    value: function getAnnots() {}\n  }, {\n    key: "getAnnot3D",\n    value: function getAnnot3D() {}\n  }, {\n    key: "getAnnots3D",\n    value: function getAnnots3D() {}\n  }, {\n    key: "getColorConvertAction",\n    value: function getColorConvertAction() {}\n  }, {\n    key: "getDataObject",\n    value: function getDataObject() {}\n  }, {\n    key: "getDataObjectContents",\n    value: function getDataObjectContents() {}\n  }, {\n    key: "getField",\n    value: function getField(cName) {\n      if (_typeof(cName) === "object") {\n        cName = cName.cName;\n      }\n\n      if (typeof cName !== "string") {\n        throw new TypeError("Invalid field name: must be a string");\n      }\n\n      var searchedField = this._fields.get(cName);\n\n      if (searchedField) {\n        return searchedField;\n      }\n\n      var parts = cName.split("#");\n      var childIndex = NaN;\n\n      if (parts.length === 2) {\n        childIndex = Math.floor(parseFloat(parts[1]));\n        cName = parts[0];\n      }\n\n      var _iterator4 = _createForOfIteratorHelper(this._fields.entries()),\n          _step4;\n\n      try {\n        for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n          var _step4$value = _slicedToArray(_step4.value, 2),\n              name = _step4$value[0],\n              field = _step4$value[1];\n\n          if (name.endsWith(cName)) {\n            if (!isNaN(childIndex)) {\n              var children = this._getChildren(name);\n\n              if (childIndex < 0 || childIndex >= children.length) {\n                childIndex = 0;\n              }\n\n              if (childIndex < children.length) {\n                this._fields.set(cName, children[childIndex]);\n\n                return children[childIndex];\n              }\n            }\n\n            this._fields.set(cName, field);\n\n            return field;\n          }\n        }\n      } catch (err) {\n        _iterator4.e(err);\n      } finally {\n        _iterator4.f();\n      }\n\n      return null;\n    }\n  }, {\n    key: "_getChildren",\n    value: function _getChildren(fieldName) {\n      var len = fieldName.length;\n      var children = [];\n      var pattern = /^\\.[^.]+$/;\n\n      var _iterator5 = _createForOfIteratorHelper(this._fields.entries()),\n          _step5;\n\n      try {\n        for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n          var _step5$value = _slicedToArray(_step5.value, 2),\n              name = _step5$value[0],\n              field = _step5$value[1];\n\n          if (name.startsWith(fieldName)) {\n            var finalPart = name.slice(len);\n\n            if (finalPart.match(pattern)) {\n              children.push(field);\n            }\n          }\n        }\n      } catch (err) {\n        _iterator5.e(err);\n      } finally {\n        _iterator5.f();\n      }\n\n      return children;\n    }\n  }, {\n    key: "getIcon",\n    value: function getIcon() {}\n  }, {\n    key: "getLegalWarnings",\n    value: function getLegalWarnings() {}\n  }, {\n    key: "getLinks",\n    value: function getLinks() {}\n  }, {\n    key: "getNthFieldName",\n    value: function getNthFieldName(nIndex) {\n      if (_typeof(nIndex) === "object") {\n        nIndex = nIndex.nIndex;\n      }\n\n      if (typeof nIndex !== "number") {\n        throw new TypeError("Invalid field index: must be a number");\n      }\n\n      if (0 <= nIndex && nIndex < this.numFields) {\n        return this._fieldNames[Math.trunc(nIndex)];\n      }\n\n      return null;\n    }\n  }, {\n    key: "getNthTemplate",\n    value: function getNthTemplate() {\n      return null;\n    }\n  }, {\n    key: "getOCGs",\n    value: function getOCGs() {}\n  }, {\n    key: "getOCGOrder",\n    value: function getOCGOrder() {}\n  }, {\n    key: "getPageBox",\n    value: function getPageBox() {}\n  }, {\n    key: "getPageLabel",\n    value: function getPageLabel() {}\n  }, {\n    key: "getPageNthWord",\n    value: function getPageNthWord() {}\n  }, {\n    key: "getPageNthWordQuads",\n    value: function getPageNthWordQuads() {}\n  }, {\n    key: "getPageNumWords",\n    value: function getPageNumWords() {}\n  }, {\n    key: "getPageRotation",\n    value: function getPageRotation() {}\n  }, {\n    key: "getPageTransition",\n    value: function getPageTransition() {}\n  }, {\n    key: "getPrintParams",\n    value: function getPrintParams() {\n      if (!this._printParams) {\n        this._printParams = new _print_params.PrintParams({\n          lastPage: this._numPages - 1\n        });\n      }\n\n      return this._printParams;\n    }\n  }, {\n    key: "getSound",\n    value: function getSound() {}\n  }, {\n    key: "getTemplate",\n    value: function getTemplate() {}\n  }, {\n    key: "getURL",\n    value: function getURL() {}\n  }, {\n    key: "gotoNamedDest",\n    value: function gotoNamedDest() {}\n  }, {\n    key: "importAnFDF",\n    value: function importAnFDF() {}\n  }, {\n    key: "importAnXFDF",\n    value: function importAnXFDF() {}\n  }, {\n    key: "importDataObject",\n    value: function importDataObject() {}\n  }, {\n    key: "importIcon",\n    value: function importIcon() {}\n  }, {\n    key: "importSound",\n    value: function importSound() {}\n  }, {\n    key: "importTextData",\n    value: function importTextData() {}\n  }, {\n    key: "importXFAData",\n    value: function importXFAData() {}\n  }, {\n    key: "insertPages",\n    value: function insertPages() {}\n  }, {\n    key: "mailDoc",\n    value: function mailDoc() {}\n  }, {\n    key: "mailForm",\n    value: function mailForm() {}\n  }, {\n    key: "movePage",\n    value: function movePage() {}\n  }, {\n    key: "newPage",\n    value: function newPage() {}\n  }, {\n    key: "openDataObject",\n    value: function openDataObject() {}\n  }, {\n    key: "print",\n    value: function print() {\n      var bUI = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n      var nStart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n      var nEnd = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;\n      var bSilent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n      var bShrinkToFit = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n      var bPrintAsImage = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;\n      var bReverse = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;\n      var bAnnotations = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : true;\n      var printParams = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;\n\n      if (_typeof(bUI) === "object") {\n        nStart = bUI.nStart;\n        nEnd = bUI.nEnd;\n        bSilent = bUI.bSilent;\n        bShrinkToFit = bUI.bShrinkToFit;\n        bPrintAsImage = bUI.bPrintAsImage;\n        bReverse = bUI.bReverse;\n        bAnnotations = bUI.bAnnotations;\n        printParams = bUI.printParams;\n        bUI = bUI.bUI;\n      }\n\n      if (printParams) {\n        nStart = printParams.firstPage;\n        nEnd = printParams.lastPage;\n      }\n\n      if (typeof nStart === "number") {\n        nStart = Math.max(0, Math.trunc(nStart));\n      } else {\n        nStart = 0;\n      }\n\n      if (typeof nEnd === "number") {\n        nEnd = Math.max(0, Math.trunc(nEnd));\n      } else {\n        nEnd = -1;\n      }\n\n      this._send({\n        command: "print",\n        start: nStart,\n        end: nEnd\n      });\n    }\n  }, {\n    key: "removeDataObject",\n    value: function removeDataObject() {}\n  }, {\n    key: "removeField",\n    value: function removeField() {}\n  }, {\n    key: "removeIcon",\n    value: function removeIcon() {}\n  }, {\n    key: "removeLinks",\n    value: function removeLinks() {}\n  }, {\n    key: "removeRequirement",\n    value: function removeRequirement() {}\n  }, {\n    key: "removeScript",\n    value: function removeScript() {}\n  }, {\n    key: "removeTemplate",\n    value: function removeTemplate() {}\n  }, {\n    key: "removeThumbnails",\n    value: function removeThumbnails() {}\n  }, {\n    key: "removeWeblinks",\n    value: function removeWeblinks() {}\n  }, {\n    key: "replacePages",\n    value: function replacePages() {}\n  }, {\n    key: "resetForm",\n    value: function resetForm() {\n      var aFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n      if (aFields && !Array.isArray(aFields) && _typeof(aFields) === "object") {\n        aFields = aFields.aFields;\n      }\n\n      var mustCalculate = false;\n\n      if (aFields) {\n        var _iterator6 = _createForOfIteratorHelper(aFields),\n            _step6;\n\n        try {\n          for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n            var fieldName = _step6.value;\n\n            if (!fieldName) {\n              continue;\n            }\n\n            var field = this.getField(fieldName);\n\n            if (!field) {\n              continue;\n            }\n\n            field.value = field.defaultValue;\n            field.valueAsString = field.value;\n            mustCalculate = true;\n          }\n        } catch (err) {\n          _iterator6.e(err);\n        } finally {\n          _iterator6.f();\n        }\n      } else {\n        mustCalculate = this._fields.size !== 0;\n\n        var _iterator7 = _createForOfIteratorHelper(this._fields.values()),\n            _step7;\n\n        try {\n          for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n            var _field = _step7.value;\n            _field.value = _field.defaultValue;\n            _field.valueAsString = _field.value;\n          }\n        } catch (err) {\n          _iterator7.e(err);\n        } finally {\n          _iterator7.f();\n        }\n      }\n\n      if (mustCalculate) {\n        this.calculateNow();\n      }\n    }\n  }, {\n    key: "saveAs",\n    value: function saveAs() {}\n  }, {\n    key: "scroll",\n    value: function scroll() {}\n  }, {\n    key: "selectPageNthWord",\n    value: function selectPageNthWord() {}\n  }, {\n    key: "setAction",\n    value: function setAction() {}\n  }, {\n    key: "setDataObjectContents",\n    value: function setDataObjectContents() {}\n  }, {\n    key: "setOCGOrder",\n    value: function setOCGOrder() {}\n  }, {\n    key: "setPageAction",\n    value: function setPageAction() {}\n  }, {\n    key: "setPageBoxes",\n    value: function setPageBoxes() {}\n  }, {\n    key: "setPageLabels",\n    value: function setPageLabels() {}\n  }, {\n    key: "setPageRotations",\n    value: function setPageRotations() {}\n  }, {\n    key: "setPageTabOrder",\n    value: function setPageTabOrder() {}\n  }, {\n    key: "setPageTransitions",\n    value: function setPageTransitions() {}\n  }, {\n    key: "spawnPageFromTemplate",\n    value: function spawnPageFromTemplate() {}\n  }, {\n    key: "submitForm",\n    value: function submitForm() {}\n  }, {\n    key: "syncAnnotScan",\n    value: function syncAnnotScan() {}\n  }]);\n\n  return Doc;\n}(_pdf_object.PDFObject);\n\nexports.Doc = Doc;\n\n/***/ }),\n/* 15 */\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nexports.PrintParams = void 0;\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nvar PrintParams = /*#__PURE__*/_createClass(function PrintParams(data) {\n  _classCallCheck(this, PrintParams);\n\n  this.binaryOk = true;\n  this.bitmapDPI = 150;\n  this.booklet = {\n    binding: 0,\n    duplexMode: 0,\n    subsetFrom: 0,\n    subsetTo: -1\n  };\n  this.colorOverride = 0;\n  this.colorProfile = "";\n  this.constants = Object.freeze({\n    bookletBindings: Object.freeze({\n      Left: 0,\n      Right: 1,\n      LeftTall: 2,\n      RightTall: 3\n    }),\n    bookletDuplexMode: Object.freeze({\n      BothSides: 0,\n      FrontSideOnly: 1,\n      BasicSideOnly: 2\n    }),\n    colorOverrides: Object.freeze({\n      auto: 0,\n      gray: 1,\n      mono: 2\n    }),\n    fontPolicies: Object.freeze({\n      everyPage: 0,\n      jobStart: 1,\n      pageRange: 2\n    }),\n    handling: Object.freeze({\n      none: 0,\n      fit: 1,\n      shrink: 2,\n      tileAll: 3,\n      tileLarge: 4,\n      nUp: 5,\n      booklet: 6\n    }),\n    interactionLevel: Object.freeze({\n      automatic: 0,\n      full: 1,\n      silent: 2\n    }),\n    nUpPageOrders: Object.freeze({\n      Horizontal: 0,\n      HorizontalReversed: 1,\n      Vertical: 2\n    }),\n    printContents: Object.freeze({\n      doc: 0,\n      docAndComments: 1,\n      formFieldsOnly: 2\n    }),\n    flagValues: Object.freeze({\n      applyOverPrint: 1,\n      applySoftProofSettings: 1 << 1,\n      applyWorkingColorSpaces: 1 << 2,\n      emitHalftones: 1 << 3,\n      emitPostScriptXObjects: 1 << 4,\n      emitFormsAsPSForms: 1 << 5,\n      maxJP2KRes: 1 << 6,\n      setPageSize: 1 << 7,\n      suppressBG: 1 << 8,\n      suppressCenter: 1 << 9,\n      suppressCJKFontSubst: 1 << 10,\n      suppressCropClip: 1 << 1,\n      suppressRotate: 1 << 12,\n      suppressTransfer: 1 << 13,\n      suppressUCR: 1 << 14,\n      useTrapAnnots: 1 << 15,\n      usePrintersMarks: 1 << 16\n    }),\n    rasterFlagValues: Object.freeze({\n      textToOutline: 1,\n      strokesToOutline: 1 << 1,\n      allowComplexClip: 1 << 2,\n      preserveOverprint: 1 << 3\n    }),\n    subsets: Object.freeze({\n      all: 0,\n      even: 1,\n      odd: 2\n    }),\n    tileMarks: Object.freeze({\n      none: 0,\n      west: 1,\n      east: 2\n    }),\n    usages: Object.freeze({\n      auto: 0,\n      use: 1,\n      noUse: 2\n    })\n  });\n  this.downloadFarEastFonts = false;\n  this.fileName = "";\n  this.firstPage = 0;\n  this.flags = 0;\n  this.fontPolicy = 0;\n  this.gradientDPI = 150;\n  this.interactive = 1;\n  this.lastPage = data.lastPage;\n  this.npUpAutoRotate = false;\n  this.npUpNumPagesH = 2;\n  this.npUpNumPagesV = 2;\n  this.npUpPageBorder = false;\n  this.npUpPageOrder = 0;\n  this.pageHandling = 0;\n  this.pageSubset = 0;\n  this.printAsImage = false;\n  this.printContent = 0;\n  this.printerName = "";\n  this.psLevel = 0;\n  this.rasterFlags = 0;\n  this.reversePages = false;\n  this.tileLabel = false;\n  this.tileMark = 0;\n  this.tileOverlap = 0;\n  this.tileScale = 1.0;\n  this.transparencyLevel = 75;\n  this.usePrinterCRD = 0;\n  this.useT1Conversion = 0;\n});\n\nexports.PrintParams = PrintParams;\n\n/***/ }),\n/* 16 */\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nexports.ProxyHandler = void 0;\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }\n\nvar ProxyHandler = /*#__PURE__*/function () {\n  function ProxyHandler() {\n    _classCallCheck(this, ProxyHandler);\n\n    this.nosend = new Set(["delay"]);\n  }\n\n  _createClass(ProxyHandler, [{\n    key: "get",\n    value: function get(obj, prop) {\n      if (prop in obj._expandos) {\n        var val = obj._expandos[prop];\n\n        if (typeof val === "function") {\n          return val.bind(obj);\n        }\n\n        return val;\n      }\n\n      if (typeof prop === "string" && !prop.startsWith("_") && prop in obj) {\n        var _val = obj[prop];\n\n        if (typeof _val === "function") {\n          return _val.bind(obj);\n        }\n\n        return _val;\n      }\n\n      return undefined;\n    }\n  }, {\n    key: "set",\n    value: function set(obj, prop, value) {\n      if (obj._kidIds) {\n        obj._kidIds.forEach(function (id) {\n          obj._appObjects[id].wrapped[prop] = value;\n        });\n      }\n\n      if (typeof prop === "string" && !prop.startsWith("_") && prop in obj) {\n        var old = obj[prop];\n        obj[prop] = value;\n\n        if (!this.nosend.has(prop) && obj._send && obj._id !== null && typeof old !== "function") {\n          var data = {\n            id: obj._id\n          };\n          data[prop] = obj[prop];\n\n          if (!obj._siblings) {\n            obj._send(data);\n          } else {\n            data.siblings = obj._siblings;\n\n            obj._send(data);\n          }\n        }\n      } else {\n        obj._expandos[prop] = value;\n      }\n\n      return true;\n    }\n  }, {\n    key: "has",\n    value: function has(obj, prop) {\n      return prop in obj._expandos || typeof prop === "string" && !prop.startsWith("_") && prop in obj;\n    }\n  }, {\n    key: "getPrototypeOf",\n    value: function getPrototypeOf(obj) {\n      return null;\n    }\n  }, {\n    key: "setPrototypeOf",\n    value: function setPrototypeOf(obj, proto) {\n      return false;\n    }\n  }, {\n    key: "isExtensible",\n    value: function isExtensible(obj) {\n      return true;\n    }\n  }, {\n    key: "preventExtensions",\n    value: function preventExtensions(obj) {\n      return false;\n    }\n  }, {\n    key: "getOwnPropertyDescriptor",\n    value: function getOwnPropertyDescriptor(obj, prop) {\n      if (prop in obj._expandos) {\n        return {\n          configurable: true,\n          enumerable: true,\n          value: obj._expandos[prop]\n        };\n      }\n\n      if (typeof prop === "string" && !prop.startsWith("_") && prop in obj) {\n        return {\n          configurable: true,\n          enumerable: true,\n          value: obj[prop]\n        };\n      }\n\n      return undefined;\n    }\n  }, {\n    key: "defineProperty",\n    value: function defineProperty(obj, key, descriptor) {\n      Object.defineProperty(obj._expandos, key, descriptor);\n      return true;\n    }\n  }, {\n    key: "deleteProperty",\n    value: function deleteProperty(obj, prop) {\n      if (prop in obj._expandos) {\n        delete obj._expandos[prop];\n      }\n    }\n  }, {\n    key: "ownKeys",\n    value: function ownKeys(obj) {\n      var fromExpandos = Reflect.ownKeys(obj._expandos);\n      var fromObj = Reflect.ownKeys(obj).filter(function (k) {\n        return !k.startsWith("_");\n      });\n      return fromExpandos.concat(fromObj);\n    }\n  }]);\n\n  return ProxyHandler;\n}();\n\nexports.ProxyHandler = ProxyHandler;\n\n/***/ }),\n/* 17 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nfunction _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nexports.Util = void 0;\n\nvar _pdf_object = __w_pdfjs_require__(7);\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar Util = /*#__PURE__*/function (_PDFObject) {\n  _inherits(Util, _PDFObject);\n\n  var _super = _createSuper(Util);\n\n  function Util(data) {\n    var _this;\n\n    _classCallCheck(this, Util);\n\n    _this = _super.call(this, data);\n    _this._scandCache = new Map();\n    _this._months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];\n    _this._days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];\n    _this.MILLISECONDS_IN_DAY = 86400000;\n    _this.MILLISECONDS_IN_WEEK = 604800000;\n    _this._externalCall = data.externalCall;\n    return _this;\n  }\n\n  _createClass(Util, [{\n    key: "printf",\n    value: function printf() {\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      if (args.length === 0) {\n        throw new Error("Invalid number of params in printf");\n      }\n\n      if (typeof args[0] !== "string") {\n        throw new TypeError("First argument of printf must be a string");\n      }\n\n      var pattern = /%(,[0-4])?([+ 0#]+)?(\\d+)?(\\.\\d+)?(.)/g;\n      var PLUS = 1;\n      var SPACE = 2;\n      var ZERO = 4;\n      var HASH = 8;\n      var i = 0;\n      return args[0].replace(pattern, function (match, nDecSep, cFlags, nWidth, nPrecision, cConvChar) {\n        if (cConvChar !== "d" && cConvChar !== "f" && cConvChar !== "s" && cConvChar !== "x") {\n          var buf = ["%"];\n\n          for (var _i = 0, _arr = [nDecSep, cFlags, nWidth, nPrecision, cConvChar]; _i < _arr.length; _i++) {\n            var str = _arr[_i];\n\n            if (str) {\n              buf.push(str);\n            }\n          }\n\n          return buf.join("");\n        }\n\n        i++;\n\n        if (i === args.length) {\n          throw new Error("Not enough arguments in printf");\n        }\n\n        var arg = args[i];\n\n        if (cConvChar === "s") {\n          return arg.toString();\n        }\n\n        var flags = 0;\n\n        if (cFlags) {\n          var _iterator = _createForOfIteratorHelper(cFlags),\n              _step;\n\n          try {\n            for (_iterator.s(); !(_step = _iterator.n()).done;) {\n              var flag = _step.value;\n\n              switch (flag) {\n                case "+":\n                  flags |= PLUS;\n                  break;\n\n                case " ":\n                  flags |= SPACE;\n                  break;\n\n                case "0":\n                  flags |= ZERO;\n                  break;\n\n                case "#":\n                  flags |= HASH;\n                  break;\n              }\n            }\n          } catch (err) {\n            _iterator.e(err);\n          } finally {\n            _iterator.f();\n          }\n        }\n\n        cFlags = flags;\n\n        if (nWidth) {\n          nWidth = parseInt(nWidth);\n        }\n\n        var intPart = Math.trunc(arg);\n\n        if (cConvChar === "x") {\n          var hex = Math.abs(intPart).toString(16).toUpperCase();\n\n          if (nWidth !== undefined) {\n            hex = hex.padStart(nWidth, cFlags & ZERO ? "0" : " ");\n          }\n\n          if (cFlags & HASH) {\n            hex = "0x".concat(hex);\n          }\n\n          return hex;\n        }\n\n        if (nPrecision) {\n          nPrecision = parseInt(nPrecision.substring(1));\n        }\n\n        nDecSep = nDecSep ? nDecSep.substring(1) : "0";\n        var separators = {\n          0: [",", "."],\n          1: ["", "."],\n          2: [".", ","],\n          3: ["", ","],\n          4: ["\'", "."]\n        };\n\n        var _separators$nDecSep = _slicedToArray(separators[nDecSep], 2),\n            thousandSep = _separators$nDecSep[0],\n            decimalSep = _separators$nDecSep[1];\n\n        var decPart = "";\n\n        if (cConvChar === "f") {\n          if (nPrecision !== undefined) {\n            decPart = Math.abs(arg - intPart).toFixed(nPrecision);\n          } else {\n            decPart = Math.abs(arg - intPart).toString();\n          }\n\n          if (decPart.length > 2) {\n            decPart = "".concat(decimalSep).concat(decPart.substring(2));\n          } else if (cFlags & HASH) {\n            decPart = ".";\n          } else {\n            decPart = "";\n          }\n        }\n\n        var sign = "";\n\n        if (intPart < 0) {\n          sign = "-";\n          intPart = -intPart;\n        } else if (cFlags & PLUS) {\n          sign = "+";\n        } else if (cFlags & SPACE) {\n          sign = " ";\n        }\n\n        if (thousandSep && intPart >= 1000) {\n          var _buf = [];\n\n          while (true) {\n            _buf.push((intPart % 1000).toString().padStart(3, "0"));\n\n            intPart = Math.trunc(intPart / 1000);\n\n            if (intPart < 1000) {\n              _buf.push(intPart.toString());\n\n              break;\n            }\n          }\n\n          intPart = _buf.reverse().join(thousandSep);\n        } else {\n          intPart = intPart.toString();\n        }\n\n        var n = "".concat(intPart).concat(decPart);\n\n        if (nWidth !== undefined) {\n          n = n.padStart(nWidth - sign.length, cFlags & ZERO ? "0" : " ");\n        }\n\n        return "".concat(sign).concat(n);\n      });\n    }\n  }, {\n    key: "iconStreamFromIcon",\n    value: function iconStreamFromIcon() {}\n  }, {\n    key: "printd",\n    value: function printd(cFormat, oDate) {\n      var _this2 = this;\n\n      switch (cFormat) {\n        case 0:\n          return this.printd("D:yyyymmddHHMMss", oDate);\n\n        case 1:\n          return this.printd("yyyy.mm.dd HH:MM:ss", oDate);\n\n        case 2:\n          return this.printd("m/d/yy h:MM:ss tt", oDate);\n      }\n\n      var handlers = {\n        mmmm: function mmmm(data) {\n          return _this2._months[data.month];\n        },\n        mmm: function mmm(data) {\n          return _this2._months[data.month].substring(0, 3);\n        },\n        mm: function mm(data) {\n          return (data.month + 1).toString().padStart(2, "0");\n        },\n        m: function m(data) {\n          return (data.month + 1).toString();\n        },\n        dddd: function dddd(data) {\n          return _this2._days[data.dayOfWeek];\n        },\n        ddd: function ddd(data) {\n          return _this2._days[data.dayOfWeek].substring(0, 3);\n        },\n        dd: function dd(data) {\n          return data.day.toString().padStart(2, "0");\n        },\n        d: function d(data) {\n          return data.day.toString();\n        },\n        yyyy: function yyyy(data) {\n          return data.year.toString();\n        },\n        yy: function yy(data) {\n          return (data.year % 100).toString().padStart(2, "0");\n        },\n        HH: function HH(data) {\n          return data.hours.toString().padStart(2, "0");\n        },\n        H: function H(data) {\n          return data.hours.toString();\n        },\n        hh: function hh(data) {\n          return (1 + (data.hours + 11) % 12).toString().padStart(2, "0");\n        },\n        h: function h(data) {\n          return (1 + (data.hours + 11) % 12).toString();\n        },\n        MM: function MM(data) {\n          return data.minutes.toString().padStart(2, "0");\n        },\n        M: function M(data) {\n          return data.minutes.toString();\n        },\n        ss: function ss(data) {\n          return data.seconds.toString().padStart(2, "0");\n        },\n        s: function s(data) {\n          return data.seconds.toString();\n        },\n        tt: function tt(data) {\n          return data.hours < 12 ? "am" : "pm";\n        },\n        t: function t(data) {\n          return data.hours < 12 ? "a" : "p";\n        }\n      };\n      var data = {\n        year: oDate.getFullYear(),\n        month: oDate.getMonth(),\n        day: oDate.getDate(),\n        dayOfWeek: oDate.getDay(),\n        hours: oDate.getHours(),\n        minutes: oDate.getMinutes(),\n        seconds: oDate.getSeconds()\n      };\n      var patterns = /(mmmm|mmm|mm|m|dddd|ddd|dd|d|yyyy|yy|HH|H|hh|h|MM|M|ss|s|tt|t|\\\\.)/g;\n      return cFormat.replace(patterns, function (match, pattern) {\n        if (pattern in handlers) {\n          return handlers[pattern](data);\n        }\n\n        return pattern.charCodeAt(1);\n      });\n    }\n  }, {\n    key: "printx",\n    value: function printx(cFormat, cSource) {\n      var handlers = [function (x) {\n        return x;\n      }, function (x) {\n        return x.toUpperCase();\n      }, function (x) {\n        return x.toLowerCase();\n      }];\n      var buf = [];\n      var i = 0;\n      var ii = cSource.length;\n      var currCase = handlers[0];\n      var escaped = false;\n\n      var _iterator2 = _createForOfIteratorHelper(cFormat),\n          _step2;\n\n      try {\n        for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n          var command = _step2.value;\n\n          if (escaped) {\n            buf.push(command);\n            escaped = false;\n            continue;\n          }\n\n          if (i >= ii) {\n            break;\n          }\n\n          switch (command) {\n            case "?":\n              buf.push(currCase(cSource.charAt(i++)));\n              break;\n\n            case "X":\n              while (i < ii) {\n                var _char = cSource.charAt(i++);\n\n                if ("a" <= _char && _char <= "z" || "A" <= _char && _char <= "Z" || "0" <= _char && _char <= "9") {\n                  buf.push(currCase(_char));\n                  break;\n                }\n              }\n\n              break;\n\n            case "A":\n              while (i < ii) {\n                var _char2 = cSource.charAt(i++);\n\n                if ("a" <= _char2 && _char2 <= "z" || "A" <= _char2 && _char2 <= "Z") {\n                  buf.push(currCase(_char2));\n                  break;\n                }\n              }\n\n              break;\n\n            case "9":\n              while (i < ii) {\n                var _char3 = cSource.charAt(i++);\n\n                if ("0" <= _char3 && _char3 <= "9") {\n                  buf.push(_char3);\n                  break;\n                }\n              }\n\n              break;\n\n            case "*":\n              while (i < ii) {\n                buf.push(currCase(cSource.charAt(i++)));\n              }\n\n              break;\n\n            case "\\\\":\n              escaped = true;\n              break;\n\n            case ">":\n              currCase = handlers[1];\n              break;\n\n            case "<":\n              currCase = handlers[2];\n              break;\n\n            case "=":\n              currCase = handlers[0];\n              break;\n\n            default:\n              buf.push(command);\n          }\n        }\n      } catch (err) {\n        _iterator2.e(err);\n      } finally {\n        _iterator2.f();\n      }\n\n      return buf.join("");\n    }\n  }, {\n    key: "scand",\n    value: function scand(cFormat, cDate) {\n      if (cDate === "") {\n        return new Date();\n      }\n\n      switch (cFormat) {\n        case 0:\n          return this.scand("D:yyyymmddHHMMss", cDate);\n\n        case 1:\n          return this.scand("yyyy.mm.dd HH:MM:ss", cDate);\n\n        case 2:\n          return this.scand("m/d/yy h:MM:ss tt", cDate);\n      }\n\n      if (!this._scandCache.has(cFormat)) {\n        var months = this._months;\n        var days = this._days;\n        var handlers = {\n          mmmm: {\n            pattern: "(".concat(months.join("|"), ")"),\n            action: function action(value, data) {\n              data.month = months.indexOf(value);\n            }\n          },\n          mmm: {\n            pattern: "(".concat(months.map(function (month) {\n              return month.substring(0, 3);\n            }).join("|"), ")"),\n            action: function action(value, data) {\n              data.month = months.findIndex(function (month) {\n                return month.substring(0, 3) === value;\n              });\n            }\n          },\n          mm: {\n            pattern: "(\\\\d{2})",\n            action: function action(value, data) {\n              data.month = parseInt(value) - 1;\n            }\n          },\n          m: {\n            pattern: "(\\\\d{1,2})",\n            action: function action(value, data) {\n              data.month = parseInt(value) - 1;\n            }\n          },\n          dddd: {\n            pattern: "(".concat(days.join("|"), ")"),\n            action: function action(value, data) {\n              data.day = days.indexOf(value);\n            }\n          },\n          ddd: {\n            pattern: "(".concat(days.map(function (day) {\n              return day.substring(0, 3);\n            }).join("|"), ")"),\n            action: function action(value, data) {\n              data.day = days.findIndex(function (day) {\n                return day.substring(0, 3) === value;\n              });\n            }\n          },\n          dd: {\n            pattern: "(\\\\d{2})",\n            action: function action(value, data) {\n              data.day = parseInt(value);\n            }\n          },\n          d: {\n            pattern: "(\\\\d{1,2})",\n            action: function action(value, data) {\n              data.day = parseInt(value);\n            }\n          },\n          yyyy: {\n            pattern: "(\\\\d{4})",\n            action: function action(value, data) {\n              data.year = parseInt(value);\n            }\n          },\n          yy: {\n            pattern: "(\\\\d{2})",\n            action: function action(value, data) {\n              data.year = 2000 + parseInt(value);\n            }\n          },\n          HH: {\n            pattern: "(\\\\d{2})",\n            action: function action(value, data) {\n              data.hours = parseInt(value);\n            }\n          },\n          H: {\n            pattern: "(\\\\d{1,2})",\n            action: function action(value, data) {\n              data.hours = parseInt(value);\n            }\n          },\n          hh: {\n            pattern: "(\\\\d{2})",\n            action: function action(value, data) {\n              data.hours = parseInt(value);\n            }\n          },\n          h: {\n            pattern: "(\\\\d{1,2})",\n            action: function action(value, data) {\n              data.hours = parseInt(value);\n            }\n          },\n          MM: {\n            pattern: "(\\\\d{2})",\n            action: function action(value, data) {\n              data.minutes = parseInt(value);\n            }\n          },\n          M: {\n            pattern: "(\\\\d{1,2})",\n            action: function action(value, data) {\n              data.minutes = parseInt(value);\n            }\n          },\n          ss: {\n            pattern: "(\\\\d{2})",\n            action: function action(value, data) {\n              data.seconds = parseInt(value);\n            }\n          },\n          s: {\n            pattern: "(\\\\d{1,2})",\n            action: function action(value, data) {\n              data.seconds = parseInt(value);\n            }\n          },\n          tt: {\n            pattern: "([aApP][mM])",\n            action: function action(value, data) {\n              var _char4 = value.charAt(0);\n\n              data.am = _char4 === "a" || _char4 === "A";\n            }\n          },\n          t: {\n            pattern: "([aApP])",\n            action: function action(value, data) {\n              data.am = value === "a" || value === "A";\n            }\n          }\n        };\n        var escapedFormat = cFormat.replace(/[.*+\\-?^${}()|[\\]\\\\]/g, "\\\\$&");\n        var patterns = /(mmmm|mmm|mm|m|dddd|ddd|dd|d|yyyy|yy|HH|H|hh|h|MM|M|ss|s|tt|t)/g;\n        var _actions = [];\n\n        var _re = escapedFormat.replace(patterns, function (match, patternElement) {\n          var _handlers$patternElem = handlers[patternElement],\n              pattern = _handlers$patternElem.pattern,\n              action = _handlers$patternElem.action;\n\n          _actions.push(action);\n\n          return pattern;\n        });\n\n        this._scandCache.set(cFormat, [_re, _actions]);\n      }\n\n      var _this$_scandCache$get = this._scandCache.get(cFormat),\n          _this$_scandCache$get2 = _slicedToArray(_this$_scandCache$get, 2),\n          re = _this$_scandCache$get2[0],\n          actions = _this$_scandCache$get2[1];\n\n      var matches = new RegExp(re, "g").exec(cDate);\n\n      if (!matches || matches.length !== actions.length + 1) {\n        return null;\n      }\n\n      var data = {\n        year: 0,\n        month: 0,\n        day: 0,\n        hours: 0,\n        minutes: 0,\n        seconds: 0,\n        am: null\n      };\n      actions.forEach(function (action, i) {\n        return action(matches[i + 1], data);\n      });\n\n      if (data.am !== null) {\n        data.hours = data.hours % 12 + (data.am ? 0 : 12);\n      }\n\n      return new Date(data.year, data.month, data.day, data.hours, data.minutes, data.seconds);\n    }\n  }, {\n    key: "spansToXML",\n    value: function spansToXML() {}\n  }, {\n    key: "stringFromStream",\n    value: function stringFromStream() {}\n  }, {\n    key: "xmlToSpans",\n    value: function xmlToSpans() {}\n  }]);\n\n  return Util;\n}(_pdf_object.PDFObject);\n\nexports.Util = Util;\n\n/***/ })\n/******/ \t]);\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __w_pdfjs_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __w_pdfjs_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\nvar __webpack_exports__ = {};\n// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.\n(() => {\nvar exports = __webpack_exports__;\n\n\nObject.defineProperty(exports, "__esModule", ({\n  value: true\n}));\nObject.defineProperty(exports, "initSandbox", ({\n  enumerable: true,\n  get: function get() {\n    return _initialization.initSandbox;\n  }\n}));\n\nvar _initialization = __w_pdfjs_require__(1);\n\nvar pdfjsVersion = \'2.14.44\';\nvar pdfjsBuild = \'ee39499a5\';\n})();\n\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});'];
      code.push("delete dump;");
      var success = false;
      var buf = 0;

      try {
        var sandboxData = JSON.stringify(data);
        code.push("pdfjsScripting.initSandbox({ data: ".concat(sandboxData, " })"));
        buf = this._module.stringToNewUTF8(code.join("\n"));
        success = !!this._module.ccall("init", "number", ["number", "number"], [buf, this._alertOnError]);
      } catch (error) {
        console.error(error);
      } finally {
        if (buf) {
          this._module.ccall("free", "number", ["number"], [buf]);
        }
      }

      if (success) {
        this.support.commFun = this._module.cwrap("commFun", null, ["string", "string"]);
      } else {
        this.nukeSandbox();
        throw new Error("Cannot start sandbox");
      }
    }
  }, {
    key: "dispatchEvent",
    value: function dispatchEvent(event) {
      var _this$support;

      (_this$support = this.support) === null || _this$support === void 0 ? void 0 : _this$support.callSandboxFunction("dispatchEvent", event);
    }
  }, {
    key: "dumpMemoryUse",
    value: function dumpMemoryUse() {
      if (this._module) {
        this._module.ccall("dumpMemoryUse", null, []);
      }
    }
  }, {
    key: "nukeSandbox",
    value: function nukeSandbox() {
      if (this._module !== null) {
        this.support.destroy();
        this.support = null;

        this._module.ccall("nukeSandbox", null, []);

        this._module = null;
      }
    }
  }, {
    key: "evalForTesting",
    value: function evalForTesting(code, key) {
      throw new Error("Not implemented: evalForTesting");
    }
  }]);

  return Sandbox;
}();

function QuickJSSandbox() {
  return (0, _quickjsEval["default"])().then(function (module) {
    return new Sandbox(window, module);
  });
}
})();

/******/ 	return __webpack_exports__;
/******/ })()
;
});
//# sourceMappingURL=pdf.sandbox.js.map