UNPKG

ngx-extended-pdf-viewer

Version:

Embedding PDF files in your Angular application. Highly configurable viewer including the toolbar, sidebar, and all the features you're used to.

25 lines 838 kB
window.ngxZone.runOutsideAngular(() => {
/**
 * @licstart The following is the entire license notice for the
 * JavaScript code in this page
 *
 * Copyright 2023 Mozilla Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @licend The above is the entire license notice for the
 * JavaScript code in this page
 */
!function webpackUniversalModuleDefinition(t,r){"object"==typeof exports&&"object"==typeof module?globalThis["pdfjs-dist/build/pdf"]=module.exports=t.pdfjsLib=r():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf",[],(()=>t.pdfjsLib=r())):"object"==typeof exports?globalThis["pdfjs-dist/build/pdf"]=exports["pdfjs-dist/build/pdf"]=t.pdfjsLib=r():t["pdfjs-dist/build/pdf"]=t.pdfjsLib=r()}(globalThis,(()=>(()=>{"use strict";var __webpack_modules__=[,(t,r,a)=>{a(2);a(71);a(73);a(85);a(90);a(92);a(104);Object.defineProperty(r,"__esModule",{value:!0});r.VerbosityLevel=r.Util=r.UnknownErrorException=r.UnexpectedResponseException=r.TextRenderingMode=r.RenderingIntentFlag=r.PromiseCapability=r.PermissionFlag=r.PasswordResponses=r.PasswordException=r.PageActionEventType=r.OPS=r.MissingPDFException=r.MAX_IMAGE_SIZE_TO_CACHE=r.LINE_FACTOR=r.LINE_DESCENT_FACTOR=r.InvalidPDFException=r.ImageKind=r.IDENTITY_MATRIX=r.FormatError=r.FeatureTest=r.FONT_IDENTITY_MATRIX=r.DocumentActionEventType=r.CMapCompressionType=r.BaseException=r.BASELINE_FACTOR=r.AnnotationType=r.AnnotationReplyType=r.AnnotationMode=r.AnnotationFlag=r.AnnotationFieldFlag=r.AnnotationEditorType=r.AnnotationEditorPrefix=r.AnnotationEditorParamsType=r.AnnotationBorderStyleType=r.AnnotationActionEventType=r.AbortException=void 0;r.assert=function assert(t,r){t||unreachable(r)};r.bytesToString=bytesToString;r.createValidAbsoluteUrl=function createValidAbsoluteUrl(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return null;try{if(a&&"string"==typeof t){if(a.addDefaultProtocol&&t.startsWith("www.")){var i=t.match(/\./g);(null==i?void 0:i.length)>=2&&(t="http://".concat(t))}if(a.tryConvertEncoding)try{t=stringToUTF8String(t)}catch(t){}}var o=r?new URL(t,r):new URL(t);if(function _isValidProtocol(t){switch(null==t?void 0:t.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":case"capacitor":return!0;default:return!1}}(o))return o}catch(t){}return null};r.getModificationDate=function getModificationDate(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return[t.getUTCFullYear().toString(),(t.getUTCMonth()+1).toString().padStart(2,"0"),t.getUTCDate().toString().padStart(2,"0"),t.getUTCHours().toString().padStart(2,"0"),t.getUTCMinutes().toString().padStart(2,"0"),t.getUTCSeconds().toString().padStart(2,"0")].join("")};r.getUuid=function getUuid(){var t,r;if("undefined"!=typeof crypto&&"function"==typeof(null===(t=crypto)||void 0===t?void 0:t.randomUUID))return crypto.randomUUID();var a=new Uint8Array(32);if("undefined"!=typeof crypto&&"function"==typeof(null===(r=crypto)||void 0===r?void 0:r.getRandomValues))crypto.getRandomValues(a);else for(var i=0;i<32;i++)a[i]=Math.floor(255*Math.random());return bytesToString(a)};r.getVerbosityLevel=function getVerbosityLevel(){return l};r.info=function info(t){l>=o.INFOS&&("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?console.log("Info: ".concat(t)):Window&&globalThis.ngxConsole?globalThis.ngxConsole.log("Info: ".concat(t)):console.log("Info: ".concat(t)))};r.isArrayBuffer=function isArrayBuffer(t){return"object"===_typeof(t)&&void 0!==(null==t?void 0:t.byteLength)};r.isArrayEqual=function isArrayEqual(t,r){if(t.length!==r.length)return!1;for(var a=0,i=t.length;a<i;a++)if(t[a]!==r[a])return!1;return!0};r.isNodeJS=void 0;r.normalizeUnicode=function normalizeUnicode(t){if(!S){S=/([\xA0\xB5\u037E\u0EB3\u2000-\u200A\u202F\u2126\uFB00-\uFB04\uFB06\uFB20-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBA1\uFBA4-\uFBA9\uFBAE-\uFBB1\uFBD3-\uFBDC\uFBDE-\uFBE7\uFBEA-\uFBF8\uFBFC\uFBFD\uFC00-\uFC5D\uFC64-\uFCF1\uFCF5-\uFD3D\uFD88\uFDF4\uFDFA\uFDFB\uFE71\uFE77\uFE79\uFE7B\uFE7D]+)|(\uFB05+)/g;k=new Map([["ſt","ſt"]])}return t.replaceAll(S,(function(t,r,a){return r?r.normalize("NFKC"):k.get(a)}))};r.objectFromMap=function objectFromMap(t){var r,a=Object.create(null),i=function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}(t);try{for(i.s();!(r=i.n()).done;){var o=(u=r.value,d=2,function _arrayWithHoles(t){if(Array.isArray(t))return t}(u)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(u,d)||_unsupportedIterableToArray(u,d)||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.")}()),l=o[0],c=o[1];a[l]=c}}catch(t){i.e(t)}finally{i.f()}var u,d;return a};r.objectSize=function objectSize(t){return Object.keys(t).length};r.setVerbosityLevel=function setVerbosityLevel(t){Number.isInteger(t)&&(l=t)};r.shadow=shadow;r.string32=function string32(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t)};r.stringToBytes=stringToBytes;r.stringToPDFString=function stringToPDFString(t){if(t[0]>="ï"){var r;"þ"===t[0]&&"ÿ"===t[1]?r="utf-16be":"ÿ"===t[0]&&"þ"===t[1]?r="utf-16le":"ï"===t[0]&&"»"===t[1]&&"¿"===t[2]&&(r="utf-8");if(r)try{var a=new TextDecoder(r,{fatal:!0}),i=stringToBytes(t);return a.decode(i)}catch(t){warn('stringToPDFString: "'.concat(t,'".'))}}for(var o=[],l=0,c=t.length;l<c;l++){var u=w[t.charCodeAt(l)];o.push(u?String.fromCharCode(u):t.charAt(l))}return o.join("")};r.stringToUTF8String=stringToUTF8String;r.unreachable=unreachable;r.utf8StringToString=function utf8StringToString(t){return unescape(encodeURIComponent(t))};r.warn=warn;a(112);a(120);a(122);a(123);a(131);a(105);a(135);a(140);a(146);a(148);a(149);a(152);a(163);a(164);a(165);a(166);a(167);a(171);a(192);a(193);a(196);a(197);a(198);a(203);a(204);a(205);a(207);a(208);a(209);a(210);a(211);a(212);a(213);a(216);a(217);a(219);a(220);a(221);a(222);a(223);a(224);a(228);a(229);a(231);a(232);a(233);a(235);a(238);a(244);a(245);a(246);a(247);a(248);a(249);a(251);a(255);a(257);a(258);a(259);a(280);a(289);a(291);a(292);a(300);a(301);a(302);function _classPrivateFieldInitSpec(t,r,a){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,a)}function _classPrivateFieldSet(t,r,a){!function _classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,_classExtractFieldDescriptor(t,r,"set"),a);return a}function _classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||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 _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,a)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var i=!("object"!==("undefined"==typeof process?"undefined":_typeof(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);r.isNodeJS=i;r.IDENTITY_MATRIX=[1,0,0,1,0,0];r.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];r.MAX_IMAGE_SIZE_TO_CACHE=1e7;r.LINE_FACTOR=1.35;r.LINE_DESCENT_FACTOR=.35;r.BASELINE_FACTOR=.25925925925925924;r.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};r.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};r.AnnotationEditorPrefix="pdfjs_internal_editor_";r.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15};r.AnnotationEditorParamsType={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23};r.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};r.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};r.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};r.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};r.AnnotationReplyType={GROUP:"Group",REPLY:"R"};r.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};r.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};r.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};r.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"};r.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};r.PageActionEventType={O:"PageOpen",C:"PageClose"};var o={ERRORS:0,WARNINGS:1,INFOS:5};r.VerbosityLevel=o;r.CMapCompressionType={NONE:0,BINARY:1};r.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};r.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var l=o.WARNINGS;function warn(t){l>=o.WARNINGS&&("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?console.log("Warning: ".concat(t)):Window&&globalThis.ngxConsole?globalThis.ngxConsole.log("Warning: ".concat(t)):console.log("Warning: ".concat(t)))}function unreachable(t){throw new Error(t)}function shadow(t,r,a){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Object.defineProperty(t,r,{value:a,enumerable:!i,configurable:!0,writable:!1});return a}var c=function BaseExceptionClosure(){function BaseException(t,r){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=t;this.name=r}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();r.BaseException=c;var u=function(t){_inherits(PasswordException,t);var r=_createSuper(PasswordException);function PasswordException(t,a){var i;_classCallCheck(this,PasswordException);(i=r.call(this,t,"PasswordException")).code=a;return i}return _createClass(PasswordException)}(c);r.PasswordException=u;var d=function(t){_inherits(UnknownErrorException,t);var r=_createSuper(UnknownErrorException);function UnknownErrorException(t,a){var i;_classCallCheck(this,UnknownErrorException);(i=r.call(this,t,"UnknownErrorException")).details=a;return i}return _createClass(UnknownErrorException)}(c);r.UnknownErrorException=d;var h=function(t){_inherits(InvalidPDFException,t);var r=_createSuper(InvalidPDFException);function InvalidPDFException(t){_classCallCheck(this,InvalidPDFException);return r.call(this,t,"InvalidPDFException")}return _createClass(InvalidPDFException)}(c);r.InvalidPDFException=h;var p=function(t){_inherits(MissingPDFException,t);var r=_createSuper(MissingPDFException);function MissingPDFException(t){_classCallCheck(this,MissingPDFException);return r.call(this,t,"MissingPDFException")}return _createClass(MissingPDFException)}(c);r.MissingPDFException=p;var v=function(t){_inherits(UnexpectedResponseException,t);var r=_createSuper(UnexpectedResponseException);function UnexpectedResponseException(t,a){var i;_classCallCheck(this,UnexpectedResponseException);(i=r.call(this,t,"UnexpectedResponseException")).status=a;return i}return _createClass(UnexpectedResponseException)}(c);r.UnexpectedResponseException=v;var y=function(t){_inherits(FormatError,t);var r=_createSuper(FormatError);function FormatError(t){_classCallCheck(this,FormatError);return r.call(this,t,"FormatError")}return _createClass(FormatError)}(c);r.FormatError=y;var _=function(t){_inherits(AbortException,t);var r=_createSuper(AbortException);function AbortException(t){_classCallCheck(this,AbortException);return r.call(this,t,"AbortException")}return _createClass(AbortException)}(c);r.AbortException=_;function bytesToString(t){"object"===_typeof(t)&&void 0!==(null==t?void 0:t.length)||unreachable("Invalid argument for bytesToString");var r=t.length,a=8192;if(r<a)return String.fromCharCode.apply(null,t);for(var i=[],o=0;o<r;o+=a){var l=Math.min(o+a,r),c=t.subarray(o,l);i.push(String.fromCharCode.apply(null,c))}return i.join("")}function stringToBytes(t){"string"!=typeof t&&unreachable("Invalid argument for stringToBytes");for(var r=t.length,a=new Uint8Array(r),i=0;i<r;++i)a[i]=255&t.charCodeAt(i);return a}var g=function(){function FeatureTest(){_classCallCheck(this,FeatureTest)}_createClass(FeatureTest,null,[{key:"isLittleEndian",get:function get(){return shadow(this,"isLittleEndian",function isLittleEndian(){var t=new Uint8Array(4);t[0]=1;return 1===new Uint32Array(t.buffer,0,1)[0]}())}},{key:"isEvalSupported",get:function get(){return shadow(this,"isEvalSupported",function isEvalSupported(){try{new Function("");return!0}catch(t){return!1}}())}},{key:"isOffscreenCanvasSupported",get:function get(){return shadow(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}},{key:"platform",get:function get(){return"undefined"==typeof navigator?shadow(this,"platform",{isWin:!1,isMac:!1}):shadow(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}},{key:"isCSSRoundSupported",get:function get(){var t,r;return shadow(this,"isCSSRoundSupported",null===(t=globalThis.CSS)||void 0===t||null===(r=t.supports)||void 0===r?void 0:r.call(t,"width: round(1.5px, 1px)"))}}]);return FeatureTest}();r.FeatureTest=g;var m=_toConsumableArray(Array(256).keys()).map((function(t){return t.toString(16).padStart(2,"0")})),b=function(){function Util(){_classCallCheck(this,Util)}_createClass(Util,null,[{key:"makeHexColor",value:function makeHexColor(t,r,a){return"#".concat(m[t]).concat(m[r]).concat(m[a])}},{key:"scaleMinMax",value:function scaleMinMax(t,r){var a;if(t[0]){if(t[0]<0){a=r[0];r[0]=r[1];r[1]=a}r[0]*=t[0];r[1]*=t[0];if(t[3]<0){a=r[2];r[2]=r[3];r[3]=a}r[2]*=t[3];r[3]*=t[3]}else{a=r[0];r[0]=r[2];r[2]=a;a=r[1];r[1]=r[3];r[3]=a;if(t[1]<0){a=r[2];r[2]=r[3];r[3]=a}r[2]*=t[1];r[3]*=t[1];if(t[2]<0){a=r[0];r[0]=r[1];r[1]=a}r[0]*=t[2];r[1]*=t[2]}r[0]+=t[4];r[1]+=t[4];r[2]+=t[5];r[3]+=t[5]}},{key:"transform",value:function transform(t,r){return[t[0]*r[0]+t[2]*r[1],t[1]*r[0]+t[3]*r[1],t[0]*r[2]+t[2]*r[3],t[1]*r[2]+t[3]*r[3],t[0]*r[4]+t[2]*r[5]+t[4],t[1]*r[4]+t[3]*r[5]+t[5]]}},{key:"applyTransform",value:function applyTransform(t,r){return[t[0]*r[0]+t[1]*r[2]+r[4],t[0]*r[1]+t[1]*r[3]+r[5]]}},{key:"applyInverseTransform",value:function applyInverseTransform(t,r){var a=r[0]*r[3]-r[1]*r[2];return[(t[0]*r[3]-t[1]*r[2]+r[2]*r[5]-r[4]*r[3])/a,(-t[0]*r[1]+t[1]*r[0]+r[4]*r[1]-r[5]*r[0])/a]}},{key:"getAxialAlignedBoundingBox",value:function getAxialAlignedBoundingBox(t,r){var a=this.applyTransform(t,r),i=this.applyTransform(t.slice(2,4),r),o=this.applyTransform([t[0],t[3]],r),l=this.applyTransform([t[2],t[1]],r);return[Math.min(a[0],i[0],o[0],l[0]),Math.min(a[1],i[1],o[1],l[1]),Math.max(a[0],i[0],o[0],l[0]),Math.max(a[1],i[1],o[1],l[1])]}},{key:"inverseTransform",value:function inverseTransform(t){var r=t[0]*t[3]-t[1]*t[2];return[t[3]/r,-t[1]/r,-t[2]/r,t[0]/r,(t[2]*t[5]-t[4]*t[3])/r,(t[4]*t[1]-t[5]*t[0])/r]}},{key:"singularValueDecompose2dScale",value:function singularValueDecompose2dScale(t){var r=[t[0],t[2],t[1],t[3]],a=t[0]*r[0]+t[1]*r[2],i=t[0]*r[1]+t[1]*r[3],o=t[2]*r[0]+t[3]*r[2],l=t[2]*r[1]+t[3]*r[3],c=(a+l)/2,u=Math.sqrt(Math.pow(a+l,2)-4*(a*l-o*i))/2,d=c+u||1,h=c-u||1;return[Math.sqrt(d),Math.sqrt(h)]}},{key:"normalizeRect",value:function normalizeRect(t){var r=t.slice(0);if(t[0]>t[2]){r[0]=t[2];r[2]=t[0]}if(t[1]>t[3]){r[1]=t[3];r[3]=t[1]}return r}},{key:"intersect",value:function intersect(t,r){var a=Math.max(Math.min(t[0],t[2]),Math.min(r[0],r[2])),i=Math.min(Math.max(t[0],t[2]),Math.max(r[0],r[2]));if(a>i)return null;var o=Math.max(Math.min(t[1],t[3]),Math.min(r[1],r[3])),l=Math.min(Math.max(t[1],t[3]),Math.max(r[1],r[3]));return o>l?null:[a,o,i,l]}},{key:"bezierBoundingBox",value:function bezierBoundingBox(t,r,a,i,o,l,c,u){for(var d,h,p,v,y,_,g,m,b=[],w=[[],[]],P=0;P<2;++P){if(0===P){h=6*t-12*a+6*o;d=-3*t+9*a-9*o+3*c;p=3*a-3*t}else{h=6*r-12*i+6*l;d=-3*r+9*i-9*l+3*u;p=3*i-3*r}if(Math.abs(d)<1e-12){if(Math.abs(h)<1e-12)continue;0<(v=-p/h)&&v<1&&b.push(v)}else{g=h*h-4*p*d;m=Math.sqrt(g);if(!(g<0)){0<(y=(-h+m)/(2*d))&&y<1&&b.push(y);0<(_=(-h-m)/(2*d))&&_<1&&b.push(_)}}}for(var A,S=b.length,k=S;S--;){A=1-(v=b[S]);w[0][S]=A*A*A*t+3*A*A*v*a+3*A*v*v*o+v*v*v*c;w[1][S]=A*A*A*r+3*A*A*v*i+3*A*v*v*l+v*v*v*u}w[0][k]=t;w[1][k]=r;w[0][k+1]=c;w[1][k+1]=u;w[0].length=w[1].length=k+2;return[Math.min.apply(Math,_toConsumableArray(w[0])),Math.min.apply(Math,_toConsumableArray(w[1])),Math.max.apply(Math,_toConsumableArray(w[0])),Math.max.apply(Math,_toConsumableArray(w[1]))]}}]);return Util}();r.Util=b;var w=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function stringToUTF8String(t){return decodeURIComponent(escape(t))}var P=new WeakMap,A=function(){function PromiseCapability(){var t=this;_classCallCheck(this,PromiseCapability);_classPrivateFieldInitSpec(this,P,{writable:!0,value:!1});this.promise=new Promise((function(r,a){t.resolve=function(a){_classPrivateFieldSet(t,P,!0);r(a)};t.reject=function(r){_classPrivateFieldSet(t,P,!0);a(r)}}))}_createClass(PromiseCapability,[{key:"settled",get:function get(){return function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}(this,P)}}]);return PromiseCapability}();r.PromiseCapability=A;var S=null,k=null},(t,r,a)=>{var i=a(3),o=a(7),l=a(40),c=a(69),u=a(70);i({target:"Object",stat:!0,forced:o((function(){c(1)})),sham:!u},{getPrototypeOf:function getPrototypeOf(t){return c(l(t))}})},(t,r,a)=>{var i=a(4),o=a(5).f,l=a(44),c=a(48),u=a(38),d=a(56),h=a(68);t.exports=function(t,r){var a,p,v,y,_,g=t.target,m=t.global,b=t.stat;if(a=m?i:b?i[g]||u(g,{}):(i[g]||{}).prototype)for(p in r){y=r[p];v=t.dontCallGetSet?(_=o(a,p))&&_.value:a[p];if(!h(m?p:g+(b?".":"#")+p,t.forced)&&void 0!==v){if(typeof y==typeof v)continue;d(y,v)}(t.sham||v&&v.sham)&&l(y,"sham",!0);c(a,p,y,t)}}},function(t){var check=function(t){return t&&t.Math===Math&&t};t.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||function(){return this}()||this||Function("return this")()},(t,r,a)=>{var i=a(6),o=a(8),l=a(10),c=a(11),u=a(12),d=a(18),h=a(39),p=a(42),v=Object.getOwnPropertyDescriptor;r.f=i?v:function getOwnPropertyDescriptor(t,r){t=u(t);r=d(r);if(p)try{return v(t,r)}catch(t){}if(h(t,r))return c(!o(l.f,t,r),t[r])}},(t,r,a)=>{var i=a(7);t.exports=!i((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},(t,r,a)=>{var i=a(9),o=Function.prototype.call;t.exports=i?o.bind(o):function(){return o.apply(o,arguments)}},(t,r,a)=>{var i=a(7);t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},(t,r)=>{var a={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!a.call({1:2},1);r.f=o?function propertyIsEnumerable(t){var r=i(this,t);return!!r&&r.enumerable}:a},t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},(t,r,a)=>{var i=a(13),o=a(16);t.exports=function(t){return i(o(t))}},(t,r,a)=>{var i=a(14),o=a(7),l=a(15),c=Object,u=i("".split);t.exports=o((function(){return!c("z").propertyIsEnumerable(0)}))?function(t){return"String"===l(t)?u(t,""):c(t)}:c},(t,r,a)=>{var i=a(9),o=Function.prototype,l=o.call,c=i&&o.bind.bind(l,l);t.exports=i?c:function(t){return function(){return l.apply(t,arguments)}}},(t,r,a)=>{var i=a(14),o=i({}.toString),l=i("".slice);t.exports=function(t){return l(o(t),8,-1)}},(t,r,a)=>{var i=a(17),o=TypeError;t.exports=function(t){if(i(t))throw o("Can't call method on "+t);return t}},t=>{t.exports=function(t){return null==t}},(t,r,a)=>{var i=a(19),o=a(23);t.exports=function(t){var r=i(t,"string");return o(r)?r:r+""}},(t,r,a)=>{var i=a(8),o=a(20),l=a(23),c=a(30),u=a(33),d=a(34),h=TypeError,p=d("toPrimitive");t.exports=function(t,r){if(!o(t)||l(t))return t;var a,d=c(t,p);if(d){void 0===r&&(r="default");a=i(d,t,r);if(!o(a)||l(a))return a;throw h("Can't convert object to primitive value")}void 0===r&&(r="number");return u(t,r)}},(t,r,a)=>{var i=a(21),o=a(22),l=o.all;t.exports=o.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:i(t)||t===l}:function(t){return"object"==typeof t?null!==t:i(t)}},(t,r,a)=>{var i=a(22),o=i.all;t.exports=i.IS_HTMLDDA?function(t){return"function"==typeof t||t===o}:function(t){return"function"==typeof t}},t=>{var r="object"==typeof document&&document.all,a=void 0===r&&void 0!==r;t.exports={all:r,IS_HTMLDDA:a}},(t,r,a)=>{var i=a(24),o=a(21),l=a(25),c=a(26),u=Object;t.exports=c?function(t){return"symbol"==typeof t}:function(t){var r=i("Symbol");return o(r)&&l(r.prototype,u(t))}},(t,r,a)=>{var i=a(4),o=a(21);t.exports=function(t,r){return arguments.length<2?(a=i[t],o(a)?a:void 0):i[t]&&i[t][r];var a}},(t,r,a)=>{var i=a(14);t.exports=i({}.isPrototypeOf)},(t,r,a)=>{var i=a(27);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(t,r,a)=>{var i=a(28),o=a(7),l=a(4).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!l(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},(t,r,a)=>{var i,o,l=a(4),c=a(29),u=l.process,d=l.Deno,h=u&&u.versions||d&&d.version,p=h&&h.v8;p&&(o=(i=p.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1]));!o&&c&&(!(i=c.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=c.match(/Chrome\/(\d+)/))&&(o=+i[1]);t.exports=o},t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},(t,r,a)=>{var i=a(31),o=a(17);t.exports=function(t,r){var a=t[r];return o(a)?void 0:i(a)}},(t,r,a)=>{var i=a(21),o=a(32),l=TypeError;t.exports=function(t){if(i(t))return t;throw l(o(t)+" is not a function")}},t=>{var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},(t,r,a)=>{var i=a(8),o=a(21),l=a(20),c=TypeError;t.exports=function(t,r){var a,u;if("string"===r&&o(a=t.toString)&&!l(u=i(a,t)))return u;if(o(a=t.valueOf)&&!l(u=i(a,t)))return u;if("string"!==r&&o(a=t.toString)&&!l(u=i(a,t)))return u;throw c("Can't convert object to primitive value")}},(t,r,a)=>{var i=a(4),o=a(35),l=a(39),c=a(41),u=a(27),d=a(26),h=i.Symbol,p=o("wks"),v=d?h.for||h:h&&h.withoutSetter||c;t.exports=function(t){l(p,t)||(p[t]=u&&l(h,t)?h[t]:v("Symbol."+t));return p[t]}},(t,r,a)=>{var i=a(36),o=a(37);(t.exports=function(t,r){return o[t]||(o[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.32.1",mode:i?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE",source:"https://github.com/zloirock/core-js"})},t=>{t.exports=!1},(t,r,a)=>{var i=a(4),o=a(38),l="__core-js_shared__",c=i[l]||o(l,{});t.exports=c},(t,r,a)=>{var i=a(4),o=Object.defineProperty;t.exports=function(t,r){try{o(i,t,{value:r,configurable:!0,writable:!0})}catch(a){i[t]=r}return r}},(t,r,a)=>{var i=a(14),o=a(40),l=i({}.hasOwnProperty);t.exports=Object.hasOwn||function hasOwn(t,r){return l(o(t),r)}},(t,r,a)=>{var i=a(16),o=Object;t.exports=function(t){return o(i(t))}},(t,r,a)=>{var i=a(14),o=0,l=Math.random(),c=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+c(++o+l,36)}},(t,r,a)=>{var i=a(6),o=a(7),l=a(43);t.exports=!i&&!o((function(){return 7!==Object.defineProperty(l("div"),"a",{get:function(){return 7}}).a}))},(t,r,a)=>{var i=a(4),o=a(20),l=i.document,c=o(l)&&o(l.createElement);t.exports=function(t){return c?l.createElement(t):{}}},(t,r,a)=>{var i=a(6),o=a(45),l=a(11);t.exports=i?function(t,r,a){return o.f(t,r,l(1,a))}:function(t,r,a){t[r]=a;return t}},(t,r,a)=>{var i=a(6),o=a(42),l=a(46),c=a(47),u=a(18),d=TypeError,h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,v="enumerable",y="configurable",_="writable";r.f=i?l?function defineProperty(t,r,a){c(t);r=u(r);c(a);if("function"==typeof t&&"prototype"===r&&"value"in a&&_ in a&&!a[_]){var i=p(t,r);if(i&&i[_]){t[r]=a.value;a={configurable:y in a?a[y]:i[y],enumerable:v in a?a[v]:i[v],writable:!1}}}return h(t,r,a)}:h:function defineProperty(t,r,a){c(t);r=u(r);c(a);if(o)try{return h(t,r,a)}catch(t){}if("get"in a||"set"in a)throw d("Accessors not supported");"value"in a&&(t[r]=a.value);return t}},(t,r,a)=>{var i=a(6),o=a(7);t.exports=i&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(t,r,a)=>{var i=a(20),o=String,l=TypeError;t.exports=function(t){if(i(t))return t;throw l(o(t)+" is not an object")}},(t,r,a)=>{var i=a(21),o=a(45),l=a(49),c=a(38);t.exports=function(t,r,a,u){u||(u={});var d=u.enumerable,h=void 0!==u.name?u.name:r;i(a)&&l(a,h,u);if(u.global)d?t[r]=a:c(r,a);else{try{u.unsafe?t[r]&&(d=!0):delete t[r]}catch(t){}d?t[r]=a:o.f(t,r,{value:a,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return t}},(t,r,a)=>{var i=a(14),o=a(7),l=a(21),c=a(39),u=a(6),d=a(50).CONFIGURABLE,h=a(51),p=a(52),v=p.enforce,y=p.get,_=String,g=Object.defineProperty,m=i("".slice),b=i("".replace),w=i([].join),P=u&&!o((function(){return 8!==g((function(){}),"length",{value:8}).length})),A=String(String).split("String"),S=t.exports=function(t,r,a){"Symbol("===m(_(r),0,7)&&(r="["+b(_(r),/^Symbol\(([^)]*)\)/,"$1")+"]");a&&a.getter&&(r="get "+r);a&&a.setter&&(r="set "+r);(!c(t,"name")||d&&t.name!==r)&&(u?g(t,"name",{value:r,configurable:!0}):t.name=r);P&&a&&c(a,"arity")&&t.length!==a.arity&&g(t,"length",{value:a.arity});try{a&&c(a,"constructor")&&a.constructor?u&&g(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=v(t);c(i,"source")||(i.source=w(A,"string"==typeof r?r:""));return t};Function.prototype.toString=S((function toString(){return l(this)&&y(this).source||h(this)}),"toString")},(t,r,a)=>{var i=a(6),o=a(39),l=Function.prototype,c=i&&Object.getOwnPropertyDescriptor,u=o(l,"name"),d=u&&"something"===function something(){}.name,h=u&&(!i||i&&c(l,"name").configurable);t.exports={EXISTS:u,PROPER:d,CONFIGURABLE:h}},(t,r,a)=>{var i=a(14),o=a(21),l=a(37),c=i(Function.toString);o(l.inspectSource)||(l.inspectSource=function(t){return c(t)});t.exports=l.inspectSource},(t,r,a)=>{var i,o,l,c=a(53),u=a(4),d=a(20),h=a(44),p=a(39),v=a(37),y=a(54),_=a(55),g="Object already initialized",m=u.TypeError,b=u.WeakMap;if(c||v.state){var w=v.state||(v.state=new b);w.get=w.get;w.has=w.has;w.set=w.set;i=function(t,r){if(w.has(t))throw m(g);r.facade=t;w.set(t,r);return r};o=function(t){return w.get(t)||{}};l=function(t){return w.has(t)}}else{var P=y("state");_[P]=!0;i=function(t,r){if(p(t,P))throw m(g);r.facade=t;h(t,P,r);return r};o=function(t){return p(t,P)?t[P]:{}};l=function(t){return p(t,P)}}t.exports={set:i,get:o,has:l,enforce:function(t){return l(t)?o(t):i(t,{})},getterFor:function(t){return function(r){var a;if(!d(r)||(a=o(r)).type!==t)throw m("Incompatible receiver, "+t+" required");return a}}}},(t,r,a)=>{var i=a(4),o=a(21),l=i.WeakMap;t.exports=o(l)&&/native code/.test(String(l))},(t,r,a)=>{var i=a(35),o=a(41),l=i("keys");t.exports=function(t){return l[t]||(l[t]=o(t))}},t=>{t.exports={}},(t,r,a)=>{var i=a(39),o=a(57),l=a(5),c=a(45);t.exports=function(t,r,a){for(var u=o(r),d=c.f,h=l.f,p=0;p<u.length;p++){var v=u[p];i(t,v)||a&&i(a,v)||d(t,v,h(r,v))}}},(t,r,a)=>{var i=a(24),o=a(14),l=a(58),c=a(67),u=a(47),d=o([].concat);t.exports=i("Reflect","ownKeys")||function ownKeys(t){var r=l.f(u(t)),a=c.f;return a?d(r,a(t)):r}},(t,r,a)=>{var i=a(59),o=a(66).concat("length","prototype");r.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return i(t,o)}},(t,r,a)=>{var i=a(14),o=a(39),l=a(12),c=a(60).indexOf,u=a(55),d=i([].push);t.exports=function(t,r){var a,i=l(t),h=0,p=[];for(a in i)!o(u,a)&&o(i,a)&&d(p,a);for(;r.length>h;)o(i,a=r[h++])&&(~c(p,a)||d(p,a));return p}},(t,r,a)=>{var i=a(12),o=a(61),l=a(64),createMethod=function(t){return function(r,a,c){var u,d=i(r),h=l(d),p=o(c,h);if(t&&a!=a){for(;h>p;)if((u=d[p++])!=u)return!0}else for(;h>p;p++)if((t||p in d)&&d[p]===a)return t||p||0;return!t&&-1}};t.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},(t,r,a)=>{var i=a(62),o=Math.max,l=Math.min;t.exports=function(t,r){var a=i(t);return a<0?o(a+r,0):l(a,r)}},(t,r,a)=>{var i=a(63);t.exports=function(t){var r=+t;return r!=r||0===r?0:i(r)}},t=>{var r=Math.ceil,a=Math.floor;t.exports=Math.trunc||function trunc(t){var i=+t;return(i>0?a:r)(i)}},(t,r,a)=>{var i=a(65);t.exports=function(t){return i(t.length)}},(t,r,a)=>{var i=a(62),o=Math.min;t.exports=function(t){return t>0?o(i(t),9007199254740991):0}},t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(t,r)=>{r.f=Object.getOwnPropertySymbols},(t,r,a)=>{var i=a(7),o=a(21),l=/#|\.prototype\./,isForced=function(t,r){var a=u[c(t)];return a===h||a!==d&&(o(r)?i(r):!!r)},c=isForced.normalize=function(t){return String(t).replace(l,".").toLowerCase()},u=isForced.data={},d=isForced.NATIVE="N",h=isForced.POLYFILL="P";t.exports=isForced},(t,r,a)=>{var i=a(39),o=a(21),l=a(40),c=a(54),u=a(70),d=c("IE_PROTO"),h=Object,p=h.prototype;t.exports=u?h.getPrototypeOf:function(t){var r=l(t);if(i(r,d))return r[d];var a=r.constructor;return o(a)&&r instanceof a?a.prototype:r instanceof h?p:null}},(t,r,a)=>{var i=a(7);t.exports=!i((function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype}))},(t,r,a)=>{var i=a(3),o=a(4),l=a(72);i({global:!0},{Reflect:{}});l(o.Reflect,"Reflect",!0)},(t,r,a)=>{var i=a(45).f,o=a(39),l=a(34)("toStringTag");t.exports=function(t,r,a){t&&!a&&(t=t.prototype);t&&!o(t,l)&&i(t,l,{configurable:!0,value:r})}},(t,r,a)=>{var i=a(3),o=a(24),l=a(74),c=a(75),u=a(77),d=a(47),h=a(20),p=a(81),v=a(7),y=o("Reflect","construct"),_=Object.prototype,g=[].push,m=v((function(){function F(){}return!(y((function(){}),[],F)instanceof F)})),b=!v((function(){y((function(){}))})),w=m||b;i({target:"Reflect",stat:!0,forced:w,sham:w},{construct:function construct(t,r){u(t);d(r);var a=arguments.length<3?t:u(arguments[2]);if(b&&!m)return y(t,r,a);if(t===a){switch(r.length){case 0:return new t;case 1:return new t(r[0]);case 2:return new t(r[0],r[1]);case 3:return new t(r[0],r[1],r[2]);case 4:return new t(r[0],r[1],r[2],r[3])}var i=[null];l(g,i,r);return new(l(c,t,i))}var o=a.prototype,v=p(h(o)?o:_),w=l(t,v,r);return h(w)?w:v}})},(t,r,a)=>{var i=a(9),o=Function.prototype,l=o.apply,c=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?c.bind(l):function(){return c.apply(l,arguments)})},(t,r,a)=>{var i=a(14),o=a(31),l=a(20),c=a(39),u=a(76),d=a(9),h=Function,p=i([].concat),v=i([].join),y={};t.exports=d?h.bind:function bind(t){var r=o(this),a=r.prototype,i=u(arguments,1),d=function bound(){var a=p(i,u(arguments));return this instanceof d?function(t,r,a){if(!c(y,r)){for(var i=[],o=0;o<r;o++)i[o]="a["+o+"]";y[r]=h("C,a","return new C("+v(i,",")+")")}return y[r](t,a)}(r,a.length,a):r.apply(t,a)};l(a)&&(d.prototype=a);return d}},(t,r,a)=>{var i=a(14);t.exports=i([].slice)},(t,r,a)=>{var i=a(78),o=a(32),l=TypeError;t.exports=function(t){if(i(t))return t;throw l(o(t)+" is not a constructor")}},(t,r,a)=>{var i=a(14),o=a(7),l=a(21),c=a(79),u=a(24),d=a(51),noop=function(){},h=[],p=u("Reflect","construct"),v=/^\s*(?:class|function)\b/,y=i(v.exec),_=!v.exec(noop),g=function isConstructor(t){if(!l(t))return!1;try{p(noop,h,t);return!0}catch(t){return!1}},m=function isConstructor(t){if(!l(t))return!1;switch(c(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _||!!y(v,d(t))}catch(t){return!0}};m.sham=!0;t.exports=!p||o((function(){var t;return g(g.call)||!g(Object)||!g((function(){t=!0}))||t}))?m:g},(t,r,a)=>{var i=a(80),o=a(21),l=a(15),c=a(34)("toStringTag"),u=Object,d="Arguments"===l(function(){return arguments}());t.exports=i?l:function(t){var r,a,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(a=function(t,r){try{return t[r]}catch(t){}}(r=u(t),c))?a:d?l(r):"Object"===(i=l(r))&&o(r.callee)?"Arguments":i}},(t,r,a)=>{var i={};i[a(34)("toStringTag")]="z";t.exports="[object z]"===String(i)},(t,r,a)=>{var i,o=a(47),l=a(82),c=a(66),u=a(55),d=a(84),h=a(43),p=a(54),v="prototype",y="script",_=p("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<"+y+">"+t+"</"+y+">"},NullProtoObjectViaActiveX=function(t){t.write(scriptTag(""));t.close();var r=t.parentWindow.Object;t=null;return r},NullProtoObject=function(){try{i=new ActiveXObject("htmlfile")}catch(t){}NullProtoObject="undefined"!=typeof document?document.domain&&i?NullProtoObjectViaActiveX(i):function(){var t,r=h("iframe"),a="java"+y+":";r.style.display="none";d.appendChild(r);r.src=String(a);(t=r.contentWindow.document).open();t.write(scriptTag("document.F=Object"));t.close();return t.F}():NullProtoObjectViaActiveX(i);for(var t=c.length;t--;)delete NullProtoObject[v][c[t]];return NullProtoObject()};u[_]=!0;t.exports=Object.create||function create(t,r){var a;if(null!==t){EmptyConstructor[v]=o(t);a=new EmptyConstructor;EmptyConstructor[v]=null;a[_]=t}else a=NullProtoObject();return void 0===r?a:l.f(a,r)}},(t,r,a)=>{var i=a(6),o=a(46),l=a(45),c=a(47),u=a(12),d=a(83);r.f=i&&!o?Object.defineProperties:function defineProperties(t,r){c(t);for(var a,i=u(r),o=d(r),h=o.length,p=0;h>p;)l.f(t,a=o[p++],i[a]);return t}},(t,r,a)=>{var i=a(59),o=a(66);t.exports=Object.keys||function keys(t){return i(t,o)}},(t,r,a)=>{var i=a(24);t.exports=i("document","documentElement")},(t,r,a)=>{var i=a(86),o=a(89);i("toPrimitive");o()},(t,r,a)=>{var i=a(87),o=a(39),l=a(88),c=a(45).f;t.exports=function(t){var r=i.Symbol||(i.Symbol={});o(r,t)||c(r,t,{value:l.f(t)})}},(t,r,a)=>{var i=a(4);t.exports=i},(t,r,a)=>{var i=a(34);r.f=i},(t,r,a)=>{var i=a(8),o=a(24),l=a(34),c=a(48);t.exports=function(){var t=o("Symbol"),r=t&&t.prototype,a=r&&r.valueOf,u=l("toPrimitive");r&&!r[u]&&c(r,u,(function(t){return i(a,this)}),{arity:1})}},(t,r,a)=>{var i=a(39),o=a(48),l=a(91),c=a(34)("toPrimitive"),u=Date.prototype;i(u,c)||o(u,c,l)},(t,r,a)=>{var i=a(47),o=a(33),l=TypeError;t.exports=function(t){i(this);if("string"===t||"default"===t)t="string";else if("number"!==t)throw l("Incorrect hint");return o(this,t)}},(t,r,a)=>{var i=a(3),o=a(93);i({target:"Array",stat:!0,forced:!a(103)((function(t){Array.from(t)}))},{from:o})},(t,r,a)=>{var i=a(94),o=a(8),l=a(40),c=a(96),u=a(98),d=a(78),h=a(64),p=a(100),v=a(101),y=a(102),_=Array;t.exports=function from(t){var r=l(t),a=d(this),g=arguments.length,m=g>1?arguments[1]:void 0,b=void 0!==m;b&&(m=i(m,g>2?arguments[2]:void 0));var w,P,A,S,k,x,E=y(r),T=0;if(!E||this===_&&u(E)){w=h(r);P=a?new this(w):_(w);for(;w>T;T++){x=b?m(r[T],T):r[T];p(P,T,x)}}else{k=(S=v(r,E)).next;P=a?new this:[];for(;!(A=o(k,S)).done;T++){x=b?c(S,m,[A.value,T],!0):A.value;p(P,T,x)}}P.length=T;return P}},(t,r,a)=>{var i=a(95),o=a(31),l=a(9),c=i(i.bind);t.exports=function(t,r){o(t);return void 0===r?t:l?c(t,r):function(){return t.apply(r,arguments)}}},(t,r,a)=>{var i=a(15),o=a(14);t.exports=function(t){if("Function"===i(t))return o(t)}},(t,r,a)=>{var i=a(47),o=a(97);t.exports=function(t,r,a,l){try{return l?r(i(a)[0],a[1]):r(a)}catch(r){o(t,"throw",r)}}},(t,r,a)=>{var i=a(8),o=a(47),l=a(30);t.exports=function(t,r,a){var c,u;o(t);try{if(!(c=l(t,"return"))){if("throw"===r)throw a;return a}c=i(c,t)}catch(t){u=!0;c=t}if("throw"===r)throw a;if(u)throw c;o(c);return a}},(t,r,a)=>{var i=a(34),o=a(99),l=i("iterator"),c=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||c[l]===t)}},t=>{t.exports={}},(t,r,a)=>{var i=a(18),o=a(45),l=a(11);t.exports=function(t,r,a){var c=i(r);c in t?o.f(t,c,l(0,a)):t[c]=a}},(t,r,a)=>{var i=a(8),o=a(31),l=a(47),c=a(32),u=a(102),d=TypeError;t.exports=function(t,r){var a=arguments.length<2?u(t):r;if(o(a))return l(i(a,t));throw d(c(t)+" is not iterable")}},(t,r,a)=>{var i=a(79),o=a(30),l=a(17),c=a(99),u=a(34)("iterator");t.exports=function(t){if(!l(t))return o(t,u)||o(t,"@@iterator")||c[i(t)]}},(t,r,a)=>{var i=a(34)("iterator"),o=!1;try{var l=0,c={next:function(){return{done:!!l++}},return:function(){o=!0}};c[i]=function(){return this};Array.from(c,(function(){throw 2}))}catch(t){}t.exports=function(t,r){if(!r&&!o)return!1;var a=!1;try{var l={};l[i]=function(){return{next:function(){return{done:a=!0}}}};t(l)}catch(t){}return a}},(t,r,a)=>{a(105);var i=a(3),o=a(8),l=a(21),c=a(47),u=a(107),d=function(){var t=!1,r=/[ac]/;r.exec=function(){t=!0;return/./.exec.apply(this,arguments)};return!0===r.test("abc")&&t}(),h=/./.test;i({target:"RegExp",proto:!0,forced:!d},{test:function(t){var r=c(this),a=u(t),i=r.exec;if(!l(i))return o(h,r,a);var d=o(i,r,a);if(null===d)return!1;c(d);return!0}})},(t,r,a)=>{var i=a(3),o=a(106);i({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},(t,r,a)=>{var i=a(8),o=a(14),l=a(107),c=a(108),u=a(109),d=a(35),h=a(81),p=a(52).get,v=a(110),y=a(111),_=d("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,m=g,b=o("".charAt),w=o("".indexOf),P=o("".replace),A=o("".slice),S=function(){var t=/a/,r=/b*/g;i(g,t,"a");i(g,r,"a");return 0!==t.lastIndex||0!==r.lastIndex}(),k=u.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];(S||x||k||v||y)&&(m=function exec(t){var r,a,o,u,d,v,y,E=this,T=p(E),C=l(t),I=T.raw;if(I){I.lastIndex=E.lastIndex;r=i(m,I,C);E.lastIndex=I.lastIndex;return r}var M=T.groups,O=k&&E.sticky,R=i(c,E),G=E.source,L=0,D=C;if(O){R=P(R,"y","");-1===w(R,"g")&&(R+="g");D=A(C,E.lastIndex);if(E.lastIndex>0&&(!E.multiline||E.multiline&&"\n"!==b(C,E.lastIndex-1))){G="(?: "+G+")";D=" "+D;L++}a=new RegExp("^(?:"+G+")",R)}x&&(a=new RegExp("^"+G+"$(?!\\s)",R));S&&(o=E.lastIndex);u=i(g,O?a:E,D);if(O)if(u){u.input=A(u.input,L);u[0]=A(u[0],L);u.index=E.lastIndex;E.lastIndex+=u[0].length}else E.lastIndex=0;else S&&u&&(E.lastIndex=E.global?u.index+u[0].length:o);x&&u&&u.length>1&&i(_,u[0],a,(function(){for(d=1;d<arguments.length-2;d++)void 0===arguments[d]&&(u[d]=void 0)}));if(u&&M){u.groups=v=h(null);for(d=0;d<M.length;d++)v[(y=M[d])[0]]=u[y[1]]}return u});t.exports=m},(t,r,a)=>{var i=a(79),o=String;t.exports=function(t){if("Symbol"===i(t))throw TypeError("Cannot convert a Symbol value to a string");return o(t)}},(t,r,a)=>{var i=a(47);t.exports=function(){var t=i(this),r="";t.hasIndices&&(r+="d");t.global&&(r+="g");t.ignoreCase&&(r+="i");t.multiline&&(r+="m");t.dotAll&&(r+="s");t.unicode&&(r+="u");t.unicodeSets&&(r+="v");t.sticky&&(r+="y");return r}},(t,r,a)=>{var i=a(7),o=a(4).RegExp,l=i((function(){var t=o("a","y");t.lastIndex=2;return null!==t.exec("abcd")})),c=l||i((function(){return!o("a","y").sticky})),u=l||i((function(){var t=o("^r","gy");t.lastIndex=2;return null!==t.exec("str")}));t.exports={BROKEN_CARET:u,MISSED_STICKY:c,UNSUPPORTED_Y:l}},(t,r,a)=>{var i=a(7),o=a(4).RegExp;t.exports=i((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},(t,r,a)=>{var i=a(7),o=a(4).RegExp;t.exports=i((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},(t,r,a)=>{var i=a(3),o=a(36),l=a(6),c=a(4),u=a(87),d=a(14),h=a(68),p=a(39),v=a(113),y=a(25),_=a(23),g=a(19),m=a(7),b=a(58).f,w=a(5).f,P=a(45).f,A=a(117),S=a(118).trim,k="Number",x=c[k],E=u[k],T=x.prototype,C=c.TypeError,I=d("".slice),M=d("".charCodeAt),toNumber=function(t){var r,a,i,o,l,c,u,d,h=g(t,"number");if(_(h))throw C("Cannot convert a Symbol value to a number");if("string"==typeof h&&h.length>2){h=S(h);if(43===(r=M(h,0))||45===r){if(88===(a=M(h,2))||120===a)return NaN}else if(48===r){switch(M(h,1)){case 66:case 98:i=2;o=49;break;case 79:case 111:i=8;o=55;break;default:return+h}c=(l=I(h,2)).length;for(u=0;u<c;u++)if((d=M(l,u))<48||d>o)return NaN;return parseInt(l,i)}}return+h},O=h(k,!x(" 0o1")||!x("0b1")||x("+0x1")),R=function Number(t){var r,a=arguments.length<1?0:x(function(t){var r=g(t,"number");return"bigint"==typeof r?r:toNumber(r)}(t));return y(T,r=this)&&m((function(){A(r)}))?v(Object(a),this,R):a};R.prototype=T;O&&!o&&(T.constructor=R);i({global:!0,constructor:!0,wrap:!0,forced:O},{Number:R});var copyConstructorProperties=function(t,r){for(var a,i=l?b(r):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;i.length>o;o++)p(r,a=i[o])&&!p(t,a)&&P(t,a,w(r,a))};o&&E&&copyConstructorProperties(u[k],E);(O||o)&&copyConstructorProperties(u[k],x)},(t,r,a)=>{var i=a(21),o=a(20),l=a(114);t.exports=function(t,r,a){var c,u;l&&i(c=r.constructor)&&c!==a&&o(u=c.prototype)&&u!==a.prototype&&l(t,u);return t}},(t,r,a)=>{var i=a(115),o=a(47),l=a(116);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,a={};try{(t=i(Object.prototype,"__proto__","set"))(a,[]);r=a instanceof Array}catch(t){}return function setPrototypeOf(a,i){o(a);l(i);r?t(a,i):a.__proto__=i;return a}}():void 0)},(t,r,a)=>{var i=a(14),o=a(31);t.exports=function(t,r,a){try{return i(o(Object.getOwnPropertyDescriptor(t,r)[a]))}catch(t){}}},(t,r,a)=>{var i=a(21),o=String,l=TypeError;t.exports=function(t){if("object"==typeof t||i(t))return t;throw l("Can't set "+o(t)+" as a prototype")}},(t,r,a)=>{var i=a(14);t.exports=i(1..valueOf)},(t,r,a)=>{var i=a(14),o=a(16),l=a(107),c=a(119),u=i("".replace),d=RegExp("^["+c+"]+"),h=RegExp("(^|[^"+c+"])["+c+"]+$"),createMethod=function(t){return function(r){var a=l(o(r));1&t&&(a=u(a,d,""));2&t&&(a=u(a,h,"$1"));return a}};t.exports={start:createMethod(1),end:createMethod(2),trim:createMethod(3)}},t=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},(t,r,a)=>{var i=a(3),o=a(4),l=a(121),c=a(6),u=TypeError,d=Object.defineProperty,h=o.self!==o;try{if(c){var p=Object.getOwnPropertyDescriptor(o,"self");!h&&p&&p.get&&p.enumerable||l(o,"self",{get:function self(){return o},set:function self(t){if(this!==o)throw u("Illegal invocation");d(o,"self",{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else i({global:!0,simple:!0,forced:h},{self:o})}catch(t){}},(t,r,a)=>{var i=a(49),o=a(45);t.exports=function(t,r,a){a.get&&i(a.get,r,{getter:!0});a.set&&i(a.set,r,{setter:!0});return o.f(t,r,a)}},(t,r,a)=>{var i=a(3),o=a(4);i({global:!0,forced:o.globalThis!==o},{globalThis:o})},(t,r,a)=>{var i=a(3),o=a(4),l=a(74),c=a(124),u="WebAssembly",d=o[u],h=7!==Error("e",{cause:7}).cause,exportGlobalErrorCauseWrapper=function(t,r){var a={};a[t]=c(t,r,h);i({global:!0,constructor:!0,arity:1,forced:h},a)},exportWebAssemblyErrorCauseWrapper=function(t,r){if(d&&d[t]){var a={};a[t]=c(u+"."+t,r,h);i({target:u,stat:!0,constructor:!0,arity:1,forced:h},a)}};exportGlobalErrorCauseWrapper("Error",(function(t){return function Error(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("EvalError",(function(t){return function EvalError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("RangeError",(function(t){return function RangeError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("ReferenceError",(function(t){return function ReferenceError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("SyntaxError",(function(t){return function SyntaxError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("TypeError",(function(t){return function TypeError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("URIError",(function(t){return function URIError(r){return l(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("CompileError",(function(t){return function CompileError(r){return l(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("LinkError",(function(t){return function LinkError(r){return l(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("RuntimeError",(function(t){return function RuntimeError(r){return l(t,this,arguments)}}))},(t,r,a)=>{var i=a(24),o=a(39),l=a(44),c=a(25),u=a(114),d=a(56),h=a(125),p=a(113),v=a(126),y=a(127),_=a(128),g=a(6),m=a(36);t.exports=function(t,r,a,b){var w="stackTraceLimit",P=b?2:1,A=t.split("."),S=A[A.length-1],k=i.apply(null,A);if(k){var x=k.prototype;!m&&o(x,"cause")&&delete x.cause;if(!a)return k;var E=i("Error"),T=r((function(t,r){var a=v(b?r:t,void 0),i=b?new k(t):new k;void 0!==a&&l(i,"message",a);_(i,T,i.stack,2);this&&c(x,this)&&p(i,this,T);arguments.length>P&&y(i,arguments[P]);return i}));T.prototype=x;if("Error"!==S)u?u(T,E):d(T,E,{name:!0});else if(g&&w in k){h(T,k,w);h(T,k,"prepareStackTrace")}d(T,k);if(!m)try{x.name!==S&&l(x,"name",S);x.constructor=T}catch(t){}return T}}},(t,r,a)=>{var i=a(45).f;t.exports=function(t,r,a){a in t||i(t,a,{configurable:!0,get:function(){return r[a]},set:function(t){r[a]=t}})}},(t,r,a)=>{var i=a(107);t.exports=function(t,r){return void 0===t?arguments.length<2?"":r:i(t)}},(t,r,a)=>{var i=a(20),o=a(44);t.exports=function(t,r){i(r)&&"cause"in r&&o(t,"cause",r.cause)}},(t,r,a)=>{var i=a(44),o=a(129),l=a(130),c=Error.captureStackTrace;t.exports=function(t,r,a,u){l&&(c?c(t,r):i(t,"stack",o(a,u)))}},(t,r,a)=>{var i=a(14),o=Error,l=i("".replace),c=String(o("zxcasd").stack),u=/\n\s*at [^:]*:[^\n]*/,d=u.test(c);t.exports=function(t,r){if(d&&"string"==typeof t&&!o.prepareStackTrace)for(;r--;)t=l(t,u,"");return t}},(t,r,a)=>{var i=a(7),o=a(11);t.exports=!i((function(){var t=Error("a");if(!("stack"in t))return!0;Object.defineProperty(t,"stack",o(1,7));return 7!==t.stack}))},(t,r,a)=>{var i,o=a(3),l=a(95),c=a(5).f,u=a(65),d=a(107),h=a(132),p=a(16),v=a(134),y=a(36),_=l("".startsWith),g=l("".slice),m=Math.min,b=v("startsWith");o({target:"String",proto:!0,forced:!(!y&&!b&&!!(i=c(String.prototype,"startsWith"),i&&!i.writable))&&!b},{startsWith:function startsWith(t){var r=d(p(this));h(t);var a=u(m(arguments.length>1?arguments[1]:void 0,r.length)),i=d(t);return _?_(r,i,a):g(r,a,a+i.length)===i}})},(t,r,a)=>{var i=a(133),o=TypeError;t.exports=function(t){if(i(t))throw o("The method doesn't accept regular expressions");return t}},(t,r,a)=>{var i=a(20),o=a(15),l=a(34)("match");t.exports=function(t){var r;return i(t)&&(void 0!==(r=t[l])?!!r:"RegExp"===o(t))}},(t,r,a)=>{var i=a(34)("match");t.exports=function(t){var r=/./;try{"/./"[t](r)}catch(a){try{r[i]=!1;return"/./"[t](r)}catch(t){}}return!1}},(t,r,a)=>{var i=a(8),o=a(136),l=a(47),c=a(17),u=a(65),d=a(107),h=a(16),p=a(30),v=a(137),y=a(139);o("match",(function(t,r,a){return[function match(r){var a=h(this),o=c(r)?void 0:p(r,t);return o?i(o,r,a):new RegExp(r)[t](d(a))},function(t){var i=l(this),o=d(t),c=a(r,i,o);if(c.done)return c.value;if(!i.global)return y(i,o);var h=i.unicode;i.lastIndex=0;for(var p,_=[],g=0;null!==(p=y(i,o));){var m=d(p[0]);_[g]=m;""===m&&(i.lastIndex=v(o,u(i.lastIndex),h));g++}return 0===g?null:_}]}))},(t,r,a)=>{a(105);var i=a(95),o=a(48),l=a(106),c=a(7),u=a(34),d=a(44),h=u("species"),p=RegExp.prototype;t.exports=function(t,r,a,v){var y=u(t),_=!c((function(){var r={};r[y]=function(){return 7};return 7!==""[t](r)})),g=_&&!c((function(){var r=!1,a=/a/;if("split"===t){(a={}).constructor={};a.constructor[h]=function(){return a};a.flags="";a[y]=/./[y]}a.exec=function(){r=!0;return null};a[y]("");return!r}));if(!_||!g||a){var m=i(/./[y]),b=r(y,""[t],(function(t,r,a,o,c){var u=i(t),d=r.exec;return d===l||d===p.exec?_&&!c?{done:!0,value:m(r,a,o)}:{done:!0,value:u(a,r,o)}:{done:!1}}));o(String.prototype,t,b[0]);o(p,y,b[1])}v&&d(p[y],"sham",!0)}},(t,r,a)=>{var i=a(138).charAt;t.exports=function(t,r,a){return r+(a?i(t,r).length:1)}},(t,r,a)=>{var i=a(14),o=a(62),l=a(107),c=a(16),u=i("".charAt),d=i("".charCodeAt),h=i("".slice),createMethod=function(t){return function(r,a){var i,p,v=l(c(r)),y=o(a),_=v.length;return y<0||y>=_?t?"":void 0:(i=d(v,y))<55296||i>56319||y+1===_||(p=d(v,y+1))<56320||p>57343?t?u(v,y):i:t?h(v,y,y+2):p-56320+(i-55296<<10)+65536}};t.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}},(t,r,a)=>{var i=a(8),o=a(47),l=a(21),c=a(15),u=a(106),d=TypeError;t.exports=function(t,r){var a=t.exec;if(l(a)){var h=i(a,t,r);null!==h&&o(h);return h}if("RegExp"===c(t))return i(u,t,r);throw d("RegExp#exec called on incompatible receiver")}},(t,r,a)=>{var i=a(12),o=a(141),l=a(99),c=a(52),u=a(45).f,d=a(142),h=a(145),p=a(36),v=a(6),y="Array Iterator",_=c.set,g=c.getterFor(y);t.exports=d(Array,"Array",(function(t,r){_(this,{type:y,target:i(t),index:0,kind:r})}),(function(){var t=g(this),r=t.target,a=t.kind,i=t.index++;if(!r||i>=r.length){t.target=void 0;return h(void 0,!0)}switch(a){case"keys":return h(i,!1);case"values":return h(r[i],!1)}return h([i,r[i]],!1)}),"values");var m=l.Arguments=l.Array;o("keys");o("values");o("entries");if(!p&&v&&"values"!==m.name)try{u(m,"name",{value:"values"})}catch(t){}},(t,r,a)=>{var i=a(34),o=a(81),l=a(45).f,c=i("unscopables"),u=Array.prototype;void 0===u[c]&&l(u,c,{configurable:!0,value:o(null)});t.exports=function(t){u[c][t]=!0}},(t,r,a)=>{var i=a(3),o=a(8),l=a(36),c=a(50),u=a(21),d=a(143),h=a(69),p=a(114),v=a(72),y=a(44),_=a(48),g=a(34),m=a(99),b=a(144),w=c.PROPER,P=c.CONFIGURABLE,A=b.IteratorPrototype,S=b.BUGGY_SAFARI_ITERATORS,k=g("iterator"),x="keys",E="values",T="entries",returnThis=function(){return this};t.exports=function(t,r,a,c,g,b,C){d(a,r,c);var I,M,O,getIterationMethod=function(t){if(t===g&&j)return j;if(!S&&t in L)return L[t];switch(t){case x:return function keys(){return new a(this,t)};case E:return function values(){return new a(this,t)};case T:return function entries(){return new a(this,t)}}return function(){return new a(this)}},R=r+" Iterator",G=!1,L=t.prototype,D=L[k]||L["@@iterator"]||g&&L[g],j=!S&&D||getIterationMethod(g),N="Array"===r&&L.entries||D;if(N&&(I=h(N.call(new t)))!==Object.prototype&&I.next){l||h(I)===A||(p?p(I,A):u(I[k])||_(I,k,returnThis));v(I,R,!0,!0);l&&(m[R]=returnThis)}if(w&&g===E&&D&&D.name!==E)if(!l&&P)y(L,"name",E);else{G=!0;j=function values(){return o(D,this)}}if(g){M={values:getIterationMethod(E),keys:b?j:getIterationMethod(x),entries:getIterationMethod(T)};if(C)for(O in M)(S||G||!(O in L))&&_(L,O,M[O]);else i({target:r,proto:!0,forced:S||G},M)}l&&!C||L[k]===j||_(L,k,j,{name:g});m[r]=j;return M}},(t,r,a)=>{var i=a(144).IteratorPrototype,o=a(81),l=a(11),c=a(72),u=a(99),returnThis=function(){return this};t.exports=function(t,r,a,d){var h=r+" Iterator";t.prototype=o(i,{next:l(+!d,a)});c(t,h,!1,!0);u[h]=returnThis;return t}},(t,r,a)=>{var i,o,l,c=a(7),u=a(21),d=a(20),h=a(81),p=a(69),v=a(48),y=a(34),_=a(36),g=y("iterator"),m=!1;[].keys&&("next"in(l=[].keys())?(o=p(p(l)))!==Object.prototype&&(i=o):m=!0);!d(i)||c((function(){var t={};return i[g].call(t)!==t}))?i={}:_&&(i=h(i));u(i[g])||v(i,g,(function(){return this}));t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:m}},t=>{t.exports=function(t,r){return{value:t,done:r}}},(t,r,a)=>{var i=a(80),o=a(48),l=a(147);i||o(Object.prototype,"toString",l,{unsafe:!0})},(t,r,a)=>{var i=a(80),o=a(79);t.exports=i?{}.toString:function toString(){return"[object "+o(this)+"]"}},(t,r,a)=>{var i=a(138).charAt,o=a(107),l=a(52),c=a(142),u=a(145),d="String Iterator",h=l.set,p=l.getterFor(d);c(String,"String",(function(t){h(this,{type:d,string:o(t),index:0})}),(function next(){var t,r=p(this),a=r.string,o=r.index;if(o>=a.length)return u(void 0,!0);t=i(a,o);r.index+=t.length;return u(t,!1)}))},(t,r,a)=>{var i=a(4),o=a(150),l=a(151),c=a(140),u=a(44),d=a(34),h=d("iterator"),p=d("toStringTag"),v=c.values,handlePrototype=function(t,r){if(t){if(t[h]!==v)try{u(t,h,v)}catch(r){t[h]=v}t[p]||u(t,p,r);if(o[r])for(var a in c)if(t[a]!==c[a])try{u(t,a,c[a])}catch(r){t[a]=c[a]}}};for(var y in o)handlePrototype(i[y]&&i[y].prototype,y);handlePrototype(l,"DOMTokenList")},t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},(t,r,a)=>{var i=a(43)("span").classList,o=i&&i.constructor&&i.constructor.prototype;t.exports=o===Object.prototype?void 0:o},(t,r,a)=>{a(153)},(t,r,a)=>{a(148);var i,o=a(3),l=a(6),c=a(154),u=a(4),d=a(94),h=a(14),p=a(48),v=a(121),y=a(155),_=a(39),g=a(156),m=a(93),b=a(157),w=a(138).codeAt,P=a(158),A=a(107),S=a(72),k=a(159),x=a(160),E=a(52),T=E.set,C=E.getterFor("URL"),I=x.URLSearchParams,M=x.getState,O=u.URL,R=u.TypeError,G=u.parseInt,L=Math.floor,D=Math.pow,j=h("".charAt),N=h(/./.exec),W=h([].join),B=h(1..toString),U=h([].pop),H=h([].push),z=h("".replace),q=h([].shift),V=h("".split),X=h("".slice),Y=h("".toLowerCase),K=h([].unshift),J="Invalid scheme",$="Invalid host",Q="Invalid port",Z=/[a-z]/i,ee=/[\d+-.a-z]/i,te=/\d/,re=/^0x/i,ne=/^[0-7]+$/,ae=/^\d+$/,ie=/^[\da-f]+$/i,oe=/[\0\t\n\r #%/:<>?@[\\\]^|]/,se=/[\0\t\n\r #/:<>?@[\\\]^|]/,le=/^[\u0000-\u0020]+/,ce=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ue=/[\t\n\r]/g,serializeHost=function(t){var r,a,i,o;if("number"==typeof t){r=[];for(a=0;a<4;a++){K(r,t%256);t=L(t/256)}return W(r,".")}if("object"==typeof t){r="";i=function(t){for(var r=null,a=1,i=null,o=0,l=0;l<8;l++)if(0!==t[l]){if(o>a){r=i;a=o}i=null;o=0}else{null===i&&(i=l);++o}if(o>a){r=i;a=o}return r}(t);for(a=0;a<8;a++)if(!o||0!==t[a]){o&&(o=!1);if(i===a){r+=a?":":"::";o=!0}else{r+=B(t[a],16);a<7&&(r+=":")}}return"["+r+"]"}return t},de={},he=g({},de,{" ":1,'"':1,"<":1,">":1,"`":1}),fe=g({},he,{"#":1,"?":1,"{":1,"}":1}),pe=g({},fe,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(t,r){var a=w(t,0);return a>32&&a<127&&!_(r,t)?t:encodeURIComponent(t)},ve={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isWindowsDriveLetter=function(t,r){var a;return 2===t.length&&N(Z,j(t,0))&&(":"===(a=j(t,1))||!r&&"|"===a)},startsWithWindowsDriveLetter=function(t){var r;return t.length>1&&isWindowsDriveLetter(X(t,0,2))&&(2===t.length||"/"===(r=j(t,2))||"\\"===r||"?"===r||"#"===r)},isSingleDot=function(t){return"."===t||"%2e"===Y(t)},ye={},_e={},ge={},me={},be={},we={},Pe={},Ae={},Se={},ke={},Fe={},xe={},Ee={},Te={},Ce={},Ie={},Me={},Oe={},Re={},Ge={},Le={},URLState=function(t,r,a){var i,o,l,c=A(t);if(r){if(o=this.parse(c))throw R(o);this.searchParams=null}else{void 0!==a&&(i=new URLState(a,!0));if(o=this.parse(c,null,i))throw R(o);(l=M(new I)).bindURL(this);this.searchParams=l}};URLState.prototype={type:"URL",parse:function(t,r,a){var o,l,c,u,d,h=this,p=r||ye,v=0,y="",g=!1,w=!1,P=!1;t=A(t);if(!r){h.scheme="";h.username="";h.password="";h.host=null;h.port=null;h.path=[];h.query=null;h.fragment=null;h.cannotBeABaseURL=!1;t=z(t,le,"");t=z(t,ce,"$1")}t=z(t,ue,"");o=m(t);for(;v<=o.length;){l=o[v];switch(p){case ye:if(!l||!N(Z,l)){if(r)return J;p=ge;continue}y+=Y(l);p=_e;break;case _e:if(l&&(N(ee,l)||"+"===l||"-"===l||"."===l))y+=Y(l);else{if(":"!==l){if(r)return J;y="";p=ge;v=0;continue}if(r&&(h.isSpecial()!==_(ve,y)||"file"===y&&(h.includesCredentials()||null!==h.port)||"file"===h.scheme&&!h.host))return;h.scheme=y;if(r){h.isSpecial()&&ve[h.scheme]===h.port&&(h.port=null);return}y="";if("file"===h.scheme)p=Te;else if(h.isSpecial()&&a&&a.scheme===h.scheme)p=me;else if(h.isSpecial())p=Ae;else if("/"===o[v+1]){p=be;v++}else{h.cannotBeABaseURL=!0;H(h.path,"");p=Re}}break;case ge:if(!a||a.cannotBeABaseURL&&"#"!==l)return J;if(a.cannotBeABaseURL&&"#"===l){h.scheme=a.scheme;h.path=b(a.path);h.query=a.query;h.fragment="";h.cannotBeABaseURL=!0;p=Le;break}p="file"===a.scheme?Te:we;continue;case me:if("/"!==l||"/"!==o[v+1]){p=we;continue}p=Se;v++;break;case be:if("/"===l){p=ke;break}p=Oe;continue;case we:h.scheme=a.scheme;if(l===i){h.username=a.username;h.password=a.password;h.host=a.host;h.port=a.port;h.path=b(a.path);h.query=a.query}else if("/"===l||"\\"===l&&h.isSpecial())p=Pe;else if("?"===l){h.username=a.username;h.password=a.password;h.host=a.host;h.port=a.port;h.path=b(a.path);h.query="";p=Ge}else{if("#"!==l){h.username=a.username;h.password=a.password;h.host=a.host;h.port=a.port;h.path=b(a.path);h.path.length--;p=Oe;continue}h.username=a.username;h.password=a.password;h.host=a.host;h.port=a.port;h.path=b(a.path);h.query=a.query;h.fragment="";p=Le}break;case Pe:if(!h.isSpecial()||"/"!==l&&"\\"!==l){if("/"!==l){h.username=a.username;h.password=a.password;h.host=a.host;h.port=a.port;p=Oe;continue}p=ke}else p=Se;break;case Ae:p=Se;if("/"!==l||"/"!==j(y,v+1))continue;v++;break;case Se:if("/"!==l&&"\\"!==l){p=ke;continue}break;case ke:if("@"===l){g&&(y="%40"+y);g=!0;c=m(y);for(var S=0;S<c.length;S++){var k=c[S];if(":"!==k||P){var x=percentEncode(k,pe);P?h.password+=x:h.username+=x}else P=!0}y=""}else if(l===i||"/"===l||"?"===l||"#"===l||"\\"===l&&h.isSpecial()){if(g&&""===y)return"Invalid authority";v-=m(y).length+1;y="";p=Fe}else y+=l;break;case Fe:case xe:if(r&&"file"===h.scheme){p=Ie;continue}if(":"!==l||w){if(l===i||"/"===l||"?"===l||"#"===l||"\\"===l&&h.isSpecial()){if(h.isSpecial()&&""===y)return $;if(r&&""===y&&(h.includesCredentials()||null!==h.port))return;if(u=h.parseHost(y))return u;y="";p=Me;if(r)return;continue}"["===l?w=!0:"]"===l&&(w=!1);y+=l}else{if(""===y)return $;if(u=h.parseHost(y))return u;y="";p=Ee;if(r===xe)return}break;case Ee:if(!N(te,l)){if(l===i||"/"===l||"?"===l||"#"===l||"\\"===l&&h.isSpecial()||r){if(""!==y){var E=G(y,10);if(E>65535)return Q;h.port=h.isSpecial()&&E===ve[h.scheme]?null:E;y=""}if(r)return;p=Me;continue}return Q}y+=l;break;case Te:h.scheme="file";if("/"===l||"\\"===l)p=Ce;else{if(!a||"file"!==a.scheme){p=Oe;continue}switch(l){case i:h.host=a.host;h.path=b(a.path);h.query=a.query;break;case"?":h.host=a.host;h.path=b(a.path);h.query="";p=Ge;break;case"#":h.host=a.host;h.path=b(a.path);h.query=a.query;h.fragment="";p=Le;break;default:if(!startsWithWindowsDriveLetter(W(b(o,v),""))){h.host=a.host;h.path=b(a.path);h.shortenPath()}p=Oe;continue}}break;case Ce:if("/"===l||"\\"===l){p=Ie;break}a&&"file"===a.scheme&&!startsWithWindowsDriveLetter(W(b(o,v),""))&&(isWindowsDriveLetter(a.path[0],!0)?H(h.path,a.path[0]):h.host=a.host);p=Oe;continue;case Ie:if(l===i||"/"===l||"\\"===l||"?"===l||"#"===l){if(!r&&isWindowsDriveLetter(y))p=Oe;else if(""===y){h.host="";if(r)return;p=Me}else{if(u=h.parseHost(y))return u;"localhost"===h.host&&(h.host="");if(r)return;y="";p=Me}continue}y+=l;break;case Me:if(h.isSpecial()){p=Oe;if("/"!==l&&"\\"!==l)continue}else if(r||"?"!==l)if(r||"#"!==l){if(l!==i){p=Oe;if("/"!==l)continue}}else{h.fragment="";p=Le}else{h.query="";p=Ge}break;case Oe:if(l===i||"/"===l||"\\"===l&&h.isSpecial()||!r&&("?"===l||"#"===l)){if(".."===(d=Y(d=y))||"%2e."===d||".%2e"===d||"%2e%2e"===d){h.shortenPath();"/"===l||"\\"===l&&h.isSpecial()||H(h.path,"")}else if(isSingleDot(y))"/"===l||"\\"===l&&h.isSpecial()||H(h.path,"");else{if("file"===h.scheme&&!h.path.length&&isWindowsDriveLetter(y)){h.host&&(h.host="");y=j(y,0)+":"}H(h.path,y)}y="";if("file"===h.scheme&&(l===i||"?"===l||"#"===l))for(;h.path.length>1&&""===h.path[0];)q(h.path);if("?"===l){h.query="";p=Ge}else if("#"===l){h.fragment="";p=Le}}else y+=percentEncode(l,fe);break;case Re:if("?"===l){h.query="";p=Ge}else if("#"===l){h.fragment="";p=Le}else l!==i&&(h.path[0]+=percentEncode(l,de));break;case Ge:if(r||"#"!==l)l!==i&&("'"===l&&h.isSpecial()?h.query+="%27":h.query+="#"===l?"%23":percentEncode(l,de));else{h.fragment="";p=Le}break;case Le:l!==i&&(h.fragment+=percentEncode(l,he))}v++}},parseHost:function(t){var r,a,i;if("["===j(t,0)){if("]"!==j(t,t.length-1))return $;r=function(t){var r,a,i,o,l,c,u,d=[0,0,0,0,0,0,0,0],h=0,p=null,v=0,chr=function(){return j(t,v)};if(":"===chr()){if(":"!==j(t,1))return;v+=2;p=++h}for(;chr();){if(8===h)return;if(":"!==chr()){r=a=0;for(;a<4&&N(ie,chr());){r=16*r+G(chr(),16);v++;a++}if("."===chr()){if(0===a)return;v-=a;if(h>6)return;i=0;for(;chr();){o=null;if(i>0){if(!("."===chr()&&i<4))return;v++}if(!N(te,chr()))return;for(;N(te,chr());){l=G(chr(),10);if(null===o)o=l;else{if(0===o)return;o=10*o+l}if(o>255)return;v++}d[h]=256*d[h]+o;2!=++i&&4!==i||h++}if(4!==i)return;break}if(":"===chr()){v++;if(!chr())return}else if(chr())return;d[h++]=r}else{if(null!==p)return;v++;p=++h}}if(null!==p){c=h-p;h=7;for(;0!==h&&c>0;){u=d[h];d[h--]=d[p+c-1];d[p+--c]=u}}else if(8!==h)return;return d}(X(t,1,-1));if(!r)return $;this.host=r}else if(this.isSpecial()){t=P(t);if(N(oe,t))return $;r=function(t){var r,a,i,o,l,c,u,d=V(t,".");d.length&&""===d[d.length-1]&&d.length--;if((r=d.length)>4)return t;a=[];for(i=0;i<r;i++){if(""===(o=d[i]))return t;l=10;if(o.length>1&&"0"===j(o,0)){l=N(re,o)?16:8;o=X(o,8===l?1:2)}if(""===o)c=0;else{if(!N(10===l?ae:8===l?ne:ie,o))return t;c=G(o,l)}H(a,c)}for(i=0;i<r;i++){c=a[i];if(i===r-1){if(c>=D(256,5-r))return null}else if(c>255)return null}u=U(a);for(i=0;i<a.length;i++)u+=a[i]*D(256,3-i);return u}(t);if(null===r)return $;this.host=r}else{if(N(se,t))return $;r="";a=m(t);for(i=0;i<a.length;i++)r+=percentEncode(a[i],de);this.host=r}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return _(ve,this.scheme)},shortenPath:function(){var t=this.path,r=t.length;!r||"file"===this.scheme&&1===r&&isWindowsDriveLetter(t[0],!0)||t.length--},serialize:function(){var t=this,r=t.scheme,a=t.username,i=t.password,o=t.host,l=t.port,c=t.path,u=t.query,d=t.fragment,h=r+":";if(null!==o){h+="//";t.includesCredentials()&&(h+=a+(i?":"+i:"")+"@");h+=serializeHost(o);null!==l&&(h+=":"+l)}else"file"===r&&(h+="//");h+=t.cannotBeABaseURL?c[0]:c.length?"/"+W(c,"/"):"";null!==u&&(h+="?"+u);null!==d&&(h+="#"+d);return h},setHref:function(t){var r=this.parse(t);if(r)throw R(r);this.searchParams.update()},getOrigin:function(){var t=this.scheme,r=this.port;if("blob"===t)try{return new De(t.path[0]).origin}catch(t){return"null"}return"file"!==t&&this.isSpecial()?t+"://"+serializeHost(this.host)+(null!==r?":"+r:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(A(t)+":",ye)},getUsername:function(){return this.username},setUsername:function(t){var r=m(A(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var a=0;a<r.length;a++)this.username+=percentEncode(r[a],pe)}},getPassword:function(){return this.password},setPassword:function(t){var r=m(A(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var a=0;a<r.length;a++)this.password+=percentEncode(r[a],pe)}},getHost:function(){var t=this.host,r=this.port;return null===t?"":null===r?serializeHost(t):serializeHost(t)+":"+r},setHost:function(t){this.cannotBeABaseURL||this.parse(t,Fe)},getHostname:function(){var t=this.host;return null===t?"":serializeHost(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,xe)},getPort:function(){var t=this.port;return null===t?"":A(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""===(t=A(t))?this.port=null:this.parse(t,Ee))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+W(t,"/"):""},setPathname:function(t){if(!this.cannotBeABaseURL){this.path=[];this.parse(t,Me)}},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){if(""===(t=A(t)))this.query=null;else{"?"===j(t,0)&&(t=X(t,1));this.query="";this.parse(t,Ge)}this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){if(""!==(t=A(t))){"#"===j(t,0)&&(t=X(t,1));this.fragment="";this.parse(t,Le)}else this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var De=function URL(t){var r=y(this,je),a=k(arguments.length,1)>1?arguments[1]:void 0,i=T(r,new URLState(t,!1,a));if(!l){r.href=i.serialize();r.origin=i.getOrigin();r.protocol=i.getProtocol();r.username=i.getUsername();r.password=i.getPassword();r.host=i.getHost();r.hostname=i.getHostname();r.port=i.getPort();r.pathname=i.getPathname();r.search=i.getSearch();r.searchParams=i.getSearchParams();r.hash=i.getHash()}},je=De.prototype,accessorDescriptor=function(t,r){return{get:function(){return C(this)[t]()},set:r&&function(t){return C(this)[r](t)},configurable:!0,enumerable:!0}};if(l){v(je,"href",accessorDescriptor("serialize","setHref"));v(je,"origin",accessorDescriptor("getOrigin"));v(je,"protocol",accessorDescriptor("getProtocol","setProtocol"));v(je,"username",accessorDescriptor("getUsername","setUsername"));v(je,"password",accessorDescriptor("getPassword","setPassword"));v(je,"host",accessorDescriptor("getHost","setHost"));v(je,"hostname",accessorDescriptor("getHostname","setHostname"));v(je,"port",accessorDescriptor("getPort","setPort"));v(je,"pathname",accessorDescriptor("getPathname","setPathname"));v(je,"search",accessorDescriptor("getSearch","setSearch"));v(je,"searchParams",accessorDescriptor("getSearchParams"));v(je,"hash",accessorDescriptor("getHash","setHash"))}p(je,"toJSON",(function toJSON(){return C(this).serialize()}),{enumerable:!0});p(je,"toString",(function toString(){return C(this).serialize()}),{enumerable:!0});if(O){var Ne=O.createObjectURL,We=O.revokeObjectURL;Ne&&p(De,"createObjectURL",d(Ne,O));We&&p(De,"revokeObjectURL",d(We,O))}S(De,"URL");o({global:!0,constructor:!0,forced:!c,sham:!l},{URL:De})},(t,r,a)=>{var i=a(7),o=a(34),l=a(6),c=a(36),u=o("iterator");t.exports=!i((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),r=t.searchParams,a=new URLSearchParams("a=1&a=2&b=3"),i="";t.pathname="c%20d";r.forEach((function(t,a){r.delete("b");i+=a+t}));a.delete("a",2);a.delete("b",void 0);return c&&(!t.toJSON||!a.has("a",1)||a.has("a",2)||!a.has("a",void 0)||a.has("b"))||!r.size&&(c||!l)||!r.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==r.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!r[u]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==i||"x"!==new URL("http://x",void 0).host}))},(t,r,a)=>{var i=a(25),o=TypeError;t.exports=function(t,r){if(i(r,t))return t;throw o("Incorrect invocation")}},(t,r,a)=>{var i=a(6),o=a(14),l=a(8),c=a(7),u=a(83),d=a(67),h=a(10),p=a(40),v=a(13),y=Object.assign,_=Object.defineProperty,g=o([].concat);t.exports=!y||c((function(){if(i&&1!==y({b:1},y(_({},"a",{enumerable:!0,get:function(){_(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},r={},a=Symbol("assign detection"),o="abcdefghijklmnopqrst";t[a]=7;o.split("").forEach((function(t){r[t]=t}));return 7!==y({},t)[a]||u(y({},r)).join("")!==o}))?function assign(t,r){for(var a=p(t),o=arguments.length,c=1,y=d.f,_=h.f;o>c;)for(var m,b=v(arguments[c++]),w=y?g(u(b),y(b)):u(b),P=w.length,A=0;P>A;){m=w[A++];i&&!l(_,b,m)||(a[m]=b[m])}return a}:y},(t,r,a)=>{var i=a(61),o=a(64),l=a(100),c=Array,u=Math.max;t.exports=function(t,r,a){for(var d=o(t),h=i(r,d),p=i(void 0===a?d:a,d),v=c(u(p-h,0)),y=0;h<p;h++,y++)l(v,y,t[h]);v.length=y;return v}},(t,r,a)=>{var i=a(14),o=2147483647,l=/[^\0-\u007E]/,c=/[.\u3002\uFF0E\uFF61]/g,u="Overflow: input needs wider integers to process",d=RangeError,h=i(c.exec),p=Math.floor,v=String.fromCharCode,y=i("".charCodeAt),_=i([].join),g=i([].push),m=i("".replace),b=i("".split),w=i("".toLowerCase),digitToBasic=function(t){return t+22+75*(t<26)},adapt=function(t,r,a){var i=0;t=a?p(t/700):t>>1;t+=p(t/r);for(;t>455;){t=p(t/35);i+=36}return p(i+36*t/(t+38))},encode=function(t){var r=[];t=function(t){for(var r=[],a=0,i=t.length;a<i;){var o=y(t,a++);if(o>=55296&&o<=56319&&a<i){var l=y(t,a++);if(56320==(64512&l))g(r,((1023&o)<<10)+(1023&l)+65536);else{g(r,o);a--}}else g(r,o)}return r}(t);var a,i,l=t.length,c=128,h=0,m=72;for(a=0;a<t.length;a++)(i=t[a])<128&&g(r,v(i));var b=r.length,w=b;b&&g(r,"-");for(;w<l;){var P=o;for(a=0;a<t.length;a++)(i=t[a])>=c&&i<P&&(P=i);var A=w+1;if(P-c>p((o-h)/A))throw d(u);h+=(P-c)*A;c=P;for(a=0;a<t.length;a++){if((i=t[a])<c&&++h>o)throw d(u);if(i===c){for(var S=h,k=36;;){var x=k<=m?1:k>=m+26?26:k-m;if(S<x)break;var E=S-x,T=36-x;g(r,v(digitToBasic(x+E%T)));S=p(E/T);k+=36}g(r,v(digitToBasic(S)));m=adapt(h,A,w===b);h=0;w++}}h++;c++}return _(r,"")};t.exports=function(t){var r,a,i=[],o=b(m(w(t),c,"."),".");for(r=0;r<o.length;r++){a=o[r];g(i,h(l,a)?"xn--"+encode(a):a)}return _(i,".")}},t=>{var r=TypeError;t.exports=function(t,a){if(t<a)throw r("Not enough arguments");return t}},(t,r,a)=>{a(140);var i=a(3),o=a(4),l=a(8),c=a(14),u=a(6),d=a(154),h=a(48),p=a(121),v=a(161),y=a(72),_=a(143),g=a(52),m=a(155),b=a(21),w=a(39),P=a(94),A=a(79),S=a(47),k=a(20),x=a(107),E=a(81),T=a(11),C=a(101),I=a(102),M=a(159),O=a(34),R=a(162),G=O("iterator"),L="URLSearchParams",D=L+"Iterator",j=g.set,N=g.getterFor(L),W=g.getterFor(D),B=Object.getOwnPropertyDescriptor,safeGetBuiltIn=function(t){if(!u)return o[t];var r=B(o,t);return r&&r.value},U=safeGetBuiltIn("fetch"),H=safeGetBuiltIn("Request"),z=safeGetBuiltIn("Headers"),q=H&&H.prototype,V=z&&z.prototype,X=o.RegExp,Y=o.TypeError,K=o.decodeURIComponent,J=o.encodeURIComponent,$=c("".charAt),Q=c([].join),Z=c([].push),ee=c("".replace),te=c([].shift),re=c([].splice),ne=c("".split),ae=c("".slice),ie=/\+/g,oe=Array(4),percentSequence=function(t){return oe[t-1]||(oe[t-1]=X("((?:%[\\da-f]{2}){"+t+"})","gi"))},percentDecode=function(t){try{return K(t)}catch(r){return t}},deserialize=function(t){var r=ee(t,ie," "),a=4;try{return K(r)}catch(t){for(;a;)r=ee(r,percentSequence(a--),percentDecode);return r}},se=/[!'()~]|%20/g,le={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(t){return le[t]},serialize=function(t){return ee(J(t),se,replacer)},ce=_((function Iterator(t,r){j(this,{type:D,iterator:C(N(t).entries),kind:r})}),"Iterator",(function next(){var t=W(this),r=t.kind,a=t.iterator.next(),i=a.value;a.done||(a.value="keys"===r?i.key:"values"===r?i.value:[i.key,i.value]);return a}),!0),URLSearchParamsState=function(t){this.entries=[];this.url=null;void 0!==t&&(k(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===$(t,0)?ae(t,1):t:x(t)))};URLSearchParamsState.prototype={type:L,bindURL:function(t){this.url=t;this.update()},parseObject:function(t){var r,a,i,o,c,u,d,h=I(t);if(h){a=(r=C(t,h)).next;for(;!(i=l(a,r)).done;){c=(o=C(S(i.value))).next;if((u=l(c,o)).done||(d=l(c,o)).done||!l(c,o).done)throw Y("Expected sequence with length 2");Z(this.entries,{key:x(u.value),value:x(d.value)})}}else for(var p in t)w(t,p)&&Z(this.entries,{key:p,value:x(t[p])})},parseQuery:function(t){if(t)for(var r,a,i=ne(t,"&"),o=0;o<i.length;)if((r=i[o++]).length){a=ne(r,"=");Z(this.entries,{key:deserialize(te(a)),value:deserialize(Q(a,"="))})}},serialize:function(){for(var t,r=this.entries,a=[],i=0;i<r.length;){t=r[i++];Z(a,serialize(t.key)+"="+serialize(t.value))}return Q(a,"&")},update:function(){this.entries.length=0;this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ue=function URLSearchParams(){m(this,de);var t=j(this,new URLSearchParamsState(arguments.length>0?arguments[0]:void 0));u||(this.size=t.entries.length)},de=ue.prototype;v(de,{append:function append(t,r){var a=N(this);M(arguments.length,2);Z(a.entries,{key:x(t),value:x(r)});u||this.length++;a.updateURL()},delete:function(t){for(var r=N(this),a=M(arguments.length,1),i=r.entries,o=x(t),l=a<2?void 0:arguments[1],c=void 0===l?l:x(l),d=0;d<i.length;){var h=i[d];if(h.key!==o||void 0!==c&&h.value!==c)d++;else{re(i,d,1);if(void 0!==c)break}}u||(this.size=i.length);r.updateURL()},get:function get(t){var r=N(this).entries;M(arguments.length,1);for(var a=x(t),i=0;i<r.length;i++)if(r[i].key===a)return r[i].value;return null},getAll:function getAll(t){var r=N(this).entries;M(arguments.length,1);for(var a=x(t),i=[],o=0;o<r.length;o++)r[o].key===a&&Z(i,r[o].value);return i},has:function has(t){for(var r=N(this).entries,a=M(arguments.length,1),i=x(t),o=a<2?void 0:arguments[1],l=void 0===o?o:x(o),c=0;c<r.length;){var u=r[c++];if(u.key===i&&(void 0===l||u.value===l))return!0}return!1},set:function set(t,r){var a=N(this);M(arguments.length,1);for(var i,o=a.entries,l=!1,c=x(t),d=x(r),h=0;h<o.length;h++)if((i=o[h]).key===c)if(l)re(o,h--,1);else{l=!0;i.value=d}l||Z(o,{key:c,value:d});u||(this.size=o.length);a.updateURL()},sort:function sort(){var t=N(this);R(t.entries,(function(t,r){return t.key>r.key?1:-1}));t.updateURL()},forEach:function forEach(t){for(var r,a=N(this).entries,i=P(t,arguments.length>1?arguments[1]:void 0),o=0;o<a.length;)i((r=a[o++]).value,r.key,this)},keys:function keys(){return new ce(this,"keys")},values:function values(){return new ce(this,"values")},entries:function entries(){return new ce(this,"entries")}},{enumerable:!0});h(de,G,de.entries,{name:"entries"});h(de,"toString",(function toString(){return N(this).serialize()}),{enumerable:!0});u&&p(de,"size",{get:function size(){return N(this).entries.length},configurable:!0,enumerable:!0});y(ue,L);i({global:!0,constructor:!0,forced:!d},{URLSearchParams:ue});if(!d&&b(z)){var he=c(V.has),fe=c(V.set),wrapRequestOptions=function(t){if(k(t)){var r,a=t.body;if(A(a)===L){r=t.headers?new z(t.headers):new z;he(r,"content-type")||fe(r,"content-type","application/x-www-form-urlencoded;charset=UTF-8");return E(t,{body:T(0,x(a)),headers:T(0,r)})}}return t};b(U)&&i({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function fetch(t){return U(t,arguments.length>1?wrapRequestOptions(arguments[1]):{})}});if(b(H)){var pe=function Request(t){m(this,q);return new H(t,arguments.length>1?wrapRequestOptions(arguments[1]):{})};q.constructor=pe;pe.prototype=q;i({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:pe})}}t.exports={URLSearchParams:ue,getState:N}},(t,r,a)=>{var i=a(48);t.exports=function(t,r,a){for(var o in r)i(t,o,r[o],a);return t}},(t,r,a)=>{var i=a(157),o=Math.floor,mergeSort=function(t,r){var a=t.length,l=o(a/2);return a<8?insertionSort(t,r):merge(t,mergeSort(i(t,0,l),r),mergeSort(i(t,l),r),r)},insertionSort=function(t,r){for(var a,i,o=t.length,l=1;l<o;){i=l;a=t[l];for(;i&&r(t[i-1],a)>0;)t[i]=t[--i];i!==l++&&(t[i]=a)}return t},merge=function(t,r,a,i){for(var o=r.length,l=a.length,c=0,u=0;c<o||u<l;)t[c+u]=c<o&&u<l?i(r[c],a[u])<=0?r[c++]:a[u++]:c<o?r[c++]:a[u++];return t};t.exports=mergeSort},(t,r,a)=>{a(160)},(t,r,a)=>{var i=a(48),o=a(14),l=a(107),c=a(159),u=URLSearchParams,d=u.prototype,h=o(d.append),p=o(d.delete),v=o(d.forEach),y=o([].push),_=new u("a=1&a=2&b=3");_.delete("a",1);_.delete("b",void 0);_+""!="a=2"&&i(d,"delete",(function(t){var r=arguments.length,a=r<2?void 0:arguments[1];if(r&&void 0===a)return p(this,t);var i=[];v(this,(function(t,r){y(i,{key:r,value:t})}));c(r,1);for(var o,u=l(t),d=l(a),_=0,g=0,m=!1,b=i.length;_<b;){o=i[_++];if(m||o.key===u){m=!0;p(this,o.key)}else g++}for(;g<b;)(o=i[g++]).key===u&&o.value===d||h(this,o.key,o.value)}),{enumerable:!0,unsafe:!0})},(t,r,a)=>{var i=a(48),o=a(14),l=a(107),c=a(159),u=URLSearchParams,d=u.prototype,h=o(d.getAll),p=o(d.has),v=new u("a=1");!v.has("a",2)&&v.has("a",void 0)||i(d,"has",(function has(t){var r=arguments.length,a=r<2?void 0:arguments[1];if(r&&void 0===a)return p(this,t);var i=h(this,t);c(r,1);for(var o=l(a),u=0;u<i.length;)if(i[u++]===o)return!0;return!1}),{enumerable:!0,unsafe:!0})},(t,r,a)=>{var i=a(6),o=a(14),l=a(121),c=URLSearchParams.prototype,u=o(c.forEach);i&&!("size"in c)&&l(c,"size",{get:function size(){var t=0;u(this,(function(){t++}));return t},configurable:!0,enumerable:!0})},(t,r,a)=>{var i=a(3),o=a(40),l=a(64),c=a(168),u=a(170);i({target:"Array",proto:!0,arity:1,forced:a(7)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function push(t){var r=o(this),a=l(r),i=arguments.length;u(a+i);for(var d=0;d<i;d++){r[a]=arguments[d];a++}c(r,a);return a}})},(t,r,a)=>{var i=a(6),o=a(169),l=TypeError,c=Object.getOwnPropertyDescriptor,u=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=u?function(t,r){if(o(t)&&!c(t,"length").writable)throw l("Cannot set read only .length");return t.length=r}:function(t,r){return t.length=r}},(t,r,a)=>{var i=a(15);t.exports=Array.isArray||function isArray(t){return"Array"===i(t)}},t=>{var r=TypeError;t.exports=function(t){if(t>9007199254740991)throw r("Maximum allowed index exceeded");return t}},(t,r,a)=>{a(172)("Uint8",(function(t){return function Uint8Array(r,a,i){return t(this,r,a,i)}}))},(t,r,a)=>{var i=a(3),o=a(4),l=a(8),c=a(6),u=a(173),d=a(174),h=a(176),p=a(155),v=a(11),y=a(44),_=a(181),g=a(65),m=a(177),b=a(182),w=a(184),P=a(18),A=a(39),S=a(79),k=a(20),x=a(23),E=a(81),T=a(25),C=a(114),I=a(58).f,M=a(185),O=a(188).forEach,R=a(191),G=a(121),L=a(45),D=a(5),j=a(52),N=a(113),W=j.get,B=j.set,U=j.enforce,H=L.f,z=D.f,q=o.RangeError,V=h.ArrayBuffer,X=V.prototype,Y=h.DataView,K=d.NATIVE_ARRAY_BUFFER_VIEWS,J=d.TYPED_ARRAY_TAG,$=d.TypedArray,Q=d.TypedArrayPrototype,Z=d.aTypedArrayConstructor,ee=d.isTypedArray,te="BYTES_PER_ELEMENT",re="Wrong length",fromList=function(t,r){Z(t);for(var a=0,i=r.length,o=new t(i);i>a;)o[a]=r[a++];return o},addGetter=function(t,r){G(t,r,{configurable:!0,get:function(){return W(this)[r]}})},isArrayBuffer=function(t){var r;return T(X,t)||"ArrayBuffer"===(r=S(t))||"SharedArrayBuffer"===r},isTypedArrayIndex=function(t,r){return ee(t)&&!x(r)&&r in t&&_(+r)&&r>=0},ne=function getOwnPropertyDescriptor(t,r){r=P(r);return isTypedArrayIndex(t,r)?v(2,t[r]):z(t,r)},ae=function defineProperty(t,r,a){r=P(r);if(isTypedArrayIndex(t,r)&&k(a)&&A(a,"value")&&!A(a,"get")&&!A(a,"set")&&!a.configurable&&(!A(a,"writable")||a.writable)&&(!A(a,"enumerable")||a.enumerable)){t[r]=a.value;return t}return H(t,r,a)};if(c){if(!K){D.f=ne;L.f=ae;addGetter(Q,"buffer");addGetter(Q,"byteOffset");addGetter(Q,"byteLength");addGetter(Q,"length")}i({target:"Object",stat:!0,forced:!K},{getOwnPropertyDescriptor:ne,defineProperty:ae});t.exports=function(t,r,a){var c=t.match(/\d+/)[0]/8,d=t+(a?"Clamped":"")+"Array",h="get"+t,v="set"+t,_=o[d],P=_,A=P&&P.prototype,S={},addElement=function(t,r){H(t,r,{get:function(){return function(t,r){var a=W(t);return a.view[h](r*c+a.byteOffset,!0)}(this,r)},set:function(t){return function(t,r,i){var o=W(t);o.view[v](r*c+o.byteOffset,a?w(i):i,!0)}(this,r,t)},enumerable:!0})};if(K){if(u){P=r((function(t,r,a,i){p(t,A);return N(k(r)?isArrayBuffer(r)?void 0!==i?new _(r,b(a,c),i):void 0!==a?new _(r,b(a,c)):new _(r):ee(r)?fromList(P,r):l(M,P,r):new _(m(r)),t,P)}));C&&C(P,$);O(I(_),(function(t){t in P||y(P,t,_[t])}));P.prototype=A}}else{P=r((function(t,r,a,i){p(t,A);var o,u,d,h=0,v=0;if(k(r)){if(!isArrayBuffer(r))return ee(r)?fromList(P,r):l(M,P,r);o=r;v=b(a,c);var y=r.byteLength;if(void 0===i){if(y%c)throw q(re);if((u=y-v)<0)throw q(re)}else if((u=g(i)*c)+v>y)throw q(re);d=u/c}else{d=m(r);o=new V(u=d*c)}B(t,{buffer:o,byteOffset:v,byteLength:u,length:d,view:new Y(o)});for(;h<d;)addElement(t,h++)}));C&&C(P,$);A=P.prototype=E(Q)}A.constructor!==P&&y(A,"constructor",P);U(A).TypedArrayConstructor=P;J&&y(A,J,d);var x=P!==_;S[d]=P;i({global:!0,constructor:!0,forced:x,sham:!K},S);te in P||y(P,te,c);te in A||y(A,te,c);R(d)}}else t.exports=function(){}},(t,r,a)=>{var i=a(4),o=a(7),l=a(103),c=a(174).NATIVE_ARRAY_BUFFER_VIEWS,u=i.ArrayBuffer,d=i.Int8Array;t.exports=!c||!o((function(){d(1)}))||!o((function(){new d(-1)}))||!l((function(t){new d;new d(null);new d(1.5);new d(t)}),!0)||o((function(){return 1!==new d(new u(2),1,void 0).length}))},(t,r,a)=>{var i,o,l,c=a(175),u=a(6),d=a(4),h=a(21),p=a(20),v=a(39),y=a(79),_=a(32),g=a(44),m=a(48),b=a(121),w=a(25),P=a(69),A=a(114),S=a(34),k=a(41),x=a(52),E=x.enforce,T=x.get,C=d.Int8Array,I=C&&C.prototype,M=d.Uint8ClampedArray,O=M&&M.prototype,R=C&&P(C),G=I&&P(I),L=Object.prototype,D=d.TypeError,j=S("toStringTag"),N=k("TYPED_ARRAY_TAG"),W="TypedArrayConstructor",B=c&&!!A&&"Opera"!==y(d.opera),U=!1,H={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},z={BigInt64Array:8,BigUint64Array:8},getTypedArrayConstructor=function(t){var r=P(t);if(p(r)){var a=T(r);return a&&v(a,W)?a[W]:getTypedArrayConstructor(r)}},isTypedArray=function(t){if(!p(t))return!1;var r=y(t);return v(H,r)||v(z,r)};for(i in H)(l=(o=d[i])&&o.prototype)?E(l)[W]=o:B=!1;for(i in z)(l=(o=d[i])&&o.prototype)&&(E(l)[W]=o);if(!B||!h(R)||R===Function.prototype){R=function TypedArray(){throw D("Incorrect invocation")};if(B)for(i in H)d[i]&&A(d[i],R)}if(!B||!G||G===L){G=R.prototype;if(B)for(i in H)d[i]&&A(d[i].prototype,G)}B&&P(O)!==G&&A(O,G);if(u&&!v(G,j)){U=!0;b(G,j,{configurable:!0,get:function(){return p(this)?this[N]:void 0}});for(i in H)d[i]&&g(d[i],N,i)}t.exports={NATIVE_ARRAY_BUFFER_VIEWS:B,TYPED_ARRAY_TAG:U&&N,aTypedArray:function(t){if(isTypedArray(t))return t;throw D("Target is not a typed array")},aTypedArrayConstructor:function(t){if(h(t)&&(!A||w(R,t)))return t;throw D(_(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,r,a,i){if(u){if(a)for(var o in H){var l=d[o];if(l&&v(l.prototype,t))try{delete l.prototype[t]}catch(a){try{l.prototype[t]=r}catch(t){}}}G[t]&&!a||m(G,t,a?r:B&&I[t]||r,i)}},exportTypedArrayStaticMethod:function(t,r,a){var i,o;if(u){if(A){if(a)for(i in H)if((o=d[i])&&v(o,t))try{delete o[t]}catch(t){}if(R[t]&&!a)return;try{return m(R,t,a?r:B&&R[t]||r)}catch(t){}}for(i in H)!(o=d[i])||o[t]&&!a||m(o,t,r)}},getTypedArrayConstructor:getTypedArrayConstructor,isView:function isView(t){if(!p(t))return!1;var r=y(t);return"DataView"===r||v(H,r)||v(z,r)},isTypedArray:isTypedArray,TypedArray:R,TypedArrayPrototype:G}},t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},(t,r,a)=>{var i=a(4),o=a(14),l=a(6),c=a(175),u=a(50),d=a(44),h=a(121),p=a(161),v=a(7),y=a(155),_=a(62),g=a(65),m=a(177),b=a(178),w=a(69),P=a(114),A=a(58).f,S=a(180),k=a(157),x=a(72),E=a(52),T=u.PROPER,C=u.CONFIGURABLE,I="ArrayBuffer",M="DataView",O="prototype",R="Wrong index",G=E.getterFor(I),L=E.getterFor(M),D=E.set,j=i[I],N=j,W=N&&N[O],B=i[M],U=B&&B[O],H=Object.prototype,z=i.Array,q=i.RangeError,V=o(S),X=o([].reverse),Y=b.pack,K=b.unpack,packInt8=function(t){return[255&t]},packInt16=function(t){return[255&t,t>>8&255]},packInt32=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},unpackInt32=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},packFloat32=function(t){return Y(t,23,4)},packFloat64=function(t){return Y(t,52,8)},addGetter=function(t,r,a){h(t[O],r,{configurable:!0,get:function(){return a(this)[r]}})},get=function(t,r,a,i){var o=L(t),l=m(a),c=!!i;if(l+r>o.byteLength)throw q(R);var u=o.bytes,d=l+o.byteOffset,h=k(u,d,d+r);return c?h:X(h)},set=function(t,r,a,i,o,l){var c=L(t),u=m(a),d=i(+o),h=!!l;if(u+r>c.byteLength)throw q(R);for(var p=c.bytes,v=u+c.byteOffset,y=0;y<r;y++)p[v+y]=d[h?y:r-y-1]};if(c){var J=T&&j.name!==I;if(v((function(){j(1)}))&&v((function(){new j(-1)}))&&!v((function(){new j;new j(1.5);new j(NaN);return 1!==j.length||J&&!C})))J&&C&&d(j,"name",I);else{(N=function ArrayBuffer(t){y(this,W);return new j(m(t))})[O]=W;for(var $,Q=A(j),Z=0;Q.length>Z;)($=Q[Z++])in N||d(N,$,j[$]);W.constructor=N}P&&w(U)!==H&&P(U,H);var ee=new B(new N(2)),te=o(U.setInt8);ee.setInt8(0,2147483648);ee.setInt8(1,2147483649);!ee.getInt8(0)&&ee.getInt8(1)||p(U,{setInt8:function setInt8(t,r){te(this,t,r<<24>>24)},setUint8:function setUint8(t,r){te(this,t,r<<24>>24)}},{unsafe:!0})}else{W=(N=function ArrayBuffer(t){y(this,W);var r=m(t);D(this,{type:I,bytes:V(z(r),0),byteLength:r});if(!l){this.byteLength=r;this.detached=!1}})[O];U=(B=function DataView(t,r,a){y(this,U);y(t,W);var i=G(t),o=i.byteLength,c=_(r);if(c<0||c>o)throw q("Wrong offset");if(c+(a=void 0===a?o-c:g(a))>o)throw q("Wrong length");D(this,{type:M,buffer:t,byteLength:a,byteOffset:c,bytes:i.bytes});if(!l){this.buffer=t;this.byteLength=a;this.byteOffset=c}})[O];if(l){addGetter(N,"byteLength",G);addGetter(B,"buffer",L);addGetter(B,"byteLength",L);addGetter(B,"byteOffset",L)}p(U,{getInt8:function getInt8(t){return get(this,1,t)[0]<<24>>24},getUint8:function getUint8(t){return get(this,1,t)[0]},getInt16:function getInt16(t){var r=get(this,2,t,arguments.length>1&&arguments[1]);return(r[1]<<8|r[0])<<16>>16},getUint16:function getUint16(t){var r=get(this,2,t,arguments.length>1&&arguments[1]);return r[1]<<8|r[0]},getInt32:function getInt32(t){return unpackInt32(get(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function getUint32(t){return unpackInt32(get(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function getFloat32(t){return K(get(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function getFloat64(t){return K(get(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function setInt8(t,r){set(this,1,t,packInt8,r)},setUint8:function setUint8(t,r){set(this,1,t,packInt8,r)},setInt16:function setInt16(t,r){set(this,2,t,packInt16,r,arguments.length>2&&arguments[2])},setUint16:function setUint16(t,r){set(this,2,t,packInt16,r,arguments.length>2&&arguments[2])},setInt32:function setInt32(t,r){set(this,4,t,packInt32,r,arguments.length>2&&arguments[2])},setUint32:function setUint32(t,r){set(this,4,t,packInt32,r,arguments.length>2&&arguments[2])},setFloat32:function setFloat32(t,r){set(this,4,t,packFloat32,r,arguments.length>2&&arguments[2])},setFloat64:function setFloat64(t,r){set(this,8,t,packFloat64,r,arguments.length>2&&arguments[2])}})}x(N,I);x(B,M);t.exports={ArrayBuffer:N,DataView:B}},(t,r,a)=>{var i=a(62),o=a(65),l=RangeError;t.exports=function(t){if(void 0===t)return 0;var r=i(t),a=o(r);if(r!==a)throw l("Wrong length or index");return a}},(t,r,a)=>{var i=a(179),o=a(63),l=Array,c=Math.abs,u=Math.pow,d=Math.floor,h=Math.log,p=Math.LN2,roundToEven=function(t){var r=o(t),a=c(t-r);return a>.5||.5===a&&r%2!=0?r+i(t):r};t.exports={pack:function(t,r,a){var i,o,v,y=l(a),_=8*a-r-1,g=(1<<_)-1,m=g>>1,b=23===r?u(2,-24)-u(2,-77):0,w=t<0||0===t&&1/t<0?1:0,P=0;if((t=c(t))!=t||t===1/0){o=t!=t?1:0;i=g}else{i=d(h(t)/p);if(t*(v=u(2,-i))<1){i--;v*=2}if((t+=i+m>=1?b/v:b*u(2,1-m))*v>=2){i++;v/=2}if(i+m>=g){o=0;i=g}else if(i+m>=1){o=roundToEven((t*v-1)*u(2,r));i+=m}else{o=roundToEven(t*u(2,m-1)*u(2,r));i=0}}for(;r>=8;){y[P++]=255&o;o/=256;r-=8}i=i<<r|o;_+=r;for(;_>0;){y[P++]=255&i;i/=256;_-=8}y[--P]|=128*w;return y},unpack:function(t,r){var a,i=t.length,o=8*i-r-1,l=(1<<o)-1,c=l>>1,d=o-7,h=i-1,p=t[h--],v=127&p;p>>=7;for(;d>0;){v=256*v+t[h--];d-=8}a=v&(1<<-d)-1;v>>=-d;d+=r;for(;d>0;){a=256*a+t[h--];d-=8}if(0===v)v=1-c;else{if(v===l)return a?NaN:p?-1/0:1/0;a+=u(2,r);v-=c}return(p?-1:1)*a*u(2,v-r)}}},t=>{t.exports=Math.sign||function sign(t){var r=+t;return 0===r||r!=r?r:r<0?-1:1}},(t,r,a)=>{var i=a(40),o=a(61),l=a(64);t.exports=function fill(t){for(var r=i(this),a=l(r),c=arguments.length,u=o(c>1?arguments[1]:void 0,a),d=c>2?arguments[2]:void 0,h=void 0===d?a:o(d,a);h>u;)r[u++]=t;return r}},(t,r,a)=>{var i=a(20),o=Math.floor;t.exports=Number.isInteger||function isInteger(t){return!i(t)&&isFinite(t)&&o(t)===t}},(t,r,a)=>{var i=a(183),o=RangeError;t.exports=function(t,r){var a=i(t);if(a%r)throw o("Wrong offset");return a}},(t,r,a)=>{var i=a(62),o=RangeError;t.exports=function(t){var r=i(t);if(r<0)throw o("The argument can't be less than 0");return r}},t=>{var r=Math.round;t.exports=function(t){var a=r(t);return a<0?0:a>255?255:255&a}},(t,r,a)=>{var i=a(94),o=a(8),l=a(77),c=a(40),u=a(64),d=a(101),h=a(102),p=a(98),v=a(186),y=a(174).aTypedArrayConstructor,_=a(187);t.exports=function from(t){var r,a,g,m,b,w,P,A,S=l(this),k=c(t),x=arguments.length,E=x>1?arguments[1]:void 0,T=void 0!==E,C=h(k);if(C&&!p(C)){A=(P=d(k,C)).next;k=[];for(;!(w=o(A,P)).done;)k.push(w.value)}T&&x>2&&(E=i(E,arguments[2]));a=u(k);g=new(y(S))(a);m=v(g);for(r=0;a>r;r++){b=T?E(k[r],r):k[r];g[r]=m?_(b):+b}return g}},(t,r,a)=>{var i=a(79);t.exports=function(t){var r=i(t);return"BigInt64Array"===r||"BigUint64Array"===r}},(t,r,a)=>{var i=a(19),o=TypeError;t.exports=function(t){var r=i(t,"number");if("number"==typeof r)throw o("Can't convert number to bigint");return BigInt(r)}},(t,r,a)=>{var i=a(94),o=a(14),l=a(13),c=a(40),u=a(64),d=a(189),h=o([].push),createMethod=function(t){var r=1===t,a=2===t,o=3===t,p=4===t,v=6===t,y=7===t,_=5===t||v;return function(g,m,b,w){for(var P,A,S=c(g),k=l(S),x=i(m,b),E=u(k),T=0,C=w||d,I=r?C(g,E):a||y?C(g,0):void 0;E>T;T++)if(_||T in k){A=x(P=k[T],T,S);if(t)if(r)I[T]=A;else if(A)switch(t){case 3:return!0;case 5:return P;case 6:return T;case 2:h(I,P)}else switch(t){case 4:return!1;case 7:h(I,P)}}return v?-1:o||p?p:I}};t.exports={forEach:createMethod(0),map:createMethod(1),filter:createMethod(2),some:createMethod(3),every:createMethod(4),find:createMethod(5),findIndex:createMethod(6),filterReject:createMethod(7)}},(t,r,a)=>{var i=a(190);t.exports=function(t,r){return new(i(t))(0===r?0:r)}},(t,r,a)=>{var i=a(169),o=a(78),l=a(20),c=a(34)("species"),u=Array;t.exports=function(t){var r;if(i(t)){r=t.constructor;(o(r)&&(r===u||i(r.prototype))||l(r)&&null===(r=r[c]))&&(r=void 0)}return void 0===r?u:r}},(t,r,a)=>{var i=a(24),o=a(121),l=a(34),c=a(6),u=l("species");t.exports=function(t){var r=i(t);c&&r&&!r[u]&&o(r,u,{configurable:!0,get:function(){return this}})}},(t,r,a)=>{var i=a(174),o=a(64),l=a(62),c=i.aTypedArray;(0,i.exportTypedArrayMethod)("at",(function at(t){var r=c(this),a=o(r),i=l(t),u=i>=0?i:a+i;return u<0||u>=a?void 0:r[u]}))},(t,r,a)=>{var i=a(14),o=a(174),l=i(a(194)),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("copyWithin",(function copyWithin(t,r){return l(c(this),t,r,arguments.length>2?arguments[2]:void 0)}))},(t,r,a)=>{var i=a(40),o=a(61),l=a(64),c=a(195),u=Math.min;t.exports=[].copyWithin||function copyWithin(t,r){var a=i(this),d=l(a),h=o(t,d),p=o(r,d),v=arguments.length>2?arguments[2]:void 0,y=u((void 0===v?d:o(v,d))-p,d-h),_=1;if(p<h&&h<p+y){_=-1;p+=y-1;h+=y-1}for(;y-- >0;){p in a?a[h]=a[p]:c(a,h);h+=_;p+=_}return a}},(t,r,a)=>{var i=a(32),o=TypeError;t.exports=function(t,r){if(!delete t[r])throw o("Cannot delete property "+i(r)+" of "+i(t))}},(t,r,a)=>{var i=a(174),o=a(188).every,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("every",(function every(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,a)=>{var i=a(174),o=a(180),l=a(187),c=a(79),u=a(8),d=a(14),h=a(7),p=i.aTypedArray,v=i.exportTypedArrayMethod,y=d("".slice);v("fill",(function fill(t){var r=arguments.length;p(this);var a="Big"===y(c(this),0,3)?l(t):+t;return u(o,this,a,r>1?arguments[1]:void 0,r>2?arguments[2]:void 0)}),h((function(){var t=0;new Int8Array(2).fill({valueOf:function(){return t++}});return 1!==t})))},(t,r,a)=>{var i=a(174),o=a(188).filter,l=a(199),c=i.aTypedArray;(0,i.exportTypedArrayMethod)("filter",(function filter(t){var r=o(c(this),t,arguments.length>1?arguments[1]:void 0);return l(this,r)}))},(t,r,a)=>{var i=a(200),o=a(201);t.exports=function(t,r){return i(o(t),r)}},(t,r,a)=>{var i=a(64);t.exports=function(t,r){for(var a=0,o=i(r),l=new t(o);o>a;)l[a]=r[a++];return l}},(t,r,a)=>{var i=a(174),o=a(202),l=i.aTypedArrayConstructor,c=i.getTypedArrayConstructor;t.exports=function(t){return l(o(t,c(t)))}},(t,r,a)=>{var i=a(47),o=a(77),l=a(17),c=a(34)("species");t.exports=function(t,r){var a,u=i(t).constructor;return void 0===u||l(a=i(u)[c])?r:o(a)}},(t,r,a)=>{var i=a(174),o=a(188).find,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("find",(function find(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,a)=>{var i=a(174),o=a(188).findIndex,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("findIndex",(function findIndex(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,a)=>{var i=a(174),o=a(206).findLast,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("findLast",(function findLast(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,a)=>{var i=a(94),o=a(13),l=a(40),c=a(64),createMethod=function(t){var r=1===t;return function(a,u,d){for(var h,p=l(a),v=o(p),y=i(u,d),_=c(v);_-- >0;)if(y(h=v[_],_,p))switch(t){case 0:return h;case 1:return _}return r?-1:void 0}};t.exports={findLast:createMethod(0),findLastIndex:createMethod(1)}},(t,r,a)=>{var i=a(174),o=a(206).findLastIndex,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("findLastIndex",(function findLastIndex(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,a)=>{var i=a(174),o=a(188).forEach,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("forEach",(function forEach(t){o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,a)=>{var i=a(174),o=a(60).includes,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("includes",(function includes(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,a)=>{var i=a(174),o=a(60).indexOf,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("indexOf",(function indexOf(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,a)=>{var i=a(4),o=a(7),l=a(14),c=a(174),u=a(140),d=a(34)("iterator"),h=i.Uint8Array,p=l(u.values),v=l(u.keys),y=l(u.entries),_=c.aTypedArray,g=c.exportTypedArrayMethod,m=h&&h.prototype,b=!o((function(){m[d].call([1])})),w=!!m&&m.values&&m[d]===m.values&&"values"===m.values.name,P=function values(){return p(_(this))};g("entries",(function entries(){return y(_(this))}),b);g("keys",(function keys(){return v(_(this))}),b);g("values",P,b||!w,{name:"values"});g(d,P,b||!w,{name:"values"})},(t,r,a)=>{var i=a(174),o=a(14),l=i.aTypedArray,c=i.exportTypedArrayMethod,u=o([].join);c("join",(function join(t){return u(l(this),t)}))},(t,r,a)=>{var i=a(174),o=a(74),l=a(214),c=i.aTypedArray;(0,i.exportTypedArrayMethod)("lastIndexOf",(function lastIndexOf(t){var r=arguments.length;return o(l,c(this),r>1?[t,arguments[1]]:[t])}))},(t,r,a)=>{var i=a(74),o=a(12),l=a(62),c=a(64),u=a(215),d=Math.min,h=[].lastIndexOf,p=!!h&&1/[1].lastIndexOf(1,-0)<0,v=u("lastIndexOf"),y=p||!v;t.exports=y?function lastIndexOf(t){if(p)return i(h,this,arguments)||0;var r=o(this),a=c(r),u=a-1;arguments.length>1&&(u=d(u,l(arguments[1])));u<0&&(u=a+u);for(;u>=0;u--)if(u in r&&r[u]===t)return u||0;return-1}:h},(t,r,a)=>{var i=a(7);t.exports=function(t,r){var a=[][t];return!!a&&i((function(){a.call(null,r||function(){return 1},1)}))}},(t,r,a)=>{var i=a(174),o=a(188).map,l=a(201),c=i.aTypedArray;(0,i.exportTypedArrayMethod)("map",(function map(t){return o(c(this),t,arguments.length>1?arguments[1]:void 0,(function(t,r){return new(l(t))(r)}))}))},(t,r,a)=>{var i=a(174),o=a(218).left,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduce",(function reduce(t){var r=arguments.length;return o(l(this),t,r,r>1?arguments[1]:void 0)}))},(t,r,a)=>{var i=a(31),o=a(40),l=a(13),c=a(64),u=TypeError,createMethod=function(t){return function(r,a,d,h){i(a);var p=o(r),v=l(p),y=c(p),_=t?y-1:0,g=t?-1:1;if(d<2)for(;;){if(_ in v){h=v[_];_+=g;break}_+=g;if(t?_<0:y<=_)throw u("Reduce of empty array with no initial value")}for(;t?_>=0:y>_;_+=g)_ in v&&(h=a(h,v[_],_,p));return h}};t.exports={left:createMethod(!1),right:createMethod(!0)}},(t,r,a)=>{var i=a(174),o=a(218).right,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduceRight",(function reduceRight(t){var r=arguments.length;return o(l(this),t,r,r>1?arguments[1]:void 0)}))},(t,r,a)=>{var i=a(174),o=i.aTypedArray,l=i.exportTypedArrayMethod,c=Math.floor;l("reverse",(function reverse(){for(var t,r=this,a=o(r).length,i=c(a/2),l=0;l<i;){t=r[l];r[l++]=r[--a];r[a]=t}return r}))},(t,r,a)=>{var i=a(4),o=a(8),l=a(174),c=a(64),u=a(182),d=a(40),h=a(7),p=i.RangeError,v=i.Int8Array,y=v&&v.prototype,_=y&&y.set,g=l.aTypedArray,m=l.exportTypedArrayMethod,b=!h((function(){var t=new Uint8ClampedArray(2);o(_,t,{length:1,0:3},1);return 3!==t[1]})),w=b&&l.NATIVE_ARRAY_BUFFER_VIEWS&&h((function(){var t=new v(2);t.set(1);t.set("2",1);return 0!==t[0]||2!==t[1]}));m("set",(function set(t){g(this);var r=u(arguments.length>1?arguments[1]:void 0,1),a=d(t);if(b)return o(_,this,a,r);var i=this.length,l=c(a),h=0;if(l+r>i)throw p("Wrong length");for(;h<l;)this[r+h]=a[h++]}),!b||w)},(t,r,a)=>{var i=a(174),o=a(201),l=a(7),c=a(76),u=i.aTypedArray;(0,i.exportTypedArrayMethod)("slice",(function slice(t,r){for(var a=c(u(this),t,r),i=o(this),l=0,d=a.length,h=new i(d);d>l;)h[l]=a[l++];return h}),l((function(){new Int8Array(1).slice()})))},(t,r,a)=>{var i=a(174),o=a(188).some,l=i.aTypedArray;(0,i.exportTypedArrayMethod)("some",(function some(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,a)=>{var i=a(4),o=a(95),l=a(7),c=a(31),u=a(162),d=a(174),h=a(225),p=a(226),v=a(28),y=a(227),_=d.aTypedArray,g=d.exportTypedArrayMethod,m=i.Uint16Array,b=m&&o(m.prototype.sort),w=!(!b||l((function(){b(new m(2),null)}))&&l((function(){b(new m(2),{})}))),P=!!b&&!l((function(){if(v)return v<74;if(h)return h<67;if(p)return!0;if(y)return y<602;var t,r,a=new m(516),i=Array(516);for(t=0;t<516;t++){r=t%4;a[t]=515-t;i[t]=t-2*r+3}b(a,(function(t,r){return(t/4|0)-(r/4|0)}));for(t=0;t<516;t++)if(a[t]!==i[t])return!0}));g("sort",(function sort(t){void 0!==t&&c(t);return P?b(this,t):u(_(this),function(t){return function(r,a){return void 0!==t?+t(r,a)||0:a!=a?-1:r!=r?1:0===r&&0===a?1/r>0&&1/a<0?1:-1:r>a}}(t))}),!P||w)},(t,r,a)=>{var i=a(29).match(/firefox\/(\d+)/i);t.exports=!!i&&+i[1]},(t,r,a)=>{var i=a(29);t.exports=/MSIE|Trident/.test(i)},(t,r,a)=>{var i=a(29).match(/AppleWebKit\/(\d+)\./);t.exports=!!i&&+i[1]},(t,r,a)=>{var i=a(4),o=a(74),l=a(174),c=a(7),u=a(76),d=i.Int8Array,h=l.aTypedArray,p=l.exportTypedArrayMethod,v=[].toLocaleString,y=!!d&&c((function(){v.call(new d(1))}));p("toLocaleString",(function toLocaleString(){return o(v,y?u(h(this)):h(this),u(arguments))}),c((function(){return[1,2].toLocaleString()!==new d([1,2]).toLocaleString()}))||!c((function(){d.prototype.toLocaleString.call([1,2])})))},(t,r,a)=>{var i=a(230),o=a(174),l=o.aTypedArray,c=o.exportTypedArrayMethod,u=o.getTypedArrayConstructor;c("toReversed",(function toReversed(){return i(l(this),u(this))}))},(t,r,a)=>{var i=a(64);t.exports=function(t,r){for(var a=i(t),o=new r(a),l=0;l<a;l++)o[l]=t[a-l-1];return o}},(t,r,a)=>{var i=a(174),o=a(14),l=a(31),c=a(200),u=i.aTypedArray,d=i.getTypedArrayConstructor,h=i.exportTypedArrayMethod,p=o(i.TypedArrayPrototype.sort);h("toSorted",(function toSorted(t){void 0!==t&&l(t);var r=u(this),a=c(d(r),r);return p(a,t)}))},(t,r,a)=>{var i=a(174).exportTypedArrayMethod,o=a(7),l=a(4),c=a(14),u=l.Uint8Array,d=u&&u.prototype||{},h=[].toString,p=c([].join);o((function(){h.call({})}))&&(h=function toString(){return p(this)});var v=d.toString!==h;i("toString",h,v)},(t,r,a)=>{var i=a(234),o=a(174),l=a(186),c=a(62),u=a(187),d=o.aTypedArray,h=o.getTypedArrayConstructor,p=o.exportTypedArrayMethod,v=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();p("with",{with:function(t,r){var a=d(this),o=c(t),p=l(a)?u(r):+r;return i(a,h(a),o,p)}}.with,!v)},(t,r,a)=>{var i=a(64),o=a(62),l=RangeError;t.exports=function(t,r,a,c){var u=i(t),d=o(a),h=d<0?u+d:d;if(h>=u||h<0)throw l("Incorrect index");for(var p=new r(u),v=0;v<u;v++)p[v]=v===h?c:t[v];return p}},(t,r,a)=>{var i=a(6),o=a(121),l=a(236),c=ArrayBuffer.prototype;i&&!("detached"in c)&&o(c,"detached",{configurable:!0,get:function detached(){return l(this)}})},(t,r,a)=>{var i=a(14),o=a(237),l=i(ArrayBuffer.prototype.slice);t.exports=function(t){if(0!==o(t))return!1;try{l(t,0,0);return!1}catch(t){return!0}}},(t,r,a)=>{var i=a(115),o=a(15),l=TypeError;t.exports=i(ArrayBuffer.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==o(t))throw l("ArrayBuffer expected");return t.byteLength}},(t,r,a)=>{var i=a(3),o=a(239);o&&i({target:"ArrayBuffer",proto:!0},{transfer:function transfer(){return o(this,arguments.length?arguments[0]:void 0,!0)}})},(t,r,a)=>{var i=a(4),o=a(14),l=a(115),c=a(177),u=a(236),d=a(237),h=a(240),p=i.TypeError,v=i.structuredClone,y=i.ArrayBuffer,_=i.DataView,g=Math.min,m=y.prototype,b=_.prototype,w=o(m.slice),P=l(m,"resizable","get"),A=l(m,"maxByteLength","get"),S=o(b.getInt8),k=o(b.setInt8);t.exports=h&&function(t,r,a){var i=d(t),o=void 0===r?i:c(r),l=!P||!P(t);if(u(t))throw p("ArrayBuffer is detached");var h=v(t,{transfer:[t]});if(i===o&&(a||l))return h;if(i>=o&&(!a||l))return w(h,0,o);for(var m=a&&!l&&A?{maxByteLength:A(h)}:void 0,b=new y(o,m),x=new _(h),E=new _(b),T=g(o,i),C=0;C<T;C++)k(E,C,S(x,C));return b}},(t,r,a)=>{var i=a(4),o=a(7),l=a(28),c=a(241),u=a(242),d=a(243),h=i.structuredClone;t.exports=!!h&&!o((function(){if(u&&l>92||d&&l>94||c&&l>97)return!1;var t=new ArrayBuffer(8),r=h(t,{transfer:[t]});return 0!==t.byteLength||8!==r.byteLength}))},(t,r,a)=>{var i=a(242),o=a(243);t.exports=!i&&!o&&"object"==typeof window&&"object"==typeof document},t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},(t,r,a)=>{var i=a(4),o=a(15);t.exports="process"===o(i.process)},(t,r,a)=>{var i=a(3),o=a(239);o&&i({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function transferToFixedLength(){return o(this,arguments.length?arguments[0]:void 0,!1)}})},(t,r,a)=>{var i=a(3),o=a(40),l=a(83);i({target:"Object",stat:!0,forced:a(7)((function(){l(1)}))},{keys:function keys(t){return l(o(t))}})},(t,r,a)=>{a(172)("Uint32",(function(t){return function Uint32Array(r,a,i){return t(this,r,a,i)}}))},(t,r,a)=>{var i=a(3),o=a(60).includes,l=a(7),c=a(141);i({target:"Array",proto:!0,forced:l((function(){return!Array(1).includes()}))},{includes:function includes(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}});c("includes")},(t,r,a)=>{var i=a(3),o=a(14),l=a(132),c=a(16),u=a(107),d=a(134),h=o("".indexOf);i({target:"String",proto:!0,forced:!d("includes")},{includes:function includes(t){return!!~h(u(c(this)),u(l(t)),arguments.length>1?arguments[1]:void 0)}})},(t,r,a)=>{var i=a(3),o=a(188).map;i({target:"Array",proto:!0,forced:!a(250)("map")},{map:function map(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r,a)=>{var i=a(7),o=a(34),l=a(28),c=o("species");t.exports=function(t){return l>=51||!i((function(){var r=[];(r.constructor={})[c]=function(){return{foo:1}};return 1!==r[t](Boolean).foo}))}},(t,r,a)=>{var i=a(3),o=a(252).start;i({target:"String",proto:!0,forced:a(254)},{padStart:function padStart(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r,a)=>{var i=a(14),o=a(65),l=a(107),c=a(253),u=a(16),d=i(c),h=i("".slice),p=Math.ceil,createMethod=function(t){return function(r,a,i){var c,v,y=l(u(r)),_=o(a),g=y.length,m=void 0===i?" ":l(i);if(_<=g||""===m)return y;(v=d(m,p((c=_-g)/m.length))).length>c&&(v=h(v,0,c));return t?y+v:v+y}};t.exports={start:createMethod(!1),end:createMethod(!0)}},(t,r,a)=>{var i=a(62),o=a(107),l=a(16),c=RangeError;t.exports=function repeat(t){var r=o(l(this)),a="",u=i(t);if(u<0||u===1/0)throw c("Wrong number of repetitions");for(;u>0;(u>>>=1)&&(r+=r))1&u&&(a+=r);return a}},(t,r,a)=>{var i=a(29);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(i)},(t,r,a)=>{var i=a(50).PROPER,o=a(48),l=a(47),c=a(107),u=a(7),d=a(256),h="toString",p=RegExp.prototype[h],v=u((function(){return"/a/b"!==p.call({source:"a",flags:"b"})})),y=i&&p.name!==h;(v||y)&&o(RegExp.prototype,h,(function toString(){var t=l(this);return"/"+c(t.source)+"/"+c(d(t))}),{unsafe:!0})},(t,r,a)=>{var i=a(8),o=a(39),l=a(25),c=a(108),u=RegExp.prototype;t.exports=function(t){var r=t.flags;return void 0!==r||"flags"in u||o(t,"flags")||!l(u,t)?r:i(c,t)}},(t,r,a)=>{var i=a(3),o=a(7),l=a(169),c=a(20),u=a(40),d=a(64),h=a(170),p=a(100),v=a(189),y=a(250),_=a(34),g=a(28),m=_("isConcatSpreadable"),b=g>=51||!o((function(){var t=[];t[m]=!1;return t.concat()[0]!==t})),isConcatSpreadable=function(t){if(!c(t))return!1;var r=t[m];return void 0!==r?!!r:l(t)};i({target:"Array",proto:!0,arity:1,forced:!b||!y("concat")},{concat:function concat(t){var r,a,i,o,l,c=u(this),y=v(c,0),_=0;for(r=-1,i=arguments.length;r<i;r++)if(isConcatSpreadable(l=-1===r?c:arguments[r])){o=d(l);h(_+o);for(a=0;a<o;a++,_++)a in l&&p(y,_,l[a])}else{h(_+1);p(y,_++,l)}y.length=_;return y}})},(t,r,a)=>{var i=a(3),o=a(169),l=a(78),c=a(20),u=a(61),d=a(64),h=a(12),p=a(100),v=a(34),y=a(250),_=a(76),g=y("slice"),m=v("species"),b=Array,w=Math.max;i({target:"Array",proto:!0,forced:!g},{slice:function slice(t,r){var a,i,v,y=h(this),g=d(y),P=u(t,g),A=u(void 0===r?g:r,g);if(o(y)){a=y.constructor;(l(a)&&(a===b||o(a.prototype))||c(a)&&null===(a=a[m]))&&(a=void 0);if(a===b||void 0===a)return _(y,P,A)}i=new(void 0===a?b:a)(w(A-P,0));for(v=0;P<A;P++,v++)P in y&&p(i,v,y[P]);i.length=v;return i}})},(t,r,a)=>{a(260);a(272);a(275);a(276);a(277);a(278)},(t,r,a)=>{var i,o,l,c=a(3),u=a(36),d=a(243),h=a(4),p=a(8),v=a(48),y=a(114),_=a(72),g=a(191),m=a(31),b=a(21),w=a(20),P=a(155),A=a(202),S=a(261).set,k=a(263),x=a(267),E=a(268),T=a(264),C=a(52),I=a(269),M=a(270),O=a(271),R="Promise",G=M.CONSTRUCTOR,L=M.REJECTION_EVENT,D=M.SUBCLASSING,j=C.getterFor(R),N=C.set,W=I&&I.prototype,B=I,U=W,H=h.TypeError,z=h.document,q=h.process,V=O.f,X=V,Y=!!(z&&z.createEvent&&h.dispatchEvent),K="unhandledrejection",isThenable=function(t){var r;return!(!w(t)||!b(r=t.then))&&r},callReaction=function(t,r){var a,i,o,l=r.value,c=1===r.state,u=c?t.ok:t.fail,d=t.resolve,h=t.reject,v=t.domain;try{if(u){if(!c){2===r.rejection&&onHandleUnhandled(r);r.rejection=1}if(!0===u)a=l;else{v&&v.enter();a=u(l);if(v){v.exit();o=!0}}a===t.promise?h(H("Promise-chain cycle")):(i=isThenable(a))?p(i,a,d,h):d(a)}else h(l)}catch(t){v&&!o&&v.exit();h(t)}},notify=function(t,r){if(!t.notified){t.notified=!0;k((function(){for(var a,i=t.reactions;a=i.get();)callReaction(a,t);t.notified=!1;r&&!t.rejection&&onUnhandled(t)}))}},dispatchEvent=function(t,r,a){var i,o;if(Y){(i=z.createEvent("Event")).promise=r;i.reason=a;i.initEvent(t,!1,!0);h.dispatchEvent(i)}else i={promise:r,reason:a};!L&&(o=h["on"+t])?o(i):t===K&&x("Unhandled promise rejection",a)},onUnhandled=function(t){p(S,h,(function(){var r,a=t.facade,i=t.value;if(isUnhandled(t)){r=E((function(){d?q.emit("unhandledRejection",i,a):dispatchEvent(K,a,i)}));t.rejection=d||isUnhandled(t)?2:1;if(r.error)throw r.value}}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t){p(S,h,(function(){var r=t.facade;d?q.emit("rejectionHandled",r):dispatchEvent("rejectionhandled",r,t.value)}))},bind=function(t,r,a){return function(i){t(r,i,a)}},internalReject=function(t,r,a){if(!t.done){t.done=!0;a&&(t=a);t.value=r;t.state=2;notify(t,!0)}},internalResolve=function(t,r,a){if(!t.done){t.done=!0;a&&(t=a);try{if(t.facade===r)throw H("Promise can't be resolved itself");var i=isThenable(r);if(i)k((function(){var a={done:!1};try{p(i,r,bind(internalResolve,a,t),bind(internalReject,a,t))}catch(r){internalReject(a,r,t)}}));else{t.value=r;t.state=1;notify(t,!1)}}catch(r){internalReject({done:!1},r,t)}}};if(G){U=(B=function Promise(t){P(this,U);m(t);p(i,this);var r=j(this);try{t(bind(internalResolve,r),bind(internalReject,r))}catch(t){internalReject(r,t)}}).prototype;(i=function Promise(t){N(this,{type:R,done:!1,notified:!1,parent:!1,reactions:new T,rejection:!1,state:0,value:void 0})}).prototype=v(U,"then",(function then(t,r){var a=j(this),i=V(A(this,B));a.parent=!0;i.ok=!b(t)||t;i.fail=b(r)&&r;i.domain=d?q.domain:void 0;0===a.state?a.reactions.add(i):k((function(){callReaction(i,a)}));return i.promise}));o=function(){var t=new i,r=j(t);this.promise=t;this.resolve=bind(internalResolve,r);this.reject=bind(internalReject,r)};O.f=V=function(t){return t===B||undefined===t?new o(t):X(t)};if(!u&&b(I)&&W!==Object.prototype){l=W.then;D||v(W,"then",(function then(t,r){var a=this;return new B((function(t,r){p(l,a,t,r)})).then(t,r)}),{unsafe:!0});try{delete W.constructor}catch(t){}y&&y(W,U)}}c({global:!0,constructor:!0,wrap:!0,forced:G},{Promise:B});_(B,R,!1,!0);g(R)},(t,r,a)=>{var i,o,l,c,u=a(4),d=a(74),h=a(94),p=a(21),v=a(39),y=a(7),_=a(84),g=a(76),m=a(43),b=a(159),w=a(262),P=a(243),A=u.setImmediate,S=u.clearImmediate,k=u.process,x=u.Dispatch,E=u.Function,T=u.MessageChannel,C=u.String,I=0,M={},O="onreadystatechange";y((function(){i=u.location}));var run=function(t){if(v(M,t)){var r=M[t];delete M[t];r()}},runner=function(t){return function(){run(t)}},eventListener=function(t){run(t.data)},globalPostMessageDefer=function(t){u.postMessage(C(t),i.protocol+"//"+i.host)};if(!A||!S){A=function setImmediate(t){b(arguments.length,1);var r=p(t)?t:E(t),a=g(arguments,1);M[++I]=function(){d(r,void 0,a)};o(I);return I};S=function clearImmediate(t){delete M[t]};if(P)o=function(t){k.nextTick(runner(t))};else if(x&&x.now)o=function(t){x.now(runner(t))};else if(T&&!w){c=(l=new T).port2;l.port1.onmessage=eventListener;o=h(c.postMessage,c)}else if(u.addEventListener&&p(u.postMessage)&&!u.importScripts&&i&&"file:"!==i.protocol&&!y(globalPostMessageDefer)){o=globalPostMessageDefer;u.addEventListener("message",eventListener,!1)}else o=O in m("script")?function(t){_.appendChild(m("script"))[O]=function(){_.removeChild(this);run(t)}}:function(t){setTimeout(runner(t),0)}}t.exports={set:A,clear:S}},(t,r,a)=>{var i=a(29);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(i)},(t,r,a)=>{var i,o,l,c,u,d=a(4),h=a(94),p=a(5).f,v=a(261).set,y=a(264),_=a(262),g=a(265),m=a(266),b=a(243),w=d.MutationObserver||d.WebKitMutationObserver,P=d.document,A=d.process,S=d.Promise,k=p(d,"queueMicrotask"),x=k&&k.value;if(!x){var E=new y,flush=function(){var t,r;b&&(t=A.domain)&&t.exit();for(;r=E.get();)try{r()}catch(t){E.head&&i();throw t}t&&t.enter()};if(_||b||m||!w||!P)if(!g&&S&&S.resolve){(c=S.resolve(void 0)).constructor=S;u=h(c.then,c);i=function(){u(flush)}}else if(b)i=function(){A.nextTick(flush)};else{v=h(v,d);i=function(){v(flush)}}else{o=!0;l=P.createTextNode("");new w(flush).observe(l,{characterData:!0});i=function(){l.data=o=!o}}x=function(t){E.head||i();E.add(t)}}t.exports=x},t=>{var Queue=function(){this.head=null;this.tail=null};Queue.prototype={add:function(t){var r={item:t,next:null},a=this.tail;a?a.next=r:this.head=r;this.tail=r},get:function(){var t=this.head;if(t){null===(this.head=t.next)&&(this.tail=null);return t.item}}};t.exports=Queue},(t,r,a)=>{var i=a(29);t.exports=/ipad|iphone|ipod/i.test(i)&&"undefined"!=typeof Pebble},(t,r,a)=>{var i=a(29);t.exports=/web0s(?!.*chrome)/i.test(i)},t=>{t.exports=function(t,r){try{1===arguments.length?console.error(t):console.error(t,r)}catch(t){}}},t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},(t,r,a)=>{var i=a(4);t.exports=i.Promise},(t,r,a)=>{var i=a(4),o=a(269),l=a(21),c=a(68),u=a(51),d=a(34),h=a(241),p=a(242),v=a(36),y=a(28),_=o&&o.prototype,g=d("species"),m=!1,b=l(i.PromiseRejectionEvent),w=c("Promise",(function(){var t=u(o),r=t!==String(o);if(!r&&66===y)return!0;if(v&&(!_.catch||!_.finally))return!0;if(!y||y<51||!/native code/.test(t)){var a=new o((function(t){t(1)})),FakePromise=function(t){t((function(){}),(function(){}))};(a.constructor={})[g]=FakePromise;if(!(m=a.then((function(){}))instanceof FakePromise))return!0}return!r&&(h||p)&&!b}));t.exports={CONSTRUCTOR:w,REJECTION_EVENT:b,SUBCLASSING:m}},(t,r,a)=>{var i=a(31),o=TypeError,PromiseCapability=function(t){var r,a;this.promise=new t((function(t,i){if(void 0!==r||void 0!==a)throw o("Bad Promise constructor");r=t;a=i}));this.resolve=i(r);this.reject=i(a)};t.exports.f=function(t){return new PromiseCapability(t)}},(t,r,a)=>{var i=a(3),o=a(8),l=a(31),c=a(271),u=a(268),d=a(273);i({target:"Promise",stat:!0,forced:a(274)},{all:function all(t){var r=this,a=c.f(r),i=a.resolve,h=a.reject,p=u((function(){var a=l(r.resolve),c=[],u=0,p=1;d(t,(function(t){var l=u++,d=!1;p++;o(a,r,t).then((function(t){if(!d){d=!0;c[l]=t;--p||i(c)}}),h)}));--p||i(c)}));p.error&&h(p.value);return a.promise}})},(t,r,a)=>{var i=a(94),o=a(8),l=a(47),c=a(32),u=a(98),d=a(64),h=a(25),p=a(101),v=a(102),y=a(97),_=TypeError,Result=function(t,r){this.stopped=t;this.result=r},g=Result.prototype;t.exports=function(t,r,a){var m,b,w,P,A,S,k,x=a&&a.that,E=!(!a||!a.AS_ENTRIES),T=!(!a||!a.IS_RECORD),C=!(!a||!a.IS_ITERATOR),I=!(!a||!a.INTERRUPTED),M=i(r,x),stop=function(t){m&&y(m,"normal",t);return new Result(!0,t)},callFn=function(t){if(E){l(t);return I?M(t[0],t[1],stop):M(t[0],t[1])}return I?M(t,stop):M(t)};if(T)m=t.iterator;else if(C)m=t;else{if(!(b=v(t)))throw _(c(t)+" is not iterable");if(u(b)){for(w=0,P=d(t);P>w;w++)if((A=callFn(t[w]))&&h(g,A))return A;return new Result(!1)}m=p(t,b)}S=T?t.next:m.next;for(;!(k=o(S,m)).done;){try{A=callFn(k.value)}catch(t){y(m,"throw",t)}if("object"==typeof A&&A&&h(g,A))return A}return new Result(!1)}},(t,r,a)=>{var i=a(269),o=a(103),l=a(270).CONSTRUCTOR;t.exports=l||!o((function(t){i.all(t).then(void 0,(function(){}))}))},(t,r,a)=>{var i=a(3),o=a(36),l=a(270).CONSTRUCTOR,c=a(269),u=a(24),d=a(21),h=a(48),p=c&&c.prototype;i({target:"Promise",proto:!0,forced:l,real:!0},{catch:function(t){return this.then(void 0,t)}});if(!o&&d(c)){var v=u("Promise").prototype.catch;p.catch!==v&&h(p,"catch",v,{unsafe:!0})}},(t,r,a)=>{var i=a(3),o=a(8),l=a(31),c=a(271),u=a(268),d=a(273);i({target:"Promise",stat:!0,forced:a(274)},{race:function race(t){var r=this,a=c.f(r),i=a.reject,h=u((function(){var c=l(r.resolve);d(t,(function(t){o(c,r,t).then(a.resolve,i)}))}));h.error&&i(h.value);return a.promise}})},(t,r,a)=>{var i=a(3),o=a(8),l=a(271);i({target:"Promise",stat:!0,forced:a(270).CONSTRUCTOR},{reject:function reject(t){var r=l.f(this);o(r.reject,void 0,t);return r.promise}})},(t,r,a)=>{var i=a(3),o=a(24),l=a(36),c=a(269),u=a(270).CONSTRUCTOR,d=a(279),h=o("Promise"),p=l&&!u;i({target:"Promise",stat:!0,forced:l||u},{resolve:function resolve(t){return d(p&&this===h?c:this,t)}})},(t,r,a)=>{var i=a(47),o=a(20),l=a(271);t.exports=function(t,r){i(t);if(o(r)&&r.constructor===t)return r;var a=l.f(t);(0,a.resolve)(r);return a.promise}},(t,r,a)=>{a(281)},(t,r,a)=>{a(282)("Map",(function(t){return function Map(){return t(this,arguments.length?arguments[0]:void 0)}}),a(288))},(t,r,a)=>{var i=a(3),o=a(4),l=a(14),c=a(68),u=a(48),d=a(283),h=a(273),p=a(155),v=a(21),y=a(17),_=a(20),g=a(7),m=a(103),b=a(72),w=a(113);t.exports=function(t,r,a){var P=-1!==t.indexOf("Map"),A=-1!==t.indexOf("Weak"),S=P?"set":"add",k=o[t],x=k&&k.prototype,E=k,T={},fixMethod=function(t){var r=l(x[t]);u(x,t,"add"===t?function add(t){r(this,0===t?0:t);return this}:"delete"===t?function(t){return!(A&&!_(t))&&r(this,0===t?0:t)}:"get"===t?function get(t){return A&&!_(t)?void 0:r(this,0===t?0:t)}:"has"===t?function has(t){return!(A&&!_(t))&&r(this,0===t?0:t)}:function set(t,a){r(this,0===t?0:t,a);return this})};if(c(t,!v(k)||!(A||x.forEach&&!g((function(){(new k).entries().next()}))))){E=a.getConstructor(r,t,P,S);d.enable()}else if(c(t,!0)){var C=new E,I=C[S](A?{}:-0,1)!==C,M=g((function(){C.has(1)})),O=m((function(t){new k(t)})),R=!A&&g((function(){for(var t=new k,r=5;r--;)t[S](r,r);return!t.has(-0)}));if(!O){(E=r((function(t,r){p(t,x);var a=w(new k,t,E);y(r)||h(r,a[S],{that:a,AS_ENTRIES:P});return a}))).prototype=x;x.constructor=E}if(M||R){fixMethod("delete");fixMethod("has");P&&fixMethod("get")}(R||I)&&fixMethod(S);A&&x.clear&&delete x.clear}T[t]=E;i({global:!0,constructor:!0,forced:E!==k},T);b(E,t);A||a.setStrong(E,t,P);return E}},(t,r,a)=>{var i=a(3),o=a(14),l=a(55),c=a(20),u=a(39),d=a(45).f,h=a(58),p=a(284),v=a(285),y=a(41),_=a(287),g=!1,m=y("meta"),b=0,setMetadata=function(t){d(t,m,{value:{objectID:"O"+b++,weakData:{}}})},w=t.exports={enable:function(){w.enable=function(){};g=!0;var t=h.f,r=o([].splice),a={};a[m]=1;if(t(a).length){h.f=function(a){for(var i=t(a),o=0,l=i.length;o<l;o++)if(i[o]===m){r(i,o,1);break}return i};i({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:p.f})}},fastKey:function(t,r){if(!c(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!u(t,m)){if(!v(t))return"F";if(!r)return"E";setMetadata(t)}return t[m].objectID},getWeakData:function(t,r){if(!u(t,m)){if(!v(t))return!0;if(!r)return!1;setMetadata(t)}return t[m].weakData},onFreeze:function(t){_&&g&&v(t)&&!u(t,m)&&setMetadata(t);return t}};l[m]=!0},(t,r,a)=>{var i=a(15),o=a(12),l=a(58).f,c=a(157),u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function getOwnPropertyNames(t){return u&&"Window"===i(t)?function(t){try{return l(t)}catch(t){return c(u)}}(t):l(o(t))}},(t,r,a)=>{var i=a(7),o=a(20),l=a(15),c=a(286),u=Object.isExtensible,d=i((function(){u(1)}));t.exports=d||c?function isExtensible(t){return!!o(t)&&((!c||"ArrayBuffer"!==l(t))&&(!u||u(t)))}:u},(t,r,a)=>{var i=a(7);t.exports=i((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},(t,r,a)=>{var i=a(7);t.exports=!i((function(){return Object.isExtensible(Object.preventExtensions({}))}))},(t,r,a)=>{var i=a(81),o=a(121),l=a(161),c=a(94),u=a(155),d=a(17),h=a(273),p=a(142),v=a(145),y=a(191),_=a(6),g=a(283).fastKey,m=a(52),b=m.set,w=m.getterFor;t.exports={getConstructor:function(t,r,a,p){var v=t((function(t,o){u(t,y);b(t,{type:r,index:i(null),first:void 0,last:void 0,size:0});_||(t.size=0);d(o)||h(o,t[p],{that:t,AS_ENTRIES:a})})),y=v.prototype,m=w(r),define=function(t,r,a){var i,o,l=m(t),c=getEntry(t,r);if(c)c.value=a;else{l.last=c={index:o=g(r,!0),key:r,value:a,previous:i=l.last,next:void 0,removed:!1};l.first||(l.first=c);i&&(i.next=c);_?l.size++:t.size++;"F"!==o&&(l.index[o]=c)}return t},getEntry=function(t,r){var a,i=m(t),o=g(r);if("F"!==o)return i.index[o];for(a=i.first;a;a=a.next)if(a.key===r)return a};l(y,{clear:function clear(){for(var t=m(this),r=t.index,a=t.first;a;){a.removed=!0;a.previous&&(a.previous=a.previous.next=void 0);delete r[a.index];a=a.next}t.first=t.last=void 0;_?t.size=0:this.size=0},delete:function(t){var r=this,a=m(r),i=getEntry(r,t);if(i){var o=i.next,l=i.previous;delete a.index[i.index];i.removed=!0;l&&(l.next=o);o&&(o.previous=l);a.first===i&&(a.first=o);a.last===i&&(a.last=l);_?a.size--:r.size--}return!!i},forEach:function forEach(t){for(var r,a=m(this),i=c(t,arguments.length>1?arguments[1]:void 0);r=r?r.next:a.first;){i(r.value,r.key,this);for(;r&&r.removed;)r=r.previous}},has:function has(t){return!!getEntry(this,t)}});l(y,a?{get:function get(t){var r=getEntry(this,t);return r&&r.value},set:function set(t,r){return define(this,0===t?0:t,r)}}:{add:function add(t){return define(this,t=0===t?0:t,t)}});_&&o(y,"size",{configurable:!0,get:function(){return m(this).size}});return v},setStrong:function(t,r,a){var i=r+" Iterator",o=w(r),l=w(i);p(t,r,(function(t,r){b(this,{type:i,target:t,state:o(t),kind:r,last:void 0})}),(function(){for(var t=l(this),r=t.kind,a=t.last;a&&a.removed;)a=a.previous;if(!t.target||!(t.last=a=a?a.next:t.state.first)){t.target=void 0;return v(void 0,!0)}return v("keys"===r?a.key:"values"===r?a.value:[a.key,a.value],!1)}),a?"entries":"values",!a,!0);y(r)}}},(t,r,a)=>{var i=a(74),o=a(8),l=a(14),c=a(136),u=a(7),d=a(47),h=a(21),p=a(17),v=a(62),y=a(65),_=a(107),g=a(16),m=a(137),b=a(30),w=a(290),P=a(139),A=a(34)("replace"),S=Math.max,k=Math.min,x=l([].concat),E=l([].push),T=l("".indexOf),C=l("".slice),I="$0"==="a".replace(/./,"$0"),M=!!/./[A]&&""===/./[A]("a","$0");c("replace",(function(t,r,a){var l=M?"$":"$0";return[function replace(t,a){var i=g(this),l=p(t)?void 0:b(t,A);return l?o(l,t,i,a):o(r,_(i),t,a)},function(t,o){var c=d(this),u=_(t);if("string"==typeof o&&-1===T(o,l)&&-1===T(o,"$<")){var p=a(r,c,u,o);if(p.done)return p.value}var g=h(o);g||(o=_(o));var b,A=c.global;if(A){b=c.unicode;c.lastIndex=0}for(var I,M=[];null!==(I=P(c,u));){E(M,I);if(!A)break;""===_(I[0])&&(c.lastIndex=m(u,y(c.lastIndex),b))}for(var O,R="",G=0,L=0;L<M.length;L++){for(var D,j=_((I=M[L])[0]),N=S(k(v(I.index),u.length),0),W=[],B=1;B<I.length;B++)E(W,void 0===(O=I[B])?O:String(O));var U=I.groups;if(g){var H=x([j],W,N,u);void 0!==U&&E(H,U);D=_(i(o,void 0,H))}else D=w(j,u,N,W,U,o);if(N>=G){R+=C(u,G,N)+D;G=N+j.length}}return R+C(u,G)}]}),!!u((function(){var t=/./;t.exec=function(){var t=[];t.groups={a:"7"};return t};return"7"!=="".replace(t,"$<a>")}))||!I||M)},(t,r,a)=>{var i=a(14),o=a(40),l=Math.floor,c=i("".charAt),u=i("".replace),d=i("".slice),h=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,p=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,r,a,i,v,y){var _=a+t.length,g=i.length,m=p;if(void 0!==v){v=o(v);m=h}return u(y,m,(function(o,u){var h;switch(c(u,0)){case"$":return"$";case"&":return t;case"`":return d(r,0,a);case"'":return d(r,_);case"<":h=v[d(u,1,-1)];break;default:var p=+u;if(0===p)return o;if(p>g){var y=l(p/10);return 0===y?o:y<=g?void 0===i[y-1]?c(u,1):i[y-1]+c(u,1):o}h=i[p-1]}return void 0===h?"":h}))}},(t,r,a)=>{var i=a(3),o=a(8),l=a(14),c=a(16),u=a(21),d=a(17),h=a(133),p=a(107),v=a(30),y=a(256),_=a(290),g=a(34),m=a(36),b=g("replace"),w=TypeError,P=l("".indexOf),A=l("".replace),S=l("".slice),k=Math.max,stringIndexOf=function(t,r,a){return a>t.length?-1:""===r?a:P(t,r,a)};i({target:"String",proto:!0},{replaceAll:function replaceAll(t,r){var a,i,l,g,x,E,T,C,I,M=c(this),O=0,R=0,G="";if(!d(t)){if(a=h(t)){i=p(c(y(t)));if(!~P(i,"g"))throw w("`.replaceAll` does not allow non-global regexes")}if(l=v(t,b))return o(l,t,M,r);if(m&&a)return A(p(M),t,r)}g=p(M);x=p(t);(E=u(r))||(r=p(r));T=x.length;C=k(1,T);O=stringIndexOf(g,x,0);for(;-1!==O;){I=E?p(r(x,O,g)):_(x,g,O,[],void 0,r);G+=S(g,R,O)+I;R=O+T;O=stringIndexOf(g,x,O+C)}R<g.length&&(G+=S(g,R));return G}})},(t,r,a)=>{a(293);a(294);a(296);a(297);a(299)},(t,r,a)=>{var i=a(3),o=a(4),l=a(8),c=a(14),u=a(36),d=a(6),h=a(27),p=a(7),v=a(39),y=a(25),_=a(47),g=a(12),m=a(18),b=a(107),w=a(11),P=a(81),A=a(83),S=a(58),k=a(284),x=a(67),E=a(5),T=a(45),C=a(82),I=a(10),M=a(48),O=a(121),R=a(35),G=a(54),L=a(55),D=a(41),j=a(34),N=a(88),W=a(86),B=a(89),U=a(72),H=a(52),z=a(188).forEach,q=G("hidden"),V="Symbol",X="prototype",Y=H.set,K=H.getterFor(V),J=Object[X],$=o.Symbol,Q=$&&$[X],Z=o.TypeError,ee=o.QObject,te=E.f,re=T.f,ne=k.f,ae=I.f,ie=c([].push),oe=R("symbols"),se=R("op-symbols"),le=R("wks"),ce=!ee||!ee[X]||!ee[X].findChild,ue=d&&p((function(){return 7!==P(re({},"a",{get:function(){return re(this,"a",{value:7}).a}})).a}))?function(t,r,a){var i=te(J,r);i&&delete J[r];re(t,r,a);i&&t!==J&&re(J,r,i)}:re,wrap=function(t,r){var a=oe[t]=P(Q);Y(a,{type:V,tag:t,description:r});d||(a.description=r);return a},de=function defineProperty(t,r,a){t===J&&de(se,r,a);_(t);var i=m(r);_(a);if(v(oe,i)){if(a.enumerable){v(t,q)&&t[q][i]&&(t[q][i]=!1);a=P(a,{enumerable:w(0,!1)})}else{v(t,q)||re(t,q,w(1,{}));t[q][i]=!0}return ue(t,i,a)}return re(t,i,a)},he=function defineProperties(t,r){_(t);var a=g(r),i=A(a).concat($getOwnPropertySymbols(a));z(i,(function(r){d&&!l(fe,a,r)||de(t,r,a[r])}));return t},fe=function propertyIsEnumerable(t){var r=m(t),a=l(ae,this,r);return!(this===J&&v(oe,r)&&!v(se,r))&&(!(a||!v(this,r)||!v(oe,r)||v(this,q)&&this[q][r])||a)},pe=function getOwnPropertyDescriptor(t,r){var a=g(t),i=m(r);if(a!==J||!v(oe,i)||v(se,i)){var o=te(a,i);!o||!v(oe,i)||v(a,q)&&a[q][i]||(o.enumerable=!0);return o}},ve=function getOwnPropertyNames(t){var r=ne(g(t)),a=[];z(r,(function(t){v(oe,t)||v(L,t)||ie(a,t)}));return a},$getOwnPropertySymbols=function(t){var r=t===J,a=ne(r?se:g(t)),i=[];z(a,(function(t){!v(oe,t)||r&&!v(J,t)||ie(i,oe[t])}));return i};if(!h){M(Q=($=function Symbol(){if(y(Q,this))throw Z("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?b(arguments[0]):void 0,r=D(t),setter=function(t){this===J&&l(setter,se,t);v(this,q)&&v(this[q],r)&&(this[q][r]=!1);ue(this,r,w(1,t))};d&&ce&&ue(J,r,{configurable:!0,set:setter});return wrap(r,t)})[X],"toString",(function toString(){return K(this).tag}));M($,"withoutSetter",(function(t){return wrap(D(t),t)}));I.f=fe;T.f=de;C.f=he;E.f=pe;S.f=k.f=ve;x.f=$getOwnPropertySymbols;N.f=function(t){return wrap(j(t),t)};if(d){O(Q,"description",{configurable:!0,get:function description(){return K(this).description}});u||M(J,"propertyIsEnumerable",fe,{unsafe:!0})}}i({global:!0,constructor:!0,wrap:!0,forced:!h,sham:!h},{Symbol:$});z(A(le),(function(t){W(t)}));i({target:V,stat:!0,forced:!h},{useSetter:function(){ce=!0},useSimple:function(){ce=!1}});i({target:"Object",stat:!0,forced:!h,sham:!d},{create:function create(t,r){return void 0===r?P(t):he(P(t),r)},defineProperty:de,defineProperties:he,getOwnPropertyDescriptor:pe});i({target:"Object",stat:!0,forced:!h},{getOwnPropertyNames:ve});B();U($,V);L[q]=!0},(t,r,a)=>{var i=a(3),o=a(24),l=a(39),c=a(107),u=a(35),d=a(295),h=u("string-to-symbol-registry"),p=u("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!d},{for:function(t){var r=c(t);if(l(h,r))return h[r];var a=o("Symbol")(r);h[r]=a;p[a]=r;return a}})},(t,r,a)=>{var i=a(27);t.exports=i&&!!Symbol.for&&!!Symbol.keyFor},(t,r,a)=>{var i=a(3),o=a(39),l=a(23),c=a(32),u=a(35),d=a(295),h=u("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!d},{keyFor:function keyFor(t){if(!l(t))throw TypeError(c(t)+" is not a symbol");if(o(h,t))return h[t]}})},(t,r,a)=>{var i=a(3),o=a(24),l=a(74),c=a(8),u=a(14),d=a(7),h=a(21),p=a(23),v=a(76),y=a(298),_=a(27),g=String,m=o("JSON","stringify"),b=u(/./.exec),w=u("".charAt),P=u("".charCodeAt),A=u("".replace),S=u(1..toString),k=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,E=/^[\uDC00-\uDFFF]$/,T=!_||d((function(){var t=o("Symbol")("stringify detection");return"[null]"!==m([t])||"{}"!==m({a:t})||"{}"!==m(Object(t))})),C=d((function(){return'"\\udf06\\ud834"'!==m("\udf06\ud834")||'"\\udead"'!==m("\udead")})),stringifyWithSymbolsFix=function(t,r){var a=v(arguments),i=y(r);if(h(i)||void 0!==t&&!p(t)){a[1]=function(t,r){h(i)&&(r=c(i,this,g(t),r));if(!p(r))return r};return l(m,null,a)}},fixIllFormed=function(t,r,a){var i=w(a,r-1),o=w(a,r+1);return b(x,t)&&!b(E,o)||b(E,t)&&!b(x,i)?"\\u"+S(P(t,0),16):t};m&&i({target:"JSON",stat:!0,arity:3,forced:T||C},{stringify:function stringify(t,r,a){var i=v(arguments),o=l(T?stringifyWithSymbolsFix:m,null,i);return C&&"string"==typeof o?A(o,k,fixIllFormed):o}})},(t,r,a)=>{var i=a(14),o=a(169),l=a(21),c=a(15),u=a(107),d=i([].push);t.exports=function(t){if(l(t))return t;if(o(t)){for(var r=t.length,a=[],i=0;i<r;i++){var h=t[i];"string"==typeof h?d(a,h):"number"!=typeof h&&"Number"!==c(h)&&"String"!==c(h)||d(a,u(h))}var p=a.length,v=!0;return function(t,r){if(v){v=!1;return r}if(o(this))return r;for(var i=0;i<p;i++)if(a[i]===t)return r}}}},(t,r,a)=>{var i=a(3),o=a(27),l=a(7),c=a(67),u=a(40);i({target:"Object",stat:!0,forced:!o||l((function(){c.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){var r=c.f;return r?r(u(t)):[]}})},(t,r,a)=>{var i=a(3),o=a(6),l=a(4),c=a(14),u=a(39),d=a(21),h=a(25),p=a(107),v=a(121),y=a(56),_=l.Symbol,g=_&&_.prototype;if(o&&d(_)&&(!("description"in g)||void 0!==_().description)){var m={},b=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:p(arguments[0]),r=h(g,this)?new _(t):void 0===t?_():_(t);""===t&&(m[r]=!0);return r};y(b,_);b.prototype=g;g.constructor=b;var w="Symbol(description detection)"===String(_("description detection")),P=c(g.valueOf),A=c(g.toString),S=/^Symbol\((.*)\)[^)]+$/,k=c("".replace),x=c("".slice);v(g,"description",{configurable:!0,get:function description(){var t=P(this);if(u(m,t))return"";var r=A(t),a=w?x(r,7,-1):k(r,S,"$1");return""===a?void 0:a}});i({global:!0,constructor:!0,forced:!0},{Symbol:b})}},(t,r,a)=>{a(86)("iterator")},(t,r,a)=>{a(303)},(t,r,a)=>{var i,o=a(287),l=a(4),c=a(14),u=a(161),d=a(283),h=a(282),p=a(304),v=a(20),y=a(52).enforce,_=a(7),g=a(53),m=Object,b=Array.isArray,w=m.isExtensible,P=m.isFrozen,A=m.isSealed,S=m.freeze,k=m.seal,x={},E={},T=!l.ActiveXObject&&"ActiveXObject"in l,wrapper=function(t){return function WeakMap(){return t(this,arguments.length?arguments[0]:void 0)}},C=h("WeakMap",wrapper,p),I=C.prototype,M=c(I.set);if(g)if(T){i=p.getConstructor(wrapper,"WeakMap",!0);d.enable();var O=c(I.delete),R=c(I.has),G=c(I.get);u(I,{delete:function(t){if(v(t)&&!w(t)){var r=y(this);r.frozen||(r.frozen=new i);return O(this,t)||r.frozen.delete(t)}return O(this,t)},has:function has(t){if(v(t)&&!w(t)){var r=y(this);r.frozen||(r.frozen=new i);return R(this,t)||r.frozen.has(t)}return R(this,t)},get:function get(t){if(v(t)&&!w(t)){var r=y(this);r.frozen||(r.frozen=new i);return R(this,t)?G(this,t):r.frozen.get(t)}return G(this,t)},set:function set(t,r){if(v(t)&&!w(t)){var a=y(this);a.frozen||(a.frozen=new i);R(this,t)?M(this,t,r):a.frozen.set(t,r)}else M(this,t,r);return this}})}else o&&_((function(){var t=S([]);M(new C,t,1);return!P(t)}))&&u(I,{set:function set(t,r){var a;b(t)&&(P(t)?a=x:A(t)&&(a=E));M(this,t,r);a===x&&S(t);a===E&&k(t);return this}})},(t,r,a)=>{var i=a(14),o=a(161),l=a(283).getWeakData,c=a(155),u=a(47),d=a(17),h=a(20),p=a(273),v=a(188),y=a(39),_=a(52),g=_.set,m=_.getterFor,b=v.find,w=v.findIndex,P=i([].splice),A=0,uncaughtFrozenStore=function(t){return t.frozen||(t.frozen=new UncaughtFrozenStore)},UncaughtFrozenStore=function(){this.entries=[]},findUncaughtFrozen=function(t,r){return b(t.entries,(function(t){return t[0]===r}))};UncaughtFrozenStore.prototype={get:function(t){var r=findUncaughtFrozen(this,t);if(r)return r[1]},has:function(t){return!!findUncaughtFrozen(this,t)},set:function(t,r){var a=findUncaughtFrozen(this,t);a?a[1]=r:this.entries.push([t,r])},delete:function(t){var r=w(this.entries,(function(r){return r[0]===t}));~r&&P(this.entries,r,1);return!!~r}};t.exports={getConstructor:function(t,r,a,i){var v=t((function(t,o){c(t,_);g(t,{type:r,id:A++,frozen:void 0});d(o)||p(o,t[i],{that:t,AS_ENTRIES:a})})),_=v.prototype,b=m(r),define=function(t,r,a){var i=b(t),o=l(u(r),!0);!0===o?uncaughtFrozenStore(i).set(r,a):o[i.id]=a;return t};o(_,{delete:function(t){var r=b(this);if(!h(t))return!1;var a=l(t);return!0===a?uncaughtFrozenStore(r).delete(t):a&&y(a,r.id)&&delete a[r.id]},has:function has(t){var r=b(this);if(!h(t))return!1;var a=l(t);return!0===a?uncaughtFrozenStore(r).has(t):a&&y(a,r.id)}});o(_,a?{get:function get(t){var r=b(this);if(h(t)){var a=l(t);return!0===a?uncaughtFrozenStore(r).get(t):a?a[r.id]:void 0}},set:function set(t,r){return define(this,t,r)}}:{add:function add(t){return define(this,t,!0)}});return v}}},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{__w_pdfjs_require__(292);__w_pdfjs_require__(300);__w_pdfjs_require__(301);__w_pdfjs_require__(258);__w_pdfjs_require__(255);__w_pdfjs_require__(92);__w_pdfjs_require__(104);__w_pdfjs_require__(85);__w_pdfjs_require__(90);__w_pdfjs_require__(306);__w_pdfjs_require__(307);__w_pdfjs_require__(308);__w_pdfjs_require__(309);__w_pdfjs_require__(2);__w_pdfjs_require__(310);Object.defineProperty(exports,"__esModule",{value:!0});exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultFilterFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0;Object.defineProperty(exports,"SVGGraphics",{enumerable:!0,get:function get(){return _displaySvg.SVGGraphics}});exports.build=void 0;exports.getDocument=getDocument;exports.version=void 0;__w_pdfjs_require__(140);__w_pdfjs_require__(146);__w_pdfjs_require__(148);__w_pdfjs_require__(149);__w_pdfjs_require__(152);__w_pdfjs_require__(163);__w_pdfjs_require__(164);__w_pdfjs_require__(165);__w_pdfjs_require__(166);__w_pdfjs_require__(123);__w_pdfjs_require__(112);__w_pdfjs_require__(122);__w_pdfjs_require__(259);__w_pdfjs_require__(171);__w_pdfjs_require__(192);__w_pdfjs_require__(193);__w_pdfjs_require__(196);__w_pdfjs_require__(197);__w_pdfjs_require__(198);__w_pdfjs_require__(203);__w_pdfjs_require__(204);__w_pdfjs_require__(205);__w_pdfjs_require__(207);__w_pdfjs_require__(208);__w_pdfjs_require__(209);__w_pdfjs_require__(210);__w_pdfjs_require__(211);__w_pdfjs_require__(212);__w_pdfjs_require__(213);__w_pdfjs_require__(216);__w_pdfjs_require__(217);__w_pdfjs_require__(219);__w_pdfjs_require__(220);__w_pdfjs_require__(221);__w_pdfjs_require__(222);__w_pdfjs_require__(223);__w_pdfjs_require__(224);__w_pdfjs_require__(228);__w_pdfjs_require__(229);__w_pdfjs_require__(231);__w_pdfjs_require__(232);__w_pdfjs_require__(233);__w_pdfjs_require__(235);__w_pdfjs_require__(238);__w_pdfjs_require__(244);__w_pdfjs_require__(167);__w_pdfjs_require__(280);__w_pdfjs_require__(312);__w_pdfjs_require__(314);__w_pdfjs_require__(325);__w_pdfjs_require__(327);__w_pdfjs_require__(329);__w_pdfjs_require__(331);__w_pdfjs_require__(333);__w_pdfjs_require__(335);__w_pdfjs_require__(337);__w_pdfjs_require__(249);__w_pdfjs_require__(245);__w_pdfjs_require__(338);__w_pdfjs_require__(342);__w_pdfjs_require__(343);__w_pdfjs_require__(344);__w_pdfjs_require__(105);__w_pdfjs_require__(289);__w_pdfjs_require__(302);__w_pdfjs_require__(257);__w_pdfjs_require__(346);__w_pdfjs_require__(347);var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(349),_display_utils=__w_pdfjs_require__(362),_font_loader=__w_pdfjs_require__(373),_displayNode_utils=__w_pdfjs_require__(374),_canvas=__w_pdfjs_require__(375),_worker_options=__w_pdfjs_require__(384),_message_handler=__w_pdfjs_require__(385),_metadata=__w_pdfjs_require__(387),_optional_content_config=__w_pdfjs_require__(388),_transport_stream=__w_pdfjs_require__(389),_displayFetch_stream=__w_pdfjs_require__(391),_displayNetwork=__w_pdfjs_require__(394),_displayNode_stream=__w_pdfjs_require__(395),_displaySvg=__w_pdfjs_require__(396),_xfa_text=__w_pdfjs_require__(399);function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,a){_checkPrivateRedeclaration(t,r);r.set(t,a)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return _classApplyDescriptorGet(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function _classPrivateFieldSet(t,r,a){_classApplyDescriptorSet(t,_classExtractFieldDescriptor(t,r,"set"),a);return a}function _classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_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(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,r,a){t[r]=a.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,o){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(o||[]);return i(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var h={};define(h,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&a.call(v,l)&&(h=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(h);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,o,l,c){var u=tryCatch(t[i],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==_typeof(h)&&a.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function value(t,a){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,a,r,i)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,a){var i="suspendedStart";return function(o,l){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw l;return{value:void 0,done:!0}}for(a.method=o,a.arg=l;;){var c=a.delegate;if(c){var u=maybeInvokeDelegate(c,a);if(u){if(u===d)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===i)throw i="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i="executing";var h=tryCatch(t,r,a);if("normal"===h.type){if(i=a.done?"completed":"suspendedYield",h.arg===d)continue;return{value:h.arg,done:a.done}}"throw"===h.type&&(i="completed",a.method="throw",a.arg=h.arg)}}}function maybeInvokeDelegate(t,r){var a=r.method,i=t.iterator[a];if(void 0===i)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),d;var o=tryCatch(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,d):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function next(){for(;++i<t.length;)if(a.call(t,i))return next.value=t[i],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,i(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),i(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(r,a,i,o),l);return t.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(y),define(y,u,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(a,i){return l.type="throw",l.arg=t,r.next=a,i&&(r.method="next",r.arg=void 0),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,d):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),d}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,a){return this.delegate={iterator:values(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=void 0),d}},t}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function _toPropertyKey(t){var r=_toPrimitive(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function _classStaticPrivateFieldSpecSet(t,r,a,i){_classCheckPrivateStaticAccess(t,r);_classCheckPrivateStaticFieldDescriptor(a,"set");_classApplyDescriptorSet(t,a,i);return i}function _classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}function _classStaticPrivateFieldSpecGet(t,r,a){_classCheckPrivateStaticAccess(t,r);_classCheckPrivateStaticFieldDescriptor(a,"get");return _classApplyDescriptorGet(t,a)}function _classCheckPrivateStaticFieldDescriptor(t,r){if(void 0===t)throw new TypeError("attempted to "+r+" private static field before its declaration")}function _classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _slicedToArray(t,r){return _arrayWithHoles(t)||_iterableToArrayLimit(t,r)||_unsupportedIterableToArray(t,r)||_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(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,ServiceWorkerOptions={showUnverifiedSignatures:!1};window.ServiceWorkerOptions=ServiceWorkerOptions;var DefaultCanvasFactory=_util.isNodeJS?_displayNode_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;var DefaultCMapReaderFactory=_util.isNodeJS?_displayNode_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;var DefaultFilterFactory=_util.isNodeJS?_displayNode_utils.NodeFilterFactory:_display_utils.DOMFilterFactory;exports.DefaultFilterFactory=DefaultFilterFactory;var DefaultStandardFontDataFactory=_util.isNodeJS?_displayNode_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory;exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;function getDocument(t){var r,a;"string"==typeof t||t instanceof URL?t={url:t}:(0,_util.isArrayBuffer)(t)&&(t={data:t});if("object"!==_typeof(t))throw new Error("Invalid parameter in getDocument, need parameter object.");if(!t.url&&!t.data&&!t.range)throw new Error("Invalid parameter object: need either .data, .range or .url");var i=new PDFDocumentLoadingTask,o=i.docId,l=t.url?getUrlProp(t.url,t.baseHref):null,c=t.data?getDataProp(t.data):null,u=t.httpHeaders||null,d=!0===t.withCredentials,h=null!==(r=t.password)&&void 0!==r?r:null,p=t.range instanceof PDFDataRangeTransport?t.range:null,v=Number.isInteger(t.rangeChunkSize)&&t.rangeChunkSize>0?t.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE,y=t.worker instanceof PDFWorker?t.worker:null,_=t.verbosity,g="string"!=typeof t.docBaseUrl||(0,_display_utils.isDataScheme)(t.docBaseUrl)?null:t.docBaseUrl,m="function"==typeof t.cMapUrl?t.cMapUrl():"string"==typeof t.cMapUrl?t.cMapUrl:null,b=!1!==t.cMapPacked,w=t.CMapReaderFactory||DefaultCMapReaderFactory,P="function"==typeof t.standardFontDataUrl?t.standardFontDataUrl():"string"==typeof t.standardFontDataUrl?t.standardFontDataUrl:null,A=t.StandardFontDataFactory||DefaultStandardFontDataFactory,S=!0!==t.stopAtErrors,k=Number.isInteger(t.maxImageSize)&&t.maxImageSize>-1?t.maxImageSize:-1,x=!1!==t.isEvalSupported,E="boolean"==typeof t.isOffscreenCanvasSupported?t.isOffscreenCanvasSupported:!_util.isNodeJS,T=Number.isInteger(t.canvasMaxAreaInBytes)?t.canvasMaxAreaInBytes:-1,C="boolean"==typeof t.disableFontFace?t.disableFontFace:_util.isNodeJS,I=!0===t.fontExtraProperties,M=!0===t.enableXfa,O=t.ownerDocument||globalThis.document,R=!0===t.disableRange,G=!0===t.disableStream,L=!0===t.disableAutoFetch,D=!0===t.pdfBug,j=p?p.length:null!==(a=t.length)&&void 0!==a?a:NaN,N="boolean"==typeof t.useSystemFonts?t.useSystemFonts:!_util.isNodeJS&&!C,W="boolean"==typeof t.useWorkerFetch?t.useWorkerFetch:w===_display_utils.DOMCMapReaderFactory&&A===_display_utils.DOMStandardFontDataFactory&&m&&P&&(0,_display_utils.isValidFetchUrl)(m,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(P,document.baseURI),B=t.canvasFactory||new DefaultCanvasFactory({ownerDocument:O}),U=t.filterFactory||new DefaultFilterFactory({docId:o,ownerDocument:O});(0,_util.setVerbosityLevel)(_);var H={canvasFactory:B,filterFactory:U};if(!W){H.cMapReaderFactory=new w({baseUrl:m,isCompressed:b});H.standardFontDataFactory=new A({baseUrl:P})}if(!y){var z={verbosity:_,port:_worker_options.GlobalWorkerOptions.workerPort};y=z.port?PDFWorker.fromPort(z):new PDFWorker(z);i._worker=y}var q={docId:o,apiVersion:"3.11.440",data:c,password:h,disableAutoFetch:L,rangeChunkSize:v,length:j,docBaseUrl:g,enableXfa:M,evaluatorOptions:{maxImageSize:k,disableFontFace:C,ignoreErrors:S,isEvalSupported:x,isOffscreenCanvasSupported:E,canvasMaxAreaInBytes:T,fontExtraProperties:I,useSystemFonts:N,cMapUrl:W?m:null,standardFontDataUrl:W?P:null}},V={ignoreErrors:S,isEvalSupported:x,disableFontFace:C,fontExtraProperties:I,enableXfa:M,ownerDocument:O,disableAutoFetch:L,pdfBug:D,styleElement:null};y.promise.then((function(){if(i.destroyed)throw new Error("Loading aborted");var t=_fetchDocument(y,q),r=new Promise((function(t){var r;if(p)r=new _transport_stream.PDFDataTransportStream({length:j,initialData:p.initialData,progressiveDone:p.progressiveDone,contentDispositionFilename:p.contentDispositionFilename,disableRange:R,disableStream:G},p);else if(!c){r=function createPDFNetworkStream(t){return _util.isNodeJS?new _displayNode_stream.PDFNodeStream(t):(0,_display_utils.isValidFetchUrl)(t.url)?new _displayFetch_stream.PDFFetchStream(t):new _displayNetwork.PDFNetworkStream(t)}({url:l,length:j,httpHeaders:u,withCredentials:d,rangeChunkSize:v,disableRange:R,disableStream:G})}t(r)}));return Promise.all([t,r]).then((function(t){var r=_slicedToArray(t,2),a=r[0],l=r[1];if(i.destroyed)throw new Error("Loading aborted");var c=new _message_handler.MessageHandler(o,a,y.port),u=new WorkerTransport(c,i,l,V,H);i._transport=u;c.send("showUnverifiedSignatures",window.ServiceWorkerOptions.showUnverifiedSignatures);c.send("Ready",null)}))})).catch(i._capability.reject);return i}function _fetchDocument(t,r){return _fetchDocument2.apply(this,arguments)}function _fetchDocument2(){return(_fetchDocument2=_asyncToGenerator(_regeneratorRuntime().mark((function _callee6(t,r){var a;return _regeneratorRuntime().wrap((function _callee6$(i){for(;;)switch(i.prev=i.next){case 0:if(!t.destroyed){i.next=2;break}throw new Error("Worker was destroyed");case 2:i.next=4;return t.messageHandler.sendWithPromise("GetDocRequest",r,r.data?[r.data.buffer]:null);case 4:a=i.sent;if(!t.destroyed){i.next=7;break}throw new Error("Worker was destroyed");case 7:return i.abrupt("return",a);case 8:case"end":return i.stop()}}),_callee6)})))).apply(this,arguments)}function getUrlProp(t,r){if(t instanceof URL)return t.href;try{return r?new URL(t,window.location.origin+r).href:new URL(t,window.location).href}catch(r){if(_util.isNodeJS&&"string"==typeof t)return t}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(t){if(_util.isNodeJS&&"undefined"!=typeof Buffer&&t instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength)return t;if("string"==typeof t)return(0,_util.stringToBytes)(t);if("object"===_typeof(t)&&!isNaN(null==t?void 0:t.length)||(0,_util.isArrayBuffer)(t))return new Uint8Array(t);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}var PDFDocumentLoadingTask=function(){function PDFDocumentLoadingTask(){var t,r;_classCallCheck(this,PDFDocumentLoadingTask);this._capability=new _util.PromiseCapability;this._transport=null;this._worker=null;this.docId="d".concat((_classStaticPrivateFieldSpecSet(PDFDocumentLoadingTask,PDFDocumentLoadingTask,_docId,(t=_classStaticPrivateFieldSpecGet(PDFDocumentLoadingTask,PDFDocumentLoadingTask,_docId),r=t++,t)),r));this.destroyed=!1;this.onPassword=null;this.onProgress=null}_createClass(PDFDocumentLoadingTask,[{key:"promise",get:function get(){return this._capability.promise}},{key:"destroy",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r,a;return _regeneratorRuntime().wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:this.destroyed=!0;i.prev=1;null!==(t=this._worker)&&void 0!==t&&t.port&&(this._worker._pendingDestroy=!0);i.next=5;return null===(r=this._transport)||void 0===r?void 0:r.destroy();case 5:i.next=11;break;case 7:i.prev=7;i.t0=i.catch(1);null!==(a=this._worker)&&void 0!==a&&a.port&&delete this._worker._pendingDestroy;throw i.t0;case 11:this._transport=null;if(this._worker){this._worker.destroy();this._worker=null}case 13:case"end":return i.stop()}}),_callee,this,[[1,7]])}))),function destroy(){return t.apply(this,arguments)})}]);var t;return PDFDocumentLoadingTask}();exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;var _docId={writable:!0,value:0},PDFDataRangeTransport=function(){function PDFDataRangeTransport(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,PDFDataRangeTransport);this.length=t;this.initialData=r;this.progressiveDone=a;this.contentDispositionFilename=i;this._rangeListeners=[];this._progressListeners=[];this._progressiveReadListeners=[];this._progressiveDoneListeners=[];this._readyCapability=new _util.PromiseCapability}_createClass(PDFDataRangeTransport,[{key:"addRangeListener",value:function addRangeListener(t){this._rangeListeners.push(t)}},{key:"addProgressListener",value:function addProgressListener(t){this._progressListeners.push(t)}},{key:"addProgressiveReadListener",value:function addProgressiveReadListener(t){this._progressiveReadListeners.push(t)}},{key:"addProgressiveDoneListener",value:function addProgressiveDoneListener(t){this._progressiveDoneListeners.push(t)}},{key:"onDataRange",value:function onDataRange(t,r){var a,i=_createForOfIteratorHelper(this._rangeListeners);try{for(i.s();!(a=i.n()).done;){(0,a.value)(t,r)}}catch(t){i.e(t)}finally{i.f()}}},{key:"onDataProgress",value:function onDataProgress(t,r){var a=this;this._readyCapability.promise.then((function(){var i,o=_createForOfIteratorHelper(a._progressListeners);try{for(o.s();!(i=o.n()).done;){(0,i.value)(t,r)}}catch(t){o.e(t)}finally{o.f()}}))}},{key:"onDataProgressiveRead",value:function onDataProgressiveRead(t){var r=this;this._readyCapability.promise.then((function(){var a,i=_createForOfIteratorHelper(r._progressiveReadListeners);try{for(i.s();!(a=i.n()).done;){(0,a.value)(t)}}catch(t){i.e(t)}finally{i.f()}}))}},{key:"onDataProgressiveDone",value:function onDataProgressiveDone(){var t=this;this._readyCapability.promise.then((function(){var r,a=_createForOfIteratorHelper(t._progressiveDoneListeners);try{for(a.s();!(r=a.n()).done;){(0,r.value)()}}catch(t){a.e(t)}finally{a.f()}}))}},{key:"transportReady",value:function transportReady(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function requestDataRange(t,r){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function abort(){}}]);return PDFDataRangeTransport}();exports.PDFDataRangeTransport=PDFDataRangeTransport;var PDFDocumentProxy=function(){function PDFDocumentProxy(t,r){var a=this;_classCallCheck(this,PDFDocumentProxy);this._pdfInfo=t;this._transport=r;Object.defineProperty(this,"getJavaScript",{value:function value(){(0,_display_utils.deprecated)("`PDFDocumentProxy.getJavaScript`, please use `PDFDocumentProxy.getJSActions` instead.");return a.getJSActions().then((function(t){if(!t)return t;var r=[];for(var a in t)r.push.apply(r,_toConsumableArray(t[a]));return r}))}})}_createClass(PDFDocumentProxy,[{key:"annotationStorage",get:function get(){return this._transport.annotationStorage}},{key:"filterFactory",get:function get(){return this._transport.filterFactory}},{key:"numPages",get:function get(){return this._pdfInfo.numPages}},{key:"fingerprints",get:function get(){return this._pdfInfo.fingerprints}},{key:"isPureXfa",get:function get(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}},{key:"allXfaHtml",get:function get(){return this._transport._htmlForXfa}},{key:"getPage",value:function getPage(t){return this._transport.getPage(t)}},{key:"getPageIndex",value:function getPageIndex(t){return this._transport.getPageIndex(t)}},{key:"getDestinations",value:function getDestinations(){return this._transport.getDestinations()}},{key:"getDestination",value:function getDestination(t){return this._transport.getDestination(t)}},{key:"getPageLabels",value:function getPageLabels(){return this._transport.getPageLabels()}},{key:"getPageLayout",value:function getPageLayout(){return this._transport.getPageLayout()}},{key:"getPageMode",value:function getPageMode(){return this._transport.getPageMode()}},{key:"getViewerPreferences",value:function getViewerPreferences(){return this._transport.getViewerPreferences()}},{key:"getOpenAction",value:function getOpenAction(){return this._transport.getOpenAction()}},{key:"getAttachments",value:function getAttachments(){return this._transport.getAttachments()}},{key:"getJSActions",value:function getJSActions(){return this._transport.getDocJSActions()}},{key:"getOutline",value:function getOutline(){return this._transport.getOutline()}},{key:"getOptionalContentConfig",value:function getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}},{key:"getPermissions",value:function getPermissions(){return this._transport.getPermissions()}},{key:"getMetadata",value:function getMetadata(){return this._transport.getMetadata()}},{key:"getMarkInfo",value:function getMarkInfo(){return this._transport.getMarkInfo()}},{key:"getData",value:function getData(){return this._transport.getData()}},{key:"saveDocument",value:function saveDocument(){return this._transport.saveDocument()}},{key:"getDownloadInfo",value:function getDownloadInfo(){return this._transport.downloadInfoCapability.promise}},{key:"cleanup",value:function cleanup(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(t||this.isPureXfa)}},{key:"destroy",value:function destroy(){return this.loadingTask.destroy()}},{key:"loadingParams",get:function get(){return this._transport.loadingParams}},{key:"loadingTask",get:function get(){return this._transport.loadingTask}},{key:"getFieldObjects",value:function getFieldObjects(){return this._transport.getFieldObjects()}},{key:"hasJSActions",value:function hasJSActions(){return this._transport.hasJSActions()}},{key:"getCalculationOrderIds",value:function getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}]);return PDFDocumentProxy}();exports.PDFDocumentProxy=PDFDocumentProxy;var _delayedCleanupTimeout=new WeakMap,_pendingCleanup=new WeakMap,_tryCleanup=new WeakSet,_abortDelayedCleanup=new WeakSet,PDFPageProxy=function(){function PDFPageProxy(t,r,a){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];_classCallCheck(this,PDFPageProxy);_classPrivateMethodInitSpec(this,_abortDelayedCleanup);_classPrivateMethodInitSpec(this,_tryCleanup);_classPrivateFieldInitSpec(this,_delayedCleanupTimeout,{writable:!0,value:null});_classPrivateFieldInitSpec(this,_pendingCleanup,{writable:!0,value:!1});this._pageIndex=t;this._pageInfo=r;this._transport=a;this._stats=i?new _display_utils.StatTimer:null;this._pdfBug=i;this.commonObjs=a.commonObjs;this.objs=new PDFObjects;this._maybeCleanupAfterRender=!1;this._intentStates=new Map;this.destroyed=!1}_createClass(PDFPageProxy,[{key:"pageNumber",get:function get(){return this._pageIndex+1}},{key:"rotate",get:function get(){return this._pageInfo.rotate}},{key:"ref",get:function get(){return this._pageInfo.ref}},{key:"userUnit",get:function get(){return this._pageInfo.userUnit}},{key:"view",get:function get(){return this._pageInfo.view}},{key:"getViewport",value:function getViewport(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,a=t.rotation,i=void 0===a?this.rotate:a,o=t.offsetX,l=void 0===o?0:o,c=t.offsetY,u=void 0===c?0:c,d=t.dontFlip,h=void 0!==d&&d;return new _display_utils.PageViewport({viewBox:this.view,scale:r,rotation:i,offsetX:l,offsetY:u,dontFlip:h})}},{key:"getAnnotations",value:function getAnnotations(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).intent,r=void 0===t?"display":t,a=this._transport.getRenderingIntent(r);return this._transport.getAnnotations(this._pageIndex,a.renderingIntent)}},{key:"getJSActions",value:function getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}},{key:"filterFactory",get:function get(){return this._transport.filterFactory}},{key:"isPureXfa",get:function get(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}},{key:"getXfa",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t;return _regeneratorRuntime().wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(null===(t=this._transport._htmlForXfa)||void 0===t?void 0:t.children[this._pageIndex])||null);case 1:case"end":return r.stop()}}),_callee2,this)}))),function getXfa(){return t.apply(this,arguments)})},{key:"render",value:function render(t){var r,a,i=this,o=t.canvasContext,l=t.viewport,c=t.intent,u=void 0===c?"display":c,d=t.annotationMode,h=void 0===d?_util.AnnotationMode.ENABLE:d,p=t.transform,v=void 0===p?null:p,y=t.background,_=void 0===y?null:y,g=t.optionalContentConfigPromise,m=void 0===g?null:g,b=t.annotationCanvasMap,w=void 0===b?null:b,P=t.pageColors,A=void 0===P?null:P,S=t.printAnnotationStorage,k=void 0===S?null:S;null===(r=this._stats)||void 0===r||r.time("Overall");var x=this._transport.getRenderingIntent(u,h,k);_classPrivateFieldSet(this,_pendingCleanup,!1);_classPrivateMethodGet(this,_abortDelayedCleanup,_abortDelayedCleanup2).call(this);m||(m=this._transport.getOptionalContentConfig());var E=this._intentStates.get(x.cacheKey);if(!E){E=Object.create(null);this._intentStates.set(x.cacheKey,E)}if(E.streamReaderCancelTimeout){clearTimeout(E.streamReaderCancelTimeout);E.streamReaderCancelTimeout=null}var T=!!(x.renderingIntent&_util.RenderingIntentFlag.PRINT);if(!E.displayReadyCapability){var C;E.displayReadyCapability=new _util.PromiseCapability;E.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null};null===(C=this._stats)||void 0===C||C.time("Page Request");this._pumpOperatorList(x)}var I=function complete(t){var r,a;E.renderTasks.delete(M);(i._maybeCleanupAfterRender||T)&&_classPrivateFieldSet(i,_pendingCleanup,!0);_classPrivateMethodGet(i,_tryCleanup,_tryCleanup2).call(i,!T);if(t){M.capability.reject(t);i._abortOperatorList({intentState:E,reason:t instanceof Error?t:new Error(t)})}else M.capability.resolve();null===(r=i._stats)||void 0===r||r.timeEnd("Rendering");null===(a=i._stats)||void 0===a||a.timeEnd("Overall")},M=new InternalRenderTask({callback:I,params:{canvasContext:o,viewport:l,transform:v,background:_},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:w,operatorList:E.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!T,pdfBug:this._pdfBug,pageColors:A});((a=E).renderTasks||(a.renderTasks=new Set)).add(M);var O=M.task;Promise.all([E.displayReadyCapability.promise,m]).then((function(t){var r,a=_slicedToArray(t,2),o=a[0],l=a[1];if(i.destroyed)I();else{null===(r=i._stats)||void 0===r||r.time("Rendering");M.initializeGraphics({transparency:o,optionalContentConfig:l});M.operatorListChanged()}})).catch(I);return O}},{key:"getOperatorList",value:function getOperatorList(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.intent,a=void 0===r?"display":r,i=t.annotationMode,o=void 0===i?_util.AnnotationMode.ENABLE:i,l=t.printAnnotationStorage,c=void 0===l?null:l;var u,d=this._transport.getRenderingIntent(a,o,c,!0),h=this._intentStates.get(d.cacheKey);if(!h){h=Object.create(null);this._intentStates.set(d.cacheKey,h)}if(!h.opListReadCapability){var p,v;(u=Object.create(null)).operatorListChanged=function operatorListChanged(){if(h.operatorList.lastChunk){h.opListReadCapability.resolve(h.operatorList);h.renderTasks.delete(u)}};h.opListReadCapability=new _util.PromiseCapability;((p=h).renderTasks||(p.renderTasks=new Set)).add(u);h.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null};null===(v=this._stats)||void 0===v||v.time("Page Request");this._pumpOperatorList(d)}return h.opListReadCapability.promise}},{key:"streamTextContent",value:function streamTextContent(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.includeMarkedContent,a=void 0!==r&&r,i=t.disableNormalization,o=void 0!==i&&i;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===a,disableNormalization:!0===o},{highWaterMark:100,size:function size(t){return t.items.length}})}},{key:"getTextContent",value:function getTextContent(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then((function(t){return _xfa_text.XfaText.textContent(t)}));var r=this.streamTextContent(t);return new Promise((function(t,a){var i=r.getReader(),o={items:[],styles:Object.create(null)};!function pump(){i.read().then((function(r){var a,i=r.value;if(r.done)t(o);else{Object.assign(o.styles,i.styles);(a=o.items).push.apply(a,_toConsumableArray(i.items));pump()}}),a)}()}))}},{key:"getStructTree",value:function getStructTree(){return this._transport.getStructTree(this._pageIndex)}},{key:"_destroy",value:function _destroy(){this.destroyed=!0;var t,r=[],a=_createForOfIteratorHelper(this._intentStates.values());try{for(a.s();!(t=a.n()).done;){var i=t.value;this._abortOperatorList({intentState:i,reason:new Error("Page was destroyed."),force:!0});if(!i.opListReadCapability){var o,l=_createForOfIteratorHelper(i.renderTasks);try{for(l.s();!(o=l.n()).done;){var c=o.value;r.push(c.completed);c.cancel()}}catch(t){l.e(t)}finally{l.f()}}}}catch(t){a.e(t)}finally{a.f()}this.objs.clear();_classPrivateFieldSet(this,_pendingCleanup,!1);_classPrivateMethodGet(this,_abortDelayedCleanup,_abortDelayedCleanup2).call(this);return Promise.all(r)}},{key:"cleanup",value:function cleanup(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];_classPrivateFieldSet(this,_pendingCleanup,!0);var r=_classPrivateMethodGet(this,_tryCleanup,_tryCleanup2).call(this,!1);t&&r&&this._stats&&(this._stats=new _display_utils.StatTimer);return r}},{key:"_startRenderPage",value:function _startRenderPage(t,r){var a,i,o=this._intentStates.get(r);if(o){null===(a=this._stats)||void 0===a||a.timeEnd("Page Request");null===(i=o.displayReadyCapability)||void 0===i||i.resolve(t)}}},{key:"_renderPageChunk",value:function _renderPageChunk(t,r){for(var a=0,i=t.length;a<i;a++){r.operatorList.fnArray.push(t.fnArray[a]);r.operatorList.argsArray.push(t.argsArray[a])}r.operatorList.lastChunk=t.lastChunk;r.operatorList.separateAnnots=t.separateAnnots;var o,l=_createForOfIteratorHelper(r.renderTasks);try{for(l.s();!(o=l.n()).done;){o.value.operatorListChanged()}}catch(t){l.e(t)}finally{l.f()}t.lastChunk&&_classPrivateMethodGet(this,_tryCleanup,_tryCleanup2).call(this,!0)}},{key:"_pumpOperatorList",value:function _pumpOperatorList(t){var r=this,a=t.renderingIntent,i=t.cacheKey,o=t.annotationStorageSerializable,l=o.map,c=o.transfers,u=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:a,cacheKey:i,annotationStorage:l},c).getReader(),d=this._intentStates.get(i);d.streamReader=u;!function pump(){u.read().then((function(t){var a=t.value;if(t.done)d.streamReader=null;else if(!r._transport.destroyed){r._renderPageChunk(a,d);pump()}}),(function(t){d.streamReader=null;if(!r._transport.destroyed){if(d.operatorList){d.operatorList.lastChunk=!0;var a,i=_createForOfIteratorHelper(d.renderTasks);try{for(i.s();!(a=i.n()).done;){a.value.operatorListChanged()}}catch(t){i.e(t)}finally{i.f()}_classPrivateMethodGet(r,_tryCleanup,_tryCleanup2).call(r,!0)}if(d.displayReadyCapability)d.displayReadyCapability.reject(t);else{if(!d.opListReadCapability)throw t;d.opListReadCapability.reject(t)}}}))}()}},{key:"_abortOperatorList",value:function _abortOperatorList(t){var r=this,a=t.intentState,i=t.reason,o=t.force,l=void 0!==o&&o;if(a.streamReader){if(a.streamReaderCancelTimeout){clearTimeout(a.streamReaderCancelTimeout);a.streamReaderCancelTimeout=null}if(!l){if(a.renderTasks.size>0)return;if(i instanceof _display_utils.RenderingCancelledException){var c=RENDERING_CANCELLED_TIMEOUT;i.extraDelay>0&&i.extraDelay<1e3&&(c+=i.extraDelay);a.streamReaderCancelTimeout=setTimeout((function(){a.streamReaderCancelTimeout=null;r._abortOperatorList({intentState:a,reason:i,force:!0})}),c);return}}a.streamReader.cancel(new _util.AbortException(i.message)).catch((function(){}));a.streamReader=null;if(!this._transport.destroyed){var u,d=_createForOfIteratorHelper(this._intentStates);try{for(d.s();!(u=d.n()).done;){var h=_slicedToArray(u.value,2),p=h[0];if(h[1]===a){this._intentStates.delete(p);break}}}catch(t){d.e(t)}finally{d.f()}this.cleanup()}}}},{key:"stats",get:function get(){return this._stats}}]);var t;return PDFPageProxy}();exports.PDFPageProxy=PDFPageProxy;function _tryCleanup2(){var t=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];_classPrivateMethodGet(this,_abortDelayedCleanup,_abortDelayedCleanup2).call(this);if(!_classPrivateFieldGet(this,_pendingCleanup)||this.destroyed)return!1;if(r){_classPrivateFieldSet(this,_delayedCleanupTimeout,setTimeout((function(){_classPrivateFieldSet(t,_delayedCleanupTimeout,null);_classPrivateMethodGet(t,_tryCleanup,_tryCleanup2).call(t,!1)}),DELAYED_CLEANUP_TIMEOUT));return!1}var a,i=_createForOfIteratorHelper(this._intentStates.values());try{for(i.s();!(a=i.n()).done;){var o=a.value,l=o.renderTasks,c=o.operatorList;if(l.size>0||!c.lastChunk)return!1}}catch(t){i.e(t)}finally{i.f()}this._intentStates.clear();this.objs.clear();_classPrivateFieldSet(this,_pendingCleanup,!1);return!0}function _abortDelayedCleanup2(){if(_classPrivateFieldGet(this,_delayedCleanupTimeout)){clearTimeout(_classPrivateFieldGet(this,_delayedCleanupTimeout));_classPrivateFieldSet(this,_delayedCleanupTimeout,null)}}var _listeners=new WeakMap,_deferred=new WeakMap,LoopbackPort=function(){function LoopbackPort(){_classCallCheck(this,LoopbackPort);_classPrivateFieldInitSpec(this,_listeners,{writable:!0,value:new Set});_classPrivateFieldInitSpec(this,_deferred,{writable:!0,value:Promise.resolve()})}_createClass(LoopbackPort,[{key:"postMessage",value:function postMessage(t,r){var a=this,i={data:structuredClone(t,null)};_classPrivateFieldGet(this,_deferred).then((function(){var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(a,_listeners));try{for(r.s();!(t=r.n()).done;){t.value.call(a,i)}}catch(t){r.e(t)}finally{r.f()}}))}},{key:"addEventListener",value:function addEventListener(t,r){_classPrivateFieldGet(this,_listeners).add(r)}},{key:"removeEventListener",value:function removeEventListener(t,r){_classPrivateFieldGet(this,_listeners).delete(r)}},{key:"terminate",value:function terminate(){_classPrivateFieldGet(this,_listeners).clear()}}]);return LoopbackPort}();exports.LoopbackPort=LoopbackPort;var PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};exports.PDFWorkerUtil=PDFWorkerUtil;if(_util.isNodeJS&&"function"==typeof require){PDFWorkerUtil.isWorkerDisabled=!0;PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js"}else if("object"===("undefined"==typeof document?"undefined":_typeof(document))){var _document,pdfjsFilePath=null===(_document=document)||void 0===_document||null===(_document=_document.currentScript)||void 0===_document?void 0:_document.src;pdfjsFilePath&&(PDFWorkerUtil.fallbackWorkerSrc=pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(t,r){var a;try{if(!(a=new URL(t)).origin||"null"===a.origin)return!1}catch(t){return!1}var i=new URL(r,a);return a.origin===i.origin};PDFWorkerUtil.createCDNWrapper=function(t){var r='importScripts("'.concat(t,'");');return URL.createObjectURL(new Blob([r]))};var _generateTrustedURL=new WeakSet,PDFWorker=function(){function PDFWorker(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.name,a=void 0===r?null:r,i=t.port,o=void 0===i?null:i,l=t.verbosity,c=void 0===l?(0,_util.getVerbosityLevel)():l;_classCallCheck(this,PDFWorker);_classPrivateMethodInitSpec(this,_generateTrustedURL);this.name=a;this.destroyed=!1;this.verbosity=c;this._readyCapability=new _util.PromiseCapability;this._port=null;this._webWorker=null;this._messageHandler=null;if(o){var u;if(null!==(u=_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_workerPorts))&&void 0!==u&&u.has(o))throw new Error("Cannot use more than one PDFWorker per port.");(_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_workerPorts)||_classStaticPrivateFieldSpecSet(PDFWorker,PDFWorker,_workerPorts,new WeakMap)).set(o,this);this._initializeFromPort(o)}else this._initialize()}_createClass(PDFWorker,[{key:"promise",get:function get(){return this._readyCapability.promise}},{key:"port",get:function get(){return this._port}},{key:"messageHandler",get:function get(){return this._messageHandler}},{key:"_initializeFromPort",value:function _initializeFromPort(t){this._port=t;this._messageHandler=new _message_handler.MessageHandler("main","worker",t);this._messageHandler.on("ready",(function(){}));this._readyCapability.resolve();this._messageHandler.send("configure",{verbosity:this.verbosity})}},{key:"_initialize",value:function _initialize(){var t=this;if(!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){var r=PDFWorker.workerSrc;try{PDFWorkerUtil.isSameOrigin(window.location.href,r)||(r=PDFWorkerUtil.createCDNWrapper(new URL(r,window.location).href));var a=new Worker(_classPrivateMethodGet(this,_generateTrustedURL,_generateTrustedURL2).call(this,r)),i=new _message_handler.MessageHandler("main","worker",a),o=function terminateEarly(){a.removeEventListener("error",l);i.destroy();a.terminate();t.destroyed?t._readyCapability.reject(new Error("Worker was destroyed")):t._setupFakeWorker()},l=function onWorkerError(){t._webWorker||o()};a.addEventListener("error",l);i.on("test",(function(r){a.removeEventListener("error",l);if(t.destroyed)o();else if(r){t._messageHandler=i;t._port=a;t._webWorker=a;t._readyCapability.resolve();i.send("configure",{verbosity:t.verbosity})}else{t._setupFakeWorker();i.destroy();a.terminate()}}));i.on("ready",(function(r){a.removeEventListener("error",l);if(t.destroyed)o();else try{c()}catch(r){t._setupFakeWorker()}}));var c=function sendTest(){var t=new Uint8Array;i.send("test",t,[t.buffer])};c();return}catch(t){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function _setupFakeWorker(){var t=this;if(!PDFWorkerUtil.isWorkerDisabled){(0,_util.warn)("Setting up fake worker.");PDFWorkerUtil.isWorkerDisabled=!0}PDFWorker._setupFakeWorkerGlobal.then((function(r){if(t.destroyed)t._readyCapability.reject(new Error("Worker was destroyed"));else{var a=new LoopbackPort;t._port=a;var i="fake".concat(PDFWorkerUtil.fakeWorkerId++),o=new _message_handler.MessageHandler(i+"_worker",i,a);r.setup(o,a);var l=new _message_handler.MessageHandler(i,i+"_worker",a);t._messageHandler=l;t._readyCapability.resolve();l.send("configure",{verbosity:t.verbosity})}})).catch((function(r){t._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(r.message,'".')))}))}},{key:"destroy",value:function destroy(){var t;this.destroyed=!0;if(this._webWorker){this._webWorker.terminate();this._webWorker=null}null===(t=_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_workerPorts))||void 0===t||t.delete(this._port);this._port=null;if(this._messageHandler){this._messageHandler.destroy();this._messageHandler=null}}}],[{key:"fromPort",value:function fromPort(t){var r;if(null==t||!t.port)throw new Error("PDFWorker.fromPort - invalid method signature.");var a=null===(r=_classStaticPrivateFieldSpecGet(this,PDFWorker,_workerPorts))||void 0===r?void 0:r.get(t.port);if(a){if(a._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return a}return new PDFWorker(t)}},{key:"workerSrc",get:function get(){if(_worker_options.GlobalWorkerOptions.workerSrc)return"Function"===_worker_options.GlobalWorkerOptions.workerSrc.constructor.name?_worker_options.GlobalWorkerOptions.workerSrc():_worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc){_util.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.');return PDFWorkerUtil.fallbackWorkerSrc}throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}},{key:"_mainThreadWorkerMessageHandler",get:function get(){try{var t;return(null===(t=globalThis.pdfjsWorker)||void 0===t?void 0:t.WorkerMessageHandler)||null}catch(t){return null}}},{key:"_setupFakeWorkerGlobal",get:function get(){var _this11=this,loader=function(){var _ref15=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var mainWorkerMessageHandler,worker;return _regeneratorRuntime().wrap((function _callee3$(_context3){for(;;)switch(_context3.prev=_context3.next){case 0:mainWorkerMessageHandler=_this11._mainThreadWorkerMessageHandler;if(!mainWorkerMessageHandler){_context3.next=3;break}return _context3.abrupt("return",mainWorkerMessageHandler);case 3:if(!_util.isNodeJS||"function"!=typeof require){_context3.next=6;break}worker=eval("require")(_this11.workerSrc);return _context3.abrupt("return",worker.WorkerMessageHandler);case 6:_context3.next=8;return(0,_display_utils.loadScript)(_this11.workerSrc);case 8:return _context3.abrupt("return",window.pdfjsWorker.WorkerMessageHandler);case 9:case"end":return _context3.stop()}}),_callee3)})));return function loader(){return _ref15.apply(this,arguments)}}();return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}]);return PDFWorker}();exports.PDFWorker=PDFWorker;function _generateTrustedURL2(t){if(window.trustedTypes){return window.trustedTypes.createPolicy("foo",{createScriptURL:function createScriptURL(t){return t}}).createScriptURL(t)}return t}var _workerPorts={writable:!0,value:void 0},_methodPromises=new WeakMap,_pageCache=new WeakMap,_pagePromises=new WeakMap,_passwordCapability=new WeakMap,_cacheSimpleMethod=new WeakSet,WorkerTransport=function(){function WorkerTransport(t,r,a,i,o){_classCallCheck(this,WorkerTransport);_classPrivateMethodInitSpec(this,_cacheSimpleMethod);_classPrivateFieldInitSpec(this,_methodPromises,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,_pageCache,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,_pagePromises,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,_passwordCapability,{writable:!0,value:null});this.messageHandler=t;this.loadingTask=r;this.commonObjs=new PDFObjects;this.fontLoader=new _font_loader.FontLoader({ownerDocument:i.ownerDocument,styleElement:i.styleElement});this._params=i;this.canvasFactory=o.canvasFactory;this.filterFactory=o.filterFactory;this.cMapReaderFactory=o.cMapReaderFactory;this.standardFontDataFactory=o.standardFontDataFactory;this.destroyed=!1;this.destroyCapability=null;this._networkStream=a;this._fullReader=null;this._lastProgress=null;this.downloadInfoCapability=new _util.PromiseCapability;this.setupMessageHandler()}_createClass(WorkerTransport,[{key:"annotationStorage",get:function get(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}},{key:"getRenderingIntent",value:function getRenderingIntent(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_util.AnnotationMode.ENABLE,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=_util.RenderingIntentFlag.DISPLAY,l=_annotation_storage.SerializableEmpty;switch(t){case"any":o=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":o=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)("getRenderingIntent - invalid intent: ".concat(t))}switch(r){case _util.AnnotationMode.DISABLE:o+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:o+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:l=((o+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE)&_util.RenderingIntentFlag.PRINT&&a instanceof _annotation_storage.PrintAnnotationStorage?a:this.annotationStorage).serializable;break;default:(0,_util.warn)("getRenderingIntent - invalid annotationMode: ".concat(r))}i&&(o+=_util.RenderingIntentFlag.OPLIST);return{renderingIntent:o,cacheKey:"".concat(o,"_").concat(l.hash),annotationStorageSerializable:l}}},{key:"destroy",value:function destroy(){var t,r=this;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0;this.destroyCapability=new _util.PromiseCapability;null===(t=_classPrivateFieldGet(this,_passwordCapability))||void 0===t||t.reject(new Error("Worker was destroyed during onPassword callback"));var a,i=[],o=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values());try{for(o.s();!(a=o.n()).done;){var l=a.value;i.push(l._destroy())}}catch(t){o.e(t)}finally{o.f()}_classPrivateFieldGet(this,_pageCache).clear();_classPrivateFieldGet(this,_pagePromises).clear();this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();var c=this.messageHandler.sendWithPromise("Terminate",null);i.push(c);Promise.all(i).then((function(){var t;r.commonObjs.clear();r.fontLoader.clear();_classPrivateFieldGet(r,_methodPromises).clear();r.filterFactory.destroy();null===(t=r._networkStream)||void 0===t||t.cancelAllRequests(new _util.AbortException("Worker was terminated."));if(r.messageHandler){r.messageHandler.destroy();r.messageHandler=null}r.destroyCapability.resolve()}),this.destroyCapability.reject);return this.destroyCapability.promise}},{key:"setupMessageHandler",value:function setupMessageHandler(){var t=this,r=this.messageHandler,a=this.loadingTask;r.on("GetReader",(function(r,a){(0,_util.assert)(t._networkStream,"GetReader - no `IPDFStream` instance available.");t._fullReader=t._networkStream.getFullReader();t._fullReader.onProgress=function(r){t._lastProgress={loaded:r.loaded,total:r.total}};a.onPull=function(){t._fullReader.read().then((function(t){var r=t.value;if(t.done)a.close();else{(0,_util.assert)(r instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer.");a.enqueue(new Uint8Array(r),1,[r])}})).catch((function(t){a.error(t)}))};a.onCancel=function(r){t._fullReader.cancel(r);a.ready.catch((function(r){if(!t.destroyed)throw r}))}}));r.on("ReaderHeadersReady",(function(r){var i=new _util.PromiseCapability,o=t._fullReader;o.headersReady.then((function(){if(!o.isStreamingSupported||!o.isRangeSupported){if(t._lastProgress){var r;null===(r=a.onProgress)||void 0===r||r.call(a,t._lastProgress)}o.onProgress=function(t){var r;null===(r=a.onProgress)||void 0===r||r.call(a,{loaded:t.loaded,total:t.total})}}i.resolve({isStreamingSupported:o.isStreamingSupported,isRangeSupported:o.isRangeSupported,contentLength:o.contentLength})}),i.reject);return i.promise}));r.on("GetRangeReader",(function(r,a){(0,_util.assert)(t._networkStream,"GetRangeReader - no `IPDFStream` instance available.");var i=t._networkStream.getRangeReader(r.begin,r.end);if(i){a.onPull=function(){i.read().then((function(t){var r=t.value;if(t.done)a.close();else{(0,_util.assert)(r instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer.");a.enqueue(new Uint8Array(r),1,[r])}})).catch((function(t){a.error(t)}))};a.onCancel=function(r){i.cancel(r);a.ready.catch((function(r){if(!t.destroyed)throw r}))}}else a.close()}));r.on("GetDoc",(function(r){var i=r.pdfInfo;t._numPages=i.numPages;t._htmlForXfa=i.htmlForXfa;delete i.htmlForXfa;a._capability.resolve(new PDFDocumentProxy(i,t))}));r.on("DocException",(function(t){var r;switch(t.name){case"PasswordException":r=new _util.PasswordException(t.message,t.code);break;case"InvalidPDFException":r=new _util.InvalidPDFException(t.message);break;case"MissingPDFException":r=new _util.MissingPDFException(t.message);break;case"UnexpectedResponseException":r=new _util.UnexpectedResponseException(t.message,t.status);break;case"UnknownErrorException":r=new _util.UnknownErrorException(t.message,t.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}a._capability.reject(r)}));r.on("PasswordRequest",(function(r){_classPrivateFieldSet(t,_passwordCapability,new _util.PromiseCapability);if(a.onPassword){try{a.onPassword((function updatePassword(r){r instanceof Error?_classPrivateFieldGet(t,_passwordCapability).reject(r):_classPrivateFieldGet(t,_passwordCapability).resolve({password:r})}),r.code)}catch(r){_classPrivateFieldGet(t,_passwordCapability).reject(r)}}else _classPrivateFieldGet(t,_passwordCapability).reject(new _util.PasswordException(r.message,r.code));return _classPrivateFieldGet(t,_passwordCapability).promise}));r.on("DataLoaded",(function(r){var i;null===(i=a.onProgress)||void 0===i||i.call(a,{loaded:r.length,total:r.length});t.downloadInfoCapability.resolve(r)}));r.on("StartRenderPage",(function(r){if(!t.destroyed){_classPrivateFieldGet(t,_pageCache).get(r.pageIndex)._startRenderPage(r.transparency,r.cacheKey)}}));r.on("commonobj",(function(a){var i,o=_slicedToArray(a,3),l=o[0],c=o[1],u=o[2];if(!t.destroyed&&!t.commonObjs.has(l))switch(c){case"Font":var d=t._params;if("error"in u){var h=u.error;(0,_util.warn)("Error during font loading: ".concat(h));t.commonObjs.resolve(l,h);break}var p=d.pdfBug&&null!==(i=globalThis.FontInspector)&&void 0!==i&&i.enabled?function(t,r){return globalThis.FontInspector.fontAdded(t,r)}:null,v=new _font_loader.FontFaceObject(u,{isEvalSupported:d.isEvalSupported,disableFontFace:d.disableFontFace,ignoreErrors:d.ignoreErrors,inspectFont:p});t.fontLoader.bind(v).catch((function(t){return r.sendWithPromise("FontFallback",{id:l})})).finally((function(){!d.fontExtraProperties&&v.data&&(v.data=null);t.commonObjs.resolve(l,v)}));break;case"FontPath":case"Image":case"Pattern":t.commonObjs.resolve(l,u);break;default:throw new Error("Got unknown common object type ".concat(c))}}));r.on("obj",(function(r){var a=_slicedToArray(r,4),i=a[0],o=a[1],l=a[2],c=a[3];if(!t.destroyed){var u=_classPrivateFieldGet(t,_pageCache).get(o);if(!u.objs.has(i))switch(l){case"Image":u.objs.resolve(i,c);if(c){var d;if(c.bitmap){d=c.width*c.height*4}else{var h;d=(null===(h=c.data)||void 0===h?void 0:h.length)||0}d>_util.MAX_IMAGE_SIZE_TO_CACHE&&(u._maybeCleanupAfterRender=!0)}break;case"Pattern":u.objs.resolve(i,c);break;default:throw new Error("Got unknown object type ".concat(l))}}}));r.on("DocProgress",(function(r){var i;t.destroyed||null===(i=a.onProgress)||void 0===i||i.call(a,{loaded:r.loaded,total:r.total})}));r.on("FetchBuiltInCMap",(function(r){return t.destroyed?Promise.reject(new Error("Worker was destroyed.")):t.cMapReaderFactory?t.cMapReaderFactory.fetch(r):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))}));r.on("FetchStandardFontData",(function(r){return t.destroyed?Promise.reject(new Error("Worker was destroyed.")):t.standardFontDataFactory?t.standardFontDataFactory.fetch(r):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))}))}},{key:"getData",value:function getData(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"saveDocument",value:function saveDocument(){var t,r,a=this;this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");var i=this.annotationStorage.serializable,o=i.map,l=i.transfers;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:o,filename:null!==(t=null===(r=this._fullReader)||void 0===r?void 0:r.filename)&&void 0!==t?t:null},l).finally((function(){a.annotationStorage.resetModified()}))}},{key:"getPage",value:function getPage(t){var r=this;if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));var a=t-1,i=_classPrivateFieldGet(this,_pagePromises).get(a);if(i)return i;var o=this.messageHandler.sendWithPromise("GetPage",{pageIndex:a}).then((function(t){if(r.destroyed)throw new Error("Transport destroyed");var i=new PDFPageProxy(a,t,r,r._params.pdfBug);_classPrivateFieldGet(r,_pageCache).set(a,i);return i}));_classPrivateFieldGet(this,_pagePromises).set(a,o);return o}},{key:"getPageIndex",value:function getPageIndex(t){return"object"!==_typeof(t)||null===t||!Number.isInteger(t.num)||t.num<0||!Number.isInteger(t.gen)||t.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen})}},{key:"getAnnotations",value:function getAnnotations(t,r){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:r})}},{key:"getFieldObjects",value:function getFieldObjects(){return _classPrivateMethodGet(this,_cacheSimpleMethod,_cacheSimpleMethod2).call(this,"GetFieldObjects")}},{key:"hasJSActions",value:function hasJSActions(){return _classPrivateMethodGet(this,_cacheSimpleMethod,_cacheSimpleMethod2).call(this,"HasJSActions")}},{key:"getCalculationOrderIds",value:function getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}},{key:"getDestinations",value:function getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function getDestination(t){return"string"!=typeof t?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}},{key:"getPageLabels",value:function getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}},{key:"getPageLayout",value:function getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}},{key:"getPageMode",value:function getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}},{key:"getViewerPreferences",value:function getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}},{key:"getOpenAction",value:function getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}},{key:"getAttachments",value:function getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}},{key:"getDocJSActions",value:function getDocJSActions(){return _classPrivateMethodGet(this,_cacheSimpleMethod,_cacheSimpleMethod2).call(this,"GetDocJSActions")}},{key:"getPageJSActions",value:function getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}},{key:"getStructTree",value:function getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}},{key:"getOutline",value:function getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getOptionalContentConfig",value:function getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((function(t){return new _optional_content_config.OptionalContentConfig(t)}))}},{key:"getPermissions",value:function getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function getMetadata(){var t=this,r="GetMetadata",a=_classPrivateFieldGet(this,_methodPromises).get(r);if(a)return a;var i=this.messageHandler.sendWithPromise(r,null).then((function(r){var a,i,o,l;return{info:r[0],metadata:r[1]?new _metadata.Metadata(r[1]):null,contentDispositionFilename:null!==(a=null===(i=t._fullReader)||void 0===i?void 0:i.filename)&&void 0!==a?a:null,contentLength:null!==(o=null===(l=t._fullReader)||void 0===l?void 0:l.contentLength)&&void 0!==o?o:null}}));_classPrivateFieldGet(this,_methodPromises).set(r,i);return i}},{key:"getMarkInfo",value:function getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}},{key:"startCleanup",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(){var t,r,a,i,o=arguments;return _regeneratorRuntime().wrap((function _callee4$(l){for(;;)switch(l.prev=l.next){case 0:t=o.length>0&&void 0!==o[0]&&o[0];if(!this.destroyed){l.next=3;break}return l.abrupt("return");case 3:l.next=5;return this.messageHandler.sendWithPromise("Cleanup",null);case 5:r=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values());l.prev=6;r.s();case 8:if((a=r.n()).done){l.next=15;break}if((i=a.value).cleanup()){l.next=13;break}throw new Error("startCleanup: Page ".concat(i.pageNumber," is currently rendering."));case 13:l.next=8;break;case 15:l.next=20;break;case 17:l.prev=17;l.t0=l.catch(6);r.e(l.t0);case 20:l.prev=20;r.f();return l.finish(20);case 23:this.commonObjs.clear();t||this.fontLoader.clear();_classPrivateFieldGet(this,_methodPromises).clear();this.filterFactory.destroy(!0);case 27:case"end":return l.stop()}}),_callee4,this,[[6,17,20,23]])}))),function startCleanup(){return t.apply(this,arguments)})},{key:"loadingParams",get:function get(){var t=this._params,r=t.disableAutoFetch,a=t.enableXfa;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:r,enableXfa:a})}}]);var t;return WorkerTransport}();function _cacheSimpleMethod2(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=_classPrivateFieldGet(this,_methodPromises).get(t);if(a)return a;var i=this.messageHandler.sendWithPromise(t,r);_classPrivateFieldGet(this,_methodPromises).set(t,i);return i}var _objs=new WeakMap,_ensureObj=new WeakSet,PDFObjects=function(){function PDFObjects(){_classCallCheck(this,PDFObjects);_classPrivateMethodInitSpec(this,_ensureObj);_classPrivateFieldInitSpec(this,_objs,{writable:!0,value:Object.create(null)})}_createClass(PDFObjects,[{key:"get",value:function get(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(r){var a=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,t);a.capability.promise.then((function(){return r(a.data)}));return null}var i=_classPrivateFieldGet(this,_objs)[t];if(null==i||!i.capability.settled)throw new Error("Requesting object that isn't resolved yet ".concat(t,"."));return i.data}},{key:"has",value:function has(t){var r=_classPrivateFieldGet(this,_objs)[t];return(null==r?void 0:r.capability.settled)||!1}},{key:"resolve",value:function resolve(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,t);a.data=r;a.capability.resolve()}},{key:"clear",value:function clear(){for(var t in _classPrivateFieldGet(this,_objs)){var r,a=_classPrivateFieldGet(this,_objs)[t].data;null==a||null===(r=a.bitmap)||void 0===r||r.close()}_classPrivateFieldSet(this,_objs,Object.create(null))}}]);return PDFObjects}();function _ensureObj2(t){var r;return(r=_classPrivateFieldGet(this,_objs))[t]||(r[t]={capability:new _util.PromiseCapability,data:null})}var _internalRenderTask=new WeakMap,RenderTask=function(){function RenderTask(t){_classCallCheck(this,RenderTask);_classPrivateFieldInitSpec(this,_internalRenderTask,{writable:!0,value:null});_classPrivateFieldSet(this,_internalRenderTask,t);this.onContinue=null}_createClass(RenderTask,[{key:"promise",get:function get(){return _classPrivateFieldGet(this,_internalRenderTask).capability.promise}},{key:"cancel",value:function cancel(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;_classPrivateFieldGet(this,_internalRenderTask).cancel(null,t)}},{key:"separateAnnots",get:function get(){var t=_classPrivateFieldGet(this,_internalRenderTask).operatorList.separateAnnots;if(!t)return!1;var r=_classPrivateFieldGet(this,_internalRenderTask).annotationCanvasMap;return t.form||t.canvas&&(null==r?void 0:r.size)>0}}]);return RenderTask}();exports.RenderTask=RenderTask;var InternalRenderTask=function(){function InternalRenderTask(t){var r=t.callback,a=t.params,i=t.objs,o=t.commonObjs,l=t.annotationCanvasMap,c=t.operatorList,u=t.pageIndex,d=t.canvasFactory,h=t.filterFactory,p=t.useRequestAnimationFrame,v=void 0!==p&&p,y=t.pdfBug,_=void 0!==y&&y,g=t.pageColors,m=void 0===g?null:g;_classCallCheck(this,InternalRenderTask);this.callback=r;this.params=a;this.objs=i;this.commonObjs=o;this.annotationCanvasMap=l;this.operatorListIdx=null;this.operatorList=c;this._pageIndex=u;this.canvasFactory=d;this.filterFactory=h;this._pdfBug=_;this.pageColors=m;this.running=!1;this.graphicsReadyCallback=null;this.graphicsReady=!1;this._useRequestAnimationFrame=!0===v&&"undefined"!=typeof window;this.cancelled=!1;this.capability=new _util.PromiseCapability;this.task=new RenderTask(this);this._cancelBound=this.cancel.bind(this);this._continueBound=this._continue.bind(this);this._scheduleNextBound=this._scheduleNext.bind(this);this._nextBound=this._next.bind(this);this._canvas=a.canvasContext.canvas}_createClass(InternalRenderTask,[{key:"completed",get:function get(){return this.capability.promise.catch((function(){}))}},{key:"initializeGraphics",value:function initializeGraphics(t){var r,a,i=t.transparency,o=void 0!==i&&i,l=t.optionalContentConfig;if(!this.cancelled){if(this._canvas){if(_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_canvasInUse).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_canvasInUse).add(this._canvas)}if(this._pdfBug&&null!==(r=globalThis.StepperManager)&&void 0!==r&&r.enabled){this.stepper=globalThis.StepperManager.create(this._pageIndex);this.stepper.init(this.operatorList);this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint()}var c=this.params,u=c.canvasContext,d=c.viewport,h=c.transform,p=c.background;this.gfx=new _canvas.CanvasGraphics(u,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:l},this.annotationCanvasMap,this.pageColors);this.gfx.beginDrawing({transform:h,viewport:d,transparency:o,background:p});this.operatorListIdx=0;this.graphicsReady=!0;null===(a=this.graphicsReadyCallback)||void 0===a||a.call(this)}}},{key:"cancel",value:function cancel(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.running=!1;this.cancelled=!0;null===(t=this.gfx)||void 0===t||t.endDrawing();this._canvas&&_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_canvasInUse).delete(this._canvas);this.callback(r||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),a))}},{key:"operatorListChanged",value:function operatorListChanged(){var t;if(this.graphicsReady){null===(t=this.stepper)||void 0===t||t.updateOperatorList(this.operatorList);this.running||this._continue()}else this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}},{key:"_continue",value:function _continue(){this.running=!0;this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function _scheduleNext(){var t=this;window.ngxZone.runOutsideAngular((function(){t._useRequestAnimationFrame?window.requestAnimationFrame((function(){t._nextBound().catch(t._cancelBound)})):Promise.resolve().then(t._nextBound).catch(t._cancelBound)}))}},{key:"_next",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(){return _regeneratorRuntime().wrap((function _callee5$(t){for(;;)switch(t.prev=t.next){case 0:if(!this.cancelled){t.next=2;break}return t.abrupt("return");case 2:this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper);if(this.operatorListIdx===this.operatorList.argsArray.length){this.running=!1;if(this.operatorList.lastChunk){this.gfx.endDrawing(this.pageColors);this._canvas&&_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_canvasInUse).delete(this._canvas);this.callback()}}case 4:case"end":return t.stop()}}),_callee5,this)}))),function _next(){return t.apply(this,arguments)})}]);var t;return InternalRenderTask}(),_canvasInUse={writable:!0,value:new WeakSet},version="3.11.440";exports.version=version;var build="a6163a289";exports.build=build},(t,r,a)=>{a(86)("asyncIterator")},(t,r,a)=>{var i=a(24),o=a(86),l=a(72);o("toStringTag");l(i("Symbol"),"Symbol")},(t,r,a)=>{var i=a(4);a(72)(i.JSON,"JSON",!0)},(t,r,a)=>{a(72)(Math,"Math",!0)},(t,r,a)=>{var i=a(4),o=a(150),l=a(151),c=a(311),u=a(44),handlePrototype=function(t){if(t&&t.forEach!==c)try{u(t,"forEach",c)}catch(r){t.forEach=c}};for(var d in o)o[d]&&handlePrototype(i[d]&&i[d].prototype);handlePrototype(l)},(t,r,a)=>{var i=a(188).forEach,o=a(215)("forEach");t.exports=o?[].forEach:function forEach(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}},(t,r,a)=>{a(313)},(t,r,a)=>{a(282)("Set",(function(t){return function Set(){return t(this,arguments.length?arguments[0]:void 0)}}),a(288))},(t,r,a)=>{var i=a(3),o=a(315);i({target:"Set",proto:!0,real:!0,forced:!a(324)("difference")},{difference:o})},(t,r,a)=>{var i=a(316),o=a(317),l=a(318),c=a(321),u=a(322),d=a(319),h=a(320),p=o.has,v=o.remove;t.exports=function difference(t){var r=i(this),a=u(t),o=l(r);c(r)<=a.size?d(r,(function(t){a.includes(t)&&v(o,t)})):h(a.getIterator(),(function(t){p(r,t)&&v(o,t)}));return o}},(t,r,a)=>{var i=a(317).has;t.exports=function(t){i(t);return t}},(t,r,a)=>{var i=a(14),o=Set.prototype;t.exports={Set:Set,add:i(o.add),has:i(o.has),remove:i(o.delete),proto:o}},(t,r,a)=>{var i=a(317),o=a(319),l=i.Set,c=i.add;t.exports=function(t){var r=new l;o(t,(function(t){c(r,t)}));return r}},(t,r,a)=>{var i=a(14),o=a(320),l=a(317),c=l.Set,u=l.proto,d=i(u.forEach),h=i(u.keys),p=h(new c).next;t.exports=function(t,r,a){return a?o({iterator:h(t),next:p},r):d(t,r)}},(t,r,a)=>{var i=a(8);t.exports=function(t,r,a){for(var o,l,c=a?t:t.iterator,u=t.next;!(o=i(u,c)).done;)if(void 0!==(l=r(o.value)))return l}},(t,r,a)=>{var i=a(115),o=a(317);t.exports=i(o.proto,"size","get")||function(t){return t.size}},(t,r,a)=>{var i=a(31),o=a(47),l=a(8),c=a(62),u=a(323),d="Invalid size",h=RangeError,p=TypeError,v=Math.max,SetRecord=function(t,r,a,i){this.set=t;this.size=r;this.has=a;this.keys=i};SetRecord.prototype={getIterator:function(){return u(o(l(this.keys,this.set)))},includes:function(t){return l(this.has,this.set,t)}};t.exports=function(t){o(t);var r=+t.size;if(r!=r)throw p(d);var a=c(r);if(a<0)throw h(d);return new SetRecord(t,v(a,0),i(t.has),i(t.keys))}},t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},(t,r,a)=>{var i=a(24),createSetLike=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};t.exports=function(t){var r=i("Set");try{(new r)[t](createSetLike(0));try{(new r)[t](createSetLike(-1));return!1}catch(t){return!0}}catch(t){return!1}}},(t,r,a)=>{var i=a(3),o=a(7),l=a(326);i({target:"Set",proto:!0,real:!0,forced:!a(324)("intersection")||o((function(){return"3,2"!==Array.from(new Set([1,2,3]).intersection(new Set([3,2])))}))},{intersection:l})},(t,r,a)=>{var i=a(316),o=a(317),l=a(321),c=a(322),u=a(319),d=a(320),h=o.Set,p=o.add,v=o.has;t.exports=function intersection(t){var r=i(this),a=c(t),o=new h;l(r)>a.size?d(a.getIterator(),(function(t){v(r,t)&&p(o,t)})):u(r,(function(t){a.includes(t)&&p(o,t)}));return o}},(t,r,a)=>{var i=a(3),o=a(328);i({target:"Set",proto:!0,real:!0,forced:!a(324)("isDisjointFrom")},{isDisjointFrom:o})},(t,r,a)=>{var i=a(316),o=a(317).has,l=a(321),c=a(322),u=a(319),d=a(320),h=a(97);t.exports=function isDisjointFrom(t){var r=i(this),a=c(t);if(l(r)<=a.size)return!1!==u(r,(function(t){if(a.includes(t))return!1}),!0);var p=a.getIterator();return!1!==d(p,(function(t){if(o(r,t))return h(p,"normal",!1)}))}},(t,r,a)=>{var i=a(3),o=a(330);i({target:"Set",proto:!0,real:!0,forced:!a(324)("isSubsetOf")},{isSubsetOf:o})},(t,r,a)=>{var i=a(316),o=a(321),l=a(319),c=a(322);t.exports=function isSubsetOf(t){var r=i(this),a=c(t);return!(o(r)>a.size)&&!1!==l(r,(function(t){if(!a.includes(t))return!1}),!0)}},(t,r,a)=>{var i=a(3),o=a(332);i({target:"Set",proto:!0,real:!0,forced:!a(324)("isSupersetOf")},{isSupersetOf:o})},(t,r,a)=>{var i=a(316),o=a(317).has,l=a(321),c=a(322),u=a(320),d=a(97);t.exports=function isSupersetOf(t){var r=i(this),a=c(t);if(l(r)<a.size)return!1;var h=a.getIterator();return!1!==u(h,(function(t){if(!o(r,t))return d(h,"normal",!1)}))}},(t,r,a)=>{var i=a(3),o=a(334);i({target:"Set",proto:!0,real:!0,forced:!a(324)("symmetricDifference")},{symmetricDifference:o})},(t,r,a)=>{var i=a(316),o=a(317),l=a(318),c=a(322),u=a(320),d=o.add,h=o.has,p=o.remove;t.exports=function symmetricDifference(t){var r=i(this),a=c(t).getIterator(),o=l(r);u(a,(function(t){h(r,t)?p(o,t):d(o,t)}));return o}},(t,r,a)=>{var i=a(3),o=a(336);i({target:"Set",proto:!0,real:!0,forced:!a(324)("union")},{union:o})},(t,r,a)=>{var i=a(316),o=a(317).add,l=a(318),c=a(322),u=a(320);t.exports=function union(t){var r=i(this),a=c(t).getIterator(),d=l(r);u(a,(function(t){o(d,t)}));return d}},(t,r,a)=>{var i=a(3),o=a(156);i({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},(t,r,a)=>{var i=a(3),o=a(339),l=a(24),c=a(7),u=a(81),d=a(11),h=a(45).f,p=a(48),v=a(121),y=a(39),_=a(155),g=a(47),m=a(340),b=a(126),w=a(341),P=a(129),A=a(52),S=a(6),k=a(36),x="DOMException",E="DATA_CLONE_ERR",T=l("Error"),C=l(x)||function(){try{(new(l("MessageChannel")||o("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(t){if(t.name===E&&25===t.code)return t.constructor}}(),I=C&&C.prototype,M=T.prototype,O=A.set,R=A.getterFor(x),G="stack"in T(x),codeFor=function(t){return y(w,t)&&w[t].m?w[t].c:0},L=function DOMException(){_(this,D);var t=arguments.length,r=b(t<1?void 0:arguments[0]),a=b(t<2?void 0:arguments[1],"Error"),i=codeFor(a);O(this,{type:x,name:a,message:r,code:i});if(!S){this.name=a;this.message=r;this.code=i}if(G){var o=T(r);o.name=x;h(this,"stack",d(1,P(o.stack,1)))}},D=L.prototype=u(M),createGetterDescriptor=function(t){return{enumerable:!0,configurable:!0,get:t}},getterFor=function(t){return createGetterDescriptor((function(){return R(this)[t]}))};if(S){v(D,"code",getterFor("code"));v(D,"message",getterFor("message"));v(D,"name",getterFor("name"))}h(D,"constructor",d(1,L));var j=c((function(){return!(new C instanceof T)})),N=j||c((function(){return M.toString!==m||"2: 1"!==String(new C(1,2))})),W=j||c((function(){return 25!==new C(1,"DataCloneError").code})),B=j||25!==C[E]||25!==I[E],U=k?N||W||B:j;i({global:!0,constructor:!0,forced:U},{DOMException:U?L:C});var H=l(x),z=H.prototype;N&&(k||C===H)&&p(z,"toString",m);W&&S&&C===H&&v(z,"code",createGetterDescriptor((function(){return codeFor(g(this).name)})));for(var q in w)if(y(w,q)){var V=w[q],X=V.s,Y=d(6,V.c);y(H,X)||h(H,X,Y);y(z,X)||h(z,X,Y)}},(t,r,a)=>{var i=a(243);t.exports=function(t){try{if(i)return Function('return require("'+t+'")')()}catch(t){}}},(t,r,a)=>{var i=a(6),o=a(7),l=a(47),c=a(81),u=a(126),d=Error.prototype.toString,h=o((function(){if(i){var t=c(Object.defineProperty({},"name",{get:function(){return this===t}}));if("true"!==d.call(t))return!0}return"2: 1"!==d.call({message:1,name:2})||"Error"!==d.call({})}));t.exports=h?function toString(){var t=l(this),r=u(t.name,"Error"),a=u(t.message);return r?a?r+": "+a:r:a}:d},t=>{t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},(t,r,a)=>{var i=a(3),o=a(4),l=a(24),c=a(11),u=a(45).f,d=a(39),h=a(155),p=a(113),v=a(126),y=a(341),_=a(129),g=a(6),m=a(36),b="DOMException",w=l("Error"),P=l(b),A=function DOMException(){h(this,S);var t=arguments.length,r=v(t<1?void 0:arguments[0]),a=v(t<2?void 0:arguments[1],"Error"),i=new P(r,a),o=w(r);o.name=b;u(i,"stack",c(1,_(o.stack,1)));p(i,this,A);return i},S=A.prototype=P.prototype,k="stack"in w(b),x="stack"in new P(1,2),E=P&&g&&Object.getOwnPropertyDescriptor(o,b),T=!(!E||E.writable&&E.configurable),C=k&&!T&&!x;i({global:!0,constructor:!0,forced:m||C},{DOMException:C?A:P});var I=l(b),M=I.prototype;if(M.constructor!==I){m||u(M,"constructor",c(1,I));for(var O in y)if(d(y,O)){var R=y[O],G=R.s;d(I,G)||u(I,G,c(6,R.c))}}},(t,r,a)=>{var i=a(24),o="DOMException";a(72)(i(o),o)},(t,r,a)=>{var i,o=a(36),l=a(3),c=a(4),u=a(24),d=a(14),h=a(7),p=a(41),v=a(21),y=a(78),_=a(17),g=a(20),m=a(23),b=a(273),w=a(47),P=a(79),A=a(39),S=a(100),k=a(44),x=a(64),E=a(159),T=a(256),C=a(345),I=a(317),M=a(130),O=a(240),R=c.Object,G=c.Array,L=c.Date,D=c.Error,j=c.EvalError,N=c.RangeError,W=c.ReferenceError,B=c.SyntaxError,U=c.TypeError,H=c.URIError,z=c.PerformanceMark,q=c.WebAssembly,V=q&&q.CompileError||D,X=q&&q.LinkError||D,Y=q&&q.RuntimeError||D,K=u("DOMException"),J=C.Map,$=C.has,Q=C.get,Z=C.set,ee=I.Set,te=I.add,re=u("Object","keys"),ne=d([].push),ae=d((!0).valueOf),ie=d(1..valueOf),oe=d("".valueOf),se=d(L.prototype.getTime),le=p("structuredClone"),ce="DataCloneError",ue="Transferring",checkBasicSemantic=function(t){return!h((function(){var r=new c.Set([7]),a=t(r),i=t(R(7));return a===r||!a.has(7)||"object"!=typeof i||7!==i}))&&t},checkErrorsCloning=function(t,r){return!h((function(){var a=new r,i=t({a:a,b:a});return!(i&&i.a===i.b&&i.a instanceof r&&i.a.stack===a.stack)}))},de=c.structuredClone,he=o||!checkErrorsCloning(de,D)||!checkErrorsCloning(de,K)||!(i=de,!h((function(){var t=i(new c.AggregateError([1],le,{cause:3}));return"AggregateError"!==t.name||1!==t.errors[0]||t.message!==le||3!==t.cause}))),fe=!de&&checkBasicSemantic((function(t){return new z(le,{detail:t}).detail})),pe=checkBasicSemantic(de)||fe,throwUncloneable=function(t){throw new K("Uncloneable type: "+t,ce)},throwUnpolyfillable=function(t,r){throw new K((r||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",ce)},tryNativeRestrictedStructuredClone=function(t,r){pe||throwUnpolyfillable(r);return pe(t)},cloneBuffer=function(t,r,a){if($(r,t))return Q(r,t);var i,o,l,u,d,h;if("SharedArrayBuffer"===(a||P(t)))i=pe?pe(t):t;else{var p=c.DataView;p||"function"==typeof t.slice||throwUnpolyfillable("ArrayBuffer");try{if("function"!=typeof t.slice||t.resizable){o=t.byteLength;l="maxByteLength"in t?{maxByteLength:t.maxByteLength}:void 0;i=new ArrayBuffer(o,l);u=new p(t);d=new p(i);for(h=0;h<o;h++)d.setUint8(h,u.getUint8(h))}else i=t.slice(0)}catch(t){throw new K("ArrayBuffer is detached",ce)}}Z(r,t,i);return i},cloneView=function(t,r,a,i,o){var l=c[r];g(l)||throwUnpolyfillable(r);return new l(cloneBuffer(t.buffer,o),a,i)},Placeholder=function(t,r,a){this.object=t;this.type=r;this.metadata=a},structuredCloneInternal=function(t,r,a){m(t)&&throwUncloneable("Symbol");if(!g(t))return t;if(r){if($(r,t))return Q(r,t)}else r=new J;var i,o,l,d,h,p,y,_,b=P(t);switch(b){case"Array":l=G(x(t));break;case"Object":l={};break;case"Map":l=new J;break;case"Set":l=new ee;break;case"RegExp":l=new RegExp(t.source,T(t));break;case"Error":switch(o=t.name){case"AggregateError":l=u("AggregateError")([]);break;case"EvalError":l=j();break;case"RangeError":l=N();break;case"ReferenceError":l=W();break;case"SyntaxError":l=B();break;case"TypeError":l=U();break;case"URIError":l=H();break;case"CompileError":l=V();break;case"LinkError":l=X();break;case"RuntimeError":l=Y();break;default:l=D()}break;case"DOMException":l=new K(t.message,t.name);break;case"ArrayBuffer":case"SharedArrayBuffer":l=a?new Placeholder(t,b):cloneBuffer(t,r,b);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":p="DataView"===b?t.byteLength:t.length;l=a?new Placeholder(t,b,{offset:t.byteOffset,length:p}):cloneView(t,b,t.byteOffset,p,r);break;case"DOMQuad":try{l=new DOMQuad(structuredCloneInternal(t.p1,r,a),structuredCloneInternal(t.p2,r,a),structuredCloneInternal(t.p3,r,a),structuredCloneInternal(t.p4,r,a))}catch(r){l=tryNativeRestrictedStructuredClone(t,b)}break;case"File":if(pe)try{l=pe(t);P(l)!==b&&(l=void 0)}catch(t){}if(!l)try{l=new File([t],t.name,t)}catch(t){}l||throwUnpolyfillable(b);break;case"FileList":if(d=function(){var t;try{t=new c.DataTransfer}catch(r){try{t=new c.ClipboardEvent("").clipboardData}catch(t){}}return t&&t.items&&t.files?t:null}()){for(h=0,p=x(t);h<p;h++)d.items.add(structuredCloneInternal(t[h],r,a));l=d.files}else l=tryNativeRestrictedStructuredClone(t,b);break;case"ImageData":try{l=new ImageData(structuredCloneInternal(t.data,r,a),t.width,t.height,{colorSpace:t.colorSpace})}catch(r){l=tryNativeRestrictedStructuredClone(t,b)}break;default:if(pe)l=pe(t);else switch(b){case"BigInt":l=R(t.valueOf());break;case"Boolean":l=R(ae(t));break;case"Number":l=R(ie(t));break;case"String":l=R(oe(t));break;case"Date":l=new L(se(t));break;case"Blob":try{l=t.slice(0,t.size,t.type)}catch(t){throwUnpolyfillable(b)}break;case"DOMPoint":case"DOMPointReadOnly":i=c[b];try{l=i.fromPoint?i.fromPoint(t):new i(t.x,t.y,t.z,t.w)}catch(t){throwUnpolyfillable(b)}break;case"DOMRect":case"DOMRectReadOnly":i=c[b];try{l=i.fromRect?i.fromRect(t):new i(t.x,t.y,t.width,t.height)}catch(t){throwUnpolyfillable(b)}break;case"DOMMatrix":case"DOMMatrixReadOnly":i=c[b];try{l=i.fromMatrix?i.fromMatrix(t):new i(t)}catch(t){throwUnpolyfillable(b)}break;case"AudioData":case"VideoFrame":v(t.clone)||throwUnpolyfillable(b);try{l=t.clone()}catch(t){throwUncloneable(b)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":throwUnpolyfillable(b);default:throwUncloneable(b)}}Z(r,t,l);switch(b){case"Array":case"Object":y=re(t);for(h=0,p=x(y);h<p;h++){_=y[h];S(l,_,structuredCloneInternal(t[_],r,a))}break;case"Map":t.forEach((function(t,i){Z(l,structuredCloneInternal(i,r,a),structuredCloneInternal(t,r,a))}));break;case"Set":t.forEach((function(t){te(l,structuredCloneInternal(t,r,a))}));break;case"Error":k(l,"message",structuredCloneInternal(t.message,r,a));A(t,"cause")&&k(l,"cause",structuredCloneInternal(t.cause,r,a));"AggregateError"===o&&(l.errors=structuredCloneInternal(t.errors,r,a));case"DOMException":M&&k(l,"stack",structuredCloneInternal(t.stack,r,a))}return l},replacePlaceholders=function(t,r){if(!g(t))return t;if($(r,t))return Q(r,t);var a,i,o,l,c,u,d,h;if(t instanceof Placeholder){a=t.type;i=t.object;switch(a){case"ArrayBuffer":case"SharedArrayBuffer":h=cloneBuffer(i,r,a);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":o=t.metadata;h=cloneView(i,a,o.offset,o.length,r)}}else switch(P(t)){case"Array":case"Object":u=re(t);for(l=0,c=x(u);l<c;l++)t[d=u[l]]=replacePlaceholders(t[d],r);break;case"Map":h=new J;t.forEach((function(t,a){Z(h,replacePlaceholders(a,r),replacePlaceholders(t,r))}));break;case"Set":h=new ee;t.forEach((function(t){te(h,replacePlaceholders(t,r))}));break;case"Error":t.message=replacePlaceholders(t.message,r);A(t,"cause")&&(t.cause=replacePlaceholders(t.cause,r));"AggregateError"===t.name&&(t.errors=replacePlaceholders(t.errors,r));case"DOMException":M&&(t.stack=replacePlaceholders(t.stack,r))}Z(r,t,h||t);return h||t};l({global:!0,enumerable:!0,sham:!O,forced:he},{structuredClone:function structuredClone(t){var r,a,i=E(arguments.length,1)>1&&!_(arguments[1])?w(arguments[1]):void 0,o=i?i.transfer:void 0,l=!1;if(void 0!==o){a=function(t,r){if(!g(t))throw U("Transfer option cannot be converted to a sequence");var a=[];b(t,(function(t){ne(a,w(t))}));for(var i,o,l,u,d,h=0,p=x(a),_=[];h<p;){i=a[h++];if("ArrayBuffer"!==(o=P(i))){if($(r,i))throw new K("Duplicate transferable",ce);if(O)u=de(i,{transfer:[i]});else switch(o){case"ImageBitmap":l=c.OffscreenCanvas;y(l)||throwUnpolyfillable(o,ue);try{(d=new l(i.width,i.height)).getContext("bitmaprenderer").transferFromImageBitmap(i);u=d.transferToImageBitmap()}catch(t){}break;case"AudioData":case"VideoFrame":v(i.clone)&&v(i.close)||throwUnpolyfillable(o,ue);try{u=i.clone();i.close()}catch(t){}break;case"MediaSourceHandle":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":throwUnpolyfillable(o,ue)}if(void 0===u)throw new K("This object cannot be transferred: "+o,ce);Z(r,i,u)}else ne(_,i)}return _}(o,r=new J);l=!!x(a)}var u=structuredCloneInternal(t,r,l);if(l){!function(t,r){for(var a,i,o=0,l=x(t);o<l;){a=t[o++];if($(r,a))throw new K("Duplicate transferable",ce);if(O)i=de(a,{transfer:[a]});else{v(a.transfer)||throwUnpolyfillable("ArrayBuffer",ue);i=a.transfer()}Z(r,a,i)}}(o,r=new J);u=replacePlaceholders(u,r)}return u}})},(t,r,a)=>{var i=a(14),o=Map.prototype;t.exports={Map:Map,set:i(o.set),get:i(o.get),has:i(o.has),remove:i(o.delete),proto:o}},(t,r,a)=>{var i=a(3),o=a(36),l=a(269),c=a(7),u=a(24),d=a(21),h=a(202),p=a(279),v=a(48),y=l&&l.prototype;i({target:"Promise",proto:!0,real:!0,forced:!!l&&c((function(){y.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var r=h(this,u("Promise")),a=d(t);return this.then(a?function(a){return p(r,t()).then((function(){return a}))}:t,a?function(a){return p(r,t()).then((function(){throw a}))}:t)}});if(!o&&d(l)){var _=u("Promise").prototype.finally;y.finally!==_&&v(y,"finally",_,{unsafe:!0})}},(t,r,a)=>{a(348)},(t,r,a)=>{a(282)("WeakSet",(function(t){return function WeakSet(){return t(this,arguments.length?arguments[0]:void 0)}}),a(304))},(t,r,a)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}a(123);a(85);a(90);a(292);a(300);a(112);a(258);a(255);a(92);a(105);a(104);a(301);a(2);a(71);a(73);Object.defineProperty(r,"__esModule",{value:!0});r.SerializableEmpty=r.PrintAnnotationStorage=r.AnnotationStorage=void 0;a(350);a(140);a(280);a(146);a(148);a(149);a(337);a(351);a(167);a(257);a(297);a(249);a(245);a(312);a(338);a(342);a(343);a(344);a(302);a(347);var i=a(1),o=a(353),l=a(372);function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,a)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||_unsupportedIterableToArray(t,r)||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 _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classPrivateFieldInitSpec(t,r,a){_checkPrivateRedeclaration(t,r);r.set(t,a)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,a){!function _classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,_classExtractFieldDescriptor(t,r,"set"),a);return a}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}var c=Object.freeze({map:null,hash:"",transfers:void 0});r.SerializableEmpty=c;var u=new WeakMap,d=new WeakMap,h=new WeakSet,p=function(){function AnnotationStorage(){_classCallCheck(this,AnnotationStorage);!function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}(this,h);_classPrivateFieldInitSpec(this,u,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,d,{writable:!0,value:new Map});this.onSetModified=null;this.onResetModified=null;this.onAnnotationEditor=null}_createClass(AnnotationStorage,[{key:"getValue",value:function getValue(t,r){var a=_classPrivateFieldGet(this,d).get(t);return void 0===a?r:Object.assign(r,a)}},{key:"getRawValue",value:function getRawValue(t){return _classPrivateFieldGet(this,d).get(t)}},{key:"remove",value:function remove(t){_classPrivateFieldGet(this,d).delete(t);0===_classPrivateFieldGet(this,d).size&&this.resetModified();if("function"==typeof this.onAnnotationEditor){var r,a=_createForOfIteratorHelper(_classPrivateFieldGet(this,d).values());try{for(a.s();!(r=a.n()).done;){if(r.value instanceof o.AnnotationEditor)return}}catch(t){a.e(t)}finally{a.f()}this.onAnnotationEditor(null)}}},{key:"setValue",value:function setValue(t,r){var a=_classPrivateFieldGet(this,d).get(t),i=!1;if(void 0!==a)for(var l=0,c=Object.entries(r);l<c.length;l++){var u=_slicedToArray(c[l],2),p=u[0],v=u[1];if(a[p]!==v){i=!0;a[p]=v}}else{i=!0;_classPrivateFieldGet(this,d).set(t,r)}i&&function _classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}(this,h,_setModified2).call(this);r instanceof o.AnnotationEditor&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(r.constructor._type)}},{key:"has",value:function has(t){return _classPrivateFieldGet(this,d).has(t)}},{key:"getAll",value:function getAll(){return _classPrivateFieldGet(this,d).size>0?(0,i.objectFromMap)(_classPrivateFieldGet(this,d)):null}},{key:"setAll",value:function setAll(t){for(var r=0,a=Object.entries(t);r<a.length;r++){var i=_slicedToArray(a[r],2),o=i[0],l=i[1];this.setValue(o,l)}}},{key:"size",get:function get(){return _classPrivateFieldGet(this,d).size}},{key:"resetModified",value:function resetModified(){if(_classPrivateFieldGet(this,u)){_classPrivateFieldSet(this,u,!1);"function"==typeof this.onResetModified&&this.onResetModified()}}},{key:"print",get:function get(){return new y(this)}},{key:"serializable",get:function get(){if(0===_classPrivateFieldGet(this,d).size)return c;var t,r=new Map,a=new l.MurmurHash3_64,i=[],u=Object.create(null),h=!1,p=_createForOfIteratorHelper(_classPrivateFieldGet(this,d));try{for(p.s();!(t=p.n()).done;){var v=_slicedToArray(t.value,2),y=v[0],_=v[1],g=_ instanceof o.AnnotationEditor?_.serialize(!1,u):_;if(g){r.set(y,g);a.update("".concat(y,":").concat(JSON.stringify(g)));h||(h=!!g.bitmap)}}}catch(t){p.e(t)}finally{p.f()}if(h){var m,b=_createForOfIteratorHelper(r.values());try{for(b.s();!(m=b.n()).done;){var w=m.value;w.bitmap&&i.push(w.bitmap)}}catch(t){b.e(t)}finally{b.f()}}return r.size>0?{map:r,hash:a.hexdigest(),transfers:i}:c}}]);return AnnotationStorage}();r.AnnotationStorage=p;function _setModified2(){if(!_classPrivateFieldGet(this,u)){_classPrivateFieldSet(this,u,!0);"function"==typeof this.onSetModified&&this.onSetModified()}}var v=new WeakMap,y=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(PrintAnnotationStorage,t);var r=_createSuper(PrintAnnotationStorage);function PrintAnnotationStorage(t){var a;_classCallCheck(this,PrintAnnotationStorage);_classPrivateFieldInitSpec(_assertThisInitialized(a=r.call(this)),v,{writable:!0,value:void 0});var i=t.serializable,o=i.map,l=i.hash,c=i.transfers,u=structuredClone(o,null);_classPrivateFieldSet(_assertThisInitialized(a),v,{map:u,hash:l,transfers:c});return a}_createClass(PrintAnnotationStorage,[{key:"print",get:function get(){(0,i.unreachable)("Should not call PrintAnnotationStorage.print")}},{key:"serializable",get:function get(){return _classPrivateFieldGet(this,v)}}]);return PrintAnnotationStorage}(p);r.PrintAnnotationStorage=y},(t,r,a)=>{var i=a(3),o=a(287),l=a(7),c=a(20),u=a(283).onFreeze,d=Object.freeze;i({target:"Object",stat:!0,forced:l((function(){d(1)})),sham:!o},{freeze:function freeze(t){return d&&c(t)?d(u(t)):t}})},(t,r,a)=>{var i=a(3),o=a(352).entries;i({target:"Object",stat:!0},{entries:function entries(t){return o(t)}})},(t,r,a)=>{var i=a(6),o=a(7),l=a(14),c=a(69),u=a(83),d=a(12),h=l(a(10).f),p=l([].push),v=i&&o((function(){var t=Object.create(null);t[2]=2;return!h(t,2)})),createMethod=function(t){return function(r){for(var a,o=d(r),l=u(o),y=v&&null===c(o),_=l.length,g=0,m=[];_>g;){a=l[g++];i&&!(y?a in o:h(o,a))||p(m,t?[a,o[a]]:o[a])}return m}};t.exports={entries:createMethod(!0),values:createMethod(!1)}},(t,r,a)=>{a(85);a(90);a(292);a(300);a(112);a(301);a(258);a(255);a(92);a(105);a(104);a(2);a(71);a(73);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.AnnotationEditor=void 0;a(354);a(123);a(140);a(146);a(148);a(302);a(149);a(347);a(167);a(355);var i=a(356),o=a(1);function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||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 _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,a)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||_unsupportedIterableToArray(t,r)||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(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _defineProperty(t,r,a){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateFieldInitSpec(t,r,a){_checkPrivateRedeclaration(t,r);r.set(t,a)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classStaticPrivateMethodGet(t,r,a){!function _classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}(t,r);return a}function _classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function _classPrivateFieldSet(t,r,a){!function _classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,_classExtractFieldDescriptor(t,r,"set"),a);return a}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}var l=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakMap,_=new WeakMap,g=new WeakSet,m=new WeakSet,b=new WeakSet,w=new WeakSet,P=new WeakSet,A=new WeakSet,S=function(){function AnnotationEditor(t){_classCallCheck(this,AnnotationEditor);_classPrivateMethodInitSpec(this,A);_classPrivateMethodInitSpec(this,P);_classPrivateMethodInitSpec(this,w);_classPrivateMethodInitSpec(this,b);_classPrivateMethodInitSpec(this,m);_classPrivateMethodInitSpec(this,g);_classPrivateFieldInitSpec(this,l,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,c,{writable:!0,value:null});_classPrivateFieldInitSpec(this,u,{writable:!0,value:this.focusin.bind(this)});_classPrivateFieldInitSpec(this,d,{writable:!0,value:this.focusout.bind(this)});_classPrivateFieldInitSpec(this,h,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,p,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,v,{writable:!0,value:!1});_defineProperty(this,"_initialOptions",Object.create(null));_defineProperty(this,"_uiManager",null);_defineProperty(this,"_focusEventsAllowed",!0);_classPrivateFieldInitSpec(this,y,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,_,{writable:!0,value:AnnotationEditor._zIndex++});_defineProperty(this,"doNotMove",!1);this.constructor===AnnotationEditor&&(0,o.unreachable)("Cannot initialize AnnotationEditor.");this.parent=t.parent;this.id=t.id;this.width=this.height=null;this.pageIndex=t.parent.pageIndex;this.name=t.name;this.div=null;this._uiManager=t.uiManager;this.annotationElementId=null;this._willKeepAspectRatio=!1;this._initialOptions.isCentered=t.isCentered;var r=this.parent.viewport,a=r.rotation,i=r.rawDims,S=i.pageWidth,k=i.pageHeight,x=i.pageX,E=i.pageY;this.rotation=a;this.pageRotation=(360+a-this._uiManager.viewParameters.rotation)%360;this.pageDimensions=[S,k];this.pageTranslation=[x,E];var T=_slicedToArray(this.parentDimensions,2),C=T[0],I=T[1];this.x=t.x/C;this.y=t.y/I;this.isAttachedToDOM=!1;this.deleted=!1}_createClass(AnnotationEditor,[{key:"propertiesToUpdate",get:function get(){return[]}},{key:"_isDraggable",get:function get(){return _classPrivateFieldGet(this,y)},set:function set(t){var r;_classPrivateFieldSet(this,y,t);null===(r=this.div)||void 0===r||r.classList.toggle("draggable",t)}},{key:"center",value:function center(){var t=_slicedToArray(this.pageDimensions,2),r=t[0],a=t[1];switch(this.parentRotation){case 90:this.x-=this.height*a/(2*r);this.y+=this.width*r/(2*a);break;case 180:this.x+=this.width/2;this.y+=this.height/2;break;case 270:this.x+=this.height*a/(2*r);this.y-=this.width*r/(2*a);break;default:this.x-=this.width/2;this.y-=this.height/2}this.fixAndSetPosition()}},{key:"addCommands",value:function addCommands(t){this._uiManager.addCommands(t)}},{key:"currentLayer",get:function get(){return this._uiManager.currentLayer}},{key:"setInBackground",value:function setInBackground(){this.div.style.zIndex=0}},{key:"setInForeground",value:function setInForeground(){this.div.style.zIndex=_classPrivateFieldGet(this,_)}},{key:"setParent",value:function setParent(t){if(null!==t){this.pageIndex=t.pageIndex;this.pageDimensions=t.pageDimensions}this.parent=t}},{key:"focusin",value:function focusin(t){this._focusEventsAllowed&&(_classPrivateFieldGet(this,h)?_classPrivateFieldSet(this,h,!1):this.parent.setSelected(this))}},{key:"focusout",value:function focusout(t){var r;if(this._focusEventsAllowed&&this.isAttachedToDOM){var a=t.relatedTarget;if(null==a||!a.closest("#".concat(this.id))){t.preventDefault();null!==(r=this.parent)&&void 0!==r&&r.isMultipleSelection||this.commitOrRemove()}}}},{key:"commitOrRemove",value:function commitOrRemove(){this.isEmpty()?this.remove():this.commit()}},{key:"commit",value:function commit(){this.addToAnnotationStorage()}},{key:"addToAnnotationStorage",value:function addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}},{key:"setAt",value:function setAt(t,r,a,i){var o=_slicedToArray(this.parentDimensions,2),l=o[0],c=o[1],u=_slicedToArray(this.screenToPageTranslation(a,i),2);a=u[0];i=u[1];if(this.doNotMove){a=0;i=0}this.x=(t+a)/l;this.y=(r+i)/c;this.fixAndSetPosition()}},{key:"translate",value:function translate(t,r){_classPrivateMethodGet(this,g,_translate2).call(this,this.parentDimensions,t,r)}},{key:"translateInPage",value:function translateInPage(t,r){_classPrivateMethodGet(this,g,_translate2).call(this,this.pageDimensions,t,r);this.moveInDOM();this.div.scrollIntoView({block:"nearest"})}},{key:"drag",value:function drag(t,r){var a=_slicedToArray(this.parentDimensions,2),i=a[0],o=a[1];this.x+=t/i;this.y+=r/o;if(this.x<0||this.x>1||this.y<0||this.y>1){var l=this.div.getBoundingClientRect(),c=l.x,u=l.y;if(this.parent.findNewParent(this,c,u)){this.x-=Math.floor(this.x);this.y-=Math.floor(this.y)}}this.div.style.left="".concat((100*this.x).toFixed(2),"%");this.div.style.top="".concat((100*this.y).toFixed(2),"%");this.div.scrollIntoView({block:"nearest"})}},{key:"fixAndSetPosition",value:function fixAndSetPosition(){var t=_slicedToArray(this.pageDimensions,2),r=t[0],a=t[1],i=this.x,o=this.y,l=this.width,c=this.height;l*=r;c*=a;i*=r;o*=a;switch(this.rotation){case 0:i=Math.max(0,Math.min(r-l,i));o=Math.max(0,Math.min(a-c,o));break;case 90:i=Math.max(0,Math.min(r-c,i));o=Math.min(a,Math.max(l,o));break;case 180:i=Math.min(r,Math.max(l,i));o=Math.min(a,Math.max(c,o));break;case 270:i=Math.min(r,Math.max(c,i));o=Math.max(0,Math.min(a-l,o))}this.x=i/r;this.y=o/a;this.div.style.left="".concat((100*this.x).toFixed(2),"%");this.div.style.top="".concat((100*this.y).toFixed(2),"%")}},{key:"screenToPageTranslation",value:function screenToPageTranslation(t,r){return _classStaticPrivateMethodGet(AnnotationEditor,AnnotationEditor,_rotatePoint).call(AnnotationEditor,t,r,this.parentRotation)}},{key:"pageTranslationToScreen",value:function pageTranslationToScreen(t,r){return _classStaticPrivateMethodGet(AnnotationEditor,AnnotationEditor,_rotatePoint).call(AnnotationEditor,t,r,360-this.parentRotation)}},{key:"parentScale",get:function get(){return this._uiManager.viewParameters.realScale}},{key:"parentRotation",get:function get(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}},{key:"parentDimensions",get:function get(){var t=this.parentScale,r=_slicedToArray(this.pageDimensions,2),a=r[0]*t,i=r[1]*t;return o.FeatureTest.isCSSRoundSupported?[Math.round(a),Math.round(i)]:[a,i]}},{key:"setDims",value:function setDims(t,r){var a=_slicedToArray(this.parentDimensions,2),i=a[0],o=a[1];this.div.style.width="".concat((100*t/i).toFixed(2),"%");_classPrivateFieldGet(this,l)||(this.div.style.height="".concat((100*r/o).toFixed(2),"%"))}},{key:"fixDims",value:function fixDims(){var t=this.div.style,r=t.height,a=t.width,i=a.endsWith("%"),o=!_classPrivateFieldGet(this,l)&&r.endsWith("%");if(!i||!o){var c=_slicedToArray(this.parentDimensions,2),u=c[0],d=c[1];i||(t.width="".concat((100*parseFloat(a)/u).toFixed(2),"%"));_classPrivateFieldGet(this,l)||o||(t.height="".concat((100*parseFloat(r)/d).toFixed(2),"%"))}}},{key:"getInitialTranslation",value:function getInitialTranslation(){return[0,0]}},{key:"render",value:function render(){this.div=document.createElement("div");this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360);this.div.className=this.name;this.div.setAttribute("id",this.id);this.div.setAttribute("tabIndex",0);this.setInForeground();this.div.addEventListener("focusin",_classPrivateFieldGet(this,u));this.div.addEventListener("focusout",_classPrivateFieldGet(this,d));var t=_slicedToArray(this.parentDimensions,2),r=t[0],a=t[1];if(this.parentRotation%180!=0){this.div.style.maxWidth="".concat((100*a/r).toFixed(2),"%");this.div.style.maxHeight="".concat((100*r/a).toFixed(2),"%")}var o=_slicedToArray(this.getInitialTranslation(),2),l=o[0],c=o[1];this.translate(l,c);(0,i.bindEvents)(this,this.div,["pointerdown"]);return this.div}},{key:"pointerdown",value:function pointerdown(t){var r=o.FeatureTest.platform.isMac;if(0!==t.button||t.ctrlKey&&r)t.preventDefault();else{_classPrivateFieldSet(this,h,!0);_classPrivateMethodGet(this,A,_setUpDragSession2).call(this,t)}}},{key:"moveInDOM",value:function moveInDOM(){this.parent.moveEditorInDOM(this)}},{key:"_setParentAndPosition",value:function _setParentAndPosition(t,r,a){t.changeParent(this);this.x=r;this.y=a;this.fixAndSetPosition();this.moveInDOM()}},{key:"getRect",value:function getRect(t,r){var a=this.parentScale,i=_slicedToArray(this.pageDimensions,2),o=i[0],l=i[1],c=_slicedToArray(this.pageTranslation,2),u=c[0],d=c[1],h=t/a,p=r/a,v=this.x*o,y=this.y*l,_=this.width*o,g=this.height*l;switch(this.rotation){case 0:return[v+h+u,l-y-p-g+d,v+h+_+u,l-y-p+d];case 90:return[v+p+u,l-y+h+d,v+p+g+u,l-y+h+_+d];case 180:return[v-h-_+u,l-y+p+d,v-h+u,l-y+p+g+d];case 270:return[v-p-g+u,l-y-h-_+d,v-p+u,l-y-h+d];default:throw new Error("Invalid rotation")}}},{key:"getRectInCurrentCoords",value:function getRectInCurrentCoords(t,r){var a=_slicedToArray(t,4),i=a[0],o=a[1],l=a[2],c=a[3],u=l-i,d=c-o;switch(this.rotation){case 0:return[i,r-c,u,d];case 90:return[i,r-o,d,u];case 180:return[l,r-o,u,d];case 270:return[l,r-c,d,u];default:throw new Error("Invalid rotation")}}},{key:"onceAdded",value:function onceAdded(){}},{key:"isEmpty",value:function isEmpty(){return!1}},{key:"enableEditMode",value:function enableEditMode(){_classPrivateFieldSet(this,v,!0)}},{key:"disableEditMode",value:function disableEditMode(){_classPrivateFieldSet(this,v,!1)}},{key:"isInEditMode",value:function isInEditMode(){return _classPrivateFieldGet(this,v)}},{key:"shouldGetKeyboardEvents",value:function shouldGetKeyboardEvents(){return!1}},{key:"needsToBeRebuilt",value:function needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}},{key:"rebuild",value:function rebuild(){var t,r;null===(t=this.div)||void 0===t||t.addEventListener("focusin",_classPrivateFieldGet(this,u));null===(r=this.div)||void 0===r||r.addEventListener("focusout",_classPrivateFieldGet(this,d))}},{key:"serialize",value:function serialize(){(0,o.unreachable)("An editor must be serializable")}},{key:"remove",value:function remove(){this.div.removeEventListener("focusin",_classPrivateFieldGet(this,u));this.div.removeEventListener("focusout",_classPrivateFieldGet(this,d));this.isEmpty()||this.commit();this.parent?this.parent.remove(this):this._uiManager.removeEditor(this)}},{key:"isResizable",get:function get(){return!1}},{key:"makeResizable",value:function makeResizable(){if(this.isResizable){_classPrivateMethodGet(this,b,_createResizers2).call(this);_classPrivateFieldGet(this,c).classList.remove("hidden")}}},{key:"select",value:function select(){var t;this.makeResizable();null===(t=this.div)||void 0===t||t.classList.add("selectedEditor")}},{key:"unselect",value:function unselect(){var t,r,a;null===(t=_classPrivateFieldGet(this,c))||void 0===t||t.classList.add("hidden");null===(r=this.div)||void 0===r||r.classList.remove("selectedEditor");null!==(a=this.div)&&void 0!==a&&a.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus()}},{key:"updateParams",value:function updateParams(t,r){}},{key:"disableEditing",value:function disableEditing(){}},{key:"enableEditing",value:function enableEditing(){}},{key:"enterInEditMode",value:function enterInEditMode(){}},{key:"contentDiv",get:function get(){return this.div}},{key:"isEditing",get:function get(){return _classPrivateFieldGet(this,p)},set:function set(t){_classPrivateFieldSet(this,p,t);if(this.parent)if(t){this.parent.setSelected(this);this.parent.setActiveEditor(this)}else this.parent.setActiveEditor(null)}},{key:"setAspectRatio",value:function setAspectRatio(t,r){_classPrivateFieldSet(this,l,!0);var a=t/r,i=this.div.style;i.aspectRatio=a;i.height="auto"}}],[{key:"_defaultLineColor",get:function get(){return(0,o.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}},{key:"deleteAnnotationElement",value:function deleteAnnotationElement(t){var r=new k({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});r.annotationElementId=t.annotationElementId;r.deleted=!0;r._uiManager.addToAnnotationStorage(r)}},{key:"initialize",value:function initialize(t){}},{key:"updateDefaultParams",value:function updateDefaultParams(t,r){}},{key:"defaultPropertiesToUpdate",get:function get(){return[]}},{key:"isHandlingMimeForPasting",value:function isHandlingMimeForPasting(t){return!1}},{key:"paste",value:function paste(t,r){(0,o.unreachable)("Not implemented")}},{key:"deserialize",value:function deserialize(t,r,a){var i=new this.prototype.constructor({parent:r,id:r.getNextId(),uiManager:a});i.rotation=t.rotation;var o=_slicedToArray(i.pageDimensions,2),l=o[0],c=o[1],u=_slicedToArray(i.getRectInCurrentCoords(t.rect,c),4),d=u[0],h=u[1],p=u[2],v=u[3];i.x=d/l;i.y=h/c;i.width=p/l;i.height=v/c;return i}},{key:"MIN_SIZE",get:function get(){return 16}}]);return AnnotationEditor}();r.AnnotationEditor=S;function _translate2(t,r,a){var i=_slicedToArray(t,2),o=i[0],l=i[1],c=_slicedToArray(this.screenToPageTranslation(r,a),2);r=c[0];a=c[1];this.x+=r/o;this.y+=a/l;this.fixAndSetPosition()}function _rotatePoint(t,r,a){switch(a){case 90:return[r,-t];case 180:return[-t,-r];case 270:return[-r,t];default:return[t,r]}}function _getRotationMatrix2(t){switch(t){case 90:var r=_slicedToArray(this.pageDimensions,2),a=r[0],i=r[1];return[0,-a/i,i/a,0];case 180:return[-1,0,0,-1];case 270:var o=_slicedToArray(this.pageDimensions,2),l=o[0],c=o[1];return[0,l/c,-c/l,0];default:return[1,0,0,1]}}function _noContextMenu(t){t.preventDefault()}function _createResizers2(){if(!_classPrivateFieldGet(this,c)){_classPrivateFieldSet(this,c,document.createElement("div"));_classPrivateFieldGet(this,c).classList.add("resizers");var t=["topLeft","topRight","bottomRight","bottomLeft"];this._willKeepAspectRatio||t.push("topMiddle","middleRight","bottomMiddle","middleLeft");for(var r=0,a=t;r<a.length;r++){var i=a[r],o=document.createElement("div");_classPrivateFieldGet(this,c).append(o);o.classList.add("resizer",i);o.addEventListener("pointerdown",_classPrivateMethodGet(this,w,_resizerPointerdown2).bind(this,i));o.addEventListener("contextmenu",_classStaticPrivateMethodGet(S,S,_noContextMenu))}this.div.prepend(_classPrivateFieldGet(this,c))}}function _resizerPointerdown2(t,r){var a=this;r.preventDefault();var i=o.FeatureTest.platform.isMac;if(!(0!==r.button||r.ctrlKey&&i)){var l=_classPrivateMethodGet(this,P,_resizerPointermove2).bind(this,t),c=this._isDraggable;this._isDraggable=!1;var u={passive:!0,capture:!0};window.addEventListener("pointermove",l,u);var d=this.x,h=this.y,p=this.width,v=this.height,y=this.parent.div.style.cursor,_=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(r.target).cursor;var g=function pointerUpCallback(){a._isDraggable=c;window.removeEventListener("pointerup",pointerUpCallback);window.removeEventListener("blur",pointerUpCallback);window.removeEventListener("pointermove",l,u);a.parent.div.style.cursor=y;a.div.style.cursor=_;var t=a.x,r=a.y,i=a.width,o=a.height;t===d&&r===h&&i===p&&o===v||a.addCommands({cmd:function cmd(){a.width=i;a.height=o;a.x=t;a.y=r;var l=_slicedToArray(a.parentDimensions,2),c=l[0],u=l[1];a.setDims(c*i,u*o);a.fixAndSetPosition();a.moveInDOM()},undo:function undo(){a.width=p;a.height=v;a.x=d;a.y=h;var t=_slicedToArray(a.parentDimensions,2),r=t[0],i=t[1];a.setDims(r*p,i*v);a.fixAndSetPosition();a.moveInDOM()},mustExec:!0})};window.addEventListener("pointerup",g);window.addEventListener("blur",g)}}function _resizerPointermove2(t,r){var a,i,o=_slicedToArray(this.parentDimensions,2),l=o[0],c=o[1],u=this.x,d=this.y,h=this.width,p=this.height,v=S.MIN_SIZE/l,y=S.MIN_SIZE/c,_=function round(t){return Math.round(1e4*t)/1e4},g=_classPrivateMethodGet(this,m,_getRotationMatrix2).call(this,this.rotation),b=function transf(t,r){return[g[0]*t+g[2]*r,g[1]*t+g[3]*r]},w=_classPrivateMethodGet(this,m,_getRotationMatrix2).call(this,360-this.rotation),P=!1,A=!1;switch(t){case"topLeft":P=!0;a=function getPoint(t,r){return[0,0]};i=function getOpposite(t,r){return[t,r]};break;case"topMiddle":a=function getPoint(t,r){return[t/2,0]};i=function getOpposite(t,r){return[t/2,r]};break;case"topRight":P=!0;a=function getPoint(t,r){return[t,0]};i=function getOpposite(t,r){return[0,r]};break;case"middleRight":A=!0;a=function getPoint(t,r){return[t,r/2]};i=function getOpposite(t,r){return[0,r/2]};break;case"bottomRight":P=!0;a=function getPoint(t,r){return[t,r]};i=function getOpposite(t,r){return[0,0]};break;case"bottomMiddle":a=function getPoint(t,r){return[t/2,r]};i=function getOpposite(t,r){return[t/2,0]};break;case"bottomLeft":P=!0;a=function getPoint(t,r){return[0,r]};i=function getOpposite(t,r){return[t,0]};break;case"middleLeft":A=!0;a=function getPoint(t,r){return[0,r/2]};i=function getOpposite(t,r){return[t,r/2]}}var k=a(h,p),x=i(h,p),E=b.apply(void 0,_toConsumableArray(x)),T=_(u+E[0]),C=_(d+E[1]),I=1,M=1,O=_slicedToArray(this.screenToPageTranslation(r.movementX,r.movementY),2),R=O[0],G=O[1],L=_slicedToArray(function invTransf(t,r){return[w[0]*t+w[2]*r,w[1]*t+w[3]*r]}(R/l,G/c),2);R=L[0];G=L[1];if(P){var D=Math.hypot(h,p);I=M=Math.max(Math.min(Math.hypot(x[0]-k[0]-R,x[1]-k[1]-G)/D,1/h,1/p),v/h,y/p)}else A?I=Math.max(v,Math.min(1,Math.abs(x[0]-k[0]-R)))/h:M=Math.max(y,Math.min(1,Math.abs(x[1]-k[1]-G)))/p;var j=_(h*I),N=_(p*M),W=T-(E=b.apply(void 0,_toConsumableArray(i(j,N))))[0],B=C-E[1];this.width=j;this.height=N;this.x=W;this.y=B;this.setDims(l*j,c*N);this.fixAndSetPosition()}function _setUpDragSession2(t){var r=this;if(this._isDraggable){var a,i,l=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();if(l){a={passive:!0,capture:!0};i=function pointerMoveCallback(t){var a=_slicedToArray(r.screenToPageTranslation(t.movementX,t.movementY),2),i=a[0],o=a[1];r._uiManager.dragSelectedEditors(i,o)};window.addEventListener("pointermove",i,a)}var c=function pointerUpCallback(){window.removeEventListener("pointerup",pointerUpCallback);window.removeEventListener("blur",pointerUpCallback);l&&window.removeEventListener("pointermove",i,a);_classPrivateFieldSet(r,h,!1);if(!r._uiManager.endDragSession()){var c=o.FeatureTest.platform.isMac;t.ctrlKey&&!c||t.shiftKey||t.metaKey&&c?r.parent.toggleSelected(r):r.parent.setSelected(r)}};window.addEventListener("pointerup",c);window.addEventListener("blur",c)}}_defineProperty(S,"_colorManager",new i.ColorManager);_defineProperty(S,"_zIndex",1);var k=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(FakeEditor,t);var r=_createSuper(FakeEditor);function FakeEditor(t){var a;_classCallCheck(this,FakeEditor);(a=r.call(this,t)).annotationElementId=t.annotationElementId;a.deleted=!0;return a}_createClass(FakeEditor,[{key:"serialize",value:function serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}]);return FakeEditor}(S)},(t,r,a)=>{var i,o=a(3),l=a(95),c=a(5).f,u=a(65),d=a(107),h=a(132),p=a(16),v=a(134),y=a(36),_=l("".endsWith),g=l("".slice),m=Math.min,b=v("endsWith");o({target:"String",proto:!0,forced:!(!y&&!b&&!!(i=c(String.prototype,"endsWith"),i&&!i.writable))&&!b},{endsWith:function endsWith(t){var r=d(p(this));h(t);var a=arguments.length>1?arguments[1]:void 0,i=r.length,o=void 0===a?i:m(u(a),i),l=d(t);return _?_(r,l,o):g(r,o-l.length,o)===l}})},(t,r,a)=>{var i=a(3),o=Math.hypot,l=Math.abs,c=Math.sqrt;i({target:"Math",stat:!0,arity:2,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function hypot(t,r){for(var a,i,o=0,u=0,d=arguments.length,h=0;u<d;)if(h<(a=l(arguments[u++]))){o=o*(i=h/a)*i+1;h=a}else o+=a>0?(i=a/h)*i:a;return h===1/0?1/0:h*c(o)}})},(t,r,a)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}a(92);a(104);a(292);a(300);a(301);a(85);a(90);a(112);a(306);a(307);a(308);a(309);a(2);Object.defineProperty(r,"__esModule",{value:!0});r.KeyboardManager=r.CommandManager=r.ColorManager=r.AnnotationEditorUIManager=void 0;r.bindEvents=function bindEvents(t,r,a){var i,o=_createForOfIteratorHelper(a);try{for(o.s();!(i=o.n()).done;){var l=i.value;r.addEventListener(l,t[l].bind(t))}}catch(t){o.e(t)}finally{o.f()}};r.opacityToHex=function opacityToHex(t){return Math.round(Math.min(255,Math.max(1,255*t))).toString(16).padStart(2,"0")};a(251);a(146);a(255);a(257);a(140);a(280);a(148);a(149);a(131);a(246);a(192);a(193);a(196);a(197);a(198);a(203);a(204);a(205);a(207);a(208);a(209);a(210);a(211);a(212);a(213);a(216);a(217);a(219);a(220);a(221);a(222);a(223);a(224);a(228);a(229);a(231);a(232);a(233);a(235);a(238);a(244);a(167);a(357);a(312);a(314);a(325);a(327);a(329);a(331);a(333);a(335);a(258);a(358);a(359);a(297);a(245);a(360);a(105);a(247);a(310);a(302);a(347);a(351);a(337);a(259);a(123);var i=a(1),o=a(362);function _defineProperty(t,r,a){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||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 _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||_unsupportedIterableToArray(t,r)||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 _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,r,a){t[r]=a.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,o){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(o||[]);return i(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var h={};define(h,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&a.call(v,l)&&(h=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(h);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,o,l,c){var u=tryCatch(t[i],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==_typeof(h)&&a.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function value(t,a){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,a,r,i)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,a){var i="suspendedStart";return function(o,l){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw l;return{value:void 0,done:!0}}for(a.method=o,a.arg=l;;){var c=a.delegate;if(c){var u=maybeInvokeDelegate(c,a);if(u){if(u===d)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===i)throw i="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i="executing";var h=tryCatch(t,r,a);if("normal"===h.type){if(i=a.done?"completed":"suspendedYield",h.arg===d)continue;return{value:h.arg,done:a.done}}"throw"===h.type&&(i="completed",a.method="throw",a.arg=h.arg)}}}function maybeInvokeDelegate(t,r){var a=r.method,i=t.iterator[a];if(void 0===i)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),d;var o=tryCatch(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,d):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function next(){for(;++i<t.length;)if(a.call(t,i))return next.value=t[i],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,i(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),i(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(r,a,i,o),l);return t.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(y),define(y,u,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(a,i){return l.type="throw",l.arg=t,r.next=a,i&&(r.method="next",r.arg=void 0),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,d):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),d}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,a){return this.delegate={iterator:values(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=void 0),d}},t}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateFieldInitSpec(t,r,a){_checkPrivateRedeclaration(t,r);r.set(t,a)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,a){!function _classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,_classExtractFieldDescriptor(t,r,"set"),a);return a}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}var l=new WeakMap,c=function(){function IdManager(){_classCallCheck(this,IdManager);_classPrivateFieldInitSpec(this,l,{writable:!0,value:0})}_createClass(IdManager,[{key:"getId",value:function getId(){var t,r;return"".concat(i.AnnotationEditorPrefix).concat((_classPrivateFieldSet(this,l,(t=_classPrivateFieldGet(this,l),r=t++,t)),r))}}]);return IdManager}(),u=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakSet,v=function(){function ImageManager(){_classCallCheck(this,ImageManager);_classPrivateMethodInitSpec(this,p);_classPrivateFieldInitSpec(this,u,{writable:!0,value:(0,i.getUuid)()});_classPrivateFieldInitSpec(this,d,{writable:!0,value:0});_classPrivateFieldInitSpec(this,h,{writable:!0,value:null})}_createClass(ImageManager,[{key:"getFromFile",value:(a=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){var r,a,i,o;return _regeneratorRuntime().wrap((function _callee$(l){for(;;)switch(l.prev=l.next){case 0:r=t.lastModified,a=t.name,i=t.size,o=t.type;return l.abrupt("return",_classPrivateMethodGet(this,p,_get2).call(this,"".concat(r,"_").concat(a,"_").concat(i,"_").concat(o),t));case 2:case"end":return l.stop()}}),_callee,this)}))),function getFromFile(t){return a.apply(this,arguments)})},{key:"getFromUrl",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){return _regeneratorRuntime().wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",_classPrivateMethodGet(this,p,_get2).call(this,t,t));case 1:case"end":return r.stop()}}),_callee2,this)}))),function getFromUrl(t){return r.apply(this,arguments)})},{key:"getFromId",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(t){var r;return _regeneratorRuntime().wrap((function _callee3$(a){for(;;)switch(a.prev=a.next){case 0:_classPrivateFieldGet(this,h)||_classPrivateFieldSet(this,h,new Map);if(r=_classPrivateFieldGet(this,h).get(t)){a.next=4;break}return a.abrupt("return",null);case 4:if(!r.bitmap){a.next=7;break}r.refCounter+=1;return a.abrupt("return",r);case 7:if(!r.file){a.next=9;break}return a.abrupt("return",this.getFromFile(r.file));case 9:return a.abrupt("return",this.getFromUrl(r.url));case 10:case"end":return a.stop()}}),_callee3,this)}))),function getFromId(r){return t.apply(this,arguments)})},{key:"getSvgUrl",value:function getSvgUrl(t){var r=_classPrivateFieldGet(this,h).get(t);return null!=r&&r.isSvg?r.svgUrl:null}},{key:"deleteId",value:function deleteId(t){_classPrivateFieldGet(this,h)||_classPrivateFieldSet(this,h,new Map);var r=_classPrivateFieldGet(this,h).get(t);if(r){r.refCounter-=1;0===r.refCounter&&(r.bitmap=null)}}},{key:"isValidId",value:function isValidId(t){return t.startsWith("image_".concat(_classPrivateFieldGet(this,u),"_"))}}],[{key:"_isSVGFittingCanvas",get:function get(){var t=new OffscreenCanvas(1,3).getContext("2d"),r=new Image;r.src='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>';var a=r.decode().then((function(){t.drawImage(r,0,0,1,1,0,0,1,3);return 0===new Uint32Array(t.getImageData(0,0,1,1).data.buffer)[0]}));return(0,i.shadow)(this,"_isSVGFittingCanvas",a)}}]);var t,r,a;return ImageManager}();function _get2(t,r){return _get3.apply(this,arguments)}function _get3(){return(_get3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(t,r){var a,i,o,l,c,p,y,_,g,m;return _regeneratorRuntime().wrap((function _callee5$(b){for(;;)switch(b.prev=b.next){case 0:_classPrivateFieldGet(this,h)||_classPrivateFieldSet(this,h,new Map);if(null!==(i=_classPrivateFieldGet(this,h).get(t))){b.next=4;break}return b.abrupt("return",null);case 4:if(null===(a=i)||void 0===a||!a.bitmap){b.next=7;break}i.refCounter+=1;return b.abrupt("return",i);case 7:b.prev=7;i||(i={bitmap:null,id:"image_".concat(_classPrivateFieldGet(this,u),"_").concat((_classPrivateFieldSet(this,d,(o=_classPrivateFieldGet(this,d),l=o++,o)),l)),refCounter:0,isSvg:!1});if("string"!=typeof r){b.next=21;break}i.url=r;b.next=13;return fetch(r);case 13:if((p=b.sent).ok){b.next=16;break}throw new Error(p.statusText);case 16:b.next=18;return p.blob();case 18:c=b.sent;b.next=22;break;case 21:c=i.file=r;case 22:if("image/svg+xml"!==c.type){b.next=32;break}y=v._isSVGFittingCanvas;_=new FileReader;g=new Image;m=new Promise((function(t,r){g.onload=function(){i.bitmap=g;i.isSvg=!0;t()};_.onload=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(){var t;return _regeneratorRuntime().wrap((function _callee4$(r){for(;;)switch(r.prev=r.next){case 0:t=i.svgUrl=_.result;r.next=3;return y;case 3:if(!r.sent){r.next=7;break}r.t0="".concat(t,"#svgView(preserveAspectRatio(none))");r.next=8;break;case 7:r.t0=t;case 8:g.src=r.t0;case 9:case"end":return r.stop()}}),_callee4)})));g.onerror=_.onerror=r}));_.readAsDataURL(c);b.next=30;return m;case 30:b.next=35;break;case 32:b.next=34;return createImageBitmap(c);case 34:i.bitmap=b.sent;case 35:i.refCounter=1;b.next=42;break;case 38:b.prev=38;b.t0=b.catch(7);console.error(b.t0);i=null;case 42:_classPrivateFieldGet(this,h).set(t,i);i&&_classPrivateFieldGet(this,h).set(i.id,i);return b.abrupt("return",i);case 45:case"end":return b.stop()}}),_callee5,this,[[7,38]])})))).apply(this,arguments)}var y=new WeakMap,_=new WeakMap,g=new WeakMap,m=new WeakMap,b=function(){function CommandManager(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128;_classCallCheck(this,CommandManager);_classPrivateFieldInitSpec(this,y,{writable:!0,value:[]});_classPrivateFieldInitSpec(this,_,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,g,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,m,{writable:!0,value:-1});_classPrivateFieldSet(this,g,t)}_createClass(CommandManager,[{key:"add",value:function add(t){var r=t.cmd,a=t.undo,i=t.mustExec,o=t.type,l=void 0===o?NaN:o,c=t.overwriteIfSameType,u=void 0!==c&&c,d=t.keepUndo,h=void 0!==d&&d;i&&r();if(!_classPrivateFieldGet(this,_)){var p={cmd:r,undo:a,type:l};if(-1!==_classPrivateFieldGet(this,m))if(u&&_classPrivateFieldGet(this,y)[_classPrivateFieldGet(this,m)].type===l){h&&(p.undo=_classPrivateFieldGet(this,y)[_classPrivateFieldGet(this,m)].undo);_classPrivateFieldGet(this,y)[_classPrivateFieldGet(this,m)]=p}else{var v=_classPrivateFieldGet(this,m)+1;if(v===_classPrivateFieldGet(this,g))_classPrivateFieldGet(this,y).splice(0,1);else{_classPrivateFieldSet(this,m,v);v<_classPrivateFieldGet(this,y).length&&_classPrivateFieldGet(this,y).splice(v)}_classPrivateFieldGet(this,y).push(p)}else{_classPrivateFieldGet(this,y).length>0&&(_classPrivateFieldGet(this,y).length=0);_classPrivateFieldSet(this,m,0);_classPrivateFieldGet(this,y).push(p)}}}},{key:"undo",value:function undo(){if(-1!==_classPrivateFieldGet(this,m)){_classPrivateFieldSet(this,_,!0);_classPrivateFieldGet(this,y)[_classPrivateFieldGet(this,m)].undo();_classPrivateFieldSet(this,_,!1);_classPrivateFieldSet(this,m,_classPrivateFieldGet(this,m)-1)}}},{key:"redo",value:function redo(){if(_classPrivateFieldGet(this,m)<_classPrivateFieldGet(this,y).length-1){_classPrivateFieldSet(this,m,_classPrivateFieldGet(this,m)+1);_classPrivateFieldSet(this,_,!0);_classPrivateFieldGet(this,y)[_classPrivateFieldGet(this,m)].cmd();_classPrivateFieldSet(this,_,!1)}}},{key:"hasSomethingToUndo",value:function hasSomethingToUndo(){return-1!==_classPrivateFieldGet(this,m)}},{key:"hasSomethingToRedo",value:function hasSomethingToRedo(){return _classPrivateFieldGet(this,m)<_classPrivateFieldGet(this,y).length-1}},{key:"destroy",value:function destroy(){_classPrivateFieldSet(this,y,null)}},{key:"reset",value:function reset(){_classPrivateFieldSet(this,y,[]);_classPrivateFieldSet(this,m,-1);_classPrivateFieldSet(this,_,!1)}}]);return CommandManager}();r.CommandManager=b;var w=new WeakSet,P=function(){function KeyboardManager(t){_classCallCheck(this,KeyboardManager);_classPrivateMethodInitSpec(this,w);this.buffer=[];this.callbacks=new Map;this.allKeys=new Set;var r,a=i.FeatureTest.platform.isMac,o=_createForOfIteratorHelper(t);try{for(o.s();!(r=o.n()).done;){var l,c=_slicedToArray(r.value,3),u=c[0],d=c[1],h=c[2],p=void 0===h?{}:h,v=_createForOfIteratorHelper(u);try{for(v.s();!(l=v.n()).done;){var y=l.value,_=y.startsWith("mac+");if(a&&_){this.callbacks.set(y.slice(4),{callback:d,options:p});this.allKeys.add(y.split("+").at(-1))}else if(!a&&!_){this.callbacks.set(y,{callback:d,options:p});this.allKeys.add(y.split("+").at(-1))}}}catch(t){v.e(t)}finally{v.f()}}}catch(t){o.e(t)}finally{o.f()}}_createClass(KeyboardManager,[{key:"exec",value:function exec(t,r){if(this.allKeys.has(r.key)){var a=this.callbacks.get(_classPrivateMethodGet(this,w,_serialize2).call(this,r));if(a){var i=a.callback,o=a.options,l=o.bubbles,c=void 0!==l&&l,u=o.args,d=void 0===u?[]:u,h=o.checker,p=void 0===h?null:h;if(!p||p(t,r)){i.bind.apply(i,[t].concat(_toConsumableArray(d)))();if(!c){r.stopPropagation();r.preventDefault()}}}}}}]);return KeyboardManager}();r.KeyboardManager=P;function _serialize2(t){t.altKey&&this.buffer.push("alt");t.ctrlKey&&this.buffer.push("ctrl");t.metaKey&&this.buffer.push("meta");t.shiftKey&&this.buffer.push("shift");this.buffer.push(t.key);var r=this.buffer.join("+");this.buffer.length=0;return r}var A=function(){function ColorManager(){_classCallCheck(this,ColorManager)}_createClass(ColorManager,[{key:"_colors",get:function get(){var t=new Map([["CanvasText",null],["Canvas",null]]);(0,o.getColorValues)(t);return(0,i.shadow)(this,"_colors",t)}},{key:"convert",value:function convert(t){var r=(0,o.getRGB)(t);if(!window.matchMedia("(forced-colors: active)").matches)return r;var a,i=_createForOfIteratorHelper(this._colors);try{for(i.s();!(a=i.n()).done;){var l=_slicedToArray(a.value,2),c=l[0];if(l[1].every((function(t,a){return t===r[a]})))return ColorManager._colorsMapping.get(c)}}catch(t){i.e(t)}finally{i.f()}return r}},{key:"getHexCode",value:function getHexCode(t){var r=this._colors.get(t);return r?i.Util.makeHexColor.apply(i.Util,_toConsumableArray(r)):t}}]);return ColorManager}();r.ColorManager=A;_defineProperty(A,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));var S=new WeakMap,k=new WeakMap,x=new WeakMap,E=new WeakMap,T=new WeakMap,C=new WeakMap,I=new WeakMap,M=new WeakMap,O=new WeakMap,R=new WeakMap,G=new WeakMap,L=new WeakMap,D=new WeakMap,j=new WeakMap,N=new WeakMap,W=new WeakMap,B=new WeakMap,U=new WeakMap,H=new WeakMap,z=new WeakMap,q=new WeakMap,V=new WeakMap,X=new WeakMap,Y=new WeakMap,K=new WeakMap,J=new WeakMap,$=new WeakMap,Q=new WeakMap,Z=new WeakMap,ee=new WeakMap,te=new WeakMap,re=new WeakMap,ne=new WeakMap,ae=new WeakMap,ie=new WeakSet,oe=new WeakSet,se=new WeakSet,le=new WeakSet,ce=new WeakSet,ue=new WeakSet,de=new WeakSet,he=new WeakSet,fe=new WeakSet,pe=new WeakSet,ve=new WeakSet,ye=new WeakSet,_e=new WeakSet,ge=function(){function AnnotationEditorUIManager(t,r,a,l,u){_classCallCheck(this,AnnotationEditorUIManager);_classPrivateMethodInitSpec(this,_e);_classPrivateMethodInitSpec(this,ye);_classPrivateMethodInitSpec(this,ve);_classPrivateMethodInitSpec(this,pe);_classPrivateMethodInitSpec(this,fe);_classPrivateMethodInitSpec(this,he);_classPrivateMethodInitSpec(this,de);_classPrivateMethodInitSpec(this,ue);_classPrivateMethodInitSpec(this,ce);_classPrivateMethodInitSpec(this,le);_classPrivateMethodInitSpec(this,se);_classPrivateMethodInitSpec(this,oe);_classPrivateMethodInitSpec(this,ie);_classPrivateFieldInitSpec(this,S,{writable:!0,value:null});_classPrivateFieldInitSpec(this,k,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,x,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,E,{writable:!0,value:null});_classPrivateFieldInitSpec(this,T,{writable:!0,value:new b});_classPrivateFieldInitSpec(this,C,{writable:!0,value:0});_classPrivateFieldInitSpec(this,I,{writable:!0,value:new Set});_classPrivateFieldInitSpec(this,M,{writable:!0,value:null});_classPrivateFieldInitSpec(this,O,{writable:!0,value:null});_classPrivateFieldInitSpec(this,R,{writable:!0,value:new Set});_classPrivateFieldInitSpec(this,G,{writable:!0,value:null});_classPrivateFieldInitSpec(this,L,{writable:!0,value:null});_classPrivateFieldInitSpec(this,D,{writable:!0,value:new c});_classPrivateFieldInitSpec(this,j,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,N,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,W,{writable:!0,value:null});_classPrivateFieldInitSpec(this,B,{writable:!0,value:i.AnnotationEditorType.NONE});_classPrivateFieldInitSpec(this,U,{writable:!0,value:new Set});_classPrivateFieldInitSpec(this,H,{writable:!0,value:null});_classPrivateFieldInitSpec(this,z,{writable:!0,value:this.blur.bind(this)});_classPrivateFieldInitSpec(this,q,{writable:!0,value:this.focus.bind(this)});_classPrivateFieldInitSpec(this,V,{writable:!0,value:this.copy.bind(this)});_classPrivateFieldInitSpec(this,X,{writable:!0,value:this.cut.bind(this)});_classPrivateFieldInitSpec(this,Y,{writable:!0,value:this.paste.bind(this)});_classPrivateFieldInitSpec(this,K,{writable:!0,value:this.keydown.bind(this)});_classPrivateFieldInitSpec(this,J,{writable:!0,value:this.onEditingAction.bind(this)});_classPrivateFieldInitSpec(this,$,{writable:!0,value:this.onPageChanging.bind(this)});_classPrivateFieldInitSpec(this,Q,{writable:!0,value:this.onScaleChanging.bind(this)});_classPrivateFieldInitSpec(this,Z,{writable:!0,value:this.onRotationChanging.bind(this)});_classPrivateFieldInitSpec(this,ee,{writable:!0,value:{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1}});_classPrivateFieldInitSpec(this,te,{writable:!0,value:[0,0]});_classPrivateFieldInitSpec(this,re,{writable:!0,value:null});_classPrivateFieldInitSpec(this,ne,{writable:!0,value:null});_classPrivateFieldInitSpec(this,ae,{writable:!0,value:null});_classPrivateFieldSet(this,ne,t);_classPrivateFieldSet(this,ae,r);_classPrivateFieldSet(this,G,a);_classPrivateFieldGet(this,G)._on("editingaction",_classPrivateFieldGet(this,J));_classPrivateFieldGet(this,G)._on("pagechanging",_classPrivateFieldGet(this,$));_classPrivateFieldGet(this,G)._on("scalechanging",_classPrivateFieldGet(this,Q));_classPrivateFieldGet(this,G)._on("rotationchanging",_classPrivateFieldGet(this,Z));_classPrivateFieldSet(this,E,l.annotationStorage);_classPrivateFieldSet(this,L,l.filterFactory);_classPrivateFieldSet(this,H,u);this.viewParameters={realScale:o.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}_createClass(AnnotationEditorUIManager,[{key:"destroy",value:function destroy(){_classPrivateMethodGet(this,le,_removeKeyboardManager2).call(this);_classPrivateMethodGet(this,oe,_removeFocusManager2).call(this);_classPrivateFieldGet(this,G)._off("editingaction",_classPrivateFieldGet(this,J));_classPrivateFieldGet(this,G)._off("pagechanging",_classPrivateFieldGet(this,$));_classPrivateFieldGet(this,G)._off("scalechanging",_classPrivateFieldGet(this,Q));_classPrivateFieldGet(this,G)._off("rotationchanging",_classPrivateFieldGet(this,Z));var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,x).values());try{for(r.s();!(t=r.n()).done;){t.value.destroy()}}catch(t){r.e(t)}finally{r.f()}_classPrivateFieldGet(this,x).clear();_classPrivateFieldGet(this,k).clear();_classPrivateFieldGet(this,R).clear();_classPrivateFieldSet(this,S,null);_classPrivateFieldGet(this,U).clear();_classPrivateFieldGet(this,T).destroy()}},{key:"hcmFilter",get:function get(){return(0,i.shadow)(this,"hcmFilter",_classPrivateFieldGet(this,H)?_classPrivateFieldGet(this,L).addHCMFilter(_classPrivateFieldGet(this,H).foreground,_classPrivateFieldGet(this,H).background):"none")}},{key:"onPageChanging",value:function onPageChanging(t){var r=t.pageNumber;_classPrivateFieldSet(this,C,r-1)}},{key:"focusMainContainer",value:function focusMainContainer(){_classPrivateFieldGet(this,ne).focus()}},{key:"findParent",value:function findParent(t,r){var a,i=_createForOfIteratorHelper(_classPrivateFieldGet(this,x).values());try{for(i.s();!(a=i.n()).done;){var o=a.value,l=o.div.getBoundingClientRect(),c=l.x,u=l.y,d=l.width,h=l.height;if(t>=c&&t<=c+d&&r>=u&&r<=u+h)return o}}catch(t){i.e(t)}finally{i.f()}return null}},{key:"disableUserSelect",value:function disableUserSelect(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];_classPrivateFieldGet(this,ae).classList.toggle("noUserSelect",t)}},{key:"addShouldRescale",value:function addShouldRescale(t){_classPrivateFieldGet(this,R).add(t)}},{key:"removeShouldRescale",value:function removeShouldRescale(t){_classPrivateFieldGet(this,R).delete(t)}},{key:"onScaleChanging",value:function onScaleChanging(t){var r=t.scale;this.commitOrRemove();this.viewParameters.realScale=r*o.PixelsPerInch.PDF_TO_CSS_UNITS;var a,i=_createForOfIteratorHelper(_classPrivateFieldGet(this,R));try{for(i.s();!(a=i.n()).done;){a.value.onScaleChanging()}}catch(t){i.e(t)}finally{i.f()}}},{key:"onRotationChanging",value:function onRotationChanging(t){var r=t.pagesRotation;this.commitOrRemove();this.viewParameters.rotation=r}},{key:"addToAnnotationStorage",value:function addToAnnotationStorage(t){t.isEmpty()||!_classPrivateFieldGet(this,E)||_classPrivateFieldGet(this,E).has(t.id)||_classPrivateFieldGet(this,E).setValue(t.id,t)}},{key:"blur",value:function blur(){if(this.hasSelection){var t,r=document.activeElement,a=_createForOfIteratorHelper(_classPrivateFieldGet(this,U));try{for(a.s();!(t=a.n()).done;){var i=t.value;if(i.div.contains(r)){_classPrivateFieldSet(this,W,[i,r]);i._focusEventsAllowed=!1;break}}}catch(t){a.e(t)}finally{a.f()}}}},{key:"focus",value:function focus(){if(_classPrivateFieldGet(this,W)){var t=_slicedToArray(_classPrivateFieldGet(this,W),2),r=t[0],a=t[1];_classPrivateFieldSet(this,W,null);a.addEventListener("focusin",(function(){r._focusEventsAllowed=!0}),{once:!0});a.focus()}}},{key:"copy",value:function copy(t){var r;t.preventDefault();null===(r=_classPrivateFieldGet(this,S))||void 0===r||r.commitOrRemove();if(this.hasSelection){var a,i=[],o=_createForOfIteratorHelper(_classPrivateFieldGet(this,U));try{for(o.s();!(a=o.n()).done;){var l=a.value.serialize(!0);l&&i.push(l)}}catch(t){o.e(t)}finally{o.f()}0!==i.length&&t.clipboardData.setData("application/pdfjs",JSON.stringify(i))}}},{key:"cut",value:function cut(t){this.copy(t);this.delete()}},{key:"paste",value:function paste(t){t.preventDefault();var r,a=t.clipboardData,i=_createForOfIteratorHelper(a.items);try{for(i.s();!(r=i.n()).done;){var o,l=r.value,c=_createForOfIteratorHelper(_classPrivateFieldGet(this,O));try{for(c.s();!(o=c.n()).done;){var u=o.value;if(u.isHandlingMimeForPasting(l.type)){u.paste(l,this.currentLayer);return}}}catch(t){c.e(t)}finally{c.f()}}}catch(t){i.e(t)}finally{i.f()}var d=a.getData("application/pdfjs");this.addSerializedEditor(d)}},{key:"addSerializedEditor",value:function addSerializedEditor(t){var r=this,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t){try{"string"==typeof t&&(t=JSON.parse(t))}catch(t){(0,i.warn)('paste: "'.concat(t.message,'".'));return}if(Array.isArray(t)){var c=_classPrivateFieldGet(this,B);a&&c===i.AnnotationEditorType.NONE&&this.updateMode(i.AnnotationEditorType.FREETEXT);this.unselectAll();try{var u,d=[],h=_createForOfIteratorHelper(t);try{for(h.s();!(u=h.n()).done;){var p=u.value,v=void 0===p.pageIndex,y=(l||v?this.currentLayer:this.getLayer(p.pageIndex)).deserialize(p);if(!y)return;y.doNotMove=o;d.push(y)}}catch(t){h.e(t)}finally{h.f()}this.addCommands({cmd:function cmd(){for(var t=0,a=d;t<a.length;t++){var i=a[t];_classPrivateMethodGet(r,ve,_addEditorToLayer2).call(r,i)}_classPrivateMethodGet(r,_e,_selectEditors2).call(r,d)},undo:function undo(){for(var t=0,r=d;t<r.length;t++){r[t].remove()}},mustExec:!0})}catch(t){(0,i.warn)('paste: "'.concat(t.message,'".'))}a&&c!==_classPrivateFieldGet(this,B)&&this.updateMode(c)}}}},{key:"keydown",value:function keydown(t){var r;null!==(r=this.getActive())&&void 0!==r&&r.shouldGetKeyboardEvents()||AnnotationEditorUIManager._keyboardManager.exec(this,t)}},{key:"onEditingAction",value:function onEditingAction(t){["undo","redo","delete","selectAll"].includes(t.name)&&this[t.name]()}},{key:"setEditingState",value:function setEditingState(t){if(t){_classPrivateMethodGet(this,ie,_addFocusManager2).call(this);_classPrivateMethodGet(this,se,_addKeyboardManager2).call(this);_classPrivateMethodGet(this,ce,_addCopyPasteListeners2).call(this);_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{isEditing:_classPrivateFieldGet(this,B)!==i.AnnotationEditorType.NONE,isEmpty:_classPrivateMethodGet(this,ye,_isEmpty2).call(this),hasSomethingToUndo:_classPrivateFieldGet(this,T).hasSomethingToUndo(),hasSomethingToRedo:_classPrivateFieldGet(this,T).hasSomethingToRedo(),hasSelectedEditor:!1})}else{_classPrivateMethodGet(this,oe,_removeFocusManager2).call(this);_classPrivateMethodGet(this,le,_removeKeyboardManager2).call(this);_classPrivateMethodGet(this,ue,_removeCopyPasteListeners2).call(this);_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{isEditing:!1});this.disableUserSelect(!1)}}},{key:"registerEditorTypes",value:function registerEditorTypes(t){if(!_classPrivateFieldGet(this,O)){_classPrivateFieldSet(this,O,t);var r,a=_createForOfIteratorHelper(_classPrivateFieldGet(this,O));try{for(a.s();!(r=a.n()).done;){var i=r.value;_classPrivateMethodGet(this,he,_dispatchUpdateUI2).call(this,i.defaultPropertiesToUpdate)}}catch(t){a.e(t)}finally{a.f()}}}},{key:"getId",value:function getId(){return _classPrivateFieldGet(this,D).getId()}},{key:"currentLayer",get:function get(){return _classPrivateFieldGet(this,x).get(_classPrivateFieldGet(this,C))}},{key:"getLayer",value:function getLayer(t){return _classPrivateFieldGet(this,x).get(t)}},{key:"currentPageIndex",get:function get(){return _classPrivateFieldGet(this,C)}},{key:"addLayer",value:function addLayer(t){_classPrivateFieldGet(this,x).set(t.pageIndex,t);_classPrivateFieldGet(this,j)?t.enable():t.disable()}},{key:"removeLayer",value:function removeLayer(t){_classPrivateFieldGet(this,x).delete(t.pageIndex)}},{key:"updateMode",value:function updateMode(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(_classPrivateFieldGet(this,B)!==t){_classPrivateFieldSet(this,B,t);if(t!==i.AnnotationEditorType.NONE){this.setEditingState(!0);_classPrivateMethodGet(this,fe,_enableAll2).call(this);this.unselectAll();var a,o=_createForOfIteratorHelper(_classPrivateFieldGet(this,x).values());try{for(o.s();!(a=o.n()).done;){a.value.updateMode(t)}}catch(t){o.e(t)}finally{o.f()}if(r){var l,c=_createForOfIteratorHelper(_classPrivateFieldGet(this,k).values());try{for(c.s();!(l=c.n()).done;){var u=l.value;if(u.annotationElementId===r){this.setSelected(u);u.enterInEditMode();break}}}catch(t){c.e(t)}finally{c.f()}}}else{this.setEditingState(!1);_classPrivateMethodGet(this,pe,_disableAll2).call(this)}}}},{key:"updateToolbar",value:function updateToolbar(t){t!==_classPrivateFieldGet(this,B)&&_classPrivateFieldGet(this,G).dispatch("switchannotationeditormode",{source:this,mode:t})}},{key:"updateParams",value:function updateParams(t,r){if(_classPrivateFieldGet(this,O))if(t!==i.AnnotationEditorParamsType.CREATE){var a,o=_createForOfIteratorHelper(_classPrivateFieldGet(this,U));try{for(o.s();!(a=o.n()).done;){a.value.updateParams(t,r)}}catch(t){o.e(t)}finally{o.f()}var l,c=_createForOfIteratorHelper(_classPrivateFieldGet(this,O));try{for(c.s();!(l=c.n()).done;){l.value.updateDefaultParams(t,r)}}catch(t){c.e(t)}finally{c.f()}}else this.currentLayer.addNewEditor(t)}},{key:"enableWaiting",value:function enableWaiting(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(_classPrivateFieldGet(this,N)!==t){_classPrivateFieldSet(this,N,t);var r,a=_createForOfIteratorHelper(_classPrivateFieldGet(this,x).values());try{for(a.s();!(r=a.n()).done;){var i=r.value;t?i.disableClick():i.enableClick();i.div.classList.toggle("waiting",t)}}catch(t){a.e(t)}finally{a.f()}}}},{key:"getEditors",value:function getEditors(t){var r,a=[],i=_createForOfIteratorHelper(_classPrivateFieldGet(this,k).values());try{for(i.s();!(r=i.n()).done;){var o=r.value;o.pageIndex===t&&a.push(o)}}catch(t){i.e(t)}finally{i.f()}return a}},{key:"getEditor",value:function getEditor(t){return _classPrivateFieldGet(this,k).get(t)}},{key:"addEditor",value:function addEditor(t){_classPrivateFieldGet(this,k).set(t.id,t)}},{key:"removeEditor",value:function removeEditor(t){_classPrivateFieldGet(this,k).delete(t.id);this.unselect(t);if(!t.annotationElementId||!_classPrivateFieldGet(this,I).has(t.annotationElementId)){var r;null===(r=_classPrivateFieldGet(this,E))||void 0===r||r.remove(t.id)}}},{key:"addDeletedAnnotationElement",value:function addDeletedAnnotationElement(t){_classPrivateFieldGet(this,I).add(t.annotationElementId);t.deleted=!0}},{key:"isDeletedAnnotationElement",value:function isDeletedAnnotationElement(t){return _classPrivateFieldGet(this,I).has(t)}},{key:"removeDeletedAnnotationElement",value:function removeDeletedAnnotationElement(t){_classPrivateFieldGet(this,I).delete(t.annotationElementId);t.deleted=!1}},{key:"setActiveEditor",value:function setActiveEditor(t){if(_classPrivateFieldGet(this,S)!==t){_classPrivateFieldSet(this,S,t);t&&_classPrivateMethodGet(this,he,_dispatchUpdateUI2).call(this,t.propertiesToUpdate)}}},{key:"toggleSelected",value:function toggleSelected(t){if(_classPrivateFieldGet(this,U).has(t)){_classPrivateFieldGet(this,U).delete(t);t.unselect();_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSelectedEditor:this.hasSelection})}else{_classPrivateFieldGet(this,U).add(t);t.select();_classPrivateMethodGet(this,he,_dispatchUpdateUI2).call(this,t.propertiesToUpdate);_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSelectedEditor:!0})}}},{key:"setSelected",value:function setSelected(t){var r,a=_createForOfIteratorHelper(_classPrivateFieldGet(this,U));try{for(a.s();!(r=a.n()).done;){var i=r.value;i!==t&&i.unselect()}}catch(t){a.e(t)}finally{a.f()}_classPrivateFieldGet(this,U).clear();_classPrivateFieldGet(this,U).add(t);t.select();_classPrivateMethodGet(this,he,_dispatchUpdateUI2).call(this,t.propertiesToUpdate);_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSelectedEditor:!0})}},{key:"isSelected",value:function isSelected(t){return _classPrivateFieldGet(this,U).has(t)}},{key:"unselect",value:function unselect(t){t.unselect();_classPrivateFieldGet(this,U).delete(t);_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSelectedEditor:this.hasSelection})}},{key:"hasSelection",get:function get(){return 0!==_classPrivateFieldGet(this,U).size}},{key:"undo",value:function undo(){_classPrivateFieldGet(this,T).undo();_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSomethingToUndo:_classPrivateFieldGet(this,T).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:_classPrivateMethodGet(this,ye,_isEmpty2).call(this)})}},{key:"redo",value:function redo(){_classPrivateFieldGet(this,T).redo();_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:_classPrivateFieldGet(this,T).hasSomethingToRedo(),isEmpty:_classPrivateMethodGet(this,ye,_isEmpty2).call(this)})}},{key:"addCommands",value:function addCommands(t){_classPrivateFieldGet(this,T).add(t);_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:_classPrivateMethodGet(this,ye,_isEmpty2).call(this)})}},{key:"delete",value:function _delete(){var t=this;this.commitOrRemove();if(this.hasSelection){var r=_toConsumableArray(_classPrivateFieldGet(this,U));this.addCommands({cmd:function cmd(){var t,a=_createForOfIteratorHelper(r);try{for(a.s();!(t=a.n()).done;){t.value.remove()}}catch(t){a.e(t)}finally{a.f()}},undo:function undo(){var a,i=_createForOfIteratorHelper(r);try{for(i.s();!(a=i.n()).done;){var o=a.value;_classPrivateMethodGet(t,ve,_addEditorToLayer2).call(t,o)}}catch(t){i.e(t)}finally{i.f()}},mustExec:!0})}}},{key:"commitOrRemove",value:function commitOrRemove(){var t;null===(t=_classPrivateFieldGet(this,S))||void 0===t||t.commitOrRemove()}},{key:"hasSomethingToControl",value:function hasSomethingToControl(){return _classPrivateFieldGet(this,S)||this.hasSelection}},{key:"selectAll",value:function selectAll(){var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,U));try{for(r.s();!(t=r.n()).done;){t.value.commit()}}catch(t){r.e(t)}finally{r.f()}_classPrivateMethodGet(this,_e,_selectEditors2).call(this,_classPrivateFieldGet(this,k).values())}},{key:"unselectAll",value:function unselectAll(){if(_classPrivateFieldGet(this,S))_classPrivateFieldGet(this,S).commitOrRemove();else if(this.hasSelection){var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,U));try{for(r.s();!(t=r.n()).done;){t.value.unselect()}}catch(t){r.e(t)}finally{r.f()}_classPrivateFieldGet(this,U).clear();_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSelectedEditor:!1})}}},{key:"translateSelectedEditors",value:function translateSelectedEditors(t,r){var a=this;arguments.length>2&&void 0!==arguments[2]&&arguments[2]||this.commitOrRemove();if(this.hasSelection){_classPrivateFieldGet(this,te)[0]+=t;_classPrivateFieldGet(this,te)[1]+=r;var i=_slicedToArray(_classPrivateFieldGet(this,te),2),o=i[0],l=i[1],c=_toConsumableArray(_classPrivateFieldGet(this,U));_classPrivateFieldGet(this,re)&&clearTimeout(_classPrivateFieldGet(this,re));_classPrivateFieldSet(this,re,setTimeout((function(){_classPrivateFieldSet(a,re,null);_classPrivateFieldGet(a,te)[0]=_classPrivateFieldGet(a,te)[1]=0;a.addCommands({cmd:function cmd(){var t,r=_createForOfIteratorHelper(c);try{for(r.s();!(t=r.n()).done;){var i=t.value;_classPrivateFieldGet(a,k).has(i.id)&&i.translateInPage(o,l)}}catch(t){r.e(t)}finally{r.f()}},undo:function undo(){var t,r=_createForOfIteratorHelper(c);try{for(r.s();!(t=r.n()).done;){var i=t.value;_classPrivateFieldGet(a,k).has(i.id)&&i.translateInPage(-o,-l)}}catch(t){r.e(t)}finally{r.f()}},mustExec:!1})}),1e3));var u,d=_createForOfIteratorHelper(c);try{for(d.s();!(u=d.n()).done;){u.value.translateInPage(t,r)}}catch(t){d.e(t)}finally{d.f()}}}},{key:"setUpDragSession",value:function setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0);_classPrivateFieldSet(this,M,new Map);var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,U));try{for(r.s();!(t=r.n()).done;){var a=t.value;_classPrivateFieldGet(this,M).set(a,{savedX:a.x,savedY:a.y,savedPageIndex:a.parent.pageIndex,newX:0,newY:0,newPageIndex:-1})}}catch(t){r.e(t)}finally{r.f()}}}},{key:"endDragSession",value:function endDragSession(){var t=this;if(!_classPrivateFieldGet(this,M))return!1;this.disableUserSelect(!1);var r=_classPrivateFieldGet(this,M);_classPrivateFieldSet(this,M,null);var a,i=!1,o=_createForOfIteratorHelper(r);try{for(o.s();!(a=o.n()).done;){var l=_slicedToArray(a.value,2),c=l[0],u=c.x,d=c.y,h=c.parent,p=l[1];p.newX=u;p.newY=d;p.newPageIndex=h.pageIndex;i||(i=u!==p.savedX||d!==p.savedY||h.pageIndex!==p.savedPageIndex)}}catch(t){o.e(t)}finally{o.f()}if(!i)return!1;var v=function move(r,a,i,o){if(_classPrivateFieldGet(t,k).has(r.id)){var l=_classPrivateFieldGet(t,x).get(o);if(l)r._setParentAndPosition(l,a,i);else{r.pageIndex=o;r.x=a;r.y=i}}};this.addCommands({cmd:function cmd(){var t,a=_createForOfIteratorHelper(r);try{for(a.s();!(t=a.n()).done;){var i=_slicedToArray(t.value,2),o=i[0],l=i[1],c=l.newX,u=l.newY,d=l.newPageIndex;v(o,c,u,d)}}catch(t){a.e(t)}finally{a.f()}},undo:function undo(){var t,a=_createForOfIteratorHelper(r);try{for(a.s();!(t=a.n()).done;){var i=_slicedToArray(t.value,2),o=i[0],l=i[1],c=l.savedX,u=l.savedY,d=l.savedPageIndex;v(o,c,u,d)}}catch(t){a.e(t)}finally{a.f()}},mustExec:!0});return!0}},{key:"dragSelectedEditors",value:function dragSelectedEditors(t,r){if(_classPrivateFieldGet(this,M)){var a,i=_createForOfIteratorHelper(_classPrivateFieldGet(this,M).keys());try{for(i.s();!(a=i.n()).done;){a.value.drag(t,r)}}catch(t){i.e(t)}finally{i.f()}}}},{key:"rebuild",value:function rebuild(t){if(null===t.parent){var r=this.getLayer(t.pageIndex);if(r){r.changeParent(t);r.addOrRebuild(t)}else{this.addEditor(t);this.addToAnnotationStorage(t);t.rebuild()}}else t.parent.addOrRebuild(t)}},{key:"isActive",value:function isActive(t){return _classPrivateFieldGet(this,S)===t}},{key:"getActive",value:function getActive(){return _classPrivateFieldGet(this,S)}},{key:"getMode",value:function getMode(){return _classPrivateFieldGet(this,B)}},{key:"imageManager",get:function get(){return(0,i.shadow)(this,"imageManager",new v)}},{key:"removeEditors",value:function removeEditors(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0},r=!1;_classPrivateFieldGet(this,x).forEach((function(t){return t.setCleaningUp(!0)}));_classPrivateFieldGet(this,k).forEach((function(a){if(t(a.serialize())){a.remove();r=!0}}));_classPrivateFieldGet(this,x).forEach((function(t){return t.setCleaningUp(!1)}));if(r){_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSomethingToUndo:!1,hasSomethingToRedo:!1,isEmpty:_classPrivateMethodGet(this,ye,_isEmpty2).call(this)});_classPrivateFieldGet(this,T).reset()}}}],[{key:"_keyboardManager",get:function get(){var t=AnnotationEditorUIManager.prototype,r=function arrowChecker(t){var r=document.activeElement;return r&&_classPrivateFieldGet(t,ne).contains(r)&&t.hasSomethingToControl()},a=this.TRANSLATE_SMALL,o=this.TRANSLATE_BIG;return(0,i.shadow)(this,"_keyboardManager",new P([[["ctrl+a","mac+meta+a"],t.selectAll],[["ctrl+z","mac+meta+z"],t.undo],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-a,0],checker:r}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-o,0],checker:r}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[a,0],checker:r}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[o,0],checker:r}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-a],checker:r}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-o],checker:r}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,a],checker:r}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,o],checker:r}]]))}}]);return AnnotationEditorUIManager}();r.AnnotationEditorUIManager=ge;function _addFocusManager2(){window.addEventListener("focus",_classPrivateFieldGet(this,q));window.addEventListener("blur",_classPrivateFieldGet(this,z))}function _removeFocusManager2(){window.removeEventListener("focus",_classPrivateFieldGet(this,q));window.removeEventListener("blur",_classPrivateFieldGet(this,z))}function _addKeyboardManager2(){window.addEventListener("keydown",_classPrivateFieldGet(this,K),{capture:!0})}function _removeKeyboardManager2(){window.removeEventListener("keydown",_classPrivateFieldGet(this,K),{capture:!0})}function _addCopyPasteListeners2(){document.addEventListener("copy",_classPrivateFieldGet(this,V));document.addEventListener("cut",_classPrivateFieldGet(this,X));document.addEventListener("paste",_classPrivateFieldGet(this,Y))}function _removeCopyPasteListeners2(){document.removeEventListener("copy",_classPrivateFieldGet(this,V));document.removeEventListener("cut",_classPrivateFieldGet(this,X));document.removeEventListener("paste",_classPrivateFieldGet(this,Y))}function _dispatchUpdateStates2(t){var r=this;Object.entries(t).some((function(t){var a=_slicedToArray(t,2),i=a[0],o=a[1];return _classPrivateFieldGet(r,ee)[i]!==o}))&&_classPrivateFieldGet(this,G).dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(_classPrivateFieldGet(this,ee),t)})}function _dispatchUpdateUI2(t){_classPrivateFieldGet(this,G).dispatch("annotationeditorparamschanged",{source:this,details:t})}function _enableAll2(){if(!_classPrivateFieldGet(this,j)){_classPrivateFieldSet(this,j,!0);var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,x).values());try{for(r.s();!(t=r.n()).done;){t.value.enable()}}catch(t){r.e(t)}finally{r.f()}}}function _disableAll2(){this.unselectAll();if(_classPrivateFieldGet(this,j)){_classPrivateFieldSet(this,j,!1);var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,x).values());try{for(r.s();!(t=r.n()).done;){t.value.disable()}}catch(t){r.e(t)}finally{r.f()}}}function _addEditorToLayer2(t){var r=_classPrivateFieldGet(this,x).get(t.pageIndex);r?r.addOrRebuild(t):this.addEditor(t)}function _isEmpty2(){if(0===_classPrivateFieldGet(this,k).size)return!0;if(1===_classPrivateFieldGet(this,k).size){var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,k).values());try{for(r.s();!(t=r.n()).done;){return t.value.isEmpty()}}catch(t){r.e(t)}finally{r.f()}}return!1}function _selectEditors2(t){_classPrivateFieldGet(this,U).clear();var r,a=_createForOfIteratorHelper(t);try{for(a.s();!(r=a.n()).done;){var i=r.value;if(!i.isEmpty()){_classPrivateFieldGet(this,U).add(i);i.select()}}}catch(t){a.e(t)}finally{a.f()}_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSelectedEditor:!0})}_defineProperty(ge,"TRANSLATE_SMALL",1);_defineProperty(ge,"TRANSLATE_BIG",10)},(t,r,a)=>{var i=a(3),o=a(40),l=a(61),c=a(62),u=a(64),d=a(168),h=a(170),p=a(189),v=a(100),y=a(195),_=a(250)("splice"),g=Math.max,m=Math.min;i({target:"Array",proto:!0,forced:!_},{splice:function splice(t,r){var a,i,_,b,w,P,A=o(this),S=u(A),k=l(t,S),x=arguments.length;if(0===x)a=i=0;else if(1===x){a=0;i=S-k}else{a=x-2;i=m(g(c(r),0),S-k)}h(S+a-i);_=p(A,i);for(b=0;b<i;b++)(w=k+b)in A&&v(_,b,A[w]);_.length=i;if(a<i){for(b=k;b<S-i;b++){P=b+a;(w=b+i)in A?A[P]=A[w]:y(A,P)}for(b=S;b>S-i+a;b--)y(A,b-1)}else if(a>i)for(b=S-i;b>k;b--){P=b+a-1;(w=b+i-1)in A?A[P]=A[w]:y(A,P)}for(b=0;b<a;b++)A[b+k]=arguments[b+2];d(A,S-i+a);return _}})},(t,r,a)=>{var i=a(3),o=a(40),l=a(64),c=a(62),u=a(141);i({target:"Array",proto:!0},{at:function at(t){var r=o(this),a=l(r),i=c(t),u=i>=0?i:a+i;return u<0||u>=a?void 0:r[u]}});u("at")},(t,r,a)=>{var i=a(3),o=a(14),l=a(16),c=a(62),u=a(107),d=a(7),h=o("".charAt);i({target:"String",proto:!0,forced:d((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function at(t){var r=u(l(this)),a=r.length,i=c(t),o=i>=0?i:a+i;return o<0||o>=a?void 0:h(r,o)}})},(t,r,a)=>{var i=a(3),o=a(6),l=a(4),c=a(24),u=a(14),d=a(8),h=a(21),p=a(20),v=a(169),y=a(39),_=a(107),g=a(64),m=a(100),b=a(7),w=a(361),P=a(27),A=l.JSON,S=l.Number,k=l.SyntaxError,x=A&&A.parse,E=c("Object","keys"),T=Object.getOwnPropertyDescriptor,C=u("".charAt),I=u("".slice),M=u(/./.exec),O=u([].push),R=/^\d$/,G=/^[1-9]$/,L=/^(-|\d)$/,D=/^[\t\n\r ]$/,internalize=function(t,r,a,i){var o,l,c,u,h,_=t[r],m=i&&_===i.value,b=m&&"string"==typeof i.source?{source:i.source}:{};if(p(_)){var w=v(_),P=m?i.nodes:w?[]:{};if(w){o=P.length;c=g(_);for(u=0;u<c;u++)internalizeProperty(_,u,internalize(_,""+u,a,u<o?P[u]:void 0))}else{l=E(_);c=g(l);for(u=0;u<c;u++){h=l[u];internalizeProperty(_,h,internalize(_,h,a,y(P,h)?P[h]:void 0))}}}return d(a,t,r,_,b)},internalizeProperty=function(t,r,a){if(o){var i=T(t,r);if(i&&!i.configurable)return}void 0===a?delete t[r]:m(t,r,a)},Node=function(t,r,a,i){this.value=t;this.end=r;this.source=a;this.nodes=i},Context=function(t,r){this.source=t;this.index=r};Context.prototype={fork:function(t){return new Context(this.source,t)},parse:function(){var t=this.source,r=this.skip(D,this.index),a=this.fork(r),i=C(t,r);if(M(L,i))return a.number();switch(i){case"{":return a.object();case"[":return a.array();case'"':return a.string();case"t":return a.keyword(!0);case"f":return a.keyword(!1);case"n":return a.keyword(null)}throw k('Unexpected character: "'+i+'" at: '+r)},node:function(t,r,a,i,o){return new Node(r,i,t?null:I(this.source,a,i),o)},object:function(){for(var t=this.source,r=this.index+1,a=!1,i={},o={};r<t.length;){r=this.until(['"',"}"],r);if("}"===C(t,r)&&!a){r++;break}var l=this.fork(r).string(),c=l.value;r=l.end;r=this.until([":"],r)+1;r=this.skip(D,r);l=this.fork(r).parse();m(o,c,l);m(i,c,l.value);r=this.until([",","}"],l.end);var u=C(t,r);if(","===u){a=!0;r++}else if("}"===u){r++;break}}return this.node(1,i,this.index,r,o)},array:function(){for(var t=this.source,r=this.index+1,a=!1,i=[],o=[];r<t.length;){r=this.skip(D,r);if("]"===C(t,r)&&!a){r++;break}var l=this.fork(r).parse();O(o,l);O(i,l.value);r=this.until([",","]"],l.end);if(","===C(t,r)){a=!0;r++}else if("]"===C(t,r)){r++;break}}return this.node(1,i,this.index,r,o)},string:function(){var t=this.index,r=w(this.source,this.index+1);return this.node(0,r.value,t,r.end)},number:function(){var t=this.source,r=this.index,a=r;"-"===C(t,a)&&a++;if("0"===C(t,a))a++;else{if(!M(G,C(t,a)))throw k("Failed to parse number at: "+a);a=this.skip(R,++a)}"."===C(t,a)&&(a=this.skip(R,++a));if("e"===C(t,a)||"E"===C(t,a)){a++;"+"!==C(t,a)&&"-"!==C(t,a)||a++;if(a===(a=this.skip(R,a)))throw k("Failed to parse number's exponent value at: "+a)}return this.node(0,S(I(t,r,a)),r,a)},keyword:function(t){var r=""+t,a=this.index,i=a+r.length;if(I(this.source,a,i)!==r)throw k("Failed to parse value at: "+a);return this.node(0,t,a,i)},skip:function(t,r){for(var a=this.source;r<a.length&&M(t,C(a,r));r++);return r},until:function(t,r){r=this.skip(D,r);for(var a=C(this.source,r),i=0;i<t.length;i++)if(t[i]===a)return r;throw k('Unexpected character: "'+a+'" at: '+r)}};var j=b((function(){var t,r="9007199254740993";x(r,(function(r,a,i){t=i.source}));return t!==r})),N=P&&!b((function(){return 1/x("-0 \t")!=-1/0}));i({target:"JSON",stat:!0,forced:j},{parse:function parse(t,r){return N&&!h(r)?x(t):function(t,r){t=_(t);var a=new Context(t,0,""),i=a.parse(),o=i.value,l=a.skip(D,i.end);if(l<t.length)throw k('Unexpected extra character: "'+C(t,l)+'" after the parsed data at: '+l);return h(r)?internalize({"":o},"",r,i):o}(t,r)}})},(t,r,a)=>{var i=a(14),o=a(39),l=SyntaxError,c=parseInt,u=String.fromCharCode,d=i("".charAt),h=i("".slice),p=i(/./.exec),v={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},y=/^[\da-f]{4}$/i,_=/^[\u0000-\u001F]$/;t.exports=function(t,r){for(var a=!0,i="";r<t.length;){var g=d(t,r);if("\\"===g){var m=h(t,r,r+2);if(o(v,m)){i+=v[m];r+=2}else{if("\\u"!==m)throw l('Unknown escape sequence: "'+m+'"');var b=h(t,r+=2,r+4);if(!p(y,b))throw l("Bad Unicode escape at: "+r);i+=u(c(b,16));r+=4}}else{if('"'===g){a=!1;r++;break}if(p(_,g))throw l("Bad control character in string literal at: "+r);i+=g;r++}}if(a)throw l("Unterminated string at: "+r);return{value:i,end:r}}},(t,r,a)=>{a(2);a(71);a(73);a(301);a(92);a(306);a(307);a(308);a(309);a(310);Object.defineProperty(r,"__esModule",{value:!0});r.StatTimer=r.RenderingCancelledException=r.PixelsPerInch=r.PageViewport=r.PDFDateString=r.DOMStandardFontDataFactory=r.DOMSVGFactory=r.DOMFilterFactory=r.DOMCanvasFactory=r.DOMCMapReaderFactory=r.AnnotationPrefix=void 0;r.deprecated=function deprecated(t){globalThis.ngxConsole.log("Deprecated API usage: "+t)};r.getColorValues=function getColorValues(t){var r=document.createElement("span");r.style.visibility="hidden";document.body.append(r);var a,i=_createForOfIteratorHelper(t.keys());try{for(i.s();!(a=i.n()).done;){var o=a.value;r.style.color=o;var l=window.getComputedStyle(r).color;t.set(o,getRGB(l))}}catch(t){i.e(t)}finally{i.f()}r.remove()};r.getCurrentTransform=function getCurrentTransform(t){var r=t.getTransform(),a=r.a,i=r.b,o=r.c,l=r.d,c=r.e,u=r.f;return[a,i,o,l,c,u]};r.getCurrentTransformInverse=function getCurrentTransformInverse(t){var r=t.getTransform().invertSelf(),a=r.a,i=r.b,o=r.c,l=r.d,c=r.e,u=r.f;return[a,i,o,l,c,u]};r.getFilenameFromUrl=function getFilenameFromUrl(t){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])){var r=t.split(/[#?]/,1);t=_slicedToArray(r,1)[0]}return t.substring(t.lastIndexOf("/")+1)};r.getPdfFilenameFromUrl=function getPdfFilenameFromUrl(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if(window.PDFViewerApplication.appConfig.filenameForDownload)return window.PDFViewerApplication.appConfig.filenameForDownload;if("string"!=typeof t)return r;if(isDataScheme(t)){(0,o.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.');return r}var a=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,i=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(t),l=a.exec(i[1])||a.exec(i[2])||a.exec(i[3]);if(l&&(l=l[0]).includes("%"))try{l=a.exec(decodeURIComponent(l))[0]}catch(t){}return l||r};r.getRGB=getRGB;r.getXfaPageViewport=function getXfaPageViewport(t,r){var a=r.scale,i=void 0===a?1:a,o=r.rotation,l=void 0===o?0:o,c=t.attributes.style,u=c.width,d=c.height,h=[0,0,parseInt(u),parseInt(d)];return new G({viewBox:h,scale:i,rotation:l})};r.isDataScheme=isDataScheme;r.isPdfFile=function isPdfFile(t){return"string"==typeof t&&/\.pdf$/i.test(t)};r.isValidFetchUrl=isValidFetchUrl;r.loadScript=function loadScript(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((function(a,i){var o=document.createElement("script"),l=t;"Function"===t.constructor.name&&(l=t());var c=function generateTrustedURL(t){if(window.trustedTypes){return window.trustedTypes.createPolicy("foo",{createScriptURL:function createScriptURL(t){return t}}).createScriptURL(t)}return t}(l);o.src=c;o.onload=function(t){r&&o.remove();a(t)};o.onerror=function(t){globalThis.ngxConsole.log(t);i(new Error("Cannot load script at: ".concat(o.src)))};(document.head||document.documentElement).append(o)}))};r.setLayerDimensions=function setLayerDimensions(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(r instanceof G){var l=r.rawDims,c=l.pageWidth,u=l.pageHeight,d=t.style,h=o.FeatureTest.isCSSRoundSupported,p="var(--scale-factor) * ".concat(c,"px"),v="var(--scale-factor) * ".concat(u,"px"),y=h?"round(".concat(p,", 1px)"):"calc(".concat(p,")"),_=h?"round(".concat(v,", 1px)"):"calc(".concat(v,")");if(a&&r.rotation%180!=0){d.width=_;d.height=y}else{d.width=y;d.height=_}}i&&t.setAttribute("data-main-rotation",r.rotation)};a(122);a(257);a(249);a(123);a(258);a(363);a(105);a(104);a(365);a(366);a(247);a(248);a(167);a(367);a(140);a(146);a(148);a(149);a(152);a(163);a(164);a(165);a(166);a(259);a(368);a(369);a(370);a(255);a(131);a(85);a(90);a(292);a(300);a(112);a(302);a(347);a(280);a(171);a(192);a(193);a(196);a(197);a(198);a(203);a(204);a(205);a(207);a(208);a(209);a(210);a(211);a(212);a(213);a(216);a(217);a(219);a(220);a(221);a(222);a(223);a(224);a(228);a(229);a(231);a(232);a(233);a(235);a(238);a(244);var i=a(371),o=a(1);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,r,a){t[r]=a.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,o){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(o||[]);return i(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var h={};define(h,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&a.call(v,l)&&(h=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(h);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,o,l,c){var u=tryCatch(t[i],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==_typeof(h)&&a.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function value(t,a){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,a,r,i)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,a){var i="suspendedStart";return function(o,l){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw l;return{value:void 0,done:!0}}for(a.method=o,a.arg=l;;){var c=a.delegate;if(c){var u=maybeInvokeDelegate(c,a);if(u){if(u===d)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===i)throw i="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i="executing";var h=tryCatch(t,r,a);if("normal"===h.type){if(i=a.done?"completed":"suspendedYield",h.arg===d)continue;return{value:h.arg,done:a.done}}"throw"===h.type&&(i="completed",a.method="throw",a.arg=h.arg)}}}function maybeInvokeDelegate(t,r){var a=r.method,i=t.iterator[a];if(void 0===i)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),d;var o=tryCatch(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,d):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function next(){for(;++i<t.length;)if(a.call(t,i))return next.value=t[i],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,i(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),i(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(r,a,i,o),l);return t.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(y),define(y,u,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(a,i){return l.type="throw",l.arg=t,r.next=a,i&&(r.method="next",r.arg=void 0),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,d):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),d}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,a){return this.delegate={iterator:values(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=void 0),d}},t}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||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 _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||_unsupportedIterableToArray(t,r)||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(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,a)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,a){_checkPrivateRedeclaration(t,r);r.set(t,a)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,a){!function _classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,_classExtractFieldDescriptor(t,r,"set"),a);return a}function _classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperty(t,r,a){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}var l="http://www.w3.org/2000/svg";r.AnnotationPrefix="pdfjs_internal_id_";var c=_createClass((function PixelsPerInch(){_classCallCheck(this,PixelsPerInch)}));r.PixelsPerInch=c;_defineProperty(c,"CSS",96);_defineProperty(c,"PDF",72);_defineProperty(c,"PDF_TO_CSS_UNITS",c.CSS/c.PDF);var u=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakMap,_=new WeakMap,g=new WeakMap,m=new WeakMap,b=new WeakMap,w=new WeakMap,P=new WeakMap,A=new WeakMap,S=new WeakSet,k=new WeakSet,x=new WeakSet,E=new WeakSet,T=new WeakSet,C=function(t){_inherits(DOMFilterFactory,t);var r=_createSuper(DOMFilterFactory);function DOMFilterFactory(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=a.docId,o=a.ownerDocument,l=void 0===o?globalThis.document:o;_classCallCheck(this,DOMFilterFactory);_classPrivateMethodInitSpec(_assertThisInitialized(t=r.call(this)),T);_classPrivateMethodInitSpec(_assertThisInitialized(t),E);_classPrivateMethodInitSpec(_assertThisInitialized(t),x);_classPrivateMethodInitSpec(_assertThisInitialized(t),k);_classPrivateMethodInitSpec(_assertThisInitialized(t),S);_classPrivateFieldInitSpec(_assertThisInitialized(t),A,{get:_get_defs,set:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),P,{get:_get_cache,set:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),u,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),d,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),h,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),p,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),v,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),y,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),_,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),g,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),m,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),b,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),w,{writable:!0,value:0});_classPrivateFieldSet(_assertThisInitialized(t),h,i);_classPrivateFieldSet(_assertThisInitialized(t),p,l);return t}_createClass(DOMFilterFactory,[{key:"addFilter",value:function addFilter(t){var r,a;if(!t)return"none";var i,o,l,c,u=_classPrivateFieldGet(this,P).get(t);if(u)return u;if(1===t.length){for(var d=t[0],p=new Array(256),v=0;v<256;v++)p[v]=d[v]/255;c=i=o=l=p.join(",")}else{for(var y=_slicedToArray(t,3),_=y[0],g=y[1],m=y[2],b=new Array(256),A=new Array(256),S=new Array(256),x=0;x<256;x++){b[x]=_[x]/255;A[x]=g[x]/255;S[x]=m[x]/255}i=b.join(",");o=A.join(",");l=S.join(",");c="".concat(i).concat(o).concat(l)}if(u=_classPrivateFieldGet(this,P).get(c)){_classPrivateFieldGet(this,P).set(t,u);return u}var T="g_".concat(_classPrivateFieldGet(this,h),"_transfer_map_").concat((_classPrivateFieldSet(this,w,(r=_classPrivateFieldGet(this,w),a=r++,r)),a)),C="url(#".concat(T,")");_classPrivateFieldGet(this,P).set(t,C);_classPrivateFieldGet(this,P).set(c,C);var I=_classPrivateMethodGet(this,k,_createFilter2).call(this,T);_classPrivateMethodGet(this,E,_addTransferMapConversion2).call(this,i,o,l,I);return C}},{key:"addHCMFilter",value:function addHCMFilter(t,r){var a,i="".concat(t,"-").concat(r);if(_classPrivateFieldGet(this,y)===i)return _classPrivateFieldGet(this,_);_classPrivateFieldSet(this,y,i);_classPrivateFieldSet(this,_,"none");null===(a=_classPrivateFieldGet(this,v))||void 0===a||a.remove();if(!t||!r)return _classPrivateFieldGet(this,_);var l=_classPrivateMethodGet(this,T,_getRGB2).call(this,t);t=o.Util.makeHexColor.apply(o.Util,_toConsumableArray(l));var c=_classPrivateMethodGet(this,T,_getRGB2).call(this,r);r=o.Util.makeHexColor.apply(o.Util,_toConsumableArray(c));_classPrivateFieldGet(this,A).style.color="";if("#000000"===t&&"#ffffff"===r||t===r)return _classPrivateFieldGet(this,_);for(var u=new Array(256),d=0;d<=255;d++){var p=d/255;u[d]=p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4)}var m=u.join(","),b="g_".concat(_classPrivateFieldGet(this,h),"_hcm_filter"),w=_classPrivateFieldSet(this,g,_classPrivateMethodGet(this,k,_createFilter2).call(this,b));_classPrivateMethodGet(this,E,_addTransferMapConversion2).call(this,m,m,m,w);_classPrivateMethodGet(this,S,_addGrayConversion2).call(this,w);var P=function getSteps(t,r){for(var a=l[t]/255,i=c[t]/255,o=new Array(r+1),u=0;u<=r;u++)o[u]=a+u/r*(i-a);return o.join(",")};_classPrivateMethodGet(this,E,_addTransferMapConversion2).call(this,P(0,5),P(1,5),P(2,5),w);_classPrivateFieldSet(this,_,"url(#".concat(b,")"));return _classPrivateFieldGet(this,_)}},{key:"addHighlightHCMFilter",value:function addHighlightHCMFilter(t,r,a,i){var o,l="".concat(t,"-").concat(r,"-").concat(a,"-").concat(i);if(_classPrivateFieldGet(this,m)===l)return _classPrivateFieldGet(this,b);_classPrivateFieldSet(this,m,l);_classPrivateFieldSet(this,b,"none");null===(o=_classPrivateFieldGet(this,g))||void 0===o||o.remove();if(!t||!r)return _classPrivateFieldGet(this,b);var c=_slicedToArray([t,r].map(_classPrivateMethodGet(this,T,_getRGB2).bind(this)),2),u=c[0],d=c[1],p=Math.round(.2126*u[0]+.7152*u[1]+.0722*u[2]),v=Math.round(.2126*d[0]+.7152*d[1]+.0722*d[2]),y=_slicedToArray([a,i].map(_classPrivateMethodGet(this,T,_getRGB2).bind(this)),2),_=y[0],w=y[1];if(v<p){var P=[v,p,w,_];p=P[0];v=P[1];_=P[2];w=P[3]}_classPrivateFieldGet(this,A).style.color="";var x=function getSteps(t,r,a){for(var i=new Array(256),o=(v-p)/a,l=t/255,c=(r-t)/(255*a),u=0,d=0;d<=a;d++){for(var h=Math.round(p+d*o),y=l+d*c,_=u;_<=h;_++)i[_]=y;u=h+1}for(var g=u;g<256;g++)i[g]=i[u-1];return i.join(",")},C="g_".concat(_classPrivateFieldGet(this,h),"_hcm_highlight_filter"),I=_classPrivateFieldSet(this,g,_classPrivateMethodGet(this,k,_createFilter2).call(this,C));_classPrivateMethodGet(this,S,_addGrayConversion2).call(this,I);_classPrivateMethodGet(this,E,_addTransferMapConversion2).call(this,x(_[0],w[0],5),x(_[1],w[1],5),x(_[2],w[2],5),I);_classPrivateFieldSet(this,b,"url(#".concat(C,")"));return _classPrivateFieldGet(this,b)}},{key:"destroy",value:function destroy(){if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])||!_classPrivateFieldGet(this,_)&&!_classPrivateFieldGet(this,b)){if(_classPrivateFieldGet(this,d)){_classPrivateFieldGet(this,d).parentNode.parentNode.remove();_classPrivateFieldSet(this,d,null)}if(_classPrivateFieldGet(this,u)){_classPrivateFieldGet(this,u).clear();_classPrivateFieldSet(this,u,null)}_classPrivateFieldSet(this,w,0)}}}]);return DOMFilterFactory}(i.BaseFilterFactory);r.DOMFilterFactory=C;function _get_cache(){return _classPrivateFieldGet(this,u)||_classPrivateFieldSet(this,u,new Map)}function _get_defs(){if(!_classPrivateFieldGet(this,d)){var t=_classPrivateFieldGet(this,p).createElement("div"),r=t.style;r.visibility="hidden";r.contain="strict";r.width=r.height=0;r.position="absolute";r.top=r.left=0;r.zIndex=-1;var a=_classPrivateFieldGet(this,p).createElementNS(l,"svg");a.setAttribute("width",0);a.setAttribute("height",0);_classPrivateFieldSet(this,d,_classPrivateFieldGet(this,p).createElementNS(l,"defs"));t.append(a);a.append(_classPrivateFieldGet(this,d));_classPrivateFieldGet(this,p).body.append(t)}return _classPrivateFieldGet(this,d)}function _addGrayConversion2(t){var r=_classPrivateFieldGet(this,p).createElementNS(l,"feColorMatrix");r.setAttribute("type","matrix");r.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0");t.append(r)}function _createFilter2(t){var r=_classPrivateFieldGet(this,p).createElementNS(l,"filter");r.setAttribute("color-interpolation-filters","sRGB");r.setAttribute("id",t);_classPrivateFieldGet(this,A).append(r);return r}function _appendFeFunc2(t,r,a){var i=_classPrivateFieldGet(this,p).createElementNS(l,r);i.setAttribute("type","discrete");i.setAttribute("tableValues",a);t.append(i)}function _addTransferMapConversion2(t,r,a,i){var o=_classPrivateFieldGet(this,p).createElementNS(l,"feComponentTransfer");i.append(o);_classPrivateMethodGet(this,x,_appendFeFunc2).call(this,o,"feFuncR",t);_classPrivateMethodGet(this,x,_appendFeFunc2).call(this,o,"feFuncG",r);_classPrivateMethodGet(this,x,_appendFeFunc2).call(this,o,"feFuncB",a)}function _getRGB2(t){_classPrivateFieldGet(this,A).style.color=t;return getRGB(getComputedStyle(_classPrivateFieldGet(this,A)).getPropertyValue("color"))}var I=function(t){_inherits(DOMCanvasFactory,t);var r=_createSuper(DOMCanvasFactory);function DOMCanvasFactory(){var t,a=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ownerDocument,i=void 0===a?globalThis.document:a;_classCallCheck(this,DOMCanvasFactory);(t=r.call(this))._document=i;return t}_createClass(DOMCanvasFactory,[{key:"_createCanvas",value:function _createCanvas(t,r){var a=this._document.createElement("canvas");a.width=t;a.height=r;return a}}]);return DOMCanvasFactory}(i.BaseCanvasFactory);r.DOMCanvasFactory=I;function fetchData(t){return _fetchData.apply(this,arguments)}function _fetchData(){_fetchData=function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t){var r,a,i=arguments;return _regeneratorRuntime().wrap((function _callee$(l){for(;;)switch(l.prev=l.next){case 0:r=i.length>1&&void 0!==i[1]&&i[1];if(!isValidFetchUrl(t,document.baseURI)){l.next=21;break}l.next=4;return fetch(t);case 4:if((a=l.sent).ok){l.next=7;break}throw new Error(a.statusText);case 7:if(!r){l.next=15;break}l.t1=Uint8Array;l.next=11;return a.arrayBuffer();case 11:l.t2=l.sent;l.t0=new l.t1(l.t2);l.next=20;break;case 15:l.t3=o.stringToBytes;l.next=18;return a.text();case 18:l.t4=l.sent;l.t0=(0,l.t3)(l.t4);case 20:return l.abrupt("return",l.t0);case 21:return l.abrupt("return",new Promise((function(a,i){var l=new XMLHttpRequest;l.open("GET",t,!0);r&&(l.responseType="arraybuffer");l.onreadystatechange=function(){if(l.readyState===XMLHttpRequest.DONE){if(200===l.status||0===l.status){var t;r&&l.response?t=new Uint8Array(l.response):!r&&l.responseText&&(t=(0,o.stringToBytes)(l.responseText));if(t){a(t);return}}i(new Error(l.statusText))}};l.send(null)})));case 22:case"end":return l.stop()}}),_callee)})));return _fetchData.apply(this,arguments)}var M=function(t){_inherits(DOMCMapReaderFactory,t);var r=_createSuper(DOMCMapReaderFactory);function DOMCMapReaderFactory(){_classCallCheck(this,DOMCMapReaderFactory);return r.apply(this,arguments)}_createClass(DOMCMapReaderFactory,[{key:"_fetchData",value:function _fetchData(t,r){return fetchData(t,this.isCompressed).then((function(t){return{cMapData:t,compressionType:r}}))}}]);return DOMCMapReaderFactory}(i.BaseCMapReaderFactory);r.DOMCMapReaderFactory=M;var O=function(t){_inherits(DOMStandardFontDataFactory,t);var r=_createSuper(DOMStandardFontDataFactory);function DOMStandardFontDataFactory(){_classCallCheck(this,DOMStandardFontDataFactory);return r.apply(this,arguments)}_createClass(DOMStandardFontDataFactory,[{key:"_fetchData",value:function _fetchData(t){return fetchData(t,!0)}}]);return DOMStandardFontDataFactory}(i.BaseStandardFontDataFactory);r.DOMStandardFontDataFactory=O;var R=function(t){_inherits(DOMSVGFactory,t);var r=_createSuper(DOMSVGFactory);function DOMSVGFactory(){_classCallCheck(this,DOMSVGFactory);return r.apply(this,arguments)}_createClass(DOMSVGFactory,[{key:"_createSVG",value:function _createSVG(t){return document.createElementNS(l,t)}}]);return DOMSVGFactory}(i.BaseSVGFactory);r.DOMSVGFactory=R;var G=function(){function PageViewport(t){var r=t.viewBox,a=t.scale,i=t.rotation,o=t.offsetX,l=void 0===o?0:o,c=t.offsetY,u=void 0===c?0:c,d=t.dontFlip,h=void 0!==d&&d;_classCallCheck(this,PageViewport);this.viewBox=r;this.scale=a;this.rotation=i;this.offsetX=l;this.offsetY=u;var p,v,y,_,g,m,b,w,P=(r[2]+r[0])/2,A=(r[3]+r[1])/2;(i%=360)<0&&(i+=360);switch(i){case 180:p=-1;v=0;y=0;_=1;break;case 90:p=0;v=1;y=1;_=0;break;case 270:p=0;v=-1;y=-1;_=0;break;case 0:p=1;v=0;y=0;_=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}if(h){y=-y;_=-_}if(0===p){g=Math.abs(A-r[1])*a+l;m=Math.abs(P-r[0])*a+u;b=(r[3]-r[1])*a;w=(r[2]-r[0])*a}else{g=Math.abs(P-r[0])*a+l;m=Math.abs(A-r[1])*a+u;b=(r[2]-r[0])*a;w=(r[3]-r[1])*a}this.transform=[p*a,v*a,y*a,_*a,g-p*a*P-y*a*A,m-v*a*P-_*a*A];this.width=b;this.height=w}_createClass(PageViewport,[{key:"rawDims",get:function get(){var t=this.viewBox;return(0,o.shadow)(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}},{key:"clone",value:function clone(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,a=void 0===r?this.scale:r,i=t.rotation,o=void 0===i?this.rotation:i,l=t.offsetX,c=void 0===l?this.offsetX:l,u=t.offsetY,d=void 0===u?this.offsetY:u,h=t.dontFlip,p=void 0!==h&&h;return new PageViewport({viewBox:this.viewBox.slice(),scale:a,rotation:o,offsetX:c,offsetY:d,dontFlip:p})}},{key:"convertToViewportPoint",value:function convertToViewportPoint(t,r){return o.Util.applyTransform([t,r],this.transform)}},{key:"convertToViewportRectangle",value:function convertToViewportRectangle(t){var r=o.Util.applyTransform([t[0],t[1]],this.transform),a=o.Util.applyTransform([t[2],t[3]],this.transform);return[r[0],r[1],a[0],a[1]]}},{key:"convertToPdfPoint",value:function convertToPdfPoint(t,r){return o.Util.applyInverseTransform([t,r],this.transform)}}]);return PageViewport}();r.PageViewport=G;var L=function(t){_inherits(RenderingCancelledException,t);var r=_createSuper(RenderingCancelledException);function RenderingCancelledException(t){var a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;_classCallCheck(this,RenderingCancelledException);(a=r.call(this,t,"RenderingCancelledException")).extraDelay=i;return a}return _createClass(RenderingCancelledException)}(o.BaseException);r.RenderingCancelledException=L;function isDataScheme(t){for(var r=t.length,a=0;a<r&&""===t[a].trim();)a++;return"data:"===t.substring(a,a+5).toLowerCase()}var D,j=function(){function StatTimer(){_classCallCheck(this,StatTimer);_defineProperty(this,"started",Object.create(null));_defineProperty(this,"times",[])}_createClass(StatTimer,[{key:"time",value:function time(t){t in this.started&&(0,o.warn)("Timer is already running for ".concat(t));this.started[t]=Date.now()}},{key:"timeEnd",value:function timeEnd(t){t in this.started||(0,o.warn)("Timer has not been started for ".concat(t));this.times.push({name:t,start:this.started[t],end:Date.now()});delete this.started[t]}},{key:"toString",value:function toString(){var t,r=[],a=0,i=_createForOfIteratorHelper(this.times);try{for(i.s();!(t=i.n()).done;){var o=t.value.name;a=Math.max(o.length,a)}}catch(t){i.e(t)}finally{i.f()}var l,c=_createForOfIteratorHelper(this.times);try{for(c.s();!(l=c.n()).done;){var u=l.value,d=u.name,h=u.start,p=u.end;r.push("".concat(d.padEnd(a)," ").concat(p-h,"ms\n"))}}catch(t){c.e(t)}finally{c.f()}return r.join("")}}]);return StatTimer}();r.StatTimer=j;function isValidFetchUrl(t,r){try{var a=(r?new URL(t,r):new URL(t)).protocol;return"http:"===a||"https:"===a||"capacitor:"===a}catch(t){return!1}}var N=function(){function PDFDateString(){_classCallCheck(this,PDFDateString)}_createClass(PDFDateString,null,[{key:"toDateObject",value:function toDateObject(t){if(!t||"string"!=typeof t)return null;D||(D=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var r=D.exec(t);if(!r)return null;var a=parseInt(r[1],10),i=parseInt(r[2],10);i=i>=1&&i<=12?i-1:0;var o=parseInt(r[3],10);o=o>=1&&o<=31?o:1;var l=parseInt(r[4],10);l=l>=0&&l<=23?l:0;var c=parseInt(r[5],10);c=c>=0&&c<=59?c:0;var u=parseInt(r[6],10);u=u>=0&&u<=59?u:0;var d=r[7]||"Z",h=parseInt(r[8],10);h=h>=0&&h<=23?h:0;var p=parseInt(r[9],10)||0;p=p>=0&&p<=59?p:0;if("-"===d){l+=h;c+=p}else if("+"===d){l-=h;c-=p}return new Date(Date.UTC(a,i,o,l,c,u))}}]);return PDFDateString}();r.PDFDateString=N;function getRGB(t){if(t.startsWith("#")){var r=parseInt(t.slice(1),16);return[(16711680&r)>>16,(65280&r)>>8,255&r]}if(t.startsWith("rgb("))return t.slice(4,-1).split(",").map((function(t){return parseInt(t)}));if(t.startsWith("rgba("))return t.slice(5,-1).split(",").map((function(t){return parseInt(t)})).slice(0,3);(0,o.warn)('Not a valid color format: "'.concat(t,'"'));return[0,0,0]}},(t,r,a)=>{var i=a(3),o=a(118).trim;i({target:"String",proto:!0,forced:a(364)("trim")},{trim:function trim(){return o(this)}})},(t,r,a)=>{var i=a(50).PROPER,o=a(7),l=a(119);t.exports=function(t){return o((function(){return!!l[t]()||"​…᠎"!=="​…᠎"[t]()||i&&l[t].name!==t}))}},(t,r,a)=>{var i=a(74),o=a(8),l=a(14),c=a(136),u=a(47),d=a(17),h=a(133),p=a(16),v=a(202),y=a(137),_=a(65),g=a(107),m=a(30),b=a(157),w=a(139),P=a(106),A=a(109),S=a(7),k=A.UNSUPPORTED_Y,x=4294967295,E=Math.min,T=[].push,C=l(/./.exec),I=l(T),M=l("".slice);c("split",(function(t,r,a){var l;l="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,a){var l=g(p(this)),c=void 0===a?x:a>>>0;if(0===c)return[];if(void 0===t)return[l];if(!h(t))return o(r,l,t,c);for(var u,d,v,y=[],_=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),m=0,w=new RegExp(t.source,_+"g");u=o(P,w,l);){if((d=w.lastIndex)>m){I(y,M(l,m,u.index));u.length>1&&u.index<l.length&&i(T,y,b(u,1));v=u[0].length;m=d;if(y.length>=c)break}w.lastIndex===u.index&&w.lastIndex++}m===l.length?!v&&C(w,"")||I(y,""):I(y,M(l,m));return y.length>c?b(y,0,c):y}:"0".split(void 0,0).length?function(t,a){return void 0===t&&0===a?[]:o(r,this,t,a)}:r;return[function split(r,a){var i=p(this),c=d(r)?void 0:m(r,t);return c?o(c,r,i,a):o(l,g(i),r,a)},function(t,i){var o=u(this),c=g(t),d=a(l,o,c,i,l!==r);if(d.done)return d.value;var h=v(o,RegExp),p=o.unicode,m=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(k?"g":"y"),b=new h(k?"^(?:"+o.source+")":o,m),P=void 0===i?x:i>>>0;if(0===P)return[];if(0===c.length)return null===w(b,c)?[c]:[];for(var A=0,S=0,T=[];S<c.length;){b.lastIndex=k?0:S;var C,O=w(b,k?M(c,S):c);if(null===O||(C=E(_(b.lastIndex+(k?S:0)),c.length))===A)S=y(c,S,p);else{I(T,M(c,A,S));if(T.length===P)return T;for(var R=1;R<=O.length-1;R++){I(T,O[R]);if(T.length===P)return T}S=A=C}}I(T,M(c,A));return T}]}),!!S((function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var a="ab".split(t);return 2!==a.length||"a"!==a[0]||"b"!==a[1]})),k)},(t,r,a)=>{var i=a(3),o=a(214);i({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},(t,r,a)=>{var i=a(3),o=a(252).end;i({target:"String",proto:!0,forced:a(254)},{padEnd:function padEnd(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r,a)=>{var i=a(6),o=a(4),l=a(14),c=a(68),u=a(113),d=a(44),h=a(58).f,p=a(25),v=a(133),y=a(107),_=a(256),g=a(109),m=a(125),b=a(48),w=a(7),P=a(39),A=a(52).enforce,S=a(191),k=a(34),x=a(110),E=a(111),T=k("match"),C=o.RegExp,I=C.prototype,M=o.SyntaxError,O=l(I.exec),R=l("".charAt),G=l("".replace),L=l("".indexOf),D=l("".slice),j=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,N=/a/g,W=/a/g,B=new C(N)!==N,U=g.MISSED_STICKY,H=g.UNSUPPORTED_Y,z=i&&(!B||U||x||E||w((function(){W[T]=!1;return C(N)!==N||C(W)===W||"/a/i"!==String(C(N,"i"))})));if(c("RegExp",z)){for(var q=function RegExp(t,r){var a,i,o,l,c,h,g=p(I,this),m=v(t),b=void 0===r,w=[],S=t;if(!g&&m&&b&&t.constructor===q)return t;if(m||p(I,t)){t=t.source;b&&(r=_(S))}t=void 0===t?"":y(t);r=void 0===r?"":y(r);S=t;x&&"dotAll"in N&&(i=!!r&&L(r,"s")>-1)&&(r=G(r,/s/g,""));a=r;U&&"sticky"in N&&(o=!!r&&L(r,"y")>-1)&&H&&(r=G(r,/y/g,""));if(E){l=function(t){for(var r,a=t.length,i=0,o="",l=[],c={},u=!1,d=!1,h=0,p="";i<=a;i++){if("\\"===(r=R(t,i)))r+=R(t,++i);else if("]"===r)u=!1;else if(!u)switch(!0){case"["===r:u=!0;break;case"("===r:if(O(j,D(t,i+1))){i+=2;d=!0}o+=r;h++;continue;case">"===r&&d:if(""===p||P(c,p))throw new M("Invalid capture group name");c[p]=!0;l[l.length]=[p,h];d=!1;p="";continue}d?p+=r:o+=r}return[o,l]}(t);t=l[0];w=l[1]}c=u(C(t,r),g?this:I,q);if(i||o||w.length){h=A(c);if(i){h.dotAll=!0;h.raw=q(function(t){for(var r,a=t.length,i=0,o="",l=!1;i<=a;i++)if("\\"!==(r=R(t,i)))if(l||"."!==r){"["===r?l=!0:"]"===r&&(l=!1);o+=r}else o+="[\\s\\S]";else o+=r+R(t,++i);return o}(t),a)}o&&(h.sticky=!0);w.length&&(h.groups=w)}if(t!==S)try{d(c,"source",""===S?"(?:)":S)}catch(t){}return c},V=h(C),X=0;V.length>X;)m(q,C,V[X++]);I.constructor=q;q.prototype=I;b(o,"RegExp",q,{constructor:!0})}S("RegExp")},(t,r,a)=>{var i=a(6),o=a(110),l=a(15),c=a(121),u=a(52).get,d=RegExp.prototype,h=TypeError;i&&o&&c(d,"dotAll",{configurable:!0,get:function dotAll(){if(this!==d){if("RegExp"===l(this))return!!u(this).dotAll;throw h("Incompatible receiver, RegExp required")}}})},(t,r,a)=>{var i=a(6),o=a(109).MISSED_STICKY,l=a(15),c=a(121),u=a(52).get,d=RegExp.prototype,h=TypeError;i&&o&&c(d,"sticky",{configurable:!0,get:function sticky(){if(this!==d){if("RegExp"===l(this))return!!u(this).sticky;throw h("Incompatible receiver, RegExp required")}}})},(t,r,a)=>{a(301);a(140);a(148);a(149);a(259);a(306);a(307);a(308);a(309);a(2);a(167);a(310);a(258);Object.defineProperty(r,"__esModule",{value:!0});r.BaseStandardFontDataFactory=r.BaseSVGFactory=r.BaseFilterFactory=r.BaseCanvasFactory=r.BaseCMapReaderFactory=void 0;a(85);a(90);a(292);a(300);a(146);a(123);a(112);a(257);var i=a(1);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,r,a){t[r]=a.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,o){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(o||[]);return i(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var h={};define(h,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&a.call(v,l)&&(h=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(h);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,o,l,c){var u=tryCatch(t[i],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==_typeof(h)&&a.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function value(t,a){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,a,r,i)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,a){var i="suspendedStart";return function(o,l){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw l;return{value:void 0,done:!0}}for(a.method=o,a.arg=l;;){var c=a.delegate;if(c){var u=maybeInvokeDelegate(c,a);if(u){if(u===d)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===i)throw i="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i="executing";var h=tryCatch(t,r,a);if("normal"===h.type){if(i=a.done?"completed":"suspendedYield",h.arg===d)continue;return{value:h.arg,done:a.done}}"throw"===h.type&&(i="completed",a.method="throw",a.arg=h.arg)}}}function maybeInvokeDelegate(t,r){var a=r.method,i=t.iterator[a];if(void 0===i)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),d;var o=tryCatch(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,d):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function next(){for(;++i<t.length;)if(a.call(t,i))return next.value=t[i],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,i(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),i(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(r,a,i,o),l);return t.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(y),define(y,u,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(a,i){return l.type="throw",l.arg=t,r.next=a,i&&(r.method="next",r.arg=void 0),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,d):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),d}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,a){return this.delegate={iterator:values(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=void 0),d}},t}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}var o=function(){function BaseFilterFactory(){_classCallCheck(this,BaseFilterFactory);this.constructor===BaseFilterFactory&&(0,i.unreachable)("Cannot initialize BaseFilterFactory.")}_createClass(BaseFilterFactory,[{key:"addFilter",value:function addFilter(t){return"none"}},{key:"addHCMFilter",value:function addHCMFilter(t,r){return"none"}},{key:"addHighlightHCMFilter",value:function addHighlightHCMFilter(t,r,a,i){return"none"}},{key:"destroy",value:function destroy(){}}]);return BaseFilterFactory}();r.BaseFilterFactory=o;var l=function(){function BaseCanvasFactory(){_classCallCheck(this,BaseCanvasFactory);this.constructor===BaseCanvasFactory&&(0,i.unreachable)("Cannot initialize BaseCanvasFactory.")}_createClass(BaseCanvasFactory,[{key:"create",value:function create(t,r){if(t<=0||r<=0)throw new Error("Invalid canvas size");var a=this._createCanvas(t,r),i=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0,o=a.getContext("2d",i);return{canvas:a,context:o}}},{key:"reset",value:function reset(t,r,a){if(!t.canvas)throw new Error("Canvas is not specified");if(r<=0||a<=0)throw new Error("Invalid canvas size");t.canvas.width=r;t.canvas.height=a}},{key:"destroy",value:function destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0;t.canvas.height=0;t.canvas=null;t.context=null}},{key:"_createCanvas",value:function _createCanvas(t,r){(0,i.unreachable)("Abstract method `_createCanvas` called.")}}]);return BaseCanvasFactory}();r.BaseCanvasFactory=l;var c=function(){function BaseCMapReaderFactory(t){var r=t.baseUrl,a=void 0===r?null:r,o=t.isCompressed,l=void 0===o||o;_classCallCheck(this,BaseCMapReaderFactory);this.constructor===BaseCMapReaderFactory&&(0,i.unreachable)("Cannot initialize BaseCMapReaderFactory.");this.baseUrl=a;this.isCompressed=l}_createClass(BaseCMapReaderFactory,[{key:"fetch",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){var r,a,o,l=this;return _regeneratorRuntime().wrap((function _callee$(c){for(;;)switch(c.prev=c.next){case 0:r=t.name;if(this.baseUrl){c.next=3;break}throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');case 3:if(r){c.next=5;break}throw new Error("CMap name must be specified.");case 5:a=this.baseUrl+r+(this.isCompressed?".bcmap":"");o=this.isCompressed?i.CMapCompressionType.BINARY:i.CMapCompressionType.NONE;return c.abrupt("return",this._fetchData(a,o).catch((function(t){throw new Error("Unable to load ".concat(l.isCompressed?"binary ":"","CMap at: ").concat(a))})));case 8:case"end":return c.stop()}}),_callee,this)}))),function fetch(r){return t.apply(this,arguments)})},{key:"_fetchData",value:function _fetchData(t,r){(0,i.unreachable)("Abstract method `_fetchData` called.")}}]);var t;return BaseCMapReaderFactory}();r.BaseCMapReaderFactory=c;var u=function(){function BaseStandardFontDataFactory(t){var r=t.baseUrl,a=void 0===r?null:r;_classCallCheck(this,BaseStandardFontDataFactory);this.constructor===BaseStandardFontDataFactory&&(0,i.unreachable)("Cannot initialize BaseStandardFontDataFactory.");this.baseUrl=a}_createClass(BaseStandardFontDataFactory,[{key:"fetch",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){var r,a;return _regeneratorRuntime().wrap((function _callee2$(i){for(;;)switch(i.prev=i.next){case 0:r=t.filename;if(this.baseUrl){i.next=3;break}throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');case 3:if(r){i.next=5;break}throw new Error("Font filename must be specified.");case 5:a="".concat(this.baseUrl).concat(r);return i.abrupt("return",this._fetchData(a).catch((function(t){throw new Error("Unable to load font data at: ".concat(a))})));case 7:case"end":return i.stop()}}),_callee2,this)}))),function fetch(r){return t.apply(this,arguments)})},{key:"_fetchData",value:function _fetchData(t){(0,i.unreachable)("Abstract method `_fetchData` called.")}}]);var t;return BaseStandardFontDataFactory}();r.BaseStandardFontDataFactory=u;var d=function(){function BaseSVGFactory(){_classCallCheck(this,BaseSVGFactory);this.constructor===BaseSVGFactory&&(0,i.unreachable)("Cannot initialize BaseSVGFactory.")}_createClass(BaseSVGFactory,[{key:"create",value:function create(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t<=0||r<=0)throw new Error("Invalid SVG dimensions");var i=this._createSVG("svg:svg");i.setAttribute("version","1.1");if(!a){i.setAttribute("width","".concat(t,"px"));i.setAttribute("height","".concat(r,"px"))}i.setAttribute("preserveAspectRatio","none");i.setAttribute("viewBox","0 0 ".concat(t," ").concat(r));return i}},{key:"createElement",value:function createElement(t){if("string"!=typeof t)throw new Error("Invalid SVG element type");return this._createSVG(t)}},{key:"_createSVG",value:function _createSVG(t){(0,i.unreachable)("Abstract method `_createSVG` called.")}}]);return BaseSVGFactory}();r.BaseSVGFactory=d},(t,r,a)=>{a(301);a(148);a(149);Object.defineProperty(r,"__esModule",{value:!0});r.MurmurHash3_64=void 0;a(140);a(146);a(171);a(192);a(193);a(196);a(197);a(198);a(203);a(204);a(205);a(207);a(208);a(209);a(210);a(211);a(212);a(213);a(216);a(217);a(219);a(220);a(221);a(222);a(223);a(224);a(228);a(229);a(231);a(232);a(233);a(235);a(238);a(244);a(258);a(123);a(246);a(251);a(255);a(85);a(90);a(292);a(300);a(112);var i=a(1);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}var o=3285377520,l=4294901760,c=65535,u=function(){function MurmurHash3_64(t){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,MurmurHash3_64);this.h1=t?4294967295&t:o;this.h2=t?4294967295&t:o}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(MurmurHash3_64,[{key:"update",value:function update(t){var r,a;if("string"==typeof t){r=new Uint8Array(2*t.length);a=0;for(var o=0,u=t.length;o<u;o++){var d=t.charCodeAt(o);if(d<=255)r[a++]=d;else{r[a++]=d>>>8;r[a++]=255&d}}}else{if(!(0,i.isArrayBuffer)(t))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");a=(r=t.slice()).byteLength}for(var h=a>>2,p=a-4*h,v=new Uint32Array(r.buffer,0,h),y=0,_=0,g=this.h1,m=this.h2,b=3432918353,w=461845907,P=11601,A=13715,S=0;S<h;S++)1&S?g=5*(g=(g^=y=(y=(y=(y=v[S])*b&l|y*P&c)<<15|y>>>17)*w&l|y*A&c)<<13|g>>>19)+3864292196:m=5*(m=(m^=_=(_=(_=(_=v[S])*b&l|_*P&c)<<15|_>>>17)*w&l|_*A&c)<<13|m>>>19)+3864292196;y=0;switch(p){case 3:y^=r[4*h+2]<<16;case 2:y^=r[4*h+1]<<8;case 1:y=(y=(y=(y^=r[4*h])*b&l|y*P&c)<<15|y>>>17)*w&l|y*A&c;1&h?g^=y:m^=y}this.h1=g;this.h2=m}},{key:"hexdigest",value:function hexdigest(){var t=this.h1,r=this.h2;t=3981806797*(t^=r>>>1)&l|36045*t&c;t=444984403*(t^=(r=4283543511*r&l|(2950163797*(r<<16|t>>>16)&l)>>>16)>>>1)&l|60499*t&c;return((t^=(r=3301882366*r&l|(3120437893*(r<<16|t>>>16)&l)>>>16)>>>1)>>>0).toString(16).padStart(8,"0")+(r>>>0).toString(16).padStart(8,"0")}}]);return MurmurHash3_64}();r.MurmurHash3_64=u},(t,r,a)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}a(123);a(85);a(90);a(292);a(300);a(112);a(258);a(255);a(92);a(301);a(306);a(307);a(308);a(309);a(2);a(310);Object.defineProperty(r,"__esModule",{value:!0});r.FontLoader=r.FontFaceObject=void 0;a(122);a(140);a(146);a(312);a(148);a(314);a(325);a(327);a(329);a(331);a(333);a(335);a(149);a(257);a(259);a(105);a(104);a(167);a(338);a(342);a(343);a(302);var i=a(1);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,r,a){t[r]=a.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,o){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(o||[]);return i(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var h={};define(h,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&a.call(v,l)&&(h=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(h);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,o,l,c){var u=tryCatch(t[i],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==_typeof(h)&&a.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function value(t,a){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,a,r,i)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,a){var i="suspendedStart";return function(o,l){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw l;return{value:void 0,done:!0}}for(a.method=o,a.arg=l;;){var c=a.delegate;if(c){var u=maybeInvokeDelegate(c,a);if(u){if(u===d)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===i)throw i="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i="executing";var h=tryCatch(t,r,a);if("normal"===h.type){if(i=a.done?"completed":"suspendedYield",h.arg===d)continue;return{value:h.arg,done:a.done}}"throw"===h.type&&(i="completed",a.method="throw",a.arg=h.arg)}}}function maybeInvokeDelegate(t,r){var a=r.method,i=t.iterator[a];if(void 0===i)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),d;var o=tryCatch(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,d):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function next(){for(;++i<t.length;)if(a.call(t,i))return next.value=t[i],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,i(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),i(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(r,a,i,o),l);return t.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(y),define(y,u,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(a,i){return l.type="throw",l.arg=t,r.next=a,i&&(r.method="next",r.arg=void 0),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,d):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),d}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,a){return this.delegate={iterator:values(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=void 0),d}},t}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classPrivateFieldInitSpec(t,r,a){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,a)}function _classPrivateFieldGet(t,r){var a=function _classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}(t,r,"get");return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,a)}var o=new WeakMap,l=function(){function FontLoader(t){var r=t.ownerDocument,a=void 0===r?globalThis.document:r;t.styleElement;_classCallCheck(this,FontLoader);_classPrivateFieldInitSpec(this,o,{writable:!0,value:new Set});this._document=a;this.nativeFontFaces=new Set;this.styleElement=null;this.loadingRequests=[];this.loadTestFontId=0}_createClass(FontLoader,[{key:"addNativeFontFace",value:function addNativeFontFace(t){this.nativeFontFaces.add(t);this._document.fonts.add(t)}},{key:"removeNativeFontFace",value:function removeNativeFontFace(t){this.nativeFontFaces.delete(t);this._document.fonts.delete(t)}},{key:"insertRule",value:function insertRule(t){if(!this.styleElement){this.styleElement=this._document.createElement("style");this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement)}var r=this.styleElement.sheet;r.insertRule(t,r.cssRules.length)}},{key:"clear",value:function clear(){var t,r=_createForOfIteratorHelper(this.nativeFontFaces);try{for(r.s();!(t=r.n()).done;){var a=t.value;this._document.fonts.delete(a)}}catch(t){r.e(t)}finally{r.f()}this.nativeFontFaces.clear();_classPrivateFieldGet(this,o).clear();if(this.styleElement){this.styleElement.remove();this.styleElement=null}}},{key:"loadSystemFont",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){var r,a,l,c;return _regeneratorRuntime().wrap((function _callee$(u){for(;;)switch(u.prev=u.next){case 0:if(t&&!_classPrivateFieldGet(this,o).has(t.loadedName)){u.next=2;break}return u.abrupt("return");case 2:(0,i.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set.");if(!this.isFontLoadingAPISupported){u.next=18;break}r=t.loadedName,a=t.src,l=t.style;c=new FontFace(r,a,l);this.addNativeFontFace(c);u.prev=7;u.next=10;return c.load();case 10:_classPrivateFieldGet(this,o).add(r);u.next=17;break;case 13:u.prev=13;u.t0=u.catch(7);(0,i.warn)("Cannot load system font: ".concat(t.baseFontName,", installing it could help to improve PDF rendering."));this.removeNativeFontFace(c);case 17:return u.abrupt("return");case 18:(0,i.unreachable)("Not implemented: loadSystemFont without the Font Loading API.");case 19:case"end":return u.stop()}}),_callee,this,[[7,13]])}))),function loadSystemFont(t){return r.apply(this,arguments)})},{key:"bind",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){var r,a,o=this;return _regeneratorRuntime().wrap((function _callee2$(l){for(;;)switch(l.prev=l.next){case 0:if(!(t.attached||t.missingFile&&!t.systemFontInfo)){l.next=2;break}return l.abrupt("return");case 2:t.attached=!0;if(!t.systemFontInfo){l.next=7;break}l.next=6;return this.loadSystemFont(t.systemFontInfo);case 6:case 21:return l.abrupt("return");case 7:if(!this.isFontLoadingAPISupported){l.next=22;break}if(!(r=t.createNativeFontFace())){l.next=21;break}this.addNativeFontFace(r);l.prev=11;l.next=14;return r.loaded;case 14:l.next=21;break;case 16:l.prev=16;l.t0=l.catch(11);(0,i.warn)("Failed to load font '".concat(r.family,"': '").concat(l.t0,"'."));t.disableFontFace=!0;throw l.t0;case 22:if(!(a=t.createFontFaceRule())){l.next=29;break}this.insertRule(a);if(!this.isSyncFontLoadingSupported){l.next=27;break}return l.abrupt("return");case 27:l.next=29;return new Promise((function(r){var a=o._queueLoadingCallback(r);o._prepareFontLoadEvent(t,a)}));case 29:case"end":return l.stop()}}),_callee2,this,[[11,16]])}))),function bind(r){return t.apply(this,arguments)})},{key:"isFontLoadingAPISupported",get:function get(){var t,r=!(null===(t=this._document)||void 0===t||!t.fonts);return(0,i.shadow)(this,"isFontLoadingAPISupported",r)}},{key:"isSyncFontLoadingSupported",get:function get(){var t=!1;(i.isNodeJS||"undefined"!=typeof navigator&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(t=!0);return(0,i.shadow)(this,"isSyncFontLoadingSupported",t)}},{key:"_queueLoadingCallback",value:function _queueLoadingCallback(t){var r=this.loadingRequests,a={done:!1,complete:function completeRequest(){(0,i.assert)(!a.done,"completeRequest() cannot be called twice.");a.done=!0;for(;r.length>0&&r[0].done;){var t=r.shift();setTimeout(t.callback,0)}},callback:t};r.push(a);return a}},{key:"_loadTestFont",get:function get(){var t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,i.shadow)(this,"_loadTestFont",t)}},{key:"_prepareFontLoadEvent",value:function _prepareFontLoadEvent(t,r){function int32(t,r){return t.charCodeAt(r)<<24|t.charCodeAt(r+1)<<16|t.charCodeAt(r+2)<<8|255&t.charCodeAt(r+3)}function spliceString(t,r,a,i){return t.substring(0,r)+i+t.substring(r+a)}var a,o,l=this._document.createElement("canvas");l.width=1;l.height=1;var c=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0,u=l.getContext("2d",c),d=0;var h="lt".concat(Date.now()).concat(this.loadTestFontId++),p=this._loadTestFont,v=1482184792,y=int32(p=spliceString(p,976,h.length,h),16);for(a=0,o=h.length-3;a<o;a+=4)y=y-v+int32(h,a)|0;a<h.length&&(y=y-v+int32(h+"XXX",a)|0);p=spliceString(p,16,4,(0,i.string32)(y));var _="url(data:font/opentype;base64,".concat(btoa(p),");"),g='@font-face {font-family:"'.concat(h,'";src:').concat(_,"}");this.insertRule(g);var m=this._document.createElement("div");m.style.visibility="hidden";m.style.width=m.style.height="10px";m.style.position="absolute";m.style.top=m.style.left="0px";for(var b=0,w=[t.loadedName,h];b<w.length;b++){var P=w[b],A=this._document.createElement("span");A.textContent="Hi";A.style.fontFamily=P;m.append(A)}this._document.body.append(m);!function isFontReady(t,r){if(++d>30){(0,i.warn)("Load test font never loaded.");r()}else{u.font="30px "+t;u.fillText(".",0,20);u.getImageData(0,0,1,1).data[3]>0?r():setTimeout(isFontReady.bind(null,t,r))}}(h,(function(){m.remove();r.complete()}))}}]);var t,r;return FontLoader}();r.FontLoader=l;var c=function(){function FontFaceObject(t,r){var a=r.isEvalSupported,i=void 0===a||a,o=r.disableFontFace,l=void 0!==o&&o,c=r.ignoreErrors,u=void 0!==c&&c,d=r.inspectFont,h=void 0===d?null:d;_classCallCheck(this,FontFaceObject);this.compiledGlyphs=Object.create(null);for(var p in t)this[p]=t[p];this.isEvalSupported=!1!==i;this.disableFontFace=!0===l;this.ignoreErrors=!0===u;this._inspectFont=h}_createClass(FontFaceObject,[{key:"createNativeFontFace",value:function createNativeFontFace(){var t,r;if(!this.data||this.disableFontFace)return null;if(this.cssFontInfo){var a={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(a.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg"));r=new FontFace(this.cssFontInfo.fontFamily,this.data,a)}else r=new FontFace(this.loadedName,this.data,{});null===(t=this._inspectFont)||void 0===t||t.call(this,this);return r}},{key:"createFontFaceRule",value:function createFontFaceRule(){var t;if(!this.data||this.disableFontFace)return null;var r,a=(0,i.bytesToString)(this.data),o="url(data:".concat(this.mimetype,";base64,").concat(btoa(a),");");if(this.cssFontInfo){var l="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(l+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;"));r='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(l,"src:").concat(o,"}")}else r='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(o,"}");null===(t=this._inspectFont)||void 0===t||t.call(this,this,o);return r}},{key:"getPathGenerator",value:function getPathGenerator(t,r){if(void 0!==this.compiledGlyphs[r])return this.compiledGlyphs[r];var a;try{a=t.get(this.loadedName+"_path_"+r)}catch(t){if(!this.ignoreErrors)throw t;(0,i.warn)('getPathGenerator - ignoring character: "'.concat(t,'".'));return this.compiledGlyphs[r]=function(t,r){}}if(this.isEvalSupported&&i.FeatureTest.isEvalSupported){var o,l=[],c=_createForOfIteratorHelper(a);try{for(c.s();!(o=c.n()).done;){var u=o.value,d=void 0!==u.args?u.args.join(","):"";l.push("c.",u.cmd,"(",d,");\n")}}catch(t){c.e(t)}finally{c.f()}return this.compiledGlyphs[r]=new Function("c","size",l.join(""))}return this.compiledGlyphs[r]=function(t,r){var i,o=_createForOfIteratorHelper(a);try{for(o.s();!(i=o.n()).done;){var l=i.value;"scale"===l.cmd&&(l.args=[r,-r]);t[l.cmd].apply(t,l.args)}}catch(t){o.e(t)}finally{o.f()}}}}]);return FontFaceObject}();r.FontFaceObject=c},(t,r,a)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}a(2);a(71);a(73);a(85);a(90);a(292);a(300);a(112);a(301);a(148);a(149);Object.defineProperty(r,"__esModule",{value:!0});r.NodeStandardFontDataFactory=r.NodeFilterFactory=r.NodeCanvasFactory=r.NodeCMapReaderFactory=void 0;a(122);a(146);a(259);a(123);a(140);a(171);a(192);a(193);a(196);a(197);a(198);a(203);a(204);a(205);a(207);a(208);a(209);a(210);a(211);a(212);a(213);a(216);a(217);a(219);a(220);a(221);a(222);a(223);a(224);a(228);a(229);a(231);a(232);a(233);a(235);a(238);a(244);var i=a(371),o=a(1);function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,a)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}!function checkDOMMatrix(){if(!globalThis.DOMMatrix&&o.isNodeJS)try{globalThis.DOMMatrix=require("canvas").DOMMatrix}catch(t){(0,o.warn)('Cannot polyfill `DOMMatrix`, rendering may be broken: "'.concat(t,'".'))}}();!function checkPath2D(){if(!globalThis.Path2D&&o.isNodeJS)try{var t=require("canvas").CanvasRenderingContext2D,r=require("path2d-polyfill").polyfillPath2D;globalThis.CanvasRenderingContext2D=t;r(globalThis)}catch(t){(0,o.warn)('Cannot polyfill `Path2D`, rendering may be broken: "'.concat(t,'".'))}}();var l=function fetchData(t){return new Promise((function(r,a){require("fs").readFile(t,(function(t,i){!t&&i?r(new Uint8Array(i)):a(new Error(t))}))}))},c=function(t){_inherits(NodeFilterFactory,t);var r=_createSuper(NodeFilterFactory);function NodeFilterFactory(){_classCallCheck(this,NodeFilterFactory);return r.apply(this,arguments)}return _createClass(NodeFilterFactory)}(i.BaseFilterFactory);r.NodeFilterFactory=c;var u=function(t){_inherits(NodeCanvasFactory,t);var r=_createSuper(NodeCanvasFactory);function NodeCanvasFactory(){_classCallCheck(this,NodeCanvasFactory);return r.apply(this,arguments)}_createClass(NodeCanvasFactory,[{key:"_createCanvas",value:function _createCanvas(t,r){return require("canvas").createCanvas(t,r)}}]);return NodeCanvasFactory}(i.BaseCanvasFactory);r.NodeCanvasFactory=u;var d=function(t){_inherits(NodeCMapReaderFactory,t);var r=_createSuper(NodeCMapReaderFactory);function NodeCMapReaderFactory(){_classCallCheck(this,NodeCMapReaderFactory);return r.apply(this,arguments)}_createClass(NodeCMapReaderFactory,[{key:"_fetchData",value:function _fetchData(t,r){return l(t).then((function(t){return{cMapData:t,compressionType:r}}))}}]);return NodeCMapReaderFactory}(i.BaseCMapReaderFactory);r.NodeCMapReaderFactory=d;var h=function(t){_inherits(NodeStandardFontDataFactory,t);var r=_createSuper(NodeStandardFontDataFactory);function NodeStandardFontDataFactory(){_classCallCheck(this,NodeStandardFontDataFactory);return r.apply(this,arguments)}_createClass(NodeStandardFontDataFactory,[{key:"_fetchData",value:function _fetchData(t){return l(t)}}]);return NodeStandardFontDataFactory}(i.BaseStandardFontDataFactory);r.NodeStandardFontDataFactory=h},(t,r,a)=>{a(85);a(90);a(292);a(300);a(112);a(301);a(255);a(92);a(105);a(104);Object.defineProperty(r,"__esModule",{value:!0});r.CanvasGraphics=void 0;a(123);a(376);a(355);a(140);a(146);a(171);a(192);a(193);a(196);a(197);a(198);a(203);a(204);a(205);a(207);a(208);a(209);a(210);a(211);a(212);a(213);a(216);a(217);a(219);a(220);a(221);a(222);a(223);a(224);a(228);a(229);a(231);a(232);a(233);a(235);a(238);a(244);a(377);a(378);a(258);a(246);a(379);a(380);a(122);a(280);a(148);a(149);a(131);a(297);a(167);a(257);a(249);a(347);var i=a(1),o=a(362),l=a(382),c=a(383);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||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 _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function _classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||_unsupportedIterableToArray(t,r)||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(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}var u=4096,d=16;var h=function(){function CachedCanvases(t){_classCallCheck(this,CachedCanvases);this.canvasFactory=t;this.cache=Object.create(null)}_createClass(CachedCanvases,[{key:"getCanvas",value:function getCanvas(t,r,a){var i;if(void 0!==this.cache[t]){i=this.cache[t];this.canvasFactory.reset(i,r,a)}else{i=this.canvasFactory.create(r,a);this.cache[t]=i}return i}},{key:"delete",value:function _delete(t){delete this.cache[t]}},{key:"clear",value:function clear(){for(var t in this.cache){var r=this.cache[t];this.canvasFactory.destroy(r);delete this.cache[t]}}}]);return CachedCanvases}();function drawImageAtIntegerCoords(t,r,a,i,l,c,u,d,h,p){var v=_slicedToArray((0,o.getCurrentTransform)(t),6),y=v[0],_=v[1],g=v[2],m=v[3],b=v[4],w=v[5];if(0===_&&0===g){var P=u*y+b,A=Math.round(P),S=d*m+w,k=Math.round(S),x=(u+h)*y+b,E=Math.abs(Math.round(x)-A)||1,T=(d+p)*m+w,C=Math.abs(Math.round(T)-k)||1;t.setTransform(Math.sign(y),0,0,Math.sign(m),A,k);t.drawImage(r,a,i,l,c,0,0,E,C);t.setTransform(y,_,g,m,b,w);return[E,C]}if(0===y&&0===m){var I=d*g+b,M=Math.round(I),O=u*_+w,R=Math.round(O),G=(d+p)*g+b,L=Math.abs(Math.round(G)-M)||1,D=(u+h)*_+w,j=Math.abs(Math.round(D)-R)||1;t.setTransform(0,Math.sign(_),Math.sign(g),0,M,R);t.drawImage(r,a,i,l,c,0,0,j,L);t.setTransform(y,_,g,m,b,w);return[j,L]}t.drawImage(r,a,i,l,c,u,d,h,p);return[Math.hypot(y,_)*h,Math.hypot(g,m)*p]}var p=function(){function CanvasExtraState(t,r){_classCallCheck(this,CanvasExtraState);this.alphaIsShape=!1;this.fontSize=0;this.fontSizeScale=1;this.textMatrix=i.IDENTITY_MATRIX;this.textMatrixScale=1;this.fontMatrix=i.FONT_IDENTITY_MATRIX;this.leading=0;this.x=0;this.y=0;this.lineX=0;this.lineY=0;this.charSpacing=0;this.wordSpacing=0;this.textHScale=1;this.textRenderingMode=i.TextRenderingMode.FILL;this.textRise=0;this.fillColor="#000000";this.strokeColor="#000000";this.patternFill=!1;this.fillAlpha=1;this.strokeAlpha=1;this.lineWidth=1;this.activeSMask=null;this.transferMaps="none";this.startNewPathAndClipBox([0,0,t,r])}_createClass(CanvasExtraState,[{key:"clone",value:function clone(){var clone=Object.create(this);clone.clipBox=this.clipBox.slice();return clone}},{key:"setCurrentPoint",value:function setCurrentPoint(t,r){this.x=t;this.y=r}},{key:"updatePathMinMax",value:function updatePathMinMax(t,r,a){var o=_slicedToArray(i.Util.applyTransform([r,a],t),2);r=o[0];a=o[1];this.minX=Math.min(this.minX,r);this.minY=Math.min(this.minY,a);this.maxX=Math.max(this.maxX,r);this.maxY=Math.max(this.maxY,a)}},{key:"updateRectMinMax",value:function updateRectMinMax(t,r){var a=i.Util.applyTransform(r,t),o=i.Util.applyTransform(r.slice(2),t);this.minX=Math.min(this.minX,a[0],o[0]);this.minY=Math.min(this.minY,a[1],o[1]);this.maxX=Math.max(this.maxX,a[0],o[0]);this.maxY=Math.max(this.maxY,a[1],o[1])}},{key:"updateScalingPathMinMax",value:function updateScalingPathMinMax(t,r){i.Util.scaleMinMax(t,r);this.minX=Math.min(this.minX,r[0]);this.maxX=Math.max(this.maxX,r[1]);this.minY=Math.min(this.minY,r[2]);this.maxY=Math.max(this.maxY,r[3])}},{key:"updateCurvePathMinMax",value:function updateCurvePathMinMax(t,r,a,o,l,c,u,d,h,p){var v=i.Util.bezierBoundingBox(r,a,o,l,c,u,d,h);if(p){p[0]=Math.min(p[0],v[0],v[2]);p[1]=Math.max(p[1],v[0],v[2]);p[2]=Math.min(p[2],v[1],v[3]);p[3]=Math.max(p[3],v[1],v[3])}else this.updateRectMinMax(t,v)}},{key:"getPathBoundingBox",value:function getPathBoundingBox(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.PathType.FILL,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=[this.minX,this.minY,this.maxX,this.maxY];if(t===l.PathType.STROKE){r||(0,i.unreachable)("Stroke bounding box must include transform.");var o=i.Util.singularValueDecompose2dScale(r),c=o[0]*this.lineWidth/2,u=o[1]*this.lineWidth/2;a[0]-=c;a[1]-=u;a[2]+=c;a[3]+=u}return a}},{key:"updateClipFromPath",value:function updateClipFromPath(){var t=i.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}},{key:"isEmptyClip",value:function isEmptyClip(){return this.minX===1/0}},{key:"startNewPathAndClipBox",value:function startNewPathAndClipBox(t){this.clipBox=t;this.minX=1/0;this.minY=1/0;this.maxX=0;this.maxY=0}},{key:"getClippedPathBoundingBox",value:function getClippedPathBoundingBox(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.PathType.FILL,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return i.Util.intersect(this.clipBox,this.getPathBoundingBox(t,r))}}]);return CanvasExtraState}();function putBinaryImageData(t,r){if("undefined"!=typeof ImageData&&r instanceof ImageData)t.putImageData(r,0,0);else{var a,o,l,c,u,h=r.height,p=r.width,v=h%d,y=(h-v)/d,_=0===v?y:y+1,g=t.createImageData(p,d),m=0,b=r.data,w=g.data;if(r.kind===i.ImageKind.GRAYSCALE_1BPP){var P=b.byteLength,A=new Uint32Array(w.buffer,0,w.byteLength>>2),S=A.length,k=p+7>>3,x=4294967295,E=i.FeatureTest.isLittleEndian?4278190080:255;for(o=0;o<_;o++){c=o<y?d:v;a=0;for(l=0;l<c;l++){for(var T=P-m,C=0,I=T>k?p:8*T-7,M=-8&I,O=0,R=0;C<M;C+=8){R=b[m++];A[a++]=128&R?x:E;A[a++]=64&R?x:E;A[a++]=32&R?x:E;A[a++]=16&R?x:E;A[a++]=8&R?x:E;A[a++]=4&R?x:E;A[a++]=2&R?x:E;A[a++]=1&R?x:E}for(;C<I;C++){if(0===O){R=b[m++];O=128}A[a++]=R&O?x:E;O>>=1}}for(;a<S;)A[a++]=0;t.putImageData(g,0,o*d)}}else if(r.kind===i.ImageKind.RGBA_32BPP){l=0;u=p*d*4;for(o=0;o<y;o++){w.set(b.subarray(m,m+u));m+=u;t.putImageData(g,0,l);l+=d}if(o<_){u=p*v*4;w.set(b.subarray(m,m+u));t.putImageData(g,0,l)}}else{if(r.kind!==i.ImageKind.RGB_24BPP)throw new Error("bad image kind: ".concat(r.kind));u=p*(c=d);for(o=0;o<_;o++){o>=y&&(u=p*(c=v));a=0;for(l=u;l--;){w[a++]=b[m++];w[a++]=b[m++];w[a++]=b[m++];w[a++]=255}t.putImageData(g,0,o*d)}}}}function putBinaryImageMask(t,r){if(r.bitmap)t.drawImage(r.bitmap,0,0);else for(var a=r.height,i=r.width,o=a%d,l=(a-o)/d,u=0===o?l:l+1,h=t.createImageData(i,d),p=0,v=r.data,y=h.data,_=0;_<u;_++){var g=_<l?d:o;p=(0,c.convertBlackAndWhiteToRGBA)({src:v,srcPos:p,dest:y,width:i,height:g,nonBlackColor:0}).srcPos;t.putImageData(h,0,_*d)}}function copyCtxState(t,r){for(var a=0,i=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];a<i.length;a++){var o=i[a];void 0!==t[o]&&(r[o]=t[o])}if(void 0!==t.setLineDash){r.setLineDash(t.getLineDash());r.lineDashOffset=t.lineDashOffset}}function resetCtxToDefault(t){t.strokeStyle=t.fillStyle="#000000";t.fillRule="nonzero";t.globalAlpha=1;t.lineWidth=1;t.lineCap="butt";t.lineJoin="miter";t.miterLimit=10;t.globalCompositeOperation="source-over";t.font="10px sans-serif";if(void 0!==t.setLineDash){t.setLineDash([]);t.lineDashOffset=0}if(!i.isNodeJS){var r=t.filter;"none"!==r&&""!==r&&(t.filter="none")}}function composeSMaskBackdrop(t,r,a,i){for(var o=t.length,l=3;l<o;l+=4){var c=t[l];if(0===c){t[l-3]=r;t[l-2]=a;t[l-1]=i}else if(c<255){var u=255-c;t[l-3]=t[l-3]*c+r*u>>8;t[l-2]=t[l-2]*c+a*u>>8;t[l-1]=t[l-1]*c+i*u>>8}}}function composeSMaskAlpha(t,r,a){for(var i=t.length,o=3;o<i;o+=4){var l=a?a[t[o]]:t[o];r[o]=r[o]*l*.00392156862745098|0}}function composeSMaskLuminosity(t,r,a){for(var i=t.length,o=3;o<i;o+=4){var l=77*t[o-3]+152*t[o-2]+28*t[o-1];r[o]=a?r[o]*a[l>>8]>>8:r[o]*l>>16}}function composeSMask(t,r,a,i){var o=i[0],l=i[1],c=i[2]-o,u=i[3]-l;if(0!==c&&0!==u){!function genericComposeSMask(t,r,a,i,o,l,c,u,d,h,p){for(var v=!!l,y=v?l[0]:0,_=v?l[1]:0,g=v?l[2]:0,m="Luminosity"===o?composeSMaskLuminosity:composeSMaskAlpha,b=Math.min(i,Math.ceil(1048576/a)),w=0;w<i;w+=b){var P=Math.min(b,i-w),A=t.getImageData(u-h,w+(d-p),a,P),S=r.getImageData(u,w+d,a,P);v&&composeSMaskBackdrop(A.data,y,_,g);m(A.data,S.data,c);r.putImageData(S,u,w+d)}}(r.context,a,c,u,r.subtype,r.backdrop,r.transferMap,o,l,r.offsetX,r.offsetY);t.save();t.globalAlpha=1;t.globalCompositeOperation="source-over";t.setTransform(1,0,0,1,0,0);t.drawImage(a.canvas,0,0);t.restore()}}function getImageSmoothingEnabled(t,r){var a=i.Util.singularValueDecompose2dScale(t);a[0]=Math.fround(a[0]);a[1]=Math.fround(a[1]);var l=Math.fround((globalThis.devicePixelRatio||1)*o.PixelsPerInch.PDF_TO_CSS_UNITS);return void 0!==r?r:a[0]<=l||a[1]<=l}var v=["butt","round","square"],y=["miter","round","bevel"],_={},g={},m=new WeakSet,b=new WeakSet,w=function(){function CanvasGraphics(t,r,a,i,o,l,c,u){var d=l.optionalContentConfig,v=l.markedContentStack,y=void 0===v?null:v;_classCallCheck(this,CanvasGraphics);_classPrivateMethodInitSpec(this,b);_classPrivateMethodInitSpec(this,m);this.ctx=t;this.current=new p(this.ctx.canvas.width,this.ctx.canvas.height);this.stateStack=[];this.pendingClip=null;this.pendingEOFill=!1;this.res=null;this.xobjs=null;this.commonObjs=r;this.objs=a;this.canvasFactory=i;this.filterFactory=o;this.groupStack=[];this.processingType3=null;this.baseTransform=null;this.baseTransformStack=[];this.groupLevel=0;this.smaskStack=[];this.smaskCounter=0;this.tempSMask=null;this.suspendedCtx=null;this.contentVisible=!0;this.markedContentStack=y||[];this.optionalContentConfig=d;this.cachedCanvases=new h(this.canvasFactory);this.cachedPatterns=new Map;this.annotationCanvasMap=c;this.viewportScale=1;this.outputScaleX=1;this.outputScaleY=1;this.pageColors=u;this._cachedScaleForStroking=[-1,0];this._cachedGetSinglePixelWidth=null;this._cachedBitmapsMap=new Map}_createClass(CanvasGraphics,[{key:"getObject",value:function getObject(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"string"==typeof t?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):r}},{key:"beginDrawing",value:function beginDrawing(t){var r,a=t.transform,i=t.viewport,l=t.transparency,c=void 0!==l&&l,u=t.background,d=void 0===u?null:u,h=this.ctx.canvas.width,p=this.ctx.canvas.height,v=this.ctx.fillStyle;this.ctx.fillStyle=d||"#ffffff";this.ctx.fillRect(0,0,h,p);this.ctx.fillStyle=v;if(c){var y,_=this.cachedCanvases.getCanvas("transparent",h,p);this.compositeCtx=this.ctx;this.transparentCanvas=_.canvas;this.ctx=_.context;this.ctx.save();(y=this.ctx).transform.apply(y,_toConsumableArray((0,o.getCurrentTransform)(this.compositeCtx)))}this.ctx.save();resetCtxToDefault(this.ctx);if(a){var g;(g=this.ctx).transform.apply(g,_toConsumableArray(a));this.outputScaleX=a[0];this.outputScaleY=a[0]}(r=this.ctx).transform.apply(r,_toConsumableArray(i.transform));this.viewportScale=i.scale;this.baseTransform=(0,o.getCurrentTransform)(this.ctx)}},{key:"executeOperatorList",value:function executeOperatorList(t,r,a,o){var l=t.argsArray,c=t.fnArray,u=r||0,d=l.length;if(d===u)return u;for(var h,p=d-u>10&&"function"==typeof a,v=p?Date.now()+15:0,y=0,_=this.commonObjs,g=this.objs;;){if(void 0!==o&&u===o.nextBreakPoint){o.breakIt(u,a);return u}if((h=c[u])!==i.OPS.dependency)this[h].apply(this,l[u]);else{var m,b=_createForOfIteratorHelper(l[u]);try{for(b.s();!(m=b.n()).done;){var w=m.value,P=w.startsWith("g_")?_:g;if(!P.has(w)){P.get(w,a);return u}}}catch(t){b.e(t)}finally{b.f()}}if(++u===d)return u;if(p&&++y>10){if(Date.now()>v){a();return u}y=0}}}},{key:"endDrawing",value:function endDrawing(){_classPrivateMethodGet(this,m,_restoreInitialState2).call(this);this.cachedCanvases.clear();this.cachedPatterns.clear();var t,r=_createForOfIteratorHelper(this._cachedBitmapsMap.values());try{for(r.s();!(t=r.n()).done;){var a,i=t.value,o=_createForOfIteratorHelper(i.values());try{for(o.s();!(a=o.n()).done;){var l=a.value;"undefined"!=typeof HTMLCanvasElement&&l instanceof HTMLCanvasElement&&(l.width=l.height=0)}}catch(t){o.e(t)}finally{o.f()}i.clear()}}catch(t){r.e(t)}finally{r.f()}this._cachedBitmapsMap.clear();_classPrivateMethodGet(this,b,_drawFilter2).call(this)}},{key:"_scaleImage",value:function _scaleImage(t,r){for(var a,i,o=t.width,l=t.height,c=Math.max(Math.hypot(r[0],r[1]),1),u=Math.max(Math.hypot(r[2],r[3]),1),d=o,h=l,p="prescale1";c>2&&d>1||u>2&&h>1;){var v=d,y=h;c>2&&d>1&&(c/=d/(v=d>=16384?Math.floor(d/2)-1||1:Math.ceil(d/2)));u>2&&h>1&&(u/=h/(y=h>=16384?Math.floor(h/2)-1||1:Math.ceil(h)/2));(i=(a=this.cachedCanvases.getCanvas(p,v,y)).context).clearRect(0,0,v,y);i.drawImage(t,0,0,d,h,0,0,v,y);t=a.canvas;d=v;h=y;p="prescale1"===p?"prescale2":"prescale1"}return{img:t,paintWidth:d,paintHeight:h}}},{key:"_createMaskCanvas",value:function _createMaskCanvas(t){var r,a,c,u,d=this.ctx,h=t.width,p=t.height,v=this.current.fillColor,y=this.current.patternFill,_=(0,o.getCurrentTransform)(d);if((t.bitmap||t.data)&&t.count>1){var g=t.bitmap||t.data.buffer;a=JSON.stringify(y?_:[_.slice(0,4),v]);if(!(r=this._cachedBitmapsMap.get(g))){r=new Map;this._cachedBitmapsMap.set(g,r)}var m=r.get(a);if(m&&!y){return{canvas:m,offsetX:Math.round(Math.min(_[0],_[2])+_[4]),offsetY:Math.round(Math.min(_[1],_[3])+_[5])}}c=m}c||putBinaryImageMask((u=this.cachedCanvases.getCanvas("maskCanvas",h,p)).context,t);var b=i.Util.transform(_,[1/h,0,0,-1/p,0,0]);b=i.Util.transform(b,[1,0,0,1,0,-p]);var w=i.Util.applyTransform([0,0],b),P=i.Util.applyTransform([h,p],b),A=i.Util.normalizeRect([w[0],w[1],P[0],P[1]]),S=Math.round(A[2]-A[0])||1,k=Math.round(A[3]-A[1])||1,x=this.cachedCanvases.getCanvas("fillCanvas",S,k),E=x.context,T=Math.min(w[0],P[0]),C=Math.min(w[1],P[1]);E.translate(-T,-C);E.transform.apply(E,_toConsumableArray(b));if(!c){c=(c=this._scaleImage(u.canvas,(0,o.getCurrentTransformInverse)(E))).img;r&&y&&r.set(a,c)}E.imageSmoothingEnabled=getImageSmoothingEnabled((0,o.getCurrentTransform)(E),t.interpolate);drawImageAtIntegerCoords(E,c,0,0,c.width,c.height,0,0,h,p);E.globalCompositeOperation="source-in";var I=i.Util.transform((0,o.getCurrentTransformInverse)(E),[1,0,0,1,-T,-C]);E.fillStyle=y?v.getPattern(d,this,I,l.PathType.FILL):v;E.fillRect(0,0,h,p);if(r&&!y){this.cachedCanvases.delete("fillCanvas");r.set(a,x.canvas)}return{canvas:x.canvas,offsetX:Math.round(T),offsetY:Math.round(C)}}},{key:"setLineWidth",value:function setLineWidth(t){t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1);this.current.lineWidth=t;this.ctx.lineWidth=t}},{key:"setLineCap",value:function setLineCap(t){this.ctx.lineCap=v[t]}},{key:"setLineJoin",value:function setLineJoin(t){this.ctx.lineJoin=y[t]}},{key:"setMiterLimit",value:function setMiterLimit(t){this.ctx.miterLimit=t}},{key:"setDash",value:function setDash(t,r){var a=this.ctx;if(void 0!==a.setLineDash){a.setLineDash(t);a.lineDashOffset=r}}},{key:"setRenderingIntent",value:function setRenderingIntent(t){}},{key:"setFlatness",value:function setFlatness(t){}},{key:"setGState",value:function setGState(t){var r,a=_createForOfIteratorHelper(t);try{for(a.s();!(r=a.n()).done;){var i=_slicedToArray(r.value,2),o=i[0],l=i[1];switch(o){case"LW":this.setLineWidth(l);break;case"LC":this.setLineCap(l);break;case"LJ":this.setLineJoin(l);break;case"ML":this.setMiterLimit(l);break;case"D":this.setDash(l[0],l[1]);break;case"RI":this.setRenderingIntent(l);break;case"FL":this.setFlatness(l);break;case"Font":this.setFont(l[0],l[1]);break;case"CA":this.current.strokeAlpha=l;break;case"ca":this.current.fillAlpha=l;this.ctx.globalAlpha=l;break;case"BM":this.ctx.globalCompositeOperation=l;break;case"SMask":this.current.activeSMask=l?this.tempSMask:null;this.tempSMask=null;this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(l)}}}catch(t){a.e(t)}finally{a.f()}}},{key:"inSMaskMode",get:function get(){return!!this.suspendedCtx}},{key:"checkSMaskState",value:function checkSMaskState(){var t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}},{key:"beginSMaskMode",value:function beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");var t=this.ctx.canvas.width,r=this.ctx.canvas.height,a="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(a,t,r);this.suspendedCtx=this.ctx;this.ctx=i.context;var l=this.ctx;l.setTransform.apply(l,_toConsumableArray((0,o.getCurrentTransform)(this.suspendedCtx)));copyCtxState(this.suspendedCtx,l);!function mirrorContextOperations(t,r){if(t._removeMirroring)throw new Error("Context is already forwarding operations.");t.__originalSave=t.save;t.__originalRestore=t.restore;t.__originalRotate=t.rotate;t.__originalScale=t.scale;t.__originalTranslate=t.translate;t.__originalTransform=t.transform;t.__originalSetTransform=t.setTransform;t.__originalResetTransform=t.resetTransform;t.__originalClip=t.clip;t.__originalMoveTo=t.moveTo;t.__originalLineTo=t.lineTo;t.__originalBezierCurveTo=t.bezierCurveTo;t.__originalRect=t.rect;t.__originalClosePath=t.closePath;t.__originalBeginPath=t.beginPath;t._removeMirroring=function(){t.save=t.__originalSave;t.restore=t.__originalRestore;t.rotate=t.__originalRotate;t.scale=t.__originalScale;t.translate=t.__originalTranslate;t.transform=t.__originalTransform;t.setTransform=t.__originalSetTransform;t.resetTransform=t.__originalResetTransform;t.clip=t.__originalClip;t.moveTo=t.__originalMoveTo;t.lineTo=t.__originalLineTo;t.bezierCurveTo=t.__originalBezierCurveTo;t.rect=t.__originalRect;t.closePath=t.__originalClosePath;t.beginPath=t.__originalBeginPath;delete t._removeMirroring};t.save=function ctxSave(){r.save();this.__originalSave()};t.restore=function ctxRestore(){r.restore();this.__originalRestore()};t.translate=function ctxTranslate(t,a){r.translate(t,a);this.__originalTranslate(t,a)};t.scale=function ctxScale(t,a){r.scale(t,a);this.__originalScale(t,a)};t.transform=function ctxTransform(t,a,i,o,l,c){r.transform(t,a,i,o,l,c);this.__originalTransform(t,a,i,o,l,c)};t.setTransform=function ctxSetTransform(t,a,i,o,l,c){r.setTransform(t,a,i,o,l,c);this.__originalSetTransform(t,a,i,o,l,c)};t.resetTransform=function ctxResetTransform(){r.resetTransform();this.__originalResetTransform()};t.rotate=function ctxRotate(t){r.rotate(t);this.__originalRotate(t)};t.clip=function ctxRotate(t){r.clip(t);this.__originalClip(t)};t.moveTo=function(t,a){r.moveTo(t,a);this.__originalMoveTo(t,a)};t.lineTo=function(t,a){r.lineTo(t,a);this.__originalLineTo(t,a)};t.bezierCurveTo=function(t,a,i,o,l,c){r.bezierCurveTo(t,a,i,o,l,c);this.__originalBezierCurveTo(t,a,i,o,l,c)};t.rect=function(t,a,i,o){r.rect(t,a,i,o);this.__originalRect(t,a,i,o)};t.closePath=function(){r.closePath();this.__originalClosePath()};t.beginPath=function(){r.beginPath();this.__originalBeginPath()}}(l,this.suspendedCtx);this.setGState([["BM","source-over"],["ca",1],["CA",1]])}},{key:"endSMaskMode",value:function endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring();copyCtxState(this.ctx,this.suspendedCtx);this.ctx=this.suspendedCtx;this.suspendedCtx=null}},{key:"compose",value:function compose(t){if(this.current.activeSMask){if(t){t[0]=Math.floor(t[0]);t[1]=Math.floor(t[1]);t[2]=Math.ceil(t[2]);t[3]=Math.ceil(t[3])}else t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];var r=this.current.activeSMask;composeSMask(this.suspendedCtx,r,this.ctx,t);this.ctx.save();this.ctx.setTransform(1,0,0,1,0,0);this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height);this.ctx.restore()}}},{key:"save",value:function save(){if(this.inSMaskMode){copyCtxState(this.ctx,this.suspendedCtx);this.suspendedCtx.save()}else this.ctx.save();var t=this.current;this.stateStack.push(t);this.current=t.clone()}},{key:"restore",value:function restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode();if(0!==this.stateStack.length){this.current=this.stateStack.pop();if(this.inSMaskMode){this.suspendedCtx.restore();copyCtxState(this.suspendedCtx,this.ctx)}else this.ctx.restore();this.checkSMaskState();this.pendingClip=null;this._cachedScaleForStroking[0]=-1;this._cachedGetSinglePixelWidth=null}}},{key:"transform",value:function transform(t,r,a,i,o,l){this.ctx.transform(t,r,a,i,o,l);this._cachedScaleForStroking[0]=-1;this._cachedGetSinglePixelWidth=null}},{key:"constructPath",value:function constructPath(t,r,a){for(var l,c,u=this.ctx,d=this.current,h=d.x,p=d.y,v=(0,o.getCurrentTransform)(u),y=0===v[0]&&0===v[3]||0===v[1]&&0===v[2],_=y?a.slice(0):null,g=0,m=0,b=t.length;g<b;g++)switch(0|t[g]){case i.OPS.rectangle:h=r[m++];p=r[m++];var w=r[m++],P=r[m++],A=h+w,S=p+P;u.moveTo(h,p);if(0===w||0===P)u.lineTo(A,S);else{u.lineTo(A,p);u.lineTo(A,S);u.lineTo(h,S)}y||d.updateRectMinMax(v,[h,p,A,S]);u.closePath();break;case i.OPS.moveTo:h=r[m++];p=r[m++];u.moveTo(h,p);y||d.updatePathMinMax(v,h,p);break;case i.OPS.lineTo:h=r[m++];p=r[m++];u.lineTo(h,p);y||d.updatePathMinMax(v,h,p);break;case i.OPS.curveTo:l=h;c=p;h=r[m+4];p=r[m+5];u.bezierCurveTo(r[m],r[m+1],r[m+2],r[m+3],h,p);d.updateCurvePathMinMax(v,l,c,r[m],r[m+1],r[m+2],r[m+3],h,p,_);m+=6;break;case i.OPS.curveTo2:l=h;c=p;u.bezierCurveTo(h,p,r[m],r[m+1],r[m+2],r[m+3]);d.updateCurvePathMinMax(v,l,c,h,p,r[m],r[m+1],r[m+2],r[m+3],_);h=r[m+2];p=r[m+3];m+=4;break;case i.OPS.curveTo3:l=h;c=p;h=r[m+2];p=r[m+3];u.bezierCurveTo(r[m],r[m+1],h,p,h,p);d.updateCurvePathMinMax(v,l,c,r[m],r[m+1],h,p,h,p,_);m+=4;break;case i.OPS.closePath:u.closePath()}y&&d.updateScalingPathMinMax(v,_);d.setCurrentPoint(h,p)}},{key:"closePath",value:function closePath(){this.ctx.closePath()}},{key:"stroke",value:function stroke(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this.ctx,a=this.current.strokeColor;r.globalAlpha=this.current.strokeAlpha;if(this.contentVisible)if("object"===_typeof(a)&&null!=a&&a.getPattern){r.save();r.strokeStyle=a.getPattern(r,this,(0,o.getCurrentTransformInverse)(r),l.PathType.STROKE);this.rescaleAndStroke(!1);r.restore()}else this.rescaleAndStroke(!0);t&&this.consumePath(this.current.getClippedPathBoundingBox());r.globalAlpha=this.current.fillAlpha}},{key:"closeStroke",value:function closeStroke(){this.closePath();this.stroke()}},{key:"fill",value:function fill(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this.ctx,a=this.current.fillColor,i=!1;if(this.current.patternFill){r.save();r.fillStyle=a.getPattern(r,this,(0,o.getCurrentTransformInverse)(r),l.PathType.FILL);i=!0}var c=this.current.getClippedPathBoundingBox();if(this.contentVisible&&null!==c)if(this.pendingEOFill){r.fill("evenodd");this.pendingEOFill=!1}else r.fill();i&&r.restore();t&&this.consumePath(c)}},{key:"eoFill",value:function eoFill(){this.pendingEOFill=!0;this.fill()}},{key:"fillStroke",value:function fillStroke(){this.fill(!1);this.stroke(!1);this.consumePath()}},{key:"eoFillStroke",value:function eoFillStroke(){this.pendingEOFill=!0;this.fillStroke()}},{key:"closeFillStroke",value:function closeFillStroke(){this.closePath();this.fillStroke()}},{key:"closeEOFillStroke",value:function closeEOFillStroke(){this.pendingEOFill=!0;this.closePath();this.fillStroke()}},{key:"endPath",value:function endPath(){this.consumePath()}},{key:"clip",value:function clip(){this.pendingClip=_}},{key:"eoClip",value:function eoClip(){this.pendingClip=g}},{key:"beginText",value:function beginText(){this.current.textMatrix=i.IDENTITY_MATRIX;this.current.textMatrixScale=1;this.current.x=this.current.lineX=0;this.current.y=this.current.lineY=0}},{key:"endText",value:function endText(){var t=this.pendingTextPaths,r=this.ctx;if(void 0!==t){r.save();r.beginPath();var a,i=_createForOfIteratorHelper(t);try{for(i.s();!(a=i.n()).done;){var o=a.value;r.setTransform.apply(r,_toConsumableArray(o.transform));r.translate(o.x,o.y);o.addToPath(r,o.fontSize)}}catch(t){i.e(t)}finally{i.f()}r.restore();r.clip();r.beginPath();delete this.pendingTextPaths}else r.beginPath()}},{key:"setCharSpacing",value:function setCharSpacing(t){this.current.charSpacing=t}},{key:"setWordSpacing",value:function setWordSpacing(t){this.current.wordSpacing=t}},{key:"setHScale",value:function setHScale(t){this.current.textHScale=t/100}},{key:"setLeading",value:function setLeading(t){this.current.leading=-t}},{key:"setFont",value:function setFont(t,r){var a,o=this.commonObjs.get(t),l=this.current;if(!o)throw new Error("Can't find font for ".concat(t));l.fontMatrix=o.fontMatrix||i.FONT_IDENTITY_MATRIX;0!==l.fontMatrix[0]&&0!==l.fontMatrix[3]||(0,i.warn)("Invalid font matrix for font "+t);if(r<0){r=-r;l.fontDirection=-1}else l.fontDirection=1;this.current.font=o;this.current.fontSize=r;if(!o.isType3Font){var c=o.loadedName||"sans-serif",u=(null===(a=o.systemFontInfo)||void 0===a?void 0:a.css)||'"'.concat(c,'", ').concat(o.fallbackName),d="normal";o.black?d="900":o.bold&&(d="bold");var h=o.italic?"italic":"normal",p=r;r<16?p=16:r>100&&(p=100);this.current.fontSizeScale=r/p;this.ctx.font="".concat(h," ").concat(d," ").concat(p,"px ").concat(u)}}},{key:"setTextRenderingMode",value:function setTextRenderingMode(t){this.current.textRenderingMode=t}},{key:"setTextRise",value:function setTextRise(t){this.current.textRise=t}},{key:"moveText",value:function moveText(t,r){this.current.x=this.current.lineX+=t;this.current.y=this.current.lineY+=r}},{key:"setLeadingMoveText",value:function setLeadingMoveText(t,r){this.setLeading(-r);this.moveText(t,r)}},{key:"setTextMatrix",value:function setTextMatrix(t,r,a,i,o,l){this.current.textMatrix=[t,r,a,i,o,l];this.current.textMatrixScale=Math.hypot(t,r);this.current.x=this.current.lineX=0;this.current.y=this.current.lineY=0}},{key:"nextLine",value:function nextLine(){this.moveText(0,this.current.leading)}},{key:"paintChar",value:function paintChar(t,r,a,l){var c,u=this.ctx,d=this.current,h=d.font,p=d.textRenderingMode,v=d.fontSize/d.fontSizeScale,y=p&i.TextRenderingMode.FILL_STROKE_MASK,_=!!(p&i.TextRenderingMode.ADD_TO_PATH_FLAG),g=d.patternFill&&!h.missingFile;(h.disableFontFace||_||g)&&(c=h.getPathGenerator(this.commonObjs,t));if(h.disableFontFace||g){u.save();u.translate(r,a);u.beginPath();c(u,v);l&&u.setTransform.apply(u,_toConsumableArray(l));y!==i.TextRenderingMode.FILL&&y!==i.TextRenderingMode.FILL_STROKE||u.fill();y!==i.TextRenderingMode.STROKE&&y!==i.TextRenderingMode.FILL_STROKE||u.stroke();u.restore()}else{y!==i.TextRenderingMode.FILL&&y!==i.TextRenderingMode.FILL_STROKE||u.fillText(t,r,a);y!==i.TextRenderingMode.STROKE&&y!==i.TextRenderingMode.FILL_STROKE||u.strokeText(t,r,a)}if(_){(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,o.getCurrentTransform)(u),x:r,y:a,fontSize:v,addToPath:c})}}},{key:"isFontSubpixelAAEnabled",get:function get(){var t=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10).context;t.scale(1.5,1);t.fillText("I",0,10);for(var r=t.getImageData(0,0,10,10).data,a=!1,o=3;o<r.length;o+=4)if(r[o]>0&&r[o]<255){a=!0;break}return(0,i.shadow)(this,"isFontSubpixelAAEnabled",a)}},{key:"showText",value:function showText(t){var r=this.current,a=r.font;if(a.isType3Font)return this.showType3Text(t);var c=r.fontSize;if(0!==c){var u,d=this.ctx,h=r.fontSizeScale,p=r.charSpacing,v=r.wordSpacing,y=r.fontDirection,_=r.textHScale*y,g=t.length,m=a.vertical,b=m?1:-1,w=a.defaultVMetrics,P=c*r.fontMatrix[0],A=r.textRenderingMode===i.TextRenderingMode.FILL&&!a.disableFontFace&&!r.patternFill;d.save();d.transform.apply(d,_toConsumableArray(r.textMatrix));d.translate(r.x,r.y+r.textRise);y>0?d.scale(_,-1):d.scale(_,1);if(r.patternFill){d.save();var S=r.fillColor.getPattern(d,this,(0,o.getCurrentTransformInverse)(d),l.PathType.FILL);u=(0,o.getCurrentTransform)(d);d.restore();d.fillStyle=S}var k=r.lineWidth,x=r.textMatrixScale;if(0===x||0===k){var E=r.textRenderingMode&i.TextRenderingMode.FILL_STROKE_MASK;E!==i.TextRenderingMode.STROKE&&E!==i.TextRenderingMode.FILL_STROKE||(k=this.getSinglePixelWidth())}else k/=x;if(1!==h){d.scale(h,h);k/=h}d.lineWidth=k;if(a.isInvalidPDFjsFont){var T,C=[],I=0,M=_createForOfIteratorHelper(t);try{for(M.s();!(T=M.n()).done;){var O=T.value;C.push(O.unicode);I+=O.width}}catch(t){M.e(t)}finally{M.f()}d.fillText(C.join(""),0,0);r.x+=I*P*_;d.restore();this.compose()}else{var R,G=0;for(R=0;R<g;++R){var L=t[R];if("number"!=typeof L){var D=!1,j=(L.isSpace?v:0)+p,N=L.fontChar,W=L.accent,B=void 0,U=void 0,H=L.width;if(m){var z=L.vmetric||w,q=-(L.vmetric?z[1]:.5*H)*P,V=z[2]*P;H=z?-z[0]:H;B=q/h;U=(G+V)/h}else{B=G/h;U=0}if(a.remeasure&&H>0){var X=1e3*d.measureText(N).width/c*h;if(H<X&&this.isFontSubpixelAAEnabled){var Y=H/X;D=!0;d.save();d.scale(Y,1);B/=Y}else H!==X&&(B+=(H-X)/2e3*c/h)}if(this.contentVisible&&(L.isInFont||a.missingFile))if(A&&!W)d.fillText(N,B,U);else{this.paintChar(N,B,U,u);if(W){var K=B+c*W.offset.x/h,J=U-c*W.offset.y/h;this.paintChar(W.fontChar,K,J,u)}}G+=m?H*P-j*y:H*P+j*y;D&&d.restore()}else G+=b*L*c/1e3}m?r.y-=G:r.x+=G*_;d.restore();this.compose()}}}},{key:"showType3Text",value:function showType3Text(t){var r,a,o,l,c=this.ctx,u=this.current,d=u.font,h=u.fontSize,p=u.fontDirection,v=d.vertical?1:-1,y=u.charSpacing,_=u.wordSpacing,g=u.textHScale*p,m=u.fontMatrix||i.FONT_IDENTITY_MATRIX,b=t.length;if(!(u.textRenderingMode===i.TextRenderingMode.INVISIBLE)&&0!==h){this._cachedScaleForStroking[0]=-1;this._cachedGetSinglePixelWidth=null;c.save();c.transform.apply(c,_toConsumableArray(u.textMatrix));c.translate(u.x,u.y);c.scale(g,p);for(r=0;r<b;++r)if("number"!=typeof(a=t[r])){var w=(a.isSpace?_:0)+y,P=d.charProcOperatorList[a.operatorListId];if(P){if(this.contentVisible){this.processingType3=a;this.save();c.scale(h,h);c.transform.apply(c,_toConsumableArray(m));this.executeOperatorList(P);this.restore()}o=i.Util.applyTransform([a.width,0],m)[0]*h+w;c.translate(o,0);u.x+=o*g}else(0,i.warn)('Type3 character "'.concat(a.operatorListId,'" is not available.'))}else{l=v*a*h/1e3;this.ctx.translate(l,0);u.x+=l*g}c.restore();this.processingType3=null}}},{key:"setCharWidth",value:function setCharWidth(t,r){}},{key:"setCharWidthAndBounds",value:function setCharWidthAndBounds(t,r,a,i,o,l){this.ctx.rect(a,i,o-a,l-i);this.ctx.clip();this.endPath()}},{key:"getColorN_Pattern",value:function getColorN_Pattern(t){var r,a=this;if("TilingPattern"===t[0]){var i=t[1],c=this.baseTransform||(0,o.getCurrentTransform)(this.ctx),u={createCanvasGraphics:function createCanvasGraphics(t){return new CanvasGraphics(t,a.commonObjs,a.objs,a.canvasFactory,a.filterFactory,{optionalContentConfig:a.optionalContentConfig,markedContentStack:a.markedContentStack})}};r=new l.TilingPattern(t,i,this.ctx,u,c)}else r=this._getPattern(t[1],t[2]);return r}},{key:"setStrokeColorN",value:function setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}},{key:"setFillColorN",value:function setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments);this.current.patternFill=!0}},{key:"setStrokeRGBColor",value:function setStrokeRGBColor(t,r,a){var o=i.Util.makeHexColor(t,r,a);this.ctx.strokeStyle=o;this.current.strokeColor=o}},{key:"setFillRGBColor",value:function setFillRGBColor(t,r,a){var o=i.Util.makeHexColor(t,r,a);this.ctx.fillStyle=o;this.current.fillColor=o;this.current.patternFill=!1}},{key:"_getPattern",value:function _getPattern(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.cachedPatterns.has(t))r=this.cachedPatterns.get(t);else{r=(0,l.getShadingPattern)(this.getObject(t));this.cachedPatterns.set(t,r)}a&&(r.matrix=a);return r}},{key:"shadingFill",value:function shadingFill(t){if(this.contentVisible){var r=this.ctx;this.save();var a=this._getPattern(t);r.fillStyle=a.getPattern(r,this,(0,o.getCurrentTransformInverse)(r),l.PathType.SHADING);var c=(0,o.getCurrentTransformInverse)(r);if(c){var u=r.canvas,d=u.width,h=u.height,p=_slicedToArray(i.Util.getAxialAlignedBoundingBox([0,0,d,h],c),4),v=p[0],y=p[1],_=p[2],g=p[3];this.ctx.fillRect(v,y,_-v,g-y)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox());this.restore()}}},{key:"beginInlineImage",value:function beginInlineImage(){(0,i.unreachable)("Should not call beginInlineImage")}},{key:"beginImageData",value:function beginImageData(){(0,i.unreachable)("Should not call beginImageData")}},{key:"paintFormXObjectBegin",value:function paintFormXObjectBegin(t,r){if(this.contentVisible){this.save();this.baseTransformStack.push(this.baseTransform);Array.isArray(t)&&6===t.length&&this.transform.apply(this,_toConsumableArray(t));this.baseTransform=(0,o.getCurrentTransform)(this.ctx);if(r){var a=r[2]-r[0],i=r[3]-r[1];this.ctx.rect(r[0],r[1],a,i);this.current.updateRectMinMax((0,o.getCurrentTransform)(this.ctx),r);this.clip();this.endPath()}}}},{key:"paintFormXObjectEnd",value:function paintFormXObjectEnd(){if(this.contentVisible){this.restore();this.baseTransform=this.baseTransformStack.pop()}}},{key:"beginGroup",value:function beginGroup(t){if(this.contentVisible){this.save();if(this.inSMaskMode){this.endSMaskMode();this.current.activeSMask=null}var r=this.ctx;t.isolated||(0,i.info)("TODO: Support non-isolated groups.");t.knockout&&(0,i.warn)("Knockout groups not supported.");var a=(0,o.getCurrentTransform)(r);t.matrix&&r.transform.apply(r,_toConsumableArray(t.matrix));if(!t.bbox)throw new Error("Bounding box is required.");var l=i.Util.getAxialAlignedBoundingBox(t.bbox,(0,o.getCurrentTransform)(r)),c=[0,0,r.canvas.width,r.canvas.height];l=i.Util.intersect(l,c)||[0,0,0,0];var d=Math.floor(l[0]),h=Math.floor(l[1]),p=Math.max(Math.ceil(l[2])-d,1),v=Math.max(Math.ceil(l[3])-h,1),y=1,_=1;if(p>u){y=p/u;p=u}if(v>u){_=v/u;v=u}this.current.startNewPathAndClipBox([0,0,p,v]);var g="groupAt"+this.groupLevel;t.smask&&(g+="_smask_"+this.smaskCounter++%2);var m=this.cachedCanvases.getCanvas(g,p,v),b=m.context;b.scale(1/y,1/_);b.translate(-d,-h);b.transform.apply(b,_toConsumableArray(a));if(t.smask)this.smaskStack.push({canvas:m.canvas,context:b,offsetX:d,offsetY:h,scaleX:y,scaleY:_,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null});else{r.setTransform(1,0,0,1,0,0);r.translate(d,h);r.scale(y,_);r.save()}copyCtxState(r,b);this.ctx=b;this.setGState([["BM","source-over"],["ca",1],["CA",1]]);this.groupStack.push(r);this.groupLevel++}}},{key:"endGroup",value:function endGroup(t){if(this.contentVisible){this.groupLevel--;var r=this.ctx,a=this.groupStack.pop();this.ctx=a;this.ctx.imageSmoothingEnabled=!1;if(t.smask){this.tempSMask=this.smaskStack.pop();this.restore()}else{var l;this.ctx.restore();var c=(0,o.getCurrentTransform)(this.ctx);this.restore();this.ctx.save();(l=this.ctx).setTransform.apply(l,_toConsumableArray(c));var u=i.Util.getAxialAlignedBoundingBox([0,0,r.canvas.width,r.canvas.height],c);this.ctx.drawImage(r.canvas,0,0);this.ctx.restore();this.compose(u)}}}},{key:"beginAnnotation",value:function beginAnnotation(t,r,a,l,c){_classPrivateMethodGet(this,m,_restoreInitialState2).call(this);resetCtxToDefault(this.ctx);this.ctx.save();this.save();if(this.baseTransform){var u;(u=this.ctx).setTransform.apply(u,_toConsumableArray(this.baseTransform))}if(Array.isArray(r)&&4===r.length){var d=r[2]-r[0],h=r[3]-r[1];if(c&&this.annotationCanvasMap){(a=a.slice())[4]-=r[0];a[5]-=r[1];(r=r.slice())[0]=r[1]=0;r[2]=d;r[3]=h;var v=_slicedToArray(i.Util.singularValueDecompose2dScale((0,o.getCurrentTransform)(this.ctx)),2),y=v[0],_=v[1],g=this.viewportScale,b=Math.ceil(d*this.outputScaleX*g),w=Math.ceil(h*this.outputScaleY*g);this.annotationCanvas=this.canvasFactory.create(b,w);var P=this.annotationCanvas,A=P.canvas,S=P.context;this.annotationCanvasMap.set(t,A);this.annotationCanvas.savedCtx=this.ctx;this.ctx=S;this.ctx.save();this.ctx.setTransform(y,0,0,-_,0,h*_);resetCtxToDefault(this.ctx)}else{resetCtxToDefault(this.ctx);this.ctx.rect(r[0],r[1],d,h);this.ctx.clip();this.endPath()}}this.current=new p(this.ctx.canvas.width,this.ctx.canvas.height);this.transform.apply(this,_toConsumableArray(a));this.transform.apply(this,_toConsumableArray(l))}},{key:"endAnnotation",value:function endAnnotation(){if(this.annotationCanvas){this.ctx.restore();_classPrivateMethodGet(this,b,_drawFilter2).call(this);this.ctx=this.annotationCanvas.savedCtx;delete this.annotationCanvas.savedCtx;delete this.annotationCanvas}}},{key:"paintImageMaskXObject",value:function paintImageMaskXObject(t){if(this.contentVisible){var r=t.count;(t=this.getObject(t.data,t)).count=r;var a=this.ctx,i=this.processingType3;if(i){void 0===i.compiled&&(i.compiled=function compileType3Glyph(t){var r=t.width,a=t.height;if(r>1e3||a>1e3)return null;var i,o,l,c,u=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),d=r+1,h=new Uint8Array(d*(a+1)),p=r+7&-8,v=new Uint8Array(p*a),y=0,_=_createForOfIteratorHelper(t.data);try{for(_.s();!(c=_.n()).done;)for(var g=c.value,m=128;m>0;){v[y++]=g&m?0:255;m>>=1}}catch(t){_.e(t)}finally{_.f()}var b=0;if(0!==v[y=0]){h[0]=1;++b}for(o=1;o<r;o++){if(v[y]!==v[y+1]){h[o]=v[y]?2:1;++b}y++}if(0!==v[y]){h[o]=2;++b}for(i=1;i<a;i++){l=i*d;if(v[(y=i*p)-p]!==v[y]){h[l]=v[y]?1:8;++b}var w=(v[y]?4:0)+(v[y-p]?8:0);for(o=1;o<r;o++){if(u[w=(w>>2)+(v[y+1]?4:0)+(v[y-p+1]?8:0)]){h[l+o]=u[w];++b}y++}if(v[y-p]!==v[y]){h[l+o]=v[y]?2:4;++b}if(b>1e3)return null}l=i*d;if(0!==v[y=p*(a-1)]){h[l]=8;++b}for(o=1;o<r;o++){if(v[y]!==v[y+1]){h[l+o]=v[y]?4:8;++b}y++}if(0!==v[y]){h[l+o]=4;++b}if(b>1e3)return null;var P=new Int32Array([0,d,-1,0,-d,0,0,0,1]),A=new Path2D;for(i=0;b&&i<=a;i++){for(var S=i*d,k=S+r;S<k&&!h[S];)S++;if(S!==k){A.moveTo(S%d,i);var x=S,E=h[S];do{var T=P[E];do{S+=T}while(!h[S]);var C=h[S];if(5!==C&&10!==C){E=C;h[S]=0}else{E=C&51*E>>4;h[S]&=E>>2|E<<2}A.lineTo(S%d,S/d|0);h[S]||--b}while(x!==S);--i}}v=null;h=null;return function drawOutline(t){t.save();t.scale(1/r,-1/a);t.translate(0,-a);t.fill(A);t.beginPath();t.restore()}}(t));if(i.compiled){i.compiled(a);return}}var o=this._createMaskCanvas(t),l=o.canvas;a.save();a.setTransform(1,0,0,1,0,0);a.drawImage(l,o.offsetX,o.offsetY);a.restore();this.compose()}}},{key:"paintImageMaskXObjectRepeat",value:function paintImageMaskXObjectRepeat(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,c=arguments.length>4?arguments[4]:void 0,u=arguments.length>5?arguments[5]:void 0;if(this.contentVisible){t=this.getObject(t.data,t);var d=this.ctx;d.save();var h=(0,o.getCurrentTransform)(d);d.transform(r,a,l,c,0,0);var p=this._createMaskCanvas(t);d.setTransform(1,0,0,1,p.offsetX-h[4],p.offsetY-h[5]);for(var v=0,y=u.length;v<y;v+=2){var _=i.Util.transform(h,[r,a,l,c,u[v],u[v+1]]),g=_slicedToArray(i.Util.applyTransform([0,0],_),2),m=g[0],b=g[1];d.drawImage(p.canvas,m,b)}d.restore();this.compose()}}},{key:"paintImageMaskXObjectGroup",value:function paintImageMaskXObjectGroup(t){if(this.contentVisible){var r,a=this.ctx,i=this.current.fillColor,c=this.current.patternFill,u=_createForOfIteratorHelper(t);try{for(u.s();!(r=u.n()).done;){var d=r.value,h=d.data,p=d.width,v=d.height,y=d.transform,_=this.cachedCanvases.getCanvas("maskCanvas",p,v),g=_.context;g.save();putBinaryImageMask(g,this.getObject(h,d));g.globalCompositeOperation="source-in";g.fillStyle=c?i.getPattern(g,this,(0,o.getCurrentTransformInverse)(a),l.PathType.FILL):i;g.fillRect(0,0,p,v);g.restore();a.save();a.transform.apply(a,_toConsumableArray(y));a.scale(1,-1);drawImageAtIntegerCoords(a,_.canvas,0,0,p,v,0,-1,1,1);a.restore()}}catch(t){u.e(t)}finally{u.f()}this.compose()}}},{key:"paintImageXObject",value:function paintImageXObject(t){if(this.contentVisible){var r=this.getObject(t);r?this.paintInlineImageXObject(r):(0,i.warn)("Dependent image isn't ready yet")}}},{key:"paintImageXObjectRepeat",value:function paintImageXObjectRepeat(t,r,a,o){if(this.contentVisible){var l=this.getObject(t);if(l){for(var c=l.width,u=l.height,d=[],h=0,p=o.length;h<p;h+=2)d.push({transform:[r,0,0,a,o[h],o[h+1]],x:0,y:0,w:c,h:u});this.paintInlineImageXObjectGroup(l,d)}else(0,i.warn)("Dependent image isn't ready yet")}}},{key:"applyTransferMapsToCanvas",value:function applyTransferMapsToCanvas(t){if("none"!==this.current.transferMaps){t.filter=this.current.transferMaps;t.drawImage(t.canvas,0,0);t.filter="none"}return t.canvas}},{key:"applyTransferMapsToBitmap",value:function applyTransferMapsToBitmap(t){if("none"===this.current.transferMaps)return t.bitmap;var r=t.bitmap,a=t.width,i=t.height,o=this.cachedCanvases.getCanvas("inlineImage",a,i),l=o.context;l.filter=this.current.transferMaps;l.drawImage(r,0,0);l.filter="none";return o.canvas}},{key:"paintInlineImageXObject",value:function paintInlineImageXObject(t){if(this.contentVisible){var r,a=t.width,l=t.height,c=this.ctx;this.save();if(!i.isNodeJS){var u=c.filter;"none"!==u&&""!==u&&(c.filter="none")}c.scale(1/a,-1/l);if(t.bitmap)r=this.applyTransferMapsToBitmap(t);else if("function"==typeof HTMLElement&&t instanceof HTMLElement||!t.data)r=t;else{var d=this.cachedCanvases.getCanvas("inlineImage",a,l).context;putBinaryImageData(d,t);r=this.applyTransferMapsToCanvas(d)}var h=this._scaleImage(r,(0,o.getCurrentTransformInverse)(c));c.imageSmoothingEnabled=getImageSmoothingEnabled((0,o.getCurrentTransform)(c),t.interpolate);drawImageAtIntegerCoords(c,h.img,0,0,h.paintWidth,h.paintHeight,0,-l,a,l);this.compose();this.restore()}}},{key:"paintInlineImageXObjectGroup",value:function paintInlineImageXObjectGroup(t,r){if(this.contentVisible){var a,i=this.ctx;if(t.bitmap)a=t.bitmap;else{var o=t.width,l=t.height,c=this.cachedCanvases.getCanvas("inlineImage",o,l).context;putBinaryImageData(c,t);a=this.applyTransferMapsToCanvas(c)}var u,d=_createForOfIteratorHelper(r);try{for(d.s();!(u=d.n()).done;){var h=u.value;i.save();i.transform.apply(i,_toConsumableArray(h.transform));i.scale(1,-1);drawImageAtIntegerCoords(i,a,h.x,h.y,h.w,h.h,0,-1,1,1);i.restore()}}catch(t){d.e(t)}finally{d.f()}this.compose()}}},{key:"paintSolidColorImageMask",value:function paintSolidColorImageMask(){if(this.contentVisible){this.ctx.fillRect(0,0,1,1);this.compose()}}},{key:"markPoint",value:function markPoint(t){}},{key:"markPointProps",value:function markPointProps(t,r){}},{key:"beginMarkedContent",value:function beginMarkedContent(t){this.markedContentStack.push({visible:!0})}},{key:"beginMarkedContentProps",value:function beginMarkedContentProps(t,r){"OC"===t?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(r)}):this.markedContentStack.push({visible:!0});this.contentVisible=this.isContentVisible()}},{key:"endMarkedContent",value:function endMarkedContent(){this.markedContentStack.pop();this.contentVisible=this.isContentVisible()}},{key:"beginCompat",value:function beginCompat(){}},{key:"endCompat",value:function endCompat(){}},{key:"consumePath",value:function consumePath(t){var r=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath();this.pendingClip||this.compose(t);var a=this.ctx;if(this.pendingClip){r||(this.pendingClip===g?a.clip("evenodd"):a.clip());this.pendingClip=null}this.current.startNewPathAndClipBox(this.current.clipBox);a.beginPath()}},{key:"getSinglePixelWidth",value:function getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){var t=(0,o.getCurrentTransform)(this.ctx);if(0===t[1]&&0===t[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(t[0]),Math.abs(t[3]));else{var r=Math.abs(t[0]*t[3]-t[2]*t[1]),a=Math.hypot(t[0],t[2]),i=Math.hypot(t[1],t[3]);this._cachedGetSinglePixelWidth=Math.max(a,i)/r}}return this._cachedGetSinglePixelWidth}},{key:"getScaleForStroking",value:function getScaleForStroking(){if(-1===this._cachedScaleForStroking[0]){var t,r,a=this.current.lineWidth,i=this.ctx.getTransform(),o=i.a,l=i.b,c=i.c,u=i.d;if(0===l&&0===c){var d=Math.abs(o),h=Math.abs(u);if(d===h)if(0===a)t=r=1/d;else{var p=d*a;t=r=p<1?1/p:1}else if(0===a){t=1/d;r=1/h}else{var v=d*a,y=h*a;t=v<1?1/v:1;r=y<1?1/y:1}}else{var _=Math.abs(o*u-l*c),g=Math.hypot(o,l),m=Math.hypot(c,u);if(0===a){t=m/_;r=g/_}else{var b=a*_;t=m>b?m/b:1;r=g>b?g/b:1}}this._cachedScaleForStroking[0]=t;this._cachedScaleForStroking[1]=r}return this._cachedScaleForStroking}},{key:"rescaleAndStroke",value:function rescaleAndStroke(t){var r=this.ctx,a=this.current.lineWidth,i=_slicedToArray(this.getScaleForStroking(),2),o=i[0],l=i[1];r.lineWidth=a||1;if(1!==o||1!==l){var c=r.getLineDash();t&&r.save();r.scale(o,l);if(c.length>0){var u=Math.max(o,l);r.setLineDash(c.map((function(t){return t/u})));r.lineDashOffset/=u}r.stroke();t&&r.restore()}else r.stroke()}},{key:"isContentVisible",value:function isContentVisible(){for(var t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}}]);return CanvasGraphics}();r.CanvasGraphics=w;function _restoreInitialState2(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore();if(this.transparentCanvas){this.ctx=this.compositeCtx;this.ctx.save();this.ctx.setTransform(1,0,0,1,0,0);this.ctx.drawImage(this.transparentCanvas,0,0);this.ctx.restore();this.transparentCanvas=null}}function _drawFilter2(){if(this.pageColors){var t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==t){var r=this.ctx.filter;this.ctx.filter=t;this.ctx.drawImage(this.ctx.canvas,0,0);this.ctx.filter=r}}}for(var P in i.OPS)void 0!==w.prototype[P]&&(w.prototype[i.OPS[P]]=w.prototype[P])},(t,r,a)=>{a(3)({target:"Math",stat:!0},{sign:a(179)})},(t,r,a)=>{a(172)("Int32",(function(t){return function Int32Array(r,a,i){return t(this,r,a,i)}}))},(t,r,a)=>{var i=a(3),o=a(180),l=a(141);i({target:"Array",proto:!0},{fill:o});l("fill")},(t,r,a)=>{var i=a(3),o=a(188).filter;i({target:"Array",proto:!0,forced:!a(250)("filter")},{filter:function filter(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r,a)=>{a(3)({target:"Math",stat:!0},{fround:a(381)})},(t,r,a)=>{var i=a(179),o=Math.abs,l=Math.pow,c=l(2,-52),u=l(2,-23),d=l(2,127)*(2-u),h=l(2,-126);t.exports=Math.fround||function fround(t){var r,a,l=+t,p=o(l),v=i(l);return p<h?v*function(t){return t+1/c-1/c}(p/h/u)*h*u:(a=(r=(1+u/c)*p)-(r-p))>d||a!=a?v*(1/0):v*a}},(t,r,a)=>{a(301);a(140);a(148);a(149);a(2);a(71);a(73);a(258);a(255);a(92);a(105);a(104);Object.defineProperty(r,"__esModule",{value:!0});r.TilingPattern=r.PathType=void 0;r.getShadingPattern=function getShadingPattern(t){switch(t[0]){case"RadialAxial":return new u(t);case"Mesh":return new d(t);case"Dummy":return new h}throw new Error("Unknown IR type: ".concat(t[0]))};a(85);a(90);a(292);a(300);a(146);a(123);a(112);a(378);var i=a(1),o=a(362);function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||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 _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,a)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}var l={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};r.PathType=l;function applyBoundingBox(t,r){if(r){var a=r[2]-r[0],i=r[3]-r[1],o=new Path2D;o.rect(r[0],r[1],a,i);t.clip(o)}}var c=function(){function BaseShadingPattern(){_classCallCheck(this,BaseShadingPattern);this.constructor===BaseShadingPattern&&(0,i.unreachable)("Cannot initialize BaseShadingPattern.")}_createClass(BaseShadingPattern,[{key:"getPattern",value:function getPattern(){(0,i.unreachable)("Abstract method `getPattern` called.")}}]);return BaseShadingPattern}(),u=function(t){_inherits(RadialAxialShadingPattern,t);var r=_createSuper(RadialAxialShadingPattern);function RadialAxialShadingPattern(t){var a;_classCallCheck(this,RadialAxialShadingPattern);(a=r.call(this))._type=t[1];a._bbox=t[2];a._colorStops=t[3];a._p0=t[4];a._p1=t[5];a._r0=t[6];a._r1=t[7];a.matrix=null;return a}_createClass(RadialAxialShadingPattern,[{key:"_createGradient",value:function _createGradient(t){var r;"axial"===this._type?r=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(r=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));var a,i=_createForOfIteratorHelper(this._colorStops);try{for(i.s();!(a=i.n()).done;){var o=a.value;r.addColorStop(o[0],o[1])}}catch(t){i.e(t)}finally{i.f()}return r}},{key:"getPattern",value:function getPattern(t,r,a,c){var u;if(c===l.STROKE||c===l.FILL){var d=r.current.getClippedPathBoundingBox(c,(0,o.getCurrentTransform)(t))||[0,0,0,0],h=Math.ceil(d[2]-d[0])||1,p=Math.ceil(d[3]-d[1])||1,v=r.cachedCanvases.getCanvas("pattern",h,p,!0),y=v.context;y.clearRect(0,0,y.canvas.width,y.canvas.height);y.beginPath();y.rect(0,0,y.canvas.width,y.canvas.height);y.translate(-d[0],-d[1]);a=i.Util.transform(a,[1,0,0,1,d[0],d[1]]);y.transform.apply(y,_toConsumableArray(r.baseTransform));this.matrix&&y.transform.apply(y,_toConsumableArray(this.matrix));applyBoundingBox(y,this._bbox);y.fillStyle=this._createGradient(y);y.fill();u=t.createPattern(v.canvas,"no-repeat");var _=new DOMMatrix(a);u.setTransform(_)}else{applyBoundingBox(t,this._bbox);u=this._createGradient(t)}return u}}]);return RadialAxialShadingPattern}(c);function drawTriangle(t,r,a,i,o,l,c,u){var d,h=r.coords,p=r.colors,v=t.data,y=4*t.width;if(h[a+1]>h[i+1]){d=a;a=i;i=d;d=l;l=c;c=d}if(h[i+1]>h[o+1]){d=i;i=o;o=d;d=c;c=u;u=d}if(h[a+1]>h[i+1]){d=a;a=i;i=d;d=l;l=c;c=d}var _=(h[a]+r.offsetX)*r.scaleX,g=(h[a+1]+r.offsetY)*r.scaleY,m=(h[i]+r.offsetX)*r.scaleX,b=(h[i+1]+r.offsetY)*r.scaleY,w=(h[o]+r.offsetX)*r.scaleX,P=(h[o+1]+r.offsetY)*r.scaleY;if(!(g>=P))for(var A,S,k,x,E,T,C,I,M=p[l],O=p[l+1],R=p[l+2],G=p[c],L=p[c+1],D=p[c+2],j=p[u],N=p[u+1],W=p[u+2],B=Math.round(g),U=Math.round(P),H=B;H<=U;H++){if(H<b){var z=H<g?0:(g-H)/(g-b);A=_-(_-m)*z;S=M-(M-G)*z;k=O-(O-L)*z;x=R-(R-D)*z}else{var q=void 0;A=m-(m-w)*(q=H>P?1:b===P?0:(b-H)/(b-P));S=G-(G-j)*q;k=L-(L-N)*q;x=D-(D-W)*q}var V=void 0;E=_-(_-w)*(V=H<g?0:H>P?1:(g-H)/(g-P));T=M-(M-j)*V;C=O-(O-N)*V;I=R-(R-W)*V;for(var X=Math.round(Math.min(A,E)),Y=Math.round(Math.max(A,E)),K=y*H+4*X,J=X;J<=Y;J++){(V=(A-J)/(A-E))<0?V=0:V>1&&(V=1);v[K++]=S-(S-T)*V|0;v[K++]=k-(k-C)*V|0;v[K++]=x-(x-I)*V|0;v[K++]=255}}}function drawFigure(t,r,a){var i,o,l=r.coords,c=r.colors;switch(r.type){case"lattice":var u=r.verticesPerRow,d=Math.floor(l.length/u)-1,h=u-1;for(i=0;i<d;i++)for(var p=i*u,v=0;v<h;v++,p++){drawTriangle(t,a,l[p],l[p+1],l[p+u],c[p],c[p+1],c[p+u]);drawTriangle(t,a,l[p+u+1],l[p+1],l[p+u],c[p+u+1],c[p+1],c[p+u])}break;case"triangles":for(i=0,o=l.length;i<o;i+=3)drawTriangle(t,a,l[i],l[i+1],l[i+2],c[i],c[i+1],c[i+2]);break;default:throw new Error("illegal figure")}}var d=function(t){_inherits(MeshShadingPattern,t);var r=_createSuper(MeshShadingPattern);function MeshShadingPattern(t){var a;_classCallCheck(this,MeshShadingPattern);(a=r.call(this))._coords=t[2];a._colors=t[3];a._figures=t[4];a._bounds=t[5];a._bbox=t[7];a._background=t[8];a.matrix=null;return a}_createClass(MeshShadingPattern,[{key:"_createMeshCanvas",value:function _createMeshCanvas(t,r,a){var i=Math.floor(this._bounds[0]),o=Math.floor(this._bounds[1]),l=Math.ceil(this._bounds[2])-i,c=Math.ceil(this._bounds[3])-o,u=Math.min(Math.ceil(Math.abs(l*t[0]*1.1)),3e3),d=Math.min(Math.ceil(Math.abs(c*t[1]*1.1)),3e3),h=l/u,p=c/d,v={coords:this._coords,colors:this._colors,offsetX:-i,offsetY:-o,scaleX:1/h,scaleY:1/p},y=u+4,_=d+4,g=a.getCanvas("mesh",y,_,!1),m=g.context,b=m.createImageData(u,d);if(r)for(var w=b.data,P=0,A=w.length;P<A;P+=4){w[P]=r[0];w[P+1]=r[1];w[P+2]=r[2];w[P+3]=255}var S,k=_createForOfIteratorHelper(this._figures);try{for(k.s();!(S=k.n()).done;){drawFigure(b,S.value,v)}}catch(t){k.e(t)}finally{k.f()}m.putImageData(b,2,2);return{canvas:g.canvas,offsetX:i-2*h,offsetY:o-2*p,scaleX:h,scaleY:p}}},{key:"getPattern",value:function getPattern(t,r,a,c){applyBoundingBox(t,this._bbox);var u;if(c===l.SHADING)u=i.Util.singularValueDecompose2dScale((0,o.getCurrentTransform)(t));else{u=i.Util.singularValueDecompose2dScale(r.baseTransform);if(this.matrix){var d=i.Util.singularValueDecompose2dScale(this.matrix);u=[u[0]*d[0],u[1]*d[1]]}}var h=this._createMeshCanvas(u,c===l.SHADING?null:this._background,r.cachedCanvases);if(c!==l.SHADING){t.setTransform.apply(t,_toConsumableArray(r.baseTransform));this.matrix&&t.transform.apply(t,_toConsumableArray(this.matrix))}t.translate(h.offsetX,h.offsetY);t.scale(h.scaleX,h.scaleY);return t.createPattern(h.canvas,"no-repeat")}}]);return MeshShadingPattern}(c),h=function(t){_inherits(DummyShadingPattern,t);var r=_createSuper(DummyShadingPattern);function DummyShadingPattern(){_classCallCheck(this,DummyShadingPattern);return r.apply(this,arguments)}_createClass(DummyShadingPattern,[{key:"getPattern",value:function getPattern(){return"hotpink"}}]);return DummyShadingPattern}(c);var p=1,v=2,y=function(){function TilingPattern(t,r,a,i,o){_classCallCheck(this,TilingPattern);this.operatorList=t[2];this.matrix=t[3]||[1,0,0,1,0,0];this.bbox=t[4];this.xstep=t[5];this.ystep=t[6];this.paintType=t[7];this.tilingType=t[8];this.color=r;this.ctx=a;this.canvasGraphicsFactory=i;this.baseTransform=o}_createClass(TilingPattern,[{key:"createPatternCanvas",value:function createPatternCanvas(t){var r=this.operatorList,a=this.bbox,l=this.xstep,c=this.ystep,u=this.paintType,d=this.tilingType,h=this.color,p=this.canvasGraphicsFactory;(0,i.info)("TilingType: "+d);var v=a[0],y=a[1],_=a[2],g=a[3],m=i.Util.singularValueDecompose2dScale(this.matrix),b=i.Util.singularValueDecompose2dScale(this.baseTransform),w=[m[0]*b[0],m[1]*b[1]],P=this.getSizeAndScale(l,this.ctx.canvas.width,w[0]),A=this.getSizeAndScale(c,this.ctx.canvas.height,w[1]),S=t.cachedCanvases.getCanvas("pattern",P.size,A.size,!0),k=S.context,x=p.createCanvasGraphics(k);x.groupLevel=t.groupLevel;this.setFillAndStrokeStyleToContext(x,u,h);var E=v,T=y,C=_,I=g;if(v<0){E=0;C+=Math.abs(v)}if(y<0){T=0;I+=Math.abs(y)}k.translate(-P.scale*E,-A.scale*T);x.transform(P.scale,0,0,A.scale,0,0);k.save();this.clipBbox(x,E,T,C,I);x.baseTransform=(0,o.getCurrentTransform)(x.ctx);x.executeOperatorList(r);x.endDrawing();return{canvas:S.canvas,scaleX:P.scale,scaleY:A.scale,offsetX:E,offsetY:T}}},{key:"getSizeAndScale",value:function getSizeAndScale(t,r,a){t=Math.abs(t);var i=Math.max(TilingPattern.MAX_PATTERN_SIZE,r),o=Math.ceil(t*a);o>=i?o=i:a=o/t;return{scale:a,size:o}}},{key:"clipBbox",value:function clipBbox(t,r,a,i,l){var c=i-r,u=l-a;t.ctx.rect(r,a,c,u);t.current.updateRectMinMax((0,o.getCurrentTransform)(t.ctx),[r,a,i,l]);t.clip();t.endPath()}},{key:"setFillAndStrokeStyleToContext",value:function setFillAndStrokeStyleToContext(t,r,a){var o=t.ctx,l=t.current;switch(r){case p:var c=this.ctx;o.fillStyle=c.fillStyle;o.strokeStyle=c.strokeStyle;l.fillColor=c.fillStyle;l.strokeColor=c.strokeStyle;break;case v:var u=i.Util.makeHexColor(a[0],a[1],a[2]);o.fillStyle=u;o.strokeStyle=u;l.fillColor=u;l.strokeColor=u;break;default:throw new i.FormatError("Unsupported paint type: ".concat(r))}}},{key:"getPattern",value:function getPattern(t,r,a,o){var c=a;if(o!==l.SHADING){c=i.Util.transform(c,r.baseTransform);this.matrix&&(c=i.Util.transform(c,this.matrix))}var u=this.createPatternCanvas(r),d=new DOMMatrix(c);d=(d=d.translate(u.offsetX,u.offsetY)).scale(1/u.scaleX,1/u.scaleY);var h=t.createPattern(u.canvas,"repeat");h.setTransform(d);return h}}]);return TilingPattern}();r.TilingPattern=y;!function _defineProperty(t,r,a){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}(y,"MAX_PATTERN_SIZE",3e3)},(t,r,a)=>{a(292);a(300);a(301);a(148);a(149);a(167);a(258);a(255);a(92);a(105);a(104);a(123);Object.defineProperty(r,"__esModule",{value:!0});r.convertBlackAndWhiteToRGBA=convertBlackAndWhiteToRGBA;r.convertToRGBA=function convertToRGBA(t){switch(t.kind){case i.ImageKind.GRAYSCALE_1BPP:return convertBlackAndWhiteToRGBA(t);case i.ImageKind.RGB_24BPP:return function convertRGBToRGBA(t){var r=t.src,a=t.srcPos,o=void 0===a?0:a,l=t.dest,c=t.destPos,u=void 0===c?0:c,d=(t.width,t.height,0),h=r.length>>2,p=new Uint32Array(r.buffer,o,h);if(i.FeatureTest.isLittleEndian){for(;d<h-2;d+=3,u+=4){var v=p[d],y=p[d+1],_=p[d+2];l[u]=4278190080|v;l[u+1]=v>>>24|y<<8|4278190080;l[u+2]=y>>>16|_<<16|4278190080;l[u+3]=_>>>8|4278190080}for(var g=4*d,m=r.length;g<m;g+=3)l[u++]=r[g]|r[g+1]<<8|r[g+2]<<16|4278190080}else{for(;d<h-2;d+=3,u+=4){var b=p[d],w=p[d+1],P=p[d+2];l[u]=255|b;l[u+1]=b<<24|w>>>8|255;l[u+2]=w<<16|P>>>16|255;l[u+3]=P<<8|255}for(var A=4*d,S=r.length;A<S;A+=3)l[u++]=r[A]<<24|r[A+1]<<16|r[A+2]<<8|255}return{srcPos:o,destPos:u}}(t)}return null};r.grayToRGBA=function grayToRGBA(t,r){if(i.FeatureTest.isLittleEndian)for(var a=0,o=t.length;a<o;a++)r[a]=65793*t[a]|4278190080;else for(var l=0,c=t.length;l<c;l++)r[l]=16843008*t[l]|255};a(140);a(146);a(246);a(192);a(193);a(196);a(197);a(198);a(203);a(204);a(205);a(207);a(208);a(209);a(210);a(211);a(212);a(213);a(216);a(217);a(219);a(220);a(221);a(222);a(223);a(224);a(228);a(229);a(231);a(232);a(233);a(235);a(238);a(244);var i=a(1);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t,r)||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 _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function convertBlackAndWhiteToRGBA(t){var r=t.src,a=t.srcPos,o=void 0===a?0:a,l=t.dest,c=t.width,u=t.height,d=t.nonBlackColor,h=void 0===d?4294967295:d,p=t.inverseDecode,v=void 0!==p&&p,y=i.FeatureTest.isLittleEndian?4278190080:255,_=_slicedToArray(v?[h,y]:[y,h],2),g=_[0],m=_[1],b=c>>3,w=7&c,P=r.length;l=new Uint32Array(l.buffer);for(var A=0,S=0;S<u;S++){for(var k=o+b;o<k;o++){var x=o<P?r[o]:255;l[A++]=128&x?m:g;l[A++]=64&x?m:g;l[A++]=32&x?m:g;l[A++]=16&x?m:g;l[A++]=8&x?m:g;l[A++]=4&x?m:g;l[A++]=2&x?m:g;l[A++]=1&x?m:g}if(0!==w)for(var E=o<P?r[o++]:255,T=0;T<w;T++)l[A++]=E&1<<7-T?m:g}return{srcPos:o,destPos:A}}},(t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});r.GlobalWorkerOptions=void 0;var a=Object.create(null);r.GlobalWorkerOptions=a;a.workerPort=null;a.workerSrc=""},(t,r,a)=>{a(292);a(300);a(301);a(85);a(90);a(112);a(306);a(307);a(308);a(309);a(2);a(167);a(310);a(258);Object.defineProperty(r,"__esModule",{value:!0});r.MessageHandler=void 0;a(123);a(146);a(255);a(259);a(140);a(148);a(347);a(149);a(386);var i=a(1);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,r,a){t[r]=a.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,o){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(o||[]);return i(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var h={};define(h,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&a.call(v,l)&&(h=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(h);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,o,l,c){var u=tryCatch(t[i],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==_typeof(h)&&a.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function value(t,a){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,a,r,i)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,a){var i="suspendedStart";return function(o,l){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw l;return{value:void 0,done:!0}}for(a.method=o,a.arg=l;;){var c=a.delegate;if(c){var u=maybeInvokeDelegate(c,a);if(u){if(u===d)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===i)throw i="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i="executing";var h=tryCatch(t,r,a);if("normal"===h.type){if(i=a.done?"completed":"suspendedYield",h.arg===d)continue;return{value:h.arg,done:a.done}}"throw"===h.type&&(i="completed",a.method="throw",a.arg=h.arg)}}}function maybeInvokeDelegate(t,r){var a=r.method,i=t.iterator[a];if(void 0===i)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),d;var o=tryCatch(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,d):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function next(){for(;++i<t.length;)if(a.call(t,i))return next.value=t[i],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,i(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),i(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(r,a,i,o),l);return t.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(y),define(y,u,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(a,i){return l.type="throw",l.arg=t,r.next=a,i&&(r.method="next",r.arg=void 0),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,d):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),d}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,a){return this.delegate={iterator:values(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=void 0),d}},t}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function _classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var o=1,l=2,c=1,u=2,d=3,h=4,p=5,v=6,y=7,_=8;function wrapReason(t){t instanceof Error||"object"===_typeof(t)&&null!==t||(0,i.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.');switch(t.name){case"AbortException":return new i.AbortException(t.message);case"MissingPDFException":return new i.MissingPDFException(t.message);case"PasswordException":return new i.PasswordException(t.message,t.code);case"UnexpectedResponseException":return new i.UnexpectedResponseException(t.message,t.status);case"UnknownErrorException":return new i.UnknownErrorException(t.message,t.details);default:return new i.UnknownErrorException(t.message,t.toString())}}var g=new WeakSet,m=new WeakSet,b=new WeakSet,w=function(){function MessageHandler(t,r,a){var i=this;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,MessageHandler);_classPrivateMethodInitSpec(this,b);_classPrivateMethodInitSpec(this,m);_classPrivateMethodInitSpec(this,g);this.sourceName=t;this.targetName=r;this.comObj=a;this.callbackId=1;this.streamId=1;this.streamSinks=Object.create(null);this.streamControllers=Object.create(null);this.callbackCapabilities=Object.create(null);this.actionHandler=Object.create(null);this._onComObjOnMessage=function(t){var r=t.data;if(r.targetName===i.sourceName)if(r.stream)_classPrivateMethodGet(i,m,_processStreamMessage2).call(i,r);else if(r.callback){var c=r.callbackId,u=i.callbackCapabilities[c];if(!u)throw new Error("Cannot resolve callback ".concat(c));delete i.callbackCapabilities[c];if(r.callback===o)u.resolve(r.data);else{if(r.callback!==l)throw new Error("Unexpected callback case");u.reject(wrapReason(r.reason))}}else{var d=i.actionHandler[r.action];if(!d)throw new Error("Unknown action from worker: ".concat(r.action));if(r.callbackId){var h=i.sourceName,p=r.sourceName;new Promise((function(t){t(d(r.data))})).then((function(t){a.postMessage({sourceName:h,targetName:p,callback:o,callbackId:r.callbackId,data:t})}),(function(t){a.postMessage({sourceName:h,targetName:p,callback:l,callbackId:r.callbackId,reason:wrapReason(t)})}))}else r.streamId?_classPrivateMethodGet(i,g,_createStreamSink2).call(i,r):d(r.data)}};a.addEventListener("message",this._onComObjOnMessage)}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(MessageHandler,[{key:"on",value:function on(t,r){var a=this.actionHandler;if(a[t])throw new Error('There is already an actionName called "'.concat(t,'"'));a[t]=r}},{key:"send",value:function send(t,r,a){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:r},a)}},{key:"sendWithPromise",value:function sendWithPromise(t,r,a){var o=this.callbackId++,l=new i.PromiseCapability;this.callbackCapabilities[o]=l;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:o,data:r},a)}catch(t){l.reject(t)}return l.promise}},{key:"sendWithStream",value:function sendWithStream(t,r,a,o){var l=this,u=this.streamId++,d=this.sourceName,h=this.targetName,p=this.comObj;return new ReadableStream({start:function start(a){var c=new i.PromiseCapability;l.streamControllers[u]={controller:a,startCall:c,pullCall:null,cancelCall:null,isClosed:!1};p.postMessage({sourceName:d,targetName:h,action:t,streamId:u,data:r,desiredSize:a.desiredSize},o);return c.promise},pull:function pull(t){var r=new i.PromiseCapability;l.streamControllers[u].pullCall=r;p.postMessage({sourceName:d,targetName:h,stream:v,streamId:u,desiredSize:t.desiredSize});return r.promise},cancel:function cancel(t){(0,i.assert)(t instanceof Error,"cancel must have a valid reason");var r=new i.PromiseCapability;l.streamControllers[u].cancelCall=r;l.streamControllers[u].isClosed=!0;p.postMessage({sourceName:d,targetName:h,stream:c,streamId:u,reason:wrapReason(t)});return r.promise}},a)}},{key:"destroy",value:function destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}]);return MessageHandler}();r.MessageHandler=w;function _createStreamSink2(t){var r=t.streamId,a=this.sourceName,o=t.sourceName,l=this.comObj,c=this,u=this.actionHandler[t.action],v={enqueue:function enqueue(t){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,u=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var d=this.desiredSize;this.desiredSize-=c;if(d>0&&this.desiredSize<=0){this.sinkCapability=new i.PromiseCapability;this.ready=this.sinkCapability.promise}l.postMessage({sourceName:a,targetName:o,stream:h,streamId:r,chunk:t},u)}},close:function close(){if(!this.isCancelled){this.isCancelled=!0;l.postMessage({sourceName:a,targetName:o,stream:d,streamId:r});delete c.streamSinks[r]}},error:function error(t){(0,i.assert)(t instanceof Error,"error must have a valid reason");if(!this.isCancelled){this.isCancelled=!0;l.postMessage({sourceName:a,targetName:o,stream:p,streamId:r,reason:wrapReason(t)})}},sinkCapability:new i.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};v.sinkCapability.resolve();v.ready=v.sinkCapability.promise;this.streamSinks[r]=v;new Promise((function(r){r(u(t.data,v))})).then((function(){l.postMessage({sourceName:a,targetName:o,stream:_,streamId:r,success:!0})}),(function(t){l.postMessage({sourceName:a,targetName:o,stream:_,streamId:r,reason:wrapReason(t)})}))}function _processStreamMessage2(t){var r=t.streamId,a=this.sourceName,o=t.sourceName,l=this.comObj,g=this.streamControllers[r],m=this.streamSinks[r];switch(t.stream){case _:t.success?g.startCall.resolve():g.startCall.reject(wrapReason(t.reason));break;case y:t.success?g.pullCall.resolve():g.pullCall.reject(wrapReason(t.reason));break;case v:if(!m){l.postMessage({sourceName:a,targetName:o,stream:y,streamId:r,success:!0});break}m.desiredSize<=0&&t.desiredSize>0&&m.sinkCapability.resolve();m.desiredSize=t.desiredSize;new Promise((function(t){var r;t(null===(r=m.onPull)||void 0===r?void 0:r.call(m))})).then((function(){l.postMessage({sourceName:a,targetName:o,stream:y,streamId:r,success:!0})}),(function(t){l.postMessage({sourceName:a,targetName:o,stream:y,streamId:r,reason:wrapReason(t)})}));break;case h:(0,i.assert)(g,"enqueue should have stream controller");if(g.isClosed)break;g.controller.enqueue(t.chunk);break;case d:(0,i.assert)(g,"close should have stream controller");if(g.isClosed)break;g.isClosed=!0;g.controller.close();_classPrivateMethodGet(this,b,_deleteStreamController2).call(this,g,r);break;case p:(0,i.assert)(g,"error should have stream controller");g.controller.error(wrapReason(t.reason));_classPrivateMethodGet(this,b,_deleteStreamController2).call(this,g,r);break;case u:t.success?g.cancelCall.resolve():g.cancelCall.reject(wrapReason(t.reason));_classPrivateMethodGet(this,b,_deleteStreamController2).call(this,g,r);break;case c:if(!m)break;new Promise((function(r){var a;r(null===(a=m.onCancel)||void 0===a?void 0:a.call(m,wrapReason(t.reason)))})).then((function(){l.postMessage({sourceName:a,targetName:o,stream:u,streamId:r,success:!0})}),(function(t){l.postMessage({sourceName:a,targetName:o,stream:u,streamId:r,reason:wrapReason(t)})}));m.sinkCapability.reject(wrapReason(t.reason));m.isCancelled=!0;delete this.streamSinks[r];break;default:throw new Error("Unexpected stream case")}}function _deleteStreamController2(t,r){return _deleteStreamController3.apply(this,arguments)}function _deleteStreamController3(){_deleteStreamController3=function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t,r){var a,i,o;return _regeneratorRuntime().wrap((function _callee$(l){for(;;)switch(l.prev=l.next){case 0:l.next=2;return Promise.allSettled([null===(a=t.startCall)||void 0===a?void 0:a.promise,null===(i=t.pullCall)||void 0===i?void 0:i.promise,null===(o=t.cancelCall)||void 0===o?void 0:o.promise]);case 2:delete this.streamControllers[r];case 3:case"end":return l.stop()}}),_callee,this)})));return _deleteStreamController3.apply(this,arguments)}},(t,r,a)=>{var i=a(3),o=a(8),l=a(31),c=a(271),u=a(268),d=a(273);i({target:"Promise",stat:!0,forced:a(274)},{allSettled:function allSettled(t){var r=this,a=c.f(r),i=a.resolve,h=a.reject,p=u((function(){var a=l(r.resolve),c=[],u=0,h=1;d(t,(function(t){var l=u++,d=!1;h++;o(a,r,t).then((function(t){if(!d){d=!0;c[l]={status:"fulfilled",value:t};--h||i(c)}}),(function(t){if(!d){d=!0;c[l]={status:"rejected",reason:t};--h||i(c)}}))}));--h||i(c)}));p.error&&h(p.value);return a.promise}})},(t,r,a)=>{a(85);a(90);a(292);a(300);a(112);a(301);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.Metadata=void 0;a(123);a(140);a(146);a(148);a(302);a(149);var i=a(1);function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}function _classPrivateFieldInitSpec(t,r,a){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,a)}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,a){!function _classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,_classExtractFieldDescriptor(t,r,"set"),a);return a}function _classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}var o=new WeakMap,l=new WeakMap,c=function(){function Metadata(t){var r=t.parsedData,a=t.rawData;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,Metadata);_classPrivateFieldInitSpec(this,o,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,l,{writable:!0,value:void 0});_classPrivateFieldSet(this,o,r);_classPrivateFieldSet(this,l,a)}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(Metadata,[{key:"getRaw",value:function getRaw(){return _classPrivateFieldGet(this,l)}},{key:"get",value:function get(t){var r;return null!==(r=_classPrivateFieldGet(this,o).get(t))&&void 0!==r?r:null}},{key:"getAll",value:function getAll(){return(0,i.objectFromMap)(_classPrivateFieldGet(this,o))}},{key:"has",value:function has(t){return _classPrivateFieldGet(this,o).has(t)}}]);return Metadata}();r.Metadata=c},(t,r,a)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}a(123);a(85);a(90);a(112);a(255);a(92);a(105);a(104);a(301);a(167);Object.defineProperty(r,"__esModule",{value:!0});r.OptionalContentConfig=void 0;a(292);a(300);a(146);a(140);a(280);a(148);a(149);a(258);a(257);a(302);a(347);var i=a(1),o=a(372);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||_unsupportedIterableToArray(t,r)||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 _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||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 _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classPrivateFieldInitSpec(t,r,a){_checkPrivateRedeclaration(t,r);r.set(t,a)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,a){!function _classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,_classExtractFieldDescriptor(t,r,"set"),a);return a}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}var l=Symbol("INTERNAL"),c=new WeakMap,u=function(){function OptionalContentGroup(t,r){_classCallCheck(this,OptionalContentGroup);_classPrivateFieldInitSpec(this,c,{writable:!0,value:!0});this.name=t;this.intent=r}_createClass(OptionalContentGroup,[{key:"visible",get:function get(){return _classPrivateFieldGet(this,c)}},{key:"_setVisible",value:function _setVisible(t,r){t!==l&&(0,i.unreachable)("Internal method `_setVisible` called.");_classPrivateFieldSet(this,c,r)}}]);return OptionalContentGroup}(),d=new WeakMap,h=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakSet,_=function(){function OptionalContentConfig(t){_classCallCheck(this,OptionalContentConfig);!function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}(this,y);_classPrivateFieldInitSpec(this,d,{writable:!0,value:null});_classPrivateFieldInitSpec(this,h,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,p,{writable:!0,value:null});_classPrivateFieldInitSpec(this,v,{writable:!0,value:null});this.name=null;this.creator=null;if(null!==t){this.name=t.name;this.creator=t.creator;_classPrivateFieldSet(this,v,t.order);var r,a=_createForOfIteratorHelper(t.groups);try{for(a.s();!(r=a.n()).done;){var i=r.value;_classPrivateFieldGet(this,h).set(i.id,new u(i.name,i.intent))}}catch(t){a.e(t)}finally{a.f()}if("OFF"===t.baseState){var o,c=_createForOfIteratorHelper(_classPrivateFieldGet(this,h).values());try{for(c.s();!(o=c.n()).done;){o.value._setVisible(l,!1)}}catch(t){c.e(t)}finally{c.f()}}var _,g=_createForOfIteratorHelper(t.on);try{for(g.s();!(_=g.n()).done;){var m=_.value;_classPrivateFieldGet(this,h).get(m)._setVisible(l,!0)}}catch(t){g.e(t)}finally{g.f()}var b,w=_createForOfIteratorHelper(t.off);try{for(w.s();!(b=w.n()).done;){var P=b.value;_classPrivateFieldGet(this,h).get(P)._setVisible(l,!1)}}catch(t){w.e(t)}finally{w.f()}_classPrivateFieldSet(this,p,this.getHash())}}_createClass(OptionalContentConfig,[{key:"isVisible",value:function isVisible(t){if(0===_classPrivateFieldGet(this,h).size)return!0;if(!t){(0,i.warn)("Optional content group not defined.");return!0}if("OCG"===t.type){if(!_classPrivateFieldGet(this,h).has(t.id)){(0,i.warn)("Optional content group not found: ".concat(t.id));return!0}return _classPrivateFieldGet(this,h).get(t.id).visible}if("OCMD"===t.type){if(t.expression)return _classPrivateMethodGet(this,y,_evaluateVisibilityExpression2).call(this,t.expression);if(!t.policy||"AnyOn"===t.policy){var r,a=_createForOfIteratorHelper(t.ids);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(!_classPrivateFieldGet(this,h).has(o)){(0,i.warn)("Optional content group not found: ".concat(o));return!0}if(_classPrivateFieldGet(this,h).get(o).visible)return!0}}catch(t){a.e(t)}finally{a.f()}return!1}if("AllOn"===t.policy){var l,c=_createForOfIteratorHelper(t.ids);try{for(c.s();!(l=c.n()).done;){var u=l.value;if(!_classPrivateFieldGet(this,h).has(u)){(0,i.warn)("Optional content group not found: ".concat(u));return!0}if(!_classPrivateFieldGet(this,h).get(u).visible)return!1}}catch(t){c.e(t)}finally{c.f()}return!0}if("AnyOff"===t.policy){var d,p=_createForOfIteratorHelper(t.ids);try{for(p.s();!(d=p.n()).done;){var v=d.value;if(!_classPrivateFieldGet(this,h).has(v)){(0,i.warn)("Optional content group not found: ".concat(v));return!0}if(!_classPrivateFieldGet(this,h).get(v).visible)return!0}}catch(t){p.e(t)}finally{p.f()}return!1}if("AllOff"===t.policy){var _,g=_createForOfIteratorHelper(t.ids);try{for(g.s();!(_=g.n()).done;){var m=_.value;if(!_classPrivateFieldGet(this,h).has(m)){(0,i.warn)("Optional content group not found: ".concat(m));return!0}if(_classPrivateFieldGet(this,h).get(m).visible)return!1}}catch(t){g.e(t)}finally{g.f()}return!0}(0,i.warn)("Unknown optional content policy ".concat(t.policy,"."));return!0}(0,i.warn)("Unknown group type ".concat(t.type,"."));return!0}},{key:"setVisibility",value:function setVisibility(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(_classPrivateFieldGet(this,h).has(t)){_classPrivateFieldGet(this,h).get(t)._setVisible(l,!!r);_classPrivateFieldSet(this,d,null)}else(0,i.warn)("Optional content group not found: ".concat(t))}},{key:"hasInitialVisibility",get:function get(){return null===_classPrivateFieldGet(this,p)||this.getHash()===_classPrivateFieldGet(this,p)}},{key:"getOrder",value:function getOrder(){return _classPrivateFieldGet(this,h).size?_classPrivateFieldGet(this,v)?_classPrivateFieldGet(this,v).slice():_toConsumableArray(_classPrivateFieldGet(this,h).keys()):null}},{key:"getGroups",value:function getGroups(){return _classPrivateFieldGet(this,h).size>0?(0,i.objectFromMap)(_classPrivateFieldGet(this,h)):null}},{key:"getGroup",value:function getGroup(t){return _classPrivateFieldGet(this,h).get(t)||null}},{key:"getHash",value:function getHash(){if(null!==_classPrivateFieldGet(this,d))return _classPrivateFieldGet(this,d);var t,r=new o.MurmurHash3_64,a=_createForOfIteratorHelper(_classPrivateFieldGet(this,h));try{for(a.s();!(t=a.n()).done;){var i=_slicedToArray(t.value,2),l=i[0],c=i[1];r.update("".concat(l,":").concat(c.visible))}}catch(t){a.e(t)}finally{a.f()}return _classPrivateFieldSet(this,d,r.hexdigest())}}]);return OptionalContentConfig}();r.OptionalContentConfig=_;function _evaluateVisibilityExpression2(t){var r=t.length;if(r<2)return!0;for(var a=t[0],o=1;o<r;o++){var l=t[o],c=void 0;if(Array.isArray(l))c=_classPrivateMethodGet(this,y,_evaluateVisibilityExpression2).call(this,l);else{if(!_classPrivateFieldGet(this,h).has(l)){(0,i.warn)("Optional content group not found: ".concat(l));return!0}c=_classPrivateFieldGet(this,h).get(l).visible}switch(a){case"And":if(!c)return!1;break;case"Or":if(c)return!0;break;case"Not":return!c;default:return!0}}return"And"===a}},(t,r,a)=>{a(255);a(92);a(148);a(105);a(104);a(301);a(149);a(306);a(307);a(308);a(309);a(2);a(310);Object.defineProperty(r,"__esModule",{value:!0});r.PDFDataTransportStream=void 0;a(140);a(146);a(171);a(192);a(193);a(196);a(197);a(198);a(203);a(204);a(205);a(207);a(208);a(209);a(210);a(211);a(212);a(213);a(216);a(217);a(219);a(220);a(221);a(222);a(223);a(224);a(228);a(229);a(231);a(232);a(233);a(235);a(238);a(244);a(167);a(390);a(357);a(258);a(85);a(90);a(292);a(300);a(123);a(112);a(259);var i=a(1),o=a(362);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,r,a){t[r]=a.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,o){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(o||[]);return i(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var h={};define(h,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&a.call(v,l)&&(h=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(h);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,o,l,c){var u=tryCatch(t[i],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==_typeof(h)&&a.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function value(t,a){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,a,r,i)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,a){var i="suspendedStart";return function(o,l){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw l;return{value:void 0,done:!0}}for(a.method=o,a.arg=l;;){var c=a.delegate;if(c){var u=maybeInvokeDelegate(c,a);if(u){if(u===d)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===i)throw i="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i="executing";var h=tryCatch(t,r,a);if("normal"===h.type){if(i=a.done?"completed":"suspendedYield",h.arg===d)continue;return{value:h.arg,done:a.done}}"throw"===h.type&&(i="completed",a.method="throw",a.arg=h.arg)}}}function maybeInvokeDelegate(t,r){var a=r.method,i=t.iterator[a];if(void 0===i)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),d;var o=tryCatch(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,d):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function next(){for(;++i<t.length;)if(a.call(t,i))return next.value=t[i],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,i(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),i(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(r,a,i,o),l);return t.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(y),define(y,u,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(a,i){return l.type="throw",l.arg=t,r.next=a,i&&(r.method="next",r.arg=void 0),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,d):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),d}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,a){return this.delegate={iterator:values(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=void 0),d}},t}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}var l=function(){function PDFDataTransportStream(t,r){var a=this,o=t.length,l=t.initialData,c=t.progressiveDone,u=void 0!==c&&c,d=t.contentDispositionFilename,h=void 0===d?null:d,p=t.disableRange,v=void 0!==p&&p,y=t.disableStream,_=void 0!==y&&y;_classCallCheck(this,PDFDataTransportStream);(0,i.assert)(r,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');this._queuedChunks=[];this._progressiveDone=u;this._contentDispositionFilename=h;if((null==l?void 0:l.length)>0){var g=l instanceof Uint8Array&&l.byteLength===l.buffer.byteLength?l.buffer:new Uint8Array(l).buffer;this._queuedChunks.push(g)}this._pdfDataRangeTransport=r;this._isStreamingSupported=!_;this._isRangeSupported=!v;this._contentLength=o;this._fullRequestReader=null;this._rangeReaders=[];this._pdfDataRangeTransport.addRangeListener((function(t,r){a._onReceiveData({begin:t,chunk:r})}));this._pdfDataRangeTransport.addProgressListener((function(t,r){a._onProgress({loaded:t,total:r})}));this._pdfDataRangeTransport.addProgressiveReadListener((function(t){a._onReceiveData({chunk:t})}));this._pdfDataRangeTransport.addProgressiveDoneListener((function(){a._onProgressiveDone()}));this._pdfDataRangeTransport.transportReady()}_createClass(PDFDataTransportStream,[{key:"_onReceiveData",value:function _onReceiveData(t){var r=t.begin,a=t.chunk,o=a instanceof Uint8Array&&a.byteLength===a.buffer.byteLength?a.buffer:new Uint8Array(a).buffer;if(void 0===r)this._fullRequestReader?this._fullRequestReader._enqueue(o):this._queuedChunks.push(o);else{var l=this._rangeReaders.some((function(t){if(t._begin!==r)return!1;t._enqueue(o);return!0}));(0,i.assert)(l,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}},{key:"_progressiveDataLength",get:function get(){var t,r;return null!==(t=null===(r=this._fullRequestReader)||void 0===r?void 0:r._loaded)&&void 0!==t?t:0}},{key:"_onProgress",value:function _onProgress(t){if(void 0===t.total){var r,a;null===(r=this._rangeReaders[0])||void 0===r||null===(a=r.onProgress)||void 0===a||a.call(r,{loaded:t.loaded})}else{var i,o;null===(i=this._fullRequestReader)||void 0===i||null===(o=i.onProgress)||void 0===o||o.call(i,{loaded:t.loaded,total:t.total})}}},{key:"_onProgressiveDone",value:function _onProgressiveDone(){var t;null===(t=this._fullRequestReader)||void 0===t||t.progressiveDone();this._progressiveDone=!0}},{key:"_removeRangeReader",value:function _removeRangeReader(t){var r=this._rangeReaders.indexOf(t);r>=0&&this._rangeReaders.splice(r,1)}},{key:"getFullReader",value:function getFullReader(){(0,i.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var t=this._queuedChunks;this._queuedChunks=null;return new c(this,t,this._progressiveDone,this._contentDispositionFilename)}},{key:"getRangeReader",value:function getRangeReader(t,r){if(r<=this._progressiveDataLength)return null;var a=new u(this,t,r);this._pdfDataRangeTransport.requestDataRange(t,r);this._rangeReaders.push(a);return a}},{key:"cancelAllRequests",value:function cancelAllRequests(t){var r;null===(r=this._fullRequestReader)||void 0===r||r.cancel(t);var a,i=_createForOfIteratorHelper(this._rangeReaders.slice(0));try{for(i.s();!(a=i.n()).done;){a.value.cancel(t)}}catch(t){i.e(t)}finally{i.f()}this._pdfDataRangeTransport.abort()}}]);return PDFDataTransportStream}();r.PDFDataTransportStream=l;var c=function(){function PDFDataTransportStreamReader(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,PDFDataTransportStreamReader);this._stream=t;this._done=a||!1;this._filename=(0,o.isPdfFile)(i)?i:null;this._queuedChunks=r||[];this._loaded=0;var l,c=_createForOfIteratorHelper(this._queuedChunks);try{for(c.s();!(l=c.n()).done;){var u=l.value;this._loaded+=u.byteLength}}catch(t){c.e(t)}finally{c.f()}this._requests=[];this._headersReady=Promise.resolve();t._fullRequestReader=this;this.onProgress=null}_createClass(PDFDataTransportStreamReader,[{key:"_enqueue",value:function _enqueue(t){if(!this._done){if(this._requests.length>0){this._requests.shift().resolve({value:t,done:!1})}else this._queuedChunks.push(t);this._loaded+=t.byteLength}}},{key:"headersReady",get:function get(){return this._headersReady}},{key:"filename",get:function get(){return this._filename}},{key:"isRangeSupported",get:function get(){return this._stream._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._stream._isStreamingSupported}},{key:"contentLength",get:function get(){return this._stream._contentLength}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r;return _regeneratorRuntime().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:if(!(this._queuedChunks.length>0)){a.next=3;break}t=this._queuedChunks.shift();return a.abrupt("return",{value:t,done:!1});case 3:if(!this._done){a.next=5;break}return a.abrupt("return",{value:void 0,done:!0});case 5:r=new i.PromiseCapability;this._requests.push(r);return a.abrupt("return",r.promise);case 8:case"end":return a.stop()}}),_callee,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._done=!0;var r,a=_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0}},{key:"progressiveDone",value:function progressiveDone(){this._done||(this._done=!0)}}]);var t;return PDFDataTransportStreamReader}(),u=function(){function PDFDataTransportStreamRangeReader(t,r,a){_classCallCheck(this,PDFDataTransportStreamRangeReader);this._stream=t;this._begin=r;this._end=a;this._queuedChunk=null;this._requests=[];this._done=!1;this.onProgress=null}_createClass(PDFDataTransportStreamRangeReader,[{key:"_enqueue",value:function _enqueue(t){if(!this._done){if(0===this._requests.length)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});var r,a=_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0}this._done=!0;this._stream._removeRangeReader(this)}}},{key:"isStreamingSupported",get:function get(){return!1}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t,r;return _regeneratorRuntime().wrap((function _callee2$(a){for(;;)switch(a.prev=a.next){case 0:if(!this._queuedChunk){a.next=4;break}t=this._queuedChunk;this._queuedChunk=null;return a.abrupt("return",{value:t,done:!1});case 4:if(!this._done){a.next=6;break}return a.abrupt("return",{value:void 0,done:!0});case 6:r=new i.PromiseCapability;this._requests.push(r);return a.abrupt("return",r.promise);case 9:case"end":return a.stop()}}),_callee2,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._done=!0;var r,a=_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0;this._stream._removeRangeReader(this)}}]);var t;return PDFDataTransportStreamRangeReader}()},(t,r,a)=>{var i=a(3),o=a(95),l=a(60).indexOf,c=a(215),u=o([].indexOf),d=!!u&&1/u([1],1,-0)<0;i({target:"Array",proto:!0,forced:d||!c("indexOf")},{indexOf:function indexOf(t){var r=arguments.length>1?arguments[1]:void 0;return d?u(this,t,r)||0:l(this,t,r)}})},(t,r,a)=>{a(85);a(90);a(292);a(300);a(123);a(112);a(255);a(92);a(148);a(301);a(149);a(306);a(307);a(308);a(309);a(2);a(310);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFFetchStream=void 0;a(140);a(146);a(171);a(192);a(193);a(196);a(197);a(198);a(203);a(204);a(205);a(207);a(208);a(209);a(210);a(211);a(212);a(213);a(216);a(217);a(219);a(220);a(221);a(222);a(223);a(224);a(228);a(229);a(231);a(232);a(233);a(235);a(238);a(244);a(105);a(104);a(167);a(258);a(259);a(257);var i=a(1),o=a(392);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,r,a){t[r]=a.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,o){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(o||[]);return i(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var h={};define(h,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&a.call(v,l)&&(h=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(h);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,o,l,c){var u=tryCatch(t[i],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==_typeof(h)&&a.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function value(t,a){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,a,r,i)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,a){var i="suspendedStart";return function(o,l){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw l;return{value:void 0,done:!0}}for(a.method=o,a.arg=l;;){var c=a.delegate;if(c){var u=maybeInvokeDelegate(c,a);if(u){if(u===d)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===i)throw i="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i="executing";var h=tryCatch(t,r,a);if("normal"===h.type){if(i=a.done?"completed":"suspendedYield",h.arg===d)continue;return{value:h.arg,done:a.done}}"throw"===h.type&&(i="completed",a.method="throw",a.arg=h.arg)}}}function maybeInvokeDelegate(t,r){var a=r.method,i=t.iterator[a];if(void 0===i)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),d;var o=tryCatch(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,d):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function next(){for(;++i<t.length;)if(a.call(t,i))return next.value=t[i],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,i(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),i(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(r,a,i,o),l);return t.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(y),define(y,u,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(a,i){return l.type="throw",l.arg=t,r.next=a,i&&(r.method="next",r.arg=void 0),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,d):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),d}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,a){return this.delegate={iterator:values(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=void 0),d}},t}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function createFetchOptions(t,r,a){return{method:"GET",headers:t,signal:a.signal,mode:"cors",credentials:r?"include":"same-origin",redirect:"follow"}}function createHeaders(t){var r=new Headers;for(var a in t){var i=t[a];void 0!==i&&r.append(a,i)}return r}function getArrayBuffer(t){if(t instanceof Uint8Array)return t.buffer;if(t instanceof ArrayBuffer)return t;(0,i.warn)("getArrayBuffer - unexpected data format: ".concat(t));return new Uint8Array(t).buffer}var l=function(){function PDFFetchStream(t){_classCallCheck(this,PDFFetchStream);this.source=t;this.isHttp=/^https?:/i.test(t.url);this.httpHeaders=this.isHttp&&t.httpHeaders||{};this._fullRequestReader=null;this._rangeRequestReaders=[]}_createClass(PDFFetchStream,[{key:"_progressiveDataLength",get:function get(){var t,r;return null!==(t=null===(r=this._fullRequestReader)||void 0===r?void 0:r._loaded)&&void 0!==t?t:0}},{key:"getFullReader",value:function getFullReader(){(0,i.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once.");this._fullRequestReader=new c(this);return this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(t,r){if(r<=this._progressiveDataLength)return null;var a=new u(this,t,r);this._rangeRequestReaders.push(a);return a}},{key:"cancelAllRequests",value:function cancelAllRequests(t){var r;null===(r=this._fullRequestReader)||void 0===r||r.cancel(t);var a,i=_createForOfIteratorHelper(this._rangeRequestReaders.slice(0));try{for(i.s();!(a=i.n()).done;){a.value.cancel(t)}}catch(t){i.e(t)}finally{i.f()}}}]);return PDFFetchStream}();r.PDFFetchStream=l;var c=function(){function PDFFetchStreamReader(t){var r=this;_classCallCheck(this,PDFFetchStreamReader);this._stream=t;this._reader=null;this._loaded=0;this._filename=null;var a=t.source;this._withCredentials=a.withCredentials||!1;this._contentLength=a.length;this._headersCapability=new i.PromiseCapability;this._disableRange=a.disableRange||!1;this._rangeChunkSize=a.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);this._abortController=new AbortController;this._isStreamingSupported=!a.disableStream;this._isRangeSupported=!a.disableRange;this._headers=createHeaders(this._stream.httpHeaders);var l=a.url;fetch(l,createFetchOptions(this._headers,this._withCredentials,this._abortController)).then((function(t){if(!(0,o.validateResponseStatus)(t.status))throw(0,o.createResponseStatusError)(t.status,l);r._reader=t.body.getReader();r._headersCapability.resolve();var a=function getResponseHeader(r){return t.headers.get(r)},c=(0,o.validateRangeRequestCapabilities)({getResponseHeader:a,isHttp:r._stream.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),u=c.allowRangeRequests,d=c.suggestedLength;r._isRangeSupported=u;r._contentLength=d||r._contentLength;r._filename=(0,o.extractFilenameFromHeader)(a);!r._isStreamingSupported&&r._isRangeSupported&&r.cancel(new i.AbortException("Streaming is disabled."))})).catch(this._headersCapability.reject);this.onProgress=null}_createClass(PDFFetchStreamReader,[{key:"headersReady",get:function get(){return this._headersCapability.promise}},{key:"filename",get:function get(){return this._filename}},{key:"contentLength",get:function get(){return this._contentLength}},{key:"isRangeSupported",get:function get(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r,a,i;return _regeneratorRuntime().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:o.next=2;return this._headersCapability.promise;case 2:o.next=4;return this._reader.read();case 4:r=o.sent;a=r.value;if(!(i=r.done)){o.next=9;break}return o.abrupt("return",{value:a,done:i});case 9:this._loaded+=a.byteLength;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded,total:this._contentLength});return o.abrupt("return",{value:getArrayBuffer(a),done:!1});case 12:case"end":return o.stop()}}),_callee,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){var r;null===(r=this._reader)||void 0===r||r.cancel(t);this._abortController.abort()}}]);var t;return PDFFetchStreamReader}(),u=function(){function PDFFetchStreamRangeReader(t,r,a){var l=this;_classCallCheck(this,PDFFetchStreamRangeReader);this._stream=t;this._reader=null;this._loaded=0;var c=t.source;this._withCredentials=c.withCredentials||!1;this._readCapability=new i.PromiseCapability;this._isStreamingSupported=!c.disableStream;this._abortController=new AbortController;this._headers=createHeaders(this._stream.httpHeaders);this._headers.append("Range","bytes=".concat(r,"-").concat(a-1));var u=c.url;fetch(u,createFetchOptions(this._headers,this._withCredentials,this._abortController)).then((function(t){if(!(0,o.validateResponseStatus)(t.status))throw(0,o.createResponseStatusError)(t.status,u);l._readCapability.resolve();l._reader=t.body.getReader()})).catch(this._readCapability.reject);this.onProgress=null}_createClass(PDFFetchStreamRangeReader,[{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t,r,a,i;return _regeneratorRuntime().wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:o.next=2;return this._readCapability.promise;case 2:o.next=4;return this._reader.read();case 4:r=o.sent;a=r.value;if(!(i=r.done)){o.next=9;break}return o.abrupt("return",{value:a,done:i});case 9:this._loaded+=a.byteLength;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded});return o.abrupt("return",{value:getArrayBuffer(a),done:!1});case 12:case"end":return o.stop()}}),_callee2,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){var r;null===(r=this._reader)||void 0===r||r.cancel(t);this._abortController.abort()}}]);var t;return PDFFetchStreamRangeReader}()},(t,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0});r.createResponseStatusError=function createResponseStatusError(t,r){if(404===t||0===t&&r.startsWith("file:"))return new i.MissingPDFException('Missing PDF "'+r+'".');return new i.UnexpectedResponseException("Unexpected server response (".concat(t,') while retrieving PDF "').concat(r,'".'),t)};r.extractFilenameFromHeader=function extractFilenameFromHeader(t){var r=t("Content-Disposition");if(r){var a=(0,o.getFilenameFromContentDispositionHeader)(r);if(a.includes("%"))try{a=decodeURIComponent(a)}catch(t){}if((0,l.isPdfFile)(a))return a}return null};r.validateRangeRequestCapabilities=function validateRangeRequestCapabilities(t){var r=t.getResponseHeader,a=t.isHttp,i=t.rangeChunkSize,o=t.disableRange,l={allowRangeRequests:!1,suggestedLength:void 0},c=parseInt(r("Content-Length"),10);if(!Number.isInteger(c))return l;l.suggestedLength=c;if(c<=2*i)return l;if(o||!a)return l;if("bytes"!==r("Accept-Ranges"))return l;if("identity"!==(r("Content-Encoding")||"identity"))return l;l.allowRangeRequests=!0;return l};r.validateResponseStatus=function validateResponseStatus(t){return 200===t||206===t};a(112);a(247);a(248);a(131);a(257);var i=a(1),o=a(393),l=a(362)},(t,r,a)=>{a(292);a(300);a(146);a(301);a(140);a(148);a(149);a(92);a(123);Object.defineProperty(r,"__esModule",{value:!0});r.getFilenameFromContentDispositionHeader=function getFilenameFromContentDispositionHeader(t){var r=!0,a=toParamRegExp("filename\\*","i").exec(t);if(a){var o=rfc2616unquote(a=a[1]);return fixupEncoding(o=rfc2047decode(o=rfc5987decode(o=unescape(o))))}if(a=function rfc2231getparam(t){var r,a=[],i=toParamRegExp("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(r=i.exec(t));){var o=_slicedToArray(r,4),l=o[1],c=o[2],u=o[3];if((l=parseInt(l,10))in a){if(0===l)break}else a[l]=[c,u]}for(var d=[],h=0;h<a.length&&h in a;++h){var p=_slicedToArray(a[h],2),v=p[0],y=p[1];y=rfc2616unquote(y);if(v){y=unescape(y);0===h&&(y=rfc5987decode(y))}d.push(y)}return d.join("")}(t)){return fixupEncoding(rfc2047decode(a))}if(a=toParamRegExp("filename","i").exec(t)){var l=rfc2616unquote(a=a[1]);return fixupEncoding(l=rfc2047decode(l))}function toParamRegExp(t,r){return new RegExp("(?:^|;)\\s*"+t+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',r)}function textdecode(t,a){if(t){if(!/^[\x00-\xFF]+$/.test(a))return a;try{var o=new TextDecoder(t,{fatal:!0}),l=(0,i.stringToBytes)(a);a=o.decode(l);r=!1}catch(t){}}return a}function fixupEncoding(t){if(r&&/[\x80-\xff]/.test(t)){t=textdecode("utf-8",t);r&&(t=textdecode("iso-8859-1",t))}return t}function rfc2616unquote(t){if(t.startsWith('"')){for(var r=t.slice(1).split('\\"'),a=0;a<r.length;++a){var i=r[a].indexOf('"');if(-1!==i){r[a]=r[a].slice(0,i);r.length=a+1}r[a]=r[a].replaceAll(/\\(.)/g,"$1")}t=r.join('"')}return t}function rfc5987decode(t){var r=t.indexOf("'");return-1===r?t:textdecode(t.slice(0,r),t.slice(r+1).replace(/^[^']*'/,""))}function rfc2047decode(t){return!t.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(t)?t:t.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(t,r,a,i){if("q"===a||"Q"===a)return textdecode(r,i=(i=i.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,(function(t,r){return String.fromCharCode(parseInt(r,16))})));try{i=atob(i)}catch(t){}return textdecode(r,i)}))}return""};a(105);a(368);a(369);a(370);a(255);a(104);a(167);a(131);a(258);a(390);a(289);a(291);a(338);a(342);a(343);var i=a(1);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t,r)||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 _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}},(t,r,a)=>{a(301);a(140);a(148);a(149);a(255);a(92);a(259);a(306);a(307);a(308);a(309);a(2);a(310);Object.defineProperty(r,"__esModule",{value:!0});r.PDFNetworkStream=void 0;a(105);a(104);a(257);a(85);a(90);a(292);a(300);a(146);a(123);a(112);a(390);a(357);a(167);a(258);var i=a(1),o=a(392);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,r,a){t[r]=a.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,o){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(o||[]);return i(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var h={};define(h,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&a.call(v,l)&&(h=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(h);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,o,l,c){var u=tryCatch(t[i],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==_typeof(h)&&a.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function value(t,a){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,a,r,i)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,a){var i="suspendedStart";return function(o,l){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw l;return{value:void 0,done:!0}}for(a.method=o,a.arg=l;;){var c=a.delegate;if(c){var u=maybeInvokeDelegate(c,a);if(u){if(u===d)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===i)throw i="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i="executing";var h=tryCatch(t,r,a);if("normal"===h.type){if(i=a.done?"completed":"suspendedYield",h.arg===d)continue;return{value:h.arg,done:a.done}}"throw"===h.type&&(i="completed",a.method="throw",a.arg=h.arg)}}}function maybeInvokeDelegate(t,r){var a=r.method,i=t.iterator[a];if(void 0===i)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),d;var o=tryCatch(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,d):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function next(){for(;++i<t.length;)if(a.call(t,i))return next.value=t[i],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,i(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),i(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(r,a,i,o),l);return t.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(y),define(y,u,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(a,i){return l.type="throw",l.arg=t,r.next=a,i&&(r.method="next",r.arg=void 0),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,d):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),d}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,a){return this.delegate={iterator:values(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=void 0),d}},t}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}var l=function(){function NetworkManager(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,NetworkManager);this.url=t;this.isHttp=/^https?:/i.test(t);this.httpHeaders=this.isHttp&&r.httpHeaders||Object.create(null);this.withCredentials=r.withCredentials||!1;this.currXhrId=0;this.pendingRequests=Object.create(null)}_createClass(NetworkManager,[{key:"requestRange",value:function requestRange(t,r,a){var i={begin:t,end:r};for(var o in a)i[o]=a[o];return this.request(i)}},{key:"requestFull",value:function requestFull(t){return this.request(t)}},{key:"request",value:function request(t){var r=new XMLHttpRequest,a=this.currXhrId++,i=this.pendingRequests[a]={xhr:r};r.open("GET",this.url);r.withCredentials=this.withCredentials;for(var o in this.httpHeaders){var l=this.httpHeaders[o];void 0!==l&&r.setRequestHeader(o,l)}if(this.isHttp&&"begin"in t&&"end"in t){r.setRequestHeader("Range","bytes=".concat(t.begin,"-").concat(t.end-1));i.expectedStatus=206}else i.expectedStatus=200;r.responseType="arraybuffer";t.onError&&(r.onerror=function(a){t.onError(r.status)});r.onreadystatechange=this.onStateChange.bind(this,a);r.onprogress=this.onProgress.bind(this,a);i.onHeadersReceived=t.onHeadersReceived;i.onDone=t.onDone;i.onError=t.onError;i.onProgress=t.onProgress;r.send(null);return a}},{key:"onProgress",value:function onProgress(t,r){var a,i=this.pendingRequests[t];i&&(null===(a=i.onProgress)||void 0===a||a.call(i,r))}},{key:"onStateChange",value:function onStateChange(t,r){var a=this.pendingRequests[t];if(a){var o=a.xhr;if(o.readyState>=2&&a.onHeadersReceived){a.onHeadersReceived();delete a.onHeadersReceived}if(4===o.readyState&&t in this.pendingRequests){delete this.pendingRequests[t];if(0===o.status&&this.isHttp){var l;null===(l=a.onError)||void 0===l||l.call(a,o.status)}else{var c=o.status||200;if(200===c&&206===a.expectedStatus||c===a.expectedStatus){var u=function getArrayBuffer(t){var r=t.response;return"string"!=typeof r?r:(0,i.stringToBytes)(r).buffer}(o);if(206===c){var d=o.getResponseHeader("Content-Range"),h=/bytes (\d+)-(\d+)\/(\d+)/.exec(d);a.onDone({begin:parseInt(h[1],10),chunk:u})}else if(u)a.onDone({begin:0,chunk:u});else{var p;null===(p=a.onError)||void 0===p||p.call(a,o.status)}}else{var v;null===(v=a.onError)||void 0===v||v.call(a,o.status)}}}}}},{key:"getRequestXhr",value:function getRequestXhr(t){return this.pendingRequests[t].xhr}},{key:"isPendingRequest",value:function isPendingRequest(t){return t in this.pendingRequests}},{key:"abortRequest",value:function abortRequest(t){var r=this.pendingRequests[t].xhr;delete this.pendingRequests[t];r.abort()}}]);return NetworkManager}(),c=function(){function PDFNetworkStream(t){_classCallCheck(this,PDFNetworkStream);this._source=t;this._manager=new l(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials});this._rangeChunkSize=t.rangeChunkSize;this._fullRequestReader=null;this._rangeRequestReaders=[]}_createClass(PDFNetworkStream,[{key:"_onRangeRequestReaderClosed",value:function _onRangeRequestReaderClosed(t){var r=this._rangeRequestReaders.indexOf(t);r>=0&&this._rangeRequestReaders.splice(r,1)}},{key:"getFullReader",value:function getFullReader(){(0,i.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once.");this._fullRequestReader=new u(this._manager,this._source);return this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(t,r){var a=new d(this._manager,t,r);a.onClosed=this._onRangeRequestReaderClosed.bind(this);this._rangeRequestReaders.push(a);return a}},{key:"cancelAllRequests",value:function cancelAllRequests(t){var r;null===(r=this._fullRequestReader)||void 0===r||r.cancel(t);var a,i=_createForOfIteratorHelper(this._rangeRequestReaders.slice(0));try{for(i.s();!(a=i.n()).done;){a.value.cancel(t)}}catch(t){i.e(t)}finally{i.f()}}}]);return PDFNetworkStream}();r.PDFNetworkStream=c;var u=function(){function PDFNetworkStreamFullRequestReader(t,r){_classCallCheck(this,PDFNetworkStreamFullRequestReader);this._manager=t;var a={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=r.url;this._fullRequestId=t.requestFull(a);this._headersReceivedCapability=new i.PromiseCapability;this._disableRange=r.disableRange||!1;this._contentLength=r.length;this._rangeChunkSize=r.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);this._isStreamingSupported=!1;this._isRangeSupported=!1;this._cachedChunks=[];this._requests=[];this._done=!1;this._storedError=void 0;this._filename=null;this.onProgress=null}_createClass(PDFNetworkStreamFullRequestReader,[{key:"_onHeadersReceived",value:function _onHeadersReceived(){var t=this._fullRequestId,r=this._manager.getRequestXhr(t),a=function getResponseHeader(t){return r.getResponseHeader(t)},i=(0,o.validateRangeRequestCapabilities)({getResponseHeader:a,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),l=i.allowRangeRequests,c=i.suggestedLength;l&&(this._isRangeSupported=!0);this._contentLength=c||this._contentLength;this._filename=(0,o.extractFilenameFromHeader)(a);this._isRangeSupported&&this._manager.abortRequest(t);this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function _onDone(t){if(t)if(this._requests.length>0){this._requests.shift().resolve({value:t.chunk,done:!1})}else this._cachedChunks.push(t.chunk);this._done=!0;if(!(this._cachedChunks.length>0)){var r,a=_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0}}},{key:"_onError",value:function _onError(t){this._storedError=(0,o.createResponseStatusError)(t,this._url);this._headersReceivedCapability.reject(this._storedError);var r,a=_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.reject(this._storedError)}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0;this._cachedChunks.length=0}},{key:"_onProgress",value:function _onProgress(t){var r;null===(r=this.onProgress)||void 0===r||r.call(this,{loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}},{key:"filename",get:function get(){return this._filename}},{key:"isRangeSupported",get:function get(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"contentLength",get:function get(){return this._contentLength}},{key:"headersReady",get:function get(){return this._headersReceivedCapability.promise}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r;return _regeneratorRuntime().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:if(!this._storedError){a.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){a.next=5;break}t=this._cachedChunks.shift();return a.abrupt("return",{value:t,done:!1});case 5:if(!this._done){a.next=7;break}return a.abrupt("return",{value:void 0,done:!0});case 7:r=new i.PromiseCapability;this._requests.push(r);return a.abrupt("return",r.promise);case 10:case"end":return a.stop()}}),_callee,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._done=!0;this._headersReceivedCapability.reject(t);var r,a=_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0;this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId);this._fullRequestReader=null}}]);var t;return PDFNetworkStreamFullRequestReader}(),d=function(){function PDFNetworkStreamRangeRequestReader(t,r,a){_classCallCheck(this,PDFNetworkStreamRangeRequestReader);this._manager=t;var i={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url;this._requestId=t.requestRange(r,a,i);this._requests=[];this._queuedChunk=null;this._done=!1;this._storedError=void 0;this.onProgress=null;this.onClosed=null}_createClass(PDFNetworkStreamRangeRequestReader,[{key:"_close",value:function _close(){var t;null===(t=this.onClosed)||void 0===t||t.call(this,this)}},{key:"_onDone",value:function _onDone(t){var r=t.chunk;if(this._requests.length>0){this._requests.shift().resolve({value:r,done:!1})}else this._queuedChunk=r;this._done=!0;var a,i=_createForOfIteratorHelper(this._requests);try{for(i.s();!(a=i.n()).done;){a.value.resolve({value:void 0,done:!0})}}catch(t){i.e(t)}finally{i.f()}this._requests.length=0;this._close()}},{key:"_onError",value:function _onError(t){this._storedError=(0,o.createResponseStatusError)(t,this._url);var r,a=_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.reject(this._storedError)}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0;this._queuedChunk=null}},{key:"_onProgress",value:function _onProgress(t){if(!this.isStreamingSupported){var r;null===(r=this.onProgress)||void 0===r||r.call(this,{loaded:t.loaded})}}},{key:"isStreamingSupported",get:function get(){return!1}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t,r;return _regeneratorRuntime().wrap((function _callee2$(a){for(;;)switch(a.prev=a.next){case 0:if(!this._storedError){a.next=2;break}throw this._storedError;case 2:if(null===this._queuedChunk){a.next=6;break}t=this._queuedChunk;this._queuedChunk=null;return a.abrupt("return",{value:t,done:!1});case 6:if(!this._done){a.next=8;break}return a.abrupt("return",{value:void 0,done:!0});case 8:r=new i.PromiseCapability;this._requests.push(r);return a.abrupt("return",r.promise);case 11:case"end":return a.stop()}}),_callee2,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._done=!0;var r,a=_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0;this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId);this._close()}}]);var t;return PDFNetworkStreamRangeRequestReader}()},(t,r,a)=>{a(85);a(90);a(292);a(300);a(123);a(112);a(255);a(92);a(148);a(301);a(149);a(259);a(306);a(307);a(308);a(309);a(2);a(310);a(71);a(73);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFNodeStream=void 0;a(105);a(104);a(167);a(258);a(140);a(146);a(171);a(192);a(193);a(196);a(197);a(198);a(203);a(204);a(205);a(207);a(208);a(209);a(210);a(211);a(212);a(213);a(216);a(217);a(219);a(220);a(221);a(222);a(223);a(224);a(228);a(229);a(231);a(232);a(233);a(235);a(238);a(244);a(257);a(289);var i=a(1),o=a(392);function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,a)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,r,a){t[r]=a.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,o){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(o||[]);return i(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var h={};define(h,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&a.call(v,l)&&(h=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(h);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,o,l,c){var u=tryCatch(t[i],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==_typeof(h)&&a.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function value(t,a){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,a,r,i)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,a){var i="suspendedStart";return function(o,l){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw l;return{value:void 0,done:!0}}for(a.method=o,a.arg=l;;){var c=a.delegate;if(c){var u=maybeInvokeDelegate(c,a);if(u){if(u===d)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===i)throw i="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i="executing";var h=tryCatch(t,r,a);if("normal"===h.type){if(i=a.done?"completed":"suspendedYield",h.arg===d)continue;return{value:h.arg,done:a.done}}"throw"===h.type&&(i="completed",a.method="throw",a.arg=h.arg)}}}function maybeInvokeDelegate(t,r){var a=r.method,i=t.iterator[a];if(void 0===i)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),d;var o=tryCatch(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,d):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function next(){for(;++i<t.length;)if(a.call(t,i))return next.value=t[i],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,i(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),i(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(r,a,i,o),l);return t.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(y),define(y,u,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(a,i){return l.type="throw",l.arg=t,r.next=a,i&&(r.method="next",r.arg=void 0),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,d):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),d}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,a){return this.delegate={iterator:values(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=void 0),d}},t}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}var l=/^file:\/\/\/[a-zA-Z]:\//;var c=function(){function PDFNodeStream(t){_classCallCheck(this,PDFNodeStream);this.source=t;this.url=function parseUrl(t){var r=require("url"),a=r.parse(t);if("file:"===a.protocol||a.host)return a;if(/^[a-z]:[/\\]/i.test(t))return r.parse("file:///".concat(t));a.host||(a.protocol="file:");return a}(t.url);this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol||"capacitor:"===this.url.protocol;this.isFsUrl="file:"===this.url.protocol;this.httpHeaders=this.isHttp&&t.httpHeaders||{};this._fullRequestReader=null;this._rangeRequestReaders=[]}_createClass(PDFNodeStream,[{key:"_progressiveDataLength",get:function get(){var t,r;return null!==(t=null===(r=this._fullRequestReader)||void 0===r?void 0:r._loaded)&&void 0!==t?t:0}},{key:"getFullReader",value:function getFullReader(){(0,i.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once.");this._fullRequestReader=this.isFsUrl?new v(this):new h(this);return this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(t,r){if(r<=this._progressiveDataLength)return null;var a=this.isFsUrl?new y(this,t,r):new p(this,t,r);this._rangeRequestReaders.push(a);return a}},{key:"cancelAllRequests",value:function cancelAllRequests(t){var r;null===(r=this._fullRequestReader)||void 0===r||r.cancel(t);var a,i=_createForOfIteratorHelper(this._rangeRequestReaders.slice(0));try{for(i.s();!(a=i.n()).done;){a.value.cancel(t)}}catch(t){i.e(t)}finally{i.f()}}}]);return PDFNodeStream}();r.PDFNodeStream=c;var u=function(){function BaseFullReader(t){_classCallCheck(this,BaseFullReader);this._url=t.url;this._done=!1;this._storedError=null;this.onProgress=null;var r=t.source;this._contentLength=r.length;this._loaded=0;this._filename=null;this._disableRange=r.disableRange||!1;this._rangeChunkSize=r.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);this._isStreamingSupported=!r.disableStream;this._isRangeSupported=!r.disableRange;this._readableStream=null;this._readCapability=new i.PromiseCapability;this._headersCapability=new i.PromiseCapability}_createClass(BaseFullReader,[{key:"headersReady",get:function get(){return this._headersCapability.promise}},{key:"filename",get:function get(){return this._filename}},{key:"contentLength",get:function get(){return this._contentLength}},{key:"isRangeSupported",get:function get(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r,a;return _regeneratorRuntime().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:o.next=2;return this._readCapability.promise;case 2:if(!this._done){o.next=4;break}return o.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){o.next=6;break}throw this._storedError;case 6:if(null!==(r=this._readableStream.read())){o.next=10;break}this._readCapability=new i.PromiseCapability;return o.abrupt("return",this.read());case 10:this._loaded+=r.length;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded,total:this._contentLength});a=new Uint8Array(r).buffer;return o.abrupt("return",{value:a,done:!1});case 14:case"end":return o.stop()}}),_callee,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}},{key:"_error",value:function _error(t){this._storedError=t;this._readCapability.resolve()}},{key:"_setReadableStream",value:function _setReadableStream(t){var r=this;this._readableStream=t;t.on("readable",(function(){r._readCapability.resolve()}));t.on("end",(function(){t.destroy();r._done=!0;r._readCapability.resolve()}));t.on("error",(function(t){r._error(t)}));!this._isStreamingSupported&&this._isRangeSupported&&this._error(new i.AbortException("streaming is disabled"));this._storedError&&this._readableStream.destroy(this._storedError)}}]);var t;return BaseFullReader}(),d=function(){function BaseRangeReader(t){_classCallCheck(this,BaseRangeReader);this._url=t.url;this._done=!1;this._storedError=null;this.onProgress=null;this._loaded=0;this._readableStream=null;this._readCapability=new i.PromiseCapability;var r=t.source;this._isStreamingSupported=!r.disableStream}_createClass(BaseRangeReader,[{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t,r,a;return _regeneratorRuntime().wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:o.next=2;return this._readCapability.promise;case 2:if(!this._done){o.next=4;break}return o.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){o.next=6;break}throw this._storedError;case 6:if(null!==(r=this._readableStream.read())){o.next=10;break}this._readCapability=new i.PromiseCapability;return o.abrupt("return",this.read());case 10:this._loaded+=r.length;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded});a=new Uint8Array(r).buffer;return o.abrupt("return",{value:a,done:!1});case 14:case"end":return o.stop()}}),_callee2,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}},{key:"_error",value:function _error(t){this._storedError=t;this._readCapability.resolve()}},{key:"_setReadableStream",value:function _setReadableStream(t){var r=this;this._readableStream=t;t.on("readable",(function(){r._readCapability.resolve()}));t.on("end",(function(){t.destroy();r._done=!0;r._readCapability.resolve()}));t.on("error",(function(t){r._error(t)}));this._storedError&&this._readableStream.destroy(this._storedError)}}]);var t;return BaseRangeReader}();function createRequestOptions(t,r){return{protocol:t.protocol,auth:t.auth,host:t.hostname,port:t.port,path:t.path,method:"GET",headers:r}}var h=function(t){_inherits(PDFNodeStreamFullReader,t);var r=_createSuper(PDFNodeStreamFullReader);function PDFNodeStreamFullReader(t){var a;_classCallCheck(this,PDFNodeStreamFullReader);var l=function handleResponse(r){if(404!==r.statusCode){a._headersCapability.resolve();a._setReadableStream(r);var l=function getResponseHeader(t){return a._readableStream.headers[t.toLowerCase()]},c=(0,o.validateRangeRequestCapabilities)({getResponseHeader:l,isHttp:t.isHttp,rangeChunkSize:a._rangeChunkSize,disableRange:a._disableRange}),u=c.allowRangeRequests,d=c.suggestedLength;a._isRangeSupported=u;a._contentLength=d||a._contentLength;a._filename=(0,o.extractFilenameFromHeader)(l)}else{var h=new i.MissingPDFException('Missing PDF "'.concat(a._url,'".'));a._storedError=h;a._headersCapability.reject(h)}};(a=r.call(this,t))._request=null;if("http:"===a._url.protocol){var c=require("http");a._request=c.request(createRequestOptions(a._url,t.httpHeaders),l)}else{var u=require("https");a._request=u.request(createRequestOptions(a._url,t.httpHeaders),l)}a._request.on("error",(function(t){a._storedError=t;a._headersCapability.reject(t)}));a._request.end();return a}return _createClass(PDFNodeStreamFullReader)}(u),p=function(t){_inherits(PDFNodeStreamRangeReader,t);var r=_createSuper(PDFNodeStreamRangeReader);function PDFNodeStreamRangeReader(t,a,o){var l;_classCallCheck(this,PDFNodeStreamRangeReader);(l=r.call(this,t))._httpHeaders={};for(var c in t.httpHeaders){var u=t.httpHeaders[c];void 0!==u&&(l._httpHeaders[c]=u)}l._httpHeaders.Range="bytes=".concat(a,"-").concat(o-1);var d=function handleResponse(t){if(404!==t.statusCode)l._setReadableStream(t);else{var r=new i.MissingPDFException('Missing PDF "'.concat(l._url,'".'));l._storedError=r}};l._request=null;if("http:"===l._url.protocol){var h=require("http");l._request=h.request(createRequestOptions(l._url,l._httpHeaders),d)}else{var p=require("https");l._request=p.request(createRequestOptions(l._url,l._httpHeaders),d)}l._request.on("error",(function(t){l._storedError=t}));l._request.end();return l}return _createClass(PDFNodeStreamRangeReader)}(d),v=function(t){_inherits(PDFNodeStreamFsFullReader,t);var r=_createSuper(PDFNodeStreamFsFullReader);function PDFNodeStreamFsFullReader(t){var a;_classCallCheck(this,PDFNodeStreamFsFullReader);a=r.call(this,t);var o=decodeURIComponent(a._url.path);l.test(a._url.href)&&(o=o.replace(/^\//,""));var c=require("fs");c.lstat(o,(function(t,r){if(t){"ENOENT"===t.code&&(t=new i.MissingPDFException('Missing PDF "'.concat(o,'".')));a._storedError=t;a._headersCapability.reject(t)}else{a._contentLength=r.size;a._setReadableStream(c.createReadStream(o));a._headersCapability.resolve()}}));return a}return _createClass(PDFNodeStreamFsFullReader)}(u),y=function(t){_inherits(PDFNodeStreamFsRangeReader,t);var r=_createSuper(PDFNodeStreamFsRangeReader);function PDFNodeStreamFsRangeReader(t,a,i){var o;_classCallCheck(this,PDFNodeStreamFsRangeReader);o=r.call(this,t);var c=decodeURIComponent(o._url.path);l.test(o._url.href)&&(c=c.replace(/^\//,""));var u=require("fs");o._setReadableStream(u.createReadStream(c,{start:a,end:i-1}));return o}return _createClass(PDFNodeStreamFsRangeReader)}(d)},(t,r,a)=>{a(85);a(90);a(292);a(300);a(92);a(105);a(104);a(301);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.SVGGraphics=void 0;a(140);a(146);a(148);a(149);a(152);a(163);a(164);a(165);a(166);a(171);a(192);a(193);a(196);a(197);a(198);a(203);a(204);a(205);a(207);a(208);a(209);a(210);a(211);a(212);a(213);a(216);a(217);a(219);a(220);a(221);a(222);a(223);a(224);a(228);a(229);a(231);a(232);a(233);a(235);a(238);a(244);a(377);a(123);a(167);a(358);a(359);a(112);a(255);a(257);a(131);a(259);a(378);a(397);a(355);a(249);a(258);var i=a(362),o=a(1);function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||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 _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||_unsupportedIterableToArray(t,r)||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 _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}var l="normal",c="normal",u="#000000",d=["butt","round","square"],h=["miter","round","bevel"],p=function createObjectURL(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&"undefined"!=typeof Blob&&!a)return URL.createObjectURL(new Blob([t],{type:r}));for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="data:".concat(r,";base64,"),l=0,c=t.length;l<c;l+=3){var u=255&t[l],d=255&t[l+1],h=255&t[l+2];o+=i[u>>2]+i[(3&u)<<4|d>>4]+i[l+1<c?(15&d)<<2|h>>6:64]+i[l+2<c?63&h:64]}return o},v=function(){for(var t=new Uint8Array([137,80,78,71,13,10,26,10]),r=new Int32Array(256),a=0;a<256;a++){for(var i=a,l=0;l<8;l++)i=1&i?3988292384^i>>1&2147483647:i>>1&2147483647;r[a]=i}function writePngChunk(t,a,i,o){var l=o,c=a.length;i[l]=c>>24&255;i[l+1]=c>>16&255;i[l+2]=c>>8&255;i[l+3]=255&c;i[l+=4]=255&t.charCodeAt(0);i[l+1]=255&t.charCodeAt(1);i[l+2]=255&t.charCodeAt(2);i[l+3]=255&t.charCodeAt(3);l+=4;i.set(a,l);var u=function crc32(t,a,i){for(var o=-1,l=a;l<i;l++){var c=255&(o^t[l]);o=o>>>8^r[c]}return-1^o}(i,o+4,l+=a.length);i[l]=u>>24&255;i[l+1]=u>>16&255;i[l+2]=u>>8&255;i[l+3]=255&u}function deflateSyncUncompressed(t){var r=t.length,a=65535,i=Math.ceil(r/a),o=new Uint8Array(2+r+5*i+4),l=0;o[l++]=120;o[l++]=156;for(var c=0;r>a;){o[l++]=0;o[l++]=255;o[l++]=255;o[l++]=0;o[l++]=0;o.set(t.subarray(c,c+a),l);l+=a;c+=a;r-=a}o[l++]=1;o[l++]=255&r;o[l++]=r>>8&255;o[l++]=255&~r;o[l++]=(65535&~r)>>8&255;o.set(t.subarray(c),l);l+=t.length-c;var u=function adler32(t,r,a){for(var i=1,o=0,l=r;l<a;++l)o=(o+(i=(i+(255&t[l]))%65521))%65521;return o<<16|i}(t,0,t.length);o[l++]=u>>24&255;o[l++]=u>>16&255;o[l++]=u>>8&255;o[l++]=255&u;return o}function encode(r,a,i,l){var c,u,d,h=r.width,v=r.height,y=r.data;switch(a){case o.ImageKind.GRAYSCALE_1BPP:u=0;c=1;d=h+7>>3;break;case o.ImageKind.RGB_24BPP:u=2;c=8;d=3*h;break;case o.ImageKind.RGBA_32BPP:u=6;c=8;d=4*h;break;default:throw new Error("invalid format")}for(var _=new Uint8Array((1+d)*v),g=0,m=0,b=0;b<v;++b){_[g++]=0;_.set(y.subarray(m,m+d),g);m+=d;g+=d}if(a===o.ImageKind.GRAYSCALE_1BPP&&l){g=0;for(var w=0;w<v;w++){g++;for(var P=0;P<d;P++)_[g++]^=255}}var A=new Uint8Array([h>>24&255,h>>16&255,h>>8&255,255&h,v>>24&255,v>>16&255,v>>8&255,255&v,c,u,0,0,0]),S=function deflateSync(t){if(!o.isNodeJS)return deflateSyncUncompressed(t);try{var r=parseInt(process.versions.node)>=8?t:Buffer.from(t),a=require("zlib").deflateSync(r,{level:9});return a instanceof Uint8Array?a:new Uint8Array(a)}catch(t){(0,o.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+t)}return deflateSyncUncompressed(t)}(_),k=t.length+36+A.length+S.length,x=new Uint8Array(k),E=0;x.set(t,E);writePngChunk("IHDR",A,x,E+=t.length);writePngChunk("IDATA",S,x,E+=12+A.length);E+=12+S.length;writePngChunk("IEND",new Uint8Array(0),x,E);return p(x,"image/png",i)}return function convertImgDataToPng(t,r,a){return encode(t,void 0===t.kind?o.ImageKind.GRAYSCALE_1BPP:t.kind,r,a)}}(),y=function(){function SVGExtraState(){_classCallCheck(this,SVGExtraState);this.fontSizeScale=1;this.fontWeight=c;this.fontSize=0;this.textMatrix=o.IDENTITY_MATRIX;this.fontMatrix=o.FONT_IDENTITY_MATRIX;this.leading=0;this.textRenderingMode=o.TextRenderingMode.FILL;this.textMatrixScale=1;this.x=0;this.y=0;this.lineX=0;this.lineY=0;this.charSpacing=0;this.wordSpacing=0;this.textHScale=1;this.textRise=0;this.fillColor=u;this.strokeColor="#000000";this.fillAlpha=1;this.strokeAlpha=1;this.lineWidth=1;this.lineJoin="";this.lineCap="";this.miterLimit=0;this.dashArray=[];this.dashPhase=0;this.dependencies=[];this.activeClipUrl=null;this.clipGroup=null;this.maskId=""}_createClass(SVGExtraState,[{key:"clone",value:function clone(){return Object.create(this)}},{key:"setCurrentPoint",value:function setCurrentPoint(t,r){this.x=t;this.y=r}}]);return SVGExtraState}();function pf(t){if(Number.isInteger(t))return t.toString();var r=t.toFixed(10),a=r.length-1;if("0"!==r[a])return r;do{a--}while("0"===r[a]);return r.substring(0,"."===r[a]?a:a+1)}function pm(t){if(0===t[4]&&0===t[5]){if(0===t[1]&&0===t[2])return 1===t[0]&&1===t[3]?"":"scale(".concat(pf(t[0])," ").concat(pf(t[3]),")");if(t[0]===t[3]&&t[1]===-t[2]){var r=180*Math.acos(t[0])/Math.PI;return"rotate(".concat(pf(r),")")}}else if(1===t[0]&&0===t[1]&&0===t[2]&&1===t[3])return"translate(".concat(pf(t[4])," ").concat(pf(t[5]),")");return"matrix(".concat(pf(t[0])," ").concat(pf(t[1])," ").concat(pf(t[2])," ").concat(pf(t[3])," ").concat(pf(t[4])," ")+"".concat(pf(t[5]),")")}var _=0,g=0,m=0,b=function(){function SVGGraphics(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,SVGGraphics);(0,i.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future.");this.svgFactory=new i.DOMSVGFactory;this.current=new y;this.transformMatrix=o.IDENTITY_MATRIX;this.transformStack=[];this.extraStack=[];this.commonObjs=t;this.objs=r;this.pendingClip=null;this.pendingEOFill=!1;this.embedFonts=!1;this.embeddedFonts=Object.create(null);this.cssStyle=null;this.forceDataSchema=!!a;this._operatorIdMapping=[];for(var l in o.OPS)this._operatorIdMapping[o.OPS[l]]=l}_createClass(SVGGraphics,[{key:"getObject",value:function getObject(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"string"==typeof t?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):r}},{key:"save",value:function save(){this.transformStack.push(this.transformMatrix);var t=this.current;this.extraStack.push(t);this.current=t.clone()}},{key:"restore",value:function restore(){this.transformMatrix=this.transformStack.pop();this.current=this.extraStack.pop();this.pendingClip=null;this.tgrp=null}},{key:"group",value:function group(t){this.save();this.executeOpTree(t);this.restore()}},{key:"loadDependencies",value:function loadDependencies(t){for(var r=this,a=t.fnArray,i=t.argsArray,l=0,c=a.length;l<c;l++)if(a[l]===o.OPS.dependency){var u,d=_createForOfIteratorHelper(i[l]);try{var h=function _loop(){var t=u.value,a=t.startsWith("g_")?r.commonObjs:r.objs,i=new Promise((function(r){a.get(t,r)}));r.current.dependencies.push(i)};for(d.s();!(u=d.n()).done;)h()}catch(t){d.e(t)}finally{d.f()}}return Promise.all(this.current.dependencies)}},{key:"transform",value:function transform(t,r,a,i,l,c){var u=[t,r,a,i,l,c];this.transformMatrix=o.Util.transform(this.transformMatrix,u);this.tgrp=null}},{key:"getSVG",value:function getSVG(t,r){var a=this;this.viewport=r;var i=this._initialize(r);return this.loadDependencies(t).then((function(){a.transformMatrix=o.IDENTITY_MATRIX;a.executeOpTree(a.convertOpList(t));return i}))}},{key:"convertOpList",value:function convertOpList(t){for(var r=this._operatorIdMapping,a=t.argsArray,i=t.fnArray,o=[],l=0,c=i.length;l<c;l++){var u=i[l];o.push({fnId:u,fn:r[u],args:a[l]})}return function opListToTree(t){var r,a=[],i=[],o=_createForOfIteratorHelper(t);try{for(o.s();!(r=o.n()).done;){var l=r.value;if("save"!==l.fn)"restore"===l.fn?a=i.pop():a.push(l);else{a.push({fnId:92,fn:"group",items:[]});i.push(a);a=a.at(-1).items}}}catch(t){o.e(t)}finally{o.f()}return a}(o)}},{key:"executeOpTree",value:function executeOpTree(t){var r,a=_createForOfIteratorHelper(t);try{for(a.s();!(r=a.n()).done;){var i=r.value,l=i.fn,c=i.fnId,u=i.args;switch(0|c){case o.OPS.beginText:this.beginText();break;case o.OPS.dependency:break;case o.OPS.setLeading:this.setLeading(u);break;case o.OPS.setLeadingMoveText:this.setLeadingMoveText(u[0],u[1]);break;case o.OPS.setFont:this.setFont(u);break;case o.OPS.showText:case o.OPS.showSpacedText:this.showText(u[0]);break;case o.OPS.endText:this.endText();break;case o.OPS.moveText:this.moveText(u[0],u[1]);break;case o.OPS.setCharSpacing:this.setCharSpacing(u[0]);break;case o.OPS.setWordSpacing:this.setWordSpacing(u[0]);break;case o.OPS.setHScale:this.setHScale(u[0]);break;case o.OPS.setTextMatrix:this.setTextMatrix(u[0],u[1],u[2],u[3],u[4],u[5]);break;case o.OPS.setTextRise:this.setTextRise(u[0]);break;case o.OPS.setTextRenderingMode:this.setTextRenderingMode(u[0]);break;case o.OPS.setLineWidth:this.setLineWidth(u[0]);break;case o.OPS.setLineJoin:this.setLineJoin(u[0]);break;case o.OPS.setLineCap:this.setLineCap(u[0]);break;case o.OPS.setMiterLimit:this.setMiterLimit(u[0]);break;case o.OPS.setFillRGBColor:this.setFillRGBColor(u[0],u[1],u[2]);break;case o.OPS.setStrokeRGBColor:this.setStrokeRGBColor(u[0],u[1],u[2]);break;case o.OPS.setStrokeColorN:this.setStrokeColorN(u);break;case o.OPS.setFillColorN:this.setFillColorN(u);break;case o.OPS.shadingFill:this.shadingFill(u[0]);break;case o.OPS.setDash:this.setDash(u[0],u[1]);break;case o.OPS.setRenderingIntent:this.setRenderingIntent(u[0]);break;case o.OPS.setFlatness:this.setFlatness(u[0]);break;case o.OPS.setGState:this.setGState(u[0]);break;case o.OPS.fill:this.fill();break;case o.OPS.eoFill:this.eoFill();break;case o.OPS.stroke:this.stroke();break;case o.OPS.fillStroke:this.fillStroke();break;case o.OPS.eoFillStroke:this.eoFillStroke();break;case o.OPS.clip:this.clip("nonzero");break;case o.OPS.eoClip:this.clip("evenodd");break;case o.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case o.OPS.paintImageXObject:this.paintImageXObject(u[0]);break;case o.OPS.paintInlineImageXObject:this.paintInlineImageXObject(u[0]);break;case o.OPS.paintImageMaskXObject:this.paintImageMaskXObject(u[0]);break;case o.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(u[0],u[1]);break;case o.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case o.OPS.closePath:this.closePath();break;case o.OPS.closeStroke:this.closeStroke();break;case o.OPS.closeFillStroke:this.closeFillStroke();break;case o.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case o.OPS.nextLine:this.nextLine();break;case o.OPS.transform:this.transform(u[0],u[1],u[2],u[3],u[4],u[5]);break;case o.OPS.constructPath:this.constructPath(u[0],u[1]);break;case o.OPS.endPath:this.endPath();break;case 92:this.group(i.items);break;default:(0,o.warn)("Unimplemented operator ".concat(l))}}}catch(t){a.e(t)}finally{a.f()}}},{key:"setWordSpacing",value:function setWordSpacing(t){this.current.wordSpacing=t}},{key:"setCharSpacing",value:function setCharSpacing(t){this.current.charSpacing=t}},{key:"nextLine",value:function nextLine(){this.moveText(0,this.current.leading)}},{key:"setTextMatrix",value:function setTextMatrix(t,r,a,i,o,l){var c=this.current;c.textMatrix=c.lineMatrix=[t,r,a,i,o,l];c.textMatrixScale=Math.hypot(t,r);c.x=c.lineX=0;c.y=c.lineY=0;c.xcoords=[];c.ycoords=[];c.tspan=this.svgFactory.createElement("svg:tspan");c.tspan.setAttributeNS(null,"font-family",c.fontFamily);c.tspan.setAttributeNS(null,"font-size","".concat(pf(c.fontSize),"px"));c.tspan.setAttributeNS(null,"y",pf(-c.y));c.txtElement=this.svgFactory.createElement("svg:text");c.txtElement.append(c.tspan)}},{key:"beginText",value:function beginText(){var t=this.current;t.x=t.lineX=0;t.y=t.lineY=0;t.textMatrix=o.IDENTITY_MATRIX;t.lineMatrix=o.IDENTITY_MATRIX;t.textMatrixScale=1;t.tspan=this.svgFactory.createElement("svg:tspan");t.txtElement=this.svgFactory.createElement("svg:text");t.txtgrp=this.svgFactory.createElement("svg:g");t.xcoords=[];t.ycoords=[]}},{key:"moveText",value:function moveText(t,r){var a=this.current;a.x=a.lineX+=t;a.y=a.lineY+=r;a.xcoords=[];a.ycoords=[];a.tspan=this.svgFactory.createElement("svg:tspan");a.tspan.setAttributeNS(null,"font-family",a.fontFamily);a.tspan.setAttributeNS(null,"font-size","".concat(pf(a.fontSize),"px"));a.tspan.setAttributeNS(null,"y",pf(-a.y))}},{key:"showText",value:function showText(t){var r=this.current,a=r.font,i=r.fontSize;if(0!==i){var d,h=r.fontSizeScale,p=r.charSpacing,v=r.wordSpacing,y=r.fontDirection,_=r.textHScale*y,g=a.vertical,m=g?1:-1,b=a.defaultVMetrics,w=i*r.fontMatrix[0],P=0,A=_createForOfIteratorHelper(t);try{for(A.s();!(d=A.n()).done;){var S=d.value;if(null!==S)if("number"!=typeof S){var k=(S.isSpace?v:0)+p,x=S.fontChar,E=void 0,T=void 0,C=S.width;if(g){var I=void 0,M=S.vmetric||b;I=-(I=S.vmetric?M[1]:.5*C)*w;var O=M[2]*w;C=M?-M[0]:C;E=I/h;T=(P+O)/h}else{E=P/h;T=0}if(S.isInFont||a.missingFile){r.xcoords.push(r.x+E);g&&r.ycoords.push(-r.y+T);r.tspan.textContent+=x}P+=g?C*w-k*y:C*w+k*y}else P+=m*S*i/1e3;else P+=y*v}}catch(t){A.e(t)}finally{A.f()}r.tspan.setAttributeNS(null,"x",r.xcoords.map(pf).join(" "));g?r.tspan.setAttributeNS(null,"y",r.ycoords.map(pf).join(" ")):r.tspan.setAttributeNS(null,"y",pf(-r.y));g?r.y-=P:r.x+=P*_;r.tspan.setAttributeNS(null,"font-family",r.fontFamily);r.tspan.setAttributeNS(null,"font-size","".concat(pf(r.fontSize),"px"));r.fontStyle!==l&&r.tspan.setAttributeNS(null,"font-style",r.fontStyle);r.fontWeight!==c&&r.tspan.setAttributeNS(null,"font-weight",r.fontWeight);var R=r.textRenderingMode&o.TextRenderingMode.FILL_STROKE_MASK;if(R===o.TextRenderingMode.FILL||R===o.TextRenderingMode.FILL_STROKE){r.fillColor!==u&&r.tspan.setAttributeNS(null,"fill",r.fillColor);r.fillAlpha<1&&r.tspan.setAttributeNS(null,"fill-opacity",r.fillAlpha)}else r.textRenderingMode===o.TextRenderingMode.ADD_TO_PATH?r.tspan.setAttributeNS(null,"fill","transparent"):r.tspan.setAttributeNS(null,"fill","none");if(R===o.TextRenderingMode.STROKE||R===o.TextRenderingMode.FILL_STROKE){var G=1/(r.textMatrixScale||1);this._setStrokeAttributes(r.tspan,G)}var L=r.textMatrix;0!==r.textRise&&((L=L.slice())[5]+=r.textRise);r.txtElement.setAttributeNS(null,"transform","".concat(pm(L)," scale(").concat(pf(_),", -1)"));r.txtElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve");r.txtElement.append(r.tspan);r.txtgrp.append(r.txtElement);this._ensureTransformGroup().append(r.txtElement)}}},{key:"setLeadingMoveText",value:function setLeadingMoveText(t,r){this.setLeading(-r);this.moveText(t,r)}},{key:"addFontStyle",value:function addFontStyle(t){if(!t.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');if(!this.cssStyle){this.cssStyle=this.svgFactory.createElement("svg:style");this.cssStyle.setAttributeNS(null,"type","text/css");this.defs.append(this.cssStyle)}var r=p(t.data,t.mimetype,this.forceDataSchema);this.cssStyle.textContent+='@font-face { font-family: "'.concat(t.loadedName,'";')+" src: url(".concat(r,"); }\n")}},{key:"setFont",value:function setFont(t){var r=this.current,a=this.commonObjs.get(t[0]),i=t[1];r.font=a;if(this.embedFonts&&!a.missingFile&&!this.embeddedFonts[a.loadedName]){this.addFontStyle(a);this.embeddedFonts[a.loadedName]=a}r.fontMatrix=a.fontMatrix||o.FONT_IDENTITY_MATRIX;var l="normal";a.black?l="900":a.bold&&(l="bold");var c=a.italic?"italic":"normal";if(i<0){i=-i;r.fontDirection=-1}else r.fontDirection=1;r.fontSize=i;r.fontFamily=a.loadedName;r.fontWeight=l;r.fontStyle=c;r.tspan=this.svgFactory.createElement("svg:tspan");r.tspan.setAttributeNS(null,"y",pf(-r.y));r.xcoords=[];r.ycoords=[]}},{key:"endText",value:function endText(){var t,r=this.current;if(r.textRenderingMode&o.TextRenderingMode.ADD_TO_PATH_FLAG&&null!==(t=r.txtElement)&&void 0!==t&&t.hasChildNodes()){r.element=r.txtElement;this.clip("nonzero");this.endPath()}}},{key:"setLineWidth",value:function setLineWidth(t){t>0&&(this.current.lineWidth=t)}},{key:"setLineCap",value:function setLineCap(t){this.current.lineCap=d[t]}},{key:"setLineJoin",value:function setLineJoin(t){this.current.lineJoin=h[t]}},{key:"setMiterLimit",value:function setMiterLimit(t){this.current.miterLimit=t}},{key:"setStrokeAlpha",value:function setStrokeAlpha(t){this.current.strokeAlpha=t}},{key:"setStrokeRGBColor",value:function setStrokeRGBColor(t,r,a){this.current.strokeColor=o.Util.makeHexColor(t,r,a)}},{key:"setFillAlpha",value:function setFillAlpha(t){this.current.fillAlpha=t}},{key:"setFillRGBColor",value:function setFillRGBColor(t,r,a){this.current.fillColor=o.Util.makeHexColor(t,r,a);this.current.tspan=this.svgFactory.createElement("svg:tspan");this.current.xcoords=[];this.current.ycoords=[]}},{key:"setStrokeColorN",value:function setStrokeColorN(t){this.current.strokeColor=this._makeColorN_Pattern(t)}},{key:"setFillColorN",value:function setFillColorN(t){this.current.fillColor=this._makeColorN_Pattern(t)}},{key:"shadingFill",value:function shadingFill(t){var r=this.viewport,a=r.width,i=r.height,l=o.Util.inverseTransform(this.transformMatrix),c=_slicedToArray(o.Util.getAxialAlignedBoundingBox([0,0,a,i],l),4),u=c[0],d=c[1],h=c[2],p=c[3],v=this.svgFactory.createElement("svg:rect");v.setAttributeNS(null,"x",u);v.setAttributeNS(null,"y",d);v.setAttributeNS(null,"width",h-u);v.setAttributeNS(null,"height",p-d);v.setAttributeNS(null,"fill",this._makeShadingPattern(t));this.current.fillAlpha<1&&v.setAttributeNS(null,"fill-opacity",this.current.fillAlpha);this._ensureTransformGroup().append(v)}},{key:"_makeColorN_Pattern",value:function _makeColorN_Pattern(t){return"TilingPattern"===t[0]?this._makeTilingPattern(t):this._makeShadingPattern(t)}},{key:"_makeTilingPattern",value:function _makeTilingPattern(t){var r=t[1],a=t[2],i=t[3]||o.IDENTITY_MATRIX,l=_slicedToArray(t[4],4),c=l[0],u=l[1],d=l[2],h=l[3],p=t[5],v=t[6],y=t[7],_="shading".concat(m++),g=_slicedToArray(o.Util.normalizeRect([].concat(_toConsumableArray(o.Util.applyTransform([c,u],i)),_toConsumableArray(o.Util.applyTransform([d,h],i)))),4),b=g[0],w=g[1],P=g[2],A=g[3],S=_slicedToArray(o.Util.singularValueDecompose2dScale(i),2),k=p*S[0],x=v*S[1],E=this.svgFactory.createElement("svg:pattern");E.setAttributeNS(null,"id",_);E.setAttributeNS(null,"patternUnits","userSpaceOnUse");E.setAttributeNS(null,"width",k);E.setAttributeNS(null,"height",x);E.setAttributeNS(null,"x","".concat(b));E.setAttributeNS(null,"y","".concat(w));var T=this.svg,C=this.transformMatrix,I=this.current.fillColor,M=this.current.strokeColor,O=this.svgFactory.create(P-b,A-w);this.svg=O;this.transformMatrix=i;if(2===y){var R=o.Util.makeHexColor.apply(o.Util,_toConsumableArray(r));this.current.fillColor=R;this.current.strokeColor=R}this.executeOpTree(this.convertOpList(a));this.svg=T;this.transformMatrix=C;this.current.fillColor=I;this.current.strokeColor=M;E.append(O.childNodes[0]);this.defs.append(E);return"url(#".concat(_,")")}},{key:"_makeShadingPattern",value:function _makeShadingPattern(t){"string"==typeof t&&(t=this.objs.get(t));switch(t[0]){case"RadialAxial":var r,a="shading".concat(m++),i=t[3];switch(t[1]){case"axial":var l=t[4],c=t[5];(r=this.svgFactory.createElement("svg:linearGradient")).setAttributeNS(null,"id",a);r.setAttributeNS(null,"gradientUnits","userSpaceOnUse");r.setAttributeNS(null,"x1",l[0]);r.setAttributeNS(null,"y1",l[1]);r.setAttributeNS(null,"x2",c[0]);r.setAttributeNS(null,"y2",c[1]);break;case"radial":var u=t[4],d=t[5],h=t[6],p=t[7];(r=this.svgFactory.createElement("svg:radialGradient")).setAttributeNS(null,"id",a);r.setAttributeNS(null,"gradientUnits","userSpaceOnUse");r.setAttributeNS(null,"cx",d[0]);r.setAttributeNS(null,"cy",d[1]);r.setAttributeNS(null,"r",p);r.setAttributeNS(null,"fx",u[0]);r.setAttributeNS(null,"fy",u[1]);r.setAttributeNS(null,"fr",h);break;default:throw new Error("Unknown RadialAxial type: ".concat(t[1]))}var v,y=_createForOfIteratorHelper(i);try{for(y.s();!(v=y.n()).done;){var _=v.value,g=this.svgFactory.createElement("svg:stop");g.setAttributeNS(null,"offset",_[0]);g.setAttributeNS(null,"stop-color",_[1]);r.append(g)}}catch(t){y.e(t)}finally{y.f()}this.defs.append(r);return"url(#".concat(a,")");case"Mesh":(0,o.warn)("Unimplemented pattern Mesh");return null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(t[0]))}}},{key:"setDash",value:function setDash(t,r){this.current.dashArray=t;this.current.dashPhase=r}},{key:"constructPath",value:function constructPath(t,r){var a,i=this.current,l=i.x,c=i.y,u=[],d=0,h=_createForOfIteratorHelper(t);try{for(h.s();!(a=h.n()).done;){switch(0|a.value){case o.OPS.rectangle:l=r[d++];c=r[d++];var p=r[d++],v=r[d++],y=l+p,_=c+v;u.push("M",pf(l),pf(c),"L",pf(y),pf(c),"L",pf(y),pf(_),"L",pf(l),pf(_),"Z");break;case o.OPS.moveTo:l=r[d++];c=r[d++];u.push("M",pf(l),pf(c));break;case o.OPS.lineTo:l=r[d++];c=r[d++];u.push("L",pf(l),pf(c));break;case o.OPS.curveTo:l=r[d+4];c=r[d+5];u.push("C",pf(r[d]),pf(r[d+1]),pf(r[d+2]),pf(r[d+3]),pf(l),pf(c));d+=6;break;case o.OPS.curveTo2:u.push("C",pf(l),pf(c),pf(r[d]),pf(r[d+1]),pf(r[d+2]),pf(r[d+3]));l=r[d+2];c=r[d+3];d+=4;break;case o.OPS.curveTo3:l=r[d+2];c=r[d+3];u.push("C",pf(r[d]),pf(r[d+1]),pf(l),pf(c),pf(l),pf(c));d+=4;break;case o.OPS.closePath:u.push("Z")}}}catch(t){h.e(t)}finally{h.f()}u=u.join(" ");if(i.path&&t.length>0&&t[0]!==o.OPS.rectangle&&t[0]!==o.OPS.moveTo)u=i.path.getAttributeNS(null,"d")+u;else{i.path=this.svgFactory.createElement("svg:path");this._ensureTransformGroup().append(i.path)}i.path.setAttributeNS(null,"d",u);i.path.setAttributeNS(null,"fill","none");i.element=i.path;i.setCurrentPoint(l,c)}},{key:"endPath",value:function endPath(){var t=this.current;t.path=null;if(this.pendingClip)if(t.element){var r="clippath".concat(_++),a=this.svgFactory.createElement("svg:clipPath");a.setAttributeNS(null,"id",r);a.setAttributeNS(null,"transform",pm(this.transformMatrix));var i=t.element.cloneNode(!0);"evenodd"===this.pendingClip?i.setAttributeNS(null,"clip-rule","evenodd"):i.setAttributeNS(null,"clip-rule","nonzero");this.pendingClip=null;a.append(i);this.defs.append(a);if(t.activeClipUrl){t.clipGroup=null;var o,l=_createForOfIteratorHelper(this.extraStack);try{for(l.s();!(o=l.n()).done;){o.value.clipGroup=null}}catch(t){l.e(t)}finally{l.f()}a.setAttributeNS(null,"clip-path",t.activeClipUrl)}t.activeClipUrl="url(#".concat(r,")");this.tgrp=null}else this.pendingClip=null}},{key:"clip",value:function clip(t){this.pendingClip=t}},{key:"closePath",value:function closePath(){var t=this.current;if(t.path){var r="".concat(t.path.getAttributeNS(null,"d"),"Z");t.path.setAttributeNS(null,"d",r)}}},{key:"setLeading",value:function setLeading(t){this.current.leading=-t}},{key:"setTextRise",value:function setTextRise(t){this.current.textRise=t}},{key:"setTextRenderingMode",value:function setTextRenderingMode(t){this.current.textRenderingMode=t}},{key:"setHScale",value:function setHScale(t){this.current.textHScale=t/100}},{key:"setRenderingIntent",value:function setRenderingIntent(t){}},{key:"setFlatness",value:function setFlatness(t){}},{key:"setGState",value:function setGState(t){var r,a=_createForOfIteratorHelper(t);try{for(a.s();!(r=a.n()).done;){var i=_slicedToArray(r.value,2),l=i[0],c=i[1];switch(l){case"LW":this.setLineWidth(c);break;case"LC":this.setLineCap(c);break;case"LJ":this.setLineJoin(c);break;case"ML":this.setMiterLimit(c);break;case"D":this.setDash(c[0],c[1]);break;case"RI":this.setRenderingIntent(c);break;case"FL":this.setFlatness(c);break;case"Font":this.setFont(c);break;case"CA":this.setStrokeAlpha(c);break;case"ca":this.setFillAlpha(c);break;default:(0,o.warn)("Unimplemented graphic state operator ".concat(l))}}}catch(t){a.e(t)}finally{a.f()}}},{key:"fill",value:function fill(){var t=this.current;if(t.element){t.element.setAttributeNS(null,"fill",t.fillColor);t.element.setAttributeNS(null,"fill-opacity",t.fillAlpha);this.endPath()}}},{key:"stroke",value:function stroke(){var t=this.current;if(t.element){this._setStrokeAttributes(t.element);t.element.setAttributeNS(null,"fill","none");this.endPath()}}},{key:"_setStrokeAttributes",value:function _setStrokeAttributes(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=this.current,i=a.dashArray;1!==r&&i.length>0&&(i=i.map((function(t){return r*t})));t.setAttributeNS(null,"stroke",a.strokeColor);t.setAttributeNS(null,"stroke-opacity",a.strokeAlpha);t.setAttributeNS(null,"stroke-miterlimit",pf(a.miterLimit));t.setAttributeNS(null,"stroke-linecap",a.lineCap);t.setAttributeNS(null,"stroke-linejoin",a.lineJoin);t.setAttributeNS(null,"stroke-width",pf(r*a.lineWidth)+"px");t.setAttributeNS(null,"stroke-dasharray",i.map(pf).join(" "));t.setAttributeNS(null,"stroke-dashoffset",pf(r*a.dashPhase)+"px")}},{key:"eoFill",value:function eoFill(){var t;null===(t=this.current.element)||void 0===t||t.setAttributeNS(null,"fill-rule","evenodd");this.fill()}},{key:"fillStroke",value:function fillStroke(){this.stroke();this.fill()}},{key:"eoFillStroke",value:function eoFillStroke(){var t;null===(t=this.current.element)||void 0===t||t.setAttributeNS(null,"fill-rule","evenodd");this.fillStroke()}},{key:"closeStroke",value:function closeStroke(){this.closePath();this.stroke()}},{key:"closeFillStroke",value:function closeFillStroke(){this.closePath();this.fillStroke()}},{key:"closeEOFillStroke",value:function closeEOFillStroke(){this.closePath();this.eoFillStroke()}},{key:"paintSolidColorImageMask",value:function paintSolidColorImageMask(){var t=this.svgFactory.createElement("svg:rect");t.setAttributeNS(null,"x","0");t.setAttributeNS(null,"y","0");t.setAttributeNS(null,"width","1px");t.setAttributeNS(null,"height","1px");t.setAttributeNS(null,"fill",this.current.fillColor);this._ensureTransformGroup().append(t)}},{key:"paintImageXObject",value:function paintImageXObject(t){var r=this.getObject(t);r?this.paintInlineImageXObject(r):(0,o.warn)("Dependent image with object ID ".concat(t," is not ready yet"))}},{key:"paintInlineImageXObject",value:function paintInlineImageXObject(t,r){var a=t.width,i=t.height,o=v(t,this.forceDataSchema,!!r),l=this.svgFactory.createElement("svg:rect");l.setAttributeNS(null,"x","0");l.setAttributeNS(null,"y","0");l.setAttributeNS(null,"width",pf(a));l.setAttributeNS(null,"height",pf(i));this.current.element=l;this.clip("nonzero");var c=this.svgFactory.createElement("svg:image");c.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);c.setAttributeNS(null,"x","0");c.setAttributeNS(null,"y",pf(-i));c.setAttributeNS(null,"width",pf(a)+"px");c.setAttributeNS(null,"height",pf(i)+"px");c.setAttributeNS(null,"transform","scale(".concat(pf(1/a)," ").concat(pf(-1/i),")"));r?r.append(c):this._ensureTransformGroup().append(c)}},{key:"paintImageMaskXObject",value:function paintImageMaskXObject(t){var r=this.getObject(t.data,t);if(r.bitmap)(0,o.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");else{var a=this.current,i=r.width,l=r.height,c=a.fillColor;a.maskId="mask".concat(g++);var u=this.svgFactory.createElement("svg:mask");u.setAttributeNS(null,"id",a.maskId);var d=this.svgFactory.createElement("svg:rect");d.setAttributeNS(null,"x","0");d.setAttributeNS(null,"y","0");d.setAttributeNS(null,"width",pf(i));d.setAttributeNS(null,"height",pf(l));d.setAttributeNS(null,"fill",c);d.setAttributeNS(null,"mask","url(#".concat(a.maskId,")"));this.defs.append(u);this._ensureTransformGroup().append(d);this.paintInlineImageXObject(r,u)}}},{key:"paintFormXObjectBegin",value:function paintFormXObjectBegin(t,r){Array.isArray(t)&&6===t.length&&this.transform(t[0],t[1],t[2],t[3],t[4],t[5]);if(r){var a=r[2]-r[0],i=r[3]-r[1],o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x",r[0]);o.setAttributeNS(null,"y",r[1]);o.setAttributeNS(null,"width",pf(a));o.setAttributeNS(null,"height",pf(i));this.current.element=o;this.clip("nonzero");this.endPath()}}},{key:"paintFormXObjectEnd",value:function paintFormXObjectEnd(){}},{key:"_initialize",value:function _initialize(t){var r=this.svgFactory.create(t.width,t.height),a=this.svgFactory.createElement("svg:defs");r.append(a);this.defs=a;var i=this.svgFactory.createElement("svg:g");i.setAttributeNS(null,"transform",pm(t.transform));r.append(i);this.svg=i;return r}},{key:"_ensureClipGroup",value:function _ensureClipGroup(){if(!this.current.clipGroup){var t=this.svgFactory.createElement("svg:g");t.setAttributeNS(null,"clip-path",this.current.activeClipUrl);this.svg.append(t);this.current.clipGroup=t}return this.current.clipGroup}},{key:"_ensureTransformGroup",value:function _ensureTransformGroup(){if(!this.tgrp){this.tgrp=this.svgFactory.createElement("svg:g");this.tgrp.setAttributeNS(null,"transform",pm(this.transformMatrix));this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)}return this.tgrp}}]);return SVGGraphics}();r.SVGGraphics=b},(t,r,a)=>{var i=a(3),o=a(398),l=a(141);i({target:"Array",proto:!0},{group:function group(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}});l("group")},(t,r,a)=>{var i=a(94),o=a(14),l=a(13),c=a(40),u=a(18),d=a(64),h=a(81),p=a(200),v=Array,y=o([].push);t.exports=function(t,r,a,o){for(var _,g,m,b=c(t),w=l(b),P=i(r,a),A=h(null),S=d(w),k=0;S>k;k++){m=w[k];(g=u(P(m,k,b)))in A?y(A[g],m):A[g]=[m]}if(o&&(_=o(b))!==v)for(g in A)A[g]=p(_,A[g]);return A}},(t,r,a)=>{a(258);a(255);a(92);a(148);a(105);a(104);a(301);a(140);a(149);Object.defineProperty(r,"__esModule",{value:!0});r.XfaText=void 0;a(167);a(85);a(90);a(292);a(300);a(146);a(123);a(112);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}var i=function(){function XfaText(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,XfaText)}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(XfaText,null,[{key:"textContent",value:function textContent(t){var r=[],a={items:r,styles:Object.create(null)};!function walk(t){var a;if(t){var i=null,o=t.name;if("#text"===o)i=t.value;else{if(!XfaText.shouldBuildText(o))return;null!=t&&null!==(a=t.attributes)&&void 0!==a&&a.textContent?i=t.attributes.textContent:t.value&&(i=t.value)}null!==i&&r.push({str:i});if(t.children){var l,c=_createForOfIteratorHelper(t.children);try{for(c.s();!(l=c.n()).done;){walk(l.value)}}catch(t){c.e(t)}finally{c.f()}}}}(t);return a}},{key:"shouldBuildText",value:function shouldBuildText(t){return!("textarea"===t||"input"===t||"option"===t||"select"===t)}}]);return XfaText}();r.XfaText=i},(t,r,a)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}a(258);a(255);a(92);a(105);a(104);a(292);a(300);a(301);a(85);a(90);a(112);Object.defineProperty(r,"__esModule",{value:!0});r.TextLayerRenderTask=void 0;r.renderTextLayer=function renderTextLayer(t){if(!t.textContentSource&&(t.textContent||t.textContentStream)){(0,o.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead.");t.textContentSource=t.textContent||t.textContentStream}var r=t.container,a=t.viewport,i=getComputedStyle(r),l=i.getPropertyValue("visibility"),c=parseFloat(i.getPropertyValue("--scale-factor"));"visible"===l&&(!c||Math.abs(c-a.scale)>1e-5)&&console.error("The `--scale-factor` CSS-variable must be set, to the same value as `viewport.scale`, either on the `container`-element itself or higher up in the DOM.");var u=new d(t);u._render();return u};r.updateTextLayer=function updateTextLayer(t){var r=t.container,a=t.viewport,i=t.textDivs,l=t.textDivProperties,c=t.isOffscreenCanvasSupported,u=t.mustRotate,d=void 0===u||u,h=t.mustRescale,p=void 0===h||h;d&&(0,o.setLayerDimensions)(r,{rotation:a.rotation});if(p){var v,y=getCtx(0,c),_={prevFontSize:null,prevFontFamily:null,div:null,scale:a.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:y},g=_createForOfIteratorHelper(i);try{for(g.s();!(v=g.n()).done;){var m=v.value;_.properties=l.get(m);_.div=m;layout(_)}}catch(t){g.e(t)}finally{g.f()}}};a(140);a(280);a(146);a(148);a(149);a(167);a(355);a(257);a(122);a(302);a(259);a(346);a(337);a(123);var i=a(1),o=a(362);function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}var l=30,c=.8,u=new Map;function getCtx(t,r){var a,o=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0,alpha:!1}:{alpha:!1};if(r&&i.FeatureTest.isOffscreenCanvasSupported)a=new OffscreenCanvas(t,t).getContext("2d",o);else{var l=document.createElement("canvas");l.width=l.height=t;a=l.getContext("2d",o)}return a}function appendText(t,r,a){var o=document.createElement("span"),d={angle:0,canvasWidth:0,hasText:""!==r.str,hasEOL:r.hasEOL,fontSize:0};t._textDivs.push(o);var h=i.Util.transform(t._transform,r.transform),p=Math.atan2(h[1],h[0]),v=a[r.fontName];v.vertical&&(p+=Math.PI/2);var y,_,g=Math.hypot(h[2],h[3]),m=g*function getAscent(t,r){var a=u.get(t);if(a)return a;var i=getCtx(l,r);i.font="".concat(l,"px ").concat(t);var o=i.measureText(""),d=null==o?void 0:o.fontBoundingBoxAscent,h=Math.abs(null==o?void 0:o.fontBoundingBoxDescent);if(d){var p=d/(d+h);u.set(t,p);i.canvas.width=i.canvas.height=0;return p}i.strokeStyle="red";i.clearRect(0,0,l,l);i.strokeText("g",0,0);var v=i.getImageData(0,0,l,l).data;h=0;for(var y=v.length-1-3;y>=0;y-=4)if(v[y]>0){h=Math.ceil(y/4/l);break}i.clearRect(0,0,l,l);i.strokeText("A",0,l);d=0;for(var _=0,g=(v=i.getImageData(0,0,l,l).data).length;_<g;_+=4)if(v[_]>0){d=l-Math.floor(_/4/l);break}i.canvas.width=i.canvas.height=0;if(d){var m=d/(d+h);u.set(t,m);return m}u.set(t,c);return c}(v.fontFamily,t._isOffscreenCanvasSupported);if(0===p){y=h[4];_=h[5]-m}else{y=h[4]+m*Math.sin(p);_=h[5]-m*Math.cos(p)}var b="calc(var(--scale-factor)*",w=o.style;if(t._container===t._rootContainer){w.left="".concat((100*y/t._pageWidth).toFixed(2),"%");w.top="".concat((100*_/t._pageHeight).toFixed(2),"%")}else{w.left="".concat(b).concat(y.toFixed(2),"px)");w.top="".concat(b).concat(_.toFixed(2),"px)")}w.fontSize="".concat(b).concat(g.toFixed(2),"px)");w.fontFamily=v.fontFamily;d.fontSize=g;o.setAttribute("role","presentation");o.textContent=r.str;o.dir=r.dir;t._fontInspectorEnabled&&(o.dataset.fontName=r.fontName);0!==p&&(d.angle=p*(180/Math.PI));var P=!1;if(r.str.length>1)P=!0;else if(" "!==r.str&&r.transform[0]!==r.transform[3]){var A=Math.abs(r.transform[0]),S=Math.abs(r.transform[3]);A!==S&&Math.max(A,S)/Math.min(A,S)>1.5&&(P=!0)}P&&(d.canvasWidth=v.vertical?r.height:r.width);t._textDivProperties.set(o,d);t._isReadableStream&&t._layoutText(o)}function layout(t){var r=t.div,a=t.scale,i=t.properties,o=t.ctx,l=t.prevFontSize,c=t.prevFontFamily,u=r.style,d="";if(0!==i.canvasWidth&&i.hasText){var h=u.fontFamily,p=i.canvasWidth,v=i.fontSize;if(l!==v||c!==h){o.font="".concat(v*a,"px ").concat(h);t.prevFontSize=v;t.prevFontFamily=h}try{var y=o.measureText(r.textContent).width;y>0&&(d="scaleX(".concat(p*a/y,")"))}catch(t){}}0!==i.angle&&(d="rotate(".concat(i.angle,"deg) ").concat(d));d.length>0&&(u.transform=d)}var d=function(){function TextLayerRenderTask(t){var r,a=this,l=t.textContentSource,c=t.container,u=t.viewport,d=t.textDivs,h=t.textDivProperties,p=t.textContentItemsStr,v=t.isOffscreenCanvasSupported;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,TextLayerRenderTask);this._textContentSource=l;this._isReadableStream=l instanceof ReadableStream;this._container=this._rootContainer=c;this._textDivs=d||[];this._textContentItemsStr=p||[];this._isOffscreenCanvasSupported=v;this._fontInspectorEnabled=!(null===(r=globalThis.FontInspector)||void 0===r||!r.enabled);this._reader=null;this._textDivProperties=h||new WeakMap;this._canceled=!1;this._capability=new i.PromiseCapability;this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:u.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:getCtx(0,v)};var y=u.rawDims,_=y.pageWidth,g=y.pageHeight,m=y.pageX,b=y.pageY;this._transform=[1,0,0,-1,-m,b+g];this._pageWidth=_;this._pageHeight=g;(0,o.setLayerDimensions)(c,u);this._capability.promise.finally((function(){a._layoutTextParams=null})).catch((function(){}))}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(TextLayerRenderTask,[{key:"promise",get:function get(){return this._capability.promise}},{key:"cancel",value:function cancel(){this._canceled=!0;if(this._reader){this._reader.cancel(new i.AbortException("TextLayer task cancelled.")).catch((function(){}));this._reader=null}this._capability.reject(new i.AbortException("TextLayer task cancelled."))}},{key:"_processItems",value:function _processItems(t,r){var a,i=_createForOfIteratorHelper(t);try{for(i.s();!(a=i.n()).done;){var o=a.value;if(void 0!==o.str){this._textContentItemsStr.push(o.str);appendText(this,o,r)}else if("beginMarkedContentProps"===o.type||"beginMarkedContent"===o.type){var l=this._container;this._container=document.createElement("span");this._container.classList.add("markedContent");null!==o.id&&this._container.setAttribute("id","".concat(o.id));l.append(this._container)}else"endMarkedContent"===o.type&&(this._container=this._container.parentNode)}}catch(t){i.e(t)}finally{i.f()}}},{key:"_layoutText",value:function _layoutText(t){var r=this._layoutTextParams.properties=this._textDivProperties.get(t);this._layoutTextParams.div=t;layout(this._layoutTextParams);r.hasText&&this._container.append(t);if(r.hasEOL){var a=document.createElement("br");a.setAttribute("role","presentation");this._container.append(a)}}},{key:"_render",value:function _render(){var t=this,r=new i.PromiseCapability,a=Object.create(null);if(this._isReadableStream){this._reader=this._textContentSource.getReader();!function pump(){t._reader.read().then((function(i){var o=i.value;if(i.done)r.resolve();else{Object.assign(a,o.styles);t._processItems(o.items,a);pump()}}),r.reject)}()}else{if(!this._textContentSource)throw new Error('No "textContentSource" parameter specified.');var o=this._textContentSource,l=o.items,c=o.styles;this._processItems(l,c);r.resolve()}r.promise.then((function(){a=null;!function render(t){if(!t._canceled){var r=t._textDivs,a=t._capability;if(r.length>1e5)a.resolve();else{if(!t._isReadableStream){var i,o=_createForOfIteratorHelper(r);try{for(o.s();!(i=o.n()).done;){var l=i.value;t._layoutText(l)}}catch(t){o.e(t)}finally{o.f()}}a.resolve()}}}(t)}),this._capability.reject)}}]);return TextLayerRenderTask}();r.TextLayerRenderTask=d},(t,r,a)=>{a(85);a(90);a(292);a(300);a(112);a(258);a(255);a(92);a(105);a(104);a(301);a(245);a(379);a(402);a(167);a(310);a(403);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.AnnotationEditorLayer=void 0;a(140);a(280);a(146);a(148);a(149);a(312);a(314);a(325);a(327);a(329);a(331);a(333);a(335);a(123);a(302);a(347);var i=a(1),o=a(353),l=a(404),c=a(419),u=a(362),d=a(420);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||_unsupportedIterableToArray(t,r)||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 ownKeys(t,r){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),a.push.apply(a,i)}return a}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _defineProperty(t,r,a){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateFieldInitSpec(t,r,a){_checkPrivateRedeclaration(t,r);r.set(t,a)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,a){!function _classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,_classExtractFieldDescriptor(t,r,"set"),a);return a}function _classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}var h=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakMap,_=new WeakMap,g=new WeakMap,m=new WeakMap,b=new WeakMap,w=new WeakMap,P=new WeakMap,A=new WeakSet,S=new WeakSet,k=new WeakSet,x=new WeakSet,E=function(){function AnnotationEditorLayer(t){var r=t.uiManager,a=t.pageIndex,i=t.div,o=t.accessibilityManager,u=t.annotationLayer,E=t.viewport,T=t.l10n;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,AnnotationEditorLayer);_classPrivateMethodInitSpec(this,x);_classPrivateMethodInitSpec(this,k);_classPrivateMethodInitSpec(this,S);_classPrivateMethodInitSpec(this,A);_classPrivateFieldInitSpec(this,h,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,p,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,v,{writable:!0,value:null});_classPrivateFieldInitSpec(this,y,{writable:!0,value:this.pointerup.bind(this)});_classPrivateFieldInitSpec(this,_,{writable:!0,value:this.pointerdown.bind(this)});_classPrivateFieldInitSpec(this,g,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,m,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,b,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,w,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,P,{writable:!0,value:void 0});var C=[l.FreeTextEditor,c.InkEditor,d.StampEditor];if(!AnnotationEditorLayer._initialized){AnnotationEditorLayer._initialized=!0;var I,M=_createForOfIteratorHelper(C);try{for(M.s();!(I=M.n()).done;){I.value.initialize(T)}}catch(t){M.e(t)}finally{M.f()}}r.registerEditorTypes(C);_classPrivateFieldSet(this,P,r);this.pageIndex=a;this.div=i;_classPrivateFieldSet(this,h,o);_classPrivateFieldSet(this,v,u);this.viewport=E;_classPrivateFieldGet(this,P).addLayer(this)}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(AnnotationEditorLayer,[{key:"isEmpty",get:function get(){return 0===_classPrivateFieldGet(this,g).size}},{key:"updateToolbar",value:function updateToolbar(t){_classPrivateFieldGet(this,P).updateToolbar(t)}},{key:"updateMode",value:function updateMode(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_classPrivateFieldGet(this,P).getMode();_classPrivateMethodGet(this,x,_cleanup2).call(this);if(t===i.AnnotationEditorType.INK){this.addInkEditorIfNeeded(!1);this.disableClick()}else this.enableClick();if(t!==i.AnnotationEditorType.NONE){this.div.classList.toggle("freeTextEditing",t===i.AnnotationEditorType.FREETEXT);this.div.classList.toggle("inkEditing",t===i.AnnotationEditorType.INK);this.div.classList.toggle("stampEditing",t===i.AnnotationEditorType.STAMP);this.div.hidden=!1}}},{key:"addInkEditorIfNeeded",value:function addInkEditorIfNeeded(t){if(t||_classPrivateFieldGet(this,P).getMode()===i.AnnotationEditorType.INK){if(!t){var r,a=_createForOfIteratorHelper(_classPrivateFieldGet(this,g).values());try{for(a.s();!(r=a.n()).done;){var o=r.value;if(o.isEmpty()){o.setInBackground();return}}}catch(t){a.e(t)}finally{a.f()}}_classPrivateMethodGet(this,S,_createAndAddNewEditor2).call(this,{offsetX:0,offsetY:0},!1).setInBackground()}}},{key:"setEditingState",value:function setEditingState(t){_classPrivateFieldGet(this,P).setEditingState(t)}},{key:"addCommands",value:function addCommands(t){_classPrivateFieldGet(this,P).addCommands(t)}},{key:"enable",value:function enable(){this.div.style.pointerEvents="auto";var t,r=new Set,a=_createForOfIteratorHelper(_classPrivateFieldGet(this,g).values());try{for(a.s();!(t=a.n()).done;){var i=t.value;i.enableEditing();i.annotationElementId&&r.add(i.annotationElementId)}}catch(t){a.e(t)}finally{a.f()}if(_classPrivateFieldGet(this,v)){var o,l=_createForOfIteratorHelper(_classPrivateFieldGet(this,v).getEditableAnnotations());try{for(l.s();!(o=l.n()).done;){var c=o.value;c.hide();if(!_classPrivateFieldGet(this,P).isDeletedAnnotationElement(c.data.id)&&!r.has(c.data.id)){var u=this.deserialize(c);if(u){this.addOrRebuild(u);u.enableEditing()}}}}catch(t){l.e(t)}finally{l.f()}}}},{key:"disable",value:function disable(){_classPrivateFieldSet(this,w,!0);this.div.style.pointerEvents="none";var t,r=new Set,a=_createForOfIteratorHelper(_classPrivateFieldGet(this,g).values());try{for(a.s();!(t=a.n()).done;){var i,o=t.value;o.disableEditing();if(o.annotationElementId&&null===o.serialize()){null===(i=this.getEditableAnnotation(o.annotationElementId))||void 0===i||i.show();o.remove()}else r.add(o.annotationElementId)}}catch(t){a.e(t)}finally{a.f()}if(_classPrivateFieldGet(this,v)){var l,c=_createForOfIteratorHelper(_classPrivateFieldGet(this,v).getEditableAnnotations());try{for(c.s();!(l=c.n()).done;){var u=l.value,d=u.data.id;r.has(d)||_classPrivateFieldGet(this,P).isDeletedAnnotationElement(d)||u.show()}}catch(t){c.e(t)}finally{c.f()}}_classPrivateMethodGet(this,x,_cleanup2).call(this);this.isEmpty&&(this.div.hidden=!0);_classPrivateFieldSet(this,w,!1)}},{key:"getEditableAnnotation",value:function getEditableAnnotation(t){var r;return(null===(r=_classPrivateFieldGet(this,v))||void 0===r?void 0:r.getEditableAnnotation(t))||null}},{key:"setActiveEditor",value:function setActiveEditor(t){_classPrivateFieldGet(this,P).getActive()!==t&&_classPrivateFieldGet(this,P).setActiveEditor(t)}},{key:"enableClick",value:function enableClick(){this.div.addEventListener("pointerdown",_classPrivateFieldGet(this,_));this.div.addEventListener("pointerup",_classPrivateFieldGet(this,y))}},{key:"disableClick",value:function disableClick(){this.div.removeEventListener("pointerdown",_classPrivateFieldGet(this,_));this.div.removeEventListener("pointerup",_classPrivateFieldGet(this,y))}},{key:"attach",value:function attach(t){_classPrivateFieldGet(this,g).set(t.id,t);var r=t.annotationElementId;r&&_classPrivateFieldGet(this,P).isDeletedAnnotationElement(r)&&_classPrivateFieldGet(this,P).removeDeletedAnnotationElement(t)}},{key:"detach",value:function detach(t){var r;_classPrivateFieldGet(this,g).delete(t.id);null===(r=_classPrivateFieldGet(this,h))||void 0===r||r.removePointerInTextLayer(t.contentDiv);!_classPrivateFieldGet(this,w)&&t.annotationElementId&&_classPrivateFieldGet(this,P).addDeletedAnnotationElement(t)}},{key:"remove",value:function remove(t){var r=this;this.detach(t);_classPrivateFieldGet(this,P).removeEditor(t);t.div.contains(document.activeElement)&&setTimeout((function(){_classPrivateFieldGet(r,P).focusMainContainer()}),0);t.div.remove();t.isAttachedToDOM=!1;_classPrivateFieldGet(this,b)||this.addInkEditorIfNeeded(!1)}},{key:"changeParent",value:function changeParent(t){var r;if(t.parent!==this){if(t.annotationElementId){_classPrivateFieldGet(this,P).addDeletedAnnotationElement(t.annotationElementId);o.AnnotationEditor.deleteAnnotationElement(t);t.annotationElementId=null}this.attach(t);null===(r=t.parent)||void 0===r||r.detach(t);t.setParent(this);if(t.div&&t.isAttachedToDOM){t.div.remove();this.div.append(t.div)}}}},{key:"add",value:function add(t){this.changeParent(t);_classPrivateFieldGet(this,P).addEditor(t);this.attach(t);if(!t.isAttachedToDOM){var r=t.render();this.div.append(r);t.isAttachedToDOM=!0}this.moveEditorInDOM(t);t.onceAdded();_classPrivateFieldGet(this,P).addToAnnotationStorage(t)}},{key:"moveEditorInDOM",value:function moveEditorInDOM(t){var r;if(t.isAttachedToDOM){var a=document.activeElement;if(t.div.contains(a)){t._focusEventsAllowed=!1;setTimeout((function(){t.div.addEventListener("focusin",(function(){t._focusEventsAllowed=!0}),{once:!0});a.focus()}),0)}null===(r=_classPrivateFieldGet(this,h))||void 0===r||r.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}}},{key:"addOrRebuild",value:function addOrRebuild(t){t.needsToBeRebuilt()?t.rebuild():this.add(t)}},{key:"addUndoableEditor",value:function addUndoableEditor(t){this.addCommands({cmd:function cmd(){return t._uiManager.rebuild(t)},undo:function undo(){t.remove()},mustExec:!1})}},{key:"getNextId",value:function getNextId(){return _classPrivateFieldGet(this,P).getId()}},{key:"pasteEditor",value:function pasteEditor(t,r){_classPrivateFieldGet(this,P).updateToolbar(t);_classPrivateFieldGet(this,P).updateMode(t);var a=_classPrivateMethodGet(this,k,_getCenterPoint2).call(this),i=a.offsetX,o=a.offsetY,l=this.getNextId(),c=_classPrivateMethodGet(this,A,_createNewEditor2).call(this,function _objectSpread(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(a),!0).forEach((function(r){_defineProperty(t,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))}))}return t}({parent:this,id:l,x:i,y:o,uiManager:_classPrivateFieldGet(this,P),isCentered:!0},r));c&&this.add(c)}},{key:"deserialize",value:function deserialize(t){var r;switch(null!==(r=t.annotationType)&&void 0!==r?r:t.annotationEditorType){case i.AnnotationEditorType.FREETEXT:return l.FreeTextEditor.deserialize(t,this,_classPrivateFieldGet(this,P));case i.AnnotationEditorType.INK:return c.InkEditor.deserialize(t,this,_classPrivateFieldGet(this,P));case i.AnnotationEditorType.STAMP:return d.StampEditor.deserialize(t,this,_classPrivateFieldGet(this,P))}return null}},{key:"addNewEditor",value:function addNewEditor(){_classPrivateMethodGet(this,S,_createAndAddNewEditor2).call(this,_classPrivateMethodGet(this,k,_getCenterPoint2).call(this),!0)}},{key:"setSelected",value:function setSelected(t){_classPrivateFieldGet(this,P).setSelected(t)}},{key:"toggleSelected",value:function toggleSelected(t){_classPrivateFieldGet(this,P).toggleSelected(t)}},{key:"isSelected",value:function isSelected(t){return _classPrivateFieldGet(this,P).isSelected(t)}},{key:"unselect",value:function unselect(t){_classPrivateFieldGet(this,P).unselect(t)}},{key:"pointerup",value:function pointerup(t){var r=i.FeatureTest.platform.isMac;if(!(0!==t.button||t.ctrlKey&&r)&&t.target===this.div&&_classPrivateFieldGet(this,m)){_classPrivateFieldSet(this,m,!1);_classPrivateFieldGet(this,p)?_classPrivateFieldGet(this,P).getMode()!==i.AnnotationEditorType.STAMP?_classPrivateMethodGet(this,S,_createAndAddNewEditor2).call(this,t,!1):_classPrivateFieldGet(this,P).unselectAll():_classPrivateFieldSet(this,p,!0)}}},{key:"pointerdown",value:function pointerdown(t){if(_classPrivateFieldGet(this,m))_classPrivateFieldSet(this,m,!1);else{var r=i.FeatureTest.platform.isMac;if(!(0!==t.button||t.ctrlKey&&r)&&t.target===this.div){_classPrivateFieldSet(this,m,!0);var a=_classPrivateFieldGet(this,P).getActive();_classPrivateFieldSet(this,p,!a||a.isEmpty())}}}},{key:"findNewParent",value:function findNewParent(t,r,a){var i=_classPrivateFieldGet(this,P).findParent(r,a);if(null===i||i===this)return!1;i.changeParent(t);return!0}},{key:"destroy",value:function destroy(){var t;(null===(t=_classPrivateFieldGet(this,P).getActive())||void 0===t?void 0:t.parent)===this&&_classPrivateFieldGet(this,P).setActiveEditor(null);var r,a=_createForOfIteratorHelper(_classPrivateFieldGet(this,g).values());try{for(a.s();!(r=a.n()).done;){var i,o=r.value;null===(i=_classPrivateFieldGet(this,h))||void 0===i||i.removePointerInTextLayer(o.contentDiv);o.setParent(null);o.isAttachedToDOM=!1;o.div.remove()}}catch(t){a.e(t)}finally{a.f()}this.div=null;_classPrivateFieldGet(this,g).clear();_classPrivateFieldGet(this,P).removeLayer(this)}},{key:"render",value:function render(t){var r=t.viewport;this.viewport=r;(0,u.setLayerDimensions)(this.div,r);var a,i=_createForOfIteratorHelper(_classPrivateFieldGet(this,P).getEditors(this.pageIndex));try{for(i.s();!(a=i.n()).done;){var o=a.value;this.add(o)}}catch(t){i.e(t)}finally{i.f()}this.updateMode()}},{key:"update",value:function update(t){var r=t.viewport;_classPrivateFieldGet(this,P).commitOrRemove();this.viewport=r;(0,u.setLayerDimensions)(this.div,{rotation:r.rotation});this.updateMode()}},{key:"pageDimensions",get:function get(){var t=this.viewport.rawDims;return[t.pageWidth,t.pageHeight]}},{key:"setCleaningUp",value:function setCleaningUp(t){_classPrivateFieldSet(this,b,t)}}]);return AnnotationEditorLayer}();r.AnnotationEditorLayer=E;function _createNewEditor2(t){switch(_classPrivateFieldGet(this,P).getMode()){case i.AnnotationEditorType.FREETEXT:return new l.FreeTextEditor(t);case i.AnnotationEditorType.INK:return new c.InkEditor(t);case i.AnnotationEditorType.STAMP:return new d.StampEditor(t)}return null}function _createAndAddNewEditor2(t,r){var a=this.getNextId(),i=_classPrivateMethodGet(this,A,_createNewEditor2).call(this,{parent:this,id:a,x:t.offsetX,y:t.offsetY,uiManager:_classPrivateFieldGet(this,P),isCentered:r});i&&this.add(i);return i}function _getCenterPoint2(){var t=this.div.getBoundingClientRect(),r=t.x,a=t.y,i=t.width,o=t.height,l=Math.max(0,r),c=Math.max(0,a),u=(l+Math.min(window.innerWidth,r+i))/2-r,d=(c+Math.min(window.innerHeight,a+o))/2-a,h=_slicedToArray(this.viewport.rotation%180==0?[u,d]:[d,u],2);return{offsetX:h[0],offsetY:h[1]}}function _cleanup2(){_classPrivateFieldSet(this,b,!0);var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,g).values());try{for(r.s();!(t=r.n()).done;){var a=t.value;a.isEmpty()&&a.remove()}}catch(t){r.e(t)}finally{r.f()}_classPrivateFieldSet(this,b,!1)}_defineProperty(E,"_initialized",!1)},(t,r,a)=>{var i=a(3),o=a(7),l=a(12),c=a(5).f,u=a(6);i({target:"Object",stat:!0,forced:!u||o((function(){c(1)})),sham:!u},{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(t,r){return c(l(t),r)}})},(t,r,a)=>{var i=a(3),o=a(6),l=a(57),c=a(12),u=a(5),d=a(100);i({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(t){for(var r,a,i=c(t),o=u.f,h=l(i),p={},v=0;h.length>v;)void 0!==(a=o(i,r=h[v++]))&&d(p,r,a);return p}})},(t,r,a)=>{a(85);a(90);a(292);a(300);a(112);a(2);a(71);a(73);a(405);a(402);a(245);a(379);a(310);a(403);a(301);a(258);a(255);a(104);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.FreeTextEditor=void 0;a(363);a(407);a(105);a(140);a(280);a(146);a(148);a(149);a(249);a(92);a(123);a(302);a(347);a(167);a(289);var i=a(1),o=a(356),l=a(353),c=a(410);function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||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 _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||_unsupportedIterableToArray(t,r)||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(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function ownKeys(t,r){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),a.push.apply(a,i)}return a}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(a),!0).forEach((function(r){_defineProperty(t,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))}))}return t}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,a){var i=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(i){var o=Object.getOwnPropertyDescriptor(i,r);return o.get?o.get.call(arguments.length<3?t:a):o.value}};return _get.apply(this,arguments)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,a)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _defineProperty(t,r,a){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateFieldInitSpec(t,r,a){_checkPrivateRedeclaration(t,r);r.set(t,a)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function _classPrivateFieldSet(t,r,a){!function _classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,_classExtractFieldDescriptor(t,r,"set"),a);return a}function _classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}var u=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakMap,_=new WeakMap,g=new WeakMap,m=new WeakMap,b=new WeakSet,w=new WeakSet,P=new WeakSet,A=new WeakSet,S=new WeakSet,k=new WeakSet,x=new WeakSet,E=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(FreeTextEditor,t);var r=_createSuper(FreeTextEditor);function FreeTextEditor(t){var a;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,FreeTextEditor);_classPrivateMethodInitSpec(_assertThisInitialized(a=r.call(this,_objectSpread(_objectSpread({},t),{},{name:"freeTextEditor"}))),x);_classPrivateMethodInitSpec(_assertThisInitialized(a),k);_classPrivateMethodInitSpec(_assertThisInitialized(a),S);_classPrivateMethodInitSpec(_assertThisInitialized(a),A);_classPrivateMethodInitSpec(_assertThisInitialized(a),P);_classPrivateMethodInitSpec(_assertThisInitialized(a),w);_classPrivateMethodInitSpec(_assertThisInitialized(a),b);_classPrivateFieldInitSpec(_assertThisInitialized(a),u,{writable:!0,value:a.editorDivBlur.bind(_assertThisInitialized(a))});_classPrivateFieldInitSpec(_assertThisInitialized(a),d,{writable:!0,value:a.editorDivFocus.bind(_assertThisInitialized(a))});_classPrivateFieldInitSpec(_assertThisInitialized(a),h,{writable:!0,value:a.editorDivInput.bind(_assertThisInitialized(a))});_classPrivateFieldInitSpec(_assertThisInitialized(a),p,{writable:!0,value:a.editorDivKeydown.bind(_assertThisInitialized(a))});_classPrivateFieldInitSpec(_assertThisInitialized(a),v,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(a),y,{writable:!0,value:""});_classPrivateFieldInitSpec(_assertThisInitialized(a),_,{writable:!0,value:"".concat(a.id,"-editor")});_classPrivateFieldInitSpec(_assertThisInitialized(a),g,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(a),m,{writable:!0,value:null});_classPrivateFieldSet(_assertThisInitialized(a),v,t.color||FreeTextEditor._defaultColor||l.AnnotationEditor._defaultLineColor);_classPrivateFieldSet(_assertThisInitialized(a),g,t.fontSize||FreeTextEditor._defaultFontSize);return a}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(FreeTextEditor,[{key:"updateParams",value:function updateParams(t,r){switch(t){case i.AnnotationEditorParamsType.FREETEXT_SIZE:_classPrivateMethodGet(this,b,_updateFontSize2).call(this,r);break;case i.AnnotationEditorParamsType.FREETEXT_COLOR:_classPrivateMethodGet(this,w,_updateColor2).call(this,r)}}},{key:"propertiesToUpdate",get:function get(){return[[i.AnnotationEditorParamsType.FREETEXT_SIZE,_classPrivateFieldGet(this,g)],[i.AnnotationEditorParamsType.FREETEXT_COLOR,_classPrivateFieldGet(this,v)]]}},{key:"_translateEmpty",value:function _translateEmpty(t,r){this._uiManager.translateSelectedEditors(t,r,!0)}},{key:"getInitialTranslation",value:function getInitialTranslation(){var t=this.parentScale;return[-FreeTextEditor._internalPadding*t,-(FreeTextEditor._internalPadding+_classPrivateFieldGet(this,g))*t]}},{key:"rebuild",value:function rebuild(){if(this.parent){_get(_getPrototypeOf(FreeTextEditor.prototype),"rebuild",this).call(this);null!==this.div&&(this.isAttachedToDOM||this.parent.add(this))}}},{key:"enableEditMode",value:function enableEditMode(){if(!this.isInEditMode()){this.parent.setEditingState(!1);this.parent.updateToolbar(i.AnnotationEditorType.FREETEXT);_get(_getPrototypeOf(FreeTextEditor.prototype),"enableEditMode",this).call(this);this.overlayDiv.classList.remove("enabled");this.editorDiv.contentEditable=!0;this._isDraggable=!1;this.div.removeAttribute("aria-activedescendant");this.editorDiv.addEventListener("keydown",_classPrivateFieldGet(this,p));this.editorDiv.addEventListener("focus",_classPrivateFieldGet(this,d));this.editorDiv.addEventListener("blur",_classPrivateFieldGet(this,u));this.editorDiv.addEventListener("input",_classPrivateFieldGet(this,h))}}},{key:"disableEditMode",value:function disableEditMode(){if(this.isInEditMode()){this.parent.setEditingState(!0);_get(_getPrototypeOf(FreeTextEditor.prototype),"disableEditMode",this).call(this);this.overlayDiv.classList.add("enabled");this.editorDiv.contentEditable=!1;this.div.setAttribute("aria-activedescendant",_classPrivateFieldGet(this,_));this._isDraggable=!0;this.editorDiv.removeEventListener("keydown",_classPrivateFieldGet(this,p));this.editorDiv.removeEventListener("focus",_classPrivateFieldGet(this,d));this.editorDiv.removeEventListener("blur",_classPrivateFieldGet(this,u));this.editorDiv.removeEventListener("input",_classPrivateFieldGet(this,h));this.div.focus({preventScroll:!0});this.isEditing=!1;this.parent.div.classList.add("freeTextEditing")}}},{key:"focusin",value:function focusin(t){if(this._focusEventsAllowed){_get(_getPrototypeOf(FreeTextEditor.prototype),"focusin",this).call(this,t);t.target!==this.editorDiv&&this.editorDiv.focus()}}},{key:"onceAdded",value:function onceAdded(){var t;if(this.width)_classPrivateMethodGet(this,x,_cheatInitialRect2).call(this);else{this.enableEditMode();this.editorDiv.focus();null!==(t=this._initialOptions)&&void 0!==t&&t.isCentered&&this.center();this._initialOptions=null}}},{key:"isEmpty",value:function isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}},{key:"remove",value:function remove(){this.isEditing=!1;if(this.parent){this.parent.setEditingState(!0);this.parent.div.classList.add("freeTextEditing")}_get(_getPrototypeOf(FreeTextEditor.prototype),"remove",this).call(this)}},{key:"commit",value:function commit(){var t=this;if(this.isInEditMode()){_get(_getPrototypeOf(FreeTextEditor.prototype),"commit",this).call(this);this.disableEditMode();var r=_classPrivateFieldGet(this,y),a=_classPrivateFieldSet(this,y,_classPrivateMethodGet(this,P,_extractText2).call(this).trimEnd());if(r!==a){var i=function setText(r){_classPrivateFieldSet(t,y,r);if(r){_classPrivateMethodGet(t,S,_setContent2).call(t);t._uiManager.rebuild(t);_classPrivateMethodGet(t,A,_setEditorDimensions2).call(t)}else t.remove()};this.addCommands({cmd:function cmd(){i(a)},undo:function undo(){i(r)},mustExec:!1});_classPrivateMethodGet(this,A,_setEditorDimensions2).call(this)}}}},{key:"shouldGetKeyboardEvents",value:function shouldGetKeyboardEvents(){return this.isInEditMode()}},{key:"enterInEditMode",value:function enterInEditMode(){this.enableEditMode();this.editorDiv.focus()}},{key:"dblclick",value:function dblclick(t){this.enterInEditMode()}},{key:"keydown",value:function keydown(t){if(t.target===this.div&&"Enter"===t.key){this.enterInEditMode();t.preventDefault()}}},{key:"editorDivKeydown",value:function editorDivKeydown(t){FreeTextEditor._keyboardManager.exec(this,t)}},{key:"editorDivFocus",value:function editorDivFocus(t){this.isEditing=!0}},{key:"editorDivBlur",value:function editorDivBlur(t){this.isEditing=!1}},{key:"editorDivInput",value:function editorDivInput(t){this.parent.div.classList.toggle("freeTextEditing",this.isEmpty())}},{key:"disableEditing",value:function disableEditing(){this.editorDiv.setAttribute("role","comment");this.editorDiv.removeAttribute("aria-multiline")}},{key:"enableEditing",value:function enableEditing(){this.editorDiv.setAttribute("role","textbox");this.editorDiv.setAttribute("aria-multiline",!0)}},{key:"render",value:function render(){var t,r,a=this;if(this.div)return this.div;if(this.width){t=this.x;r=this.y}_get(_getPrototypeOf(FreeTextEditor.prototype),"render",this).call(this);this.editorDiv=document.createElement("div");this.editorDiv.className="internal";this.editorDiv.setAttribute("id",_classPrivateFieldGet(this,_));this.enableEditing();FreeTextEditor._l10nPromise.get("editor_free_text2_aria_label").then((function(t){var r;return null===(r=a.editorDiv)||void 0===r?void 0:r.setAttribute("aria-label",t)}));FreeTextEditor._l10nPromise.get("free_text2_default_content").then((function(t){var r;return null===(r=a.editorDiv)||void 0===r?void 0:r.setAttribute("default-content",t)}));this.editorDiv.contentEditable=!0;var i=this.editorDiv.style;i.fontSize="calc(".concat(_classPrivateFieldGet(this,g),"px * var(--scale-factor))");i.color=_classPrivateFieldGet(this,v);this.div.append(this.editorDiv);this.overlayDiv=document.createElement("div");this.overlayDiv.classList.add("overlay","enabled");this.div.append(this.overlayDiv);(0,o.bindEvents)(this,this.div,["dblclick","keydown"]);if(this.width){var l=_slicedToArray(this.parentDimensions,2),c=l[0],u=l[1];if(this.annotationElementId){var d=_classPrivateFieldGet(this,m).position,h=_slicedToArray(this.getInitialTranslation(),2),p=h[0],y=h[1],b=_slicedToArray(this.pageTranslationToScreen(p,y),2);p=b[0];y=b[1];var w,P,A=_slicedToArray(this.pageDimensions,2),k=A[0],x=A[1],E=_slicedToArray(this.pageTranslation,2),T=E[0],C=E[1];switch(this.rotation){case 0:w=t+(d[0]-T)/k;P=r+this.height-(d[1]-C)/x;break;case 90:w=t+(d[0]-T)/k;P=r-(d[1]-C)/x;var I=[y,-p];p=I[0];y=I[1];break;case 180:w=t-this.width+(d[0]-T)/k;P=r-(d[1]-C)/x;var M=[-p,-y];p=M[0];y=M[1];break;case 270:w=t+(d[0]-T-this.height*x)/k;P=r+(d[1]-C-this.width*k)/x;var O=[-y,p];p=O[0];y=O[1]}this.setAt(w*c,P*u,p,y)}else this.setAt(t*c,r*u,this.width*c,this.height*u);_classPrivateMethodGet(this,S,_setContent2).call(this);this._isDraggable=!0;this.editorDiv.contentEditable=!1}else{this._isDraggable=!1;this.editorDiv.contentEditable=!0}return this.div}},{key:"contentDiv",get:function get(){return this.editorDiv}},{key:"serialize",value:function serialize(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};var r=FreeTextEditor._internalPadding*this.parentScale,a=this.getRect(r,r),o=l.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:_classPrivateFieldGet(this,v)),c={annotationType:i.AnnotationEditorType.FREETEXT,color:o,fontSize:_classPrivateFieldGet(this,g),value:_classPrivateFieldGet(this,y),pageIndex:this.pageIndex,rect:a,rotation:this.rotation};if(t)return c;if(this.annotationElementId&&!_classPrivateMethodGet(this,k,_hasElementChanged2).call(this,c))return null;c.id=this.annotationElementId;return c}}],[{key:"_keyboardManager",get:function get(){var t=FreeTextEditor.prototype,r=function arrowChecker(t){return t.isEmpty()},a=o.AnnotationEditorUIManager.TRANSLATE_SMALL,l=o.AnnotationEditorUIManager.TRANSLATE_BIG;return(0,i.shadow)(this,"_keyboardManager",new o.KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-a,0],checker:r}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-l,0],checker:r}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[a,0],checker:r}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[l,0],checker:r}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-a],checker:r}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-l],checker:r}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,a],checker:r}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,l],checker:r}]]))}},{key:"initialize",value:function initialize(t){this._l10nPromise=new Map(["free_text2_default_content","editor_free_text2_aria_label"].map((function(r){return[r,t.get(r)]})));var r=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(r.getPropertyValue("--freetext-padding"))}},{key:"updateDefaultParams",value:function updateDefaultParams(t,r){switch(t){case i.AnnotationEditorParamsType.FREETEXT_SIZE:FreeTextEditor._defaultFontSize=r;break;case i.AnnotationEditorParamsType.FREETEXT_COLOR:FreeTextEditor._defaultColor=r}}},{key:"defaultPropertiesToUpdate",get:function get(){return[[i.AnnotationEditorParamsType.FREETEXT_SIZE,FreeTextEditor._defaultFontSize],[i.AnnotationEditorParamsType.FREETEXT_COLOR,FreeTextEditor._defaultColor||l.AnnotationEditor._defaultLineColor]]}},{key:"deserialize",value:function deserialize(t,r,a){var o=null;if(t instanceof c.FreeTextAnnotationElement){var l=t,u=l.data,d=u.defaultAppearanceData,h=d.fontSize,p=d.fontColor,_=u.rect,b=u.rotation,w=u.id,P=l.textContent,A=l.textPosition,S=l.parent.page.pageNumber;if(!P||0===P.length)return null;o=t={annotationType:i.AnnotationEditorType.FREETEXT,color:Array.from(p),fontSize:h,value:P.join("\n"),position:A,pageIndex:S-1,rect:_,rotation:b,id:w,deleted:!1}}var k=_get(_getPrototypeOf(FreeTextEditor),"deserialize",this).call(this,t,r,a);_classPrivateFieldSet(k,g,t.fontSize);_classPrivateFieldSet(k,v,i.Util.makeHexColor.apply(i.Util,_toConsumableArray(t.color)));_classPrivateFieldSet(k,y,t.value);k.annotationElementId=t.id||null;_classPrivateFieldSet(k,m,o);return k}}]);return FreeTextEditor}(l.AnnotationEditor);r.FreeTextEditor=E;function _updateFontSize2(t){var r=this,a=function setFontsize(t){r.editorDiv.style.fontSize="calc(".concat(t,"px * var(--scale-factor))");r.translate(0,-(t-_classPrivateFieldGet(r,g))*r.parentScale);_classPrivateFieldSet(r,g,t);_classPrivateMethodGet(r,A,_setEditorDimensions2).call(r)},o=_classPrivateFieldGet(this,g);this.addCommands({cmd:function cmd(){a(t)},undo:function undo(){a(o)},mustExec:!0,type:i.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}function _updateColor2(t){var r=this,a=_classPrivateFieldGet(this,v);this.addCommands({cmd:function cmd(){_classPrivateFieldSet(r,v,r.editorDiv.style.color=t)},undo:function undo(){_classPrivateFieldSet(r,v,r.editorDiv.style.color=a)},mustExec:!0,type:i.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function _extractText2(){var t=this.editorDiv.getElementsByTagName("div");if(0===t.length)return this.editorDiv.innerText;var r,a=[],i=_createForOfIteratorHelper(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;a.push(o.innerText.replace(/\r\n?|\n/,""))}}catch(t){i.e(t)}finally{i.f()}return a.join("\n")}function _setEditorDimensions2(){var t,r=_slicedToArray(this.parentDimensions,2),a=r[0],i=r[1];if(this.isAttachedToDOM)t=this.div.getBoundingClientRect();else{var o=this.currentLayer,l=this.div,c=l.style.display;l.style.display="hidden";o.div.append(this.div);t=l.getBoundingClientRect();l.remove();l.style.display=c}if(this.rotation%180==this.parentRotation%180){this.width=t.width/a;this.height=t.height/i}else{this.width=t.height/a;this.height=t.width/i}this.fixAndSetPosition()}function _setContent2(){this.editorDiv.replaceChildren();if(_classPrivateFieldGet(this,y)){var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,y).split("\n"));try{for(r.s();!(t=r.n()).done;){var a=t.value,i=document.createElement("div");i.append(a?document.createTextNode(a):document.createElement("br"));this.editorDiv.append(i)}}catch(t){r.e(t)}finally{r.f()}}}function _hasElementChanged2(t){var r=_classPrivateFieldGet(this,m),a=r.value,i=r.fontSize,o=r.color,l=r.rect,c=r.pageIndex;return t.value!==a||t.fontSize!==i||t.rect.some((function(t,r){return Math.abs(t-l[r])>=1}))||t.color.some((function(t,r){return t!==o[r]}))||t.pageIndex!==c}function _cheatInitialRect2(){var t=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.annotationElementId){_classPrivateMethodGet(this,A,_setEditorDimensions2).call(this);if(r||0!==this.width&&0!==this.height){var a=E._internalPadding*this.parentScale;_classPrivateFieldGet(this,m).rect=this.getRect(a,a)}else setTimeout((function(){return _classPrivateMethodGet(t,x,_cheatInitialRect2).call(t,!0)}),0)}}_defineProperty(E,"_freeTextDefaultContent","");_defineProperty(E,"_l10nPromise",void 0);_defineProperty(E,"_internalPadding",0);_defineProperty(E,"_defaultColor",null);_defineProperty(E,"_defaultFontSize",10);_defineProperty(E,"_type","freetext")},(t,r,a)=>{var i=a(3),o=a(8),l=a(20),c=a(47),u=a(406),d=a(5),h=a(69);i({target:"Reflect",stat:!0},{get:function get(t,r){var a,i,p=arguments.length<3?t:arguments[2];return c(t)===p?t[r]:(a=d.f(t,r))?u(a)?a.value:void 0===a.get?void 0:o(a.get,p):l(i=h(t))?get(i,r,p):void 0}})},(t,r,a)=>{var i=a(39);t.exports=function(t){return void 0!==t&&(i(t,"value")||i(t,"writable"))}},(t,r,a)=>{a(408);var i=a(3),o=a(409);i({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==o},{trimEnd:o})},(t,r,a)=>{var i=a(3),o=a(409);i({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==o},{trimRight:o})},(t,r,a)=>{var i=a(118).end,o=a(364);t.exports=o("trimEnd")?function trimEnd(){return i(this)}:"".trimEnd},(t,r,a)=>{a(85);a(90);a(292);a(300);a(123);a(112);a(301);a(2);a(71);a(73);a(405);a(402);a(259);a(306);a(307);a(308);a(309);a(310);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.StampAnnotationElement=r.InkAnnotationElement=r.FreeTextAnnotationElement=r.AnnotationLayer=void 0;a(140);a(146);a(148);a(347);a(149);a(257);a(258);a(245);a(351);a(167);a(280);a(312);a(314);a(325);a(327);a(329);a(331);a(333);a(335);a(411);a(297);a(247);a(248);a(105);a(289);a(291);a(255);a(135);a(249);a(379);a(412);a(413);a(415);a(365);a(104);a(92);a(302);var i=a(1),o=a(362),l=a(349),c=a(416),u=a(417),d=a(418);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,r,a){t[r]=a.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,o){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(o||[]);return i(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var h={};define(h,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&a.call(v,l)&&(h=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(h);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,o,l,c){var u=tryCatch(t[i],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==_typeof(h)&&a.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function value(t,a){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,a,r,i)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,a){var i="suspendedStart";return function(o,l){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw l;return{value:void 0,done:!0}}for(a.method=o,a.arg=l;;){var c=a.delegate;if(c){var u=maybeInvokeDelegate(c,a);if(u){if(u===d)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===i)throw i="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i="executing";var h=tryCatch(t,r,a);if("normal"===h.type){if(i=a.done?"completed":"suspendedYield",h.arg===d)continue;return{value:h.arg,done:a.done}}"throw"===h.type&&(i="completed",a.method="throw",a.arg=h.arg)}}}function maybeInvokeDelegate(t,r){var a=r.method,i=t.iterator[a];if(void 0===i)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),d;var o=tryCatch(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,d):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function next(){for(;++i<t.length;)if(a.call(t,i))return next.value=t[i],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,i(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),i(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(r,a,i,o),l);return t.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(y),define(y,u,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(a,i){return l.type="throw",l.arg=t,r.next=a,i&&(r.method="next",r.arg=void 0),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,d):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),d}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,a){return this.delegate={iterator:values(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=void 0),d}},t}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,a){var i=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(i){var o=Object.getOwnPropertyDescriptor(i,r);return o.get?o.get.call(arguments.length<3?t:a):o.value}};return _get.apply(this,arguments)}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||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 _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,a)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||_unsupportedIterableToArray(t,r)||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(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _defineProperty(t,r,a){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}function _classPrivateFieldInitSpec(t,r,a){_checkPrivateRedeclaration(t,r);r.set(t,a)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,a){!function _classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,_classExtractFieldDescriptor(t,r,"set"),a);return a}function _classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}var h=1e3,p=new WeakSet;function getRectDims(t){return{width:t[2]-t[0],height:t[3]-t[1]}}var v=function(){function AnnotationElementFactory(){_classCallCheck(this,AnnotationElementFactory)}_createClass(AnnotationElementFactory,null,[{key:"create",value:function create(t){switch(t.data.annotationType){case i.AnnotationType.LINK:return new b(t);case i.AnnotationType.TEXT:return new w(t);case i.AnnotationType.WIDGET:switch(t.data.fieldType){case"Tx":return new A(t);case"Btn":return t.data.radioButton?new x(t):t.data.checkBox?new k(t):new E(t);case"Ch":return new T(t);case"Sig":return new S(t)}return new P(t);case i.AnnotationType.POPUP:return new C(t);case i.AnnotationType.FREETEXT:return new $(t);case i.AnnotationType.LINE:return new Z(t);case i.AnnotationType.SQUARE:return new te(t);case i.AnnotationType.CIRCLE:return new ne(t);case i.AnnotationType.POLYLINE:return new ie(t);case i.AnnotationType.CARET:return new se(t);case i.AnnotationType.INK:return new ce(t);case i.AnnotationType.POLYGON:return new oe(t);case i.AnnotationType.HIGHLIGHT:return new ue(t);case i.AnnotationType.UNDERLINE:return new de(t);case i.AnnotationType.SQUIGGLY:return new he(t);case i.AnnotationType.STRIKEOUT:return new fe(t);case i.AnnotationType.STAMP:return new pe(t);case i.AnnotationType.FILEATTACHMENT:return new ye(t);default:return new _(t)}}}]);return AnnotationElementFactory}(),y=new WeakMap,_=function(){function AnnotationElement(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.isRenderable,i=void 0!==a&&a,o=r.ignoreBorder,l=void 0!==o&&o,c=r.createQuadrilaterals,u=void 0!==c&&c;_classCallCheck(this,AnnotationElement);_classPrivateFieldInitSpec(this,y,{writable:!0,value:!1});this.isRenderable=i;this.data=t.data;this.layer=t.layer;this.linkService=t.linkService;this.downloadManager=t.downloadManager;this.imageResourcesPath=t.imageResourcesPath;this.renderForms=t.renderForms;this.svgFactory=t.svgFactory;this.annotationStorage=t.annotationStorage;this.enableScripting=t.enableScripting;this.hasJSActions=t.hasJSActions;this._fieldObjects=t.fieldObjects;this.parent=t.parent;i&&(this.container=this._createContainer(l));u&&this._createQuadrilaterals()}_createClass(AnnotationElement,[{key:"_createContainer",value:function _createContainer(t){var r=this.data,a=this.parent,o=a.page,l=a.viewport,c=document.createElement("section");c.setAttribute("data-annotation-id",r.id);c.style.zIndex=this.parent.zIndex++;this.data.popupRef&&c.setAttribute("aria-haspopup","dialog");r.noRotate&&c.classList.add("norotate");var u=l.rawDims,d=u.pageWidth,h=u.pageHeight,p=u.pageX,v=u.pageY;if(!r.rect||this instanceof C){var _=r.rotation;r.hasOwnCanvas||0===_||this.setRotation(_,c);return c}var g=getRectDims(r.rect),m=g.width,b=g.height,w=i.Util.normalizeRect([r.rect[0],o.view[3]-r.rect[1]+o.view[1],r.rect[2],o.view[3]-r.rect[3]+o.view[1]]);if(!t&&r.borderStyle.width>0){c.style.borderWidth="".concat(r.borderStyle.width,"px");var P=r.borderStyle.horizontalCornerRadius,A=r.borderStyle.verticalCornerRadius;if(P>0||A>0){var S="calc(".concat(P,"px * var(--scale-factor)) / calc(").concat(A,"px * var(--scale-factor))");c.style.borderRadius=S}else if(this instanceof x){var k="calc(".concat(m,"px * var(--scale-factor)) / calc(").concat(b,"px * var(--scale-factor))");c.style.borderRadius=k}switch(r.borderStyle.style){case i.AnnotationBorderStyleType.SOLID:c.style.borderStyle="solid";break;case i.AnnotationBorderStyleType.DASHED:c.style.borderStyle="dashed";break;case i.AnnotationBorderStyleType.BEVELED:(0,i.warn)("Unimplemented border style: beveled");break;case i.AnnotationBorderStyleType.INSET:(0,i.warn)("Unimplemented border style: inset");break;case i.AnnotationBorderStyleType.UNDERLINE:c.style.borderBottomStyle="solid"}var E=r.borderColor||null;if(E){_classPrivateFieldSet(this,y,!0);c.style.borderColor=i.Util.makeHexColor(0|E[0],0|E[1],0|E[2])}else c.style.borderWidth=0}c.style.left="".concat(100*(w[0]-p)/d,"%");c.style.top="".concat(100*(w[1]-v)/h,"%");var T=r.rotation;if(r.hasOwnCanvas||0===T){c.style.width="".concat(100*m/d,"%");c.style.height="".concat(100*b/h,"%")}else this.setRotation(T,c);return c}},{key:"setRotation",value:function setRotation(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.container;if(this.data.rect){var a,i,o=this.parent.viewport.rawDims,l=o.pageWidth,c=o.pageHeight,u=getRectDims(this.data.rect),d=u.width,h=u.height;if(t%180==0){a=100*d/l;i=100*h/c}else{a=100*h/l;i=100*d/c}r.style.width="".concat(a,"%");r.style.height="".concat(i,"%");r.setAttribute("data-main-rotation",(360-t)%360)}}},{key:"_commonActions",get:function get(){var t=this,r=function setColor(r,a,i){var o=i.detail[r],l=o[0],u=o.slice(1);i.target.style[a]=c.ColorConverters["".concat(l,"_HTML")](u);t.annotationStorage.setValue(t.data.id,_defineProperty({},a,c.ColorConverters["".concat(l,"_rgb")](u)))};return(0,i.shadow)(this,"_commonActions",{display:function display(r){var display=r.detail.display,a=display%2==1;t.container.style.visibility=a?"hidden":"visible";t.annotationStorage.setValue(t.data.id,{noView:a,noPrint:1===display||2===display})},print:function print(r){t.annotationStorage.setValue(t.data.id,{noPrint:!r.detail.print})},hidden:function hidden(r){var hidden=r.detail.hidden;t.container.style.visibility=hidden?"hidden":"visible";t.annotationStorage.setValue(t.data.id,{noPrint:hidden,noView:hidden})},focus:function focus(t){setTimeout((function(){return t.target.focus({preventScroll:!1})}),0)},userName:function userName(t){t.target.title=t.detail.userName},readonly:function readonly(t){t.target.disabled=t.detail.readonly},required:function required(r){t._setRequired(r.target,r.detail.required)},bgColor:function bgColor(t){r("bgColor","backgroundColor",t)},fillColor:function fillColor(t){r("fillColor","backgroundColor",t)},fgColor:function fgColor(t){r("fgColor","color",t)},textColor:function textColor(t){r("textColor","color",t)},borderColor:function borderColor(t){r("borderColor","borderColor",t)},strokeColor:function strokeColor(t){r("strokeColor","borderColor",t)},rotation:function rotation(r){var a=r.detail.rotation;t.setRotation(a);t.annotationStorage.setValue(t.data.id,{rotation:a})}})}},{key:"_dispatchEventFromSandbox",value:function _dispatchEventFromSandbox(t,r){for(var a=this._commonActions,i=0,o=Object.keys(r.detail);i<o.length;i++){var l=o[i],c=t[l]||a[l];null==c||c(r)}}},{key:"_setDefaultPropertiesFromJS",value:function _setDefaultPropertiesFromJS(t){if(this.enableScripting){var r=this.annotationStorage.getRawValue(this.data.id);if(r)for(var a=this._commonActions,i=0,o=Object.entries(r);i<o.length;i++){var l=_slicedToArray(o[i],2),c=l[0],u=l[1],d=a[c];if(d){d({detail:_defineProperty({},c,u),target:t});delete r[c]}}}}},{key:"_createQuadrilaterals",value:function _createQuadrilaterals(){if(this.container){var t=this.data.quadPoints;if(t){var r=_slicedToArray(this.data.rect,4),a=r[0],i=r[1],o=r[2],l=r[3];if(1===t.length){var c=_slicedToArray(t[0],3),u=c[1],d=u.x,h=u.y,p=c[2],v=p.x,_=p.y;if(o===d&&l===h&&a===v&&i===_)return}var g,m=this.container.style;if(_classPrivateFieldGet(this,y)){var b=m.borderColor,w=m.borderWidth;m.borderWidth=0;g=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">','<g fill="transparent" stroke="'.concat(b,'" stroke-width="').concat(w,'">')];this.container.classList.add("hasBorder")}var P=o-a,A=l-i,S=this.svgFactory,k=S.createElement("svg");k.classList.add("quadrilateralsContainer");k.setAttribute("width",0);k.setAttribute("height",0);var x=S.createElement("defs");k.append(x);var E=S.createElement("clipPath"),T="clippath_".concat(this.data.id);E.setAttribute("id",T);E.setAttribute("clipPathUnits","objectBoundingBox");x.append(E);var C,I=_createForOfIteratorHelper(t);try{for(I.s();!(C=I.n()).done;){var M,O=_slicedToArray(C.value,3),R=O[1],G=R.x,L=R.y,D=O[2],j=D.x,N=D.y,W=S.createElement("rect"),B=(j-a)/P,U=(l-L)/A,H=(G-j)/P,z=(L-N)/A;W.setAttribute("x",B);W.setAttribute("y",U);W.setAttribute("width",H);W.setAttribute("height",z);E.append(W);null===(M=g)||void 0===M||M.push('<rect vector-effect="non-scaling-stroke" x="'.concat(B,'" y="').concat(U,'" width="').concat(H,'" height="').concat(z,'"/>'))}}catch(t){I.e(t)}finally{I.f()}if(_classPrivateFieldGet(this,y)){g.push("</g></svg>')");m.backgroundImage=g.join("")}this.container.append(k);this.container.style.clipPath="url(#".concat(T,")")}}}},{key:"_createPopup",value:function _createPopup(){var t=this.container,r=this.data;t.setAttribute("aria-haspopup","dialog");var a=new C({data:{color:r.color,titleObj:r.titleObj,modificationDate:r.modificationDate,contentsObj:r.contentsObj,richText:r.richText,parentRect:r.rect,borderStyle:0,id:"popup_".concat(r.id),rotation:r.rotation},parent:this.parent,elements:[this]});this.parent.div.append(a.render())}},{key:"render",value:function render(){(0,i.unreachable)("Abstract method `AnnotationElement.render` called")}},{key:"_getElementsByName",value:function _getElementsByName(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=[];if(this._fieldObjects){var o=this._fieldObjects[t];if(o){var l,c=_createForOfIteratorHelper(o);try{for(c.s();!(l=c.n()).done;){var u=l.value,d=u.page,h=u.id,v=u.exportValues;if(-1!==d&&h!==r){var y="string"==typeof v?v:null,_=document.querySelector('[data-element-id="'.concat(h,'"]'));!_||p.has(_)?a.push({id:h,exportValue:y,domElement:_}):(0,i.warn)("_getElementsByName - element not allowed: ".concat(h))}}}catch(t){c.e(t)}finally{c.f()}}return a}var g,m=_createForOfIteratorHelper(document.getElementsByName(t));try{for(m.s();!(g=m.n()).done;){var b=g.value,w=b.exportValue,P=b.getAttribute("data-element-id");P!==r&&(p.has(b)&&a.push({id:P,exportValue:w,domElement:b}))}}catch(t){m.e(t)}finally{m.f()}return a}},{key:"show",value:function show(){var t;this.container&&(this.container.hidden=!1);null===(t=this.popup)||void 0===t||t.maybeShow()}},{key:"hide",value:function hide(){var t;this.container&&(this.container.hidden=!0);null===(t=this.popup)||void 0===t||t.forceHide()}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return this.container}},{key:"addHighlightArea",value:function addHighlightArea(){var t=this.getElementsToTriggerPopup();if(Array.isArray(t)){var r,a=_createForOfIteratorHelper(t);try{for(a.s();!(r=a.n()).done;){r.value.classList.add("highlightArea")}}catch(t){a.e(t)}finally{a.f()}}else t.classList.add("highlightArea")}},{key:"_editOnDoubleClick",value:function _editOnDoubleClick(){var t=this,r=this.annotationEditorType,a=this.data.id;this.container.addEventListener("dblclick",(function(){var i;null===(i=t.linkService.eventBus)||void 0===i||i.dispatch("switchannotationeditormode",{source:t,mode:r,editId:a})}))}}]);return AnnotationElement}(),g=new WeakSet,m=new WeakSet,b=function(t){_inherits(LinkAnnotationElement,t);var r=_createSuper(LinkAnnotationElement);function LinkAnnotationElement(t){var a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;_classCallCheck(this,LinkAnnotationElement);_classPrivateMethodInitSpec(_assertThisInitialized(a=r.call(this,t,{isRenderable:!0,ignoreBorder:!(null==i||!i.ignoreBorder),createQuadrilaterals:!0})),m);_classPrivateMethodInitSpec(_assertThisInitialized(a),g);a.isTooltipOnly=t.data.isTooltipOnly;return a}_createClass(LinkAnnotationElement,[{key:"render",value:function render(){var t=this.data,r=this.linkService,a=document.createElement("a");a.setAttribute("data-element-id",t.id);var i=!1;if(t.url){r.addLinkAttributes(a,t.url,t.newWindow);i=!0}else if(t.action){this._bindNamedAction(a,t.action);i=!0}else if(t.attachment){this._bindAttachment(a,t.attachment);i=!0}else if(t.setOCGState){_classPrivateMethodGet(this,m,_bindSetOCGState2).call(this,a,t.setOCGState);i=!0}else if(t.dest){this._bindLink(a,t.dest);i=!0}else{if(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions){this._bindJSAction(a,t);i=!0}if(t.resetForm){this._bindResetFormAction(a,t.resetForm);i=!0}else if(this.isTooltipOnly&&!i){this._bindLink(a,"");i=!0}}this.container.classList.add("linkAnnotation");i&&this.container.append(a);return this.container}},{key:"_bindLink",value:function _bindLink(t,r){var a=this;t.href=this.linkService.getDestinationHash(r);t.onclick=function(){r&&a.linkService.goToDestination(r);return!1};(r||""===r)&&_classPrivateMethodGet(this,g,_setInternalLink2).call(this)}},{key:"_bindNamedAction",value:function _bindNamedAction(t,r){var a=this;t.href=this.linkService.getAnchorUrl("");t.onclick=function(){a.linkService.executeNamedAction(r);return!1};_classPrivateMethodGet(this,g,_setInternalLink2).call(this)}},{key:"_bindAttachment",value:function _bindAttachment(t,r){var a=this;t.href=this.linkService.getAnchorUrl("");t.onclick=function(){var t;null===(t=a.downloadManager)||void 0===t||t.openOrDownloadData(a.container,r.content,r.filename);return!1};_classPrivateMethodGet(this,g,_setInternalLink2).call(this)}},{key:"_bindJSAction",value:function _bindJSAction(t,r){var a=this;t.href=this.linkService.getAnchorUrl("");for(var i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]),o=function _loop(){var o=c[l],u=i.get(o);if(!u)return 1;t[u]=function(){var t;null===(t=a.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:a,detail:{id:r.id,name:o}});return!1}},l=0,c=Object.keys(r.actions);l<c.length;l++)o();t.onclick||(t.onclick=function(){return!1});_classPrivateMethodGet(this,g,_setInternalLink2).call(this)}},{key:"_bindResetFormAction",value:function _bindResetFormAction(t,r){var a=this,o=t.onclick;o||(t.href=this.linkService.getAnchorUrl(""));_classPrivateMethodGet(this,g,_setInternalLink2).call(this);if(this._fieldObjects)t.onclick=function(){null==o||o();var t=r.fields,l=r.refs,c=r.include,u=[];if(0!==t.length||0!==l.length){var d,h=new Set(l),v=_createForOfIteratorHelper(t);try{for(v.s();!(d=v.n()).done;){var y,_=d.value,g=_createForOfIteratorHelper(a._fieldObjects[_]||[]);try{for(g.s();!(y=g.n()).done;){var m=y.value.id;h.add(m)}}catch(t){g.e(t)}finally{g.f()}}}catch(t){v.e(t)}finally{v.f()}for(var b=0,w=Object.values(a._fieldObjects);b<w.length;b++){var P,A=_createForOfIteratorHelper(w[b]);try{for(A.s();!(P=A.n()).done;){var S=P.value;h.has(S.id)===c&&u.push(S)}}catch(t){A.e(t)}finally{A.f()}}}else for(var k=0,x=Object.values(a._fieldObjects);k<x.length;k++){var E=x[k];u.push.apply(u,_toConsumableArray(E))}for(var T=a.annotationStorage,C=[],I=0,M=u;I<M.length;I++){var O=M[I],R=O.id;C.push(R);switch(O.type){case"text":var G=O.defaultValue||"";T.setValue(R,{value:G});window.updateAngularFormValue(R,{value:G});break;case"checkbox":case"radiobutton":var L=O.defaultValue===O.exportValues;T.setValue(R,{value:L});window.updateAngularFormValue(R,{value:L});break;case"combobox":case"listbox":var D=O.defaultValue||"";T.setValue(R,{value:D});window.updateAngularFormValue(R,{value:D});break;default:continue}var j=document.querySelector('[data-element-id="'.concat(R,'"]'));j&&(p.has(j)?j.dispatchEvent(new Event("resetform")):(0,i.warn)("_bindResetFormAction - element not allowed: ".concat(R)))}if(a.enableScripting){var N;null===(N=a.linkService.eventBus)||void 0===N||N.dispatch("dispatcheventinsandbox",{source:a,detail:{id:"app",ids:C,name:"ResetForm"}})}return!1};else{(0,i.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.');o||(t.onclick=function(){return!1})}}}]);return LinkAnnotationElement}(_);function _setInternalLink2(){this.container.setAttribute("data-internal-link","")}function _bindSetOCGState2(t,r){var a=this;t.href=this.linkService.getAnchorUrl("");t.onclick=function(){a.linkService.executeSetOCGState(r);return!1};_classPrivateMethodGet(this,g,_setInternalLink2).call(this)}var w=function(t){_inherits(TextAnnotationElement,t);var r=_createSuper(TextAnnotationElement);function TextAnnotationElement(t){var a,i,o;_classCallCheck(this,TextAnnotationElement);var l=!!(t.data.popupRef||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l})}_createClass(TextAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("textAnnotation");var t=document.createElement("img");t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg";t.alt="[{{type}} Annotation]";t.dataset.l10nId="text_annotation_type";t.dataset.l10nArgs=JSON.stringify({type:this.data.name});this.data.popupRef||this._createPopup();this.container.append(t);return this.container}}]);return TextAnnotationElement}(_),P=function(t){_inherits(WidgetAnnotationElement,t);var r=_createSuper(WidgetAnnotationElement);function WidgetAnnotationElement(){_classCallCheck(this,WidgetAnnotationElement);return r.apply(this,arguments)}_createClass(WidgetAnnotationElement,[{key:"render",value:function render(){this.data.alternativeText&&(this.container.title=this.data.alternativeText);return this.container}},{key:"showElementAndHideCanvas",value:function showElementAndHideCanvas(t){if(this.data.hasOwnCanvas){var r;"CANVAS"===(null===(r=t.previousSibling)||void 0===r?void 0:r.nodeName)&&(t.previousSibling.hidden=!0);t.hidden=!1}}},{key:"_getKeyModifier",value:function _getKeyModifier(t){var r=i.FeatureTest.platform,a=r.isWin,o=r.isMac;return a&&t.ctrlKey||o&&t.metaKey}},{key:"_setEventListener",value:function _setEventListener(t,r,a,i){var o=this;r.includes("mouse")?t.addEventListener(r,(function(t){var r;null===(r=o.linkService.eventBus)||void 0===r||r.dispatch("dispatcheventinsandbox",{source:o,detail:{id:o.data.id,name:a,value:i(t),shift:t.shiftKey,modifier:o._getKeyModifier(t)}})})):t.addEventListener(r,(function(t){var r;null===(r=o.linkService.eventBus)||void 0===r||r.dispatch("dispatcheventinsandbox",{source:o,detail:{id:o.data.id,name:a,value:i(t)}})}))}},{key:"_setEventListeners",value:function _setEventListeners(t,r,a){var i,o=_createForOfIteratorHelper(r);try{for(o.s();!(i=o.n()).done;){var l,c=_slicedToArray(i.value,2),u=c[0],d=c[1];("Action"===d||null!==(l=this.data.actions)&&void 0!==l&&l[d])&&this._setEventListener(t,u,d,a)}}catch(t){o.e(t)}finally{o.f()}}},{key:"_setBackgroundColor",value:function _setBackgroundColor(t){var r=this.data.backgroundColor||null;t.style.backgroundColor=null===r?"transparent":i.Util.makeHexColor(r[0],r[1],r[2])}},{key:"_setTextStyle",value:function _setTextStyle(t){var r,a=this.data.defaultAppearanceData.fontColor,o=this.data.defaultAppearanceData.fontSize||9,l=t.style,c=function roundToOneDecimal(t){return Math.round(10*t)/10};if(this.data.multiLine){var u=Math.abs(this.data.rect[3]-this.data.rect[1]-2),d=u/(Math.round(u/(i.LINE_FACTOR*o))||1);r=Math.min(o,c(d/i.LINE_FACTOR))}else{var h=Math.abs(this.data.rect[3]-this.data.rect[1]-2);r=Math.min(o,c(h/i.LINE_FACTOR))}l.fontSize="calc(".concat(r,"px * var(--scale-factor))");l.color=i.Util.makeHexColor(a[0],a[1],a[2]);null!==this.data.textAlignment&&(l.textAlign=["left","center","right"][this.data.textAlignment])}},{key:"_setRequired",value:function _setRequired(t,r){r?t.setAttribute("required",!0):t.removeAttribute("required");t.setAttribute("aria-required",r)}}]);return WidgetAnnotationElement}(_),A=function(t){_inherits(TextWidgetAnnotationElement,t);var r=_createSuper(TextWidgetAnnotationElement);function TextWidgetAnnotationElement(t){_classCallCheck(this,TextWidgetAnnotationElement);var a=t.renderForms||!t.data.hasAppearance&&!!t.data.fieldValue;return r.call(this,t,{isRenderable:a})}_createClass(TextWidgetAnnotationElement,[{key:"setPropertyOnSiblings",value:function setPropertyOnSiblings(t,r,a,i){var o,l=this.annotationStorage,c=_createForOfIteratorHelper(this._getElementsByName(t.name,t.id));try{for(c.s();!(o=c.n()).done;){var u=o.value;u.domElement&&(u.domElement[r]=a);l.setValue(u.id,_defineProperty({},i,a))}}catch(t){c.e(t)}finally{c.f()}}},{key:"render",value:function render(){var t=this,r=this.annotationStorage,a=this.data.id;this.container.classList.add("textWidgetAnnotation");var i=null;if(this.renderForms){var o,l=window.getFormValueFromAngular(this.data.fieldName),c=r.getValue(a,{value:this.data.fieldValue}),u=l.value?l:c;l!==c&&r.setValue(a,{value:l.value});var d=u.value||"",v=r.getValue(a,{charLimit:this.data.maxLen}).charLimit;v&&d.length>v&&(d=d.slice(0,v));var y=u.formattedValue||(null===(o=this.data.textContent)||void 0===o?void 0:o.join("\n"))||null;y&&this.data.comb&&(y=y.replaceAll(/\s+/g,""));var _={userValue:d,formattedValue:y,lastCommittedValue:null,commitKey:1};if(this.data.multiLine){var g;(i=document.createElement("textarea")).textContent=null!==(g=y)&&void 0!==g?g:d;this.data.doNotScroll&&(i.style.overflowY="hidden")}else{var m;(i=document.createElement("input")).type="text";i.setAttribute("value",null!==(m=y)&&void 0!==m?m:d);this.data.doNotScroll&&(i.style.overflowX="hidden")}this.data.hasOwnCanvas&&(i.hidden=!0);p.add(i);i.setAttribute("data-element-id",a);i.disabled=this.data.readOnly;i.name=this.data.fieldName;i.tabIndex=h;this._setRequired(i,this.data.required);v&&(i.maxLength=v);i.addEventListener("input",(function(o){r.setValue(a,{value:o.target.value});window.updateAngularFormValue(a,{value:o.target.value});t.setPropertyOnSiblings(i,"value",o.target.value,"value");_.formattedValue=null}));i.addEventListener("resetform",(function(r){var a,o=null!==(a=t.data.defaultFieldValue)&&void 0!==a?a:"";i.value=_.userValue=o;_.formattedValue=null}));var b=function blurListener(t){var r=_.formattedValue;null!=r&&(t.target.value=r);t.target.scrollLeft=0};window.registerAcroformField(a,i,u.value);i.addEventListener("updateFromAngular",(function(t){return r.setValue(a,{value:t.detail})}));if(this.enableScripting&&this.hasJSActions){var w;i.addEventListener("focus",(function(t){var r=t.target;_.userValue&&(r.value=_.userValue);_.lastCommittedValue=r.value;_.commitKey=1}));i.addEventListener("updatefromsandbox",(function(i){t.showElementAndHideCanvas(i.target);var o={value:function value(t){var i;_.userValue=null!==(i=t.detail.value)&&void 0!==i?i:"";r.setValue(a,{value:_.userValue.toString()});window.updateAngularFormValue(a,{value:_.userValue.toString()});t.target.value=_.userValue},formattedValue:function formattedValue(t){var formattedValue=t.detail.formattedValue;_.formattedValue=formattedValue;null!=formattedValue&&t.target!==document.activeElement&&(t.target.value=formattedValue);r.setValue(a,{formattedValue:formattedValue});window.updateAngularFormValue(a,{formattedValue:formattedValue})},selRange:function selRange(t){var r;(r=t.target).setSelectionRange.apply(r,_toConsumableArray(t.detail.selRange))},charLimit:function charLimit(i){var o,charLimit=i.detail.charLimit,l=i.target;if(0!==charLimit){l.setAttribute("maxLength",charLimit);var c=_.userValue;if(c&&!(c.length<=charLimit)){c=c.slice(0,charLimit);l.value=_.userValue=c;r.setValue(a,{value:c});window.updateAngularFormValue(a,{value:c});null===(o=t.linkService.eventBus)||void 0===o||o.dispatch("dispatcheventinsandbox",{source:t,detail:{id:a,name:"Keystroke",value:c,willCommit:!0,commitKey:1,selStart:l.selectionStart,selEnd:l.selectionEnd}})}}else l.removeAttribute("maxLength")}};t._dispatchEventFromSandbox(o,i)}));i.addEventListener("keydown",(function(r){var i;_.commitKey=1;var o=-1;"Escape"===r.key?o=0:"Enter"!==r.key||t.data.multiLine?"Tab"===r.key&&(_.commitKey=3):o=2;if(-1!==o){var l=r.target.value;if(_.lastCommittedValue!==l){_.lastCommittedValue=l;_.userValue=l;null===(i=t.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:t,detail:{id:a,name:"Keystroke",value:l,willCommit:!0,commitKey:o,selStart:r.target.selectionStart,selEnd:r.target.selectionEnd}})}}}));var P=b;b=null;i.addEventListener("blur",(function(r){if(r.relatedTarget){var i=r.target.value;_.userValue=i;if(_.lastCommittedValue!==i){var o;null===(o=t.linkService.eventBus)||void 0===o||o.dispatch("dispatcheventinsandbox",{source:t,detail:{id:a,name:"Keystroke",value:i,willCommit:!0,commitKey:_.commitKey,selStart:r.target.selectionStart,selEnd:r.target.selectionEnd}})}P(r)}}));null!==(w=this.data.actions)&&void 0!==w&&w.Keystroke&&i.addEventListener("beforeinput",(function(r){var i;_.lastCommittedValue=null;var o=r.data,l=r.target,c=l.value,u=l.selectionStart,d=l.selectionEnd,h=u,p=d;switch(r.inputType){case"deleteWordBackward":var v=c.substring(0,u).match(/\w*[^\w]*$/);v&&(h-=v[0].length);break;case"deleteWordForward":var y=c.substring(u).match(/^[^\w]*\w*/);y&&(p+=y[0].length);break;case"deleteContentBackward":u===d&&(h-=1);break;case"deleteContentForward":u===d&&(p+=1)}r.preventDefault();null===(i=t.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:t,detail:{id:a,name:"Keystroke",value:c,change:o||"",willCommit:!1,selStart:h,selEnd:p}})}));this._setEventListeners(i,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.value}))}b&&i.addEventListener("blur",b);if(this.data.comb){var A=(this.data.rect[2]-this.data.rect[0])/v;i.classList.add("comb");i.style.letterSpacing="calc(".concat(A,"px * var(--scale-factor) - 1ch)")}}else{(i=document.createElement("div")).textContent=this.data.fieldValue;i.style.verticalAlign="middle";i.style.display="table-cell"}this._setTextStyle(i);this._setBackgroundColor(i);this._setDefaultPropertiesFromJS(i);this.container.append(i);return this.container}}]);return TextWidgetAnnotationElement}(P),S=function(t){_inherits(SignatureWidgetAnnotationElement,t);var r=_createSuper(SignatureWidgetAnnotationElement);function SignatureWidgetAnnotationElement(t){_classCallCheck(this,SignatureWidgetAnnotationElement);return r.call(this,t,{isRenderable:!!t.data.hasOwnCanvas})}return _createClass(SignatureWidgetAnnotationElement)}(P),k=function(t){_inherits(CheckboxWidgetAnnotationElement,t);var r=_createSuper(CheckboxWidgetAnnotationElement);function CheckboxWidgetAnnotationElement(t){_classCallCheck(this,CheckboxWidgetAnnotationElement);return r.call(this,t,{isRenderable:t.renderForms})}_createClass(CheckboxWidgetAnnotationElement,[{key:"render",value:function render(){var t=this,r=this.annotationStorage,a=this.data,i=a.id,o=window.getFormValueFromAngular(this.data.fieldName),l=r.getValue(i,{value:a.exportValue===a.fieldValue}).value,c=void 0;o.value&&(c=!0===o.value||o.value===a.exportValue);var u=void 0!==c?c:l,d=!1;if("string"==typeof u||o!==l){u="Off"!==u;r.setValue(i,{value:u});d=!0}this.container.classList.add("buttonWidgetAnnotation","checkBox");var v=document.createElement("input");p.add(v);v.setAttribute("data-element-id",i);v.disabled=a.readOnly;this._setRequired(v,this.data.required);v.type="checkbox";v.name=a.fieldName;u&&v.setAttribute("checked",!0);v.setAttribute("exportValue",a.exportValue);v.tabIndex=h;v.addEventListener("change",(function(o){var l,c=o.target,u=c.name,d=c.checked,h=_createForOfIteratorHelper(t._getElementsByName(u,i));try{for(h.s();!(l=h.n()).done;){var p=l.value,v=d&&p.exportValue===a.exportValue;p.domElement&&(p.domElement.checked=v);r.setValue(p.id,{value:v});window.updateAngularFormValue(i,{value:v})}}catch(t){h.e(t)}finally{h.f()}r.setValue(i,{value:d});window.updateAngularFormValue(i,{value:d})}));v.addEventListener("resetform",(function(t){var r=a.defaultFieldValue||"Off";t.target.checked=r===a.exportValue}));window.registerAcroformField(i,v,!!u&&a.exportValue);v.addEventListener("updateFromAngular",(function(t){return r.setValue(i,{value:t.detail})}));d&&window.updateAngularFormValue(i,{value:u});if(this.enableScripting&&this.hasJSActions){v.addEventListener("updatefromsandbox",(function(a){var o={value:function value(t){t.target.checked="Off"!==t.detail.value;r.setValue(i,{value:t.target.checked});window.updateAngularFormValue(i,{value:t.target.value})}};t._dispatchEventFromSandbox(o,a)}));this._setEventListeners(v,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.checked}))}this._setBackgroundColor(v);this._setDefaultPropertiesFromJS(v);this.container.append(v);return this.container}}]);return CheckboxWidgetAnnotationElement}(P),x=function(t){_inherits(RadioButtonWidgetAnnotationElement,t);var r=_createSuper(RadioButtonWidgetAnnotationElement);function RadioButtonWidgetAnnotationElement(t){_classCallCheck(this,RadioButtonWidgetAnnotationElement);return r.call(this,t,{isRenderable:t.renderForms})}_createClass(RadioButtonWidgetAnnotationElement,[{key:"render",value:function render(){var t,r=this;this.container.classList.add("buttonWidgetAnnotation","radioButton");var a=this.annotationStorage,i=this.data,o=i.id,l=window.getFormValueFromAngular(this.data.fieldName),c=a.getValue(o,{value:i.fieldValue===i.buttonValue}).value,u=null!==(t=l.value)&&void 0!==t?t:c;if("string"==typeof u||l!==c){u=u===i.buttonValue;a.setValue(o,{value:u})}else u&&window.updateAngularFormValue(o,{value:i.buttonValue});var d=document.createElement("input");p.add(d);d.setAttribute("data-element-id",o);d.disabled=i.readOnly;this._setRequired(d,this.data.required);d.type="radio";d.name=i.fieldName;u&&d.setAttribute("checked",!0);d.tabIndex=h;d.addEventListener("change",(function(t){var i,l=t.target,c=l.name,u=l.checked,d=_createForOfIteratorHelper(r._getElementsByName(c,o));try{for(d.s();!(i=d.n()).done;){var h=i.value;a.setValue(h.id,{value:!1});window.updateAngularFormValue(h.id,{value:!1})}}catch(t){d.e(t)}finally{d.f()}a.setValue(o,{value:u});window.updateAngularFormValue(o,{value:u})}));d.addEventListener("resetform",(function(t){var r=i.defaultFieldValue;t.target.checked=null!=r&&r===i.buttonValue}));window.registerAcroformField(o,d,u?i.buttonValue:void 0,i.buttonValue);d.addEventListener("updateFromAngular",(function(t){return a.setValue(o,{value:t.detail})}));if(this.enableScripting&&this.hasJSActions){var v=i.buttonValue;d.addEventListener("updatefromsandbox",(function(t){var i={value:function value(t){var i,l=v===t.detail.value,c=_createForOfIteratorHelper(r._getElementsByName(t.target.name));try{for(c.s();!(i=c.n()).done;){var u=i.value,d=l&&u.id===o;u.domElement&&(u.domElement.checked=d);a.setValue(u.id,{value:d});window.updateAngularFormValue(o,{value:d})}}catch(t){c.e(t)}finally{c.f()}}};r._dispatchEventFromSandbox(i,t)}));this._setEventListeners(d,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.checked}))}this._setBackgroundColor(d);this._setDefaultPropertiesFromJS(d);this.container.append(d);return this.container}}]);return RadioButtonWidgetAnnotationElement}(P),E=function(t){_inherits(PushButtonWidgetAnnotationElement,t);var r=_createSuper(PushButtonWidgetAnnotationElement);function PushButtonWidgetAnnotationElement(t){_classCallCheck(this,PushButtonWidgetAnnotationElement);return r.call(this,t,{ignoreBorder:t.data.hasAppearance})}_createClass(PushButtonWidgetAnnotationElement,[{key:"render",value:function render(){var t=this,r=_get(_getPrototypeOf(PushButtonWidgetAnnotationElement.prototype),"render",this).call(this);r.classList.add("buttonWidgetAnnotation","pushButton");this.data.alternativeText&&(r.title=this.data.alternativeText);var a=r.lastChild;if(this.enableScripting&&this.hasJSActions&&a){this._setDefaultPropertiesFromJS(a);a.addEventListener("updatefromsandbox",(function(r){t._dispatchEventFromSandbox({},r)}))}return r}}]);return PushButtonWidgetAnnotationElement}(b),T=function(t){_inherits(ChoiceWidgetAnnotationElement,t);var r=_createSuper(ChoiceWidgetAnnotationElement);function ChoiceWidgetAnnotationElement(t){_classCallCheck(this,ChoiceWidgetAnnotationElement);return r.call(this,t,{isRenderable:t.renderForms})}_createClass(ChoiceWidgetAnnotationElement,[{key:"render",value:function render(){var t=this;this.container.classList.add("choiceWidgetAnnotation");var r=this.annotationStorage,a=this.data.id,i=window.getFormValueFromAngular(this.data.fieldName),o=r.getValue(a,{value:this.data.fieldValue}),l=i.value?i:o;i!==o&&r.setValue(a,{value:i.value});var c=document.createElement("select");p.add(c);c.setAttribute("data-element-id",a);c.disabled=this.data.readOnly;this._setRequired(c,this.data.required);c.name=this.data.fieldName;c.tabIndex=h;var u=this.data.combo&&this.data.options.length>0;if(!this.data.combo){c.size=this.data.options.length;this.data.multiSelect&&(c.multiple=!0)}c.addEventListener("resetform",(function(r){var a,i=t.data.defaultFieldValue,o=_createForOfIteratorHelper(c.options);try{for(o.s();!(a=o.n()).done;){var l=a.value;l.selected=l.value===i}}catch(t){o.e(t)}finally{o.f()}}));var d,v=_createForOfIteratorHelper(this.data.options);try{for(v.s();!(d=v.n()).done;){var y=d.value,_=document.createElement("option");_.textContent=y.displayValue;_.value=y.exportValue;if(l.value.includes(y.exportValue)){_.setAttribute("selected",!0);u=!1}c.append(_)}}catch(t){v.e(t)}finally{v.f()}var g=null;if(u){var m=document.createElement("option");m.value=" ";m.setAttribute("hidden",!0);m.setAttribute("selected",!0);c.prepend(m);g=function removeEmptyEntry(){m.remove();c.removeEventListener("input",g);g=null};c.addEventListener("input",g)}var b=function getValue(t){var r=t?"value":"textContent",a=c.options;return c.multiple?Array.prototype.filter.call(a,(function(t){return t.selected})).map((function(t){return t[r]})):-1===a.selectedIndex?null:a[a.selectedIndex][r]},w=b(!1),P=function getItems(t){var r=t.target.options;return Array.prototype.map.call(r,(function(t){return{displayValue:t.textContent,exportValue:t.value}}))};window.registerAcroformField(a,c,w);c.addEventListener("updateFromAngular",(function(t){return r.setValue(a,{value:t.detail})}));if(this.enableScripting&&this.hasJSActions){c.addEventListener("updatefromsandbox",(function(i){var o={value:function value(t){var i;null===(i=g)||void 0===i||i();var o,value=t.detail.value,l=new Set(Array.isArray(value)?value:[value]),u=_createForOfIteratorHelper(c.options);try{for(u.s();!(o=u.n()).done;){var d=o.value;d.selected=l.has(d.value)}}catch(t){u.e(t)}finally{u.f()}r.setValue(a,{value:b(!0)});w=b(!1);window.updateAngularFormValue(a,{value:w})},multipleSelection:function multipleSelection(t){c.multiple=!0},remove:function remove(t){var i=c.options,o=t.detail.remove;i[o].selected=!1;c.remove(o);if(i.length>0){var l=Array.prototype.findIndex.call(i,(function(t){return t.selected}));-1===l&&(i[0].selected=!0)}r.setValue(a,{value:b(!0),items:P(t)});w=b(!1)},clear:function clear(t){for(;0!==c.length;)c.remove(0);r.setValue(a,{value:null,items:[]});w=b(!1);window.updateAngularFormValue(a,{value:w})},insert:function insert(t){var i=t.detail.insert,o=i.index,l=i.displayValue,u=i.exportValue,d=c.children[o],h=document.createElement("option");h.textContent=l;h.value=u;d?d.before(h):c.append(h);r.setValue(a,{value:b(!0),items:P(t)});w=b(!1);window.updateAngularFormValue(a,{value:w})},items:function items(t){for(var items=t.detail.items;0!==c.length;)c.remove(0);var i,o=_createForOfIteratorHelper(items);try{for(o.s();!(i=o.n()).done;){var l=i.value,u=l.displayValue,d=l.exportValue,h=document.createElement("option");h.textContent=u;h.value=d;c.append(h)}}catch(t){o.e(t)}finally{o.f()}c.options.length>0&&(c.options[0].selected=!0);r.setValue(a,{value:b(!0),items:P(t)});w=b(!1);window.updateAngularFormValue(a,{value:w})},indices:function indices(t){var i,indices=new Set(t.detail.indices),o=_createForOfIteratorHelper(t.target.options);try{for(o.s();!(i=o.n()).done;){var l=i.value;l.selected=indices.has(l.index)}}catch(t){o.e(t)}finally{o.f()}r.setValue(a,{value:b(!0)});w=b(!1);window.updateAngularFormValue(a,{value:w})},editable:function editable(t){t.target.disabled=!t.detail.editable}};t._dispatchEventFromSandbox(o,i)}));c.addEventListener("input",(function(i){var o,l=b(!0);r.setValue(a,{value:l});window.updateAngularFormValue(a,{value:l});i.preventDefault();null===(o=t.linkService.eventBus)||void 0===o||o.dispatch("dispatcheventinsandbox",{source:t,detail:{id:a,name:"Keystroke",value:w,changeEx:l,willCommit:!1,commitKey:1,keyDown:!1}})}));this._setEventListeners(c,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(function(t){return t.target.value}))}else c.addEventListener("input",(function(t){r.setValue(a,{value:b(!0)});window.updateAngularFormValue(a,{value:b(!0)})}));this.data.combo&&this._setTextStyle(c);this._setBackgroundColor(c);this._setDefaultPropertiesFromJS(c);this.container.append(c);return this.container}}]);return ChoiceWidgetAnnotationElement}(P),C=function(t){_inherits(PopupAnnotationElement,t);var r=_createSuper(PopupAnnotationElement);function PopupAnnotationElement(t){var a,i,o,l;_classCallCheck(this,PopupAnnotationElement);var c=t.data,u=t.elements,d=!!(null!==(a=c.titleObj)&&void 0!==a&&a.str||null!==(i=c.contentsObj)&&void 0!==i&&i.str||null!==(o=c.richText)&&void 0!==o&&o.str);(l=r.call(this,t,{isRenderable:d})).elements=u;return l}_createClass(PopupAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("popupAnnotation");var t,r=new J({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),a=[],i=_createForOfIteratorHelper(this.elements);try{for(i.s();!(t=i.n()).done;){var o=t.value;o.popup=r;a.push(o.data.id);o.addHighlightArea()}}catch(t){i.e(t)}finally{i.f()}this.container.setAttribute("aria-controls",a.join(","));return this.container}}]);return PopupAnnotationElement}(_),I=new WeakMap,M=new WeakMap,O=new WeakMap,R=new WeakMap,G=new WeakMap,L=new WeakMap,D=new WeakMap,j=new WeakMap,N=new WeakMap,W=new WeakMap,B=new WeakMap,U=new WeakMap,H=new WeakMap,z=new WeakMap,q=new WeakMap,V=new WeakMap,X=new WeakSet,Y=new WeakSet,K=new WeakSet,J=function(){function PopupElement(t){var r=t.container,a=t.color,i=t.elements,l=t.titleObj,c=t.modificationDate,u=t.contentsObj,d=t.richText,h=t.parent,p=t.rect,v=t.parentRect,y=t.open;_classCallCheck(this,PopupElement);_classPrivateMethodInitSpec(this,K);_classPrivateMethodInitSpec(this,Y);_classPrivateMethodInitSpec(this,X);_classPrivateFieldInitSpec(this,I,{writable:!0,value:null});_classPrivateFieldInitSpec(this,M,{writable:!0,value:_classPrivateMethodGet(this,K,_hide2).bind(this)});_classPrivateFieldInitSpec(this,O,{writable:!0,value:_classPrivateMethodGet(this,Y,_show2).bind(this)});_classPrivateFieldInitSpec(this,R,{writable:!0,value:_classPrivateMethodGet(this,X,_toggle2).bind(this)});_classPrivateFieldInitSpec(this,G,{writable:!0,value:null});_classPrivateFieldInitSpec(this,L,{writable:!0,value:null});_classPrivateFieldInitSpec(this,D,{writable:!0,value:null});_classPrivateFieldInitSpec(this,j,{writable:!0,value:null});_classPrivateFieldInitSpec(this,N,{writable:!0,value:null});_classPrivateFieldInitSpec(this,W,{writable:!0,value:null});_classPrivateFieldInitSpec(this,B,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,U,{writable:!0,value:null});_classPrivateFieldInitSpec(this,H,{writable:!0,value:null});_classPrivateFieldInitSpec(this,z,{writable:!0,value:null});_classPrivateFieldInitSpec(this,q,{writable:!0,value:null});_classPrivateFieldInitSpec(this,V,{writable:!0,value:!1});_classPrivateFieldSet(this,L,r);_classPrivateFieldSet(this,q,l);_classPrivateFieldSet(this,D,u);_classPrivateFieldSet(this,z,d);_classPrivateFieldSet(this,N,h);_classPrivateFieldSet(this,G,a);_classPrivateFieldSet(this,H,p);_classPrivateFieldSet(this,W,v);_classPrivateFieldSet(this,j,i);var _=o.PDFDateString.toDateObject(c);_&&_classPrivateFieldSet(this,I,h.l10n.get("annotation_date_string",{date:_.toLocaleDateString(),time:_.toLocaleTimeString()}));this.trigger=i.flatMap((function(t){return t.getElementsToTriggerPopup()}));var g,m=_createForOfIteratorHelper(this.trigger);try{for(m.s();!(g=m.n()).done;){var b=g.value;b.addEventListener("click",_classPrivateFieldGet(this,R));b.addEventListener("mouseenter",_classPrivateFieldGet(this,O));b.addEventListener("mouseleave",_classPrivateFieldGet(this,M))}}catch(t){m.e(t)}finally{m.f()}_classPrivateFieldGet(this,L).hidden=!0;y&&_classPrivateMethodGet(this,X,_toggle2).call(this)}_createClass(PopupElement,[{key:"render",value:function render(){if(!_classPrivateFieldGet(this,U)){var t=_classPrivateFieldGet(this,N),r=t.page.view,a=t.viewport.rawDims,o=a.pageWidth,l=a.pageHeight,c=a.pageX,u=a.pageY,h=_classPrivateFieldSet(this,U,document.createElement("div"));h.className="popup";if(_classPrivateFieldGet(this,G)){var p=h.style.outlineColor=i.Util.makeHexColor.apply(i.Util,_toConsumableArray(_classPrivateFieldGet(this,G)));if(CSS.supports("background-color","color-mix(in srgb, red 30%, white)"))h.style.backgroundColor="color-mix(in srgb, ".concat(p," 30%, white)");else{h.style.backgroundColor=i.Util.makeHexColor.apply(i.Util,_toConsumableArray(_classPrivateFieldGet(this,G).map((function(t){return Math.floor(.7*(255-t)+t)}))))}}var v=document.createElement("span");v.className="header";var y=document.createElement("h1");v.append(y);var _=_classPrivateFieldGet(this,q);y.dir=_.dir;y.textContent=_.str;h.append(v);if(_classPrivateFieldGet(this,I)){var g=document.createElement("span");g.classList.add("popupDate");_classPrivateFieldGet(this,I).then((function(t){g.textContent=t}));v.append(g)}var m=_classPrivateFieldGet(this,D),b=_classPrivateFieldGet(this,z);if(null==b||!b.str||null!=m&&m.str&&m.str!==b.str){var w=this._formatContents(m);h.append(w)}else{d.XfaLayer.render({xfaHtml:b.html,intent:"richText",div:h});h.lastChild.classList.add("richText","popupContent")}var P,A=!!_classPrivateFieldGet(this,W),S=_classPrivateFieldGet(this,A?W:H),k=_createForOfIteratorHelper(_classPrivateFieldGet(this,j));try{for(k.s();!(P=k.n()).done;){var x=P.value;if(!S||null!==i.Util.intersect(x.data.rect,S)){S=x.data.rect;A=!0;break}}}catch(t){k.e(t)}finally{k.f()}var E=i.Util.normalizeRect([S[0],r[3]-S[1]+r[1],S[2],r[3]-S[3]+r[1]]),T=A?S[2]-S[0]+5:0,C=E[0]+T,M=E[1],O=_classPrivateFieldGet(this,L).style;O.left="".concat(100*(C-c)/o,"%");O.top="".concat(100*(M-u)/l,"%");_classPrivateFieldGet(this,L).append(h)}}},{key:"_formatContents",value:function _formatContents(t){var r=t.str,a=t.dir,i=document.createElement("p");i.classList.add("popupContent");i.dir=a;for(var o=r.split(/(?:\r\n?|\n)/),l=0,c=o.length;l<c;++l){var u=o[l];i.append(document.createTextNode(u));l<c-1&&i.append(document.createElement("br"))}return i}},{key:"forceHide",value:function forceHide(){_classPrivateFieldSet(this,V,this.isVisible);_classPrivateFieldGet(this,V)&&(_classPrivateFieldGet(this,L).hidden=!0)}},{key:"maybeShow",value:function maybeShow(){if(_classPrivateFieldGet(this,V)){_classPrivateFieldSet(this,V,!1);_classPrivateFieldGet(this,L).hidden=!1}}},{key:"isVisible",get:function get(){return!1===_classPrivateFieldGet(this,L).hidden}}]);return PopupElement}();function _toggle2(){_classPrivateFieldSet(this,B,!_classPrivateFieldGet(this,B));if(_classPrivateFieldGet(this,B)){_classPrivateMethodGet(this,Y,_show2).call(this);_classPrivateFieldGet(this,L).addEventListener("click",_classPrivateFieldGet(this,R))}else{_classPrivateMethodGet(this,K,_hide2).call(this);_classPrivateFieldGet(this,L).removeEventListener("click",_classPrivateFieldGet(this,R))}}function _show2(){_classPrivateFieldGet(this,U)||this.render();if(this.isVisible)_classPrivateFieldGet(this,B)&&_classPrivateFieldGet(this,L).classList.add("focused");else{_classPrivateFieldGet(this,L).hidden=!1;_classPrivateFieldGet(this,L).style.zIndex=parseInt(_classPrivateFieldGet(this,L).style.zIndex)+1e3}}function _hide2(){_classPrivateFieldGet(this,L).classList.remove("focused");if(!_classPrivateFieldGet(this,B)&&this.isVisible){_classPrivateFieldGet(this,L).hidden=!0;_classPrivateFieldGet(this,L).style.zIndex=parseInt(_classPrivateFieldGet(this,L).style.zIndex)-1e3}}var $=function(t){_inherits(FreeTextAnnotationElement,t);var r=_createSuper(FreeTextAnnotationElement);function FreeTextAnnotationElement(t){var a,o,l,c;_classCallCheck(this,FreeTextAnnotationElement);var u=!!(t.data.popupRef||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(o=t.data.contentsObj)&&void 0!==o&&o.str||null!==(l=t.data.richText)&&void 0!==l&&l.str);(c=r.call(this,t,{isRenderable:u,ignoreBorder:!0})).textContent=t.data.textContent;c.textPosition=t.data.textPosition;c.annotationEditorType=i.AnnotationEditorType.FREETEXT;return c}_createClass(FreeTextAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("freeTextAnnotation");if(this.textContent){var t=document.createElement("div");t.classList.add("annotationTextContent");t.setAttribute("role","comment");var r,a=_createForOfIteratorHelper(this.textContent);try{for(a.s();!(r=a.n()).done;){var i=r.value,o=document.createElement("span");o.textContent=i;t.append(o)}}catch(t){a.e(t)}finally{a.f()}this.container.append(t)}this.data.popupRef||this._createPopup();this._editOnDoubleClick();return this.container}}]);return FreeTextAnnotationElement}(_);r.FreeTextAnnotationElement=$;var Q=new WeakMap,Z=function(t){_inherits(LineAnnotationElement,t);var r=_createSuper(LineAnnotationElement);function LineAnnotationElement(t){var a,i,o,l;_classCallCheck(this,LineAnnotationElement);var c=!!(t.data.popupRef||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);_classPrivateFieldInitSpec(_assertThisInitialized(l=r.call(this,t,{isRenderable:c,ignoreBorder:!0})),Q,{writable:!0,value:null});return l}_createClass(LineAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("lineAnnotation");var t=this.data,r=getRectDims(t.rect),a=r.width,i=r.height,o=this.svgFactory.create(a,i,!0),l=_classPrivateFieldSet(this,Q,this.svgFactory.createElement("svg:line"));l.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]);l.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]);l.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]);l.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]);l.setAttribute("stroke-width",t.borderStyle.width||1);l.setAttribute("stroke","transparent");l.setAttribute("fill","transparent");o.append(l);this.container.append(o);t.popupRef||this._createPopup();return this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return _classPrivateFieldGet(this,Q)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return LineAnnotationElement}(_),ee=new WeakMap,te=function(t){_inherits(SquareAnnotationElement,t);var r=_createSuper(SquareAnnotationElement);function SquareAnnotationElement(t){var a,i,o,l;_classCallCheck(this,SquareAnnotationElement);var c=!!(t.data.popupRef||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);_classPrivateFieldInitSpec(_assertThisInitialized(l=r.call(this,t,{isRenderable:c,ignoreBorder:!0})),ee,{writable:!0,value:null});return l}_createClass(SquareAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("squareAnnotation");var t=this.data,r=getRectDims(t.rect),a=r.width,i=r.height,o=this.svgFactory.create(a,i,!0),l=t.borderStyle.width,c=_classPrivateFieldSet(this,ee,this.svgFactory.createElement("svg:rect"));c.setAttribute("x",l/2);c.setAttribute("y",l/2);c.setAttribute("width",a-l);c.setAttribute("height",i-l);c.setAttribute("stroke-width",l||1);c.setAttribute("stroke","transparent");c.setAttribute("fill","transparent");o.append(c);this.container.append(o);t.popupRef||this._createPopup();return this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return _classPrivateFieldGet(this,ee)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return SquareAnnotationElement}(_),re=new WeakMap,ne=function(t){_inherits(CircleAnnotationElement,t);var r=_createSuper(CircleAnnotationElement);function CircleAnnotationElement(t){var a,i,o,l;_classCallCheck(this,CircleAnnotationElement);var c=!!(t.data.popupRef||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);_classPrivateFieldInitSpec(_assertThisInitialized(l=r.call(this,t,{isRenderable:c,ignoreBorder:!0})),re,{writable:!0,value:null});return l}_createClass(CircleAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("circleAnnotation");var t=this.data,r=getRectDims(t.rect),a=r.width,i=r.height,o=this.svgFactory.create(a,i,!0),l=t.borderStyle.width,c=_classPrivateFieldSet(this,re,this.svgFactory.createElement("svg:ellipse"));c.setAttribute("cx",a/2);c.setAttribute("cy",i/2);c.setAttribute("rx",a/2-l/2);c.setAttribute("ry",i/2-l/2);c.setAttribute("stroke-width",l||1);c.setAttribute("stroke","transparent");c.setAttribute("fill","transparent");o.append(c);this.container.append(o);t.popupRef||this._createPopup();return this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return _classPrivateFieldGet(this,re)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return CircleAnnotationElement}(_),ae=new WeakMap,ie=function(t){_inherits(PolylineAnnotationElement,t);var r=_createSuper(PolylineAnnotationElement);function PolylineAnnotationElement(t){var a,i,o,l;_classCallCheck(this,PolylineAnnotationElement);var c=!!(t.data.popupRef||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);_classPrivateFieldInitSpec(_assertThisInitialized(l=r.call(this,t,{isRenderable:c,ignoreBorder:!0})),ae,{writable:!0,value:null});l.containerClassName="polylineAnnotation";l.svgElementName="svg:polyline";return l}_createClass(PolylineAnnotationElement,[{key:"render",value:function render(){this.container.classList.add(this.containerClassName);var t,r=this.data,a=getRectDims(r.rect),i=a.width,o=a.height,l=this.svgFactory.create(i,o,!0),c=[],u=_createForOfIteratorHelper(r.vertices);try{for(u.s();!(t=u.n()).done;){var d=t.value,h=d.x-r.rect[0],p=r.rect[3]-d.y;c.push(h+","+p)}}catch(t){u.e(t)}finally{u.f()}c=c.join(" ");var v=_classPrivateFieldSet(this,ae,this.svgFactory.createElement(this.svgElementName));v.setAttribute("points",c);v.setAttribute("stroke-width",r.borderStyle.width||1);v.setAttribute("stroke","transparent");v.setAttribute("fill","transparent");l.append(v);this.container.append(l);r.popupRef||this._createPopup(v,r);return this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return _classPrivateFieldGet(this,ae)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return PolylineAnnotationElement}(_),oe=function(t){_inherits(PolygonAnnotationElement,t);var r=_createSuper(PolygonAnnotationElement);function PolygonAnnotationElement(t){var a;_classCallCheck(this,PolygonAnnotationElement);(a=r.call(this,t)).containerClassName="polygonAnnotation";a.svgElementName="svg:polygon";return a}return _createClass(PolygonAnnotationElement)}(ie),se=function(t){_inherits(CaretAnnotationElement,t);var r=_createSuper(CaretAnnotationElement);function CaretAnnotationElement(t){var a,i,o;_classCallCheck(this,CaretAnnotationElement);var l=!!(t.data.popupRef||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0})}_createClass(CaretAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("caretAnnotation");this.data.popupRef||this._createPopup();return this.container}}]);return CaretAnnotationElement}(_),le=new WeakMap,ce=function(t){_inherits(InkAnnotationElement,t);var r=_createSuper(InkAnnotationElement);function InkAnnotationElement(t){var a,o,l,c;_classCallCheck(this,InkAnnotationElement);var u=!!(t.data.popupRef||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(o=t.data.contentsObj)&&void 0!==o&&o.str||null!==(l=t.data.richText)&&void 0!==l&&l.str);_classPrivateFieldInitSpec(_assertThisInitialized(c=r.call(this,t,{isRenderable:u,ignoreBorder:!0})),le,{writable:!0,value:[]});c.containerClassName="inkAnnotation";c.svgElementName="svg:polyline";c.annotationEditorType=i.AnnotationEditorType.INK;return c}_createClass(InkAnnotationElement,[{key:"render",value:function render(){this.container.classList.add(this.containerClassName);var t,r=this.data,a=getRectDims(r.rect),i=a.width,o=a.height,l=this.svgFactory.create(i,o,!0),c=_createForOfIteratorHelper(r.inkLists);try{for(c.s();!(t=c.n()).done;){var u,d=t.value,h=[],p=_createForOfIteratorHelper(d);try{for(p.s();!(u=p.n()).done;){var v=u.value,y=v.x-r.rect[0],_=r.rect[3]-v.y;h.push("".concat(y,",").concat(_))}}catch(t){p.e(t)}finally{p.f()}h=h.join(" ");var g=this.svgFactory.createElement(this.svgElementName);_classPrivateFieldGet(this,le).push(g);g.setAttribute("points",h);g.setAttribute("stroke-width",r.borderStyle.width||1);g.setAttribute("stroke","transparent");g.setAttribute("fill","transparent");r.popupRef||this._createPopup(g,r);l.append(g)}}catch(t){c.e(t)}finally{c.f()}this.container.append(l);return this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return _classPrivateFieldGet(this,le)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return InkAnnotationElement}(_);r.InkAnnotationElement=ce;var ue=function(t){_inherits(HighlightAnnotationElement,t);var r=_createSuper(HighlightAnnotationElement);function HighlightAnnotationElement(t){var a,i,o;_classCallCheck(this,HighlightAnnotationElement);var l=!!(t.data.popupRef||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0,createQuadrilaterals:!0})}_createClass(HighlightAnnotationElement,[{key:"render",value:function render(){this.data.popupRef||this._createPopup();this.container.classList.add("highlightAnnotation");return this.container}}]);return HighlightAnnotationElement}(_),de=function(t){_inherits(UnderlineAnnotationElement,t);var r=_createSuper(UnderlineAnnotationElement);function UnderlineAnnotationElement(t){var a,i,o;_classCallCheck(this,UnderlineAnnotationElement);var l=!!(t.data.popupRef||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0,createQuadrilaterals:!0})}_createClass(UnderlineAnnotationElement,[{key:"render",value:function render(){this.data.popupRef||this._createPopup();this.container.classList.add("underlineAnnotation");return this.container}}]);return UnderlineAnnotationElement}(_),he=function(t){_inherits(SquigglyAnnotationElement,t);var r=_createSuper(SquigglyAnnotationElement);function SquigglyAnnotationElement(t){var a,i,o;_classCallCheck(this,SquigglyAnnotationElement);var l=!!(t.data.popupRef||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0,createQuadrilaterals:!0})}_createClass(SquigglyAnnotationElement,[{key:"render",value:function render(){this.data.popupRef||this._createPopup();this.container.classList.add("squigglyAnnotation");return this.container}}]);return SquigglyAnnotationElement}(_),fe=function(t){_inherits(StrikeOutAnnotationElement,t);var r=_createSuper(StrikeOutAnnotationElement);function StrikeOutAnnotationElement(t){var a,i,o;_classCallCheck(this,StrikeOutAnnotationElement);var l=!!(t.data.popupRef||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0,createQuadrilaterals:!0})}_createClass(StrikeOutAnnotationElement,[{key:"render",value:function render(){this.data.popupRef||this._createPopup();this.container.classList.add("strikeoutAnnotation");return this.container}}]);return StrikeOutAnnotationElement}(_),pe=function(t){_inherits(StampAnnotationElement,t);var r=_createSuper(StampAnnotationElement);function StampAnnotationElement(t){var a,i,o;_classCallCheck(this,StampAnnotationElement);var l=!!(t.data.popupRef||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0})}_createClass(StampAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("stampAnnotation");this.data.popupRef||this._createPopup();return this.container}}]);return StampAnnotationElement}(_);r.StampAnnotationElement=pe;var ve=new WeakMap,ye=function(t){_inherits(FileAttachmentAnnotationElement,t);var r=_createSuper(FileAttachmentAnnotationElement);function FileAttachmentAnnotationElement(t){var a,i;_classCallCheck(this,FileAttachmentAnnotationElement);_classPrivateFieldInitSpec(_assertThisInitialized(i=r.call(this,t,{isRenderable:!0})),ve,{writable:!0,value:null});var l=i.data.file,c=l.filename,u=l.content;i.filename=(0,o.getFilenameFromUrl)(c,!0);i.content=u;null===(a=i.linkService.eventBus)||void 0===a||a.dispatch("fileattachmentannotation",{source:_assertThisInitialized(i),filename:c,content:u});return i}_createClass(FileAttachmentAnnotationElement,[{key:"render",value:function render(){var t,r;this.container.classList.add("fileAttachmentAnnotation");var a,i=this.data;if(i.hasAppearance||0===i.fillAlpha)a=document.createElement("div");else{(a=document.createElement("img")).src="".concat(this.imageResourcesPath,"annotation-").concat(/paperclip/i.test(i.name)?"paperclip":"pushpin",".svg");i.fillAlpha&&i.fillAlpha<1&&(a.style="filter: opacity(".concat(Math.round(100*i.fillAlpha),"%);"))}a.classList.add("popupTriggerArea");a.addEventListener("dblclick",this._download.bind(this));_classPrivateFieldSet(this,ve,a);!i.popupRef&&(null!==(t=i.titleObj)&&void 0!==t&&t.str||null!==(r=i.contentsObj)&&void 0!==r&&r.str||i.richText)&&this._createPopup();this.container.append(a);return this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return _classPrivateFieldGet(this,ve)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}},{key:"_download",value:function _download(){var t;null===(t=this.downloadManager)||void 0===t||t.openOrDownloadData(this.container,this.content,this.filename)}}]);return FileAttachmentAnnotationElement}(_),_e=new WeakMap,ge=new WeakMap,me=new WeakMap,be=new WeakSet,we=new WeakSet,Pe=function(){function AnnotationLayer(t){var r=t.div,a=t.accessibilityManager,i=t.annotationCanvasMap,o=t.l10n,l=t.page,c=t.viewport;_classCallCheck(this,AnnotationLayer);_classPrivateMethodInitSpec(this,we);_classPrivateMethodInitSpec(this,be);_classPrivateFieldInitSpec(this,_e,{writable:!0,value:null});_classPrivateFieldInitSpec(this,ge,{writable:!0,value:null});_classPrivateFieldInitSpec(this,me,{writable:!0,value:new Map});this.div=r;_classPrivateFieldSet(this,_e,a);_classPrivateFieldSet(this,ge,i);this.l10n=o;this.page=l;this.viewport=c;this.zIndex=0;this.l10n||(this.l10n=u.NullL10n)}_createClass(AnnotationLayer,[{key:"render",value:(t=function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t){var r,a,c,u,d,h,p,y,_,g,m,b,w,P,A;return _regeneratorRuntime().wrap((function _callee$(S){for(;;)switch(S.prev=S.next){case 0:r=t.annotations;a=this.div;(0,o.setLayerDimensions)(a,this.viewport);c=new Map;u={data:null,layer:a,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:!1!==t.renderForms,svgFactory:new o.DOMSVGFactory,annotationStorage:t.annotationStorage||new l.AnnotationStorage,enableScripting:!0===t.enableScripting,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};d=_createForOfIteratorHelper(r);S.prev=6;d.s();case 8:if((h=d.n()).done){S.next=34;break}if(!(p=h.value).noHTML){S.next=12;break}return S.abrupt("continue",32);case 12:if(y=p.annotationType===i.AnnotationType.POPUP){S.next=19;break}_=getRectDims(p.rect),g=_.width,m=_.height;if(!(g<=0||m<=0)){S.next=17;break}return S.abrupt("continue",32);case 17:S.next=23;break;case 19:if(b=c.get(p.id)){S.next=22;break}return S.abrupt("continue",32);case 22:u.elements=b;case 23:u.data=p;if((w=v.create(u)).isRenderable){S.next=27;break}return S.abrupt("continue",32);case 27:!y&&p.popupRef&&((P=c.get(p.popupRef))?P.push(w):c.set(p.popupRef,[w]));w.annotationEditorType>0&&_classPrivateFieldGet(this,me).set(w.data.id,w);A=w.render();p.hidden&&(A.style.visibility="hidden");_classPrivateMethodGet(this,be,_appendElement2).call(this,A,p.id);case 32:S.next=8;break;case 34:S.next=39;break;case 36:S.prev=36;S.t0=S.catch(6);d.e(S.t0);case 39:S.prev=39;d.f();return S.finish(39);case 42:_classPrivateMethodGet(this,we,_setAnnotationCanvasMap2).call(this);S.next=45;return this.l10n.translate(a);case 45:case"end":return S.stop()}}),_callee,this,[[6,36,39,42]])}))),function render(r){return t.apply(this,arguments)})},{key:"update",value:function update(t){var r=t.viewport,a=this.div;this.viewport=r;(0,o.setLayerDimensions)(a,{rotation:r.rotation});_classPrivateMethodGet(this,we,_setAnnotationCanvasMap2).call(this);a.hidden=!1}},{key:"getEditableAnnotations",value:function getEditableAnnotations(){return Array.from(_classPrivateFieldGet(this,me).values())}},{key:"getEditableAnnotation",value:function getEditableAnnotation(t){return _classPrivateFieldGet(this,me).get(t)}}]);var t;return AnnotationLayer}();r.AnnotationLayer=Pe;function _appendElement2(t,r){var a,i=t.firstChild||t;i.id="".concat(o.AnnotationPrefix).concat(r);this.div.append(t);null===(a=_classPrivateFieldGet(this,_e))||void 0===a||a.moveElementInDOM(this.div,t,i,!1)}function _setAnnotationCanvasMap2(){if(_classPrivateFieldGet(this,ge)){var t,r=this.div,a=_createForOfIteratorHelper(_classPrivateFieldGet(this,ge));try{for(a.s();!(t=a.n()).done;){var i=_slicedToArray(t.value,2),o=i[0],l=i[1],c=r.querySelector('[data-annotation-id="'.concat(o,'"]'));if(c){var u=c.firstChild;u?"CANVAS"===u.nodeName?u.replaceWith(l):u.before(l):c.append(l)}}}catch(t){a.e(t)}finally{a.f()}_classPrivateFieldGet(this,ge).clear()}}},(t,r,a)=>{var i=a(3),o=a(352).values;i({target:"Object",stat:!0},{values:function values(t){return o(t)}})},(t,r,a)=>{var i=a(3),o=a(188).findIndex,l=a(141),c="findIndex",u=!0;c in[]&&Array(1)[c]((function(){u=!1}));i({target:"Array",proto:!0,forced:u},{findIndex:function findIndex(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}});l(c)},(t,r,a)=>{var i=a(3),o=a(414),l=a(31),c=a(40),u=a(64),d=a(189);i({target:"Array",proto:!0},{flatMap:function flatMap(t){var r,a=c(this),i=u(a);l(t);(r=d(a,0)).length=o(r,a,a,i,0,1,t,arguments.length>1?arguments[1]:void 0);return r}})},(t,r,a)=>{var i=a(169),o=a(64),l=a(170),c=a(94),flattenIntoArray=function(t,r,a,u,d,h,p,v){for(var y,_,g=d,m=0,b=!!p&&c(p,v);m<u;){if(m in a){y=b?b(a[m],m,r):a[m];if(h>0&&i(y)){_=o(y);g=flattenIntoArray(t,r,y,_,g,h-1)-1}else{l(g+1);t[g]=y}g++}m++}return g};t.exports=flattenIntoArray},(t,r,a)=>{a(141)("flatMap")},(t,r,a)=>{a(85);a(90);a(292);a(300);a(123);a(112);a(301);a(140);a(148);a(149);a(167);a(92);a(105);a(104);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.ColorConverters=void 0;a(251);a(146);a(255);a(257);a(249);a(258);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t,r)||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 _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}function makeColorComp(t){return Math.floor(255*Math.max(0,Math.min(1,t))).toString(16).padStart(2,"0")}function scaleAndClamp(t){return Math.max(0,Math.min(255,255*t))}var i=function(){function ColorConverters(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,ColorConverters)}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(ColorConverters,null,[{key:"CMYK_G",value:function CMYK_G(t){var r=_slicedToArray(t,4),a=r[0],i=r[1],o=r[2],l=r[3];return["G",1-Math.min(1,.3*a+.59*o+.11*i+l)]}},{key:"G_CMYK",value:function G_CMYK(t){return["CMYK",0,0,0,1-_slicedToArray(t,1)[0]]}},{key:"G_RGB",value:function G_RGB(t){var r=_slicedToArray(t,1)[0];return["RGB",r,r,r]}},{key:"G_rgb",value:function G_rgb(t){var r=_slicedToArray(t,1)[0];return[r=scaleAndClamp(r),r,r]}},{key:"G_HTML",value:function G_HTML(t){var r=makeColorComp(_slicedToArray(t,1)[0]);return"#".concat(r).concat(r).concat(r)}},{key:"RGB_G",value:function RGB_G(t){var r=_slicedToArray(t,3);return["G",.3*r[0]+.59*r[1]+.11*r[2]]}},{key:"RGB_rgb",value:function RGB_rgb(t){return t.map(scaleAndClamp)}},{key:"RGB_HTML",value:function RGB_HTML(t){return"#".concat(t.map(makeColorComp).join(""))}},{key:"T_HTML",value:function T_HTML(){return"#00000000"}},{key:"T_rgb",value:function T_rgb(){return[null]}},{key:"CMYK_RGB",value:function CMYK_RGB(t){var r=_slicedToArray(t,4),a=r[0],i=r[1],o=r[2],l=r[3];return["RGB",1-Math.min(1,a+l),1-Math.min(1,o+l),1-Math.min(1,i+l)]}},{key:"CMYK_rgb",value:function CMYK_rgb(t){var r=_slicedToArray(t,4),a=r[0],i=r[1],o=r[2],l=r[3];return[scaleAndClamp(1-Math.min(1,a+l)),scaleAndClamp(1-Math.min(1,o+l)),scaleAndClamp(1-Math.min(1,i+l))]}},{key:"CMYK_HTML",value:function CMYK_HTML(t){var r=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(r)}},{key:"RGB_CMYK",value:function RGB_CMYK(t){var r=_slicedToArray(t,3),a=1-r[0],i=1-r[1],o=1-r[2];return["CMYK",a,i,o,Math.min(a,i,o)]}}]);return ColorConverters}();r.ColorConverters=i},(t,r,a)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}a(146);a(259);a(292);a(300);a(301);a(140);a(148);a(149);a(306);a(307);a(308);a(309);a(2);a(123);a(167);a(310);a(258);Object.defineProperty(r,"__esModule",{value:!0});r.NullL10n=void 0;r.getL10nFallback=getL10nFallback;a(105);a(289);a(291);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,r,a){t[r]=a.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,o){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(o||[]);return i(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var h={};define(h,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&a.call(v,l)&&(h=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(h);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,o,l,c){var u=tryCatch(t[i],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==_typeof(h)&&a.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function value(t,a){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,a,r,i)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,a){var i="suspendedStart";return function(o,l){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw l;return{value:void 0,done:!0}}for(a.method=o,a.arg=l;;){var c=a.delegate;if(c){var u=maybeInvokeDelegate(c,a);if(u){if(u===d)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===i)throw i="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i="executing";var h=tryCatch(t,r,a);if("normal"===h.type){if(i=a.done?"completed":"suspendedYield",h.arg===d)continue;return{value:h.arg,done:a.done}}"throw"===h.type&&(i="completed",a.method="throw",a.arg=h.arg)}}}function maybeInvokeDelegate(t,r){var a=r.method,i=t.iterator[a];if(void 0===i)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),d;var o=tryCatch(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,d):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function next(){for(;++i<t.length;)if(a.call(t,i))return next.value=t[i],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,i(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),i(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(r,a,i,o),l);return t.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(y),define(y,u,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(a,i){return l.type="throw",l.arg=t,r.next=a,i&&(r.method="next",r.arg=void 0),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,d):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),d}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,a){return this.delegate={iterator:values(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=void 0),d}},t}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}var i={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing…",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",print_progress_percent:"{{progress}}%"};function getL10nFallback(t,r){switch(t){case"find_match_count":t="find_match_count[".concat(1===r.total?"one":"other","]");break;case"find_match_count_limit":t="find_match_count_limit[".concat(1===r.limit?"one":"other","]")}return i[t]||""}function formatL10nValue(t,r){return r?t.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,(function(t,a){return a in r?r[a]:"{{"+a+"}}"})):t}var o={getLanguage:function getLanguage(){return _asyncToGenerator(_regeneratorRuntime().mark((function _callee(){return _regeneratorRuntime().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return","en-us");case 1:case"end":return t.stop()}}),_callee)})))()},getDirection:function getDirection(){return _asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){return _regeneratorRuntime().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return","ltr");case 1:case"end":return t.stop()}}),_callee2)})))()},get:function get(t){var r=arguments;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var a,i;return _regeneratorRuntime().wrap((function _callee3$(o){for(;;)switch(o.prev=o.next){case 0:a=r.length>1&&void 0!==r[1]?r[1]:null;i=r.length>2&&void 0!==r[2]?r[2]:getL10nFallback(t,a);return o.abrupt("return",formatL10nValue(i,a));case 3:case"end":return o.stop()}}),_callee3)})))()},translate:function translate(t){return _asyncToGenerator(_regeneratorRuntime().mark((function _callee4(){return _regeneratorRuntime().wrap((function _callee4$(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),_callee4)})))()}};r.NullL10n=o},(t,r,a)=>{a(258);a(255);a(92);a(148);a(105);a(104);a(301);a(140);a(149);Object.defineProperty(r,"__esModule",{value:!0});r.XfaLayer=void 0;a(257);a(351);a(337);a(358);a(359);a(167);a(85);a(90);a(292);a(300);a(146);a(123);a(112);var i=a(399);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||_unsupportedIterableToArray(t,r)||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 _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,(o=i.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),i)}var o,l}var o=function(){function XfaLayer(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,XfaLayer)}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(XfaLayer,null,[{key:"setupStorage",value:function setupStorage(t,r,a,i,o){var l=window.getFormValueFromAngular(t);l.value&&i.setValue(r,l);var c=l.value?l:i.getValue(r,{value:null});window.registerXFAField(t,c);t.addEventListener("updateFromAngular",(function(t){return i.setValue(r,{value:t.detail})}));switch(a.name){case"textarea":null!==c.value&&(t.textContent=c.value);if("print"===o)break;t.addEventListener("input",(function(a){window.updateAngularFormValue(t,{value:a.target.value});i.setValue(r,{value:a.target.value})}));break;case"input":if("radio"===a.attributes.type||"checkbox"===a.attributes.type){c.value===a.attributes.xfaOn?t.setAttribute("checked",!0):t.removeAttribute("checked");if("print"===o)break;t.addEventListener("change",(function(a){window.updateAngularFormValue(t,{value:a.target.checked?a.target.getAttribute("xfaOn"):a.target.getAttribute("xfaOff")});i.setValue(r,{value:a.target.checked?a.target.getAttribute("xfaOn"):a.target.getAttribute("xfaOff")})}))}else{null!==c.value&&t.setAttribute("value",c.value);if("print"===o)break;t.addEventListener("input",(function(a){window.updateAngularFormValue(t,{value:a.target.value});i.setValue(r,{value:a.target.value})}))}break;case"select":if(null!==c.value){t.setAttribute("value",c.value);var u,d=_createForOfIteratorHelper(a.children);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.attributes.value===c.value?h.attributes.selected=!0:h.attributes.hasOwnProperty("selected")&&delete h.attributes.selected}}catch(t){d.e(t)}finally{d.f()}}t.addEventListener("input",(function(a){var o=a.target.options,l=-1===o.selectedIndex?"":o[o.selectedIndex].value;window.updateAngularFormValue(t,{value:l});i.setValue(r,{value:l})}))}}},{key:"setAttributes",value:function setAttributes(t){var r=t.html,a=t.element,i=t.storage,o=void 0===i?null:i,l=t.intent,c=t.linkService,u=a.attributes,d=r instanceof HTMLAnchorElement;"radio"===u.type&&(u.name="".concat(u.name,"-").concat(l));for(var h=0,p=Object.entries(u);h<p.length;h++){var v=_slicedToArray(p[h],2),y=v[0],_=v[1];if(null!=_)switch(y){case"class":_.length&&r.setAttribute(y,_.join(" "));break;case"dataId":break;case"id":r.setAttribute("data-element-id",_);break;case"style":Object.assign(r.style,_);break;case"textContent":r.textContent=_;break;default:(!d||"href"!==y&&"newWindow"!==y)&&r.setAttribute(y,_)}}d&&c.addLinkAttributes(r,u.href,u.newWindow);o&&u.dataId&&this.setupStorage(r,u.dataId,a,o)}},{key:"render",value:function render(t){var r=t.annotationStorage,a=t.linkService,o=t.xfaHtml,l=t.intent||"display",c=document.createElement(o.name);o.attributes&&this.setAttributes({html:c,element:o,intent:l,linkService:a});var u=[[o,-1,c]],d=t.div;d.append(c);if(t.viewport){var h="matrix(".concat(t.viewport.transform.join(","),")");d.style.transform=h}"richText"!==l&&d.setAttribute("class","xfaLayer xfaFont");for(var p=[];u.length>0;){var v,y=_slicedToArray(u.at(-1),3),_=y[0],g=y[1],m=y[2];if(g+1!==_.children.length){var b=_.children[++u.at(-1)[1]];if(null!==b){var w=b.name;if("#text"!==w){var P=null!=b&&null!==(v=b.attributes)&&void 0!==v&&v.xmlns?document.createElementNS(b.attributes.xmlns,w):document.createElement(w);m.append(P);b.attributes&&this.setAttributes({html:P,element:b,storage:r,intent:l,linkService:a});if(b.children&&b.children.length>0)u.push([b,-1,P]);else if(b.value){var A=document.createTextNode(b.value);i.XfaText.shouldBuildText(w)&&p.push(A);P.append(A)}}else{var S=document.createTextNode(b.value);p.push(S);m.append(S)}}}else u.pop()}var k,x=_createForOfIteratorHelper(d.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"));try{for(x.s();!(k=x.n()).done;){k.value.setAttribute("readOnly",!0)}}catch(t){x.e(t)}finally{x.f()}return{textDivs:p}}},{key:"update",value:function update(t){var r="matrix(".concat(t.viewport.transform.join(","),")");t.div.style.transform=r;t.div.hidden=!1}}]);return XfaLayer}();r.XfaLayer=o},(t,r,a)=>{a(85);a(90);a(292);a(300);a(112);a(2);a(71);a(73);a(405);a(402);a(245);a(379);a(310);a(403);a(301);a(255);a(92);a(105);a(104);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.InkEditor=void 0;a(140);a(280);a(146);a(148);a(149);a(249);a(167);a(123);a(302);a(347);a(257);a(358);a(359);a(258);var i=a(1),o=a(353),l=a(410),c=a(356);function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||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 _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||_unsupportedIterableToArray(t,r)||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(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function ownKeys(t,r){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),a.push.apply(a,i)}return a}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(a),!0).forEach((function(r){_defineProperty(t,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))}))}return t}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,a){var i=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(i){var o=Object.getOwnPropertyDescriptor(i,r);return o.get?o.get.call(arguments.length<3?t:a):o.value}};return _get.apply(this,arguments)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,a)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _defineProperty(t,r,a){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateFieldInitSpec(t,r,a){_checkPrivateRedeclaration(t,r);r.set(t,a)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classStaticPrivateMethodGet(t,r,a){!function _classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}(t,r);return a}function _classPrivateFieldSet(t,r,a){!function _classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,_classExtractFieldDescriptor(t,r,"set"),a);return a}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}function _classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}var u=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakMap,_=new WeakMap,g=new WeakMap,m=new WeakMap,b=new WeakMap,w=new WeakMap,P=new WeakMap,A=new WeakMap,S=new WeakMap,k=new WeakMap,x=new WeakSet,E=new WeakSet,T=new WeakSet,C=new WeakSet,I=new WeakSet,M=new WeakSet,O=new WeakSet,R=new WeakSet,G=new WeakSet,L=new WeakSet,D=new WeakSet,j=new WeakSet,N=new WeakSet,W=new WeakSet,B=new WeakSet,U=new WeakSet,H=new WeakSet,z=new WeakSet,q=new WeakSet,V=new WeakSet,X=new WeakSet,Y=new WeakSet,K=new WeakSet,J=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(InkEditor,t);var r=_createSuper(InkEditor);function InkEditor(t){var a;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,InkEditor);_classPrivateMethodInitSpec(_assertThisInitialized(a=r.call(this,_objectSpread(_objectSpread({},t),{},{name:"inkEditor"}))),K);_classPrivateMethodInitSpec(_assertThisInitialized(a),Y);_classPrivateMethodInitSpec(_assertThisInitialized(a),X);_classPrivateMethodInitSpec(_assertThisInitialized(a),V);_classPrivateMethodInitSpec(_assertThisInitialized(a),q);_classPrivateMethodInitSpec(_assertThisInitialized(a),z);_classPrivateMethodInitSpec(_assertThisInitialized(a),H);_classPrivateMethodInitSpec(_assertThisInitialized(a),U);_classPrivateMethodInitSpec(_assertThisInitialized(a),B);_classPrivateMethodInitSpec(_assertThisInitialized(a),W);_classPrivateMethodInitSpec(_assertThisInitialized(a),N);_classPrivateMethodInitSpec(_assertThisInitialized(a),j);_classPrivateMethodInitSpec(_assertThisInitialized(a),D);_classPrivateMethodInitSpec(_assertThisInitialized(a),L);_classPrivateMethodInitSpec(_assertThisInitialized(a),G);_classPrivateMethodInitSpec(_assertThisInitialized(a),R);_classPrivateMethodInitSpec(_assertThisInitialized(a),O);_classPrivateMethodInitSpec(_assertThisInitialized(a),M);_classPrivateMethodInitSpec(_assertThisInitialized(a),I);_classPrivateMethodInitSpec(_assertThisInitialized(a),C);_classPrivateMethodInitSpec(_assertThisInitialized(a),T);_classPrivateMethodInitSpec(_assertThisInitialized(a),E);_classPrivateMethodInitSpec(_assertThisInitialized(a),x);_classPrivateFieldInitSpec(_assertThisInitialized(a),u,{writable:!0,value:0});_classPrivateFieldInitSpec(_assertThisInitialized(a),d,{writable:!0,value:0});_classPrivateFieldInitSpec(_assertThisInitialized(a),h,{writable:!0,value:a.canvasContextMenu.bind(_assertThisInitialized(a))});_classPrivateFieldInitSpec(_assertThisInitialized(a),p,{writable:!0,value:a.canvasPointermove.bind(_assertThisInitialized(a))});_classPrivateFieldInitSpec(_assertThisInitialized(a),v,{writable:!0,value:a.canvasPointerleave.bind(_assertThisInitialized(a))});_classPrivateFieldInitSpec(_assertThisInitialized(a),y,{writable:!0,value:a.canvasPointerup.bind(_assertThisInitialized(a))});_classPrivateFieldInitSpec(_assertThisInitialized(a),_,{writable:!0,value:a.canvasPointerdown.bind(_assertThisInitialized(a))});_classPrivateFieldInitSpec(_assertThisInitialized(a),g,{writable:!0,value:new Path2D});_classPrivateFieldInitSpec(_assertThisInitialized(a),m,{writable:!0,value:!1});_classPrivateFieldInitSpec(_assertThisInitialized(a),b,{writable:!0,value:!1});_classPrivateFieldInitSpec(_assertThisInitialized(a),w,{writable:!0,value:!1});_classPrivateFieldInitSpec(_assertThisInitialized(a),P,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(a),A,{writable:!0,value:0});_classPrivateFieldInitSpec(_assertThisInitialized(a),S,{writable:!0,value:0});_classPrivateFieldInitSpec(_assertThisInitialized(a),k,{writable:!0,value:null});a.color=t.color||null;a.thickness=t.thickness||null;a.opacity=t.opacity||null;a.paths=[];a.bezierPath2D=[];a.allRawPaths=[];a.currentPath=[];a.scaleFactor=1;a.translationX=a.translationY=0;a.x=0;a.y=0;a._willKeepAspectRatio=!0;return a}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(InkEditor,[{key:"updateParams",value:function updateParams(t,r){switch(t){case i.AnnotationEditorParamsType.INK_THICKNESS:_classPrivateMethodGet(this,x,_updateThickness2).call(this,r);break;case i.AnnotationEditorParamsType.INK_COLOR:_classPrivateMethodGet(this,E,_updateColor2).call(this,r);break;case i.AnnotationEditorParamsType.INK_OPACITY:_classPrivateMethodGet(this,T,_updateOpacity2).call(this,r)}}},{key:"propertiesToUpdate",get:function get(){var t;return[[i.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||InkEditor._defaultThickness],[i.AnnotationEditorParamsType.INK_COLOR,this.color||InkEditor._defaultColor||o.AnnotationEditor._defaultLineColor],[i.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(null!==(t=this.opacity)&&void 0!==t?t:InkEditor._defaultOpacity))]]}},{key:"rebuild",value:function rebuild(){if(this.parent){_get(_getPrototypeOf(InkEditor.prototype),"rebuild",this).call(this);if(null!==this.div){if(!this.canvas){_classPrivateMethodGet(this,B,_createCanvas2).call(this);_classPrivateMethodGet(this,U,_createObserver2).call(this)}if(!this.isAttachedToDOM){this.parent.add(this);_classPrivateMethodGet(this,H,_setCanvasDims2).call(this)}_classPrivateMethodGet(this,K,_fitToContent2).call(this)}}}},{key:"remove",value:function remove(){if(null!==this.canvas){this.isEmpty()||this.commit();this.canvas.width=this.canvas.height=0;this.canvas.remove();this.canvas=null;_classPrivateFieldGet(this,P).disconnect();_classPrivateFieldSet(this,P,null);_get(_getPrototypeOf(InkEditor.prototype),"remove",this).call(this)}}},{key:"setParent",value:function setParent(t){!this.parent&&t?this._uiManager.removeShouldRescale(this):this.parent&&null===t&&this._uiManager.addShouldRescale(this);_get(_getPrototypeOf(InkEditor.prototype),"setParent",this).call(this,t)}},{key:"onScaleChanging",value:function onScaleChanging(){var t=_slicedToArray(this.parentDimensions,2),r=t[0],a=t[1],i=this.width*r,o=this.height*a;this.setDimensions(i,o)}},{key:"enableEditMode",value:function enableEditMode(){if(!_classPrivateFieldGet(this,m)&&null!==this.canvas){_get(_getPrototypeOf(InkEditor.prototype),"enableEditMode",this).call(this);this._isDraggable=!1;this.canvas.addEventListener("pointerdown",_classPrivateFieldGet(this,_))}}},{key:"disableEditMode",value:function disableEditMode(){if(this.isInEditMode()&&null!==this.canvas){_get(_getPrototypeOf(InkEditor.prototype),"disableEditMode",this).call(this);this._isDraggable=!this.isEmpty();this.div.classList.remove("editing");this.canvas.removeEventListener("pointerdown",_classPrivateFieldGet(this,_))}}},{key:"onceAdded",value:function onceAdded(){this._isDraggable=!this.isEmpty()}},{key:"isEmpty",value:function isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}},{key:"commit",value:function commit(){if(!_classPrivateFieldGet(this,m)){_get(_getPrototypeOf(InkEditor.prototype),"commit",this).call(this);this.isEditing=!1;this.disableEditMode();this.setInForeground();_classPrivateFieldSet(this,m,!0);this.div.classList.add("disabled");_classPrivateMethodGet(this,K,_fitToContent2).call(this,!0);this.makeResizable();this.parent.addInkEditorIfNeeded(!0);this.moveInDOM();this.div.focus({preventScroll:!0})}}},{key:"focusin",value:function focusin(t){if(this._focusEventsAllowed){_get(_getPrototypeOf(InkEditor.prototype),"focusin",this).call(this,t);this.enableEditMode()}}},{key:"canvasPointerdown",value:function canvasPointerdown(t){if(0===t.button&&this.isInEditMode()&&!_classPrivateFieldGet(this,m)){this.setInForeground();t.preventDefault();"mouse"!==t.type&&this.div.focus({preventScroll:!0});_classPrivateMethodGet(this,M,_startDrawing2).call(this,t.offsetX,t.offsetY)}}},{key:"canvasContextMenu",value:function canvasContextMenu(t){t.preventDefault()}},{key:"canvasPointermove",value:function canvasPointermove(t){t.preventDefault();_classPrivateMethodGet(this,O,_draw2).call(this,t.offsetX,t.offsetY)}},{key:"canvasPointerup",value:function canvasPointerup(t){t.preventDefault();_classPrivateMethodGet(this,W,_endDrawing2).call(this,t)}},{key:"canvasPointerleave",value:function canvasPointerleave(t){_classPrivateMethodGet(this,W,_endDrawing2).call(this,t)}},{key:"isResizable",get:function get(){return!this.isEmpty()&&_classPrivateFieldGet(this,m)}},{key:"render",value:function render(){var t,r,a=this;if(this.div)return this.div;if(this.width){t=this.x;r=this.y}_get(_getPrototypeOf(InkEditor.prototype),"render",this).call(this);InkEditor._l10nPromise.get("editor_ink2_aria_label").then((function(t){var r;return null===(r=a.div)||void 0===r?void 0:r.setAttribute("aria-label",t)}));var i=_slicedToArray(_classPrivateMethodGet(this,C,_getInitialBBox2).call(this),4),o=i[0],l=i[1],c=i[2],u=i[3];this.setAt(o,l,0,0);this.setDims(c,u);_classPrivateMethodGet(this,B,_createCanvas2).call(this);if(this.width){var d=_slicedToArray(this.parentDimensions,2),h=d[0],p=d[1];this.setAspectRatio(this.width*h,this.height*p);this.setAt(t*h,r*p,this.width*h,this.height*p);_classPrivateFieldSet(this,w,!0);_classPrivateMethodGet(this,H,_setCanvasDims2).call(this);this.setDims(this.width*h,this.height*p);_classPrivateMethodGet(this,N,_redraw2).call(this);this.div.classList.add("disabled")}else{this.div.classList.add("editing");this.enableEditMode()}_classPrivateMethodGet(this,U,_createObserver2).call(this);return this.div}},{key:"setDimensions",value:function setDimensions(t,r){var a=Math.round(t),i=Math.round(r);if(_classPrivateFieldGet(this,A)!==a||_classPrivateFieldGet(this,S)!==i){_classPrivateFieldSet(this,A,a);_classPrivateFieldSet(this,S,i);this.canvas.style.visibility="hidden";var o=_slicedToArray(this.parentDimensions,2),l=o[0],c=o[1];this.width=t/l;this.height=r/c;this.fixAndSetPosition();_classPrivateFieldGet(this,m)&&_classPrivateMethodGet(this,z,_setScaleFactor2).call(this,t,r);_classPrivateMethodGet(this,H,_setCanvasDims2).call(this);_classPrivateMethodGet(this,N,_redraw2).call(this);this.canvas.style.visibility="visible";this.fixDims()}}},{key:"serialize",value:function serialize(){if(this.isEmpty())return null;var t=this.getRect(0,0),r=o.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:i.AnnotationEditorType.INK,color:r,thickness:this.thickness,opacity:this.opacity,paths:_classPrivateMethodGet(this,V,_serializePaths2).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,t),pageIndex:this.pageIndex,rect:t,rotation:this.rotation}}}],[{key:"initialize",value:function initialize(t){this._l10nPromise=new Map(["editor_ink_canvas_aria_label","editor_ink2_aria_label"].map((function(r){return[r,t.get(r)]})))}},{key:"updateDefaultParams",value:function updateDefaultParams(t,r){switch(t){case i.AnnotationEditorParamsType.INK_THICKNESS:InkEditor._defaultThickness=r;break;case i.AnnotationEditorParamsType.INK_COLOR:InkEditor._defaultColor=r;break;case i.AnnotationEditorParamsType.INK_OPACITY:InkEditor._defaultOpacity=r/100}}},{key:"defaultPropertiesToUpdate",get:function get(){return[[i.AnnotationEditorParamsType.INK_THICKNESS,InkEditor._defaultThickness],[i.AnnotationEditorParamsType.INK_COLOR,InkEditor._defaultColor||o.AnnotationEditor._defaultLineColor],[i.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*InkEditor._defaultOpacity)]]}},{key:"deserialize",value:function deserialize(t,r,a){if(t instanceof l.InkAnnotationElement)return null;var c=_get(_getPrototypeOf(InkEditor),"deserialize",this).call(this,t,r,a);c.thickness=t.thickness;c.color=i.Util.makeHexColor.apply(i.Util,_toConsumableArray(t.color));c.opacity=t.opacity;var h=_slicedToArray(c.pageDimensions,2),p=h[0],v=h[1],y=c.width*p,_=c.height*v,g=c.parentScale,b=t.thickness/2;_classPrivateFieldSet(c,m,!0);_classPrivateFieldSet(c,A,Math.round(y));_classPrivateFieldSet(c,S,Math.round(_));var w,P=t.paths,k=t.rect,x=t.rotation,E=_createForOfIteratorHelper(P);try{for(E.s();!(w=E.n()).done;){var T=w.value.bezier;T=_classStaticPrivateMethodGet(InkEditor,InkEditor,_fromPDFCoordinates).call(InkEditor,T,k,x);var C=[];c.paths.push(C);for(var I=g*(T[0]-b),M=g*(T[1]-b),O=2,R=T.length;O<R;O+=6){var G=g*(T[O]-b),L=g*(T[O+1]-b),D=g*(T[O+2]-b),j=g*(T[O+3]-b),N=g*(T[O+4]-b),W=g*(T[O+5]-b);C.push([[I,M],[G,L],[D,j],[N,W]]);I=N;M=W}var B=_classStaticPrivateMethodGet(this,InkEditor,_buildPath2D).call(this,C);c.bezierPath2D.push(B)}}catch(t){E.e(t)}finally{E.f()}var U=_classPrivateMethodGet(c,X,_getBbox2).call(c);_classPrivateFieldSet(c,d,Math.max(o.AnnotationEditor.MIN_SIZE,U[2]-U[0]));_classPrivateFieldSet(c,u,Math.max(o.AnnotationEditor.MIN_SIZE,U[3]-U[1]));_classPrivateMethodGet(c,z,_setScaleFactor2).call(c,y,_);return c}}]);return InkEditor}(o.AnnotationEditor);r.InkEditor=J;function _updateThickness2(t){var r=this,a=this.thickness;this.addCommands({cmd:function cmd(){r.thickness=t;_classPrivateMethodGet(r,K,_fitToContent2).call(r)},undo:function undo(){r.thickness=a;_classPrivateMethodGet(r,K,_fitToContent2).call(r)},mustExec:!0,type:i.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}function _updateColor2(t){var r=this,a=this.color;this.addCommands({cmd:function cmd(){r.color=t;_classPrivateMethodGet(r,N,_redraw2).call(r)},undo:function undo(){r.color=a;_classPrivateMethodGet(r,N,_redraw2).call(r)},mustExec:!0,type:i.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function _updateOpacity2(t){var r=this;t/=100;var a=this.opacity;this.addCommands({cmd:function cmd(){r.opacity=t;_classPrivateMethodGet(r,N,_redraw2).call(r)},undo:function undo(){r.opacity=a;_classPrivateMethodGet(r,N,_redraw2).call(r)},mustExec:!0,type:i.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}function _getInitialBBox2(){var t=this.parentRotation,r=_slicedToArray(this.parentDimensions,2),a=r[0],i=r[1];switch(t){case 90:return[0,i,i,a];case 180:return[a,i,a,i];case 270:return[a,0,i,a];default:return[0,0,a,i]}}function _setStroke2(){var t=this.ctx,r=this.color,a=this.opacity,i=this.thickness,o=this.parentScale,l=this.scaleFactor;t.lineWidth=i*o/l;t.lineCap="round";t.lineJoin="round";t.miterLimit=10;t.strokeStyle="".concat(r).concat((0,c.opacityToHex)(a))}function _startDrawing2(t,r){var a=this;this.canvas.addEventListener("contextmenu",_classPrivateFieldGet(this,h));this.canvas.addEventListener("pointerleave",_classPrivateFieldGet(this,v));this.canvas.addEventListener("pointermove",_classPrivateFieldGet(this,p));this.canvas.addEventListener("pointerup",_classPrivateFieldGet(this,y));this.canvas.removeEventListener("pointerdown",_classPrivateFieldGet(this,_));this.isEditing=!0;if(!_classPrivateFieldGet(this,w)){var i;_classPrivateFieldSet(this,w,!0);_classPrivateMethodGet(this,H,_setCanvasDims2).call(this);this.thickness||(this.thickness=J._defaultThickness);this.color||(this.color=J._defaultColor||o.AnnotationEditor._defaultLineColor);null!==(i=this.opacity)&&void 0!==i||(this.opacity=J._defaultOpacity)}this.currentPath.push([t,r]);_classPrivateFieldSet(this,b,!1);_classPrivateMethodGet(this,I,_setStroke2).call(this);_classPrivateFieldSet(this,k,(function(){_classPrivateMethodGet(a,L,_drawPoints2).call(a);_classPrivateFieldGet(a,k)&&window.requestAnimationFrame(_classPrivateFieldGet(a,k))}));window.requestAnimationFrame(_classPrivateFieldGet(this,k))}function _draw2(t,r){var a,i=_slicedToArray(this.currentPath.at(-1),2),o=i[0],l=i[1];if(!(this.currentPath.length>1&&t===o&&r===l)){var c=this.currentPath,u=_classPrivateFieldGet(this,g);c.push([t,r]);_classPrivateFieldSet(this,b,!0);if(c.length<=2){var d;(d=u).moveTo.apply(d,_toConsumableArray(c[0]));u.lineTo(t,r)}else{if(3===c.length){var h;_classPrivateFieldSet(this,g,u=new Path2D);(h=u).moveTo.apply(h,_toConsumableArray(c[0]))}(a=_classPrivateMethodGet(this,D,_makeBezierCurve2)).call.apply(a,[this,u].concat(_toConsumableArray(c.at(-3)),_toConsumableArray(c.at(-2)),[t,r]))}}}function _endPath2(){var t;if(0!==this.currentPath.length){var r=this.currentPath.at(-1);(t=_classPrivateFieldGet(this,g)).lineTo.apply(t,_toConsumableArray(r))}}function _stopDrawing2(t,r){var a,i=this;_classPrivateFieldSet(this,k,null);t=Math.min(Math.max(t,0),this.canvas.width);r=Math.min(Math.max(r,0),this.canvas.height);_classPrivateMethodGet(this,O,_draw2).call(this,t,r);_classPrivateMethodGet(this,R,_endPath2).call(this);if(1!==this.currentPath.length)a=_classPrivateMethodGet(this,j,_generateBezierPoints2).call(this);else{var o=[t,r];a=[[o,o.slice(),o.slice(),o]]}var l=_classPrivateFieldGet(this,g),c=this.currentPath;this.currentPath=[];_classPrivateFieldSet(this,g,new Path2D);this.addCommands({cmd:function cmd(){i.allRawPaths.push(c);i.paths.push(a);i.bezierPath2D.push(l);i.rebuild()},undo:function undo(){i.allRawPaths.pop();i.paths.pop();i.bezierPath2D.pop();if(0===i.paths.length)i.remove();else{if(!i.canvas){_classPrivateMethodGet(i,B,_createCanvas2).call(i);_classPrivateMethodGet(i,U,_createObserver2).call(i)}_classPrivateMethodGet(i,K,_fitToContent2).call(i)}},mustExec:!0})}function _drawPoints2(){if(_classPrivateFieldGet(this,b)){_classPrivateFieldSet(this,b,!1);var t=Math.ceil(this.thickness*this.parentScale),r=this.currentPath.slice(-3),a=r.map((function(t){return t[0]})),i=r.map((function(t){return t[1]})),o=(Math.min.apply(Math,_toConsumableArray(a)),Math.max.apply(Math,_toConsumableArray(a)),Math.min.apply(Math,_toConsumableArray(i)),Math.max.apply(Math,_toConsumableArray(i)),this.ctx);o.save();o.clearRect(0,0,this.canvas.width,this.canvas.height);var l,c=_createForOfIteratorHelper(this.bezierPath2D);try{for(c.s();!(l=c.n()).done;){var u=l.value;o.stroke(u)}}catch(t){c.e(t)}finally{c.f()}o.stroke(_classPrivateFieldGet(this,g));o.restore()}}function _makeBezierCurve2(t,r,a,i,o,l,c){var u=(r+i)/2,d=(a+o)/2,h=(i+l)/2,p=(o+c)/2;t.bezierCurveTo(u+2*(i-u)/3,d+2*(o-d)/3,h+2*(i-h)/3,p+2*(o-p)/3,h,p)}function _generateBezierPoints2(){var t=this.currentPath;if(t.length<=2)return[[t[0],t[0],t.at(-1),t.at(-1)]];var r,a=[],i=_slicedToArray(t[0],2),o=i[0],l=i[1];for(r=1;r<t.length-2;r++){var c=_slicedToArray(t[r],2),u=c[0],d=c[1],h=_slicedToArray(t[r+1],2),p=(u+h[0])/2,v=(d+h[1])/2,y=[o+2*(u-o)/3,l+2*(d-l)/3],_=[p+2*(u-p)/3,v+2*(d-v)/3];a.push([[o,l],y,_,[p,v]]);o=p;l=v}var g=_slicedToArray(t[r],2),m=g[0],b=g[1],w=_slicedToArray(t[r+1],2),P=w[0],A=w[1],S=[o+2*(m-o)/3,l+2*(b-l)/3],k=[P+2*(m-P)/3,A+2*(b-A)/3];a.push([[o,l],S,k,[P,A]]);return a}function _redraw2(){if(this.isEmpty())_classPrivateMethodGet(this,q,_updateTransform2).call(this);else{_classPrivateMethodGet(this,I,_setStroke2).call(this);var t=this.canvas,r=this.ctx;r.setTransform(1,0,0,1,0,0);r.clearRect(0,0,t.width,t.height);_classPrivateMethodGet(this,q,_updateTransform2).call(this);var a,i=_createForOfIteratorHelper(this.bezierPath2D);try{for(i.s();!(a=i.n()).done;){var o=a.value;r.stroke(o)}}catch(t){i.e(t)}finally{i.f()}}}function _endDrawing2(t){var r=this;this.canvas.removeEventListener("pointerleave",_classPrivateFieldGet(this,v));this.canvas.removeEventListener("pointermove",_classPrivateFieldGet(this,p));this.canvas.removeEventListener("pointerup",_classPrivateFieldGet(this,y));this.canvas.addEventListener("pointerdown",_classPrivateFieldGet(this,_));setTimeout((function(){r.canvas.removeEventListener("contextmenu",_classPrivateFieldGet(r,h))}),10);_classPrivateMethodGet(this,G,_stopDrawing2).call(this,t.offsetX,t.offsetY);this.addToAnnotationStorage();this.setInBackground()}function _createCanvas2(){var t=this;this.canvas=document.createElement("canvas");this.canvas.width=this.canvas.height=0;this.canvas.className="inkEditorCanvas";J._l10nPromise.get("editor_ink_canvas_aria_label").then((function(r){var a;return null===(a=t.canvas)||void 0===a?void 0:a.setAttribute("aria-label",r)}));this.div.append(this.canvas);var r=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0;this.ctx=this.canvas.getContext("2d",r)}function _createObserver2(){var t=this;_classPrivateFieldSet(this,P,new ResizeObserver((function(r){var a=r[0].contentRect;a.width&&a.height&&t.setDimensions(a.width,a.height)})));_classPrivateFieldGet(this,P).observe(this.div)}function _setCanvasDims2(){if(_classPrivateFieldGet(this,w)){var t=_slicedToArray(this.parentDimensions,2),r=t[0],a=t[1];this.canvas.width=Math.ceil(this.width*r);this.canvas.height=Math.ceil(this.height*a);_classPrivateMethodGet(this,q,_updateTransform2).call(this)}}function _setScaleFactor2(t,r){var a=_classPrivateMethodGet(this,Y,_getPadding2).call(this),i=(t-a)/_classPrivateFieldGet(this,d),o=(r-a)/_classPrivateFieldGet(this,u);this.scaleFactor=Math.min(i,o)}function _updateTransform2(){var t=_classPrivateMethodGet(this,Y,_getPadding2).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+t,this.translationY*this.scaleFactor+t)}function _buildPath2D(t){for(var r=new Path2D,a=0,i=t.length;a<i;a++){var o=_slicedToArray(t[a],4),l=o[0],c=o[1],u=o[2],d=o[3];0===a&&r.moveTo.apply(r,_toConsumableArray(l));r.bezierCurveTo(c[0],c[1],u[0],u[1],d[0],d[1])}return r}function _toPDFCoordinates(t,r,a){var i=_slicedToArray(r,4),o=i[0],l=i[1],c=i[2],u=i[3];switch(a){case 0:for(var d=0,h=t.length;d<h;d+=2){t[d]+=o;t[d+1]=u-t[d+1]}break;case 90:for(var p=0,v=t.length;p<v;p+=2){var y=t[p];t[p]=t[p+1]+o;t[p+1]=y+l}break;case 180:for(var _=0,g=t.length;_<g;_+=2){t[_]=c-t[_];t[_+1]+=l}break;case 270:for(var m=0,b=t.length;m<b;m+=2){var w=t[m];t[m]=c-t[m+1];t[m+1]=u-w}break;default:throw new Error("Invalid rotation")}return t}function _fromPDFCoordinates(t,r,a){var i=_slicedToArray(r,4),o=i[0],l=i[1],c=i[2],u=i[3];switch(a){case 0:for(var d=0,h=t.length;d<h;d+=2){t[d]-=o;t[d+1]=u-t[d+1]}break;case 90:for(var p=0,v=t.length;p<v;p+=2){var y=t[p];t[p]=t[p+1]-l;t[p+1]=y-o}break;case 180:for(var _=0,g=t.length;_<g;_+=2){t[_]=c-t[_];t[_+1]-=l}break;case 270:for(var m=0,b=t.length;m<b;m+=2){var w=t[m];t[m]=u-t[m+1];t[m+1]=c-w}break;default:throw new Error("Invalid rotation")}return t}function _serializePaths2(t,r,a,i){var o,l=[],c=this.thickness/2,u=t*r+c,d=t*a+c,h=_createForOfIteratorHelper(this.paths);try{for(h.s();!(o=h.n()).done;){for(var p=o.value,v=[],y=[],_=0,g=p.length;_<g;_++){var m=_slicedToArray(p[_],4),b=m[0],w=m[1],P=m[2],A=m[3],S=t*b[0]+u,k=t*b[1]+d,x=t*w[0]+u,E=t*w[1]+d,T=t*P[0]+u,C=t*P[1]+d,I=t*A[0]+u,M=t*A[1]+d;if(0===_){v.push(S,k);y.push(S,k)}v.push(x,E,T,C,I,M);y.push(x,E);_===g-1&&y.push(I,M)}l.push({bezier:_classStaticPrivateMethodGet(J,J,_toPDFCoordinates).call(J,v,i,this.rotation),points:_classStaticPrivateMethodGet(J,J,_toPDFCoordinates).call(J,y,i,this.rotation)})}}catch(t){h.e(t)}finally{h.f()}return l}function _getBbox2(){var t,r=1/0,a=-1/0,o=1/0,l=-1/0,c=_createForOfIteratorHelper(this.paths);try{for(c.s();!(t=c.n()).done;){var u,d=_createForOfIteratorHelper(t.value);try{for(d.s();!(u=d.n()).done;){var h=_slicedToArray(u.value,4),p=h[0],v=h[1],y=h[2],_=h[3],g=i.Util.bezierBoundingBox.apply(i.Util,_toConsumableArray(p).concat(_toConsumableArray(v),_toConsumableArray(y),_toConsumableArray(_)));r=Math.min(r,g[0]);o=Math.min(o,g[1]);a=Math.max(a,g[2]);l=Math.max(l,g[3])}}catch(t){d.e(t)}finally{d.f()}}}catch(t){c.e(t)}finally{c.f()}return[r,o,a,l]}function _getPadding2(){return _classPrivateFieldGet(this,m)?Math.ceil(this.thickness*this.parentScale):0}function _fitToContent2(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isEmpty())if(_classPrivateFieldGet(this,m)){var r=_classPrivateMethodGet(this,X,_getBbox2).call(this),a=_classPrivateMethodGet(this,Y,_getPadding2).call(this);_classPrivateFieldSet(this,d,Math.max(o.AnnotationEditor.MIN_SIZE,r[2]-r[0]));_classPrivateFieldSet(this,u,Math.max(o.AnnotationEditor.MIN_SIZE,r[3]-r[1]));var i=Math.ceil(a+_classPrivateFieldGet(this,d)*this.scaleFactor),l=Math.ceil(a+_classPrivateFieldGet(this,u)*this.scaleFactor),c=_slicedToArray(this.parentDimensions,2),h=c[0],p=c[1];this.width=i/h;this.height=l/p;this.setAspectRatio(i,l);var v=this.translationX,y=this.translationY;this.translationX=-r[0];this.translationY=-r[1];_classPrivateMethodGet(this,H,_setCanvasDims2).call(this);_classPrivateMethodGet(this,N,_redraw2).call(this);_classPrivateFieldSet(this,A,i);_classPrivateFieldSet(this,S,l);this.setDims(i,l);var _=t?a/this.scaleFactor/2:0;this.translate(v-this.translationX-_,y-this.translationY-_)}else _classPrivateMethodGet(this,N,_redraw2).call(this)}_defineProperty(J,"_defaultColor",null);_defineProperty(J,"_defaultOpacity",1);_defineProperty(J,"_defaultThickness",1);_defineProperty(J,"_l10nPromise",void 0);_defineProperty(J,"_type","ink")},(t,r,a)=>{a(85);a(90);a(292);a(300);a(112);a(2);a(71);a(73);a(405);a(402);a(167);a(310);a(403);a(301);a(258);a(255);a(92);a(105);a(104);a(306);a(307);a(308);a(309);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.StampEditor=void 0;a(140);a(280);a(146);a(148);a(149);a(249);a(247);a(248);a(123);a(302);a(347);a(259);a(346);a(379);a(245);a(312);a(338);a(342);a(343);a(344);var i=a(1),o=a(353),l=a(362),c=a(410);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,r,a){t[r]=a.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function define(t,r,a){return Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,o){var l=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(l.prototype),u=new Context(o||[]);return i(c,"_invoke",{value:makeInvokeMethod(t,a,u)}),c}function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var h={};define(h,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&a.call(v,l)&&(h=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(h);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(i,o,l,c){var u=tryCatch(t[i],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"==_typeof(h)&&a.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t,l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function value(t,a){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,a,r,i)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,a){var i="suspendedStart";return function(o,l){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw l;return{value:void 0,done:!0}}for(a.method=o,a.arg=l;;){var c=a.delegate;if(c){var u=maybeInvokeDelegate(c,a);if(u){if(u===d)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===i)throw i="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i="executing";var h=tryCatch(t,r,a);if("normal"===h.type){if(i=a.done?"completed":"suspendedYield",h.arg===d)continue;return{value:h.arg,done:a.done}}"throw"===h.type&&(i="completed",a.method="throw",a.arg=h.arg)}}}function maybeInvokeDelegate(t,r){var a=r.method,i=t.iterator[a];if(void 0===i)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),d;var o=tryCatch(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,d):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function next(){for(;++i<t.length;)if(a.call(t,i))return next.value=t[i],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,i(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),i(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(r,a,i,o),l);return t.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},defineIteratorMethods(y),define(y,u,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),a=[];for(var i in r)a.push(i);return a.reverse(),function next(){for(;a.length;){var t=a.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(a,i){return l.type="throw",l.arg=t,r.next=a,i&&(r.method="next",r.arg=void 0),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};return c.type=t,c.arg=r,l?(this.method="next",this.next=l.finallyLoc,d):this.complete(c)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),d}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,a){return this.delegate={iterator:values(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=void 0),d}},t}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,h=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){h=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(h)throw o}}return u}}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t,r)||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 _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function ownKeys(t,r){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),a.push.apply(a,i)}return a}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(a),!0).forEach((function(r){_defineProperty(t,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))}))}return t}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,a){var i=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(i){var o=Object.getOwnPropertyDescriptor(i,r);return o.get?o.get.call(arguments.length<3?t:a):o.value}};return _get.apply(this,arguments)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,a)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _defineProperty(t,r,a){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,r||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateFieldInitSpec(t,r,a){_checkPrivateRedeclaration(t,r);r.set(t,a)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function _classPrivateFieldSet(t,r,a){!function _classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,_classExtractFieldDescriptor(t,r,"set"),a);return a}function _classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}var u=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakMap,_=new WeakMap,g=new WeakMap,m=new WeakMap,b=new WeakMap,w=new WeakSet,P=new WeakSet,A=new WeakSet,S=new WeakSet,k=new WeakSet,x=new WeakSet,E=new WeakSet,T=new WeakSet,C=new WeakSet,I=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(StampEditor,t);var r=_createSuper(StampEditor);function StampEditor(t){var a;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,StampEditor);_classPrivateMethodInitSpec(_assertThisInitialized(a=r.call(this,_objectSpread(_objectSpread({},t),{},{name:"stampEditor"}))),C);_classPrivateMethodInitSpec(_assertThisInitialized(a),T);_classPrivateMethodInitSpec(_assertThisInitialized(a),E);_classPrivateMethodInitSpec(_assertThisInitialized(a),x);_classPrivateMethodInitSpec(_assertThisInitialized(a),k);_classPrivateMethodInitSpec(_assertThisInitialized(a),S);_classPrivateMethodInitSpec(_assertThisInitialized(a),A);_classPrivateMethodInitSpec(_assertThisInitialized(a),P);_classPrivateMethodInitSpec(_assertThisInitialized(a),w);_classPrivateFieldInitSpec(_assertThisInitialized(a),u,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(a),d,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(a),h,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(a),p,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(a),v,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(a),y,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(a),_,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(a),g,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(a),m,{writable:!0,value:!1});_classPrivateFieldInitSpec(_assertThisInitialized(a),b,{writable:!0,value:!1});_classPrivateFieldSet(_assertThisInitialized(a),p,t.bitmapUrl);_classPrivateFieldSet(_assertThisInitialized(a),v,t.bitmapFile);return a}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(StampEditor,[{key:"remove",value:function remove(){if(_classPrivateFieldGet(this,d)){var t,r;_classPrivateFieldSet(this,u,null);this._uiManager.imageManager.deleteId(_classPrivateFieldGet(this,d));null===(t=_classPrivateFieldGet(this,y))||void 0===t||t.remove();_classPrivateFieldSet(this,y,null);null===(r=_classPrivateFieldGet(this,_))||void 0===r||r.disconnect();_classPrivateFieldSet(this,_,null)}_get(_getPrototypeOf(StampEditor.prototype),"remove",this).call(this)}},{key:"rebuild",value:function rebuild(){if(this.parent){_get(_getPrototypeOf(StampEditor.prototype),"rebuild",this).call(this);if(null!==this.div){_classPrivateFieldGet(this,d)&&_classPrivateMethodGet(this,A,_getBitmap2).call(this);this.isAttachedToDOM||this.parent.add(this)}}else _classPrivateFieldGet(this,d)&&_classPrivateMethodGet(this,A,_getBitmap2).call(this)}},{key:"onceAdded",value:function onceAdded(){this._isDraggable=!0;this.div.focus()}},{key:"isEmpty",value:function isEmpty(){return!(_classPrivateFieldGet(this,h)||_classPrivateFieldGet(this,u)||_classPrivateFieldGet(this,p)||_classPrivateFieldGet(this,v))}},{key:"isResizable",get:function get(){return!0}},{key:"render",value:function render(){if(this.div)return this.div;var t,r;if(this.width){t=this.x;r=this.y}_get(_getPrototypeOf(StampEditor.prototype),"render",this).call(this);this.div.hidden=!0;_classPrivateFieldGet(this,u)?_classPrivateMethodGet(this,S,_createCanvas2).call(this):_classPrivateMethodGet(this,A,_getBitmap2).call(this);if(this.width){var a=_slicedToArray(this.parentDimensions,2),i=a[0],o=a[1];this.setAt(t*i,r*o,this.width*i,this.height*o)}return this.div}},{key:"serialize",value:function serialize(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.isEmpty())return null;var a={annotationType:i.AnnotationEditorType.STAMP,bitmapId:_classPrivateFieldGet(this,d),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:_classPrivateFieldGet(this,m)};if(t){a.bitmapUrl=_classPrivateMethodGet(this,T,_serializeBitmap2).call(this,!0);return a}if(null===r)return a;r.stamps||(r.stamps=new Map);var o=_classPrivateFieldGet(this,m)?(a.rect[2]-a.rect[0])*(a.rect[3]-a.rect[1]):null;if(r.stamps.has(_classPrivateFieldGet(this,d))){if(_classPrivateFieldGet(this,m)){var l=r.stamps.get(_classPrivateFieldGet(this,d));if(o>l.area){l.area=o;l.serialized.bitmap.close();l.serialized.bitmap=_classPrivateMethodGet(this,T,_serializeBitmap2).call(this,!1)}}}else{r.stamps.set(_classPrivateFieldGet(this,d),{area:o,serialized:a});a.bitmap=_classPrivateMethodGet(this,T,_serializeBitmap2).call(this,!1)}return a}}],[{key:"supportedTypes",get:function get(){return(0,i.shadow)(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map((function(t){return"image/".concat(t)})))}},{key:"supportedTypesStr",get:function get(){return(0,i.shadow)(this,"supportedTypesStr",this.supportedTypes.join(","))}},{key:"isHandlingMimeForPasting",value:function isHandlingMimeForPasting(t){return this.supportedTypes.includes(t)}},{key:"paste",value:function paste(t,r){r.pasteEditor(i.AnnotationEditorType.STAMP,{bitmapFile:t.getAsFile()})}},{key:"deserialize",value:function deserialize(t,r,a){if(t instanceof c.StampAnnotationElement)return null;var i=_get(_getPrototypeOf(StampEditor),"deserialize",this).call(this,t,r,a),o=t.rect,l=t.bitmapUrl,u=t.bitmapId,h=t.isSvg;u&&a.imageManager.isValidId(u)?_classPrivateFieldSet(i,d,u):_classPrivateFieldSet(i,p,l);_classPrivateFieldSet(i,m,h);var v=_slicedToArray(i.pageDimensions,2),y=v[0],_=v[1];i.width=(o[2]-o[0])/y;i.height=(o[3]-o[1])/_;return i}}]);return StampEditor}(o.AnnotationEditor);r.StampEditor=I;function _getBitmapFetched2(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t){_classPrivateFieldSet(this,u,t.bitmap);if(!r){_classPrivateFieldSet(this,d,t.id);_classPrivateFieldSet(this,m,t.isSvg)}_classPrivateMethodGet(this,S,_createCanvas2).call(this)}else this.remove()}function _getBitmapDone2(){_classPrivateFieldSet(this,h,null);this._uiManager.enableWaiting(!1);_classPrivateFieldGet(this,y)&&this.div.focus()}function _getBitmap2(){var t=this;if(_classPrivateFieldGet(this,d)){this._uiManager.enableWaiting(!0);this._uiManager.imageManager.getFromId(_classPrivateFieldGet(this,d)).then((function(r){return _classPrivateMethodGet(t,w,_getBitmapFetched2).call(t,r,!0)})).finally((function(){return _classPrivateMethodGet(t,P,_getBitmapDone2).call(t)}))}else if(_classPrivateFieldGet(this,p)){var r=_classPrivateFieldGet(this,p);_classPrivateFieldSet(this,p,null);this._uiManager.enableWaiting(!0);_classPrivateFieldSet(this,h,this._uiManager.imageManager.getFromUrl(r).then((function(r){return _classPrivateMethodGet(t,w,_getBitmapFetched2).call(t,r)})).finally((function(){return _classPrivateMethodGet(t,P,_getBitmapDone2).call(t)})))}else if(_classPrivateFieldGet(this,v)){var a=_classPrivateFieldGet(this,v);_classPrivateFieldSet(this,v,null);this._uiManager.enableWaiting(!0);_classPrivateFieldSet(this,h,this._uiManager.imageManager.getFromFile(a).then((function(r){return _classPrivateMethodGet(t,w,_getBitmapFetched2).call(t,r)})).finally((function(){return _classPrivateMethodGet(t,P,_getBitmapDone2).call(t)})))}else{var i=document.createElement("input");i.type="file";i.accept=I.supportedTypesStr;_classPrivateFieldSet(this,h,new Promise((function(r){i.addEventListener("change",_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var a;return _regeneratorRuntime().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:if(i.files&&0!==i.files.length){o.next=4;break}t.remove();o.next=9;break;case 4:t._uiManager.enableWaiting(!0);o.next=7;return t._uiManager.imageManager.getFromFile(i.files[0]);case 7:a=o.sent;_classPrivateMethodGet(t,w,_getBitmapFetched2).call(t,a);case 9:r();case 10:case"end":return o.stop()}}),_callee)}))));i.addEventListener("cancel",(function(){t.remove();r()}))})).finally((function(){return _classPrivateMethodGet(t,P,_getBitmapDone2).call(t)})));i.click()}}function _createCanvas2(){var t=this.div,r=_classPrivateFieldGet(this,u),a=r.width,i=r.height,o=_slicedToArray(this.pageDimensions,2),l=o[0],c=o[1],d=.75;if(this.width){a=this.width*l;i=this.height*c}else if(a>d*l||i>d*c){var h=Math.min(d*l/a,d*c/i);a*=h;i*=h}var p=_slicedToArray(this.parentDimensions,2),v=p[0],_=p[1];this.setDims(a*v/l,i*_/c);this._uiManager.enableWaiting(!1);var g=_classPrivateFieldSet(this,y,document.createElement("canvas"));t.append(g);t.hidden=!1;_classPrivateMethodGet(this,E,_drawBitmap2).call(this,a,i);_classPrivateMethodGet(this,C,_createObserver2).call(this);if(!_classPrivateFieldGet(this,b)){this.parent.addUndoableEditor(this);_classPrivateFieldSet(this,b,!0)}}function _setDimensions2(t,r){var a,i=this,o=_slicedToArray(this.parentDimensions,2),l=o[0],c=o[1];this.width=t/l;this.height=r/c;this.setDims(t,r);null!==(a=this._initialOptions)&&void 0!==a&&a.isCentered?this.center():this.fixAndSetPosition();this._initialOptions=null;null!==_classPrivateFieldGet(this,g)&&clearTimeout(_classPrivateFieldGet(this,g));_classPrivateFieldSet(this,g,setTimeout((function(){_classPrivateFieldSet(i,g,null);_classPrivateMethodGet(i,E,_drawBitmap2).call(i,t,r)}),200))}function _scaleBitmap2(t,r){for(var a=_classPrivateFieldGet(this,u),i=a.width,o=a.height,l=_classPrivateFieldGet(this,u);i>2*t||o>2*r;){var c=i,d=o;i>2*t&&(i=i>=16384?Math.floor(i/2)-1:Math.ceil(i/2));o>2*r&&(o=o>=16384?Math.floor(o/2)-1:Math.ceil(o/2));var h=new OffscreenCanvas(i,o);h.getContext("2d").drawImage(l,0,0,c,d,0,0,i,o);l=h.transferToImageBitmap()}return l}function _drawBitmap2(t,r){t=Math.ceil(t);r=Math.ceil(r);var a=_classPrivateFieldGet(this,y);if(a&&(a.width!==t||a.height!==r)){a.width=t;a.height=r;var i=_classPrivateFieldGet(this,m)?_classPrivateFieldGet(this,u):_classPrivateMethodGet(this,x,_scaleBitmap2).call(this,t,r),o=a.getContext("2d");o.filter=this._uiManager.hcmFilter;o.drawImage(i,0,0,i.width,i.height,0,0,t,r)}}function _serializeBitmap2(t){if(t){if(_classPrivateFieldGet(this,m)){var r=this._uiManager.imageManager.getSvgUrl(_classPrivateFieldGet(this,d));if(r)return r}var a=document.createElement("canvas"),i=_classPrivateFieldGet(this,u);a.width=i.width;a.height=i.height;a.getContext("2d").drawImage(_classPrivateFieldGet(this,u),0,0);return a.toDataURL()}if(_classPrivateFieldGet(this,m)){var o=_slicedToArray(this.pageDimensions,2),c=o[0],h=o[1],p=Math.round(this.width*c*l.PixelsPerInch.PDF_TO_CSS_UNITS),v=Math.round(this.height*h*l.PixelsPerInch.PDF_TO_CSS_UNITS),y=new OffscreenCanvas(p,v);y.getContext("2d").drawImage(_classPrivateFieldGet(this,u),0,0,_classPrivateFieldGet(this,u).width,_classPrivateFieldGet(this,u).height,0,0,p,v);return y.transferToImageBitmap()}return structuredClone(_classPrivateFieldGet(this,u))}function _createObserver2(){var t=this;_classPrivateFieldSet(this,_,new ResizeObserver((function(r){var a=r[0].contentRect;a.width&&a.height&&_classPrivateMethodGet(t,k,_setDimensions2).call(t,a.width,a.height)})));_classPrivateFieldGet(this,_).observe(this.div)}_defineProperty(I,"_type","stamp")}],__webpack_module_cache__={};function __w_pdfjs_require__(t){var r=__webpack_module_cache__[t];if(void 0!==r)return r.exports;var a=__webpack_module_cache__[t]={exports:{}};__webpack_modules__[t].call(a.exports,a,a.exports,__w_pdfjs_require__);return a.exports}var __webpack_exports__={};(()=>{var t=__webpack_exports__;Object.defineProperty(t,"__esModule",{value:!0});Object.defineProperty(t,"AbortException",{enumerable:!0,get:function get(){return r.AbortException}});Object.defineProperty(t,"AnnotationEditorLayer",{enumerable:!0,get:function get(){return l.AnnotationEditorLayer}});Object.defineProperty(t,"AnnotationEditorParamsType",{enumerable:!0,get:function get(){return r.AnnotationEditorParamsType}});Object.defineProperty(t,"AnnotationEditorType",{enumerable:!0,get:function get(){return r.AnnotationEditorType}});Object.defineProperty(t,"AnnotationEditorUIManager",{enumerable:!0,get:function get(){return c.AnnotationEditorUIManager}});Object.defineProperty(t,"AnnotationLayer",{enumerable:!0,get:function get(){return u.AnnotationLayer}});Object.defineProperty(t,"AnnotationMode",{enumerable:!0,get:function get(){return r.AnnotationMode}});Object.defineProperty(t,"CMapCompressionType",{enumerable:!0,get:function get(){return r.CMapCompressionType}});Object.defineProperty(t,"FeatureTest",{enumerable:!0,get:function get(){return r.FeatureTest}});Object.defineProperty(t,"GlobalWorkerOptions",{enumerable:!0,get:function get(){return d.GlobalWorkerOptions}});Object.defineProperty(t,"ImageKind",{enumerable:!0,get:function get(){return r.ImageKind}});Object.defineProperty(t,"InvalidPDFException",{enumerable:!0,get:function get(){return r.InvalidPDFException}});Object.defineProperty(t,"MissingPDFException",{enumerable:!0,get:function get(){return r.MissingPDFException}});Object.defineProperty(t,"OPS",{enumerable:!0,get:function get(){return r.OPS}});Object.defineProperty(t,"PDFDataRangeTransport",{enumerable:!0,get:function get(){return a.PDFDataRangeTransport}});Object.defineProperty(t,"PDFDateString",{enumerable:!0,get:function get(){return i.PDFDateString}});Object.defineProperty(t,"PDFWorker",{enumerable:!0,get:function get(){return a.PDFWorker}});Object.defineProperty(t,"PasswordResponses",{enumerable:!0,get:function get(){return r.PasswordResponses}});Object.defineProperty(t,"PermissionFlag",{enumerable:!0,get:function get(){return r.PermissionFlag}});Object.defineProperty(t,"PixelsPerInch",{enumerable:!0,get:function get(){return i.PixelsPerInch}});Object.defineProperty(t,"PromiseCapability",{enumerable:!0,get:function get(){return r.PromiseCapability}});Object.defineProperty(t,"RenderingCancelledException",{enumerable:!0,get:function get(){return i.RenderingCancelledException}});Object.defineProperty(t,"SVGGraphics",{enumerable:!0,get:function get(){return a.SVGGraphics}});Object.defineProperty(t,"UnexpectedResponseException",{enumerable:!0,get:function get(){return r.UnexpectedResponseException}});Object.defineProperty(t,"Util",{enumerable:!0,get:function get(){return r.Util}});Object.defineProperty(t,"VerbosityLevel",{enumerable:!0,get:function get(){return r.VerbosityLevel}});Object.defineProperty(t,"XfaLayer",{enumerable:!0,get:function get(){return h.XfaLayer}});Object.defineProperty(t,"build",{enumerable:!0,get:function get(){return a.build}});Object.defineProperty(t,"createValidAbsoluteUrl",{enumerable:!0,get:function get(){return r.createValidAbsoluteUrl}});Object.defineProperty(t,"getDocument",{enumerable:!0,get:function get(){return a.getDocument}});Object.defineProperty(t,"getFilenameFromUrl",{enumerable:!0,get:function get(){return i.getFilenameFromUrl}});Object.defineProperty(t,"getPdfFilenameFromUrl",{enumerable:!0,get:function get(){return i.getPdfFilenameFromUrl}});Object.defineProperty(t,"getXfaPageViewport",{enumerable:!0,get:function get(){return i.getXfaPageViewport}});Object.defineProperty(t,"isDataScheme",{enumerable:!0,get:function get(){return i.isDataScheme}});Object.defineProperty(t,"isPdfFile",{enumerable:!0,get:function get(){return i.isPdfFile}});Object.defineProperty(t,"loadScript",{enumerable:!0,get:function get(){return i.loadScript}});Object.defineProperty(t,"normalizeUnicode",{enumerable:!0,get:function get(){return r.normalizeUnicode}});Object.defineProperty(t,"renderTextLayer",{enumerable:!0,get:function get(){return o.renderTextLayer}});Object.defineProperty(t,"setLayerDimensions",{enumerable:!0,get:function get(){return i.setLayerDimensions}});Object.defineProperty(t,"shadow",{enumerable:!0,get:function get(){return r.shadow}});Object.defineProperty(t,"updateTextLayer",{enumerable:!0,get:function get(){return o.updateTextLayer}});Object.defineProperty(t,"version",{enumerable:!0,get:function get(){return a.version}});var r=__w_pdfjs_require__(1),a=__w_pdfjs_require__(305),i=__w_pdfjs_require__(362),o=__w_pdfjs_require__(400),l=__w_pdfjs_require__(401),c=__w_pdfjs_require__(356),u=__w_pdfjs_require__(410),d=__w_pdfjs_require__(384),h=__w_pdfjs_require__(418)})();return __webpack_exports__})()));
});